@angular/fire 21.0.0-rc.0-canary.778625a → 21.0.0-rc.0-canary.73acea7

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/README.md CHANGED
@@ -12,34 +12,33 @@ by conforming to Angular conventions.
12
12
  - **Observable based** - Utilize RxJS rather than callbacks for real-time streams.
13
13
  - **NgRx friendly API** - Integrate with NgRx using AngularFire's action based APIs.
14
14
  - **Lazy-loading** - AngularFire dynamically imports much of Firebase, reducing the time to load your app.
15
- - **Deploy schematics** - Get your Angular application deployed on Firebase Hosting with a single command.
16
15
  - **Google Analytics** - Zero-effort Angular Router awareness in Google Analytics.
17
16
  - **Router Guards** - Guard your Angular routes with built-in Firebase Authentication checks.
18
17
 
19
18
  ## Example use
20
19
 
21
20
  ```ts
21
+ import { ApplicationConfig } from '@angular/core';
22
22
  import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
23
23
  import { getFirestore, provideFirestore } from '@angular/fire/firestore';
24
24
 
25
25
  export const appConfig: ApplicationConfig = {
26
26
  providers: [
27
- provideFirebaseApp(() => initializeApp({ ... })),
27
+ provideFirebaseApp(() => initializeApp({ /* ...your Firebase config... */ })),
28
28
  provideFirestore(() => getFirestore()),
29
- ...
29
+ // ...
30
30
  ],
31
- ...
32
- })
31
+ // ...
32
+ }
33
33
  ```
34
34
 
35
35
  ```ts
36
36
  import { AsyncPipe } from '@angular/common';
37
- import { inject } from '@angular/core';
37
+ import { Component, inject } from '@angular/core';
38
38
  import { Firestore, collectionData, collection } from '@angular/fire/firestore';
39
39
 
40
40
  interface Item {
41
- name: string,
42
- ...
41
+ name: string;
43
42
  };
44
43
 
45
44
  @Component({
@@ -55,7 +54,7 @@ interface Item {
55
54
  `,
56
55
  imports: [AsyncPipe]
57
56
  })
