@angular/fire 21.0.0-rc.0-canary.4ff403d → 21.0.0-rc.0-canary.b83343d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/ai.md +1 -1
- package/docs/version-21-upgrade.md +19 -1
- package/fesm2022/angular-fire-ai.mjs +2 -3
- package/fesm2022/angular-fire-ai.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/add/index.js +1 -1
- package/schematics/deploy/actions.js +61 -61
- package/schematics/deploy/builder.js +125 -125
- package/schematics/deploy/schema.json +2 -1
- package/schematics/update/v21/index.js +1 -1
- package/types/angular-fire-ai.d.ts +2 -3
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
},
|
|
57
57
|
"functionsNodeVersion": {
|
|
58
58
|
"oneOf": [{ "type": "number" }, { "type": "string" }],
|
|
59
|
-
"
|
|
59
|
+
"pattern": "^(?!latest$)[\\w][\\w.-]{0,127}$",
|
|
60
|
+
"description": "Version of Node.js to run Cloud Functions / Run on, e.g. 22. On Cloud Run this is the tag of the node base image (node:<version>-slim), so any tag that image publishes works, including lts and 22-bookworm; latest is excluded because its slim variant is published as node:slim. On Cloud Functions the value becomes the engines.node field, which firebase-tools resolves to a nodejs<version> runtime by concatenation, so a plain major version is the only shape that works there. Not a semver range: >=18 and ^20 are rejected outright, and 20.x, though a grammatical tag, matches no published image."
|
|
60
61
|
},
|
|
61
62
|
"CF3v2": {
|
|
62
63
|
"type": "boolean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var jr=Object.create;var j=Object.defineProperty,kr=Object.defineProperties,Gr=Object.getOwnPropertyDescriptor,_r=Object.getOwnPropertyDescriptors,Ur=Object.getOwnPropertyNames,ve=Object.getOwnPropertySymbols,Br=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable;var Oe=(t,e,r)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,oe=(t,e)=>{for(var r in e||(e={}))Ce.call(e,r)&&Oe(t,r,e[r]);if(ve)for(var r of ve(e))Mr.call(e,r)&&Oe(t,r,e[r]);return t},be=(t,e)=>kr(t,_r(e));var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Xr=(t,e)=>{for(var r in e)j(t,r,{get:e[r],enumerable:!0})},Fe=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ur(e))!Ce.call(t,i)&&i!==r&&j(t,i,{get:()=>e[i],enumerable:!(s=Gr(e,i))||s.enumerable});return t};var Hr=(t,e,r)=>(r=t!=null?jr(Br(t)):{},Fe(e||!t||!t.__esModule?j(r,"default",{value:t,enumerable:!0}):r,t)),Wr=t=>Fe(j({},"__esModule",{value:!0}),t);var k=E((go,De)=>{"use strict";var Yr="2.0.0",zr=Number.MAX_SAFE_INTEGER||9007199254740991,Kr=16,Qr=250,Zr=["major","premajor","minor","preminor","patch","prepatch","prerelease"];De.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Kr,MAX_SAFE_BUILD_LENGTH:Qr,MAX_SAFE_INTEGER:zr,RELEASE_TYPES:Zr,SEMVER_SPEC_VERSION:Yr,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var G=E((Io,qe)=>{"use strict";var Jr=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};qe.exports=Jr});var F=E((w,Pe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ae,MAX_SAFE_BUILD_LENGTH:es,MAX_LENGTH:ts}=k(),rs=G();w=Pe.exports={};var ss=w.re=[],is=w.safeRe=[],p=w.src=[],ns=w.safeSrc=[],f=w.t={},os=0,ce="[a-zA-Z0-9-]",as=[["\\s",1],["\\d",ts],[ce,es]],cs=t=>{for(let[e,r]of as)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},h=(t,e,r)=>{let s=cs(e),i=os++;rs(t,i,e),f[t]=i,p[i]=e,ns[i]=s,ss[i]=new RegExp(e,r?"g":void 0),is[i]=new RegExp(s,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*");h("NUMERICIDENTIFIERLOOSE","\\d+");h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ce}*`);h("MAINVERSION",`(${p[f.NUMERICIDENTIFIER]})\\.(${p[f.NUMERICIDENTIFIER]})\\.(${p[f.NUMERICIDENTIFIER]})`);h("MAINVERSIONLOOSE",`(${p[f.NUMERICIDENTIFIERLOOSE]})\\.(${p[f.NUMERICIDENTIFIERLOOSE]})\\.(${p[f.NUMERICIDENTIFIERLOOSE]})`);h("PRERELEASEIDENTIFIER",`(?:${p[f.NONNUMERICIDENTIFIER]}|${p[f.NUMERICIDENTIFIER]})`);h("PRERELEASEIDENTIFIERLOOSE",`(?:${p[f.NONNUMERICIDENTIFIER]}|${p[f.NUMERICIDENTIFIERLOOSE]})`);h("PRERELEASE",`(?:-(${p[f.PRERELEASEIDENTIFIER]}(?:\\.${p[f.PRERELEASEIDENTIFIER]})*))`);h("PRERELEASELOOSE",`(?:-?(${p[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[f.PRERELEASEIDENTIFIERLOOSE]})*))`);h("BUILDIDENTIFIER",`${ce}+`);h("BUILD",`(?:\\+(${p[f.BUILDIDENTIFIER]}(?:\\.${p[f.BUILDIDENTIFIER]})*))`);h("FULLPLAIN",`v?${p[f.MAINVERSION]}${p[f.PRERELEASE]}?${p[f.BUILD]}?`);h("FULL",`^${p[f.FULLPLAIN]}$`);h("LOOSEPLAIN",`[v=\\s]*${p[f.MAINVERSIONLOOSE]}${p[f.PRERELEASELOOSE]}?${p[f.BUILD]}?`);h("LOOSE",`^${p[f.LOOSEPLAIN]}$`);h("GTLT","((?:<|>)?=?)");h("XRANGEIDENTIFIERLOOSE",`${p[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);h("XRANGEIDENTIFIER",`${p[f.NUMERICIDENTIFIER]}|x|X|\\*`);h("XRANGEPLAIN",`[v=\\s]*(${p[f.XRANGEIDENTIFIER]})(?:\\.(${p[f.XRANGEIDENTIFIER]})(?:\\.(${p[f.XRANGEIDENTIFIER]})(?:${p[f.PRERELEASE]})?${p[f.BUILD]}?)?)?`);h("XRANGEPLAINLOOSE",`[v=\\s]*(${p[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[f.XRANGEIDENTIFIERLOOSE]})(?:${p[f.PRERELEASELOOSE]})?${p[f.BUILD]}?)?)?`);h("XRANGE",`^${p[f.GTLT]}\\s*${p[f.XRANGEPLAIN]}$`);h("XRANGELOOSE",`^${p[f.GTLT]}\\s*${p[f.XRANGEPLAINLOOSE]}$`);h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ae}})(?:\\.(\\d{1,${ae}}))?(?:\\.(\\d{1,${ae}}))?`);h("COERCE",`${p[f.COERCEPLAIN]}(?:$|[^\\d])`);h("COERCEFULL",p[f.COERCEPLAIN]+`(?:${p[f.PRERELEASE]})?(?:${p[f.BUILD]})?(?:$|[^\\d])`);h("COERCERTL",p[f.COERCE],!0);h("COERCERTLFULL",p[f.COERCEFULL],!0);h("LONETILDE","(?:~>?)");h("TILDETRIM",`(\\s*)${p[f.LONETILDE]}\\s+`,!0);w.tildeTrimReplace="$1~";h("TILDE",`^${p[f.LONETILDE]}${p[f.XRANGEPLAIN]}$`);h("TILDELOOSE",`^${p[f.LONETILDE]}${p[f.XRANGEPLAINLOOSE]}$`);h("LONECARET","(?:\\^)");h("CARETTRIM",`(\\s*)${p[f.LONECARET]}\\s+`,!0);w.caretTrimReplace="$1^";h("CARET",`^${p[f.LONECARET]}${p[f.XRANGEPLAIN]}$`);h("CARETLOOSE",`^${p[f.LONECARET]}${p[f.XRANGEPLAINLOOSE]}$`);h("COMPARATORLOOSE",`^${p[f.GTLT]}\\s*(${p[f.LOOSEPLAIN]})$|^$`);h("COMPARATOR",`^${p[f.GTLT]}\\s*(${p[f.FULLPLAIN]})$|^$`);h("COMPARATORTRIM",`(\\s*)${p[f.GTLT]}\\s*(${p[f.LOOSEPLAIN]}|${p[f.XRANGEPLAIN]})`,!0);w.comparatorTrimReplace="$1$2$3";h("HYPHENRANGE",`^\\s*(${p[f.XRANGEPLAIN]})\\s+-\\s+(${p[f.XRANGEPLAIN]})\\s*$`);h("HYPHENRANGELOOSE",`^\\s*(${p[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[f.XRANGEPLAINLOOSE]})\\s*$`);h("STAR","(<|>)?=?\\s*\\*");h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var W=E((xo,Ve)=>{"use strict";var ls=Object.freeze({loose:!0}),us=Object.freeze({}),ps=t=>t?typeof t!="object"?ls:t:us;Ve.exports=ps});var le=E((So,Ge)=>{"use strict";var je=/^[0-9]+$/,ke=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=je.test(t),s=je.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},fs=(t,e)=>ke(e,t);Ge.exports={compareIdentifiers:ke,rcompareIdentifiers:fs}});var x=E(($o,Ue)=>{"use strict";var Y=G(),{MAX_LENGTH:_e,MAX_SAFE_INTEGER:z}=k(),{safeRe:K,t:Q}=F(),ms=W(),{compareIdentifiers:ue}=le(),pe=class t{constructor(e,r){if(r=ms(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>_e)throw new TypeError(`version is longer than ${_e} characters`);Y("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?K[Q.LOOSE]:K[Q.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>z||this.major<0)throw new TypeError("Invalid major version");if(this.minor>z||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>z||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<z)return n}return i}):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(Y("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],i=e.prerelease[r];if(Y("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return ue(s,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],i=e.build[r];if(Y("build compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return ue(s,i)}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 i=`-${r}`.match(this.options.loose?K[Q.PRERELEASELOOSE]:K[Q.PRERELEASE]);if(!i||i[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 i=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let n=[r,i];s===!1&&(n=[r]),ue(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Ue.exports=pe});var O=E((Ro,Me)=>{"use strict";var Be=x(),ds=(t,e,r=!1)=>{if(t instanceof Be)return t;try{return new Be(t,e)}catch(s){if(!r)return null;throw s}};Me.exports=ds});var He=E((Ao,Xe)=>{"use strict";var Es=O(),hs=(t,e)=>{let r=Es(t,e);return r?r.version:null};Xe.exports=hs});var Ye=E((No,We)=>{"use strict";var gs=O(),Is=(t,e)=>{let r=gs(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};We.exports=Is});var Qe=E((wo,Ke)=>{"use strict";var ze=x(),xs=(t,e,r,s,i)=>{typeof r=="string"&&(i=s,s=r,r=void 0);try{return new ze(t instanceof ze?t.version:t,r).inc(e,s,i).version}catch(n){return null}};Ke.exports=xs});var et=E((Lo,Je)=>{"use strict";var Ze=O(),Ss=(t,e)=>{let r=Ze(t,null,!0),s=Ze(e,null,!0),i=r.compare(s);if(i===0)return null;let n=i>0,o=n?r:s,a=n?s:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let m=c?"pre":"";return r.major!==s.major?m+"major":r.minor!==s.minor?m+"minor":r.patch!==s.patch?m+"patch":"prerelease"};Je.exports=Ss});var rt=E((yo,tt)=>{"use strict";var $s=x(),Rs=(t,e)=>new $s(t,e).major;tt.exports=Rs});var it=E((To,st)=>{"use strict";var As=x(),Ns=(t,e)=>new As(t,e).minor;st.exports=Ns});var ot=E((vo,nt)=>{"use strict";var ws=x(),Ls=(t,e)=>new ws(t,e).patch;nt.exports=Ls});var ct=E((Oo,at)=>{"use strict";var ys=O(),Ts=(t,e)=>{let r=ys(t,e);return r&&r.prerelease.length?r.prerelease:null};at.exports=Ts});var A=E((Co,ut)=>{"use strict";var lt=x(),vs=(t,e,r)=>new lt(t,r).compare(new lt(e,r));ut.exports=vs});var ft=E((bo,pt)=>{"use strict";var Os=A(),Cs=(t,e,r)=>Os(e,t,r);pt.exports=Cs});var dt=E((Fo,mt)=>{"use strict";var bs=A(),Fs=(t,e)=>bs(t,e,!0);mt.exports=Fs});var Z=E((Do,ht)=>{"use strict";var Et=x(),Ds=(t,e,r)=>{let s=new Et(t,r),i=new Et(e,r);return s.compare(i)||s.compareBuild(i)};ht.exports=Ds});var It=E((qo,gt)=>{"use strict";var qs=Z(),Ps=(t,e)=>t.sort((r,s)=>qs(r,s,e));gt.exports=Ps});var St=E((Po,xt)=>{"use strict";var Vs=Z(),js=(t,e)=>t.sort((r,s)=>Vs(s,r,e));xt.exports=js});var _=E((Vo,$t)=>{"use strict";var ks=A(),Gs=(t,e,r)=>ks(t,e,r)>0;$t.exports=Gs});var J=E((jo,Rt)=>{"use strict";var _s=A(),Us=(t,e,r)=>_s(t,e,r)<0;Rt.exports=Us});var fe=E((ko,At)=>{"use strict";var Bs=A(),Ms=(t,e,r)=>Bs(t,e,r)===0;At.exports=Ms});var me=E((Go,Nt)=>{"use strict";var Xs=A(),Hs=(t,e,r)=>Xs(t,e,r)!==0;Nt.exports=Hs});var ee=E((_o,wt)=>{"use strict";var Ws=A(),Ys=(t,e,r)=>Ws(t,e,r)>=0;wt.exports=Ys});var te=E((Uo,Lt)=>{"use strict";var zs=A(),Ks=(t,e,r)=>zs(t,e,r)<=0;Lt.exports=Ks});var de=E((Bo,yt)=>{"use strict";var Qs=fe(),Zs=me(),Js=_(),ei=ee(),ti=J(),ri=te(),si=(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 Qs(t,r,s);case"!=":return Zs(t,r,s);case">":return Js(t,r,s);case">=":return ei(t,r,s);case"<":return ti(t,r,s);case"<=":return ri(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};yt.exports=si});var vt=E((Mo,Tt)=>{"use strict";var ii=x(),ni=O(),{safeRe:re,t:se}=F(),oi=(t,e)=>{if(t instanceof ii)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?re[se.COERCEFULL]:re[se.COERCE]);else{let c=e.includePrerelease?re[se.COERCERTLFULL]:re[se.COERCERTL],l;for(;(l=c.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||l.index+l[0].length!==r.index+r[0].length)&&(r=l),c.lastIndex=l.index+l[1].length+l[2].length;c.lastIndex=-1}if(r===null)return null;let s=r[2],i=r[3]||"0",n=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return ni(`${s}.${i}.${n}${o}${a}`,e)};Tt.exports=oi});var Ct=E((Xo,Ot)=>{"use strict";var Ee=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 i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};Ot.exports=Ee});var N=E((Ho,qt)=>{"use strict";var ai=/\s+/g,he=class t{constructor(e,r){if(r=li(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof ge)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(ai," "),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(i=>!Ft(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&hi(i[0])){this.set=[i];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&&di)|(this.options.loose&&Ei))+":"+e,i=bt.get(s);if(i)return i;let n=this.options.loose,o=n?$[S.HYPHENRANGELOOSE]:$[S.HYPHENRANGE];e=e.replace(o,Li(this.options.includePrerelease)),I("hyphen replace",e),e=e.replace($[S.COMPARATORTRIM],pi),I("comparator trim",e),e=e.replace($[S.TILDETRIM],fi),I("tilde trim",e),e=e.replace($[S.CARETTRIM],mi),I("caret trim",e);let a=e.split(" ").map(u=>gi(u,this.options)).join(" ").split(/\s+/).map(u=>wi(u,this.options));n&&(a=a.filter(u=>(I("loose invalid filter",u,this.options),!!u.match($[S.COMPARATORLOOSE])))),I("range list",a);let c=new Map,l=a.map(u=>new ge(u,this.options));for(let u of l){if(Ft(u))return[u];c.set(u.value,u)}c.size>1&&c.has("")&&c.delete("");let m=[...c.values()];return bt.set(s,m),m}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Dt(s,r)&&e.set.some(i=>Dt(i,r)&&s.every(n=>i.every(o=>n.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new ui(e,this.options)}catch(r){return!1}for(let r=0;r<this.set.length;r++)if(yi(this.set[r],e,this.options))return!0;return!1}};qt.exports=he;var ci=Ct(),bt=new ci,li=W(),ge=U(),I=G(),ui=x(),{safeRe:$,t:S,comparatorTrimReplace:pi,tildeTrimReplace:fi,caretTrimReplace:mi}=F(),{FLAG_INCLUDE_PRERELEASE:di,FLAG_LOOSE:Ei}=k(),Ft=t=>t.value==="<0.0.0-0",hi=t=>t.value==="",Dt=(t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},gi=(t,e)=>(t=t.replace($[S.BUILD],""),I("comp",t,e),t=Si(t,e),I("caret",t),t=Ii(t,e),I("tildes",t),t=Ri(t,e),I("xrange",t),t=Ni(t,e),I("stars",t),t),R=t=>!t||t.toLowerCase()==="x"||t==="*",Ii=(t,e)=>t.trim().split(/\s+/).map(r=>xi(r,e)).join(" "),xi=(t,e)=>{let r=e.loose?$[S.TILDELOOSE]:$[S.TILDE];return t.replace(r,(s,i,n,o,a)=>{I("tilde",t,s,i,n,o,a);let c;return R(i)?c="":R(n)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:R(o)?c=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?(I("replaceTilde pr",a),c=`>=${i}.${n}.${o}-${a} <${i}.${+n+1}.0-0`):c=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,I("tilde return",c),c})},Si=(t,e)=>t.trim().split(/\s+/).map(r=>$i(r,e)).join(" "),$i=(t,e)=>{I("caret",t,e);let r=e.loose?$[S.CARETLOOSE]:$[S.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,o,a,c)=>{I("caret",t,i,n,o,a,c);let l;return R(n)?l="":R(o)?l=`>=${n}.0.0${s} <${+n+1}.0.0-0`:R(a)?n==="0"?l=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:c?(I("replaceCaret pr",c),n==="0"?o==="0"?l=`>=${n}.${o}.${a}-${c} <${n}.${o}.${+a+1}-0`:l=`>=${n}.${o}.${a}-${c} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.${a}-${c} <${+n+1}.0.0-0`):(I("no pr"),n==="0"?o==="0"?l=`>=${n}.${o}.${a}${s} <${n}.${o}.${+a+1}-0`:l=`>=${n}.${o}.${a}${s} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.${a} <${+n+1}.0.0-0`),I("caret return",l),l})},Ri=(t,e)=>(I("replaceXRanges",t,e),t.split(/\s+/).map(r=>Ai(r,e)).join(" ")),Ai=(t,e)=>{t=t.trim();let r=e.loose?$[S.XRANGELOOSE]:$[S.XRANGE];return t.replace(r,(s,i,n,o,a,c)=>{I("xRange",t,s,i,n,o,a,c);let l=R(n),m=l||R(o),u=m||R(a),g=u;return i==="="&&g&&(i=""),c=e.includePrerelease?"-0":"",l?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&g?(m&&(o=0),a=0,i===">"?(i=">=",m?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",m?n=+n+1:o=+o+1),i==="<"&&(c="-0"),s=`${i+n}.${o}.${a}${c}`):m?s=`>=${n}.0.0${c} <${+n+1}.0.0-0`:u&&(s=`>=${n}.${o}.0${c} <${n}.${+o+1}.0-0`),I("xRange return",s),s})},Ni=(t,e)=>(I("replaceStars",t,e),t.trim().replace($[S.STAR],"")),wi=(t,e)=>(I("replaceGTE0",t,e),t.trim().replace($[e.includePrerelease?S.GTE0PRE:S.GTE0],"")),Li=t=>(e,r,s,i,n,o,a,c,l,m,u,g)=>(R(s)?r="":R(i)?r=`>=${s}.0.0${t?"-0":""}`:R(n)?r=`>=${s}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,R(l)?c="":R(m)?c=`<${+l+1}.0.0-0`:R(u)?c=`<${l}.${+m+1}.0-0`:g?c=`<=${l}.${m}.${u}-${g}`:t?c=`<${l}.${m}.${+u+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),yi=(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(I(t[s].semver),t[s].semver!==ge.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var U=E((Wo,_t)=>{"use strict";var B=Symbol("SemVer ANY"),Se=class t{static get ANY(){return B}constructor(e,r){if(r=Pt(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),xe("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===B?this.value="":this.value=this.operator+this.semver.version,xe("comp",this)}parse(e){let r=this.options.loose?Vt[jt.COMPARATORLOOSE]:Vt[jt.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 kt(s[2],this.options.loose):this.semver=B}toString(){return this.value}test(e){if(xe("Comparator.test",e,this.options.loose),this.semver===B||e===B)return!0;if(typeof e=="string")try{e=new kt(e,this.options)}catch(r){return!1}return Ie(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 Gt(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Gt(this.value,r).test(e.semver):(r=Pt(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("=")||Ie(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Ie(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};_t.exports=Se;var Pt=W(),{safeRe:Vt,t:jt}=F(),Ie=de(),xe=G(),kt=x(),Gt=N()});var M=E((Yo,Ut)=>{"use strict";var Ti=N(),vi=(t,e,r)=>{try{e=new Ti(e,r)}catch(s){return!1}return e.test(t)};Ut.exports=vi});var Mt=E((zo,Bt)=>{"use strict";var Oi=N(),Ci=(t,e)=>new Oi(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Bt.exports=Ci});var Ht=E((Ko,Xt)=>{"use strict";var bi=x(),Fi=N(),Di=(t,e,r)=>{let s=null,i=null,n=null;try{n=new Fi(e,r)}catch(o){return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new bi(s,r))}),s};Xt.exports=Di});var Yt=E((Qo,Wt)=>{"use strict";var qi=x(),Pi=N(),Vi=(t,e,r)=>{let s=null,i=null,n=null;try{n=new Pi(e,r)}catch(o){return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new qi(s,r))}),s};Wt.exports=Vi});var Qt=E((Zo,Kt)=>{"use strict";var $e=x(),ji=N(),zt=_(),ki=(t,e)=>{t=new ji(t,e);let r=new $e("0.0.0");if(t.test(r)||(r=new $e("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(o=>{let a=new $e(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||zt(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!r||zt(r,n))&&(r=n)}return r&&t.test(r)?r:null};Kt.exports=ki});var Jt=E((Jo,Zt)=>{"use strict";var Gi=N(),_i=(t,e)=>{try{return new Gi(t,e).range||"*"}catch(r){return null}};Zt.exports=_i});var ie=E((ea,sr)=>{"use strict";var Ui=x(),rr=U(),{ANY:Bi}=rr,Mi=N(),Xi=M(),er=_(),tr=J(),Hi=te(),Wi=ee(),Yi=(t,e,r,s)=>{t=new Ui(t,s),e=new Mi(e,s);let i,n,o,a,c;switch(r){case">":i=er,n=Hi,o=tr,a=">",c=">=";break;case"<":i=tr,n=Wi,o=er,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Xi(t,e,s))return!1;for(let l=0;l<e.set.length;++l){let m=e.set[l],u=null,g=null;if(m.forEach(d=>{d.semver===Bi&&(d=new rr(">=0.0.0")),u=u||d,g=g||d,i(d.semver,u.semver,s)?u=d:o(d.semver,g.semver,s)&&(g=d)}),u.operator===a||u.operator===c||(!g.operator||g.operator===a)&&n(t,g.semver))return!1;if(g.operator===c&&o(t,g.semver))return!1}return!0};sr.exports=Yi});var nr=E((ta,ir)=>{"use strict";var zi=ie(),Ki=(t,e,r)=>zi(t,e,">",r);ir.exports=Ki});var ar=E((ra,or)=>{"use strict";var Qi=ie(),Zi=(t,e,r)=>Qi(t,e,"<",r);or.exports=Zi});var ur=E((sa,lr)=>{"use strict";var cr=N(),Ji=(t,e,r)=>(t=new cr(t,r),e=new cr(e,r),t.intersects(e,r));lr.exports=Ji});var fr=E((ia,pr)=>{"use strict";var en=M(),tn=A();pr.exports=(t,e,r)=>{let s=[],i=null,n=null,o=t.sort((m,u)=>tn(m,u,r));for(let m of o)en(m,e,r)?(n=m,i||(i=m)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[m,u]of s)m===u?a.push(m):!u&&m===o[0]?a.push("*"):u?m===o[0]?a.push(`<=${u}`):a.push(`${m} - ${u}`):a.push(`>=${m}`);let c=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return c.length<l.length?c:e}});var Ir=E((na,gr)=>{"use strict";var mr=N(),Ae=U(),{ANY:Re}=Ae,X=M(),Ne=A(),rn=(t,e,r={})=>{if(t===e)return!0;t=new mr(t,r),e=new mr(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let o=nn(i,n,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},sn=[new Ae(">=0.0.0-0")],dr=[new Ae(">=0.0.0")],nn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Re){if(e.length===1&&e[0].semver===Re)return!0;r.includePrerelease?t=sn:t=dr}if(e.length===1&&e[0].semver===Re){if(r.includePrerelease)return!0;e=dr}let s=new Set,i,n;for(let d of t)d.operator===">"||d.operator===">="?i=Er(i,d,r):d.operator==="<"||d.operator==="<="?n=hr(n,d,r):s.add(d.semver);if(s.size>1)return null;let o;if(i&&n){if(o=Ne(i.semver,n.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let d of s){if(i&&!X(d,String(i),r)||n&&!X(d,String(n),r))return null;for(let H of e)if(!X(d,String(H),r))return!1;return!0}let a,c,l,m,u=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,g=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;u&&u.prerelease.length===1&&n.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(let d of e){if(m=m||d.operator===">"||d.operator===">=",l=l||d.operator==="<"||d.operator==="<=",i){if(g&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===g.major&&d.semver.minor===g.minor&&d.semver.patch===g.patch&&(g=!1),d.operator===">"||d.operator===">="){if(a=Er(i,d,r),a===d&&a!==i)return!1}else if(i.operator===">="&&!X(i.semver,String(d),r))return!1}if(n){if(u&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===u.major&&d.semver.minor===u.minor&&d.semver.patch===u.patch&&(u=!1),d.operator==="<"||d.operator==="<="){if(c=hr(n,d,r),c===d&&c!==n)return!1}else if(n.operator==="<="&&!X(n.semver,String(d),r))return!1}if(!d.operator&&(n||i)&&o!==0)return!1}return!(i&&l&&!n&&o!==0||n&&m&&!i&&o!==0||g||u)},Er=(t,e,r)=>{if(!t)return e;let s=Ne(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},hr=(t,e,r)=>{if(!t)return e;let s=Ne(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};gr.exports=rn});var Rr=E((oa,$r)=>{"use strict";var we=F(),xr=k(),on=x(),Sr=le(),an=O(),cn=He(),ln=Ye(),un=Qe(),pn=et(),fn=rt(),mn=it(),dn=ot(),En=ct(),hn=A(),gn=ft(),In=dt(),xn=Z(),Sn=It(),$n=St(),Rn=_(),An=J(),Nn=fe(),wn=me(),Ln=ee(),yn=te(),Tn=de(),vn=vt(),On=U(),Cn=N(),bn=M(),Fn=Mt(),Dn=Ht(),qn=Yt(),Pn=Qt(),Vn=Jt(),jn=ie(),kn=nr(),Gn=ar(),_n=ur(),Un=fr(),Bn=Ir();$r.exports={parse:an,valid:cn,clean:ln,inc:un,diff:pn,major:fn,minor:mn,patch:dn,prerelease:En,compare:hn,rcompare:gn,compareLoose:In,compareBuild:xn,sort:Sn,rsort:$n,gt:Rn,lt:An,eq:Nn,neq:wn,gte:Ln,lte:yn,cmp:Tn,coerce:vn,Comparator:On,Range:Cn,satisfies:bn,toComparators:Fn,maxSatisfying:Dn,minSatisfying:qn,minVersion:Pn,validRange:Vn,outside:jn,gtr:kn,ltr:Gn,intersects:_n,simplifyRange:Un,subset:Bn,SemVer:on,re:we.re,src:we.src,tokens:we.t,SEMVER_SPEC_VERSION:xr.SEMVER_SPEC_VERSION,RELEASE_TYPES:xr.RELEASE_TYPES,compareIdentifiers:Sr.compareIdentifiers,rcompareIdentifiers:Sr.rcompareIdentifiers}});var Eo={};Xr(Eo,{ngUpdate:()=>mo});module.exports=Wr(Eo);var Vr=require("@angular-devkit/schematics/tasks/index.js");var Le=require("@angular-devkit/schematics"),q=Hr(Rr());var Ar=t=>JSON.stringify(t,null,2),ne=(t,e,r)=>{t.exists(e)?t.overwrite(e,r):t.create(e,r)};function ye(t,e){try{return JSON.parse(e.read(t).toString())}catch(r){throw new Le.SchematicsException(`Error when parsing ${t}: ${r.message}`)}}var D="^12.4.0",Nr=(t,e)=>{var n;if(!t.exists("package.json"))throw new Le.SchematicsException("Could not locate package.json");let r=ye("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(n=r.dependencies)!=null||(r.dependencies={}),r.dependencies.firebase=D,e.logger.info(`Added firebase ${D} to your package.json.`),ne(t,"package.json",Ar(r)),!0;let i=!1;for(let o of s){let a=r[o].firebase,c;try{c=(0,q.subset)(a,D)}catch(l){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 ${D}, the range @angular/fire requires; a version outside it can leave the install with two copies of the firebase SDK.`);continue}c||(r[o].firebase=D,e.logger.info(`Updated the firebase version in your package.json from ${a} to ${D}, 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.`),i=!0)}return i&&ne(t,"package.json",Ar(r)),i};var qr=require("path");var wr=require("path"),Lr=()=>{if(typeof require!="function")return;let t=[()=>require("typescript"),()=>require("module").createRequire((0,wr.join)(process.cwd(),"package.json"))("typescript")];for(let e of t)try{return e()}catch(r){}};var P=(t,e,r)=>{let s=[e];for(;s.length>0;){let i=s.pop();if(!i||r(i)===!1)continue;let n=[];t.forEachChild(i,o=>{n.push(o)});for(let o=n.length-1;o>=0;o--)s.push(n[o])}};var y={"@angular/fire/vertexai":"@angular/fire/ai","@angular/fire/vertexai-preview":"@angular/fire/ai","firebase/vertexai":"firebase/ai","firebase/vertexai-preview":"firebase/ai"},L={provideVertexAI:"provideAI",VertexAI:"AI",VertexAIError:"AIError",VertexAIErrorCode:"AIErrorCode",VertexAIModel:"AIModel",VertexAIInstances:"AIInstances",vertexAIInstance$:"AIInstance$",VertexAIModule:"AIModule"},V={VertexAIOptions:"the new AIOptions takes a backend instead of a location, rebuild the options by hand"},T="getVertexAI",C="getAI",v="VertexAIBackend",yr=new Set([...Object.keys(y),...Object.values(y)]);var Tr=(t,e)=>{let{sourceFile:r}=t,s={edits:[],renamedLocalBindings:new Map,namespaceBindings:new Set,editedSpecifierTokenStarts:new Set,vertexImports:[],vertexExportSpecifiers:[],shadowedImports:[],starExportPositions:[],removedSymbols:[]};for(let i of r.statements)Mn(i,t,s,e);return s},Mn=(t,e,r,s)=>{var u;let{compiler:i,sourceFile:n}=e,o=i.isImportDeclaration(t),a=i.isExportDeclaration(t);if(!o&&!a)return;let c=t.moduleSpecifier,l=c&&i.isStringLiteral(c)&&y[c.text];if(!l)return;if(a&&(!t.exportClause||i.isNamespaceExport(t.exportClause))){r.starExportPositions.push(t.getStart(n));return}r.edits.push({start:c.getStart(n)+1,end:c.getEnd()-1,replacement:l});let m=o?(u=t.importClause)==null?void 0:u.namedBindings:t.exportClause;if(m&&i.isNamespaceImport(m)){s.has(m.name.text)?r.shadowedImports.push({position:m.getStart(n),name:m.name.text}):r.namespaceBindings.add(m.name.text);return}if(m&&(i.isNamedImports(m)||i.isNamedExports(m)))for(let g of m.elements)Xn(g,t,e,r,s)},Xn=(t,e,r,s,i)=>{var m;let{compiler:n,sourceFile:o}=r,a=(m=t.propertyName)!=null?m:t.name;if(n.isImportSpecifier(t)&&i.has(t.name.text)){s.shadowedImports.push({position:t.getStart(o),name:t.name.text});return}if(a.text===T){n.isImportSpecifier(t)&&n.isImportDeclaration(e)?s.vertexImports.push({element:t,statement:e,localName:t.name.text}):n.isExportSpecifier(t)&&s.vertexExportSpecifiers.push(t);return}if(V[a.text]!==void 0){s.removedSymbols.push({position:a.getStart(o),name:a.text});return}let c=L[a.text];if(!c)return;let l=n.isExportSpecifier(t)&&!t.propertyName;s.edits.push({start:a.getStart(o),end:a.getEnd(),replacement:l?`${c} as ${a.text}`:c}),s.editedSpecifierTokenStarts.add(a.getStart(o)),n.isImportSpecifier(t)&&!t.propertyName&&s.renamedLocalBindings.set(t.name.text,c)},vr=(t,e,r,s)=>{let{compiler:i,sourceFile:n}=t,o={renamedNames:new Set(e.renamedLocalBindings.keys()),namespaceNames:e.namespaceBindings,vertexNames:new Set(r.keys())};P(i,n,a=>{let c=Zn(a,e.namespaceBindings,t);c&&e.edits.push(c);let l=Hn(a,e.namespaceBindings,t);if(l&&e.removedSymbols.push(l),Wn(a,e.namespaceBindings,t,s,o),i.isIdentifier(a)){Yn(a,r,t,s,o);let m=Jn(a,e,t);m&&e.edits.push(m)}})},Hn=(t,e,r)=>{let{compiler:s,sourceFile:i}=r;if(s.isPropertyAccessExpression(t)&&s.isIdentifier(t.expression)&&e.has(t.expression.text)&&V[t.name.text]!==void 0)return{position:t.name.getStart(i),name:t.name.text};if(s.isQualifiedName(t)&&s.isIdentifier(t.left)&&e.has(t.left.text)&&V[t.right.text]!==void 0)return{position:t.right.getStart(i),name:t.right.text}},Wn=(t,e,r,s,i)=>{let{compiler:n,sourceFile:o}=r;if(!n.isPropertyAccessExpression(t)||!n.isIdentifier(t.expression)||!e.has(t.expression.text)||t.name.text!==T)return;let a=t.parent;if(n.isCallExpression(a)&&a.expression===t){Or(a,{namespaceAccess:t},r,s,"namespace",i);return}s.unsupported.push({position:t.getStart(o),reason:`a use of ${t.expression.text}.getVertexAI that is not a direct call`,origin:"namespace"})},Yn=(t,e,r,s,i)=>{let{compiler:n,sourceFile:o}=r,a=e.get(t.text);if(!a||Te(r,t))return;let c=t.parent;if(n.isCallExpression(c)&&c.expression===t){Or(c,{binding:a},r,s,"binding",i);return}s.unsupported.push({position:t.getStart(o),reason:n.isExportSpecifier(c)?"a re-export of getVertexAI (rewriting it to getAI would silently change its callers' backend)":"a use of getVertexAI that is not a direct call (only direct calls can be rewritten safely)",origin:"binding"})},zn=(t,e,r)=>{let{compiler:s}=e;if(Te(e,t))return!1;if(r.renamedNames.has(t.text)||r.vertexNames.has(t.text))return!0;if(!r.namespaceNames.has(t.text))return!1;let i=t.parent;return s.isPropertyAccessExpression(i)&&i.expression===t?L[i.name.text]!==void 0||i.name.text===T:s.isQualifiedName(i)&&i.left===t?L[i.right.text]!==void 0:!1},Kn=(t,e,r)=>{let{compiler:s}=e,i=!1;return P(s,t,n=>{if(i)return!1;if(s.isIdentifier(n)&&zn(n,e,r))return i=!0,!1}),i},Qn=(t,e,r)=>{let{compiler:s,sourceFile:i}=e;if(!s.isObjectLiteralExpression(t))return{supported:!1};if(Kn(t,e,r))return{supported:!1,conflicting:!0};if(t.properties.length===0)return{supported:!0};let n=t.properties.length===1?t.properties[0]:void 0;return n&&s.isPropertyAssignment(n)&&s.isIdentifier(n.name)&&n.name.text==="location"?{supported:!0,locationText:n.initializer.getText(i)}:n&&s.isShorthandPropertyAssignment(n)&&n.name.text==="location"?{supported:!0,locationText:"location"}:{supported:!1}},Or=(t,e,r,s,i,n)=>{let{compiler:o,sourceFile:a}=r,c=t.arguments,l=c.some(o.isSpreadElement);if(c.length<=1&&!l){s.supportedCalls.push(oe({call:t},e));return}let m=!1;if(c.length===2&&!l){let u=Qn(c[1],r,n);if(u.supported){s.supportedCalls.push(be(oe({call:t},e),{locationText:u.locationText}));return}m=u.conflicting===!0}s.unsupported.push({position:t.getStart(a),reason:m?"a getVertexAI call whose options mention other symbols this migration rewrites (replacing both at once would conflict)":"a getVertexAI call whose arguments do not map onto getAI safely (only an optional app argument plus an optional literal `{ location }` object are rewritten)",origin:i})},Zn=(t,e,r)=>{let{compiler:s,sourceFile:i}=r;if(s.isPropertyAccessExpression(t)&&s.isIdentifier(t.expression)&&e.has(t.expression.text)&&L[t.name.text])return{start:t.name.getStart(i),end:t.name.getEnd(),replacement:L[t.name.text]};if(s.isQualifiedName(t)&&s.isIdentifier(t.left)&&e.has(t.left.text)&&L[t.right.text])return{start:t.right.getStart(i),end:t.right.getEnd(),replacement:L[t.right.text]}},Jn=(t,e,r)=>{let{compiler:s,sourceFile:i}=r,n=e.renamedLocalBindings.get(t.text);if(n===void 0)return;let o=t.getStart(i);if(e.editedSpecifierTokenStarts.has(o)||Te(r,t))return;let a=t.parent;if(s.isExportSpecifier(a)&&a.name===t&&!a.propertyName){let c=a.parent.parent;return s.isExportDeclaration(c)&&!c.moduleSpecifier?{start:o,end:t.getEnd(),replacement:`${n} as ${t.text}`}:void 0}return s.isShorthandPropertyAssignment(a)&&a.name===t?{start:t.getEnd(),end:t.getEnd(),replacement:`: ${n}`}:{start:o,end:t.getEnd(),replacement:n}},Te=(t,e)=>{let{compiler:r}=t,s=e.parent;return r.isImportSpecifier(s)&&(s.propertyName===e||s.name===e)||r.isBindingElement(s)&&(s.propertyName===e||s.name===e&&!s.propertyName)?!0:eo(t,e,s)},eo=(t,e,r)=>{let{compiler:s}=t,i=s.isPropertyAccessExpression(r)&&r.name===e||s.isQualifiedName(r)&&r.right===e,n=(s.isPropertyAssignment(r)||s.isPropertyDeclaration(r)||s.isPropertySignature(r)||s.isMethodDeclaration(r)||s.isGetAccessorDeclaration(r)||s.isSetAccessorDeclaration(r)||s.isEnumMember(r))&&r.name===e;return i||n};var to=t=>{let{compiler:e,sourceFile:r}=t,s=new Set;for(let i of r.statements)(e.isImportDeclaration(i)||e.isExportDeclaration(i))&&i.moduleSpecifier&&e.isStringLiteral(i.moduleSpecifier)&&y[i.moduleSpecifier.text]&&s.add(i);return s},ro=(t,e)=>{var i,n;let{compiler:r}=t,s=new Set;for(let o of e){if(!r.isImportDeclaration(o))continue;let a=(i=o.importClause)==null?void 0:i.namedBindings;if(a){if(r.isNamespaceImport(a)){s.add(a.name.text);continue}for(let c of a.elements){let l=((n=c.propertyName)!=null?n:c.name).text;(l===T||L[l]&&!c.propertyName)&&s.add(c.name.text)}}}return s},Cr=(t,e)=>{let{compiler:r}=t;if((r.isVariableDeclaration(e)||r.isParameter(e)||r.isBindingElement(e))&&r.isIdentifier(e.name)||(r.isFunctionDeclaration(e)||r.isFunctionExpression(e)||r.isClassDeclaration(e)||r.isClassExpression(e)||r.isInterfaceDeclaration(e)||r.isTypeAliasDeclaration(e)||r.isEnumDeclaration(e))&&e.name||r.isTypeParameterDeclaration(e)||r.isImportSpecifier(e)||r.isNamespaceImport(e)||r.isImportClause(e)&&e.name)return e.name.text},so=(t,e)=>{let{compiler:r}=t;if(!r.isImportSpecifier(e)||e.propertyName)return!1;let s=e;for(;s&&!r.isImportDeclaration(s);)s=s.parent;return!s||!r.isImportDeclaration(s)?!1:r.isStringLiteral(s.moduleSpecifier)&&yr.has(s.moduleSpecifier.text)},br=t=>{let{compiler:e,sourceFile:r}=t,s=to(t),i=ro(t,s),n=new Set;return i.size===0||P(e,r,o=>{if(s.has(o))return!1;let a=Cr(t,o);a&&i.has(a)&&n.add(a)}),n},Fr=t=>{let{compiler:e,sourceFile:r}=t,s=[];return P(e,r,i=>{let n=Cr(t,i);(n===C||n===v)&&!so(t,i)&&s.push({position:i.getStart(r),name:n})}),s};var Dr=(t,e,r,s)=>{let{sourceFile:i}=t,n=[],o=[],a=[],c=s.length>0&&e.vertexImports.length>0,l=r.unsupported.some(u=>u.origin==="binding")||c,m=new Set;for(let u of r.supportedCalls){if(u.binding&&l){a.push(u.call.getStart(i));continue}let g=u.namespaceAccess?`${u.namespaceAccess.expression.getText(i)}.${v}`:v;if(u.binding&&(m.add(u.binding.statement),u.binding.localName===T)){let d=u.call.expression;n.push({start:d.getStart(i),end:d.getEnd(),replacement:C})}if(u.namespaceAccess){let d=u.namespaceAccess.name;n.push({start:d.getStart(i),end:d.getEnd(),replacement:C})}n.push(...no(u,t,g)),o.push(u.call.getStart(i))}if(!l){let u=io(t),g=u.has(v);for(let d of e.vertexImports){let H=m.has(d.statement)&&!g;n.push(...oo(d,H,u.has(C),t)),H&&(g=!0)}}return{edits:n,callPositions:o,blockedCallPositions:a,injectionBlocked:c}},io=t=>{let{compiler:e,sourceFile:r}=t,s=new Set;for(let i of r.statements){if(!e.isImportDeclaration(i)||!i.importClause)continue;i.importClause.name&&s.add(i.importClause.name.text);let n=i.importClause.namedBindings;if(n)if(e.isNamespaceImport(n))s.add(n.name.text);else for(let o of n.elements)s.add(o.name.text)}return s},no=(t,e,r)=>{var a;let{sourceFile:s}=e,i=`{ backend: new ${r}(${(a=t.locationText)!=null?a:""}) }`,n=t.call.arguments;if(n.length===0)return[{start:t.call.getEnd()-1,end:t.call.getEnd()-1,replacement:`undefined, ${i}`}];if(n.length===1){let c=n[0];return[{start:c.getEnd(),end:c.getEnd(),replacement:`, ${i}`}]}let o=n[1];return[{start:o.getStart(s),end:o.getEnd(),replacement:i}]},oo=(t,e,r,s)=>{var u,g;let{compiler:i,sourceFile:n}=s,o=[],a=(u=t.statement.importClause)==null?void 0:u.namedBindings;if(!a||!i.isNamedImports(a))return o;let c=a.elements,l=t.element,m=(g=l.propertyName)!=null?g:l.name;if(!l.propertyName&&r){if(e)return[{start:l.getStart(n),end:l.getEnd(),replacement:v}];if(c.length===1)return[{start:l.getStart(n),end:l.getEnd(),replacement:""}];let d=c.indexOf(l);return d>0?[{start:c[d-1].getEnd(),end:l.getEnd(),replacement:""}]:[{start:l.getStart(n),end:c[1].getStart(n),replacement:""}]}return o.push({start:m.getStart(n),end:m.getEnd(),replacement:C}),e&&o.push({start:l.getEnd(),end:l.getEnd(),replacement:`, ${v}`}),o};var b="see the AngularFire v21 upgrade guide (docs/version-21-upgrade.md)",ao=t=>{let{sourceFile:e}=t,r=Tr(t,br(t)),s=new Map;for(let a of r.vertexImports)s.set(a.localName,a);let i={supportedCalls:[],unsupported:[]};(r.renamedLocalBindings.size>0||r.namespaceBindings.size>0||s.size>0)&&vr(t,r,s,i);for(let a of r.vertexExportSpecifiers)i.unsupported.push({position:a.getStart(e),reason:"a re-export of getVertexAI (rewriting it to getAI would silently change its callers' backend)",origin:"export"});let n=r.vertexImports.length>0?Fr(t):[],o=Dr(t,r,i,n);return{edits:r.edits.concat(o.edits),vertexCallPositions:o.callPositions,blockedCallPositions:o.blockedCallPositions,unsupportedVertexUsages:i.unsupported,shadowedImports:r.shadowedImports,injectionConflicts:o.injectionBlocked?n:[],starExportPositions:r.starExportPositions,removedSymbols:r.removedSymbols}},co=t=>[...t.vertexCallPositions.map(e=>({level:"info",position:e,text:"rewrote getVertexAI(...) to getAI(..., { backend: new VertexAIBackend(...) }) to keep the call on the Vertex AI backend"})),...t.unsupportedVertexUsages.map(e=>({level:"warn",position:e.position,text:`left ${e.reason}. Plain getAI() uses the Gemini Developer API backend, NOT Vertex AI. Migrate this site by hand, ${b}`})),...t.shadowedImports.map(e=>({level:"warn",position:e.position,text:`left the \`${e.name}\` import name and its usages unrenamed: this file also declares a local named \`${e.name}\`, and name-based rewriting cannot tell the two apart. The import path itself still moves to the new entry point, so the leftover name fails to compile there. Migrate this file by hand, ${b}`})),...t.injectionConflicts.map(e=>({level:"warn",position:e.position,text:`\`${e.name}\` is already bound here from a source other than AI Logic, so the backend-preserving rewrite cannot inject or reuse it. The file's getVertexAI code was left as is, and its import path still moves to the new entry point, so the leftover getVertexAI fails to compile there. Migrate it by hand, ${b}`})),...t.blockedCallPositions.map(e=>({level:"warn",position:e,text:t.injectionConflicts.length>0?"left a rewritable getVertexAI call unrewritten because this file binds getAI or VertexAIBackend from another source (see that warning). Every use of the file's named getVertexAI imports is kept together so the pieces stay consistent, migrate them by hand":"left a rewritable getVertexAI call unrewritten because another getVertexAI use in this file cannot be rewritten (see its own warning). Every use of the file's named getVertexAI imports is kept together so the pieces stay consistent, migrate them by hand"})),...t.starExportPositions.map(e=>({level:"warn",position:e,text:`left \`export *\` from an old Vertex AI entry point unmigrated: rewriting it would silently rename this file's re-exported public symbols. Re-export what you need by name from '@angular/fire/ai' instead, ${b}`})),...t.removedSymbols.map(e=>({level:"warn",position:e.position,text:`left \`${e.name}\`, which no longer exists in the new entry point (${V[e.name]}). The leftover name fails to compile, migrate it by hand, ${b}`}))],lo=(t,e,r,s,i)=>{let n={compiler:r,sourceFile:r.createSourceFile(s,i,r.ScriptTarget.Latest,!0)},o=n.sourceFile;if(o.parseDiagnostics&&o.parseDiagnostics.length>0)return e.logger.warn(`${s}: skipped, the file has syntax errors, so the Vertex AI -> AI Logic rewrite cannot run on it safely. Fix the syntax and re-run ng update, or migrate it by hand, ${b}`),!1;let a=ao(n);for(let l of co(a)){let m=n.sourceFile.getLineAndCharacterOfPosition(l.position).line+1;e.logger[l.level](`${s}:${m}: ${l.text}`)}if(a.edits.length===0)return!1;let c;try{c=uo(i,a.edits)}catch(l){return e.logger.warn(`${s}: the Vertex AI -> AI Logic rewrite was skipped for this file (${l}). Migrate it by hand, ${b}`),!1}return c===i?!1:(ne(t,s,c),!0)},uo=(t,e)=>{let r=e.slice().sort((s,i)=>i.start-s.start||i.end-s.end);for(let s=1;s<r.length;s++)if(r[s].end>r[s-1].start)throw new Error(`conflicting rewrite edits at offsets ${r[s].start} and ${r[s-1].start}`);return r.reduce((s,i)=>s.slice(0,i.start)+i.replacement+s.slice(i.end),t)},po=t=>Object.values(t.projects).map(e=>(e==null?void 0:e.sourceRoot)||(e==null?void 0:e.root)).filter(e=>typeof e=="string").map(e=>{let r=qr.posix.join("/",e);return r==="/"?r:r.replace(/\/+$/,"")}),fo=(t,e)=>t.endsWith(".ts")&&!t.endsWith(".d.ts")&&!t.split("/").includes("node_modules")&&e.some(r=>r==="/"||t===r||t.startsWith(r+"/")),Pr=(t,e,r)=>{let s=r!=null?r:Lr(),i=t.exists("angular.json")&&ye("angular.json",t);if(!(i!=null&&i.projects))return!1;let n=po(i);if(n.length===0)return!1;let o=!1;return t.visit(a=>{var l;if(!fo(a,n))return;let c=(l=t.read(a))==null?void 0:l.toString();if(!(!c||!Object.keys(y).some(m=>c.includes(m)))){if(!s){e.logger.warn(`${a} imports a removed Vertex AI entry point, but the Vertex AI -> AI Logic rewrite was skipped: the \`typescript\` package could not be resolved (it is an optional peer dependency of @angular/fire). Install typescript and re-run, or migrate by hand - see the v21 upgrade guide (docs/version-21-upgrade.md).`);return}o=lo(t,e,s,a,c)||o}}),o};var mo=t=>(e,r)=>{Nr(e,r)&&r.addTask(new Vr.NodePackageInstallTask);try{Pr(e,r,t==null?void 0:t.compiler)}catch(s){r.logger.warn(`Skipped the Vertex AI -> AI Logic source rewrite: ${s}. Any remaining @angular/fire/vertexai imports need a manual migration - see the v21 upgrade guide (docs/version-21-upgrade.md).`)}return e};0&&(module.exports={ngUpdate});
|
|
1
|
+
var jr=Object.create;var j=Object.defineProperty,kr=Object.defineProperties,Gr=Object.getOwnPropertyDescriptor,_r=Object.getOwnPropertyDescriptors,Ur=Object.getOwnPropertyNames,Te=Object.getOwnPropertySymbols,Br=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable;var Oe=(t,e,r)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,oe=(t,e)=>{for(var r in e||(e={}))Ce.call(e,r)&&Oe(t,r,e[r]);if(Te)for(var r of Te(e))Mr.call(e,r)&&Oe(t,r,e[r]);return t},be=(t,e)=>kr(t,_r(e));var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Xr=(t,e)=>{for(var r in e)j(t,r,{get:e[r],enumerable:!0})},Fe=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ur(e))!Ce.call(t,i)&&i!==r&&j(t,i,{get:()=>e[i],enumerable:!(s=Gr(e,i))||s.enumerable});return t};var Hr=(t,e,r)=>(r=t!=null?jr(Br(t)):{},Fe(e||!t||!t.__esModule?j(r,"default",{value:t,enumerable:!0}):r,t)),Wr=t=>Fe(j({},"__esModule",{value:!0}),t);var k=E((go,De)=>{"use strict";var Yr="2.0.0",zr=Number.MAX_SAFE_INTEGER||9007199254740991,Kr=16,Qr=250,Zr=["major","premajor","minor","preminor","patch","prepatch","prerelease"];De.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Kr,MAX_SAFE_BUILD_LENGTH:Qr,MAX_SAFE_INTEGER:zr,RELEASE_TYPES:Zr,SEMVER_SPEC_VERSION:Yr,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var G=E((Io,qe)=>{"use strict";var Jr=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};qe.exports=Jr});var F=E((w,Pe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ae,MAX_SAFE_BUILD_LENGTH:es,MAX_LENGTH:ts}=k(),rs=G();w=Pe.exports={};var ss=w.re=[],is=w.safeRe=[],p=w.src=[],ns=w.safeSrc=[],f=w.t={},os=0,ce="[a-zA-Z0-9-]",as=[["\\s",1],["\\d",ts],[ce,es]],cs=t=>{for(let[e,r]of as)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},h=(t,e,r)=>{let s=cs(e),i=os++;rs(t,i,e),f[t]=i,p[i]=e,ns[i]=s,ss[i]=new RegExp(e,r?"g":void 0),is[i]=new RegExp(s,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*");h("NUMERICIDENTIFIERLOOSE","\\d+");h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ce}*`);h("MAINVERSION",`(${p[f.NUMERICIDENTIFIER]})\\.(${p[f.NUMERICIDENTIFIER]})\\.(${p[f.NUMERICIDENTIFIER]})`);h("MAINVERSIONLOOSE",`(${p[f.NUMERICIDENTIFIERLOOSE]})\\.(${p[f.NUMERICIDENTIFIERLOOSE]})\\.(${p[f.NUMERICIDENTIFIERLOOSE]})`);h("PRERELEASEIDENTIFIER",`(?:${p[f.NONNUMERICIDENTIFIER]}|${p[f.NUMERICIDENTIFIER]})`);h("PRERELEASEIDENTIFIERLOOSE",`(?:${p[f.NONNUMERICIDENTIFIER]}|${p[f.NUMERICIDENTIFIERLOOSE]})`);h("PRERELEASE",`(?:-(${p[f.PRERELEASEIDENTIFIER]}(?:\\.${p[f.PRERELEASEIDENTIFIER]})*))`);h("PRERELEASELOOSE",`(?:-?(${p[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[f.PRERELEASEIDENTIFIERLOOSE]})*))`);h("BUILDIDENTIFIER",`${ce}+`);h("BUILD",`(?:\\+(${p[f.BUILDIDENTIFIER]}(?:\\.${p[f.BUILDIDENTIFIER]})*))`);h("FULLPLAIN",`v?${p[f.MAINVERSION]}${p[f.PRERELEASE]}?${p[f.BUILD]}?`);h("FULL",`^${p[f.FULLPLAIN]}$`);h("LOOSEPLAIN",`[v=\\s]*${p[f.MAINVERSIONLOOSE]}${p[f.PRERELEASELOOSE]}?${p[f.BUILD]}?`);h("LOOSE",`^${p[f.LOOSEPLAIN]}$`);h("GTLT","((?:<|>)?=?)");h("XRANGEIDENTIFIERLOOSE",`${p[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);h("XRANGEIDENTIFIER",`${p[f.NUMERICIDENTIFIER]}|x|X|\\*`);h("XRANGEPLAIN",`[v=\\s]*(${p[f.XRANGEIDENTIFIER]})(?:\\.(${p[f.XRANGEIDENTIFIER]})(?:\\.(${p[f.XRANGEIDENTIFIER]})(?:${p[f.PRERELEASE]})?${p[f.BUILD]}?)?)?`);h("XRANGEPLAINLOOSE",`[v=\\s]*(${p[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[f.XRANGEIDENTIFIERLOOSE]})(?:${p[f.PRERELEASELOOSE]})?${p[f.BUILD]}?)?)?`);h("XRANGE",`^${p[f.GTLT]}\\s*${p[f.XRANGEPLAIN]}$`);h("XRANGELOOSE",`^${p[f.GTLT]}\\s*${p[f.XRANGEPLAINLOOSE]}$`);h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ae}})(?:\\.(\\d{1,${ae}}))?(?:\\.(\\d{1,${ae}}))?`);h("COERCE",`${p[f.COERCEPLAIN]}(?:$|[^\\d])`);h("COERCEFULL",p[f.COERCEPLAIN]+`(?:${p[f.PRERELEASE]})?(?:${p[f.BUILD]})?(?:$|[^\\d])`);h("COERCERTL",p[f.COERCE],!0);h("COERCERTLFULL",p[f.COERCEFULL],!0);h("LONETILDE","(?:~>?)");h("TILDETRIM",`(\\s*)${p[f.LONETILDE]}\\s+`,!0);w.tildeTrimReplace="$1~";h("TILDE",`^${p[f.LONETILDE]}${p[f.XRANGEPLAIN]}$`);h("TILDELOOSE",`^${p[f.LONETILDE]}${p[f.XRANGEPLAINLOOSE]}$`);h("LONECARET","(?:\\^)");h("CARETTRIM",`(\\s*)${p[f.LONECARET]}\\s+`,!0);w.caretTrimReplace="$1^";h("CARET",`^${p[f.LONECARET]}${p[f.XRANGEPLAIN]}$`);h("CARETLOOSE",`^${p[f.LONECARET]}${p[f.XRANGEPLAINLOOSE]}$`);h("COMPARATORLOOSE",`^${p[f.GTLT]}\\s*(${p[f.LOOSEPLAIN]})$|^$`);h("COMPARATOR",`^${p[f.GTLT]}\\s*(${p[f.FULLPLAIN]})$|^$`);h("COMPARATORTRIM",`(\\s*)${p[f.GTLT]}\\s*(${p[f.LOOSEPLAIN]}|${p[f.XRANGEPLAIN]})`,!0);w.comparatorTrimReplace="$1$2$3";h("HYPHENRANGE",`^\\s*(${p[f.XRANGEPLAIN]})\\s+-\\s+(${p[f.XRANGEPLAIN]})\\s*$`);h("HYPHENRANGELOOSE",`^\\s*(${p[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[f.XRANGEPLAINLOOSE]})\\s*$`);h("STAR","(<|>)?=?\\s*\\*");h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var W=E((xo,Ve)=>{"use strict";var ls=Object.freeze({loose:!0}),us=Object.freeze({}),ps=t=>t?typeof t!="object"?ls:t:us;Ve.exports=ps});var le=E((So,Ge)=>{"use strict";var je=/^[0-9]+$/,ke=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=je.test(t),s=je.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},fs=(t,e)=>ke(e,t);Ge.exports={compareIdentifiers:ke,rcompareIdentifiers:fs}});var x=E(($o,Ue)=>{"use strict";var Y=G(),{MAX_LENGTH:_e,MAX_SAFE_INTEGER:z}=k(),{safeRe:K,t:Q}=F(),ms=W(),{compareIdentifiers:ue}=le(),pe=class t{constructor(e,r){if(r=ms(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>_e)throw new TypeError(`version is longer than ${_e} characters`);Y("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?K[Q.LOOSE]:K[Q.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>z||this.major<0)throw new TypeError("Invalid major version");if(this.minor>z||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>z||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<z)return n}return i}):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(Y("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],i=e.prerelease[r];if(Y("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return ue(s,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],i=e.build[r];if(Y("build compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return ue(s,i)}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 i=`-${r}`.match(this.options.loose?K[Q.PRERELEASELOOSE]:K[Q.PRERELEASE]);if(!i||i[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 i=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let n=[r,i];s===!1&&(n=[r]),ue(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Ue.exports=pe});var O=E((Ro,Me)=>{"use strict";var Be=x(),ds=(t,e,r=!1)=>{if(t instanceof Be)return t;try{return new Be(t,e)}catch(s){if(!r)return null;throw s}};Me.exports=ds});var He=E((Ao,Xe)=>{"use strict";var Es=O(),hs=(t,e)=>{let r=Es(t,e);return r?r.version:null};Xe.exports=hs});var Ye=E((No,We)=>{"use strict";var gs=O(),Is=(t,e)=>{let r=gs(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};We.exports=Is});var Qe=E((wo,Ke)=>{"use strict";var ze=x(),xs=(t,e,r,s,i)=>{typeof r=="string"&&(i=s,s=r,r=void 0);try{return new ze(t instanceof ze?t.version:t,r).inc(e,s,i).version}catch(n){return null}};Ke.exports=xs});var et=E((Lo,Je)=>{"use strict";var Ze=O(),Ss=(t,e)=>{let r=Ze(t,null,!0),s=Ze(e,null,!0),i=r.compare(s);if(i===0)return null;let n=i>0,o=n?r:s,a=n?s:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let m=c?"pre":"";return r.major!==s.major?m+"major":r.minor!==s.minor?m+"minor":r.patch!==s.patch?m+"patch":"prerelease"};Je.exports=Ss});var rt=E((yo,tt)=>{"use strict";var $s=x(),Rs=(t,e)=>new $s(t,e).major;tt.exports=Rs});var it=E((vo,st)=>{"use strict";var As=x(),Ns=(t,e)=>new As(t,e).minor;st.exports=Ns});var ot=E((To,nt)=>{"use strict";var ws=x(),Ls=(t,e)=>new ws(t,e).patch;nt.exports=Ls});var ct=E((Oo,at)=>{"use strict";var ys=O(),vs=(t,e)=>{let r=ys(t,e);return r&&r.prerelease.length?r.prerelease:null};at.exports=vs});var A=E((Co,ut)=>{"use strict";var lt=x(),Ts=(t,e,r)=>new lt(t,r).compare(new lt(e,r));ut.exports=Ts});var ft=E((bo,pt)=>{"use strict";var Os=A(),Cs=(t,e,r)=>Os(e,t,r);pt.exports=Cs});var dt=E((Fo,mt)=>{"use strict";var bs=A(),Fs=(t,e)=>bs(t,e,!0);mt.exports=Fs});var Z=E((Do,ht)=>{"use strict";var Et=x(),Ds=(t,e,r)=>{let s=new Et(t,r),i=new Et(e,r);return s.compare(i)||s.compareBuild(i)};ht.exports=Ds});var It=E((qo,gt)=>{"use strict";var qs=Z(),Ps=(t,e)=>t.sort((r,s)=>qs(r,s,e));gt.exports=Ps});var St=E((Po,xt)=>{"use strict";var Vs=Z(),js=(t,e)=>t.sort((r,s)=>Vs(s,r,e));xt.exports=js});var _=E((Vo,$t)=>{"use strict";var ks=A(),Gs=(t,e,r)=>ks(t,e,r)>0;$t.exports=Gs});var J=E((jo,Rt)=>{"use strict";var _s=A(),Us=(t,e,r)=>_s(t,e,r)<0;Rt.exports=Us});var fe=E((ko,At)=>{"use strict";var Bs=A(),Ms=(t,e,r)=>Bs(t,e,r)===0;At.exports=Ms});var me=E((Go,Nt)=>{"use strict";var Xs=A(),Hs=(t,e,r)=>Xs(t,e,r)!==0;Nt.exports=Hs});var ee=E((_o,wt)=>{"use strict";var Ws=A(),Ys=(t,e,r)=>Ws(t,e,r)>=0;wt.exports=Ys});var te=E((Uo,Lt)=>{"use strict";var zs=A(),Ks=(t,e,r)=>zs(t,e,r)<=0;Lt.exports=Ks});var de=E((Bo,yt)=>{"use strict";var Qs=fe(),Zs=me(),Js=_(),ei=ee(),ti=J(),ri=te(),si=(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 Qs(t,r,s);case"!=":return Zs(t,r,s);case">":return Js(t,r,s);case">=":return ei(t,r,s);case"<":return ti(t,r,s);case"<=":return ri(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};yt.exports=si});var Tt=E((Mo,vt)=>{"use strict";var ii=x(),ni=O(),{safeRe:re,t:se}=F(),oi=(t,e)=>{if(t instanceof ii)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?re[se.COERCEFULL]:re[se.COERCE]);else{let c=e.includePrerelease?re[se.COERCERTLFULL]:re[se.COERCERTL],l;for(;(l=c.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||l.index+l[0].length!==r.index+r[0].length)&&(r=l),c.lastIndex=l.index+l[1].length+l[2].length;c.lastIndex=-1}if(r===null)return null;let s=r[2],i=r[3]||"0",n=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return ni(`${s}.${i}.${n}${o}${a}`,e)};vt.exports=oi});var Ct=E((Xo,Ot)=>{"use strict";var Ee=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 i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};Ot.exports=Ee});var N=E((Ho,qt)=>{"use strict";var ai=/\s+/g,he=class t{constructor(e,r){if(r=li(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof ge)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(ai," "),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(i=>!Ft(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&hi(i[0])){this.set=[i];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&&di)|(this.options.loose&&Ei))+":"+e,i=bt.get(s);if(i)return i;let n=this.options.loose,o=n?$[S.HYPHENRANGELOOSE]:$[S.HYPHENRANGE];e=e.replace(o,Li(this.options.includePrerelease)),I("hyphen replace",e),e=e.replace($[S.COMPARATORTRIM],pi),I("comparator trim",e),e=e.replace($[S.TILDETRIM],fi),I("tilde trim",e),e=e.replace($[S.CARETTRIM],mi),I("caret trim",e);let a=e.split(" ").map(u=>gi(u,this.options)).join(" ").split(/\s+/).map(u=>wi(u,this.options));n&&(a=a.filter(u=>(I("loose invalid filter",u,this.options),!!u.match($[S.COMPARATORLOOSE])))),I("range list",a);let c=new Map,l=a.map(u=>new ge(u,this.options));for(let u of l){if(Ft(u))return[u];c.set(u.value,u)}c.size>1&&c.has("")&&c.delete("");let m=[...c.values()];return bt.set(s,m),m}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Dt(s,r)&&e.set.some(i=>Dt(i,r)&&s.every(n=>i.every(o=>n.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new ui(e,this.options)}catch(r){return!1}for(let r=0;r<this.set.length;r++)if(yi(this.set[r],e,this.options))return!0;return!1}};qt.exports=he;var ci=Ct(),bt=new ci,li=W(),ge=U(),I=G(),ui=x(),{safeRe:$,t:S,comparatorTrimReplace:pi,tildeTrimReplace:fi,caretTrimReplace:mi}=F(),{FLAG_INCLUDE_PRERELEASE:di,FLAG_LOOSE:Ei}=k(),Ft=t=>t.value==="<0.0.0-0",hi=t=>t.value==="",Dt=(t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},gi=(t,e)=>(t=t.replace($[S.BUILD],""),I("comp",t,e),t=Si(t,e),I("caret",t),t=Ii(t,e),I("tildes",t),t=Ri(t,e),I("xrange",t),t=Ni(t,e),I("stars",t),t),R=t=>!t||t.toLowerCase()==="x"||t==="*",Ii=(t,e)=>t.trim().split(/\s+/).map(r=>xi(r,e)).join(" "),xi=(t,e)=>{let r=e.loose?$[S.TILDELOOSE]:$[S.TILDE];return t.replace(r,(s,i,n,o,a)=>{I("tilde",t,s,i,n,o,a);let c;return R(i)?c="":R(n)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:R(o)?c=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?(I("replaceTilde pr",a),c=`>=${i}.${n}.${o}-${a} <${i}.${+n+1}.0-0`):c=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,I("tilde return",c),c})},Si=(t,e)=>t.trim().split(/\s+/).map(r=>$i(r,e)).join(" "),$i=(t,e)=>{I("caret",t,e);let r=e.loose?$[S.CARETLOOSE]:$[S.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,o,a,c)=>{I("caret",t,i,n,o,a,c);let l;return R(n)?l="":R(o)?l=`>=${n}.0.0${s} <${+n+1}.0.0-0`:R(a)?n==="0"?l=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:c?(I("replaceCaret pr",c),n==="0"?o==="0"?l=`>=${n}.${o}.${a}-${c} <${n}.${o}.${+a+1}-0`:l=`>=${n}.${o}.${a}-${c} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.${a}-${c} <${+n+1}.0.0-0`):(I("no pr"),n==="0"?o==="0"?l=`>=${n}.${o}.${a}${s} <${n}.${o}.${+a+1}-0`:l=`>=${n}.${o}.${a}${s} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.${a} <${+n+1}.0.0-0`),I("caret return",l),l})},Ri=(t,e)=>(I("replaceXRanges",t,e),t.split(/\s+/).map(r=>Ai(r,e)).join(" ")),Ai=(t,e)=>{t=t.trim();let r=e.loose?$[S.XRANGELOOSE]:$[S.XRANGE];return t.replace(r,(s,i,n,o,a,c)=>{I("xRange",t,s,i,n,o,a,c);let l=R(n),m=l||R(o),u=m||R(a),g=u;return i==="="&&g&&(i=""),c=e.includePrerelease?"-0":"",l?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&g?(m&&(o=0),a=0,i===">"?(i=">=",m?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",m?n=+n+1:o=+o+1),i==="<"&&(c="-0"),s=`${i+n}.${o}.${a}${c}`):m?s=`>=${n}.0.0${c} <${+n+1}.0.0-0`:u&&(s=`>=${n}.${o}.0${c} <${n}.${+o+1}.0-0`),I("xRange return",s),s})},Ni=(t,e)=>(I("replaceStars",t,e),t.trim().replace($[S.STAR],"")),wi=(t,e)=>(I("replaceGTE0",t,e),t.trim().replace($[e.includePrerelease?S.GTE0PRE:S.GTE0],"")),Li=t=>(e,r,s,i,n,o,a,c,l,m,u,g)=>(R(s)?r="":R(i)?r=`>=${s}.0.0${t?"-0":""}`:R(n)?r=`>=${s}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,R(l)?c="":R(m)?c=`<${+l+1}.0.0-0`:R(u)?c=`<${l}.${+m+1}.0-0`:g?c=`<=${l}.${m}.${u}-${g}`:t?c=`<${l}.${m}.${+u+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),yi=(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(I(t[s].semver),t[s].semver!==ge.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var U=E((Wo,_t)=>{"use strict";var B=Symbol("SemVer ANY"),Se=class t{static get ANY(){return B}constructor(e,r){if(r=Pt(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),xe("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===B?this.value="":this.value=this.operator+this.semver.version,xe("comp",this)}parse(e){let r=this.options.loose?Vt[jt.COMPARATORLOOSE]:Vt[jt.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 kt(s[2],this.options.loose):this.semver=B}toString(){return this.value}test(e){if(xe("Comparator.test",e,this.options.loose),this.semver===B||e===B)return!0;if(typeof e=="string")try{e=new kt(e,this.options)}catch(r){return!1}return Ie(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 Gt(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Gt(this.value,r).test(e.semver):(r=Pt(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("=")||Ie(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Ie(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};_t.exports=Se;var Pt=W(),{safeRe:Vt,t:jt}=F(),Ie=de(),xe=G(),kt=x(),Gt=N()});var M=E((Yo,Ut)=>{"use strict";var vi=N(),Ti=(t,e,r)=>{try{e=new vi(e,r)}catch(s){return!1}return e.test(t)};Ut.exports=Ti});var Mt=E((zo,Bt)=>{"use strict";var Oi=N(),Ci=(t,e)=>new Oi(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Bt.exports=Ci});var Ht=E((Ko,Xt)=>{"use strict";var bi=x(),Fi=N(),Di=(t,e,r)=>{let s=null,i=null,n=null;try{n=new Fi(e,r)}catch(o){return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new bi(s,r))}),s};Xt.exports=Di});var Yt=E((Qo,Wt)=>{"use strict";var qi=x(),Pi=N(),Vi=(t,e,r)=>{let s=null,i=null,n=null;try{n=new Pi(e,r)}catch(o){return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new qi(s,r))}),s};Wt.exports=Vi});var Qt=E((Zo,Kt)=>{"use strict";var $e=x(),ji=N(),zt=_(),ki=(t,e)=>{t=new ji(t,e);let r=new $e("0.0.0");if(t.test(r)||(r=new $e("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(o=>{let a=new $e(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||zt(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!r||zt(r,n))&&(r=n)}return r&&t.test(r)?r:null};Kt.exports=ki});var Jt=E((Jo,Zt)=>{"use strict";var Gi=N(),_i=(t,e)=>{try{return new Gi(t,e).range||"*"}catch(r){return null}};Zt.exports=_i});var ie=E((ea,sr)=>{"use strict";var Ui=x(),rr=U(),{ANY:Bi}=rr,Mi=N(),Xi=M(),er=_(),tr=J(),Hi=te(),Wi=ee(),Yi=(t,e,r,s)=>{t=new Ui(t,s),e=new Mi(e,s);let i,n,o,a,c;switch(r){case">":i=er,n=Hi,o=tr,a=">",c=">=";break;case"<":i=tr,n=Wi,o=er,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Xi(t,e,s))return!1;for(let l=0;l<e.set.length;++l){let m=e.set[l],u=null,g=null;if(m.forEach(d=>{d.semver===Bi&&(d=new rr(">=0.0.0")),u=u||d,g=g||d,i(d.semver,u.semver,s)?u=d:o(d.semver,g.semver,s)&&(g=d)}),u.operator===a||u.operator===c||(!g.operator||g.operator===a)&&n(t,g.semver))return!1;if(g.operator===c&&o(t,g.semver))return!1}return!0};sr.exports=Yi});var nr=E((ta,ir)=>{"use strict";var zi=ie(),Ki=(t,e,r)=>zi(t,e,">",r);ir.exports=Ki});var ar=E((ra,or)=>{"use strict";var Qi=ie(),Zi=(t,e,r)=>Qi(t,e,"<",r);or.exports=Zi});var ur=E((sa,lr)=>{"use strict";var cr=N(),Ji=(t,e,r)=>(t=new cr(t,r),e=new cr(e,r),t.intersects(e,r));lr.exports=Ji});var fr=E((ia,pr)=>{"use strict";var en=M(),tn=A();pr.exports=(t,e,r)=>{let s=[],i=null,n=null,o=t.sort((m,u)=>tn(m,u,r));for(let m of o)en(m,e,r)?(n=m,i||(i=m)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[m,u]of s)m===u?a.push(m):!u&&m===o[0]?a.push("*"):u?m===o[0]?a.push(`<=${u}`):a.push(`${m} - ${u}`):a.push(`>=${m}`);let c=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return c.length<l.length?c:e}});var Ir=E((na,gr)=>{"use strict";var mr=N(),Ae=U(),{ANY:Re}=Ae,X=M(),Ne=A(),rn=(t,e,r={})=>{if(t===e)return!0;t=new mr(t,r),e=new mr(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let o=nn(i,n,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},sn=[new Ae(">=0.0.0-0")],dr=[new Ae(">=0.0.0")],nn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Re){if(e.length===1&&e[0].semver===Re)return!0;r.includePrerelease?t=sn:t=dr}if(e.length===1&&e[0].semver===Re){if(r.includePrerelease)return!0;e=dr}let s=new Set,i,n;for(let d of t)d.operator===">"||d.operator===">="?i=Er(i,d,r):d.operator==="<"||d.operator==="<="?n=hr(n,d,r):s.add(d.semver);if(s.size>1)return null;let o;if(i&&n){if(o=Ne(i.semver,n.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let d of s){if(i&&!X(d,String(i),r)||n&&!X(d,String(n),r))return null;for(let H of e)if(!X(d,String(H),r))return!1;return!0}let a,c,l,m,u=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,g=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;u&&u.prerelease.length===1&&n.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(let d of e){if(m=m||d.operator===">"||d.operator===">=",l=l||d.operator==="<"||d.operator==="<=",i){if(g&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===g.major&&d.semver.minor===g.minor&&d.semver.patch===g.patch&&(g=!1),d.operator===">"||d.operator===">="){if(a=Er(i,d,r),a===d&&a!==i)return!1}else if(i.operator===">="&&!X(i.semver,String(d),r))return!1}if(n){if(u&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===u.major&&d.semver.minor===u.minor&&d.semver.patch===u.patch&&(u=!1),d.operator==="<"||d.operator==="<="){if(c=hr(n,d,r),c===d&&c!==n)return!1}else if(n.operator==="<="&&!X(n.semver,String(d),r))return!1}if(!d.operator&&(n||i)&&o!==0)return!1}return!(i&&l&&!n&&o!==0||n&&m&&!i&&o!==0||g||u)},Er=(t,e,r)=>{if(!t)return e;let s=Ne(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},hr=(t,e,r)=>{if(!t)return e;let s=Ne(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};gr.exports=rn});var Rr=E((oa,$r)=>{"use strict";var we=F(),xr=k(),on=x(),Sr=le(),an=O(),cn=He(),ln=Ye(),un=Qe(),pn=et(),fn=rt(),mn=it(),dn=ot(),En=ct(),hn=A(),gn=ft(),In=dt(),xn=Z(),Sn=It(),$n=St(),Rn=_(),An=J(),Nn=fe(),wn=me(),Ln=ee(),yn=te(),vn=de(),Tn=Tt(),On=U(),Cn=N(),bn=M(),Fn=Mt(),Dn=Ht(),qn=Yt(),Pn=Qt(),Vn=Jt(),jn=ie(),kn=nr(),Gn=ar(),_n=ur(),Un=fr(),Bn=Ir();$r.exports={parse:an,valid:cn,clean:ln,inc:un,diff:pn,major:fn,minor:mn,patch:dn,prerelease:En,compare:hn,rcompare:gn,compareLoose:In,compareBuild:xn,sort:Sn,rsort:$n,gt:Rn,lt:An,eq:Nn,neq:wn,gte:Ln,lte:yn,cmp:vn,coerce:Tn,Comparator:On,Range:Cn,satisfies:bn,toComparators:Fn,maxSatisfying:Dn,minSatisfying:qn,minVersion:Pn,validRange:Vn,outside:jn,gtr:kn,ltr:Gn,intersects:_n,simplifyRange:Un,subset:Bn,SemVer:on,re:we.re,src:we.src,tokens:we.t,SEMVER_SPEC_VERSION:xr.SEMVER_SPEC_VERSION,RELEASE_TYPES:xr.RELEASE_TYPES,compareIdentifiers:Sr.compareIdentifiers,rcompareIdentifiers:Sr.rcompareIdentifiers}});var Eo={};Xr(Eo,{ngUpdate:()=>mo});module.exports=Wr(Eo);var Vr=require("@angular-devkit/schematics/tasks/index.js");var Le=require("@angular-devkit/schematics"),q=Hr(Rr());var Ar=t=>JSON.stringify(t,null,2),ne=(t,e,r)=>{t.exists(e)?t.overwrite(e,r):t.create(e,r)};function ye(t,e){try{return JSON.parse(e.read(t).toString())}catch(r){throw new Le.SchematicsException(`Error when parsing ${t}: ${r.message}`)}}var D="^12.4.0",Nr=(t,e)=>{var n;if(!t.exists("package.json"))throw new Le.SchematicsException("Could not locate package.json");let r=ye("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(n=r.dependencies)!=null||(r.dependencies={}),r.dependencies.firebase=D,e.logger.info(`Added firebase ${D} to your package.json.`),ne(t,"package.json",Ar(r)),!0;let i=!1;for(let o of s){let a=r[o].firebase,c;try{c=(0,q.subset)(a,D)}catch(l){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 ${D}, the range @angular/fire requires; a version outside it can leave the install with two copies of the firebase SDK.`);continue}c||(r[o].firebase=D,e.logger.info(`Updated the firebase version in your package.json from ${a} to ${D}, 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.`),i=!0)}return i&&ne(t,"package.json",Ar(r)),i};var qr=require("path");var wr=require("path"),Lr=()=>{if(typeof require!="function")return;let t=[()=>require("typescript"),()=>require("module").createRequire((0,wr.join)(process.cwd(),"package.json"))("typescript")];for(let e of t)try{return e()}catch(r){}};var P=(t,e,r)=>{let s=[e];for(;s.length>0;){let i=s.pop();if(!i||r(i)===!1)continue;let n=[];t.forEachChild(i,o=>{n.push(o)});for(let o=n.length-1;o>=0;o--)s.push(n[o])}};var y={"@angular/fire/vertexai":"@angular/fire/ai","@angular/fire/vertexai-preview":"@angular/fire/ai","firebase/vertexai":"firebase/ai","firebase/vertexai-preview":"firebase/ai"},L={provideVertexAI:"provideAI",VertexAI:"AI",VertexAIError:"AIError",VertexAIErrorCode:"AIErrorCode",VertexAIModel:"AIModel",VertexAIInstances:"AIInstances",vertexAIInstance$:"AIInstance$",VertexAIModule:"AIModule"},V={VertexAIOptions:"the new AIOptions takes a backend instead of a location, rebuild the options by hand",getImagenModel:"the Imagen models were shut down in August 2026 and firebase 12.18 removed the API, move image generation to the Gemini image models through getGenerativeModel"},v="getVertexAI",C="getAI",T="VertexAIBackend",yr=new Set([...Object.keys(y),...Object.values(y)]);var vr=(t,e)=>{let{sourceFile:r}=t,s={edits:[],renamedLocalBindings:new Map,namespaceBindings:new Set,editedSpecifierTokenStarts:new Set,vertexImports:[],vertexExportSpecifiers:[],shadowedImports:[],starExportPositions:[],removedSymbols:[]};for(let i of r.statements)Mn(i,t,s,e);return s},Mn=(t,e,r,s)=>{var u;let{compiler:i,sourceFile:n}=e,o=i.isImportDeclaration(t),a=i.isExportDeclaration(t);if(!o&&!a)return;let c=t.moduleSpecifier,l=c&&i.isStringLiteral(c)&&y[c.text];if(!l)return;if(a&&(!t.exportClause||i.isNamespaceExport(t.exportClause))){r.starExportPositions.push(t.getStart(n));return}r.edits.push({start:c.getStart(n)+1,end:c.getEnd()-1,replacement:l});let m=o?(u=t.importClause)==null?void 0:u.namedBindings:t.exportClause;if(m&&i.isNamespaceImport(m)){s.has(m.name.text)?r.shadowedImports.push({position:m.getStart(n),name:m.name.text}):r.namespaceBindings.add(m.name.text);return}if(m&&(i.isNamedImports(m)||i.isNamedExports(m)))for(let g of m.elements)Xn(g,t,e,r,s)},Xn=(t,e,r,s,i)=>{var m;let{compiler:n,sourceFile:o}=r,a=(m=t.propertyName)!=null?m:t.name;if(n.isImportSpecifier(t)&&i.has(t.name.text)){s.shadowedImports.push({position:t.getStart(o),name:t.name.text});return}if(a.text===v){n.isImportSpecifier(t)&&n.isImportDeclaration(e)?s.vertexImports.push({element:t,statement:e,localName:t.name.text}):n.isExportSpecifier(t)&&s.vertexExportSpecifiers.push(t);return}if(V[a.text]!==void 0){s.removedSymbols.push({position:a.getStart(o),name:a.text});return}let c=L[a.text];if(!c)return;let l=n.isExportSpecifier(t)&&!t.propertyName;s.edits.push({start:a.getStart(o),end:a.getEnd(),replacement:l?`${c} as ${a.text}`:c}),s.editedSpecifierTokenStarts.add(a.getStart(o)),n.isImportSpecifier(t)&&!t.propertyName&&s.renamedLocalBindings.set(t.name.text,c)},Tr=(t,e,r,s)=>{let{compiler:i,sourceFile:n}=t,o={renamedNames:new Set(e.renamedLocalBindings.keys()),namespaceNames:e.namespaceBindings,vertexNames:new Set(r.keys())};P(i,n,a=>{let c=Zn(a,e.namespaceBindings,t);c&&e.edits.push(c);let l=Hn(a,e.namespaceBindings,t);if(l&&e.removedSymbols.push(l),Wn(a,e.namespaceBindings,t,s,o),i.isIdentifier(a)){Yn(a,r,t,s,o);let m=Jn(a,e,t);m&&e.edits.push(m)}})},Hn=(t,e,r)=>{let{compiler:s,sourceFile:i}=r;if(s.isPropertyAccessExpression(t)&&s.isIdentifier(t.expression)&&e.has(t.expression.text)&&V[t.name.text]!==void 0)return{position:t.name.getStart(i),name:t.name.text};if(s.isQualifiedName(t)&&s.isIdentifier(t.left)&&e.has(t.left.text)&&V[t.right.text]!==void 0)return{position:t.right.getStart(i),name:t.right.text}},Wn=(t,e,r,s,i)=>{let{compiler:n,sourceFile:o}=r;if(!n.isPropertyAccessExpression(t)||!n.isIdentifier(t.expression)||!e.has(t.expression.text)||t.name.text!==v)return;let a=t.parent;if(n.isCallExpression(a)&&a.expression===t){Or(a,{namespaceAccess:t},r,s,"namespace",i);return}s.unsupported.push({position:t.getStart(o),reason:`a use of ${t.expression.text}.getVertexAI that is not a direct call`,origin:"namespace"})},Yn=(t,e,r,s,i)=>{let{compiler:n,sourceFile:o}=r,a=e.get(t.text);if(!a||ve(r,t))return;let c=t.parent;if(n.isCallExpression(c)&&c.expression===t){Or(c,{binding:a},r,s,"binding",i);return}s.unsupported.push({position:t.getStart(o),reason:n.isExportSpecifier(c)?"a re-export of getVertexAI (rewriting it to getAI would silently change its callers' backend)":"a use of getVertexAI that is not a direct call (only direct calls can be rewritten safely)",origin:"binding"})},zn=(t,e,r)=>{let{compiler:s}=e;if(ve(e,t))return!1;if(r.renamedNames.has(t.text)||r.vertexNames.has(t.text))return!0;if(!r.namespaceNames.has(t.text))return!1;let i=t.parent;return s.isPropertyAccessExpression(i)&&i.expression===t?L[i.name.text]!==void 0||i.name.text===v:s.isQualifiedName(i)&&i.left===t?L[i.right.text]!==void 0:!1},Kn=(t,e,r)=>{let{compiler:s}=e,i=!1;return P(s,t,n=>{if(i)return!1;if(s.isIdentifier(n)&&zn(n,e,r))return i=!0,!1}),i},Qn=(t,e,r)=>{let{compiler:s,sourceFile:i}=e;if(!s.isObjectLiteralExpression(t))return{supported:!1};if(Kn(t,e,r))return{supported:!1,conflicting:!0};if(t.properties.length===0)return{supported:!0};let n=t.properties.length===1?t.properties[0]:void 0;return n&&s.isPropertyAssignment(n)&&s.isIdentifier(n.name)&&n.name.text==="location"?{supported:!0,locationText:n.initializer.getText(i)}:n&&s.isShorthandPropertyAssignment(n)&&n.name.text==="location"?{supported:!0,locationText:"location"}:{supported:!1}},Or=(t,e,r,s,i,n)=>{let{compiler:o,sourceFile:a}=r,c=t.arguments,l=c.some(o.isSpreadElement);if(c.length<=1&&!l){s.supportedCalls.push(oe({call:t},e));return}let m=!1;if(c.length===2&&!l){let u=Qn(c[1],r,n);if(u.supported){s.supportedCalls.push(be(oe({call:t},e),{locationText:u.locationText}));return}m=u.conflicting===!0}s.unsupported.push({position:t.getStart(a),reason:m?"a getVertexAI call whose options mention other symbols this migration rewrites (replacing both at once would conflict)":"a getVertexAI call whose arguments do not map onto getAI safely (only an optional app argument plus an optional literal `{ location }` object are rewritten)",origin:i})},Zn=(t,e,r)=>{let{compiler:s,sourceFile:i}=r;if(s.isPropertyAccessExpression(t)&&s.isIdentifier(t.expression)&&e.has(t.expression.text)&&L[t.name.text])return{start:t.name.getStart(i),end:t.name.getEnd(),replacement:L[t.name.text]};if(s.isQualifiedName(t)&&s.isIdentifier(t.left)&&e.has(t.left.text)&&L[t.right.text])return{start:t.right.getStart(i),end:t.right.getEnd(),replacement:L[t.right.text]}},Jn=(t,e,r)=>{let{compiler:s,sourceFile:i}=r,n=e.renamedLocalBindings.get(t.text);if(n===void 0)return;let o=t.getStart(i);if(e.editedSpecifierTokenStarts.has(o)||ve(r,t))return;let a=t.parent;if(s.isExportSpecifier(a)&&a.name===t&&!a.propertyName){let c=a.parent.parent;return s.isExportDeclaration(c)&&!c.moduleSpecifier?{start:o,end:t.getEnd(),replacement:`${n} as ${t.text}`}:void 0}return s.isShorthandPropertyAssignment(a)&&a.name===t?{start:t.getEnd(),end:t.getEnd(),replacement:`: ${n}`}:{start:o,end:t.getEnd(),replacement:n}},ve=(t,e)=>{let{compiler:r}=t,s=e.parent;return r.isImportSpecifier(s)&&(s.propertyName===e||s.name===e)||r.isBindingElement(s)&&(s.propertyName===e||s.name===e&&!s.propertyName)?!0:eo(t,e,s)},eo=(t,e,r)=>{let{compiler:s}=t,i=s.isPropertyAccessExpression(r)&&r.name===e||s.isQualifiedName(r)&&r.right===e,n=(s.isPropertyAssignment(r)||s.isPropertyDeclaration(r)||s.isPropertySignature(r)||s.isMethodDeclaration(r)||s.isGetAccessorDeclaration(r)||s.isSetAccessorDeclaration(r)||s.isEnumMember(r))&&r.name===e;return i||n};var to=t=>{let{compiler:e,sourceFile:r}=t,s=new Set;for(let i of r.statements)(e.isImportDeclaration(i)||e.isExportDeclaration(i))&&i.moduleSpecifier&&e.isStringLiteral(i.moduleSpecifier)&&y[i.moduleSpecifier.text]&&s.add(i);return s},ro=(t,e)=>{var i,n;let{compiler:r}=t,s=new Set;for(let o of e){if(!r.isImportDeclaration(o))continue;let a=(i=o.importClause)==null?void 0:i.namedBindings;if(a){if(r.isNamespaceImport(a)){s.add(a.name.text);continue}for(let c of a.elements){let l=((n=c.propertyName)!=null?n:c.name).text;(l===v||L[l]&&!c.propertyName)&&s.add(c.name.text)}}}return s},Cr=(t,e)=>{let{compiler:r}=t;if((r.isVariableDeclaration(e)||r.isParameter(e)||r.isBindingElement(e))&&r.isIdentifier(e.name)||(r.isFunctionDeclaration(e)||r.isFunctionExpression(e)||r.isClassDeclaration(e)||r.isClassExpression(e)||r.isInterfaceDeclaration(e)||r.isTypeAliasDeclaration(e)||r.isEnumDeclaration(e))&&e.name||r.isTypeParameterDeclaration(e)||r.isImportSpecifier(e)||r.isNamespaceImport(e)||r.isImportClause(e)&&e.name)return e.name.text},so=(t,e)=>{let{compiler:r}=t;if(!r.isImportSpecifier(e)||e.propertyName)return!1;let s=e;for(;s&&!r.isImportDeclaration(s);)s=s.parent;return!s||!r.isImportDeclaration(s)?!1:r.isStringLiteral(s.moduleSpecifier)&&yr.has(s.moduleSpecifier.text)},br=t=>{let{compiler:e,sourceFile:r}=t,s=to(t),i=ro(t,s),n=new Set;return i.size===0||P(e,r,o=>{if(s.has(o))return!1;let a=Cr(t,o);a&&i.has(a)&&n.add(a)}),n},Fr=t=>{let{compiler:e,sourceFile:r}=t,s=[];return P(e,r,i=>{let n=Cr(t,i);(n===C||n===T)&&!so(t,i)&&s.push({position:i.getStart(r),name:n})}),s};var Dr=(t,e,r,s)=>{let{sourceFile:i}=t,n=[],o=[],a=[],c=s.length>0&&e.vertexImports.length>0,l=r.unsupported.some(u=>u.origin==="binding")||c,m=new Set;for(let u of r.supportedCalls){if(u.binding&&l){a.push(u.call.getStart(i));continue}let g=u.namespaceAccess?`${u.namespaceAccess.expression.getText(i)}.${T}`:T;if(u.binding&&(m.add(u.binding.statement),u.binding.localName===v)){let d=u.call.expression;n.push({start:d.getStart(i),end:d.getEnd(),replacement:C})}if(u.namespaceAccess){let d=u.namespaceAccess.name;n.push({start:d.getStart(i),end:d.getEnd(),replacement:C})}n.push(...no(u,t,g)),o.push(u.call.getStart(i))}if(!l){let u=io(t),g=u.has(T);for(let d of e.vertexImports){let H=m.has(d.statement)&&!g;n.push(...oo(d,H,u.has(C),t)),H&&(g=!0)}}return{edits:n,callPositions:o,blockedCallPositions:a,injectionBlocked:c}},io=t=>{let{compiler:e,sourceFile:r}=t,s=new Set;for(let i of r.statements){if(!e.isImportDeclaration(i)||!i.importClause)continue;i.importClause.name&&s.add(i.importClause.name.text);let n=i.importClause.namedBindings;if(n)if(e.isNamespaceImport(n))s.add(n.name.text);else for(let o of n.elements)s.add(o.name.text)}return s},no=(t,e,r)=>{var a;let{sourceFile:s}=e,i=`{ backend: new ${r}(${(a=t.locationText)!=null?a:""}) }`,n=t.call.arguments;if(n.length===0)return[{start:t.call.getEnd()-1,end:t.call.getEnd()-1,replacement:`undefined, ${i}`}];if(n.length===1){let c=n[0];return[{start:c.getEnd(),end:c.getEnd(),replacement:`, ${i}`}]}let o=n[1];return[{start:o.getStart(s),end:o.getEnd(),replacement:i}]},oo=(t,e,r,s)=>{var u,g;let{compiler:i,sourceFile:n}=s,o=[],a=(u=t.statement.importClause)==null?void 0:u.namedBindings;if(!a||!i.isNamedImports(a))return o;let c=a.elements,l=t.element,m=(g=l.propertyName)!=null?g:l.name;if(!l.propertyName&&r){if(e)return[{start:l.getStart(n),end:l.getEnd(),replacement:T}];if(c.length===1)return[{start:l.getStart(n),end:l.getEnd(),replacement:""}];let d=c.indexOf(l);return d>0?[{start:c[d-1].getEnd(),end:l.getEnd(),replacement:""}]:[{start:l.getStart(n),end:c[1].getStart(n),replacement:""}]}return o.push({start:m.getStart(n),end:m.getEnd(),replacement:C}),e&&o.push({start:l.getEnd(),end:l.getEnd(),replacement:`, ${T}`}),o};var b="see the AngularFire v21 upgrade guide (docs/version-21-upgrade.md)",ao=t=>{let{sourceFile:e}=t,r=vr(t,br(t)),s=new Map;for(let a of r.vertexImports)s.set(a.localName,a);let i={supportedCalls:[],unsupported:[]};(r.renamedLocalBindings.size>0||r.namespaceBindings.size>0||s.size>0)&&Tr(t,r,s,i);for(let a of r.vertexExportSpecifiers)i.unsupported.push({position:a.getStart(e),reason:"a re-export of getVertexAI (rewriting it to getAI would silently change its callers' backend)",origin:"export"});let n=r.vertexImports.length>0?Fr(t):[],o=Dr(t,r,i,n);return{edits:r.edits.concat(o.edits),vertexCallPositions:o.callPositions,blockedCallPositions:o.blockedCallPositions,unsupportedVertexUsages:i.unsupported,shadowedImports:r.shadowedImports,injectionConflicts:o.injectionBlocked?n:[],starExportPositions:r.starExportPositions,removedSymbols:r.removedSymbols}},co=t=>[...t.vertexCallPositions.map(e=>({level:"info",position:e,text:"rewrote getVertexAI(...) to getAI(..., { backend: new VertexAIBackend(...) }) to keep the call on the Vertex AI backend"})),...t.unsupportedVertexUsages.map(e=>({level:"warn",position:e.position,text:`left ${e.reason}. Plain getAI() uses the Gemini Developer API backend, NOT Vertex AI. Migrate this site by hand, ${b}`})),...t.shadowedImports.map(e=>({level:"warn",position:e.position,text:`left the \`${e.name}\` import name and its usages unrenamed: this file also declares a local named \`${e.name}\`, and name-based rewriting cannot tell the two apart. The import path itself still moves to the new entry point, so the leftover name fails to compile there. Migrate this file by hand, ${b}`})),...t.injectionConflicts.map(e=>({level:"warn",position:e.position,text:`\`${e.name}\` is already bound here from a source other than AI Logic, so the backend-preserving rewrite cannot inject or reuse it. The file's getVertexAI code was left as is, and its import path still moves to the new entry point, so the leftover getVertexAI fails to compile there. Migrate it by hand, ${b}`})),...t.blockedCallPositions.map(e=>({level:"warn",position:e,text:t.injectionConflicts.length>0?"left a rewritable getVertexAI call unrewritten because this file binds getAI or VertexAIBackend from another source (see that warning). Every use of the file's named getVertexAI imports is kept together so the pieces stay consistent, migrate them by hand":"left a rewritable getVertexAI call unrewritten because another getVertexAI use in this file cannot be rewritten (see its own warning). Every use of the file's named getVertexAI imports is kept together so the pieces stay consistent, migrate them by hand"})),...t.starExportPositions.map(e=>({level:"warn",position:e,text:`left \`export *\` from an old Vertex AI entry point unmigrated: rewriting it would silently rename this file's re-exported public symbols. Re-export what you need by name from '@angular/fire/ai' instead, ${b}`})),...t.removedSymbols.map(e=>({level:"warn",position:e.position,text:`left \`${e.name}\`, which no longer exists in the new entry point (${V[e.name]}). The leftover name fails to compile, migrate it by hand, ${b}`}))],lo=(t,e,r,s,i)=>{let n={compiler:r,sourceFile:r.createSourceFile(s,i,r.ScriptTarget.Latest,!0)},o=n.sourceFile;if(o.parseDiagnostics&&o.parseDiagnostics.length>0)return e.logger.warn(`${s}: skipped, the file has syntax errors, so the Vertex AI -> AI Logic rewrite cannot run on it safely. Fix the syntax and re-run ng update, or migrate it by hand, ${b}`),!1;let a=ao(n);for(let l of co(a)){let m=n.sourceFile.getLineAndCharacterOfPosition(l.position).line+1;e.logger[l.level](`${s}:${m}: ${l.text}`)}if(a.edits.length===0)return!1;let c;try{c=uo(i,a.edits)}catch(l){return e.logger.warn(`${s}: the Vertex AI -> AI Logic rewrite was skipped for this file (${l}). Migrate it by hand, ${b}`),!1}return c===i?!1:(ne(t,s,c),!0)},uo=(t,e)=>{let r=e.slice().sort((s,i)=>i.start-s.start||i.end-s.end);for(let s=1;s<r.length;s++)if(r[s].end>r[s-1].start)throw new Error(`conflicting rewrite edits at offsets ${r[s].start} and ${r[s-1].start}`);return r.reduce((s,i)=>s.slice(0,i.start)+i.replacement+s.slice(i.end),t)},po=t=>Object.values(t.projects).map(e=>(e==null?void 0:e.sourceRoot)||(e==null?void 0:e.root)).filter(e=>typeof e=="string").map(e=>{let r=qr.posix.join("/",e);return r==="/"?r:r.replace(/\/+$/,"")}),fo=(t,e)=>t.endsWith(".ts")&&!t.endsWith(".d.ts")&&!t.split("/").includes("node_modules")&&e.some(r=>r==="/"||t===r||t.startsWith(r+"/")),Pr=(t,e,r)=>{let s=r!=null?r:Lr(),i=t.exists("angular.json")&&ye("angular.json",t);if(!(i!=null&&i.projects))return!1;let n=po(i);if(n.length===0)return!1;let o=!1;return t.visit(a=>{var l;if(!fo(a,n))return;let c=(l=t.read(a))==null?void 0:l.toString();if(!(!c||!Object.keys(y).some(m=>c.includes(m)))){if(!s){e.logger.warn(`${a} imports a removed Vertex AI entry point, but the Vertex AI -> AI Logic rewrite was skipped: the \`typescript\` package could not be resolved (it is an optional peer dependency of @angular/fire). Install typescript and re-run, or migrate by hand - see the v21 upgrade guide (docs/version-21-upgrade.md).`);return}o=lo(t,e,s,a,c)||o}}),o};var mo=t=>(e,r)=>{Nr(e,r)&&r.addTask(new Vr.NodePackageInstallTask);try{Pr(e,r,t==null?void 0:t.compiler)}catch(s){r.logger.warn(`Skipped the Vertex AI -> AI Logic source rewrite: ${s}. Any remaining @angular/fire/vertexai imports need a manual migration - see the v21 upgrade guide (docs/version-21-upgrade.md).`)}return e};0&&(module.exports={ngUpdate});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
|
-
import { AI as AI$1, getAI as getAI$1, getGenerativeModel as getGenerativeModel$1,
|
|
2
|
+
import { AI as AI$1, getAI as getAI$1, getGenerativeModel as getGenerativeModel$1, getLiveGenerativeModel as getLiveGenerativeModel$1, startAudioConversation as startAudioConversation$1 } from 'firebase/ai';
|
|
3
3
|
export * from 'firebase/ai';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { Injector, EnvironmentProviders } from '@angular/core';
|
|
@@ -26,8 +26,7 @@ declare function provideAI(fn: (injector: Injector) => AI$1, ...deps: any[]): En
|
|
|
26
26
|
|
|
27
27
|
declare const getAI: typeof getAI$1;
|
|
28
28
|
declare const getGenerativeModel: typeof getGenerativeModel$1;
|
|
29
|
-
declare const getImagenModel: typeof getImagenModel$1;
|
|
30
29
|
declare const getLiveGenerativeModel: typeof getLiveGenerativeModel$1;
|
|
31
30
|
declare const startAudioConversation: typeof startAudioConversation$1;
|
|
32
31
|
|
|
33
|
-
export { AI, AIInstance$, AIInstances, AIModule, getAI, getGenerativeModel,
|
|
32
|
+
export { AI, AIInstance$, AIInstances, AIModule, getAI, getGenerativeModel, getLiveGenerativeModel, provideAI, startAudioConversation };
|