jest-preset-angular 14.2.1 → 14.2.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Qv=Object.create;var Ao=Object.defineProperty;var Jv=Object.getOwnPropertyDescriptor;var Zv=Object.getOwnPropertyNames;var eE=Object.getPrototypeOf,tE=Object.prototype.hasOwnProperty;var nE=(t,e)=>()=>(t&&(e=t(t=0)),e);var G=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),rE=(t,e)=>{for(var n in e)Ao(t,n,{get:e[n],enumerable:!0})},Yp=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Zv(e))!tE.call(t,s)&&s!==n&&Ao(t,s,{get:()=>e[s],enumerable:!(r=Jv(e,s))||r.enumerable});return t};var x=(t,e,n)=>(n=t!=null?Qv(eE(t)):{},Yp(e||!t||!t.__esModule?Ao(n,"default",{value:t,enumerable:!0}):n,t)),sE=t=>Yp(Ao({},"__esModule",{value:!0}),t);var P,S=nE(()=>{"use strict";P=require("url").pathToFileURL(__filename)});var Eo=G((c2,Wg)=>{S();var l_="2.0.0",c_=Number.MAX_SAFE_INTEGER||9007199254740991,u_=16,p_=250,h_=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Wg.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:u_,MAX_SAFE_BUILD_LENGTH:p_,MAX_SAFE_INTEGER:c_,RELEASE_TYPES:h_,SEMVER_SPEC_VERSION:l_,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var So=G((p2,jg)=>{S();var f_=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};jg.exports=f_});var ei=G((zn,Kg)=>{S();var{MAX_SAFE_COMPONENT_LENGTH:Ep,MAX_SAFE_BUILD_LENGTH:d_,MAX_LENGTH:m_}=Eo(),g_=So();zn=Kg.exports={};var y_=zn.re=[],v_=zn.safeRe=[],R=zn.src=[],k=zn.t={},E_=0,Sp="[a-zA-Z0-9-]",S_=[["\\s",1],["\\d",m_],[Sp,d_]],w_=t=>{for(let[e,n]of S_)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},X=(t,e,n)=>{let r=w_(e),s=E_++;g_(t,s,e),k[t]=s,R[s]=e,y_[s]=new RegExp(e,n?"g":void 0),v_[s]=new RegExp(r,n?"g":void 0)};X("NUMERICIDENTIFIER","0|[1-9]\\d*");X("NUMERICIDENTIFIERLOOSE","\\d+");X("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Sp}*`);X("MAINVERSION",`(${R[k.NUMERICIDENTIFIER]})\\.(${R[k.NUMERICIDENTIFIER]})\\.(${R[k.NUMERICIDENTIFIER]})`);X("MAINVERSIONLOOSE",`(${R[k.NUMERICIDENTIFIERLOOSE]})\\.(${R[k.NUMERICIDENTIFIERLOOSE]})\\.(${R[k.NUMERICIDENTIFIERLOOSE]})`);X("PRERELEASEIDENTIFIER",`(?:${R[k.NUMERICIDENTIFIER]}|${R[k.NONNUMERICIDENTIFIER]})`);X("PRERELEASEIDENTIFIERLOOSE",`(?:${R[k.NUMERICIDENTIFIERLOOSE]}|${R[k.NONNUMERICIDENTIFIER]})`);X("PRERELEASE",`(?:-(${R[k.PRERELEASEIDENTIFIER]}(?:\\.${R[k.PRERELEASEIDENTIFIER]})*))`);X("PRERELEASELOOSE",`(?:-?(${R[k.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${R[k.PRERELEASEIDENTIFIERLOOSE]})*))`);X("BUILDIDENTIFIER",`${Sp}+`);X("BUILD",`(?:\\+(${R[k.BUILDIDENTIFIER]}(?:\\.${R[k.BUILDIDENTIFIER]})*))`);X("FULLPLAIN",`v?${R[k.MAINVERSION]}${R[k.PRERELEASE]}?${R[k.BUILD]}?`);X("FULL",`^${R[k.FULLPLAIN]}$`);X("LOOSEPLAIN",`[v=\\s]*${R[k.MAINVERSIONLOOSE]}${R[k.PRERELEASELOOSE]}?${R[k.BUILD]}?`);X("LOOSE",`^${R[k.LOOSEPLAIN]}$`);X("GTLT","((?:<|>)?=?)");X("XRANGEIDENTIFIERLOOSE",`${R[k.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);X("XRANGEIDENTIFIER",`${R[k.NUMERICIDENTIFIER]}|x|X|\\*`);X("XRANGEPLAIN",`[v=\\s]*(${R[k.XRANGEIDENTIFIER]})(?:\\.(${R[k.XRANGEIDENTIFIER]})(?:\\.(${R[k.XRANGEIDENTIFIER]})(?:${R[k.PRERELEASE]})?${R[k.BUILD]}?)?)?`);X("XRANGEPLAINLOOSE",`[v=\\s]*(${R[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[k.XRANGEIDENTIFIERLOOSE]})(?:${R[k.PRERELEASELOOSE]})?${R[k.BUILD]}?)?)?`);X("XRANGE",`^${R[k.GTLT]}\\s*${R[k.XRANGEPLAIN]}$`);X("XRANGELOOSE",`^${R[k.GTLT]}\\s*${R[k.XRANGEPLAINLOOSE]}$`);X("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Ep}})(?:\\.(\\d{1,${Ep}}))?(?:\\.(\\d{1,${Ep}}))?`);X("COERCE",`${R[k.COERCEPLAIN]}(?:$|[^\\d])`);X("COERCEFULL",R[k.COERCEPLAIN]+`(?:${R[k.PRERELEASE]})?(?:${R[k.BUILD]})?(?:$|[^\\d])`);X("COERCERTL",R[k.COERCE],!0);X("COERCERTLFULL",R[k.COERCEFULL],!0);X("LONETILDE","(?:~>?)");X("TILDETRIM",`(\\s*)${R[k.LONETILDE]}\\s+`,!0);zn.tildeTrimReplace="$1~";X("TILDE",`^${R[k.LONETILDE]}${R[k.XRANGEPLAIN]}$`);X("TILDELOOSE",`^${R[k.LONETILDE]}${R[k.XRANGEPLAINLOOSE]}$`);X("LONECARET","(?:\\^)");X("CARETTRIM",`(\\s*)${R[k.LONECARET]}\\s+`,!0);zn.caretTrimReplace="$1^";X("CARET",`^${R[k.LONECARET]}${R[k.XRANGEPLAIN]}$`);X("CARETLOOSE",`^${R[k.LONECARET]}${R[k.XRANGEPLAINLOOSE]}$`);X("COMPARATORLOOSE",`^${R[k.GTLT]}\\s*(${R[k.LOOSEPLAIN]})$|^$`);X("COMPARATOR",`^${R[k.GTLT]}\\s*(${R[k.FULLPLAIN]})$|^$`);X("COMPARATORTRIM",`(\\s*)${R[k.GTLT]}\\s*(${R[k.LOOSEPLAIN]}|${R[k.XRANGEPLAIN]})`,!0);zn.comparatorTrimReplace="$1$2$3";X("HYPHENRANGE",`^\\s*(${R[k.XRANGEPLAIN]})\\s+-\\s+(${R[k.XRANGEPLAIN]})\\s*$`);X("HYPHENRANGELOOSE",`^\\s*(${R[k.XRANGEPLAINLOOSE]})\\s+-\\s+(${R[k.XRANGEPLAINLOOSE]})\\s*$`);X("STAR","(<|>)?=?\\s*\\*");X("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");X("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ja=G((d2,zg)=>{S();var T_=Object.freeze({loose:!0}),x_=Object.freeze({}),C_=t=>t?typeof t!="object"?T_:t:x_;zg.exports=C_});var wp=G((g2,Qg)=>{S();var Xg=/^[0-9]+$/,Yg=(t,e)=>{let n=Xg.test(t),r=Xg.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:t<e?-1:1},I_=(t,e)=>Yg(e,t);Qg.exports={compareIdentifiers:Yg,rcompareIdentifiers:I_}});var et=G((v2,ty)=>{S();var Za=So(),{MAX_LENGTH:Jg,MAX_SAFE_INTEGER:el}=Eo(),{safeRe:Zg,t:ey}=ei(),A_=Ja(),{compareIdentifiers:ti}=wp(),Tp=class t{constructor(e,n){if(n=A_(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.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>Jg)throw new TypeError(`version is longer than ${Jg} characters`);Za("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=e.trim().match(n.loose?Zg[ey.LOOSE]:Zg[ey.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>el||this.major<0)throw new TypeError("Invalid major version");if(this.minor>el||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>el||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<el)return i}return s}):this.prerelease=[],this.build=r[5]?r[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(Za("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)),ti(this.major,e.major)||ti(this.minor,e.minor)||ti(this.patch,e.patch)}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 n=0;do{let r=this.prerelease[n],s=e.prerelease[n];if(Za("prerelease compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return ti(r,s)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let r=this.build[n],s=e.build[n];if(Za("build compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return ti(r,s)}while(++n)}inc(e,n,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);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 s=Number(r)?1:0;if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[s];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(n){let i=[n,s];r===!1&&(i=[n]),ti(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ty.exports=Tp});var ss=G((S2,ry)=>{S();var ny=et(),N_=(t,e,n=!1)=>{if(t instanceof ny)return t;try{return new ny(t,e)}catch(r){if(!n)return null;throw r}};ry.exports=N_});var iy=G((T2,sy)=>{S();var b_=ss(),D_=(t,e)=>{let n=b_(t,e);return n?n.version:null};sy.exports=D_});var ay=G((C2,oy)=>{S();var __=ss(),R_=(t,e)=>{let n=__(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};oy.exports=R_});var uy=G((A2,cy)=>{S();var ly=et(),k_=(t,e,n,r,s)=>{typeof n=="string"&&(s=r,r=n,n=void 0);try{return new ly(t instanceof ly?t.version:t,n).inc(e,r,s).version}catch{return null}};cy.exports=k_});var fy=G((b2,hy)=>{S();var py=ss(),P_=(t,e)=>{let n=py(t,null,!0),r=py(e,null,!0),s=n.compare(r);if(s===0)return null;let i=s>0,o=i?n:r,a=i?r:n,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l)return!a.patch&&!a.minor?"major":o.patch?"patch":o.minor?"minor":"major";let u=l?"pre":"";return n.major!==r.major?u+"major":n.minor!==r.minor?u+"minor":n.patch!==r.patch?u+"patch":"prerelease"};hy.exports=P_});var my=G((_2,dy)=>{S();var M_=et(),L_=(t,e)=>new M_(t,e).major;dy.exports=L_});var yy=G((k2,gy)=>{S();var O_=et(),F_=(t,e)=>new O_(t,e).minor;gy.exports=F_});var Ey=G((M2,vy)=>{S();var B_=et(),$_=(t,e)=>new B_(t,e).patch;vy.exports=$_});var wy=G((O2,Sy)=>{S();var U_=ss(),V_=(t,e)=>{let n=U_(t,e);return n&&n.prerelease.length?n.prerelease:null};Sy.exports=V_});var Ht=G((B2,xy)=>{S();var Ty=et(),q_=(t,e,n)=>new Ty(t,n).compare(new Ty(e,n));xy.exports=q_});var Iy=G((U2,Cy)=>{S();var G_=Ht(),H_=(t,e,n)=>G_(e,t,n);Cy.exports=H_});var Ny=G((q2,Ay)=>{S();var W_=Ht(),j_=(t,e)=>W_(t,e,!0);Ay.exports=j_});var tl=G((H2,Dy)=>{S();var by=et(),K_=(t,e,n)=>{let r=new by(t,n),s=new by(e,n);return r.compare(s)||r.compareBuild(s)};Dy.exports=K_});var Ry=G((j2,_y)=>{S();var z_=tl(),X_=(t,e)=>t.sort((n,r)=>z_(n,r,e));_y.exports=X_});var Py=G((z2,ky)=>{S();var Y_=tl(),Q_=(t,e)=>t.sort((n,r)=>Y_(r,n,e));ky.exports=Q_});var wo=G((Y2,My)=>{S();var J_=Ht(),Z_=(t,e,n)=>J_(t,e,n)>0;My.exports=Z_});var nl=G((J2,Ly)=>{S();var eR=Ht(),tR=(t,e,n)=>eR(t,e,n)<0;Ly.exports=tR});var xp=G((eF,Oy)=>{S();var nR=Ht(),rR=(t,e,n)=>nR(t,e,n)===0;Oy.exports=rR});var Cp=G((nF,Fy)=>{S();var sR=Ht(),iR=(t,e,n)=>sR(t,e,n)!==0;Fy.exports=iR});var rl=G((sF,By)=>{S();var oR=Ht(),aR=(t,e,n)=>oR(t,e,n)>=0;By.exports=aR});var sl=G((oF,$y)=>{S();var lR=Ht(),cR=(t,e,n)=>lR(t,e,n)<=0;$y.exports=cR});var Ip=G((lF,Uy)=>{S();var uR=xp(),pR=Cp(),hR=wo(),fR=rl(),dR=nl(),mR=sl(),gR=(t,e,n,r)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return uR(t,n,r);case"!=":return pR(t,n,r);case">":return hR(t,n,r);case">=":return fR(t,n,r);case"<":return dR(t,n,r);case"<=":return mR(t,n,r);default:throw new TypeError(`Invalid operator: ${e}`)}};Uy.exports=gR});var qy=G((uF,Vy)=>{S();var yR=et(),vR=ss(),{safeRe:il,t:ol}=ei(),ER=(t,e)=>{if(t instanceof yR)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?il[ol.COERCEFULL]:il[ol.COERCE]);else{let l=e.includePrerelease?il[ol.COERCERTLFULL]:il[ol.COERCERTL],c;for(;(c=l.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||c.index+c[0].length!==n.index+n[0].length)&&(n=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(n===null)return null;let r=n[2],s=n[3]||"0",i=n[4]||"0",o=e.includePrerelease&&n[5]?`-${n[5]}`:"",a=e.includePrerelease&&n[6]?`+${n[6]}`:"";return vR(`${r}.${s}.${i}${o}${a}`,e)};Vy.exports=ER});var Hy=G((hF,Gy)=>{S();var Ap=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(e,n)}return this}};Gy.exports=Ap});var Wt=G((dF,zy)=>{S();var SR=/\s+/g,Np=class t{constructor(e,n){if(n=TR(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof bp)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().replace(SR," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(s=>!jy(s[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&DR(s[0])){this.set=[s];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 n=this.set[e];for(let r=0;r<n.length;r++)r>0&&(this.formatted+=" "),this.formatted+=n[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&NR)|(this.options.loose&&bR))+":"+e,s=Wy.get(r);if(s)return s;let i=this.options.loose,o=i?Tt[ut.HYPHENRANGELOOSE]:Tt[ut.HYPHENRANGE];e=e.replace(o,$R(this.options.includePrerelease)),ye("hyphen replace",e),e=e.replace(Tt[ut.COMPARATORTRIM],CR),ye("comparator trim",e),e=e.replace(Tt[ut.TILDETRIM],IR),ye("tilde trim",e),e=e.replace(Tt[ut.CARETTRIM],AR),ye("caret trim",e);let a=e.split(" ").map(h=>_R(h,this.options)).join(" ").split(/\s+/).map(h=>BR(h,this.options));i&&(a=a.filter(h=>(ye("loose invalid filter",h,this.options),!!h.match(Tt[ut.COMPARATORLOOSE])))),ye("range list",a);let l=new Map,c=a.map(h=>new bp(h,this.options));for(let h of c){if(jy(h))return[h];l.set(h.value,h)}l.size>1&&l.has("")&&l.delete("");let u=[...l.values()];return Wy.set(r,u),u}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(r=>Ky(r,n)&&e.set.some(s=>Ky(s,n)&&r.every(i=>s.every(o=>i.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new xR(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(UR(this.set[n],e,this.options))return!0;return!1}};zy.exports=Np;var wR=Hy(),Wy=new wR,TR=Ja(),bp=To(),ye=So(),xR=et(),{safeRe:Tt,t:ut,comparatorTrimReplace:CR,tildeTrimReplace:IR,caretTrimReplace:AR}=ei(),{FLAG_INCLUDE_PRERELEASE:NR,FLAG_LOOSE:bR}=Eo(),jy=t=>t.value==="<0.0.0-0",DR=t=>t.value==="",Ky=(t,e)=>{let n=!0,r=t.slice(),s=r.pop();for(;n&&r.length;)n=r.every(i=>s.intersects(i,e)),s=r.pop();return n},_R=(t,e)=>(ye("comp",t,e),t=PR(t,e),ye("caret",t),t=RR(t,e),ye("tildes",t),t=LR(t,e),ye("xrange",t),t=FR(t,e),ye("stars",t),t),pt=t=>!t||t.toLowerCase()==="x"||t==="*",RR=(t,e)=>t.trim().split(/\s+/).map(n=>kR(n,e)).join(" "),kR=(t,e)=>{let n=e.loose?Tt[ut.TILDELOOSE]:Tt[ut.TILDE];return t.replace(n,(r,s,i,o,a)=>{ye("tilde",t,r,s,i,o,a);let l;return pt(s)?l="":pt(i)?l=`>=${s}.0.0 <${+s+1}.0.0-0`:pt(o)?l=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:a?(ye("replaceTilde pr",a),l=`>=${s}.${i}.${o}-${a} <${s}.${+i+1}.0-0`):l=`>=${s}.${i}.${o} <${s}.${+i+1}.0-0`,ye("tilde return",l),l})},PR=(t,e)=>t.trim().split(/\s+/).map(n=>MR(n,e)).join(" "),MR=(t,e)=>{ye("caret",t,e);let n=e.loose?Tt[ut.CARETLOOSE]:Tt[ut.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,(s,i,o,a,l)=>{ye("caret",t,s,i,o,a,l);let c;return pt(i)?c="":pt(o)?c=`>=${i}.0.0${r} <${+i+1}.0.0-0`:pt(a)?i==="0"?c=`>=${i}.${o}.0${r} <${i}.${+o+1}.0-0`:c=`>=${i}.${o}.0${r} <${+i+1}.0.0-0`:l?(ye("replaceCaret pr",l),i==="0"?o==="0"?c=`>=${i}.${o}.${a}-${l} <${i}.${o}.${+a+1}-0`:c=`>=${i}.${o}.${a}-${l} <${i}.${+o+1}.0-0`:c=`>=${i}.${o}.${a}-${l} <${+i+1}.0.0-0`):(ye("no pr"),i==="0"?o==="0"?c=`>=${i}.${o}.${a}${r} <${i}.${o}.${+a+1}-0`:c=`>=${i}.${o}.${a}${r} <${i}.${+o+1}.0-0`:c=`>=${i}.${o}.${a} <${+i+1}.0.0-0`),ye("caret return",c),c})},LR=(t,e)=>(ye("replaceXRanges",t,e),t.split(/\s+/).map(n=>OR(n,e)).join(" ")),OR=(t,e)=>{t=t.trim();let n=e.loose?Tt[ut.XRANGELOOSE]:Tt[ut.XRANGE];return t.replace(n,(r,s,i,o,a,l)=>{ye("xRange",t,r,s,i,o,a,l);let c=pt(i),u=c||pt(o),h=u||pt(a),d=h;return s==="="&&d&&(s=""),l=e.includePrerelease?"-0":"",c?s===">"||s==="<"?r="<0.0.0-0":r="*":s&&d?(u&&(o=0),a=0,s===">"?(s=">=",u?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):s==="<="&&(s="<",u?i=+i+1:o=+o+1),s==="<"&&(l="-0"),r=`${s+i}.${o}.${a}${l}`):u?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:h&&(r=`>=${i}.${o}.0${l} <${i}.${+o+1}.0-0`),ye("xRange return",r),r})},FR=(t,e)=>(ye("replaceStars",t,e),t.trim().replace(Tt[ut.STAR],"")),BR=(t,e)=>(ye("replaceGTE0",t,e),t.trim().replace(Tt[e.includePrerelease?ut.GTE0PRE:ut.GTE0],"")),$R=t=>(e,n,r,s,i,o,a,l,c,u,h,d)=>(pt(r)?n="":pt(s)?n=`>=${r}.0.0${t?"-0":""}`:pt(i)?n=`>=${r}.${s}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,pt(c)?l="":pt(u)?l=`<${+c+1}.0.0-0`:pt(h)?l=`<${c}.${+u+1}.0-0`:d?l=`<=${c}.${u}.${h}-${d}`:t?l=`<${c}.${u}.${+h+1}-0`:l=`<=${l}`,`${n} ${l}`.trim()),UR=(t,e,n)=>{for(let r=0;r<t.length;r++)if(!t[r].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let r=0;r<t.length;r++)if(ye(t[r].semver),t[r].semver!==bp.ANY&&t[r].semver.prerelease.length>0){let s=t[r].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var To=G((gF,ev)=>{S();var xo=Symbol("SemVer ANY"),Rp=class t{static get ANY(){return xo}constructor(e,n){if(n=Xy(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),_p("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===xo?this.value="":this.value=this.operator+this.semver.version,_p("comp",this)}parse(e){let n=this.options.loose?Yy[Qy.COMPARATORLOOSE]:Yy[Qy.COMPARATOR],r=e.match(n);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new Jy(r[2],this.options.loose):this.semver=xo}toString(){return this.value}test(e){if(_p("Comparator.test",e,this.options.loose),this.semver===xo||e===xo)return!0;if(typeof e=="string")try{e=new Jy(e,this.options)}catch{return!1}return Dp(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Zy(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new Zy(this.value,n).test(e.semver):(n=Xy(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.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("=")||Dp(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Dp(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};ev.exports=Rp;var Xy=Ja(),{safeRe:Yy,t:Qy}=ei(),Dp=Ip(),_p=So(),Jy=et(),Zy=Wt()});var Co=G((vF,tv)=>{S();var VR=Wt(),qR=(t,e,n)=>{try{e=new VR(e,n)}catch{return!1}return e.test(t)};tv.exports=qR});var rv=G((SF,nv)=>{S();var GR=Wt(),HR=(t,e)=>new GR(t,e).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));nv.exports=HR});var iv=G((TF,sv)=>{S();var WR=et(),jR=Wt(),KR=(t,e,n)=>{let r=null,s=null,i=null;try{i=new jR(e,n)}catch{return null}return t.forEach(o=>{i.test(o)&&(!r||s.compare(o)===-1)&&(r=o,s=new WR(r,n))}),r};sv.exports=KR});var av=G((CF,ov)=>{S();var zR=et(),XR=Wt(),YR=(t,e,n)=>{let r=null,s=null,i=null;try{i=new XR(e,n)}catch{return null}return t.forEach(o=>{i.test(o)&&(!r||s.compare(o)===1)&&(r=o,s=new zR(r,n))}),r};ov.exports=YR});var uv=G((AF,cv)=>{S();var kp=et(),QR=Wt(),lv=wo(),JR=(t,e)=>{t=new QR(t,e);let n=new kp("0.0.0");if(t.test(n)||(n=new kp("0.0.0-0"),t.test(n)))return n;n=null;for(let r=0;r<t.set.length;++r){let s=t.set[r],i=null;s.forEach(o=>{let a=new kp(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||lv(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||lv(n,i))&&(n=i)}return n&&t.test(n)?n:null};cv.exports=JR});var hv=G((bF,pv)=>{S();var ZR=Wt(),ek=(t,e)=>{try{return new ZR(t,e).range||"*"}catch{return null}};pv.exports=ek});var al=G((_F,gv)=>{S();var tk=et(),mv=To(),{ANY:nk}=mv,rk=Wt(),sk=Co(),fv=wo(),dv=nl(),ik=sl(),ok=rl(),ak=(t,e,n,r)=>{t=new tk(t,r),e=new rk(e,r);let s,i,o,a,l;switch(n){case">":s=fv,i=ik,o=dv,a=">",l=">=";break;case"<":s=dv,i=ok,o=fv,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sk(t,e,r))return!1;for(let c=0;c<e.set.length;++c){let u=e.set[c],h=null,d=null;if(u.forEach(g=>{g.semver===nk&&(g=new mv(">=0.0.0")),h=h||g,d=d||g,s(g.semver,h.semver,r)?h=g:o(g.semver,d.semver,r)&&(d=g)}),h.operator===a||h.operator===l||(!d.operator||d.operator===a)&&i(t,d.semver))return!1;if(d.operator===l&&o(t,d.semver))return!1}return!0};gv.exports=ak});var vv=G((kF,yv)=>{S();var lk=al(),ck=(t,e,n)=>lk(t,e,">",n);yv.exports=ck});var Sv=G((MF,Ev)=>{S();var uk=al(),pk=(t,e,n)=>uk(t,e,"<",n);Ev.exports=pk});var xv=G((OF,Tv)=>{S();var wv=Wt(),hk=(t,e,n)=>(t=new wv(t,n),e=new wv(e,n),t.intersects(e,n));Tv.exports=hk});var Iv=G((BF,Cv)=>{S();var fk=Co(),dk=Ht();Cv.exports=(t,e,n)=>{let r=[],s=null,i=null,o=t.sort((u,h)=>dk(u,h,n));for(let u of o)fk(u,e,n)?(i=u,s||(s=u)):(i&&r.push([s,i]),i=null,s=null);s&&r.push([s,null]);let a=[];for(let[u,h]of r)u===h?a.push(u):!h&&u===o[0]?a.push("*"):h?u===o[0]?a.push(`<=${h}`):a.push(`${u} - ${h}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length<c.length?l:e}});var Rv=G((UF,_v)=>{S();var Av=Wt(),Mp=To(),{ANY:Pp}=Mp,Io=Co(),Lp=Ht(),mk=(t,e,n={})=>{if(t===e)return!0;t=new Av(t,n),e=new Av(e,n);let r=!1;e:for(let s of t.set){for(let i of e.set){let o=yk(s,i,n);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},gk=[new Mp(">=0.0.0-0")],Nv=[new Mp(">=0.0.0")],yk=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Pp){if(e.length===1&&e[0].semver===Pp)return!0;n.includePrerelease?t=gk:t=Nv}if(e.length===1&&e[0].semver===Pp){if(n.includePrerelease)return!0;e=Nv}let r=new Set,s,i;for(let g of t)g.operator===">"||g.operator===">="?s=bv(s,g,n):g.operator==="<"||g.operator==="<="?i=Dv(i,g,n):r.add(g.semver);if(r.size>1)return null;let o;if(s&&i){if(o=Lp(s.semver,i.semver,n),o>0)return null;if(o===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let g of r){if(s&&!Io(g,String(s),n)||i&&!Io(g,String(i),n))return null;for(let y of e)if(!Io(g,String(y),n))return!1;return!0}let a,l,c,u,h=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,d=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let g of e){if(u=u||g.operator===">"||g.operator===">=",c=c||g.operator==="<"||g.operator==="<=",s){if(d&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===d.major&&g.semver.minor===d.minor&&g.semver.patch===d.patch&&(d=!1),g.operator===">"||g.operator===">="){if(a=bv(s,g,n),a===g&&a!==s)return!1}else if(s.operator===">="&&!Io(s.semver,String(g),n))return!1}if(i){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator==="<"||g.operator==="<="){if(l=Dv(i,g,n),l===g&&l!==i)return!1}else if(i.operator==="<="&&!Io(i.semver,String(g),n))return!1}if(!g.operator&&(i||s)&&o!==0)return!1}return!(s&&c&&!i&&o!==0||i&&u&&!s&&o!==0||d||h)},bv=(t,e,n)=>{if(!t)return e;let r=Lp(t.semver,e.semver,n);return r>0?t:r<0||e.operator===">"&&t.operator===">="?e:t},Dv=(t,e,n)=>{if(!t)return e;let r=Lp(t.semver,e.semver,n);return r<0?t:r>0||e.operator==="<"&&t.operator==="<="?e:t};_v.exports=mk});var Lv=G((qF,Mv)=>{S();var Op=ei(),kv=Eo(),vk=et(),Pv=wp(),Ek=ss(),Sk=iy(),wk=ay(),Tk=uy(),xk=fy(),Ck=my(),Ik=yy(),Ak=Ey(),Nk=wy(),bk=Ht(),Dk=Iy(),_k=Ny(),Rk=tl(),kk=Ry(),Pk=Py(),Mk=wo(),Lk=nl(),Ok=xp(),Fk=Cp(),Bk=rl(),$k=sl(),Uk=Ip(),Vk=qy(),qk=To(),Gk=Wt(),Hk=Co(),Wk=rv(),jk=iv(),Kk=av(),zk=uv(),Xk=hv(),Yk=al(),Qk=vv(),Jk=Sv(),Zk=xv(),eP=Iv(),tP=Rv();Mv.exports={parse:Ek,valid:Sk,clean:wk,inc:Tk,diff:xk,major:Ck,minor:Ik,patch:Ak,prerelease:Nk,compare:bk,rcompare:Dk,compareLoose:_k,compareBuild:Rk,sort:kk,rsort:Pk,gt:Mk,lt:Lk,eq:Ok,neq:Fk,gte:Bk,lte:$k,cmp:Uk,coerce:Vk,Comparator:qk,Range:Gk,satisfies:Hk,toComparators:Wk,maxSatisfying:jk,minSatisfying:Kk,minVersion:zk,validRange:Xk,outside:Yk,gtr:Qk,ltr:Jk,intersects:Zk,simplifyRange:eP,subset:tP,SemVer:vk,re:Op.re,src:Op.src,tokens:Op.t,SEMVER_SPEC_VERSION:kv.SEMVER_SPEC_VERSION,RELEASE_TYPES:kv.RELEASE_TYPES,compareIdentifiers:Pv.compareIdentifiers,rcompareIdentifiers:Pv.rcompareIdentifiers}});var oM={};rE(oM,{angularJitApplicationTransform:()=>vp});module.exports=sE(oM);S();S();var Xv=require("module");S();var Og=require("module");S();var Sg=require("module");S();var Xm=require("module");S();var Zp=require("module");S();var Qp=require("module"),is=(0,Qp.createRequire)(P),Jp=(t=>typeof is<"u"?is:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof is<"u"?is:e)[n]}):t)(function(t){if(typeof is<"u")return is.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var aE=x(require("typescript"),1),Ye=x(require("fs"),1),th=require("module"),ht=x(require("path"),1),nh=require("url"),pM=(0,Zp.createRequire)(P);var iE=class{exists(t){throw ue()}readFile(t){throw ue()}readFileBuffer(t){throw ue()}writeFile(t,e,n){throw ue()}removeFile(t){throw ue()}symlink(t,e){throw ue()}readdir(t){throw ue()}lstat(t){throw ue()}stat(t){throw ue()}pwd(){throw ue()}chdir(t){throw ue()}extname(t){throw ue()}copyFile(t,e){throw ue()}moveFile(t,e){throw ue()}ensureDir(t){throw ue()}removeDeep(t){throw ue()}isCaseSensitive(){throw ue()}resolve(...t){throw ue()}dirname(t){throw ue()}join(t,...e){throw ue()}isRoot(t){throw ue()}isRooted(t){throw ue()}relative(t,e){throw ue()}basename(t,e){throw ue()}realpath(t){throw ue()}getDefaultLibLocation(){throw ue()}normalize(t){throw ue()}};function ue(){return new Error("FileSystem has not been configured. Please call `setFileSystem()` before calling this method.")}var oE=new iE;function eh(t){oE=t}var fM=Symbol("AbsolutePath");var lE=class{pwd(){return this.normalize(process.cwd())}chdir(t){process.chdir(t)}resolve(...t){return this.normalize(ht.resolve(...t))}dirname(t){return this.normalize(ht.dirname(t))}join(t,...e){return this.normalize(ht.join(t,...e))}isRoot(t){return this.dirname(t)===this.normalize(t)}isRooted(t){return ht.isAbsolute(t)}relative(t,e){return this.normalize(ht.relative(t,e))}basename(t,e){return ht.basename(t,e)}extname(t){return ht.extname(t)}normalize(t){return t.replace(/\\/g,"/")}},ll=typeof __filename<"u",rh=ll?null:P,cE=ll?__filename:(0,nh.fileURLToPath)(rh),uE=class extends lE{constructor(){super(...arguments),this._caseSensitive=void 0}isCaseSensitive(){return this._caseSensitive===void 0&&(this._caseSensitive=!Ye.default.existsSync(this.normalize(pE(cE)))),this._caseSensitive}exists(t){return Ye.default.existsSync(t)}readFile(t){return Ye.default.readFileSync(t,"utf8")}readFileBuffer(t){return Ye.default.readFileSync(t)}readdir(t){return Ye.default.readdirSync(t)}lstat(t){return Ye.default.lstatSync(t)}stat(t){return Ye.default.statSync(t)}realpath(t){return this.resolve(Ye.default.realpathSync(t))}getDefaultLibLocation(){let t=ll?Jp:(0,th.createRequire)(rh);return this.resolve(t.resolve("typescript"),"..")}},sh=class extends uE{writeFile(t,e,n=!1){Ye.default.writeFileSync(t,e,n?{flag:"wx"}:void 0)}removeFile(t){Ye.default.unlinkSync(t)}symlink(t,e){Ye.default.symlinkSync(t,e)}copyFile(t,e){Ye.default.copyFileSync(t,e)}moveFile(t,e){Ye.default.renameSync(t,e)}ensureDir(t){Ye.default.mkdirSync(t,{recursive:!0})}removeDeep(t){Ye.default.rmdirSync(t,{recursive:!0})}};function pE(t){return t.replace(/\w/g,e=>e.toUpperCase()===e?e.toLowerCase():e.toUpperCase())}var Qs=x(require("typescript"),1),M=x(require("typescript"),1),lo=x(require("typescript"),1),Ne=x(require("typescript"),1),Gu=x(require("typescript"),1),Qm=x(require("typescript"),1);S();var ih=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g"),Yt=class t{constructor(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}static parse(e){let n=[],r=(l,c)=>{c.notSelectors.length>0&&!c.element&&c.classNames.length==0&&c.attrs.length==0&&(c.element="*"),l.push(c)},s=new t,i,o=s,a=!1;for(ih.lastIndex=0;i=ih.exec(e);){if(i[1]){if(a)throw new Error("Nesting :not in a selector is not allowed");a=!0,o=new t,s.notSelectors.push(o)}let l=i[2];if(l){let u=i[3];u==="#"?o.addAttribute("id",l.slice(1)):u==="."?o.addClassName(l.slice(1)):o.setElement(l)}let c=i[4];if(c&&o.addAttribute(o.unescapeAttribute(c),i[6]),i[7]&&(a=!1,o=s),i[8]){if(a)throw new Error("Multiple selectors in :not are not supported");r(n,s),s=o=new t}}return r(n,s),n}unescapeAttribute(e){let n="",r=!1;for(let s=0;s<e.length;s++){let i=e.charAt(s);if(i==="\\"){r=!0;continue}if(i==="$"&&!r)throw new Error(`Error in attribute selector "${e}". Unescaped "$" is not supported. Please escape with "\\$".`);r=!1,n+=i}return n}escapeAttribute(e){return e.replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}isElementSelector(){return this.hasElementSelector()&&this.classNames.length==0&&this.attrs.length==0&&this.notSelectors.length===0}hasElementSelector(){return!!this.element}setElement(e=null){this.element=e}getAttrs(){let e=[];return this.classNames.length>0&&e.push("class",this.classNames.join(" ")),e.concat(this.attrs)}addAttribute(e,n=""){this.attrs.push(e,n&&n.toLowerCase()||"")}addClassName(e){this.classNames.push(e.toLowerCase())}toString(){let e=this.element||"";if(this.classNames&&this.classNames.forEach(n=>e+=`.${n}`),this.attrs)for(let n=0;n<this.attrs.length;n+=2){let r=this.escapeAttribute(this.attrs[n]),s=this.attrs[n+1];e+=`[${r}${s?"="+s:""}]`}return this.notSelectors.forEach(n=>e+=`:not(${n})`),e}},or=class t{constructor(){this._elementMap=new Map,this._elementPartialMap=new Map,this._classMap=new Map,this._classPartialMap=new Map,this._attrValueMap=new Map,this._attrValuePartialMap=new Map,this._listContexts=[]}static createNotMatcher(e){let n=new t;return n.addSelectables(e,null),n}addSelectables(e,n){let r=null;e.length>1&&(r=new kl(e),this._listContexts.push(r));for(let s=0;s<e.length;s++)this._addSelectable(e[s],n,r)}_addSelectable(e,n,r){let s=this,i=e.element,o=e.classNames,a=e.attrs,l=new Pl(e,n,r);if(i&&(a.length===0&&o.length===0?this._addTerminal(s._elementMap,i,l):s=this._addPartial(s._elementPartialMap,i)),o)for(let c=0;c<o.length;c++){let u=a.length===0&&c===o.length-1,h=o[c];u?this._addTerminal(s._classMap,h,l):s=this._addPartial(s._classPartialMap,h)}if(a)for(let c=0;c<a.length;c+=2){let u=c===a.length-2,h=a[c],d=a[c+1];if(u){let g=s._attrValueMap,y=g.get(h);y||(y=new Map,g.set(h,y)),this._addTerminal(y,d,l)}else{let g=s._attrValuePartialMap,y=g.get(h);y||(y=new Map,g.set(h,y)),s=this._addPartial(y,d)}}}_addTerminal(e,n,r){let s=e.get(n);s||(s=[],e.set(n,s)),s.push(r)}_addPartial(e,n){let r=e.get(n);return r||(r=new t,e.set(n,r)),r}match(e,n){let r=!1,s=e.element,i=e.classNames,o=e.attrs;for(let a=0;a<this._listContexts.length;a++)this._listContexts[a].alreadyMatched=!1;if(r=this._matchTerminal(this._elementMap,s,e,n)||r,r=this._matchPartial(this._elementPartialMap,s,e,n)||r,i)for(let a=0;a<i.length;a++){let l=i[a];r=this._matchTerminal(this._classMap,l,e,n)||r,r=this._matchPartial(this._classPartialMap,l,e,n)||r}if(o)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1],u=this._attrValueMap.get(l);c&&(r=this._matchTerminal(u,"",e,n)||r),r=this._matchTerminal(u,c,e,n)||r;let h=this._attrValuePartialMap.get(l);c&&(r=this._matchPartial(h,"",e,n)||r),r=this._matchPartial(h,c,e,n)||r}return r}_matchTerminal(e,n,r,s){if(!e||typeof n!="string")return!1;let i=e.get(n)||[],o=e.get("*");if(o&&(i=i.concat(o)),i.length===0)return!1;let a,l=!1;for(let c=0;c<i.length;c++)a=i[c],l=a.finalize(r,s)||l;return l}_matchPartial(e,n,r,s){if(!e||typeof n!="string")return!1;let i=e.get(n);return i?i.match(r,s):!1}},kl=class{constructor(e){this.selectors=e,this.alreadyMatched=!1}},Pl=class{constructor(e,n,r){this.selector=e,this.cbContext=n,this.listContext=r,this.notSelectors=e.notSelectors}finalize(e,n){let r=!0;return this.notSelectors.length>0&&(!this.listContext||!this.listContext.alreadyMatched)&&(r=!or.createNotMatcher(this.notSelectors).match(e,null)),r&&n&&(!this.listContext||!this.listContext.alreadyMatched)&&(this.listContext&&(this.listContext.alreadyMatched=!0),n(this.selector,this.cbContext)),r}};var un;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(un||(un={}));var Lo;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(Lo||(Lo={}));var fs;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(fs||(fs={}));var Ml={name:"custom-elements"},Ll={name:"no-errors-schema"};var ce;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(ce||(ce={}));var oh;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(oh||(oh={}));function hE(t){let e=t.classNames&&t.classNames.length?[8,...t.classNames]:[];return[t.element&&t.element!=="*"?t.element:"",...t.attrs,...e]}function fE(t){let e=t.classNames&&t.classNames.length?[8,...t.classNames]:[];return t.element?[5,t.element,...t.attrs,...e]:t.attrs.length?[3,...t.attrs,...e]:t.classNames&&t.classNames.length?[9,...t.classNames]:[]}function dE(t){let e=hE(t),n=t.notSelectors&&t.notSelectors.length?t.notSelectors.map(r=>fE(r)):[];return e.concat(...n)}function cu(t){return t?Yt.parse(t).map(dE):[]}var Oo;function mE(t){return EE(vE(t.nodes).join("")+`[${t.meaning}]`)}function gE(t){return t.id||Jf(t)}function Jf(t){let e=new Ol,n=t.nodes.map(r=>r.visit(e,null));return Zf(n.join(""),t.meaning)}var Fo=class{visitText(e,n){return e.value}visitContainer(e,n){return`[${e.children.map(r=>r.visit(this)).join(", ")}]`}visitIcu(e,n){let r=Object.keys(e.cases).map(s=>`${s} {${e.cases[s].visit(this)}}`);return`{${e.expression}, ${e.type}, ${r.join(", ")}}`}visitTagPlaceholder(e,n){return e.isVoid?`<ph tag name="${e.startName}"/>`:`<ph tag name="${e.startName}">${e.children.map(r=>r.visit(this)).join(", ")}</ph name="${e.closeName}">`}visitPlaceholder(e,n){return e.value?`<ph name="${e.name}">${e.value}</ph>`:`<ph name="${e.name}"/>`}visitIcuPlaceholder(e,n){return`<ph icu name="${e.name}">${e.value.visit(this)}</ph>`}visitBlockPlaceholder(e,n){return`<ph block name="${e.startName}">${e.children.map(r=>r.visit(this)).join(", ")}</ph name="${e.closeName}">`}},yE=new Fo;function vE(t){return t.map(e=>e.visit(yE,null))}var Ol=class extends Fo{visitIcu(e,n){let r=Object.keys(e.cases).map(s=>`${s} {${e.cases[s].visit(this)}}`);return`{${e.type}, ${r.join(", ")}}`}};function EE(t){Oo??=new TextEncoder;let e=[...Oo.encode(t)],n=TE(e,Bo.Big),r=e.length*8,s=new Uint32Array(80),i=1732584193,o=4023233417,a=2562383102,l=271733878,c=3285377520;n[r>>5]|=128<<24-r%32,n[(r+64>>9<<4)+15]=r;for(let u=0;u<n.length;u+=16){let h=i,d=o,g=a,y=l,C=c;for(let A=0;A<80;A++){A<16?s[A]=n[u+A]:s[A]=cl(s[A-3]^s[A-8]^s[A-14]^s[A-16],1);let _=SE(A,o,a,l),U=_[0],ne=_[1],ve=[cl(i,5),U,c,ne,s[A]].reduce(os);c=l,l=a,a=cl(o,30),o=i,i=ve}i=os(i,h),o=os(o,d),a=os(a,g),l=os(l,y),c=os(c,C)}return ni(i)+ni(o)+ni(a)+ni(l)+ni(c)}function ni(t){return(t>>>0).toString(16).padStart(8,"0")}function SE(t,e,n,r){return t<20?[e&n|~e&r,1518500249]:t<40?[e^n^r,1859775393]:t<60?[e&n|e&r|n&r,2400959708]:[e^n^r,3395469782]}function ah(t){Oo??=new TextEncoder;let e=Oo.encode(t),n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=lh(n,e.length,0),s=lh(n,e.length,102072);return r==0&&(s==0||s==1)&&(r=r^319790063,s=s^-1801410264),BigInt.asUintN(32,BigInt(r))<<BigInt(32)|BigInt.asUintN(32,BigInt(s))}function Zf(t,e=""){let n=ah(t);return e&&(n=BigInt.asUintN(64,n<<BigInt(1))|n>>BigInt(63)&BigInt(1),n+=ah(e)),BigInt.asUintN(63,n).toString()}function lh(t,e,n){let r=2654435769,s=2654435769,i=0,o=e-12;for(;i<=o;i+=12){r+=t.getUint32(i,!0),s+=t.getUint32(i+4,!0),n+=t.getUint32(i+8,!0);let l=ch(r,s,n);r=l[0],s=l[1],n=l[2]}let a=e-i;return n+=e,a>=4?(r+=t.getUint32(i,!0),i+=4,a>=8?(s+=t.getUint32(i,!0),i+=4,a>=9&&(n+=t.getUint8(i++)<<8),a>=10&&(n+=t.getUint8(i++)<<16),a===11&&(n+=t.getUint8(i++)<<24)):(a>=5&&(s+=t.getUint8(i++)),a>=6&&(s+=t.getUint8(i++)<<8),a===7&&(s+=t.getUint8(i++)<<16))):(a>=1&&(r+=t.getUint8(i++)),a>=2&&(r+=t.getUint8(i++)<<8),a===3&&(r+=t.getUint8(i++)<<16)),ch(r,s,n)[2]}function ch(t,e,n){return t-=e,t-=n,t^=n>>>13,e-=n,e-=t,e^=t<<8,n-=t,n-=e,n^=e>>>13,t-=e,t-=n,t^=n>>>12,e-=n,e-=t,e^=t<<16,n-=t,n-=e,n^=e>>>5,t-=e,t-=n,t^=n>>>3,e-=n,e-=t,e^=t<<10,n-=t,n-=e,n^=e>>>15,[t,e,n]}var Bo;(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(Bo||(Bo={}));function os(t,e){return wE(t,e)[1]}function wE(t,e){let n=(t&65535)+(e&65535),r=(t>>>16)+(e>>>16)+(n>>>16);return[r>>>16,r<<16|n&65535]}function cl(t,e){return t<<e|t>>>32-e}function TE(t,e){let n=t.length+3>>>2,r=[];for(let s=0;s<n;s++)r[s]=xE(t,s*4,e);return r}function uh(t,e){return e>=t.length?0:t[e]}function xE(t,e,n){let r=0;if(n===Bo.Big)for(let s=0;s<4;s++)r+=uh(t,e+s)<<24-8*s;else for(let s=0;s<4;s++)r+=uh(t,e+s)<<8*s;return r}var yi;(function(t){t[t.None=0]="None",t[t.Const=1]="Const"})(yi||(yi={}));var ar=class{constructor(e=yi.None){this.modifiers=e}hasModifier(e){return(this.modifiers&e)!==0}},Vt;(function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None"})(Vt||(Vt={}));var Qt=class extends ar{constructor(e,n){super(n),this.name=e}visitType(e,n){return e.visitBuiltinType(this,n)}},rt=class extends ar{constructor(e,n,r=null){super(n),this.value=e,this.typeParams=r}visitType(e,n){return e.visitExpressionType(this,n)}},Fl=class extends ar{constructor(e,n){super(n),this.of=e}visitType(e,n){return e.visitArrayType(this,n)}},Bl=class extends ar{constructor(e,n){super(n),this.valueType=e||null}visitType(e,n){return e.visitMapType(this,n)}},xs=class extends ar{constructor(e,n){super(n),this.type=e}visitType(e,n){return e.visitTransplantedType(this,n)}},Sr=new Qt(Vt.Dynamic),At=new Qt(Vt.Inferred),ed=new Qt(Vt.Bool),CE=new Qt(Vt.Int),ka=new Qt(Vt.Number),uu=new Qt(Vt.String),IE=new Qt(Vt.Function),Jt=new Qt(Vt.None),mn;(function(t){t[t.Minus=0]="Minus",t[t.Plus=1]="Plus"})(mn||(mn={}));var I;(function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Identical=2]="Identical",t[t.NotIdentical=3]="NotIdentical",t[t.Minus=4]="Minus",t[t.Plus=5]="Plus",t[t.Divide=6]="Divide",t[t.Multiply=7]="Multiply",t[t.Modulo=8]="Modulo",t[t.And=9]="And",t[t.Or=10]="Or",t[t.BitwiseOr=11]="BitwiseOr",t[t.BitwiseAnd=12]="BitwiseAnd",t[t.Lower=13]="Lower",t[t.LowerEquals=14]="LowerEquals",t[t.Bigger=15]="Bigger",t[t.BiggerEquals=16]="BiggerEquals",t[t.NullishCoalesce=17]="NullishCoalesce"})(I||(I={}));function td(t,e){return t==null||e==null?t==e:t.isEquivalent(e)}function nd(t,e,n){let r=t.length;if(r!==e.length)return!1;for(let s=0;s<r;s++)if(!n(t[s],e[s]))return!1;return!0}function it(t,e){return nd(t,e,(n,r)=>n.isEquivalent(r))}var re=class{constructor(e,n){this.type=e||null,this.sourceSpan=n||null}prop(e,n){return new ot(this,e,null,n)}key(e,n,r){return new gn(this,e,n,r)}callFn(e,n,r){return new Ke(this,e,null,n,r)}instantiate(e,n,r){return new Is(this,e,n,r)}conditional(e,n=null,r){return new Zt(this,e,n,null,r)}equals(e,n){return new ee(I.Equals,this,e,null,n)}notEquals(e,n){return new ee(I.NotEquals,this,e,null,n)}identical(e,n){return new ee(I.Identical,this,e,null,n)}notIdentical(e,n){return new ee(I.NotIdentical,this,e,null,n)}minus(e,n){return new ee(I.Minus,this,e,null,n)}plus(e,n){return new ee(I.Plus,this,e,null,n)}divide(e,n){return new ee(I.Divide,this,e,null,n)}multiply(e,n){return new ee(I.Multiply,this,e,null,n)}modulo(e,n){return new ee(I.Modulo,this,e,null,n)}and(e,n){return new ee(I.And,this,e,null,n)}bitwiseOr(e,n,r=!0){return new ee(I.BitwiseOr,this,e,null,n,r)}bitwiseAnd(e,n,r=!0){return new ee(I.BitwiseAnd,this,e,null,n,r)}or(e,n){return new ee(I.Or,this,e,null,n)}lower(e,n){return new ee(I.Lower,this,e,null,n)}lowerEquals(e,n){return new ee(I.LowerEquals,this,e,null,n)}bigger(e,n){return new ee(I.Bigger,this,e,null,n)}biggerEquals(e,n){return new ee(I.BiggerEquals,this,e,null,n)}isBlank(e){return this.equals(rd,e)}nullishCoalesce(e,n){return new ee(I.NullishCoalesce,this,e,null,n)}toStmt(){return new bt(this,null)}},Nt=class t extends re{constructor(e,n,r){super(n,r),this.name=e}isEquivalent(e){return e instanceof t&&this.name===e.name}isConstant(){return!1}visitExpression(e,n){return e.visitReadVarExpr(this,n)}clone(){return new t(this.name,this.type,this.sourceSpan)}set(e){return new vi(this.name,e,null,this.sourceSpan)}},Mr=class t extends re{constructor(e,n,r){super(n,r),this.expr=e}visitExpression(e,n){return e.visitTypeofExpr(this,n)}isEquivalent(e){return e instanceof t&&e.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new t(this.expr.clone())}},$=class t extends re{constructor(e,n,r){super(n,r),this.node=e}isEquivalent(e){return e instanceof t&&this.node===e.node}isConstant(){return!1}visitExpression(e,n){return e.visitWrappedNodeExpr(this,n)}clone(){return new t(this.node,this.type,this.sourceSpan)}},vi=class t extends re{constructor(e,n,r,s){super(r||n.type,s),this.name=e,this.value=n}isEquivalent(e){return e instanceof t&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,n){return e.visitWriteVarExpr(this,n)}clone(){return new t(this.name,this.value.clone(),this.type,this.sourceSpan)}toDeclStmt(e,n){return new ze(this.name,this.value,e,n,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(At,De.Final)}},Cs=class t extends re{constructor(e,n,r,s,i){super(s||r.type,i),this.receiver=e,this.index=n,this.value=r}isEquivalent(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,n){return e.visitWriteKeyExpr(this,n)}clone(){return new t(this.receiver.clone(),this.index.clone(),this.value.clone(),this.type,this.sourceSpan)}},Lr=class t extends re{constructor(e,n,r,s,i){super(s||r.type,i),this.receiver=e,this.name=n,this.value=r}isEquivalent(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,n){return e.visitWritePropExpr(this,n)}clone(){return new t(this.receiver.clone(),this.name,this.value.clone(),this.type,this.sourceSpan)}},Ke=class t extends re{constructor(e,n,r,s,i=!1){super(r,s),this.fn=e,this.args=n,this.pure=i}get receiver(){return this.fn}isEquivalent(e){return e instanceof t&&this.fn.isEquivalent(e.fn)&&it(this.args,e.args)&&this.pure===e.pure}isConstant(){return!1}visitExpression(e,n){return e.visitInvokeFunctionExpr(this,n)}clone(){return new t(this.fn.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan,this.pure)}},Ei=class t extends re{constructor(e,n,r,s){super(r,s),this.tag=e,this.template=n}isEquivalent(e){return e instanceof t&&this.tag.isEquivalent(e.tag)&&nd(this.template.elements,e.template.elements,(n,r)=>n.text===r.text)&&it(this.template.expressions,e.template.expressions)}isConstant(){return!1}visitExpression(e,n){return e.visitTaggedTemplateExpr(this,n)}clone(){return new t(this.tag.clone(),this.template.clone(),this.type,this.sourceSpan)}},Is=class t extends re{constructor(e,n,r,s){super(r,s),this.classExpr=e,this.args=n}isEquivalent(e){return e instanceof t&&this.classExpr.isEquivalent(e.classExpr)&&it(this.args,e.args)}isConstant(){return!1}visitExpression(e,n){return e.visitInstantiateExpr(this,n)}clone(){return new t(this.classExpr.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan)}},xe=class t extends re{constructor(e,n,r){super(n,r),this.value=e}isEquivalent(e){return e instanceof t&&this.value===e.value}isConstant(){return!0}visitExpression(e,n){return e.visitLiteralExpr(this,n)}clone(){return new t(this.value,this.type,this.sourceSpan)}},$o=class t{constructor(e,n){this.elements=e,this.expressions=n}clone(){return new t(this.elements.map(e=>e.clone()),this.expressions.map(e=>e.clone()))}},Uo=class t{constructor(e,n,r){this.text=e,this.sourceSpan=n,this.rawText=r??n?.toString()??$l(Po(e))}clone(){return new t(this.text,this.sourceSpan,this.rawText)}},ir=class{constructor(e,n){this.text=e,this.sourceSpan=n}},_r=class{constructor(e,n,r){this.text=e,this.sourceSpan=n,this.associatedMessage=r}},AE="|",ph="@@",NE="\u241F",Si=class t extends re{constructor(e,n,r,s,i){super(uu,i),this.metaBlock=e,this.messageParts=n,this.placeHolderNames=r,this.expressions=s}isEquivalent(e){return!1}isConstant(){return!1}visitExpression(e,n){return e.visitLocalizedString(this,n)}clone(){return new t(this.metaBlock,this.messageParts,this.placeHolderNames,this.expressions.map(e=>e.clone()),this.sourceSpan)}serializeI18nHead(){let e=this.metaBlock.description||"";return this.metaBlock.meaning&&(e=`${this.metaBlock.meaning}${AE}${e}`),this.metaBlock.customId&&(e=`${e}${ph}${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(n=>{e=`${e}${NE}${n}`}),hh(e,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(e){return this.messageParts[e]?.sourceSpan??this.sourceSpan}getPlaceholderSourceSpan(e){return this.placeHolderNames[e]?.sourceSpan??this.expressions[e]?.sourceSpan??this.sourceSpan}serializeI18nTemplatePart(e){let n=this.placeHolderNames[e-1],r=this.messageParts[e],s=n.text;return n.associatedMessage?.legacyIds.length===0&&(s+=`${ph}${Zf(n.associatedMessage.messageString,n.associatedMessage.meaning)}`),hh(s,r.text,this.getMessagePartSourceSpan(e))}},Po=t=>t.replace(/\\/g,"\\\\"),bE=t=>t.replace(/^:/,"\\:"),DE=t=>t.replace(/:/g,"\\:"),$l=t=>t.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function hh(t,e,n){return t===""?{cooked:e,raw:$l(bE(Po(e))),range:n}:{cooked:`:${t}:${e}`,raw:$l(`:${DE(Po(t))}:${Po(e)}`),range:n}}var Ve=class t extends re{constructor(e,n,r=null,s){super(n,s),this.value=e,this.typeParams=r}isEquivalent(e){return e instanceof t&&this.value.name===e.value.name&&this.value.moduleName===e.value.moduleName&&this.value.runtime===e.value.runtime}isConstant(){return!1}visitExpression(e,n){return e.visitExternalExpr(this,n)}clone(){return new t(this.value,this.type,this.typeParams,this.sourceSpan)}},Vo=class{constructor(e,n,r){this.moduleName=e,this.name=n,this.runtime=r}},Zt=class t extends re{constructor(e,n,r=null,s,i){super(s||n.type,i),this.condition=e,this.falseCase=r,this.trueCase=n}isEquivalent(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&td(this.falseCase,e.falseCase)}isConstant(){return!1}visitExpression(e,n){return e.visitConditionalExpr(this,n)}clone(){return new t(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}},Ul=class t extends re{constructor(e,n){super(null,n),this.url=e}isEquivalent(e){return e instanceof t&&this.url===e.url}isConstant(){return!1}visitExpression(e,n){return e.visitDynamicImportExpr(this,n)}clone(){return new t(this.url,this.sourceSpan)}},As=class t extends re{constructor(e,n){super(ed,n),this.condition=e}isEquivalent(e){return e instanceof t&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,n){return e.visitNotExpr(this,n)}clone(){return new t(this.condition.clone(),this.sourceSpan)}},Oe=class t{constructor(e,n=null){this.name=e,this.type=n}isEquivalent(e){return this.name===e.name}clone(){return new t(this.name,this.type)}},Xt=class t extends re{constructor(e,n,r,s,i){super(r,s),this.params=e,this.statements=n,this.name=i}isEquivalent(e){return(e instanceof t||e instanceof bs)&&it(this.params,e.params)&&it(this.statements,e.statements)}isConstant(){return!1}visitExpression(e,n){return e.visitFunctionExpr(this,n)}toDeclStmt(e,n){return new bs(e,this.params,this.statements,this.type,n,this.sourceSpan)}clone(){return new t(this.params.map(e=>e.clone()),this.statements,this.type,this.sourceSpan,this.name)}},Mn=class t extends re{constructor(e,n,r,s){super(r,s),this.params=e,this.body=n}isEquivalent(e){return!(e instanceof t)||!it(this.params,e.params)?!1:this.body instanceof re&&e.body instanceof re?this.body.isEquivalent(e.body):Array.isArray(this.body)&&Array.isArray(e.body)?it(this.body,e.body):!1}isConstant(){return!1}visitExpression(e,n){return e.visitArrowFunctionExpr(this,n)}clone(){return new t(this.params.map(e=>e.clone()),Array.isArray(this.body)?this.body:this.body.clone(),this.type,this.sourceSpan)}toDeclStmt(e,n){return new ze(e,this,At,n,this.sourceSpan)}},lr=class t extends re{constructor(e,n,r,s,i=!0){super(r||ka,s),this.operator=e,this.expr=n,this.parens=i}isEquivalent(e){return e instanceof t&&this.operator===e.operator&&this.expr.isEquivalent(e.expr)}isConstant(){return!1}visitExpression(e,n){return e.visitUnaryOperatorExpr(this,n)}clone(){return new t(this.operator,this.expr.clone(),this.type,this.sourceSpan,this.parens)}},ee=class t extends re{constructor(e,n,r,s,i,o=!0){super(s||n.type,i),this.operator=e,this.rhs=r,this.parens=o,this.lhs=n}isEquivalent(e){return e instanceof t&&this.operator===e.operator&&this.lhs.isEquivalent(e.lhs)&&this.rhs.isEquivalent(e.rhs)}isConstant(){return!1}visitExpression(e,n){return e.visitBinaryOperatorExpr(this,n)}clone(){return new t(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan,this.parens)}},ot=class t extends re{constructor(e,n,r,s){super(r,s),this.receiver=e,this.name=n}get index(){return this.name}isEquivalent(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name}isConstant(){return!1}visitExpression(e,n){return e.visitReadPropExpr(this,n)}set(e){return new Lr(this.receiver,this.name,e,null,this.sourceSpan)}clone(){return new t(this.receiver.clone(),this.name,this.type,this.sourceSpan)}},gn=class t extends re{constructor(e,n,r,s){super(r,s),this.receiver=e,this.index=n}isEquivalent(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)}isConstant(){return!1}visitExpression(e,n){return e.visitReadKeyExpr(this,n)}set(e){return new Cs(this.receiver,this.index,e,null,this.sourceSpan)}clone(){return new t(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}},at=class t extends re{constructor(e,n,r){super(n,r),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(e){return e instanceof t&&it(this.entries,e.entries)}visitExpression(e,n){return e.visitLiteralArrayExpr(this,n)}clone(){return new t(this.entries.map(e=>e.clone()),this.type,this.sourceSpan)}},Or=class t{constructor(e,n,r){this.key=e,this.value=n,this.quoted=r}isEquivalent(e){return this.key===e.key&&this.value.isEquivalent(e.value)}clone(){return new t(this.key,this.value.clone(),this.quoted)}},qt=class t extends re{constructor(e,n,r){super(n,r),this.entries=e,this.valueType=null,n&&(this.valueType=n.valueType)}isEquivalent(e){return e instanceof t&&it(this.entries,e.entries)}isConstant(){return this.entries.every(e=>e.value.isConstant())}visitExpression(e,n){return e.visitLiteralMapExpr(this,n)}clone(){let e=this.entries.map(n=>n.clone());return new t(e,this.type,this.sourceSpan)}},Vl=class t extends re{constructor(e,n){super(e[e.length-1].type,n),this.parts=e}isEquivalent(e){return e instanceof t&&it(this.parts,e.parts)}isConstant(){return!1}visitExpression(e,n){return e.visitCommaExpr(this,n)}clone(){return new t(this.parts.map(e=>e.clone()))}},Ns=new xe(null,null,null),rd=new xe(null,At,null),De;(function(t){t[t.None=0]="None",t[t.Final=1]="Final",t[t.Private=2]="Private",t[t.Exported=4]="Exported",t[t.Static=8]="Static"})(De||(De={}));var wi=class{constructor(e,n,r){this.text=e,this.multiline=n,this.trailingNewline=r}toString(){return this.multiline?` ${this.text} `:this.text}},Ti=class extends wi{constructor(e){super("",!0,!0),this.tags=e}toString(){return LE(this.tags)}},cr=class{constructor(e=De.None,n=null,r){this.modifiers=e,this.sourceSpan=n,this.leadingComments=r}hasModifier(e){return(this.modifiers&e)!==0}addLeadingComment(e){this.leadingComments=this.leadingComments??[],this.leadingComments.push(e)}},ze=class t extends cr{constructor(e,n,r,s,i,o){super(s,i,o),this.name=e,this.value=n,this.type=r||n&&n.type||null}isEquivalent(e){return e instanceof t&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)}visitStatement(e,n){return e.visitDeclareVarStmt(this,n)}},bs=class t extends cr{constructor(e,n,r,s,i,o,a){super(i,o,a),this.name=e,this.params=n,this.statements=r,this.type=s||null}isEquivalent(e){return e instanceof t&&it(this.params,e.params)&&it(this.statements,e.statements)}visitStatement(e,n){return e.visitDeclareFunctionStmt(this,n)}},bt=class t extends cr{constructor(e,n,r){super(De.None,n,r),this.expr=e}isEquivalent(e){return e instanceof t&&this.expr.isEquivalent(e.expr)}visitStatement(e,n){return e.visitExpressionStmt(this,n)}},Je=class t extends cr{constructor(e,n=null,r){super(De.None,n,r),this.value=e}isEquivalent(e){return e instanceof t&&this.value.isEquivalent(e.value)}visitStatement(e,n){return e.visitReturnStmt(this,n)}},xi=class t extends cr{constructor(e,n,r=[],s,i){super(De.None,s,i),this.condition=e,this.trueCase=n,this.falseCase=r}isEquivalent(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&it(this.trueCase,e.trueCase)&&it(this.falseCase,e.falseCase)}visitStatement(e,n){return e.visitIfStmt(this,n)}},ql=class{visitType(e,n){return e}visitExpression(e,n){return e.type&&e.type.visitType(this,n),e}visitBuiltinType(e,n){return this.visitType(e,n)}visitExpressionType(e,n){return e.value.visitExpression(this,n),e.typeParams!==null&&e.typeParams.forEach(r=>this.visitType(r,n)),this.visitType(e,n)}visitArrayType(e,n){return this.visitType(e,n)}visitMapType(e,n){return this.visitType(e,n)}visitTransplantedType(e,n){return e}visitWrappedNodeExpr(e,n){return e}visitTypeofExpr(e,n){return this.visitExpression(e,n)}visitReadVarExpr(e,n){return this.visitExpression(e,n)}visitWriteVarExpr(e,n){return e.value.visitExpression(this,n),this.visitExpression(e,n)}visitWriteKeyExpr(e,n){return e.receiver.visitExpression(this,n),e.index.visitExpression(this,n),e.value.visitExpression(this,n),this.visitExpression(e,n)}visitWritePropExpr(e,n){return e.receiver.visitExpression(this,n),e.value.visitExpression(this,n),this.visitExpression(e,n)}visitDynamicImportExpr(e,n){return this.visitExpression(e,n)}visitInvokeFunctionExpr(e,n){return e.fn.visitExpression(this,n),this.visitAllExpressions(e.args,n),this.visitExpression(e,n)}visitTaggedTemplateExpr(e,n){return e.tag.visitExpression(this,n),this.visitAllExpressions(e.template.expressions,n),this.visitExpression(e,n)}visitInstantiateExpr(e,n){return e.classExpr.visitExpression(this,n),this.visitAllExpressions(e.args,n),this.visitExpression(e,n)}visitLiteralExpr(e,n){return this.visitExpression(e,n)}visitLocalizedString(e,n){return this.visitExpression(e,n)}visitExternalExpr(e,n){return e.typeParams&&e.typeParams.forEach(r=>r.visitType(this,n)),this.visitExpression(e,n)}visitConditionalExpr(e,n){return e.condition.visitExpression(this,n),e.trueCase.visitExpression(this,n),e.falseCase.visitExpression(this,n),this.visitExpression(e,n)}visitNotExpr(e,n){return e.condition.visitExpression(this,n),this.visitExpression(e,n)}visitFunctionExpr(e,n){return this.visitAllStatements(e.statements,n),this.visitExpression(e,n)}visitArrowFunctionExpr(e,n){return Array.isArray(e.body)?this.visitAllStatements(e.body,n):this.visitExpression(e.body,n),this.visitExpression(e,n)}visitUnaryOperatorExpr(e,n){return e.expr.visitExpression(this,n),this.visitExpression(e,n)}visitBinaryOperatorExpr(e,n){return e.lhs.visitExpression(this,n),e.rhs.visitExpression(this,n),this.visitExpression(e,n)}visitReadPropExpr(e,n){return e.receiver.visitExpression(this,n),this.visitExpression(e,n)}visitReadKeyExpr(e,n){return e.receiver.visitExpression(this,n),e.index.visitExpression(this,n),this.visitExpression(e,n)}visitLiteralArrayExpr(e,n){return this.visitAllExpressions(e.entries,n),this.visitExpression(e,n)}visitLiteralMapExpr(e,n){return e.entries.forEach(r=>r.value.visitExpression(this,n)),this.visitExpression(e,n)}visitCommaExpr(e,n){return this.visitAllExpressions(e.parts,n),this.visitExpression(e,n)}visitAllExpressions(e,n){e.forEach(r=>r.visitExpression(this,n))}visitDeclareVarStmt(e,n){return e.value&&e.value.visitExpression(this,n),e.type&&e.type.visitType(this,n),e}visitDeclareFunctionStmt(e,n){return this.visitAllStatements(e.statements,n),e.type&&e.type.visitType(this,n),e}visitExpressionStmt(e,n){return e.expr.visitExpression(this,n),e}visitReturnStmt(e,n){return e.value.visitExpression(this,n),e}visitIfStmt(e,n){return e.condition.visitExpression(this,n),this.visitAllStatements(e.trueCase,n),this.visitAllStatements(e.falseCase,n),e}visitAllStatements(e,n){e.forEach(r=>r.visitStatement(this,n))}};function _E(t,e=!1,n=!0){return new wi(t,e,n)}function sd(t=[]){return new Ti(t)}function W(t,e,n){return new Nt(t,e,n)}function L(t,e=null,n){return new Ve(t,null,e,n)}function RE(t,e,n){return t!=null?Fe(L(t,e,null),n):null}function Fe(t,e,n){return new rt(t,e,n)}function kE(t,e){return new xs(t,e)}function to(t){return new Mr(t)}function ie(t,e,n){return new at(t,e,n)}function Xe(t,e=null){return new qt(t.map(n=>new Or(n.key,n.value,n.quoted)),e,null)}function PE(t,e,n,r){return new lr(t,e,n,r)}function id(t,e){return new As(t,e)}function Yr(t,e,n,r,s){return new Xt(t,e,n,r,s)}function en(t,e,n,r){return new Mn(t,e,n,r)}function no(t,e,n,r,s){return new xi(t,e,n,r,s)}function od(t,e,n,r){return new Ei(t,e,n,r)}function v(t,e,n){return new xe(t,e,n)}function ad(t,e,n,r,s){return new Si(t,e,n,r,s)}function ME(t){return t instanceof xe&&t.value===null}function fh(t){let e="";if(t.tagName&&(e+=` @${t.tagName}`),t.text){if(t.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');e+=" "+t.text.replace(/@/g,"\\@")}return e}function LE(t){if(t.length===0)return"";if(t.length===1&&t[0].tagName&&!t[0].text)return`*${fh(t[0])} `;let e=`*
|
|
1
|
+
"use strict";var Qv=Object.create;var Ao=Object.defineProperty;var Jv=Object.getOwnPropertyDescriptor;var Zv=Object.getOwnPropertyNames;var eE=Object.getPrototypeOf,tE=Object.prototype.hasOwnProperty;var nE=(t,e)=>()=>(t&&(e=t(t=0)),e);var G=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),rE=(t,e)=>{for(var n in e)Ao(t,n,{get:e[n],enumerable:!0})},Yp=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Zv(e))!tE.call(t,s)&&s!==n&&Ao(t,s,{get:()=>e[s],enumerable:!(r=Jv(e,s))||r.enumerable});return t};var T=(t,e,n)=>(n=t!=null?Qv(eE(t)):{},Yp(e||!t||!t.__esModule?Ao(n,"default",{value:t,enumerable:!0}):n,t)),sE=t=>Yp(Ao({},"__esModule",{value:!0}),t);var P,S=nE(()=>{"use strict";P=require("url").pathToFileURL(__filename)});var Eo=G((c2,Wg)=>{S();var l_="2.0.0",c_=Number.MAX_SAFE_INTEGER||9007199254740991,u_=16,p_=250,h_=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Wg.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:u_,MAX_SAFE_BUILD_LENGTH:p_,MAX_SAFE_INTEGER:c_,RELEASE_TYPES:h_,SEMVER_SPEC_VERSION:l_,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var So=G((p2,jg)=>{S();var f_=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};jg.exports=f_});var ei=G((zn,Kg)=>{S();var{MAX_SAFE_COMPONENT_LENGTH:Ep,MAX_SAFE_BUILD_LENGTH:d_,MAX_LENGTH:m_}=Eo(),g_=So();zn=Kg.exports={};var y_=zn.re=[],v_=zn.safeRe=[],R=zn.src=[],k=zn.t={},E_=0,Sp="[a-zA-Z0-9-]",S_=[["\\s",1],["\\d",m_],[Sp,d_]],w_=t=>{for(let[e,n]of S_)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},X=(t,e,n)=>{let r=w_(e),s=E_++;g_(t,s,e),k[t]=s,R[s]=e,y_[s]=new RegExp(e,n?"g":void 0),v_[s]=new RegExp(r,n?"g":void 0)};X("NUMERICIDENTIFIER","0|[1-9]\\d*");X("NUMERICIDENTIFIERLOOSE","\\d+");X("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Sp}*`);X("MAINVERSION",`(${R[k.NUMERICIDENTIFIER]})\\.(${R[k.NUMERICIDENTIFIER]})\\.(${R[k.NUMERICIDENTIFIER]})`);X("MAINVERSIONLOOSE",`(${R[k.NUMERICIDENTIFIERLOOSE]})\\.(${R[k.NUMERICIDENTIFIERLOOSE]})\\.(${R[k.NUMERICIDENTIFIERLOOSE]})`);X("PRERELEASEIDENTIFIER",`(?:${R[k.NUMERICIDENTIFIER]}|${R[k.NONNUMERICIDENTIFIER]})`);X("PRERELEASEIDENTIFIERLOOSE",`(?:${R[k.NUMERICIDENTIFIERLOOSE]}|${R[k.NONNUMERICIDENTIFIER]})`);X("PRERELEASE",`(?:-(${R[k.PRERELEASEIDENTIFIER]}(?:\\.${R[k.PRERELEASEIDENTIFIER]})*))`);X("PRERELEASELOOSE",`(?:-?(${R[k.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${R[k.PRERELEASEIDENTIFIERLOOSE]})*))`);X("BUILDIDENTIFIER",`${Sp}+`);X("BUILD",`(?:\\+(${R[k.BUILDIDENTIFIER]}(?:\\.${R[k.BUILDIDENTIFIER]})*))`);X("FULLPLAIN",`v?${R[k.MAINVERSION]}${R[k.PRERELEASE]}?${R[k.BUILD]}?`);X("FULL",`^${R[k.FULLPLAIN]}$`);X("LOOSEPLAIN",`[v=\\s]*${R[k.MAINVERSIONLOOSE]}${R[k.PRERELEASELOOSE]}?${R[k.BUILD]}?`);X("LOOSE",`^${R[k.LOOSEPLAIN]}$`);X("GTLT","((?:<|>)?=?)");X("XRANGEIDENTIFIERLOOSE",`${R[k.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);X("XRANGEIDENTIFIER",`${R[k.NUMERICIDENTIFIER]}|x|X|\\*`);X("XRANGEPLAIN",`[v=\\s]*(${R[k.XRANGEIDENTIFIER]})(?:\\.(${R[k.XRANGEIDENTIFIER]})(?:\\.(${R[k.XRANGEIDENTIFIER]})(?:${R[k.PRERELEASE]})?${R[k.BUILD]}?)?)?`);X("XRANGEPLAINLOOSE",`[v=\\s]*(${R[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[k.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[k.XRANGEIDENTIFIERLOOSE]})(?:${R[k.PRERELEASELOOSE]})?${R[k.BUILD]}?)?)?`);X("XRANGE",`^${R[k.GTLT]}\\s*${R[k.XRANGEPLAIN]}$`);X("XRANGELOOSE",`^${R[k.GTLT]}\\s*${R[k.XRANGEPLAINLOOSE]}$`);X("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Ep}})(?:\\.(\\d{1,${Ep}}))?(?:\\.(\\d{1,${Ep}}))?`);X("COERCE",`${R[k.COERCEPLAIN]}(?:$|[^\\d])`);X("COERCEFULL",R[k.COERCEPLAIN]+`(?:${R[k.PRERELEASE]})?(?:${R[k.BUILD]})?(?:$|[^\\d])`);X("COERCERTL",R[k.COERCE],!0);X("COERCERTLFULL",R[k.COERCEFULL],!0);X("LONETILDE","(?:~>?)");X("TILDETRIM",`(\\s*)${R[k.LONETILDE]}\\s+`,!0);zn.tildeTrimReplace="$1~";X("TILDE",`^${R[k.LONETILDE]}${R[k.XRANGEPLAIN]}$`);X("TILDELOOSE",`^${R[k.LONETILDE]}${R[k.XRANGEPLAINLOOSE]}$`);X("LONECARET","(?:\\^)");X("CARETTRIM",`(\\s*)${R[k.LONECARET]}\\s+`,!0);zn.caretTrimReplace="$1^";X("CARET",`^${R[k.LONECARET]}${R[k.XRANGEPLAIN]}$`);X("CARETLOOSE",`^${R[k.LONECARET]}${R[k.XRANGEPLAINLOOSE]}$`);X("COMPARATORLOOSE",`^${R[k.GTLT]}\\s*(${R[k.LOOSEPLAIN]})$|^$`);X("COMPARATOR",`^${R[k.GTLT]}\\s*(${R[k.FULLPLAIN]})$|^$`);X("COMPARATORTRIM",`(\\s*)${R[k.GTLT]}\\s*(${R[k.LOOSEPLAIN]}|${R[k.XRANGEPLAIN]})`,!0);zn.comparatorTrimReplace="$1$2$3";X("HYPHENRANGE",`^\\s*(${R[k.XRANGEPLAIN]})\\s+-\\s+(${R[k.XRANGEPLAIN]})\\s*$`);X("HYPHENRANGELOOSE",`^\\s*(${R[k.XRANGEPLAINLOOSE]})\\s+-\\s+(${R[k.XRANGEPLAINLOOSE]})\\s*$`);X("STAR","(<|>)?=?\\s*\\*");X("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");X("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ja=G((d2,zg)=>{S();var T_=Object.freeze({loose:!0}),x_=Object.freeze({}),C_=t=>t?typeof t!="object"?T_:t:x_;zg.exports=C_});var wp=G((g2,Qg)=>{S();var Xg=/^[0-9]+$/,Yg=(t,e)=>{let n=Xg.test(t),r=Xg.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:t<e?-1:1},I_=(t,e)=>Yg(e,t);Qg.exports={compareIdentifiers:Yg,rcompareIdentifiers:I_}});var et=G((v2,ty)=>{S();var Za=So(),{MAX_LENGTH:Jg,MAX_SAFE_INTEGER:el}=Eo(),{safeRe:Zg,t:ey}=ei(),A_=Ja(),{compareIdentifiers:ti}=wp(),Tp=class t{constructor(e,n){if(n=A_(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.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>Jg)throw new TypeError(`version is longer than ${Jg} characters`);Za("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=e.trim().match(n.loose?Zg[ey.LOOSE]:Zg[ey.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>el||this.major<0)throw new TypeError("Invalid major version");if(this.minor>el||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>el||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<el)return i}return s}):this.prerelease=[],this.build=r[5]?r[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(Za("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)),ti(this.major,e.major)||ti(this.minor,e.minor)||ti(this.patch,e.patch)}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 n=0;do{let r=this.prerelease[n],s=e.prerelease[n];if(Za("prerelease compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return ti(r,s)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let r=this.build[n],s=e.build[n];if(Za("build compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return ti(r,s)}while(++n)}inc(e,n,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);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 s=Number(r)?1:0;if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[s];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(n){let i=[n,s];r===!1&&(i=[n]),ti(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ty.exports=Tp});var ss=G((S2,ry)=>{S();var ny=et(),N_=(t,e,n=!1)=>{if(t instanceof ny)return t;try{return new ny(t,e)}catch(r){if(!n)return null;throw r}};ry.exports=N_});var iy=G((T2,sy)=>{S();var b_=ss(),D_=(t,e)=>{let n=b_(t,e);return n?n.version:null};sy.exports=D_});var ay=G((C2,oy)=>{S();var __=ss(),R_=(t,e)=>{let n=__(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};oy.exports=R_});var uy=G((A2,cy)=>{S();var ly=et(),k_=(t,e,n,r,s)=>{typeof n=="string"&&(s=r,r=n,n=void 0);try{return new ly(t instanceof ly?t.version:t,n).inc(e,r,s).version}catch{return null}};cy.exports=k_});var fy=G((b2,hy)=>{S();var py=ss(),P_=(t,e)=>{let n=py(t,null,!0),r=py(e,null,!0),s=n.compare(r);if(s===0)return null;let i=s>0,o=i?n:r,a=i?r:n,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l)return!a.patch&&!a.minor?"major":o.patch?"patch":o.minor?"minor":"major";let u=l?"pre":"";return n.major!==r.major?u+"major":n.minor!==r.minor?u+"minor":n.patch!==r.patch?u+"patch":"prerelease"};hy.exports=P_});var my=G((_2,dy)=>{S();var M_=et(),L_=(t,e)=>new M_(t,e).major;dy.exports=L_});var yy=G((k2,gy)=>{S();var O_=et(),F_=(t,e)=>new O_(t,e).minor;gy.exports=F_});var Ey=G((M2,vy)=>{S();var B_=et(),$_=(t,e)=>new B_(t,e).patch;vy.exports=$_});var wy=G((O2,Sy)=>{S();var U_=ss(),V_=(t,e)=>{let n=U_(t,e);return n&&n.prerelease.length?n.prerelease:null};Sy.exports=V_});var Ht=G((B2,xy)=>{S();var Ty=et(),q_=(t,e,n)=>new Ty(t,n).compare(new Ty(e,n));xy.exports=q_});var Iy=G((U2,Cy)=>{S();var G_=Ht(),H_=(t,e,n)=>G_(e,t,n);Cy.exports=H_});var Ny=G((q2,Ay)=>{S();var W_=Ht(),j_=(t,e)=>W_(t,e,!0);Ay.exports=j_});var tl=G((H2,Dy)=>{S();var by=et(),K_=(t,e,n)=>{let r=new by(t,n),s=new by(e,n);return r.compare(s)||r.compareBuild(s)};Dy.exports=K_});var Ry=G((j2,_y)=>{S();var z_=tl(),X_=(t,e)=>t.sort((n,r)=>z_(n,r,e));_y.exports=X_});var Py=G((z2,ky)=>{S();var Y_=tl(),Q_=(t,e)=>t.sort((n,r)=>Y_(r,n,e));ky.exports=Q_});var wo=G((Y2,My)=>{S();var J_=Ht(),Z_=(t,e,n)=>J_(t,e,n)>0;My.exports=Z_});var nl=G((J2,Ly)=>{S();var eR=Ht(),tR=(t,e,n)=>eR(t,e,n)<0;Ly.exports=tR});var xp=G((eF,Oy)=>{S();var nR=Ht(),rR=(t,e,n)=>nR(t,e,n)===0;Oy.exports=rR});var Cp=G((nF,Fy)=>{S();var sR=Ht(),iR=(t,e,n)=>sR(t,e,n)!==0;Fy.exports=iR});var rl=G((sF,By)=>{S();var oR=Ht(),aR=(t,e,n)=>oR(t,e,n)>=0;By.exports=aR});var sl=G((oF,$y)=>{S();var lR=Ht(),cR=(t,e,n)=>lR(t,e,n)<=0;$y.exports=cR});var Ip=G((lF,Uy)=>{S();var uR=xp(),pR=Cp(),hR=wo(),fR=rl(),dR=nl(),mR=sl(),gR=(t,e,n,r)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return uR(t,n,r);case"!=":return pR(t,n,r);case">":return hR(t,n,r);case">=":return fR(t,n,r);case"<":return dR(t,n,r);case"<=":return mR(t,n,r);default:throw new TypeError(`Invalid operator: ${e}`)}};Uy.exports=gR});var qy=G((uF,Vy)=>{S();var yR=et(),vR=ss(),{safeRe:il,t:ol}=ei(),ER=(t,e)=>{if(t instanceof yR)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?il[ol.COERCEFULL]:il[ol.COERCE]);else{let l=e.includePrerelease?il[ol.COERCERTLFULL]:il[ol.COERCERTL],c;for(;(c=l.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||c.index+c[0].length!==n.index+n[0].length)&&(n=c),l.lastIndex=c.index+c[1].length+c[2].length;l.lastIndex=-1}if(n===null)return null;let r=n[2],s=n[3]||"0",i=n[4]||"0",o=e.includePrerelease&&n[5]?`-${n[5]}`:"",a=e.includePrerelease&&n[6]?`+${n[6]}`:"";return vR(`${r}.${s}.${i}${o}${a}`,e)};Vy.exports=ER});var Hy=G((hF,Gy)=>{S();var Ap=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(e,n)}return this}};Gy.exports=Ap});var Wt=G((dF,zy)=>{S();var SR=/\s+/g,Np=class t{constructor(e,n){if(n=TR(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof bp)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().replace(SR," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(s=>!jy(s[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&DR(s[0])){this.set=[s];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 n=this.set[e];for(let r=0;r<n.length;r++)r>0&&(this.formatted+=" "),this.formatted+=n[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&NR)|(this.options.loose&&bR))+":"+e,s=Wy.get(r);if(s)return s;let i=this.options.loose,o=i?Tt[ut.HYPHENRANGELOOSE]:Tt[ut.HYPHENRANGE];e=e.replace(o,$R(this.options.includePrerelease)),ye("hyphen replace",e),e=e.replace(Tt[ut.COMPARATORTRIM],CR),ye("comparator trim",e),e=e.replace(Tt[ut.TILDETRIM],IR),ye("tilde trim",e),e=e.replace(Tt[ut.CARETTRIM],AR),ye("caret trim",e);let a=e.split(" ").map(h=>_R(h,this.options)).join(" ").split(/\s+/).map(h=>BR(h,this.options));i&&(a=a.filter(h=>(ye("loose invalid filter",h,this.options),!!h.match(Tt[ut.COMPARATORLOOSE])))),ye("range list",a);let l=new Map,c=a.map(h=>new bp(h,this.options));for(let h of c){if(jy(h))return[h];l.set(h.value,h)}l.size>1&&l.has("")&&l.delete("");let u=[...l.values()];return Wy.set(r,u),u}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(r=>Ky(r,n)&&e.set.some(s=>Ky(s,n)&&r.every(i=>s.every(o=>i.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new xR(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(UR(this.set[n],e,this.options))return!0;return!1}};zy.exports=Np;var wR=Hy(),Wy=new wR,TR=Ja(),bp=To(),ye=So(),xR=et(),{safeRe:Tt,t:ut,comparatorTrimReplace:CR,tildeTrimReplace:IR,caretTrimReplace:AR}=ei(),{FLAG_INCLUDE_PRERELEASE:NR,FLAG_LOOSE:bR}=Eo(),jy=t=>t.value==="<0.0.0-0",DR=t=>t.value==="",Ky=(t,e)=>{let n=!0,r=t.slice(),s=r.pop();for(;n&&r.length;)n=r.every(i=>s.intersects(i,e)),s=r.pop();return n},_R=(t,e)=>(ye("comp",t,e),t=PR(t,e),ye("caret",t),t=RR(t,e),ye("tildes",t),t=LR(t,e),ye("xrange",t),t=FR(t,e),ye("stars",t),t),pt=t=>!t||t.toLowerCase()==="x"||t==="*",RR=(t,e)=>t.trim().split(/\s+/).map(n=>kR(n,e)).join(" "),kR=(t,e)=>{let n=e.loose?Tt[ut.TILDELOOSE]:Tt[ut.TILDE];return t.replace(n,(r,s,i,o,a)=>{ye("tilde",t,r,s,i,o,a);let l;return pt(s)?l="":pt(i)?l=`>=${s}.0.0 <${+s+1}.0.0-0`:pt(o)?l=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:a?(ye("replaceTilde pr",a),l=`>=${s}.${i}.${o}-${a} <${s}.${+i+1}.0-0`):l=`>=${s}.${i}.${o} <${s}.${+i+1}.0-0`,ye("tilde return",l),l})},PR=(t,e)=>t.trim().split(/\s+/).map(n=>MR(n,e)).join(" "),MR=(t,e)=>{ye("caret",t,e);let n=e.loose?Tt[ut.CARETLOOSE]:Tt[ut.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,(s,i,o,a,l)=>{ye("caret",t,s,i,o,a,l);let c;return pt(i)?c="":pt(o)?c=`>=${i}.0.0${r} <${+i+1}.0.0-0`:pt(a)?i==="0"?c=`>=${i}.${o}.0${r} <${i}.${+o+1}.0-0`:c=`>=${i}.${o}.0${r} <${+i+1}.0.0-0`:l?(ye("replaceCaret pr",l),i==="0"?o==="0"?c=`>=${i}.${o}.${a}-${l} <${i}.${o}.${+a+1}-0`:c=`>=${i}.${o}.${a}-${l} <${i}.${+o+1}.0-0`:c=`>=${i}.${o}.${a}-${l} <${+i+1}.0.0-0`):(ye("no pr"),i==="0"?o==="0"?c=`>=${i}.${o}.${a}${r} <${i}.${o}.${+a+1}-0`:c=`>=${i}.${o}.${a}${r} <${i}.${+o+1}.0-0`:c=`>=${i}.${o}.${a} <${+i+1}.0.0-0`),ye("caret return",c),c})},LR=(t,e)=>(ye("replaceXRanges",t,e),t.split(/\s+/).map(n=>OR(n,e)).join(" ")),OR=(t,e)=>{t=t.trim();let n=e.loose?Tt[ut.XRANGELOOSE]:Tt[ut.XRANGE];return t.replace(n,(r,s,i,o,a,l)=>{ye("xRange",t,r,s,i,o,a,l);let c=pt(i),u=c||pt(o),h=u||pt(a),d=h;return s==="="&&d&&(s=""),l=e.includePrerelease?"-0":"",c?s===">"||s==="<"?r="<0.0.0-0":r="*":s&&d?(u&&(o=0),a=0,s===">"?(s=">=",u?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):s==="<="&&(s="<",u?i=+i+1:o=+o+1),s==="<"&&(l="-0"),r=`${s+i}.${o}.${a}${l}`):u?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:h&&(r=`>=${i}.${o}.0${l} <${i}.${+o+1}.0-0`),ye("xRange return",r),r})},FR=(t,e)=>(ye("replaceStars",t,e),t.trim().replace(Tt[ut.STAR],"")),BR=(t,e)=>(ye("replaceGTE0",t,e),t.trim().replace(Tt[e.includePrerelease?ut.GTE0PRE:ut.GTE0],"")),$R=t=>(e,n,r,s,i,o,a,l,c,u,h,d)=>(pt(r)?n="":pt(s)?n=`>=${r}.0.0${t?"-0":""}`:pt(i)?n=`>=${r}.${s}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,pt(c)?l="":pt(u)?l=`<${+c+1}.0.0-0`:pt(h)?l=`<${c}.${+u+1}.0-0`:d?l=`<=${c}.${u}.${h}-${d}`:t?l=`<${c}.${u}.${+h+1}-0`:l=`<=${l}`,`${n} ${l}`.trim()),UR=(t,e,n)=>{for(let r=0;r<t.length;r++)if(!t[r].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let r=0;r<t.length;r++)if(ye(t[r].semver),t[r].semver!==bp.ANY&&t[r].semver.prerelease.length>0){let s=t[r].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var To=G((gF,ev)=>{S();var xo=Symbol("SemVer ANY"),Rp=class t{static get ANY(){return xo}constructor(e,n){if(n=Xy(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),_p("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===xo?this.value="":this.value=this.operator+this.semver.version,_p("comp",this)}parse(e){let n=this.options.loose?Yy[Qy.COMPARATORLOOSE]:Yy[Qy.COMPARATOR],r=e.match(n);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new Jy(r[2],this.options.loose):this.semver=xo}toString(){return this.value}test(e){if(_p("Comparator.test",e,this.options.loose),this.semver===xo||e===xo)return!0;if(typeof e=="string")try{e=new Jy(e,this.options)}catch{return!1}return Dp(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Zy(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new Zy(this.value,n).test(e.semver):(n=Xy(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.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("=")||Dp(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Dp(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};ev.exports=Rp;var Xy=Ja(),{safeRe:Yy,t:Qy}=ei(),Dp=Ip(),_p=So(),Jy=et(),Zy=Wt()});var Co=G((vF,tv)=>{S();var VR=Wt(),qR=(t,e,n)=>{try{e=new VR(e,n)}catch{return!1}return e.test(t)};tv.exports=qR});var rv=G((SF,nv)=>{S();var GR=Wt(),HR=(t,e)=>new GR(t,e).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));nv.exports=HR});var iv=G((TF,sv)=>{S();var WR=et(),jR=Wt(),KR=(t,e,n)=>{let r=null,s=null,i=null;try{i=new jR(e,n)}catch{return null}return t.forEach(o=>{i.test(o)&&(!r||s.compare(o)===-1)&&(r=o,s=new WR(r,n))}),r};sv.exports=KR});var av=G((CF,ov)=>{S();var zR=et(),XR=Wt(),YR=(t,e,n)=>{let r=null,s=null,i=null;try{i=new XR(e,n)}catch{return null}return t.forEach(o=>{i.test(o)&&(!r||s.compare(o)===1)&&(r=o,s=new zR(r,n))}),r};ov.exports=YR});var uv=G((AF,cv)=>{S();var kp=et(),QR=Wt(),lv=wo(),JR=(t,e)=>{t=new QR(t,e);let n=new kp("0.0.0");if(t.test(n)||(n=new kp("0.0.0-0"),t.test(n)))return n;n=null;for(let r=0;r<t.set.length;++r){let s=t.set[r],i=null;s.forEach(o=>{let a=new kp(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||lv(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||lv(n,i))&&(n=i)}return n&&t.test(n)?n:null};cv.exports=JR});var hv=G((bF,pv)=>{S();var ZR=Wt(),ek=(t,e)=>{try{return new ZR(t,e).range||"*"}catch{return null}};pv.exports=ek});var al=G((_F,gv)=>{S();var tk=et(),mv=To(),{ANY:nk}=mv,rk=Wt(),sk=Co(),fv=wo(),dv=nl(),ik=sl(),ok=rl(),ak=(t,e,n,r)=>{t=new tk(t,r),e=new rk(e,r);let s,i,o,a,l;switch(n){case">":s=fv,i=ik,o=dv,a=">",l=">=";break;case"<":s=dv,i=ok,o=fv,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sk(t,e,r))return!1;for(let c=0;c<e.set.length;++c){let u=e.set[c],h=null,d=null;if(u.forEach(g=>{g.semver===nk&&(g=new mv(">=0.0.0")),h=h||g,d=d||g,s(g.semver,h.semver,r)?h=g:o(g.semver,d.semver,r)&&(d=g)}),h.operator===a||h.operator===l||(!d.operator||d.operator===a)&&i(t,d.semver))return!1;if(d.operator===l&&o(t,d.semver))return!1}return!0};gv.exports=ak});var vv=G((kF,yv)=>{S();var lk=al(),ck=(t,e,n)=>lk(t,e,">",n);yv.exports=ck});var Sv=G((MF,Ev)=>{S();var uk=al(),pk=(t,e,n)=>uk(t,e,"<",n);Ev.exports=pk});var xv=G((OF,Tv)=>{S();var wv=Wt(),hk=(t,e,n)=>(t=new wv(t,n),e=new wv(e,n),t.intersects(e,n));Tv.exports=hk});var Iv=G((BF,Cv)=>{S();var fk=Co(),dk=Ht();Cv.exports=(t,e,n)=>{let r=[],s=null,i=null,o=t.sort((u,h)=>dk(u,h,n));for(let u of o)fk(u,e,n)?(i=u,s||(s=u)):(i&&r.push([s,i]),i=null,s=null);s&&r.push([s,null]);let a=[];for(let[u,h]of r)u===h?a.push(u):!h&&u===o[0]?a.push("*"):h?u===o[0]?a.push(`<=${h}`):a.push(`${u} - ${h}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length<c.length?l:e}});var Rv=G((UF,_v)=>{S();var Av=Wt(),Mp=To(),{ANY:Pp}=Mp,Io=Co(),Lp=Ht(),mk=(t,e,n={})=>{if(t===e)return!0;t=new Av(t,n),e=new Av(e,n);let r=!1;e:for(let s of t.set){for(let i of e.set){let o=yk(s,i,n);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},gk=[new Mp(">=0.0.0-0")],Nv=[new Mp(">=0.0.0")],yk=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Pp){if(e.length===1&&e[0].semver===Pp)return!0;n.includePrerelease?t=gk:t=Nv}if(e.length===1&&e[0].semver===Pp){if(n.includePrerelease)return!0;e=Nv}let r=new Set,s,i;for(let g of t)g.operator===">"||g.operator===">="?s=bv(s,g,n):g.operator==="<"||g.operator==="<="?i=Dv(i,g,n):r.add(g.semver);if(r.size>1)return null;let o;if(s&&i){if(o=Lp(s.semver,i.semver,n),o>0)return null;if(o===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let g of r){if(s&&!Io(g,String(s),n)||i&&!Io(g,String(i),n))return null;for(let y of e)if(!Io(g,String(y),n))return!1;return!0}let a,l,c,u,h=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,d=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let g of e){if(u=u||g.operator===">"||g.operator===">=",c=c||g.operator==="<"||g.operator==="<=",s){if(d&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===d.major&&g.semver.minor===d.minor&&g.semver.patch===d.patch&&(d=!1),g.operator===">"||g.operator===">="){if(a=bv(s,g,n),a===g&&a!==s)return!1}else if(s.operator===">="&&!Io(s.semver,String(g),n))return!1}if(i){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator==="<"||g.operator==="<="){if(l=Dv(i,g,n),l===g&&l!==i)return!1}else if(i.operator==="<="&&!Io(i.semver,String(g),n))return!1}if(!g.operator&&(i||s)&&o!==0)return!1}return!(s&&c&&!i&&o!==0||i&&u&&!s&&o!==0||d||h)},bv=(t,e,n)=>{if(!t)return e;let r=Lp(t.semver,e.semver,n);return r>0?t:r<0||e.operator===">"&&t.operator===">="?e:t},Dv=(t,e,n)=>{if(!t)return e;let r=Lp(t.semver,e.semver,n);return r<0?t:r>0||e.operator==="<"&&t.operator==="<="?e:t};_v.exports=mk});var Lv=G((qF,Mv)=>{S();var Op=ei(),kv=Eo(),vk=et(),Pv=wp(),Ek=ss(),Sk=iy(),wk=ay(),Tk=uy(),xk=fy(),Ck=my(),Ik=yy(),Ak=Ey(),Nk=wy(),bk=Ht(),Dk=Iy(),_k=Ny(),Rk=tl(),kk=Ry(),Pk=Py(),Mk=wo(),Lk=nl(),Ok=xp(),Fk=Cp(),Bk=rl(),$k=sl(),Uk=Ip(),Vk=qy(),qk=To(),Gk=Wt(),Hk=Co(),Wk=rv(),jk=iv(),Kk=av(),zk=uv(),Xk=hv(),Yk=al(),Qk=vv(),Jk=Sv(),Zk=xv(),eP=Iv(),tP=Rv();Mv.exports={parse:Ek,valid:Sk,clean:wk,inc:Tk,diff:xk,major:Ck,minor:Ik,patch:Ak,prerelease:Nk,compare:bk,rcompare:Dk,compareLoose:_k,compareBuild:Rk,sort:kk,rsort:Pk,gt:Mk,lt:Lk,eq:Ok,neq:Fk,gte:Bk,lte:$k,cmp:Uk,coerce:Vk,Comparator:qk,Range:Gk,satisfies:Hk,toComparators:Wk,maxSatisfying:jk,minSatisfying:Kk,minVersion:zk,validRange:Xk,outside:Yk,gtr:Qk,ltr:Jk,intersects:Zk,simplifyRange:eP,subset:tP,SemVer:vk,re:Op.re,src:Op.src,tokens:Op.t,SEMVER_SPEC_VERSION:kv.SEMVER_SPEC_VERSION,RELEASE_TYPES:kv.RELEASE_TYPES,compareIdentifiers:Pv.compareIdentifiers,rcompareIdentifiers:Pv.rcompareIdentifiers}});var oM={};rE(oM,{angularJitApplicationTransform:()=>vp});module.exports=sE(oM);S();S();var Xv=require("module");S();var Og=require("module");S();var Sg=require("module");S();var Xm=require("module");S();var Zp=require("module");S();var Qp=require("module"),is=(0,Qp.createRequire)(P),Jp=(t=>typeof is<"u"?is:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof is<"u"?is:e)[n]}):t)(function(t){if(typeof is<"u")return is.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var aE=T(require("typescript"),1),Ye=T(require("fs"),1),th=require("module"),ht=T(require("path"),1),nh=require("url"),pM=(0,Zp.createRequire)(P);var iE=class{exists(t){throw ue()}readFile(t){throw ue()}readFileBuffer(t){throw ue()}writeFile(t,e,n){throw ue()}removeFile(t){throw ue()}symlink(t,e){throw ue()}readdir(t){throw ue()}lstat(t){throw ue()}stat(t){throw ue()}pwd(){throw ue()}chdir(t){throw ue()}extname(t){throw ue()}copyFile(t,e){throw ue()}moveFile(t,e){throw ue()}ensureDir(t){throw ue()}removeDeep(t){throw ue()}isCaseSensitive(){throw ue()}resolve(...t){throw ue()}dirname(t){throw ue()}join(t,...e){throw ue()}isRoot(t){throw ue()}isRooted(t){throw ue()}relative(t,e){throw ue()}basename(t,e){throw ue()}realpath(t){throw ue()}getDefaultLibLocation(){throw ue()}normalize(t){throw ue()}};function ue(){return new Error("FileSystem has not been configured. Please call `setFileSystem()` before calling this method.")}var oE=new iE;function eh(t){oE=t}var fM=Symbol("AbsolutePath");var lE=class{pwd(){return this.normalize(process.cwd())}chdir(t){process.chdir(t)}resolve(...t){return this.normalize(ht.resolve(...t))}dirname(t){return this.normalize(ht.dirname(t))}join(t,...e){return this.normalize(ht.join(t,...e))}isRoot(t){return this.dirname(t)===this.normalize(t)}isRooted(t){return ht.isAbsolute(t)}relative(t,e){return this.normalize(ht.relative(t,e))}basename(t,e){return ht.basename(t,e)}extname(t){return ht.extname(t)}normalize(t){return t.replace(/\\/g,"/")}},ll=typeof __filename<"u",rh=ll?null:P,cE=ll?__filename:(0,nh.fileURLToPath)(rh),uE=class extends lE{constructor(){super(...arguments),this._caseSensitive=void 0}isCaseSensitive(){return this._caseSensitive===void 0&&(this._caseSensitive=!Ye.default.existsSync(this.normalize(pE(cE)))),this._caseSensitive}exists(t){return Ye.default.existsSync(t)}readFile(t){return Ye.default.readFileSync(t,"utf8")}readFileBuffer(t){return Ye.default.readFileSync(t)}readdir(t){return Ye.default.readdirSync(t)}lstat(t){return Ye.default.lstatSync(t)}stat(t){return Ye.default.statSync(t)}realpath(t){return this.resolve(Ye.default.realpathSync(t))}getDefaultLibLocation(){let t=ll?Jp:(0,th.createRequire)(rh);return this.resolve(t.resolve("typescript"),"..")}},sh=class extends uE{writeFile(t,e,n=!1){Ye.default.writeFileSync(t,e,n?{flag:"wx"}:void 0)}removeFile(t){Ye.default.unlinkSync(t)}symlink(t,e){Ye.default.symlinkSync(t,e)}copyFile(t,e){Ye.default.copyFileSync(t,e)}moveFile(t,e){Ye.default.renameSync(t,e)}ensureDir(t){Ye.default.mkdirSync(t,{recursive:!0})}removeDeep(t){Ye.default.rmdirSync(t,{recursive:!0})}};function pE(t){return t.replace(/\w/g,e=>e.toUpperCase()===e?e.toLowerCase():e.toUpperCase())}var Qs=T(require("typescript"),1),M=T(require("typescript"),1),lo=T(require("typescript"),1),Ne=T(require("typescript"),1),Gu=T(require("typescript"),1),Qm=T(require("typescript"),1);S();var ih=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g"),Yt=class t{constructor(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}static parse(e){let n=[],r=(l,c)=>{c.notSelectors.length>0&&!c.element&&c.classNames.length==0&&c.attrs.length==0&&(c.element="*"),l.push(c)},s=new t,i,o=s,a=!1;for(ih.lastIndex=0;i=ih.exec(e);){if(i[1]){if(a)throw new Error("Nesting :not in a selector is not allowed");a=!0,o=new t,s.notSelectors.push(o)}let l=i[2];if(l){let u=i[3];u==="#"?o.addAttribute("id",l.slice(1)):u==="."?o.addClassName(l.slice(1)):o.setElement(l)}let c=i[4];if(c&&o.addAttribute(o.unescapeAttribute(c),i[6]),i[7]&&(a=!1,o=s),i[8]){if(a)throw new Error("Multiple selectors in :not are not supported");r(n,s),s=o=new t}}return r(n,s),n}unescapeAttribute(e){let n="",r=!1;for(let s=0;s<e.length;s++){let i=e.charAt(s);if(i==="\\"){r=!0;continue}if(i==="$"&&!r)throw new Error(`Error in attribute selector "${e}". Unescaped "$" is not supported. Please escape with "\\$".`);r=!1,n+=i}return n}escapeAttribute(e){return e.replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}isElementSelector(){return this.hasElementSelector()&&this.classNames.length==0&&this.attrs.length==0&&this.notSelectors.length===0}hasElementSelector(){return!!this.element}setElement(e=null){this.element=e}getAttrs(){let e=[];return this.classNames.length>0&&e.push("class",this.classNames.join(" ")),e.concat(this.attrs)}addAttribute(e,n=""){this.attrs.push(e,n&&n.toLowerCase()||"")}addClassName(e){this.classNames.push(e.toLowerCase())}toString(){let e=this.element||"";if(this.classNames&&this.classNames.forEach(n=>e+=`.${n}`),this.attrs)for(let n=0;n<this.attrs.length;n+=2){let r=this.escapeAttribute(this.attrs[n]),s=this.attrs[n+1];e+=`[${r}${s?"="+s:""}]`}return this.notSelectors.forEach(n=>e+=`:not(${n})`),e}},or=class t{constructor(){this._elementMap=new Map,this._elementPartialMap=new Map,this._classMap=new Map,this._classPartialMap=new Map,this._attrValueMap=new Map,this._attrValuePartialMap=new Map,this._listContexts=[]}static createNotMatcher(e){let n=new t;return n.addSelectables(e,null),n}addSelectables(e,n){let r=null;e.length>1&&(r=new kl(e),this._listContexts.push(r));for(let s=0;s<e.length;s++)this._addSelectable(e[s],n,r)}_addSelectable(e,n,r){let s=this,i=e.element,o=e.classNames,a=e.attrs,l=new Pl(e,n,r);if(i&&(a.length===0&&o.length===0?this._addTerminal(s._elementMap,i,l):s=this._addPartial(s._elementPartialMap,i)),o)for(let c=0;c<o.length;c++){let u=a.length===0&&c===o.length-1,h=o[c];u?this._addTerminal(s._classMap,h,l):s=this._addPartial(s._classPartialMap,h)}if(a)for(let c=0;c<a.length;c+=2){let u=c===a.length-2,h=a[c],d=a[c+1];if(u){let g=s._attrValueMap,y=g.get(h);y||(y=new Map,g.set(h,y)),this._addTerminal(y,d,l)}else{let g=s._attrValuePartialMap,y=g.get(h);y||(y=new Map,g.set(h,y)),s=this._addPartial(y,d)}}}_addTerminal(e,n,r){let s=e.get(n);s||(s=[],e.set(n,s)),s.push(r)}_addPartial(e,n){let r=e.get(n);return r||(r=new t,e.set(n,r)),r}match(e,n){let r=!1,s=e.element,i=e.classNames,o=e.attrs;for(let a=0;a<this._listContexts.length;a++)this._listContexts[a].alreadyMatched=!1;if(r=this._matchTerminal(this._elementMap,s,e,n)||r,r=this._matchPartial(this._elementPartialMap,s,e,n)||r,i)for(let a=0;a<i.length;a++){let l=i[a];r=this._matchTerminal(this._classMap,l,e,n)||r,r=this._matchPartial(this._classPartialMap,l,e,n)||r}if(o)for(let a=0;a<o.length;a+=2){let l=o[a],c=o[a+1],u=this._attrValueMap.get(l);c&&(r=this._matchTerminal(u,"",e,n)||r),r=this._matchTerminal(u,c,e,n)||r;let h=this._attrValuePartialMap.get(l);c&&(r=this._matchPartial(h,"",e,n)||r),r=this._matchPartial(h,c,e,n)||r}return r}_matchTerminal(e,n,r,s){if(!e||typeof n!="string")return!1;let i=e.get(n)||[],o=e.get("*");if(o&&(i=i.concat(o)),i.length===0)return!1;let a,l=!1;for(let c=0;c<i.length;c++)a=i[c],l=a.finalize(r,s)||l;return l}_matchPartial(e,n,r,s){if(!e||typeof n!="string")return!1;let i=e.get(n);return i?i.match(r,s):!1}},kl=class{constructor(e){this.selectors=e,this.alreadyMatched=!1}},Pl=class{constructor(e,n,r){this.selector=e,this.cbContext=n,this.listContext=r,this.notSelectors=e.notSelectors}finalize(e,n){let r=!0;return this.notSelectors.length>0&&(!this.listContext||!this.listContext.alreadyMatched)&&(r=!or.createNotMatcher(this.notSelectors).match(e,null)),r&&n&&(!this.listContext||!this.listContext.alreadyMatched)&&(this.listContext&&(this.listContext.alreadyMatched=!0),n(this.selector,this.cbContext)),r}};var un;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(un||(un={}));var Lo;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(Lo||(Lo={}));var fs;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(fs||(fs={}));var Ml={name:"custom-elements"},Ll={name:"no-errors-schema"};var ce;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(ce||(ce={}));var oh;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(oh||(oh={}));function hE(t){let e=t.classNames&&t.classNames.length?[8,...t.classNames]:[];return[t.element&&t.element!=="*"?t.element:"",...t.attrs,...e]}function fE(t){let e=t.classNames&&t.classNames.length?[8,...t.classNames]:[];return t.element?[5,t.element,...t.attrs,...e]:t.attrs.length?[3,...t.attrs,...e]:t.classNames&&t.classNames.length?[9,...t.classNames]:[]}function dE(t){let e=hE(t),n=t.notSelectors&&t.notSelectors.length?t.notSelectors.map(r=>fE(r)):[];return e.concat(...n)}function cu(t){return t?Yt.parse(t).map(dE):[]}var Oo;function mE(t){return EE(vE(t.nodes).join("")+`[${t.meaning}]`)}function gE(t){return t.id||Jf(t)}function Jf(t){let e=new Ol,n=t.nodes.map(r=>r.visit(e,null));return Zf(n.join(""),t.meaning)}var Fo=class{visitText(e,n){return e.value}visitContainer(e,n){return`[${e.children.map(r=>r.visit(this)).join(", ")}]`}visitIcu(e,n){let r=Object.keys(e.cases).map(s=>`${s} {${e.cases[s].visit(this)}}`);return`{${e.expression}, ${e.type}, ${r.join(", ")}}`}visitTagPlaceholder(e,n){return e.isVoid?`<ph tag name="${e.startName}"/>`:`<ph tag name="${e.startName}">${e.children.map(r=>r.visit(this)).join(", ")}</ph name="${e.closeName}">`}visitPlaceholder(e,n){return e.value?`<ph name="${e.name}">${e.value}</ph>`:`<ph name="${e.name}"/>`}visitIcuPlaceholder(e,n){return`<ph icu name="${e.name}">${e.value.visit(this)}</ph>`}visitBlockPlaceholder(e,n){return`<ph block name="${e.startName}">${e.children.map(r=>r.visit(this)).join(", ")}</ph name="${e.closeName}">`}},yE=new Fo;function vE(t){return t.map(e=>e.visit(yE,null))}var Ol=class extends Fo{visitIcu(e,n){let r=Object.keys(e.cases).map(s=>`${s} {${e.cases[s].visit(this)}}`);return`{${e.type}, ${r.join(", ")}}`}};function EE(t){Oo??=new TextEncoder;let e=[...Oo.encode(t)],n=TE(e,Bo.Big),r=e.length*8,s=new Uint32Array(80),i=1732584193,o=4023233417,a=2562383102,l=271733878,c=3285377520;n[r>>5]|=128<<24-r%32,n[(r+64>>9<<4)+15]=r;for(let u=0;u<n.length;u+=16){let h=i,d=o,g=a,y=l,C=c;for(let A=0;A<80;A++){A<16?s[A]=n[u+A]:s[A]=cl(s[A-3]^s[A-8]^s[A-14]^s[A-16],1);let _=SE(A,o,a,l),U=_[0],ne=_[1],ve=[cl(i,5),U,c,ne,s[A]].reduce(os);c=l,l=a,a=cl(o,30),o=i,i=ve}i=os(i,h),o=os(o,d),a=os(a,g),l=os(l,y),c=os(c,C)}return ni(i)+ni(o)+ni(a)+ni(l)+ni(c)}function ni(t){return(t>>>0).toString(16).padStart(8,"0")}function SE(t,e,n,r){return t<20?[e&n|~e&r,1518500249]:t<40?[e^n^r,1859775393]:t<60?[e&n|e&r|n&r,2400959708]:[e^n^r,3395469782]}function ah(t){Oo??=new TextEncoder;let e=Oo.encode(t),n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=lh(n,e.length,0),s=lh(n,e.length,102072);return r==0&&(s==0||s==1)&&(r=r^319790063,s=s^-1801410264),BigInt.asUintN(32,BigInt(r))<<BigInt(32)|BigInt.asUintN(32,BigInt(s))}function Zf(t,e=""){let n=ah(t);return e&&(n=BigInt.asUintN(64,n<<BigInt(1))|n>>BigInt(63)&BigInt(1),n+=ah(e)),BigInt.asUintN(63,n).toString()}function lh(t,e,n){let r=2654435769,s=2654435769,i=0,o=e-12;for(;i<=o;i+=12){r+=t.getUint32(i,!0),s+=t.getUint32(i+4,!0),n+=t.getUint32(i+8,!0);let l=ch(r,s,n);r=l[0],s=l[1],n=l[2]}let a=e-i;return n+=e,a>=4?(r+=t.getUint32(i,!0),i+=4,a>=8?(s+=t.getUint32(i,!0),i+=4,a>=9&&(n+=t.getUint8(i++)<<8),a>=10&&(n+=t.getUint8(i++)<<16),a===11&&(n+=t.getUint8(i++)<<24)):(a>=5&&(s+=t.getUint8(i++)),a>=6&&(s+=t.getUint8(i++)<<8),a===7&&(s+=t.getUint8(i++)<<16))):(a>=1&&(r+=t.getUint8(i++)),a>=2&&(r+=t.getUint8(i++)<<8),a===3&&(r+=t.getUint8(i++)<<16)),ch(r,s,n)[2]}function ch(t,e,n){return t-=e,t-=n,t^=n>>>13,e-=n,e-=t,e^=t<<8,n-=t,n-=e,n^=e>>>13,t-=e,t-=n,t^=n>>>12,e-=n,e-=t,e^=t<<16,n-=t,n-=e,n^=e>>>5,t-=e,t-=n,t^=n>>>3,e-=n,e-=t,e^=t<<10,n-=t,n-=e,n^=e>>>15,[t,e,n]}var Bo;(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(Bo||(Bo={}));function os(t,e){return wE(t,e)[1]}function wE(t,e){let n=(t&65535)+(e&65535),r=(t>>>16)+(e>>>16)+(n>>>16);return[r>>>16,r<<16|n&65535]}function cl(t,e){return t<<e|t>>>32-e}function TE(t,e){let n=t.length+3>>>2,r=[];for(let s=0;s<n;s++)r[s]=xE(t,s*4,e);return r}function uh(t,e){return e>=t.length?0:t[e]}function xE(t,e,n){let r=0;if(n===Bo.Big)for(let s=0;s<4;s++)r+=uh(t,e+s)<<24-8*s;else for(let s=0;s<4;s++)r+=uh(t,e+s)<<8*s;return r}var yi;(function(t){t[t.None=0]="None",t[t.Const=1]="Const"})(yi||(yi={}));var ar=class{constructor(e=yi.None){this.modifiers=e}hasModifier(e){return(this.modifiers&e)!==0}},Vt;(function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None"})(Vt||(Vt={}));var Qt=class extends ar{constructor(e,n){super(n),this.name=e}visitType(e,n){return e.visitBuiltinType(this,n)}},rt=class extends ar{constructor(e,n,r=null){super(n),this.value=e,this.typeParams=r}visitType(e,n){return e.visitExpressionType(this,n)}},Fl=class extends ar{constructor(e,n){super(n),this.of=e}visitType(e,n){return e.visitArrayType(this,n)}},Bl=class extends ar{constructor(e,n){super(n),this.valueType=e||null}visitType(e,n){return e.visitMapType(this,n)}},xs=class extends ar{constructor(e,n){super(n),this.type=e}visitType(e,n){return e.visitTransplantedType(this,n)}},Sr=new Qt(Vt.Dynamic),At=new Qt(Vt.Inferred),ed=new Qt(Vt.Bool),CE=new Qt(Vt.Int),ka=new Qt(Vt.Number),uu=new Qt(Vt.String),IE=new Qt(Vt.Function),Jt=new Qt(Vt.None),mn;(function(t){t[t.Minus=0]="Minus",t[t.Plus=1]="Plus"})(mn||(mn={}));var I;(function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Identical=2]="Identical",t[t.NotIdentical=3]="NotIdentical",t[t.Minus=4]="Minus",t[t.Plus=5]="Plus",t[t.Divide=6]="Divide",t[t.Multiply=7]="Multiply",t[t.Modulo=8]="Modulo",t[t.And=9]="And",t[t.Or=10]="Or",t[t.BitwiseOr=11]="BitwiseOr",t[t.BitwiseAnd=12]="BitwiseAnd",t[t.Lower=13]="Lower",t[t.LowerEquals=14]="LowerEquals",t[t.Bigger=15]="Bigger",t[t.BiggerEquals=16]="BiggerEquals",t[t.NullishCoalesce=17]="NullishCoalesce"})(I||(I={}));function td(t,e){return t==null||e==null?t==e:t.isEquivalent(e)}function nd(t,e,n){let r=t.length;if(r!==e.length)return!1;for(let s=0;s<r;s++)if(!n(t[s],e[s]))return!1;return!0}function it(t,e){return nd(t,e,(n,r)=>n.isEquivalent(r))}var re=class{constructor(e,n){this.type=e||null,this.sourceSpan=n||null}prop(e,n){return new ot(this,e,null,n)}key(e,n,r){return new gn(this,e,n,r)}callFn(e,n,r){return new Ke(this,e,null,n,r)}instantiate(e,n,r){return new Is(this,e,n,r)}conditional(e,n=null,r){return new Zt(this,e,n,null,r)}equals(e,n){return new ee(I.Equals,this,e,null,n)}notEquals(e,n){return new ee(I.NotEquals,this,e,null,n)}identical(e,n){return new ee(I.Identical,this,e,null,n)}notIdentical(e,n){return new ee(I.NotIdentical,this,e,null,n)}minus(e,n){return new ee(I.Minus,this,e,null,n)}plus(e,n){return new ee(I.Plus,this,e,null,n)}divide(e,n){return new ee(I.Divide,this,e,null,n)}multiply(e,n){return new ee(I.Multiply,this,e,null,n)}modulo(e,n){return new ee(I.Modulo,this,e,null,n)}and(e,n){return new ee(I.And,this,e,null,n)}bitwiseOr(e,n,r=!0){return new ee(I.BitwiseOr,this,e,null,n,r)}bitwiseAnd(e,n,r=!0){return new ee(I.BitwiseAnd,this,e,null,n,r)}or(e,n){return new ee(I.Or,this,e,null,n)}lower(e,n){return new ee(I.Lower,this,e,null,n)}lowerEquals(e,n){return new ee(I.LowerEquals,this,e,null,n)}bigger(e,n){return new ee(I.Bigger,this,e,null,n)}biggerEquals(e,n){return new ee(I.BiggerEquals,this,e,null,n)}isBlank(e){return this.equals(rd,e)}nullishCoalesce(e,n){return new ee(I.NullishCoalesce,this,e,null,n)}toStmt(){return new bt(this,null)}},Nt=class t extends re{constructor(e,n,r){super(n,r),this.name=e}isEquivalent(e){return e instanceof t&&this.name===e.name}isConstant(){return!1}visitExpression(e,n){return e.visitReadVarExpr(this,n)}clone(){return new t(this.name,this.type,this.sourceSpan)}set(e){return new vi(this.name,e,null,this.sourceSpan)}},Mr=class t extends re{constructor(e,n,r){super(n,r),this.expr=e}visitExpression(e,n){return e.visitTypeofExpr(this,n)}isEquivalent(e){return e instanceof t&&e.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new t(this.expr.clone())}},$=class t extends re{constructor(e,n,r){super(n,r),this.node=e}isEquivalent(e){return e instanceof t&&this.node===e.node}isConstant(){return!1}visitExpression(e,n){return e.visitWrappedNodeExpr(this,n)}clone(){return new t(this.node,this.type,this.sourceSpan)}},vi=class t extends re{constructor(e,n,r,s){super(r||n.type,s),this.name=e,this.value=n}isEquivalent(e){return e instanceof t&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,n){return e.visitWriteVarExpr(this,n)}clone(){return new t(this.name,this.value.clone(),this.type,this.sourceSpan)}toDeclStmt(e,n){return new ze(this.name,this.value,e,n,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(At,De.Final)}},Cs=class t extends re{constructor(e,n,r,s,i){super(s||r.type,i),this.receiver=e,this.index=n,this.value=r}isEquivalent(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,n){return e.visitWriteKeyExpr(this,n)}clone(){return new t(this.receiver.clone(),this.index.clone(),this.value.clone(),this.type,this.sourceSpan)}},Lr=class t extends re{constructor(e,n,r,s,i){super(s||r.type,i),this.receiver=e,this.name=n,this.value=r}isEquivalent(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name&&this.value.isEquivalent(e.value)}isConstant(){return!1}visitExpression(e,n){return e.visitWritePropExpr(this,n)}clone(){return new t(this.receiver.clone(),this.name,this.value.clone(),this.type,this.sourceSpan)}},Ke=class t extends re{constructor(e,n,r,s,i=!1){super(r,s),this.fn=e,this.args=n,this.pure=i}get receiver(){return this.fn}isEquivalent(e){return e instanceof t&&this.fn.isEquivalent(e.fn)&&it(this.args,e.args)&&this.pure===e.pure}isConstant(){return!1}visitExpression(e,n){return e.visitInvokeFunctionExpr(this,n)}clone(){return new t(this.fn.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan,this.pure)}},Ei=class t extends re{constructor(e,n,r,s){super(r,s),this.tag=e,this.template=n}isEquivalent(e){return e instanceof t&&this.tag.isEquivalent(e.tag)&&nd(this.template.elements,e.template.elements,(n,r)=>n.text===r.text)&&it(this.template.expressions,e.template.expressions)}isConstant(){return!1}visitExpression(e,n){return e.visitTaggedTemplateExpr(this,n)}clone(){return new t(this.tag.clone(),this.template.clone(),this.type,this.sourceSpan)}},Is=class t extends re{constructor(e,n,r,s){super(r,s),this.classExpr=e,this.args=n}isEquivalent(e){return e instanceof t&&this.classExpr.isEquivalent(e.classExpr)&&it(this.args,e.args)}isConstant(){return!1}visitExpression(e,n){return e.visitInstantiateExpr(this,n)}clone(){return new t(this.classExpr.clone(),this.args.map(e=>e.clone()),this.type,this.sourceSpan)}},xe=class t extends re{constructor(e,n,r){super(n,r),this.value=e}isEquivalent(e){return e instanceof t&&this.value===e.value}isConstant(){return!0}visitExpression(e,n){return e.visitLiteralExpr(this,n)}clone(){return new t(this.value,this.type,this.sourceSpan)}},$o=class t{constructor(e,n){this.elements=e,this.expressions=n}clone(){return new t(this.elements.map(e=>e.clone()),this.expressions.map(e=>e.clone()))}},Uo=class t{constructor(e,n,r){this.text=e,this.sourceSpan=n,this.rawText=r??n?.toString()??$l(Po(e))}clone(){return new t(this.text,this.sourceSpan,this.rawText)}},ir=class{constructor(e,n){this.text=e,this.sourceSpan=n}},_r=class{constructor(e,n,r){this.text=e,this.sourceSpan=n,this.associatedMessage=r}},AE="|",ph="@@",NE="\u241F",Si=class t extends re{constructor(e,n,r,s,i){super(uu,i),this.metaBlock=e,this.messageParts=n,this.placeHolderNames=r,this.expressions=s}isEquivalent(e){return!1}isConstant(){return!1}visitExpression(e,n){return e.visitLocalizedString(this,n)}clone(){return new t(this.metaBlock,this.messageParts,this.placeHolderNames,this.expressions.map(e=>e.clone()),this.sourceSpan)}serializeI18nHead(){let e=this.metaBlock.description||"";return this.metaBlock.meaning&&(e=`${this.metaBlock.meaning}${AE}${e}`),this.metaBlock.customId&&(e=`${e}${ph}${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(n=>{e=`${e}${NE}${n}`}),hh(e,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(e){return this.messageParts[e]?.sourceSpan??this.sourceSpan}getPlaceholderSourceSpan(e){return this.placeHolderNames[e]?.sourceSpan??this.expressions[e]?.sourceSpan??this.sourceSpan}serializeI18nTemplatePart(e){let n=this.placeHolderNames[e-1],r=this.messageParts[e],s=n.text;return n.associatedMessage?.legacyIds.length===0&&(s+=`${ph}${Zf(n.associatedMessage.messageString,n.associatedMessage.meaning)}`),hh(s,r.text,this.getMessagePartSourceSpan(e))}},Po=t=>t.replace(/\\/g,"\\\\"),bE=t=>t.replace(/^:/,"\\:"),DE=t=>t.replace(/:/g,"\\:"),$l=t=>t.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function hh(t,e,n){return t===""?{cooked:e,raw:$l(bE(Po(e))),range:n}:{cooked:`:${t}:${e}`,raw:$l(`:${DE(Po(t))}:${Po(e)}`),range:n}}var Ve=class t extends re{constructor(e,n,r=null,s){super(n,s),this.value=e,this.typeParams=r}isEquivalent(e){return e instanceof t&&this.value.name===e.value.name&&this.value.moduleName===e.value.moduleName&&this.value.runtime===e.value.runtime}isConstant(){return!1}visitExpression(e,n){return e.visitExternalExpr(this,n)}clone(){return new t(this.value,this.type,this.typeParams,this.sourceSpan)}},Vo=class{constructor(e,n,r){this.moduleName=e,this.name=n,this.runtime=r}},Zt=class t extends re{constructor(e,n,r=null,s,i){super(s||n.type,i),this.condition=e,this.falseCase=r,this.trueCase=n}isEquivalent(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&this.trueCase.isEquivalent(e.trueCase)&&td(this.falseCase,e.falseCase)}isConstant(){return!1}visitExpression(e,n){return e.visitConditionalExpr(this,n)}clone(){return new t(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}},Ul=class t extends re{constructor(e,n){super(null,n),this.url=e}isEquivalent(e){return e instanceof t&&this.url===e.url}isConstant(){return!1}visitExpression(e,n){return e.visitDynamicImportExpr(this,n)}clone(){return new t(this.url,this.sourceSpan)}},As=class t extends re{constructor(e,n){super(ed,n),this.condition=e}isEquivalent(e){return e instanceof t&&this.condition.isEquivalent(e.condition)}isConstant(){return!1}visitExpression(e,n){return e.visitNotExpr(this,n)}clone(){return new t(this.condition.clone(),this.sourceSpan)}},Oe=class t{constructor(e,n=null){this.name=e,this.type=n}isEquivalent(e){return this.name===e.name}clone(){return new t(this.name,this.type)}},Xt=class t extends re{constructor(e,n,r,s,i){super(r,s),this.params=e,this.statements=n,this.name=i}isEquivalent(e){return(e instanceof t||e instanceof bs)&&it(this.params,e.params)&&it(this.statements,e.statements)}isConstant(){return!1}visitExpression(e,n){return e.visitFunctionExpr(this,n)}toDeclStmt(e,n){return new bs(e,this.params,this.statements,this.type,n,this.sourceSpan)}clone(){return new t(this.params.map(e=>e.clone()),this.statements,this.type,this.sourceSpan,this.name)}},Mn=class t extends re{constructor(e,n,r,s){super(r,s),this.params=e,this.body=n}isEquivalent(e){return!(e instanceof t)||!it(this.params,e.params)?!1:this.body instanceof re&&e.body instanceof re?this.body.isEquivalent(e.body):Array.isArray(this.body)&&Array.isArray(e.body)?it(this.body,e.body):!1}isConstant(){return!1}visitExpression(e,n){return e.visitArrowFunctionExpr(this,n)}clone(){return new t(this.params.map(e=>e.clone()),Array.isArray(this.body)?this.body:this.body.clone(),this.type,this.sourceSpan)}toDeclStmt(e,n){return new ze(e,this,At,n,this.sourceSpan)}},lr=class t extends re{constructor(e,n,r,s,i=!0){super(r||ka,s),this.operator=e,this.expr=n,this.parens=i}isEquivalent(e){return e instanceof t&&this.operator===e.operator&&this.expr.isEquivalent(e.expr)}isConstant(){return!1}visitExpression(e,n){return e.visitUnaryOperatorExpr(this,n)}clone(){return new t(this.operator,this.expr.clone(),this.type,this.sourceSpan,this.parens)}},ee=class t extends re{constructor(e,n,r,s,i,o=!0){super(s||n.type,i),this.operator=e,this.rhs=r,this.parens=o,this.lhs=n}isEquivalent(e){return e instanceof t&&this.operator===e.operator&&this.lhs.isEquivalent(e.lhs)&&this.rhs.isEquivalent(e.rhs)}isConstant(){return!1}visitExpression(e,n){return e.visitBinaryOperatorExpr(this,n)}clone(){return new t(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan,this.parens)}},ot=class t extends re{constructor(e,n,r,s){super(r,s),this.receiver=e,this.name=n}get index(){return this.name}isEquivalent(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.name===e.name}isConstant(){return!1}visitExpression(e,n){return e.visitReadPropExpr(this,n)}set(e){return new Lr(this.receiver,this.name,e,null,this.sourceSpan)}clone(){return new t(this.receiver.clone(),this.name,this.type,this.sourceSpan)}},gn=class t extends re{constructor(e,n,r,s){super(r,s),this.receiver=e,this.index=n}isEquivalent(e){return e instanceof t&&this.receiver.isEquivalent(e.receiver)&&this.index.isEquivalent(e.index)}isConstant(){return!1}visitExpression(e,n){return e.visitReadKeyExpr(this,n)}set(e){return new Cs(this.receiver,this.index,e,null,this.sourceSpan)}clone(){return new t(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}},at=class t extends re{constructor(e,n,r){super(n,r),this.entries=e}isConstant(){return this.entries.every(e=>e.isConstant())}isEquivalent(e){return e instanceof t&&it(this.entries,e.entries)}visitExpression(e,n){return e.visitLiteralArrayExpr(this,n)}clone(){return new t(this.entries.map(e=>e.clone()),this.type,this.sourceSpan)}},Or=class t{constructor(e,n,r){this.key=e,this.value=n,this.quoted=r}isEquivalent(e){return this.key===e.key&&this.value.isEquivalent(e.value)}clone(){return new t(this.key,this.value.clone(),this.quoted)}},qt=class t extends re{constructor(e,n,r){super(n,r),this.entries=e,this.valueType=null,n&&(this.valueType=n.valueType)}isEquivalent(e){return e instanceof t&&it(this.entries,e.entries)}isConstant(){return this.entries.every(e=>e.value.isConstant())}visitExpression(e,n){return e.visitLiteralMapExpr(this,n)}clone(){let e=this.entries.map(n=>n.clone());return new t(e,this.type,this.sourceSpan)}},Vl=class t extends re{constructor(e,n){super(e[e.length-1].type,n),this.parts=e}isEquivalent(e){return e instanceof t&&it(this.parts,e.parts)}isConstant(){return!1}visitExpression(e,n){return e.visitCommaExpr(this,n)}clone(){return new t(this.parts.map(e=>e.clone()))}},Ns=new xe(null,null,null),rd=new xe(null,At,null),De;(function(t){t[t.None=0]="None",t[t.Final=1]="Final",t[t.Private=2]="Private",t[t.Exported=4]="Exported",t[t.Static=8]="Static"})(De||(De={}));var wi=class{constructor(e,n,r){this.text=e,this.multiline=n,this.trailingNewline=r}toString(){return this.multiline?` ${this.text} `:this.text}},Ti=class extends wi{constructor(e){super("",!0,!0),this.tags=e}toString(){return LE(this.tags)}},cr=class{constructor(e=De.None,n=null,r){this.modifiers=e,this.sourceSpan=n,this.leadingComments=r}hasModifier(e){return(this.modifiers&e)!==0}addLeadingComment(e){this.leadingComments=this.leadingComments??[],this.leadingComments.push(e)}},ze=class t extends cr{constructor(e,n,r,s,i,o){super(s,i,o),this.name=e,this.value=n,this.type=r||n&&n.type||null}isEquivalent(e){return e instanceof t&&this.name===e.name&&(this.value?!!e.value&&this.value.isEquivalent(e.value):!e.value)}visitStatement(e,n){return e.visitDeclareVarStmt(this,n)}},bs=class t extends cr{constructor(e,n,r,s,i,o,a){super(i,o,a),this.name=e,this.params=n,this.statements=r,this.type=s||null}isEquivalent(e){return e instanceof t&&it(this.params,e.params)&&it(this.statements,e.statements)}visitStatement(e,n){return e.visitDeclareFunctionStmt(this,n)}},bt=class t extends cr{constructor(e,n,r){super(De.None,n,r),this.expr=e}isEquivalent(e){return e instanceof t&&this.expr.isEquivalent(e.expr)}visitStatement(e,n){return e.visitExpressionStmt(this,n)}},Je=class t extends cr{constructor(e,n=null,r){super(De.None,n,r),this.value=e}isEquivalent(e){return e instanceof t&&this.value.isEquivalent(e.value)}visitStatement(e,n){return e.visitReturnStmt(this,n)}},xi=class t extends cr{constructor(e,n,r=[],s,i){super(De.None,s,i),this.condition=e,this.trueCase=n,this.falseCase=r}isEquivalent(e){return e instanceof t&&this.condition.isEquivalent(e.condition)&&it(this.trueCase,e.trueCase)&&it(this.falseCase,e.falseCase)}visitStatement(e,n){return e.visitIfStmt(this,n)}},ql=class{visitType(e,n){return e}visitExpression(e,n){return e.type&&e.type.visitType(this,n),e}visitBuiltinType(e,n){return this.visitType(e,n)}visitExpressionType(e,n){return e.value.visitExpression(this,n),e.typeParams!==null&&e.typeParams.forEach(r=>this.visitType(r,n)),this.visitType(e,n)}visitArrayType(e,n){return this.visitType(e,n)}visitMapType(e,n){return this.visitType(e,n)}visitTransplantedType(e,n){return e}visitWrappedNodeExpr(e,n){return e}visitTypeofExpr(e,n){return this.visitExpression(e,n)}visitReadVarExpr(e,n){return this.visitExpression(e,n)}visitWriteVarExpr(e,n){return e.value.visitExpression(this,n),this.visitExpression(e,n)}visitWriteKeyExpr(e,n){return e.receiver.visitExpression(this,n),e.index.visitExpression(this,n),e.value.visitExpression(this,n),this.visitExpression(e,n)}visitWritePropExpr(e,n){return e.receiver.visitExpression(this,n),e.value.visitExpression(this,n),this.visitExpression(e,n)}visitDynamicImportExpr(e,n){return this.visitExpression(e,n)}visitInvokeFunctionExpr(e,n){return e.fn.visitExpression(this,n),this.visitAllExpressions(e.args,n),this.visitExpression(e,n)}visitTaggedTemplateExpr(e,n){return e.tag.visitExpression(this,n),this.visitAllExpressions(e.template.expressions,n),this.visitExpression(e,n)}visitInstantiateExpr(e,n){return e.classExpr.visitExpression(this,n),this.visitAllExpressions(e.args,n),this.visitExpression(e,n)}visitLiteralExpr(e,n){return this.visitExpression(e,n)}visitLocalizedString(e,n){return this.visitExpression(e,n)}visitExternalExpr(e,n){return e.typeParams&&e.typeParams.forEach(r=>r.visitType(this,n)),this.visitExpression(e,n)}visitConditionalExpr(e,n){return e.condition.visitExpression(this,n),e.trueCase.visitExpression(this,n),e.falseCase.visitExpression(this,n),this.visitExpression(e,n)}visitNotExpr(e,n){return e.condition.visitExpression(this,n),this.visitExpression(e,n)}visitFunctionExpr(e,n){return this.visitAllStatements(e.statements,n),this.visitExpression(e,n)}visitArrowFunctionExpr(e,n){return Array.isArray(e.body)?this.visitAllStatements(e.body,n):this.visitExpression(e.body,n),this.visitExpression(e,n)}visitUnaryOperatorExpr(e,n){return e.expr.visitExpression(this,n),this.visitExpression(e,n)}visitBinaryOperatorExpr(e,n){return e.lhs.visitExpression(this,n),e.rhs.visitExpression(this,n),this.visitExpression(e,n)}visitReadPropExpr(e,n){return e.receiver.visitExpression(this,n),this.visitExpression(e,n)}visitReadKeyExpr(e,n){return e.receiver.visitExpression(this,n),e.index.visitExpression(this,n),this.visitExpression(e,n)}visitLiteralArrayExpr(e,n){return this.visitAllExpressions(e.entries,n),this.visitExpression(e,n)}visitLiteralMapExpr(e,n){return e.entries.forEach(r=>r.value.visitExpression(this,n)),this.visitExpression(e,n)}visitCommaExpr(e,n){return this.visitAllExpressions(e.parts,n),this.visitExpression(e,n)}visitAllExpressions(e,n){e.forEach(r=>r.visitExpression(this,n))}visitDeclareVarStmt(e,n){return e.value&&e.value.visitExpression(this,n),e.type&&e.type.visitType(this,n),e}visitDeclareFunctionStmt(e,n){return this.visitAllStatements(e.statements,n),e.type&&e.type.visitType(this,n),e}visitExpressionStmt(e,n){return e.expr.visitExpression(this,n),e}visitReturnStmt(e,n){return e.value.visitExpression(this,n),e}visitIfStmt(e,n){return e.condition.visitExpression(this,n),this.visitAllStatements(e.trueCase,n),this.visitAllStatements(e.falseCase,n),e}visitAllStatements(e,n){e.forEach(r=>r.visitStatement(this,n))}};function _E(t,e=!1,n=!0){return new wi(t,e,n)}function sd(t=[]){return new Ti(t)}function W(t,e,n){return new Nt(t,e,n)}function L(t,e=null,n){return new Ve(t,null,e,n)}function RE(t,e,n){return t!=null?Fe(L(t,e,null),n):null}function Fe(t,e,n){return new rt(t,e,n)}function kE(t,e){return new xs(t,e)}function to(t){return new Mr(t)}function ie(t,e,n){return new at(t,e,n)}function Xe(t,e=null){return new qt(t.map(n=>new Or(n.key,n.value,n.quoted)),e,null)}function PE(t,e,n,r){return new lr(t,e,n,r)}function id(t,e){return new As(t,e)}function Yr(t,e,n,r,s){return new Xt(t,e,n,r,s)}function en(t,e,n,r){return new Mn(t,e,n,r)}function no(t,e,n,r,s){return new xi(t,e,n,r,s)}function od(t,e,n,r){return new Ei(t,e,n,r)}function v(t,e,n){return new xe(t,e,n)}function ad(t,e,n,r,s){return new Si(t,e,n,r,s)}function ME(t){return t instanceof xe&&t.value===null}function fh(t){let e="";if(t.tagName&&(e+=` @${t.tagName}`),t.text){if(t.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');e+=" "+t.text.replace(/@/g,"\\@")}return e}function LE(t){if(t.length===0)return"";if(t.length===1&&t[0].tagName&&!t[0].text)return`*${fh(t[0])} `;let e=`*
|
|
2
2
|
`;for(let n of t)e+=" *",e+=fh(n).replace(/\n/g,`
|
|
3
3
|
* `),e+=`
|
|
4
4
|
`;return e+=" ",e}var ro=Object.freeze({__proto__:null,get TypeModifier(){return yi},Type:ar,get BuiltinTypeName(){return Vt},BuiltinType:Qt,ExpressionType:rt,ArrayType:Fl,MapType:Bl,TransplantedType:xs,DYNAMIC_TYPE:Sr,INFERRED_TYPE:At,BOOL_TYPE:ed,INT_TYPE:CE,NUMBER_TYPE:ka,STRING_TYPE:uu,FUNCTION_TYPE:IE,NONE_TYPE:Jt,get UnaryOperator(){return mn},get BinaryOperator(){return I},nullSafeIsEquivalent:td,areAllEquivalent:it,Expression:re,ReadVarExpr:Nt,TypeofExpr:Mr,WrappedNodeExpr:$,WriteVarExpr:vi,WriteKeyExpr:Cs,WritePropExpr:Lr,InvokeFunctionExpr:Ke,TaggedTemplateExpr:Ei,InstantiateExpr:Is,LiteralExpr:xe,TemplateLiteral:$o,TemplateLiteralElement:Uo,LiteralPiece:ir,PlaceholderPiece:_r,LocalizedString:Si,ExternalExpr:Ve,ExternalReference:Vo,ConditionalExpr:Zt,DynamicImportExpr:Ul,NotExpr:As,FnParam:Oe,FunctionExpr:Xt,ArrowFunctionExpr:Mn,UnaryOperatorExpr:lr,BinaryOperatorExpr:ee,ReadPropExpr:ot,ReadKeyExpr:gn,LiteralArrayExpr:at,LiteralMapEntry:Or,LiteralMapExpr:qt,CommaExpr:Vl,NULL_EXPR:Ns,TYPED_NULL_EXPR:rd,get StmtModifier(){return De},LeadingComment:wi,JSDocComment:Ti,Statement:cr,DeclareVarStmt:ze,DeclareFunctionStmt:bs,ExpressionStatement:bt,ReturnStatement:Je,IfStmt:xi,RecursiveAstVisitor:ql,leadingComment:_E,jsDocComment:sd,variable:W,importExpr:L,importType:RE,expressionType:Fe,transplantedType:kE,typeofExpr:to,literalArr:ie,literalMap:Xe,unary:PE,not:id,fn:Yr,arrowFn:en,ifStmt:no,taggedTemplate:od,literal:v,localizedString:ad,isNull:ME}),OE="_c",dh=W("<unknown>"),FE={},BE=50,qo=class t extends re{constructor(e){super(e.type),this.resolved=e,this.shared=!1,this.original=e}visitExpression(e,n){return n===FE?this.original.visitExpression(e,n):this.resolved.visitExpression(e,n)}isEquivalent(e){return e instanceof t&&this.resolved.isEquivalent(e.resolved)}isConstant(){return!0}clone(){throw new Error("Not supported.")}fixup(e){this.resolved=e,this.shared=!0}},Ci=class{constructor(e=!1){this.isClosureCompilerEnabled=e,this.statements=[],this.literals=new Map,this.literalFactories=new Map,this.sharedConstants=new Map,this._claimedNames=new Map,this.nextNameIndex=0}getConstLiteral(e,n){if(e instanceof xe&&!mh(e)||e instanceof qo)return e;let r=ws.INSTANCE.keyOf(e),s=this.literals.get(r),i=!1;if(s||(s=new qo(e),this.literals.set(r,s),i=!0),!i&&!s.shared||i&&n){let o=this.freshName(),a,l;this.isClosureCompilerEnabled&&mh(e)?(a=W(o).set(new Xt([],[new Je(e)])),l=W(o).callFn([])):(a=W(o).set(e),l=W(o)),this.statements.push(a.toDeclStmt(At,De.Final)),s.fixup(l)}return s}getSharedConstant(e,n){let r=e.keyOf(n);if(!this.sharedConstants.has(r)){let s=this.freshName();this.sharedConstants.set(r,W(s)),this.statements.push(e.toSharedConstantDeclaration(s,n))}return this.sharedConstants.get(r)}getLiteralFactory(e){if(e instanceof at){let n=e.entries.map(s=>s.isConstant()?s:dh),r=ws.INSTANCE.keyOf(ie(n));return this._getLiteralFactory(r,e.entries,s=>ie(s))}else{let n=Xe(e.entries.map(s=>({key:s.key,value:s.value.isConstant()?s.value:dh,quoted:s.quoted}))),r=ws.INSTANCE.keyOf(n);return this._getLiteralFactory(r,e.entries.map(s=>s.value),s=>Xe(s.map((i,o)=>({key:e.entries[o].key,value:i,quoted:e.entries[o].quoted}))))}}getSharedFunctionReference(e,n,r=!0){let s=e instanceof Mn;for(let o of this.statements)if(s&&o instanceof ze&&o.value?.isEquivalent(e)||!s&&o instanceof bs&&e instanceof Xt&&e.isEquivalent(o))return W(o.name);let i=r?this.uniqueName(n):n;return this.statements.push(e instanceof Xt?e.toDeclStmt(i,De.Final):new ze(i,e,At,De.Final,e.sourceSpan)),W(i)}_getLiteralFactory(e,n,r){let s=this.literalFactories.get(e),i=n.filter(o=>!o.isConstant());if(!s){let o=n.map((u,h)=>u.isConstant()?this.getConstLiteral(u,!0):W(`a${h}`)),a=o.filter($E).map(u=>new Oe(u.name,Sr)),l=en(a,r(o),At),c=this.freshName();this.statements.push(W(c).set(l).toDeclStmt(At,De.Final)),s=W(c),this.literalFactories.set(e,s)}return{literalFactory:s,literalFactoryArguments:i}}uniqueName(e,n=!0){let r=this._claimedNames.get(e)??0,s=r===0&&!n?`${e}`:`${e}${r}`;return this._claimedNames.set(e,r+1),s}freshName(){return this.uniqueName(OE)}},ws=class t{static{this.INSTANCE=new t}keyOf(e){if(e instanceof xe&&typeof e.value=="string")return`"${e.value}"`;if(e instanceof xe)return String(e.value);if(e instanceof at){let n=[];for(let r of e.entries)n.push(this.keyOf(r));return`[${n.join(",")}]`}else if(e instanceof qt){let n=[];for(let r of e.entries){let s=r.key;r.quoted&&(s=`"${s}"`),n.push(s+":"+this.keyOf(r.value))}return`{${n.join(",")}}`}else{if(e instanceof Ve)return`import("${e.value.moduleName}", ${e.value.name})`;if(e instanceof Nt)return`read(${e.name})`;if(e instanceof Mr)return`typeof(${this.keyOf(e.expr)})`;throw new Error(`${this.constructor.name} does not handle expressions of type ${e.constructor.name}`)}}};function $E(t){return t instanceof Nt}function mh(t){return t instanceof xe&&typeof t.value=="string"&&t.value.length>=BE}var m="@angular/core",f=class{static{this.NEW_METHOD="factory"}static{this.TRANSFORM_METHOD="transform"}static{this.PATCH_DEPS="patchedDeps"}static{this.core={name:null,moduleName:m}}static{this.namespaceHTML={name:"\u0275\u0275namespaceHTML",moduleName:m}}static{this.namespaceMathML={name:"\u0275\u0275namespaceMathML",moduleName:m}}static{this.namespaceSVG={name:"\u0275\u0275namespaceSVG",moduleName:m}}static{this.element={name:"\u0275\u0275element",moduleName:m}}static{this.elementStart={name:"\u0275\u0275elementStart",moduleName:m}}static{this.elementEnd={name:"\u0275\u0275elementEnd",moduleName:m}}static{this.advance={name:"\u0275\u0275advance",moduleName:m}}static{this.syntheticHostProperty={name:"\u0275\u0275syntheticHostProperty",moduleName:m}}static{this.syntheticHostListener={name:"\u0275\u0275syntheticHostListener",moduleName:m}}static{this.attribute={name:"\u0275\u0275attribute",moduleName:m}}static{this.attributeInterpolate1={name:"\u0275\u0275attributeInterpolate1",moduleName:m}}static{this.attributeInterpolate2={name:"\u0275\u0275attributeInterpolate2",moduleName:m}}static{this.attributeInterpolate3={name:"\u0275\u0275attributeInterpolate3",moduleName:m}}static{this.attributeInterpolate4={name:"\u0275\u0275attributeInterpolate4",moduleName:m}}static{this.attributeInterpolate5={name:"\u0275\u0275attributeInterpolate5",moduleName:m}}static{this.attributeInterpolate6={name:"\u0275\u0275attributeInterpolate6",moduleName:m}}static{this.attributeInterpolate7={name:"\u0275\u0275attributeInterpolate7",moduleName:m}}static{this.attributeInterpolate8={name:"\u0275\u0275attributeInterpolate8",moduleName:m}}static{this.attributeInterpolateV={name:"\u0275\u0275attributeInterpolateV",moduleName:m}}static{this.classProp={name:"\u0275\u0275classProp",moduleName:m}}static{this.elementContainerStart={name:"\u0275\u0275elementContainerStart",moduleName:m}}static{this.elementContainerEnd={name:"\u0275\u0275elementContainerEnd",moduleName:m}}static{this.elementContainer={name:"\u0275\u0275elementContainer",moduleName:m}}static{this.styleMap={name:"\u0275\u0275styleMap",moduleName:m}}static{this.styleMapInterpolate1={name:"\u0275\u0275styleMapInterpolate1",moduleName:m}}static{this.styleMapInterpolate2={name:"\u0275\u0275styleMapInterpolate2",moduleName:m}}static{this.styleMapInterpolate3={name:"\u0275\u0275styleMapInterpolate3",moduleName:m}}static{this.styleMapInterpolate4={name:"\u0275\u0275styleMapInterpolate4",moduleName:m}}static{this.styleMapInterpolate5={name:"\u0275\u0275styleMapInterpolate5",moduleName:m}}static{this.styleMapInterpolate6={name:"\u0275\u0275styleMapInterpolate6",moduleName:m}}static{this.styleMapInterpolate7={name:"\u0275\u0275styleMapInterpolate7",moduleName:m}}static{this.styleMapInterpolate8={name:"\u0275\u0275styleMapInterpolate8",moduleName:m}}static{this.styleMapInterpolateV={name:"\u0275\u0275styleMapInterpolateV",moduleName:m}}static{this.classMap={name:"\u0275\u0275classMap",moduleName:m}}static{this.classMapInterpolate1={name:"\u0275\u0275classMapInterpolate1",moduleName:m}}static{this.classMapInterpolate2={name:"\u0275\u0275classMapInterpolate2",moduleName:m}}static{this.classMapInterpolate3={name:"\u0275\u0275classMapInterpolate3",moduleName:m}}static{this.classMapInterpolate4={name:"\u0275\u0275classMapInterpolate4",moduleName:m}}static{this.classMapInterpolate5={name:"\u0275\u0275classMapInterpolate5",moduleName:m}}static{this.classMapInterpolate6={name:"\u0275\u0275classMapInterpolate6",moduleName:m}}static{this.classMapInterpolate7={name:"\u0275\u0275classMapInterpolate7",moduleName:m}}static{this.classMapInterpolate8={name:"\u0275\u0275classMapInterpolate8",moduleName:m}}static{this.classMapInterpolateV={name:"\u0275\u0275classMapInterpolateV",moduleName:m}}static{this.styleProp={name:"\u0275\u0275styleProp",moduleName:m}}static{this.stylePropInterpolate1={name:"\u0275\u0275stylePropInterpolate1",moduleName:m}}static{this.stylePropInterpolate2={name:"\u0275\u0275stylePropInterpolate2",moduleName:m}}static{this.stylePropInterpolate3={name:"\u0275\u0275stylePropInterpolate3",moduleName:m}}static{this.stylePropInterpolate4={name:"\u0275\u0275stylePropInterpolate4",moduleName:m}}static{this.stylePropInterpolate5={name:"\u0275\u0275stylePropInterpolate5",moduleName:m}}static{this.stylePropInterpolate6={name:"\u0275\u0275stylePropInterpolate6",moduleName:m}}static{this.stylePropInterpolate7={name:"\u0275\u0275stylePropInterpolate7",moduleName:m}}static{this.stylePropInterpolate8={name:"\u0275\u0275stylePropInterpolate8",moduleName:m}}static{this.stylePropInterpolateV={name:"\u0275\u0275stylePropInterpolateV",moduleName:m}}static{this.nextContext={name:"\u0275\u0275nextContext",moduleName:m}}static{this.resetView={name:"\u0275\u0275resetView",moduleName:m}}static{this.templateCreate={name:"\u0275\u0275template",moduleName:m}}static{this.defer={name:"\u0275\u0275defer",moduleName:m}}static{this.deferWhen={name:"\u0275\u0275deferWhen",moduleName:m}}static{this.deferOnIdle={name:"\u0275\u0275deferOnIdle",moduleName:m}}static{this.deferOnImmediate={name:"\u0275\u0275deferOnImmediate",moduleName:m}}static{this.deferOnTimer={name:"\u0275\u0275deferOnTimer",moduleName:m}}static{this.deferOnHover={name:"\u0275\u0275deferOnHover",moduleName:m}}static{this.deferOnInteraction={name:"\u0275\u0275deferOnInteraction",moduleName:m}}static{this.deferOnViewport={name:"\u0275\u0275deferOnViewport",moduleName:m}}static{this.deferPrefetchWhen={name:"\u0275\u0275deferPrefetchWhen",moduleName:m}}static{this.deferPrefetchOnIdle={name:"\u0275\u0275deferPrefetchOnIdle",moduleName:m}}static{this.deferPrefetchOnImmediate={name:"\u0275\u0275deferPrefetchOnImmediate",moduleName:m}}static{this.deferPrefetchOnTimer={name:"\u0275\u0275deferPrefetchOnTimer",moduleName:m}}static{this.deferPrefetchOnHover={name:"\u0275\u0275deferPrefetchOnHover",moduleName:m}}static{this.deferPrefetchOnInteraction={name:"\u0275\u0275deferPrefetchOnInteraction",moduleName:m}}static{this.deferPrefetchOnViewport={name:"\u0275\u0275deferPrefetchOnViewport",moduleName:m}}static{this.deferEnableTimerScheduling={name:"\u0275\u0275deferEnableTimerScheduling",moduleName:m}}static{this.conditional={name:"\u0275\u0275conditional",moduleName:m}}static{this.repeater={name:"\u0275\u0275repeater",moduleName:m}}static{this.repeaterCreate={name:"\u0275\u0275repeaterCreate",moduleName:m}}static{this.repeaterTrackByIndex={name:"\u0275\u0275repeaterTrackByIndex",moduleName:m}}static{this.repeaterTrackByIdentity={name:"\u0275\u0275repeaterTrackByIdentity",moduleName:m}}static{this.componentInstance={name:"\u0275\u0275componentInstance",moduleName:m}}static{this.text={name:"\u0275\u0275text",moduleName:m}}static{this.enableBindings={name:"\u0275\u0275enableBindings",moduleName:m}}static{this.disableBindings={name:"\u0275\u0275disableBindings",moduleName:m}}static{this.getCurrentView={name:"\u0275\u0275getCurrentView",moduleName:m}}static{this.textInterpolate={name:"\u0275\u0275textInterpolate",moduleName:m}}static{this.textInterpolate1={name:"\u0275\u0275textInterpolate1",moduleName:m}}static{this.textInterpolate2={name:"\u0275\u0275textInterpolate2",moduleName:m}}static{this.textInterpolate3={name:"\u0275\u0275textInterpolate3",moduleName:m}}static{this.textInterpolate4={name:"\u0275\u0275textInterpolate4",moduleName:m}}static{this.textInterpolate5={name:"\u0275\u0275textInterpolate5",moduleName:m}}static{this.textInterpolate6={name:"\u0275\u0275textInterpolate6",moduleName:m}}static{this.textInterpolate7={name:"\u0275\u0275textInterpolate7",moduleName:m}}static{this.textInterpolate8={name:"\u0275\u0275textInterpolate8",moduleName:m}}static{this.textInterpolateV={name:"\u0275\u0275textInterpolateV",moduleName:m}}static{this.restoreView={name:"\u0275\u0275restoreView",moduleName:m}}static{this.pureFunction0={name:"\u0275\u0275pureFunction0",moduleName:m}}static{this.pureFunction1={name:"\u0275\u0275pureFunction1",moduleName:m}}static{this.pureFunction2={name:"\u0275\u0275pureFunction2",moduleName:m}}static{this.pureFunction3={name:"\u0275\u0275pureFunction3",moduleName:m}}static{this.pureFunction4={name:"\u0275\u0275pureFunction4",moduleName:m}}static{this.pureFunction5={name:"\u0275\u0275pureFunction5",moduleName:m}}static{this.pureFunction6={name:"\u0275\u0275pureFunction6",moduleName:m}}static{this.pureFunction7={name:"\u0275\u0275pureFunction7",moduleName:m}}static{this.pureFunction8={name:"\u0275\u0275pureFunction8",moduleName:m}}static{this.pureFunctionV={name:"\u0275\u0275pureFunctionV",moduleName:m}}static{this.pipeBind1={name:"\u0275\u0275pipeBind1",moduleName:m}}static{this.pipeBind2={name:"\u0275\u0275pipeBind2",moduleName:m}}static{this.pipeBind3={name:"\u0275\u0275pipeBind3",moduleName:m}}static{this.pipeBind4={name:"\u0275\u0275pipeBind4",moduleName:m}}static{this.pipeBindV={name:"\u0275\u0275pipeBindV",moduleName:m}}static{this.hostProperty={name:"\u0275\u0275hostProperty",moduleName:m}}static{this.property={name:"\u0275\u0275property",moduleName:m}}static{this.propertyInterpolate={name:"\u0275\u0275propertyInterpolate",moduleName:m}}static{this.propertyInterpolate1={name:"\u0275\u0275propertyInterpolate1",moduleName:m}}static{this.propertyInterpolate2={name:"\u0275\u0275propertyInterpolate2",moduleName:m}}static{this.propertyInterpolate3={name:"\u0275\u0275propertyInterpolate3",moduleName:m}}static{this.propertyInterpolate4={name:"\u0275\u0275propertyInterpolate4",moduleName:m}}static{this.propertyInterpolate5={name:"\u0275\u0275propertyInterpolate5",moduleName:m}}static{this.propertyInterpolate6={name:"\u0275\u0275propertyInterpolate6",moduleName:m}}static{this.propertyInterpolate7={name:"\u0275\u0275propertyInterpolate7",moduleName:m}}static{this.propertyInterpolate8={name:"\u0275\u0275propertyInterpolate8",moduleName:m}}static{this.propertyInterpolateV={name:"\u0275\u0275propertyInterpolateV",moduleName:m}}static{this.i18n={name:"\u0275\u0275i18n",moduleName:m}}static{this.i18nAttributes={name:"\u0275\u0275i18nAttributes",moduleName:m}}static{this.i18nExp={name:"\u0275\u0275i18nExp",moduleName:m}}static{this.i18nStart={name:"\u0275\u0275i18nStart",moduleName:m}}static{this.i18nEnd={name:"\u0275\u0275i18nEnd",moduleName:m}}static{this.i18nApply={name:"\u0275\u0275i18nApply",moduleName:m}}static{this.i18nPostprocess={name:"\u0275\u0275i18nPostprocess",moduleName:m}}static{this.pipe={name:"\u0275\u0275pipe",moduleName:m}}static{this.projection={name:"\u0275\u0275projection",moduleName:m}}static{this.projectionDef={name:"\u0275\u0275projectionDef",moduleName:m}}static{this.reference={name:"\u0275\u0275reference",moduleName:m}}static{this.inject={name:"\u0275\u0275inject",moduleName:m}}static{this.injectAttribute={name:"\u0275\u0275injectAttribute",moduleName:m}}static{this.directiveInject={name:"\u0275\u0275directiveInject",moduleName:m}}static{this.invalidFactory={name:"\u0275\u0275invalidFactory",moduleName:m}}static{this.invalidFactoryDep={name:"\u0275\u0275invalidFactoryDep",moduleName:m}}static{this.templateRefExtractor={name:"\u0275\u0275templateRefExtractor",moduleName:m}}static{this.forwardRef={name:"forwardRef",moduleName:m}}static{this.resolveForwardRef={name:"resolveForwardRef",moduleName:m}}static{this.\u0275\u0275defineInjectable={name:"\u0275\u0275defineInjectable",moduleName:m}}static{this.declareInjectable={name:"\u0275\u0275ngDeclareInjectable",moduleName:m}}static{this.InjectableDeclaration={name:"\u0275\u0275InjectableDeclaration",moduleName:m}}static{this.resolveWindow={name:"\u0275\u0275resolveWindow",moduleName:m}}static{this.resolveDocument={name:"\u0275\u0275resolveDocument",moduleName:m}}static{this.resolveBody={name:"\u0275\u0275resolveBody",moduleName:m}}static{this.getComponentDepsFactory={name:"\u0275\u0275getComponentDepsFactory",moduleName:m}}static{this.defineComponent={name:"\u0275\u0275defineComponent",moduleName:m}}static{this.declareComponent={name:"\u0275\u0275ngDeclareComponent",moduleName:m}}static{this.setComponentScope={name:"\u0275\u0275setComponentScope",moduleName:m}}static{this.ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:m}}static{this.ViewEncapsulation={name:"ViewEncapsulation",moduleName:m}}static{this.ComponentDeclaration={name:"\u0275\u0275ComponentDeclaration",moduleName:m}}static{this.FactoryDeclaration={name:"\u0275\u0275FactoryDeclaration",moduleName:m}}static{this.declareFactory={name:"\u0275\u0275ngDeclareFactory",moduleName:m}}static{this.FactoryTarget={name:"\u0275\u0275FactoryTarget",moduleName:m}}static{this.defineDirective={name:"\u0275\u0275defineDirective",moduleName:m}}static{this.declareDirective={name:"\u0275\u0275ngDeclareDirective",moduleName:m}}static{this.DirectiveDeclaration={name:"\u0275\u0275DirectiveDeclaration",moduleName:m}}static{this.InjectorDef={name:"\u0275\u0275InjectorDef",moduleName:m}}static{this.InjectorDeclaration={name:"\u0275\u0275InjectorDeclaration",moduleName:m}}static{this.defineInjector={name:"\u0275\u0275defineInjector",moduleName:m}}static{this.declareInjector={name:"\u0275\u0275ngDeclareInjector",moduleName:m}}static{this.NgModuleDeclaration={name:"\u0275\u0275NgModuleDeclaration",moduleName:m}}static{this.ModuleWithProviders={name:"ModuleWithProviders",moduleName:m}}static{this.defineNgModule={name:"\u0275\u0275defineNgModule",moduleName:m}}static{this.declareNgModule={name:"\u0275\u0275ngDeclareNgModule",moduleName:m}}static{this.setNgModuleScope={name:"\u0275\u0275setNgModuleScope",moduleName:m}}static{this.registerNgModuleType={name:"\u0275\u0275registerNgModuleType",moduleName:m}}static{this.PipeDeclaration={name:"\u0275\u0275PipeDeclaration",moduleName:m}}static{this.definePipe={name:"\u0275\u0275definePipe",moduleName:m}}static{this.declarePipe={name:"\u0275\u0275ngDeclarePipe",moduleName:m}}static{this.declareClassMetadata={name:"\u0275\u0275ngDeclareClassMetadata",moduleName:m}}static{this.declareClassMetadataAsync={name:"\u0275\u0275ngDeclareClassMetadataAsync",moduleName:m}}static{this.setClassMetadata={name:"\u0275setClassMetadata",moduleName:m}}static{this.setClassMetadataAsync={name:"\u0275setClassMetadataAsync",moduleName:m}}static{this.setClassDebugInfo={name:"\u0275setClassDebugInfo",moduleName:m}}static{this.queryRefresh={name:"\u0275\u0275queryRefresh",moduleName:m}}static{this.viewQuery={name:"\u0275\u0275viewQuery",moduleName:m}}static{this.loadQuery={name:"\u0275\u0275loadQuery",moduleName:m}}static{this.contentQuery={name:"\u0275\u0275contentQuery",moduleName:m}}static{this.viewQuerySignal={name:"\u0275\u0275viewQuerySignal",moduleName:m}}static{this.contentQuerySignal={name:"\u0275\u0275contentQuerySignal",moduleName:m}}static{this.queryAdvance={name:"\u0275\u0275queryAdvance",moduleName:m}}static{this.twoWayProperty={name:"\u0275\u0275twoWayProperty",moduleName:m}}static{this.twoWayBindingSet={name:"\u0275\u0275twoWayBindingSet",moduleName:m}}static{this.twoWayListener={name:"\u0275\u0275twoWayListener",moduleName:m}}static{this.declareLet={name:"\u0275\u0275declareLet",moduleName:m}}static{this.storeLet={name:"\u0275\u0275storeLet",moduleName:m}}static{this.readContextLet={name:"\u0275\u0275readContextLet",moduleName:m}}static{this.NgOnChangesFeature={name:"\u0275\u0275NgOnChangesFeature",moduleName:m}}static{this.InheritDefinitionFeature={name:"\u0275\u0275InheritDefinitionFeature",moduleName:m}}static{this.CopyDefinitionFeature={name:"\u0275\u0275CopyDefinitionFeature",moduleName:m}}static{this.StandaloneFeature={name:"\u0275\u0275StandaloneFeature",moduleName:m}}static{this.ProvidersFeature={name:"\u0275\u0275ProvidersFeature",moduleName:m}}static{this.HostDirectivesFeature={name:"\u0275\u0275HostDirectivesFeature",moduleName:m}}static{this.InputTransformsFeatureFeature={name:"\u0275\u0275InputTransformsFeature",moduleName:m}}static{this.listener={name:"\u0275\u0275listener",moduleName:m}}static{this.getInheritedFactory={name:"\u0275\u0275getInheritedFactory",moduleName:m}}static{this.sanitizeHtml={name:"\u0275\u0275sanitizeHtml",moduleName:m}}static{this.sanitizeStyle={name:"\u0275\u0275sanitizeStyle",moduleName:m}}static{this.sanitizeResourceUrl={name:"\u0275\u0275sanitizeResourceUrl",moduleName:m}}static{this.sanitizeScript={name:"\u0275\u0275sanitizeScript",moduleName:m}}static{this.sanitizeUrl={name:"\u0275\u0275sanitizeUrl",moduleName:m}}static{this.sanitizeUrlOrResourceUrl={name:"\u0275\u0275sanitizeUrlOrResourceUrl",moduleName:m}}static{this.trustConstantHtml={name:"\u0275\u0275trustConstantHtml",moduleName:m}}static{this.trustConstantResourceUrl={name:"\u0275\u0275trustConstantResourceUrl",moduleName:m}}static{this.validateIframeAttribute={name:"\u0275\u0275validateIframeAttribute",moduleName:m}}static{this.InputSignalBrandWriteType={name:"\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE",moduleName:m}}static{this.UnwrapDirectiveSignalInputs={name:"\u0275UnwrapDirectiveSignalInputs",moduleName:m}}static{this.unwrapWritableSignal={name:"\u0275unwrapWritableSignal",moduleName:m}}},UE=/-+([a-z0-9])/g;function VE(t){return t.replace(UE,(...e)=>e[1].toUpperCase())}function qE(t,e){return ld(t,":",e)}function GE(t,e){return ld(t,".",e)}function ld(t,e,n){let r=t.indexOf(e);return r==-1?n:[t.slice(0,r).trim(),t.slice(r+1).trim()]}function HE(t){let e=[];for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r>=55296&&r<=56319&&t.length>n+1){let s=t.charCodeAt(n+1);s>=56320&&s<=57343&&(n++,r=(r-55296<<10)+s-56320+65536)}r<=127?e.push(r):r<=2047?e.push(r>>6&31|192,r&63|128):r<=65535?e.push(r>>12|224,r>>6&63|128,r&63|128):r<=2097151&&e.push(r>>18&7|240,r>>12&63|128,r>>6&63|128,r&63|128)}return e}function cd(t){if(typeof t=="string")return t;if(Array.isArray(t))return"["+t.map(cd).join(", ")+"]";if(t==null)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;if(!t.toString)return"object";let e=t.toString();if(e==null)return""+e;let n=e.indexOf(`
|
|
@@ -25,13 +25,13 @@ If '${e}' is a directive input, make sure the directive is imported by the curre
|
|
|
25
25
|
`){let i=this._getContainer();i!=null&&i.children.length===0&&this.getTagDefinition(i.name).ignoreFirstLf&&(s=s.substring(1),n[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[s]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),n.push(e),e.type===8?s+=e.parts.join("").replace(/&([^;]+);/g,af):e.type===9?s+=e.parts[0]:s+=e.parts.join("");if(s.length>0){let i=e.sourceSpan;this._addToParent(new Xr(s,new V(r.start,i.end,r.fullStart,r.details),n))}}_closeVoidElement(){let e=this._getContainer();e instanceof Lt&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[n,r]=e.parts,s=[];for(;this._peek.type===14;)s.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(n,r,this._getClosestParentElement()),o=!1;if(this._peek.type===2){this._advance(),o=!0;let d=this.getTagDefinition(i);d.canSelfClose||Yl(i)!==null||d.isVoid||this.errors.push(qe.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),o=!1);let a=this._peek.sourceSpan.fullStart,l=new V(e.sourceSpan.start,a,e.sourceSpan.fullStart),c=new V(e.sourceSpan.start,a,e.sourceSpan.fullStart),u=new Lt(i,s,[],l,c,void 0),h=this._getContainer();this._pushContainer(u,h instanceof Lt&&this.getTagDefinition(h.name).isClosedByChild(u.name)),o?this._popContainer(i,Lt,l):e.type===4&&(this._popContainer(i,Lt,null),this.errors.push(qe.create(i,l,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,n){n&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let n=this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(this.getTagDefinition(n).isVoid)this.errors.push(qe.create(n,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(n,Lt,e.sourceSpan)){let r=`Unexpected closing tag "${n}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(qe.create(n,e.sourceSpan,r))}}_popContainer(e,n,r){let s=!1;for(let i=this._containerStack.length-1;i>=0;i--){let o=this._containerStack[i];if((o.name===e||e===null)&&o instanceof n)return o.endSourceSpan=r,o.sourceSpan.end=r!==null?r.end:o.sourceSpan.end,this._containerStack.splice(i,this._containerStack.length-i),!s;(o instanceof Ft||o instanceof Lt&&!this.getTagDefinition(o.name).closedByParent)&&(s=!0)}return!1}_consumeAttr(e){let n=Ql(e.parts[0],e.parts[1]),r=e.sourceSpan.end;this._peek.type===15&&this._advance();let s="",i=[],o,a;if(this._peek.type===16)for(o=this._peek.sourceSpan,a=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let u=this._advance();i.push(u),u.type===17?s+=u.parts.join("").replace(/&([^;]+);/g,af):u.type===9?s+=u.parts[0]:s+=u.parts.join(""),a=r=u.sourceSpan.end}this._peek.type===15&&(r=this._advance().sourceSpan.end);let c=o&&a&&new V(o.start,a,o.fullStart);return new Dc(n,s,new V(e.sourceSpan.start,r,e.sourceSpan.fullStart),e.sourceSpan,c,i.length>0?i:void 0,void 0)}_consumeBlockOpen(e){let n=[];for(;this._peek.type===27;){let a=this._advance();n.push(new va(a.parts[0],a.sourceSpan))}this._peek.type===25&&this._advance();let r=this._peek.sourceSpan.fullStart,s=new V(e.sourceSpan.start,r,e.sourceSpan.fullStart),i=new V(e.sourceSpan.start,r,e.sourceSpan.fullStart),o=new Ft(e.parts[0],n,[],s,e.sourceSpan,i);this._pushContainer(o,!1)}_consumeBlockClose(e){this._popContainer(null,Ft,e.sourceSpan)||this.errors.push(qe.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(e){let n=[];for(;this._peek.type===27;){let a=this._advance();n.push(new va(a.parts[0],a.sourceSpan))}let r=this._peek.sourceSpan.fullStart,s=new V(e.sourceSpan.start,r,e.sourceSpan.fullStart),i=new V(e.sourceSpan.start,r,e.sourceSpan.fullStart),o=new Ft(e.parts[0],n,[],s,e.sourceSpan,i);this._pushContainer(o,!1),this._popContainer(null,Ft,null),this.errors.push(qe.create(e.parts[0],s,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(e){let n=e.parts[0],r,s;if(this._peek.type!==30){this.errors.push(qe.create(e.parts[0],e.sourceSpan,`Invalid @let declaration "${n}". Declaration must have a value.`));return}else r=this._advance();if(this._peek.type!==31){this.errors.push(qe.create(e.parts[0],e.sourceSpan,`Unterminated @let declaration "${n}". Declaration must be terminated with a semicolon.`));return}else s=this._advance();let i=s.sourceSpan.fullStart,o=new V(e.sourceSpan.start,i,e.sourceSpan.fullStart),a=e.sourceSpan.toString().lastIndexOf(n),l=e.sourceSpan.start.moveBy(a),c=new V(l,e.sourceSpan.end),u=new Ea(n,r.parts[0],o,c,r.sourceSpan);this._addToParent(u)}_consumeIncompleteLet(e){let n=e.parts[0]??"",r=n?` "${n}"`:"";if(n.length>0){let s=e.sourceSpan.toString().lastIndexOf(n),i=e.sourceSpan.start.moveBy(s),o=new V(i,e.sourceSpan.end),a=new V(e.sourceSpan.start,e.sourceSpan.start.moveBy(0)),l=new Ea(n,"",e.sourceSpan,o,a);this._addToParent(l)}this.errors.push(qe.create(e.parts[0],e.sourceSpan,`Incomplete @let declaration${r}. @let declarations must be written as \`@let <name> = <value>;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let e=this._containerStack.length-1;e>-1;e--)if(this._containerStack[e]instanceof Lt)return this._containerStack[e];return null}_addToParent(e){let n=this._getContainer();n===null?this.rootNodes.push(e):n.children.push(e)}_getElementFullName(e,n,r){if(e===""&&(e=this.getTagDefinition(n).implicitNamespacePrefix||"",e===""&&r!=null)){let s=tn(r.name)[1];this.getTagDefinition(s).preventNamespaceInheritance||(e=Yl(r.name))}return Ql(e,n)}};function of(t,e){return t.length>0&&t[t.length-1]===e}function af(t,e){return Sa[e]!==void 0?Sa[e]||t:/^#x[a-f0-9]+$/i.test(e)?String.fromCodePoint(parseInt(e.slice(2),16)):/^#\d+$/.test(e)?String.fromCodePoint(parseInt(e.slice(1),10)):t}var lf=new Set(["iframe|srcdoc","*|innerhtml","*|outerhtml","embed|src","object|codebase","object|data"]);function Rx(t,e){return t=t.toLowerCase(),e=e.toLowerCase(),lf.has(t+"|"+e)||lf.has("*|"+e)}var kx=(t,e)=>(t instanceof Er&&(e instanceof Ms&&t.i18n instanceof st&&(e.previousMessage=t.i18n),t.i18n=e),e),Ca=class{constructor(e=Bt,n=!1,r=!1,s=yS){this.interpolationConfig=e,this.keepI18nAttrs=n,this.enableI18nLegacyMessageIdFormat=r,this.containerBlocks=s,this.hasI18nMeta=!1,this._errors=[]}_generateI18nMessage(e,n="",r){let{meaning:s,description:i,customId:o}=this._parseMetadata(n),l=dx(this.interpolationConfig,this.containerBlocks)(e,s,i,o,r);return this._setMessageId(l,n),this._setLegacyIds(l,n),l}visitAllWithErrors(e){let n=e.map(r=>r.visit(this,null));return new xa(n,this._errors)}visitElement(e){let n;if(pS(e)){this.hasI18nMeta=!0;let r=[],s={};for(let i of e.attrs)if(i.name===pd){let o=e.i18n||i.value;n=this._generateI18nMessage(e.children,o,kx),n.nodes.length===0&&(n=void 0),e.i18n=n}else if(i.name.startsWith(rc)){let o=i.name.slice(rc.length);Rx(e.name,o)?this._reportError(i,`Translating attribute '${o}' is disallowed for security reasons.`):s[o]=i.value}else r.push(i);if(Object.keys(s).length)for(let i of r){let o=s[i.name];o!==void 0&&i.value&&(i.i18n=this._generateI18nMessage([i],i.i18n||o))}this.keepI18nAttrs||(e.attrs=r)}return Ee(this,e.children,n),e}visitExpansion(e,n){let r,s=e.i18n;if(this.hasI18nMeta=!0,s instanceof Ms){let i=s.name;r=this._generateI18nMessage([e],s);let o=fd(r);o.name=i,n!==null&&(n.placeholderToMessage[i]=r)}else r=this._generateI18nMessage([e],n||s);return e.i18n=r,e}visitText(e){return e}visitAttribute(e){return e}visitComment(e){return e}visitExpansionCase(e){return e}visitBlock(e,n){return Ee(this,e.children,n),e}visitBlockParameter(e,n){return e}visitLetDeclaration(e,n){return e}_parseMetadata(e){return typeof e=="string"?Lx(e):e instanceof st?e:{}}_setMessageId(e,n){e.id||(e.id=n instanceof st&&n.id||gE(e))}_setLegacyIds(e,n){if(this.enableI18nLegacyMessageIdFormat)e.legacyIds=[mE(e),Jf(e)];else if(typeof n!="string"){let r=n instanceof st?n:n instanceof Ms?n.previousMessage:void 0;e.legacyIds=r?r.legacyIds:[]}}_reportError(e,n){this._errors.push(new Pc(e.sourceSpan,n))}},Px="|",Mx="@@";function Lx(t=""){let e,n,r;if(t=t.trim(),t){let s=t.indexOf(Mx),i=t.indexOf(Px),o;[o,e]=s>-1?[t.slice(0,s),t.slice(s+2)]:[t,""],[n,r]=i>-1?[o.slice(0,i),o.slice(i+1)]:["",o]}return{customId:e,meaning:n,description:r}}function Ox(t){let e=[];return t.description?e.push({tagName:"desc",text:t.description}):e.push({tagName:"suppress",text:"{msgDescriptions}"}),t.meaning&&e.push({tagName:"meaning",text:t.meaning}),sd(e)}var Fx="goog.getMsg";function Bx(t,e,n,r){let s=Ux(e),i=[v(s)];Object.keys(r).length&&(i.push(Tc(pu(r,!0),!0)),i.push(Tc({original_code:Xe(Object.keys(r).map(l=>({key:so(l),quoted:!0,value:e.placeholders[l]?v(e.placeholders[l].sourceSpan.toString()):v(e.placeholderToMessage[l].nodes.map(c=>c.sourceSpan.toString()).join(""))})))})));let o=n.set(W(Fx).callFn(i)).toConstDecl();o.addLeadingComment(Ox(e));let a=new bt(t.set(n));return[o,a]}var $c=class{formatPh(e){return`{$${so(e)}}`}visitText(e){return e.value}visitContainer(e){return e.children.map(n=>n.visit(this)).join("")}visitIcu(e){return Gd(e)}visitTagPlaceholder(e){return e.isVoid?this.formatPh(e.startName):`${this.formatPh(e.startName)}${e.children.map(n=>n.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitPlaceholder(e){return this.formatPh(e.name)}visitBlockPlaceholder(e){return`${this.formatPh(e.startName)}${e.children.map(n=>n.visit(this)).join("")}${this.formatPh(e.closeName)}`}visitIcuPlaceholder(e,n){return this.formatPh(e.name)}},$x=new $c;function Ux(t){return t.nodes.map(e=>e.visit($x,null)).join("")}function Vx(t,e,n){let{messageParts:r,placeHolders:s}=qx(e),i=Gx(e),o=s.map(c=>n[c.text]),a=ad(e,r,s,o,i),l=t.set(a);return[new bt(l)]}var Uc=class{constructor(e,n){this.placeholderToMessage=e,this.pieces=n}visitText(e){if(this.pieces[this.pieces.length-1]instanceof ir)this.pieces[this.pieces.length-1].text+=e.value;else{let n=new V(e.sourceSpan.fullStart,e.sourceSpan.end,e.sourceSpan.fullStart,e.sourceSpan.details);this.pieces.push(new ir(e.value,n))}}visitContainer(e){e.children.forEach(n=>n.visit(this))}visitIcu(e){this.pieces.push(new ir(Gd(e),e.sourceSpan))}visitTagPlaceholder(e){this.pieces.push(this.createPlaceholderPiece(e.startName,e.startSourceSpan??e.sourceSpan)),e.isVoid||(e.children.forEach(n=>n.visit(this)),this.pieces.push(this.createPlaceholderPiece(e.closeName,e.endSourceSpan??e.sourceSpan)))}visitPlaceholder(e){this.pieces.push(this.createPlaceholderPiece(e.name,e.sourceSpan))}visitBlockPlaceholder(e){this.pieces.push(this.createPlaceholderPiece(e.startName,e.startSourceSpan??e.sourceSpan)),e.children.forEach(n=>n.visit(this)),this.pieces.push(this.createPlaceholderPiece(e.closeName,e.endSourceSpan??e.sourceSpan))}visitIcuPlaceholder(e){this.pieces.push(this.createPlaceholderPiece(e.name,e.sourceSpan,this.placeholderToMessage[e.name]))}createPlaceholderPiece(e,n,r){return new _r(so(e,!1),n,r)}};function qx(t){let e=[],n=new Uc(t.placeholderToMessage,e);return t.nodes.forEach(r=>r.visit(n)),Hx(e)}function Gx(t){let e=t.nodes[0],n=t.nodes[t.nodes.length-1];return new V(e.sourceSpan.fullStart,n.sourceSpan.end,e.sourceSpan.fullStart,e.sourceSpan.details)}function Hx(t){let e=[],n=[];t[0]instanceof _r&&e.push(Sl(t[0].sourceSpan.start));for(let r=0;r<t.length;r++){let s=t[r];s instanceof ir?e.push(s):(n.push(s),t[r-1]instanceof _r&&e.push(Sl(t[r-1].sourceSpan.end)))}return t[t.length-1]instanceof _r&&e.push(Sl(t[t.length-1].sourceSpan.end)),{messageParts:e,placeHolders:n}}function Sl(t){return new ir("",new V(t,t))}var cf="ngI18nClosureMode",Wx="i18n_",jx="I18N_EXP_",uf="\uFFFD",Kx="MSG_";function pf(t){return`${Kx}${t}`.toUpperCase()}function zx(t){return new ze(t.name,void 0,At,void 0,t.sourceSpan)}function Xx(t){let e=t.relativeContextFilePath.replace(/[^A-Za-z0-9]/g,"_").toUpperCase()+"_",n=new Map,r=new Map,s=new Map,i=new Map;for(let l of t.units)for(let c of l.ops())if(c.kind===p.ExtractedAttribute&&c.i18nContext!==null){let u=n.get(c.i18nContext)??[];u.push(c),n.set(c.i18nContext,u)}else if(c.kind===p.I18nAttributes)r.set(c.target,c);else if(c.kind===p.I18nExpression&&c.usage===Wr.I18nAttribute){let u=s.get(c.target)??[];u.push(c),s.set(c.target,u)}else c.kind===p.I18nMessage&&i.set(c.xref,c);let o=new Map,a=new Map;for(let l of t.units)for(let c of l.create)if(c.kind===p.I18nMessage){if(c.messagePlaceholder===null){let{mainVar:u,statements:h}=Kd(t,e,i,c);if(c.i18nBlock!==null){let d=t.addConst(u,h);a.set(c.i18nBlock,d)}else{t.constsInitializers.push(...h),o.set(c.i18nContext,u);let d=n.get(c.i18nContext);if(d!==void 0)for(let g of d)g.expression=u.clone()}}w.remove(c)}for(let l of t.units)for(let c of l.create)if(vr(c)){let u=r.get(c.xref);if(u===void 0)continue;let h=s.get(c.xref);if(h===void 0)throw new Error("AssertionError: Could not find any i18n expressions associated with an I18nAttributes instruction");let d=new Set;h=h.filter(y=>{let C=d.has(y.name);return d.add(y.name),!C});let g=h.flatMap(y=>{let C=o.get(y.context);if(C===void 0)throw new Error("AssertionError: Could not find i18n expression's value");return[v(y.name),C]});u.i18nAttributesConfig=t.addConst(new at(g))}for(let l of t.units)for(let c of l.create)if(c.kind===p.I18nStart){let u=a.get(c.root);if(u===void 0)throw new Error("AssertionError: Could not find corresponding i18n block index for an i18n message op; was an i18n message incorrectly assumed to correspond to an attribute?");c.messageIndex=u}}function Kd(t,e,n,r){let s=[],i=new Map;for(let c of r.subMessages){let u=n.get(c),{mainVar:h,statements:d}=Kd(t,e,n,u);s.push(...d);let g=i.get(u.messagePlaceholder)??[];g.push(h),i.set(u.messagePlaceholder,g)}Yx(r,i),r.params=new Map([...r.params.entries()].sort());let o=W(t.pool.uniqueName(Wx)),a=Zx(t.pool,r.message.id,e,t.i18nUseExternalIds),l;if(r.needsPostprocessing||r.postprocessingParams.size>0){let c=Object.fromEntries([...r.postprocessingParams.entries()].sort()),u=pu(c,!1),h=[];r.postprocessingParams.size>0&&h.push(Tc(u,!0)),l=d=>L(f.i18nPostprocess).callFn([d,...h])}return s.push(...Qx(r.message,o,a,r.params,l)),{mainVar:o,statements:s}}function Yx(t,e){for(let[n,r]of e)r.length===1?t.params.set(n,r[0]):(t.params.set(n,v(`${uf}${jx}${n}${uf}`)),t.postprocessingParams.set(n,ie(r)))}function Qx(t,e,n,r,s){let i=Object.fromEntries(r),o=[zx(e),no(Jx(),Bx(e,t,n,i),Vx(e,t,pu(i,!1)))];return s&&o.push(new bt(e.set(s(e)))),o}function Jx(){return to(W(cf)).notIdentical(v("undefined",uu)).and(W(cf))}function Zx(t,e,n,r){let s,i=n;if(r){let o=pf("EXTERNAL_"),a=t.uniqueName(i);s=`${o}${hi(e)}$$${a}`}else{let o=pf(i);s=t.uniqueName(o)}return W(s)}function eC(t){for(let e of t.units){let n=null,r=null,s=new Map,i=new Map,o=new Map;for(let a of e.create)switch(a.kind){case p.I18nStart:if(a.context===null)throw Error("I18n op should have its context set.");n=a;break;case p.I18nEnd:n=null;break;case p.IcuStart:if(a.context===null)throw Error("Icu op should have its context set.");r=a;break;case p.IcuEnd:r=null;break;case p.Text:if(n!==null)if(s.set(a.xref,n),i.set(a.xref,r),a.icuPlaceholder!==null){let l=Vw(t.allocateXrefId(),a.icuPlaceholder,[a.initialValue]);w.replace(a,l),o.set(a.xref,l)}else w.remove(a);break}for(let a of e.update)switch(a.kind){case p.InterpolateText:if(!s.has(a.target))continue;let l=s.get(a.target),c=i.get(a.target),u=o.get(a.target),h=c?c.context:l.context,d=c?Fs.Postproccessing:Fs.Creation,g=[];for(let y=0;y<a.interpolation.expressions.length;y++){let C=a.interpolation.expressions[y];g.push(Md(h,l.xref,l.xref,l.handle,C,u?.xref??null,a.interpolation.i18nPlaceholders[y]??null,d,Wr.I18nText,"",C.sourceSpan??a.sourceSpan))}w.replaceWithMany(a,g),u!==void 0&&(u.strings=a.interpolation.strings);break}}}function tC(t){for(let e of t.units)for(let n of e.create)switch(n.kind){case p.ElementStart:case p.Template:if(!Array.isArray(n.localRefs))throw new Error("AssertionError: expected localRefs to be an array still");if(n.numSlotsUsed+=n.localRefs.length,n.localRefs.length>0){let r=nC(n.localRefs);n.localRefs=t.addConst(r)}else n.localRefs=null;break}}function nC(t){let e=[];for(let n of t)e.push(v(n.name),v(n.target));return ie(e)}function rC(t){for(let e of t.units){let n=je.HTML;for(let r of e.create)r.kind===p.ElementStart&&r.namespace!==n&&(w.insertBefore(Pw(r.namespace),r),n=r.namespace)}}function sC(t){let e=[],n=0,r=0,s=0,i=0,o=0,a=null;for(;n<t.length;)switch(t.charCodeAt(n++)){case 40:r++;break;case 41:r--;break;case 39:s===0?s=39:s===39&&t.charCodeAt(n-1)!==92&&(s=0);break;case 34:s===0?s=34:s===34&&t.charCodeAt(n-1)!==92&&(s=0);break;case 58:!a&&r===0&&s===0&&(a=zd(t.substring(o,n-1).trim()),i=n);break;case 59:if(a&&i>0&&r===0&&s===0){let c=t.substring(i,n-1).trim();e.push(a,c),o=n,i=0,a=null}break}if(a&&i){let l=t.slice(i).trim();e.push(a,l)}return e}function zd(t){return t.replace(/[a-z][A-Z]/g,e=>e.charAt(0)+"-"+e.charAt(1)).toLowerCase()}function iC(t){let e=new Map;for(let n of t.units)for(let r of n.create)vr(r)&&e.set(r.xref,r);for(let n of t.units)for(let r of n.create)if(r.kind===p.ExtractedAttribute&&r.bindingKind===F.Attribute&&Ld(r.expression)){let s=e.get(r.target);if(s!==void 0&&s.kind===p.Template&&s.templateKind===gt.Structural)continue;if(r.name==="style"){let i=sC(r.expression.value);for(let o=0;o<i.length-1;o+=2)w.insertBefore($t(r.target,F.StyleProperty,null,i[o],v(i[o+1]),null,null,ce.STYLE),r);w.remove(r)}else if(r.name==="class"){let i=r.expression.value.trim().split(/\s+/g);for(let o of i)w.insertBefore($t(r.target,F.ClassName,null,o,null,null,null,ce.NONE),r);w.remove(r)}}}function oC(t){ai(t.root,t.componentName,{index:0},t.compatibility===vt.TemplateDefinitionBuilder)}function ai(t,e,n,r){t.fnName===null&&(t.fnName=t.job.pool.uniqueName(hi(`${e}_${t.job.fnSuffix}`),!1));let s=new Map;for(let i of t.ops())switch(i.kind){case p.Property:case p.HostProperty:i.isAnimationTrigger&&(i.name="@"+i.name);break;case p.Listener:if(i.handlerFnName!==null)break;if(!i.hostListener&&i.targetSlot.slot===null)throw new Error("Expected a slot to be assigned");let o="";i.isAnimationListener&&(i.name=`@${i.name}.${i.animationPhase}`,o="animation"),i.hostListener?i.handlerFnName=`${e}_${o}${i.name}_HostBindingHandler`:i.handlerFnName=`${t.fnName}_${i.tag.replace("-","_")}_${o}${i.name}_${i.targetSlot.slot}_listener`,i.handlerFnName=hi(i.handlerFnName);break;case p.TwoWayListener:if(i.handlerFnName!==null)break;if(i.targetSlot.slot===null)throw new Error("Expected a slot to be assigned");i.handlerFnName=hi(`${t.fnName}_${i.tag.replace("-","_")}_${i.name}_${i.targetSlot.slot}_listener`);break;case p.Variable:s.set(i.xref,aC(t,i.variable,n));break;case p.RepeaterCreate:if(!(t instanceof dn))throw new Error("AssertionError: must be compiling a component");if(i.handle.slot===null)throw new Error("Expected slot to be assigned");if(i.emptyView!==null){let c=t.job.views.get(i.emptyView);ai(c,`${e}_${i.functionNameSuffix}Empty_${i.handle.slot+2}`,n,r)}ai(t.job.views.get(i.xref),`${e}_${i.functionNameSuffix}_${i.handle.slot+1}`,n,r);break;case p.Projection:if(!(t instanceof dn))throw new Error("AssertionError: must be compiling a component");if(i.handle.slot===null)throw new Error("Expected slot to be assigned");if(i.fallbackView!==null){let c=t.job.views.get(i.fallbackView);ai(c,`${e}_ProjectionFallback_${i.handle.slot}`,n,r)}break;case p.Template:if(!(t instanceof dn))throw new Error("AssertionError: must be compiling a component");let a=t.job.views.get(i.xref);if(i.handle.slot===null)throw new Error("Expected slot to be assigned");let l=i.functionNameSuffix.length===0?"":`_${i.functionNameSuffix}`;ai(a,`${e}${l}_${i.handle.slot}`,n,r);break;case p.StyleProp:i.name=lC(i.name),r&&(i.name=hf(i.name));break;case p.ClassProp:r&&(i.name=hf(i.name));break}for(let i of t.ops())Ze(i,o=>{if(!(!(o instanceof Pn)||o.name!==null)){if(!s.has(o.xref))throw new Error(`Variable ${o.xref} not yet named`);o.name=s.get(o.xref)}})}function aC(t,e,n){if(e.name===null)switch(e.kind){case Le.Context:e.name=`ctx_r${n.index++}`;break;case Le.Identifier:if(t.job.compatibility===vt.TemplateDefinitionBuilder){let r=e.identifier==="ctx"?"i":"";e.name=`${e.identifier}_${r}r${++n.index}`}else e.name=`${e.identifier}_i${n.index++}`;break;default:e.name=`_r${++n.index}`;break}return e.name}function lC(t){return t.startsWith("--")?t:zd(t)}function hf(t){let e=t.indexOf("!important");return e>-1?t.substring(0,e):t}function cC(t){for(let e of t.units){for(let n of e.create)(n.kind===p.Listener||n.kind===p.TwoWayListener)&&ff(n.handlerOps);ff(e.update)}}function ff(t){for(let e of t){if(e.kind!==p.Statement||!(e.statement instanceof bt)||!(e.statement.expr instanceof aa))continue;let n=e.statement.expr.steps,r=!0;for(let s=e.next;s.kind!==p.ListEnd&&r;s=s.next)Ze(s,(i,o)=>{if(!Tn(i))return i;if(r&&!(o&te.InChildOperation))switch(i.kind){case O.NextContext:i.steps+=n,w.remove(e),r=!1;break;case O.GetCurrentView:case O.Reference:case O.ContextLetReference:r=!1;break}})}}var uC="ng-container";function pC(t){for(let e of t.units){let n=new Set;for(let r of e.create)r.kind===p.ElementStart&&r.tag===uC&&(r.kind=p.ContainerStart,n.add(r.xref)),r.kind===p.ElementEnd&&n.has(r.xref)&&(r.kind=p.ContainerEnd)}}function hC(t,e){let n=t.get(e);if(n===void 0)throw new Error("All attributes should have an element-like target.");return n}function fC(t){let e=new Map;for(let n of t.units)for(let r of n.create)vr(r)&&e.set(r.xref,r);for(let n of t.units)for(let r of n.create)(r.kind===p.ElementStart||r.kind===p.ContainerStart)&&r.nonBindable&&w.insertAfter(Rw(r.xref),r),(r.kind===p.ElementEnd||r.kind===p.ContainerEnd)&&hC(e,r.xref).nonBindable&&w.insertBefore(kw(r.xref),r)}function dC(t){for(let e of t.units)for(let n of e.ops())$e(n,r=>{if(!(r instanceof ee)||r.operator!==I.NullishCoalesce)return r;let s=new nn(r.lhs.clone(),t.allocateXrefId()),i=new qn(s.xref);return new Zt(new ee(I.And,new ee(I.NotIdentical,s,Ns),new ee(I.NotIdentical,i,new xe(void 0))),i.clone(),r.rhs)},te.None)}function Nn(t){return e=>e.kind===t}function mi(t,e){return n=>n.kind===t&&e===n.expression instanceof Ae}function mC(t){return t.kind===p.Listener&&!(t.hostListener&&t.isAnimationListener)||t.kind===p.TwoWayListener}function gC(t){return(t.kind===p.Property||t.kind===p.TwoWayProperty)&&!(t.expression instanceof Ae)}var yC=[{test:t=>t.kind===p.Listener&&t.hostListener&&t.isAnimationListener},{test:mC}],vC=[{test:Nn(p.StyleMap),transform:Ia},{test:Nn(p.ClassMap),transform:Ia},{test:Nn(p.StyleProp)},{test:Nn(p.ClassProp)},{test:mi(p.Attribute,!0)},{test:mi(p.Property,!0)},{test:gC},{test:mi(p.Attribute,!1)}],EC=[{test:mi(p.HostProperty,!0)},{test:mi(p.HostProperty,!1)},{test:Nn(p.Attribute)},{test:Nn(p.StyleMap),transform:Ia},{test:Nn(p.ClassMap),transform:Ia},{test:Nn(p.StyleProp)},{test:Nn(p.ClassProp)}],df=new Set([p.Listener,p.TwoWayListener,p.StyleMap,p.ClassMap,p.StyleProp,p.ClassProp,p.Property,p.TwoWayProperty,p.HostProperty,p.Attribute]);function SC(t){for(let e of t.units){mf(e.create,yC);let n=e.job.kind===N.Host?EC:vC;mf(e.update,n)}}function mf(t,e){let n=[],r=null;for(let s of t){let i=sa(s)?s.target:null;(!df.has(s.kind)||i!==r&&r!==null&&i!==null)&&(w.insertBefore(gf(n,e),s),n=[],r=null),df.has(s.kind)&&(n.push(s),w.remove(s),r=i??r)}t.push(gf(n,e))}function gf(t,e){let n=Array.from(e,()=>new Array);for(let r of t){let s=e.findIndex(i=>i.test(r));n[s].push(r)}return n.flatMap((r,s)=>{let i=e[s].transform;return i?i(r):r})}function Ia(t){return t.slice(t.length-1)}function wC(t){for(let e of t.units){let n=Au(e);for(let r of e.ops())switch(r.kind){case p.Binding:let s=xC(n,r.target);TC(r.name)&&s.kind===p.Projection&&w.remove(r);break}}}function TC(t){return t.toLowerCase()==="select"}function xC(t,e){let n=t.get(e);if(n===void 0)throw new Error("All attributes should have an slottable target.");return n}function CC(t){for(let e of t.units)IC(e)}function IC(t){for(let e of t.update)Ze(e,(n,r)=>{if(Tn(n)&&n.kind===O.PipeBinding){if(r&te.InChildOperation)throw new Error("AssertionError: pipe bindings should not appear in child expressions");if(t.job.compatibility){if(e.target==null)throw new Error("AssertionError: expected slot handle to be assigned for pipe creation");AC(t,e.target,n)}else t.create.push(Bd(n.target,n.targetSlot,n.name))}})}function AC(t,e,n){for(let r=t.create.head.next;r.kind!==p.ListEnd;r=r.next){if(!zs(r)||r.xref!==e)continue;for(;r.next.kind===p.Pipe;)r=r.next;let s=Bd(n.target,n.targetSlot,n.name);w.insertBefore(s,r.next);return}throw new Error(`AssertionError: unable to find insertion point for pipe ${n.name}`)}function NC(t){for(let e of t.units)for(let n of e.update)$e(n,r=>!(r instanceof zr)||r.args.length<=4?r:new ua(r.target,r.targetSlot,r.name,ie(r.args),r.args.length),te.None)}function bC(t){Xd(t.root,0)}function Xd(t,e){let n=null;for(let r of t.create)switch(r.kind){case p.I18nStart:r.subTemplateIndex=e===0?null:e,n=r;break;case p.I18nEnd:n.subTemplateIndex===null&&(e=0),n=null;break;case p.Template:e=wl(t.job.views.get(r.xref),n,r.i18nPlaceholder,e);break;case p.RepeaterCreate:let s=t.job.views.get(r.xref);e=wl(s,n,r.i18nPlaceholder,e),r.emptyView!==null&&(e=wl(t.job.views.get(r.emptyView),n,r.emptyI18nPlaceholder,e));break}return e}function wl(t,e,n,r){if(n!==void 0){if(e===null)throw Error("Expected template with i18n placeholder to be in an i18n block.");r++,DC(t,e)}return Xd(t,r)}function DC(t,e){if(t.create.head.next?.kind!==p.I18nStart){let n=t.job.allocateXrefId();w.insertAfter(Fa(n,e.message,e.root,null),t.create.head),w.insertBefore(Ba(n,null),t.create.tail)}}function _C(t){for(let e of t.units)for(let n of e.ops())Ze(n,r=>{if(!(r instanceof Kr)||r.body===null)return;let s=new Vc(r.args.length);r.fn=t.pool.getSharedConstant(s,r.body),r.body=null})}var Vc=class extends ws{constructor(e){super(),this.numArgs=e}keyOf(e){return e instanceof Bs?`param(${e.index})`:super.keyOf(e)}toSharedConstantDeclaration(e,n){let r=[];for(let i=0;i<this.numArgs;i++)r.push(new Oe("a"+i));let s=b(n,i=>i instanceof Bs?W("a"+i.index):i,te.None);return new ze(e,new Mn(r,s),void 0,De.Final)}};function RC(t){for(let e of t.units)for(let n of e.update)$e(n,(r,s)=>s&te.InChildOperation?r:r instanceof at?kC(r):r instanceof qt?PC(r):r,te.None)}function kC(t){let e=[],n=[];for(let r of t.entries)if(r.isConstant())e.push(r);else{let s=n.length;n.push(r),e.push(new Bs(s))}return new Kr(ie(e),n)}function PC(t){let e=[],n=[];for(let r of t.entries)if(r.value.isConstant())e.push(r);else{let s=n.length;n.push(r.value),e.push(new Or(r.key,new Bs(s),r.quoted))}return new Kr(Xe(e),n)}function MC(t,e,n,r,s){return $a(f.element,t,e,n,r,s)}function LC(t,e,n,r,s){return $a(f.elementStart,t,e,n,r,s)}function $a(t,e,n,r,s,i){let o=[v(e)];return n!==null&&o.push(v(n)),s!==null?o.push(v(r),v(s)):r!==null&&o.push(v(r)),J(t,o,i)}function OC(t){return J(f.elementEnd,[],t)}function FC(t,e,n,r){return $a(f.elementContainerStart,t,null,e,n,r)}function BC(t,e,n,r){return $a(f.elementContainer,t,null,e,n,r)}function $C(){return J(f.elementContainerEnd,[],null)}function UC(t,e,n,r,s,i,o,a){let l=[v(t),e,v(n),v(r),v(s),v(i)];for(o!==null&&(l.push(v(o)),l.push(L(f.templateRefExtractor)));l[l.length-1].isEquivalent(Ns);)l.pop();return J(f.templateCreate,l,a)}function VC(){return J(f.disableBindings,[],null)}function qC(){return J(f.enableBindings,[],null)}function GC(t,e,n,r,s){let i=[v(t),e];return n!==null&&(i.push(v(!1)),i.push(L(n))),J(r?f.syntheticHostListener:f.listener,i,s)}function yf(t,e){return L(f.twoWayBindingSet).callFn([t,e])}function HC(t,e,n){return J(f.twoWayListener,[v(t),e],n)}function WC(t,e){return J(f.pipe,[v(t),v(e)],null)}function jC(){return J(f.namespaceHTML,[],null)}function KC(){return J(f.namespaceSVG,[],null)}function zC(){return J(f.namespaceMathML,[],null)}function XC(t,e){return J(f.advance,t>1?[v(t)]:[],e)}function YC(t){return L(f.reference).callFn([v(t)])}function QC(t){return L(f.nextContext).callFn(t===1?[]:[v(t)])}function JC(){return L(f.getCurrentView).callFn([])}function ZC(t){return L(f.restoreView).callFn([t])}function eI(t){return L(f.resetView).callFn([t])}function tI(t,e,n){let r=[v(t,null)];return e!==""&&r.push(v(e)),J(f.text,r,n)}function nI(t,e,n,r,s,i,o,a,l,c){let u=[v(t),v(e),n??v(null),v(r),v(s),v(i),o??v(null),a??v(null),l?L(f.deferEnableTimerScheduling):v(null)],h;for(;(h=u[u.length-1])!==null&&h instanceof xe&&h.value===null;)u.pop();return J(f.defer,u,c)}var rI=new Map([[pe.Idle,[f.deferOnIdle,f.deferPrefetchOnIdle]],[pe.Immediate,[f.deferOnImmediate,f.deferPrefetchOnImmediate]],[pe.Timer,[f.deferOnTimer,f.deferPrefetchOnTimer]],[pe.Hover,[f.deferOnHover,f.deferPrefetchOnHover]],[pe.Interaction,[f.deferOnInteraction,f.deferPrefetchOnInteraction]],[pe.Viewport,[f.deferOnViewport,f.deferPrefetchOnViewport]]]);function sI(t,e,n,r){let s=rI.get(t);if(s===void 0)throw new Error(`Unable to determine instruction for trigger ${t}`);let i=n?s[1]:s[0];return J(i,e.map(o=>v(o)),r)}function iI(t){return J(f.projectionDef,t?[t]:[],null)}function oI(t,e,n,r,s,i,o){let a=[v(t)];return(e!==0||n!==null||r!==null)&&(a.push(v(e)),n!==null&&a.push(n),r!==null&&(n===null&&a.push(v(null)),a.push(W(r),v(s),v(i)))),J(f.projection,a,o)}function aI(t,e,n,r){let s=[v(t),v(e)];return n!==null&&s.push(v(n)),J(f.i18nStart,s,r)}function lI(t,e,n,r,s,i,o,a,l,c,u,h,d,g){let y=[v(t),W(e),v(n),v(r),v(s),v(i),o];return(a||l!==null)&&(y.push(v(a)),l!==null&&(y.push(W(l),v(c),v(u)),(h!==null||d!==null)&&y.push(v(h)),d!==null&&y.push(v(d)))),J(f.repeaterCreate,y,g)}function cI(t,e){return J(f.repeater,[t],e)}function uI(t,e,n){return J(t?f.deferPrefetchWhen:f.deferWhen,[e],n)}function pI(t,e){return J(f.declareLet,[v(t)],e)}function hI(t,e){return L(f.storeLet).callFn([t],e)}function fI(t){return L(f.readContextLet).callFn([v(t)])}function dI(t,e,n,r){let s=[v(t),v(e)];return n&&s.push(v(n)),J(f.i18n,s,r)}function mI(t){return J(f.i18nEnd,[],t)}function gI(t,e){let n=[v(t),v(e)];return J(f.i18nAttributes,n,null)}function yI(t,e,n,r){let s=[v(t),e];return n!==null&&s.push(n),J(f.property,s,r)}function vI(t,e,n,r){let s=[v(t),e];return n!==null&&s.push(n),J(f.twoWayProperty,s,r)}function EI(t,e,n,r){let s=[v(t),e];return(n!==null||r!==null)&&s.push(n??v(null)),r!==null&&s.push(v(r)),J(f.attribute,s,null)}function SI(t,e,n,r){let s=[v(t),e];return n!==null&&s.push(v(n)),J(f.styleProp,s,r)}function wI(t,e,n){return J(f.classProp,[v(t),e],n)}function TI(t,e){return J(f.styleMap,[t],e)}function xI(t,e){return J(f.classMap,[t],e)}var vf=[f.pipeBind1,f.pipeBind2,f.pipeBind3,f.pipeBind4];function CI(t,e,n){if(n.length<1||n.length>vf.length)throw new Error("pipeBind() argument count out of bounds");let r=vf[n.length-1];return L(r).callFn([v(t),v(e),...n])}function II(t,e,n){return L(f.pipeBindV).callFn([v(t),v(e),n])}function AI(t,e,n){let r=Xs(t,e);return Ys(BI,[],r,[],n)}function NI(t,e){return J(f.i18nExp,[t],e)}function bI(t,e){return J(f.i18nApply,[v(t)],e)}function DI(t,e,n,r,s){let i=Xs(e,n),o=[];return r!==null&&o.push(r),Ys($I,[v(t)],i,o,s)}function _I(t,e,n,r,s){let i=Xs(e,n),o=[];return r!==null&&o.push(r),Ys(VI,[v(t)],i,o,s)}function RI(t,e,n,r,s){let i=Xs(e,n),o=[];return r!==null&&o.push(v(r)),Ys(UI,[v(t)],i,o,s)}function kI(t,e,n){let r=Xs(t,e);return Ys(qI,[],r,[],n)}function PI(t,e,n){let r=Xs(t,e);return Ys(GI,[],r,[],n)}function MI(t,e,n,r){let s=[v(t),e];return n!==null&&s.push(n),J(f.hostProperty,s,r)}function LI(t,e,n){return J(f.syntheticHostProperty,[v(t),e],n)}function OI(t,e,n){return Yd(HI,[v(t),e],n,[],null)}function Xs(t,e){if(t.length<1||e.length!==t.length-1)throw new Error("AssertionError: expected specific shape of args for strings/expressions in interpolation");let n=[];if(e.length===1&&t[0]===""&&t[1]==="")n.push(e[0]);else{let r;for(r=0;r<e.length;r++)n.push(v(t[r]),e[r]);n.push(v(t[r]))}return n}function J(t,e,n){let r=L(t).callFn(e,n);return wn(new bt(r,n))}function FI(t,e,n){let r=[t];return e!==null&&r.push(e),J(f.conditional,r,n)}var BI={constant:[f.textInterpolate,f.textInterpolate1,f.textInterpolate2,f.textInterpolate3,f.textInterpolate4,f.textInterpolate5,f.textInterpolate6,f.textInterpolate7,f.textInterpolate8],variable:f.textInterpolateV,mapping:t=>{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}},$I={constant:[f.propertyInterpolate,f.propertyInterpolate1,f.propertyInterpolate2,f.propertyInterpolate3,f.propertyInterpolate4,f.propertyInterpolate5,f.propertyInterpolate6,f.propertyInterpolate7,f.propertyInterpolate8],variable:f.propertyInterpolateV,mapping:t=>{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}},UI={constant:[f.styleProp,f.stylePropInterpolate1,f.stylePropInterpolate2,f.stylePropInterpolate3,f.stylePropInterpolate4,f.stylePropInterpolate5,f.stylePropInterpolate6,f.stylePropInterpolate7,f.stylePropInterpolate8],variable:f.stylePropInterpolateV,mapping:t=>{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}},VI={constant:[f.attribute,f.attributeInterpolate1,f.attributeInterpolate2,f.attributeInterpolate3,f.attributeInterpolate4,f.attributeInterpolate5,f.attributeInterpolate6,f.attributeInterpolate7,f.attributeInterpolate8],variable:f.attributeInterpolateV,mapping:t=>{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}},qI={constant:[f.styleMap,f.styleMapInterpolate1,f.styleMapInterpolate2,f.styleMapInterpolate3,f.styleMapInterpolate4,f.styleMapInterpolate5,f.styleMapInterpolate6,f.styleMapInterpolate7,f.styleMapInterpolate8],variable:f.styleMapInterpolateV,mapping:t=>{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}},GI={constant:[f.classMap,f.classMapInterpolate1,f.classMapInterpolate2,f.classMapInterpolate3,f.classMapInterpolate4,f.classMapInterpolate5,f.classMapInterpolate6,f.classMapInterpolate7,f.classMapInterpolate8],variable:f.classMapInterpolateV,mapping:t=>{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}},HI={constant:[f.pureFunction0,f.pureFunction1,f.pureFunction2,f.pureFunction3,f.pureFunction4,f.pureFunction5,f.pureFunction6,f.pureFunction7,f.pureFunction8],variable:f.pureFunctionV,mapping:t=>t};function Yd(t,e,n,r,s){let i=t.mapping(n.length);if(i<t.constant.length)return L(t.constant[i]).callFn([...e,...n,...r],s);if(t.variable!==null)return L(t.variable).callFn([...e,ie(n),...r],s);throw new Error("AssertionError: unable to call variadic function")}function Ys(t,e,n,r,s){return wn(Yd(t,e,n,r,s).toStmt())}var WI=new Map([["window",f.resolveWindow],["document",f.resolveDocument],["body",f.resolveBody]]);function jI(t){for(let e of t.units)KI(e,e.create),Qd(e,e.update)}function KI(t,e){for(let n of e)switch($e(n,Jd,te.None),n.kind){case p.Text:w.replace(n,tI(n.handle.slot,n.initialValue,n.sourceSpan));break;case p.ElementStart:w.replace(n,LC(n.handle.slot,n.tag,n.attributes,n.localRefs,n.startSourceSpan));break;case p.Element:w.replace(n,MC(n.handle.slot,n.tag,n.attributes,n.localRefs,n.wholeSourceSpan));break;case p.ElementEnd:w.replace(n,OC(n.sourceSpan));break;case p.ContainerStart:w.replace(n,FC(n.handle.slot,n.attributes,n.localRefs,n.startSourceSpan));break;case p.Container:w.replace(n,BC(n.handle.slot,n.attributes,n.localRefs,n.wholeSourceSpan));break;case p.ContainerEnd:w.replace(n,$C());break;case p.I18nStart:w.replace(n,aI(n.handle.slot,n.messageIndex,n.subTemplateIndex,n.sourceSpan));break;case p.I18nEnd:w.replace(n,mI(n.sourceSpan));break;case p.I18n:w.replace(n,dI(n.handle.slot,n.messageIndex,n.subTemplateIndex,n.sourceSpan));break;case p.I18nAttributes:if(n.i18nAttributesConfig===null)throw new Error("AssertionError: i18nAttributesConfig was not set");w.replace(n,gI(n.handle.slot,n.i18nAttributesConfig));break;case p.Template:if(!(t instanceof dn))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(n.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let r=t.job.views.get(n.xref);w.replace(n,UC(n.handle.slot,W(r.fnName),r.decls,r.vars,n.tag,n.attributes,n.localRefs,n.startSourceSpan));break;case p.DisableBindings:w.replace(n,VC());break;case p.EnableBindings:w.replace(n,qC());break;case p.Pipe:w.replace(n,WC(n.handle.slot,n.name));break;case p.DeclareLet:w.replace(n,pI(n.handle.slot,n.sourceSpan));break;case p.Listener:let s=Ef(t,n.handlerFnName,n.handlerOps,n.consumesDollarEvent),i=n.eventTarget?WI.get(n.eventTarget):null;if(i===void 0)throw new Error(`Unexpected global target '${n.eventTarget}' defined for '${n.name}' event. Supported list of global targets: window,document,body.`);w.replace(n,GC(n.name,s,i,n.hostListener&&n.isAnimationListener,n.sourceSpan));break;case p.TwoWayListener:w.replace(n,HC(n.name,Ef(t,n.handlerFnName,n.handlerOps,!0),n.sourceSpan));break;case p.Variable:if(n.variable.name===null)throw new Error(`AssertionError: unnamed variable ${n.xref}`);w.replace(n,wn(new ze(n.variable.name,n.initializer,void 0,De.Final)));break;case p.Namespace:switch(n.active){case je.HTML:w.replace(n,jC());break;case je.SVG:w.replace(n,KC());break;case je.Math:w.replace(n,zC());break}break;case p.Defer:let o=!!n.loadingMinimumTime||!!n.loadingAfterTime||!!n.placeholderMinimumTime;w.replace(n,nI(n.handle.slot,n.mainSlot.slot,n.resolverFn,n.loadingSlot?.slot??null,n.placeholderSlot?.slot??null,n.errorSlot?.slot??null,n.loadingConfig,n.placeholderConfig,o,n.sourceSpan));break;case p.DeferOn:let a=[];switch(n.trigger.kind){case pe.Idle:case pe.Immediate:break;case pe.Timer:a=[n.trigger.delay];break;case pe.Interaction:case pe.Hover:case pe.Viewport:if(n.trigger.targetSlot?.slot==null||n.trigger.targetSlotViewSteps===null)throw new Error(`Slot or view steps not set in trigger reification for trigger kind ${n.trigger.kind}`);a=[n.trigger.targetSlot.slot],n.trigger.targetSlotViewSteps!==0&&a.push(n.trigger.targetSlotViewSteps);break;default:throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${n.trigger.kind}`)}w.replace(n,sI(n.trigger.kind,a,n.prefetch,n.sourceSpan));break;case p.ProjectionDef:w.replace(n,iI(n.def));break;case p.Projection:if(n.handle.slot===null)throw new Error("No slot was assigned for project instruction");let l=null,c=null,u=null;if(n.fallbackView!==null){if(!(t instanceof dn))throw new Error("AssertionError: must be compiling a component");let C=t.job.views.get(n.fallbackView);if(C===void 0)throw new Error("AssertionError: projection had fallback view xref, but fallback view was not found");if(C.fnName===null||C.decls===null||C.vars===null)throw new Error("AssertionError: expected projection fallback view to have been named and counted");l=C.fnName,c=C.decls,u=C.vars}w.replace(n,oI(n.handle.slot,n.projectionSlotIndex,n.attributes,l,c,u,n.sourceSpan));break;case p.RepeaterCreate:if(n.handle.slot===null)throw new Error("No slot was assigned for repeater instruction");if(!(t instanceof dn))throw new Error("AssertionError: must be compiling a component");let h=t.job.views.get(n.xref);if(h.fnName===null)throw new Error("AssertionError: expected repeater primary view to have been named");let d=null,g=null,y=null;if(n.emptyView!==null){let C=t.job.views.get(n.emptyView);if(C===void 0)throw new Error("AssertionError: repeater had empty view xref, but empty view was not found");if(C.fnName===null||C.decls===null||C.vars===null)throw new Error("AssertionError: expected repeater empty view to have been named and counted");d=C.fnName,g=C.decls,y=C.vars}w.replace(n,lI(n.handle.slot,h.fnName,n.decls,n.vars,n.tag,n.attributes,n.trackByFn,n.usesComponentInstance,d,g,y,n.emptyTag,n.emptyAttributes,n.wholeSourceSpan));break;case p.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of create op ${p[n.kind]}`)}}function Qd(t,e){for(let n of e)switch($e(n,Jd,te.None),n.kind){case p.Advance:w.replace(n,XC(n.delta,n.sourceSpan));break;case p.Property:n.expression instanceof Ae?w.replace(n,DI(n.name,n.expression.strings,n.expression.expressions,n.sanitizer,n.sourceSpan)):w.replace(n,yI(n.name,n.expression,n.sanitizer,n.sourceSpan));break;case p.TwoWayProperty:w.replace(n,vI(n.name,n.expression,n.sanitizer,n.sourceSpan));break;case p.StyleProp:n.expression instanceof Ae?w.replace(n,RI(n.name,n.expression.strings,n.expression.expressions,n.unit,n.sourceSpan)):w.replace(n,SI(n.name,n.expression,n.unit,n.sourceSpan));break;case p.ClassProp:w.replace(n,wI(n.name,n.expression,n.sourceSpan));break;case p.StyleMap:n.expression instanceof Ae?w.replace(n,kI(n.expression.strings,n.expression.expressions,n.sourceSpan)):w.replace(n,TI(n.expression,n.sourceSpan));break;case p.ClassMap:n.expression instanceof Ae?w.replace(n,PI(n.expression.strings,n.expression.expressions,n.sourceSpan)):w.replace(n,xI(n.expression,n.sourceSpan));break;case p.I18nExpression:w.replace(n,NI(n.expression,n.sourceSpan));break;case p.I18nApply:w.replace(n,bI(n.handle.slot,n.sourceSpan));break;case p.InterpolateText:w.replace(n,AI(n.interpolation.strings,n.interpolation.expressions,n.sourceSpan));break;case p.Attribute:n.expression instanceof Ae?w.replace(n,_I(n.name,n.expression.strings,n.expression.expressions,n.sanitizer,n.sourceSpan)):w.replace(n,EI(n.name,n.expression,n.sanitizer,n.namespace));break;case p.HostProperty:if(n.expression instanceof Ae)throw new Error("not yet handled");n.isAnimationTrigger?w.replace(n,LI(n.name,n.expression,n.sourceSpan)):w.replace(n,MI(n.name,n.expression,n.sanitizer,n.sourceSpan));break;case p.Variable:if(n.variable.name===null)throw new Error(`AssertionError: unnamed variable ${n.xref}`);w.replace(n,wn(new ze(n.variable.name,n.initializer,void 0,De.Final)));break;case p.Conditional:if(n.processed===null)throw new Error("Conditional test was not set.");w.replace(n,FI(n.processed,n.contextValue,n.sourceSpan));break;case p.Repeater:w.replace(n,cI(n.collection,n.sourceSpan));break;case p.DeferWhen:w.replace(n,uI(n.prefetch,n.expr,n.sourceSpan));break;case p.StoreLet:throw new Error(`AssertionError: unexpected storeLet ${n.declaredName}`);case p.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of update op ${p[n.kind]}`)}}function Jd(t){if(!Tn(t))return t;switch(t.kind){case O.NextContext:return QC(t.steps);case O.Reference:return YC(t.targetSlot.slot+1+t.offset);case O.LexicalRead:throw new Error(`AssertionError: unresolved LexicalRead of ${t.name}`);case O.TwoWayBindingSet:throw new Error("AssertionError: unresolved TwoWayBindingSet");case O.RestoreView:if(typeof t.view=="number")throw new Error("AssertionError: unresolved RestoreView");return ZC(t.view);case O.ResetView:return eI(t.expr);case O.GetCurrentView:return JC();case O.ReadVariable:if(t.name===null)throw new Error(`Read of unnamed variable ${t.xref}`);return W(t.name);case O.ReadTemporaryExpr:if(t.name===null)throw new Error(`Read of unnamed temporary ${t.xref}`);return W(t.name);case O.AssignTemporaryExpr:if(t.name===null)throw new Error(`Assign of unnamed temporary ${t.xref}`);return W(t.name).set(t.expr);case O.PureFunctionExpr:if(t.fn===null)throw new Error("AssertionError: expected PureFunctions to have been extracted");return OI(t.varOffset,t.fn,t.args);case O.PureFunctionParameterExpr:throw new Error("AssertionError: expected PureFunctionParameterExpr to have been extracted");case O.PipeBinding:return CI(t.targetSlot.slot,t.varOffset,t.args);case O.PipeBindingVariadic:return II(t.targetSlot.slot,t.varOffset,t.args);case O.SlotLiteralExpr:return v(t.slot.slot);case O.ContextLetReference:return fI(t.targetSlot.slot);case O.StoreLet:return hI(t.value,t.sourceSpan);default:throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${O[t.kind]}`)}}function Ef(t,e,n,r){Qd(t,n);let s=[];for(let o of n){if(o.kind!==p.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${p[o.kind]}`);s.push(o.statement)}let i=[];return r&&i.push(new Oe("$event")),Yr(i,s,void 0,void 0,e)}function zI(t){for(let e of t.units)for(let n of e.update)switch(n.kind){case p.Attribute:case p.Binding:case p.ClassProp:case p.ClassMap:case p.Property:case p.StyleProp:case p.StyleMap:n.expression instanceof ji&&w.remove(n);break}}function XI(t){for(let e of t.units)for(let n of e.create)switch(n.kind){case p.I18nContext:w.remove(n);break;case p.I18nStart:n.context=null;break}}function YI(t){for(let e of t.units){let n=new Set;for(let r of e.update)switch(r.kind){case p.I18nExpression:n.add(r.i18nOwner)}for(let r of e.create)switch(r.kind){case p.I18nAttributes:if(n.has(r.xref))continue;w.remove(r)}}}function QI(t){for(let e of t.units)qc(e,e.create),qc(e,e.update)}function qc(t,e){let n=new Map;n.set(t.xref,W("ctx"));for(let r of e)switch(r.kind){case p.Variable:switch(r.variable.kind){case Le.Context:n.set(r.variable.view,new Pn(r.xref));break}break;case p.Listener:case p.TwoWayListener:qc(t,r.handlerOps);break}t===t.job.root&&n.set(t.xref,W("ctx"));for(let r of e)$e(r,s=>{if(s instanceof Vn){if(!n.has(s.view))throw new Error(`No context found for reference to view ${s.view} from view ${t.xref}`);return n.get(s.view)}else return s},te.None)}function JI(t){for(let e of t.units)Sf(e.create),Sf(e.update)}function Sf(t){for(let e of t)(e.kind===p.Listener||e.kind===p.TwoWayListener)&&$e(e,n=>n instanceof He&&n.name==="$event"?(e.kind===p.Listener&&(e.consumesDollarEvent=!0),new Nt(n.name)):n,te.InChildOperation)}function ZI(t){let e=new Map,n=new Map;for(let r of t.units)for(let s of r.create)switch(s.kind){case p.I18nContext:e.set(s.xref,s);break;case p.ElementStart:n.set(s.xref,s);break}Zn(t,t.root,e,n)}function Zn(t,e,n,r,s){let i=null,o=new Map;for(let a of e.create)switch(a.kind){case p.I18nStart:if(!a.context)throw Error("Could not find i18n context for i18n op");i={i18nBlock:a,i18nContext:n.get(a.context)};break;case p.I18nEnd:i=null;break;case p.ElementStart:if(a.i18nPlaceholder!==void 0){if(i===null)throw Error("i18n tag placeholder should only occur inside an i18n block");wf(a,i.i18nContext,i.i18nBlock,s),s&&a.i18nPlaceholder.closeName&&o.set(a.xref,s),s=void 0}break;case p.ElementEnd:let l=r.get(a.xref);if(l&&l.i18nPlaceholder!==void 0){if(i===null)throw Error("AssertionError: i18n tag placeholder should only occur inside an i18n block");Tf(l,i.i18nContext,i.i18nBlock,o.get(a.xref)),o.delete(a.xref)}break;case p.Projection:if(a.i18nPlaceholder!==void 0){if(i===null)throw Error("i18n tag placeholder should only occur inside an i18n block");wf(a,i.i18nContext,i.i18nBlock,s),Tf(a,i.i18nContext,i.i18nBlock,s),s=void 0}break;case p.Template:let c=t.views.get(a.xref);if(a.i18nPlaceholder===void 0)Zn(t,c,n,r);else{if(i===null)throw Error("i18n tag placeholder should only occur inside an i18n block");a.templateKind===gt.Structural?Zn(t,c,n,r,a):(Tl(t,c,a.handle.slot,a.i18nPlaceholder,i.i18nContext,i.i18nBlock,s),Zn(t,c,n,r),xl(t,c,a.handle.slot,a.i18nPlaceholder,i.i18nContext,i.i18nBlock,s),s=void 0)}break;case p.RepeaterCreate:if(s!==void 0)throw Error("AssertionError: Unexpected structural directive associated with @for block");let u=a.handle.slot+1,h=t.views.get(a.xref);if(a.i18nPlaceholder===void 0)Zn(t,h,n,r);else{if(i===null)throw Error("i18n tag placeholder should only occur inside an i18n block");Tl(t,h,u,a.i18nPlaceholder,i.i18nContext,i.i18nBlock,s),Zn(t,h,n,r),xl(t,h,u,a.i18nPlaceholder,i.i18nContext,i.i18nBlock,s),s=void 0}if(a.emptyView!==null){let d=a.handle.slot+2,g=t.views.get(a.emptyView);if(a.emptyI18nPlaceholder===void 0)Zn(t,g,n,r);else{if(i===null)throw Error("i18n tag placeholder should only occur inside an i18n block");Tl(t,g,d,a.emptyI18nPlaceholder,i.i18nContext,i.i18nBlock,s),Zn(t,g,n,r),xl(t,g,d,a.emptyI18nPlaceholder,i.i18nContext,i.i18nBlock,s),s=void 0}}break}}function wf(t,e,n,r){let{startName:s,closeName:i}=t.i18nPlaceholder,o=ae.ElementTag|ae.OpenTag,a=t.handle.slot;r!==void 0&&(o|=ae.TemplateTag,a={element:a,template:r.handle.slot}),i||(o|=ae.CloseTag),Hs(e.params,s,a,n.subTemplateIndex,o)}function Tf(t,e,n,r){let{closeName:s}=t.i18nPlaceholder;if(s){let i=ae.ElementTag|ae.CloseTag,o=t.handle.slot;r!==void 0&&(i|=ae.TemplateTag,o={element:o,template:r.handle.slot}),Hs(e.params,s,o,n.subTemplateIndex,i)}}function Tl(t,e,n,r,s,i,o){let{startName:a,closeName:l}=r,c=ae.TemplateTag|ae.OpenTag;l||(c|=ae.CloseTag),o!==void 0&&Hs(s.params,a,o.handle.slot,i.subTemplateIndex,c),Hs(s.params,a,n,Zd(t,i,e),c)}function xl(t,e,n,r,s,i,o){let{closeName:a}=r,l=ae.TemplateTag|ae.CloseTag;a&&(Hs(s.params,a,n,Zd(t,i,e),l),o!==void 0&&Hs(s.params,a,o.handle.slot,i.subTemplateIndex,l))}function Zd(t,e,n){for(let r of n.create)if(r.kind===p.I18nStart)return r.subTemplateIndex;return e.subTemplateIndex}function Hs(t,e,n,r,s){let i=t.get(e)??[];i.push({value:n,subTemplateIndex:r,flags:s}),t.set(e,i)}function eA(t){let e=new Map,n=new Map,r=new Map;for(let o of t.units)for(let a of o.create)switch(a.kind){case p.I18nStart:e.set(a.xref,a.subTemplateIndex);break;case p.I18nContext:n.set(a.xref,a);break;case p.IcuPlaceholder:r.set(a.xref,a);break}let s=new Map,i=o=>o.usage===Wr.I18nText?o.i18nOwner:o.context;for(let o of t.units)for(let a of o.update)if(a.kind===p.I18nExpression){let l=s.get(i(a))||0,c=e.get(a.i18nOwner)??null,u={value:l,subTemplateIndex:c,flags:ae.ExpressionIndex};tA(a,u,n,r),s.set(i(a),l+1)}}function tA(t,e,n,r){if(t.i18nPlaceholder!==null){let s=n.get(t.context),i=t.resolutionTime===Fs.Creation?s.params:s.postprocessingParams,o=i.get(t.i18nPlaceholder)||[];o.push(e),i.set(t.i18nPlaceholder,o)}t.icuPlaceholder!==null&&r.get(t.icuPlaceholder)?.expressionPlaceholders.push(e)}function nA(t){for(let e of t.units)Gc(e,e.create,null),Gc(e,e.update,null)}function Gc(t,e,n){let r=new Map,s=new Map;for(let i of e)switch(i.kind){case p.Variable:switch(i.variable.kind){case Le.Identifier:if(i.variable.local){if(s.has(i.variable.identifier))continue;s.set(i.variable.identifier,i.xref)}else if(r.has(i.variable.identifier))continue;r.set(i.variable.identifier,i.xref);break;case Le.Alias:if(r.has(i.variable.identifier))continue;r.set(i.variable.identifier,i.xref);break;case Le.SavedView:n={view:i.variable.view,variable:i.xref};break}break;case p.Listener:case p.TwoWayListener:Gc(t,i.handlerOps,n);break}for(let i of e)i.kind==p.Listener||i.kind===p.TwoWayListener||$e(i,o=>{if(o instanceof He)return s.has(o.name)?new Pn(s.get(o.name)):r.has(o.name)?new Pn(r.get(o.name)):new ot(new Vn(t.job.root.xref),o.name);if(o instanceof la&&typeof o.view=="number"){if(n===null||n.view!==o.view)throw new Error(`AssertionError: no saved view ${o.view} from view ${t.xref}`);return o.view=new Pn(n.variable),o}else return o},te.None);for(let i of e)Ze(i,o=>{if(o instanceof He)throw new Error(`AssertionError: no lexical reads should remain, but found read of ${o.name}`)})}var rA=new Map([[ce.HTML,f.sanitizeHtml],[ce.RESOURCE_URL,f.sanitizeResourceUrl],[ce.SCRIPT,f.sanitizeScript],[ce.STYLE,f.sanitizeStyle],[ce.URL,f.sanitizeUrl]]),sA=new Map([[ce.HTML,f.trustConstantHtml],[ce.RESOURCE_URL,f.trustConstantResourceUrl]]);function iA(t){for(let e of t.units){let n=Au(e);if(t.kind!==N.Host){for(let r of e.create)if(r.kind===p.ExtractedAttribute){let s=sA.get(xf(r.securityContext))??null;r.trustedValueFn=s!==null?L(s):null}}for(let r of e.update)switch(r.kind){case p.Property:case p.Attribute:case p.HostProperty:let s=null;if(Array.isArray(r.securityContext)&&r.securityContext.length===2&&r.securityContext.indexOf(ce.URL)>-1&&r.securityContext.indexOf(ce.RESOURCE_URL)>-1?s=f.sanitizeUrlOrResourceUrl:s=rA.get(xf(r.securityContext))??null,r.sanitizer=s!==null?L(s):null,r.sanitizer===null){let i=!1;if(t.kind===N.Host||r.kind===p.HostProperty)i=!0;else{let o=n.get(r.target);if(o===void 0||!vr(o))throw Error("Property should have an element-like owner");i=oA(o)}i&&ix(r.name)&&(r.sanitizer=L(f.validateIframeAttribute))}break}}}function oA(t){return t.kind===p.ElementStart&&t.tag?.toLowerCase()==="iframe"}function xf(t){if(Array.isArray(t)){if(t.length>1)throw Error("AssertionError: Ambiguous security context");return t[0]||ce.NONE}return t}function aA(t){for(let e of t.units)for(let n of e.create)n.kind===p.TwoWayListener&&$e(n,r=>{if(!(r instanceof ca))return r;let{target:s,value:i}=r;if(s instanceof ot||s instanceof gn)return yf(s,i).or(s.set(i));if(s instanceof Pn)return yf(s,i);throw new Error("Unsupported expression in two-way action binding.")},te.InChildOperation)}function lA(t){for(let e of t.units){e.create.prepend([rr(e.job.allocateXrefId(),{kind:Le.SavedView,name:null,view:e.xref},new mc,It.None)]);for(let n of e.create){if(n.kind!==p.Listener&&n.kind!==p.TwoWayListener)continue;let r=e!==t.root;if(!r)for(let s of n.handlerOps)Ze(s,i=>{(i instanceof ia||i instanceof Wi)&&(r=!0)});r&&cA(e,n)}}}function cA(t,e){e.handlerOps.prepend([rr(t.job.allocateXrefId(),{kind:Le.Context,name:null,view:t.xref},new la(t.xref),It.None)]);for(let n of e.handlerOps)n.kind===p.Statement&&n.statement instanceof Je&&(n.statement.value=new gc(n.statement.value))}function uA(t){let e=new Map;for(let n of t.units){let r=0;for(let s of n.create)zs(s)&&(s.handle.slot=r,e.set(s.xref,s.handle.slot),r+=s.numSlotsUsed);n.decls=r}for(let n of t.units)for(let r of n.ops())if(r.kind===p.Template||r.kind===p.RepeaterCreate){let s=t.views.get(r.xref);r.decls=s.decls}}function pA(t){for(let e of t.units)for(let n of e.update)if(n.kind===p.Binding)switch(n.bindingKind){case F.ClassName:if(n.expression instanceof Ae)throw new Error("Unexpected interpolation in ClassName binding");w.replace(n,vw(n.target,n.name,n.expression,n.sourceSpan));break;case F.StyleProperty:w.replace(n,yw(n.target,n.name,n.expression,n.unit,n.sourceSpan));break;case F.Property:case F.Template:n.name==="style"?w.replace(n,Ew(n.target,n.expression,n.sourceSpan)):n.name==="class"&&w.replace(n,Sw(n.target,n.expression,n.sourceSpan));break}}function hA(t){for(let e of t.units)e.create.prepend(Hc(e.create)),e.update.prepend(Hc(e.update))}function Hc(t){let e=0,n=[];for(let r of t){let s=new Map;Ze(r,(c,u)=>{u&te.InChildOperation||c instanceof qn&&s.set(c.xref,c)});let i=0,o=new Set,a=new Set,l=new Map;Ze(r,(c,u)=>{u&te.InChildOperation||(c instanceof nn?(o.has(c.xref)||(o.add(c.xref),l.set(c.xref,`tmp_${e}_${i++}`)),Cf(l,c)):c instanceof qn&&(s.get(c.xref)===c&&(a.add(c.xref),i--),Cf(l,c)))}),n.push(...Array.from(new Set(l.values())).map(c=>wn(new ze(c)))),e++,(r.kind===p.Listener||r.kind===p.TwoWayListener)&&r.handlerOps.prepend(Hc(r.handlerOps))}return n}function Cf(t,e){let n=t.get(e.xref);if(n===void 0)throw new Error(`Found xref with unassigned name: ${e.xref}`);e.name=n}function fA(t){for(let e of t.units)for(let n of e.create){if(n.kind!==p.RepeaterCreate||n.trackByFn!==null)continue;let r=!1;n.track=b(n.track,o=>{if(o instanceof zr||o instanceof ua)throw new Error("Illegal State: Pipes are not allowed in this context");return o instanceof oa?(r=!0,W("this")):o},te.None);let s,i=[new Oe("$index"),new Oe("$item")];r?s=new Xt(i,[new Je(n.track)]):s=en(i,n.track),n.trackByFn=t.pool.getSharedFunctionReference(s,"_forTrack")}}function dA(t){for(let e of t.units)for(let n of e.create)n.kind===p.RepeaterCreate&&(n.track instanceof Nt&&n.track.name==="$index"?n.trackByFn=L(f.repeaterTrackByIndex):n.track instanceof Nt&&n.track.name==="$item"?n.trackByFn=L(f.repeaterTrackByIdentity):mA(t.root.xref,n.track)?(n.usesComponentInstance=!0,n.track.receiver.receiver.view===e.xref?n.trackByFn=n.track.receiver:(n.trackByFn=L(f.componentInstance).callFn([]).prop(n.track.receiver.name),n.track=n.trackByFn)):n.track=b(n.track,r=>r instanceof Vn?(n.usesComponentInstance=!0,new oa(r.view)):r,te.None))}function mA(t,e){if(!(e instanceof Ke)||e.args.length===0||e.args.length>2||!(e.receiver instanceof ot&&e.receiver.receiver instanceof Vn)||e.receiver.receiver.view!==t)return!1;let[n,r]=e.args;return!(n instanceof Nt)||n.name!=="$index"?!1:e.args.length===1?!0:!(!(r instanceof Nt)||r.name!=="$item")}function gA(t){for(let e of t.units)for(let n of e.create)n.kind===p.RepeaterCreate&&(n.track=b(n.track,r=>{if(r instanceof He){if(n.varNames.$index.has(r.name))return W("$index");if(r.name===n.varNames.$implicit)return W("$item")}return r},te.None))}function yA(t){for(let e of t.units){let n=0;for(let r of e.ops())dl(r)&&(n+=vA(r));for(let r of e.ops())Ze(r,s=>{Tn(s)&&(t.compatibility===vt.TemplateDefinitionBuilder&&s instanceof Kr||(kh(s)&&(s.varOffset=n),dl(s)&&(n+=If(s))))});if(t.compatibility===vt.TemplateDefinitionBuilder)for(let r of e.ops())Ze(r,s=>{!Tn(s)||!(s instanceof Kr)||(kh(s)&&(s.varOffset=n),dl(s)&&(n+=If(s)))});e.vars=n}if(t instanceof zi)for(let e of t.units)for(let n of e.create){if(n.kind!==p.Template&&n.kind!==p.RepeaterCreate)continue;let r=t.views.get(n.xref);n.vars=r.vars}}function vA(t){let e;switch(t.kind){case p.Property:case p.HostProperty:case p.Attribute:return e=1,t.expression instanceof Ae&&!EA(t.expression)&&(e+=t.expression.expressions.length),e;case p.TwoWayProperty:return 1;case p.StyleProp:case p.ClassProp:case p.StyleMap:case p.ClassMap:return e=2,t.expression instanceof Ae&&(e+=t.expression.expressions.length),e;case p.InterpolateText:return t.interpolation.expressions.length;case p.I18nExpression:case p.Conditional:case p.DeferWhen:case p.StoreLet:return 1;case p.RepeaterCreate:return t.emptyView?1:0;default:throw new Error(`Unhandled op: ${p[t.kind]}`)}}function If(t){switch(t.kind){case O.PureFunctionExpr:return 1+t.args.length;case O.PipeBinding:return 1+t.args.length;case O.PipeBindingVariadic:return 1+t.numArgs;case O.StoreLet:return 1;default:throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${t.constructor.name}`)}}function EA(t){return!(t.expressions.length!==1||t.strings.length!==2||t.strings[0]!==""||t.strings[1]!=="")}function SA(t){for(let e of t.units){Cl(e.create),Cl(e.update);for(let n of e.create)(n.kind===p.Listener||n.kind===p.TwoWayListener)&&Cl(n.handlerOps);Il(e.create,t.compatibility),Il(e.update,t.compatibility);for(let n of e.create)(n.kind===p.Listener||n.kind===p.TwoWayListener)&&Il(n.handlerOps,t.compatibility)}}var be;(function(t){t[t.None=0]="None",t[t.ViewContextRead=1]="ViewContextRead",t[t.ViewContextWrite=2]="ViewContextWrite",t[t.SideEffectful=4]="SideEffectful"})(be||(be={}));function Cl(t){let e=new Map;for(let n of t)n.kind===p.Variable&&n.flags&It.AlwaysInline&&(Ze(n,r=>{if(Tn(r)&&Nu(r)!==be.None)throw new Error("AssertionError: A context-sensitive variable was marked AlwaysInline")}),e.set(n.xref,n)),$e(n,r=>r instanceof Pn&&e.has(r.xref)?e.get(r.xref).initializer.clone():r,te.None);for(let n of e.values())w.remove(n)}function Il(t,e){let n=new Map,r=new Map,s=new Set,i=new Map;for(let c of t){if(c.kind===p.Variable){if(n.has(c.xref)||r.has(c.xref))throw new Error(`Should not see two declarations of the same variable: ${c.xref}`);n.set(c.xref,c),r.set(c.xref,0)}i.set(c,wA(c)),TA(c,r,s)}let o=!1;for(let c of t.reversed()){let u=i.get(c);if(c.kind===p.Variable&&r.get(c.xref)===0){if(o&&u.fences&be.ViewContextWrite||u.fences&be.SideEffectful){let h=wn(c.initializer.toStmt());i.set(h,u),w.replace(c,h)}else xA(c,r),w.remove(c);i.delete(c),n.delete(c.xref),r.delete(c.xref);continue}u.fences&be.ViewContextRead&&(o=!0)}let a=[];for(let[c,u]of r){let d=!!(n.get(c).flags&It.AlwaysInline);u!==1||d||s.has(c)||a.push(c)}let l;for(;l=a.pop();){let c=n.get(l),u=i.get(c);if(!!(c.flags&It.AlwaysInline))throw new Error("AssertionError: Found an 'AlwaysInline' variable after the always inlining pass.");for(let d=c.next;d.kind!==p.ListEnd;d=d.next){let g=i.get(d);if(g.variablesUsed.has(l)){if(e===vt.TemplateDefinitionBuilder&&!IA(c,d))break;if(CA(l,c.initializer,d,u.fences)){g.variablesUsed.delete(l);for(let y of u.variablesUsed)g.variablesUsed.add(y);g.fences|=u.fences,n.delete(l),r.delete(l),i.delete(c),w.remove(c)}break}if(!em(g.fences,u.fences))break}}}function Nu(t){switch(t.kind){case O.NextContext:return be.ViewContextRead|be.ViewContextWrite;case O.RestoreView:return be.ViewContextRead|be.ViewContextWrite|be.SideEffectful;case O.StoreLet:return be.SideEffectful;case O.Reference:case O.ContextLetReference:return be.ViewContextRead;default:return be.None}}function wA(t){let e=be.None,n=new Set;return Ze(t,r=>{if(Tn(r))switch(r.kind){case O.ReadVariable:n.add(r.xref);break;default:e|=Nu(r)}}),{fences:e,variablesUsed:n}}function TA(t,e,n){Ze(t,(r,s)=>{if(!Tn(r)||r.kind!==O.ReadVariable)return;let i=e.get(r.xref);i!==void 0&&(e.set(r.xref,i+1),s&te.InChildOperation&&n.add(r.xref))})}function xA(t,e){Ze(t,n=>{if(!Tn(n)||n.kind!==O.ReadVariable)return;let r=e.get(n.xref);if(r!==void 0){if(r===0)throw new Error(`Inaccurate variable count: ${n.xref} - found another read but count is already 0`);e.set(n.xref,r-1)}})}function em(t,e){if(t&be.ViewContextWrite){if(e&be.ViewContextRead)return!1}else if(t&be.ViewContextRead&&e&be.ViewContextWrite)return!1;return!0}function CA(t,e,n,r){let s=!1,i=!0;return $e(n,(o,a)=>{if(!Tn(o)||s||!i)return o;if(a&te.InChildOperation&&r&be.ViewContextRead)return o;switch(o.kind){case O.ReadVariable:if(o.xref===t)return s=!0,e;break;default:let l=Nu(o);i=i&&em(l,r);break}return o},te.None),s}function IA(t,e){switch(t.variable.kind){case Le.Identifier:return t.initializer instanceof Nt&&t.initializer.name==="ctx";case Le.Context:return e.kind===p.Variable;default:return!0}}function AA(t){for(let e of t.units){let n=null,r=null;for(let s of e.create)switch(s.kind){case p.I18nStart:n=s;break;case p.I18nEnd:n=null;break;case p.IcuStart:n===null&&(r=t.allocateXrefId(),w.insertBefore(Fa(r,s.message,void 0,null),s));break;case p.IcuEnd:r!==null&&(w.insertAfter(Ba(r,null),s),r=null);break}}}function NA(t){let e=new Set;for(let n of t.units)for(let r of n.ops())Ze(r,s=>{s instanceof Wi&&e.add(s.target)});for(let n of t.units)for(let r of n.update)$e(r,s=>s instanceof Hi&&!e.has(s.target)?s.value:s,te.None)}function bA(t){for(let e of t.units)for(let n of e.update){if(n.kind!==p.Variable||n.variable.kind!==Le.Identifier||!(n.initializer instanceof Hi))continue;let r=n.variable.identifier,s=n;for(;s&&s.kind!==p.ListEnd;)$e(s,i=>i instanceof He&&i.name===r?v(void 0):i,te.None),s=s.prev}}function DA(t){for(let e of t.units)for(let n of e.update){if(n.kind!==p.StoreLet)continue;let r={kind:Le.Identifier,name:null,identifier:n.declaredName,local:!0};w.replace(n,rr(t.allocateXrefId(),r,new Hi(n.target,n.value,n.sourceSpan),It.None))}}var _A=[{kind:N.Tmpl,fn:wC},{kind:N.Host,fn:qT},{kind:N.Tmpl,fn:rC},{kind:N.Tmpl,fn:bC},{kind:N.Tmpl,fn:AA},{kind:N.Both,fn:pT},{kind:N.Both,fn:pA},{kind:N.Both,fn:Qw},{kind:N.Both,fn:zw},{kind:N.Tmpl,fn:uT},{kind:N.Both,fn:iC},{kind:N.Tmpl,fn:zI},{kind:N.Both,fn:tT},{kind:N.Both,fn:SC},{kind:N.Tmpl,fn:nT},{kind:N.Tmpl,fn:CC},{kind:N.Tmpl,fn:hT},{kind:N.Tmpl,fn:eC},{kind:N.Tmpl,fn:lT},{kind:N.Tmpl,fn:YI},{kind:N.Tmpl,fn:Kw},{kind:N.Tmpl,fn:Ww},{kind:N.Tmpl,fn:NC},{kind:N.Both,fn:RC},{kind:N.Tmpl,fn:FT},{kind:N.Tmpl,fn:DA},{kind:N.Tmpl,fn:BT},{kind:N.Tmpl,fn:lA},{kind:N.Both,fn:Gw},{kind:N.Both,fn:JI},{kind:N.Tmpl,fn:gA},{kind:N.Tmpl,fn:bA},{kind:N.Both,fn:nA},{kind:N.Tmpl,fn:fT},{kind:N.Tmpl,fn:aA},{kind:N.Tmpl,fn:dA},{kind:N.Both,fn:QI},{kind:N.Both,fn:iA},{kind:N.Tmpl,fn:tC},{kind:N.Both,fn:dC},{kind:N.Both,fn:yT},{kind:N.Both,fn:hA},{kind:N.Both,fn:SA},{kind:N.Both,fn:NA},{kind:N.Tmpl,fn:uA},{kind:N.Tmpl,fn:ZI},{kind:N.Tmpl,fn:eA},{kind:N.Tmpl,fn:kT},{kind:N.Tmpl,fn:fA},{kind:N.Tmpl,fn:Xx},{kind:N.Tmpl,fn:UT},{kind:N.Both,fn:oT},{kind:N.Tmpl,fn:XI},{kind:N.Both,fn:yA},{kind:N.Tmpl,fn:OT},{kind:N.Both,fn:oC},{kind:N.Tmpl,fn:cT},{kind:N.Tmpl,fn:cC},{kind:N.Tmpl,fn:pC},{kind:N.Tmpl,fn:gT},{kind:N.Tmpl,fn:fC},{kind:N.Both,fn:_C},{kind:N.Both,fn:jI},{kind:N.Both,fn:eT}];function tm(t,e){for(let n of _A)(n.kind===e||n.kind===N.Both)&&n.fn(t)}function RA(t,e){let n=rm(t.root);return nm(t.root,e),n}function nm(t,e){for(let n of t.job.units){if(n.parent!==t.xref)continue;nm(n,e);let r=rm(n);e.statements.push(r.toDeclStmt(r.name))}}function rm(t){if(t.fnName===null)throw new Error(`AssertionError: view ${t.xref} is unnamed`);let e=[];for(let i of t.create){if(i.kind!==p.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${p[i.kind]}`);e.push(i.statement)}let n=[];for(let i of t.update){if(i.kind!==p.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${p[i.kind]}`);n.push(i.statement)}let r=Aa(1,e),s=Aa(2,n);return Yr([new Oe("rf"),new Oe("ctx")],[...r,...s],void 0,void 0,t.fnName)}function Aa(t,e){return e.length===0?[]:[no(new ee(I.BitwiseAnd,W("rf"),v(t)),e)]}function kA(t){if(t.root.fnName===null)throw new Error("AssertionError: host binding function is unnamed");let e=[];for(let i of t.root.create){if(i.kind!==p.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${p[i.kind]}`);e.push(i.statement)}let n=[];for(let i of t.root.update){if(i.kind!==p.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${p[i.kind]}`);n.push(i.statement)}if(e.length===0&&n.length===0)return null;let r=Aa(1,e),s=Aa(2,n);return Yr([new Oe("rf"),new Oe("ctx")],[...r,...s],void 0,void 0,t.root.fnName)}var sm=vt.TemplateDefinitionBuilder,kr=new sn,Pr="ng-template";function Wc(t){return t instanceof st}function PA(t){return Wc(t)&&t.nodes.length===1&&t.nodes[0]instanceof Zo}function MA(t,e,n,r,s,i,o){let a=new zi(t,n,sm,r,s,i,o);return Gn(a.root,e),a}function LA(t,e,n){let r=new ga(t.componentName,n,sm);for(let s of t.properties??[]){let i=F.Property;s.name.startsWith("attr.")&&(s.name=s.name.substring(5),i=F.Attribute),s.isAnimation&&(i=F.Animation);let o=e.calcPossibleSecurityContexts(t.componentSelector,s.name,i===F.Attribute).filter(a=>a!==ce.NONE);OA(r,s,i,o)}for(let[s,i]of Object.entries(t.attributes)??[]){let o=e.calcPossibleSecurityContexts(t.componentSelector,s,!0).filter(a=>a!==ce.NONE);FA(r,s,i,o)}for(let s of t.events??[])BA(r,s);return r}function OA(t,e,n,r){let s,i=e.expression.ast;i instanceof On?s=new Ae(i.strings,i.expressions.map(o=>H(o,t,e.sourceSpan)),[]):s=H(i,t,e.sourceSpan),t.root.update.push(jr(t.root.xref,n,e.name,s,null,r,!1,!1,null,null,e.sourceSpan))}function FA(t,e,n,r){let s=jr(t.root.xref,F.Attribute,e,n,null,r,!0,!1,null,null,n.sourceSpan);t.root.update.push(s)}function BA(t,e){let[n,r]=e.type!==_e.Animation?[null,e.targetOrPhase]:[e.targetOrPhase,null],s=Iu(t.root.xref,new Et,e.name,null,bu(t.root,e.handler,e.handlerSpan),n,r,!0,e.sourceSpan);t.root.create.push(s)}function Gn(t,e){for(let n of e)if(n instanceof oe)$A(t,n);else if(n instanceof se)UA(t,n);else if(n instanceof fr)VA(t,n);else if(n instanceof Kt)im(t,n,null);else if(n instanceof Fn)om(t,n,null);else if(n instanceof Vr)qA(t,n);else if(n instanceof Ur)GA(t,n);else if(n instanceof Un)HA(t,n);else if(n instanceof Ps)WA(t,n);else if(n instanceof En)jA(t,n);else if(n instanceof yt)zA(t,n);else throw new Error(`Unsupported template node: ${n.constructor.name}`)}function $A(t,e){if(e.i18n!==void 0&&!(e.i18n instanceof st||e.i18n instanceof dr))throw Error(`Unhandled i18n metadata type for element: ${e.i18n.constructor.name}`);let n=t.job.allocateXrefId(),[r,s]=tn(e.name),i=bw(s,n,Vd(r),e.i18n instanceof dr?e.i18n:void 0,e.startSourceSpan,e.sourceSpan);t.create.push(i),YA(t,i,e),cm(i,e);let o=null;e.i18n instanceof st&&(o=t.job.allocateXrefId(),t.create.push(Fa(o,e.i18n,void 0,e.startSourceSpan))),Gn(t,e.children);let a=_w(n,e.endSourceSpan??e.startSourceSpan);t.create.push(a),o!==null&&w.insertBefore(Ba(o,e.endSourceSpan??e.startSourceSpan),a)}function UA(t,e){if(e.i18n!==void 0&&!(e.i18n instanceof st||e.i18n instanceof dr))throw Error(`Unhandled i18n metadata type for template: ${e.i18n.constructor.name}`);let n=t.job.allocateView(t.xref),r=e.tagName,s="";e.tagName&&([s,r]=tn(e.tagName));let i=e.i18n instanceof dr?e.i18n:void 0,o=Vd(s),a=r===null?"":iT(r,o),l=XA(e)?gt.NgTemplate:gt.Structural,c=Oa(n.xref,l,r,a,o,i,e.startSourceSpan,e.sourceSpan);t.create.push(c),QA(t,c,e,l),cm(c,e),Gn(n,e.children);for(let{name:u,value:h}of e.variables)n.contextVariables.set(u,h!==""?h:"$implicit");if(l===gt.NgTemplate&&e.i18n instanceof st){let u=t.job.allocateXrefId();w.insertAfter(Fa(u,e.i18n,void 0,e.startSourceSpan),n.create.head),w.insertBefore(Ba(u,e.endSourceSpan??e.startSourceSpan),n.create.tail)}}function VA(t,e){if(e.i18n!==void 0&&!(e.i18n instanceof dr))throw Error(`Unhandled i18n metadata type for element: ${e.i18n.constructor.name}`);let n=null;e.children.some(i=>!(i instanceof Rs)&&(!(i instanceof Kt)||i.value.trim().length>0))&&(n=t.job.allocateView(t.xref),Gn(n,e.children));let r=t.job.allocateXrefId(),s=Lw(r,e.selector,e.i18n,n?.xref??null,e.sourceSpan);for(let i of e.attributes){let o=kr.securityContext(e.name,i.name,!0);t.update.push(jr(s.xref,F.Attribute,i.name,v(i.value),null,o,!0,!1,null,Dn(i.i18n),i.sourceSpan))}t.create.push(s)}function im(t,e,n){t.create.push(Od(t.job.allocateXrefId(),e.value,n,e.sourceSpan))}function om(t,e,n){let r=e.value;if(r instanceof we&&(r=r.ast),!(r instanceof On))throw new Error(`AssertionError: expected Interpolation for BoundText node, got ${r.constructor.name}`);if(e.i18n!==void 0&&!(e.i18n instanceof Rn))throw Error(`Unhandled i18n metadata type for text interpolation: ${e.i18n?.constructor.name}`);let s=e.i18n instanceof Rn?e.i18n.children.filter(a=>a instanceof ea).map(a=>a.name):[];if(s.length>0&&s.length!==r.expressions.length)throw Error(`Unexpected number of i18n placeholders (${r.expressions.length}) for BoundText with ${r.expressions.length} expressions`);let i=t.job.allocateXrefId();t.create.push(Od(i,"",n,e.sourceSpan));let o=t.job.compatibility?null:e.sourceSpan;t.update.push(dw(i,new Ae(r.strings,r.expressions.map(a=>H(a,t.job,o)),s),e.sourceSpan))}function qA(t,e){let n=null,r=[];for(let s=0;s<e.branches.length;s++){let i=e.branches[s],o=t.job.allocateView(t.xref),a=Na(t,o.xref,i);i.expressionAlias!==null&&o.contextVariables.set(i.expressionAlias.name,Ud);let l;if(i.i18n!==void 0){if(!(i.i18n instanceof mr))throw Error(`Unhandled i18n metadata type for if block: ${i.i18n?.constructor.name}`);l=i.i18n}let c=Oa(o.xref,gt.Block,a,"Conditional",je.HTML,l,i.startSourceSpan,i.sourceSpan);t.create.push(c),n===null&&(n=o.xref);let u=i.expression?H(i.expression,t.job,null):null,h=new ha(u,c.xref,c.handle,i.expressionAlias);r.push(h),Gn(o,i.children)}t.update.push(Pd(n,null,r,e.sourceSpan))}function GA(t,e){if(e.cases.length===0)return;let n=null,r=[];for(let s of e.cases){let i=t.job.allocateView(t.xref),o=Na(t,i.xref,s),a;if(s.i18n!==void 0){if(!(s.i18n instanceof mr))throw Error(`Unhandled i18n metadata type for switch block: ${s.i18n?.constructor.name}`);a=s.i18n}let l=Oa(i.xref,gt.Block,o,"Case",je.HTML,a,s.startSourceSpan,s.sourceSpan);t.create.push(l),n===null&&(n=i.xref);let c=s.expression?H(s.expression,t.job,e.startSourceSpan):null,u=new ha(c,l.xref,l.handle);r.push(u),Gn(i,s.children)}t.update.push(Pd(n,H(e.expression,t.job,null),r,e.sourceSpan))}function Ro(t,e,n,r,s){if(n!==void 0&&!(n instanceof mr))throw Error("Unhandled i18n metadata type for defer block");if(r===void 0)return null;let i=t.job.allocateView(t.xref);Gn(i,r);let o=Oa(i.xref,gt.Block,null,`Defer${e}`,je.HTML,n,s,s);return t.create.push(o),o}function HA(t,e){let n=null;if(t.job.deferMeta.mode===0){if(!t.job.deferMeta.blocks.has(e))throw new Error("AssertionError: unable to find a dependency function for this deferred block");n=t.job.deferMeta.blocks.get(e)??null}let r=Ro(t,"",e.i18n,e.children,e.sourceSpan),s=Ro(t,"Loading",e.loading?.i18n,e.loading?.children,e.loading?.sourceSpan),i=Ro(t,"Placeholder",e.placeholder?.i18n,e.placeholder?.children,e.placeholder?.sourceSpan),o=Ro(t,"Error",e.error?.i18n,e.error?.children,e.error?.sourceSpan),a=t.job.allocateXrefId(),l=Ow(a,r.xref,r.handle,n,t.job.allDeferrableDepsFn,e.sourceSpan);l.placeholderView=i?.xref??null,l.placeholderSlot=i?.handle??null,l.loadingSlot=s?.handle??null,l.errorSlot=o?.handle??null,l.placeholderMinimumTime=e.placeholder?.minimumTime??null,l.loadingMinimumTime=e.loading?.minimumTime??null,l.loadingAfterTime=e.loading?.afterTime??null,t.create.push(l);let c=!1,u=[],h=[];for(let d of[e.triggers,e.prefetchTriggers]){if(d.idle!==void 0){let g=Cr(a,{kind:pe.Idle},c,d.idle.sourceSpan);u.push(g)}if(d.immediate!==void 0){let g=Cr(a,{kind:pe.Immediate},c,d.immediate.sourceSpan);u.push(g)}if(d.timer!==void 0){let g=Cr(a,{kind:pe.Timer,delay:d.timer.delay},c,d.timer.sourceSpan);u.push(g)}if(d.hover!==void 0){let g=Cr(a,{kind:pe.Hover,targetName:d.hover.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},c,d.hover.sourceSpan);u.push(g)}if(d.interaction!==void 0){let g=Cr(a,{kind:pe.Interaction,targetName:d.interaction.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},c,d.interaction.sourceSpan);u.push(g)}if(d.viewport!==void 0){let g=Cr(a,{kind:pe.Viewport,targetName:d.viewport.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},c,d.viewport.sourceSpan);u.push(g)}if(d.when!==void 0){if(d.when.value instanceof On)throw new Error("Unexpected interpolation in defer block when trigger");let g=Cw(a,H(d.when.value,t.job,d.when.sourceSpan),c,d.when.sourceSpan);h.push(g)}u.length===0&&h.length===0&&u.push(Cr(a,{kind:pe.Idle},!1,null)),c=!0}t.create.push(u),t.update.push(h)}function WA(t,e){if(e.i18n instanceof st&&PA(e.i18n)){let n=t.job.allocateXrefId();t.create.push($w(n,e.i18n,fd(e.i18n).name,null));for(let[r,s]of Object.entries({...e.vars,...e.placeholders}))s instanceof Fn?om(t,s,r):im(t,s,r);t.create.push(Uw(n))}else throw Error(`Unhandled i18n metadata type for ICU: ${e.i18n?.constructor.name}`)}function jA(t,e){let n=t.job.allocateView(t.xref),r=`\u0275$index_${n.xref}`,s=`\u0275$count_${n.xref}`,i=new Set;n.contextVariables.set(e.item.name,e.item.value);for(let _ of e.contextVariables)_.value==="$index"&&i.add(_.name),_.name==="$index"?n.contextVariables.set("$index",_.value).set(r,_.value):_.name==="$count"?n.contextVariables.set("$count",_.value).set(s,_.value):n.aliases.add({kind:Le.Alias,name:null,identifier:_.name,expression:KA(_,r,s)});let o=Ge(e.trackBy.span,e.sourceSpan),a=H(e.trackBy,t.job,o);Gn(n,e.children);let l=null,c=null;e.empty!==null&&(l=t.job.allocateView(t.xref),Gn(l,e.empty.children),c=Na(t,l.xref,e.empty));let u={$index:i,$implicit:e.item.name};if(e.i18n!==void 0&&!(e.i18n instanceof mr))throw Error("AssertionError: Unhandled i18n metadata type or @for");if(e.empty?.i18n!==void 0&&!(e.empty.i18n instanceof mr))throw Error("AssertionError: Unhandled i18n metadata type or @empty");let h=e.i18n,d=e.empty?.i18n,g=Na(t,n.xref,e),y=Dw(n.xref,l?.xref??null,g,a,u,c,h,d,e.startSourceSpan,e.sourceSpan);t.create.push(y);let C=H(e.expression,t.job,Ge(e.expression.span,e.sourceSpan)),A=xw(y.xref,y.handle,C,e.sourceSpan);t.update.push(A)}function KA(t,e,n){switch(t.value){case"$index":return new He(e);case"$count":return new He(n);case"$first":return new He(e).identical(v(0));case"$last":return new He(e).identical(new He(n).minus(v(1)));case"$even":return new He(e).modulo(v(2)).identical(v(0));case"$odd":return new He(e).modulo(v(2)).notIdentical(v(0));default:throw new Error(`AssertionError: unknown @for loop variable ${t.value}`)}}function zA(t,e){let n=t.job.allocateXrefId();t.create.push(Fw(n,e.name,e.sourceSpan)),t.update.push(Aw(n,e.name,H(e.value,t.job,e.valueSpan),e.sourceSpan))}function H(t,e,n){if(t instanceof we)return H(t.ast,e,n);if(t instanceof Ce){let r=t.receiver instanceof fn,s=t.receiver instanceof Be&&!(t.receiver instanceof fn),i=t.name==="$any"||t.name==="$event";return s||r&&!i?new He(t.name):new ot(H(t.receiver,e,n),t.name,null,Ge(t.span,n))}else{if(t instanceof Ln)return t.receiver instanceof Be?new Lr(new Vn(e.root.xref),t.name,H(t.value,e,n),null,Ge(t.span,n)):new Lr(H(t.receiver,e,n),t.name,H(t.value,e,n),void 0,Ge(t.span,n));if(t instanceof Ho)return new Cs(H(t.receiver,e,n),H(t.key,e,n),H(t.value,e,n),void 0,Ge(t.span,n));if(t instanceof yn){if(t.receiver instanceof Be)throw new Error("Unexpected ImplicitReceiver");return new Ke(H(t.receiver,e,n),t.args.map(r=>H(r,e,n)),void 0,Ge(t.span,n))}else{if(t instanceof Ot)return v(t.value,void 0,Ge(t.span,n));if(t instanceof bi)switch(t.operator){case"+":return new lr(mn.Plus,H(t.expr,e,n),void 0,Ge(t.span,n));case"-":return new lr(mn.Minus,H(t.expr,e,n),void 0,Ge(t.span,n));default:throw new Error(`AssertionError: unknown unary operator ${t.operator}`)}else if(t instanceof ft){let r=rT.get(t.operation);if(r===void 0)throw new Error(`AssertionError: unknown binary operator ${t.operation}`);return new ee(r,H(t.left,e,n),H(t.right,e,n),void 0,Ge(t.span,n))}else{if(t instanceof fn)return new Vn(e.root.xref);if(t instanceof _s)return new gn(H(t.receiver,e,n),H(t.key,e,n),void 0,Ge(t.span,n));if(t instanceof ur)throw new Error("AssertionError: Chain in unknown context");if(t instanceof jo){let r=t.keys.map((s,i)=>{let o=t.values[i];return new Or(s.key,H(o,e,n),s.quoted)});return new qt(r,void 0,Ge(t.span,n))}else{if(t instanceof Wo)return new at(t.expressions.map(r=>H(r,e,n)));if(t instanceof Br)return new Zt(H(t.condition,e,n),H(t.trueExp,e,n),H(t.falseExp,e,n),void 0,Ge(t.span,n));if(t instanceof _i)return H(t.expression,e,n);if(t instanceof $r)return new zr(e.allocateXrefId(),new Et,t.name,[H(t.exp,e,n),...t.args.map(r=>H(r,e,n))]);if(t instanceof pr)return new Us(H(t.receiver,e,n),H(t.key,e,n),Ge(t.span,n));if(t instanceof lt)return new $s(H(t.receiver,e,n),t.name);if(t instanceof vn)return new yr(H(t.receiver,e,n),t.args.map(r=>H(r,e,n)));if(t instanceof Ue)return new ji(Ge(t.span,n));if(t instanceof Di)return id(H(t.expression,e,n),Ge(t.span,n));throw new Error(`Unhandled expression type "${t.constructor.name}" in file "${n?.start.file.url}"`)}}}}}function jc(t,e,n,r){let s;return e instanceof On?s=new Ae(e.strings,e.expressions.map(i=>H(i,t,r??null)),Object.keys(Dn(n)?.placeholders??{})):e instanceof Te?s=H(e,t,r??null):s=v(e),s}var am=new Map([[z.Property,F.Property],[z.TwoWay,F.TwoWayProperty],[z.Attribute,F.Attribute],[z.Class,F.ClassName],[z.Style,F.StyleProperty],[z.Animation,F.Animation]]);function XA(t){return tn(t.tagName??"")[1]===Pr}function Dn(t){if(t==null)return null;if(!(t instanceof st))throw Error(`Expected i18n meta to be a Message, but got: ${t.constructor.name}`);return t}function YA(t,e,n){let r=new Array,s=new Set;for(let i of n.attributes){let o=kr.securityContext(n.name,i.name,!0);r.push(jr(e.xref,F.Attribute,i.name,jc(t.job,i.value,i.i18n),null,o,!0,!1,null,Dn(i.i18n),i.sourceSpan)),i.i18n&&s.add(i.name)}for(let i of n.inputs)s.has(i.name)&&console.error(`On component ${t.job.componentName}, the binding ${i.name} is both an i18n attribute and a property. You may want to remove the property binding. This will become a compilation error in future versions of Angular.`),r.push(jr(e.xref,am.get(i.type),i.name,jc(t.job,Ji(i.value),i.i18n),i.unit,i.securityContext,!1,!1,null,Dn(i.i18n)??null,i.sourceSpan));t.create.push(r.filter(i=>i?.kind===p.ExtractedAttribute)),t.update.push(r.filter(i=>i?.kind===p.Binding));for(let i of n.outputs){if(i.type===_e.Animation&&i.phase===null)throw Error("Animation listener should have a phase");i.type===_e.TwoWay?t.create.push(Fd(e.xref,e.handle,i.name,e.tag,lm(t,i.handler,i.handlerSpan),i.sourceSpan)):t.create.push(Iu(e.xref,e.handle,i.name,e.tag,bu(t,i.handler,i.handlerSpan),i.phase,i.target,!1,i.sourceSpan))}r.some(i=>i?.i18nMessage)!==null&&t.create.push($d(t.job.allocateXrefId(),new Et,e.xref))}function QA(t,e,n,r){let s=new Array;for(let i of n.templateAttrs)if(i instanceof Dt){let o=kr.securityContext(Pr,i.name,!0);s.push(ko(t,e.xref,z.Attribute,i.name,i.value,null,o,!0,r,Dn(i.i18n),i.sourceSpan))}else s.push(ko(t,e.xref,i.type,i.name,Ji(i.value),i.unit,i.securityContext,!0,r,Dn(i.i18n),i.sourceSpan));for(let i of n.attributes){let o=kr.securityContext(Pr,i.name,!0);s.push(ko(t,e.xref,z.Attribute,i.name,i.value,null,o,!1,r,Dn(i.i18n),i.sourceSpan))}for(let i of n.inputs)s.push(ko(t,e.xref,i.type,i.name,Ji(i.value),i.unit,i.securityContext,!1,r,Dn(i.i18n),i.sourceSpan));t.create.push(s.filter(i=>i?.kind===p.ExtractedAttribute)),t.update.push(s.filter(i=>i?.kind===p.Binding));for(let i of n.outputs){if(i.type===_e.Animation&&i.phase===null)throw Error("Animation listener should have a phase");if(r===gt.NgTemplate&&(i.type===_e.TwoWay?t.create.push(Fd(e.xref,e.handle,i.name,e.tag,lm(t,i.handler,i.handlerSpan),i.sourceSpan)):t.create.push(Iu(e.xref,e.handle,i.name,e.tag,bu(t,i.handler,i.handlerSpan),i.phase,i.target,!1,i.sourceSpan))),r===gt.Structural&&i.type!==_e.Animation){let o=kr.securityContext(Pr,i.name,!1);t.create.push($t(e.xref,F.Property,null,i.name,null,null,null,o))}}s.some(i=>i?.i18nMessage)!==null&&t.create.push($d(t.job.allocateXrefId(),new Et,e.xref))}function ko(t,e,n,r,s,i,o,a,l,c,u){let h=typeof s=="string";if(l===gt.Structural){if(!a)switch(n){case z.Property:case z.Class:case z.Style:return $t(e,F.Property,null,r,null,null,c,o);case z.TwoWay:return $t(e,F.TwoWayProperty,null,r,null,null,c,o)}if(!h&&(n===z.Attribute||n===z.Animation))return null}let d=am.get(n);return l===gt.NgTemplate&&(n===z.Class||n===z.Style||n===z.Attribute&&!h)&&(d=F.Property),jr(e,d,r,jc(t.job,s,c),i,o,h,a,l,c,u)}function bu(t,e,n){e=Ji(e);let r=new Array,s=e instanceof ur?e.expressions:[e];if(s.length===0)throw new Error("Expected listener to have non-empty expression list.");let i=s.map(a=>H(a,t.job,n)),o=i.pop();return r.push(...i.map(a=>wn(new bt(a,a.sourceSpan)))),r.push(wn(new Je(o,o.sourceSpan))),r}function lm(t,e,n){e=Ji(e);let r=new Array;if(e instanceof ur)if(e.expressions.length===1)e=e.expressions[0];else throw new Error("Expected two-way listener to have a single expression.");let s=H(e,t.job,n),i=new He("$event"),o=new ca(s,i);return r.push(wn(new bt(o))),r.push(wn(new Je(i))),r}function Ji(t){return t instanceof we?t.ast:t}function cm(t,e){JA(t.localRefs);for(let{name:n,value:r}of e.references)t.localRefs.push({name:n,target:r})}function JA(t){if(!Array.isArray(t))throw new Error("AssertionError: expected an array")}function Ge(t,e){if(e===null)return null;let n=e.start.moveBy(t.start),r=e.start.moveBy(t.end),s=e.fullStart.moveBy(t.start);return new V(n,r,s)}function Na(t,e,n){let r=null;for(let s of n.children)if(!(s instanceof Rs)){if(r!==null)return null;(s instanceof oe||s instanceof se&&s.tagName!==null)&&(r=s)}if(r!==null){for(let i of r.attributes){let o=kr.securityContext(Pr,i.name,!0);t.update.push(jr(e,F.Attribute,i.name,v(i.value),null,o,!0,!1,null,Dn(i.i18n),i.sourceSpan))}for(let i of r.inputs)if(i.type!==z.Animation&&i.type!==z.Attribute){let o=kr.securityContext(Pr,i.name,!0);t.create.push($t(e,F.Property,null,i.name,null,null,null,o))}let s=r instanceof oe?r.name:r.tagName;return s===Pr?null:s}return null}function ba(t,e){return no(W(fu).bitwiseAnd(v(t),null,!1),e)}function ZA(t){return(t.descendants?1:0)|(t.static?2:0)|(t.emitDistinctChangesOnly?4:0)}function eN(t,e){if(Array.isArray(t.predicate)){let n=[];return t.predicate.forEach(r=>{let s=r.split(",").map(i=>v(i.trim()));n.push(...s)}),e.getConstLiteral(ie(n),!0)}else switch(t.predicate.forwardRef){case 0:case 2:return t.predicate.expression;case 1:return L(f.resolveForwardRef).callFn([t.predicate.expression])}}function um(t,e,n,r){let s=[];r!==void 0&&s.push(...r),t.isSignal&&s.push(new ot(W(Fi),t.propertyName)),s.push(eN(t,e),v(ZA(t))),t.read&&s.push(t.read);let i=t.isSignal?n.signalBased:n.nonSignal;return L(i).callFn(s)}var Du=Symbol("queryAdvancePlaceholder");function pm(t){let e=[],n=0,r=()=>{n>0&&(e.unshift(L(f.queryAdvance).callFn(n===1?[]:[v(n)]).toStmt()),n=0)};for(let s=t.length-1;s>=0;s--){let i=t[s];i===Du?n++:(r(),e.unshift(i))}return r(),e}function tN(t,e,n){let r=[],s=[],i=dd(a=>s.push(a),hu);t.forEach(a=>{let l=um(a,e,{signalBased:f.viewQuerySignal,nonSignal:f.viewQuery});if(r.push(l.toStmt()),a.isSignal){s.push(Du);return}let c=i(),u=L(f.loadQuery).callFn([]),h=L(f.queryRefresh).callFn([c.set(u)]),d=W(Fi).prop(a.propertyName).set(a.first?c.prop("first"):c);s.push(h.and(d).toStmt())});let o=n?`${n}_Query`:null;return Yr([new Oe(fu,ka),new Oe(Fi,null)],[ba(1,r),ba(2,pm(s))],At,null,o)}function nN(t,e,n){let r=[],s=[],i=dd(a=>s.push(a),hu);for(let a of t){if(r.push(um(a,e,{nonSignal:f.contentQuery,signalBased:f.contentQuerySignal},[W("dirIndex")]).toStmt()),a.isSignal){s.push(Du);continue}let l=i(),c=L(f.loadQuery).callFn([]),u=L(f.queryRefresh).callFn([l.set(c)]),h=W(Fi).prop(a.propertyName).set(a.first?l.prop("first"):l);s.push(u.and(h).toStmt())}let o=n?`${n}_ContentQueries`:null;return Yr([new Oe(fu,ka),new Oe(Fi,null),new Oe("dirIndex",null)],[ba(1,r),ba(2,pm(s))],At,null,o)}var Da=class extends Fc{constructor(){super(Wd)}parse(e,n,r){return super.parse(e,n,r)}},hm="ngPreserveWhitespaces",rN=new Set(["pre","template","textarea","script","style"]),fm=` \f
|
|
26
26
|
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,sN=new RegExp(`[^${fm}]`),iN=new RegExp(`[${fm}]{2,}`,"g");function oN(t){return t.some(e=>e.name===hm)}function dm(t){return t.replace(new RegExp(jd,"g")," ")}var Kc=class{visitElement(e,n){return rN.has(e.name)||oN(e.attrs)?new Lt(e.name,Ee(this,e.attrs),e.children,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n):new Lt(e.name,e.attrs,Af(this,e.children),e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}visitAttribute(e,n){return e.name!==hm?e:null}visitText(e,n){let r=e.value.match(sN),s=n&&(n.prev instanceof Gs||n.next instanceof Gs);if(r||s){let i=e.tokens.map(a=>a.type===5?aN(a):a),o=mm(e.value);return new Xr(o,e.sourceSpan,i,e.i18n)}return null}visitComment(e,n){return e}visitExpansion(e,n){return e}visitExpansionCase(e,n){return e}visitBlock(e,n){return new Ft(e.name,e.parameters,Af(this,e.children),e.sourceSpan,e.nameSpan,e.startSourceSpan,e.endSourceSpan)}visitBlockParameter(e,n){return e}visitLetDeclaration(e,n){return e}};function aN({type:t,parts:e,sourceSpan:n}){return{type:t,parts:[mm(e[0])],sourceSpan:n}}function mm(t){return dm(t).replace(iN," ")}function Af(t,e){let n=[];return e.forEach((r,s)=>{let i={prev:e[s-1],next:e[s+1]},o=r.visit(t,i);o&&n.push(o)}),n}var Nf=".",lN="attr",cN="class",uN="style",pN="*",Al="animate-",zc=class{constructor(e,n,r,s,i=!1){this._exprParser=e,this._interpolationConfig=n,this._schemaRegistry=r,this.errors=s,this._allowInvalidAssignmentEvents=i}get interpolationConfig(){return this._interpolationConfig}createBoundHostProperties(e,n){let r=[];for(let s of Object.keys(e)){let i=e[s];typeof i=="string"?this.parsePropertyBinding(s,i,!0,!1,n,n.start.offset,void 0,[],r,n):this._reportError(`Value of the host property binding "${s}" needs to be a string representing an expression but got "${i}" (${typeof i})`,n)}return r}createDirectiveHostEventAsts(e,n){let r=[];for(let s of Object.keys(e)){let i=e[s];typeof i=="string"?this.parseEvent(s,i,!1,n,n,[],r,n):this._reportError(`Value of the host listener "${s}" needs to be a string representing an expression but got "${i}" (${typeof i})`,n)}return r}parseInterpolation(e,n,r){let s=n.start.toString(),i=n.fullStart.offset;try{let o=this._exprParser.parseInterpolation(e,s,i,r,this._interpolationConfig);return o&&this._reportExpressionParserErrors(o.errors,n),o}catch(o){return this._reportError(`${o}`,n),this._exprParser.wrapLiteralPrimitive("ERROR",s,i)}}parseInterpolationExpression(e,n){let r=n.start.toString(),s=n.start.offset;try{let i=this._exprParser.parseInterpolationExpression(e,r,s);return i&&this._reportExpressionParserErrors(i.errors,n),i}catch(i){return this._reportError(`${i}`,n),this._exprParser.wrapLiteralPrimitive("ERROR",r,s)}}parseInlineTemplateBinding(e,n,r,s,i,o,a,l){let c=r.start.offset+pN.length,u=this._parseTemplateBindings(e,n,r,c,s);for(let h of u){let d=Qn(r,h.sourceSpan),g=h.key.source,y=Qn(r,h.key.span);if(h instanceof Ri){let C=h.value?h.value.source:"$implicit",A=h.value?Qn(r,h.value.span):void 0;a.push(new zl(g,C,d,y,A))}else if(h.value){let C=l?d:r,A=Qn(r,h.value.ast.sourceSpan);this._parsePropertyAst(g,h.value,!1,C,y,A,i,o)}else i.push([g,""]),this.parseLiteralAttr(g,null,y,s,void 0,i,o,y)}}_parseTemplateBindings(e,n,r,s,i){let o=r.start.toString();try{let a=this._exprParser.parseTemplateBindings(e,n,o,s,i);return this._reportExpressionParserErrors(a.errors,r),a.warnings.forEach(l=>{this._reportError(l,r,bn.WARNING)}),a.templateBindings}catch(a){return this._reportError(`${a}`,r),[]}}parseLiteralAttr(e,n,r,s,i,o,a,l){Nl(e)?(e=e.substring(1),l!==void 0&&(l=Qn(l,new We(l.start.offset+1,l.end.offset))),n&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',r,bn.ERROR),this._parseAnimation(e,n,r,s,l,i,o,a)):a.push(new ci(e,this._exprParser.wrapLiteralPrimitive(n,"",s),In.LITERAL_ATTR,r,l,i))}parsePropertyBinding(e,n,r,s,i,o,a,l,c,u){e.length===0&&this._reportError("Property name is missing in binding",i);let h=!1;e.startsWith(Al)?(h=!0,e=e.substring(Al.length),u!==void 0&&(u=Qn(u,new We(u.start.offset+Al.length,u.end.offset)))):Nl(e)&&(h=!0,e=e.substring(1),u!==void 0&&(u=Qn(u,new We(u.start.offset+1,u.end.offset)))),h?this._parseAnimation(e,n,i,o,u,a,l,c):this._parsePropertyAst(e,this.parseBinding(n,r,a||i,o),s,i,u,a,l,c)}parsePropertyInterpolation(e,n,r,s,i,o,a,l){let c=this.parseInterpolation(n,s||r,l);return c?(this._parsePropertyAst(e,c,!1,r,a,s,i,o),!0):!1}_parsePropertyAst(e,n,r,s,i,o,a,l){a.push([e,n.source]),l.push(new ci(e,n,r?In.TWO_WAY:In.DEFAULT,s,i,o))}_parseAnimation(e,n,r,s,i,o,a,l){e.length===0&&this._reportError("Animation trigger is missing",r);let c=this.parseBinding(n||"undefined",!1,o||r,s);a.push([e,c.source]),l.push(new ci(e,c,In.ANIMATION,r,i,o))}parseBinding(e,n,r,s){let i=(r&&r.start||"(unknown)").toString();try{let o=n?this._exprParser.parseSimpleBinding(e,i,s,this._interpolationConfig):this._exprParser.parseBinding(e,i,s,this._interpolationConfig);return o&&this._reportExpressionParserErrors(o.errors,r),o}catch(o){return this._reportError(`${o}`,r),this._exprParser.wrapLiteralPrimitive("ERROR",i,s)}}createBoundElementProperty(e,n,r=!1,s=!0){if(n.isAnimation)return new zo(n.name,z.Animation,ce.NONE,n.expression,null,n.sourceSpan,n.keySpan,n.valueSpan);let i=null,o,a=null,l=n.name.split(Nf),c;if(l.length>1)if(l[0]==lN){a=l.slice(1).join(Nf),r||this._validatePropertyOrAttributeName(a,n.sourceSpan,!0),c=bl(this._schemaRegistry,e,a,!0);let u=a.indexOf(":");if(u>-1){let h=a.substring(0,u),d=a.substring(u+1);a=Ql(h,d)}o=z.Attribute}else l[0]==cN?(a=l[1],o=z.Class,c=[ce.NONE]):l[0]==uN&&(i=l.length>2?l[2]:null,a=l[1],o=z.Style,c=[ce.STYLE]);if(a===null){let u=this._schemaRegistry.getMappedPropName(n.name);a=s?u:n.name,c=bl(this._schemaRegistry,e,u,!1),o=n.type===In.TWO_WAY?z.TwoWay:z.Property,r||this._validatePropertyOrAttributeName(u,n.sourceSpan,!1)}return new zo(a,o,c[0],n.expression,i,n.sourceSpan,n.keySpan,n.valueSpan)}parseEvent(e,n,r,s,i,o,a,l){e.length===0&&this._reportError("Event name is missing in binding",s),Nl(e)?(e=e.slice(1),l!==void 0&&(l=Qn(l,new We(l.start.offset+1,l.end.offset))),this._parseAnimationEvent(e,n,s,i,a,l)):this._parseRegularEvent(e,n,r,s,i,o,a,l)}calcPossibleSecurityContexts(e,n,r){let s=this._schemaRegistry.getMappedPropName(n);return bl(this._schemaRegistry,e,s,r)}_parseAnimationEvent(e,n,r,s,i,o){let a=GE(e,[e,""]),l=a[0],c=a[1].toLowerCase(),u=this._parseAction(n,s);i.push(new Ko(l,c,_e.Animation,u,r,s,o)),l.length===0&&this._reportError("Animation event name is missing in binding",r),c?c!=="start"&&c!=="done"&&this._reportError(`The provided animation output phase value "${c}" for "@${l}" is not supported (use start or done)`,r):this._reportError(`The animation trigger output event (@${l}) is missing its phase value name (start or done are currently supported)`,r)}_parseRegularEvent(e,n,r,s,i,o,a,l){let[c,u]=qE(e,[null,e]),h=this.errors.length,d=this._parseAction(n,i),g=this.errors.length===h;o.push([e,d.source]),r&&g&&!this._isAllowedAssignmentEvent(d)&&this._reportError("Unsupported expression in a two-way binding",s),a.push(new Ko(u,c,r?_e.TwoWay:_e.Regular,d,s,i,l))}_parseAction(e,n){let r=(n&&n.start||"(unknown").toString(),s=n&&n.start?n.start.offset:0;try{let i=this._exprParser.parseAction(e,r,s,this._interpolationConfig);return i&&this._reportExpressionParserErrors(i.errors,n),!i||i.ast instanceof Ue?(this._reportError("Empty expressions are not allowed",n),this._exprParser.wrapLiteralPrimitive("ERROR",r,s)):i}catch(i){return this._reportError(`${i}`,n),this._exprParser.wrapLiteralPrimitive("ERROR",r,s)}}_reportError(e,n,r=bn.ERROR){this.errors.push(new q(n,e,r))}_reportExpressionParserErrors(e,n){for(let r of e)this._reportError(r.message,n)}_validatePropertyOrAttributeName(e,n,r){let s=r?this._schemaRegistry.validateAttribute(e):this._schemaRegistry.validateProperty(e);s.error&&this._reportError(s.msg,n,bn.ERROR)}_isAllowedAssignmentEvent(e){return e instanceof we?this._isAllowedAssignmentEvent(e.ast):e instanceof _i?this._isAllowedAssignmentEvent(e.expression):e instanceof Ce||e instanceof _s?!0:this._allowInvalidAssignmentEvents?e instanceof ft?(e.operation==="&&"||e.operation==="||"||e.operation==="??")&&(e.right instanceof Ce||e.right instanceof _s):e instanceof Br||e instanceof Di:!1}};function Nl(t){return t[0]=="@"}function bl(t,e,n,r){let s=[];return Yt.parse(e).forEach(i=>{let o=i.element?[i.element]:t.allKnownElementNames(),a=new Set(i.notSelectors.filter(c=>c.isElementSelector()).map(c=>c.element)),l=o.filter(c=>!a.has(c));s.push(...l.map(c=>t.securityContext(c,n,r)))}),s.length===0?[ce.NONE]:Array.from(new Set(s)).sort()}function Qn(t,e){let n=e.start-t.start.offset,r=e.end-t.end.offset;return new V(t.start.moveBy(n),t.end.moveBy(r),t.fullStart.moveBy(n),t.details)}function hN(t){if(t==null||t.length===0||t[0]=="/")return!1;let e=t.match(fN);return e===null||e[1]=="package"||e[1]=="asset"}var fN=/^([^:/?#]+):/,dN="select",mN="link",gN="rel",yN="href",vN="stylesheet",EN="style",SN="script",wN="ngNonBindable",TN="ngProjectAs";function gm(t){let e=null,n=null,r=null,s=!1,i="";t.attrs.forEach(l=>{let c=l.name.toLowerCase();c==dN?e=l.value:c==yN?n=l.value:c==gN?r=l.value:l.name==wN?s=!0:l.name==TN&&l.value.length>0&&(i=l.value)}),e=xN(e);let o=t.name.toLowerCase(),a=mt.OTHER;return Xl(o)?a=mt.NG_CONTENT:o==EN?a=mt.STYLE:o==SN?a=mt.SCRIPT:o==mN&&r==vN&&(a=mt.STYLESHEET),new Xc(a,e,n,s,i)}var mt;(function(t){t[t.NG_CONTENT=0]="NG_CONTENT",t[t.STYLE=1]="STYLE",t[t.STYLESHEET=2]="STYLESHEET",t[t.SCRIPT=3]="SCRIPT",t[t.OTHER=4]="OTHER"})(mt||(mt={}));var Xc=class{constructor(e,n,r,s,i){this.type=e,this.selectAttr=n,this.hrefAttr=r,this.nonBindable=s,this.projectAs=i}};function xN(t){return t===null||t.length===0?"*":t}var CN=/^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/,IN=/^track\s+([\S\s]*)/,AN=/^(as\s)+(.*)/,_u=/^else[^\S\r\n]+if/,NN=/^let\s+([\S\s]*)/,bf=/(\s*)(\S+)(\s*)/,gi=new Set(["$index","$first","$last","$even","$odd","$count"]);function Df(t){return t==="empty"}function _f(t){return t==="else"||_u.test(t)}function bN(t,e,n,r){let s=PN(e),i=[],o=Rf(t,s,r);o!==null&&i.push(new _n(o.expression,Ee(n,t.children,t.children),o.expressionAlias,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.nameSpan,t.i18n));for(let h of e)if(_u.test(h.name)){let d=Rf(h,s,r);if(d!==null){let g=Ee(n,h.children,h.children);i.push(new _n(d.expression,g,d.expressionAlias,h.sourceSpan,h.startSourceSpan,h.endSourceSpan,h.nameSpan,h.i18n))}}else if(h.name==="else"){let d=Ee(n,h.children,h.children);i.push(new _n(null,d,null,h.sourceSpan,h.startSourceSpan,h.endSourceSpan,h.nameSpan,h.i18n))}let a=i.length>0?i[0].startSourceSpan:t.startSourceSpan,l=i.length>0?i[i.length-1].endSourceSpan:t.endSourceSpan,c=t.sourceSpan,u=i[i.length-1];return u!==void 0&&(c=new V(a.start,u.sourceSpan.end)),{node:new Vr(i,c,t.startSourceSpan,l,t.nameSpan),errors:s}}function DN(t,e,n,r){let s=[],i=RN(t,s,r),o=null,a=null;for(let l of e)l.name==="empty"?a!==null?s.push(new q(l.sourceSpan,"@for loop can only have one @empty block")):l.parameters.length>0?s.push(new q(l.sourceSpan,"@empty block cannot have parameters")):a=new Oi(Ee(n,l.children,l.children),l.sourceSpan,l.startSourceSpan,l.endSourceSpan,l.nameSpan,l.i18n):s.push(new q(l.sourceSpan,`Unrecognized @for loop block "${l.name}"`));if(i!==null)if(i.trackBy===null)s.push(new q(t.sourceSpan,'@for loop must have a "track" expression'));else{let l=a?.endSourceSpan??t.endSourceSpan,c=new V(t.sourceSpan.start,l?.end??t.sourceSpan.end);o=new En(i.itemName,i.expression,i.trackBy.expression,i.trackBy.keywordSpan,i.context,Ee(n,t.children,t.children),a,c,t.sourceSpan,t.startSourceSpan,l,t.nameSpan,t.i18n)}return{node:o,errors:s}}function _N(t,e,n){let r=MN(t),s=t.parameters.length>0?Zi(t.parameters[0],n):n.parseBinding("",!1,t.sourceSpan,0),i=[],o=[],a=null;for(let l of t.children){if(!(l instanceof Ft))continue;if((l.name!=="case"||l.parameters.length===0)&&l.name!=="default"){o.push(new Jo(l.name,l.sourceSpan,l.nameSpan));continue}let c=l.name==="case"?Zi(l.parameters[0],n):null,u=new Li(c,Ee(e,l.children,l.children),l.sourceSpan,l.startSourceSpan,l.endSourceSpan,l.nameSpan,l.i18n);c===null?a=u:i.push(u)}return a!==null&&i.push(a),{node:new Ur(s,i,o,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.nameSpan),errors:r}}function RN(t,e,n){if(t.parameters.length===0)return e.push(new q(t.sourceSpan,"@for loop does not have an expression")),null;let[r,...s]=t.parameters,i=LN(r,e)?.match(CN);if(!i||i[2].trim().length===0)return e.push(new q(r.sourceSpan,'Cannot parse expression. @for loop expression must match the pattern "<identifier> of <expression>"')),null;let[,o,a]=i;gi.has(o)&&e.push(new q(r.sourceSpan,`@for loop item name cannot be one of ${Array.from(gi).join(", ")}.`));let l=r.expression.split(" ")[0],c=new V(r.sourceSpan.start,r.sourceSpan.start.moveBy(l.length)),u={itemName:new ct(o,"$implicit",c,c),trackBy:null,expression:Zi(r,n,a),context:Array.from(gi,h=>{let d=new V(t.startSourceSpan.end,t.startSourceSpan.end);return new ct(h,h,d,d)})};for(let h of s){let d=h.expression.match(NN);if(d!==null){let y=new V(h.sourceSpan.start.moveBy(d[0].length-d[1].length),h.sourceSpan.end);kN(h.sourceSpan,d[1],y,o,u.context,e);continue}let g=h.expression.match(IN);if(g!==null){if(u.trackBy!==null)e.push(new q(h.sourceSpan,'@for loop can only have one "track" expression'));else{let y=Zi(h,n,g[1]);y.ast instanceof Ue&&e.push(new q(h.sourceSpan,'@for loop must have a "track" expression'));let C=new V(h.sourceSpan.start,h.sourceSpan.start.moveBy(5));u.trackBy={expression:y,keywordSpan:C}}continue}e.push(new q(h.sourceSpan,`Unrecognized @for loop paramater "${h.expression}"`))}return u}function kN(t,e,n,r,s,i){let o=e.split(","),a=n.start;for(let l of o){let c=l.split("="),u=c.length===2?c[0].trim():"",h=c.length===2?c[1].trim():"";if(u.length===0||h.length===0)i.push(new q(t,'Invalid @for loop "let" parameter. Parameter should match the pattern "<name> = <variable name>"'));else if(!gi.has(h))i.push(new q(t,`Unknown "let" parameter variable "${h}". The allowed variables are: ${Array.from(gi).join(", ")}`));else if(u===r)i.push(new q(t,`Invalid @for loop "let" parameter. Variable cannot be called "${r}"`));else if(s.some(d=>d.name===u))i.push(new q(t,`Duplicate "let" parameter variable "${h}"`));else{let[,d,g]=c[0].match(bf)??[],y=d!==void 0&&c.length===2?new V(a.moveBy(d.length),a.moveBy(d.length+g.length)):n,C;if(c.length===2){let[,_,U]=c[1].match(bf)??[];C=_!==void 0?new V(a.moveBy(c[0].length+1+_.length),a.moveBy(c[0].length+1+_.length+U.length)):void 0}let A=new V(y.start,C?.end??y.end);s.push(new ct(u,h,A,y,C))}a=a.moveBy(l.length+1)}}function PN(t){let e=[],n=!1;for(let r=0;r<t.length;r++){let s=t[r];s.name==="else"?(n?e.push(new q(s.sourceSpan,"Conditional can only have one @else block")):t.length>1&&r<t.length-1?e.push(new q(s.sourceSpan,"@else block must be last inside the conditional")):s.parameters.length>0&&e.push(new q(s.sourceSpan,"@else block cannot have parameters")),n=!0):_u.test(s.name)||e.push(new q(s.sourceSpan,`Unrecognized conditional block @${s.name}`))}return e}function MN(t){let e=[],n=!1;if(t.parameters.length!==1)return e.push(new q(t.sourceSpan,"@switch block must have exactly one parameter")),e;for(let r of t.children)if(!(r instanceof Yi||r instanceof Xr&&r.value.trim().length===0)){if(!(r instanceof Ft)||r.name!=="case"&&r.name!=="default"){e.push(new q(r.sourceSpan,"@switch block can only contain @case and @default blocks"));continue}r.name==="default"?(n?e.push(new q(r.sourceSpan,"@switch block can only have one @default block")):r.parameters.length>0&&e.push(new q(r.sourceSpan,"@default block cannot have parameters")),n=!0):r.name==="case"&&r.parameters.length!==1&&e.push(new q(r.sourceSpan,"@case block must have exactly one parameter"))}return e}function Zi(t,e,n){let r,s;return typeof n=="string"?(r=Math.max(0,t.expression.lastIndexOf(n)),s=r+n.length):(r=0,s=t.expression.length),e.parseBinding(t.expression.slice(r,s),!1,t.sourceSpan,t.sourceSpan.start.offset+r)}function Rf(t,e,n){if(t.parameters.length===0)return e.push(new q(t.sourceSpan,"Conditional block does not have an expression")),null;let r=Zi(t.parameters[0],n),s=null;for(let i=1;i<t.parameters.length;i++){let o=t.parameters[i],a=o.expression.match(AN);if(a===null)e.push(new q(o.sourceSpan,`Unrecognized conditional paramater "${o.expression}"`));else if(t.name!=="if")e.push(new q(o.sourceSpan,'"as" expression is only allowed on the primary @if block'));else if(s!==null)e.push(new q(o.sourceSpan,'Conditional can only have one "as" expression'));else{let l=a[2].trim(),c=o.sourceSpan.start.moveBy(a[1].length),u=new V(c,c.moveBy(l.length));s=new ct(l,l,u,u)}}return{expression:r,expressionAlias:s}}function LN(t,e){let n=t.expression,r=/^\s$/,s=0,i=0,o=n.length-1;for(let a=0;a<n.length;a++){let l=n[a];if(l==="(")i=a+1,s++;else{if(r.test(l))continue;break}}if(s===0)return n;for(let a=n.length-1;a>-1;a--){let l=n[a];if(l===")"){if(o=a,s--,s===0)break}else{if(r.test(l))continue;break}}return s!==0?(e.push(new q(t.sourceSpan,"Unclosed parentheses in expression")),null):n.slice(i,o)}var ON=/^\d+\.?\d*(ms|s)?$/,FN=/^\s$/,kf=new Map([[pn,dt],[Ts,ys],[kn,zt]]),tt;(function(t){t.IDLE="idle",t.TIMER="timer",t.INTERACTION="interaction",t.IMMEDIATE="immediate",t.HOVER="hover",t.VIEWPORT="viewport"})(tt||(tt={}));function Pf({expression:t,sourceSpan:e},n,r,s){let i=t.indexOf("when"),o=new V(e.start.moveBy(i),e.start.moveBy(i+4)),a=ym(t,e);if(i===-1)s.push(new q(e,'Could not find "when" keyword in expression'));else{let l=eo(t,i+1),c=n.parseBinding(t.slice(l),!1,e,e.start.offset+l);vm("when",r,s,new ks(c,e,a,o))}}function Mf({expression:t,sourceSpan:e},n,r,s){let i=t.indexOf("on"),o=new V(e.start.moveBy(i),e.start.moveBy(i+2)),a=ym(t,e);if(i===-1)r.push(new q(e,'Could not find "on" keyword in expression'));else{let l=eo(t,i+1);new Yc(t,l,e,n,r,s,a,o).parse()}}function ym(t,e){return t.startsWith("prefetch")?new V(e.start,e.start.moveBy(8)):null}var Yc=class{constructor(e,n,r,s,i,o,a,l){this.expression=e,this.start=n,this.span=r,this.triggers=s,this.errors=i,this.placeholder=o,this.prefetchSpan=a,this.onSourceSpan=l,this.index=0,this.tokens=new Xi().tokenize(e.slice(n))}parse(){for(;this.tokens.length>0&&this.index<this.tokens.length;){let e=this.token();if(!e.isIdentifier()){this.unexpectedToken(e);break}if(this.isFollowedByOrLast(Ut))this.consumeTrigger(e,[]),this.advance();else if(this.isFollowedByOrLast(kn)){this.advance();let n=this.errors.length,r=this.consumeParameters();if(this.errors.length!==n)break;this.consumeTrigger(e,r),this.advance()}else this.index<this.tokens.length-1&&this.unexpectedToken(this.tokens[this.index+1]);this.advance()}}advance(){this.index++}isFollowedByOrLast(e){return this.index===this.tokens.length-1?!0:this.tokens[this.index+1].isCharacter(e)}token(){return this.tokens[Math.min(this.index,this.tokens.length-1)]}consumeTrigger(e,n){let r=this.span.start.moveBy(this.start+e.index-this.tokens[0].index),s=new V(r,r.moveBy(e.strValue.length)),i=r.moveBy(this.token().end-e.index),o=e.index===0,a=o?this.onSourceSpan:null,l=o?this.prefetchSpan:null,c=new V(o?this.span.start:r,i);try{switch(e.toString()){case tt.IDLE:this.trackTrigger("idle",BN(n,s,c,l,a));break;case tt.TIMER:this.trackTrigger("timer",$N(n,s,c,this.prefetchSpan,this.onSourceSpan));break;case tt.INTERACTION:this.trackTrigger("interaction",qN(n,s,c,this.prefetchSpan,this.onSourceSpan,this.placeholder));break;case tt.IMMEDIATE:this.trackTrigger("immediate",UN(n,s,c,this.prefetchSpan,this.onSourceSpan));break;case tt.HOVER:this.trackTrigger("hover",VN(n,s,c,this.prefetchSpan,this.onSourceSpan,this.placeholder));break;case tt.VIEWPORT:this.trackTrigger("viewport",GN(n,s,c,this.prefetchSpan,this.onSourceSpan,this.placeholder));break;default:throw new Error(`Unrecognized trigger type "${e}"`)}}catch(u){this.error(e,u.message)}}consumeParameters(){let e=[];if(!this.token().isCharacter(kn))return this.unexpectedToken(this.token()),e;this.advance();let n=[],r="";for(;this.index<this.tokens.length;){let s=this.token();if(s.isCharacter(zt)&&n.length===0){r.length&&e.push(r);break}if(s.type===Y.Character&&kf.has(s.numValue)&&n.push(kf.get(s.numValue)),n.length>0&&s.isCharacter(n[n.length-1])&&n.pop(),n.length===0&&s.isCharacter(Ut)&&r.length>0){e.push(r),r="",this.advance();continue}r+=this.tokenText(),this.advance()}return(!this.token().isCharacter(zt)||n.length>0)&&this.error(this.token(),"Unexpected end of expression"),this.index<this.tokens.length-1&&!this.tokens[this.index+1].isCharacter(Ut)&&this.unexpectedToken(this.tokens[this.index+1]),e}tokenText(){return this.expression.slice(this.start+this.token().index,this.start+this.token().end)}trackTrigger(e,n){vm(e,this.triggers,this.errors,n)}error(e,n){let r=this.span.start.moveBy(this.start+e.index),s=r.moveBy(e.end-e.index);this.errors.push(new q(new V(r,s),n))}unexpectedToken(e){this.error(e,`Unexpected token "${e}"`)}};function vm(t,e,n,r){e[t]?n.push(new q(r.sourceSpan,`Duplicate "${t}" trigger is not allowed`)):e[t]=r}function BN(t,e,n,r,s){if(t.length>0)throw new Error(`"${tt.IDLE}" trigger cannot have parameters`);return new Jl(e,n,r,s)}function $N(t,e,n,r,s){if(t.length!==1)throw new Error(`"${tt.TIMER}" trigger must have exactly one parameter`);let i=_a(t[0]);if(i===null)throw new Error(`Could not parse time value of trigger "${tt.TIMER}"`);return new ec(i,e,n,r,s)}function UN(t,e,n,r,s){if(t.length>0)throw new Error(`"${tt.IMMEDIATE}" trigger cannot have parameters`);return new Zl(e,n,r,s)}function VN(t,e,n,r,s,i){return Ru(tt.HOVER,t,i),new Xo(t[0]??null,e,n,r,s)}function qN(t,e,n,r,s,i){return Ru(tt.INTERACTION,t,i),new Yo(t[0]??null,e,n,r,s)}function GN(t,e,n,r,s,i){return Ru(tt.VIEWPORT,t,i),new Qo(t[0]??null,e,n,r,s)}function Ru(t,e,n){if(e.length>1)throw new Error(`"${t}" trigger can only have zero or one parameters`);if(e.length===0){if(n===null)throw new Error(`"${t}" trigger with no parameters can only be placed on an @defer that has a @placeholder block`);if(n.children.length!==1||!(n.children[0]instanceof oe))throw new Error(`"${t}" trigger with no parameters can only be placed on an @defer that has a @placeholder block with exactly one root element node`)}}function eo(t,e=0){let n=!1;for(let r=e;r<t.length;r++)if(FN.test(t[r]))n=!0;else if(n)return r;return-1}function _a(t){let e=t.match(ON);if(!e)return null;let[n,r]=e;return parseFloat(n)*(r==="s"?1e3:1)}var HN=/^prefetch\s+when\s/,WN=/^prefetch\s+on\s/,Em=/^minimum\s/,jN=/^after\s/,KN=/^when\s/,zN=/^on\s/;function Qc(t){return t==="placeholder"||t==="loading"||t==="error"}function XN(t,e,n,r){let s=[],{placeholder:i,loading:o,error:a}=YN(e,s,n),{triggers:l,prefetchTriggers:c}=eb(t.parameters,r,s,i),u=t.endSourceSpan,h=t.sourceSpan.end;if(e.length>0){let y=e[e.length-1];u=y.endSourceSpan,h=y.sourceSpan.end}let d=new V(t.sourceSpan.start,h);return{node:new Un(Ee(n,t.children,t.children),l,c,i,o,a,t.nameSpan,d,t.sourceSpan,t.startSourceSpan,u,t.i18n),errors:s}}function YN(t,e,n){let r=null,s=null,i=null;for(let o of t)try{if(!Qc(o.name)){e.push(new q(o.startSourceSpan,`Unrecognized block "@${o.name}"`));break}switch(o.name){case"placeholder":r!==null?e.push(new q(o.startSourceSpan,"@defer block can only have one @placeholder block")):r=QN(o,n);break;case"loading":s!==null?e.push(new q(o.startSourceSpan,"@defer block can only have one @loading block")):s=JN(o,n);break;case"error":i!==null?e.push(new q(o.startSourceSpan,"@defer block can only have one @error block")):i=ZN(o,n);break}}catch(a){e.push(new q(o.startSourceSpan,a.message))}return{placeholder:r,loading:s,error:i}}function QN(t,e){let n=null;for(let r of t.parameters)if(Em.test(r.expression)){if(n!=null)throw new Error('@placeholder block can only have one "minimum" parameter');let s=_a(r.expression.slice(eo(r.expression)));if(s===null)throw new Error('Could not parse time value of parameter "minimum"');n=s}else throw new Error(`Unrecognized parameter in @placeholder block: "${r.expression}"`);return new ki(Ee(e,t.children,t.children),n,t.nameSpan,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.i18n)}function JN(t,e){let n=null,r=null;for(let s of t.parameters)if(jN.test(s.expression)){if(n!=null)throw new Error('@loading block can only have one "after" parameter');let i=_a(s.expression.slice(eo(s.expression)));if(i===null)throw new Error('Could not parse time value of parameter "after"');n=i}else if(Em.test(s.expression)){if(r!=null)throw new Error('@loading block can only have one "minimum" parameter');let i=_a(s.expression.slice(eo(s.expression)));if(i===null)throw new Error('Could not parse time value of parameter "minimum"');r=i}else throw new Error(`Unrecognized parameter in @loading block: "${s.expression}"`);return new Pi(Ee(e,t.children,t.children),n,r,t.nameSpan,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.i18n)}function ZN(t,e){if(t.parameters.length>0)throw new Error("@error block cannot have parameters");return new Mi(Ee(e,t.children,t.children),t.nameSpan,t.sourceSpan,t.startSourceSpan,t.endSourceSpan,t.i18n)}function eb(t,e,n,r){let s={},i={};for(let o of t)KN.test(o.expression)?Pf(o,e,s,n):zN.test(o.expression)?Mf(o,s,n,r):HN.test(o.expression)?Pf(o,e,i,n):WN.test(o.expression)?Mf(o,i,n,r):n.push(new q(o.sourceSpan,"Unrecognized trigger"));return{triggers:s,prefetchTriggers:i}}var tb=/^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/,Lf=1,Of=2,Ff=3,Bf=4,$f=5,nb=6,si=7,Jn={BANANA_BOX:{start:"[(",end:")]"},PROPERTY:{start:"[",end:"]"},EVENT:{start:"(",end:")"}},Uf="*";function rb(t,e,n){let r=new Jc(e,n),s=Ee(r,t,t),i=e.errors.concat(r.errors),o={nodes:s,errors:i,styleUrls:r.styleUrls,styles:r.styles,ngContentSelectors:r.ngContentSelectors};return n.collectCommentNodes&&(o.commentNodes=r.commentNodes),o}var Jc=class{constructor(e,n){this.bindingParser=e,this.options=n,this.errors=[],this.styles=[],this.styleUrls=[],this.ngContentSelectors=[],this.commentNodes=[],this.inI18nBlock=!1,this.processedNodes=new Set}visitElement(e){let n=Wc(e.i18n);n&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",e.sourceSpan),this.inI18nBlock=!0);let r=gm(e);if(r.type===mt.SCRIPT)return null;if(r.type===mt.STYLE){let A=ib(e);return A!==null&&this.styles.push(A),null}else if(r.type===mt.STYLESHEET&&hN(r.hrefAttr))return this.styleUrls.push(r.hrefAttr),null;let s=aS(e.name),i=[],o=[],a=[],l=[],c=[],u={},h=[],d=[],g=!1;for(let A of e.attrs){let _=!1,U=Vf(A.name),ne=!1;if(A.i18n&&(u[A.name]=A.i18n),U.startsWith(Uf)){g&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",A.sourceSpan),ne=!0,g=!0;let ve=A.value,de=U.substring(Uf.length),ln=[],Yn=A.valueSpan?A.valueSpan.start.offset:A.sourceSpan.start.offset+A.name.length;this.bindingParser.parseInlineTemplateBinding(de,ve,A.sourceSpan,Yn,[],h,ln,!0),d.push(...ln.map(xt=>new ct(xt.name,xt.value,xt.sourceSpan,xt.keySpan,xt.valueSpan)))}else _=this.parseAttribute(s,A,[],i,o,a,l);!_&&!ne&&c.push(this.visitAttribute(A))}let y;r.nonBindable?y=Ee(sb,e.children).flat(1/0):y=Ee(this,e.children,e.children);let C;if(r.type===mt.NG_CONTENT){let A=r.selectAttr,_=e.attrs.map(U=>this.visitAttribute(U));C=new fr(A,_,y,e.sourceSpan,e.i18n),this.ngContentSelectors.push(A)}else if(s){let A=this.extractAttributes(e.name,i,u);C=new se(e.name,c,A.bound,o,[],y,l,a,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}else{let A=this.extractAttributes(e.name,i,u);C=new oe(e.name,c,A.bound,o,y,l,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,e.i18n)}if(g){let A=this.extractAttributes("ng-template",h,u),_=[];A.literal.forEach(de=>_.push(de)),A.bound.forEach(de=>_.push(de));let U=C instanceof oe?{attributes:C.attributes,inputs:C.inputs,outputs:C.outputs}:{attributes:[],inputs:[],outputs:[]},ne=s&&n?void 0:e.i18n,ve=C instanceof se?null:C.name;C=new se(ve,U.attributes,U.inputs,U.outputs,_,[C],[],d,e.sourceSpan,e.startSourceSpan,e.endSourceSpan,ne)}return n&&(this.inI18nBlock=!1),C}visitAttribute(e){return new Dt(e.name,e.value,e.sourceSpan,e.keySpan,e.valueSpan,e.i18n)}visitText(e){return this.processedNodes.has(e)?null:this._visitTextWithInterpolation(e.value,e.sourceSpan,e.tokens,e.i18n)}visitExpansion(e){if(!e.i18n)return null;if(!Wc(e.i18n))throw new Error(`Invalid type "${e.i18n.constructor}" for "i18n" property of ${e.sourceSpan.toString()}. Expected a "Message"`);let n=e.i18n,r={},s={};return Object.keys(n.placeholders).forEach(i=>{let o=n.placeholders[i];if(i.startsWith(uS)){let a=i.trim(),l=this.bindingParser.parseInterpolationExpression(o.text,o.sourceSpan);r[a]=new Fn(l,o.sourceSpan)}else s[i]=this._visitTextWithInterpolation(o.text,o.sourceSpan,null)}),new Ps(r,s,e.sourceSpan,n)}visitExpansionCase(e){return null}visitComment(e){return this.options.collectCommentNodes&&this.commentNodes.push(new Rs(e.value||"",e.sourceSpan)),null}visitLetDeclaration(e,n){let r=this.bindingParser.parseBinding(e.value,!1,e.valueSpan,e.valueSpan.start.offset);return r.errors.length===0&&r.ast instanceof Ue&&this.reportError("@let declaration value cannot be empty",e.valueSpan),new yt(e.name,r,e.sourceSpan,e.nameSpan,e.valueSpan)}visitBlockParameter(){return null}visitBlock(e,n){let r=Array.isArray(n)?n.indexOf(e):-1;if(r===-1)throw new Error("Visitor invoked incorrectly. Expecting visitBlock to be invoked siblings array as its context");if(this.processedNodes.has(e))return null;let s=null;switch(e.name){case"defer":s=XN(e,this.findConnectedBlocks(r,n,Qc),this,this.bindingParser);break;case"switch":s=_N(e,this,this.bindingParser);break;case"for":s=DN(e,this.findConnectedBlocks(r,n,Df),this,this.bindingParser);break;case"if":s=bN(e,this.findConnectedBlocks(r,n,_f),this,this.bindingParser);break;default:let i;Qc(e.name)?(i=`@${e.name} block can only be used after an @defer block.`,this.processedNodes.add(e)):Df(e.name)?(i=`@${e.name} block can only be used after an @for block.`,this.processedNodes.add(e)):_f(e.name)?(i=`@${e.name} block can only be used after an @if or @else if block.`,this.processedNodes.add(e)):i=`Unrecognized block @${e.name}.`,s={node:new Jo(e.name,e.sourceSpan,e.nameSpan),errors:[new q(e.sourceSpan,i)]};break}return this.errors.push(...s.errors),s.node}findConnectedBlocks(e,n,r){let s=[];for(let i=e+1;i<n.length;i++){let o=n[i];if(!(o instanceof Yi)){if(o instanceof Xr&&o.value.trim().length===0){this.processedNodes.add(o);continue}if(!(o instanceof Ft)||!r(o.name))break;s.push(o),this.processedNodes.add(o)}}return s}extractAttributes(e,n,r){let s=[],i=[];return n.forEach(o=>{let a=r[o.name];if(o.isLiteral)i.push(new Dt(o.name,o.expression.source||"",o.sourceSpan,o.keySpan,o.valueSpan,a));else{let l=this.bindingParser.createBoundElementProperty(e,o,!0,!1);s.push(_t.fromBoundElementProperty(l,a))}}),{bound:s,literal:i}}parseAttribute(e,n,r,s,i,o,a){let l=Vf(n.name),c=n.value,u=n.sourceSpan,h=n.valueSpan?n.valueSpan.start.offset:u.start.offset;function d(_,U,ne){let ve=n.name.length-l.length,de=_.start.moveBy(U.length+ve),ln=de.moveBy(ne.length);return new V(de,ln,de,ne)}let g=l.match(tb);if(g){if(g[Lf]!=null){let _=g[si],U=d(u,g[Lf],_);this.bindingParser.parsePropertyBinding(_,c,!1,!1,u,h,n.valueSpan,r,s,U)}else if(g[Of])if(e){let _=g[si],U=d(u,g[Of],_);this.parseVariable(_,c,u,U,n.valueSpan,o)}else this.reportError('"let-" is only supported on ng-template elements.',u);else if(g[Ff]){let _=g[si],U=d(u,g[Ff],_);this.parseReference(_,c,u,U,n.valueSpan,a)}else if(g[Bf]){let _=[],U=g[si],ne=d(u,g[Bf],U);this.bindingParser.parseEvent(U,c,!1,u,n.valueSpan||u,r,_,ne),Dl(_,i)}else if(g[$f]){let _=g[si],U=d(u,g[$f],_);this.bindingParser.parsePropertyBinding(_,c,!1,!0,u,h,n.valueSpan,r,s,U),this.parseAssignmentEvent(_,c,u,n.valueSpan,r,i,U)}else if(g[nb]){let _=d(u,"",l);this.bindingParser.parseLiteralAttr(l,c,u,h,n.valueSpan,r,s,_)}return!0}let y=null;if(l.startsWith(Jn.BANANA_BOX.start)?y=Jn.BANANA_BOX:l.startsWith(Jn.PROPERTY.start)?y=Jn.PROPERTY:l.startsWith(Jn.EVENT.start)&&(y=Jn.EVENT),y!==null&&l.endsWith(y.end)&&l.length>y.start.length+y.end.length){let _=l.substring(y.start.length,l.length-y.end.length),U=d(u,y.start,_);if(y.start===Jn.BANANA_BOX.start)this.bindingParser.parsePropertyBinding(_,c,!1,!0,u,h,n.valueSpan,r,s,U),this.parseAssignmentEvent(_,c,u,n.valueSpan,r,i,U);else if(y.start===Jn.PROPERTY.start)this.bindingParser.parsePropertyBinding(_,c,!1,!1,u,h,n.valueSpan,r,s,U);else{let ne=[];this.bindingParser.parseEvent(_,c,!1,u,n.valueSpan||u,r,ne,U),Dl(ne,i)}return!0}let C=d(u,"",l);return this.bindingParser.parsePropertyInterpolation(l,c,u,n.valueSpan,r,s,C,n.valueTokens??null)}_visitTextWithInterpolation(e,n,r,s){let i=dm(e),o=this.bindingParser.parseInterpolation(i,n,r);return o?new Fn(o,n,s):new Kt(i,n)}parseVariable(e,n,r,s,i,o){e.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',r):e.length===0&&this.reportError("Variable does not have a name",r),o.push(new ct(e,n,r,s,i))}parseReference(e,n,r,s,i,o){e.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',r):e.length===0?this.reportError("Reference does not have a name",r):o.some(a=>a.name===e)&&this.reportError(`Reference "#${e}" is defined more than once`,r),o.push(new Sn(e,n,r,s,i))}parseAssignmentEvent(e,n,r,s,i,o,a){let l=[];this.bindingParser.parseEvent(`${e}Change`,n,!0,r,s||r,i,l,a),Dl(l,o)}reportError(e,n,r=bn.ERROR){this.errors.push(new q(n,e,r))}},Zc=class{visitElement(e){let n=gm(e);if(n.type===mt.SCRIPT||n.type===mt.STYLE||n.type===mt.STYLESHEET)return null;let r=Ee(this,e.children,null);return new oe(e.name,Ee(this,e.attrs),[],[],r,[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan)}visitComment(e){return null}visitAttribute(e){return new Dt(e.name,e.value,e.sourceSpan,e.keySpan,e.valueSpan,e.i18n)}visitText(e){return new Kt(e.value,e.sourceSpan)}visitExpansion(e){return null}visitExpansionCase(e){return null}visitBlock(e,n){let r=[new Kt(e.startSourceSpan.toString(),e.startSourceSpan),...Ee(this,e.children)];return e.endSourceSpan!==null&&r.push(new Kt(e.endSourceSpan.toString(),e.endSourceSpan)),r}visitBlockParameter(e,n){return null}visitLetDeclaration(e,n){return new Kt(`@let ${e.name} = ${e.value};`,e.sourceSpan)}},sb=new Zc;function Vf(t){return/^data-/i.test(t)?t.substring(5):t}function Dl(t,e){e.push(...t.map(n=>Bn.fromParsedEvent(n)))}function ib(t){return t.children.length!==1||!(t.children[0]instanceof Xr)?null:t.children[0].value}var ob=[" ",`
|
|
27
27
|
`,"\r"," "];function Sm(t,e,n={}){let{interpolationConfig:r,preserveWhitespaces:s,enableI18nLegacyMessageIdFormat:i,allowInvalidAssignmentEvents:o}=n,a=Ws(r,o),c=new Da().parse(t,e,{leadingTriviaChars:ob,...n,tokenizeExpansionForms:!0,tokenizeBlocks:n.enableBlockSyntax??!0,tokenizeLet:n.enableLetSyntax??!0});if(!n.alwaysAttemptHtmlToR3AstConversion&&c.errors&&c.errors.length>0){let ve={interpolationConfig:r,preserveWhitespaces:s,errors:c.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return n.collectCommentNodes&&(ve.commentNodes=[]),ve}let u=c.rootNodes,h=new Ca(r,!s,i),d=h.visitAllWithErrors(u);if(!n.alwaysAttemptHtmlToR3AstConversion&&d.errors&&d.errors.length>0){let ve={interpolationConfig:r,preserveWhitespaces:s,errors:d.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return n.collectCommentNodes&&(ve.commentNodes=[]),ve}u=d.rootNodes,s||(u=Ee(new Kc,u),h.hasI18nMeta&&(u=Ee(new Ca(r,!1),u)));let{nodes:g,errors:y,styleUrls:C,styles:A,ngContentSelectors:_,commentNodes:U}=rb(u,a,{collectCommentNodes:!!n.collectCommentNodes});y.push(...c.errors,...d.errors);let ne={interpolationConfig:r,preserveWhitespaces:s,errors:y.length>0?y:null,nodes:g,styleUrls:C,styles:A,ngContentSelectors:_};return n.collectCommentNodes&&(ne.commentNodes=U),ne}var ab=new sn;function Ws(t=Bt,e=!1){return new zc(new ya(new Xi),t,ab,[],e)}var wm="%COMP%",lb=`_nghost-${wm}`,cb=`_ngcontent-${wm}`;function Tm(t,e,n){let r=new gr,s=cu(t.selector);return r.set("type",t.type.value),s.length>0&&r.set("selectors",ms(s)),t.queries.length>0&&r.set("contentQueries",nN(t.queries,e,t.name)),t.viewQueries.length&&r.set("viewQuery",tN(t.viewQueries,e,t.name)),r.set("hostBindings",mb(t.host,t.typeSourceSpan,n,e,t.selector||"",t.name,r)),r.set("inputs",Sh(t.inputs,!0)),r.set("outputs",Sh(t.outputs)),t.exportAs!==null&&r.set("exportAs",ie(t.exportAs.map(i=>v(i)))),t.isStandalone&&r.set("standalone",v(!0)),t.isSignal&&r.set("signals",v(!0)),r}function xm(t,e){let n=[],r=e.providers,s=e.viewProviders,i=Object.keys(e.inputs);if(r||s){let o=[r||new at([])];s&&o.push(s),n.push(L(f.ProvidersFeature).callFn(o))}for(let o of i)if(e.inputs[o].transformFunction!==null){n.push(L(f.InputTransformsFeatureFeature));break}e.hostDirectives?.length&&n.push(L(f.HostDirectivesFeature).callFn([vb(e.hostDirectives)])),e.usesInheritance&&n.push(L(f.InheritDefinitionFeature)),e.fullInheritance&&n.push(L(f.CopyDefinitionFeature)),e.lifecycle.usesOnChanges&&n.push(L(f.NgOnChangesFeature)),e.hasOwnProperty("template")&&e.isStandalone&&n.push(L(f.StandaloneFeature)),n.length&&t.set("features",ie(n))}function Cm(t,e,n){let r=Tm(t,e,n);xm(r,t);let s=L(f.defineDirective).callFn([r.toLiteralMap()],void 0,!0),i=db(t);return{expression:s,type:i,statements:[]}}function Im(t,e,n){let r=Tm(t,e,n);xm(r,t);let s=t.selector&&Yt.parse(t.selector),i=s&&s[0];if(i){let d=i.getAttrs();d.length&&r.set("attrs",e.getConstLiteral(ie(d.map(g=>g!=null?v(g):v(void 0))),!0))}let o=t.name,a=null;if(t.defer.mode===1&&t.defer.dependenciesFn!==null){let d=`${o}_DeferFn`;e.statements.push(new ze(d,t.defer.dependenciesFn,void 0,De.Final)),a=W(d)}let l=MA(t.name,t.template.nodes,e,t.relativeContextFilePath,t.i18nUseExternalIds,t.defer,a);tm(l,N.Tmpl);let c=RA(l,e);if(l.contentSelectors!==null&&r.set("ngContentSelectors",l.contentSelectors),r.set("decls",v(l.root.decls)),r.set("vars",v(l.root.vars)),l.consts.length>0&&(l.constsInitializers.length>0?r.set("consts",en([],[...l.constsInitializers,new Je(ie(l.consts))])):r.set("consts",ie(l.consts))),r.set("template",c),t.declarationListEmitMode!==3&&t.declarations.length>0)r.set("dependencies",pb(ie(t.declarations.map(d=>d.type)),t.declarationListEmitMode));else if(t.declarationListEmitMode===3){let d=[t.type.value];t.rawImports&&d.push(t.rawImports),r.set("dependencies",L(f.getComponentDepsFactory).callFn(d))}if(t.encapsulation===null&&(t.encapsulation=un.Emulated),t.styles&&t.styles.length){let g=(t.encapsulation==un.Emulated?yb(t.styles,cb,lb):t.styles).reduce((y,C)=>(C.trim().length>0&&y.push(e.getConstLiteral(v(C))),y),[]);g.length>0&&r.set("styles",ie(g))}else t.encapsulation===un.Emulated&&(t.encapsulation=un.None);t.encapsulation!==un.Emulated&&r.set("encapsulation",v(t.encapsulation)),t.animations!==null&&r.set("data",Xe([{key:"animation",value:t.animations,quoted:!1}])),t.changeDetection!==null&&(typeof t.changeDetection=="number"&&t.changeDetection!==Lo.Default?r.set("changeDetection",v(t.changeDetection)):typeof t.changeDetection=="object"&&r.set("changeDetection",t.changeDetection));let u=L(f.defineComponent).callFn([r.toLiteralMap()],void 0,!0),h=ub(t);return{expression:u,type:h,statements:[]}}function ub(t){let e=Am(t);return e.push(tu(t.template.ngContentSelectors)),e.push(Fe(v(t.isStandalone))),e.push(Dm(t)),t.isSignal&&e.push(Fe(v(t.isSignal))),Fe(L(f.ComponentDeclaration,e))}function pb(t,e){switch(e){case 0:return t;case 1:return en([],t);case 2:let n=t.prop("map").callFn([L(f.resolveForwardRef)]);return en([],n);case 3:throw new Error("Unsupported with an array of pre-resolved dependencies")}}function hb(t){return Fe(v(t))}function eu(t){let e=Object.keys(t).map(n=>{let r=Array.isArray(t[n])?t[n][0]:t[n];return{key:n,value:v(r),quoted:!0}});return Xe(e)}function tu(t){return t.length>0?Fe(ie(t.map(e=>v(e)))):Jt}function Am(t){let e=t.selector!==null?t.selector.replace(/\n/g,""):null;return[Pa(t.type.type,t.typeArgumentCount),e!==null?hb(e):Jt,t.exportAs!==null?tu(t.exportAs):Jt,Fe(fb(t)),Fe(eu(t.outputs)),tu(t.queries.map(n=>n.propertyName))]}function fb(t){return Xe(Object.keys(t.inputs).map(e=>{let n=t.inputs[e],r=[{key:"alias",value:v(n.bindingPropertyName),quoted:!0},{key:"required",value:v(n.required),quoted:!0}];return n.isSignal&&r.push({key:"isSignal",value:v(n.isSignal),quoted:!0}),{key:e,value:Xe(r),quoted:!0}}))}function db(t){let e=Am(t);return e.push(Jt),e.push(Fe(v(t.isStandalone))),e.push(Dm(t)),t.isSignal&&e.push(Fe(v(t.isSignal))),Fe(L(f.DirectiveDeclaration,e))}function mb(t,e,n,r,s,i,o){let a=n.createBoundHostProperties(t.properties,e),l=n.createDirectiveHostEventAsts(t.listeners,e);t.specialAttributes.styleAttr&&(t.attributes.style=v(t.specialAttributes.styleAttr)),t.specialAttributes.classAttr&&(t.attributes.class=v(t.specialAttributes.classAttr));let c=LA({componentName:i,componentSelector:s,properties:a,events:l,attributes:t.attributes},n,r);tm(c,N.Host),o.set("hostAttrs",c.root.attributes);let u=c.root.vars;return u!==null&&u>0&&o.set("hostVars",v(u)),kA(c)}var gb=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;function Nm(t){let e={},n={},r={},s={};for(let i of Object.keys(t)){let o=t[i],a=i.match(gb);if(a===null)switch(i){case"class":if(typeof o!="string")throw new Error("Class binding must be string");s.classAttr=o;break;case"style":if(typeof o!="string")throw new Error("Style binding must be string");s.styleAttr=o;break;default:typeof o=="string"?e[i]=v(o):e[i]=o}else if(a[1]!=null){if(typeof o!="string")throw new Error("Property binding must be string");r[a[1]]=o}else if(a[2]!=null){if(typeof o!="string")throw new Error("Event binding must be string");n[a[2]]=o}}return{attributes:e,listeners:n,properties:r,specialAttributes:s}}function bm(t,e){let n=Ws();return n.createDirectiveHostEventAsts(t.listeners,e),n.createBoundHostProperties(t.properties,e),n.errors}function yb(t,e,n){let r=new hc;return t.map(s=>r.shimCssText(s,e,n))}function Dm(t){return t.hostDirectives?.length?Fe(ie(t.hostDirectives.map(e=>Xe([{key:"directive",value:to(e.directive.type),quoted:!1},{key:"inputs",value:eu(e.inputs||{}),quoted:!1},{key:"outputs",value:eu(e.outputs||{}),quoted:!1}])))):Jt}function vb(t){let e=[],n=!1;for(let r of t){if(!r.inputs&&!r.outputs)e.push(r.directive.type);else{let s=[{key:"directive",value:r.directive.type,quoted:!1}];if(r.inputs){let i=qf(r.inputs);i&&s.push({key:"inputs",value:i,quoted:!1})}if(r.outputs){let i=qf(r.outputs);i&&s.push({key:"outputs",value:i,quoted:!1})}e.push(Xe(s))}r.isForwardReference&&(n=!0)}return n?new Xt([],[new Je(ie(e))]):ie(e)}function qf(t){let e=[];for(let n in t)t.hasOwnProperty(n)&&e.push(v(n),v(t[n]));return e.length>0?ie(e):null}var Ra=class{constructor(e){this.directiveMatcher=e}bind(e){if(!e.template)throw new Error("Binding without a template not yet supported");let n=nu.apply(e.template),r=Eb(n),{directives:s,eagerDirectives:i,bindings:o,references:a}=ru.apply(e.template,this.directiveMatcher),{expressions:l,symbols:c,nestingLevel:u,usedPipes:h,eagerPipes:d,deferBlocks:g}=su.applyWithScope(e.template,n);return new iu(e,s,i,o,a,l,c,u,r,h,d,g)}},nu=class t{constructor(e,n){this.parentScope=e,this.rootNode=n,this.namedEntities=new Map,this.elementsInScope=new Set,this.childScopes=new Map,this.isDeferred=e!==null&&e.isDeferred?!0:n instanceof Un}static newRootScope(){return new t(null,null)}static apply(e){let n=t.newRootScope();return n.ingest(e),n}ingest(e){e instanceof se?(e.variables.forEach(n=>this.visitVariable(n)),e.children.forEach(n=>n.visit(this))):e instanceof _n?(e.expressionAlias!==null&&this.visitVariable(e.expressionAlias),e.children.forEach(n=>n.visit(this))):e instanceof En?(this.visitVariable(e.item),e.contextVariables.forEach(n=>this.visitVariable(n)),e.children.forEach(n=>n.visit(this))):e instanceof Li||e instanceof Oi||e instanceof Un||e instanceof Mi||e instanceof ki||e instanceof Pi||e instanceof fr?e.children.forEach(n=>n.visit(this)):e.forEach(n=>n.visit(this))}visitElement(e){e.references.forEach(n=>this.visitReference(n)),e.children.forEach(n=>n.visit(this)),this.elementsInScope.add(e)}visitTemplate(e){e.references.forEach(n=>this.visitReference(n)),this.ingestScopedNode(e)}visitVariable(e){this.maybeDeclare(e)}visitReference(e){this.maybeDeclare(e)}visitDeferredBlock(e){this.ingestScopedNode(e),e.placeholder?.visit(this),e.loading?.visit(this),e.error?.visit(this)}visitDeferredBlockPlaceholder(e){this.ingestScopedNode(e)}visitDeferredBlockError(e){this.ingestScopedNode(e)}visitDeferredBlockLoading(e){this.ingestScopedNode(e)}visitSwitchBlock(e){e.cases.forEach(n=>n.visit(this))}visitSwitchBlockCase(e){this.ingestScopedNode(e)}visitForLoopBlock(e){this.ingestScopedNode(e),e.empty?.visit(this)}visitForLoopBlockEmpty(e){this.ingestScopedNode(e)}visitIfBlock(e){e.branches.forEach(n=>n.visit(this))}visitIfBlockBranch(e){this.ingestScopedNode(e)}visitContent(e){this.ingestScopedNode(e)}visitLetDeclaration(e){this.maybeDeclare(e)}visitBoundAttribute(e){}visitBoundEvent(e){}visitBoundText(e){}visitText(e){}visitTextAttribute(e){}visitIcu(e){}visitDeferredTrigger(e){}visitUnknownBlock(e){}maybeDeclare(e){this.namedEntities.has(e.name)||this.namedEntities.set(e.name,e)}lookup(e){return this.namedEntities.has(e)?this.namedEntities.get(e):this.parentScope!==null?this.parentScope.lookup(e):null}getChildScope(e){let n=this.childScopes.get(e);if(n===void 0)throw new Error(`Assertion error: child scope for ${e} not found`);return n}ingestScopedNode(e){let n=new t(this,e);n.ingest(e),this.childScopes.set(e,n)}},ru=class t{constructor(e,n,r,s,i){this.matcher=e,this.directives=n,this.eagerDirectives=r,this.bindings=s,this.references=i,this.isInDeferBlock=!1}static apply(e,n){let r=new Map,s=new Map,i=new Map,o=[];return new t(n,r,o,s,i).ingest(e),{directives:r,eagerDirectives:o,bindings:s,references:i}}ingest(e){e.forEach(n=>n.visit(this))}visitElement(e){this.visitElementOrTemplate(e)}visitTemplate(e){this.visitElementOrTemplate(e)}visitElementOrTemplate(e){let n=du(e),r=[];this.matcher.match(n,(i,o)=>r.push(...o)),r.length>0&&(this.directives.set(e,r),this.isInDeferBlock||this.eagerDirectives.push(...r)),e.references.forEach(i=>{let o=null;if(i.value.trim()==="")o=r.find(a=>a.isComponent)||null;else if(o=r.find(a=>a.exportAs!==null&&a.exportAs.some(l=>l===i.value))||null,o===null)return;o!==null?this.references.set(i,{directive:o,node:e}):this.references.set(i,e)});let s=(i,o)=>{let a=r.find(c=>c[o].hasBindingPropertyName(i.name)),l=a!==void 0?a:e;this.bindings.set(i,l)};e.inputs.forEach(i=>s(i,"inputs")),e.attributes.forEach(i=>s(i,"inputs")),e instanceof se&&e.templateAttrs.forEach(i=>s(i,"inputs")),e.outputs.forEach(i=>s(i,"outputs")),e.children.forEach(i=>i.visit(this))}visitDeferredBlock(e){let n=this.isInDeferBlock;this.isInDeferBlock=!0,e.children.forEach(r=>r.visit(this)),this.isInDeferBlock=n,e.placeholder?.visit(this),e.loading?.visit(this),e.error?.visit(this)}visitDeferredBlockPlaceholder(e){e.children.forEach(n=>n.visit(this))}visitDeferredBlockError(e){e.children.forEach(n=>n.visit(this))}visitDeferredBlockLoading(e){e.children.forEach(n=>n.visit(this))}visitSwitchBlock(e){e.cases.forEach(n=>n.visit(this))}visitSwitchBlockCase(e){e.children.forEach(n=>n.visit(this))}visitForLoopBlock(e){e.item.visit(this),e.contextVariables.forEach(n=>n.visit(this)),e.children.forEach(n=>n.visit(this)),e.empty?.visit(this)}visitForLoopBlockEmpty(e){e.children.forEach(n=>n.visit(this))}visitIfBlock(e){e.branches.forEach(n=>n.visit(this))}visitIfBlockBranch(e){e.expressionAlias?.visit(this),e.children.forEach(n=>n.visit(this))}visitContent(e){e.children.forEach(n=>n.visit(this))}visitVariable(e){}visitReference(e){}visitTextAttribute(e){}visitBoundAttribute(e){}visitBoundEvent(e){}visitBoundAttributeOrEvent(e){}visitText(e){}visitBoundText(e){}visitIcu(e){}visitDeferredTrigger(e){}visitUnknownBlock(e){}visitLetDeclaration(e){}},su=class t extends hr{constructor(e,n,r,s,i,o,a,l,c){super(),this.bindings=e,this.symbols=n,this.usedPipes=r,this.eagerPipes=s,this.deferBlocks=i,this.nestingLevel=o,this.scope=a,this.rootNode=l,this.level=c,this.visitNode=u=>u.visit(this)}visit(e,n){e instanceof Te?e.visit(this,n):e.visit(this)}static applyWithScope(e,n){let r=new Map,s=new Map,i=new Map,o=new Set,a=new Set,l=e instanceof se?e:null,c=[];return new t(r,s,o,a,c,i,n,l,0).ingest(e),{expressions:r,symbols:s,nestingLevel:i,usedPipes:o,eagerPipes:a,deferBlocks:c}}ingest(e){if(e instanceof se)e.variables.forEach(this.visitNode),e.children.forEach(this.visitNode),this.nestingLevel.set(e,this.level);else if(e instanceof _n)e.expressionAlias!==null&&this.visitNode(e.expressionAlias),e.children.forEach(this.visitNode),this.nestingLevel.set(e,this.level);else if(e instanceof En)this.visitNode(e.item),e.contextVariables.forEach(n=>this.visitNode(n)),e.trackBy.visit(this),e.children.forEach(this.visitNode),this.nestingLevel.set(e,this.level);else if(e instanceof Un){if(this.scope.rootNode!==e)throw new Error(`Assertion error: resolved incorrect scope for deferred block ${e}`);this.deferBlocks.push([e,this.scope]),e.children.forEach(n=>n.visit(this)),this.nestingLevel.set(e,this.level)}else e instanceof Li||e instanceof Oi||e instanceof Mi||e instanceof ki||e instanceof Pi||e instanceof fr?(e.children.forEach(n=>n.visit(this)),this.nestingLevel.set(e,this.level)):e.forEach(this.visitNode)}visitElement(e){e.inputs.forEach(this.visitNode),e.outputs.forEach(this.visitNode),e.children.forEach(this.visitNode),e.references.forEach(this.visitNode)}visitTemplate(e){e.inputs.forEach(this.visitNode),e.outputs.forEach(this.visitNode),e.templateAttrs.forEach(this.visitNode),e.references.forEach(this.visitNode),this.ingestScopedNode(e)}visitVariable(e){this.rootNode!==null&&this.symbols.set(e,this.rootNode)}visitReference(e){this.rootNode!==null&&this.symbols.set(e,this.rootNode)}visitText(e){}visitTextAttribute(e){}visitUnknownBlock(e){}visitDeferredTrigger(){}visitIcu(e){Object.keys(e.vars).forEach(n=>e.vars[n].visit(this)),Object.keys(e.placeholders).forEach(n=>e.placeholders[n].visit(this))}visitBoundAttribute(e){e.value.visit(this)}visitBoundEvent(e){e.handler.visit(this)}visitDeferredBlock(e){this.ingestScopedNode(e),e.triggers.when?.value.visit(this),e.prefetchTriggers.when?.value.visit(this),e.placeholder&&this.visitNode(e.placeholder),e.loading&&this.visitNode(e.loading),e.error&&this.visitNode(e.error)}visitDeferredBlockPlaceholder(e){this.ingestScopedNode(e)}visitDeferredBlockError(e){this.ingestScopedNode(e)}visitDeferredBlockLoading(e){this.ingestScopedNode(e)}visitSwitchBlock(e){e.expression.visit(this),e.cases.forEach(this.visitNode)}visitSwitchBlockCase(e){e.expression?.visit(this),this.ingestScopedNode(e)}visitForLoopBlock(e){e.expression.visit(this),this.ingestScopedNode(e),e.empty?.visit(this)}visitForLoopBlockEmpty(e){this.ingestScopedNode(e)}visitIfBlock(e){e.branches.forEach(n=>n.visit(this))}visitIfBlockBranch(e){e.expression?.visit(this),this.ingestScopedNode(e)}visitContent(e){this.ingestScopedNode(e)}visitBoundText(e){e.value.visit(this)}visitLetDeclaration(e){e.value.visit(this),this.rootNode!==null&&this.symbols.set(e,this.rootNode)}visitPipe(e,n){return this.usedPipes.add(e.name),this.scope.isDeferred||this.eagerPipes.add(e.name),super.visitPipe(e,n)}visitPropertyRead(e,n){return this.maybeMap(e,e.name),super.visitPropertyRead(e,n)}visitSafePropertyRead(e,n){return this.maybeMap(e,e.name),super.visitSafePropertyRead(e,n)}visitPropertyWrite(e,n){return this.maybeMap(e,e.name),super.visitPropertyWrite(e,n)}ingestScopedNode(e){let n=this.scope.getChildScope(e);new t(this.bindings,this.symbols,this.usedPipes,this.eagerPipes,this.deferBlocks,this.nestingLevel,n,e,this.level+1).ingest(e)}maybeMap(e,n){if(!(e.receiver instanceof Be))return;let r=this.scope.lookup(n);r instanceof yt&&e.receiver instanceof fn||r!==null&&this.bindings.set(e,r)}},iu=class{constructor(e,n,r,s,i,o,a,l,c,u,h,d){this.target=e,this.directives=n,this.eagerDirectives=r,this.bindings=s,this.references=i,this.exprTargets=o,this.symbols=a,this.nestingLevel=l,this.scopedNodeEntities=c,this.usedPipes=u,this.eagerPipes=h,this.deferredBlocks=d.map(g=>g[0]),this.deferredScopes=new Map(d)}getEntitiesInScope(e){return this.scopedNodeEntities.get(e)??new Set}getDirectivesOfNode(e){return this.directives.get(e)||null}getReferenceTarget(e){return this.references.get(e)||null}getConsumerOfBinding(e){return this.bindings.get(e)||null}getExpressionTarget(e){return this.exprTargets.get(e)||null}getDefinitionNodeOfSymbol(e){return this.symbols.get(e)||null}getNestingLevel(e){return this.nestingLevel.get(e)||0}getUsedDirectives(){let e=new Set;return this.directives.forEach(n=>n.forEach(r=>e.add(r))),Array.from(e.values())}getEagerlyUsedDirectives(){let e=new Set(this.eagerDirectives);return Array.from(e.values())}getUsedPipes(){return Array.from(this.usedPipes)}getEagerlyUsedPipes(){return Array.from(this.eagerPipes)}getDeferBlocks(){return this.deferredBlocks}getDeferredTriggerTarget(e,n){if(!(n instanceof Yo)&&!(n instanceof Qo)&&!(n instanceof Xo))return null;let r=n.reference;if(r===null){let i=null;if(e.placeholder!==null){for(let o of e.placeholder.children)if(!(o instanceof Rs)){if(i!==null)return null;o instanceof oe&&(i=o)}}return i}let s=this.findEntityInScope(e,r);if(s instanceof Sn&&this.getDefinitionNodeOfSymbol(s)!==e){let i=this.getReferenceTarget(s);if(i!==null)return this.referenceTargetToElement(i)}if(e.placeholder!==null){let i=this.findEntityInScope(e.placeholder,r),o=i instanceof Sn?this.getReferenceTarget(i):null;if(o!==null)return this.referenceTargetToElement(o)}return null}isDeferred(e){for(let n of this.deferredBlocks){if(!this.deferredScopes.has(n))continue;let r=[this.deferredScopes.get(n)];for(;r.length>0;){let s=r.pop();if(s.elementsInScope.has(e))return!0;r.push(...s.childScopes.values())}}return!1}findEntityInScope(e,n){let r=this.getEntitiesInScope(e);for(let s of r)if(s.name===n)return s;return null}referenceTargetToElement(e){return e instanceof oe?e:e instanceof se?null:this.referenceTargetToElement(e.node)}};function Eb(t){let e=new Map;function n(i){if(e.has(i.rootNode))return e.get(i.rootNode);let o=i.namedEntities,a;return i.parentScope!==null?a=new Map([...n(i.parentScope),...o]):a=new Map(o),e.set(i.rootNode,a),a}let r=[t];for(;r.length>0;){let i=r.pop();for(let o of i.childScopes.values())r.push(o);n(i)}let s=new Map;for(let[i,o]of e)s.set(i,new Set(o.values()));return s}var ou=class{},au=class{constructor(e=new ac){this.jitEvaluator=e,this.FactoryTarget=nt,this.ResourceLoader=ou,this.elementSchemaRegistry=new sn}compilePipe(e,n,r){let s={name:r.name,type:Me(r.type),typeArgumentCount:0,deps:null,pipeName:r.pipeName,pure:r.pure,isStandalone:r.isStandalone},i=pc(s);return this.jitExpression(i.expression,e,n,[])}compilePipeDeclaration(e,n,r){let s=Ob(r),i=pc(s);return this.jitExpression(i.expression,e,n,[])}compileInjectable(e,n,r){let{expression:s,statements:i}=sc({name:r.name,type:Me(r.type),typeArgumentCount:r.typeArgumentCount,providedIn:zf(r.providedIn),useClass:us(r,"useClass"),useFactory:Kf(r,"useFactory"),useValue:us(r,"useValue"),useExisting:us(r,"useExisting"),deps:r.deps?.map(Pm)},!0);return this.jitExpression(s,e,n,i)}compileInjectableDeclaration(e,n,r){let{expression:s,statements:i}=sc({name:r.type.name,type:Me(r.type),typeArgumentCount:0,providedIn:zf(r.providedIn),useClass:us(r,"useClass"),useFactory:Kf(r,"useFactory"),useValue:us(r,"useValue"),useExisting:us(r,"useExisting"),deps:r.deps?.map(Xf)},!0);return this.jitExpression(s,e,n,i)}compileInjector(e,n,r){let s={name:r.name,type:Me(r.type),providers:r.providers&&r.providers.length>0?new $(r.providers):null,imports:r.imports.map(o=>new $(o))},i=cc(s);return this.jitExpression(i.expression,e,n,[])}compileInjectorDeclaration(e,n,r){let s=Fb(r),i=cc(s);return this.jitExpression(i.expression,e,n,[])}compileNgModule(e,n,r){let s={kind:hn.Global,type:Me(r.type),bootstrap:r.bootstrap.map(Me),declarations:r.declarations.map(Me),publicDeclarationTypes:null,imports:r.imports.map(Me),includeImportTypes:!0,exports:r.exports.map(Me),selectorScopeMode:Ls.Inline,containsForwardDecls:!1,schemas:r.schemas?r.schemas.map(Me):null,id:r.id?new $(r.id):null},i=bd(s);return this.jitExpression(i.expression,e,n,[])}compileNgModuleDeclaration(e,n,r){let s=FS(r);return this.jitExpression(s,e,n,[])}compileDirective(e,n,r){let s=Wf(r);return this.compileDirectiveFromMeta(e,n,s)}compileDirectiveDeclaration(e,n,r){let s=this.createParseSourceSpan("Directive",r.type.name,n),i=Rm(r,s);return this.compileDirectiveFromMeta(e,n,i)}compileDirectiveFromMeta(e,n,r){let s=new Ci,i=Ws(),o=Cm(r,s,i);return this.jitExpression(o.expression,e,n,s.statements)}compileComponent(e,n,r){let{template:s,interpolation:i,defer:o}=km(r.template,r.name,n,r.preserveWhitespaces,r.interpolation,void 0),a={...r,...Wf(r),selector:r.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:s,declarations:r.declarations.map(xb),declarationListEmitMode:0,defer:o,styles:[...r.styles,...s.styles],encapsulation:r.encapsulation,interpolation:i,changeDetection:r.changeDetection??null,animations:r.animations!=null?new $(r.animations):null,viewProviders:r.viewProviders!=null?new $(r.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0},l=`ng:///${r.name}.js`;return this.compileComponentFromMeta(e,l,a)}compileComponentDeclaration(e,n,r){let s=this.createParseSourceSpan("Component",r.type.name,n),i=Tb(r,s,n);return this.compileComponentFromMeta(e,n,i)}compileComponentFromMeta(e,n,r){let s=new Ci,i=Ws(r.interpolation),o=Im(r,s,i);return this.jitExpression(o.expression,e,n,s.statements)}compileFactory(e,n,r){let s=tr({name:r.name,type:Me(r.type),typeArgumentCount:r.typeArgumentCount,deps:Ab(r.deps),target:r.target});return this.jitExpression(s.expression,e,n,s.statements)}compileFactoryDeclaration(e,n,r){let s=tr({name:r.type.name,type:Me(r.type),typeArgumentCount:0,deps:Array.isArray(r.deps)?r.deps.map(Xf):r.deps,target:r.target});return this.jitExpression(s.expression,e,n,s.statements)}createParseSourceSpan(e,n,r){return _S(e,n,r)}jitExpression(e,n,r,s){let i=[...s,new ze("$def",e,void 0,De.Exported)];return this.jitEvaluator.evaluateStatements(r,i,new uc(n),!0).$def}};function Gf(t){return{...t,isSignal:t.isSignal,predicate:_m(t.predicate),read:t.read?new $(t.read):null,static:t.static,emitDistinctChangesOnly:t.emitDistinctChangesOnly}}function Hf(t){return{propertyName:t.propertyName,first:t.first??!1,predicate:_m(t.predicate),descendants:t.descendants??!1,read:t.read?new $(t.read):null,static:t.static??!1,emitDistinctChangesOnly:t.emitDistinctChangesOnly??!0,isSignal:!!t.isSignal}}function _m(t){return Array.isArray(t)?t:Qr(new $(t),1)}function Wf(t){let e=Lb(t.inputs||[]),n=Rl(t.outputs||[]),r=t.propMetadata,s={},i={};for(let a in r)r.hasOwnProperty(a)&&r[a].forEach(l=>{Rb(l)?s[a]={bindingPropertyName:l.alias||a,classPropertyName:a,required:l.required||!1,isSignal:!!l.isSignal,transformFunction:l.transform!=null?new $(l.transform):null}:kb(l)&&(i[a]=l.alias||a)});let o=t.hostDirectives?.length?t.hostDirectives.map(a=>typeof a=="function"?{directive:Me(a),inputs:null,outputs:null,isForwardReference:!1}:{directive:Me(a.directive),isForwardReference:!1,inputs:a.inputs?Rl(a.inputs):null,outputs:a.outputs?Rl(a.outputs):null}):null;return{...t,typeArgumentCount:0,typeSourceSpan:t.typeSourceSpan,type:Me(t.type),deps:null,host:{...bb(t.propMetadata,t.typeSourceSpan,t.host)},inputs:{...e,...s},outputs:{...n,...i},queries:t.queries.map(Gf),providers:t.providers!=null?new $(t.providers):null,viewQueries:t.viewQueries.map(Gf),fullInheritance:!1,hostDirectives:o}}function Rm(t,e){let n=t.hostDirectives?.length?t.hostDirectives.map(r=>({directive:Me(r.directive),isForwardReference:!1,inputs:r.inputs?jf(r.inputs):null,outputs:r.outputs?jf(r.outputs):null})):null;return{name:t.type.name,type:Me(t.type),typeSourceSpan:e,selector:t.selector??null,inputs:t.inputs?Pb(t.inputs):{},outputs:t.outputs??{},host:Sb(t.host),queries:(t.queries??[]).map(Hf),viewQueries:(t.viewQueries??[]).map(Hf),providers:t.providers!==void 0?new $(t.providers):null,exportAs:t.exportAs??null,usesInheritance:t.usesInheritance??!1,lifecycle:{usesOnChanges:t.usesOnChanges??!1},deps:null,typeArgumentCount:0,fullInheritance:!1,isStandalone:t.isStandalone??!1,isSignal:t.isSignal??!1,hostDirectives:n}}function Sb(t={}){return{attributes:wb(t.attributes??{}),listeners:t.listeners??{},properties:t.properties??{},specialAttributes:{classAttr:t.classAttribute,styleAttr:t.styleAttribute}}}function jf(t){let e=null;for(let n=1;n<t.length;n+=2)e=e||{},e[t[n-1]]=t[n];return e}function wb(t){let e={};for(let n of Object.keys(t))e[n]=new $(t[n]);return e}function Tb(t,e,n){let{template:r,interpolation:s,defer:i}=km(t.template,t.type.name,n,t.preserveWhitespaces??!1,t.interpolation,t.deferBlockDependencies),o=[];if(t.dependencies)for(let a of t.dependencies)switch(a.kind){case"directive":case"component":o.push(_l(a));break;case"pipe":o.push(Ib(a));break}else(t.components||t.directives||t.pipes)&&(t.components&&o.push(...t.components.map(a=>_l(a,!0))),t.directives&&o.push(...t.directives.map(a=>_l(a))),t.pipes&&o.push(...Cb(t.pipes)));return{...Rm(t,e),template:r,styles:t.styles??[],declarations:o,viewProviders:t.viewProviders!==void 0?new $(t.viewProviders):null,animations:t.animations!==void 0?new $(t.animations):null,defer:i,changeDetection:t.changeDetection??Lo.Default,encapsulation:t.encapsulation??un.Emulated,interpolation:s,declarationListEmitMode:2,relativeContextFilePath:"",i18nUseExternalIds:!0}}function xb(t){return{...t,type:new $(t.type)}}function _l(t,e=null){return{kind:Os.Directive,isComponent:e||t.kind==="component",selector:t.selector,type:new $(t.type),inputs:t.inputs??[],outputs:t.outputs??[],exportAs:t.exportAs??null}}function Cb(t){return t?Object.keys(t).map(e=>({kind:Os.Pipe,name:e,type:new $(t[e])})):[]}function Ib(t){return{kind:Os.Pipe,name:t.name,type:new $(t.type)}}function km(t,e,n,r,s,i){let o=s?Bi.fromArray(s):Bt,a=Sm(t,n,{preserveWhitespaces:r,interpolationConfig:o});if(a.errors!==null){let u=a.errors.map(h=>h.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${e}: ${u}`)}let c=new Ra(new or).bind({template:a.nodes});return{template:a,interpolation:o,defer:Nb(c,i)}}function us(t,e){if(t.hasOwnProperty(e))return Qr(new $(t[e]),0)}function Kf(t,e){if(t.hasOwnProperty(e))return new $(t[e])}function zf(t){let e=typeof t=="function"?new $(t):new xe(t??null);return Qr(e,0)}function Ab(t){return t==null?null:t.map(Pm)}function Pm(t){let e=t.attribute!=null,n=t.token===null?null:new $(t.token),r=e?new $(t.attribute):n;return Mm(r,e,t.host,t.optional,t.self,t.skipSelf)}function Xf(t){let e=t.attribute??!1,n=t.token===null?null:new $(t.token);return Mm(n,e,t.host??!1,t.optional??!1,t.self??!1,t.skipSelf??!1)}function Mm(t,e,n,r,s,i){let o=e?v("unknown"):null;return{token:t,attributeNameType:o,host:n,optional:r,self:s,skipSelf:i}}function Nb(t,e){let n=t.getDeferBlocks(),r=new Map;for(let s=0;s<n.length;s++){let i=e?.[s];r.set(n[s],i?new $(i):null)}return{mode:0,blocks:r}}function bb(t,e,n){let r=Nm(n||{}),s=bm(r,e);if(s.length)throw new Error(s.map(i=>i.msg).join(`
|
|
28
|
-
`));for(let i in t)t.hasOwnProperty(i)&&t[i].forEach(o=>{Db(o)?r.properties[o.hostPropertyName||i]=ud("this",i):_b(o)&&(r.listeners[o.eventName||i]=`${i}(${(o.args||[]).join(",")})`)});return r}function Db(t){return t.ngMetadataName==="HostBinding"}function _b(t){return t.ngMetadataName==="HostListener"}function Rb(t){return t.ngMetadataName==="Input"}function kb(t){return t.ngMetadataName==="Output"}function Pb(t){return Object.keys(t).reduce((e,n)=>{let r=t[n];return typeof r=="string"||Array.isArray(r)?e[n]=Mb(r):e[n]={bindingPropertyName:r.publicName,classPropertyName:n,transformFunction:r.transformFunction!==null?new $(r.transformFunction):null,required:r.isRequired,isSignal:r.isSignal},e},{})}function Mb(t){return typeof t=="string"?{bindingPropertyName:t,classPropertyName:t,transformFunction:null,required:!1,isSignal:!1}:{bindingPropertyName:t[0],classPropertyName:t[1],transformFunction:t[2]?new $(t[2]):null,required:!1,isSignal:!1}}function Lb(t){return t.reduce((e,n)=>{if(typeof n=="string"){let[r,s]=Lm(n);e[s]={bindingPropertyName:r,classPropertyName:s,required:!1,isSignal:!1,transformFunction:null}}else e[n.name]={bindingPropertyName:n.alias||n.name,classPropertyName:n.name,required:n.required||!1,isSignal:!1,transformFunction:n.transform!=null?new $(n.transform):null};return e},{})}function Rl(t){return t.reduce((e,n)=>{let[r,s]=Lm(n);return e[s]=r,e},{})}function Lm(t){let[e,n]=t.split(":",2).map(r=>r.trim());return[n??e,e]}function Ob(t){return{name:t.type.name,type:Me(t.type),typeArgumentCount:0,pipeName:t.name,deps:null,pure:t.pure??!0,isStandalone:t.isStandalone??!1}}function Fb(t){return{name:t.type.name,type:Me(t.type),providers:t.providers!==void 0&&t.providers.length>0?new $(t.providers):null,imports:t.imports!==void 0?t.imports.map(e=>new $(e)):[]}}function Bb(t){let e=t.ng||(t.ng={});e.\u0275compilerFacade=new au}var TM=new Ii("18.1.2");var Yf;(function(t){t[t.Extract=0]="Extract",t[t.Merge=1]="Merge"})(Yf||(Yf={}));var lu=class{constructor(){this.closedByParent=!1,this.implicitNamespacePrefix=null,this.isVoid=!1,this.ignoreFirstLf=!1,this.canSelfClose=!0,this.preventNamespaceInheritance=!1}requireExtraParent(e){return!1}isClosedByChild(e){return!1}getContentType(){return jt.PARSABLE_DATA}},xM=new lu;var Qf;(function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"})(Qf||(Qf={}));Bb(li);var nD=
|
|
28
|
+
`));for(let i in t)t.hasOwnProperty(i)&&t[i].forEach(o=>{Db(o)?r.properties[o.hostPropertyName||i]=ud("this",i):_b(o)&&(r.listeners[o.eventName||i]=`${i}(${(o.args||[]).join(",")})`)});return r}function Db(t){return t.ngMetadataName==="HostBinding"}function _b(t){return t.ngMetadataName==="HostListener"}function Rb(t){return t.ngMetadataName==="Input"}function kb(t){return t.ngMetadataName==="Output"}function Pb(t){return Object.keys(t).reduce((e,n)=>{let r=t[n];return typeof r=="string"||Array.isArray(r)?e[n]=Mb(r):e[n]={bindingPropertyName:r.publicName,classPropertyName:n,transformFunction:r.transformFunction!==null?new $(r.transformFunction):null,required:r.isRequired,isSignal:r.isSignal},e},{})}function Mb(t){return typeof t=="string"?{bindingPropertyName:t,classPropertyName:t,transformFunction:null,required:!1,isSignal:!1}:{bindingPropertyName:t[0],classPropertyName:t[1],transformFunction:t[2]?new $(t[2]):null,required:!1,isSignal:!1}}function Lb(t){return t.reduce((e,n)=>{if(typeof n=="string"){let[r,s]=Lm(n);e[s]={bindingPropertyName:r,classPropertyName:s,required:!1,isSignal:!1,transformFunction:null}}else e[n.name]={bindingPropertyName:n.alias||n.name,classPropertyName:n.name,required:n.required||!1,isSignal:!1,transformFunction:n.transform!=null?new $(n.transform):null};return e},{})}function Rl(t){return t.reduce((e,n)=>{let[r,s]=Lm(n);return e[s]=r,e},{})}function Lm(t){let[e,n]=t.split(":",2).map(r=>r.trim());return[n??e,e]}function Ob(t){return{name:t.type.name,type:Me(t.type),typeArgumentCount:0,pipeName:t.name,deps:null,pure:t.pure??!0,isStandalone:t.isStandalone??!1}}function Fb(t){return{name:t.type.name,type:Me(t.type),providers:t.providers!==void 0&&t.providers.length>0?new $(t.providers):null,imports:t.imports!==void 0?t.imports.map(e=>new $(e)):[]}}function Bb(t){let e=t.ng||(t.ng={});e.\u0275compilerFacade=new au}var TM=new Ii("18.1.2");var Yf;(function(t){t[t.Extract=0]="Extract",t[t.Merge=1]="Merge"})(Yf||(Yf={}));var lu=class{constructor(){this.closedByParent=!1,this.implicitNamespacePrefix=null,this.isVoid=!1,this.ignoreFirstLf=!1,this.canSelfClose=!0,this.preventNamespaceInheritance=!1}requireExtraParent(e){return!1}isClosedByChild(e){return!1}getContentType(){return jt.PARSABLE_DATA}},xM=new lu;var Qf;(function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"})(Qf||(Qf={}));Bb(li);var nD=T(require("typescript"),1),Va=T(require("typescript"),1),sD=T(require("typescript"),1),qa=T(require("typescript"),1),iD=T(require("typescript"),1),Re=T(require("typescript"),1),Ou=T(require("typescript"),1),Hn=T(require("typescript"),1),Jm=T(require("typescript"),1),Jr=T(require("typescript"),1);var me=T(require("typescript"),1);var pD=T(require("typescript"),1),hD=T(require("typescript"),1),ge=T(require("typescript"),1),AM=(0,Xm.createRequire)(P),Z;(function(t){t[t.DECORATOR_ARG_NOT_LITERAL=1001]="DECORATOR_ARG_NOT_LITERAL",t[t.DECORATOR_ARITY_WRONG=1002]="DECORATOR_ARITY_WRONG",t[t.DECORATOR_NOT_CALLED=1003]="DECORATOR_NOT_CALLED",t[t.DECORATOR_UNEXPECTED=1005]="DECORATOR_UNEXPECTED",t[t.DECORATOR_COLLISION=1006]="DECORATOR_COLLISION",t[t.VALUE_HAS_WRONG_TYPE=1010]="VALUE_HAS_WRONG_TYPE",t[t.VALUE_NOT_LITERAL=1011]="VALUE_NOT_LITERAL",t[t.INITIALIZER_API_WITH_DISALLOWED_DECORATOR=1050]="INITIALIZER_API_WITH_DISALLOWED_DECORATOR",t[t.INITIALIZER_API_DECORATOR_METADATA_COLLISION=1051]="INITIALIZER_API_DECORATOR_METADATA_COLLISION",t[t.INITIALIZER_API_NO_REQUIRED_FUNCTION=1052]="INITIALIZER_API_NO_REQUIRED_FUNCTION",t[t.INITIALIZER_API_DISALLOWED_MEMBER_VISIBILITY=1053]="INITIALIZER_API_DISALLOWED_MEMBER_VISIBILITY",t[t.INCORRECTLY_DECLARED_ON_STATIC_MEMBER=1100]="INCORRECTLY_DECLARED_ON_STATIC_MEMBER",t[t.COMPONENT_MISSING_TEMPLATE=2001]="COMPONENT_MISSING_TEMPLATE",t[t.PIPE_MISSING_NAME=2002]="PIPE_MISSING_NAME",t[t.PARAM_MISSING_TOKEN=2003]="PARAM_MISSING_TOKEN",t[t.DIRECTIVE_MISSING_SELECTOR=2004]="DIRECTIVE_MISSING_SELECTOR",t[t.UNDECORATED_PROVIDER=2005]="UNDECORATED_PROVIDER",t[t.DIRECTIVE_INHERITS_UNDECORATED_CTOR=2006]="DIRECTIVE_INHERITS_UNDECORATED_CTOR",t[t.UNDECORATED_CLASS_USING_ANGULAR_FEATURES=2007]="UNDECORATED_CLASS_USING_ANGULAR_FEATURES",t[t.COMPONENT_RESOURCE_NOT_FOUND=2008]="COMPONENT_RESOURCE_NOT_FOUND",t[t.COMPONENT_INVALID_SHADOW_DOM_SELECTOR=2009]="COMPONENT_INVALID_SHADOW_DOM_SELECTOR",t[t.COMPONENT_NOT_STANDALONE=2010]="COMPONENT_NOT_STANDALONE",t[t.COMPONENT_IMPORT_NOT_STANDALONE=2011]="COMPONENT_IMPORT_NOT_STANDALONE",t[t.COMPONENT_UNKNOWN_IMPORT=2012]="COMPONENT_UNKNOWN_IMPORT",t[t.HOST_DIRECTIVE_INVALID=2013]="HOST_DIRECTIVE_INVALID",t[t.HOST_DIRECTIVE_NOT_STANDALONE=2014]="HOST_DIRECTIVE_NOT_STANDALONE",t[t.HOST_DIRECTIVE_COMPONENT=2015]="HOST_DIRECTIVE_COMPONENT",t[t.INJECTABLE_INHERITS_INVALID_CONSTRUCTOR=2016]="INJECTABLE_INHERITS_INVALID_CONSTRUCTOR",t[t.HOST_DIRECTIVE_UNDEFINED_BINDING=2017]="HOST_DIRECTIVE_UNDEFINED_BINDING",t[t.HOST_DIRECTIVE_CONFLICTING_ALIAS=2018]="HOST_DIRECTIVE_CONFLICTING_ALIAS",t[t.HOST_DIRECTIVE_MISSING_REQUIRED_BINDING=2019]="HOST_DIRECTIVE_MISSING_REQUIRED_BINDING",t[t.CONFLICTING_INPUT_TRANSFORM=2020]="CONFLICTING_INPUT_TRANSFORM",t[t.COMPONENT_INVALID_STYLE_URLS=2021]="COMPONENT_INVALID_STYLE_URLS",t[t.COMPONENT_UNKNOWN_DEFERRED_IMPORT=2022]="COMPONENT_UNKNOWN_DEFERRED_IMPORT",t[t.SYMBOL_NOT_EXPORTED=3001]="SYMBOL_NOT_EXPORTED",t[t.IMPORT_CYCLE_DETECTED=3003]="IMPORT_CYCLE_DETECTED",t[t.IMPORT_GENERATION_FAILURE=3004]="IMPORT_GENERATION_FAILURE",t[t.CONFIG_FLAT_MODULE_NO_INDEX=4001]="CONFIG_FLAT_MODULE_NO_INDEX",t[t.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK=4002]="CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK",t[t.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES=4003]="CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES",t[t.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL=4004]="CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL",t[t.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK=4005]="CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK",t[t.HOST_BINDING_PARSE_ERROR=5001]="HOST_BINDING_PARSE_ERROR",t[t.TEMPLATE_PARSE_ERROR=5002]="TEMPLATE_PARSE_ERROR",t[t.NGMODULE_INVALID_DECLARATION=6001]="NGMODULE_INVALID_DECLARATION",t[t.NGMODULE_INVALID_IMPORT=6002]="NGMODULE_INVALID_IMPORT",t[t.NGMODULE_INVALID_EXPORT=6003]="NGMODULE_INVALID_EXPORT",t[t.NGMODULE_INVALID_REEXPORT=6004]="NGMODULE_INVALID_REEXPORT",t[t.NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC=6005]="NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC",t[t.NGMODULE_REEXPORT_NAME_COLLISION=6006]="NGMODULE_REEXPORT_NAME_COLLISION",t[t.NGMODULE_DECLARATION_NOT_UNIQUE=6007]="NGMODULE_DECLARATION_NOT_UNIQUE",t[t.NGMODULE_DECLARATION_IS_STANDALONE=6008]="NGMODULE_DECLARATION_IS_STANDALONE",t[t.NGMODULE_BOOTSTRAP_IS_STANDALONE=6009]="NGMODULE_BOOTSTRAP_IS_STANDALONE",t[t.WARN_NGMODULE_ID_UNNECESSARY=6100]="WARN_NGMODULE_ID_UNNECESSARY",t[t.SCHEMA_INVALID_ELEMENT=8001]="SCHEMA_INVALID_ELEMENT",t[t.SCHEMA_INVALID_ATTRIBUTE=8002]="SCHEMA_INVALID_ATTRIBUTE",t[t.MISSING_REFERENCE_TARGET=8003]="MISSING_REFERENCE_TARGET",t[t.MISSING_PIPE=8004]="MISSING_PIPE",t[t.WRITE_TO_READ_ONLY_VARIABLE=8005]="WRITE_TO_READ_ONLY_VARIABLE",t[t.DUPLICATE_VARIABLE_DECLARATION=8006]="DUPLICATE_VARIABLE_DECLARATION",t[t.SPLIT_TWO_WAY_BINDING=8007]="SPLIT_TWO_WAY_BINDING",t[t.MISSING_REQUIRED_INPUTS=8008]="MISSING_REQUIRED_INPUTS",t[t.ILLEGAL_FOR_LOOP_TRACK_ACCESS=8009]="ILLEGAL_FOR_LOOP_TRACK_ACCESS",t[t.INACCESSIBLE_DEFERRED_TRIGGER_ELEMENT=8010]="INACCESSIBLE_DEFERRED_TRIGGER_ELEMENT",t[t.CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION=8011]="CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION",t[t.DEFERRED_PIPE_USED_EAGERLY=8012]="DEFERRED_PIPE_USED_EAGERLY",t[t.DEFERRED_DIRECTIVE_USED_EAGERLY=8013]="DEFERRED_DIRECTIVE_USED_EAGERLY",t[t.DEFERRED_DEPENDENCY_IMPORTED_EAGERLY=8014]="DEFERRED_DEPENDENCY_IMPORTED_EAGERLY",t[t.ILLEGAL_LET_WRITE=8015]="ILLEGAL_LET_WRITE",t[t.LET_USED_BEFORE_DEFINITION=8016]="LET_USED_BEFORE_DEFINITION",t[t.CONFLICTING_LET_DECLARATION=8017]="CONFLICTING_LET_DECLARATION",t[t.INVALID_BANANA_IN_BOX=8101]="INVALID_BANANA_IN_BOX",t[t.NULLISH_COALESCING_NOT_NULLABLE=8102]="NULLISH_COALESCING_NOT_NULLABLE",t[t.MISSING_CONTROL_FLOW_DIRECTIVE=8103]="MISSING_CONTROL_FLOW_DIRECTIVE",t[t.TEXT_ATTRIBUTE_NOT_BINDING=8104]="TEXT_ATTRIBUTE_NOT_BINDING",t[t.MISSING_NGFOROF_LET=8105]="MISSING_NGFOROF_LET",t[t.SUFFIX_NOT_SUPPORTED=8106]="SUFFIX_NOT_SUPPORTED",t[t.OPTIONAL_CHAIN_NOT_NULLABLE=8107]="OPTIONAL_CHAIN_NOT_NULLABLE",t[t.SKIP_HYDRATION_NOT_STATIC=8108]="SKIP_HYDRATION_NOT_STATIC",t[t.INTERPOLATED_SIGNAL_NOT_INVOKED=8109]="INTERPOLATED_SIGNAL_NOT_INVOKED",t[t.UNSUPPORTED_INITIALIZER_API_USAGE=8110]="UNSUPPORTED_INITIALIZER_API_USAGE",t[t.UNINVOKED_FUNCTION_IN_EVENT_BINDING=8111]="UNINVOKED_FUNCTION_IN_EVENT_BINDING",t[t.INLINE_TCB_REQUIRED=8900]="INLINE_TCB_REQUIRED",t[t.INLINE_TYPE_CTOR_REQUIRED=8901]="INLINE_TYPE_CTOR_REQUIRED",t[t.INJECTABLE_DUPLICATE_PROV=9001]="INJECTABLE_DUPLICATE_PROV",t[t.SUGGEST_STRICT_TEMPLATES=10001]="SUGGEST_STRICT_TEMPLATES",t[t.SUGGEST_SUBOPTIMAL_TYPE_INFERENCE=10002]="SUGGEST_SUBOPTIMAL_TYPE_INFERENCE",t[t.LOCAL_COMPILATION_UNRESOLVED_CONST=11001]="LOCAL_COMPILATION_UNRESOLVED_CONST",t[t.LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION=11003]="LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION"})(Z||(Z={}));function $u(t){return parseInt("-99"+t)}var Wn=class extends Error{constructor(t,e,n,r){super(`FatalDiagnosticError: Code: ${t}, Message: ${Qs.default.flattenDiagnosticMessageText(n,`
|
|
29
29
|
`)}`),this.code=t,this.node=e,this.diagnosticMessage=n,this.relatedInformation=r,this._isFatalDiagnosticError=!0,Object.setPrototypeOf(this,new.target.prototype)}toDiagnostic(){return Uu(this.code,this.node,this.diagnosticMessage,this.relatedInformation)}};function Uu(t,e,n,r){return e=Qs.default.getOriginalNode(e),{category:Qs.default.DiagnosticCategory.Error,code:$u(t),file:Qs.default.getOriginalNode(e).getSourceFile(),start:e.getStart(void 0,!1),length:e.getWidth(),messageText:n,relatedInformation:r}}function Vu(t,e){return{category:Qs.default.DiagnosticCategory.Message,code:0,messageText:t,next:e}}var Vb=new Set([Z.DECORATOR_ARG_NOT_LITERAL,Z.IMPORT_CYCLE_DETECTED,Z.PARAM_MISSING_TOKEN,Z.SCHEMA_INVALID_ELEMENT,Z.SCHEMA_INVALID_ATTRIBUTE,Z.MISSING_REFERENCE_TARGET,Z.COMPONENT_INVALID_SHADOW_DOM_SELECTOR,Z.WARN_NGMODULE_ID_UNNECESSARY]);var kt;(function(t){t.INVALID_BANANA_IN_BOX="invalidBananaInBox",t.NULLISH_COALESCING_NOT_NULLABLE="nullishCoalescingNotNullable",t.OPTIONAL_CHAIN_NOT_NULLABLE="optionalChainNotNullable",t.MISSING_CONTROL_FLOW_DIRECTIVE="missingControlFlowDirective",t.TEXT_ATTRIBUTE_NOT_BINDING="textAttributeNotBinding",t.UNINVOKED_FUNCTION_IN_EVENT_BINDING="uninvokedFunctionInEventBinding",t.MISSING_NGFOROF_LET="missingNgForOfLet",t.SUFFIX_NOT_SUPPORTED="suffixNotSupported",t.SKIP_HYDRATION_NOT_STATIC="skipHydrationNotStatic",t.INTERPOLATED_SIGNAL_NOT_INVOKED="interpolatedSignalNotInvoked",t.CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION="controlFlowPreventingContentProjection"})(kt||(kt={}));function qb(t){return lo.default.isIdentifier(t)||lo.default.isPropertyAccessExpression(t)&&lo.default.isIdentifier(t.expression)&&lo.default.isIdentifier(t.name)}var wr;(function(t){t[t.Constructor=0]="Constructor",t[t.Getter=1]="Getter",t[t.Setter=2]="Setter",t[t.Property=3]="Property",t[t.Method=4]="Method"})(wr||(wr={}));var he;(function(t){t[t.PublicWritable=0]="PublicWritable",t[t.PublicReadonly=1]="PublicReadonly",t[t.Protected=2]="Protected",t[t.Private=3]="Private",t[t.EcmaScriptPrivate=4]="EcmaScriptPrivate"})(he||(he={}));var Zr={};function Gb(t,e,n){var r,s;if(t===null)return Kb();if(!Ne.default.isTypeReferenceNode(t))return ao(t);let i=zb(t,e);if(i===null)return Wb(t);let{local:o,decl:a}=i;if(a.valueDeclaration===void 0||a.flags&Ne.default.SymbolFlags.ConstEnum){let u=null;if(a.declarations!==void 0&&a.declarations.length>0&&(u=a.declarations[0]),!n||u&&[Ne.default.SyntaxKind.TypeParameter,Ne.default.SyntaxKind.TypeAliasDeclaration,Ne.default.SyntaxKind.InterfaceDeclaration].includes(u.kind))return Hb(t,u)}let l=o.declarations&&o.declarations[0];if(l!==void 0){if(Ne.default.isImportClause(l)&&l.name!==void 0)return l.isTypeOnly?Ua(t,l):Ne.default.isImportDeclaration(l.parent)?{kind:0,expression:l.name,defaultImportStatement:l.parent}:ao(t);if(Ne.default.isImportSpecifier(l)){if(l.isTypeOnly)return Ua(t,l);if(l.parent.parent.isTypeOnly)return Ua(t,l.parent.parent);let u=(l.propertyName||l.name).text,[h,...d]=i.symbolNames,g=l.parent.parent.parent;if(!Ne.default.isImportDeclaration(g))return ao(t);let y=Fm(g);return{kind:1,valueDeclaration:(r=a.valueDeclaration)!=null?r:null,moduleName:y,importedName:u,nestedPath:d}}else if(Ne.default.isNamespaceImport(l)){if(l.parent.isTypeOnly)return Ua(t,l.parent);if(i.symbolNames.length===1)return jb(t,l.parent);let[u,h,...d]=i.symbolNames,g=l.parent.parent;if(!Ne.default.isImportDeclaration(g))return ao(t);let y=Fm(g);return{kind:1,valueDeclaration:(s=a.valueDeclaration)!=null?s:null,moduleName:y,importedName:h,nestedPath:d}}}let c=Ym(t);return c!==null?{kind:0,expression:c,defaultImportStatement:null}:ao(t)}function ao(t){return{kind:2,reason:{kind:5,typeNode:t}}}function Hb(t,e){return{kind:2,reason:{kind:1,typeNode:t,decl:e}}}function Ua(t,e){return{kind:2,reason:{kind:2,typeNode:t,node:e}}}function Wb(t){return{kind:2,reason:{kind:3,typeNode:t}}}function jb(t,e){return{kind:2,reason:{kind:4,typeNode:t,importClause:e}}}function Kb(){return{kind:2,reason:{kind:0}}}function Ym(t){return Ne.default.isTypeReferenceNode(t)?qu(t.typeName):null}function zb(t,e){let n=t.typeName,r=e.getSymbolAtLocation(n);if(r===void 0)return null;let s=r,i=n,o=[];for(;Ne.default.isQualifiedName(i);)o.unshift(i.right.text),i=i.left;if(o.unshift(i.text),i!==n){let l=e.getSymbolAtLocation(i);l!==void 0&&(s=l)}let a=r;return r.flags&Ne.default.SymbolFlags.Alias&&(a=e.getAliasedSymbol(r)),{local:s,decl:a,symbolNames:o}}function qu(t){if(Ne.default.isQualifiedName(t)){let e=qu(t.left);return e!==null?Ne.default.factory.createPropertyAccessExpression(e,t.right):null}else if(Ne.default.isIdentifier(t)){let e=Ne.default.setOriginalNode(Ne.default.factory.createIdentifier(t.text),t);return e.parent=t.parent,e}else return null}function Fm(t){if(!Ne.default.isStringLiteral(t.moduleSpecifier))throw new Error("not a module specifier");return t.moduleSpecifier.text}function Hu(t){return Gu.default.isClassDeclaration(t)&&Xb(t.name)}function Xb(t){return t!==void 0&&Gu.default.isIdentifier(t)}function Wu(t){switch(t){case he.EcmaScriptPrivate:return"ES private";case he.Private:return"private";case he.Protected:return"protected";case he.PublicReadonly:return"public readonly";case he.PublicWritable:default:return"public"}}var ju=class{constructor(t,e=!1){this.checker=t,this.isLocalCompilation=e}getDecoratorsOfDeclaration(t){let e=M.default.canHaveDecorators(t)?M.default.getDecorators(t):void 0;return e!==void 0&&e.length?e.map(n=>this._reflectDecorator(n)).filter(n=>n!==null):null}getMembersOfClass(t){return Bm(t).members.map(n=>{let r=Ku(n);return r===null?null:{...r,decorators:this.getDecoratorsOfDeclaration(n)}}).filter(n=>n!==null)}getConstructorParameters(t){let e=Bm(t),n=e.getSourceFile().isDeclarationFile,r=e.members.find(s=>M.default.isConstructorDeclaration(s)&&(n||s.body!==void 0));return r===void 0?null:r.parameters.map(s=>{let i=$m(s.name),o=this.getDecoratorsOfDeclaration(s),a=s.type||null,l=a;if(l&&M.default.isUnionTypeNode(l)){let u=l.types.filter(h=>!(M.default.isLiteralTypeNode(h)&&h.literal.kind===M.default.SyntaxKind.NullKeyword));u.length===1&&(l=u[0])}let c=Gb(l,this.checker,this.isLocalCompilation);return{name:i,nameNode:s.name,typeValueReference:c,typeNode:a,decorators:o}})}getImportOfIdentifier(t){let e=this.getDirectImportOfIdentifier(t);return e!==null?e:M.default.isQualifiedName(t.parent)&&t.parent.right===t?this.getImportOfNamespacedIdentifier(t,Jb(t.parent)):M.default.isPropertyAccessExpression(t.parent)&&t.parent.name===t?this.getImportOfNamespacedIdentifier(t,Zb(t.parent)):null}getExportsOfModule(t){if(!M.default.isSourceFile(t))throw new Error("getExportsOfModule() called on non-SourceFile in TS code");let e=this.checker.getSymbolAtLocation(t);if(e===void 0)return null;let n=new Map;return this.checker.getExportsOfModule(e).forEach(r=>{let s=this.getDeclarationOfSymbol(r,null);s!==null&&n.set(r.name,s)}),n}isClass(t){return Hu(t)}hasBaseClass(t){return this.getBaseClassExpression(t)!==null}getBaseClassExpression(t){if(!(M.default.isClassDeclaration(t)||M.default.isClassExpression(t))||t.heritageClauses===void 0)return null;let e=t.heritageClauses.find(r=>r.token===M.default.SyntaxKind.ExtendsKeyword);if(e===void 0)return null;let n=e.types[0];return n===void 0?null:n.expression}getDeclarationOfIdentifier(t){let e=this.checker.getSymbolAtLocation(t);return e===void 0?null:this.getDeclarationOfSymbol(e,t)}getDefinitionOfFunction(t){if(!M.default.isFunctionDeclaration(t)&&!M.default.isMethodDeclaration(t)&&!M.default.isFunctionExpression(t)&&!M.default.isArrowFunction(t))return null;let e=null;t.body!==void 0&&(e=M.default.isBlock(t.body)?Array.from(t.body.statements):[M.default.factory.createReturnStatement(t.body)]);let n=this.checker.getTypeAtLocation(t),r=this.checker.getSignaturesOfType(n,M.default.SignatureKind.Call);return{node:t,body:e,signatureCount:r.length,typeParameters:t.typeParameters===void 0?null:Array.from(t.typeParameters),parameters:t.parameters.map(s=>{let i=$m(s.name),o=s.initializer||null;return{name:i,node:s,initializer:o,type:s.type||null}})}}getGenericArityOfClass(t){return M.default.isClassDeclaration(t)?t.typeParameters!==void 0?t.typeParameters.length:0:null}getVariableValue(t){return t.initializer||null}isStaticallyExported(t){let e=t;M.default.isVariableDeclaration(t)&&M.default.isVariableDeclarationList(t.parent)&&(e=t.parent.parent);let n=M.default.canHaveModifiers(e)?M.default.getModifiers(e):void 0;return n!==void 0&&n.some(s=>s.kind===M.default.SyntaxKind.ExportKeyword)?!0:e.parent===void 0||!M.default.isSourceFile(e.parent)?!1:this.getLocalExportedDeclarationsOfSourceFile(t.getSourceFile()).has(t)}getDirectImportOfIdentifier(t){let e=this.checker.getSymbolAtLocation(t);if(e===void 0||e.declarations===void 0||e.declarations.length!==1)return null;let n=e.declarations[0],r=eD(n);return r===null||!M.default.isStringLiteral(r.moduleSpecifier)?null:{from:r.moduleSpecifier.text,name:tD(n,t),node:r}}getImportOfNamespacedIdentifier(t,e){if(e===null)return null;let n=this.checker.getSymbolAtLocation(e);if(!n||n.declarations===void 0)return null;let r=n.declarations.length===1?n.declarations[0]:null;if(!r)return null;let s=M.default.isNamespaceImport(r)?r:null;if(!s)return null;let i=s.parent.parent;return!M.default.isImportDeclaration(i)||!M.default.isStringLiteral(i.moduleSpecifier)?null:{from:i.moduleSpecifier.text,name:t.text,node:i}}getDeclarationOfSymbol(t,e){let n;if(t.valueDeclaration!==void 0?n=t.valueDeclaration:t.declarations!==void 0&&t.declarations.length>0&&(n=t.declarations[0]),n!==void 0&&M.default.isShorthandPropertyAssignment(n)){let s=this.checker.getShorthandAssignmentValueSymbol(n);return s===void 0?null:this.getDeclarationOfSymbol(s,e)}else if(n!==void 0&&M.default.isExportSpecifier(n)){let s=this.checker.getExportSpecifierLocalTargetSymbol(n);return s===void 0?null:this.getDeclarationOfSymbol(s,e)}let r=e&&this.getImportOfIdentifier(e);for(;t.flags&M.default.SymbolFlags.Alias;)t=this.checker.getAliasedSymbol(t);return t.valueDeclaration!==void 0?{node:t.valueDeclaration,viaModule:this._viaModule(t.valueDeclaration,e,r)}:t.declarations!==void 0&&t.declarations.length>0?{node:t.declarations[0],viaModule:this._viaModule(t.declarations[0],e,r)}:null}_reflectDecorator(t){let e=t.expression,n=null;if(M.default.isCallExpression(e)&&(n=Array.from(e.arguments),e=e.expression),!qb(e))return null;let r=M.default.isIdentifier(e)?e:e.name,s=this.getImportOfIdentifier(r);return{name:r.text,identifier:e,import:s,node:t,args:n}}getLocalExportedDeclarationsOfSourceFile(t){let e=t;if(e[ku]!==void 0)return e[ku];let n=new Set;e[ku]=n;let r=this.checker.getSymbolAtLocation(e);if(r===void 0||r.exports===void 0)return n;let s=r.exports.values(),i=s.next();for(;i.done!==!0;){let o=i.value;o.flags&M.default.SymbolFlags.Alias&&(o=this.checker.getAliasedSymbol(o)),o.valueDeclaration!==void 0&&o.valueDeclaration.getSourceFile()===t&&n.add(o.valueDeclaration),i=s.next()}return n}_viaModule(t,e,n){return n===null&&e!==null&&t.getSourceFile()!==e.getSourceFile()?Zr:n!==null&&n.from!==null&&!n.from.startsWith(".")?n.from:null}};function Yb(t){let e=M.default.getModifiers(t),n=!1,r=!1,s=he.PublicWritable;if(e!==void 0)for(let i of e)switch(i.kind){case M.default.SyntaxKind.StaticKeyword:n=!0;break;case M.default.SyntaxKind.PrivateKeyword:s=he.Private;break;case M.default.SyntaxKind.ProtectedKeyword:s=he.Protected;break;case M.default.SyntaxKind.ReadonlyKeyword:r=!0;break}return r&&s===he.PublicWritable&&(s=he.PublicReadonly),t.name!==void 0&&M.default.isPrivateIdentifier(t.name)&&(s=he.EcmaScriptPrivate),{accessLevel:s,isStatic:n}}function Ku(t){let e=null,n=null,r=null,s=null;if(M.default.isPropertyDeclaration(t))e=wr.Property,n=t.initializer||null;else if(M.default.isGetAccessorDeclaration(t))e=wr.Getter;else if(M.default.isSetAccessorDeclaration(t))e=wr.Setter;else if(M.default.isMethodDeclaration(t))e=wr.Method;else if(M.default.isConstructorDeclaration(t))e=wr.Constructor;else return null;if(M.default.isConstructorDeclaration(t))r="constructor";else if(M.default.isIdentifier(t.name))r=t.name.text,s=t.name;else if(M.default.isStringLiteral(t.name))r=t.name.text,s=t.name;else if(M.default.isPrivateIdentifier(t.name))r=t.name.text,s=t.name;else return null;let{accessLevel:i,isStatic:o}=Yb(t);return{node:t,implementation:t,kind:e,type:t.type||null,accessLevel:i,name:r,nameNode:s,value:n,isStatic:o}}function zu(t){let e=new Map;return t.properties.forEach(n=>{if(M.default.isPropertyAssignment(n)){let r=Qb(n.name);if(r===null)return;e.set(r,n.initializer)}else if(M.default.isShorthandPropertyAssignment(n))e.set(n.name.text,n.name);else return}),e}function Bm(t){if(!M.default.isClassDeclaration(t))throw new Error(`Reflecting on a ${M.default.SyntaxKind[t.kind]} instead of a ClassDeclaration.`);return t}function $m(t){return M.default.isIdentifier(t)?t.text:null}function Qb(t){return M.default.isIdentifier(t)||M.default.isStringLiteral(t)||M.default.isNumericLiteral(t)?t.text:null}function Jb(t){for(;M.default.isQualifiedName(t.left);)t=t.left;return M.default.isIdentifier(t.left)?t.left:null}function Zb(t){for(;M.default.isPropertyAccessExpression(t.expression);)t=t.expression;return M.default.isIdentifier(t.expression)?t.expression:null}function eD(t){let e=t.parent;for(;e&&!M.default.isSourceFile(e);){if(M.default.isImportDeclaration(e))return e;e=e.parent}return null}function tD(t,e){return M.default.isImportSpecifier(t)?(t.propertyName!==void 0?t.propertyName:t.name).text:e.text}var ku=Symbol("LocalExportedDeclarations");function Mu(t){return t.name!==void 0&&Qm.default.isIdentifier(t.name)?t.name:null}var es=class{constructor(t,e=null){this.node=t,this.identifiers=[],this.synthetic=!1,this._alias=null,e===Zr?(this.isAmbient=!0,this.bestGuessOwningModule=null):(this.isAmbient=!1,this.bestGuessOwningModule=e);let n=Mu(t);n!==null&&this.identifiers.push(n)}get ownedByModuleGuess(){return this.bestGuessOwningModule!==null?this.bestGuessOwningModule.specifier:null}get hasOwningModuleGuess(){return this.bestGuessOwningModule!==null}get debugName(){let t=Mu(this.node);return t!==null?t.text:null}get alias(){return this._alias}addIdentifier(t){this.identifiers.push(t)}getIdentityIn(t){return this.identifiers.find(e=>e.getSourceFile()===t)||null}getIdentityInExpression(t){let e=t.getSourceFile();return this.identifiers.find(n=>n.getSourceFile()!==e?!1:n.pos>=t.pos&&n.end<=t.end)||null}getOriginForDiagnostics(t,e=t){let n=this.getIdentityInExpression(t);return n!==null?n:e}cloneWithAlias(t){let e=new es(this.node,this.isAmbient?Zr:this.bestGuessOwningModule);return e.identifiers=[...this.identifiers],e._alias=t,e}cloneWithNoIdentifiers(){let t=new es(this.node,this.isAmbient?Zr:this.bestGuessOwningModule);return t._alias=this._alias,t.identifiers=[],t}};var Lu;(function(t){t[t.None=0]="None",t[t.ForceNewImport=1]="ForceNewImport",t[t.NoAliasing=2]="NoAliasing",t[t.AllowTypeImports=4]="AllowTypeImports",t[t.AllowRelativeDtsImports=8]="AllowRelativeDtsImports",t[t.AllowAmbientReferences=16]="AllowAmbientReferences"})(Lu||(Lu={}));var Um=Symbol("patchedReferencedAliases");function Xu(t){rD(t)||Vm();let e=t.getEmitResolver(),n=e[Um];if(n!==void 0)return n;let r=e.isReferencedAliasDeclaration;r===void 0&&Vm();let s=new Set;return e.isReferencedAliasDeclaration=function(i,...o){return Yu(i)&&s.has(i)?!0:r.call(e,i,...o)},e[Um]=s}function Yu(t){return Va.default.isImportSpecifier(t)||Va.default.isNamespaceImport(t)||Va.default.isImportClause(t)}function rD(t){return t.getEmitResolver!==void 0}function Vm(){throw Error(`Angular compiler is incompatible with this version of the TypeScript compiler.
|
|
30
30
|
|
|
31
31
|
If you recently updated TypeScript and this issue surfaces now, consider downgrading.
|
|
32
32
|
|
|
33
|
-
Please report an issue on the Angular repositories when this issue surfaces and you are using a supposedly compatible TypeScript version.`)}var _M=Symbol("DefaultImportDeclaration");var Qu=class{constructor(){this.fileToNamedImports=new WeakMap,this.fileToNamespaceImports=new WeakMap}isPotentialReferenceToNamedImport(t,e,n){let r=t.getSourceFile();this.scanImports(r);let i=this.fileToNamedImports.get(r).get(n),o=i?.get(e);return console.warn("isPotentialReferenceToNamedImport",t,n),o!==void 0&&o.has(t.text)}isPotentialReferenceToNamespaceImport(t,e){var n,r;let s=t.getSourceFile();this.scanImports(s);let i=this.fileToNamespaceImports.get(s);return console.warn("isPotentialReferenceToNamespaceImport",t,e),(r=(n=i.get(e))==null?void 0:n.has(t.text))!=null?r:!1}hasNamedImport(t,e,n){this.scanImports(t);let s=this.fileToNamedImports.get(t).get(n);return s!==void 0&&s.has(e)}hasNamespaceImport(t,e){return this.scanImports(t),this.fileToNamespaceImports.get(t).has(e)}scanImports(t){var e,n;if(this.fileToNamedImports.has(t)&&this.fileToNamespaceImports.has(t))return;let r=new Map,s=new Map;this.fileToNamedImports.set(t,r),this.fileToNamespaceImports.set(t,s);for(let i of t.statements){if(!qa.default.isImportDeclaration(i)||!qa.default.isStringLiteralLike(i.moduleSpecifier)||((e=i.importClause)==null?void 0:e.namedBindings)===void 0)continue;let o=i.moduleSpecifier.text;if(qa.default.isNamespaceImport(i.importClause.namedBindings))s.has(o)||s.set(o,new Set),s.get(o).add(i.importClause.namedBindings.name.text);else for(let a of i.importClause.namedBindings.elements){let l=a.name.text,c=a.propertyName===void 0?l:a.propertyName.text;r.has(o)||r.set(o,new Map);let u=r.get(o);u.has(c)||u.set(c,new Set),(n=u.get(c))==null||n.add(l)}}}};function oD(){let t=new Set,e=(r,s)=>t.has(`${r.fileName}@@${s}`),n=(r,s)=>t.add(`${r.fileName}@@${s}`);return(r,s)=>{let i=r;if(i.identifiers===void 0)throw new Error("Source file unexpectedly lacks map of parsed `identifiers`.");let o=c=>!i.identifiers.has(c)&&!e(i,c);if(o(s))return n(i,s),null;let a=null,l=1;do a=`${s}_${l++}`;while(!o(a));return n(i,a),Ou.default.factory.createUniqueName(a,Ou.default.GeneratedIdentifierFlags.Optimistic)}}function aD(t,e){return n=>{let{affectedFiles:r,newImports:s,updatedImports:i,reusedOriginalAliasDeclarations:o}=t.finalize();if(o.size>0){let l=Xu(n);o.forEach(c=>l.add(c))}if(e!==void 0)for(let[l,c]of e.entries())c.length>0&&r.add(l);let a=l=>{if(!Hn.default.isImportDeclaration(l)||l.importClause===void 0||!Hn.default.isImportClause(l.importClause))return l;let c=l.importClause;if(c.namedBindings===void 0||!Hn.default.isNamedImports(c.namedBindings)||!i.has(c.namedBindings))return l;let u=n.factory.updateImportClause(c,c.isTypeOnly,c.name,i.get(c.namedBindings)),h=n.factory.updateImportDeclaration(l,l.modifiers,u,l.moduleSpecifier,l.attributes);return Hn.default.setOriginalNode(h,{importClause:u,kind:h.kind}),h};return l=>{var c,u;if(!r.has(l.fileName))return l;l=Hn.default.visitEachChild(l,a,n);let h=(c=e?.get(l.fileName))!=null?c:[],d=[],g=[];for(let y of l.statements)lD(y)?d.push(y):g.push(y);return n.factory.updateSourceFile(l,[...d,...(u=s.get(l.fileName))!=null?u:[],...h,...g],l.isDeclarationFile,l.referencedFiles,l.typeReferenceDirectives,l.hasNoDefaultLib,l.libReferenceDirectives)}}}function lD(t){return Hn.default.isImportDeclaration(t)||Hn.default.isImportEqualsDeclaration(t)||Hn.default.isNamespaceImport(t)}function cD(t,e){let n=Zm(e),r=t.directReuseCache.get(n);if(r!==void 0)return r;let s=t.namespaceImportReuseCache.get(e.exportModuleSpecifier);return s===void 0?null:e.exportSymbolName===null?s:[s,Jm.default.factory.createIdentifier(e.exportSymbolName)]}function qm(t,e,n){e.directReuseCache.set(Zm(t),n),t.exportSymbolName===null&&!Array.isArray(n)&&e.namespaceImportReuseCache.set(t.exportModuleSpecifier,n)}function Zm(t){return`${t.requestedFile.fileName}:${t.exportModuleSpecifier}:${t.exportSymbolName}`}function uD(t,e,n){let r=null;for(let a=e.statements.length-1;a>=0;a--){let l=e.statements[a];if(!(!Jr.default.isImportDeclaration(l)||!Jr.default.isStringLiteral(l.moduleSpecifier)||!l.importClause||l.importClause.isTypeOnly||l.moduleSpecifier.text!==n.exportModuleSpecifier)&&l.importClause.namedBindings){let u=l.importClause.namedBindings;if(Jr.default.isNamespaceImport(u))return t.reusedAliasDeclarations.add(u),n.exportSymbolName===null?u.name:[u.name,Jr.default.factory.createIdentifier(n.exportSymbolName)];if(Jr.default.isNamedImports(u)&&n.exportSymbolName!==null){let h=u.elements.find(d=>!d.isTypeOnly&&(d.propertyName?d.propertyName.text===n.exportSymbolName:d.name.text===n.exportSymbolName));if(h!==void 0)return t.reusedAliasDeclarations.add(h),h.name;r=l}}}if(r===null||n.exportSymbolName===null)return null;t.updatedImports.has(r)||t.updatedImports.set(r,[]);let s=t.updatedImports.get(r),i=Jr.default.factory.createIdentifier(n.exportSymbolName),o=t.generateUniqueIdentifier(e,n.exportSymbolName);return s.push({propertyName:i,fileUniqueAlias:o}),o??i}var Ju=class{constructor(t={}){var e;this._config=t,this.newImports=new Map,this.nextUniqueIndex=0,this.reuseGeneratedImportsTracker={directReuseCache:new Map,namespaceImportReuseCache:new Map},this.config={shouldUseSingleQuotes:()=>!1,rewriter:null,disableOriginalSourceFileReuse:!1,forceGenerateNamespacesForNewImports:!1,namespaceImportPrefix:"i",generateUniqueIdentifier:(e=this._config.generateUniqueIdentifier)!=null?e:oD(),...this._config},this.reuseSourceFileImportsTracker={generateUniqueIdentifier:this.config.generateUniqueIdentifier,reusedAliasDeclarations:new Set,updatedImports:new Map}}addSideEffectImport(t,e){this.config.rewriter!==null&&(e=this.config.rewriter.rewriteSpecifier(e,t.fileName)),this._getNewImportsTrackerForFile(t).sideEffectImports.add(e)}addImport(t){this.config.rewriter!==null&&(t.exportSymbolName!==null&&(t.exportSymbolName=this.config.rewriter.rewriteSymbol(t.exportSymbolName,t.exportModuleSpecifier)),t.exportModuleSpecifier=this.config.rewriter.rewriteSpecifier(t.exportModuleSpecifier,t.requestedFile.fileName));let e=cD(this.reuseGeneratedImportsTracker,t);if(e!==null)return Gm(!!t.asTypeReference,e);let n=this._generateNewImport(t);return qm(t,this.reuseGeneratedImportsTracker,n),Gm(!!t.asTypeReference,n)}_generateNewImport(t){var e;let{requestedFile:n}=t,r=this.config.disableOriginalSourceFileReuse,s=this.config.forceGenerateNamespacesForNewImports;if(!r){let h=uD(this.reuseSourceFileImportsTracker,n,t);if(h!==null)return h}let{namedImports:i,namespaceImports:o}=this._getNewImportsTrackerForFile(n);if(t.exportSymbolName===null||s){let h=`${this.config.namespaceImportPrefix}${this.nextUniqueIndex++}`,d=Re.default.factory.createNamespaceImport((e=this.config.generateUniqueIdentifier(n,h))!=null?e:Re.default.factory.createIdentifier(h));return o.set(t.exportModuleSpecifier,d),qm({...t,exportSymbolName:null},this.reuseGeneratedImportsTracker,d.name),t.exportSymbolName!==null?[d.name,Re.default.factory.createIdentifier(t.exportSymbolName)]:d.name}i.has(t.exportModuleSpecifier)||i.set(t.exportModuleSpecifier,[]);let a=Re.default.factory.createIdentifier(t.exportSymbolName),l=this.config.generateUniqueIdentifier(n,t.exportSymbolName),c=l!==null,u=c?l:a;return i.get(t.exportModuleSpecifier).push(Re.default.factory.createImportSpecifier(!1,c?a:void 0,u)),u}finalize(){let t=new Set,e=new Map,n=new Map,r=(s,i)=>{t.add(s),n.has(s)?n.get(s).push(i):n.set(s,[i])};return this.reuseSourceFileImportsTracker.updatedImports.forEach((s,i)=>{let o=i.importClause.namedBindings,a=Re.default.factory.updateNamedImports(o,o.elements.concat(s.map(({propertyName:l,fileUniqueAlias:c})=>Re.default.factory.createImportSpecifier(!1,c!==null?l:void 0,c??l))));t.add(i.getSourceFile().fileName),e.set(o,a)}),this.newImports.forEach(({namedImports:s,namespaceImports:i,sideEffectImports:o},a)=>{let l=this.config.shouldUseSingleQuotes(a),c=a.fileName;o.forEach(u=>{r(c,Re.default.factory.createImportDeclaration(void 0,void 0,Re.default.factory.createStringLiteral(u)))}),i.forEach((u,h)=>{let d=Re.default.factory.createImportDeclaration(void 0,Re.default.factory.createImportClause(!1,void 0,u),Re.default.factory.createStringLiteral(h,l));Re.default.setOriginalNode(u.name,d),r(c,d)}),s.forEach((u,h)=>{let d=Re.default.factory.createImportDeclaration(void 0,Re.default.factory.createImportClause(!1,void 0,Re.default.factory.createNamedImports(u)),Re.default.factory.createStringLiteral(h,l));r(c,d)})}),{affectedFiles:t,newImports:n,updatedImports:e,reusedOriginalAliasDeclarations:this.reuseSourceFileImportsTracker.reusedAliasDeclarations}}toTsTransform(t){return aD(this,t)}transformTsFile(t,e,n){let r=n?new Map([[e.fileName,n]]):void 0;return this.toTsTransform(r)(t)(e)}_getNewImportsTrackerForFile(t){return this.newImports.has(t)||this.newImports.set(t,{namespaceImports:new Map,namedImports:new Map,sideEffectImports:new Set}),this.newImports.get(t)}};function Gm(t,e){return t?Array.isArray(e)?Re.default.factory.createQualifiedName(e[0],e[1]):e:Array.isArray(e)?Re.default.factory.createPropertyAccessExpression(e[0],e[1]):e}var RM=new Map([[mn.Minus,"-"],[mn.Plus,"+"]]),kM=new Map([[I.And,"&&"],[I.Bigger,">"],[I.BiggerEquals,">="],[I.BitwiseAnd,"&"],[I.BitwiseOr,"|"],[I.Divide,"/"],[I.Equals,"=="],[I.Identical,"==="],[I.Lower,"<"],[I.LowerEquals,"<="],[I.Minus,"-"],[I.Modulo,"%"],[I.Multiply,"*"],[I.NotEquals,"!="],[I.NotIdentical,"!=="],[I.Or,"||"],[I.Plus,"+"],[I.NullishCoalesce,"??"]]);var Pu={};function eg(t,e){return n(t);function n(i){return r(i)!==Pu}function r(i){return me.default.isImportTypeNode(i)||me.default.isTypeReferenceNode(i)&&!s(i)?Pu:me.default.forEachChild(i,r)}function s(i){return e(i)?i.typeArguments===void 0||i.typeArguments.every(n):!1}}var tg=class{constructor(t){this.translator=t}emitType(t){let e=n=>{let r=s=>{if(me.default.isImportTypeNode(s))throw new Error("Unable to emit import type");if(me.default.isTypeReferenceNode(s))return this.emitTypeReference(s);if(me.default.isLiteralExpression(s)){let i;if(me.default.isStringLiteral(s))i=me.default.factory.createStringLiteral(s.text);else if(me.default.isNumericLiteral(s))i=me.default.factory.createNumericLiteral(s.text);else if(me.default.isBigIntLiteral(s))i=me.default.factory.createBigIntLiteral(s.text);else if(me.default.isNoSubstitutionTemplateLiteral(s))i=me.default.factory.createNoSubstitutionTemplateLiteral(s.text,s.rawText);else if(me.default.isRegularExpressionLiteral(s))i=me.default.factory.createRegularExpressionLiteral(s.text);else throw new Error(`Unsupported literal kind ${me.default.SyntaxKind[s.kind]}`);return me.default.setTextRange(i,{pos:-1,end:-1}),i}else return me.default.visitEachChild(s,r,n)};return s=>me.default.visitNode(s,r,me.default.isTypeNode)};return me.default.transform(t,[e]).transformed[0]}emitTypeReference(t){let e=this.translator(t);if(e===null)throw new Error("Unable to emit an unresolved reference");let n;return t.typeArguments!==void 0&&(n=me.default.factory.createNodeArray(t.typeArguments.map(r=>this.emitType(r)))),me.default.factory.updateTypeReferenceNode(t,e.typeName,n)}};var Hm;(function(t){t.CLOSURE="* @pureOrBreakMyCode ",t.TERSER="@__PURE__"})(Hm||(Hm={}));var PM={"+":ge.default.SyntaxKind.PlusToken,"-":ge.default.SyntaxKind.MinusToken,"!":ge.default.SyntaxKind.ExclamationToken},MM={"&&":ge.default.SyntaxKind.AmpersandAmpersandToken,">":ge.default.SyntaxKind.GreaterThanToken,">=":ge.default.SyntaxKind.GreaterThanEqualsToken,"&":ge.default.SyntaxKind.AmpersandToken,"|":ge.default.SyntaxKind.BarToken,"/":ge.default.SyntaxKind.SlashToken,"==":ge.default.SyntaxKind.EqualsEqualsToken,"===":ge.default.SyntaxKind.EqualsEqualsEqualsToken,"<":ge.default.SyntaxKind.LessThanToken,"<=":ge.default.SyntaxKind.LessThanEqualsToken,"-":ge.default.SyntaxKind.MinusToken,"%":ge.default.SyntaxKind.PercentToken,"*":ge.default.SyntaxKind.AsteriskToken,"!=":ge.default.SyntaxKind.ExclamationEqualsToken,"!==":ge.default.SyntaxKind.ExclamationEqualsEqualsToken,"||":ge.default.SyntaxKind.BarBarToken,"+":ge.default.SyntaxKind.PlusToken,"??":ge.default.SyntaxKind.QuestionQuestionToken},LM={const:ge.default.NodeFlags.Const,let:ge.default.NodeFlags.Let,var:ge.default.NodeFlags.None};S();var ng=require("module"),HM=(0,ng.createRequire)(P),Js;(function(t){t[t.Unaccounted=0]="Unaccounted",t[t.Setup=1]="Setup",t[t.TypeScriptProgramCreate=2]="TypeScriptProgramCreate",t[t.Reconciliation=3]="Reconciliation",t[t.ResourceUpdate=4]="ResourceUpdate",t[t.TypeScriptDiagnostics=5]="TypeScriptDiagnostics",t[t.Analysis=6]="Analysis",t[t.Resolve=7]="Resolve",t[t.CycleDetection=8]="CycleDetection",t[t.TcbGeneration=9]="TcbGeneration",t[t.TcbUpdateProgram=10]="TcbUpdateProgram",t[t.TypeScriptEmit=11]="TypeScriptEmit",t[t.Compile=12]="Compile",t[t.TtcAutocompletion=13]="TtcAutocompletion",t[t.TtcDiagnostics=14]="TtcDiagnostics",t[t.TtcSymbol=15]="TtcSymbol",t[t.LsReferencesAndRenames=16]="LsReferencesAndRenames",t[t.LsQuickInfo=17]="LsQuickInfo",t[t.LsDefinition=18]="LsDefinition",t[t.LsCompletions=19]="LsCompletions",t[t.LsTcb=20]="LsTcb",t[t.LsDiagnostics=21]="LsDiagnostics",t[t.LsComponentLocations=22]="LsComponentLocations",t[t.LsSignatureHelp=23]="LsSignatureHelp",t[t.OutliningSpans=24]="OutliningSpans",t[t.LAST=25]="LAST",t[t.LsCodeFixes=26]="LsCodeFixes",t[t.LsCodeFixesAll=27]="LsCodeFixesAll"})(Js||(Js={}));var Ga;(function(t){t[t.InputDtsFile=0]="InputDtsFile",t[t.InputTsFile=1]="InputTsFile",t[t.AnalyzeComponent=2]="AnalyzeComponent",t[t.AnalyzeDirective=3]="AnalyzeDirective",t[t.AnalyzeInjectable=4]="AnalyzeInjectable",t[t.AnalyzeNgModule=5]="AnalyzeNgModule",t[t.AnalyzePipe=6]="AnalyzePipe",t[t.TraitAnalyze=7]="TraitAnalyze",t[t.TraitReuseAnalysis=8]="TraitReuseAnalysis",t[t.SourceFilePhysicalChange=9]="SourceFilePhysicalChange",t[t.SourceFileLogicalChange=10]="SourceFileLogicalChange",t[t.SourceFileReuseAnalysis=11]="SourceFileReuseAnalysis",t[t.GenerateTcb=12]="GenerateTcb",t[t.SkipGenerateTcbNoInline=13]="SkipGenerateTcbNoInline",t[t.ReuseTypeCheckFile=14]="ReuseTypeCheckFile",t[t.UpdateTypeCheckProgram=15]="UpdateTypeCheckProgram",t[t.EmitSkipSourceFile=16]="EmitSkipSourceFile",t[t.EmitSourceFile=17]="EmitSourceFile",t[t.LAST=18]="LAST"})(Ga||(Ga={}));var Ha;(function(t){t[t.Initial=0]="Initial",t[t.TypeScriptProgramCreate=1]="TypeScriptProgramCreate",t[t.PreAnalysis=2]="PreAnalysis",t[t.Analysis=3]="Analysis",t[t.Resolve=4]="Resolve",t[t.TtcGeneration=5]="TtcGeneration",t[t.TtcUpdateProgram=6]="TtcUpdateProgram",t[t.PreEmit=7]="PreEmit",t[t.Emit=8]="Emit",t[t.LAST=9]="LAST"})(Ha||(Ha={}));var fD=class{eventCount(){}memory(){}phase(){return Js.Unaccounted}inPhase(t,e){return e()}reset(){}},WM=new fD;var Cn=x(require("typescript"),1),fe=x(require("typescript"),1),CD=x(require("typescript"),1);var ID=x(require("typescript"),1),AD=x(require("typescript"),1),ND=x(require("typescript"),1),bD=x(require("typescript"),1),DD=x(require("typescript"),1),_D=x(require("typescript"),1),RD=x(require("typescript"),1);var kD=x(require("typescript"),1),PD=x(require("typescript"),1);var MD=x(require("typescript"),1);var LD=x(require("typescript"),1);var OD=x(require("typescript"),1),FD=x(require("typescript"),1);var BD=x(require("typescript"),1);var $D=x(require("typescript"),1);var UD=x(require("typescript"),1);var VD=x(require("typescript"),1),on=x(require("typescript"),1),ip=x(require("typescript"),1);var an=x(require("typescript"),1);var XD=x(require("typescript"),1),YD=x(require("typescript"),1);var QD=x(require("typescript"),1);var ZD=x(require("typescript"),1),e0=x(require("typescript"),1),t0=x(require("typescript"),1);var n0=x(require("typescript"),1);var ho=x(require("typescript"),1);S();var rg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dD=new Uint8Array(64),mD=new Uint8Array(128);for(let t=0;t<rg.length;t++){let e=rg.charCodeAt(t);dD[t]=e,mD[e]=t}var s0=x(require("typescript"),1);var i0=x(require("typescript"),1),o0=x(require("typescript"),1);var Q=x(require("typescript"),1);var p0=x(require("typescript"),1);var h0=x(require("typescript"),1),co=x(require("typescript"),1);var g0=x(require("typescript"),1),y0=x(require("typescript"),1);var E=x(require("typescript"),1);var mo=x(require("typescript"),1);var D=x(require("typescript"),1),j0=x(require("typescript"),1);var K0=x(require("typescript"),1);var z0=x(require("typescript"),1);var X0=x(require("typescript"),1),DL=(0,Sg.createRequire)(P),wD="@angular/core";function wg(t){return t.import!==null&&t.import.from===wD}function Zs(t,e,n){return n?t.name===e:wg(t)?t.import.name===e:!1}function Tg(t,e,n){return t.filter(r=>{var s;let i=n?r.name:(s=r.import)==null?void 0:s.name;return i===void 0||!e.includes(i)?!1:n||wg(r)})}function xg(t){for(;Cn.default.isAsExpression(t)||Cn.default.isParenthesizedExpression(t);)t=t.expression;return t}function TD(t){if(t=xg(t),!Cn.default.isArrowFunction(t)&&!Cn.default.isFunctionExpression(t))return null;let e=t.body;if(Cn.default.isBlock(e)){if(e.statements.length!==1)return null;let n=e.statements[0];return!Cn.default.isReturnStatement(n)||n.expression===void 0?null:n.expression}else return e}function xD(t,e){if(t=xg(t),!Cn.default.isCallExpression(t)||t.arguments.length!==1)return null;let n=Cn.default.isPropertyAccessExpression(t.expression)?t.expression.name:t.expression;if(!Cn.default.isIdentifier(n))return null;let r=TD(t.arguments[0]);if(r===null)return null;let s=e.getImportOfIdentifier(n);return s===null||s.from!=="@angular/core"||s.name!=="forwardRef"?null:r}function ke(t){return{op:t,literal:!0}}function sg(t){return{op:t,literal:!1}}var ML=new Map([[fe.default.SyntaxKind.PlusToken,ke((t,e)=>t+e)],[fe.default.SyntaxKind.MinusToken,ke((t,e)=>t-e)],[fe.default.SyntaxKind.AsteriskToken,ke((t,e)=>t*e)],[fe.default.SyntaxKind.SlashToken,ke((t,e)=>t/e)],[fe.default.SyntaxKind.PercentToken,ke((t,e)=>t%e)],[fe.default.SyntaxKind.AmpersandToken,ke((t,e)=>t&e)],[fe.default.SyntaxKind.BarToken,ke((t,e)=>t|e)],[fe.default.SyntaxKind.CaretToken,ke((t,e)=>t^e)],[fe.default.SyntaxKind.LessThanToken,ke((t,e)=>t<e)],[fe.default.SyntaxKind.LessThanEqualsToken,ke((t,e)=>t<=e)],[fe.default.SyntaxKind.GreaterThanToken,ke((t,e)=>t>e)],[fe.default.SyntaxKind.GreaterThanEqualsToken,ke((t,e)=>t>=e)],[fe.default.SyntaxKind.EqualsEqualsToken,ke((t,e)=>t==e)],[fe.default.SyntaxKind.EqualsEqualsEqualsToken,ke((t,e)=>t===e)],[fe.default.SyntaxKind.ExclamationEqualsToken,ke((t,e)=>t!=e)],[fe.default.SyntaxKind.ExclamationEqualsEqualsToken,ke((t,e)=>t!==e)],[fe.default.SyntaxKind.LessThanLessThanToken,ke((t,e)=>t<<e)],[fe.default.SyntaxKind.GreaterThanGreaterThanToken,ke((t,e)=>t>>e)],[fe.default.SyntaxKind.GreaterThanGreaterThanGreaterThanToken,ke((t,e)=>t>>>e)],[fe.default.SyntaxKind.AsteriskAsteriskToken,ke((t,e)=>Math.pow(t,e))],[fe.default.SyntaxKind.AmpersandAmpersandToken,sg((t,e)=>t&&e)],[fe.default.SyntaxKind.BarBarToken,sg((t,e)=>t||e)]]),LL=new Map([[fe.default.SyntaxKind.TildeToken,t=>~t],[fe.default.SyntaxKind.MinusToken,t=>-t],[fe.default.SyntaxKind.PlusToken,t=>+t],[fe.default.SyntaxKind.ExclamationToken,t=>!t]]);var ja;(function(t){t[t.SingleFile=0]="SingleFile",t[t.WholeProgram=1]="WholeProgram"})(ja||(ja={}));var ig;(function(t){t[t.NgModule=0]="NgModule",t[t.Standalone=1]="Standalone"})(ig||(ig={}));var og;(function(t){t[t.Normal=0]="Normal",t[t.ForceDirect=1]="ForceDirect"})(og||(og={}));var ag;(function(t){t[t.Reference=0]="Reference",t[t.Variable=1]="Variable",t[t.LetDeclaration=2]="LetDeclaration"})(ag||(ag={}));var wt;(function(t){t[t.Input=0]="Input",t[t.Output=1]="Output",t[t.Binding=2]="Binding",t[t.Reference=3]="Reference",t[t.Variable=4]="Variable",t[t.Directive=5]="Directive",t[t.Element=6]="Element",t[t.Template=7]="Template",t[t.Expression=8]="Expression",t[t.DomBinding=9]="DomBinding",t[t.Pipe=10]="Pipe",t[t.LetDeclaration=11]="LetDeclaration"})(wt||(wt={}));var np;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(np||(np={}));var lg;(function(t){t[t.Selector=0]="Selector",t[t.HostDirective=1]="HostDirective"})(lg||(lg={}));var rp;(function(t){t[t.FULL=0]="FULL",t[t.PARTIAL=1]="PARTIAL",t[t.LOCAL=2]="LOCAL"})(rp||(rp={}));var cg;(function(t){t[t.PRIMARY=0]="PRIMARY",t[t.SHARED=1]="SHARED",t[t.WEAK=2]="WEAK"})(cg||(cg={}));var ug;(function(t){t[t.Pending=0]="Pending",t[t.Analyzed=1]="Analyzed",t[t.Resolved=2]="Resolved",t[t.Skipped=3]="Skipped"})(ug||(ug={}));var sp;(function(t){t[t.NgModule=0]="NgModule",t[t.Standalone=1]="Standalone"})(sp||(sp={}));function Xa({api:t,call:e},n){if(!t.allowedAccessLevels.includes(n.accessLevel))throw new Wn(Z.INITIALIZER_API_DISALLOWED_MEMBER_VISIBILITY,e,Vu(`Cannot use "${t.functionName}" on a class member that is declared as ${Wu(n.accessLevel)}.`,[Vu("Update the class field to be either: "+t.allowedAccessLevels.map(r=>Wu(r)).join(", "))]))}function yo(t,e,n,r){if(!on.default.isCallExpression(e))return null;let s=qD(e,t,r)||GD(e,t,r)||HD(e,t,r);if(s===null)return null;let{api:i,apiReference:o,isRequired:a}=s,l=n.getImportOfIdentifier(o);return l===null||i.functionName!==l.name||i.owningModule!==l.from?null:{api:i,call:e,isRequired:a}}function qD(t,e,n){let r=t.expression;if(!on.default.isIdentifier(r))return null;let s=e.find(i=>n.isPotentialReferenceToNamedImport(r,i.functionName,i.owningModule));return s===void 0?null:{api:s,apiReference:r,isRequired:!1}}function GD(t,e,n){let r=t.expression;if(!on.default.isPropertyAccessExpression(r)||!on.default.isIdentifier(r.expression)||r.name.text!=="required")return null;let s=r.expression,i=e.find(o=>n.isPotentialReferenceToNamedImport(s,o.functionName,o.owningModule));return i===void 0?null:{api:i,apiReference:s,isRequired:!0}}function HD(t,e,n){let r=t.expression;if(!on.default.isPropertyAccessExpression(r))return null;let s=null,i,o=!1;if(on.default.isIdentifier(r.expression)&&on.default.isIdentifier(r.name)){let a=r.expression;s=r.name,i=e.find(l=>r.name.text===l.functionName&&n.isPotentialReferenceToNamespaceImport(a,l.owningModule))}else if(on.default.isPropertyAccessExpression(r.expression)&&on.default.isIdentifier(r.expression.expression)&&on.default.isIdentifier(r.expression.name)&&r.name.text==="required"){let a=r.expression.name.text,l=r.expression.expression;s=r.expression.name,i=e.find(c=>c.functionName===a&&n.isPotentialReferenceToNamespaceImport(l,c.owningModule)),o=!0}return i===void 0||s===null?null:{api:i,apiReference:s,isRequired:o}}function cp(t){if(!ip.default.isObjectLiteralExpression(t))throw new Wn(Z.VALUE_HAS_WRONG_TYPE,t,"Argument needs to be an object literal that is statically analyzable.");let e=zu(t),n;if(e.has("alias")){let r=e.get("alias");if(!ip.default.isStringLiteralLike(r))throw new Wn(Z.VALUE_HAS_WRONG_TYPE,r,"Alias needs to be a string that is statically analyzable.");n=r.text}return{alias:n}}var up={functionName:"input",owningModule:"@angular/core",allowedAccessLevels:[he.PublicWritable,he.PublicReadonly,he.Protected]};function Cg(t,e,n){var r;if(t.value===null)return null;let s=yo([up],t.value,e,n);if(s===null)return null;Xa(s,t);let i=s.isRequired?s.call.arguments[0]:s.call.arguments[1],o=i!==void 0?cp(i):null,a=t.name;return{isSignal:!0,classPropertyName:a,bindingPropertyName:(r=o?.alias)!=null?r:a,required:s.isRequired,transform:null}}var pp={functionName:"model",owningModule:"@angular/core",allowedAccessLevels:[he.PublicWritable,he.PublicReadonly,he.Protected]};function Ig(t,e,n){var r;if(t.value===null)return null;let s=yo([pp],t.value,e,n);if(s===null)return null;Xa(s,t);let i=s.isRequired?s.call.arguments[0]:s.call.arguments[1],o=i!==void 0?cp(i):null,a=t.name,l=(r=o?.alias)!=null?r:a;return{call:s.call,input:{isSignal:!0,transform:null,classPropertyName:a,bindingPropertyName:l,required:s.isRequired},output:{isSignal:!1,classPropertyName:a,bindingPropertyName:l+"Change"}}}var pg=[he.PublicWritable,he.PublicReadonly,he.Protected],hp=[{functionName:"output",owningModule:"@angular/core",allowedAccessLevels:pg},{functionName:"outputFromObservable",owningModule:"@angular/core/rxjs-interop",allowedAccessLevels:pg}];function Ag(t,e,n){var r;if(t.value===null)return null;let s=yo(hp,t.value,e,n);if(s===null)return null;if(s.isRequired)throw new Wn(Z.INITIALIZER_API_NO_REQUIRED_FUNCTION,s.call,'Output does not support ".required()".');Xa(s,t);let i=s.api.functionName==="output"?s.call.arguments[0]:s.call.arguments[1],o=i!==void 0?cp(i):null,a=t.name;return{call:s.call,metadata:{isSignal:!1,classPropertyName:a,bindingPropertyName:(r=o?.alias)!=null?r:a}}}var WD=["viewChild","viewChildren","contentChild","contentChildren"],fp=WD.map(t=>({functionName:t,owningModule:"@angular/core",allowedAccessLevels:[he.PublicWritable,he.PublicReadonly,he.Protected,he.Private]})),jD=t=>t!=="contentChildren";function Ng(t,e,n){if(t.value===null)return null;let r=yo(fp,t.value,e,n);if(r===null)return null;Xa(r,t);let{functionName:s}=r.api,i=s==="viewChild"||s==="contentChild",o=r.call.arguments[0];if(o===void 0)throw new Wn(Z.VALUE_HAS_WRONG_TYPE,r.call,"No locator specified.");let a=r.call.arguments[1];if(a!==void 0&&!an.default.isObjectLiteralExpression(a))throw new Wn(Z.VALUE_HAS_WRONG_TYPE,a,"Argument needs to be an object literal.");let l=a&&zu(a),c=l?.has("read")?bg(l.get("read")):null,u=l?.has("descendants")?zD(l.get("descendants")):jD(s);return{name:s,call:r.call,metadata:{isSignal:!0,propertyName:t.name,static:!1,emitDistinctChangesOnly:!0,predicate:KD(o,e),first:i,read:c,descendants:u}}}function KD(t,e){let n=xD(t,e);return n!==null&&(t=n),an.default.isStringLiteralLike(t)?[t.text]:Qr(new ro.WrappedNodeExpr(t),n!==null?2:0)}function bg(t){if(an.default.isExpressionWithTypeArguments(t)||an.default.isParenthesizedExpression(t)||an.default.isAsExpression(t))return bg(t.expression);if(an.default.isPropertyAccessExpression(t)&&an.default.isIdentifier(t.expression)||an.default.isIdentifier(t))return new ro.WrappedNodeExpr(t);throw new Wn(Z.VALUE_NOT_LITERAL,t,'Query "read" option expected a literal class reference.')}function zD(t){if(t.kind===an.default.SyntaxKind.TrueKeyword)return!0;if(t.kind===an.default.SyntaxKind.FalseKeyword)return!1;throw new Wn(Z.VALUE_HAS_WRONG_TYPE,t,'Expected "descendants" option to be a boolean literal.')}var dp=["ViewChild","ViewChildren","ContentChild","ContentChildren"],QL=new Set(dp);var JD=Symbol("NgOriginalFile"),hg;(function(t){t[t.Complete=0]="Complete",t[t.Incremental=1]="Incremental"})(hg||(hg={}));var tO=Symbol("NgExtension");var nO=Symbol("TemplateSourceFile");var rO=Symbol("ngTemplateId"),sO=Symbol("ngNextTemplateId");var Ka;(function(t){t.DIAGNOSTIC="D",t.EXPRESSION_TYPE_IDENTIFIER="T"})(Ka||(Ka={}));var rs;(function(t){t.DIRECTIVE="DIR",t.COMPONENT_COMPLETION="COMPCOMP",t.EVENT_PARAMETER="EP",t.VARIABLE_AS_EXPRESSION="VAE"})(rs||(rs={}));function vo(t,e){ho.default.addSyntheticTrailingComment(t,ho.default.SyntaxKind.MultiLineCommentTrivia,`${Ka.EXPRESSION_TYPE_IDENTIFIER}:${e}`,!1)}var r0=`${Ka.DIAGNOSTIC}:ignore`;function Tr(t){ho.default.addSyntheticTrailingComment(t,ho.default.SyntaxKind.MultiLineCommentTrivia,r0,!1)}var cO=new sn;var a0=new Set([Q.default.SyntaxKind.ParenthesizedExpression,Q.default.SyntaxKind.Identifier,Q.default.SyntaxKind.CallExpression,Q.default.SyntaxKind.NonNullExpression,Q.default.SyntaxKind.ElementAccessExpression,Q.default.SyntaxKind.PropertyAccessExpression,Q.default.SyntaxKind.ArrayLiteralExpression,Q.default.SyntaxKind.ObjectLiteralExpression,Q.default.SyntaxKind.StringLiteral,Q.default.SyntaxKind.NumericLiteral,Q.default.SyntaxKind.TrueKeyword,Q.default.SyntaxKind.FalseKeyword,Q.default.SyntaxKind.NullKeyword,Q.default.SyntaxKind.UndefinedKeyword]);function jn(t){return a0.has(t.kind)||(t=Q.default.factory.createParenthesizedExpression(t)),Q.default.factory.createParenthesizedExpression(Q.default.factory.createAsExpression(t,Q.default.factory.createKeywordTypeNode(Q.default.SyntaxKind.AnyKeyword)))}function l0(t){let e=Q.default.factory.createPropertyAccessExpression(Q.default.factory.createIdentifier("document"),"createElement");return Q.default.factory.createCallExpression(e,void 0,[Q.default.factory.createStringLiteral(t)])}function fo(t,e){vo(e,rs.VARIABLE_AS_EXPRESSION);let n=Q.default.factory.createAsExpression(Q.default.factory.createNonNullExpression(Q.default.factory.createNull()),e),r=Q.default.factory.createVariableDeclaration(t,void 0,void 0,n);return Q.default.factory.createVariableStatement(void 0,[r])}function c0(t,e){return Q.default.factory.createTypeQueryNode(Q.default.factory.createQualifiedName(t,`ngAcceptInputType_${e}`))}function Kn(t,e,n=null){let r=Q.default.factory.createVariableDeclaration(t,void 0,void 0,e);return Q.default.factory.createVariableStatement(void 0,n===null?[r]:Q.default.factory.createVariableDeclarationList([r],n))}function fg(t,e,n=[]){let r=Q.default.factory.createPropertyAccessExpression(t,e);return Q.default.factory.createCallExpression(r,void 0,n)}function u0(t){if(t<0){let e=Q.default.factory.createNumericLiteral(Math.abs(t));return Q.default.factory.createPrefixUnaryExpression(Q.default.SyntaxKind.MinusToken,e)}return Q.default.factory.createNumericLiteral(t)}var f0=class{constructor(t,e){this.typeParameters=t,this.reflector=e}canEmit(t){return this.typeParameters===void 0?!0:this.typeParameters.every(e=>this.canEmitType(e.constraint,t)&&this.canEmitType(e.default,t))}canEmitType(t,e){return t===void 0?!0:eg(t,n=>{let r=this.resolveTypeReference(n);return r===null?!1:r instanceof es?e(r):!0})}emit(t){if(this.typeParameters===void 0)return;let e=new tg(n=>this.translateTypeReference(n,t));return this.typeParameters.map(n=>{let r=n.constraint!==void 0?e.emitType(n.constraint):void 0,s=n.default!==void 0?e.emitType(n.default):void 0;return co.default.factory.updateTypeParameterDeclaration(n,n.modifiers,n.name,r,s)})}resolveTypeReference(t){let e=co.default.isIdentifier(t.typeName)?t.typeName:t.typeName.right,n=this.reflector.getDeclarationOfIdentifier(e);if(n===null||n.node===null)return null;if(this.isLocalTypeParameter(n.node))return t;let r=null;return typeof n.viaModule=="string"&&(r={specifier:n.viaModule,resolutionContext:t.getSourceFile().fileName}),new es(n.node,n.viaModule===Zr?Zr:r)}translateTypeReference(t,e){let n=this.resolveTypeReference(t);if(!(n instanceof es))return n;let r=e(n);if(r===null)return null;if(!co.default.isTypeReferenceNode(r))throw new Error(`Expected TypeReferenceNode for emitted reference, got ${co.default.SyntaxKind[r.kind]}.`);return r}isLocalTypeParameter(t){return this.typeParameters.some(e=>e===t)}},fO=[f.InputSignalBrandWriteType],dg;(function(t){t[t.MustInline=0]="MustInline",t[t.ShouldInlineForGenericBounds=1]="ShouldInlineForGenericBounds",t[t.None=2]="None"})(dg||(dg={}));function d0(t,e,n){return new f0(t.typeParameters,e).canEmit(s=>n.canReferenceType(s))}function m0(t,e,n){return!d0(t,e,n)}function Ie(t){return mo.default.factory.createParenthesizedExpression(t)}function ts(t){return mo.default.factory.createParenthesizedExpression(t)}function B(t,e){let n;e instanceof We?n=`${e.start},${e.end}`:n=`${e.start.offset},${e.end.offset}`,mo.default.addSyntheticTrailingComment(t,mo.default.SyntaxKind.MultiLineCommentTrivia,n,!1)}var ns=D.default.factory.createAsExpression(D.default.factory.createNull(),D.default.factory.createKeywordTypeNode(D.default.SyntaxKind.AnyKeyword)),Zu=D.default.factory.createIdentifier("undefined"),v0=new Map([["+",D.default.SyntaxKind.PlusToken],["-",D.default.SyntaxKind.MinusToken]]),E0=new Map([["+",D.default.SyntaxKind.PlusToken],["-",D.default.SyntaxKind.MinusToken],["<",D.default.SyntaxKind.LessThanToken],[">",D.default.SyntaxKind.GreaterThanToken],["<=",D.default.SyntaxKind.LessThanEqualsToken],[">=",D.default.SyntaxKind.GreaterThanEqualsToken],["==",D.default.SyntaxKind.EqualsEqualsToken],["===",D.default.SyntaxKind.EqualsEqualsEqualsToken],["*",D.default.SyntaxKind.AsteriskToken],["/",D.default.SyntaxKind.SlashToken],["%",D.default.SyntaxKind.PercentToken],["!=",D.default.SyntaxKind.ExclamationEqualsToken],["!==",D.default.SyntaxKind.ExclamationEqualsEqualsToken],["||",D.default.SyntaxKind.BarBarToken],["&&",D.default.SyntaxKind.AmpersandAmpersandToken],["&",D.default.SyntaxKind.AmpersandToken],["|",D.default.SyntaxKind.BarToken],["??",D.default.SyntaxKind.QuestionQuestionToken]]);function S0(t,e,n){return new w0(e,n).translate(t)}var w0=class{constructor(t,e){this.maybeResolve=t,this.config=e}translate(t){if(t instanceof we&&(t=t.ast),t instanceof Ue){let n=D.default.factory.createIdentifier("undefined");return B(n,t.sourceSpan),n}let e=this.maybeResolve(t);return e!==null?e:t.visit(this)}visitUnary(t){let e=this.translate(t.expr),n=v0.get(t.operator);if(n===void 0)throw new Error(`Unsupported Unary.operator: ${t.operator}`);let r=Ie(D.default.factory.createPrefixUnaryExpression(n,e));return B(r,t.sourceSpan),r}visitBinary(t){let e=Ie(this.translate(t.left)),n=Ie(this.translate(t.right)),r=E0.get(t.operation);if(r===void 0)throw new Error(`Unsupported Binary.operation: ${t.operation}`);let s=D.default.factory.createBinaryExpression(e,r,n);return B(s,t.sourceSpan),s}visitChain(t){let e=t.expressions.map(r=>this.translate(r)),n=Ie(D.default.factory.createCommaListExpression(e));return B(n,t.sourceSpan),n}visitConditional(t){let e=this.translate(t.condition),n=this.translate(t.trueExp),r=ts(this.translate(t.falseExp)),s=D.default.factory.createParenthesizedExpression(D.default.factory.createConditionalExpression(e,void 0,n,void 0,r));return B(s,t.sourceSpan),s}visitImplicitReceiver(t){throw new Error("Method not implemented.")}visitThisReceiver(t){throw new Error("Method not implemented.")}visitInterpolation(t){return t.expressions.reduce((e,n)=>D.default.factory.createBinaryExpression(e,D.default.SyntaxKind.PlusToken,ts(this.translate(n))),D.default.factory.createStringLiteral(""))}visitKeyedRead(t){let e=Ie(this.translate(t.receiver)),n=this.translate(t.key),r=D.default.factory.createElementAccessExpression(e,n);return B(r,t.sourceSpan),r}visitKeyedWrite(t){let e=Ie(this.translate(t.receiver)),n=D.default.factory.createElementAccessExpression(e,this.translate(t.key)),r=ts(this.translate(t.value)),s=Ie(D.default.factory.createBinaryExpression(n,D.default.SyntaxKind.EqualsToken,r));return B(s,t.sourceSpan),s}visitLiteralArray(t){let e=t.expressions.map(s=>this.translate(s)),n=D.default.factory.createArrayLiteralExpression(e),r=this.config.strictLiteralTypes?n:jn(n);return B(r,t.sourceSpan),r}visitLiteralMap(t){let e=t.keys.map(({key:s},i)=>{let o=this.translate(t.values[i]);return D.default.factory.createPropertyAssignment(D.default.factory.createStringLiteral(s),o)}),n=D.default.factory.createObjectLiteralExpression(e,!0),r=this.config.strictLiteralTypes?n:jn(n);return B(r,t.sourceSpan),r}visitLiteralPrimitive(t){let e;if(t.value===void 0)e=D.default.factory.createIdentifier("undefined");else if(t.value===null)e=D.default.factory.createNull();else if(typeof t.value=="string")e=D.default.factory.createStringLiteral(t.value);else if(typeof t.value=="number")e=u0(t.value);else if(typeof t.value=="boolean")e=t.value?D.default.factory.createTrue():D.default.factory.createFalse();else throw Error(`Unsupported AST value of type ${typeof t.value}`);return B(e,t.sourceSpan),e}visitNonNullAssert(t){let e=Ie(this.translate(t.expression)),n=D.default.factory.createNonNullExpression(e);return B(n,t.sourceSpan),n}visitPipe(t){throw new Error("Method not implemented.")}visitPrefixNot(t){let e=Ie(this.translate(t.expression)),n=D.default.factory.createLogicalNot(e);return B(n,t.sourceSpan),n}visitPropertyRead(t){let e=Ie(this.translate(t.receiver)),n=D.default.factory.createPropertyAccessExpression(e,t.name);B(n,t.nameSpan);let r=Ie(n);return B(r,t.sourceSpan),r}visitPropertyWrite(t){let e=Ie(this.translate(t.receiver)),n=D.default.factory.createPropertyAccessExpression(e,t.name);B(n,t.nameSpan);let r=Ie(n);B(r,t.sourceSpan);let s=ts(this.translate(t.value)),i=Ie(D.default.factory.createBinaryExpression(r,D.default.SyntaxKind.EqualsToken,s));return B(i,t.sourceSpan),i}visitSafePropertyRead(t){let e,n=Ie(this.translate(t.receiver));if(this.config.strictSafeNavigationTypes){let r=D.default.factory.createPropertyAccessExpression(D.default.factory.createNonNullExpression(n),t.name);B(r,t.nameSpan),e=D.default.factory.createParenthesizedExpression(D.default.factory.createConditionalExpression(ns,void 0,r,void 0,Zu))}else if(ep.veWillInferAnyFor(t))e=D.default.factory.createPropertyAccessExpression(jn(n),t.name);else{let r=D.default.factory.createPropertyAccessExpression(D.default.factory.createNonNullExpression(n),t.name);B(r,t.nameSpan),e=jn(r)}return B(e,t.sourceSpan),e}visitSafeKeyedRead(t){let e=Ie(this.translate(t.receiver)),n=this.translate(t.key),r;if(this.config.strictSafeNavigationTypes){let s=D.default.factory.createElementAccessExpression(D.default.factory.createNonNullExpression(e),n);B(s,t.sourceSpan),r=D.default.factory.createParenthesizedExpression(D.default.factory.createConditionalExpression(ns,void 0,s,void 0,Zu))}else if(ep.veWillInferAnyFor(t))r=D.default.factory.createElementAccessExpression(jn(e),n);else{let s=D.default.factory.createElementAccessExpression(D.default.factory.createNonNullExpression(e),n);B(s,t.sourceSpan),r=jn(s)}return B(r,t.sourceSpan),r}visitCall(t){let e=t.args.map(i=>this.translate(i)),n,r=t.receiver;if(r instanceof Ce){let i=this.maybeResolve(r);if(i!==null)n=i;else{let o=Ie(this.translate(r.receiver));n=D.default.factory.createPropertyAccessExpression(o,r.name),B(n,r.nameSpan)}}else n=this.translate(r);let s;return t.receiver instanceof lt||t.receiver instanceof pr?s=this.convertToSafeCall(t,n,e):s=D.default.factory.createCallExpression(n,void 0,e),B(s,t.sourceSpan),s}visitSafeCall(t){let e=t.args.map(s=>this.translate(s)),n=Ie(this.translate(t.receiver)),r=this.convertToSafeCall(t,n,e);return B(r,t.sourceSpan),r}convertToSafeCall(t,e,n){if(this.config.strictSafeNavigationTypes){let r=D.default.factory.createCallExpression(D.default.factory.createNonNullExpression(e),void 0,n);return D.default.factory.createParenthesizedExpression(D.default.factory.createConditionalExpression(ns,void 0,r,void 0,Zu))}return ep.veWillInferAnyFor(t)?D.default.factory.createCallExpression(jn(e),void 0,n):jn(D.default.factory.createCallExpression(D.default.factory.createNonNullExpression(e),void 0,n))}},za=class{static veWillInferAnyFor(t){let e=za.SINGLETON;return t instanceof yn?t.visit(e):t.receiver.visit(e)}visitUnary(t){return t.expr.visit(this)}visitBinary(t){return t.left.visit(this)||t.right.visit(this)}visitChain(t){return!1}visitConditional(t){return t.condition.visit(this)||t.trueExp.visit(this)||t.falseExp.visit(this)}visitCall(t){return!0}visitSafeCall(t){return!1}visitImplicitReceiver(t){return!1}visitThisReceiver(t){return!1}visitInterpolation(t){return t.expressions.some(e=>e.visit(this))}visitKeyedRead(t){return!1}visitKeyedWrite(t){return!1}visitLiteralArray(t){return!0}visitLiteralMap(t){return!0}visitLiteralPrimitive(t){return!1}visitPipe(t){return!0}visitPrefixNot(t){return t.expression.visit(this)}visitNonNullAssert(t){return t.expression.visit(this)}visitPropertyRead(t){return!1}visitPropertyWrite(t){return!1}visitSafePropertyRead(t){return!1}visitSafeKeyedRead(t){return!1}},ep=za;za.SINGLETON=new za;var mg;(function(t){t[t.UseEmitter=0]="UseEmitter",t[t.CopyClassNodes=1]="CopyClassNodes",t[t.FallbackToAny=2]="FallbackToAny"})(mg||(mg={}));var Se=class{circularFallback(){return V0}},T0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.element=n}get optional(){return!0}execute(){let t=this.tcb.allocateId(),e=l0(this.element.name);return B(e,this.element.startSourceSpan||this.element.sourceSpan),this.scope.addStatement(Kn(t,e)),t}},x0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.template=n,this.variable=r}get optional(){return!1}execute(){let t=this.scope.resolve(this.template),e=this.tcb.allocateId(),n=E.default.factory.createPropertyAccessExpression(t,this.variable.value||"$implicit");B(e,this.variable.keySpan);let r;return this.variable.valueSpan!==void 0?(B(n,this.variable.valueSpan),r=Kn(e,ts(n))):r=Kn(e,n),B(r.declarationList.declarations[0],this.variable.sourceSpan),this.scope.addStatement(r),e}},C0=class extends Se{constructor(t,e){super(),this.tcb=t,this.scope=e,this.optional=!0}execute(){let t=this.tcb.allocateId(),e=E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword);return this.scope.addStatement(fo(t,e)),t}},I0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.node=n,this.optional=!1}execute(){let t=this.tcb.allocateId();B(t,this.node.nameSpan);let e=Pt(this.node.value,this.tcb,this.scope),n=Kn(t,ts(e),E.default.NodeFlags.Const);return B(n.declarationList.declarations[0],this.node.sourceSpan),this.scope.addStatement(n),t}},A0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.template=n}get optional(){return!1}execute(){let t=[],e=this.tcb.boundTarget.getDirectivesOfNode(this.template);if(e!==null)for(let o of e){let a=this.scope.resolve(this.template,o),l=this.tcb.env.reference(o.ref);if(o.ngTemplateGuards.forEach(c=>{let u=this.template.inputs.find(h=>h.name===c.inputName)||this.template.templateAttrs.find(h=>h instanceof _t&&h.name===c.inputName);if(u!==void 0){let h=Pt(u.value,this.tcb,this.scope);if(Tr(h),c.type==="binding")t.push(h);else{let d=fg(l,`ngTemplateGuard_${c.inputName}`,[a,h]);B(d,u.value.sourceSpan),t.push(d)}}}),o.hasNgTemplateContextGuard)if(this.tcb.env.config.applyTemplateContextGuards){let c=this.scope.resolve(this.template),u=fg(l,"ngTemplateContextGuard",[a,c]);B(u,this.template.sourceSpan),t.push(u)}else this.template.variables.length>0&&this.tcb.env.config.suggestionsForSuboptimalTypeInference&&this.tcb.oobRecorder.suboptimalTypeInference(this.tcb.id,this.template.variables)}let n=null;t.length>0&&(n=t.reduce((o,a)=>E.default.factory.createBinaryExpression(o,E.default.SyntaxKind.AmpersandAmpersandToken,a),t.pop()));let s=go.forNodes(this.tcb,this.scope,this.template,this.template.children,n).render();if(s.length===0)return null;let i=E.default.factory.createBlock(s);return n!==null&&(i=E.default.factory.createIfStatement(n,i)),this.scope.addStatement(i),null}},Wa=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.expression=n}get optional(){return!1}execute(){let t=Pt(this.expression,this.tcb,this.scope);return this.scope.addStatement(E.default.factory.createExpressionStatement(t)),null}},Dg=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.node=n,this.dir=r}get optional(){return!0}execute(){let t=this.dir.ref,e=this.tcb.env.referenceType(this.dir.ref),n;if(this.dir.isGeneric===!1||t.node.typeParameters===void 0)n=e;else{if(!E.default.isTypeReferenceNode(e))throw new Error(`Expected TypeReferenceNode when referencing the type for ${this.dir.ref.debugName}`);let s=t.node.typeParameters.map(()=>E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword));n=E.default.factory.createTypeReferenceNode(e.typeName,s)}let r=this.tcb.allocateId();return vo(r,rs.DIRECTIVE),B(r,this.node.startSourceSpan||this.node.sourceSpan),this.scope.addStatement(fo(r,n)),r}},N0=class extends Dg{execute(){let t=this.dir.ref;if(this.dir.isGeneric)throw new Error(`Assertion Error: expected ${t.debugName} not to be generic.`);return super.execute()}},b0=class extends Dg{execute(){let t=this.dir.ref;if(t.node.typeParameters===void 0)throw new Error(`Assertion Error: expected typeParameters when creating a declaration for ${t.debugName}`);return super.execute()}},gg=class extends Se{constructor(t,e,n,r,s){super(),this.tcb=t,this.scope=e,this.node=n,this.host=r,this.target=s,this.optional=!0}execute(){let t=this.tcb.allocateId(),e=this.target instanceof se||this.target instanceof oe?this.scope.resolve(this.target):this.scope.resolve(this.host,this.target);return this.target instanceof oe&&!this.tcb.env.config.checkTypeOfDomReferences||!this.tcb.env.config.checkTypeOfNonDomReferences?e=E.default.factory.createAsExpression(e,E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword)):this.target instanceof se&&(e=E.default.factory.createAsExpression(e,E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword)),e=E.default.factory.createAsExpression(e,this.tcb.env.referenceExternalType("@angular/core","TemplateRef",[Sr])),e=E.default.factory.createParenthesizedExpression(e)),B(e,this.node.sourceSpan),B(t,this.node.keySpan),this.scope.addStatement(Kn(t,e)),t}},D0=class extends Se{constructor(t,e){super(),this.tcb=t,this.scope=e,this.optional=!0}execute(){let t=this.tcb.allocateId();return this.scope.addStatement(Kn(t,ns)),t}},_0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.node=n,this.dir=r}get optional(){return!0}execute(){let t=this.tcb.allocateId();vo(t,rs.DIRECTIVE),B(t,this.node.startSourceSpan||this.node.sourceSpan);let e=new Map,n=Rg(this.dir,this.node);for(let s of n)if(!(!this.tcb.env.config.checkTypeOfAttributes&&s.attribute instanceof Dt))for(let{fieldName:i,isTwoWayBinding:o}of s.inputs){if(e.has(i))continue;let a=kg(s.attribute,this.tcb,this.scope);e.set(i,{type:"binding",field:i,expression:a,sourceSpan:s.attribute.sourceSpan,isTwoWayBinding:o})}for(let{classPropertyName:s}of this.dir.inputs)e.has(s)||e.set(s,{type:"unset",field:s});let r=q0(this.dir,this.tcb,Array.from(e.values()));return Tr(r),this.scope.addStatement(Kn(t,r)),t}circularFallback(){return new k0(this.tcb,this.scope,this.node,this.dir)}},R0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.node=n,this.dir=r}get optional(){return!1}execute(){let t=null,e=Rg(this.dir,this.node),n=new Set;for(let r of e){let s=gp(kg(r.attribute,this.tcb,this.scope),this.tcb),i=Ie(s);for(let{fieldName:o,required:a,transformType:l,isSignal:c,isTwoWayBinding:u}of r.inputs){let h;if(a&&n.add(o),this.dir.coercedInputFields.has(o)){let d;if(l!==null)d=this.tcb.env.referenceTransplantedType(new xs(l));else{let y=this.tcb.env.referenceType(this.dir.ref);if(!E.default.isTypeReferenceNode(y))throw new Error(`Expected TypeReferenceNode from reference to ${this.dir.ref.debugName}`);d=c0(y.typeName,o)}let g=this.tcb.allocateId();this.scope.addStatement(fo(g,d)),h=g}else{if(this.dir.undeclaredInputFields.has(o))continue;if(!this.tcb.env.config.honorAccessModifiersForInputBindings&&this.dir.restrictedInputFields.has(o)){t===null&&(t=this.scope.resolve(this.node,this.dir));let d=this.tcb.allocateId(),g=this.tcb.env.referenceType(this.dir.ref);if(!E.default.isTypeReferenceNode(g))throw new Error(`Expected TypeReferenceNode from reference to ${this.dir.ref.debugName}`);let y=E.default.factory.createIndexedAccessTypeNode(E.default.factory.createTypeQueryNode(t),E.default.factory.createLiteralTypeNode(E.default.factory.createStringLiteral(o))),C=fo(d,y);this.scope.addStatement(C),h=d}else t===null&&(t=this.scope.resolve(this.node,this.dir)),h=this.dir.stringLiteralInputFields.has(o)?E.default.factory.createElementAccessExpression(t,E.default.factory.createStringLiteral(o)):E.default.factory.createPropertyAccessExpression(t,E.default.factory.createIdentifier(o))}if(c){let d=this.tcb.env.referenceExternalSymbol(f.InputSignalBrandWriteType.moduleName,f.InputSignalBrandWriteType.name);if(!E.default.isIdentifier(d)&&!E.default.isPropertyAccessExpression(d))throw new Error(`Expected identifier or property access for reference to ${f.InputSignalBrandWriteType.name}`);h=E.default.factory.createElementAccessExpression(h,d)}r.attribute.keySpan!==void 0&&B(h,r.attribute.keySpan),u&&this.tcb.env.config.allowSignalsInTwoWayBindings&&(i=Pg(i,this.tcb)),i=E.default.factory.createBinaryExpression(h,E.default.SyntaxKind.EqualsToken,i)}B(i,r.attribute.sourceSpan),!this.tcb.env.config.checkTypeOfAttributes&&r.attribute instanceof Dt&&Tr(i),this.scope.addStatement(E.default.factory.createExpressionStatement(i))}return this.checkRequiredInputs(n),null}checkRequiredInputs(t){let e=[];for(let n of this.dir.inputs)n.required&&!t.has(n.classPropertyName)&&e.push(n.bindingPropertyName);e.length>0&&this.tcb.oobRecorder.missingRequiredInputs(this.tcb.id,this.node,this.dir.name,this.dir.isComponent,e)}},k0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.node=n,this.dir=r}get optional(){return!1}execute(){let t=this.tcb.allocateId(),e=this.tcb.env.typeCtorFor(this.dir),n=E.default.factory.createCallExpression(e,void 0,[E.default.factory.createNonNullExpression(E.default.factory.createNull())]);return this.scope.addStatement(Kn(t,n)),t}},tp=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.element=e,this.checkElement=n,this.claimedInputs=r}get optional(){return!1}execute(){var t;this.checkElement&&this.tcb.domSchemaChecker.checkElement(this.tcb.id,this.element,this.tcb.schemas,this.tcb.hostIsStandalone);for(let e of this.element.inputs){let n=e.type===z.Property||e.type===z.TwoWay;if(!(n&&this.claimedInputs.has(e.name))&&n&&e.name!=="style"&&e.name!=="class"){let r=(t=_g.get(e.name))!=null?t:e.name;this.tcb.domSchemaChecker.checkProperty(this.tcb.id,this.element,r,e.sourceSpan,this.tcb.schemas,this.tcb.hostIsStandalone)}}return null}},P0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.element=e,this.ngContentSelectors=n,this.componentName=r,this.optional=!1,this.category=t.env.config.controlFlowPreventingContentProjection==="error"?E.default.DiagnosticCategory.Error:E.default.DiagnosticCategory.Warning}execute(){let t=this.findPotentialControlFlowNodes();if(t.length>0){let e=new or;for(let n of this.ngContentSelectors)n!=="*"&&e.addSelectables(Yt.parse(n),n);for(let n of t)for(let r of n.children)(r instanceof oe||r instanceof se)&&e.match(du(r),(s,i)=>{this.tcb.oobRecorder.controlFlowPreventingContentProjection(this.tcb.id,this.category,r,this.componentName,i,n,this.tcb.hostPreserveWhitespaces)})}return null}findPotentialControlFlowNodes(){let t=[];for(let e of this.element.children)if(e instanceof En)this.shouldCheck(e)&&t.push(e),e.empty!==null&&this.shouldCheck(e.empty)&&t.push(e.empty);else if(e instanceof Vr)for(let n of e.branches)this.shouldCheck(n)&&t.push(n);else if(e instanceof Ur)for(let n of e.cases)this.shouldCheck(n)&&t.push(n);return t}shouldCheck(t){if(t.children.length<2)return!1;let e=!1;for(let n of t.children)if(!(n instanceof Kt)||this.tcb.hostPreserveWhitespaces||n.value.trim().length>0){if(e)return!0;e=!0}return!1}},_g=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),yg=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.element=n,this.claimedInputs=r}get optional(){return!1}execute(){var t;let e=null;for(let n of this.element.inputs){let r=n.type===z.Property||n.type===z.TwoWay;if(r&&this.claimedInputs.has(n.name))continue;let s=gp(Pt(n.value,this.tcb,this.scope),this.tcb);if(this.tcb.env.config.checkTypeOfDomBindings&&r)if(n.name!=="style"&&n.name!=="class"){e===null&&(e=this.scope.resolve(this.element));let i=(t=_g.get(n.name))!=null?t:n.name,o=E.default.factory.createElementAccessExpression(e,E.default.factory.createStringLiteral(i)),a=E.default.factory.createBinaryExpression(o,E.default.SyntaxKind.EqualsToken,Ie(s));B(a,n.sourceSpan),this.scope.addStatement(E.default.factory.createExpressionStatement(a))}else this.scope.addStatement(E.default.factory.createExpressionStatement(s));else this.scope.addStatement(E.default.factory.createExpressionStatement(s))}return null}},M0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.node=n,this.dir=r}get optional(){return!1}execute(){let t=null,e=this.dir.outputs;for(let n of this.node.outputs){if(n.type===_e.Animation||!e.hasBindingPropertyName(n.name))continue;if(this.tcb.env.config.checkTypeOfOutputEvents&&n.name.endsWith("Change")){let i=n.name.slice(0,-6);Mg(i,n,this.node.inputs,this.tcb)}let r=e.getByBindingPropertyName(n.name)[0].classPropertyName;t===null&&(t=this.scope.resolve(this.node,this.dir));let s=E.default.factory.createElementAccessExpression(t,E.default.factory.createStringLiteral(r));if(B(s,n.keySpan),this.tcb.env.config.checkTypeOfOutputEvents){let i=po(n,this.tcb,this.scope,0),o=E.default.factory.createPropertyAccessExpression(s,"subscribe"),a=E.default.factory.createCallExpression(o,void 0,[i]);B(a,n.sourceSpan),this.scope.addStatement(E.default.factory.createExpressionStatement(a))}else{this.scope.addStatement(E.default.factory.createExpressionStatement(s));let i=po(n,this.tcb,this.scope,1);this.scope.addStatement(E.default.factory.createExpressionStatement(i))}}return null}},vg=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.element=n,this.claimedOutputs=r}get optional(){return!1}execute(){let t=null;for(let e of this.element.outputs)if(!this.claimedOutputs.has(e.name)){if(this.tcb.env.config.checkTypeOfOutputEvents&&e.name.endsWith("Change")){let n=e.name.slice(0,-6);if(Mg(n,e,this.element.inputs,this.tcb))continue}if(e.type===_e.Animation){let n=this.tcb.env.config.checkTypeOfAnimationEvents?this.tcb.env.referenceExternalType("@angular/animations","AnimationEvent"):1,r=po(e,this.tcb,this.scope,n);this.scope.addStatement(E.default.factory.createExpressionStatement(r))}else if(this.tcb.env.config.checkTypeOfDomEvents){let n=po(e,this.tcb,this.scope,0);t===null&&(t=this.scope.resolve(this.element));let r=E.default.factory.createPropertyAccessExpression(t,"addEventListener");B(r,e.keySpan);let s=E.default.factory.createCallExpression(r,void 0,[E.default.factory.createStringLiteral(e.name),n]);B(s,e.sourceSpan),this.scope.addStatement(E.default.factory.createExpressionStatement(s))}else{let n=po(e,this.tcb,this.scope,1);this.scope.addStatement(E.default.factory.createExpressionStatement(n))}}return null}},L0=class extends Se{constructor(t){super(),this.scope=t,this.optional=!1}execute(){let t=E.default.factory.createThis(),e=E.default.factory.createPropertyAccessExpression(t,"");return Tr(e),vo(e,rs.COMPONENT_COMPLETION),this.scope.addStatement(E.default.factory.createExpressionStatement(e)),null}},O0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.initializer=n,this.variable=r}get optional(){return!1}execute(){let t=this.tcb.allocateId();B(t,this.variable.keySpan);let e=Kn(t,ts(this.initializer));return B(e.declarationList.declarations[0],this.variable.sourceSpan),this.scope.addStatement(e),t}},F0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.type=n,this.variable=r,this.optional=!0}execute(){let t=this.tcb.allocateId();B(t,this.variable.keySpan);let e=fo(t,this.type);return B(e.declarationList.declarations[0],this.variable.sourceSpan),this.scope.addStatement(e),t}},B0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.block=n,this.expressionScopes=new Map}get optional(){return!1}execute(){let t=this.generateBranch(0);return t&&this.scope.addStatement(t),null}generateBranch(t){let e=this.block.branches[t];if(!e)return;if(e.expression===null){let i=this.getBranchScope(this.scope,e,t);return E.default.factory.createBlock(i.render())}let n=go.forNodes(this.tcb,this.scope,e,[],null);n.render().forEach(i=>this.scope.addStatement(i)),this.expressionScopes.set(e,n);let r=Pt(e.expression,this.tcb,this.scope);e.expressionAlias!==null&&(r=E.default.factory.createBinaryExpression(E.default.factory.createParenthesizedExpression(r),E.default.SyntaxKind.AmpersandAmpersandToken,n.resolve(e.expressionAlias)));let s=this.getBranchScope(n,e,t);return E.default.factory.createIfStatement(r,E.default.factory.createBlock(s.render()),this.generateBranch(t+1))}getBranchScope(t,e,n){let r=this.tcb.env.config.checkControlFlowBodies;return go.forNodes(this.tcb,t,null,r?e.children:[],r?this.generateBranchGuard(n):null)}generateBranchGuard(t){let e=null;for(let n=0;n<=t;n++){let r=this.block.branches[n];if(r.expression===null)continue;if(!this.expressionScopes.has(r))throw new Error(`Could not determine expression scope of branch at index ${n}`);let s=this.expressionScopes.get(r),i;i=Pt(r.expression,this.tcb,s),r.expressionAlias!==null&&(i=E.default.factory.createBinaryExpression(E.default.factory.createParenthesizedExpression(i),E.default.SyntaxKind.AmpersandAmpersandToken,s.resolve(r.expressionAlias))),Tr(i);let o=n===t?i:E.default.factory.createPrefixUnaryExpression(E.default.SyntaxKind.ExclamationToken,E.default.factory.createParenthesizedExpression(i));e=e===null?o:E.default.factory.createBinaryExpression(e,E.default.SyntaxKind.AmpersandAmpersandToken,o)}return e}},$0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.block=n}get optional(){return!1}execute(){let t=Pt(this.block.expression,this.tcb,this.scope),e=this.block.cases.map(n=>{let r=this.tcb.env.config.checkControlFlowBodies,s=go.forNodes(this.tcb,this.scope,null,r?n.children:[],r?this.generateGuard(n,t):null),i=[...s.render(),E.default.factory.createBreakStatement()];return n.expression===null?E.default.factory.createDefaultClause(i):E.default.factory.createCaseClause(Pt(n.expression,this.tcb,s),i)});return this.scope.addStatement(E.default.factory.createSwitchStatement(t,E.default.factory.createCaseBlock(e))),null}generateGuard(t,e){if(t.expression!==null){let r=Pt(t.expression,this.tcb,this.scope);return Tr(r),E.default.factory.createBinaryExpression(e,E.default.SyntaxKind.EqualsEqualsEqualsToken,r)}let n=null;for(let r of this.block.cases){if(r.expression===null)continue;let s=Pt(r.expression,this.tcb,this.scope);Tr(s);let i=E.default.factory.createBinaryExpression(e,E.default.SyntaxKind.ExclamationEqualsEqualsToken,s);n===null?n=i:n=E.default.factory.createBinaryExpression(n,E.default.SyntaxKind.AmpersandAmpersandToken,i)}return n}},U0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.block=n}get optional(){return!1}execute(){let t=go.forNodes(this.tcb,this.scope,this.block,this.tcb.env.config.checkControlFlowBodies?this.block.children:[],null),e=t.resolve(this.block.item);if(!E.default.isIdentifier(e))throw new Error(`Could not resolve for loop variable ${this.block.item.name} to an identifier`);let n=E.default.factory.createVariableDeclarationList([E.default.factory.createVariableDeclaration(e)],E.default.NodeFlags.Const);B(n,this.block.item.keySpan);let r=E.default.factory.createNonNullExpression(Pt(this.block.expression,this.tcb,this.scope)),i=new W0(this.tcb,t,this.block).translate(this.block.trackBy),o=[...t.render(),E.default.factory.createExpressionStatement(i)];return this.scope.addStatement(E.default.factory.createForOfStatement(void 0,n,r,E.default.factory.createBlock(o))),null}},V0=E.default.factory.createNonNullExpression(E.default.factory.createNull());var uo=class{constructor(t,e=null,n=null){this.tcb=t,this.parent=e,this.guard=n,this.opQueue=[],this.elementOpMap=new Map,this.directiveOpMap=new Map,this.referenceOpMap=new Map,this.templateCtxOpMap=new Map,this.varMap=new Map,this.letDeclOpMap=new Map,this.statements=[]}static forNodes(t,e,n,r,s){let i=new uo(t,e,s);if(e===null&&t.env.config.enableTemplateTypeChecker&&i.opQueue.push(new L0(i)),n instanceof se){let o=new Map;for(let a of n.variables){if(!o.has(a.name))o.set(a.name,a);else{let l=o.get(a.name);t.oobRecorder.duplicateTemplateVar(t.id,a,l)}this.registerVariable(i,a,new x0(t,i,n,a))}}else if(n instanceof _n){let{expression:o,expressionAlias:a}=n;o!==null&&a!==null&&this.registerVariable(i,a,new O0(t,i,Pt(o,t,i),a))}else if(n instanceof En){let o=t.allocateId();B(o,n.item.sourceSpan),i.varMap.set(n.item,o);for(let a of n.contextVariables){if(!this.forLoopContextVariableTypes.has(a.value))throw new Error(`Unrecognized for loop context variable ${a.name}`);let l=E.default.factory.createKeywordTypeNode(this.forLoopContextVariableTypes.get(a.value));this.registerVariable(i,a,new F0(t,i,l,a))}}for(let o of r)i.appendNode(o);for(let o of i.varMap.keys())uo.checkConflictingLet(i,o);for(let o of i.referenceOpMap.keys())uo.checkConflictingLet(i,o);return i}static registerVariable(t,e,n){let r=t.opQueue.push(n)-1;t.varMap.set(e,r)}resolve(t,e){let n=this.resolveLocal(t,e);if(n!==null){let r;if(E.default.isIdentifier(n))r=E.default.factory.createIdentifier(n.text);else if(E.default.isNonNullExpression(n))r=E.default.factory.createNonNullExpression(n.expression);else throw new Error(`Could not resolve ${t} to an Identifier or a NonNullExpression`);return E.default.setOriginalNode(r,n),r.parent=r.parent,E.default.setSyntheticTrailingComments(r,[])}else{if(this.parent!==null)return this.parent.resolve(t,e);throw new Error(`Could not resolve ${t} / ${e}`)}}addStatement(t){this.statements.push(t)}render(){for(let t=0;t<this.opQueue.length;t++){let e=!this.tcb.env.config.enableTemplateTypeChecker;this.executeOp(t,e)}return this.statements}guards(){let t=null;return this.parent!==null&&(t=this.parent.guards()),this.guard===null?t:t===null?this.guard:E.default.factory.createBinaryExpression(t,E.default.SyntaxKind.AmpersandAmpersandToken,this.guard)}isLocal(t){return t instanceof ct?this.varMap.has(t):t instanceof yt?this.letDeclOpMap.has(t.name):this.referenceOpMap.has(t)}resolveLocal(t,e){if(t instanceof Sn&&this.referenceOpMap.has(t))return this.resolveOp(this.referenceOpMap.get(t));if(t instanceof yt&&this.letDeclOpMap.has(t.name))return this.resolveOp(this.letDeclOpMap.get(t.name).opIndex);if(t instanceof ct&&this.varMap.has(t)){let n=this.varMap.get(t);return typeof n=="number"?this.resolveOp(n):n}else{if(t instanceof se&&e===void 0&&this.templateCtxOpMap.has(t))return this.resolveOp(this.templateCtxOpMap.get(t));if((t instanceof oe||t instanceof se)&&e!==void 0&&this.directiveOpMap.has(t)){let n=this.directiveOpMap.get(t);return n.has(e)?this.resolveOp(n.get(e)):null}else return t instanceof oe&&this.elementOpMap.has(t)?this.resolveOp(this.elementOpMap.get(t)):null}}resolveOp(t){let e=this.executeOp(t,!1);if(e===null)throw new Error("Error resolving operation, got null");return e}executeOp(t,e){let n=this.opQueue[t];if(!(n instanceof Se))return n;if(e&&n.optional)return null;this.opQueue[t]=n.circularFallback();let r=n.execute();return this.opQueue[t]=r,r}appendNode(t){if(t instanceof oe){let e=this.opQueue.push(new T0(this.tcb,this,t))-1;this.elementOpMap.set(t,e),this.tcb.env.config.controlFlowPreventingContentProjection!=="suppress"&&this.appendContentProjectionCheckOp(t),this.appendDirectivesAndInputsOfNode(t),this.appendOutputsOfNode(t),this.appendChildren(t),this.checkAndAppendReferencesOfNode(t)}else if(t instanceof se){this.appendDirectivesAndInputsOfNode(t),this.appendOutputsOfNode(t);let e=this.opQueue.push(new C0(this.tcb,this))-1;this.templateCtxOpMap.set(t,e),this.tcb.env.config.checkTemplateBodies?this.opQueue.push(new A0(this.tcb,this,t)):this.tcb.env.config.alwaysCheckSchemaInTemplateBodies&&this.appendDeepSchemaChecks(t.children),this.checkAndAppendReferencesOfNode(t)}else if(t instanceof Un)this.appendDeferredBlock(t);else if(t instanceof Vr)this.opQueue.push(new B0(this.tcb,this,t));else if(t instanceof Ur)this.opQueue.push(new $0(this.tcb,this,t));else if(t instanceof En)this.opQueue.push(new U0(this.tcb,this,t)),t.empty&&this.tcb.env.config.checkControlFlowBodies&&this.appendChildren(t.empty);else if(t instanceof Fn)this.opQueue.push(new Wa(this.tcb,this,t.value));else if(t instanceof Ps)this.appendIcuExpressions(t);else if(t instanceof fr)this.appendChildren(t);else if(t instanceof yt){let e=this.opQueue.push(new I0(this.tcb,this,t))-1;this.isLocal(t)?this.tcb.oobRecorder.conflictingDeclaration(this.tcb.id,t):this.letDeclOpMap.set(t.name,{opIndex:e,node:t})}}appendChildren(t){for(let e of t.children)this.appendNode(e)}checkAndAppendReferencesOfNode(t){for(let e of t.references){let n=this.tcb.boundTarget.getReferenceTarget(e),r;n===null?(this.tcb.oobRecorder.missingReferenceTarget(this.tcb.id,e),r=this.opQueue.push(new D0(this.tcb,this))-1):n instanceof se||n instanceof oe?r=this.opQueue.push(new gg(this.tcb,this,e,t,n))-1:r=this.opQueue.push(new gg(this.tcb,this,e,t,n.directive))-1,this.referenceOpMap.set(e,r)}}appendDirectivesAndInputsOfNode(t){let e=new Set,n=this.tcb.boundTarget.getDirectivesOfNode(t);if(n===null||n.length===0){t instanceof oe&&(this.opQueue.push(new yg(this.tcb,this,t,e)),this.opQueue.push(new tp(this.tcb,t,!0,e)));return}else t instanceof oe&&!this.tcb.boundTarget.isDeferred(t)&&n.some(i=>i.isExplicitlyDeferred)&&this.tcb.oobRecorder.deferredComponentUsedEagerly(this.tcb.id,t);let r=new Map;for(let s of n){let i,o=this.tcb.env.reflector,a=s.ref;s.isGeneric?!m0(a.node,o,this.tcb.env)||this.tcb.env.config.useInlineTypeConstructors?i=new _0(this.tcb,this,t,s):i=new b0(this.tcb,this,t,s):i=new N0(this.tcb,this,t,s);let l=this.opQueue.push(i)-1;r.set(s,l),this.opQueue.push(new R0(this.tcb,this,t,s))}if(this.directiveOpMap.set(t,r),t instanceof oe){for(let i of n)for(let o of i.inputs.propertyNames)e.add(o);this.opQueue.push(new yg(this.tcb,this,t,e));let s=n.length===0;this.opQueue.push(new tp(this.tcb,t,s,e))}}appendOutputsOfNode(t){let e=new Set,n=this.tcb.boundTarget.getDirectivesOfNode(t);if(n===null||n.length===0){t instanceof oe&&this.opQueue.push(new vg(this.tcb,this,t,e));return}for(let r of n)this.opQueue.push(new M0(this.tcb,this,t,r));if(t instanceof oe){for(let r of n)for(let s of r.outputs.propertyNames)e.add(s);this.opQueue.push(new vg(this.tcb,this,t,e))}}appendDeepSchemaChecks(t){for(let e of t)if(e instanceof oe||e instanceof se){if(e instanceof oe){let n=new Set,r=this.tcb.boundTarget.getDirectivesOfNode(e),s;if(r===null||r.length===0)s=!1;else{s=!0;for(let i of r)for(let o of i.inputs.propertyNames)n.add(o)}this.opQueue.push(new tp(this.tcb,e,!s,n))}this.appendDeepSchemaChecks(e.children)}}appendIcuExpressions(t){for(let e of Object.values(t.vars))this.opQueue.push(new Wa(this.tcb,this,e.value));for(let e of Object.values(t.placeholders))e instanceof Fn&&this.opQueue.push(new Wa(this.tcb,this,e.value))}appendContentProjectionCheckOp(t){var e;let n=((e=this.tcb.boundTarget.getDirectivesOfNode(t))==null?void 0:e.find(r=>r.isComponent))||null;if(n!==null&&n.ngContentSelectors!==null&&n.ngContentSelectors.length>0){let r=n.ngContentSelectors;(r.length>1||r.length===1&&r[0]!=="*")&&this.opQueue.push(new P0(this.tcb,t,r,n.name))}}appendDeferredBlock(t){this.appendDeferredTriggers(t,t.triggers),this.appendDeferredTriggers(t,t.prefetchTriggers),this.appendChildren(t),t.placeholder!==null&&this.appendChildren(t.placeholder),t.loading!==null&&this.appendChildren(t.loading),t.error!==null&&this.appendChildren(t.error)}appendDeferredTriggers(t,e){e.when!==void 0&&this.opQueue.push(new Wa(this.tcb,this,e.when.value)),e.hover!==void 0&&this.appendReferenceBasedDeferredTrigger(t,e.hover),e.interaction!==void 0&&this.appendReferenceBasedDeferredTrigger(t,e.interaction),e.viewport!==void 0&&this.appendReferenceBasedDeferredTrigger(t,e.viewport)}appendReferenceBasedDeferredTrigger(t,e){this.tcb.boundTarget.getDeferredTriggerTarget(t,e)===null&&this.tcb.oobRecorder.inaccessibleDeferredTriggerElement(this.tcb.id,e)}static checkConflictingLet(t,e){t.letDeclOpMap.has(e.name)&&t.tcb.oobRecorder.conflictingDeclaration(t.tcb.id,t.letDeclOpMap.get(e.name).node)}},go=uo;uo.forLoopContextVariableTypes=new Map([["$first",E.default.SyntaxKind.BooleanKeyword],["$last",E.default.SyntaxKind.BooleanKeyword],["$even",E.default.SyntaxKind.BooleanKeyword],["$odd",E.default.SyntaxKind.BooleanKeyword],["$index",E.default.SyntaxKind.NumberKeyword],["$count",E.default.SyntaxKind.NumberKeyword]]);function Pt(t,e,n){return new mp(e,n).translate(t)}var mp=class{constructor(t,e){this.tcb=t,this.scope=e}translate(t){return S0(t,e=>this.resolve(e),this.tcb.env.config)}resolve(t){if(t instanceof Ce&&t.receiver instanceof Be){let e=this.tcb.boundTarget.getExpressionTarget(t),n=e===null?null:this.getTargetNodeExpression(e,t);return e instanceof yt&&!this.isValidLetDeclarationAccess(e,t)&&(this.tcb.oobRecorder.letUsedBeforeDefinition(this.tcb.id,t,e),n!==null)?E.default.factory.createAsExpression(n,E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword)):n}else if(t instanceof Ln&&t.receiver instanceof Be){let e=this.tcb.boundTarget.getExpressionTarget(t);if(e===null)return null;let n=this.getTargetNodeExpression(e,t),r=this.translate(t.value),s=E.default.factory.createParenthesizedExpression(E.default.factory.createBinaryExpression(n,E.default.SyntaxKind.EqualsToken,r));return B(s,t.sourceSpan),e instanceof yt&&(Tr(s),this.tcb.oobRecorder.illegalWriteToLetDeclaration(this.tcb.id,t,e)),s}else{if(t instanceof Be)return E.default.factory.createThis();if(t instanceof $r){let e=this.translate(t.exp),n=this.tcb.getPipeByName(t.name),r;n===null?(this.tcb.oobRecorder.missingPipe(this.tcb.id,t),r=ns):n.isExplicitlyDeferred&&this.tcb.boundTarget.getEagerlyUsedPipes().includes(t.name)?(this.tcb.oobRecorder.deferredPipeUsedEagerly(this.tcb.id,t),r=ns):r=this.tcb.env.pipeInst(n.ref);let s=t.args.map(a=>this.translate(a)),i=E.default.factory.createPropertyAccessExpression(r,"transform");B(i,t.nameSpan),this.tcb.env.config.checkTypeOfPipes||(i=E.default.factory.createAsExpression(i,E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword)));let o=E.default.factory.createCallExpression(i,void 0,[e,...s]);return B(o,t.sourceSpan),o}else if((t instanceof yn||t instanceof vn)&&(t.receiver instanceof Ce||t.receiver instanceof lt)){if(t.receiver.receiver instanceof Be&&!(t.receiver.receiver instanceof fn)&&t.receiver.name==="$any"&&t.args.length===1){let o=this.translate(t.args[0]),a=E.default.factory.createAsExpression(o,E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword)),l=E.default.factory.createParenthesizedExpression(a);return B(l,t.sourceSpan),l}let e=this.tcb.boundTarget.getExpressionTarget(t);if(e===null)return null;let n=this.getTargetNodeExpression(e,t),r=Ie(n);B(r,t.receiver.nameSpan);let s=t.args.map(o=>this.translate(o)),i=E.default.factory.createCallExpression(r,void 0,s);return B(i,t.sourceSpan),i}else return null}}getTargetNodeExpression(t,e){let n=this.scope.resolve(t);return B(n,e.sourceSpan),n}isValidLetDeclarationAccess(t,e){let n=t.sourceSpan.start.offset,r=t.sourceSpan.end.offset,s=e.sourceSpan.start;return n<s&&s>r||!this.scope.isLocal(t)}};function q0(t,e,n){let r=e.env.typeCtorFor(t),s=n.map(i=>{let o=E.default.factory.createStringLiteral(i.field);if(i.type==="binding"){let a=gp(i.expression,e);i.isTwoWayBinding&&e.env.config.allowSignalsInTwoWayBindings&&(a=Pg(a,e));let l=E.default.factory.createPropertyAssignment(o,Ie(a));return B(l,i.sourceSpan),l}else return E.default.factory.createPropertyAssignment(o,ns)});return E.default.factory.createCallExpression(r,void 0,[E.default.factory.createObjectLiteralExpression(s)])}function Rg(t,e){let n=[],r=s=>{if(s instanceof _t&&s.type!==z.Property&&s.type!==z.TwoWay)return;let i=t.inputs.getByBindingPropertyName(s.name);i!==null&&n.push({attribute:s,inputs:i.map(o=>{var a;return{fieldName:o.classPropertyName,required:o.required,transformType:((a=o.transform)==null?void 0:a.type)||null,isSignal:o.isSignal,isTwoWayBinding:s instanceof _t&&s.type===z.TwoWay}})})};return e.inputs.forEach(r),e.attributes.forEach(r),e instanceof se&&e.templateAttrs.forEach(r),n}function kg(t,e,n){return t instanceof _t?Pt(t.value,e,n):E.default.factory.createStringLiteral(t.value)}function gp(t,e){return e.env.config.checkTypeOfInputBindings?e.env.config.strictNullInputBindings||E.default.isObjectLiteralExpression(t)||E.default.isArrayLiteralExpression(t)?t:E.default.factory.createNonNullExpression(t):jn(t)}function Pg(t,e){let n=e.env.referenceExternalSymbol(f.unwrapWritableSignal.moduleName,f.unwrapWritableSignal.name);return E.default.factory.createCallExpression(n,void 0,[t])}var op="$event";function po(t,e,n,r){let s=G0(t.handler,e,n),i;r===0?i=void 0:r===1?i=E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword):i=r;let o=n.guards(),a=E.default.factory.createExpressionStatement(s);o!==null&&(a=E.default.factory.createIfStatement(o,a));let l=E.default.factory.createParameterDeclaration(void 0,void 0,op,void 0,i);return vo(l,rs.EVENT_PARAMETER),E.default.factory.createArrowFunction(void 0,void 0,[l],E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword),void 0,E.default.factory.createBlock([a]))}function G0(t,e,n){return new H0(e,n).translate(t)}function Mg(t,e,n,r){let s=n.find(a=>a.name===t);if(s===void 0||s.sourceSpan!==e.sourceSpan)return!1;let i=r.boundTarget.getConsumerOfBinding(s),o=r.boundTarget.getConsumerOfBinding(e);return o===null||i.ref===void 0||o instanceof se?!1:o instanceof oe?(r.oobRecorder.splitTwoWayBinding(r.id,s,e,i.ref.node,o),!0):o.ref!==i.ref?(r.oobRecorder.splitTwoWayBinding(r.id,s,e,i.ref.node,o.ref.node),!0):!1}var H0=class extends mp{resolve(t){if(t instanceof Ce&&t.receiver instanceof Be&&!(t.receiver instanceof fn)&&t.name===op){let e=E.default.factory.createIdentifier(op);return B(e,t.nameSpan),e}return super.resolve(t)}isValidLetDeclarationAccess(){return!0}},W0=class extends mp{constructor(t,e,n){super(t,e),this.block=n,this.allowedVariables=new Set([n.item]);for(let r of n.contextVariables)r.value==="$index"&&this.allowedVariables.add(r)}resolve(t){if(t instanceof Ce&&t.receiver instanceof Be){let e=this.tcb.boundTarget.getExpressionTarget(t);e!==null&&(!(e instanceof ct)||!this.allowedVariables.has(e))&&this.tcb.oobRecorder.illegalForLoopTrackAccess(this.tcb.id,this.block,t)}return super.resolve(t)}};var Eg;(function(t){t[t.InlineOps=0]="InlineOps",t[t.Error=1]="Error"})(Eg||(Eg={}));var SO=new sn;var T=x(require("typescript"),1),xr=x(require("typescript"),1),Ya=x(require("typescript"),1),qg=x(require("typescript"),1),s2=(0,Og.createRequire)(P);function yp(t,e){return e||t.import!==null&&t.import.from==="@angular/core"}var Fg="!Array<{type: !Function, args: (undefined|!Array<?>)}>";function Bg(t,e){let n=[],r=t.expression;switch(r.kind){case T.default.SyntaxKind.Identifier:n.push(T.default.factory.createPropertyAssignment("type",r));break;case T.default.SyntaxKind.CallExpression:let s=r;if(n.push(T.default.factory.createPropertyAssignment("type",s.expression)),s.arguments.length){let i=[];for(let a of s.arguments)i.push(a);let o=T.default.factory.createArrayLiteralExpression(T.default.factory.createNodeArray(i,!0));n.push(T.default.factory.createPropertyAssignment("args",o))}break;default:e.push({file:t.getSourceFile(),start:t.getStart(),length:t.getEnd()-t.getStart(),messageText:`${T.default.SyntaxKind[t.kind]} not implemented in gathering decorator metadata.`,category:T.default.DiagnosticCategory.Error,code:0});break}return T.default.factory.createObjectLiteralExpression(n)}function Y0(t,e,n,r){let s=[];for(let a of n){if(!a.type&&a.decorators.length===0){s.push(T.default.factory.createNull());continue}let l=a.type?$g(e,a.type):void 0,c=[T.default.factory.createPropertyAssignment("type",l||T.default.factory.createIdentifier("undefined"))],u=[];for(let h of a.decorators)u.push(Bg(h,t));u.length&&c.push(T.default.factory.createPropertyAssignment("decorators",T.default.factory.createArrayLiteralExpression(u))),s.push(T.default.factory.createObjectLiteralExpression(c))}let i=T.default.factory.createArrowFunction(void 0,void 0,[],void 0,T.default.factory.createToken(T.default.SyntaxKind.EqualsGreaterThanToken),T.default.factory.createArrayLiteralExpression(s,!0)),o=T.default.factory.createPropertyDeclaration([T.default.factory.createToken(T.default.SyntaxKind.StaticKeyword)],"ctorParameters",void 0,void 0,i);return r&&T.default.setSyntheticLeadingComments(o,[{kind:T.default.SyntaxKind.MultiLineCommentTrivia,text:["*"," * @type {function(): !Array<(null|{"," * type: ?,",` * decorators: (undefined|${Fg}),`," * })>}"," * @nocollapse"," "].join(`
|
|
34
|
-
`),pos:-1,end:-1,hasTrailingNewLine:!0}]),o}function $g(t,e){let n=e.kind;switch(T.default.isLiteralTypeNode(e)&&(n=e.literal.kind),n){case T.default.SyntaxKind.FunctionType:case T.default.SyntaxKind.ConstructorType:return T.default.factory.createIdentifier("Function");case T.default.SyntaxKind.ArrayType:case T.default.SyntaxKind.TupleType:return T.default.factory.createIdentifier("Array");case T.default.SyntaxKind.TypePredicate:case T.default.SyntaxKind.TrueKeyword:case T.default.SyntaxKind.FalseKeyword:case T.default.SyntaxKind.BooleanKeyword:return T.default.factory.createIdentifier("Boolean");case T.default.SyntaxKind.StringLiteral:case T.default.SyntaxKind.StringKeyword:return T.default.factory.createIdentifier("String");case T.default.SyntaxKind.ObjectKeyword:return T.default.factory.createIdentifier("Object");case T.default.SyntaxKind.NumberKeyword:case T.default.SyntaxKind.NumericLiteral:return T.default.factory.createIdentifier("Number");case T.default.SyntaxKind.TypeReference:return t(e.typeName);case T.default.SyntaxKind.UnionType:let s=e.types.filter(i=>!(T.default.isLiteralTypeNode(i)&&i.literal.kind===T.default.SyntaxKind.NullKeyword));return s.length===1?$g(t,s[0]):void 0;default:return}}function Q0(t,e){return e.flags&T.default.SymbolFlags.Alias&&(e=t.getAliasedSymbol(e)),console.warn("hello",e.flags&T.default.SymbolFlags.NamespaceModule),(e.flags&T.default.SymbolFlags.Value&T.default.SymbolFlags.ConstEnumExcludes)!==0}function Ug(t,e,n,r,s){function i(a,l){s&&T.default.setSyntheticLeadingComments(a,[{kind:T.default.SyntaxKind.MultiLineCommentTrivia,text:`* @type {${l}} `,pos:-1,end:-1,hasTrailingNewLine:!0}])}function o(a,l){let c=[];for(let[d,g]of l.entries())c.push(T.default.factory.createPropertyAssignment(d,T.default.factory.createArrayLiteralExpression(g.map(y=>Bg(y,a)))));let u=T.default.factory.createObjectLiteralExpression(c,!0),h=T.default.factory.createPropertyDeclaration([T.default.factory.createToken(T.default.SyntaxKind.StaticKeyword)],"propDecorators",void 0,void 0,u);return i(h,`!Object<string, ${Fg}>`),h}return a=>{let l=Xu(a);function c(y){let C=t.getSymbolAtLocation(y);if(console.warn(C.flags,!Q0(t,C),C.declarations),T.default.isQualifiedName(y)){let _=c(y.left);return _===void 0?void 0:T.default.factory.createPropertyAccessExpression(_,y.right)}let A=C.declarations[0];return Yu(A)&&(l.add(A),A.name!==void 0)?T.default.setOriginalNode(T.default.factory.createIdentifier(A.name.text),A.name):T.default.setOriginalNode(T.default.factory.createIdentifier(y.text),y)}function u(y){y=T.default.visitEachChild(y,g,a);let C=[],A=[],_=e.getDecoratorsOfDeclaration(y)||[];for(let ve of _){let de=ve.node;if(!yp(ve,r)){C.push(de);continue}A.push(de)}if(!A.length)return[void 0,y,[]];if(!y.name||!T.default.isIdentifier(y.name))return n.push({file:y.getSourceFile(),start:y.getStart(),length:y.getEnd()-y.getStart(),messageText:"Cannot process decorators for class element with non-analyzable name.",category:T.default.DiagnosticCategory.Error,code:0}),[void 0,y,[]];let U=T.default.canHaveModifiers(y)?T.default.getModifiers(y):void 0,ne;return(C.length||U?.length)&&(ne=T.default.setTextRange(T.default.factory.createNodeArray([...C,...U||[]]),y.modifiers)),[y.name.text,J0(y,ne),A]}function h(y){y=T.default.visitEachChild(y,g,a);let C=[],A=y.parameters,_=[];for(let ne of A){let ve=[],de={decorators:[],type:null},ln=e.getDecoratorsOfDeclaration(ne)||[];for(let zp of ln){let Xp=zp.node;if(!yp(zp,r)){ve.push(Xp);continue}de.decorators.push(Xp)}ne.type&&(de.type=ne.type),_.push(de);let Yn,xt=T.default.getModifiers(ne);(ve.length||xt?.length)&&(Yn=[...ve,...xt||[]]);let Yv=T.default.factory.updateParameterDeclaration(ne,Yn,ne.dotDotDotToken,ne.name,ne.questionToken,ne.type,ne.initializer);C.push(Yv)}return[T.default.factory.updateConstructorDeclaration(y,T.default.getModifiers(y),C,y.body),_]}function d(y){let C=[],A=new Map,_=null;for(let de of y.members){switch(de.kind){case T.default.SyntaxKind.PropertyDeclaration:case T.default.SyntaxKind.GetAccessor:case T.default.SyntaxKind.SetAccessor:case T.default.SyntaxKind.MethodDeclaration:{let[ln,Yn,xt]=u(de);C.push(Yn),ln&&A.set(ln,xt);continue}case T.default.SyntaxKind.Constructor:{if(!de.body)break;let[Yn,xt]=h(de);_=xt,C.push(Yn);continue}default:break}C.push(T.default.visitEachChild(de,g,a))}let ne=(e.getDecoratorsOfDeclaration(y)||[]).some(de=>yp(de,r));_&&(ne||_.some(de=>!!de.decorators.length))&&C.push(Y0(n,c,_,s)),A.size&&C.push(o(n,A));let ve=T.default.setTextRange(T.default.factory.createNodeArray(C,y.members.hasTrailingComma),y.members);return T.default.factory.updateClassDeclaration(y,y.modifiers,y.name,y.typeParameters,y.heritageClauses,ve)}function g(y){return T.default.isClassDeclaration(y)?d(y):T.default.visitEachChild(y,g,a)}return y=>T.default.visitEachChild(y,g,a)}}function J0(t,e){let n;if(T.default.isMethodDeclaration(t))n=T.default.factory.createMethodDeclaration(e,t.asteriskToken,t.name,t.questionToken,t.typeParameters,t.parameters,t.type,t.body);else if(T.default.isPropertyDeclaration(t))n=T.default.factory.createPropertyDeclaration(e,t.name,t.questionToken,t.type,t.initializer);else if(T.default.isGetAccessor(t))n=T.default.factory.createGetAccessorDeclaration(e,t.name,t.parameters,t.type,t.body);else if(T.default.isSetAccessor(t))n=T.default.factory.createSetAccessorDeclaration(e,t.name,t.parameters,t.body);else throw new Error(`Unsupported decorated member with kind ${T.default.SyntaxKind[t.kind]}`);return T.default.setOriginalNode(n,t)}function Qa(t,e,n,r,s){let i=Ya.default.isIdentifier(n.identifier)?n.identifier:n.identifier.expression;return t.createPropertyAccessExpression(e.addImport({exportModuleSpecifier:"@angular/core",exportSymbolName:null,requestedFile:r}),Ya.default.setOriginalNode(t.createIdentifier(s),i))}function Vg(t,e){return t.createAsExpression(e,t.createKeywordTypeNode(Ya.default.SyntaxKind.AnyKeyword))}var Z0=(t,e,n,r,s,i,o)=>{var a,l;if((a=e.getDecoratorsOfDeclaration(t.node))!=null&&a.some(g=>Zs(g,"Input",o)))return t.node;let c=Cg(t,e,r);if(c===null)return t.node;let u={isSignal:n.createTrue(),alias:n.createStringLiteral(c.bindingPropertyName),required:c.required?n.createTrue():n.createFalse(),transform:n.createIdentifier("undefined")},h=t.node.getSourceFile(),d=n.createDecorator(n.createCallExpression(Qa(n,s,i,h,"Input"),void 0,[Vg(n,n.createObjectLiteralExpression(Object.entries(u).map(([g,y])=>n.createPropertyAssignment(g,y))))]));return n.updatePropertyDeclaration(t.node,[d,...(l=t.node.modifiers)!=null?l:[]],t.name,t.node.questionToken,t.node.type,t.node.initializer)},e_=(t,e,n,r,s,i,o)=>{var a,l;if((a=e.getDecoratorsOfDeclaration(t.node))!=null&&a.some(y=>Zs(y,"Input",o)||Zs(y,"Output",o)))return t.node;let c=Ig(t,e,r);if(c===null)return t.node;let u=n.createObjectLiteralExpression([n.createPropertyAssignment("isSignal",c.input.isSignal?n.createTrue():n.createFalse()),n.createPropertyAssignment("alias",n.createStringLiteral(c.input.bindingPropertyName)),n.createPropertyAssignment("required",c.input.required?n.createTrue():n.createFalse())]),h=t.node.getSourceFile(),d=Lg("Input",n.createAsExpression(u,n.createKeywordTypeNode(qg.default.SyntaxKind.AnyKeyword)),i,n,h,s),g=Lg("Output",n.createStringLiteral(c.output.bindingPropertyName),i,n,h,s);return n.updatePropertyDeclaration(t.node,[d,g,...(l=t.node.modifiers)!=null?l:[]],t.node.name,t.node.questionToken,t.node.type,t.node.initializer)};function Lg(t,e,n,r,s,i){let o=Qa(r,i,n,s,t);return r.createDecorator(r.createCallExpression(o,void 0,[e]))}var t_=(t,e,n,r,s,i,o)=>{var a,l;if((a=e.getDecoratorsOfDeclaration(t.node))!=null&&a.some(d=>Zs(d,"Output",o)))return t.node;let c=Ag(t,e,r);if(c===null)return t.node;let u=t.node.getSourceFile(),h=n.createDecorator(n.createCallExpression(Qa(n,s,i,u,"Output"),void 0,[n.createStringLiteral(c.metadata.bindingPropertyName)]));return n.updatePropertyDeclaration(t.node,[h,...(l=t.node.modifiers)!=null?l:[]],t.node.name,t.node.questionToken,t.node.type,t.node.initializer)},n_={viewChild:"ViewChild",viewChildren:"ViewChildren",contentChild:"ContentChild",contentChildren:"ContentChildren"},r_=(t,e,n,r,s,i,o)=>{var a;let l=e.getDecoratorsOfDeclaration(t.node),c=l&&Tg(l,dp,o);if(c!==null&&c.length>0)return t.node;let u=Ng(t,e,r);if(u===null)return t.node;let h=t.node.getSourceFile(),d=u.call.arguments,g=n.createDecorator(n.createCallExpression(Qa(n,s,i,h,n_[u.name]),void 0,[u.call.arguments[0],Vg(n,n.createObjectLiteralExpression([...d.length>1?[n.createSpreadAssignment(d[1])]:[],n.createPropertyAssignment("isSignal",n.createTrue())]))]));return n.updatePropertyDeclaration(t.node,[g,...(a=t.node.modifiers)!=null?a:[]],t.node.name,t.node.questionToken,t.node.type,t.node.initializer)},s_=["Directive","Component"],i_=[Z0,t_,r_,e_];function Gg(t,e,n){return r=>s=>{let i=new Ju;return s=xr.default.visitNode(s,o_(r,t,i,e,n),xr.default.isSourceFile),i.transformTsFile(r,s)}}function o_(t,e,n,r,s){let i=o=>{var a;if(xr.default.isClassDeclaration(o)&&o.name!==void 0){let l=xr.default.getOriginalNode(o,xr.default.isClassDeclaration),c=(a=e.getDecoratorsOfDeclaration(l))==null?void 0:a.find(u=>s_.some(h=>Zs(u,h,s)));if(c!==void 0){let u=!1,h=o.members.map(d=>{if(!xr.default.isPropertyDeclaration(d))return d;let g=Ku(d);if(g===null)return d;for(let y of i_){let C=y({...g,node:d},e,t.factory,r,n,c,s);if(C!==g.node)return u=!0,C}return d});if(u)return t.factory.updateClassDeclaration(o,o.modifiers,o.name,o.typeParameters,o.heritageClauses,h)}}return xr.default.visitEachChild(o,i,t)};return i}function vp(t,e=!1){let n=t.getTypeChecker(),r=new ju(n),s=new Qu,i=Ug(n,r,[],e,!1),o=Gg(r,s,e);return a=>l=>(l=o(a)(l),l=i(a)(l),l)}var Hg={ngDevMode:!1,ngI18nClosureMode:!1},a_={...Hg,ngJitMode:!1};S();var jv=require("module");var aP=x(require("typescript"),1),lP=x(require("typescript"),1),cP=x(require("typescript"),1),uP=x(require("typescript"),1),pP=x(require("typescript"),1),hP=x(require("typescript"),1),fP=x(require("typescript"),1),dP=x(require("typescript"),1),mP=x(require("typescript"),1),gP=x(require("typescript"),1);var yP=x(require("typescript"),1);var Kv=x(require("typescript"),1);var vP=x(require("typescript"),1),EP=x(require("typescript"),1),SP=x(require("typescript"),1),wP=x(require("typescript"),1);var TP=x(require("typescript"),1);var Gp=x(require("typescript"),1);var Hp=x(require("typescript"),1);var Wp=x(require("typescript"),1);var XP=x(require("typescript"),1);var QP=x(require("typescript"),1),JP=x(require("typescript"),1),ZP=x(Lv(),1),eM=x(require("typescript"),1),tM=x(require("typescript"),1),nM=x(require("typescript"),1),z1=(0,jv.createRequire)(P);var Bp;(function(t){t[t.DTS=1]="DTS",t[t.JS=2]="JS",t[t.Metadata=4]="Metadata",t[t.I18nBundle=8]="I18nBundle",t[t.Codegen=16]="Codegen",t[t.Default=19]="Default",t[t.All=31]="All"})(Bp||(Bp={}));var $p;(function(t){t.Block="block",t.Component="component",t.Constant="constant",t.Decorator="decorator",t.Directive="directive",t.Element="element",t.Enum="enum",t.Function="function",t.Interface="interface",t.NgModule="ng_module",t.Pipe="pipe",t.TypeAlias="type_alias",t.UndecoratedClass="undecorated_class",t.InitializerApiFunction="initializer_api_function"})($p||($p={}));var Up;(function(t){t.Property="property",t.Method="method",t.Getter="getter",t.Setter="setter",t.EnumItem="enum_item"})(Up||(Up={}));var Vp;(function(t){t.Class="class",t.Member="member",t.Parameter="parameter"})(Vp||(Vp={}));var qp;(function(t){t.Abstract="abstract",t.Static="static",t.Readonly="readonly",t.Protected="protected",t.Optional="optional",t.Input="input",t.Output="output",t.Inherited="override"})(qp||(qp={}));var tB=Kv.default.version;var rB=Symbol("NgCyclicResult");var Ov;(function(t){t[t.Fresh=0]="Fresh",t[t.Delta=1]="Delta",t[t.Analyzed=2]="Analyzed"})(Ov||(Ov={}));var Fv;(function(t){t[t.Analysis=0]="Analysis",t[t.TypeCheckAndEmit=1]="TypeCheckAndEmit"})(Fv||(Fv={}));var sB=Symbol("NgIncrementalState"),Bv;(function(t){t[t.Property=0]="Property",t[t.Method=1]="Method",t[t.Element=2]="Element",t[t.Template=3]="Template",t[t.Attribute=4]="Attribute",t[t.Reference=5]="Reference",t[t.Variable=6]="Variable",t[t.LetDeclaration=7]="LetDeclaration"})(Bv||(Bv={}));var xP=".$ngresource$",aB=xP+".ts";var CP=new Set(["WritableSignal","Signal","InputSignal","InputSignalWithTransform","ModelSignal"]);function $v(t){return(t.kind===wt.Expression||t.kind===wt.Variable||t.kind===wt.LetDeclaration)&&(t.tsType.symbol!==void 0&&Uv(t.tsType.symbol)||t.tsType.aliasSymbol!==void 0&&Uv(t.tsType.aliasSymbol))}function Uv(t){let e=t.getDeclarations();return e!==void 0&&e.some(n=>{let r=n.getSourceFile().fileName;return(Gp.default.isInterfaceDeclaration(n)||Gp.default.isTypeAliasDeclaration(n))&&CP.has(n.name.text)&&(r.includes("@angular/core")||r.includes("angular2/rc/packages/core"))})}var Xn=class{run(t,e,n){return new IP(t,e,this).getDiagnostics(n)}},IP=class extends hr{constructor(t,e,n){super(),this.ctx=t,this.component=e,this.check=n,this.diagnostics=[]}visit(t,e){this.diagnostics.push(...this.check.visitNode(this.ctx,this.component,t)),t.visit(this)}visitAllNodes(t){for(let e of t)this.visit(e)}visitAst(t){t instanceof we&&(t=t.ast),this.visit(t)}visitElement(t){this.visitAllNodes(t.attributes),this.visitAllNodes(t.inputs),this.visitAllNodes(t.outputs),this.visitAllNodes(t.references),this.visitAllNodes(t.children)}visitTemplate(t){this.visitAllNodes(t.attributes),t.tagName==="ng-template"&&(this.visitAllNodes(t.inputs),this.visitAllNodes(t.outputs),this.visitAllNodes(t.templateAttrs)),this.visitAllNodes(t.variables),this.visitAllNodes(t.references),this.visitAllNodes(t.children)}visitContent(t){this.visitAllNodes(t.children)}visitVariable(t){}visitReference(t){}visitTextAttribute(t){}visitUnknownBlock(t){}visitBoundAttribute(t){this.visitAst(t.value)}visitBoundEvent(t){this.visitAst(t.handler)}visitText(t){}visitBoundText(t){this.visitAst(t.value)}visitIcu(t){}visitDeferredBlock(t){t.visitAll(this)}visitDeferredTrigger(t){t instanceof ks&&this.visitAst(t.value)}visitDeferredBlockPlaceholder(t){this.visitAllNodes(t.children)}visitDeferredBlockError(t){this.visitAllNodes(t.children)}visitDeferredBlockLoading(t){this.visitAllNodes(t.children)}visitSwitchBlock(t){this.visitAst(t.expression),this.visitAllNodes(t.cases)}visitSwitchBlockCase(t){t.expression&&this.visitAst(t.expression),this.visitAllNodes(t.children)}visitForLoopBlock(t){var e;t.item.visit(this),this.visitAllNodes(t.contextVariables),this.visitAst(t.expression),this.visitAllNodes(t.children),(e=t.empty)==null||e.visit(this)}visitForLoopBlockEmpty(t){this.visitAllNodes(t.children)}visitIfBlock(t){this.visitAllNodes(t.branches)}visitIfBlockBranch(t){var e;t.expression&&this.visitAst(t.expression),(e=t.expressionAlias)==null||e.visit(this),this.visitAllNodes(t.children)}visitLetDeclaration(t){this.visitAst(t.value)}getDiagnostics(t){return this.diagnostics=[],this.visitAllNodes(t),this.diagnostics}},AP=new Set(["set","update","asReadonly"]),NP=new Set(["name","length","prototype"]),bP=class extends Xn{constructor(){super(...arguments),this.code=Z.INTERPOLATED_SIGNAL_NOT_INVOKED}visitNode(t,e,n){if(n instanceof On)return n.expressions.filter(r=>r instanceof Ce).flatMap(r=>Vv(t,r,e));if(n instanceof _t){let r=t.templateTypeChecker.getSymbolOfNode(n,e);if(r!==null&&r.kind===wt.Input)return[];if((n.type===z.Property||n.type===z.Class||n.type===z.Style||n.type===z.Attribute||n.type===z.Animation)&&n.value instanceof we&&n.value.ast instanceof Ce)return Vv(t,n.value.ast,e)}return[]}};function DP(t){return NP.has(t)}function _P(t){return AP.has(t)}function Vv(t,e,n){let r=t.templateTypeChecker.getSymbolOfNode(e,n);if(r!==null&&r.kind===wt.Expression&&$v(r)){let i=t.templateTypeChecker.getTemplateMappingAtTcbLocation(r.tcbLocation),o=`${e.name} is a function and should be invoked: ${e.name}()`;return[t.makeTemplateDiagnostic(i.span,o)]}let s=t.templateTypeChecker.getSymbolOfNode(e.receiver,n);if((DP(e.name)||_P(e.name))&&s!==null&&s.kind===wt.Expression&&$v(s)){let i=t.templateTypeChecker.getTemplateMappingAtTcbLocation(s.tcbLocation),o=`${e.receiver.name} is a function and should be invoked: ${e.receiver.name}()`;return[t.makeTemplateDiagnostic(i.span,o)]}return[]}var RP={code:Z.INTERPOLATED_SIGNAL_NOT_INVOKED,name:kt.INTERPOLATED_SIGNAL_NOT_INVOKED,create:()=>new bP},kP=class extends Xn{constructor(){super(...arguments),this.code=Z.INVALID_BANANA_IN_BOX}visitNode(t,e,n){if(!(n instanceof Bn))return[];let r=n.name;if(!r.startsWith("[")||!r.endsWith("]"))return[];let i=n.sourceSpan.toString().replace(`(${r})`,`[(${r.slice(1,-1)})]`);return[t.makeTemplateDiagnostic(n.sourceSpan,`In the two-way binding syntax the parentheses should be inside the brackets, ex. '${i}'.
|
|
33
|
+
Please report an issue on the Angular repositories when this issue surfaces and you are using a supposedly compatible TypeScript version.`)}var _M=Symbol("DefaultImportDeclaration");var Qu=class{constructor(){this.fileToNamedImports=new WeakMap,this.fileToNamespaceImports=new WeakMap}isPotentialReferenceToNamedImport(t,e,n){let r=t.getSourceFile();this.scanImports(r);let i=this.fileToNamedImports.get(r).get(n),o=i?.get(e);return o!==void 0&&o.has(t.text)}isPotentialReferenceToNamespaceImport(t,e){var n,r;let s=t.getSourceFile();return this.scanImports(s),(r=(n=this.fileToNamespaceImports.get(s).get(e))==null?void 0:n.has(t.text))!=null?r:!1}hasNamedImport(t,e,n){this.scanImports(t);let s=this.fileToNamedImports.get(t).get(n);return s!==void 0&&s.has(e)}hasNamespaceImport(t,e){return this.scanImports(t),this.fileToNamespaceImports.get(t).has(e)}scanImports(t){var e,n;if(this.fileToNamedImports.has(t)&&this.fileToNamespaceImports.has(t))return;let r=new Map,s=new Map;this.fileToNamedImports.set(t,r),this.fileToNamespaceImports.set(t,s);for(let i of t.statements){if(!qa.default.isImportDeclaration(i)||!qa.default.isStringLiteralLike(i.moduleSpecifier)||((e=i.importClause)==null?void 0:e.namedBindings)===void 0)continue;let o=i.moduleSpecifier.text;if(qa.default.isNamespaceImport(i.importClause.namedBindings))s.has(o)||s.set(o,new Set),s.get(o).add(i.importClause.namedBindings.name.text);else for(let a of i.importClause.namedBindings.elements){let l=a.name.text,c=a.propertyName===void 0?l:a.propertyName.text;r.has(o)||r.set(o,new Map);let u=r.get(o);u.has(c)||u.set(c,new Set),(n=u.get(c))==null||n.add(l)}}}};function oD(){let t=new Set,e=(r,s)=>t.has(`${r.fileName}@@${s}`),n=(r,s)=>t.add(`${r.fileName}@@${s}`);return(r,s)=>{let i=r;if(i.identifiers===void 0)throw new Error("Source file unexpectedly lacks map of parsed `identifiers`.");let o=c=>!i.identifiers.has(c)&&!e(i,c);if(o(s))return n(i,s),null;let a=null,l=1;do a=`${s}_${l++}`;while(!o(a));return n(i,a),Ou.default.factory.createUniqueName(a,Ou.default.GeneratedIdentifierFlags.Optimistic)}}function aD(t,e){return n=>{let{affectedFiles:r,newImports:s,updatedImports:i,reusedOriginalAliasDeclarations:o}=t.finalize();if(o.size>0){let l=Xu(n);o.forEach(c=>l.add(c))}if(e!==void 0)for(let[l,c]of e.entries())c.length>0&&r.add(l);let a=l=>{if(!Hn.default.isImportDeclaration(l)||l.importClause===void 0||!Hn.default.isImportClause(l.importClause))return l;let c=l.importClause;if(c.namedBindings===void 0||!Hn.default.isNamedImports(c.namedBindings)||!i.has(c.namedBindings))return l;let u=n.factory.updateImportClause(c,c.isTypeOnly,c.name,i.get(c.namedBindings)),h=n.factory.updateImportDeclaration(l,l.modifiers,u,l.moduleSpecifier,l.attributes);return Hn.default.setOriginalNode(h,{importClause:u,kind:h.kind}),h};return l=>{var c,u;if(!r.has(l.fileName))return l;l=Hn.default.visitEachChild(l,a,n);let h=(c=e?.get(l.fileName))!=null?c:[],d=[],g=[];for(let y of l.statements)lD(y)?d.push(y):g.push(y);return n.factory.updateSourceFile(l,[...d,...(u=s.get(l.fileName))!=null?u:[],...h,...g],l.isDeclarationFile,l.referencedFiles,l.typeReferenceDirectives,l.hasNoDefaultLib,l.libReferenceDirectives)}}}function lD(t){return Hn.default.isImportDeclaration(t)||Hn.default.isImportEqualsDeclaration(t)||Hn.default.isNamespaceImport(t)}function cD(t,e){let n=Zm(e),r=t.directReuseCache.get(n);if(r!==void 0)return r;let s=t.namespaceImportReuseCache.get(e.exportModuleSpecifier);return s===void 0?null:e.exportSymbolName===null?s:[s,Jm.default.factory.createIdentifier(e.exportSymbolName)]}function qm(t,e,n){e.directReuseCache.set(Zm(t),n),t.exportSymbolName===null&&!Array.isArray(n)&&e.namespaceImportReuseCache.set(t.exportModuleSpecifier,n)}function Zm(t){return`${t.requestedFile.fileName}:${t.exportModuleSpecifier}:${t.exportSymbolName}`}function uD(t,e,n){let r=null;for(let a=e.statements.length-1;a>=0;a--){let l=e.statements[a];if(!(!Jr.default.isImportDeclaration(l)||!Jr.default.isStringLiteral(l.moduleSpecifier)||!l.importClause||l.importClause.isTypeOnly||l.moduleSpecifier.text!==n.exportModuleSpecifier)&&l.importClause.namedBindings){let u=l.importClause.namedBindings;if(Jr.default.isNamespaceImport(u))return t.reusedAliasDeclarations.add(u),n.exportSymbolName===null?u.name:[u.name,Jr.default.factory.createIdentifier(n.exportSymbolName)];if(Jr.default.isNamedImports(u)&&n.exportSymbolName!==null){let h=u.elements.find(d=>!d.isTypeOnly&&(d.propertyName?d.propertyName.text===n.exportSymbolName:d.name.text===n.exportSymbolName));if(h!==void 0)return t.reusedAliasDeclarations.add(h),h.name;r=l}}}if(r===null||n.exportSymbolName===null)return null;t.updatedImports.has(r)||t.updatedImports.set(r,[]);let s=t.updatedImports.get(r),i=Jr.default.factory.createIdentifier(n.exportSymbolName),o=t.generateUniqueIdentifier(e,n.exportSymbolName);return s.push({propertyName:i,fileUniqueAlias:o}),o??i}var Ju=class{constructor(t={}){var e;this._config=t,this.newImports=new Map,this.nextUniqueIndex=0,this.reuseGeneratedImportsTracker={directReuseCache:new Map,namespaceImportReuseCache:new Map},this.config={shouldUseSingleQuotes:()=>!1,rewriter:null,disableOriginalSourceFileReuse:!1,forceGenerateNamespacesForNewImports:!1,namespaceImportPrefix:"i",generateUniqueIdentifier:(e=this._config.generateUniqueIdentifier)!=null?e:oD(),...this._config},this.reuseSourceFileImportsTracker={generateUniqueIdentifier:this.config.generateUniqueIdentifier,reusedAliasDeclarations:new Set,updatedImports:new Map}}addSideEffectImport(t,e){this.config.rewriter!==null&&(e=this.config.rewriter.rewriteSpecifier(e,t.fileName)),this._getNewImportsTrackerForFile(t).sideEffectImports.add(e)}addImport(t){this.config.rewriter!==null&&(t.exportSymbolName!==null&&(t.exportSymbolName=this.config.rewriter.rewriteSymbol(t.exportSymbolName,t.exportModuleSpecifier)),t.exportModuleSpecifier=this.config.rewriter.rewriteSpecifier(t.exportModuleSpecifier,t.requestedFile.fileName));let e=cD(this.reuseGeneratedImportsTracker,t);if(e!==null)return Gm(!!t.asTypeReference,e);let n=this._generateNewImport(t);return qm(t,this.reuseGeneratedImportsTracker,n),Gm(!!t.asTypeReference,n)}_generateNewImport(t){var e;let{requestedFile:n}=t,r=this.config.disableOriginalSourceFileReuse,s=this.config.forceGenerateNamespacesForNewImports;if(!r){let h=uD(this.reuseSourceFileImportsTracker,n,t);if(h!==null)return h}let{namedImports:i,namespaceImports:o}=this._getNewImportsTrackerForFile(n);if(t.exportSymbolName===null||s){let h=`${this.config.namespaceImportPrefix}${this.nextUniqueIndex++}`,d=Re.default.factory.createNamespaceImport((e=this.config.generateUniqueIdentifier(n,h))!=null?e:Re.default.factory.createIdentifier(h));return o.set(t.exportModuleSpecifier,d),qm({...t,exportSymbolName:null},this.reuseGeneratedImportsTracker,d.name),t.exportSymbolName!==null?[d.name,Re.default.factory.createIdentifier(t.exportSymbolName)]:d.name}i.has(t.exportModuleSpecifier)||i.set(t.exportModuleSpecifier,[]);let a=Re.default.factory.createIdentifier(t.exportSymbolName),l=this.config.generateUniqueIdentifier(n,t.exportSymbolName),c=l!==null,u=c?l:a;return i.get(t.exportModuleSpecifier).push(Re.default.factory.createImportSpecifier(!1,c?a:void 0,u)),u}finalize(){let t=new Set,e=new Map,n=new Map,r=(s,i)=>{t.add(s),n.has(s)?n.get(s).push(i):n.set(s,[i])};return this.reuseSourceFileImportsTracker.updatedImports.forEach((s,i)=>{let o=i.importClause.namedBindings,a=Re.default.factory.updateNamedImports(o,o.elements.concat(s.map(({propertyName:l,fileUniqueAlias:c})=>Re.default.factory.createImportSpecifier(!1,c!==null?l:void 0,c??l))));t.add(i.getSourceFile().fileName),e.set(o,a)}),this.newImports.forEach(({namedImports:s,namespaceImports:i,sideEffectImports:o},a)=>{let l=this.config.shouldUseSingleQuotes(a),c=a.fileName;o.forEach(u=>{r(c,Re.default.factory.createImportDeclaration(void 0,void 0,Re.default.factory.createStringLiteral(u)))}),i.forEach((u,h)=>{let d=Re.default.factory.createImportDeclaration(void 0,Re.default.factory.createImportClause(!1,void 0,u),Re.default.factory.createStringLiteral(h,l));Re.default.setOriginalNode(u.name,d),r(c,d)}),s.forEach((u,h)=>{let d=Re.default.factory.createImportDeclaration(void 0,Re.default.factory.createImportClause(!1,void 0,Re.default.factory.createNamedImports(u)),Re.default.factory.createStringLiteral(h,l));r(c,d)})}),{affectedFiles:t,newImports:n,updatedImports:e,reusedOriginalAliasDeclarations:this.reuseSourceFileImportsTracker.reusedAliasDeclarations}}toTsTransform(t){return aD(this,t)}transformTsFile(t,e,n){let r=n?new Map([[e.fileName,n]]):void 0;return this.toTsTransform(r)(t)(e)}_getNewImportsTrackerForFile(t){return this.newImports.has(t)||this.newImports.set(t,{namespaceImports:new Map,namedImports:new Map,sideEffectImports:new Set}),this.newImports.get(t)}};function Gm(t,e){return t?Array.isArray(e)?Re.default.factory.createQualifiedName(e[0],e[1]):e:Array.isArray(e)?Re.default.factory.createPropertyAccessExpression(e[0],e[1]):e}var RM=new Map([[mn.Minus,"-"],[mn.Plus,"+"]]),kM=new Map([[I.And,"&&"],[I.Bigger,">"],[I.BiggerEquals,">="],[I.BitwiseAnd,"&"],[I.BitwiseOr,"|"],[I.Divide,"/"],[I.Equals,"=="],[I.Identical,"==="],[I.Lower,"<"],[I.LowerEquals,"<="],[I.Minus,"-"],[I.Modulo,"%"],[I.Multiply,"*"],[I.NotEquals,"!="],[I.NotIdentical,"!=="],[I.Or,"||"],[I.Plus,"+"],[I.NullishCoalesce,"??"]]);var Pu={};function eg(t,e){return n(t);function n(i){return r(i)!==Pu}function r(i){return me.default.isImportTypeNode(i)||me.default.isTypeReferenceNode(i)&&!s(i)?Pu:me.default.forEachChild(i,r)}function s(i){return e(i)?i.typeArguments===void 0||i.typeArguments.every(n):!1}}var tg=class{constructor(t){this.translator=t}emitType(t){let e=n=>{let r=s=>{if(me.default.isImportTypeNode(s))throw new Error("Unable to emit import type");if(me.default.isTypeReferenceNode(s))return this.emitTypeReference(s);if(me.default.isLiteralExpression(s)){let i;if(me.default.isStringLiteral(s))i=me.default.factory.createStringLiteral(s.text);else if(me.default.isNumericLiteral(s))i=me.default.factory.createNumericLiteral(s.text);else if(me.default.isBigIntLiteral(s))i=me.default.factory.createBigIntLiteral(s.text);else if(me.default.isNoSubstitutionTemplateLiteral(s))i=me.default.factory.createNoSubstitutionTemplateLiteral(s.text,s.rawText);else if(me.default.isRegularExpressionLiteral(s))i=me.default.factory.createRegularExpressionLiteral(s.text);else throw new Error(`Unsupported literal kind ${me.default.SyntaxKind[s.kind]}`);return me.default.setTextRange(i,{pos:-1,end:-1}),i}else return me.default.visitEachChild(s,r,n)};return s=>me.default.visitNode(s,r,me.default.isTypeNode)};return me.default.transform(t,[e]).transformed[0]}emitTypeReference(t){let e=this.translator(t);if(e===null)throw new Error("Unable to emit an unresolved reference");let n;return t.typeArguments!==void 0&&(n=me.default.factory.createNodeArray(t.typeArguments.map(r=>this.emitType(r)))),me.default.factory.updateTypeReferenceNode(t,e.typeName,n)}};var Hm;(function(t){t.CLOSURE="* @pureOrBreakMyCode ",t.TERSER="@__PURE__"})(Hm||(Hm={}));var PM={"+":ge.default.SyntaxKind.PlusToken,"-":ge.default.SyntaxKind.MinusToken,"!":ge.default.SyntaxKind.ExclamationToken},MM={"&&":ge.default.SyntaxKind.AmpersandAmpersandToken,">":ge.default.SyntaxKind.GreaterThanToken,">=":ge.default.SyntaxKind.GreaterThanEqualsToken,"&":ge.default.SyntaxKind.AmpersandToken,"|":ge.default.SyntaxKind.BarToken,"/":ge.default.SyntaxKind.SlashToken,"==":ge.default.SyntaxKind.EqualsEqualsToken,"===":ge.default.SyntaxKind.EqualsEqualsEqualsToken,"<":ge.default.SyntaxKind.LessThanToken,"<=":ge.default.SyntaxKind.LessThanEqualsToken,"-":ge.default.SyntaxKind.MinusToken,"%":ge.default.SyntaxKind.PercentToken,"*":ge.default.SyntaxKind.AsteriskToken,"!=":ge.default.SyntaxKind.ExclamationEqualsToken,"!==":ge.default.SyntaxKind.ExclamationEqualsEqualsToken,"||":ge.default.SyntaxKind.BarBarToken,"+":ge.default.SyntaxKind.PlusToken,"??":ge.default.SyntaxKind.QuestionQuestionToken},LM={const:ge.default.NodeFlags.Const,let:ge.default.NodeFlags.Let,var:ge.default.NodeFlags.None};S();var ng=require("module"),HM=(0,ng.createRequire)(P),Js;(function(t){t[t.Unaccounted=0]="Unaccounted",t[t.Setup=1]="Setup",t[t.TypeScriptProgramCreate=2]="TypeScriptProgramCreate",t[t.Reconciliation=3]="Reconciliation",t[t.ResourceUpdate=4]="ResourceUpdate",t[t.TypeScriptDiagnostics=5]="TypeScriptDiagnostics",t[t.Analysis=6]="Analysis",t[t.Resolve=7]="Resolve",t[t.CycleDetection=8]="CycleDetection",t[t.TcbGeneration=9]="TcbGeneration",t[t.TcbUpdateProgram=10]="TcbUpdateProgram",t[t.TypeScriptEmit=11]="TypeScriptEmit",t[t.Compile=12]="Compile",t[t.TtcAutocompletion=13]="TtcAutocompletion",t[t.TtcDiagnostics=14]="TtcDiagnostics",t[t.TtcSymbol=15]="TtcSymbol",t[t.LsReferencesAndRenames=16]="LsReferencesAndRenames",t[t.LsQuickInfo=17]="LsQuickInfo",t[t.LsDefinition=18]="LsDefinition",t[t.LsCompletions=19]="LsCompletions",t[t.LsTcb=20]="LsTcb",t[t.LsDiagnostics=21]="LsDiagnostics",t[t.LsComponentLocations=22]="LsComponentLocations",t[t.LsSignatureHelp=23]="LsSignatureHelp",t[t.OutliningSpans=24]="OutliningSpans",t[t.LAST=25]="LAST",t[t.LsCodeFixes=26]="LsCodeFixes",t[t.LsCodeFixesAll=27]="LsCodeFixesAll"})(Js||(Js={}));var Ga;(function(t){t[t.InputDtsFile=0]="InputDtsFile",t[t.InputTsFile=1]="InputTsFile",t[t.AnalyzeComponent=2]="AnalyzeComponent",t[t.AnalyzeDirective=3]="AnalyzeDirective",t[t.AnalyzeInjectable=4]="AnalyzeInjectable",t[t.AnalyzeNgModule=5]="AnalyzeNgModule",t[t.AnalyzePipe=6]="AnalyzePipe",t[t.TraitAnalyze=7]="TraitAnalyze",t[t.TraitReuseAnalysis=8]="TraitReuseAnalysis",t[t.SourceFilePhysicalChange=9]="SourceFilePhysicalChange",t[t.SourceFileLogicalChange=10]="SourceFileLogicalChange",t[t.SourceFileReuseAnalysis=11]="SourceFileReuseAnalysis",t[t.GenerateTcb=12]="GenerateTcb",t[t.SkipGenerateTcbNoInline=13]="SkipGenerateTcbNoInline",t[t.ReuseTypeCheckFile=14]="ReuseTypeCheckFile",t[t.UpdateTypeCheckProgram=15]="UpdateTypeCheckProgram",t[t.EmitSkipSourceFile=16]="EmitSkipSourceFile",t[t.EmitSourceFile=17]="EmitSourceFile",t[t.LAST=18]="LAST"})(Ga||(Ga={}));var Ha;(function(t){t[t.Initial=0]="Initial",t[t.TypeScriptProgramCreate=1]="TypeScriptProgramCreate",t[t.PreAnalysis=2]="PreAnalysis",t[t.Analysis=3]="Analysis",t[t.Resolve=4]="Resolve",t[t.TtcGeneration=5]="TtcGeneration",t[t.TtcUpdateProgram=6]="TtcUpdateProgram",t[t.PreEmit=7]="PreEmit",t[t.Emit=8]="Emit",t[t.LAST=9]="LAST"})(Ha||(Ha={}));var fD=class{eventCount(){}memory(){}phase(){return Js.Unaccounted}inPhase(t,e){return e()}reset(){}},WM=new fD;var Cn=T(require("typescript"),1),fe=T(require("typescript"),1),CD=T(require("typescript"),1);var ID=T(require("typescript"),1),AD=T(require("typescript"),1),ND=T(require("typescript"),1),bD=T(require("typescript"),1),DD=T(require("typescript"),1),_D=T(require("typescript"),1),RD=T(require("typescript"),1);var kD=T(require("typescript"),1),PD=T(require("typescript"),1);var MD=T(require("typescript"),1);var LD=T(require("typescript"),1);var OD=T(require("typescript"),1),FD=T(require("typescript"),1);var BD=T(require("typescript"),1);var $D=T(require("typescript"),1);var UD=T(require("typescript"),1);var VD=T(require("typescript"),1),on=T(require("typescript"),1),ip=T(require("typescript"),1);var an=T(require("typescript"),1);var XD=T(require("typescript"),1),YD=T(require("typescript"),1);var QD=T(require("typescript"),1);var ZD=T(require("typescript"),1),e0=T(require("typescript"),1),t0=T(require("typescript"),1);var n0=T(require("typescript"),1);var ho=T(require("typescript"),1);S();var rg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dD=new Uint8Array(64),mD=new Uint8Array(128);for(let t=0;t<rg.length;t++){let e=rg.charCodeAt(t);dD[t]=e,mD[e]=t}var s0=T(require("typescript"),1);var i0=T(require("typescript"),1),o0=T(require("typescript"),1);var Q=T(require("typescript"),1);var p0=T(require("typescript"),1);var h0=T(require("typescript"),1),co=T(require("typescript"),1);var g0=T(require("typescript"),1),y0=T(require("typescript"),1);var E=T(require("typescript"),1);var mo=T(require("typescript"),1);var D=T(require("typescript"),1),j0=T(require("typescript"),1);var K0=T(require("typescript"),1);var z0=T(require("typescript"),1);var X0=T(require("typescript"),1),DL=(0,Sg.createRequire)(P),wD="@angular/core";function wg(t){return t.import!==null&&t.import.from===wD}function Zs(t,e,n){return n?t.name===e:wg(t)?t.import.name===e:!1}function Tg(t,e,n){return t.filter(r=>{var s;let i=n?r.name:(s=r.import)==null?void 0:s.name;return i===void 0||!e.includes(i)?!1:n||wg(r)})}function xg(t){for(;Cn.default.isAsExpression(t)||Cn.default.isParenthesizedExpression(t);)t=t.expression;return t}function TD(t){if(t=xg(t),!Cn.default.isArrowFunction(t)&&!Cn.default.isFunctionExpression(t))return null;let e=t.body;if(Cn.default.isBlock(e)){if(e.statements.length!==1)return null;let n=e.statements[0];return!Cn.default.isReturnStatement(n)||n.expression===void 0?null:n.expression}else return e}function xD(t,e){if(t=xg(t),!Cn.default.isCallExpression(t)||t.arguments.length!==1)return null;let n=Cn.default.isPropertyAccessExpression(t.expression)?t.expression.name:t.expression;if(!Cn.default.isIdentifier(n))return null;let r=TD(t.arguments[0]);if(r===null)return null;let s=e.getImportOfIdentifier(n);return s===null||s.from!=="@angular/core"||s.name!=="forwardRef"?null:r}function ke(t){return{op:t,literal:!0}}function sg(t){return{op:t,literal:!1}}var ML=new Map([[fe.default.SyntaxKind.PlusToken,ke((t,e)=>t+e)],[fe.default.SyntaxKind.MinusToken,ke((t,e)=>t-e)],[fe.default.SyntaxKind.AsteriskToken,ke((t,e)=>t*e)],[fe.default.SyntaxKind.SlashToken,ke((t,e)=>t/e)],[fe.default.SyntaxKind.PercentToken,ke((t,e)=>t%e)],[fe.default.SyntaxKind.AmpersandToken,ke((t,e)=>t&e)],[fe.default.SyntaxKind.BarToken,ke((t,e)=>t|e)],[fe.default.SyntaxKind.CaretToken,ke((t,e)=>t^e)],[fe.default.SyntaxKind.LessThanToken,ke((t,e)=>t<e)],[fe.default.SyntaxKind.LessThanEqualsToken,ke((t,e)=>t<=e)],[fe.default.SyntaxKind.GreaterThanToken,ke((t,e)=>t>e)],[fe.default.SyntaxKind.GreaterThanEqualsToken,ke((t,e)=>t>=e)],[fe.default.SyntaxKind.EqualsEqualsToken,ke((t,e)=>t==e)],[fe.default.SyntaxKind.EqualsEqualsEqualsToken,ke((t,e)=>t===e)],[fe.default.SyntaxKind.ExclamationEqualsToken,ke((t,e)=>t!=e)],[fe.default.SyntaxKind.ExclamationEqualsEqualsToken,ke((t,e)=>t!==e)],[fe.default.SyntaxKind.LessThanLessThanToken,ke((t,e)=>t<<e)],[fe.default.SyntaxKind.GreaterThanGreaterThanToken,ke((t,e)=>t>>e)],[fe.default.SyntaxKind.GreaterThanGreaterThanGreaterThanToken,ke((t,e)=>t>>>e)],[fe.default.SyntaxKind.AsteriskAsteriskToken,ke((t,e)=>Math.pow(t,e))],[fe.default.SyntaxKind.AmpersandAmpersandToken,sg((t,e)=>t&&e)],[fe.default.SyntaxKind.BarBarToken,sg((t,e)=>t||e)]]),LL=new Map([[fe.default.SyntaxKind.TildeToken,t=>~t],[fe.default.SyntaxKind.MinusToken,t=>-t],[fe.default.SyntaxKind.PlusToken,t=>+t],[fe.default.SyntaxKind.ExclamationToken,t=>!t]]);var ja;(function(t){t[t.SingleFile=0]="SingleFile",t[t.WholeProgram=1]="WholeProgram"})(ja||(ja={}));var ig;(function(t){t[t.NgModule=0]="NgModule",t[t.Standalone=1]="Standalone"})(ig||(ig={}));var og;(function(t){t[t.Normal=0]="Normal",t[t.ForceDirect=1]="ForceDirect"})(og||(og={}));var ag;(function(t){t[t.Reference=0]="Reference",t[t.Variable=1]="Variable",t[t.LetDeclaration=2]="LetDeclaration"})(ag||(ag={}));var wt;(function(t){t[t.Input=0]="Input",t[t.Output=1]="Output",t[t.Binding=2]="Binding",t[t.Reference=3]="Reference",t[t.Variable=4]="Variable",t[t.Directive=5]="Directive",t[t.Element=6]="Element",t[t.Template=7]="Template",t[t.Expression=8]="Expression",t[t.DomBinding=9]="DomBinding",t[t.Pipe=10]="Pipe",t[t.LetDeclaration=11]="LetDeclaration"})(wt||(wt={}));var np;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(np||(np={}));var lg;(function(t){t[t.Selector=0]="Selector",t[t.HostDirective=1]="HostDirective"})(lg||(lg={}));var rp;(function(t){t[t.FULL=0]="FULL",t[t.PARTIAL=1]="PARTIAL",t[t.LOCAL=2]="LOCAL"})(rp||(rp={}));var cg;(function(t){t[t.PRIMARY=0]="PRIMARY",t[t.SHARED=1]="SHARED",t[t.WEAK=2]="WEAK"})(cg||(cg={}));var ug;(function(t){t[t.Pending=0]="Pending",t[t.Analyzed=1]="Analyzed",t[t.Resolved=2]="Resolved",t[t.Skipped=3]="Skipped"})(ug||(ug={}));var sp;(function(t){t[t.NgModule=0]="NgModule",t[t.Standalone=1]="Standalone"})(sp||(sp={}));function Xa({api:t,call:e},n){if(!t.allowedAccessLevels.includes(n.accessLevel))throw new Wn(Z.INITIALIZER_API_DISALLOWED_MEMBER_VISIBILITY,e,Vu(`Cannot use "${t.functionName}" on a class member that is declared as ${Wu(n.accessLevel)}.`,[Vu("Update the class field to be either: "+t.allowedAccessLevels.map(r=>Wu(r)).join(", "))]))}function yo(t,e,n,r){if(!on.default.isCallExpression(e))return null;let s=qD(e,t,r)||GD(e,t,r)||HD(e,t,r);if(s===null)return null;let{api:i,apiReference:o,isRequired:a}=s,l=n.getImportOfIdentifier(o);return l===null||i.functionName!==l.name||i.owningModule!==l.from?null:{api:i,call:e,isRequired:a}}function qD(t,e,n){let r=t.expression;if(!on.default.isIdentifier(r))return null;let s=e.find(i=>n.isPotentialReferenceToNamedImport(r,i.functionName,i.owningModule));return s===void 0?null:{api:s,apiReference:r,isRequired:!1}}function GD(t,e,n){let r=t.expression;if(!on.default.isPropertyAccessExpression(r)||!on.default.isIdentifier(r.expression)||r.name.text!=="required")return null;let s=r.expression,i=e.find(o=>n.isPotentialReferenceToNamedImport(s,o.functionName,o.owningModule));return i===void 0?null:{api:i,apiReference:s,isRequired:!0}}function HD(t,e,n){let r=t.expression;if(!on.default.isPropertyAccessExpression(r))return null;let s=null,i,o=!1;if(on.default.isIdentifier(r.expression)&&on.default.isIdentifier(r.name)){let a=r.expression;s=r.name,i=e.find(l=>r.name.text===l.functionName&&n.isPotentialReferenceToNamespaceImport(a,l.owningModule))}else if(on.default.isPropertyAccessExpression(r.expression)&&on.default.isIdentifier(r.expression.expression)&&on.default.isIdentifier(r.expression.name)&&r.name.text==="required"){let a=r.expression.name.text,l=r.expression.expression;s=r.expression.name,i=e.find(c=>c.functionName===a&&n.isPotentialReferenceToNamespaceImport(l,c.owningModule)),o=!0}return i===void 0||s===null?null:{api:i,apiReference:s,isRequired:o}}function cp(t){if(!ip.default.isObjectLiteralExpression(t))throw new Wn(Z.VALUE_HAS_WRONG_TYPE,t,"Argument needs to be an object literal that is statically analyzable.");let e=zu(t),n;if(e.has("alias")){let r=e.get("alias");if(!ip.default.isStringLiteralLike(r))throw new Wn(Z.VALUE_HAS_WRONG_TYPE,r,"Alias needs to be a string that is statically analyzable.");n=r.text}return{alias:n}}var up={functionName:"input",owningModule:"@angular/core",allowedAccessLevels:[he.PublicWritable,he.PublicReadonly,he.Protected]};function Cg(t,e,n){var r;if(t.value===null)return null;let s=yo([up],t.value,e,n);if(s===null)return null;Xa(s,t);let i=s.isRequired?s.call.arguments[0]:s.call.arguments[1],o=i!==void 0?cp(i):null,a=t.name;return{isSignal:!0,classPropertyName:a,bindingPropertyName:(r=o?.alias)!=null?r:a,required:s.isRequired,transform:null}}var pp={functionName:"model",owningModule:"@angular/core",allowedAccessLevels:[he.PublicWritable,he.PublicReadonly,he.Protected]};function Ig(t,e,n){var r;if(t.value===null)return null;let s=yo([pp],t.value,e,n);if(s===null)return null;Xa(s,t);let i=s.isRequired?s.call.arguments[0]:s.call.arguments[1],o=i!==void 0?cp(i):null,a=t.name,l=(r=o?.alias)!=null?r:a;return{call:s.call,input:{isSignal:!0,transform:null,classPropertyName:a,bindingPropertyName:l,required:s.isRequired},output:{isSignal:!1,classPropertyName:a,bindingPropertyName:l+"Change"}}}var pg=[he.PublicWritable,he.PublicReadonly,he.Protected],hp=[{functionName:"output",owningModule:"@angular/core",allowedAccessLevels:pg},{functionName:"outputFromObservable",owningModule:"@angular/core/rxjs-interop",allowedAccessLevels:pg}];function Ag(t,e,n){var r;if(t.value===null)return null;let s=yo(hp,t.value,e,n);if(s===null)return null;if(s.isRequired)throw new Wn(Z.INITIALIZER_API_NO_REQUIRED_FUNCTION,s.call,'Output does not support ".required()".');Xa(s,t);let i=s.api.functionName==="output"?s.call.arguments[0]:s.call.arguments[1],o=i!==void 0?cp(i):null,a=t.name;return{call:s.call,metadata:{isSignal:!1,classPropertyName:a,bindingPropertyName:(r=o?.alias)!=null?r:a}}}var WD=["viewChild","viewChildren","contentChild","contentChildren"],fp=WD.map(t=>({functionName:t,owningModule:"@angular/core",allowedAccessLevels:[he.PublicWritable,he.PublicReadonly,he.Protected,he.Private]})),jD=t=>t!=="contentChildren";function Ng(t,e,n){if(t.value===null)return null;let r=yo(fp,t.value,e,n);if(r===null)return null;Xa(r,t);let{functionName:s}=r.api,i=s==="viewChild"||s==="contentChild",o=r.call.arguments[0];if(o===void 0)throw new Wn(Z.VALUE_HAS_WRONG_TYPE,r.call,"No locator specified.");let a=r.call.arguments[1];if(a!==void 0&&!an.default.isObjectLiteralExpression(a))throw new Wn(Z.VALUE_HAS_WRONG_TYPE,a,"Argument needs to be an object literal.");let l=a&&zu(a),c=l?.has("read")?bg(l.get("read")):null,u=l?.has("descendants")?zD(l.get("descendants")):jD(s);return{name:s,call:r.call,metadata:{isSignal:!0,propertyName:t.name,static:!1,emitDistinctChangesOnly:!0,predicate:KD(o,e),first:i,read:c,descendants:u}}}function KD(t,e){let n=xD(t,e);return n!==null&&(t=n),an.default.isStringLiteralLike(t)?[t.text]:Qr(new ro.WrappedNodeExpr(t),n!==null?2:0)}function bg(t){if(an.default.isExpressionWithTypeArguments(t)||an.default.isParenthesizedExpression(t)||an.default.isAsExpression(t))return bg(t.expression);if(an.default.isPropertyAccessExpression(t)&&an.default.isIdentifier(t.expression)||an.default.isIdentifier(t))return new ro.WrappedNodeExpr(t);throw new Wn(Z.VALUE_NOT_LITERAL,t,'Query "read" option expected a literal class reference.')}function zD(t){if(t.kind===an.default.SyntaxKind.TrueKeyword)return!0;if(t.kind===an.default.SyntaxKind.FalseKeyword)return!1;throw new Wn(Z.VALUE_HAS_WRONG_TYPE,t,'Expected "descendants" option to be a boolean literal.')}var dp=["ViewChild","ViewChildren","ContentChild","ContentChildren"],QL=new Set(dp);var JD=Symbol("NgOriginalFile"),hg;(function(t){t[t.Complete=0]="Complete",t[t.Incremental=1]="Incremental"})(hg||(hg={}));var tO=Symbol("NgExtension");var nO=Symbol("TemplateSourceFile");var rO=Symbol("ngTemplateId"),sO=Symbol("ngNextTemplateId");var Ka;(function(t){t.DIAGNOSTIC="D",t.EXPRESSION_TYPE_IDENTIFIER="T"})(Ka||(Ka={}));var rs;(function(t){t.DIRECTIVE="DIR",t.COMPONENT_COMPLETION="COMPCOMP",t.EVENT_PARAMETER="EP",t.VARIABLE_AS_EXPRESSION="VAE"})(rs||(rs={}));function vo(t,e){ho.default.addSyntheticTrailingComment(t,ho.default.SyntaxKind.MultiLineCommentTrivia,`${Ka.EXPRESSION_TYPE_IDENTIFIER}:${e}`,!1)}var r0=`${Ka.DIAGNOSTIC}:ignore`;function Tr(t){ho.default.addSyntheticTrailingComment(t,ho.default.SyntaxKind.MultiLineCommentTrivia,r0,!1)}var cO=new sn;var a0=new Set([Q.default.SyntaxKind.ParenthesizedExpression,Q.default.SyntaxKind.Identifier,Q.default.SyntaxKind.CallExpression,Q.default.SyntaxKind.NonNullExpression,Q.default.SyntaxKind.ElementAccessExpression,Q.default.SyntaxKind.PropertyAccessExpression,Q.default.SyntaxKind.ArrayLiteralExpression,Q.default.SyntaxKind.ObjectLiteralExpression,Q.default.SyntaxKind.StringLiteral,Q.default.SyntaxKind.NumericLiteral,Q.default.SyntaxKind.TrueKeyword,Q.default.SyntaxKind.FalseKeyword,Q.default.SyntaxKind.NullKeyword,Q.default.SyntaxKind.UndefinedKeyword]);function jn(t){return a0.has(t.kind)||(t=Q.default.factory.createParenthesizedExpression(t)),Q.default.factory.createParenthesizedExpression(Q.default.factory.createAsExpression(t,Q.default.factory.createKeywordTypeNode(Q.default.SyntaxKind.AnyKeyword)))}function l0(t){let e=Q.default.factory.createPropertyAccessExpression(Q.default.factory.createIdentifier("document"),"createElement");return Q.default.factory.createCallExpression(e,void 0,[Q.default.factory.createStringLiteral(t)])}function fo(t,e){vo(e,rs.VARIABLE_AS_EXPRESSION);let n=Q.default.factory.createAsExpression(Q.default.factory.createNonNullExpression(Q.default.factory.createNull()),e),r=Q.default.factory.createVariableDeclaration(t,void 0,void 0,n);return Q.default.factory.createVariableStatement(void 0,[r])}function c0(t,e){return Q.default.factory.createTypeQueryNode(Q.default.factory.createQualifiedName(t,`ngAcceptInputType_${e}`))}function Kn(t,e,n=null){let r=Q.default.factory.createVariableDeclaration(t,void 0,void 0,e);return Q.default.factory.createVariableStatement(void 0,n===null?[r]:Q.default.factory.createVariableDeclarationList([r],n))}function fg(t,e,n=[]){let r=Q.default.factory.createPropertyAccessExpression(t,e);return Q.default.factory.createCallExpression(r,void 0,n)}function u0(t){if(t<0){let e=Q.default.factory.createNumericLiteral(Math.abs(t));return Q.default.factory.createPrefixUnaryExpression(Q.default.SyntaxKind.MinusToken,e)}return Q.default.factory.createNumericLiteral(t)}var f0=class{constructor(t,e){this.typeParameters=t,this.reflector=e}canEmit(t){return this.typeParameters===void 0?!0:this.typeParameters.every(e=>this.canEmitType(e.constraint,t)&&this.canEmitType(e.default,t))}canEmitType(t,e){return t===void 0?!0:eg(t,n=>{let r=this.resolveTypeReference(n);return r===null?!1:r instanceof es?e(r):!0})}emit(t){if(this.typeParameters===void 0)return;let e=new tg(n=>this.translateTypeReference(n,t));return this.typeParameters.map(n=>{let r=n.constraint!==void 0?e.emitType(n.constraint):void 0,s=n.default!==void 0?e.emitType(n.default):void 0;return co.default.factory.updateTypeParameterDeclaration(n,n.modifiers,n.name,r,s)})}resolveTypeReference(t){let e=co.default.isIdentifier(t.typeName)?t.typeName:t.typeName.right,n=this.reflector.getDeclarationOfIdentifier(e);if(n===null||n.node===null)return null;if(this.isLocalTypeParameter(n.node))return t;let r=null;return typeof n.viaModule=="string"&&(r={specifier:n.viaModule,resolutionContext:t.getSourceFile().fileName}),new es(n.node,n.viaModule===Zr?Zr:r)}translateTypeReference(t,e){let n=this.resolveTypeReference(t);if(!(n instanceof es))return n;let r=e(n);if(r===null)return null;if(!co.default.isTypeReferenceNode(r))throw new Error(`Expected TypeReferenceNode for emitted reference, got ${co.default.SyntaxKind[r.kind]}.`);return r}isLocalTypeParameter(t){return this.typeParameters.some(e=>e===t)}},fO=[f.InputSignalBrandWriteType],dg;(function(t){t[t.MustInline=0]="MustInline",t[t.ShouldInlineForGenericBounds=1]="ShouldInlineForGenericBounds",t[t.None=2]="None"})(dg||(dg={}));function d0(t,e,n){return new f0(t.typeParameters,e).canEmit(s=>n.canReferenceType(s))}function m0(t,e,n){return!d0(t,e,n)}function Ie(t){return mo.default.factory.createParenthesizedExpression(t)}function ts(t){return mo.default.factory.createParenthesizedExpression(t)}function B(t,e){let n;e instanceof We?n=`${e.start},${e.end}`:n=`${e.start.offset},${e.end.offset}`,mo.default.addSyntheticTrailingComment(t,mo.default.SyntaxKind.MultiLineCommentTrivia,n,!1)}var ns=D.default.factory.createAsExpression(D.default.factory.createNull(),D.default.factory.createKeywordTypeNode(D.default.SyntaxKind.AnyKeyword)),Zu=D.default.factory.createIdentifier("undefined"),v0=new Map([["+",D.default.SyntaxKind.PlusToken],["-",D.default.SyntaxKind.MinusToken]]),E0=new Map([["+",D.default.SyntaxKind.PlusToken],["-",D.default.SyntaxKind.MinusToken],["<",D.default.SyntaxKind.LessThanToken],[">",D.default.SyntaxKind.GreaterThanToken],["<=",D.default.SyntaxKind.LessThanEqualsToken],[">=",D.default.SyntaxKind.GreaterThanEqualsToken],["==",D.default.SyntaxKind.EqualsEqualsToken],["===",D.default.SyntaxKind.EqualsEqualsEqualsToken],["*",D.default.SyntaxKind.AsteriskToken],["/",D.default.SyntaxKind.SlashToken],["%",D.default.SyntaxKind.PercentToken],["!=",D.default.SyntaxKind.ExclamationEqualsToken],["!==",D.default.SyntaxKind.ExclamationEqualsEqualsToken],["||",D.default.SyntaxKind.BarBarToken],["&&",D.default.SyntaxKind.AmpersandAmpersandToken],["&",D.default.SyntaxKind.AmpersandToken],["|",D.default.SyntaxKind.BarToken],["??",D.default.SyntaxKind.QuestionQuestionToken]]);function S0(t,e,n){return new w0(e,n).translate(t)}var w0=class{constructor(t,e){this.maybeResolve=t,this.config=e}translate(t){if(t instanceof we&&(t=t.ast),t instanceof Ue){let n=D.default.factory.createIdentifier("undefined");return B(n,t.sourceSpan),n}let e=this.maybeResolve(t);return e!==null?e:t.visit(this)}visitUnary(t){let e=this.translate(t.expr),n=v0.get(t.operator);if(n===void 0)throw new Error(`Unsupported Unary.operator: ${t.operator}`);let r=Ie(D.default.factory.createPrefixUnaryExpression(n,e));return B(r,t.sourceSpan),r}visitBinary(t){let e=Ie(this.translate(t.left)),n=Ie(this.translate(t.right)),r=E0.get(t.operation);if(r===void 0)throw new Error(`Unsupported Binary.operation: ${t.operation}`);let s=D.default.factory.createBinaryExpression(e,r,n);return B(s,t.sourceSpan),s}visitChain(t){let e=t.expressions.map(r=>this.translate(r)),n=Ie(D.default.factory.createCommaListExpression(e));return B(n,t.sourceSpan),n}visitConditional(t){let e=this.translate(t.condition),n=this.translate(t.trueExp),r=ts(this.translate(t.falseExp)),s=D.default.factory.createParenthesizedExpression(D.default.factory.createConditionalExpression(e,void 0,n,void 0,r));return B(s,t.sourceSpan),s}visitImplicitReceiver(t){throw new Error("Method not implemented.")}visitThisReceiver(t){throw new Error("Method not implemented.")}visitInterpolation(t){return t.expressions.reduce((e,n)=>D.default.factory.createBinaryExpression(e,D.default.SyntaxKind.PlusToken,ts(this.translate(n))),D.default.factory.createStringLiteral(""))}visitKeyedRead(t){let e=Ie(this.translate(t.receiver)),n=this.translate(t.key),r=D.default.factory.createElementAccessExpression(e,n);return B(r,t.sourceSpan),r}visitKeyedWrite(t){let e=Ie(this.translate(t.receiver)),n=D.default.factory.createElementAccessExpression(e,this.translate(t.key)),r=ts(this.translate(t.value)),s=Ie(D.default.factory.createBinaryExpression(n,D.default.SyntaxKind.EqualsToken,r));return B(s,t.sourceSpan),s}visitLiteralArray(t){let e=t.expressions.map(s=>this.translate(s)),n=D.default.factory.createArrayLiteralExpression(e),r=this.config.strictLiteralTypes?n:jn(n);return B(r,t.sourceSpan),r}visitLiteralMap(t){let e=t.keys.map(({key:s},i)=>{let o=this.translate(t.values[i]);return D.default.factory.createPropertyAssignment(D.default.factory.createStringLiteral(s),o)}),n=D.default.factory.createObjectLiteralExpression(e,!0),r=this.config.strictLiteralTypes?n:jn(n);return B(r,t.sourceSpan),r}visitLiteralPrimitive(t){let e;if(t.value===void 0)e=D.default.factory.createIdentifier("undefined");else if(t.value===null)e=D.default.factory.createNull();else if(typeof t.value=="string")e=D.default.factory.createStringLiteral(t.value);else if(typeof t.value=="number")e=u0(t.value);else if(typeof t.value=="boolean")e=t.value?D.default.factory.createTrue():D.default.factory.createFalse();else throw Error(`Unsupported AST value of type ${typeof t.value}`);return B(e,t.sourceSpan),e}visitNonNullAssert(t){let e=Ie(this.translate(t.expression)),n=D.default.factory.createNonNullExpression(e);return B(n,t.sourceSpan),n}visitPipe(t){throw new Error("Method not implemented.")}visitPrefixNot(t){let e=Ie(this.translate(t.expression)),n=D.default.factory.createLogicalNot(e);return B(n,t.sourceSpan),n}visitPropertyRead(t){let e=Ie(this.translate(t.receiver)),n=D.default.factory.createPropertyAccessExpression(e,t.name);B(n,t.nameSpan);let r=Ie(n);return B(r,t.sourceSpan),r}visitPropertyWrite(t){let e=Ie(this.translate(t.receiver)),n=D.default.factory.createPropertyAccessExpression(e,t.name);B(n,t.nameSpan);let r=Ie(n);B(r,t.sourceSpan);let s=ts(this.translate(t.value)),i=Ie(D.default.factory.createBinaryExpression(r,D.default.SyntaxKind.EqualsToken,s));return B(i,t.sourceSpan),i}visitSafePropertyRead(t){let e,n=Ie(this.translate(t.receiver));if(this.config.strictSafeNavigationTypes){let r=D.default.factory.createPropertyAccessExpression(D.default.factory.createNonNullExpression(n),t.name);B(r,t.nameSpan),e=D.default.factory.createParenthesizedExpression(D.default.factory.createConditionalExpression(ns,void 0,r,void 0,Zu))}else if(ep.veWillInferAnyFor(t))e=D.default.factory.createPropertyAccessExpression(jn(n),t.name);else{let r=D.default.factory.createPropertyAccessExpression(D.default.factory.createNonNullExpression(n),t.name);B(r,t.nameSpan),e=jn(r)}return B(e,t.sourceSpan),e}visitSafeKeyedRead(t){let e=Ie(this.translate(t.receiver)),n=this.translate(t.key),r;if(this.config.strictSafeNavigationTypes){let s=D.default.factory.createElementAccessExpression(D.default.factory.createNonNullExpression(e),n);B(s,t.sourceSpan),r=D.default.factory.createParenthesizedExpression(D.default.factory.createConditionalExpression(ns,void 0,s,void 0,Zu))}else if(ep.veWillInferAnyFor(t))r=D.default.factory.createElementAccessExpression(jn(e),n);else{let s=D.default.factory.createElementAccessExpression(D.default.factory.createNonNullExpression(e),n);B(s,t.sourceSpan),r=jn(s)}return B(r,t.sourceSpan),r}visitCall(t){let e=t.args.map(i=>this.translate(i)),n,r=t.receiver;if(r instanceof Ce){let i=this.maybeResolve(r);if(i!==null)n=i;else{let o=Ie(this.translate(r.receiver));n=D.default.factory.createPropertyAccessExpression(o,r.name),B(n,r.nameSpan)}}else n=this.translate(r);let s;return t.receiver instanceof lt||t.receiver instanceof pr?s=this.convertToSafeCall(t,n,e):s=D.default.factory.createCallExpression(n,void 0,e),B(s,t.sourceSpan),s}visitSafeCall(t){let e=t.args.map(s=>this.translate(s)),n=Ie(this.translate(t.receiver)),r=this.convertToSafeCall(t,n,e);return B(r,t.sourceSpan),r}convertToSafeCall(t,e,n){if(this.config.strictSafeNavigationTypes){let r=D.default.factory.createCallExpression(D.default.factory.createNonNullExpression(e),void 0,n);return D.default.factory.createParenthesizedExpression(D.default.factory.createConditionalExpression(ns,void 0,r,void 0,Zu))}return ep.veWillInferAnyFor(t)?D.default.factory.createCallExpression(jn(e),void 0,n):jn(D.default.factory.createCallExpression(D.default.factory.createNonNullExpression(e),void 0,n))}},za=class{static veWillInferAnyFor(t){let e=za.SINGLETON;return t instanceof yn?t.visit(e):t.receiver.visit(e)}visitUnary(t){return t.expr.visit(this)}visitBinary(t){return t.left.visit(this)||t.right.visit(this)}visitChain(t){return!1}visitConditional(t){return t.condition.visit(this)||t.trueExp.visit(this)||t.falseExp.visit(this)}visitCall(t){return!0}visitSafeCall(t){return!1}visitImplicitReceiver(t){return!1}visitThisReceiver(t){return!1}visitInterpolation(t){return t.expressions.some(e=>e.visit(this))}visitKeyedRead(t){return!1}visitKeyedWrite(t){return!1}visitLiteralArray(t){return!0}visitLiteralMap(t){return!0}visitLiteralPrimitive(t){return!1}visitPipe(t){return!0}visitPrefixNot(t){return t.expression.visit(this)}visitNonNullAssert(t){return t.expression.visit(this)}visitPropertyRead(t){return!1}visitPropertyWrite(t){return!1}visitSafePropertyRead(t){return!1}visitSafeKeyedRead(t){return!1}},ep=za;za.SINGLETON=new za;var mg;(function(t){t[t.UseEmitter=0]="UseEmitter",t[t.CopyClassNodes=1]="CopyClassNodes",t[t.FallbackToAny=2]="FallbackToAny"})(mg||(mg={}));var Se=class{circularFallback(){return V0}},T0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.element=n}get optional(){return!0}execute(){let t=this.tcb.allocateId(),e=l0(this.element.name);return B(e,this.element.startSourceSpan||this.element.sourceSpan),this.scope.addStatement(Kn(t,e)),t}},x0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.template=n,this.variable=r}get optional(){return!1}execute(){let t=this.scope.resolve(this.template),e=this.tcb.allocateId(),n=E.default.factory.createPropertyAccessExpression(t,this.variable.value||"$implicit");B(e,this.variable.keySpan);let r;return this.variable.valueSpan!==void 0?(B(n,this.variable.valueSpan),r=Kn(e,ts(n))):r=Kn(e,n),B(r.declarationList.declarations[0],this.variable.sourceSpan),this.scope.addStatement(r),e}},C0=class extends Se{constructor(t,e){super(),this.tcb=t,this.scope=e,this.optional=!0}execute(){let t=this.tcb.allocateId(),e=E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword);return this.scope.addStatement(fo(t,e)),t}},I0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.node=n,this.optional=!1}execute(){let t=this.tcb.allocateId();B(t,this.node.nameSpan);let e=Pt(this.node.value,this.tcb,this.scope),n=Kn(t,ts(e),E.default.NodeFlags.Const);return B(n.declarationList.declarations[0],this.node.sourceSpan),this.scope.addStatement(n),t}},A0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.template=n}get optional(){return!1}execute(){let t=[],e=this.tcb.boundTarget.getDirectivesOfNode(this.template);if(e!==null)for(let o of e){let a=this.scope.resolve(this.template,o),l=this.tcb.env.reference(o.ref);if(o.ngTemplateGuards.forEach(c=>{let u=this.template.inputs.find(h=>h.name===c.inputName)||this.template.templateAttrs.find(h=>h instanceof _t&&h.name===c.inputName);if(u!==void 0){let h=Pt(u.value,this.tcb,this.scope);if(Tr(h),c.type==="binding")t.push(h);else{let d=fg(l,`ngTemplateGuard_${c.inputName}`,[a,h]);B(d,u.value.sourceSpan),t.push(d)}}}),o.hasNgTemplateContextGuard)if(this.tcb.env.config.applyTemplateContextGuards){let c=this.scope.resolve(this.template),u=fg(l,"ngTemplateContextGuard",[a,c]);B(u,this.template.sourceSpan),t.push(u)}else this.template.variables.length>0&&this.tcb.env.config.suggestionsForSuboptimalTypeInference&&this.tcb.oobRecorder.suboptimalTypeInference(this.tcb.id,this.template.variables)}let n=null;t.length>0&&(n=t.reduce((o,a)=>E.default.factory.createBinaryExpression(o,E.default.SyntaxKind.AmpersandAmpersandToken,a),t.pop()));let s=go.forNodes(this.tcb,this.scope,this.template,this.template.children,n).render();if(s.length===0)return null;let i=E.default.factory.createBlock(s);return n!==null&&(i=E.default.factory.createIfStatement(n,i)),this.scope.addStatement(i),null}},Wa=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.expression=n}get optional(){return!1}execute(){let t=Pt(this.expression,this.tcb,this.scope);return this.scope.addStatement(E.default.factory.createExpressionStatement(t)),null}},Dg=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.node=n,this.dir=r}get optional(){return!0}execute(){let t=this.dir.ref,e=this.tcb.env.referenceType(this.dir.ref),n;if(this.dir.isGeneric===!1||t.node.typeParameters===void 0)n=e;else{if(!E.default.isTypeReferenceNode(e))throw new Error(`Expected TypeReferenceNode when referencing the type for ${this.dir.ref.debugName}`);let s=t.node.typeParameters.map(()=>E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword));n=E.default.factory.createTypeReferenceNode(e.typeName,s)}let r=this.tcb.allocateId();return vo(r,rs.DIRECTIVE),B(r,this.node.startSourceSpan||this.node.sourceSpan),this.scope.addStatement(fo(r,n)),r}},N0=class extends Dg{execute(){let t=this.dir.ref;if(this.dir.isGeneric)throw new Error(`Assertion Error: expected ${t.debugName} not to be generic.`);return super.execute()}},b0=class extends Dg{execute(){let t=this.dir.ref;if(t.node.typeParameters===void 0)throw new Error(`Assertion Error: expected typeParameters when creating a declaration for ${t.debugName}`);return super.execute()}},gg=class extends Se{constructor(t,e,n,r,s){super(),this.tcb=t,this.scope=e,this.node=n,this.host=r,this.target=s,this.optional=!0}execute(){let t=this.tcb.allocateId(),e=this.target instanceof se||this.target instanceof oe?this.scope.resolve(this.target):this.scope.resolve(this.host,this.target);return this.target instanceof oe&&!this.tcb.env.config.checkTypeOfDomReferences||!this.tcb.env.config.checkTypeOfNonDomReferences?e=E.default.factory.createAsExpression(e,E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword)):this.target instanceof se&&(e=E.default.factory.createAsExpression(e,E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword)),e=E.default.factory.createAsExpression(e,this.tcb.env.referenceExternalType("@angular/core","TemplateRef",[Sr])),e=E.default.factory.createParenthesizedExpression(e)),B(e,this.node.sourceSpan),B(t,this.node.keySpan),this.scope.addStatement(Kn(t,e)),t}},D0=class extends Se{constructor(t,e){super(),this.tcb=t,this.scope=e,this.optional=!0}execute(){let t=this.tcb.allocateId();return this.scope.addStatement(Kn(t,ns)),t}},_0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.node=n,this.dir=r}get optional(){return!0}execute(){let t=this.tcb.allocateId();vo(t,rs.DIRECTIVE),B(t,this.node.startSourceSpan||this.node.sourceSpan);let e=new Map,n=Rg(this.dir,this.node);for(let s of n)if(!(!this.tcb.env.config.checkTypeOfAttributes&&s.attribute instanceof Dt))for(let{fieldName:i,isTwoWayBinding:o}of s.inputs){if(e.has(i))continue;let a=kg(s.attribute,this.tcb,this.scope);e.set(i,{type:"binding",field:i,expression:a,sourceSpan:s.attribute.sourceSpan,isTwoWayBinding:o})}for(let{classPropertyName:s}of this.dir.inputs)e.has(s)||e.set(s,{type:"unset",field:s});let r=q0(this.dir,this.tcb,Array.from(e.values()));return Tr(r),this.scope.addStatement(Kn(t,r)),t}circularFallback(){return new k0(this.tcb,this.scope,this.node,this.dir)}},R0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.node=n,this.dir=r}get optional(){return!1}execute(){let t=null,e=Rg(this.dir,this.node),n=new Set;for(let r of e){let s=gp(kg(r.attribute,this.tcb,this.scope),this.tcb),i=Ie(s);for(let{fieldName:o,required:a,transformType:l,isSignal:c,isTwoWayBinding:u}of r.inputs){let h;if(a&&n.add(o),this.dir.coercedInputFields.has(o)){let d;if(l!==null)d=this.tcb.env.referenceTransplantedType(new xs(l));else{let y=this.tcb.env.referenceType(this.dir.ref);if(!E.default.isTypeReferenceNode(y))throw new Error(`Expected TypeReferenceNode from reference to ${this.dir.ref.debugName}`);d=c0(y.typeName,o)}let g=this.tcb.allocateId();this.scope.addStatement(fo(g,d)),h=g}else{if(this.dir.undeclaredInputFields.has(o))continue;if(!this.tcb.env.config.honorAccessModifiersForInputBindings&&this.dir.restrictedInputFields.has(o)){t===null&&(t=this.scope.resolve(this.node,this.dir));let d=this.tcb.allocateId(),g=this.tcb.env.referenceType(this.dir.ref);if(!E.default.isTypeReferenceNode(g))throw new Error(`Expected TypeReferenceNode from reference to ${this.dir.ref.debugName}`);let y=E.default.factory.createIndexedAccessTypeNode(E.default.factory.createTypeQueryNode(t),E.default.factory.createLiteralTypeNode(E.default.factory.createStringLiteral(o))),C=fo(d,y);this.scope.addStatement(C),h=d}else t===null&&(t=this.scope.resolve(this.node,this.dir)),h=this.dir.stringLiteralInputFields.has(o)?E.default.factory.createElementAccessExpression(t,E.default.factory.createStringLiteral(o)):E.default.factory.createPropertyAccessExpression(t,E.default.factory.createIdentifier(o))}if(c){let d=this.tcb.env.referenceExternalSymbol(f.InputSignalBrandWriteType.moduleName,f.InputSignalBrandWriteType.name);if(!E.default.isIdentifier(d)&&!E.default.isPropertyAccessExpression(d))throw new Error(`Expected identifier or property access for reference to ${f.InputSignalBrandWriteType.name}`);h=E.default.factory.createElementAccessExpression(h,d)}r.attribute.keySpan!==void 0&&B(h,r.attribute.keySpan),u&&this.tcb.env.config.allowSignalsInTwoWayBindings&&(i=Pg(i,this.tcb)),i=E.default.factory.createBinaryExpression(h,E.default.SyntaxKind.EqualsToken,i)}B(i,r.attribute.sourceSpan),!this.tcb.env.config.checkTypeOfAttributes&&r.attribute instanceof Dt&&Tr(i),this.scope.addStatement(E.default.factory.createExpressionStatement(i))}return this.checkRequiredInputs(n),null}checkRequiredInputs(t){let e=[];for(let n of this.dir.inputs)n.required&&!t.has(n.classPropertyName)&&e.push(n.bindingPropertyName);e.length>0&&this.tcb.oobRecorder.missingRequiredInputs(this.tcb.id,this.node,this.dir.name,this.dir.isComponent,e)}},k0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.node=n,this.dir=r}get optional(){return!1}execute(){let t=this.tcb.allocateId(),e=this.tcb.env.typeCtorFor(this.dir),n=E.default.factory.createCallExpression(e,void 0,[E.default.factory.createNonNullExpression(E.default.factory.createNull())]);return this.scope.addStatement(Kn(t,n)),t}},tp=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.element=e,this.checkElement=n,this.claimedInputs=r}get optional(){return!1}execute(){var t;this.checkElement&&this.tcb.domSchemaChecker.checkElement(this.tcb.id,this.element,this.tcb.schemas,this.tcb.hostIsStandalone);for(let e of this.element.inputs){let n=e.type===z.Property||e.type===z.TwoWay;if(!(n&&this.claimedInputs.has(e.name))&&n&&e.name!=="style"&&e.name!=="class"){let r=(t=_g.get(e.name))!=null?t:e.name;this.tcb.domSchemaChecker.checkProperty(this.tcb.id,this.element,r,e.sourceSpan,this.tcb.schemas,this.tcb.hostIsStandalone)}}return null}},P0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.element=e,this.ngContentSelectors=n,this.componentName=r,this.optional=!1,this.category=t.env.config.controlFlowPreventingContentProjection==="error"?E.default.DiagnosticCategory.Error:E.default.DiagnosticCategory.Warning}execute(){let t=this.findPotentialControlFlowNodes();if(t.length>0){let e=new or;for(let n of this.ngContentSelectors)n!=="*"&&e.addSelectables(Yt.parse(n),n);for(let n of t)for(let r of n.children)(r instanceof oe||r instanceof se)&&e.match(du(r),(s,i)=>{this.tcb.oobRecorder.controlFlowPreventingContentProjection(this.tcb.id,this.category,r,this.componentName,i,n,this.tcb.hostPreserveWhitespaces)})}return null}findPotentialControlFlowNodes(){let t=[];for(let e of this.element.children)if(e instanceof En)this.shouldCheck(e)&&t.push(e),e.empty!==null&&this.shouldCheck(e.empty)&&t.push(e.empty);else if(e instanceof Vr)for(let n of e.branches)this.shouldCheck(n)&&t.push(n);else if(e instanceof Ur)for(let n of e.cases)this.shouldCheck(n)&&t.push(n);return t}shouldCheck(t){if(t.children.length<2)return!1;let e=!1;for(let n of t.children)if(!(n instanceof Kt)||this.tcb.hostPreserveWhitespaces||n.value.trim().length>0){if(e)return!0;e=!0}return!1}},_g=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),yg=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.element=n,this.claimedInputs=r}get optional(){return!1}execute(){var t;let e=null;for(let n of this.element.inputs){let r=n.type===z.Property||n.type===z.TwoWay;if(r&&this.claimedInputs.has(n.name))continue;let s=gp(Pt(n.value,this.tcb,this.scope),this.tcb);if(this.tcb.env.config.checkTypeOfDomBindings&&r)if(n.name!=="style"&&n.name!=="class"){e===null&&(e=this.scope.resolve(this.element));let i=(t=_g.get(n.name))!=null?t:n.name,o=E.default.factory.createElementAccessExpression(e,E.default.factory.createStringLiteral(i)),a=E.default.factory.createBinaryExpression(o,E.default.SyntaxKind.EqualsToken,Ie(s));B(a,n.sourceSpan),this.scope.addStatement(E.default.factory.createExpressionStatement(a))}else this.scope.addStatement(E.default.factory.createExpressionStatement(s));else this.scope.addStatement(E.default.factory.createExpressionStatement(s))}return null}},M0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.node=n,this.dir=r}get optional(){return!1}execute(){let t=null,e=this.dir.outputs;for(let n of this.node.outputs){if(n.type===_e.Animation||!e.hasBindingPropertyName(n.name))continue;if(this.tcb.env.config.checkTypeOfOutputEvents&&n.name.endsWith("Change")){let i=n.name.slice(0,-6);Mg(i,n,this.node.inputs,this.tcb)}let r=e.getByBindingPropertyName(n.name)[0].classPropertyName;t===null&&(t=this.scope.resolve(this.node,this.dir));let s=E.default.factory.createElementAccessExpression(t,E.default.factory.createStringLiteral(r));if(B(s,n.keySpan),this.tcb.env.config.checkTypeOfOutputEvents){let i=po(n,this.tcb,this.scope,0),o=E.default.factory.createPropertyAccessExpression(s,"subscribe"),a=E.default.factory.createCallExpression(o,void 0,[i]);B(a,n.sourceSpan),this.scope.addStatement(E.default.factory.createExpressionStatement(a))}else{this.scope.addStatement(E.default.factory.createExpressionStatement(s));let i=po(n,this.tcb,this.scope,1);this.scope.addStatement(E.default.factory.createExpressionStatement(i))}}return null}},vg=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.element=n,this.claimedOutputs=r}get optional(){return!1}execute(){let t=null;for(let e of this.element.outputs)if(!this.claimedOutputs.has(e.name)){if(this.tcb.env.config.checkTypeOfOutputEvents&&e.name.endsWith("Change")){let n=e.name.slice(0,-6);if(Mg(n,e,this.element.inputs,this.tcb))continue}if(e.type===_e.Animation){let n=this.tcb.env.config.checkTypeOfAnimationEvents?this.tcb.env.referenceExternalType("@angular/animations","AnimationEvent"):1,r=po(e,this.tcb,this.scope,n);this.scope.addStatement(E.default.factory.createExpressionStatement(r))}else if(this.tcb.env.config.checkTypeOfDomEvents){let n=po(e,this.tcb,this.scope,0);t===null&&(t=this.scope.resolve(this.element));let r=E.default.factory.createPropertyAccessExpression(t,"addEventListener");B(r,e.keySpan);let s=E.default.factory.createCallExpression(r,void 0,[E.default.factory.createStringLiteral(e.name),n]);B(s,e.sourceSpan),this.scope.addStatement(E.default.factory.createExpressionStatement(s))}else{let n=po(e,this.tcb,this.scope,1);this.scope.addStatement(E.default.factory.createExpressionStatement(n))}}return null}},L0=class extends Se{constructor(t){super(),this.scope=t,this.optional=!1}execute(){let t=E.default.factory.createThis(),e=E.default.factory.createPropertyAccessExpression(t,"");return Tr(e),vo(e,rs.COMPONENT_COMPLETION),this.scope.addStatement(E.default.factory.createExpressionStatement(e)),null}},O0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.initializer=n,this.variable=r}get optional(){return!1}execute(){let t=this.tcb.allocateId();B(t,this.variable.keySpan);let e=Kn(t,ts(this.initializer));return B(e.declarationList.declarations[0],this.variable.sourceSpan),this.scope.addStatement(e),t}},F0=class extends Se{constructor(t,e,n,r){super(),this.tcb=t,this.scope=e,this.type=n,this.variable=r,this.optional=!0}execute(){let t=this.tcb.allocateId();B(t,this.variable.keySpan);let e=fo(t,this.type);return B(e.declarationList.declarations[0],this.variable.sourceSpan),this.scope.addStatement(e),t}},B0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.block=n,this.expressionScopes=new Map}get optional(){return!1}execute(){let t=this.generateBranch(0);return t&&this.scope.addStatement(t),null}generateBranch(t){let e=this.block.branches[t];if(!e)return;if(e.expression===null){let i=this.getBranchScope(this.scope,e,t);return E.default.factory.createBlock(i.render())}let n=go.forNodes(this.tcb,this.scope,e,[],null);n.render().forEach(i=>this.scope.addStatement(i)),this.expressionScopes.set(e,n);let r=Pt(e.expression,this.tcb,this.scope);e.expressionAlias!==null&&(r=E.default.factory.createBinaryExpression(E.default.factory.createParenthesizedExpression(r),E.default.SyntaxKind.AmpersandAmpersandToken,n.resolve(e.expressionAlias)));let s=this.getBranchScope(n,e,t);return E.default.factory.createIfStatement(r,E.default.factory.createBlock(s.render()),this.generateBranch(t+1))}getBranchScope(t,e,n){let r=this.tcb.env.config.checkControlFlowBodies;return go.forNodes(this.tcb,t,null,r?e.children:[],r?this.generateBranchGuard(n):null)}generateBranchGuard(t){let e=null;for(let n=0;n<=t;n++){let r=this.block.branches[n];if(r.expression===null)continue;if(!this.expressionScopes.has(r))throw new Error(`Could not determine expression scope of branch at index ${n}`);let s=this.expressionScopes.get(r),i;i=Pt(r.expression,this.tcb,s),r.expressionAlias!==null&&(i=E.default.factory.createBinaryExpression(E.default.factory.createParenthesizedExpression(i),E.default.SyntaxKind.AmpersandAmpersandToken,s.resolve(r.expressionAlias))),Tr(i);let o=n===t?i:E.default.factory.createPrefixUnaryExpression(E.default.SyntaxKind.ExclamationToken,E.default.factory.createParenthesizedExpression(i));e=e===null?o:E.default.factory.createBinaryExpression(e,E.default.SyntaxKind.AmpersandAmpersandToken,o)}return e}},$0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.block=n}get optional(){return!1}execute(){let t=Pt(this.block.expression,this.tcb,this.scope),e=this.block.cases.map(n=>{let r=this.tcb.env.config.checkControlFlowBodies,s=go.forNodes(this.tcb,this.scope,null,r?n.children:[],r?this.generateGuard(n,t):null),i=[...s.render(),E.default.factory.createBreakStatement()];return n.expression===null?E.default.factory.createDefaultClause(i):E.default.factory.createCaseClause(Pt(n.expression,this.tcb,s),i)});return this.scope.addStatement(E.default.factory.createSwitchStatement(t,E.default.factory.createCaseBlock(e))),null}generateGuard(t,e){if(t.expression!==null){let r=Pt(t.expression,this.tcb,this.scope);return Tr(r),E.default.factory.createBinaryExpression(e,E.default.SyntaxKind.EqualsEqualsEqualsToken,r)}let n=null;for(let r of this.block.cases){if(r.expression===null)continue;let s=Pt(r.expression,this.tcb,this.scope);Tr(s);let i=E.default.factory.createBinaryExpression(e,E.default.SyntaxKind.ExclamationEqualsEqualsToken,s);n===null?n=i:n=E.default.factory.createBinaryExpression(n,E.default.SyntaxKind.AmpersandAmpersandToken,i)}return n}},U0=class extends Se{constructor(t,e,n){super(),this.tcb=t,this.scope=e,this.block=n}get optional(){return!1}execute(){let t=go.forNodes(this.tcb,this.scope,this.block,this.tcb.env.config.checkControlFlowBodies?this.block.children:[],null),e=t.resolve(this.block.item);if(!E.default.isIdentifier(e))throw new Error(`Could not resolve for loop variable ${this.block.item.name} to an identifier`);let n=E.default.factory.createVariableDeclarationList([E.default.factory.createVariableDeclaration(e)],E.default.NodeFlags.Const);B(n,this.block.item.keySpan);let r=E.default.factory.createNonNullExpression(Pt(this.block.expression,this.tcb,this.scope)),i=new W0(this.tcb,t,this.block).translate(this.block.trackBy),o=[...t.render(),E.default.factory.createExpressionStatement(i)];return this.scope.addStatement(E.default.factory.createForOfStatement(void 0,n,r,E.default.factory.createBlock(o))),null}},V0=E.default.factory.createNonNullExpression(E.default.factory.createNull());var uo=class{constructor(t,e=null,n=null){this.tcb=t,this.parent=e,this.guard=n,this.opQueue=[],this.elementOpMap=new Map,this.directiveOpMap=new Map,this.referenceOpMap=new Map,this.templateCtxOpMap=new Map,this.varMap=new Map,this.letDeclOpMap=new Map,this.statements=[]}static forNodes(t,e,n,r,s){let i=new uo(t,e,s);if(e===null&&t.env.config.enableTemplateTypeChecker&&i.opQueue.push(new L0(i)),n instanceof se){let o=new Map;for(let a of n.variables){if(!o.has(a.name))o.set(a.name,a);else{let l=o.get(a.name);t.oobRecorder.duplicateTemplateVar(t.id,a,l)}this.registerVariable(i,a,new x0(t,i,n,a))}}else if(n instanceof _n){let{expression:o,expressionAlias:a}=n;o!==null&&a!==null&&this.registerVariable(i,a,new O0(t,i,Pt(o,t,i),a))}else if(n instanceof En){let o=t.allocateId();B(o,n.item.sourceSpan),i.varMap.set(n.item,o);for(let a of n.contextVariables){if(!this.forLoopContextVariableTypes.has(a.value))throw new Error(`Unrecognized for loop context variable ${a.name}`);let l=E.default.factory.createKeywordTypeNode(this.forLoopContextVariableTypes.get(a.value));this.registerVariable(i,a,new F0(t,i,l,a))}}for(let o of r)i.appendNode(o);for(let o of i.varMap.keys())uo.checkConflictingLet(i,o);for(let o of i.referenceOpMap.keys())uo.checkConflictingLet(i,o);return i}static registerVariable(t,e,n){let r=t.opQueue.push(n)-1;t.varMap.set(e,r)}resolve(t,e){let n=this.resolveLocal(t,e);if(n!==null){let r;if(E.default.isIdentifier(n))r=E.default.factory.createIdentifier(n.text);else if(E.default.isNonNullExpression(n))r=E.default.factory.createNonNullExpression(n.expression);else throw new Error(`Could not resolve ${t} to an Identifier or a NonNullExpression`);return E.default.setOriginalNode(r,n),r.parent=r.parent,E.default.setSyntheticTrailingComments(r,[])}else{if(this.parent!==null)return this.parent.resolve(t,e);throw new Error(`Could not resolve ${t} / ${e}`)}}addStatement(t){this.statements.push(t)}render(){for(let t=0;t<this.opQueue.length;t++){let e=!this.tcb.env.config.enableTemplateTypeChecker;this.executeOp(t,e)}return this.statements}guards(){let t=null;return this.parent!==null&&(t=this.parent.guards()),this.guard===null?t:t===null?this.guard:E.default.factory.createBinaryExpression(t,E.default.SyntaxKind.AmpersandAmpersandToken,this.guard)}isLocal(t){return t instanceof ct?this.varMap.has(t):t instanceof yt?this.letDeclOpMap.has(t.name):this.referenceOpMap.has(t)}resolveLocal(t,e){if(t instanceof Sn&&this.referenceOpMap.has(t))return this.resolveOp(this.referenceOpMap.get(t));if(t instanceof yt&&this.letDeclOpMap.has(t.name))return this.resolveOp(this.letDeclOpMap.get(t.name).opIndex);if(t instanceof ct&&this.varMap.has(t)){let n=this.varMap.get(t);return typeof n=="number"?this.resolveOp(n):n}else{if(t instanceof se&&e===void 0&&this.templateCtxOpMap.has(t))return this.resolveOp(this.templateCtxOpMap.get(t));if((t instanceof oe||t instanceof se)&&e!==void 0&&this.directiveOpMap.has(t)){let n=this.directiveOpMap.get(t);return n.has(e)?this.resolveOp(n.get(e)):null}else return t instanceof oe&&this.elementOpMap.has(t)?this.resolveOp(this.elementOpMap.get(t)):null}}resolveOp(t){let e=this.executeOp(t,!1);if(e===null)throw new Error("Error resolving operation, got null");return e}executeOp(t,e){let n=this.opQueue[t];if(!(n instanceof Se))return n;if(e&&n.optional)return null;this.opQueue[t]=n.circularFallback();let r=n.execute();return this.opQueue[t]=r,r}appendNode(t){if(t instanceof oe){let e=this.opQueue.push(new T0(this.tcb,this,t))-1;this.elementOpMap.set(t,e),this.tcb.env.config.controlFlowPreventingContentProjection!=="suppress"&&this.appendContentProjectionCheckOp(t),this.appendDirectivesAndInputsOfNode(t),this.appendOutputsOfNode(t),this.appendChildren(t),this.checkAndAppendReferencesOfNode(t)}else if(t instanceof se){this.appendDirectivesAndInputsOfNode(t),this.appendOutputsOfNode(t);let e=this.opQueue.push(new C0(this.tcb,this))-1;this.templateCtxOpMap.set(t,e),this.tcb.env.config.checkTemplateBodies?this.opQueue.push(new A0(this.tcb,this,t)):this.tcb.env.config.alwaysCheckSchemaInTemplateBodies&&this.appendDeepSchemaChecks(t.children),this.checkAndAppendReferencesOfNode(t)}else if(t instanceof Un)this.appendDeferredBlock(t);else if(t instanceof Vr)this.opQueue.push(new B0(this.tcb,this,t));else if(t instanceof Ur)this.opQueue.push(new $0(this.tcb,this,t));else if(t instanceof En)this.opQueue.push(new U0(this.tcb,this,t)),t.empty&&this.tcb.env.config.checkControlFlowBodies&&this.appendChildren(t.empty);else if(t instanceof Fn)this.opQueue.push(new Wa(this.tcb,this,t.value));else if(t instanceof Ps)this.appendIcuExpressions(t);else if(t instanceof fr)this.appendChildren(t);else if(t instanceof yt){let e=this.opQueue.push(new I0(this.tcb,this,t))-1;this.isLocal(t)?this.tcb.oobRecorder.conflictingDeclaration(this.tcb.id,t):this.letDeclOpMap.set(t.name,{opIndex:e,node:t})}}appendChildren(t){for(let e of t.children)this.appendNode(e)}checkAndAppendReferencesOfNode(t){for(let e of t.references){let n=this.tcb.boundTarget.getReferenceTarget(e),r;n===null?(this.tcb.oobRecorder.missingReferenceTarget(this.tcb.id,e),r=this.opQueue.push(new D0(this.tcb,this))-1):n instanceof se||n instanceof oe?r=this.opQueue.push(new gg(this.tcb,this,e,t,n))-1:r=this.opQueue.push(new gg(this.tcb,this,e,t,n.directive))-1,this.referenceOpMap.set(e,r)}}appendDirectivesAndInputsOfNode(t){let e=new Set,n=this.tcb.boundTarget.getDirectivesOfNode(t);if(n===null||n.length===0){t instanceof oe&&(this.opQueue.push(new yg(this.tcb,this,t,e)),this.opQueue.push(new tp(this.tcb,t,!0,e)));return}else t instanceof oe&&!this.tcb.boundTarget.isDeferred(t)&&n.some(i=>i.isExplicitlyDeferred)&&this.tcb.oobRecorder.deferredComponentUsedEagerly(this.tcb.id,t);let r=new Map;for(let s of n){let i,o=this.tcb.env.reflector,a=s.ref;s.isGeneric?!m0(a.node,o,this.tcb.env)||this.tcb.env.config.useInlineTypeConstructors?i=new _0(this.tcb,this,t,s):i=new b0(this.tcb,this,t,s):i=new N0(this.tcb,this,t,s);let l=this.opQueue.push(i)-1;r.set(s,l),this.opQueue.push(new R0(this.tcb,this,t,s))}if(this.directiveOpMap.set(t,r),t instanceof oe){for(let i of n)for(let o of i.inputs.propertyNames)e.add(o);this.opQueue.push(new yg(this.tcb,this,t,e));let s=n.length===0;this.opQueue.push(new tp(this.tcb,t,s,e))}}appendOutputsOfNode(t){let e=new Set,n=this.tcb.boundTarget.getDirectivesOfNode(t);if(n===null||n.length===0){t instanceof oe&&this.opQueue.push(new vg(this.tcb,this,t,e));return}for(let r of n)this.opQueue.push(new M0(this.tcb,this,t,r));if(t instanceof oe){for(let r of n)for(let s of r.outputs.propertyNames)e.add(s);this.opQueue.push(new vg(this.tcb,this,t,e))}}appendDeepSchemaChecks(t){for(let e of t)if(e instanceof oe||e instanceof se){if(e instanceof oe){let n=new Set,r=this.tcb.boundTarget.getDirectivesOfNode(e),s;if(r===null||r.length===0)s=!1;else{s=!0;for(let i of r)for(let o of i.inputs.propertyNames)n.add(o)}this.opQueue.push(new tp(this.tcb,e,!s,n))}this.appendDeepSchemaChecks(e.children)}}appendIcuExpressions(t){for(let e of Object.values(t.vars))this.opQueue.push(new Wa(this.tcb,this,e.value));for(let e of Object.values(t.placeholders))e instanceof Fn&&this.opQueue.push(new Wa(this.tcb,this,e.value))}appendContentProjectionCheckOp(t){var e;let n=((e=this.tcb.boundTarget.getDirectivesOfNode(t))==null?void 0:e.find(r=>r.isComponent))||null;if(n!==null&&n.ngContentSelectors!==null&&n.ngContentSelectors.length>0){let r=n.ngContentSelectors;(r.length>1||r.length===1&&r[0]!=="*")&&this.opQueue.push(new P0(this.tcb,t,r,n.name))}}appendDeferredBlock(t){this.appendDeferredTriggers(t,t.triggers),this.appendDeferredTriggers(t,t.prefetchTriggers),this.appendChildren(t),t.placeholder!==null&&this.appendChildren(t.placeholder),t.loading!==null&&this.appendChildren(t.loading),t.error!==null&&this.appendChildren(t.error)}appendDeferredTriggers(t,e){e.when!==void 0&&this.opQueue.push(new Wa(this.tcb,this,e.when.value)),e.hover!==void 0&&this.appendReferenceBasedDeferredTrigger(t,e.hover),e.interaction!==void 0&&this.appendReferenceBasedDeferredTrigger(t,e.interaction),e.viewport!==void 0&&this.appendReferenceBasedDeferredTrigger(t,e.viewport)}appendReferenceBasedDeferredTrigger(t,e){this.tcb.boundTarget.getDeferredTriggerTarget(t,e)===null&&this.tcb.oobRecorder.inaccessibleDeferredTriggerElement(this.tcb.id,e)}static checkConflictingLet(t,e){t.letDeclOpMap.has(e.name)&&t.tcb.oobRecorder.conflictingDeclaration(t.tcb.id,t.letDeclOpMap.get(e.name).node)}},go=uo;uo.forLoopContextVariableTypes=new Map([["$first",E.default.SyntaxKind.BooleanKeyword],["$last",E.default.SyntaxKind.BooleanKeyword],["$even",E.default.SyntaxKind.BooleanKeyword],["$odd",E.default.SyntaxKind.BooleanKeyword],["$index",E.default.SyntaxKind.NumberKeyword],["$count",E.default.SyntaxKind.NumberKeyword]]);function Pt(t,e,n){return new mp(e,n).translate(t)}var mp=class{constructor(t,e){this.tcb=t,this.scope=e}translate(t){return S0(t,e=>this.resolve(e),this.tcb.env.config)}resolve(t){if(t instanceof Ce&&t.receiver instanceof Be){let e=this.tcb.boundTarget.getExpressionTarget(t),n=e===null?null:this.getTargetNodeExpression(e,t);return e instanceof yt&&!this.isValidLetDeclarationAccess(e,t)&&(this.tcb.oobRecorder.letUsedBeforeDefinition(this.tcb.id,t,e),n!==null)?E.default.factory.createAsExpression(n,E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword)):n}else if(t instanceof Ln&&t.receiver instanceof Be){let e=this.tcb.boundTarget.getExpressionTarget(t);if(e===null)return null;let n=this.getTargetNodeExpression(e,t),r=this.translate(t.value),s=E.default.factory.createParenthesizedExpression(E.default.factory.createBinaryExpression(n,E.default.SyntaxKind.EqualsToken,r));return B(s,t.sourceSpan),e instanceof yt&&(Tr(s),this.tcb.oobRecorder.illegalWriteToLetDeclaration(this.tcb.id,t,e)),s}else{if(t instanceof Be)return E.default.factory.createThis();if(t instanceof $r){let e=this.translate(t.exp),n=this.tcb.getPipeByName(t.name),r;n===null?(this.tcb.oobRecorder.missingPipe(this.tcb.id,t),r=ns):n.isExplicitlyDeferred&&this.tcb.boundTarget.getEagerlyUsedPipes().includes(t.name)?(this.tcb.oobRecorder.deferredPipeUsedEagerly(this.tcb.id,t),r=ns):r=this.tcb.env.pipeInst(n.ref);let s=t.args.map(a=>this.translate(a)),i=E.default.factory.createPropertyAccessExpression(r,"transform");B(i,t.nameSpan),this.tcb.env.config.checkTypeOfPipes||(i=E.default.factory.createAsExpression(i,E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword)));let o=E.default.factory.createCallExpression(i,void 0,[e,...s]);return B(o,t.sourceSpan),o}else if((t instanceof yn||t instanceof vn)&&(t.receiver instanceof Ce||t.receiver instanceof lt)){if(t.receiver.receiver instanceof Be&&!(t.receiver.receiver instanceof fn)&&t.receiver.name==="$any"&&t.args.length===1){let o=this.translate(t.args[0]),a=E.default.factory.createAsExpression(o,E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword)),l=E.default.factory.createParenthesizedExpression(a);return B(l,t.sourceSpan),l}let e=this.tcb.boundTarget.getExpressionTarget(t);if(e===null)return null;let n=this.getTargetNodeExpression(e,t),r=Ie(n);B(r,t.receiver.nameSpan);let s=t.args.map(o=>this.translate(o)),i=E.default.factory.createCallExpression(r,void 0,s);return B(i,t.sourceSpan),i}else return null}}getTargetNodeExpression(t,e){let n=this.scope.resolve(t);return B(n,e.sourceSpan),n}isValidLetDeclarationAccess(t,e){let n=t.sourceSpan.start.offset,r=t.sourceSpan.end.offset,s=e.sourceSpan.start;return n<s&&s>r||!this.scope.isLocal(t)}};function q0(t,e,n){let r=e.env.typeCtorFor(t),s=n.map(i=>{let o=E.default.factory.createStringLiteral(i.field);if(i.type==="binding"){let a=gp(i.expression,e);i.isTwoWayBinding&&e.env.config.allowSignalsInTwoWayBindings&&(a=Pg(a,e));let l=E.default.factory.createPropertyAssignment(o,Ie(a));return B(l,i.sourceSpan),l}else return E.default.factory.createPropertyAssignment(o,ns)});return E.default.factory.createCallExpression(r,void 0,[E.default.factory.createObjectLiteralExpression(s)])}function Rg(t,e){let n=[],r=s=>{if(s instanceof _t&&s.type!==z.Property&&s.type!==z.TwoWay)return;let i=t.inputs.getByBindingPropertyName(s.name);i!==null&&n.push({attribute:s,inputs:i.map(o=>{var a;return{fieldName:o.classPropertyName,required:o.required,transformType:((a=o.transform)==null?void 0:a.type)||null,isSignal:o.isSignal,isTwoWayBinding:s instanceof _t&&s.type===z.TwoWay}})})};return e.inputs.forEach(r),e.attributes.forEach(r),e instanceof se&&e.templateAttrs.forEach(r),n}function kg(t,e,n){return t instanceof _t?Pt(t.value,e,n):E.default.factory.createStringLiteral(t.value)}function gp(t,e){return e.env.config.checkTypeOfInputBindings?e.env.config.strictNullInputBindings||E.default.isObjectLiteralExpression(t)||E.default.isArrayLiteralExpression(t)?t:E.default.factory.createNonNullExpression(t):jn(t)}function Pg(t,e){let n=e.env.referenceExternalSymbol(f.unwrapWritableSignal.moduleName,f.unwrapWritableSignal.name);return E.default.factory.createCallExpression(n,void 0,[t])}var op="$event";function po(t,e,n,r){let s=G0(t.handler,e,n),i;r===0?i=void 0:r===1?i=E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword):i=r;let o=n.guards(),a=E.default.factory.createExpressionStatement(s);o!==null&&(a=E.default.factory.createIfStatement(o,a));let l=E.default.factory.createParameterDeclaration(void 0,void 0,op,void 0,i);return vo(l,rs.EVENT_PARAMETER),E.default.factory.createArrowFunction(void 0,void 0,[l],E.default.factory.createKeywordTypeNode(E.default.SyntaxKind.AnyKeyword),void 0,E.default.factory.createBlock([a]))}function G0(t,e,n){return new H0(e,n).translate(t)}function Mg(t,e,n,r){let s=n.find(a=>a.name===t);if(s===void 0||s.sourceSpan!==e.sourceSpan)return!1;let i=r.boundTarget.getConsumerOfBinding(s),o=r.boundTarget.getConsumerOfBinding(e);return o===null||i.ref===void 0||o instanceof se?!1:o instanceof oe?(r.oobRecorder.splitTwoWayBinding(r.id,s,e,i.ref.node,o),!0):o.ref!==i.ref?(r.oobRecorder.splitTwoWayBinding(r.id,s,e,i.ref.node,o.ref.node),!0):!1}var H0=class extends mp{resolve(t){if(t instanceof Ce&&t.receiver instanceof Be&&!(t.receiver instanceof fn)&&t.name===op){let e=E.default.factory.createIdentifier(op);return B(e,t.nameSpan),e}return super.resolve(t)}isValidLetDeclarationAccess(){return!0}},W0=class extends mp{constructor(t,e,n){super(t,e),this.block=n,this.allowedVariables=new Set([n.item]);for(let r of n.contextVariables)r.value==="$index"&&this.allowedVariables.add(r)}resolve(t){if(t instanceof Ce&&t.receiver instanceof Be){let e=this.tcb.boundTarget.getExpressionTarget(t);e!==null&&(!(e instanceof ct)||!this.allowedVariables.has(e))&&this.tcb.oobRecorder.illegalForLoopTrackAccess(this.tcb.id,this.block,t)}return super.resolve(t)}};var Eg;(function(t){t[t.InlineOps=0]="InlineOps",t[t.Error=1]="Error"})(Eg||(Eg={}));var SO=new sn;var x=T(require("typescript"),1),xr=T(require("typescript"),1),Ya=T(require("typescript"),1),qg=T(require("typescript"),1),s2=(0,Og.createRequire)(P);function yp(t,e){return e||t.import!==null&&t.import.from==="@angular/core"}var Fg="!Array<{type: !Function, args: (undefined|!Array<?>)}>";function Bg(t,e){let n=[],r=t.expression;switch(r.kind){case x.default.SyntaxKind.Identifier:n.push(x.default.factory.createPropertyAssignment("type",r));break;case x.default.SyntaxKind.CallExpression:let s=r;if(n.push(x.default.factory.createPropertyAssignment("type",s.expression)),s.arguments.length){let i=[];for(let a of s.arguments)i.push(a);let o=x.default.factory.createArrayLiteralExpression(x.default.factory.createNodeArray(i,!0));n.push(x.default.factory.createPropertyAssignment("args",o))}break;default:e.push({file:t.getSourceFile(),start:t.getStart(),length:t.getEnd()-t.getStart(),messageText:`${x.default.SyntaxKind[t.kind]} not implemented in gathering decorator metadata.`,category:x.default.DiagnosticCategory.Error,code:0});break}return x.default.factory.createObjectLiteralExpression(n)}function Y0(t,e,n,r){let s=[];for(let a of n){if(!a.type&&a.decorators.length===0){s.push(x.default.factory.createNull());continue}let l=a.type?$g(e,a.type):void 0,c=[x.default.factory.createPropertyAssignment("type",l||x.default.factory.createIdentifier("undefined"))],u=[];for(let h of a.decorators)u.push(Bg(h,t));u.length&&c.push(x.default.factory.createPropertyAssignment("decorators",x.default.factory.createArrayLiteralExpression(u))),s.push(x.default.factory.createObjectLiteralExpression(c))}let i=x.default.factory.createArrowFunction(void 0,void 0,[],void 0,x.default.factory.createToken(x.default.SyntaxKind.EqualsGreaterThanToken),x.default.factory.createArrayLiteralExpression(s,!0)),o=x.default.factory.createPropertyDeclaration([x.default.factory.createToken(x.default.SyntaxKind.StaticKeyword)],"ctorParameters",void 0,void 0,i);return r&&x.default.setSyntheticLeadingComments(o,[{kind:x.default.SyntaxKind.MultiLineCommentTrivia,text:["*"," * @type {function(): !Array<(null|{"," * type: ?,",` * decorators: (undefined|${Fg}),`," * })>}"," * @nocollapse"," "].join(`
|
|
34
|
+
`),pos:-1,end:-1,hasTrailingNewLine:!0}]),o}function $g(t,e){let n=e.kind;switch(x.default.isLiteralTypeNode(e)&&(n=e.literal.kind),n){case x.default.SyntaxKind.FunctionType:case x.default.SyntaxKind.ConstructorType:return x.default.factory.createIdentifier("Function");case x.default.SyntaxKind.ArrayType:case x.default.SyntaxKind.TupleType:return x.default.factory.createIdentifier("Array");case x.default.SyntaxKind.TypePredicate:case x.default.SyntaxKind.TrueKeyword:case x.default.SyntaxKind.FalseKeyword:case x.default.SyntaxKind.BooleanKeyword:return x.default.factory.createIdentifier("Boolean");case x.default.SyntaxKind.StringLiteral:case x.default.SyntaxKind.StringKeyword:return x.default.factory.createIdentifier("String");case x.default.SyntaxKind.ObjectKeyword:return x.default.factory.createIdentifier("Object");case x.default.SyntaxKind.NumberKeyword:case x.default.SyntaxKind.NumericLiteral:return x.default.factory.createIdentifier("Number");case x.default.SyntaxKind.TypeReference:return t(e.typeName);case x.default.SyntaxKind.UnionType:let s=e.types.filter(i=>!(x.default.isLiteralTypeNode(i)&&i.literal.kind===x.default.SyntaxKind.NullKeyword));return s.length===1?$g(t,s[0]):void 0;default:return}}function Q0(t,e){return e.flags&x.default.SymbolFlags.Alias&&(e=t.getAliasedSymbol(e)),(e.flags&x.default.SymbolFlags.Value&x.default.SymbolFlags.ConstEnumExcludes)!==0}function Ug(t,e,n,r,s){function i(a,l){s&&x.default.setSyntheticLeadingComments(a,[{kind:x.default.SyntaxKind.MultiLineCommentTrivia,text:`* @type {${l}} `,pos:-1,end:-1,hasTrailingNewLine:!0}])}function o(a,l){let c=[];for(let[d,g]of l.entries())c.push(x.default.factory.createPropertyAssignment(d,x.default.factory.createArrayLiteralExpression(g.map(y=>Bg(y,a)))));let u=x.default.factory.createObjectLiteralExpression(c,!0),h=x.default.factory.createPropertyDeclaration([x.default.factory.createToken(x.default.SyntaxKind.StaticKeyword)],"propDecorators",void 0,void 0,u);return i(h,`!Object<string, ${Fg}>`),h}return a=>{let l=Xu(a);function c(y){let C=t.getSymbolAtLocation(y);if(!C||!Q0(t,C)||!C.declarations||C.declarations.length===0)return;if(x.default.isQualifiedName(y)){let _=c(y.left);return _===void 0?void 0:x.default.factory.createPropertyAccessExpression(_,y.right)}let A=C.declarations[0];return Yu(A)&&(l.add(A),A.name!==void 0)?x.default.setOriginalNode(x.default.factory.createIdentifier(A.name.text),A.name):x.default.setOriginalNode(x.default.factory.createIdentifier(y.text),y)}function u(y){y=x.default.visitEachChild(y,g,a);let C=[],A=[],_=e.getDecoratorsOfDeclaration(y)||[];for(let ve of _){let de=ve.node;if(!yp(ve,r)){C.push(de);continue}A.push(de)}if(!A.length)return[void 0,y,[]];if(!y.name||!x.default.isIdentifier(y.name))return n.push({file:y.getSourceFile(),start:y.getStart(),length:y.getEnd()-y.getStart(),messageText:"Cannot process decorators for class element with non-analyzable name.",category:x.default.DiagnosticCategory.Error,code:0}),[void 0,y,[]];let U=x.default.canHaveModifiers(y)?x.default.getModifiers(y):void 0,ne;return(C.length||U?.length)&&(ne=x.default.setTextRange(x.default.factory.createNodeArray([...C,...U||[]]),y.modifiers)),[y.name.text,J0(y,ne),A]}function h(y){y=x.default.visitEachChild(y,g,a);let C=[],A=y.parameters,_=[];for(let ne of A){let ve=[],de={decorators:[],type:null},ln=e.getDecoratorsOfDeclaration(ne)||[];for(let zp of ln){let Xp=zp.node;if(!yp(zp,r)){ve.push(Xp);continue}de.decorators.push(Xp)}ne.type&&(de.type=ne.type),_.push(de);let Yn,xt=x.default.getModifiers(ne);(ve.length||xt?.length)&&(Yn=[...ve,...xt||[]]);let Yv=x.default.factory.updateParameterDeclaration(ne,Yn,ne.dotDotDotToken,ne.name,ne.questionToken,ne.type,ne.initializer);C.push(Yv)}return[x.default.factory.updateConstructorDeclaration(y,x.default.getModifiers(y),C,y.body),_]}function d(y){let C=[],A=new Map,_=null;for(let de of y.members){switch(de.kind){case x.default.SyntaxKind.PropertyDeclaration:case x.default.SyntaxKind.GetAccessor:case x.default.SyntaxKind.SetAccessor:case x.default.SyntaxKind.MethodDeclaration:{let[ln,Yn,xt]=u(de);C.push(Yn),ln&&A.set(ln,xt);continue}case x.default.SyntaxKind.Constructor:{if(!de.body)break;let[Yn,xt]=h(de);_=xt,C.push(Yn);continue}default:break}C.push(x.default.visitEachChild(de,g,a))}let ne=(e.getDecoratorsOfDeclaration(y)||[]).some(de=>yp(de,r));_&&(ne||_.some(de=>!!de.decorators.length))&&C.push(Y0(n,c,_,s)),A.size&&C.push(o(n,A));let ve=x.default.setTextRange(x.default.factory.createNodeArray(C,y.members.hasTrailingComma),y.members);return x.default.factory.updateClassDeclaration(y,y.modifiers,y.name,y.typeParameters,y.heritageClauses,ve)}function g(y){return x.default.isClassDeclaration(y)?d(y):x.default.visitEachChild(y,g,a)}return y=>x.default.visitEachChild(y,g,a)}}function J0(t,e){let n;if(x.default.isMethodDeclaration(t))n=x.default.factory.createMethodDeclaration(e,t.asteriskToken,t.name,t.questionToken,t.typeParameters,t.parameters,t.type,t.body);else if(x.default.isPropertyDeclaration(t))n=x.default.factory.createPropertyDeclaration(e,t.name,t.questionToken,t.type,t.initializer);else if(x.default.isGetAccessor(t))n=x.default.factory.createGetAccessorDeclaration(e,t.name,t.parameters,t.type,t.body);else if(x.default.isSetAccessor(t))n=x.default.factory.createSetAccessorDeclaration(e,t.name,t.parameters,t.body);else throw new Error(`Unsupported decorated member with kind ${x.default.SyntaxKind[t.kind]}`);return x.default.setOriginalNode(n,t)}function Qa(t,e,n,r,s){let i=Ya.default.isIdentifier(n.identifier)?n.identifier:n.identifier.expression;return t.createPropertyAccessExpression(e.addImport({exportModuleSpecifier:"@angular/core",exportSymbolName:null,requestedFile:r}),Ya.default.setOriginalNode(t.createIdentifier(s),i))}function Vg(t,e){return t.createAsExpression(e,t.createKeywordTypeNode(Ya.default.SyntaxKind.AnyKeyword))}var Z0=(t,e,n,r,s,i,o)=>{var a,l;if((a=e.getDecoratorsOfDeclaration(t.node))!=null&&a.some(g=>Zs(g,"Input",o)))return t.node;let c=Cg(t,e,r);if(c===null)return t.node;let u={isSignal:n.createTrue(),alias:n.createStringLiteral(c.bindingPropertyName),required:c.required?n.createTrue():n.createFalse(),transform:n.createIdentifier("undefined")},h=t.node.getSourceFile(),d=n.createDecorator(n.createCallExpression(Qa(n,s,i,h,"Input"),void 0,[Vg(n,n.createObjectLiteralExpression(Object.entries(u).map(([g,y])=>n.createPropertyAssignment(g,y))))]));return n.updatePropertyDeclaration(t.node,[d,...(l=t.node.modifiers)!=null?l:[]],t.name,t.node.questionToken,t.node.type,t.node.initializer)},e_=(t,e,n,r,s,i,o)=>{var a,l;if((a=e.getDecoratorsOfDeclaration(t.node))!=null&&a.some(y=>Zs(y,"Input",o)||Zs(y,"Output",o)))return t.node;let c=Ig(t,e,r);if(c===null)return t.node;let u=n.createObjectLiteralExpression([n.createPropertyAssignment("isSignal",c.input.isSignal?n.createTrue():n.createFalse()),n.createPropertyAssignment("alias",n.createStringLiteral(c.input.bindingPropertyName)),n.createPropertyAssignment("required",c.input.required?n.createTrue():n.createFalse())]),h=t.node.getSourceFile(),d=Lg("Input",n.createAsExpression(u,n.createKeywordTypeNode(qg.default.SyntaxKind.AnyKeyword)),i,n,h,s),g=Lg("Output",n.createStringLiteral(c.output.bindingPropertyName),i,n,h,s);return n.updatePropertyDeclaration(t.node,[d,g,...(l=t.node.modifiers)!=null?l:[]],t.node.name,t.node.questionToken,t.node.type,t.node.initializer)};function Lg(t,e,n,r,s,i){let o=Qa(r,i,n,s,t);return r.createDecorator(r.createCallExpression(o,void 0,[e]))}var t_=(t,e,n,r,s,i,o)=>{var a,l;if((a=e.getDecoratorsOfDeclaration(t.node))!=null&&a.some(d=>Zs(d,"Output",o)))return t.node;let c=Ag(t,e,r);if(c===null)return t.node;let u=t.node.getSourceFile(),h=n.createDecorator(n.createCallExpression(Qa(n,s,i,u,"Output"),void 0,[n.createStringLiteral(c.metadata.bindingPropertyName)]));return n.updatePropertyDeclaration(t.node,[h,...(l=t.node.modifiers)!=null?l:[]],t.node.name,t.node.questionToken,t.node.type,t.node.initializer)},n_={viewChild:"ViewChild",viewChildren:"ViewChildren",contentChild:"ContentChild",contentChildren:"ContentChildren"},r_=(t,e,n,r,s,i,o)=>{var a;let l=e.getDecoratorsOfDeclaration(t.node),c=l&&Tg(l,dp,o);if(c!==null&&c.length>0)return t.node;let u=Ng(t,e,r);if(u===null)return t.node;let h=t.node.getSourceFile(),d=u.call.arguments,g=n.createDecorator(n.createCallExpression(Qa(n,s,i,h,n_[u.name]),void 0,[u.call.arguments[0],Vg(n,n.createObjectLiteralExpression([...d.length>1?[n.createSpreadAssignment(d[1])]:[],n.createPropertyAssignment("isSignal",n.createTrue())]))]));return n.updatePropertyDeclaration(t.node,[g,...(a=t.node.modifiers)!=null?a:[]],t.node.name,t.node.questionToken,t.node.type,t.node.initializer)},s_=["Directive","Component"],i_=[Z0,t_,r_,e_];function Gg(t,e,n){return r=>s=>{let i=new Ju;return s=xr.default.visitNode(s,o_(r,t,i,e,n),xr.default.isSourceFile),i.transformTsFile(r,s)}}function o_(t,e,n,r,s){let i=o=>{var a;if(xr.default.isClassDeclaration(o)&&o.name!==void 0){let l=xr.default.getOriginalNode(o,xr.default.isClassDeclaration),c=(a=e.getDecoratorsOfDeclaration(l))==null?void 0:a.find(u=>s_.some(h=>Zs(u,h,s)));if(c!==void 0){let u=!1,h=o.members.map(d=>{if(!xr.default.isPropertyDeclaration(d))return d;let g=Ku(d);if(g===null)return d;for(let y of i_){let C=y({...g,node:d},e,t.factory,r,n,c,s);if(C!==g.node)return u=!0,C}return d});if(u)return t.factory.updateClassDeclaration(o,o.modifiers,o.name,o.typeParameters,o.heritageClauses,h)}}return xr.default.visitEachChild(o,i,t)};return i}function vp(t,e=!1){let n=t.getTypeChecker(),r=new ju(n),s=new Qu,i=Ug(n,r,[],e,!1),o=Gg(r,s,e);return a=>l=>(l=o(a)(l),l=i(a)(l),l)}var Hg={ngDevMode:!1,ngI18nClosureMode:!1},a_={...Hg,ngJitMode:!1};S();var jv=require("module");var aP=T(require("typescript"),1),lP=T(require("typescript"),1),cP=T(require("typescript"),1),uP=T(require("typescript"),1),pP=T(require("typescript"),1),hP=T(require("typescript"),1),fP=T(require("typescript"),1),dP=T(require("typescript"),1),mP=T(require("typescript"),1),gP=T(require("typescript"),1);var yP=T(require("typescript"),1);var Kv=T(require("typescript"),1);var vP=T(require("typescript"),1),EP=T(require("typescript"),1),SP=T(require("typescript"),1),wP=T(require("typescript"),1);var TP=T(require("typescript"),1);var Gp=T(require("typescript"),1);var Hp=T(require("typescript"),1);var Wp=T(require("typescript"),1);var XP=T(require("typescript"),1);var QP=T(require("typescript"),1),JP=T(require("typescript"),1),ZP=T(Lv(),1),eM=T(require("typescript"),1),tM=T(require("typescript"),1),nM=T(require("typescript"),1),z1=(0,jv.createRequire)(P);var Bp;(function(t){t[t.DTS=1]="DTS",t[t.JS=2]="JS",t[t.Metadata=4]="Metadata",t[t.I18nBundle=8]="I18nBundle",t[t.Codegen=16]="Codegen",t[t.Default=19]="Default",t[t.All=31]="All"})(Bp||(Bp={}));var $p;(function(t){t.Block="block",t.Component="component",t.Constant="constant",t.Decorator="decorator",t.Directive="directive",t.Element="element",t.Enum="enum",t.Function="function",t.Interface="interface",t.NgModule="ng_module",t.Pipe="pipe",t.TypeAlias="type_alias",t.UndecoratedClass="undecorated_class",t.InitializerApiFunction="initializer_api_function"})($p||($p={}));var Up;(function(t){t.Property="property",t.Method="method",t.Getter="getter",t.Setter="setter",t.EnumItem="enum_item"})(Up||(Up={}));var Vp;(function(t){t.Class="class",t.Member="member",t.Parameter="parameter"})(Vp||(Vp={}));var qp;(function(t){t.Abstract="abstract",t.Static="static",t.Readonly="readonly",t.Protected="protected",t.Optional="optional",t.Input="input",t.Output="output",t.Inherited="override"})(qp||(qp={}));var tB=Kv.default.version;var rB=Symbol("NgCyclicResult");var Ov;(function(t){t[t.Fresh=0]="Fresh",t[t.Delta=1]="Delta",t[t.Analyzed=2]="Analyzed"})(Ov||(Ov={}));var Fv;(function(t){t[t.Analysis=0]="Analysis",t[t.TypeCheckAndEmit=1]="TypeCheckAndEmit"})(Fv||(Fv={}));var sB=Symbol("NgIncrementalState"),Bv;(function(t){t[t.Property=0]="Property",t[t.Method=1]="Method",t[t.Element=2]="Element",t[t.Template=3]="Template",t[t.Attribute=4]="Attribute",t[t.Reference=5]="Reference",t[t.Variable=6]="Variable",t[t.LetDeclaration=7]="LetDeclaration"})(Bv||(Bv={}));var xP=".$ngresource$",aB=xP+".ts";var CP=new Set(["WritableSignal","Signal","InputSignal","InputSignalWithTransform","ModelSignal"]);function $v(t){return(t.kind===wt.Expression||t.kind===wt.Variable||t.kind===wt.LetDeclaration)&&(t.tsType.symbol!==void 0&&Uv(t.tsType.symbol)||t.tsType.aliasSymbol!==void 0&&Uv(t.tsType.aliasSymbol))}function Uv(t){let e=t.getDeclarations();return e!==void 0&&e.some(n=>{let r=n.getSourceFile().fileName;return(Gp.default.isInterfaceDeclaration(n)||Gp.default.isTypeAliasDeclaration(n))&&CP.has(n.name.text)&&(r.includes("@angular/core")||r.includes("angular2/rc/packages/core"))})}var Xn=class{run(t,e,n){return new IP(t,e,this).getDiagnostics(n)}},IP=class extends hr{constructor(t,e,n){super(),this.ctx=t,this.component=e,this.check=n,this.diagnostics=[]}visit(t,e){this.diagnostics.push(...this.check.visitNode(this.ctx,this.component,t)),t.visit(this)}visitAllNodes(t){for(let e of t)this.visit(e)}visitAst(t){t instanceof we&&(t=t.ast),this.visit(t)}visitElement(t){this.visitAllNodes(t.attributes),this.visitAllNodes(t.inputs),this.visitAllNodes(t.outputs),this.visitAllNodes(t.references),this.visitAllNodes(t.children)}visitTemplate(t){this.visitAllNodes(t.attributes),t.tagName==="ng-template"&&(this.visitAllNodes(t.inputs),this.visitAllNodes(t.outputs),this.visitAllNodes(t.templateAttrs)),this.visitAllNodes(t.variables),this.visitAllNodes(t.references),this.visitAllNodes(t.children)}visitContent(t){this.visitAllNodes(t.children)}visitVariable(t){}visitReference(t){}visitTextAttribute(t){}visitUnknownBlock(t){}visitBoundAttribute(t){this.visitAst(t.value)}visitBoundEvent(t){this.visitAst(t.handler)}visitText(t){}visitBoundText(t){this.visitAst(t.value)}visitIcu(t){}visitDeferredBlock(t){t.visitAll(this)}visitDeferredTrigger(t){t instanceof ks&&this.visitAst(t.value)}visitDeferredBlockPlaceholder(t){this.visitAllNodes(t.children)}visitDeferredBlockError(t){this.visitAllNodes(t.children)}visitDeferredBlockLoading(t){this.visitAllNodes(t.children)}visitSwitchBlock(t){this.visitAst(t.expression),this.visitAllNodes(t.cases)}visitSwitchBlockCase(t){t.expression&&this.visitAst(t.expression),this.visitAllNodes(t.children)}visitForLoopBlock(t){var e;t.item.visit(this),this.visitAllNodes(t.contextVariables),this.visitAst(t.expression),this.visitAllNodes(t.children),(e=t.empty)==null||e.visit(this)}visitForLoopBlockEmpty(t){this.visitAllNodes(t.children)}visitIfBlock(t){this.visitAllNodes(t.branches)}visitIfBlockBranch(t){var e;t.expression&&this.visitAst(t.expression),(e=t.expressionAlias)==null||e.visit(this),this.visitAllNodes(t.children)}visitLetDeclaration(t){this.visitAst(t.value)}getDiagnostics(t){return this.diagnostics=[],this.visitAllNodes(t),this.diagnostics}},AP=new Set(["set","update","asReadonly"]),NP=new Set(["name","length","prototype"]),bP=class extends Xn{constructor(){super(...arguments),this.code=Z.INTERPOLATED_SIGNAL_NOT_INVOKED}visitNode(t,e,n){if(n instanceof On)return n.expressions.filter(r=>r instanceof Ce).flatMap(r=>Vv(t,r,e));if(n instanceof _t){let r=t.templateTypeChecker.getSymbolOfNode(n,e);if(r!==null&&r.kind===wt.Input)return[];if((n.type===z.Property||n.type===z.Class||n.type===z.Style||n.type===z.Attribute||n.type===z.Animation)&&n.value instanceof we&&n.value.ast instanceof Ce)return Vv(t,n.value.ast,e)}return[]}};function DP(t){return NP.has(t)}function _P(t){return AP.has(t)}function Vv(t,e,n){let r=t.templateTypeChecker.getSymbolOfNode(e,n);if(r!==null&&r.kind===wt.Expression&&$v(r)){let i=t.templateTypeChecker.getTemplateMappingAtTcbLocation(r.tcbLocation),o=`${e.name} is a function and should be invoked: ${e.name}()`;return[t.makeTemplateDiagnostic(i.span,o)]}let s=t.templateTypeChecker.getSymbolOfNode(e.receiver,n);if((DP(e.name)||_P(e.name))&&s!==null&&s.kind===wt.Expression&&$v(s)){let i=t.templateTypeChecker.getTemplateMappingAtTcbLocation(s.tcbLocation),o=`${e.receiver.name} is a function and should be invoked: ${e.receiver.name}()`;return[t.makeTemplateDiagnostic(i.span,o)]}return[]}var RP={code:Z.INTERPOLATED_SIGNAL_NOT_INVOKED,name:kt.INTERPOLATED_SIGNAL_NOT_INVOKED,create:()=>new bP},kP=class extends Xn{constructor(){super(...arguments),this.code=Z.INVALID_BANANA_IN_BOX}visitNode(t,e,n){if(!(n instanceof Bn))return[];let r=n.name;if(!r.startsWith("[")||!r.endsWith("]"))return[];let i=n.sourceSpan.toString().replace(`(${r})`,`[(${r.slice(1,-1)})]`);return[t.makeTemplateDiagnostic(n.sourceSpan,`In the two-way binding syntax the parentheses should be inside the brackets, ex. '${i}'.
|
|
35
35
|
Find more at https://angular.dev/guide/templates/two-way-binding`)]}},PP={code:Z.INVALID_BANANA_IN_BOX,name:kt.INVALID_BANANA_IN_BOX,create:()=>new kP},qv=new Map([["ngIf",{directive:"NgIf",builtIn:"@if"}],["ngFor",{directive:"NgFor",builtIn:"@for"}],["ngSwitchCase",{directive:"NgSwitchCase",builtIn:"@switch with @case"}],["ngSwitchDefault",{directive:"NgSwitchDefault",builtIn:"@switch with @default"}]]),MP=class extends Xn{constructor(){super(...arguments),this.code=Z.MISSING_CONTROL_FLOW_DIRECTIVE}run(t,e,n){let r=t.templateTypeChecker.getDirectiveMetadata(e);return!r||!r.isStandalone?[]:super.run(t,e,n)}visitNode(t,e,n){if(!(n instanceof se))return[];let r=n.templateAttrs.find(c=>qv.has(c.name));if(!r)return[];let s=t.templateTypeChecker.getSymbolOfNode(n,e);if(s===null||s.directives.length>0)return[];let i=r.keySpan||r.sourceSpan,o=qv.get(r.name),a=`The \`*${r.name}\` directive was used in the template, but neither the \`${o?.directive}\` directive nor the \`CommonModule\` was imported. Use Angular's built-in control flow ${o?.builtIn} or make sure that either the \`${o?.directive}\` directive or the \`CommonModule\` is included in the \`@Component.imports\` array of this component.`;return[t.makeTemplateDiagnostic(i,a)]}},LP={code:Z.MISSING_CONTROL_FLOW_DIRECTIVE,name:kt.MISSING_CONTROL_FLOW_DIRECTIVE,create:t=>new MP},OP=class extends Xn{constructor(){super(...arguments),this.code=Z.MISSING_NGFOROF_LET}visitNode(t,e,n){let r=n instanceof se;if(!(n instanceof se))return[];if(n.templateAttrs.length===0)return[];let s=n.templateAttrs.find(a=>a.name==="ngFor");return s===void 0?[]:n.variables.length>0?[]:[t.makeTemplateDiagnostic(s.sourceSpan,"Your ngFor is missing a value. Did you forget to add the `let` keyword?")]}},FP={code:Z.MISSING_NGFOROF_LET,name:kt.MISSING_NGFOROF_LET,create:()=>new OP},BP=class extends Xn{constructor(){super(...arguments),this.code=Z.NULLISH_COALESCING_NOT_NULLABLE}visitNode(t,e,n){if(!(n instanceof ft)||n.operation!=="??")return[];let r=t.templateTypeChecker.getSymbolOfNode(n.left,e);if(r===null||r.kind!==wt.Expression)return[];let s=r.tsType;if(s.flags&(Hp.default.TypeFlags.Any|Hp.default.TypeFlags.Unknown))return[];if(s.getNonNullableType()!==s)return[];let i=t.templateTypeChecker.getSymbolOfNode(n,e);if(i.kind!==wt.Expression)return[];let o=t.templateTypeChecker.getTemplateMappingAtTcbLocation(i.tcbLocation);return o===null?[]:[t.makeTemplateDiagnostic(o.span,"The left side of this nullish coalescing operation does not include 'null' or 'undefined' in its type, therefore the '??' operator can be safely removed.")]}},$P={code:Z.NULLISH_COALESCING_NOT_NULLABLE,name:kt.NULLISH_COALESCING_NOT_NULLABLE,create:t=>(t.strictNullChecks===void 0?!!t.strict:!!t.strictNullChecks)?new BP:null},UP=class extends Xn{constructor(){super(...arguments),this.code=Z.OPTIONAL_CHAIN_NOT_NULLABLE}visitNode(t,e,n){if(!(n instanceof vn)&&!(n instanceof lt)&&!(n instanceof pr))return[];let r=t.templateTypeChecker.getSymbolOfNode(n.receiver,e);if(r===null||r.kind!==wt.Expression)return[];let s=r.tsType;if(s.flags&(Wp.default.TypeFlags.Any|Wp.default.TypeFlags.Unknown))return[];if(s.getNonNullableType()!==s)return[];let i=t.templateTypeChecker.getSymbolOfNode(n,e);if(i.kind!==wt.Expression)return[];let o=t.templateTypeChecker.getTemplateMappingAtTcbLocation(i.tcbLocation);if(o===null)return[];let a=n instanceof lt?"the '?.' operator can be replaced with the '.' operator":"the '?.' operator can be safely removed";return[t.makeTemplateDiagnostic(o.span,`The left side of this optional chain operation does not include 'null' or 'undefined' in its type, therefore ${a}.`)]}},VP={code:Z.OPTIONAL_CHAIN_NOT_NULLABLE,name:kt.OPTIONAL_CHAIN_NOT_NULLABLE,create:t=>(t.strictNullChecks===void 0?!!t.strict:!!t.strictNullChecks)?new UP:null},Gv=["px","%","em"],qP=class extends Xn{constructor(){super(...arguments),this.code=Z.SUFFIX_NOT_SUPPORTED}visitNode(t,e,n){return n instanceof _t?!n.keySpan.toString().startsWith("attr.")||!Gv.some(s=>n.name.endsWith(`.${s}`))?[]:[t.makeTemplateDiagnostic(n.keySpan,`The ${Gv.map(s=>`'.${s}'`).join(", ")} suffixes are only supported on style bindings.`)]:[]}},GP={code:Z.SUFFIX_NOT_SUPPORTED,name:kt.SUFFIX_NOT_SUPPORTED,create:()=>new qP},HP=class extends Xn{constructor(){super(...arguments),this.code=Z.TEXT_ATTRIBUTE_NOT_BINDING}visitNode(t,e,n){if(!(n instanceof Dt))return[];let r=n.name;if(!r.startsWith("attr.")&&!r.startsWith("style.")&&!r.startsWith("class."))return[];let s;if(r.startsWith("attr.")){let o=r.replace("attr.","");s="Static attributes should be written without the 'attr.' prefix.",n.value&&(s+=` For example, ${o}="${n.value}".`)}else{let o=`[${r}]`,a=n.value==="true"||n.value==="false"?n.value:`'${n.value}'`;s="Attribute, style, and class bindings should be enclosed with square braces.",n.value&&(s+=` For example, '${o}="${a}"'.`)}return[t.makeTemplateDiagnostic(n.sourceSpan,s)]}},WP={code:Z.TEXT_ATTRIBUTE_NOT_BINDING,name:kt.TEXT_ATTRIBUTE_NOT_BINDING,create:()=>new HP},jP=class extends Xn{constructor(){super(...arguments),this.code=Z.UNINVOKED_FUNCTION_IN_EVENT_BINDING}visitNode(t,e,n){if(!(n instanceof Bn))return[];if(n.type!==_e.Regular&&n.type!==_e.Animation)return[];if(!(n.handler instanceof we))return[];let r=n.handler.source||"";if(n.handler.ast instanceof ur)return n.handler.ast.expressions.flatMap(s=>Fp(s,e,n,r,t));if(n.handler.ast instanceof Br){let{trueExp:s,falseExp:i}=n.handler.ast;return[s,i].flatMap(o=>Fp(o,e,n,r,t))}return Fp(n.handler.ast,e,n,r,t)}};function Fp(t,e,n,r,s){var i;if(t instanceof yn||t instanceof vn)return[];if(!(t instanceof Ce)&&!(t instanceof lt))return[];let o=s.templateTypeChecker.getSymbolOfNode(t,e);if(o!==null&&o.kind===wt.Expression&&((i=o.tsType.getCallSignatures())==null?void 0:i.length)>0){let l=`Function in event binding should be invoked: ${KP(t,r)}()`;return[s.makeTemplateDiagnostic(n.sourceSpan,l)]}return[]}function KP(t,e){return e.substring(t.span.start,t.span.end)}var zP={code:Z.UNINVOKED_FUNCTION_IN_EVENT_BINDING,name:kt.UNINVOKED_FUNCTION_IN_EVENT_BINDING,create:()=>new jP},Hv;(function(t){t.Warning="warning",t.Error="error",t.Suppress="suppress"})(Hv||(Hv={}));var YP=[PP,$P,VP,LP,WP,FP,GP,RP,zP],vB=new Set([kt.CONTROL_FLOW_PREVENTING_CONTENT_PROJECTION,...YP.map(t=>t.name)]);var SB=[up,pp,...hp,...fp];var Wv;(function(t){t[t.Fresh=0]="Fresh",t[t.IncrementalTypeScript=1]="IncrementalTypeScript",t[t.IncrementalResource=2]="IncrementalResource"})(Wv||(Wv={}));S();var zv=require("module"),MB=(0,zv.createRequire)(P),jp;(function(t){t[t.debug=0]="debug",t[t.info=1]="info",t[t.warn=2]="warn",t[t.error=3]="error"})(jp||(jp={}));var Kp="\x1B[0m",rM="\x1B[31m",sM="\x1B[33m",iM="\x1B[36m",LB=`${iM}Debug:${Kp}`,OB=`${sM}Warning:${Kp}`,FB=`${rM}Error:${Kp}`;var m$=(0,Xv.createRequire)(P),I$=new Ii("18.1.2");eh(new sh);0&&(module.exports={angularJitApplicationTransform});
|
|
36
36
|
/*! Bundled license information:
|
|
37
37
|
|