58
- export class AppComponent {
57
+ export class App {
59
58
  firestore = inject(Firestore);
60
59
  itemCollection = collection(this.firestore, 'items');
61
60
  items$ = collectionData<Item>(this.itemCollection);
@@ -70,7 +69,7 @@ export class AppComponent {
70
69
 
71
70
  [Contributing](CONTRIBUTING.md)
72
71
 
73
- [Stackblitz Template](https://stackblitz.com/edit/angular-fire-start) - Remember to set your Firebase configuration in `app/app.module.ts`.
72
+ [Stackblitz Template](https://stackblitz.com/edit/angular-fire-start) - A runnable AngularFire example. Add your own Firebase configuration to connect it to your project.
74
73
 
75
74
  [Upgrading from v6.0? Check out our guide.](docs/version-7-upgrade.md)
76
75
 
@@ -84,7 +83,7 @@ The [`sample`](sample) folder contains a kitchen sink application that demonstra
84
83
 
85
84
  Get help on our [Q&A board](https://github.com/angular/angularfire/discussions?discussions_q=category%3AQ%26A), the official [Firebase Mailing List](https://groups.google.com/forum/#!forum/firebase-talk), the [Firebase Community Slack](https://firebase.community/) (`#angularfire2`), the [Angular Community Discord](http://discord.gg/angular) (`#firebase`), [Gitter](https://gitter.im/angular/angularfire2), the [Firebase subreddit](https://www.reddit.com/r/firebase), or [Stack Overflow](https://stackoverflow.com/questions/tagged/angularfire2).
86
85
 
87
- > **NOTE:** While relatively stable, AngularFire is a [developer preview](https://angular.io/guide/releases#developer-preview) and is subject to change before general availability. Questions on the mailing list and issues filed here are answered on a <strong>best-effort basis</strong> by maintainers and other community members. If you are able to reproduce a problem with Firebase <em>outside of AngularFire's implementation</em>, please [file an issue on the Firebase JS SDK](https://github.com/firebase/firebase-js-sdk/issues) or reach out to the personalized [Firebase support channel](https://firebase.google.com/support/).
86
+ > **NOTE:** Questions on the mailing list and issues filed here are answered on a <strong>best-effort basis</strong> by maintainers and other community members. If you are able to reproduce a problem with Firebase <em>outside of AngularFire's implementation</em>, please [file an issue on the Firebase JS SDK](https://github.com/firebase/firebase-js-sdk/issues) or reach out to the personalized [Firebase support channel](https://firebase.google.com/support/).
88
87
 
89
88
  ## Developer Guide
90
89
 
@@ -98,10 +97,26 @@ This developer guide assumes you're using the new tree-shakable AngularFire API,
98
97
  <tr>
99
98
  <td>
100
99
 
100
+ #### [AI Logic](docs/ai.md#ai-logic)
101
+ ```ts
102
+ import { } from '@angular/fire/ai';
103
+ ```
104
+ </td>
105
+ <td>
106
+
101
107
  #### [Analytics](docs/analytics.md#analytics)
102
108
  ```ts
103
109
  import { } from '@angular/fire/analytics';
104
110
  ```
111
+ </td>
112
+ </tr>
113
+ <tr>
114
+ <td>
115
+
116
+ #### [App Check](docs/app-check.md#app-check)
117
+ ```ts
118
+ import { } from '@angular/fire/app-check';
119
+ ```
105
120
  </td>
106
121
  <td>
107
122
 
@@ -173,22 +188,6 @@ import { } from '@angular/fire/database';
173
188
  ```ts
174
189
  import { } from '@angular/fire/remote-config';
175
190
  ```
176
- </td>
177
- </tr>
178
- <tr>
179
- <td>
180
-
181
- #### [App Check](docs/app-check.md#app-check)
182
- ```ts
183
- import { } from '@angular/fire/app-check';
184
- ```
185
- </td>
186
- <td>
187
-
188
- #### [AI Logic](docs/ai.md#ai-logic)
189
- ```ts
190
- import { } from '@angular/fire/ai';
191
- ```
192
191
  </td>
193
192
  </tr>
194
193
  </table>
@@ -1,5 +1,7 @@
1
1
  # Deploy your application on Firebase Hosting & Functions
2
2
 
3
+ > **This page is out of date.** It describes a setup flow that `ng add @angular/fire` no longer performs, and wiring the deploy target by hand from the samples below puts you on a deprecated path that warns on every deploy. For current guidance see [the Quickstart](../install-and-setup.md), step 6, and for server-side rendered apps see the [App Hosting guide](../app-hosting.md).
4
+
3
5
  In this guide, we'll look at how to use `@angular/fire` to automatically deploy an Angular application to Firebase hosting or functions by using the Angular CLI.
4
6
 
5
7
  `@angular/fire` uses Firebase functions to deploy your Angular universal projects, with server-side rendering enabled.
@@ -1,5 +1,11 @@
1
1
  # AngularFire Quickstart
2
2
 
3
+ ## Before you begin
4
+
5
+ - **Firebase CLI.** Setup uses the Firebase CLI (`firebase-tools`), version 14 or newer. `ng add` installs it if it is missing and prompts you to sign in, so you do not have to install it yourself first. It does not upgrade a copy you already have, so an older one stops setup with `firebase-tools version 14.0.0+ is required, please upgrade and run again`. To handle it ahead of time, or to clear that error, run `npm install -g firebase-tools` then `firebase login`.
6
+ - **On the newest Angular major, use `@next`.** If `ng add @angular/fire` reports an Angular peer-dependency conflict, your Angular version is newer than AngularFire's default (`latest`) release. Install the version-matched pre-release instead: `ng add @angular/fire@next`.
7
+ - **Harmless CLI noise.** The Firebase CLI may print a `punycode` deprecation warning or ask about enabling extra features (for example Gemini) during setup. These come from the CLI, not from AngularFire, and are safe to ignore.
8
+
3
9
  ### 1. Create a new project
4
10
 
5
11
  ```bash
@@ -31,14 +37,14 @@ The Angular CLI's `new` command will set up the latest Angular build in a new pr
31
37
  ng add @angular/fire
32
38
  ```
33
39
 
34
- Now that you have a new project setup, install AngularFire and Firebase from npm. This will complete the following tasks:
40
+ This installs AngularFire and configures your project. `ng add` will:
35
41
 
36
- 1. Add Firebase config to environments variables
37
- 2. Configure `@NgModule` for the `AngularFireModule`
42
+ 1. Prompt you to select the features to enable and the Firebase project to use, signing you in to Firebase if needed.
43
+ 2. Add `provideFirebaseApp(...)`, along with a provider for each feature you select, to your app configuration (for example `app.config.ts`), with your Firebase configuration inlined. No environment files are created.
38
44
 
39
45
  ### 3. Inject `Firestore`
40
46
 
41
- Open `/src/app/app.component.ts`, and make the following changes to :
47
+ Open `/src/app/app.ts` and make the following changes:
42
48
 
43
49
  ```ts
44
50
  import { Component, inject } from '@angular/core';
@@ -47,11 +53,11 @@ import { Firestore } from '@angular/fire/firestore';
47
53
 
48
54
  @Component({
49
55
  selector: 'app-root',
50
- templateUrl: 'app.component.html',
51
- styleUrls: ['app.component.css'],
56
+ templateUrl: './app.html',
57
+ styleUrl: './app.css',
52
58
  imports: [AsyncPipe],
53
59
  })
54
- export class AppComponent {
60
+ export class App {
55
61
  firestore: Firestore = inject(Firestore);
56
62
 
57
63
  constructor() {
@@ -62,7 +68,7 @@ export class AppComponent {
62
68
 
63
69
  ### 4. Bind a Firestore collection to a list
64
70
 
65
- In `/src/app/app.component.ts`:
71
+ In `/src/app/app.ts`:
66
72
 
67
73
  ```ts
68
74
  import { Component, inject } from '@angular/core';
@@ -70,25 +76,28 @@ import { AsyncPipe } from '@angular/common';
70
76
  import { Observable } from 'rxjs';
71
77
  import { Firestore, collection, collectionData } from '@angular/fire/firestore';
72
78
 
79
+ interface Item {
80
+ name: string;
81
+ }
82
+
73
83
  @Component({
74
84
  selector: 'app-root',
75
- standalone: true,
76
85
  imports: [AsyncPipe],
77
- templateUrl: 'app.component.html',
78
- styleUrls: ['app.component.css']
86
+ templateUrl: './app.html',
87
+ styleUrl: './app.css'
79
88
  })
80
- export class AppComponent {
89
+ export class App {
81
90
  firestore: Firestore = inject(Firestore);
82
- items$: Observable<any[]>;
91
+ items$: Observable<Item[]>;
83
92
 
84
93
  constructor() {
85
94
  const aCollection = collection(this.firestore, 'items')
86
- this.items$ = collectionData(aCollection);
95
+ this.items$ = collectionData<Item>(aCollection);
87
96
  }
88
97
  }
89
98
  ```
90
99
 
91
- Open `/src/app/app.component.html`:
100
+ Open `/src/app/app.html`:
92
101
 
93
102
  ```html
94
103
  <ul>
@@ -112,8 +121,8 @@ Once you've created a `items` collection and are inserting documents, you should
112
121
 
113
122
  ### 6. Deploy your app
114
123
 
115
- Finally, we can deploy the application to Firebase hosting:
124
+ How you deploy depends on whether your app uses server-side rendering (SSR), which the Angular CLI asks about when you create the project.
116
125
 
117
- ```bash
118
- ng deploy
119
- ```
126
+ **Client-side rendered apps** (the default) build to static files, which you deploy to Firebase Hosting. Follow Firebase's [Hosting quickstart](https://firebase.google.com/docs/hosting/quickstart) to build and deploy your app.
127
+
128
+ **Server-side rendered apps** run a Node server, so deploy them to [Firebase App Hosting](app-hosting.md), Firebase's recommended path for SSR. That guide also covers a common case where an SSR app silently falls back to client-side rendering after deploying.
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.778625a",
4
+ "version": "21.0.0-rc.0-canary.73acea7",
5
5
  "description": "Angular + Firebase = ❤️",
6
6
  "publishConfig": {
7
7
  "registry": "https://wombat-dressing-room.appspot.com",
@@ -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.778625a",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.73acea7",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});
@@ -110,7 +110,7 @@ COPY package*.json ./
110
110
  RUN npm install --only=production
111
111
  COPY . ./
112
112
  CMD [ "npm", "start" ]
113
- `;var SJ={};var bJ=typeof __dirname=="string"?__dirname:(0,Y.dirname)((0,e9.fileURLToPath)(SJ.url)),{copySync:i9,removeSync:s9,readJsonSync:DJ}=r9.default,o9=5e3,a9="localhost",vJ={memory:"1Gi",timeout:60,maxInstances:"default",maxConcurrency:"default",minInstances:"default",cpus:1},zx=(e,t,r)=>Ge(void 0,null,function*(){return new Promise((n,i)=>{let s=(0,Z7.spawn)(e,t,r),o=[],a=[];s.stdout.on("data",u=>{process.stdout.write(u.toString()),o.push(u)}),s.stderr.on("data",u=>{process.stderr.write(u.toString()),a.push(u)}),s.on("error",u=>{i(u)}),s.on("close",u=>{if(u!==0){i(Buffer.concat(a).toString());return}n(Buffer.concat(o))})})}),Q7=e=>e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),wJ=(e,t)=>{i9(e,t),s9(e)},_J=(e,t,r,n,i)=>Ge(void 0,null,function*(){var o;let s=(o=n.target)!=null?o:t.target.project;if(n.preview){yield e.serve({port:o9,host:a9,only:`hosting:${s}`,nonInteractive:!0,projectRoot:r});let{deployProject:a}=yield Xx.prompt({type:"confirm",name:"deployProject",message:"Would you like to deploy your application to Firebase Hosting?"});if(!a)return;process.env.FIREBASE_FRAMEWORKS_SKIP_BUILD="true"}return yield e.deploy({only:`hosting:${s}`,cwd:r,token:i,nonInteractive:!0,projectRoot:r})}),u9={moveSync:wJ,writeFileSync:lt.writeFileSync,renameSync:lt.renameSync,copySync:i9,removeSync:s9,existsSync:lt.existsSync},Yx=["npm","yarn","pnpm","cnpm","bun"],c9=e=>{if(!Yx.includes(e))throw new Zi.SchematicsException(`Unsupported package manager "${e}" in angular.json (cli.packageManager). Expected one of: ${Yx.join(", ")}.`);return e},f9=e=>{if(typeof e!="string"||e.length===0||e.startsWith("-")||/[\s;&|$`(){}<>!\\'"]/.test(e))throw new Zi.SchematicsException(`Invalid dependency name ${JSON.stringify(e)} in angular.json (server externalDependencies).`);return e},Qx={runPackageBin(e,t,r={}){let n=t9.default.sync(e,t,r);if(n.error)throw n.error;if(n.status!==0)throw new Zi.SchematicsException(`Command "${e}" exited with ${n.signal?`signal ${n.signal}`:`code ${n.status}`}.`);return n.stdout}},l9=(e,t)=>{let n=Qx.runPackageBin(c9(e),["list",f9(t)]).toString().match(`[^|s]${Q7(t)}[@| ][^s]+(s.+)?$`);return n?n[0].split(new RegExp(`${Q7(t)}[@| ]`))[1].split(/\s/)[0]:null},x9=(e,t,r,n)=>{var a,u,f,l,x;let i={},s={},{firebaseFunctionsDependencies:o}=DJ((0,Y.join)(bJ,"..","versions.json"));if(r.ssr!=="cloud-run"&&Object.keys(o).forEach(d=>{let{version:p,dev:h}=o[d];(h?s:i)[d]=p}),(0,lt.existsSync)((0,Y.join)(t,"angular.json"))){let d=JSON.parse((0,lt.readFileSync)((0,Y.join)(t,"angular.json")).toString()),p=(u=(a=d.cli)==null?void 0:a.packageManager)!=null?u:"npm",h=d.projects[e.target.project].architect.server,g=((f=h==null?void 0:h.options)==null?void 0:f.externalDependencies)||[];if((x=(l=h==null?void 0:h.options)==null?void 0:l.bundleDependencies)!=null?x:!0)g.forEach(y=>{let E=l9(p,y);E&&(i[y]=E)});else if((0,lt.existsSync)((0,Y.join)(t,"package.json"))){let y=JSON.parse((0,lt.readFileSync)((0,Y.join)(t,"package.json")).toString());Object.keys(y.dependencies).forEach(E=>{i[E]=y.dependencies[E]})}}return z7(i,s,r,n)},h9=(u,f,l,x,d,p,h,...g)=>Ge(void 0,[u,f,l,x,d,p,h,...g],function*(e,t,r,n,i,s,o,a=u9){var P;let b=yield t.getTargetOptions((0,Jt.targetFromTargetString)(n.name));if(!b.outputPath||typeof b.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${n.name}' in angular.json`);let y=yield t.getTargetOptions((0,Jt.targetFromTargetString)(i.name));if(!y.outputPath||typeof y.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${i.name}' in angular.json`);let E=(0,Y.join)(r,b.outputPath),D=(0,Y.join)(r,y.outputPath),q=s.outputPath?(0,Y.join)(r,s.outputPath):(0,Y.dirname)(D),B=s.functionName||Qi,G=(0,Y.join)(q,b.outputPath),U=(0,Y.join)(q,y.outputPath);s.outputPath?(a.removeSync(q),a.copySync(E,G),a.copySync(D,U)):(a.moveSync(E,G),a.moveSync(D,U));let V=x9(t,r,s),w=V.engines.node;(0,Jx.satisfies)(process.versions.node,w.toString())||t.logger.warn(`\u26A0\uFE0F Your Node.js version (${process.versions.node}) does not match the Firebase Functions runtime (${w}).`);let A=(0,Y.join)(q,"package.json");if(a.writeFileSync(A,JSON.stringify(V,null,2)),s.CF3v2?a.writeFileSync((0,Y.join)(q,"index.js"),X7(y.outputPath,s,B)):a.writeFileSync((0,Y.join)(q,"index.js"),Y7(y.outputPath,s,B)),!s.prerender)try{a.renameSync((0,Y.join)(G,"index.html"),(0,Y.join)(G,"index.original.html"))}catch(j){}let S=(P=s.target)!=null?P:t.target.project;if(a.existsSync(A)?Qx.runPackageBin("npm",["--prefix",q,"install"],{stdio:"inherit"}):console.error(`No package.json exists at ${q}`),s.preview){yield e.serve({port:o9,host:a9,targets:[`hosting:${S}`,`functions:${B}`],nonInteractive:!0,projectRoot:r});let{deployProject:j}=yield Xx.prompt({type:"confirm",name:"deployProject",message:"Would you like to deploy your application to Firebase Hosting & Cloud Functions?"});if(!j)return}return yield e.deploy({only:`hosting:${S},functions:${B}`,cwd:r,token:o,nonInteractive:!0,projectRoot:r})}),d9=(e,t,r)=>["builds","submit",e,"--tag",`gcr.io/${r.firebaseProject}/${t}`,"--project",r.firebaseProject,"--quiet"],p9=(e,t,r)=>["run","deploy",e,"--image",`gcr.io/${t.firebaseProject}/${e}`,"--project",t.firebaseProject,...r,"--platform","managed","--allow-unauthenticated","--region",t.region,"--quiet"],g9=(u,f,l,x,d,p,h,...g)=>Ge(void 0,[u,f,l,x,d,p,h,...g],function*(e,t,r,n,i,s,o,a=u9){var j;let b=yield t.getTargetOptions((0,Jt.targetFromTargetString)(n.name));if(!b.outputPath||typeof b.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${n.name}' in angular.json`);let y=yield t.getTargetOptions((0,Jt.targetFromTargetString)(i.name));if(!y.outputPath||typeof y.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${i.name}' in angular.json`);let E=(0,Y.join)(r,b.outputPath),D=(0,Y.join)(r,y.outputPath),q=s.outputPath?(0,Y.join)(r,s.outputPath):(0,Y.join)((0,Y.dirname)(D),"run"),B=s.functionName||Qi,G=(0,Y.join)(q,b.outputPath),U=(0,Y.join)(q,y.outputPath);a.removeSync(q),a.copySync(E,G),a.copySync(D,U);let V=x9(t,r,s,(0,Y.join)(y.outputPath,"main.js")),w=V.engines.node;if((0,Jx.satisfies)(process.versions.node,w.toString())||t.logger.warn(`\u26A0\uFE0F Your Node.js version (${process.versions.node}) does not match the Cloud Run runtime (${w}).`),a.writeFileSync((0,Y.join)(q,"package.json"),JSON.stringify(V,null,2)),a.writeFileSync((0,Y.join)(q,"Dockerfile"),J7(s)),!s.prerender)try{a.renameSync((0,Y.join)(G,"index.html"),(0,Y.join)(G,"index.original.html"))}catch($){}if(s.preview)throw new Zi.SchematicsException("Cloud Run preview not supported.");let A=[],S=s.cloudRunOptions||{};Object.entries(vJ).forEach(([$,K])=>{S[$]||(S[$]=K)}),S.cpus&&A.push("--cpu",S.cpus.toString()),S.maxConcurrency&&A.push("--concurrency",S.maxConcurrency.toString()),S.maxInstances&&A.push("--max-instances",S.maxInstances.toString()),S.memory&&A.push("--memory",S.memory.toString()),S.minInstances&&A.push("--min-instances",S.minInstances.toString()),S.timeout&&A.push("--timeout",S.timeout.toString()),S.vpcConnector&&A.push("--vpc-connector",S.vpcConnector),t.logger.info("\u{1F4E6} Deploying to Cloud Run"),yield zx("gcloud",d9(q,B,s)),yield zx("gcloud",p9(B,s,A));let P=(j=s.target)!=null?j:t.target.project;return yield e.deploy({only:`hosting:${P}`,cwd:r,token:o,nonInteractive:!0,projectRoot:r})});function m9(e,t,r,n,i,s,o,a){return Ge(this,null,function*(){let u=!o.version||o.version<2;if(!a&&!process.env.GOOGLE_APPLICATION_CREDENTIALS){yield e.login();let l=yield e.login({projectRoot:t.workspaceRoot});console.log(`Logged into Firebase as ${l.email}.`)}if(!a&&process.env.GOOGLE_APPLICATION_CREDENTIALS&&(yield zx("gcloud",["auth","activate-service-account","--key-file",process.env.GOOGLE_APPLICATION_CREDENTIALS]),console.log("Using Google Application Credentials.")),u&&console.error(`Legacy ng-deploy Firebase is deprecated.
113
+ `;var SJ={};var bJ=typeof __dirname=="string"?__dirname:(0,Y.dirname)((0,e9.fileURLToPath)(SJ.url)),{copySync:i9,removeSync:s9,readJsonSync:DJ}=r9.default,o9=5e3,a9="localhost",vJ={memory:"1Gi",timeout:60,maxInstances:"default",maxConcurrency:"default",minInstances:"default",cpus:1},zx=(e,t,r)=>Ge(void 0,null,function*(){return new Promise((n,i)=>{let s=(0,Z7.spawn)(e,t,r),o=[],a=[];s.stdout.on("data",u=>{process.stdout.write(u.toString()),o.push(u)}),s.stderr.on("data",u=>{process.stderr.write(u.toString()),a.push(u)}),s.on("error",u=>{i(u)}),s.on("close",u=>{if(u!==0){i(Buffer.concat(a).toString());return}n(Buffer.concat(o))})})}),Q7=e=>e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),wJ=(e,t)=>{i9(e,t),s9(e)},_J=(e,t,r,n,i)=>Ge(void 0,null,function*(){var o;let s=(o=n.target)!=null?o:t.target.project;if(n.preview){yield e.serve({port:o9,host:a9,only:`hosting:${s}`,nonInteractive:!0,projectRoot:r});let{deployProject:a}=yield Xx.prompt({type:"confirm",name:"deployProject",message:"Would you like to deploy your application to Firebase Hosting?"});if(!a)return;process.env.FIREBASE_FRAMEWORKS_SKIP_BUILD="true"}return yield e.deploy({only:`hosting:${s}`,cwd:r,token:i,nonInteractive:!0,projectRoot:r})}),u9={moveSync:wJ,writeFileSync:lt.writeFileSync,renameSync:lt.renameSync,copySync:i9,removeSync:s9,existsSync:lt.existsSync},Yx=["npm","yarn","pnpm","cnpm","bun"],c9=e=>{if(!Yx.includes(e))throw new Zi.SchematicsException(`Unsupported package manager "${e}" in angular.json (cli.packageManager). Expected one of: ${Yx.join(", ")}.`);return e},f9=e=>{if(typeof e!="string"||e.length===0||e.startsWith("-")||/[\s;&|$`(){}<>!\\'"]/.test(e))throw new Zi.SchematicsException(`Invalid dependency name ${JSON.stringify(e)} in angular.json (server externalDependencies).`);return e},Qx={runPackageBin(e,t,r={}){let n=t9.default.sync(e,t,r);if(n.error)throw n.error;if(n.status!==0)throw new Zi.SchematicsException(`Command "${e}" exited with ${n.signal?`signal ${n.signal}`:`code ${n.status}`}.`);return n.stdout}},l9=(e,t)=>{let n=Qx.runPackageBin(c9(e),["list",f9(t)]).toString().match(`[^|s]${Q7(t)}[@| ][^s]+(s.+)?$`);return n?n[0].split(new RegExp(`${Q7(t)}[@| ]`))[1].split(/\s/)[0]:null},x9=(e,t,r,n)=>{var a,u,f,l,x;let i={},s={},{firebaseFunctionsDependencies:o}=DJ((0,Y.join)(bJ,"..","versions.json"));if(r.ssr!=="cloud-run"&&Object.keys(o).forEach(d=>{let{version:p,dev:h}=o[d];(h?s:i)[d]=p}),(0,lt.existsSync)((0,Y.join)(t,"angular.json"))){let d=JSON.parse((0,lt.readFileSync)((0,Y.join)(t,"angular.json")).toString()),p=(u=(a=d.cli)==null?void 0:a.packageManager)!=null?u:"npm",h=d.projects[e.target.project].architect.server,g=((f=h==null?void 0:h.options)==null?void 0:f.externalDependencies)||[];if((x=(l=h==null?void 0:h.options)==null?void 0:l.bundleDependencies)!=null?x:!0)g.forEach(y=>{let E=l9(p,y);E&&(i[y]=E)});else if((0,lt.existsSync)((0,Y.join)(t,"package.json"))){let y=JSON.parse((0,lt.readFileSync)((0,Y.join)(t,"package.json")).toString());Object.keys(y.dependencies).forEach(E=>{i[E]=y.dependencies[E]})}}return z7(i,s,r,n)},h9=(u,f,l,x,d,p,h,...g)=>Ge(void 0,[u,f,l,x,d,p,h,...g],function*(e,t,r,n,i,s,o,a=u9){var P;let b=yield t.getTargetOptions((0,Jt.targetFromTargetString)(n.name));if(!b.outputPath||typeof b.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${n.name}' in angular.json`);let y=yield t.getTargetOptions((0,Jt.targetFromTargetString)(i.name));if(!y.outputPath||typeof y.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${i.name}' in angular.json`);let E=(0,Y.join)(r,b.outputPath),D=(0,Y.join)(r,y.outputPath),q=s.outputPath?(0,Y.join)(r,s.outputPath):(0,Y.dirname)(D),B=s.functionName||Qi,G=(0,Y.join)(q,b.outputPath),U=(0,Y.join)(q,y.outputPath);s.outputPath?(a.removeSync(q),a.copySync(E,G),a.copySync(D,U)):(a.moveSync(E,G),a.moveSync(D,U));let V=x9(t,r,s),w=V.engines.node;(0,Jx.satisfies)(process.versions.node,w.toString())||t.logger.warn(`\u26A0\uFE0F Your Node.js version (${process.versions.node}) does not match the Firebase Functions runtime (${w}).`);let A=(0,Y.join)(q,"package.json");if(a.writeFileSync(A,JSON.stringify(V,null,2)),s.CF3v2?a.writeFileSync((0,Y.join)(q,"index.js"),X7(y.outputPath,s,B)):a.writeFileSync((0,Y.join)(q,"index.js"),Y7(y.outputPath,s,B)),!s.prerender)try{a.renameSync((0,Y.join)(G,"index.html"),(0,Y.join)(G,"index.original.html"))}catch(j){}let S=(P=s.target)!=null?P:t.target.project;if(a.existsSync(A)?Qx.runPackageBin("npm",["--prefix",q,"install"],{stdio:"inherit"}):console.error(`No package.json exists at ${q}`),s.preview){yield e.serve({port:o9,host:a9,targets:[`hosting:${S}`,`functions:${B}`],nonInteractive:!0,projectRoot:r});let{deployProject:j}=yield Xx.prompt({type:"confirm",name:"deployProject",message:"Would you like to deploy your application to Firebase Hosting & Cloud Functions?"});if(!j)return}return yield e.deploy({only:`hosting:${S},functions:${B}`,cwd:r,token:o,nonInteractive:!0,projectRoot:r})}),d9=(e,t,r)=>["builds","submit",e,"--tag",`gcr.io/${r.firebaseProject}/${t}`,"--project",r.firebaseProject,"--quiet"],p9=(e,t,r)=>["run","deploy",e,"--image",`gcr.io/${t.firebaseProject}/${e}`,"--project",t.firebaseProject,...r,"--platform","managed","--allow-unauthenticated","--region",t.region,"--quiet"],g9=(u,f,l,x,d,p,h,...g)=>Ge(void 0,[u,f,l,x,d,p,h,...g],function*(e,t,r,n,i,s,o,a=u9){var j;let b=yield t.getTargetOptions((0,Jt.targetFromTargetString)(n.name));if(!b.outputPath||typeof b.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${n.name}' in angular.json`);let y=yield t.getTargetOptions((0,Jt.targetFromTargetString)(i.name));if(!y.outputPath||typeof y.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${i.name}' in angular.json`);let E=(0,Y.join)(r,b.outputPath),D=(0,Y.join)(r,y.outputPath),q=s.outputPath?(0,Y.join)(r,s.outputPath):(0,Y.join)((0,Y.dirname)(D),"run"),B=s.functionName||Qi,G=(0,Y.join)(q,b.outputPath),U=(0,Y.join)(q,y.outputPath);a.removeSync(q),a.copySync(E,G),a.copySync(D,U);let V=x9(t,r,s,[y.outputPath,"main.js"].join("/")),w=V.engines.node;if((0,Jx.satisfies)(process.versions.node,w.toString())||t.logger.warn(`\u26A0\uFE0F Your Node.js version (${process.versions.node}) does not match the Cloud Run runtime (${w}).`),a.writeFileSync((0,Y.join)(q,"package.json"),JSON.stringify(V,null,2)),a.writeFileSync((0,Y.join)(q,"Dockerfile"),J7(s)),!s.prerender)try{a.renameSync((0,Y.join)(G,"index.html"),(0,Y.join)(G,"index.original.html"))}catch($){}if(s.preview)throw new Zi.SchematicsException("Cloud Run preview not supported.");let A=[],S=s.cloudRunOptions||{};Object.entries(vJ).forEach(([$,K])=>{S[$]||(S[$]=K)}),S.cpus&&A.push("--cpu",S.cpus.toString()),S.maxConcurrency&&A.push("--concurrency",S.maxConcurrency.toString()),S.maxInstances&&A.push("--max-instances",S.maxInstances.toString()),S.memory&&A.push("--memory",S.memory.toString()),S.minInstances&&A.push("--min-instances",S.minInstances.toString()),S.timeout&&A.push("--timeout",S.timeout.toString()),S.vpcConnector&&A.push("--vpc-connector",S.vpcConnector),t.logger.info("\u{1F4E6} Deploying to Cloud Run"),yield zx("gcloud",d9(q,B,s)),yield zx("gcloud",p9(B,s,A));let P=(j=s.target)!=null?j:t.target.project;return yield e.deploy({only:`hosting:${P}`,cwd:r,token:o,nonInteractive:!0,projectRoot:r})});function m9(e,t,r,n,i,s,o,a){return Ge(this,null,function*(){let u=!o.version||o.version<2;if(!a&&!process.env.GOOGLE_APPLICATION_CREDENTIALS){yield e.login();let l=yield e.login({projectRoot:t.workspaceRoot});console.log(`Logged into Firebase as ${l.email}.`)}if(!a&&process.env.GOOGLE_APPLICATION_CREDENTIALS&&(yield zx("gcloud",["auth","activate-service-account","--key-file",process.env.GOOGLE_APPLICATION_CREDENTIALS]),console.log("Using Google Application Credentials.")),u&&console.error(`Legacy ng-deploy Firebase is deprecated.
114
114
  Please migrate to Firebase Hosting's integration with Angular https://firebase.google.com/docs/hosting/frameworks/angular
115
115
  or the new Firebase App Hosting product https://firebase.google.com/docs/app-hosting`),i)yield(yield t.scheduleTarget((0,Jt.targetFromTargetString)(i.name),i.options)).result;else{if(!t.target)throw new Error("Cannot execute the build target");t.logger.info(`\u{1F4E6} Building "${t.target.project}"`);let l=[t.scheduleTarget((0,Jt.targetFromTargetString)(r.name),r.options).then(x=>x.result)];n&&l.push(t.scheduleTarget((0,Jt.targetFromTargetString)(n.name),n.options).then(x=>x.result)),yield Promise.all(l)}try{yield e.use(s,{project:s,projectRoot:t.workspaceRoot})}catch(l){throw new Error(`Cannot select firebase project '${s}'`)}o.firebaseProject=s;let f=new ta.transports.Console({level:"info",format:ta.format.printf(l=>{var p,h,g,b;let x=(g=(h=(p=l[ea.default.SPLAT])==null?void 0:p[1])==null?void 0:h.metadata)==null?void 0:g.emulator,d=(b=l[ea.default.SPLAT])==null?void 0:b[0];if(d!=null&&d.replace){let y=d.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]/g,"");(x==null?void 0:x.name)==="hosting"&&y.startsWith("Local server: ")&&(0,n9.default)(y.split(": ")[1])}return[l.message,...l[ea.default.SPLAT]||[]].filter(y=>typeof y=="string").join(" ")})});e.logger.logger.add(f),u&&n?o.ssr==="cloud-run"?yield g9(e,t,t.workspaceRoot,r,n,o,a):yield h9(e,t,t.workspaceRoot,r,n,o,a):yield _J(e,t,t.workspaceRoot,o,a)})}0&&(module.exports={SUPPORTED_PACKAGE_MANAGERS,assertSafeDependencyName,assertSupportedPackageManager,buildCloudRunBuildsSubmitArgs,buildCloudRunDeployArgs,deployToCloudRun,deployToFunction,findPackageVersion,processHost});
116
116
  /*! Bundled license information:
@@ -144,7 +144,7 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
144
144
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
145
145
  `,r)+1}yield*D(this.pop());break;default:yield*D(this.pop()),yield*D(this.step())}}*blockMap(e){var n;let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let i="end"in r.value?r.value.end:void 0,s=Array.isArray(i)?i[i.length-1]:void 0;(s==null?void 0:s.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2],s=(n=i==null?void 0:i.value)==null?void 0:n.end;if(Array.isArray(s)){Array.prototype.push.apply(s,r.start),s.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,s=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",o=[];if(s&&r.sep&&!r.value){let a=[];for(let u=0;u<r.sep.length;++u){let c=r.sep[u];switch(c.type){case"newline":a.push(u);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=r.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":s||r.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):s||r.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(dr(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Xv(r.key)&&!dr(r.sep,"newline")){let a=qn(r.start),u=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:u,sep:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(dr(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let a=qn(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):dr(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);s||r.value?(e.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(a):(Object.assign(r,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!r.explicitKey&&r.sep&&!dr(r.sep,"newline")){yield*D(this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}));return}}else i&&e.items.push({start:o});this.stack.push(a);return}}}}yield*D(this.pop()),yield*D(this.step())}*blockSequence(e){var n;let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let i="end"in r.value?r.value.end:void 0,s=Array.isArray(i)?i[i.length-1]:void 0;(s==null?void 0:s.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let i=e.items[e.items.length-2],s=(n=i==null?void 0:i.value)==null?void 0:n.end;if(Array.isArray(s)){Array.prototype.push.apply(s,r.start),s.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||dr(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*D(this.pop()),yield*D(this.step())}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*D(this.pop()),n=this.peek(1);while(n&&n.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:i,sep:[]}):r.sep?this.stack.push(i):Object.assign(r,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*D(this.pop()),yield*D(this.step()))}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*D(this.pop()),yield*D(this.step());else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=gu(n),s=qn(i);Jv(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*D(this.lineEnd(e))}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
146
146
  `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
147
- `,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=gu(e),n=qn(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=gu(e),n=qn(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*D(this.pop())))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*D(this.pop()),yield*D(this.step());break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*D(this.pop()))}}};Qv.Parser=mh});var nw=l(ds=>{"use strict";var Zv=ih(),D$=is(),hs=as(),E$=tf(),_$=H(),S$=gh(),ew=yh();function tw(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new S$.LineCounter||null,prettyErrors:e}}function C$(t,e={}){let{lineCounter:r,prettyErrors:n}=tw(e),i=new ew.Parser(r==null?void 0:r.addNewLine),s=new Zv.Composer(e),o=Array.from(s.compose(i.parse(t)));if(n&&r)for(let a of o)a.errors.forEach(hs.prettifyError(t,r)),a.warnings.forEach(hs.prettifyError(t,r));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function rw(t,e={}){let{lineCounter:r,prettyErrors:n}=tw(e),i=new ew.Parser(r==null?void 0:r.addNewLine),s=new Zv.Composer(e),o=null;for(let a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new hs.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(o.errors.forEach(hs.prettifyError(t,r)),o.warnings.forEach(hs.prettifyError(t,r))),o}function q$(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=rw(t,r);if(!i)return null;if(i.warnings.forEach(s=>E$.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function F$(t,e,r){var i;let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let s=Math.round(r);r=s<1?void 0:s>8?{indent:8}:{indent:s}}if(t===void 0){let{keepUndefined:s}=(i=r!=null?r:e)!=null?i:{};if(!s)return}return _$.isDocument(t)&&!n?t.toString(r):new D$.Document(t,n,r).toString(r)}ds.parse=q$;ds.parseAllDocuments=C$;ds.parseDocument=rw;ds.stringify=F$});var sw=l(Q=>{"use strict";var A$=ih(),O$=is(),T$=Mf(),bh=as(),I$=$i(),pr=H(),L$=cr(),N$=pe(),P$=fr(),k$=hr(),R$=pu(),M$=ph(),B$=gh(),j$=yh(),mu=nw(),iw=Ri();Q.Composer=A$.Composer;Q.Document=O$.Document;Q.Schema=T$.Schema;Q.YAMLError=bh.YAMLError;Q.YAMLParseError=bh.YAMLParseError;Q.YAMLWarning=bh.YAMLWarning;Q.Alias=I$.Alias;Q.isAlias=pr.isAlias;Q.isCollection=pr.isCollection;Q.isDocument=pr.isDocument;Q.isMap=pr.isMap;Q.isNode=pr.isNode;Q.isPair=pr.isPair;Q.isScalar=pr.isScalar;Q.isSeq=pr.isSeq;Q.Pair=L$.Pair;Q.Scalar=N$.Scalar;Q.YAMLMap=P$.YAMLMap;Q.YAMLSeq=k$.YAMLSeq;Q.CST=R$;Q.Lexer=M$.Lexer;Q.LineCounter=B$.LineCounter;Q.Parser=j$.Parser;Q.parse=mu.parse;Q.parseAllDocuments=mu.parseAllDocuments;Q.parseDocument=mu.parseDocument;Q.stringify=mu.stringify;Q.visit=iw.visit;Q.visitAsync=iw.visitAsync});var pw=l((Pfe,dw)=>{dw.exports=hw;hw.sync=Y$;var lw=require("fs");function W$(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function fw(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:W$(e,r)}function hw(t,e,r){lw.stat(t,function(n,i){r(n,n?!1:fw(i,t,e))})}function Y$(t,e){return fw(lw.statSync(t),t,e)}});var bw=l((kfe,yw)=>{yw.exports=gw;gw.sync=H$;var xw=require("fs");function gw(t,e,r){xw.stat(t,function(n,i){r(n,n?!1:mw(i,e))})}function H$(t,e){return mw(xw.statSync(t),e)}function mw(t,e){return t.isFile()&&z$(t,e)}function z$(t,e){var r=t.mode,n=t.uid,i=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),f=a|u,h=r&c||r&u&&i===o||r&a&&n===s||r&f&&s===0;return h}});var ww=l((Mfe,vw)=>{var Rfe=require("fs"),yu;process.platform==="win32"||global.TESTING_WINDOWS?yu=pw():yu=bw();vw.exports=vh;vh.sync=J$;function vh(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){vh(t,e||{},function(s,o){s?i(s):n(o)})})}yu(t,e||{},function(n,i){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,i=!1),r(n,i)})}function J$(t,e){try{return yu.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Fw=l((Bfe,qw)=>{var Fn=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Dw=require("path"),X$=Fn?";":":",Ew=ww(),_w=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),Sw=(t,e)=>{let r=e.colon||X$,n=t.match(/\//)||Fn&&t.match(/\\/)?[""]:[...Fn?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],i=Fn?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Fn?i.split(r):[""];return Fn&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:i}},Cw=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:n,pathExt:i,pathExtExe:s}=Sw(t,e),o=[],a=c=>new Promise((f,h)=>{if(c===n.length)return e.all&&o.length?f(o):h(_w(t));let d=n[c],p=/^".*"$/.test(d)?d.slice(1,-1):d,x=Dw.join(p,t),g=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+x:x;f(u(g,c,0))}),u=(c,f,h)=>new Promise((d,p)=>{if(h===i.length)return d(a(f+1));let x=i[h];Ew(c+x,{pathExt:s},(g,m)=>{if(!g&&m)if(e.all)o.push(c+x);else return d(c+x);return d(u(c,f,h+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},Q$=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Sw(t,e),s=[];for(let o=0;o<r.length;o++){let a=r[o],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=Dw.join(u,t),f=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;for(let h=0;h<n.length;h++){let d=f+n[h];try{if(Ew.sync(d,{pathExt:i}))if(e.all)s.push(d);else return d}catch(p){}}}if(e.all&&s.length)return s;if(e.nothrow)return null;throw _w(t)};qw.exports=Cw;Cw.sync=Q$});var Ow=l((jfe,wh)=>{"use strict";var Aw=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};wh.exports=Aw;wh.exports.default=Aw});var Nw=l(($fe,Lw)=>{"use strict";var Tw=require("path"),Z$=Fw(),eU=Ow();function Iw(t,e){let r=t.options.env||process.env,n=process.cwd(),i=t.options.cwd!=null,s=i&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch(a){}let o;try{o=Z$.sync(t.command,{path:r[eU({env:r})],pathExt:e?Tw.delimiter:void 0})}catch(a){}finally{s&&process.chdir(n)}return o&&(o=Tw.resolve(i?t.options.cwd:"",o)),o}function tU(t){return Iw(t)||Iw(t,!0)}Lw.exports=tU});var Pw=l((Ufe,Eh)=>{"use strict";var Dh=/([()\][%!^"`<>&|;, *?])/g;function rU(t){return t=t.replace(Dh,"^$1"),t}function nU(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(Dh,"^$1"),e&&(t=t.replace(Dh,"^$1")),t}Eh.exports.command=rU;Eh.exports.argument=nU});var Rw=l((Gfe,kw)=>{"use strict";kw.exports=/^#!(.*)/});var Bw=l((Kfe,Mw)=>{"use strict";var iU=Rw();Mw.exports=(t="")=>{let e=t.match(iU);if(!e)return null;let[r,n]=e[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var $w=l((Vfe,jw)=>{"use strict";var _h=require("fs"),sU=Bw();function oU(t){let r=Buffer.alloc(150),n;try{n=_h.openSync(t,"r"),_h.readSync(n,r,0,150,0),_h.closeSync(n)}catch(i){}return sU(r.toString())}jw.exports=oU});var Vw=l((Wfe,Kw)=>{"use strict";var aU=require("path"),Uw=Nw(),Gw=Pw(),uU=$w(),cU=process.platform==="win32",lU=/\.(?:com|exe)$/i,fU=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function hU(t){t.file=Uw(t);let e=t.file&&uU(t.file);return e?(t.args.unshift(t.file),t.command=e,Uw(t)):t.file}function dU(t){if(!cU)return t;let e=hU(t),r=!lU.test(e);if(t.options.forceShell||r){let n=fU.test(e);t.command=aU.normalize(t.command),t.command=Gw.command(t.command),t.args=t.args.map(s=>Gw.argument(s,n));let i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function pU(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let n={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?n:dU(n)}Kw.exports=pU});var Hw=l((Yfe,Yw)=>{"use strict";var Sh=process.platform==="win32";function Ch(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function xU(t,e){if(!Sh)return;let r=t.emit;t.emit=function(n,i){if(n==="exit"){let s=Ww(i,e);if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function Ww(t,e){return Sh&&t===1&&!e.file?Ch(e.original,"spawn"):null}function gU(t,e){return Sh&&t===1&&!e.file?Ch(e.original,"spawnSync"):null}Yw.exports={hookChildProcess:xU,verifyENOENT:Ww,verifyENOENTSync:gU,notFoundError:Ch}});var Xw=l((Hfe,An)=>{"use strict";var zw=require("child_process"),qh=Vw(),Fh=Hw();function Jw(t,e,r){let n=qh(t,e,r),i=zw.spawn(n.command,n.args,n.options);return Fh.hookChildProcess(i,n),i}function mU(t,e,r){let n=qh(t,e,r),i=zw.spawnSync(n.command,n.args,n.options);return i.error=i.error||Fh.verifyENOENTSync(i.status,n),i}An.exports=Jw;An.exports.spawn=Jw;An.exports.sync=mU;An.exports._parse=qh;An.exports._enoent=Fh});var We=l(Ah=>{"use strict";Ah.fromCallback=function(t){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")t.apply(this,arguments);else return new Promise((e,r)=>{arguments[arguments.length]=(n,i)=>{if(n)return r(n);e(i)},arguments.length++,t.apply(this,arguments)})},"name",{value:t.name})};Ah.fromPromise=function(t){return Object.defineProperty(function(){let e=arguments[arguments.length-1];if(typeof e!="function")return t.apply(this,arguments);t.apply(this,arguments).then(r=>e(null,r),e)},"name",{value:t.name})}});var Zw=l((Jfe,Qw)=>{var xr=require("constants"),yU=process.cwd,bu=null,bU=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return bu||(bu=yU.call(process)),bu};try{process.cwd()}catch(t){}typeof process.chdir=="function"&&(Oh=process.chdir,process.chdir=function(t){bu=null,Oh.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Oh));var Oh;Qw.exports=vU;function vU(t){xr.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=u(t.statSync),t.fstatSync=u(t.fstatSync),t.lstatSync=u(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(f,h,d){d&&process.nextTick(d)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(f,h,d,p){p&&process.nextTick(p)},t.lchownSync=function(){}),bU==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(f){function h(d,p,x){var g=Date.now(),m=0;f(d,p,function y(b){if(b&&(b.code==="EACCES"||b.code==="EPERM"||b.code==="EBUSY")&&Date.now()-g<6e4){setTimeout(function(){t.stat(p,function(w,E){w&&w.code==="ENOENT"?f(d,p,y):x(b)})},m),m<100&&(m+=10);return}x&&x(b)})}return Object.setPrototypeOf&&Object.setPrototypeOf(h,f),h}(t.rename)),t.read=typeof t.read!="function"?t.read:function(f){function h(d,p,x,g,m,y){var b;if(y&&typeof y=="function"){var w=0;b=function(E,C,T){if(E&&E.code==="EAGAIN"&&w<10)return w++,f.call(t,d,p,x,g,m,b);y.apply(this,arguments)}}return f.call(t,d,p,x,g,m,b)}return Object.setPrototypeOf&&Object.setPrototypeOf(h,f),h}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(f){return function(h,d,p,x,g){for(var m=0;;)try{return f.call(t,h,d,p,x,g)}catch(y){if(y.code==="EAGAIN"&&m<10){m++;continue}throw y}}}(t.readSync);function e(f){f.lchmod=function(h,d,p){f.open(h,xr.O_WRONLY|xr.O_SYMLINK,d,function(x,g){if(x){p&&p(x);return}f.fchmod(g,d,function(m){f.close(g,function(y){p&&p(m||y)})})})},f.lchmodSync=function(h,d){var p=f.openSync(h,xr.O_WRONLY|xr.O_SYMLINK,d),x=!0,g;try{g=f.fchmodSync(p,d),x=!1}finally{if(x)try{f.closeSync(p)}catch(m){}else f.closeSync(p)}return g}}function r(f){xr.hasOwnProperty("O_SYMLINK")&&f.futimes?(f.lutimes=function(h,d,p,x){f.open(h,xr.O_SYMLINK,function(g,m){if(g){x&&x(g);return}f.futimes(m,d,p,function(y){f.close(m,function(b){x&&x(y||b)})})})},f.lutimesSync=function(h,d,p){var x=f.openSync(h,xr.O_SYMLINK),g,m=!0;try{g=f.futimesSync(x,d,p),m=!1}finally{if(m)try{f.closeSync(x)}catch(y){}else f.closeSync(x)}return g}):f.futimes&&(f.lutimes=function(h,d,p,x){x&&process.nextTick(x)},f.lutimesSync=function(){})}function n(f){return f&&function(h,d,p){return f.call(t,h,d,function(x){c(x)&&(x=null),p&&p.apply(this,arguments)})}}function i(f){return f&&function(h,d){try{return f.call(t,h,d)}catch(p){if(!c(p))throw p}}}function s(f){return f&&function(h,d,p,x){return f.call(t,h,d,p,function(g){c(g)&&(g=null),x&&x.apply(this,arguments)})}}function o(f){return f&&function(h,d,p){try{return f.call(t,h,d,p)}catch(x){if(!c(x))throw x}}}function a(f){return f&&function(h,d,p){typeof d=="function"&&(p=d,d=null);function x(g,m){m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),p&&p.apply(this,arguments)}return d?f.call(t,h,d,x):f.call(t,h,x)}}function u(f){return f&&function(h,d){var p=d?f.call(t,h,d):f.call(t,h);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function c(f){if(!f||f.code==="ENOSYS")return!0;var h=!process.getuid||process.getuid()!==0;return!!(h&&(f.code==="EINVAL"||f.code==="EPERM"))}}});var rD=l((Xfe,tD)=>{var eD=require("stream").Stream;tD.exports=wU;function wU(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);eD.call(this);var s=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var o=Object.keys(i),a=0,u=o.length;a<u;a++){var c=o[a];this[c]=i[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}t.open(this.path,this.flags,this.mode,function(f,h){if(f){s.emit("error",f),s.readable=!1;return}s.fd=h,s.emit("open",h),s._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);eD.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var s=Object.keys(i),o=0,a=s.length;o<a;o++){var u=s[o];this[u]=i[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var iD=l((Qfe,nD)=>{"use strict";nD.exports=EU;var DU=Object.getPrototypeOf||function(t){return t.__proto__};function EU(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:DU(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var xe=l((Zfe,Lh)=>{var le=require("fs"),_U=Zw(),SU=rD(),CU=iD(),vu=require("util"),Fe,Du;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Fe=Symbol.for("graceful-fs.queue"),Du=Symbol.for("graceful-fs.previous")):(Fe="___graceful-fs.queue",Du="___graceful-fs.previous");function qU(){}function aD(t,e){Object.defineProperty(t,Fe,{get:function(){return e}})}var jr=qU;vu.debuglog?jr=vu.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(jr=function(){var t=vu.format.apply(vu,arguments);t="GFS4: "+t.split(/\n/).join(`
147
+ `,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=gu(e),n=qn(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=gu(e),n=qn(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*D(this.pop())))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*D(this.pop()),yield*D(this.step());break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*D(this.pop()))}}};Qv.Parser=mh});var nw=l(ds=>{"use strict";var Zv=ih(),D$=is(),hs=as(),E$=tf(),_$=H(),S$=gh(),ew=yh();function tw(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new S$.LineCounter||null,prettyErrors:e}}function C$(t,e={}){let{lineCounter:r,prettyErrors:n}=tw(e),i=new ew.Parser(r==null?void 0:r.addNewLine),s=new Zv.Composer(e),o=Array.from(s.compose(i.parse(t)));if(n&&r)for(let a of o)a.errors.forEach(hs.prettifyError(t,r)),a.warnings.forEach(hs.prettifyError(t,r));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function rw(t,e={}){let{lineCounter:r,prettyErrors:n}=tw(e),i=new ew.Parser(r==null?void 0:r.addNewLine),s=new Zv.Composer(e),o=null;for(let a of s.compose(i.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new hs.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(o.errors.forEach(hs.prettifyError(t,r)),o.warnings.forEach(hs.prettifyError(t,r))),o}function q$(t,e,r){let n;typeof e=="function"?n=e:r===void 0&&e&&typeof e=="object"&&(r=e);let i=rw(t,r);if(!i)return null;if(i.warnings.forEach(s=>E$.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function F$(t,e,r){var i;let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let s=Math.round(r);r=s<1?void 0:s>8?{indent:8}:{indent:s}}if(t===void 0){let{keepUndefined:s}=(i=r!=null?r:e)!=null?i:{};if(!s)return}return _$.isDocument(t)&&!n?t.toString(r):new D$.Document(t,n,r).toString(r)}ds.parse=q$;ds.parseAllDocuments=C$;ds.parseDocument=rw;ds.stringify=F$});var sw=l(X=>{"use strict";var A$=ih(),O$=is(),T$=Mf(),bh=as(),I$=$i(),pr=H(),L$=cr(),N$=pe(),P$=fr(),k$=hr(),R$=pu(),M$=ph(),B$=gh(),j$=yh(),mu=nw(),iw=Ri();X.Composer=A$.Composer;X.Document=O$.Document;X.Schema=T$.Schema;X.YAMLError=bh.YAMLError;X.YAMLParseError=bh.YAMLParseError;X.YAMLWarning=bh.YAMLWarning;X.Alias=I$.Alias;X.isAlias=pr.isAlias;X.isCollection=pr.isCollection;X.isDocument=pr.isDocument;X.isMap=pr.isMap;X.isNode=pr.isNode;X.isPair=pr.isPair;X.isScalar=pr.isScalar;X.isSeq=pr.isSeq;X.Pair=L$.Pair;X.Scalar=N$.Scalar;X.YAMLMap=P$.YAMLMap;X.YAMLSeq=k$.YAMLSeq;X.CST=R$;X.Lexer=M$.Lexer;X.LineCounter=B$.LineCounter;X.Parser=j$.Parser;X.parse=mu.parse;X.parseAllDocuments=mu.parseAllDocuments;X.parseDocument=mu.parseDocument;X.stringify=mu.stringify;X.visit=iw.visit;X.visitAsync=iw.visitAsync});var pw=l((Pfe,dw)=>{dw.exports=hw;hw.sync=Y$;var lw=require("fs");function W$(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function fw(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:W$(e,r)}function hw(t,e,r){lw.stat(t,function(n,i){r(n,n?!1:fw(i,t,e))})}function Y$(t,e){return fw(lw.statSync(t),t,e)}});var bw=l((kfe,yw)=>{yw.exports=gw;gw.sync=H$;var xw=require("fs");function gw(t,e,r){xw.stat(t,function(n,i){r(n,n?!1:mw(i,e))})}function H$(t,e){return mw(xw.statSync(t),e)}function mw(t,e){return t.isFile()&&z$(t,e)}function z$(t,e){var r=t.mode,n=t.uid,i=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),f=a|u,h=r&c||r&u&&i===o||r&a&&n===s||r&f&&s===0;return h}});var ww=l((Mfe,vw)=>{var Rfe=require("fs"),yu;process.platform==="win32"||global.TESTING_WINDOWS?yu=pw():yu=bw();vw.exports=vh;vh.sync=J$;function vh(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){vh(t,e||{},function(s,o){s?i(s):n(o)})})}yu(t,e||{},function(n,i){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,i=!1),r(n,i)})}function J$(t,e){try{return yu.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Fw=l((Bfe,qw)=>{var Fn=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Dw=require("path"),X$=Fn?";":":",Ew=ww(),_w=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),Sw=(t,e)=>{let r=e.colon||X$,n=t.match(/\//)||Fn&&t.match(/\\/)?[""]:[...Fn?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],i=Fn?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Fn?i.split(r):[""];return Fn&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:i}},Cw=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:n,pathExt:i,pathExtExe:s}=Sw(t,e),o=[],a=c=>new Promise((f,h)=>{if(c===n.length)return e.all&&o.length?f(o):h(_w(t));let d=n[c],p=/^".*"$/.test(d)?d.slice(1,-1):d,x=Dw.join(p,t),g=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+x:x;f(u(g,c,0))}),u=(c,f,h)=>new Promise((d,p)=>{if(h===i.length)return d(a(f+1));let x=i[h];Ew(c+x,{pathExt:s},(g,m)=>{if(!g&&m)if(e.all)o.push(c+x);else return d(c+x);return d(u(c,f,h+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},Q$=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Sw(t,e),s=[];for(let o=0;o<r.length;o++){let a=r[o],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=Dw.join(u,t),f=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;for(let h=0;h<n.length;h++){let d=f+n[h];try{if(Ew.sync(d,{pathExt:i}))if(e.all)s.push(d);else return d}catch(p){}}}if(e.all&&s.length)return s;if(e.nothrow)return null;throw _w(t)};qw.exports=Cw;Cw.sync=Q$});var Ow=l((jfe,wh)=>{"use strict";var Aw=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};wh.exports=Aw;wh.exports.default=Aw});var Nw=l(($fe,Lw)=>{"use strict";var Tw=require("path"),Z$=Fw(),eU=Ow();function Iw(t,e){let r=t.options.env||process.env,n=process.cwd(),i=t.options.cwd!=null,s=i&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch(a){}let o;try{o=Z$.sync(t.command,{path:r[eU({env:r})],pathExt:e?Tw.delimiter:void 0})}catch(a){}finally{s&&process.chdir(n)}return o&&(o=Tw.resolve(i?t.options.cwd:"",o)),o}function tU(t){return Iw(t)||Iw(t,!0)}Lw.exports=tU});var Pw=l((Ufe,Eh)=>{"use strict";var Dh=/([()\][%!^"`<>&|;, *?])/g;function rU(t){return t=t.replace(Dh,"^$1"),t}function nU(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(Dh,"^$1"),e&&(t=t.replace(Dh,"^$1")),t}Eh.exports.command=rU;Eh.exports.argument=nU});var Rw=l((Gfe,kw)=>{"use strict";kw.exports=/^#!(.*)/});var Bw=l((Kfe,Mw)=>{"use strict";var iU=Rw();Mw.exports=(t="")=>{let e=t.match(iU);if(!e)return null;let[r,n]=e[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var $w=l((Vfe,jw)=>{"use strict";var _h=require("fs"),sU=Bw();function oU(t){let r=Buffer.alloc(150),n;try{n=_h.openSync(t,"r"),_h.readSync(n,r,0,150,0),_h.closeSync(n)}catch(i){}return sU(r.toString())}jw.exports=oU});var Vw=l((Wfe,Kw)=>{"use strict";var aU=require("path"),Uw=Nw(),Gw=Pw(),uU=$w(),cU=process.platform==="win32",lU=/\.(?:com|exe)$/i,fU=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function hU(t){t.file=Uw(t);let e=t.file&&uU(t.file);return e?(t.args.unshift(t.file),t.command=e,Uw(t)):t.file}function dU(t){if(!cU)return t;let e=hU(t),r=!lU.test(e);if(t.options.forceShell||r){let n=fU.test(e);t.command=aU.normalize(t.command),t.command=Gw.command(t.command),t.args=t.args.map(s=>Gw.argument(s,n));let i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function pU(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let n={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?n:dU(n)}Kw.exports=pU});var Hw=l((Yfe,Yw)=>{"use strict";var Sh=process.platform==="win32";function Ch(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function xU(t,e){if(!Sh)return;let r=t.emit;t.emit=function(n,i){if(n==="exit"){let s=Ww(i,e);if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function Ww(t,e){return Sh&&t===1&&!e.file?Ch(e.original,"spawn"):null}function gU(t,e){return Sh&&t===1&&!e.file?Ch(e.original,"spawnSync"):null}Yw.exports={hookChildProcess:xU,verifyENOENT:Ww,verifyENOENTSync:gU,notFoundError:Ch}});var Xw=l((Hfe,An)=>{"use strict";var zw=require("child_process"),qh=Vw(),Fh=Hw();function Jw(t,e,r){let n=qh(t,e,r),i=zw.spawn(n.command,n.args,n.options);return Fh.hookChildProcess(i,n),i}function mU(t,e,r){let n=qh(t,e,r),i=zw.spawnSync(n.command,n.args,n.options);return i.error=i.error||Fh.verifyENOENTSync(i.status,n),i}An.exports=Jw;An.exports.spawn=Jw;An.exports.sync=mU;An.exports._parse=qh;An.exports._enoent=Fh});var We=l(Ah=>{"use strict";Ah.fromCallback=function(t){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")t.apply(this,arguments);else return new Promise((e,r)=>{arguments[arguments.length]=(n,i)=>{if(n)return r(n);e(i)},arguments.length++,t.apply(this,arguments)})},"name",{value:t.name})};Ah.fromPromise=function(t){return Object.defineProperty(function(){let e=arguments[arguments.length-1];if(typeof e!="function")return t.apply(this,arguments);t.apply(this,arguments).then(r=>e(null,r),e)},"name",{value:t.name})}});var Zw=l((Jfe,Qw)=>{var xr=require("constants"),yU=process.cwd,bu=null,bU=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return bu||(bu=yU.call(process)),bu};try{process.cwd()}catch(t){}typeof process.chdir=="function"&&(Oh=process.chdir,process.chdir=function(t){bu=null,Oh.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Oh));var Oh;Qw.exports=vU;function vU(t){xr.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=u(t.statSync),t.fstatSync=u(t.fstatSync),t.lstatSync=u(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(f,h,d){d&&process.nextTick(d)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(f,h,d,p){p&&process.nextTick(p)},t.lchownSync=function(){}),bU==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(f){function h(d,p,x){var g=Date.now(),m=0;f(d,p,function y(b){if(b&&(b.code==="EACCES"||b.code==="EPERM"||b.code==="EBUSY")&&Date.now()-g<6e4){setTimeout(function(){t.stat(p,function(w,E){w&&w.code==="ENOENT"?f(d,p,y):x(b)})},m),m<100&&(m+=10);return}x&&x(b)})}return Object.setPrototypeOf&&Object.setPrototypeOf(h,f),h}(t.rename)),t.read=typeof t.read!="function"?t.read:function(f){function h(d,p,x,g,m,y){var b;if(y&&typeof y=="function"){var w=0;b=function(E,C,T){if(E&&E.code==="EAGAIN"&&w<10)return w++,f.call(t,d,p,x,g,m,b);y.apply(this,arguments)}}return f.call(t,d,p,x,g,m,b)}return Object.setPrototypeOf&&Object.setPrototypeOf(h,f),h}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(f){return function(h,d,p,x,g){for(var m=0;;)try{return f.call(t,h,d,p,x,g)}catch(y){if(y.code==="EAGAIN"&&m<10){m++;continue}throw y}}}(t.readSync);function e(f){f.lchmod=function(h,d,p){f.open(h,xr.O_WRONLY|xr.O_SYMLINK,d,function(x,g){if(x){p&&p(x);return}f.fchmod(g,d,function(m){f.close(g,function(y){p&&p(m||y)})})})},f.lchmodSync=function(h,d){var p=f.openSync(h,xr.O_WRONLY|xr.O_SYMLINK,d),x=!0,g;try{g=f.fchmodSync(p,d),x=!1}finally{if(x)try{f.closeSync(p)}catch(m){}else f.closeSync(p)}return g}}function r(f){xr.hasOwnProperty("O_SYMLINK")&&f.futimes?(f.lutimes=function(h,d,p,x){f.open(h,xr.O_SYMLINK,function(g,m){if(g){x&&x(g);return}f.futimes(m,d,p,function(y){f.close(m,function(b){x&&x(y||b)})})})},f.lutimesSync=function(h,d,p){var x=f.openSync(h,xr.O_SYMLINK),g,m=!0;try{g=f.futimesSync(x,d,p),m=!1}finally{if(m)try{f.closeSync(x)}catch(y){}else f.closeSync(x)}return g}):f.futimes&&(f.lutimes=function(h,d,p,x){x&&process.nextTick(x)},f.lutimesSync=function(){})}function n(f){return f&&function(h,d,p){return f.call(t,h,d,function(x){c(x)&&(x=null),p&&p.apply(this,arguments)})}}function i(f){return f&&function(h,d){try{return f.call(t,h,d)}catch(p){if(!c(p))throw p}}}function s(f){return f&&function(h,d,p,x){return f.call(t,h,d,p,function(g){c(g)&&(g=null),x&&x.apply(this,arguments)})}}function o(f){return f&&function(h,d,p){try{return f.call(t,h,d,p)}catch(x){if(!c(x))throw x}}}function a(f){return f&&function(h,d,p){typeof d=="function"&&(p=d,d=null);function x(g,m){m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),p&&p.apply(this,arguments)}return d?f.call(t,h,d,x):f.call(t,h,x)}}function u(f){return f&&function(h,d){var p=d?f.call(t,h,d):f.call(t,h);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function c(f){if(!f||f.code==="ENOSYS")return!0;var h=!process.getuid||process.getuid()!==0;return!!(h&&(f.code==="EINVAL"||f.code==="EPERM"))}}});var rD=l((Xfe,tD)=>{var eD=require("stream").Stream;tD.exports=wU;function wU(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);eD.call(this);var s=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var o=Object.keys(i),a=0,u=o.length;a<u;a++){var c=o[a];this[c]=i[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}t.open(this.path,this.flags,this.mode,function(f,h){if(f){s.emit("error",f),s.readable=!1;return}s.fd=h,s.emit("open",h),s._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);eD.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var s=Object.keys(i),o=0,a=s.length;o<a;o++){var u=s[o];this[u]=i[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var iD=l((Qfe,nD)=>{"use strict";nD.exports=EU;var DU=Object.getPrototypeOf||function(t){return t.__proto__};function EU(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:DU(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var xe=l((Zfe,Lh)=>{var le=require("fs"),_U=Zw(),SU=rD(),CU=iD(),vu=require("util"),Fe,Du;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Fe=Symbol.for("graceful-fs.queue"),Du=Symbol.for("graceful-fs.previous")):(Fe="___graceful-fs.queue",Du="___graceful-fs.previous");function qU(){}function aD(t,e){Object.defineProperty(t,Fe,{get:function(){return e}})}var jr=qU;vu.debuglog?jr=vu.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(jr=function(){var t=vu.format.apply(vu,arguments);t="GFS4: "+t.split(/\n/).join(`
148
148
  GFS4: `),console.error(t)});le[Fe]||(sD=global[Fe]||[],aD(le,sD),le.close=function(t){function e(r,n){return t.call(le,r,function(i){i||oD(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Du,{value:t}),e}(le.close),le.closeSync=function(t){function e(r){t.apply(le,arguments),oD()}return Object.defineProperty(e,Du,{value:t}),e}(le.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){jr(le[Fe]),require("assert").equal(le[Fe].length,0)}));var sD;global[Fe]||aD(global,le[Fe]);Lh.exports=Th(CU(le));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!le.__patched&&(Lh.exports=Th(le),le.__patched=!0);function Th(t){_U(t),t.gracefulify=Th,t.createReadStream=C,t.createWriteStream=T;var e=t.readFile;t.readFile=r;function r(_,A,F){return typeof A=="function"&&(F=A,A=null),R(_,A,F);function R(B,k,W,v){return e(B,k,function(q){q&&(q.code==="EMFILE"||q.code==="ENFILE")?On([R,[B,k,W],q,v||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(_,A,F,R){return typeof F=="function"&&(R=F,F=null),B(_,A,F,R);function B(k,W,v,q,j){return n(k,W,v,function(G){G&&(G.code==="EMFILE"||G.code==="ENFILE")?On([B,[k,W,v,q],G,j||Date.now(),Date.now()]):typeof q=="function"&&q.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(_,A,F,R){return typeof F=="function"&&(R=F,F=null),B(_,A,F,R);function B(k,W,v,q,j){return s(k,W,v,function(G){G&&(G.code==="EMFILE"||G.code==="ENFILE")?On([B,[k,W,v,q],G,j||Date.now(),Date.now()]):typeof q=="function"&&q.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=u);function u(_,A,F,R){return typeof F=="function"&&(R=F,F=0),B(_,A,F,R);function B(k,W,v,q,j){return a(k,W,v,function(G){G&&(G.code==="EMFILE"||G.code==="ENFILE")?On([B,[k,W,v,q],G,j||Date.now(),Date.now()]):typeof q=="function"&&q.apply(this,arguments)})}}var c=t.readdir;t.readdir=h;var f=/^v[0-5]\./;function h(_,A,F){typeof A=="function"&&(F=A,A=null);var R=f.test(process.version)?function(W,v,q,j){return c(W,B(W,v,q,j))}:function(W,v,q,j){return c(W,v,B(W,v,q,j))};return R(_,A,F);function B(k,W,v,q){return function(j,G){j&&(j.code==="EMFILE"||j.code==="ENFILE")?On([R,[k,W,v],j,q||Date.now(),Date.now()]):(G&&G.sort&&G.sort(),typeof v=="function"&&v.call(this,j,G))}}}if(process.version.substr(0,4)==="v0.8"){var d=SU(t);y=d.ReadStream,w=d.WriteStream}var p=t.ReadStream;p&&(y.prototype=Object.create(p.prototype),y.prototype.open=b);var x=t.WriteStream;x&&(w.prototype=Object.create(x.prototype),w.prototype.open=E),Object.defineProperty(t,"ReadStream",{get:function(){return y},set:function(_){y=_},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return w},set:function(_){w=_},enumerable:!0,configurable:!0});var g=y;Object.defineProperty(t,"FileReadStream",{get:function(){return g},set:function(_){g=_},enumerable:!0,configurable:!0});var m=w;Object.defineProperty(t,"FileWriteStream",{get:function(){return m},set:function(_){m=_},enumerable:!0,configurable:!0});function y(_,A){return this instanceof y?(p.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function b(){var _=this;S(_.path,_.flags,_.mode,function(A,F){A?(_.autoClose&&_.destroy(),_.emit("error",A)):(_.fd=F,_.emit("open",F),_.read())})}function w(_,A){return this instanceof w?(x.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function E(){var _=this;S(_.path,_.flags,_.mode,function(A,F){A?(_.destroy(),_.emit("error",A)):(_.fd=F,_.emit("open",F))})}function C(_,A){return new t.ReadStream(_,A)}function T(_,A){return new t.WriteStream(_,A)}var N=t.open;t.open=S;function S(_,A,F,R){return typeof F=="function"&&(R=F,F=null),B(_,A,F,R);function B(k,W,v,q,j){return N(k,W,v,function(G,M){G&&(G.code==="EMFILE"||G.code==="ENFILE")?On([B,[k,W,v,q],G,j||Date.now(),Date.now()]):typeof q=="function"&&q.apply(this,arguments)})}}return t}function On(t){jr("ENQUEUE",t[0].name,t[1]),le[Fe].push(t),Ih()}var wu;function oD(){for(var t=Date.now(),e=0;e<le[Fe].length;++e)le[Fe][e].length>2&&(le[Fe][e][3]=t,le[Fe][e][4]=t);Ih()}function Ih(){if(clearTimeout(wu),wu=void 0,le[Fe].length!==0){var t=le[Fe].shift(),e=t[0],r=t[1],n=t[2],i=t[3],s=t[4];if(i===void 0)jr("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){jr("TIMEOUT",e.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var a=Date.now()-s,u=Math.max(s-i,1),c=Math.min(u*1.2,100);a>=c?(jr("RETRY",e.name,r),e.apply(null,r.concat([i]))):le[Fe].push(t)}wu===void 0&&(wu=setTimeout(Ih,0))}}});var Nh=l($r=>{"use strict";var uD=We().fromCallback,it=xe(),FU=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof it[t]=="function");Object.keys(it).forEach(t=>{t!=="promises"&&($r[t]=it[t])});FU.forEach(t=>{$r[t]=uD(it[t])});$r.exists=function(t,e){return typeof e=="function"?it.exists(t,e):new Promise(r=>it.exists(t,r))};$r.read=function(t,e,r,n,i,s){return typeof s=="function"?it.read(t,e,r,n,i,s):new Promise((o,a)=>{it.read(t,e,r,n,i,(u,c,f)=>{if(u)return a(u);o({bytesRead:c,buffer:f})})})};$r.write=function(t,e,...r){return typeof r[r.length-1]=="function"?it.write(t,e,...r):new Promise((n,i)=>{it.write(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffer:a})})})};typeof it.realpath.native=="function"&&($r.realpath.native=uD(it.realpath.native))});var kh=l((the,lD)=>{"use strict";var Ph=require("path");function cD(t){return t=Ph.normalize(Ph.resolve(t)).split(Ph.sep),t.length>0?t[0]:null}var AU=/[<>:"|?*]/;function OU(t){let e=cD(t);return t=t.replace(e,""),AU.test(t)}lD.exports={getRootPath:cD,invalidWin32Path:OU}});var hD=l((rhe,fD)=>{"use strict";var TU=xe(),Rh=require("path"),IU=kh().invalidWin32Path,LU=parseInt("0777",8);function Mh(t,e,r,n){if(typeof e=="function"?(r=e,e={}):(!e||typeof e!="object")&&(e={mode:e}),process.platform==="win32"&&IU(t)){let o=new Error(t+" contains invalid WIN32 path characters.");return o.code="EINVAL",r(o)}let i=e.mode,s=e.fs||TU;i===void 0&&(i=LU&~process.umask()),n||(n=null),r=r||function(){},t=Rh.resolve(t),s.mkdir(t,i,o=>{if(!o)return n=n||t,r(null,n);switch(o.code){case"ENOENT":if(Rh.dirname(t)===t)return r(o);Mh(Rh.dirname(t),e,(a,u)=>{a?r(a,u):Mh(t,e,r,u)});break;default:s.stat(t,(a,u)=>{a||!u.isDirectory()?r(o,n):r(null,n)});break}})}fD.exports=Mh});var pD=l((nhe,dD)=>{"use strict";var NU=xe(),Bh=require("path"),PU=kh().invalidWin32Path,kU=parseInt("0777",8);function jh(t,e,r){(!e||typeof e!="object")&&(e={mode:e});let n=e.mode,i=e.fs||NU;if(process.platform==="win32"&&PU(t)){let s=new Error(t+" contains invalid WIN32 path characters.");throw s.code="EINVAL",s}n===void 0&&(n=kU&~process.umask()),r||(r=null),t=Bh.resolve(t);try{i.mkdirSync(t,n),r=r||t}catch(s){if(s.code==="ENOENT"){if(Bh.dirname(t)===t)throw s;r=jh(Bh.dirname(t),e,r),jh(t,e,r)}else{let o;try{o=i.statSync(t)}catch(a){throw s}if(!o.isDirectory())throw s}}return r}dD.exports=jh});var Xe=l((ihe,xD)=>{"use strict";var RU=We().fromCallback,$h=RU(hD()),Uh=pD();xD.exports={mkdirs:$h,mkdirsSync:Uh,mkdirp:$h,mkdirpSync:Uh,ensureDir:$h,ensureDirSync:Uh}});var Gh=l((she,mD)=>{"use strict";var Pe=xe(),gD=require("os"),Eu=require("path");function MU(){let t=Eu.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));t=Eu.join(gD.tmpdir(),t);let e=new Date(1435410243862);Pe.writeFileSync(t,"https://github.com/jprichardson/node-fs-extra/pull/141");let r=Pe.openSync(t,"r+");return Pe.futimesSync(r,e,e),Pe.closeSync(r),Pe.statSync(t).mtime>1435410243e3}function BU(t){let e=Eu.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));e=Eu.join(gD.tmpdir(),e);let r=new Date(1435410243862);Pe.writeFile(e,"https://github.com/jprichardson/node-fs-extra/pull/141",n=>{if(n)return t(n);Pe.open(e,"r+",(i,s)=>{if(i)return t(i);Pe.futimes(s,r,r,o=>{if(o)return t(o);Pe.close(s,a=>{if(a)return t(a);Pe.stat(e,(u,c)=>{if(u)return t(u);t(null,c.mtime>1435410243e3)})})})})})}function jU(t){if(typeof t=="number")return Math.floor(t/1e3)*1e3;if(t instanceof Date)return new Date(Math.floor(t.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function $U(t,e,r,n){Pe.open(t,"r+",(i,s)=>{if(i)return n(i);Pe.futimes(s,e,r,o=>{Pe.close(s,a=>{n&&n(o||a)})})})}function UU(t,e,r){let n=Pe.openSync(t,"r+");return Pe.futimesSync(n,e,r),Pe.closeSync(n)}mD.exports={hasMillisRes:BU,hasMillisResSync:MU,timeRemoveMillis:jU,utimesMillis:$U,utimesMillisSync:UU}});var ms=l((ohe,ED)=>{"use strict";var st=xe(),Ye=require("path"),yD=10,bD=5,GU=0,Vh=process.versions.node.split("."),vD=Number.parseInt(Vh[0],10),wD=Number.parseInt(Vh[1],10),KU=Number.parseInt(Vh[2],10);function xs(){if(vD>yD)return!0;if(vD===yD){if(wD>bD)return!0;if(wD===bD&&KU>=GU)return!0}return!1}function VU(t,e,r){xs()?st.stat(t,{bigint:!0},(n,i)=>{if(n)return r(n);st.stat(e,{bigint:!0},(s,o)=>s?s.code==="ENOENT"?r(null,{srcStat:i,destStat:null}):r(s):r(null,{srcStat:i,destStat:o}))}):st.stat(t,(n,i)=>{if(n)return r(n);st.stat(e,(s,o)=>s?s.code==="ENOENT"?r(null,{srcStat:i,destStat:null}):r(s):r(null,{srcStat:i,destStat:o}))})}function WU(t,e){let r,n;xs()?r=st.statSync(t,{bigint:!0}):r=st.statSync(t);try{xs()?n=st.statSync(e,{bigint:!0}):n=st.statSync(e)}catch(i){if(i.code==="ENOENT")return{srcStat:r,destStat:null};throw i}return{srcStat:r,destStat:n}}function YU(t,e,r,n){VU(t,e,(i,s)=>{if(i)return n(i);let{srcStat:o,destStat:a}=s;return a&&a.ino&&a.dev&&a.ino===o.ino&&a.dev===o.dev?n(new Error("Source and destination must not be the same.")):o.isDirectory()&&Wh(t,e)?n(new Error(gs(t,e,r))):n(null,{srcStat:o,destStat:a})})}function HU(t,e,r){let{srcStat:n,destStat:i}=WU(t,e);if(i&&i.ino&&i.dev&&i.ino===n.ino&&i.dev===n.dev)throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&Wh(t,e))throw new Error(gs(t,e,r));return{srcStat:n,destStat:i}}function Kh(t,e,r,n,i){let s=Ye.resolve(Ye.dirname(t)),o=Ye.resolve(Ye.dirname(r));if(o===s||o===Ye.parse(o).root)return i();xs()?st.stat(o,{bigint:!0},(a,u)=>a?a.code==="ENOENT"?i():i(a):u.ino&&u.dev&&u.ino===e.ino&&u.dev===e.dev?i(new Error(gs(t,r,n))):Kh(t,e,o,n,i)):st.stat(o,(a,u)=>a?a.code==="ENOENT"?i():i(a):u.ino&&u.dev&&u.ino===e.ino&&u.dev===e.dev?i(new Error(gs(t,r,n))):Kh(t,e,o,n,i))}function DD(t,e,r,n){let i=Ye.resolve(Ye.dirname(t)),s=Ye.resolve(Ye.dirname(r));if(s===i||s===Ye.parse(s).root)return;let o;try{xs()?o=st.statSync(s,{bigint:!0}):o=st.statSync(s)}catch(a){if(a.code==="ENOENT")return;throw a}if(o.ino&&o.dev&&o.ino===e.ino&&o.dev===e.dev)throw new Error(gs(t,r,n));return DD(t,e,s,n)}function Wh(t,e){let r=Ye.resolve(t).split(Ye.sep).filter(i=>i),n=Ye.resolve(e).split(Ye.sep).filter(i=>i);return r.reduce((i,s,o)=>i&&n[o]===s,!0)}function gs(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}ED.exports={checkPaths:YU,checkPathsSync:HU,checkParentPaths:Kh,checkParentPathsSync:DD,isSrcSubdir:Wh}});var SD=l((ahe,_D)=>{"use strict";_D.exports=function(t){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(t)}catch(e){return new Buffer(t)}return new Buffer(t)}});var OD=l((uhe,AD)=>{"use strict";var ae=xe(),ys=require("path"),zU=Xe().mkdirsSync,JU=Gh().utimesMillisSync,bs=ms();function XU(t,e,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
149
149
 
150
150
  see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=bs.checkPathsSync(t,e,"copy");return bs.checkParentPathsSync(t,n,e,"copy"),QU(i,t,e,r)}function QU(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=ys.dirname(r);return ae.existsSync(i)||zU(i),CD(t,e,r,n)}function CD(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return ZU(t,e,r,n)}function ZU(t,e,r,n){let s=(n.dereference?ae.statSync:ae.lstatSync)(e);if(s.isDirectory())return nG(s,t,e,r,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return eG(s,t,e,r,n);if(s.isSymbolicLink())return oG(t,e,r,n)}function eG(t,e,r,n,i){return e?tG(t,r,n,i):qD(t,r,n,i)}function tG(t,e,r,n){if(n.overwrite)return ae.unlinkSync(r),qD(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function qD(t,e,r,n){return typeof ae.copyFileSync=="function"?(ae.copyFileSync(e,r),ae.chmodSync(r,t.mode),n.preserveTimestamps?JU(r,t.atime,t.mtime):void 0):rG(t,e,r,n)}function rG(t,e,r,n){let s=SD()(65536),o=ae.openSync(e,"r"),a=ae.openSync(r,"w",t.mode),u=0;for(;u<t.size;){let c=ae.readSync(o,s,0,65536,u);ae.writeSync(a,s,0,c),u+=c}n.preserveTimestamps&&ae.futimesSync(a,t.atime,t.mtime),ae.closeSync(o),ae.closeSync(a)}function nG(t,e,r,n,i){if(!e)return iG(t,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return FD(r,n,i)}function iG(t,e,r,n){return ae.mkdirSync(r),FD(e,r,n),ae.chmodSync(r,t.mode)}function FD(t,e,r){ae.readdirSync(t).forEach(n=>sG(n,t,e,r))}function sG(t,e,r,n){let i=ys.join(e,t),s=ys.join(r,t),{destStat:o}=bs.checkPathsSync(i,s,"copy");return CD(o,i,s,n)}function oG(t,e,r,n){let i=ae.readlinkSync(e);if(n.dereference&&(i=ys.resolve(process.cwd(),i)),t){let s;try{s=ae.readlinkSync(r)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return ae.symlinkSync(i,r);throw o}if(n.dereference&&(s=ys.resolve(process.cwd(),s)),bs.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(ae.statSync(r).isDirectory()&&bs.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`);return aG(i,r)}else return ae.symlinkSync(i,r)}function aG(t,e){return ae.unlinkSync(e),ae.symlinkSync(t,e)}AD.exports=XU});var Yh=l((che,TD)=>{"use strict";TD.exports={copySync:OD()}});var Ot=l((lhe,LD)=>{"use strict";var uG=We().fromPromise,ID=Nh();function cG(t){return ID.access(t).then(()=>!0).catch(()=>!1)}LD.exports={pathExists:uG(cG),pathExistsSync:ID.existsSync}});var UD=l((fhe,$D)=>{"use strict";var Ae=xe(),vs=require("path"),lG=Xe().mkdirs,fG=Ot().pathExists,hG=Gh().utimesMillis,ws=ms();function dG(t,e,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
@@ -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:bO.loadavg(),uptime:bO.uptime()}}getTrace(e){return(e?vO.parse(e):vO.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 wue(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(){U2("doExit",i),U2("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!n||n.length===0)return process.nextTick(o);bue(n,(a,u)=>{let c=vue(u),f=a.transport||a;function h(d){return()=>{U2(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 EO=l((Oge,DO)=>{"use strict";var{Writable:Due}=ir();DO.exports=class extends Due{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 V2=l((Ige,CO)=>{"use strict";var _O=require("os"),Eue=xc(),K2=ho()("winston:rejection"),_ue=j2(),SO=$2(),Sue=EO();CO.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:_O.loadavg(),uptime:_O.uptime()}}getTrace(e){return(e?SO.parse(e):SO.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 Sue(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(){K2("doExit",i),K2("process._exiting",process._exiting),i&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!n||n.length===0)return process.nextTick(o);Eue(n,(a,u)=>{let c=_ue(u),f=a.transport||a;function h(d){return()=>{K2(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 FO=l((Lge,qO)=>{"use strict";var W2=class{constructor(e){let r=gc();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)}};qO.exports=W2});var gc=l((Nge,IO)=>{"use strict";var{Stream:Cue,Transform:que}=ir(),AO=xc(),{LEVEL:Rt,SPLAT:OO}=de(),TO=M2(),Fue=G2(),Aue=V2(),Oue=v2(),Tue=FO(),{warn:Iue}=m2(),Lue=lc(),Nue=/%[scdjifoO%]/g,mc=class extends que{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||f2()(),this.defaultMeta=n||null,this.levels=i||this.levels||Lue.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new Fue(this),this.rejections=new Aue(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=yo(this.levels,this.level);return!this.transports||this.transports.length===0?e:this.transports.reduce((r,n)=>{let i=yo(this.levels,n.level);return i!==null&&i>r?i:r},e)}isLevelEnabled(e){let r=yo(this.levels,e);if(r===null)return!1;let n=yo(this.levels,this.level);return n===null?!1:!this.transports||this.transports.length===0?n>=r:this.transports.findIndex(s=>{let o=yo(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(Nue))){let o=Object.assign({},this.defaultMeta,i,{[Rt]:e,[OO]: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,[OO]: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();AO(r,(n,i)=>{if(!n||n.finished)return setImmediate(i);n.once("finish",i),n.end()},e)}add(e){let r=!TO(e)||e.log.length>2?new Oue({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(!TO(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(){Iue.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})}AO(this.transports.filter(a=>!!a.query),o,()=>r(null,n))}stream(e={}){let r=new Cue,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 Tue(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 yo(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(mc.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});IO.exports=mc});var Y2=l((Pge,LO)=>{"use strict";var{LEVEL:Pue}=de(),kue=lc(),Rue=gc(),Mue=ho()("winston:create-logger");function Bue(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}LO.exports=function(t={}){t.levels=t.levels||kue.npm.levels;class e extends Rue{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(Mue('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[Pue]=n,s._addDefaultMeta(a),s.write(a),this||r}return i.length===0?(s.log(n,""),s):s.log(n,...i)},e.prototype[Bue(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var PO=l((Rge,NO)=>{"use strict";var jue=Y2();NO.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=jue(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 RO=l(te=>{"use strict";var kO=g2(),{warn:bo}=m2();te.version=kF().version;te.transports=uO();te.config=lc();te.addColors=kO.levels;te.format=kO.format;te.createLogger=Y2();te.Logger=gc();te.ExceptionHandler=G2();te.RejectionHandler=V2();te.Container=PO();te.Transport=si();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}}});bo.deprecated(te,"setLevels");bo.forFunctions(te,"useFormat",["cli"]);bo.forProperties(te,"useFormat",["padLevels","stripColors"]);bo.forFunctions(te,"deprecated",["addRewriter","addFilter","clone","extend"]);bo.forProperties(te,"deprecated",["emitErrs","levelLength"])});var t0e={};yT(t0e,{default:()=>e0e});module.exports=bT(t0e);var sT=require("@angular-devkit/architect");var ki=require("child_process"),x6=pt(bl()),g6=pt(wa()),p6="14.0.0",m6=()=>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,ki.execSync)("npm root --location=global").toString().trim();t(require(`${i}/firebase-tools`))}catch(i){let s=(0,x6.default)({text:"Installing firebase-tools...",discardStdin:process.platform!=="win32"}).start();(0,ki.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,ki.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,g6.compare)(e,p6)===-1?(console.error(`firebase-tools version ${p6}+ is required, please upgrade and run again`),Promise.reject()):t});var ow=require("fs"),aw=require("path"),uw=require("@angular-devkit/schematics"),U$=require("@angular-devkit/schematics/tasks/index.js"),G$=require("@schematics/angular/utility"),K$=pt(sw());var $$=require("@angular-devkit/schematics"),ps=pt(wa());function cw(t,e){let r=(0,aw.join)(t,".firebaserc");try{let n=(0,ow.readFileSync)(r),i=JSON.parse(n.toString());return V$(i,e)}catch(n){return[void 0,void 0]}}var V$=(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 YO=require("child_process"),Et=require("fs"),X=require("path"),HO=require("url"),Er=require("@angular-devkit/architect"),wo=require("@angular-devkit/schematics"),zO=pt(Xw()),JO=pt(f8()),z2=pt(eq()),XO=pt(pq()),J2=pt(wa()),yc=pt(de()),bc=pt(RO());var MO=22,vo="ssr",BO="us-central1",jO={timeoutSeconds:60,memory:"1GB"},$O=(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||MO).toString()},dependencies:t,devDependencies:e,private:!0}),UO=(t,e,r)=>`const functions = require('firebase-functions/v1');
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 yo(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(mc.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});IO.exports=mc});var Y2=l((Pge,LO)=>{"use strict";var{LEVEL:Pue}=de(),kue=lc(),Rue=gc(),Mue=ho()("winston:create-logger");function Bue(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}LO.exports=function(t={}){t.levels=t.levels||kue.npm.levels;class e extends Rue{constructor(i){super(i)}}let r=new e(t);return Object.keys(t.levels).forEach(function(n){if(Mue('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[Pue]=n,s._addDefaultMeta(a),s.write(a),this||r}return i.length===0?(s.log(n,""),s):s.log(n,...i)},e.prototype[Bue(n)]=function(){return(this||r).isLevelEnabled(n)}}),r}});var PO=l((Rge,NO)=>{"use strict";var jue=Y2();NO.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=jue(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 RO=l(te=>{"use strict";var kO=g2(),{warn:bo}=m2();te.version=kF().version;te.transports=uO();te.config=lc();te.addColors=kO.levels;te.format=kO.format;te.createLogger=Y2();te.Logger=gc();te.ExceptionHandler=G2();te.RejectionHandler=V2();te.Container=PO();te.Transport=si();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}}});bo.deprecated(te,"setLevels");bo.forFunctions(te,"useFormat",["cli"]);bo.forProperties(te,"useFormat",["padLevels","stripColors"]);bo.forFunctions(te,"deprecated",["addRewriter","addFilter","clone","extend"]);bo.forProperties(te,"deprecated",["emitErrs","levelLength"])});var t0e={};yT(t0e,{default:()=>e0e});module.exports=bT(t0e);var sT=require("@angular-devkit/architect");var ki=require("child_process"),x6=pt(bl()),g6=pt(wa()),p6="14.0.0",m6=()=>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,ki.execSync)("npm root --location=global").toString().trim();t(require(`${i}/firebase-tools`))}catch(i){let s=(0,x6.default)({text:"Installing firebase-tools...",discardStdin:process.platform!=="win32"}).start();(0,ki.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,ki.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,g6.compare)(e,p6)===-1?(console.error(`firebase-tools version ${p6}+ is required, please upgrade and run again`),Promise.reject()):t});var ow=require("fs"),aw=require("path"),uw=require("@angular-devkit/schematics"),U$=require("@angular-devkit/schematics/tasks/index.js"),G$=require("@schematics/angular/utility"),K$=pt(sw());var $$=require("@angular-devkit/schematics"),ps=pt(wa());function cw(t,e){let r=(0,aw.join)(t,".firebaserc");try{let n=(0,ow.readFileSync)(r),i=JSON.parse(n.toString());return V$(i,e)}catch(n){return[void 0,void 0]}}var V$=(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 YO=require("child_process"),Et=require("fs"),Q=require("path"),HO=require("url"),Er=require("@angular-devkit/architect"),wo=require("@angular-devkit/schematics"),zO=pt(Xw()),JO=pt(f8()),z2=pt(eq()),XO=pt(pq()),J2=pt(wa()),yc=pt(de()),bc=pt(RO());var MO=22,vo="ssr",BO="us-central1",jO={timeoutSeconds:60,memory:"1GB"},$O=(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||MO).toString()},dependencies:t,devDependencies:e,private:!0}),UO=(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");
@@ -248,7 +248,7 @@ COPY package*.json ./
248
248
  RUN npm install --only=production
249
249
  COPY . ./
250
250
  CMD [ "npm", "start" ]
251
- `;var Zue={};var $ue=typeof __dirname=="string"?__dirname:(0,X.dirname)((0,HO.fileURLToPath)(Zue.url)),{copySync:QO,removeSync:ZO,readJsonSync:Uue}=JO.default,eT=5e3,tT="localhost",Gue={memory:"1Gi",timeout:60,maxInstances:"default",maxConcurrency:"default",minInstances:"default",cpus:1},H2=(t,e,r)=>Ce(void 0,null,function*(){return new Promise((n,i)=>{let s=(0,YO.spawn)(t,e,r),o=[],a=[];s.stdout.on("data",u=>{process.stdout.write(u.toString()),o.push(u)}),s.stderr.on("data",u=>{process.stderr.write(u.toString()),a.push(u)}),s.on("error",u=>{i(u)}),s.on("close",u=>{if(u!==0){i(Buffer.concat(a).toString());return}n(Buffer.concat(o))})})}),VO=t=>t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),Kue=(t,e)=>{QO(t,e),ZO(t)},Vue=(t,e,r,n,i)=>Ce(void 0,null,function*(){var o;let s=(o=n.target)!=null?o:e.target.project;if(n.preview){yield t.serve({port:eT,host:tT,only:`hosting:${s}`,nonInteractive:!0,projectRoot:r});let{deployProject:a}=yield z2.prompt({type:"confirm",name:"deployProject",message:"Would you like to deploy your application to Firebase Hosting?"});if(!a)return;process.env.FIREBASE_FRAMEWORKS_SKIP_BUILD="true"}return yield t.deploy({only:`hosting:${s}`,cwd:r,token:i,nonInteractive:!0,projectRoot:r})}),rT={moveSync:Kue,writeFileSync:Et.writeFileSync,renameSync:Et.renameSync,copySync:QO,removeSync:ZO,existsSync:Et.existsSync},WO=["npm","yarn","pnpm","cnpm","bun"],Wue=t=>{if(!WO.includes(t))throw new wo.SchematicsException(`Unsupported package manager "${t}" in angular.json (cli.packageManager). Expected one of: ${WO.join(", ")}.`);return t},Yue=t=>{if(typeof t!="string"||t.length===0||t.startsWith("-")||/[\s;&|$`(){}<>!\\'"]/.test(t))throw new wo.SchematicsException(`Invalid dependency name ${JSON.stringify(t)} in angular.json (server externalDependencies).`);return t},nT={runPackageBin(t,e,r={}){let n=zO.default.sync(t,e,r);if(n.error)throw n.error;if(n.status!==0)throw new wo.SchematicsException(`Command "${t}" exited with ${n.signal?`signal ${n.signal}`:`code ${n.status}`}.`);return n.stdout}},Hue=(t,e)=>{let n=nT.runPackageBin(Wue(t),["list",Yue(e)]).toString().match(`[^|s]${VO(e)}[@| ][^s]+(s.+)?$`);return n?n[0].split(new RegExp(`${VO(e)}[@| ]`))[1].split(/\s/)[0]:null},iT=(t,e,r,n)=>{var a,u,c,f,h;let i={},s={},{firebaseFunctionsDependencies:o}=Uue((0,X.join)($ue,"..","versions.json"));if(r.ssr!=="cloud-run"&&Object.keys(o).forEach(d=>{let{version:p,dev:x}=o[d];(x?s:i)[d]=p}),(0,Et.existsSync)((0,X.join)(e,"angular.json"))){let d=JSON.parse((0,Et.readFileSync)((0,X.join)(e,"angular.json")).toString()),p=(u=(a=d.cli)==null?void 0:a.packageManager)!=null?u:"npm",x=d.projects[t.target.project].architect.server,g=((c=x==null?void 0:x.options)==null?void 0:c.externalDependencies)||[];if((h=(f=x==null?void 0:x.options)==null?void 0:f.bundleDependencies)!=null?h:!0)g.forEach(y=>{let b=Hue(p,y);b&&(i[y]=b)});else if((0,Et.existsSync)((0,X.join)(e,"package.json"))){let y=JSON.parse((0,Et.readFileSync)((0,X.join)(e,"package.json")).toString());Object.keys(y.dependencies).forEach(b=>{i[b]=y.dependencies[b]})}}return $O(i,s,r,n)},zue=(u,c,f,h,d,p,x,...g)=>Ce(void 0,[u,c,f,h,d,p,x,...g],function*(t,e,r,n,i,s,o,a=rT){var R;let m=yield e.getTargetOptions((0,Er.targetFromTargetString)(n.name));if(!m.outputPath||typeof m.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${n.name}' in angular.json`);let y=yield e.getTargetOptions((0,Er.targetFromTargetString)(i.name));if(!y.outputPath||typeof y.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${i.name}' in angular.json`);let b=(0,X.join)(r,m.outputPath),w=(0,X.join)(r,y.outputPath),E=s.outputPath?(0,X.join)(r,s.outputPath):(0,X.dirname)(w),C=s.functionName||vo,T=(0,X.join)(E,m.outputPath),N=(0,X.join)(E,y.outputPath);s.outputPath?(a.removeSync(E),a.copySync(b,T),a.copySync(w,N)):(a.moveSync(b,T),a.moveSync(w,N));let S=iT(e,r,s),_=S.engines.node;(0,J2.satisfies)(process.versions.node,_.toString())||e.logger.warn(`\u26A0\uFE0F Your Node.js version (${process.versions.node}) does not match the Firebase Functions runtime (${_}).`);let A=(0,X.join)(E,"package.json");if(a.writeFileSync(A,JSON.stringify(S,null,2)),s.CF3v2?a.writeFileSync((0,X.join)(E,"index.js"),GO(y.outputPath,s,C)):a.writeFileSync((0,X.join)(E,"index.js"),UO(y.outputPath,s,C)),!s.prerender)try{a.renameSync((0,X.join)(T,"index.html"),(0,X.join)(T,"index.original.html"))}catch(B){}let F=(R=s.target)!=null?R:e.target.project;if(a.existsSync(A)?nT.runPackageBin("npm",["--prefix",E,"install"],{stdio:"inherit"}):console.error(`No package.json exists at ${E}`),s.preview){yield t.serve({port:eT,host:tT,targets:[`hosting:${F}`,`functions:${C}`],nonInteractive:!0,projectRoot:r});let{deployProject:B}=yield z2.prompt({type:"confirm",name:"deployProject",message:"Would you like to deploy your application to Firebase Hosting & Cloud Functions?"});if(!B)return}return yield t.deploy({only:`hosting:${F},functions:${C}`,cwd:r,token:o,nonInteractive:!0,projectRoot:r})}),Jue=(t,e,r)=>["builds","submit",t,"--tag",`gcr.io/${r.firebaseProject}/${e}`,"--project",r.firebaseProject,"--quiet"],Xue=(t,e,r)=>["run","deploy",t,"--image",`gcr.io/${e.firebaseProject}/${t}`,"--project",e.firebaseProject,...r,"--platform","managed","--allow-unauthenticated","--region",e.region,"--quiet"],Que=(u,c,f,h,d,p,x,...g)=>Ce(void 0,[u,c,f,h,d,p,x,...g],function*(t,e,r,n,i,s,o,a=rT){var B;let m=yield e.getTargetOptions((0,Er.targetFromTargetString)(n.name));if(!m.outputPath||typeof m.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${n.name}' in angular.json`);let y=yield e.getTargetOptions((0,Er.targetFromTargetString)(i.name));if(!y.outputPath||typeof y.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${i.name}' in angular.json`);let b=(0,X.join)(r,m.outputPath),w=(0,X.join)(r,y.outputPath),E=s.outputPath?(0,X.join)(r,s.outputPath):(0,X.join)((0,X.dirname)(w),"run"),C=s.functionName||vo,T=(0,X.join)(E,m.outputPath),N=(0,X.join)(E,y.outputPath);a.removeSync(E),a.copySync(b,T),a.copySync(w,N);let S=iT(e,r,s,(0,X.join)(y.outputPath,"main.js")),_=S.engines.node;if((0,J2.satisfies)(process.versions.node,_.toString())||e.logger.warn(`\u26A0\uFE0F Your Node.js version (${process.versions.node}) does not match the Cloud Run runtime (${_}).`),a.writeFileSync((0,X.join)(E,"package.json"),JSON.stringify(S,null,2)),a.writeFileSync((0,X.join)(E,"Dockerfile"),KO(s)),!s.prerender)try{a.renameSync((0,X.join)(T,"index.html"),(0,X.join)(T,"index.original.html"))}catch(k){}if(s.preview)throw new wo.SchematicsException("Cloud Run preview not supported.");let A=[],F=s.cloudRunOptions||{};Object.entries(Gue).forEach(([k,W])=>{F[k]||(F[k]=W)}),F.cpus&&A.push("--cpu",F.cpus.toString()),F.maxConcurrency&&A.push("--concurrency",F.maxConcurrency.toString()),F.maxInstances&&A.push("--max-instances",F.maxInstances.toString()),F.memory&&A.push("--memory",F.memory.toString()),F.minInstances&&A.push("--min-instances",F.minInstances.toString()),F.timeout&&A.push("--timeout",F.timeout.toString()),F.vpcConnector&&A.push("--vpc-connector",F.vpcConnector),e.logger.info("\u{1F4E6} Deploying to Cloud Run"),yield H2("gcloud",Jue(E,C,s)),yield H2("gcloud",Xue(C,s,A));let R=(B=s.target)!=null?B:e.target.project;return yield t.deploy({only:`hosting:${R}`,cwd:r,token:o,nonInteractive:!0,projectRoot:r})});function X2(t,e,r,n,i,s,o,a){return Ce(this,null,function*(){let u=!o.version||o.version<2;if(!a&&!process.env.GOOGLE_APPLICATION_CREDENTIALS){yield t.login();let f=yield t.login({projectRoot:e.workspaceRoot});console.log(`Logged into Firebase as ${f.email}.`)}if(!a&&process.env.GOOGLE_APPLICATION_CREDENTIALS&&(yield H2("gcloud",["auth","activate-service-account","--key-file",process.env.GOOGLE_APPLICATION_CREDENTIALS]),console.log("Using Google Application Credentials.")),u&&console.error(`Legacy ng-deploy Firebase is deprecated.
251
+ `;var Zue={};var $ue=typeof __dirname=="string"?__dirname:(0,Q.dirname)((0,HO.fileURLToPath)(Zue.url)),{copySync:QO,removeSync:ZO,readJsonSync:Uue}=JO.default,eT=5e3,tT="localhost",Gue={memory:"1Gi",timeout:60,maxInstances:"default",maxConcurrency:"default",minInstances:"default",cpus:1},H2=(t,e,r)=>Ce(void 0,null,function*(){return new Promise((n,i)=>{let s=(0,YO.spawn)(t,e,r),o=[],a=[];s.stdout.on("data",u=>{process.stdout.write(u.toString()),o.push(u)}),s.stderr.on("data",u=>{process.stderr.write(u.toString()),a.push(u)}),s.on("error",u=>{i(u)}),s.on("close",u=>{if(u!==0){i(Buffer.concat(a).toString());return}n(Buffer.concat(o))})})}),VO=t=>t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),Kue=(t,e)=>{QO(t,e),ZO(t)},Vue=(t,e,r,n,i)=>Ce(void 0,null,function*(){var o;let s=(o=n.target)!=null?o:e.target.project;if(n.preview){yield t.serve({port:eT,host:tT,only:`hosting:${s}`,nonInteractive:!0,projectRoot:r});let{deployProject:a}=yield z2.prompt({type:"confirm",name:"deployProject",message:"Would you like to deploy your application to Firebase Hosting?"});if(!a)return;process.env.FIREBASE_FRAMEWORKS_SKIP_BUILD="true"}return yield t.deploy({only:`hosting:${s}`,cwd:r,token:i,nonInteractive:!0,projectRoot:r})}),rT={moveSync:Kue,writeFileSync:Et.writeFileSync,renameSync:Et.renameSync,copySync:QO,removeSync:ZO,existsSync:Et.existsSync},WO=["npm","yarn","pnpm","cnpm","bun"],Wue=t=>{if(!WO.includes(t))throw new wo.SchematicsException(`Unsupported package manager "${t}" in angular.json (cli.packageManager). Expected one of: ${WO.join(", ")}.`);return t},Yue=t=>{if(typeof t!="string"||t.length===0||t.startsWith("-")||/[\s;&|$`(){}<>!\\'"]/.test(t))throw new wo.SchematicsException(`Invalid dependency name ${JSON.stringify(t)} in angular.json (server externalDependencies).`);return t},nT={runPackageBin(t,e,r={}){let n=zO.default.sync(t,e,r);if(n.error)throw n.error;if(n.status!==0)throw new wo.SchematicsException(`Command "${t}" exited with ${n.signal?`signal ${n.signal}`:`code ${n.status}`}.`);return n.stdout}},Hue=(t,e)=>{let n=nT.runPackageBin(Wue(t),["list",Yue(e)]).toString().match(`[^|s]${VO(e)}[@| ][^s]+(s.+)?$`);return n?n[0].split(new RegExp(`${VO(e)}[@| ]`))[1].split(/\s/)[0]:null},iT=(t,e,r,n)=>{var a,u,c,f,h;let i={},s={},{firebaseFunctionsDependencies:o}=Uue((0,Q.join)($ue,"..","versions.json"));if(r.ssr!=="cloud-run"&&Object.keys(o).forEach(d=>{let{version:p,dev:x}=o[d];(x?s:i)[d]=p}),(0,Et.existsSync)((0,Q.join)(e,"angular.json"))){let d=JSON.parse((0,Et.readFileSync)((0,Q.join)(e,"angular.json")).toString()),p=(u=(a=d.cli)==null?void 0:a.packageManager)!=null?u:"npm",x=d.projects[t.target.project].architect.server,g=((c=x==null?void 0:x.options)==null?void 0:c.externalDependencies)||[];if((h=(f=x==null?void 0:x.options)==null?void 0:f.bundleDependencies)!=null?h:!0)g.forEach(y=>{let b=Hue(p,y);b&&(i[y]=b)});else if((0,Et.existsSync)((0,Q.join)(e,"package.json"))){let y=JSON.parse((0,Et.readFileSync)((0,Q.join)(e,"package.json")).toString());Object.keys(y.dependencies).forEach(b=>{i[b]=y.dependencies[b]})}}return $O(i,s,r,n)},zue=(u,c,f,h,d,p,x,...g)=>Ce(void 0,[u,c,f,h,d,p,x,...g],function*(t,e,r,n,i,s,o,a=rT){var R;let m=yield e.getTargetOptions((0,Er.targetFromTargetString)(n.name));if(!m.outputPath||typeof m.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${n.name}' in angular.json`);let y=yield e.getTargetOptions((0,Er.targetFromTargetString)(i.name));if(!y.outputPath||typeof y.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${i.name}' in angular.json`);let b=(0,Q.join)(r,m.outputPath),w=(0,Q.join)(r,y.outputPath),E=s.outputPath?(0,Q.join)(r,s.outputPath):(0,Q.dirname)(w),C=s.functionName||vo,T=(0,Q.join)(E,m.outputPath),N=(0,Q.join)(E,y.outputPath);s.outputPath?(a.removeSync(E),a.copySync(b,T),a.copySync(w,N)):(a.moveSync(b,T),a.moveSync(w,N));let S=iT(e,r,s),_=S.engines.node;(0,J2.satisfies)(process.versions.node,_.toString())||e.logger.warn(`\u26A0\uFE0F Your Node.js version (${process.versions.node}) does not match the Firebase Functions runtime (${_}).`);let A=(0,Q.join)(E,"package.json");if(a.writeFileSync(A,JSON.stringify(S,null,2)),s.CF3v2?a.writeFileSync((0,Q.join)(E,"index.js"),GO(y.outputPath,s,C)):a.writeFileSync((0,Q.join)(E,"index.js"),UO(y.outputPath,s,C)),!s.prerender)try{a.renameSync((0,Q.join)(T,"index.html"),(0,Q.join)(T,"index.original.html"))}catch(B){}let F=(R=s.target)!=null?R:e.target.project;if(a.existsSync(A)?nT.runPackageBin("npm",["--prefix",E,"install"],{stdio:"inherit"}):console.error(`No package.json exists at ${E}`),s.preview){yield t.serve({port:eT,host:tT,targets:[`hosting:${F}`,`functions:${C}`],nonInteractive:!0,projectRoot:r});let{deployProject:B}=yield z2.prompt({type:"confirm",name:"deployProject",message:"Would you like to deploy your application to Firebase Hosting & Cloud Functions?"});if(!B)return}return yield t.deploy({only:`hosting:${F},functions:${C}`,cwd:r,token:o,nonInteractive:!0,projectRoot:r})}),Jue=(t,e,r)=>["builds","submit",t,"--tag",`gcr.io/${r.firebaseProject}/${e}`,"--project",r.firebaseProject,"--quiet"],Xue=(t,e,r)=>["run","deploy",t,"--image",`gcr.io/${e.firebaseProject}/${t}`,"--project",e.firebaseProject,...r,"--platform","managed","--allow-unauthenticated","--region",e.region,"--quiet"],Que=(u,c,f,h,d,p,x,...g)=>Ce(void 0,[u,c,f,h,d,p,x,...g],function*(t,e,r,n,i,s,o,a=rT){var B;let m=yield e.getTargetOptions((0,Er.targetFromTargetString)(n.name));if(!m.outputPath||typeof m.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${n.name}' in angular.json`);let y=yield e.getTargetOptions((0,Er.targetFromTargetString)(i.name));if(!y.outputPath||typeof y.outputPath!="string")throw new Error(`Cannot read the output path option of the Angular project '${i.name}' in angular.json`);let b=(0,Q.join)(r,m.outputPath),w=(0,Q.join)(r,y.outputPath),E=s.outputPath?(0,Q.join)(r,s.outputPath):(0,Q.join)((0,Q.dirname)(w),"run"),C=s.functionName||vo,T=(0,Q.join)(E,m.outputPath),N=(0,Q.join)(E,y.outputPath);a.removeSync(E),a.copySync(b,T),a.copySync(w,N);let S=iT(e,r,s,[y.outputPath,"main.js"].join("/")),_=S.engines.node;if((0,J2.satisfies)(process.versions.node,_.toString())||e.logger.warn(`\u26A0\uFE0F Your Node.js version (${process.versions.node}) does not match the Cloud Run runtime (${_}).`),a.writeFileSync((0,Q.join)(E,"package.json"),JSON.stringify(S,null,2)),a.writeFileSync((0,Q.join)(E,"Dockerfile"),KO(s)),!s.prerender)try{a.renameSync((0,Q.join)(T,"index.html"),(0,Q.join)(T,"index.original.html"))}catch(k){}if(s.preview)throw new wo.SchematicsException("Cloud Run preview not supported.");let A=[],F=s.cloudRunOptions||{};Object.entries(Gue).forEach(([k,W])=>{F[k]||(F[k]=W)}),F.cpus&&A.push("--cpu",F.cpus.toString()),F.maxConcurrency&&A.push("--concurrency",F.maxConcurrency.toString()),F.maxInstances&&A.push("--max-instances",F.maxInstances.toString()),F.memory&&A.push("--memory",F.memory.toString()),F.minInstances&&A.push("--min-instances",F.minInstances.toString()),F.timeout&&A.push("--timeout",F.timeout.toString()),F.vpcConnector&&A.push("--vpc-connector",F.vpcConnector),e.logger.info("\u{1F4E6} Deploying to Cloud Run"),yield H2("gcloud",Jue(E,C,s)),yield H2("gcloud",Xue(C,s,A));let R=(B=s.target)!=null?B:e.target.project;return yield t.deploy({only:`hosting:${R}`,cwd:r,token:o,nonInteractive:!0,projectRoot:r})});function X2(t,e,r,n,i,s,o,a){return Ce(this,null,function*(){let u=!o.version||o.version<2;if(!a&&!process.env.GOOGLE_APPLICATION_CREDENTIALS){yield t.login();let f=yield t.login({projectRoot:e.workspaceRoot});console.log(`Logged into Firebase as ${f.email}.`)}if(!a&&process.env.GOOGLE_APPLICATION_CREDENTIALS&&(yield H2("gcloud",["auth","activate-service-account","--key-file",process.env.GOOGLE_APPLICATION_CREDENTIALS]),console.log("Using Google Application Credentials.")),u&&console.error(`Legacy ng-deploy Firebase is deprecated.
252
252
  Please migrate to Firebase Hosting's integration with Angular https://firebase.google.com/docs/hosting/frameworks/angular
253
253
  or the new Firebase App Hosting product https://firebase.google.com/docs/app-hosting`),i)yield(yield e.scheduleTarget((0,Er.targetFromTargetString)(i.name),i.options)).result;else{if(!e.target)throw new Error("Cannot execute the build target");e.logger.info(`\u{1F4E6} Building "${e.target.project}"`);let f=[e.scheduleTarget((0,Er.targetFromTargetString)(r.name),r.options).then(h=>h.result)];n&&f.push(e.scheduleTarget((0,Er.targetFromTargetString)(n.name),n.options).then(h=>h.result)),yield Promise.all(f)}try{yield t.use(s,{project:s,projectRoot:e.workspaceRoot})}catch(f){throw new Error(`Cannot select firebase project '${s}'`)}o.firebaseProject=s;let c=new bc.transports.Console({level:"info",format:bc.format.printf(f=>{var p,x,g,m;let h=(g=(x=(p=f[yc.default.SPLAT])==null?void 0:p[1])==null?void 0:x.metadata)==null?void 0:g.emulator,d=(m=f[yc.default.SPLAT])==null?void 0:m[0];if(d!=null&&d.replace){let y=d.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]/g,"");(h==null?void 0:h.name)==="hosting"&&y.startsWith("Local server: ")&&(0,XO.default)(y.split(": ")[1])}return[f.message,...f[yc.default.SPLAT]||[]].filter(y=>typeof y=="string").join(" ")})});t.logger.logger.add(c),u&&n?o.ssr==="cloud-run"?yield Que(t,e,e.workspaceRoot,r,n,o,a):yield zue(t,e,e.workspaceRoot,r,n,o,a):yield Vue(t,e,e.workspaceRoot,o,a)})}var e0e=(0,sT.createBuilder)((t,e)=>Ce(void 0,null,function*(){if(!e.target)throw new Error("Cannot deploy the application without a target");let[r,n]=cw(e.workspaceRoot,e.target.project),i=t.firebaseProject||r;if(!i)throw new Error("Cannot determine the Firebase Project from your angular.json or .firebaserc");if(i!==r)throw new Error("The Firebase Project specified by your angular.json or .firebaserc is in conflict");let s=t.firebaseHostingSite||n;if(!s)throw new Error("Cannot determine the Firebase Hosting Site from your angular.json or .firebaserc");if(s!==n)throw new Error("The Firebase Hosting Site specified by your angular.json or .firebaserc is in conflict");let o={name:t.browserTarget||t.buildTarget||`${e.target.project}:build:production`},a;t.prerender&&(a={name:t.prerenderTarget||`${e.target.project}:prerender:production`});let u;t.ssr&&(u={name:t.serverTarget||t.universalBuildTarget||`${e.target.project}:server:production`});try{process.env.FIREBASE_DEPLOY_AGENT="angularfire",yield X2(yield m6(),e,o,u,a,i,t,process.env.FIREBASE_TOKEN)}catch(c){return console.error("Error when trying to deploy: "),console.error(c.message),{success:!1}}return{success:!0}}));
254
254
  /*! Bundled license information: