dealposbarcode 25.50.0 → 26.1.1

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.
Files changed (49) hide show
  1. package/assets/scss/style.scss +28 -3
  2. package/chunk-3KPLVT7B.js +2 -0
  3. package/chunk-5KWDVSO6.js +194 -0
  4. package/chunk-6RPDTK47.js +1 -0
  5. package/chunk-7PT4SS5X.js +1127 -0
  6. package/chunk-7RSU6VFI.js +1 -0
  7. package/chunk-EIGRX3SO.js +1 -0
  8. package/chunk-IKSROKD5.css +1 -0
  9. package/chunk-JCQ56J6G.js +4 -0
  10. package/chunk-JMQFG4UA.js +1 -0
  11. package/{chunk-UBR4JEV7.js → chunk-KKCOUAI7.js} +1 -1
  12. package/chunk-PE35XIHQ.js +27 -0
  13. package/chunk-PN5S3LIV.js +1 -0
  14. package/chunk-Z3B3WOTF.js +18 -0
  15. package/chunk-Z7JGEKOM.js +1 -0
  16. package/chunk-ZQPG32YM.js +1848 -0
  17. package/index.html +3 -3
  18. package/main-4BFS7RVV.css +1 -0
  19. package/main-7SA3MAWH.js +248 -0
  20. package/ngsw-worker.js +469 -70
  21. package/ngsw.json +40 -52
  22. package/package.json +1 -1
  23. package/polyfills-DHHU6LMO.js +2 -0
  24. package/styles-XWKQSHJN.css +1 -0
  25. package/chunk-377TROCD.js +0 -1
  26. package/chunk-4CITKGGL.js +0 -1
  27. package/chunk-7V3KH6IR.js +0 -394
  28. package/chunk-CARY4E7O.js +0 -1
  29. package/chunk-D67JO2HG.css +0 -1
  30. package/chunk-G2JXUY7S.js +0 -2
  31. package/chunk-G4LJCV6B.js +0 -1
  32. package/chunk-HHB3BUIC.js +0 -1
  33. package/chunk-I535BP2A.js +0 -1
  34. package/chunk-JYD2NJXU.js +0 -1
  35. package/chunk-L2JD4R6O.js +0 -1
  36. package/chunk-LTVGOJEF.js +0 -2
  37. package/chunk-RH3ZV23S.js +0 -4
  38. package/chunk-SCXFN4EA.js +0 -1
  39. package/chunk-UE2JJIFL.js +0 -7
  40. package/chunk-WBD3XQRN.js +0 -1
  41. package/chunk-X4PZGB4F.js +0 -2
  42. package/main-J35CSAIS.css +0 -1
  43. package/main-SNJDWW52.js +0 -605
  44. package/media/data-table-2IZ2Q4SK.woff +0 -0
  45. package/media/data-table-AKMZFM4M.svg +0 -26
  46. package/media/data-table-DGQ4LQQR.eot +0 -0
  47. package/media/data-table-J6MZE774.ttf +0 -0
  48. package/polyfills-Q6W4YVDR.js +0 -2
  49. package/styles-7YJ7GGGE.css +0 -1
@@ -0,0 +1,18 @@
1
+ import{$a as ju,A as yi,Aa as Co,Ab as Ei,Ac as ht,B as Tu,Ba as Dn,Bb as rr,Bc as ft,Cb as Te,Da as Q,Db as O,Dc as Qt,Eb as ir,Fa as Fu,Fb as se,Ga as Kt,H as Ne,Ha as It,Hb as sr,Ja as de,Jb as Mo,Jc as Se,Ka as at,Kb as In,L as ee,La as Io,Lb as el,M as ot,Ma as he,Mb as ko,Nb as No,Oa as Lu,Ob as ut,P as _o,Pa as bo,Q as En,Qa as xu,Qb as lt,Ra as wn,T as Gt,Ta as Ao,Tc as sl,U as Ct,Ua as To,Uc as Vo,V as Eo,Va as So,Vc as $,W as Su,Wa as Yt,Wc as bt,Xa as Cn,Xb as oe,Xc as ol,Y as Ru,Ya as Uu,Yb as Ue,Yc as al,Za as Vu,Zb as dt,_ as Ou,_a as Bu,_b as Xt,_c as cl,a as yu,aa as Pu,ab as $u,b as _u,ba as J,bb as Hu,c as Ie,ca as tr,cb as zu,cc as Fo,d as go,da as j,db as ct,dc as Lo,dd as Bo,e as mo,eb as Ro,ed as Ke,f as B,fa as nr,fc as xo,fd as ul,g as ue,ga as Mu,gb as Wu,gd as ll,h as Eu,ha as E,hc as tl,hd as dl,i as Du,ia as qt,ib as K,ic as ve,id as At,j as wu,ja as be,jb as Zt,jc as W,k as st,ka as y,kb as Gu,kc as ae,l as mi,la as Ae,lb as qu,m as vo,ma as ku,mb as Oo,mc as ye,md as hl,n as yo,na as C,nb as ie,o as z,oa as w,ob as Y,p as _,pa as p,pb as _i,pc as nl,pd as jo,q as zt,qa as Fe,qb as Po,qd as Di,r as Cu,ra as Nu,rb as Ku,rc as rl,s as Iu,sa as Le,sb as Yu,sc as il,sd as ar,t as bu,ta as X,tb as me,td as cr,u as Wt,ua as Do,ub as v,v as R,va as wo,vb as Zu,vd as wi,w as vi,wb as Jt,x as le,xa as q,xb as Ju,xc as or,y as er,ya as V,yb as Xu,yc as Uo,z as Au,za as xe,zb as Qu}from"./chunk-JCQ56J6G.js";import{a as g,b as S,k as Ht,l}from"./chunk-7RSU6VFI.js";var gl=null;function Re(){return gl}function $o(n){gl??=n}var ur=class{},lr=(()=>{class n{historyGo(e){throw new Error("")}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:()=>p(ml),providedIn:"platform"})}return n})(),Ho=new C(""),ml=(()=>{class n extends lr{_location;_history;_doc=p(V);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Re().getBaseHref(this._doc)}onPopState(e){let r=Re().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",e,!1),()=>r.removeEventListener("popstate",e)}onHashChange(e){let r=Re().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",e,!1),()=>r.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,r,i){this._history.pushState(e,r,i)}replaceState(e,r,i){this._history.replaceState(e,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:()=>new n,providedIn:"platform"})}return n})();function Ci(n,t){return n?t?n.endsWith("/")?t.startsWith("/")?n+t.slice(1):n+t:t.startsWith("/")?n+t:`${n}/${t}`:n:t}function fl(n){let t=n.search(/#|\?|$/);return n[t-1]==="/"?n.slice(0,t-1)+n.slice(t):n}function Ve(n){return n&&n[0]!=="?"?`?${n}`:n}var Be=(()=>{class n{historyGo(e){throw new Error("")}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:()=>p(bi),providedIn:"root"})}return n})(),Ii=new C(""),bi=(()=>{class n extends Be{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,r){super(),this._platformLocation=e,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??p(V).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return Ci(this._baseHref,e)}path(e=!1){let r=this._platformLocation.pathname+Ve(this._platformLocation.search),i=this._platformLocation.hash;return i&&e?`${r}${i}`:r}pushState(e,r,i,s){let o=this.prepareExternalUrl(i+Ve(s));this._platformLocation.pushState(e,r,o)}replaceState(e,r,i,s){let o=this.prepareExternalUrl(i+Ve(s));this._platformLocation.replaceState(e,r,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(r){return new(r||n)(w(lr),w(Ii,8))};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Tt=(()=>{class n{_subject=new B;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let r=this._locationStrategy.getBaseHref();this._basePath=Mp(fl(pl(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,r=""){return this.path()==this.normalize(e+Ve(r))}normalize(e){return n.stripTrailingSlash(Pp(this._basePath,pl(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,r="",i=null){this._locationStrategy.pushState(i,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ve(r)),i)}replaceState(e,r="",i=null){this._locationStrategy.replaceState(i,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ve(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",r){this._urlChangeListeners.forEach(i=>i(e,r))}subscribe(e,r,i){return this._subject.subscribe({next:e,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=Ve;static joinWithSlash=Ci;static stripTrailingSlash=fl;static \u0275fac=function(r){return new(r||n)(w(Be))};static \u0275prov=y({token:n,factory:()=>Op(),providedIn:"root"})}return n})();function Op(){return new Tt(w(Be))}function Pp(n,t){if(!n||!t.startsWith(n))return t;let e=t.substring(n.length);return e===""||["/",";","?","#"].includes(e[0])?e:t}function pl(n){return n.replace(/\/index.html$/,"")}function Mp(n){if(new RegExp("^(https?:)?//").test(n)){let[,e]=n.split(/\/\/[^\/]+/);return e}return n}var Xo=(()=>{class n extends Be{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(e,r){super(),this._platformLocation=e,r!=null&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let r=this._platformLocation.hash??"#";return r.length>0?r.substring(1):r}prepareExternalUrl(e){let r=Ci(this._baseHref,e);return r.length>0?"#"+r:r}pushState(e,r,i,s){let o=this.prepareExternalUrl(i+Ve(s))||this._platformLocation.pathname;this._platformLocation.pushState(e,r,o)}replaceState(e,r,i,s){let o=this.prepareExternalUrl(i+Ve(s))||this._platformLocation.pathname;this._platformLocation.replaceState(e,r,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(r){return new(r||n)(w(lr),w(Ii,8))};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})();var Qo=(function(n){return n[n.Decimal=0]="Decimal",n[n.Percent=1]="Percent",n[n.Currency=2]="Currency",n[n.Scientific=3]="Scientific",n})(Qo||{});var ne=(function(n){return n[n.Format=0]="Format",n[n.Standalone=1]="Standalone",n})(ne||{}),N=(function(n){return n[n.Narrow=0]="Narrow",n[n.Abbreviated=1]="Abbreviated",n[n.Wide=2]="Wide",n[n.Short=3]="Short",n})(N||{}),fe=(function(n){return n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n[n.Full=3]="Full",n})(fe||{}),pe={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Cl(n){return ve(n)[W.LocaleId]}function Il(n,t,e){let r=ve(n),i=[r[W.DayPeriodsFormat],r[W.DayPeriodsStandalone]],s=Pe(i,t);return Pe(s,e)}function bl(n,t,e){let r=ve(n),i=[r[W.DaysFormat],r[W.DaysStandalone]],s=Pe(i,t);return Pe(s,e)}function Al(n,t,e){let r=ve(n),i=[r[W.MonthsFormat],r[W.MonthsStandalone]],s=Pe(i,t);return Pe(s,e)}function Tl(n,t){let r=ve(n)[W.Eras];return Pe(r,t)}function dr(n,t){let e=ve(n);return Pe(e[W.DateFormat],t)}function hr(n,t){let e=ve(n);return Pe(e[W.TimeFormat],t)}function fr(n,t){let r=ve(n)[W.DateTimeFormat];return Pe(r,t)}function Ye(n,t){let e=ve(n),r=e[W.NumberSymbols][t];if(typeof r>"u"){if(t===pe.CurrencyDecimal)return e[W.NumberSymbols][pe.Decimal];if(t===pe.CurrencyGroup)return e[W.NumberSymbols][pe.Group]}return r}function Sl(n,t){return ve(n)[W.NumberFormats][t]}function Rl(n){if(!n[W.ExtraData])throw new E(2303,!1)}function Ol(n){let t=ve(n);return Rl(t),(t[W.ExtraData][2]||[]).map(r=>typeof r=="string"?zo(r):[zo(r[0]),zo(r[1])])}function Pl(n,t,e){let r=ve(n);Rl(r);let i=[r[W.ExtraData][0],r[W.ExtraData][1]],s=Pe(i,t)||[];return Pe(s,e)||[]}function Pe(n,t){for(let e=t;e>-1;e--)if(typeof n[e]<"u")return n[e];throw new E(2304,!1)}function zo(n){let[t,e]=n.split(":");return{hours:+t,minutes:+e}}var kp=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Ai={},Np=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function Ml(n,t,e,r){let i=Hp(n);t=pt(e,t)||t;let o=[],a;for(;t;)if(a=Np.exec(t),a){o=o.concat(a.slice(1));let d=o.pop();if(!d)break;t=d}else{o.push(t);break}let c=i.getTimezoneOffset();r&&(c=Nl(r,c),i=$p(i,r));let u="";return o.forEach(d=>{let f=Bp(d);u+=f?f(i,e,c):d==="''"?"'":d.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}function Pi(n,t,e){let r=new Date(0);return r.setFullYear(n,t,e),r.setHours(0,0,0),r}function pt(n,t){let e=Cl(n);if(Ai[e]??={},Ai[e][t])return Ai[e][t];let r="";switch(t){case"shortDate":r=dr(n,fe.Short);break;case"mediumDate":r=dr(n,fe.Medium);break;case"longDate":r=dr(n,fe.Long);break;case"fullDate":r=dr(n,fe.Full);break;case"shortTime":r=hr(n,fe.Short);break;case"mediumTime":r=hr(n,fe.Medium);break;case"longTime":r=hr(n,fe.Long);break;case"fullTime":r=hr(n,fe.Full);break;case"short":let i=pt(n,"shortTime"),s=pt(n,"shortDate");r=Ti(fr(n,fe.Short),[i,s]);break;case"medium":let o=pt(n,"mediumTime"),a=pt(n,"mediumDate");r=Ti(fr(n,fe.Medium),[o,a]);break;case"long":let c=pt(n,"longTime"),u=pt(n,"longDate");r=Ti(fr(n,fe.Long),[c,u]);break;case"full":let d=pt(n,"fullTime"),f=pt(n,"fullDate");r=Ti(fr(n,fe.Full),[d,f]);break}return r&&(Ai[e][t]=r),r}function Ti(n,t){return t&&(n=n.replace(/\{([^}]+)}/g,function(e,r){return t!=null&&r in t?t[r]:e})),n}function je(n,t,e="-",r,i){let s="";(n<0||i&&n<=0)&&(i?n=-n+1:(n=-n,s=e));let o=String(n);for(;o.length<t;)o="0"+o;return r&&(o=o.slice(o.length-t)),s+o}function Fp(n,t){return je(n,3).substring(0,t)}function G(n,t,e=0,r=!1,i=!1){return function(s,o){let a=Lp(n,s);if((e>0||a>-e)&&(a+=e),n===3)a===0&&e===-12&&(a=12);else if(n===6)return Fp(a,t);let c=Ye(o,pe.MinusSign);return je(a,t,c,r,i)}}function Lp(n,t){switch(n){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new E(2301,!1)}}function x(n,t,e=ne.Format,r=!1){return function(i,s){return xp(i,s,n,t,e,r)}}function xp(n,t,e,r,i,s){switch(e){case 2:return Al(t,i,r)[n.getMonth()];case 1:return bl(t,i,r)[n.getDay()];case 0:let o=n.getHours(),a=n.getMinutes();if(s){let u=Ol(t),d=Pl(t,i,r),f=u.findIndex(h=>{if(Array.isArray(h)){let[m,I]=h,L=o>=m.hours&&a>=m.minutes,D=o<I.hours||o===I.hours&&a<I.minutes;if(m.hours<I.hours){if(L&&D)return!0}else if(L||D)return!0}else if(h.hours===o&&h.minutes===a)return!0;return!1});if(f!==-1)return d[f]}return Il(t,i,r)[o<12?0:1];case 3:return Tl(t,r)[n.getFullYear()<=0?0:1];default:let c=e;throw new E(2302,!1)}}function Si(n){return function(t,e,r){let i=-1*r,s=Ye(e,pe.MinusSign),o=i>0?Math.floor(i/60):Math.ceil(i/60);switch(n){case 0:return(i>=0?"+":"")+je(o,2,s)+je(Math.abs(i%60),2,s);case 1:return"GMT"+(i>=0?"+":"")+je(o,1,s);case 2:return"GMT"+(i>=0?"+":"")+je(o,2,s)+":"+je(Math.abs(i%60),2,s);case 3:return r===0?"Z":(i>=0?"+":"")+je(o,2,s)+":"+je(Math.abs(i%60),2,s);default:throw new E(2310,!1)}}}var Up=0,Oi=4;function Vp(n){let t=Pi(n,Up,1).getDay();return Pi(n,0,1+(t<=Oi?Oi:Oi+7)-t)}function kl(n){let t=n.getDay(),e=t===0?-3:Oi-t;return Pi(n.getFullYear(),n.getMonth(),n.getDate()+e)}function Wo(n,t=!1){return function(e,r){let i;if(t){let s=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,o=e.getDate();i=1+Math.floor((o+s)/7)}else{let s=kl(e),o=Vp(s.getFullYear()),a=s.getTime()-o.getTime();i=1+Math.round(a/6048e5)}return je(i,n,Ye(r,pe.MinusSign))}}function Ri(n,t=!1){return function(e,r){let s=kl(e).getFullYear();return je(s,n,Ye(r,pe.MinusSign),t)}}var Go={};function Bp(n){if(Go[n])return Go[n];let t;switch(n){case"G":case"GG":case"GGG":t=x(3,N.Abbreviated);break;case"GGGG":t=x(3,N.Wide);break;case"GGGGG":t=x(3,N.Narrow);break;case"y":t=G(0,1,0,!1,!0);break;case"yy":t=G(0,2,0,!0,!0);break;case"yyy":t=G(0,3,0,!1,!0);break;case"yyyy":t=G(0,4,0,!1,!0);break;case"Y":t=Ri(1);break;case"YY":t=Ri(2,!0);break;case"YYY":t=Ri(3);break;case"YYYY":t=Ri(4);break;case"M":case"L":t=G(1,1,1);break;case"MM":case"LL":t=G(1,2,1);break;case"MMM":t=x(2,N.Abbreviated);break;case"MMMM":t=x(2,N.Wide);break;case"MMMMM":t=x(2,N.Narrow);break;case"LLL":t=x(2,N.Abbreviated,ne.Standalone);break;case"LLLL":t=x(2,N.Wide,ne.Standalone);break;case"LLLLL":t=x(2,N.Narrow,ne.Standalone);break;case"w":t=Wo(1);break;case"ww":t=Wo(2);break;case"W":t=Wo(1,!0);break;case"d":t=G(2,1);break;case"dd":t=G(2,2);break;case"c":case"cc":t=G(7,1);break;case"ccc":t=x(1,N.Abbreviated,ne.Standalone);break;case"cccc":t=x(1,N.Wide,ne.Standalone);break;case"ccccc":t=x(1,N.Narrow,ne.Standalone);break;case"cccccc":t=x(1,N.Short,ne.Standalone);break;case"E":case"EE":case"EEE":t=x(1,N.Abbreviated);break;case"EEEE":t=x(1,N.Wide);break;case"EEEEE":t=x(1,N.Narrow);break;case"EEEEEE":t=x(1,N.Short);break;case"a":case"aa":case"aaa":t=x(0,N.Abbreviated);break;case"aaaa":t=x(0,N.Wide);break;case"aaaaa":t=x(0,N.Narrow);break;case"b":case"bb":case"bbb":t=x(0,N.Abbreviated,ne.Standalone,!0);break;case"bbbb":t=x(0,N.Wide,ne.Standalone,!0);break;case"bbbbb":t=x(0,N.Narrow,ne.Standalone,!0);break;case"B":case"BB":case"BBB":t=x(0,N.Abbreviated,ne.Format,!0);break;case"BBBB":t=x(0,N.Wide,ne.Format,!0);break;case"BBBBB":t=x(0,N.Narrow,ne.Format,!0);break;case"h":t=G(3,1,-12);break;case"hh":t=G(3,2,-12);break;case"H":t=G(3,1);break;case"HH":t=G(3,2);break;case"m":t=G(4,1);break;case"mm":t=G(4,2);break;case"s":t=G(5,1);break;case"ss":t=G(5,2);break;case"S":t=G(6,1);break;case"SS":t=G(6,2);break;case"SSS":t=G(6,3);break;case"Z":case"ZZ":case"ZZZ":t=Si(0);break;case"ZZZZZ":t=Si(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=Si(1);break;case"OOOO":case"ZZZZ":case"zzzz":t=Si(2);break;default:return null}return Go[n]=t,t}function Nl(n,t){n=n.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(e)?t:e}function jp(n,t){return n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+t),n}function $p(n,t,e){let i=n.getTimezoneOffset(),s=Nl(t,i);return jp(n,-1*(s-i))}function Hp(n){if(vl(n))return n;if(typeof n=="number"&&!isNaN(n))return new Date(n);if(typeof n=="string"){if(n=n.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(n)){let[i,s=1,o=1]=n.split("-").map(a=>+a);return Pi(i,s-1,o)}let e=parseFloat(n);if(!isNaN(n-e))return new Date(e);let r;if(r=n.match(kp))return zp(r)}let t=new Date(n);if(!vl(t))throw new E(2311,!1);return t}function zp(n){let t=new Date(0),e=0,r=0,i=n[8]?t.setUTCFullYear:t.setFullYear,s=n[8]?t.setUTCHours:t.setHours;n[9]&&(e=Number(n[9]+n[10]),r=Number(n[9]+n[11])),i.call(t,Number(n[1]),Number(n[2])-1,Number(n[3]));let o=Number(n[4]||0)-e,a=Number(n[5]||0)-r,c=Number(n[6]||0),u=Math.floor(parseFloat("0."+(n[7]||0))*1e3);return s.call(t,o,a,c,u),t}function vl(n){return n instanceof Date&&!isNaN(n.valueOf())}var Wp=/^(\d+)?\.((\d+)(-(\d+))?)?$/,yl=22,Mi=".",pr="0",Gp=";",qp=",",qo="#";function Kp(n,t,e,r,i,s,o=!1){let a="",c=!1;if(!isFinite(n))a=Ye(e,pe.Infinity);else{let u=Jp(n);o&&(u=Zp(u));let d=t.minInt,f=t.minFrac,h=t.maxFrac;if(s){let k=s.match(Wp);if(k===null)throw new E(2306,!1);let H=k[1],U=k[3],ge=k[5];H!=null&&(d=Ko(H)),U!=null&&(f=Ko(U)),ge!=null?h=Ko(ge):U!=null&&f>h&&(h=f)}Xp(u,f,h);let m=u.digits,I=u.integerLen,L=u.exponent,D=[];for(c=m.every(k=>!k);I<d;I++)m.unshift(0);for(;I<0;I++)m.unshift(0);I>0?D=m.splice(I,m.length):(D=m,m=[0]);let T=[];for(m.length>=t.lgSize&&T.unshift(m.splice(-t.lgSize,m.length).join(""));m.length>t.gSize;)T.unshift(m.splice(-t.gSize,m.length).join(""));m.length&&T.unshift(m.join("")),a=T.join(Ye(e,r)),D.length&&(a+=Ye(e,i)+D.join("")),L&&(a+=Ye(e,pe.Exponential)+"+"+L)}return n<0&&!c?a=t.negPre+a+t.negSuf:a=t.posPre+a+t.posSuf,a}function Fl(n,t,e){let r=Sl(t,Qo.Decimal),i=Yp(r,Ye(t,pe.MinusSign));return Kp(n,i,t,pe.Group,pe.Decimal,e)}function Yp(n,t="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=n.split(Gp),i=r[0],s=r[1],o=i.indexOf(Mi)!==-1?i.split(Mi):[i.substring(0,i.lastIndexOf(pr)+1),i.substring(i.lastIndexOf(pr)+1)],a=o[0],c=o[1]||"";e.posPre=a.substring(0,a.indexOf(qo));for(let d=0;d<c.length;d++){let f=c.charAt(d);f===pr?e.minFrac=e.maxFrac=d+1:f===qo?e.maxFrac=d+1:e.posSuf+=f}let u=a.split(qp);if(e.gSize=u[1]?u[1].length:0,e.lgSize=u[2]||u[1]?(u[2]||u[1]).length:0,s){let d=i.length-e.posPre.length-e.posSuf.length,f=s.indexOf(qo);e.negPre=s.substring(0,f).replace(/'/g,""),e.negSuf=s.slice(f+d).replace(/'/g,"")}else e.negPre=t+e.posPre,e.negSuf=e.posSuf;return e}function Zp(n){if(n.digits[0]===0)return n;let t=n.digits.length-n.integerLen;return n.exponent?n.exponent+=2:(t===0?n.digits.push(0,0):t===1&&n.digits.push(0),n.integerLen+=2),n}function Jp(n){let t=Math.abs(n)+"",e=0,r,i,s,o,a;for((i=t.indexOf(Mi))>-1&&(t=t.replace(Mi,"")),(s=t.search(/e/i))>0?(i<0&&(i=s),i+=+t.slice(s+1),t=t.substring(0,s)):i<0&&(i=t.length),s=0;t.charAt(s)===pr;s++);if(s===(a=t.length))r=[0],i=1;else{for(a--;t.charAt(a)===pr;)a--;for(i-=s,r=[],o=0;s<=a;s++,o++)r[o]=Number(t.charAt(s))}return i>yl&&(r=r.splice(0,yl-1),e=i-1,i=1),{digits:r,exponent:e,integerLen:i}}function Xp(n,t,e){if(t>e)throw new E(2307,!1);let r=n.digits,i=r.length-n.integerLen,s=Math.min(Math.max(t,i),e),o=s+n.integerLen,a=r[o];if(o>0){r.splice(Math.max(n.integerLen,o));for(let f=o;f<r.length;f++)r[f]=0}else{i=Math.max(0,i),n.integerLen=1,r.length=Math.max(1,o=s+1),r[0]=0;for(let f=1;f<o;f++)r[f]=0}if(a>=5)if(o-1<0){for(let f=0;f>o;f--)r.unshift(0),n.integerLen++;r.unshift(1),n.integerLen++}else r[o-1]++;for(;i<Math.max(0,s);i++)r.push(0);let c=s!==0,u=t+n.integerLen,d=r.reduceRight(function(f,h,m,I){return h=h+f,I[m]=h<10?h:h-10,c&&(I[m]===0&&m>=u?I.pop():c=!1),h>=10?1:0},0);d&&(r.unshift(d),n.integerLen++)}function Ko(n){let t=parseInt(n);if(isNaN(t))throw new E(2305,!1);return t}var Yo=/\s+/,_l=[],Qp=(()=>{class n{_ngEl;_renderer;initialClasses=_l;rawClass;stateMap=new Map;constructor(e,r){this._ngEl=e,this._renderer=r}set klass(e){this.initialClasses=e!=null?e.trim().split(Yo):_l}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(Yo):e}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let r of e)this._updateState(r,!0);else if(e!=null)for(let r of Object.keys(e))this._updateState(r,!!e[r]);this._applyStateDiff()}_updateState(e,r){let i=this.stateMap.get(e);i!==void 0?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(e,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let r=e[0],i=e[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(e,r){e=e.trim(),e.length>0&&e.split(Yo).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(r){return new(r||n)(v(he),v(me))};static \u0275dir=O({type:n,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return n})(),eg=(()=>{class n{_viewContainerRef;ngComponentOutlet=null;ngComponentOutletInputs;ngComponentOutletInjector;ngComponentOutletEnvironmentInjector;ngComponentOutletContent;ngComponentOutletNgModule;ngComponentOutletNgModuleFactory;_componentRef;_moduleRef;_inputsUsed=new Map;get componentInstance(){return this._componentRef?.instance??null}constructor(e){this._viewContainerRef=e}_needToReCreateNgModuleInstance(e){return e.ngComponentOutletNgModule!==void 0||e.ngComponentOutletNgModuleFactory!==void 0}_needToReCreateComponentInstance(e){return e.ngComponentOutlet!==void 0||e.ngComponentOutletContent!==void 0||e.ngComponentOutletInjector!==void 0||e.ngComponentOutletEnvironmentInjector!==void 0||this._needToReCreateNgModuleInstance(e)}ngOnChanges(e){if(this._needToReCreateComponentInstance(e)&&(this._viewContainerRef.clear(),this._inputsUsed.clear(),this._componentRef=void 0,this.ngComponentOutlet)){let r=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;this._needToReCreateNgModuleInstance(e)&&(this._moduleRef?.destroy(),this.ngComponentOutletNgModule?this._moduleRef=Qu(this.ngComponentOutletNgModule,El(r)):this.ngComponentOutletNgModuleFactory?this._moduleRef=this.ngComponentOutletNgModuleFactory.create(El(r)):this._moduleRef=void 0),this._componentRef=this._viewContainerRef.createComponent(this.ngComponentOutlet,{injector:r,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent,environmentInjector:this.ngComponentOutletEnvironmentInjector})}}ngDoCheck(){if(this._componentRef){if(this.ngComponentOutletInputs)for(let e of Object.keys(this.ngComponentOutletInputs))this._inputsUsed.set(e,!0);this._applyInputStateDiff(this._componentRef)}}ngOnDestroy(){this._moduleRef?.destroy()}_applyInputStateDiff(e){for(let[r,i]of this._inputsUsed)i?(e.setInput(r,this.ngComponentOutletInputs[r]),this._inputsUsed.set(r,!1)):(e.setInput(r,void 0),this._inputsUsed.delete(r))}static \u0275fac=function(r){return new(r||n)(v(Jt))};static \u0275dir=O({type:n,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInputs:"ngComponentOutletInputs",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletEnvironmentInjector:"ngComponentOutletEnvironmentInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},exportAs:["ngComponentOutlet"],features:[de]})}return n})();function El(n){return n.get(Ju).injector}var ki=class{$implicit;ngForOf;index;count;constructor(t,e,r,i){this.$implicit=t,this.ngForOf=e,this.index=r,this.count=i}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Ll=(()=>{class n{_viewContainer;_template;_differs;set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}_ngForOf=null;_ngForOfDirty=!0;_differ=null;_trackByFn;constructor(e,r,i){this._viewContainer=e,this._template=r,this._differs=i}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let r=this._viewContainer;e.forEachOperation((i,s,o)=>{if(i.previousIndex==null)r.createEmbeddedView(this._template,new ki(i.item,this._ngForOf,-1,-1),o===null?void 0:o);else if(o==null)r.remove(s===null?void 0:s);else if(s!==null){let a=r.get(s);r.move(a,o),Dl(a,i)}});for(let i=0,s=r.length;i<s;i++){let a=r.get(i).context;a.index=i,a.count=s,a.ngForOf=this._ngForOf}e.forEachIdentityChange(i=>{let s=r.get(i.currentIndex);Dl(s,i)})}static ngTemplateContextGuard(e,r){return!0}static \u0275fac=function(r){return new(r||n)(v(Jt),v(Po),v(ul))};static \u0275dir=O({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return n})();function Dl(n,t){n.context.$implicit=t.item}var Fi=(()=>{class n{_viewContainer;_context=new Ni;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(e,r){this._viewContainer=e,this._thenTemplateRef=r}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){wl(e,!1),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){wl(e,!1),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(e,r){return!0}static \u0275fac=function(r){return new(r||n)(v(Jt),v(Po))};static \u0275dir=O({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return n})(),Ni=class{$implicit=null;ngIf=null};function wl(n,t){if(n&&!n.createEmbeddedView)throw new E(2020,!1)}var tg=(()=>{class n{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(e,r,i){this._ngEl=e,this._differs=r,this._renderer=i}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){let e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,r){let[i,s]=e.split("."),o=i.indexOf("-")===-1?void 0:Zt.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,i,s?`${r}${s}`:r,o):this._renderer.removeStyle(this._ngEl.nativeElement,i,o)}_applyChanges(e){e.forEachRemovedItem(r=>this._setStyle(r.key,null)),e.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),e.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}static \u0275fac=function(r){return new(r||n)(v(he),v(ll),v(me))};static \u0275dir=O({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return n})(),ng=(()=>{class n{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,r,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,i):!1,get:(e,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static \u0275fac=function(r){return new(r||n)(v(Jt))};static \u0275dir=O({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[de]})}return n})();function Li(n,t){return new E(2100,!1)}var Zo=class{createSubscription(t,e,r){return $(()=>t.subscribe({next:e,error:r}))}dispose(t){$(()=>t.unsubscribe())}},Jo=class{createSubscription(t,e,r){return t.then(i=>e?.(i),i=>r?.(i)),{unsubscribe:()=>{e=null,r=null}}}dispose(t){t.unsubscribe()}},rg=new Jo,ig=new Zo,sg=(()=>{class n{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=p(Dn);constructor(e){this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,r=>this._updateLatestValue(e,r),r=>this.applicationErrorHandler(r))}_selectStrategy(e){if(In(e))return rg;if(el(e))return ig;throw Li(n,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,r){e===this._obj&&(this._latestValue=r,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(r){return new(r||n)(v(Ke,16))};static \u0275pipe=ir({name:"async",type:n,pure:!1})}return n})();var og="mediumDate",xl=new C(""),Ul=new C(""),ag=(()=>{class n{locale;defaultTimezone;defaultOptions;constructor(e,r,i){this.locale=e,this.defaultTimezone=r,this.defaultOptions=i}transform(e,r,i,s){if(e==null||e===""||e!==e)return null;try{let o=r??this.defaultOptions?.dateFormat??og,a=i??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Ml(e,o,s||this.locale,a)}catch(o){throw Li(n,o.message)}}static \u0275fac=function(r){return new(r||n)(v(Vo,16),v(xl,24),v(Ul,24))};static \u0275pipe=ir({name:"date",type:n,pure:!0})}return n})();var cg=(()=>{class n{_locale;constructor(e){this._locale=e}transform(e,r,i){if(!ug(e))return null;i||=this._locale;try{let s=lg(e);return Fl(s,i,r)}catch(s){throw Li(n,s.message)}}static \u0275fac=function(r){return new(r||n)(v(Vo,16))};static \u0275pipe=ir({name:"number",type:n,pure:!0})}return n})();function ug(n){return!(n==null||n===""||n!==n)}function lg(n){if(typeof n=="string"&&!isNaN(Number(n)-parseFloat(n)))return Number(n);if(typeof n!="number")throw new E(2309,!1);return n}var dg=(()=>{class n{transform(e,r,i){if(e==null)return null;if(!(typeof e=="string"||Array.isArray(e)))throw Li(n,e);return e.slice(r,i)}static \u0275fac=function(r){return new(r||n)};static \u0275pipe=ir({name:"slice",type:n,pure:!1})}return n})();var Vl=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Te({type:n});static \u0275inj=Ae({})}return n})();function gr(n,t){t=encodeURIComponent(t);for(let e of n.split(";")){let r=e.indexOf("="),[i,s]=r==-1?[e,""]:[e.slice(0,r),e.slice(r+1)];if(i.trim()===t)return decodeURIComponent(s)}return null}var en=class{};var ta="browser",fg="server";function NC(n){return n===ta}function FC(n){return n===fg}var Bl=(()=>{class n{static \u0275prov=y({token:n,providedIn:"root",factory:()=>new ea(p(V),window)})}return n})(),ea=class{document;window;offset=()=>[0,0];constructor(t,e){this.document=t,this.window=e}setOffset(t){Array.isArray(t)?this.offset=()=>t:this.offset=t}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(t,e){this.window.scrollTo(S(g({},e),{left:t[0],top:t[1]}))}scrollToAnchor(t,e){let r=pg(this.document,t);r&&(this.scrollToElement(r,e),r.focus())}setHistoryScrollRestoration(t){try{this.window.history.scrollRestoration=t}catch{console.warn(qt(2400,!1))}}scrollToElement(t,e){let r=t.getBoundingClientRect(),i=r.left+this.window.pageXOffset,s=r.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(S(g({},e),{left:i-o[0],top:s-o[1]}))}};function pg(n,t){let e=n.getElementById(t)||n.getElementsByName(t)[0];if(e)return e;if(typeof n.createTreeWalker=="function"&&n.body&&typeof n.body.attachShadow=="function"){let r=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT),i=r.currentNode;for(;i;){let s=i.shadowRoot;if(s){let o=s.getElementById(t)||s.querySelector(`[name="${t}"]`);if(o)return o}i=r.nextNode()}}return null}var mr=class{_doc;constructor(t){this._doc=t}manager},xi=(()=>{class n extends mr{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,i,s){return e.addEventListener(r,i,s),()=>this.removeEventListener(e,r,i,s)}removeEventListener(e,r,i,s){return e.removeEventListener(r,i,s)}static \u0275fac=function(r){return new(r||n)(w(V))};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})(),Vi=new C(""),oa=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,r){this._zone=r,e.forEach(o=>{o.manager=this});let i=e.filter(o=>!(o instanceof xi));this._plugins=i.slice().reverse();let s=e.find(o=>o instanceof xi);s&&this._plugins.push(s)}addEventListener(e,r,i,s){return this._findPluginFor(r).addEventListener(e,r,i,s)}getZone(){return this._zone}_findPluginFor(e){let r=this._eventNameToPlugin.get(e);if(r)return r;if(r=this._plugins.find(s=>s.supports(e)),!r)throw new E(5101,!1);return this._eventNameToPlugin.set(e,r),r}static \u0275fac=function(r){return new(r||n)(w(Vi),w(Y))};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})(),na="ng-app-id";function jl(n){for(let t of n)t.remove()}function $l(n,t){let e=t.createElement("style");return e.textContent=n,e}function mg(n,t,e,r){let i=n.head?.querySelectorAll(`style[${na}="${t}"],link[${na}="${t}"]`);if(i)for(let s of i)s.removeAttribute(na),s instanceof HTMLLinkElement?r.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function ia(n,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",n),e}var aa=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,r,i,s={}){this.doc=e,this.appId=r,this.nonce=i,mg(e,r,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,r){for(let i of e)this.addUsage(i,this.inline,$l);r?.forEach(i=>this.addUsage(i,this.external,ia))}removeStyles(e,r){for(let i of e)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(e,r,i){let s=r.get(e);s?s.usage++:r.set(e,{usage:1,elements:[...this.hosts].map(o=>this.addElement(o,i(e,this.doc)))})}removeUsage(e,r){let i=r.get(e);i&&(i.usage--,i.usage<=0&&(jl(i.elements),r.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])jl(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(e,$l(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(e,ia(r,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,r){return this.nonce&&r.setAttribute("nonce",this.nonce),e.appendChild(r)}static \u0275fac=function(r){return new(r||n)(w(V),w(bo),w(Ao,8),w(wn))};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})(),ra={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},ca=/%COMP%/g;var zl="%COMP%",vg=`_nghost-${zl}`,yg=`_ngcontent-${zl}`,_g=!0,Eg=new C("",{providedIn:"root",factory:()=>_g});function Dg(n){return yg.replace(ca,n)}function wg(n){return vg.replace(ca,n)}function Wl(n,t){return t.map(e=>e.replace(ca,n))}var ua=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,r,i,s,o,a,c=null,u=null){this.eventManager=e,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=o,this.ngZone=a,this.nonce=c,this.tracingService=u,this.platformIsServer=!1,this.defaultRenderer=new vr(e,o,a,this.platformIsServer,this.tracingService)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;let i=this.getOrCreateRenderer(e,r);return i instanceof Ui?i.applyToHost(e):i instanceof yr&&i.applyStyles(),i}getOrCreateRenderer(e,r){let i=this.rendererByCompId,s=i.get(r.id);if(!s){let o=this.doc,a=this.ngZone,c=this.eventManager,u=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,f=this.platformIsServer,h=this.tracingService;switch(r.encapsulation){case So.Emulated:s=new Ui(c,u,r,this.appId,d,o,a,f,h);break;case So.ShadowDom:return new sa(c,u,e,r,o,a,this.nonce,f,h);default:s=new yr(c,u,r,d,o,a,f,h);break}i.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(r){return new(r||n)(w(oa),w(aa),w(bo),w(Eg),w(V),w(Y),w(Ao),w(qu,8))};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})(),vr=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,r,i,s){this.eventManager=t,this.doc=e,this.ngZone=r,this.platformIsServer=i,this.tracingService=s}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(ra[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Hl(t)?t.content:t).appendChild(e)}insertBefore(t,e,r){t&&(Hl(t)?t.content:t).insertBefore(e,r)}removeChild(t,e){e.remove()}selectRootElement(t,e){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new E(-5104,!1);return e||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,r,i){if(i){e=i+":"+e;let s=ra[i];s?t.setAttributeNS(s,e,r):t.setAttribute(e,r)}else t.setAttribute(e,r)}removeAttribute(t,e,r){if(r){let i=ra[r];i?t.removeAttributeNS(i,e):t.removeAttribute(`${r}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,r,i){i&(Zt.DashCase|Zt.Important)?t.style.setProperty(e,r,i&Zt.Important?"important":""):t.style[e]=r}removeStyle(t,e,r){r&Zt.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,r){t!=null&&(t[e]=r)}setValue(t,e){t.nodeValue=e}listen(t,e,r,i){if(typeof t=="string"&&(t=Re().getGlobalEventTarget(this.doc,t),!t))throw new E(5102,!1);let s=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(t,e,s)),this.eventManager.addEventListener(t,e,s,i)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;t(e)===!1&&e.preventDefault()}}};function Hl(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var sa=class extends vr{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,r,i,s,o,a,c,u){super(t,s,o,c,u),this.sharedStylesHost=e,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let d=i.styles;d=Wl(i.id,d);for(let h of d){let m=document.createElement("style");a&&m.setAttribute("nonce",a),m.textContent=h,this.shadowRoot.appendChild(m)}let f=i.getExternalStyles?.();if(f)for(let h of f){let m=ia(h,s);a&&m.setAttribute("nonce",a),this.shadowRoot.appendChild(m)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,r){return super.insertBefore(this.nodeOrShadowRoot(t),e,r)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},yr=class extends vr{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,r,i,s,o,a,c,u){super(t,s,o,a,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=i;let d=r.styles;this.styles=u?Wl(u,d):d,this.styleUrls=r.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Gu.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Ui=class extends yr{contentAttr;hostAttr;constructor(t,e,r,i,s,o,a,c,u){let d=i+"-"+r.id;super(t,e,r,s,o,a,c,u,d),this.contentAttr=Dg(d),this.hostAttr=wg(d)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let r=super.createElement(t,e);return super.setAttribute(r,this.contentAttr,""),r}};var Bi=class n extends ur{supportsDOMEvents=!0;static makeCurrent(){$o(new n)}onAndCancel(t,e,r,i){return t.addEventListener(e,r,i),()=>{t.removeEventListener(e,r,i)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=Ig();return e==null?null:bg(e)}resetBaseElement(){_r=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return gr(document.cookie,t)}},_r=null;function Ig(){return _r=_r||document.head.querySelector("base"),_r?_r.getAttribute("href"):null}function bg(n){return new URL(n,document.baseURI).pathname}var Ag=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})(),Gl=["alt","control","meta","shift"],Tg={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Sg={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},ql=(()=>{class n extends mr{constructor(e){super(e)}supports(e){return n.parseEventName(e)!=null}addEventListener(e,r,i,s){let o=n.parseEventName(r),a=n.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Re().onAndCancel(e,o.domEventName,a,s))}static parseEventName(e){let r=e.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let s=n._normalizeKey(r.pop()),o="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),o="code."),Gl.forEach(u=>{let d=r.indexOf(u);d>-1&&(r.splice(d,1),o+=u+".")}),o+=s,r.length!=0||s.length===0)return null;let c={};return c.domEventName=i,c.fullKey=o,c}static matchEventFullKeyCode(e,r){let i=Tg[e.key]||e.key,s="";return r.indexOf("code.")>-1&&(i=e.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),Gl.forEach(o=>{if(o!==i){let a=Sg[o];a(e)&&(s+=o+".")}}),s+=i,s===r)}static eventCallback(e,r,i){return s=>{n.matchEventFullKeyCode(s,e)&&i.runGuarded(()=>r(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(r){return new(r||n)(w(V))};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})();function Rg(n,t,e){let r=g({rootComponent:n,platformRef:e?.platformRef},Og(t));return dl(r)}function Og(n){return{appProviders:[...Fg,...n?.providers??[]],platformProviders:Ng}}function Pg(){Bi.makeCurrent()}function Mg(){return new Co}function kg(){return Lu(document),document}var Ng=[{provide:wn,useValue:ta},{provide:xu,useValue:Pg,multi:!0},{provide:V,useFactory:kg}];var Fg=[{provide:Nu,useValue:"root"},{provide:Co,useFactory:Mg},{provide:Vi,useClass:xi,multi:!0,deps:[V]},{provide:Vi,useClass:ql,multi:!0,deps:[V]},ua,aa,oa,{provide:Yu,useExisting:ua},{provide:en,useClass:Ag},[]];var An=class{},Er=class{},Ze=class n{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
2
+ `).forEach(e=>{let r=e.indexOf(":");if(r>0){let i=e.slice(0,r),s=e.slice(r+1).trim();this.addHeaderEntry(i,s)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,r)=>{this.addHeaderEntry(r,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,r])=>{this.setHeaderEntries(e,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new n;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let r=t.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,e);let i=(t.op==="a"?this.headers.get(e):void 0)||[];i.push(...r),this.headers.set(e,i);break;case"d":let s=t.value;if(!s)this.headers.delete(e),this.normalizedNames.delete(e);else{let o=this.headers.get(e);if(!o)return;o=o.filter(a=>s.indexOf(a)===-1),o.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}break}}addHeaderEntry(t,e){let r=t.toLowerCase();this.maybeSetNormalizedName(t,r),this.headers.has(r)?this.headers.get(r).push(e):this.headers.set(r,[e])}setHeaderEntries(t,e){let r=(Array.isArray(e)?e:[e]).map(s=>s.toString()),i=t.toLowerCase();this.headers.set(i,r),this.maybeSetNormalizedName(t,i)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var $i=class{encodeKey(t){return Kl(t)}encodeValue(t){return Kl(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function Lg(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(i=>{let s=i.indexOf("="),[o,a]=s==-1?[t.decodeKey(i),""]:[t.decodeKey(i.slice(0,s)),t.decodeValue(i.slice(s+1))],c=e.get(o)||[];c.push(a),e.set(o,c)}),e}var xg=/%(\d[a-f0-9])/gi,Ug={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Kl(n){return encodeURIComponent(n).replace(xg,(t,e)=>Ug[e]??t)}function ji(n){return`${n}`}var gt=class n{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new $i,t.fromString){if(t.fromObject)throw new E(2805,!1);this.map=Lg(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let r=t.fromObject[e],i=Array.isArray(r)?r.map(ji):[ji(r)];this.map.set(e,i)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(r=>{let i=t[r];Array.isArray(i)?i.forEach(s=>{e.push({param:r,value:s,op:"a"})}):e.push({param:r,value:i,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(r=>e+"="+this.encoder.encodeValue(r)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new n({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(ji(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let r=this.map.get(t.param)||[],i=r.indexOf(ji(t.value));i!==-1&&r.splice(i,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var Hi=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function Vg(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Yl(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function Zl(n){return typeof Blob<"u"&&n instanceof Blob}function Jl(n){return typeof FormData<"u"&&n instanceof FormData}function Bg(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var Xl="Content-Type",Ql="Accept",td="X-Request-URL",nd="text/plain",rd="application/json",jg=`${rd}, ${nd}, */*`,bn=class n{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(t,e,r,i){this.url=e,this.method=t.toUpperCase();let s;if(Vg(this.method)||i?(this.body=r!==void 0?r:null,s=i):s=r,s){if(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,this.keepalive=!!s.keepalive,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),s.priority&&(this.priority=s.priority),s.cache&&(this.cache=s.cache),s.credentials&&(this.credentials=s.credentials),typeof s.timeout=="number"){if(s.timeout<1||!Number.isInteger(s.timeout))throw new E(2822,"");this.timeout=s.timeout}s.mode&&(this.mode=s.mode),s.redirect&&(this.redirect=s.redirect),s.integrity&&(this.integrity=s.integrity),s.referrer&&(this.referrer=s.referrer),this.transferCache=s.transferCache}if(this.headers??=new Ze,this.context??=new Hi,!this.params)this.params=new gt,this.urlWithParams=e;else{let o=this.params.toString();if(o.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),c=a===-1?"?":a<e.length-1?"&":"";this.urlWithParams=e+c+o}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Yl(this.body)||Zl(this.body)||Jl(this.body)||Bg(this.body)?this.body:this.body instanceof gt?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Jl(this.body)?null:Zl(this.body)?this.body.type||null:Yl(this.body)?null:typeof this.body=="string"?nd:this.body instanceof gt?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?rd:null}clone(t={}){let e=t.method||this.method,r=t.url||this.url,i=t.responseType||this.responseType,s=t.keepalive??this.keepalive,o=t.priority||this.priority,a=t.cache||this.cache,c=t.mode||this.mode,u=t.redirect||this.redirect,d=t.credentials||this.credentials,f=t.referrer||this.referrer,h=t.integrity||this.integrity,m=t.transferCache??this.transferCache,I=t.timeout??this.timeout,L=t.body!==void 0?t.body:this.body,D=t.withCredentials??this.withCredentials,T=t.reportProgress??this.reportProgress,k=t.headers||this.headers,H=t.params||this.params,U=t.context??this.context;return t.setHeaders!==void 0&&(k=Object.keys(t.setHeaders).reduce((ge,ke)=>ge.set(ke,t.setHeaders[ke]),k)),t.setParams&&(H=Object.keys(t.setParams).reduce((ge,ke)=>ge.set(ke,t.setParams[ke]),H)),new n(e,r,L,{params:H,headers:k,context:U,reportProgress:T,responseType:i,withCredentials:D,transferCache:m,keepalive:s,cache:a,priority:o,timeout:I,mode:c,redirect:u,credentials:d,referrer:f,integrity:h})}},tn=(function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n})(tn||{}),Tn=class{headers;status;statusText;url;ok;type;redirected;constructor(t,e=200,r="OK"){this.headers=t.headers||new Ze,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||r,this.url=t.url||null,this.redirected=t.redirected,this.ok=this.status>=200&&this.status<300}},zi=class n extends Tn{constructor(t={}){super(t)}type=tn.ResponseHeader;clone(t={}){return new n({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},Dr=class n extends Tn{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=tn.Response;clone(t={}){return new n({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0,redirected:t.redirected??this.redirected})}},St=class extends Tn{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},$g=200,Hg=204;function la(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,credentials:n.credentials,transferCache:n.transferCache,timeout:n.timeout,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,integrity:n.integrity,referrer:n.referrer}}var Gi=(()=>{class n{handler;constructor(e){this.handler=e}request(e,r,i={}){let s;if(e instanceof bn)s=e;else{let c;i.headers instanceof Ze?c=i.headers:c=new Ze(i.headers);let u;i.params&&(i.params instanceof gt?u=i.params:u=new gt({fromObject:i.params})),s=new bn(e,r,i.body!==void 0?i.body:null,{headers:c,context:i.context,params:u,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials,transferCache:i.transferCache,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,credentials:i.credentials,referrer:i.referrer,integrity:i.integrity,timeout:i.timeout})}let o=_(s).pipe(ot(c=>this.handler.handle(c)));if(e instanceof bn||i.observe==="events")return o;let a=o.pipe(Ne(c=>c instanceof Dr));switch(i.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(R(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new E(2806,!1);return c.body}));case"blob":return a.pipe(R(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new E(2807,!1);return c.body}));case"text":return a.pipe(R(c=>{if(c.body!==null&&typeof c.body!="string")throw new E(2808,!1);return c.body}));case"json":default:return a.pipe(R(c=>c.body))}case"response":return a;default:throw new E(2809,!1)}}delete(e,r={}){return this.request("DELETE",e,r)}get(e,r={}){return this.request("GET",e,r)}head(e,r={}){return this.request("HEAD",e,r)}jsonp(e,r){return this.request("JSONP",e,{params:new gt().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,r={}){return this.request("OPTIONS",e,r)}patch(e,r,i={}){return this.request("PATCH",e,la(i,r))}post(e,r,i={}){return this.request("POST",e,la(i,r))}put(e,r,i={}){return this.request("PUT",e,la(i,r))}static \u0275fac=function(r){return new(r||n)(w(An))};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})();var zg=new C("");function id(n,t){return t(n)}function Wg(n,t){return(e,r)=>t.intercept(e,{handle:i=>n(i,r)})}function Gg(n,t,e){return(r,i)=>X(e,()=>t(r,s=>n(s,i)))}var sd=new C(""),qi=new C(""),od=new C(""),ha=new C("",{providedIn:"root",factory:()=>!0});function qg(){let n=null;return(t,e)=>{n===null&&(n=(p(sd,{optional:!0})??[]).reduceRight(Wg,id));let r=p(Kt);if(p(ha)){let s=r.add();return n(t,e).pipe(Gt(s))}else return n(t,e)}}var Wi=(()=>{class n extends An{backend;injector;chain=null;pendingTasks=p(Kt);contributeToStability=p(ha);constructor(e,r){super(),this.backend=e,this.injector=r}handle(e){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(qi),...this.injector.get(od,[])]));this.chain=r.reduceRight((i,s)=>Gg(i,s,this.injector),id)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(e,i=>this.backend.handle(i)).pipe(Gt(r))}else return this.chain(e,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||n)(w(Er),w(Le))};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})();var Kg=/^\)\]\}',?\n/,Yg=RegExp(`^${td}:`,"m");function Zg(n){return"responseURL"in n&&n.responseURL?n.responseURL:Yg.test(n.getAllResponseHeaders())?n.getResponseHeader(td):null}var da=(()=>{class n{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new E(-2800,!1);let r=this.xhrFactory;return _(null).pipe(J(()=>new Ie(s=>{let o=r.build();if(o.open(e.method,e.urlWithParams),e.withCredentials&&(o.withCredentials=!0),e.headers.forEach((D,T)=>o.setRequestHeader(D,T.join(","))),e.headers.has(Ql)||o.setRequestHeader(Ql,jg),!e.headers.has(Xl)){let D=e.detectContentTypeHeader();D!==null&&o.setRequestHeader(Xl,D)}if(e.timeout&&(o.timeout=e.timeout),e.responseType){let D=e.responseType.toLowerCase();o.responseType=D!=="json"?D:"text"}let a=e.serializeBody(),c=null,u=()=>{if(c!==null)return c;let D=o.statusText||"OK",T=new Ze(o.getAllResponseHeaders()),k=Zg(o)||e.url;return c=new zi({headers:T,status:o.status,statusText:D,url:k}),c},d=()=>{let{headers:D,status:T,statusText:k,url:H}=u(),U=null;T!==Hg&&(U=typeof o.response>"u"?o.responseText:o.response),T===0&&(T=U?$g:0);let ge=T>=200&&T<300;if(e.responseType==="json"&&typeof U=="string"){let ke=U;U=U.replace(Kg,"");try{U=U!==""?JSON.parse(U):null}catch(gi){U=ke,ge&&(ge=!1,U={error:gi,text:U})}}ge?(s.next(new Dr({body:U,headers:D,status:T,statusText:k,url:H||void 0})),s.complete()):s.error(new St({error:U,headers:D,status:T,statusText:k,url:H||void 0}))},f=D=>{let{url:T}=u(),k=new St({error:D,status:o.status||0,statusText:o.statusText||"Unknown Error",url:T||void 0});s.error(k)},h=f;e.timeout&&(h=D=>{let{url:T}=u(),k=new St({error:new DOMException("Request timed out","TimeoutError"),status:o.status||0,statusText:o.statusText||"Request timeout",url:T||void 0});s.error(k)});let m=!1,I=D=>{m||(s.next(u()),m=!0);let T={type:tn.DownloadProgress,loaded:D.loaded};D.lengthComputable&&(T.total=D.total),e.responseType==="text"&&o.responseText&&(T.partialText=o.responseText),s.next(T)},L=D=>{let T={type:tn.UploadProgress,loaded:D.loaded};D.lengthComputable&&(T.total=D.total),s.next(T)};return o.addEventListener("load",d),o.addEventListener("error",f),o.addEventListener("timeout",h),o.addEventListener("abort",f),e.reportProgress&&(o.addEventListener("progress",I),a!==null&&o.upload&&o.upload.addEventListener("progress",L)),o.send(a),s.next({type:tn.Sent}),()=>{o.removeEventListener("error",f),o.removeEventListener("abort",f),o.removeEventListener("load",d),o.removeEventListener("timeout",h),e.reportProgress&&(o.removeEventListener("progress",I),a!==null&&o.upload&&o.upload.removeEventListener("progress",L)),o.readyState!==o.DONE&&o.abort()}})))}static \u0275fac=function(r){return new(r||n)(w(en))};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})(),ad=new C(""),Jg="XSRF-TOKEN",Xg=new C("",{providedIn:"root",factory:()=>Jg}),Qg="X-XSRF-TOKEN",em=new C("",{providedIn:"root",factory:()=>Qg}),wr=class{},tm=(()=>{class n{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,r){this.doc=e,this.cookieName=r}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=gr(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(r){return new(r||n)(w(V),w(Xg))};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})(),nm=/^(?:https?:)?\/\//i;function rm(n,t){if(!p(ad)||n.method==="GET"||n.method==="HEAD"||nm.test(n.url))return t(n);let e=p(wr).getToken(),r=p(em);return e!=null&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,e)})),t(n)}var Ki=(function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n})(Ki||{});function cd(n,t){return{\u0275kind:n,\u0275providers:t}}function im(...n){let t=[Gi,da,Wi,{provide:An,useExisting:Wi},{provide:Er,useFactory:()=>p(zg,{optional:!0})??p(da)},{provide:qi,useValue:rm,multi:!0},{provide:ad,useValue:!0},{provide:wr,useClass:tm}];for(let e of n)t.push(...e.\u0275providers);return Fe(t)}function sm(n){return cd(Ki.Interceptors,n.map(t=>({provide:qi,useValue:t,multi:!0})))}var ed=new C("");function om(){return cd(Ki.LegacyInterceptors,[{provide:ed,useFactory:qg},{provide:qi,useExisting:ed,multi:!0}])}var ud=(()=>{class n{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(r){return new(r||n)(w(V))};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var fa=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:function(r){let i=null;return r?i=new(r||n):i=w(cm),i},providedIn:"root"})}return n})(),cm=(()=>{class n extends fa{_doc;constructor(e){super(),this._doc=e}sanitize(e,r){if(r==null)return null;switch(e){case ct.NONE:return r;case ct.HTML:return Cn(r,"HTML")?Yt(r):zu(this._doc,String(r)).toString();case ct.STYLE:return Cn(r,"Style")?Yt(r):r;case ct.SCRIPT:if(Cn(r,"Script"))return Yt(r);throw new E(5200,!1);case ct.URL:return Cn(r,"URL")?Yt(r):Hu(String(r));case ct.RESOURCE_URL:if(Cn(r,"ResourceURL"))return Yt(r);throw new E(5201,!1);default:throw new E(5202,!1)}}bypassSecurityTrustHtml(e){return Uu(e)}bypassSecurityTrustStyle(e){return Vu(e)}bypassSecurityTrustScript(e){return Bu(e)}bypassSecurityTrustUrl(e){return ju(e)}bypassSecurityTrustResourceUrl(e){return $u(e)}static \u0275fac=function(r){return new(r||n)(w(V))};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var A="primary",Fr=Symbol("RouteTitle"),ya=class{params;constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function sn(n){return new ya(n)}function yd(n,t,e){let r=e.path.split("/");if(r.length>n.length||e.pathMatch==="full"&&(t.hasChildren()||r.length<n.length))return null;let i={};for(let s=0;s<r.length;s++){let o=r[s],a=n[s];if(o[0]===":")i[o.substring(1)]=a;else if(o!==a.path)return null}return{consumed:n.slice(0,r.length),posParams:i}}function um(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;++e)if(!Je(n[e],t[e]))return!1;return!0}function Je(n,t){let e=n?_a(n):void 0,r=t?_a(t):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let s=0;s<e.length;s++)if(i=e[s],!_d(n[i],t[i]))return!1;return!0}function _a(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function _d(n,t){if(Array.isArray(n)&&Array.isArray(t)){if(n.length!==t.length)return!1;let e=[...n].sort(),r=[...t].sort();return e.every((i,s)=>r[s]===i)}else return n===t}function Ed(n){return n.length>0?n[n.length-1]:null}function mt(n){return Cu(n)?n:In(n)?z(Promise.resolve(n)):_(n)}var lm={exact:wd,subset:Cd},Dd={exact:dm,subset:hm,ignored:()=>!0};function dd(n,t,e){return lm[e.paths](n.root,t.root,e.matrixParams)&&Dd[e.queryParams](n.queryParams,t.queryParams)&&!(e.fragment==="exact"&&n.fragment!==t.fragment)}function dm(n,t){return Je(n,t)}function wd(n,t,e){if(!nn(n.segments,t.segments)||!Ji(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(let r in t.children)if(!n.children[r]||!wd(n.children[r],t.children[r],e))return!1;return!0}function hm(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>_d(n[e],t[e]))}function Cd(n,t,e){return Id(n,t,t.segments,e)}function Id(n,t,e,r){if(n.segments.length>e.length){let i=n.segments.slice(0,e.length);return!(!nn(i,e)||t.hasChildren()||!Ji(i,e,r))}else if(n.segments.length===e.length){if(!nn(n.segments,e)||!Ji(n.segments,e,r))return!1;for(let i in t.children)if(!n.children[i]||!Cd(n.children[i],t.children[i],r))return!1;return!0}else{let i=e.slice(0,n.segments.length),s=e.slice(n.segments.length);return!nn(n.segments,i)||!Ji(n.segments,i,r)||!n.children[A]?!1:Id(n.children[A],t,s,r)}}function Ji(n,t,e){return t.every((r,i)=>Dd[e](n[i].parameters,r.parameters))}var Qe=class{root;queryParams;fragment;_queryParamMap;constructor(t=new M([],{}),e={},r=null){this.root=t,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=sn(this.queryParams),this._queryParamMap}toString(){return gm.serialize(this)}},M=class{segments;children;parent=null;constructor(t,e){this.segments=t,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Xi(this)}},Rt=class{path;parameters;_parameterMap;constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap??=sn(this.parameters),this._parameterMap}toString(){return Ad(this)}};function fm(n,t){return nn(n,t)&&n.every((e,r)=>Je(e.parameters,t[r].parameters))}function nn(n,t){return n.length!==t.length?!1:n.every((e,r)=>e.path===t[r].path)}function pm(n,t){let e=[];return Object.entries(n.children).forEach(([r,i])=>{r===A&&(e=e.concat(t(i,r)))}),Object.entries(n.children).forEach(([r,i])=>{r!==A&&(e=e.concat(t(i,r)))}),e}var on=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:()=>new Ot,providedIn:"root"})}return n})(),Ot=class{parse(t){let e=new Da(t);return new Qe(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){let e=`/${Cr(t.root,!0)}`,r=ym(t.queryParams),i=typeof t.fragment=="string"?`#${mm(t.fragment)}`:"";return`${e}${r}${i}`}},gm=new Ot;function Xi(n){return n.segments.map(t=>Ad(t)).join("/")}function Cr(n,t){if(!n.hasChildren())return Xi(n);if(t){let e=n.children[A]?Cr(n.children[A],!1):"",r=[];return Object.entries(n.children).forEach(([i,s])=>{i!==A&&r.push(`${i}:${Cr(s,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=pm(n,(r,i)=>i===A?[Cr(n.children[A],!1)]:[`${i}:${Cr(r,!1)}`]);return Object.keys(n.children).length===1&&n.children[A]!=null?`${Xi(n)}/${e[0]}`:`${Xi(n)}/(${e.join("//")})`}}function bd(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Yi(n){return bd(n).replace(/%3B/gi,";")}function mm(n){return encodeURI(n)}function Ea(n){return bd(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Qi(n){return decodeURIComponent(n)}function hd(n){return Qi(n.replace(/\+/g,"%20"))}function Ad(n){return`${Ea(n.path)}${vm(n.parameters)}`}function vm(n){return Object.entries(n).map(([t,e])=>`;${Ea(t)}=${Ea(e)}`).join("")}function ym(n){let t=Object.entries(n).map(([e,r])=>Array.isArray(r)?r.map(i=>`${Yi(e)}=${Yi(i)}`).join("&"):`${Yi(e)}=${Yi(r)}`).filter(e=>e);return t.length?`?${t.join("&")}`:""}var _m=/^[^\/()?;#]+/;function pa(n){let t=n.match(_m);return t?t[0]:""}var Em=/^[^\/()?;=#]+/;function Dm(n){let t=n.match(Em);return t?t[0]:""}var wm=/^[^=?&#]+/;function Cm(n){let t=n.match(wm);return t?t[0]:""}var Im=/^[^&#]+/;function bm(n){let t=n.match(Im);return t?t[0]:""}var Da=class{url;remaining;constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new M([],{}):new M([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(r[A]=new M(t,e)),r}parseSegment(){let t=pa(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new E(4009,!1);return this.capture(t),new Rt(Qi(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let e=Dm(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=pa(this.remaining);i&&(r=i,this.capture(r))}t[Qi(e)]=Qi(r)}parseQueryParam(t){let e=Cm(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let o=bm(this.remaining);o&&(r=o,this.capture(r))}let i=hd(e),s=hd(r);if(t.hasOwnProperty(i)){let o=t[i];Array.isArray(o)||(o=[o],t[i]=o),o.push(s)}else t[i]=s}parseParens(t){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=pa(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new E(4010,!1);let s;r.indexOf(":")>-1?(s=r.slice(0,r.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=A);let o=this.parseChildren();e[s??A]=Object.keys(o).length===1&&o[A]?o[A]:new M([],o),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new E(4011,!1)}};function Td(n){return n.segments.length>0?new M([],{[A]:n}):n}function Sd(n){let t={};for(let[r,i]of Object.entries(n.children)){let s=Sd(i);if(r===A&&s.segments.length===0&&s.hasChildren())for(let[o,a]of Object.entries(s.children))t[o]=a;else(s.segments.length>0||s.hasChildren())&&(t[r]=s)}let e=new M(n.segments,t);return Am(e)}function Am(n){if(n.numberOfChildren===1&&n.children[A]){let t=n.children[A];return new M(n.segments.concat(t.segments),t.children)}return n}function Pt(n){return n instanceof Qe}function Rd(n,t,e=null,r=null){let i=Od(n);return Pd(i,t,e,r)}function Od(n){let t;function e(s){let o={};for(let c of s.children){let u=e(c);o[c.outlet]=u}let a=new M(s.url,o);return s===n&&(t=a),a}let r=e(n.root),i=Td(r);return t??i}function Pd(n,t,e,r){let i=n;for(;i.parent;)i=i.parent;if(t.length===0)return ga(i,i,i,e,r);let s=Tm(t);if(s.toRoot())return ga(i,i,new M([],{}),e,r);let o=Sm(s,i,n),a=o.processChildren?br(o.segmentGroup,o.index,s.commands):kd(o.segmentGroup,o.index,s.commands);return ga(i,o.segmentGroup,a,e,r)}function es(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function Tr(n){return typeof n=="object"&&n!=null&&n.outlets}function ga(n,t,e,r,i){let s={};r&&Object.entries(r).forEach(([c,u])=>{s[c]=Array.isArray(u)?u.map(d=>`${d}`):`${u}`});let o;n===t?o=e:o=Md(n,t,e);let a=Td(Sd(o));return new Qe(a,s,i)}function Md(n,t,e){let r={};return Object.entries(n.children).forEach(([i,s])=>{s===t?r[i]=e:r[i]=Md(s,t,e)}),new M(n.segments,r)}var ts=class{isAbsolute;numberOfDoubleDots;commands;constructor(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&es(r[0]))throw new E(4003,!1);let i=r.find(Tr);if(i&&i!==Ed(r))throw new E(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Tm(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new ts(!0,0,n);let t=0,e=!1,r=n.reduce((i,s,o)=>{if(typeof s=="object"&&s!=null){if(s.outlets){let a={};return Object.entries(s.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(s.segmentPath)return[...i,s.segmentPath]}return typeof s!="string"?[...i,s]:o===0?(s.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?t++:a!=""&&i.push(a))}),i):[...i,s]},[]);return new ts(e,t,r)}var On=class{segmentGroup;processChildren;index;constructor(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r}};function Sm(n,t,e){if(n.isAbsolute)return new On(t,!0,0);if(!e)return new On(t,!1,NaN);if(e.parent===null)return new On(e,!0,0);let r=es(n.commands[0])?0:1,i=e.segments.length-1+r;return Rm(e,i,n.numberOfDoubleDots)}function Rm(n,t,e){let r=n,i=t,s=e;for(;s>i;){if(s-=i,r=r.parent,!r)throw new E(4005,!1);i=r.segments.length}return new On(r,!1,i-s)}function Om(n){return Tr(n[0])?n[0].outlets:{[A]:n}}function kd(n,t,e){if(n??=new M([],{}),n.segments.length===0&&n.hasChildren())return br(n,t,e);let r=Pm(n,t,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<n.segments.length){let s=new M(n.segments.slice(0,r.pathIndex),{});return s.children[A]=new M(n.segments.slice(r.pathIndex),n.children),br(s,0,i)}else return r.match&&i.length===0?new M(n.segments,{}):r.match&&!n.hasChildren()?wa(n,t,e):r.match?br(n,0,i):wa(n,t,e)}function br(n,t,e){if(e.length===0)return new M(n.segments,{});{let r=Om(e),i={};if(Object.keys(r).some(s=>s!==A)&&n.children[A]&&n.numberOfChildren===1&&n.children[A].segments.length===0){let s=br(n.children[A],t,e);return new M(n.segments,s.children)}return Object.entries(r).forEach(([s,o])=>{typeof o=="string"&&(o=[o]),o!==null&&(i[s]=kd(n.children[s],t,o))}),Object.entries(n.children).forEach(([s,o])=>{r[s]===void 0&&(i[s]=o)}),new M(n.segments,i)}}function Pm(n,t,e){let r=0,i=t,s={match:!1,pathIndex:0,commandIndex:0};for(;i<n.segments.length;){if(r>=e.length)return s;let o=n.segments[i],a=e[r];if(Tr(a))break;let c=`${a}`,u=r<e.length-1?e[r+1]:null;if(i>0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!pd(c,u,o))return s;r+=2}else{if(!pd(c,{},o))return s;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function wa(n,t,e){let r=n.segments.slice(0,t),i=0;for(;i<e.length;){let s=e[i];if(Tr(s)){let c=Mm(s.outlets);return new M(r,c)}if(i===0&&es(e[0])){let c=n.segments[t];r.push(new Rt(c.path,fd(e[0]))),i++;continue}let o=Tr(s)?s.outlets[A]:`${s}`,a=i<e.length-1?e[i+1]:null;o&&a&&es(a)?(r.push(new Rt(o,fd(a))),i+=2):(r.push(new Rt(o,{})),i++)}return new M(r,{})}function Mm(n){let t={};return Object.entries(n).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(t[e]=wa(new M([],{}),0,r))}),t}function fd(n){let t={};return Object.entries(n).forEach(([e,r])=>t[e]=`${r}`),t}function pd(n,t,e){return n==e.path&&Je(t,e.parameters)}var Pn="imperative",Z=(function(n){return n[n.NavigationStart=0]="NavigationStart",n[n.NavigationEnd=1]="NavigationEnd",n[n.NavigationCancel=2]="NavigationCancel",n[n.NavigationError=3]="NavigationError",n[n.RoutesRecognized=4]="RoutesRecognized",n[n.ResolveStart=5]="ResolveStart",n[n.ResolveEnd=6]="ResolveEnd",n[n.GuardsCheckStart=7]="GuardsCheckStart",n[n.GuardsCheckEnd=8]="GuardsCheckEnd",n[n.RouteConfigLoadStart=9]="RouteConfigLoadStart",n[n.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",n[n.ChildActivationStart=11]="ChildActivationStart",n[n.ChildActivationEnd=12]="ChildActivationEnd",n[n.ActivationStart=13]="ActivationStart",n[n.ActivationEnd=14]="ActivationEnd",n[n.Scroll=15]="Scroll",n[n.NavigationSkipped=16]="NavigationSkipped",n})(Z||{}),Ee=class{id;url;constructor(t,e){this.id=t,this.url=e}},Mt=class extends Ee{type=Z.NavigationStart;navigationTrigger;restoredState;constructor(t,e,r="imperative",i=null){super(t,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},De=class extends Ee{urlAfterRedirects;type=Z.NavigationEnd;constructor(t,e,r){super(t,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},ce=(function(n){return n[n.Redirect=0]="Redirect",n[n.SupersededByNewNavigation=1]="SupersededByNewNavigation",n[n.NoDataFromResolver=2]="NoDataFromResolver",n[n.GuardRejected=3]="GuardRejected",n[n.Aborted=4]="Aborted",n})(ce||{}),kn=(function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n})(kn||{}),Xe=class extends Ee{reason;code;type=Z.NavigationCancel;constructor(t,e,r,i){super(t,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},et=class extends Ee{reason;code;type=Z.NavigationSkipped;constructor(t,e,r,i){super(t,e),this.reason=r,this.code=i}},Nn=class extends Ee{error;target;type=Z.NavigationError;constructor(t,e,r,i){super(t,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Sr=class extends Ee{urlAfterRedirects;state;type=Z.RoutesRecognized;constructor(t,e,r,i){super(t,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ns=class extends Ee{urlAfterRedirects;state;type=Z.GuardsCheckStart;constructor(t,e,r,i){super(t,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},rs=class extends Ee{urlAfterRedirects;state;shouldActivate;type=Z.GuardsCheckEnd;constructor(t,e,r,i,s){super(t,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=s}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},is=class extends Ee{urlAfterRedirects;state;type=Z.ResolveStart;constructor(t,e,r,i){super(t,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ss=class extends Ee{urlAfterRedirects;state;type=Z.ResolveEnd;constructor(t,e,r,i){super(t,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},os=class{route;type=Z.RouteConfigLoadStart;constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},as=class{route;type=Z.RouteConfigLoadEnd;constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},cs=class{snapshot;type=Z.ChildActivationStart;constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},us=class{snapshot;type=Z.ChildActivationEnd;constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ls=class{snapshot;type=Z.ActivationStart;constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ds=class{snapshot;type=Z.ActivationEnd;constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Fn=class{routerEvent;position;anchor;type=Z.Scroll;constructor(t,e,r){this.routerEvent=t,this.position=e,this.anchor=r}toString(){let t=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${t}')`}},Rr=class{},Ln=class{url;navigationBehaviorOptions;constructor(t,e){this.url=t,this.navigationBehaviorOptions=e}};function km(n){return!(n instanceof Rr)&&!(n instanceof Ln)}function Nm(n,t){return n.providers&&!n._injector&&(n._injector=Ei(n.providers,t,`Route: ${n.path}`)),n._injector??t}function $e(n){return n.outlet||A}function Fm(n,t){let e=n.filter(r=>$e(r)===t);return e.push(...n.filter(r=>$e(r)!==t)),e}function Vn(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let t=n.parent;t;t=t.parent){let e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var hs=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return Vn(this.route?.snapshot)??this.rootInjector}constructor(t){this.rootInjector=t,this.children=new an(this.rootInjector)}},an=(()=>{class n{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new hs(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||n)(w(Le))};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),fs=class{_root;constructor(t){this._root=t}get root(){return this._root.value}parent(t){let e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){let e=Ca(t,this._root);return e?e.children.map(r=>r.value):[]}firstChild(t){let e=Ca(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){let e=Ia(t,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==t)}pathFromRoot(t){return Ia(t,this._root).map(e=>e.value)}};function Ca(n,t){if(n===t.value)return t;for(let e of t.children){let r=Ca(n,e);if(r)return r}return null}function Ia(n,t){if(n===t.value)return[t];for(let e of t.children){let r=Ia(n,e);if(r.length)return r.unshift(t),r}return[]}var _e=class{value;children;constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}};function Rn(n){let t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}var Or=class extends fs{snapshot;constructor(t,e){super(t),this.snapshot=e,Ma(this,t)}toString(){return this.snapshot.toString()}};function Nd(n){let t=Lm(n),e=new ue([new Rt("",{})]),r=new ue({}),i=new ue({}),s=new ue({}),o=new ue(""),a=new Me(e,r,s,o,i,A,n,t.root);return a.snapshot=t.root,new Or(new _e(a,[]),t)}function Lm(n){let t={},e={},r={},s=new rn([],t,r,"",e,A,n,null,{});return new Pr("",new _e(s,[]))}var Me=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(t,e,r,i,s,o,a,c){this.urlSubject=t,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=s,this.outlet=o,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(R(u=>u[Fr]))??_(void 0),this.url=t,this.params=e,this.queryParams=r,this.fragment=i,this.data=s}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(R(t=>sn(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(R(t=>sn(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function ps(n,t,e="emptyOnly"){let r,{routeConfig:i}=n;return t!==null&&(e==="always"||i?.path===""||!t.component&&!t.routeConfig?.loadComponent)?r={params:g(g({},t.params),n.params),data:g(g({},t.data),n.data),resolve:g(g(g(g({},n.data),t.data),i?.data),n._resolvedData)}:r={params:g({},n.params),data:g({},n.data),resolve:g(g({},n.data),n._resolvedData??{})},i&&Ld(i)&&(r.resolve[Fr]=i.title),r}var rn=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Fr]}constructor(t,e,r,i,s,o,a,c,u){this.url=t,this.params=e,this.queryParams=r,this.fragment=i,this.data=s,this.outlet=o,this.component=a,this.routeConfig=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=sn(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=sn(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${e}')`}},Pr=class extends fs{url;constructor(t,e){super(e),this.url=t,Ma(this,e)}toString(){return Fd(this._root)}};function Ma(n,t){t.value._routerState=n,t.children.forEach(e=>Ma(n,e))}function Fd(n){let t=n.children.length>0?` { ${n.children.map(Fd).join(", ")} } `:"";return`${n.value}${t}`}function ma(n){if(n.snapshot){let t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Je(t.queryParams,e.queryParams)||n.queryParamsSubject.next(e.queryParams),t.fragment!==e.fragment&&n.fragmentSubject.next(e.fragment),Je(t.params,e.params)||n.paramsSubject.next(e.params),um(t.url,e.url)||n.urlSubject.next(e.url),Je(t.data,e.data)||n.dataSubject.next(e.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function ba(n,t){let e=Je(n.params,t.params)&&fm(n.url,t.url),r=!n.parent!=!t.parent;return e&&!r&&(!n.parent||ba(n.parent,t.parent))}function Ld(n){return typeof n.title=="string"||n.title===null}var xd=new C(""),ka=(()=>{class n{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=A;activateEvents=new ie;deactivateEvents=new ie;attachEvents=new ie;detachEvents=new ie;routerOutletData=cl();parentContexts=p(an);location=p(Jt);changeDetector=p(Ke);inputBinder=p(Lr,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new E(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new E(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new E(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new E(4013,!1);this._activatedRoute=e;let i=this.location,o=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new Aa(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(o,{index:i.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||n)};static \u0275dir=O({type:n,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[de]})}return n})(),Aa=class{route;childContexts;parent;outletData;constructor(t,e,r,i){this.route=t,this.childContexts=e,this.parent=r,this.outletData=i}get(t,e){return t===Me?this.route:t===an?this.childContexts:t===xd?this.outletData:this.parent.get(t,e)}},Lr=new C(""),Na=(()=>{class n{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,i=vi([r.queryParams,r.params,r.data]).pipe(J(([s,o,a],c)=>(a=g(g(g({},s),o),a),c===0?_(a):Promise.resolve(a)))).subscribe(s=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let o=hl(r.component);if(!o){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of o.inputs)e.activatedComponentRef.setInput(a,s[a])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})(),Fa=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275cmp=rr({type:n,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Xt(0,"router-outlet")},dependencies:[ka],encapsulation:2})}return n})();function La(n){let t=n.children&&n.children.map(La),e=t?S(g({},n),{children:t}):g({},n);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==A&&(e.component=Fa),e}function xm(n,t,e){let r=Mr(n,t._root,e?e._root:void 0);return new Or(r,t)}function Mr(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=t.value;let i=Um(n,t,e);return new _e(r,i)}else{if(n.shouldAttach(t.value)){let s=n.retrieve(t.value);if(s!==null){let o=s.route;return o.value._futureSnapshot=t.value,o.children=t.children.map(a=>Mr(n,a)),o}}let r=Vm(t.value),i=t.children.map(s=>Mr(n,s));return new _e(r,i)}}function Um(n,t,e){return t.children.map(r=>{for(let i of e.children)if(n.shouldReuseRoute(r.value,i.value.snapshot))return Mr(n,r,i);return Mr(n,r)})}function Vm(n){return new Me(new ue(n.url),new ue(n.params),new ue(n.queryParams),new ue(n.fragment),new ue(n.data),n.outlet,n.component,n)}var xn=class{redirectTo;navigationBehaviorOptions;constructor(t,e){this.redirectTo=t,this.navigationBehaviorOptions=e}},Ud="ngNavigationCancelingError";function gs(n,t){let{redirectTo:e,navigationBehaviorOptions:r}=Pt(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,i=Vd(!1,ce.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function Vd(n,t){let e=new Error(`NavigationCancelingError: ${n||""}`);return e[Ud]=!0,e.cancellationCode=t,e}function Bm(n){return Bd(n)&&Pt(n.url)}function Bd(n){return!!n&&n[Ud]}var jm=(n,t,e,r)=>R(i=>(new Ta(t,i.targetRouterState,i.currentRouterState,e,r).activate(n),i)),Ta=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(t,e,r,i,s){this.routeReuseStrategy=t,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=s}activate(t){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,t),ma(this.futureState.root),this.activateChildRoutes(e,r,t)}deactivateChildRoutes(t,e,r){let i=Rn(e);t.children.forEach(s=>{let o=s.value.outlet;this.deactivateRoutes(s,i[o],r),delete i[o]}),Object.values(i).forEach(s=>{this.deactivateRouteAndItsChildren(s,r)})}deactivateRoutes(t,e,r){let i=t.value,s=e?e.value:null;if(i===s)if(i.component){let o=r.getContext(i.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,r);else s&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){let r=e.getContext(t.value.outlet),i=r&&t.value.component?r.children:e,s=Rn(t);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,i);if(r&&r.outlet){let o=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:o,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){let r=e.getContext(t.value.outlet),i=r&&t.value.component?r.children:e,s=Rn(t);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(t,e,r){let i=Rn(e);t.children.forEach(s=>{this.activateRoutes(s,i[s.value.outlet],r),this.forwardEvent(new ds(s.value.snapshot))}),t.children.length&&this.forwardEvent(new us(t.value.snapshot))}activateRoutes(t,e,r){let i=t.value,s=e?e.value:null;if(ma(i),i===s)if(i.component){let o=r.getOrCreateContext(i.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,r);else if(i.component){let o=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),ma(a.route.value),this.activateChildRoutes(t,null,o.children)}else o.attachRef=null,o.route=i,o.outlet&&o.outlet.activateWith(i,o.injector),this.activateChildRoutes(t,null,o.children)}else this.activateChildRoutes(t,null,r)}},ms=class{path;route;constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},Mn=class{component;route;constructor(t,e){this.component=t,this.route=e}};function $m(n,t,e){let r=n._root,i=t?t._root:null;return Ir(r,i,e,[r.value])}function Hm(n){let t=n.routeConfig?n.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:n,guards:t}}function Bn(n,t){let e=Symbol(),r=t.get(n,e);return r===e?typeof n=="function"&&!ku(n)?n:t.get(n):r}function Ir(n,t,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let s=Rn(t);return n.children.forEach(o=>{zm(o,s[o.value.outlet],e,r.concat([o.value]),i),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,a])=>Ar(a,e.getContext(o),i)),i}function zm(n,t,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let s=n.value,o=t?t.value:null,a=e?e.getContext(n.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){let c=Wm(o,s,s.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new ms(r)):(s.data=o.data,s._resolvedData=o._resolvedData),s.component?Ir(n,t,a?a.children:null,r,i):Ir(n,t,e,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new Mn(a.outlet.component,o))}else o&&Ar(t,a,i),i.canActivateChecks.push(new ms(r)),s.component?Ir(n,null,a?a.children:null,r,i):Ir(n,null,e,r,i);return i}function Wm(n,t,e){if(typeof e=="function")return e(n,t);switch(e){case"pathParamsChange":return!nn(n.url,t.url);case"pathParamsOrQueryParamsChange":return!nn(n.url,t.url)||!Je(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ba(n,t)||!Je(n.queryParams,t.queryParams);case"paramsChange":default:return!ba(n,t)}}function Ar(n,t,e){let r=Rn(n),i=n.value;Object.entries(r).forEach(([s,o])=>{i.component?t?Ar(o,t.children.getContext(s),e):Ar(o,null,e):Ar(o,t,e)}),i.component?t&&t.outlet&&t.outlet.isActivated?e.canDeactivateChecks.push(new Mn(t.outlet.component,i)):e.canDeactivateChecks.push(new Mn(null,i)):e.canDeactivateChecks.push(new Mn(null,i))}function xr(n){return typeof n=="function"}function Gm(n){return typeof n=="boolean"}function qm(n){return n&&xr(n.canLoad)}function Km(n){return n&&xr(n.canActivate)}function Ym(n){return n&&xr(n.canActivateChild)}function Zm(n){return n&&xr(n.canDeactivate)}function Jm(n){return n&&xr(n.canMatch)}function jd(n){return n instanceof Iu||n?.name==="EmptyError"}var Zi=Symbol("INITIAL_VALUE");function Un(){return J(n=>vi(n.map(t=>t.pipe(En(1),Pu(Zi)))).pipe(R(t=>{for(let e of t)if(e!==!0){if(e===Zi)return Zi;if(e===!1||Xm(e))return e}return!0}),Ne(t=>t!==Zi),En(1)))}function Xm(n){return Pt(n)||n instanceof xn}function Qm(n,t){return le(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return o.length===0&&s.length===0?_(S(g({},e),{guardsResult:!0})):ev(o,r,i,n).pipe(le(a=>a&&Gm(a)?tv(r,s,n,t):_(a)),R(a=>S(g({},e),{guardsResult:a})))})}function ev(n,t,e,r){return z(n).pipe(le(i=>ov(i.component,i.route,e,t,r)),Ct(i=>i!==!0,!0))}function tv(n,t,e,r){return z(t).pipe(ot(i=>Au(rv(i.route.parent,r),nv(i.route,r),sv(n,i.path,e),iv(n,i.route,e))),Ct(i=>i!==!0,!0))}function nv(n,t){return n!==null&&t&&t(new ls(n)),_(!0)}function rv(n,t){return n!==null&&t&&t(new cs(n)),_(!0)}function iv(n,t,e){let r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||r.length===0)return _(!0);let i=r.map(s=>yi(()=>{let o=Vn(t)??e,a=Bn(s,o),c=Km(a)?a.canActivate(t,n):X(o,()=>a(t,n));return mt(c).pipe(Ct())}));return _(i).pipe(Un())}function sv(n,t,e){let r=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>Hm(o)).filter(o=>o!==null).map(o=>yi(()=>{let a=o.guards.map(c=>{let u=Vn(o.node)??e,d=Bn(c,u),f=Ym(d)?d.canActivateChild(r,n):X(u,()=>d(r,n));return mt(f).pipe(Ct())});return _(a).pipe(Un())}));return _(s).pipe(Un())}function ov(n,t,e,r,i){let s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!s||s.length===0)return _(!0);let o=s.map(a=>{let c=Vn(t)??i,u=Bn(a,c),d=Zm(u)?u.canDeactivate(n,t,e,r):X(c,()=>u(n,t,e,r));return mt(d).pipe(Ct())});return _(o).pipe(Un())}function av(n,t,e,r){let i=t.canLoad;if(i===void 0||i.length===0)return _(!0);let s=i.map(o=>{let a=Bn(o,n),c=qm(a)?a.canLoad(t,e):X(n,()=>a(t,e));return mt(c)});return _(s).pipe(Un(),$d(r))}function $d(n){return _u(j(t=>{if(typeof t!="boolean")throw gs(n,t)}),R(t=>t===!0))}function cv(n,t,e,r){let i=t.canMatch;if(!i||i.length===0)return _(!0);let s=i.map(o=>{let a=Bn(o,n),c=Jm(a)?a.canMatch(t,e):X(n,()=>a(t,e));return mt(c)});return _(s).pipe(Un(),$d(r))}var kr=class{segmentGroup;constructor(t){this.segmentGroup=t||null}},Nr=class extends Error{urlTree;constructor(t){super(),this.urlTree=t}};function Sn(n){return zt(new kr(n))}function uv(n){return zt(new E(4e3,!1))}function lv(n){return zt(Vd(!1,ce.GuardRejected))}var Sa=class{urlSerializer;urlTree;constructor(t,e){this.urlSerializer=t,this.urlTree=e}lineralizeSegments(t,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return _(r);if(i.numberOfChildren>1||!i.children[A])return uv(`${t.redirectTo}`);i=i.children[A]}}applyRedirectCommands(t,e,r,i,s){return dv(e,i,s).pipe(R(o=>{if(o instanceof Qe)throw new Nr(o);let a=this.applyRedirectCreateUrlTree(o,this.urlSerializer.parse(o),t,r);if(o[0]==="/")throw new Nr(a);return a}))}applyRedirectCreateUrlTree(t,e,r,i){let s=this.createSegmentGroup(t,e.root,r,i);return new Qe(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){let r={};return Object.entries(t).forEach(([i,s])=>{if(typeof s=="string"&&s[0]===":"){let a=s.substring(1);r[i]=e[a]}else r[i]=s}),r}createSegmentGroup(t,e,r,i){let s=this.createSegments(t,e.segments,r,i),o={};return Object.entries(e.children).forEach(([a,c])=>{o[a]=this.createSegmentGroup(t,c,r,i)}),new M(s,o)}createSegments(t,e,r,i){return e.map(s=>s.path[0]===":"?this.findPosParam(t,s,i):this.findOrReturn(s,r))}findPosParam(t,e,r){let i=r[e.path.substring(1)];if(!i)throw new E(4001,!1);return i}findOrReturn(t,e){let r=0;for(let i of e){if(i.path===t.path)return e.splice(r),i;r++}return t}};function dv(n,t,e){if(typeof n=="string")return _(n);let r=n,{queryParams:i,fragment:s,routeConfig:o,url:a,outlet:c,params:u,data:d,title:f}=t;return mt(X(e,()=>r({params:u,data:d,queryParams:i,fragment:s,routeConfig:o,url:a,outlet:c,title:f})))}var Ra={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function hv(n,t,e,r,i){let s=Hd(n,t,e);return s.matched?(r=Nm(t,r),cv(r,t,e,i).pipe(R(o=>o===!0?s:g({},Ra)))):_(s)}function Hd(n,t,e){if(t.path==="**")return fv(e);if(t.path==="")return t.pathMatch==="full"&&(n.hasChildren()||e.length>0)?g({},Ra):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(t.matcher||yd)(e,n,t);if(!i)return g({},Ra);let s={};Object.entries(i.posParams??{}).forEach(([a,c])=>{s[a]=c.path});let o=i.consumed.length>0?g(g({},s),i.consumed[i.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:o,positionalParamSegments:i.posParams??{}}}function fv(n){return{matched:!0,parameters:n.length>0?Ed(n).parameters:{},consumedSegments:n,remainingSegments:[],positionalParamSegments:{}}}function gd(n,t,e,r){return e.length>0&&mv(n,e,r)?{segmentGroup:new M(t,gv(r,new M(e,n.children))),slicedSegments:[]}:e.length===0&&vv(n,e,r)?{segmentGroup:new M(n.segments,pv(n,e,r,n.children)),slicedSegments:e}:{segmentGroup:new M(n.segments,n.children),slicedSegments:e}}function pv(n,t,e,r){let i={};for(let s of e)if(ys(n,t,s)&&!r[$e(s)]){let o=new M([],{});i[$e(s)]=o}return g(g({},r),i)}function gv(n,t){let e={};e[A]=t;for(let r of n)if(r.path===""&&$e(r)!==A){let i=new M([],{});e[$e(r)]=i}return e}function mv(n,t,e){return e.some(r=>ys(n,t,r)&&$e(r)!==A)}function vv(n,t,e){return e.some(r=>ys(n,t,r))}function ys(n,t,e){return(n.hasChildren()||t.length>0)&&e.pathMatch==="full"?!1:e.path===""}function yv(n,t,e){return t.length===0&&!n.children[e]}var Oa=class{};function _v(n,t,e,r,i,s,o="emptyOnly"){return new Pa(n,t,e,r,i,o,s).recognize()}var Ev=31,Pa=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(t,e,r,i,s,o,a){this.injector=t,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=a,this.applyRedirects=new Sa(this.urlSerializer,this.urlTree)}noMatchError(t){return new E(4002,`'${t.segmentGroup}'`)}recognize(){let t=gd(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(R(({children:e,rootSnapshot:r})=>{let i=new _e(r,e),s=new Pr("",i),o=Rd(r,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(o),{state:s,tree:o}}))}match(t){let e=new rn([],Object.freeze({}),Object.freeze(g({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),A,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,A,e).pipe(R(r=>({children:r,rootSnapshot:e})),ee(r=>{if(r instanceof Nr)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof kr?this.noMatchError(r):r}))}processSegmentGroup(t,e,r,i,s){return r.segments.length===0&&r.hasChildren()?this.processChildren(t,e,r,s):this.processSegment(t,e,r,r.segments,i,!0,s).pipe(R(o=>o instanceof _e?[o]:[]))}processChildren(t,e,r,i){let s=[];for(let o of Object.keys(r.children))o==="primary"?s.unshift(o):s.push(o);return z(s).pipe(ot(o=>{let a=r.children[o],c=Fm(e,o);return this.processSegmentGroup(t,c,a,o,i)}),Ru((o,a)=>(o.push(...a),o)),_o(null),Su(),le(o=>{if(o===null)return Sn(r);let a=zd(o);return Dv(a),_(a)}))}processSegment(t,e,r,i,s,o,a){return z(e).pipe(ot(c=>this.processSegmentAgainstRoute(c._injector??t,e,c,r,i,s,o,a).pipe(ee(u=>{if(u instanceof kr)return _(null);throw u}))),Ct(c=>!!c),ee(c=>{if(jd(c))return yv(r,i,s)?_(new Oa):Sn(r);throw c}))}processSegmentAgainstRoute(t,e,r,i,s,o,a,c){return $e(r)!==o&&(o===A||!ys(i,s,r))?Sn(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(t,i,r,s,o,c):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,i,e,r,s,o,c):Sn(i)}expandSegmentAgainstRouteUsingRedirect(t,e,r,i,s,o,a){let{matched:c,parameters:u,consumedSegments:d,positionalParamSegments:f,remainingSegments:h}=Hd(e,i,s);if(!c)return Sn(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Ev&&(this.allowRedirects=!1));let m=new rn(s,u,Object.freeze(g({},this.urlTree.queryParams)),this.urlTree.fragment,md(i),$e(i),i.component??i._loadedComponent??null,i,vd(i)),I=ps(m,a,this.paramsInheritanceStrategy);return m.params=Object.freeze(I.params),m.data=Object.freeze(I.data),this.applyRedirects.applyRedirectCommands(d,i.redirectTo,f,m,t).pipe(J(D=>this.applyRedirects.lineralizeSegments(i,D)),le(D=>this.processSegment(t,r,e,D.concat(h),o,!1,a)))}matchSegmentAgainstRoute(t,e,r,i,s,o){let a=hv(e,r,i,t,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(J(c=>c.matched?(t=r._injector??t,this.getChildConfig(t,r,i).pipe(J(({routes:u})=>{let d=r._loadedInjector??t,{parameters:f,consumedSegments:h,remainingSegments:m}=c,I=new rn(h,f,Object.freeze(g({},this.urlTree.queryParams)),this.urlTree.fragment,md(r),$e(r),r.component??r._loadedComponent??null,r,vd(r)),L=ps(I,o,this.paramsInheritanceStrategy);I.params=Object.freeze(L.params),I.data=Object.freeze(L.data);let{segmentGroup:D,slicedSegments:T}=gd(e,h,m,u);if(T.length===0&&D.hasChildren())return this.processChildren(d,u,D,I).pipe(R(H=>new _e(I,H)));if(u.length===0&&T.length===0)return _(new _e(I,[]));let k=$e(r)===s;return this.processSegment(d,u,D,T,k?A:s,!0,I).pipe(R(H=>new _e(I,H instanceof _e?[H]:[])))}))):Sn(e)))}getChildConfig(t,e,r){return e.children?_({routes:e.children,injector:t}):e.loadChildren?e._loadedRoutes!==void 0?_({routes:e._loadedRoutes,injector:e._loadedInjector}):av(t,e,r,this.urlSerializer).pipe(le(i=>i?this.configLoader.loadChildren(t,e).pipe(j(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):lv(e))):_({routes:[],injector:t})}};function Dv(n){n.sort((t,e)=>t.value.outlet===A?-1:e.value.outlet===A?1:t.value.outlet.localeCompare(e.value.outlet))}function wv(n){let t=n.value.routeConfig;return t&&t.path===""}function zd(n){let t=[],e=new Set;for(let r of n){if(!wv(r)){t.push(r);continue}let i=t.find(s=>r.value.routeConfig===s.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):t.push(r)}for(let r of e){let i=zd(r.children);t.push(new _e(r.value,i))}return t.filter(r=>!e.has(r))}function md(n){return n.data||{}}function vd(n){return n.resolve||{}}function Cv(n,t,e,r,i,s){return le(o=>_v(n,t,e,r,o.extractedUrl,i,s).pipe(R(({state:a,tree:c})=>S(g({},o),{targetSnapshot:a,urlAfterRedirects:c}))))}function Iv(n,t){return le(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return _(e);let s=new Set(i.map(c=>c.route)),o=new Set;for(let c of s)if(!o.has(c))for(let u of Wd(c))o.add(u);let a=0;return z(o).pipe(ot(c=>s.has(c)?bv(c,r,n,t):(c.data=ps(c,c.parent,n).resolve,_(void 0))),j(()=>a++),Eo(1),le(c=>a===o.size?_(e):st))})}function Wd(n){let t=n.children.map(e=>Wd(e)).flat();return[n,...t]}function bv(n,t,e,r){let i=n.routeConfig,s=n._resolve;return i?.title!==void 0&&!Ld(i)&&(s[Fr]=i.title),yi(()=>(n.data=ps(n,n.parent,e).resolve,Av(s,n,t,r).pipe(R(o=>(n._resolvedData=o,n.data=g(g({},n.data),o),null)))))}function Av(n,t,e,r){let i=_a(n);if(i.length===0)return _({});let s={};return z(i).pipe(le(o=>Tv(n[o],t,e,r).pipe(Ct(),j(a=>{if(a instanceof xn)throw gs(new Ot,a);s[o]=a}))),Eo(1),R(()=>s),ee(o=>jd(o)?st:zt(o)))}function Tv(n,t,e,r){let i=Vn(t)??r,s=Bn(n,i),o=s.resolve?s.resolve(t,e):X(i,()=>s(t,e));return mt(o)}function va(n){return J(t=>{let e=n(t);return e?z(e).pipe(R(()=>t)):_(t)})}var xa=(()=>{class n{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(s=>s.outlet===A);return r}getResolvedTitleForRoute(e){return e.data[Fr]}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:()=>p(Gd),providedIn:"root"})}return n})(),Gd=(()=>{class n extends xa{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||n)(w(ud))};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),kt=new C("",{providedIn:"root",factory:()=>({})}),cn=new C(""),_s=(()=>{class n{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=p(sl);loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return _(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=mt(X(e,()=>r.loadComponent())).pipe(R(Kd),J(Yd),j(o=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=o}),Gt(()=>{this.componentLoaders.delete(r)})),s=new mo(i,()=>new B).pipe(go());return this.componentLoaders.set(r,s),s}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return _({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let s=qd(r,this.compiler,e,this.onLoadEndListener).pipe(Gt(()=>{this.childrenLoaders.delete(r)})),o=new mo(s,()=>new B).pipe(go());return this.childrenLoaders.set(r,o),o}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function qd(n,t,e,r){return mt(X(e,()=>n.loadChildren())).pipe(R(Kd),J(Yd),le(i=>i instanceof Xu||Array.isArray(i)?_(i):z(t.compileModuleAsync(i))),R(i=>{r&&r(n);let s,o,a=!1;return Array.isArray(i)?(o=i,a=!0):(s=i.create(e).injector,o=s.get(cn,[],{optional:!0,self:!0}).flat()),{routes:o.map(La),injector:s}}))}function Sv(n){return n&&typeof n=="object"&&"default"in n}function Kd(n){return Sv(n)?n.default:n}function Yd(n){return _(n)}var Es=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:()=>p(Rv),providedIn:"root"})}return n})(),Rv=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Ua=new C(""),Va=new C("");function Zd(n,t,e){let r=n.get(Va),i=n.get(V);if(!i.startViewTransition||r.skipNextTransition)return r.skipNextTransition=!1,new Promise(u=>setTimeout(u));let s,o=new Promise(u=>{s=u}),a=i.startViewTransition(()=>(s(),Ov(n)));a.ready.catch(u=>{});let{onViewTransitionCreated:c}=r;return c&&X(n,()=>c({transition:a,from:t,to:e})),o}function Ov(n){return new Promise(t=>{_i({read:()=>setTimeout(t)},{injector:n})})}var Ba=new C(""),Ds=(()=>{class n{currentNavigation=Q(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new B;transitionAbortWithErrorSubject=new B;configLoader=p(_s);environmentInjector=p(Le);destroyRef=p(xe);urlSerializer=p(on);rootContexts=p(an);location=p(Tt);inputBindingEnabled=p(Lr,{optional:!0})!==null;titleStrategy=p(xa);options=p(kt,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=p(Es);createViewTransition=p(Ua,{optional:!0});navigationErrorHandler=p(Ba,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>_(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new os(i)),r=i=>this.events.next(new as(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;$(()=>{this.transitions?.next(S(g({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:r}))})}setupNavigations(e){return this.transitions=new ue(null),this.transitions.pipe(Ne(r=>r!==null),J(r=>{let i=!1;return _(r).pipe(J(s=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",ce.SupersededByNewNavigation),st;this.currentTransition=r,this.currentNavigation.set({id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,targetBrowserUrl:typeof s.extras.browserUrl=="string"?this.urlSerializer.parse(s.extras.browserUrl):s.extras.browserUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?S(g({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>s.abortController.abort()});let o=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=s.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!o&&a!=="reload")return this.events.next(new et(s.id,this.urlSerializer.serialize(s.rawUrl),"",kn.IgnoredSameUrlNavigation)),s.resolve(!1),st;if(this.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return _(s).pipe(J(c=>(this.events.next(new Mt(c.id,this.urlSerializer.serialize(c.extractedUrl),c.source,c.restoredState)),c.id!==this.navigationId?st:Promise.resolve(c))),Cv(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),j(c=>{r.targetSnapshot=c.targetSnapshot,r.urlAfterRedirects=c.urlAfterRedirects,this.currentNavigation.update(d=>(d.finalUrl=c.urlAfterRedirects,d));let u=new Sr(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(u)}));if(o&&this.urlHandlingStrategy.shouldProcessUrl(s.currentRawUrl)){let{id:c,extractedUrl:u,source:d,restoredState:f,extras:h}=s,m=new Mt(c,this.urlSerializer.serialize(u),d,f);this.events.next(m);let I=Nd(this.rootComponentType).snapshot;return this.currentTransition=r=S(g({},s),{targetSnapshot:I,urlAfterRedirects:u,extras:S(g({},h),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(L=>(L.finalUrl=u,L)),_(r)}else return this.events.next(new et(s.id,this.urlSerializer.serialize(s.extractedUrl),"",kn.IgnoredByUrlHandlingStrategy)),s.resolve(!1),st}),j(s=>{let o=new ns(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(o)}),R(s=>(this.currentTransition=r=S(g({},s),{guards:$m(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),r)),Qm(this.environmentInjector,s=>this.events.next(s)),j(s=>{if(r.guardsResult=s.guardsResult,s.guardsResult&&typeof s.guardsResult!="boolean")throw gs(this.urlSerializer,s.guardsResult);let o=new rs(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(o)}),Ne(s=>s.guardsResult?!0:(this.cancelNavigationTransition(s,"",ce.GuardRejected),!1)),va(s=>{if(s.guards.canActivateChecks.length!==0)return _(s).pipe(j(o=>{let a=new is(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}),J(o=>{let a=!1;return _(o).pipe(Iv(this.paramsInheritanceStrategy,this.environmentInjector),j({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(o,"",ce.NoDataFromResolver)}}))}),j(o=>{let a=new ss(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(a)}))}),va(s=>{let o=a=>{let c=[];if(a.routeConfig?.loadComponent){let u=Vn(a)??this.environmentInjector;c.push(this.configLoader.loadComponent(u,a.routeConfig).pipe(j(d=>{a.component=d}),R(()=>{})))}for(let u of a.children)c.push(...o(u));return c};return vi(o(s.targetSnapshot.root)).pipe(_o(null),En(1))}),va(()=>this.afterPreactivation()),J(()=>{let{currentSnapshot:s,targetSnapshot:o}=r,a=this.createViewTransition?.(this.environmentInjector,s.root,o.root);return a?z(a).pipe(R(()=>r)):_(r)}),R(s=>{let o=xm(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return this.currentTransition=r=S(g({},s),{targetRouterState:o}),this.currentNavigation.update(a=>(a.targetRouterState=o,a)),r}),j(()=>{this.events.next(new Rr)}),jm(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s),this.inputBindingEnabled),En(1),tr(new Ie(s=>{let o=r.abortController.signal,a=()=>s.next();return o.addEventListener("abort",a),()=>o.removeEventListener("abort",a)}).pipe(Ne(()=>!i&&!r.targetRouterState),j(()=>{this.cancelNavigationTransition(r,r.abortController.signal.reason+"",ce.Aborted)}))),j({next:s=>{i=!0,this.lastSuccessfulNavigation=$(this.currentNavigation),this.events.next(new De(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects))),this.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{i=!0}}),tr(this.transitionAbortWithErrorSubject.pipe(j(s=>{throw s}))),Gt(()=>{i||this.cancelNavigationTransition(r,"",ce.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),ee(s=>{if(this.destroyed)return r.resolve(!1),st;if(i=!0,Bd(s))this.events.next(new Xe(r.id,this.urlSerializer.serialize(r.extractedUrl),s.message,s.cancellationCode)),Bm(s)?this.events.next(new Ln(s.url,s.navigationBehaviorOptions)):r.resolve(!1);else{let o=new Nn(r.id,this.urlSerializer.serialize(r.extractedUrl),s,r.targetSnapshot??void 0);try{let a=X(this.environmentInjector,()=>this.navigationErrorHandler?.(o));if(a instanceof xn){let{message:c,cancellationCode:u}=gs(this.urlSerializer,a);this.events.next(new Xe(r.id,this.urlSerializer.serialize(r.extractedUrl),c,u)),this.events.next(new Ln(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(o),s}catch(a){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(a)}}return st}))}))}cancelNavigationTransition(e,r,i){let s=new Xe(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(s),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=$(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Pv(n){return n!==Pn}var Jd=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:()=>p(Mv),providedIn:"root"})}return n})(),vs=class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}},Mv=(()=>{class n extends vs{static \u0275fac=(()=>{let e;return function(i){return(e||(e=at(n)))(i||n)}})();static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Xd=(()=>{class n{urlSerializer=p(on);options=p(kt,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=p(Tt);urlHandlingStrategy=p(Es);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new Qe;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let s=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,o=i??s;return o instanceof Qe?this.urlSerializer.serialize(o):o}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=Nd(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:()=>p(kv),providedIn:"root"})}return n})(),kv=(()=>{class n extends Xd{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate")})})}handleRouterEvent(e,r){e instanceof Mt?this.updateStateMemento():e instanceof et?this.commitTransition(r):e instanceof Sr?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Rr?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Xe&&e.code!==ce.SupersededByNewNavigation&&e.code!==ce.Redirect?this.restoreHistory(r):e instanceof Nn?this.restoreHistory(r,!0):e instanceof De&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:s,state:o}=r;if(this.location.isCurrentPathEqualTo(e)||s){let a=this.browserPageId,c=g(g({},o),this.generateNgRouterState(i,a));this.location.replaceState(e,"",c)}else{let a=g(g({},o),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,s=this.currentPageId-i;s!==0?this.location.historyGo(s):this.getCurrentUrlTree()===e.finalUrl&&s===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=at(n)))(i||n)}})();static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ws(n,t){n.events.pipe(Ne(e=>e instanceof De||e instanceof Xe||e instanceof Nn||e instanceof et),R(e=>e instanceof De||e instanceof et?0:(e instanceof Xe?e.code===ce.Redirect||e.code===ce.SupersededByNewNavigation:!1)?2:1),Ne(e=>e!==2),En(1)).subscribe(()=>{t()})}var Nv={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Fv={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},we=(()=>{class n{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=p(Mo);stateManager=p(Xd);options=p(kt,{optional:!0})||{};pendingTasks=p(Fu);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=p(Ds);urlSerializer=p(on);location=p(Tt);urlHandlingStrategy=p(Es);injector=p(Le);_events=new B;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=p(Jd);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=p(cn,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!p(Lr,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new yu;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,s=$(this.navigationTransitions.currentNavigation);if(i!==null&&s!==null){if(this.stateManager.handleRouterEvent(r,s),r instanceof Xe&&r.code!==ce.Redirect&&r.code!==ce.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof De)this.navigated=!0;else if(r instanceof Ln){let o=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),c=g({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Pv(i.source)},o);this.scheduleNavigation(a,Pn,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}km(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Pn,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let s={replaceUrl:!0},o=i?.navigationId?i:null;if(i){let c=g({},i);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(s.state=c)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,o,s).catch(c=>{this.disposed||this.injector.get(Dn)(c)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return $(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(La),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:s,fragment:o,queryParamsHandling:a,preserveFragment:c}=r,u=c?this.currentUrlTree.fragment:o,d=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":d=g(g({},this.currentUrlTree.queryParams),s);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}d!==null&&(d=this.removeEmptyProps(d));let f;try{let h=i?i.snapshot:this.routerState.snapshot.root;f=Od(h)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),f=this.currentUrlTree.root}return Pd(f,e,d,u??null)}navigateByUrl(e,r={skipLocationChange:!1}){let i=Pt(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(s,Pn,null,r)}navigate(e,r={skipLocationChange:!1}){return Lv(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(qt(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=g({},Nv):r===!1?i=g({},Fv):i=r,Pt(e))return dd(this.currentUrlTree,e,i);let s=this.parseUrl(e);return dd(this.currentUrlTree,s,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,s])=>(s!=null&&(r[i]=s),r),{})}scheduleNavigation(e,r,i,s,o){if(this.disposed)return Promise.resolve(!1);let a,c,u;o?(a=o.resolve,c=o.reject,u=o.promise):u=new Promise((f,h)=>{a=f,c=h});let d=this.pendingTasks.add();return ws(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:s,resolve:a,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(f=>Promise.reject(f))}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Lv(n){for(let t=0;t<n.length;t++)if(n[t]==null)throw new E(4008,!1)}var Cs=(()=>{class n{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=Q(null);get href(){return $(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new B;applicationErrorHandler=p(Dn);options=p(kt,{optional:!0});constructor(e,r,i,s,o,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=s,this.el=o,this.locationStrategy=a,this.reactiveHref.set(p(new al("href"),{optional:!0}));let c=o.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area"||!!(typeof customElements=="object"&&customElements.get(c)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof De&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(Pt(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,s,o){let a=this.urlTree;if(a===null||this.isAnchorElement&&(e!==0||r||i||s||o||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,c)?.catch(u=>{this.applicationErrorHandler(u)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,s=this.el.nativeElement;r!==null?i.setAttribute(s,e,r):i.removeAttribute(s,e)}get urlTree(){return this.routerLinkInput===null?null:Pt(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||n)(v(we),v(Me),Io("tabindex"),v(me),v(he),v(Be))};static \u0275dir=O({type:n,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&ae("click",function(o){return i.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),r&2&&lt("href",i.reactiveHref(),Wu)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",At],skipLocationChange:[2,"skipLocationChange","skipLocationChange",At],replaceUrl:[2,"replaceUrl","replaceUrl",At],routerLink:"routerLink"},features:[de]})}return n})(),xv=(()=>{class n{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new ie;constructor(e,r,i,s,o){this.router=e,this.element=r,this.renderer=i,this.cdr=s,this.link=o,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof De&&this.update()})}ngAfterContentInit(){_(this.links.changes,_(null)).pipe(er()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=z(e).pipe(er()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=Uv(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let s=i.urlTree;return s?e.isActive(s,r):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||n)(v(we),v(he),v(me),v(Ke),v(Cs,8))};static \u0275dir=O({type:n,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,s){if(r&1&&nl(s,Cs,5),r&2){let o;rl(o=il())&&(i.links=o)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[de]})}return n})();function Uv(n){return!!n.paths}var Ur=class{};var Qd=(()=>{class n{router;injector;preloadingStrategy;loader;subscription;constructor(e,r,i,s){this.router=e,this.injector=r,this.preloadingStrategy=i,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(Ne(e=>e instanceof De),ot(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,r){let i=[];for(let s of r){s.providers&&!s._injector&&(s._injector=Ei(s.providers,e,`Route: ${s.path}`));let o=s._injector??e,a=s._loadedInjector??o;(s.loadChildren&&!s._loadedRoutes&&s.canLoad===void 0||s.loadComponent&&!s._loadedComponent)&&i.push(this.preloadConfig(o,s)),(s.children||s._loadedRoutes)&&i.push(this.processRoutes(a,s.children??s._loadedRoutes))}return z(i).pipe(er())}preloadConfig(e,r){return this.preloadingStrategy.preload(r,()=>{let i;r.loadChildren&&r.canLoad===void 0?i=this.loader.loadChildren(e,r):i=_(null);let s=i.pipe(le(o=>o===null?_(void 0):(r._loadedRoutes=o.routes,r._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));if(r.loadComponent&&!r._loadedComponent){let o=this.loader.loadComponent(e,r);return z([s,o]).pipe(er())}else return s})}static \u0275fac=function(r){return new(r||n)(w(we),w(Le),w(Ur),w(_s))};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),eh=new C(""),Vv=(()=>{class n{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=Pn;restoredId=0;store={};constructor(e,r,i,s,o={}){this.urlSerializer=e,this.transitions=r,this.viewportScroller=i,this.zone=s,this.options=o,o.scrollPositionRestoration||="disabled",o.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Mt?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof De?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof et&&e.code===kn.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{if(!(e instanceof Fn))return;let r={behavior:"instant"};e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0],r):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position,r):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0])})}scheduleScrollEvent(e,r){this.zone.runOutsideAngular(()=>l(this,null,function*(){yield new Promise(i=>{setTimeout(i),typeof requestAnimationFrame<"u"&&requestAnimationFrame(i)}),this.zone.run(()=>{this.transitions.events.next(new Fn(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,r))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(r){Zu()};static \u0275prov=y({token:n,factory:n.\u0275fac})}return n})();function Bv(n,...t){return Fe([{provide:cn,multi:!0,useValue:n},[],{provide:Me,useFactory:th,deps:[we]},{provide:No,multi:!0,useFactory:nh},t.map(e=>e.\u0275providers)])}function th(n){return n.routerState.root}function Vr(n,t){return{\u0275kind:n,\u0275providers:t}}function nh(){let n=p(q);return t=>{let e=n.get(ut);if(t!==e.components[0])return;let r=n.get(we),i=n.get(rh);n.get($a)===1&&r.initialNavigation(),n.get(oh,null,{optional:!0})?.setUpPreloading(),n.get(eh,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var rh=new C("",{factory:()=>new B}),$a=new C("",{providedIn:"root",factory:()=>1});function ih(){let n=[{provide:To,useValue:!0},{provide:$a,useValue:0},ko(()=>{let t=p(q);return t.get(Ho,Promise.resolve()).then(()=>new Promise(r=>{let i=t.get(we),s=t.get(rh);ws(i,()=>{r(!0)}),t.get(Ds).afterPreactivation=()=>(r(!0),s.closed?_(void 0):s),i.initialNavigation()}))})];return Vr(2,n)}function sh(){let n=[ko(()=>{p(we).setUpLocationChangeListener()}),{provide:$a,useValue:2}];return Vr(3,n)}var oh=new C("");function ah(n){return Vr(0,[{provide:oh,useExisting:Qd},{provide:Ur,useExisting:n}])}function ch(){return Vr(8,[Na,{provide:Lr,useExisting:Na}])}function uh(n){Oo("NgRouterViewTransitions");let t=[{provide:Ua,useValue:Zd},{provide:Va,useValue:g({skipNextTransition:!!n?.skipInitialTransition},n)}];return Vr(9,t)}var lh=[Tt,{provide:on,useClass:Ot},we,an,{provide:Me,useFactory:th,deps:[we]},_s,[]],jv=(()=>{class n{constructor(){}static forRoot(e,r){return{ngModule:n,providers:[lh,[],{provide:cn,multi:!0,useValue:e},[],r?.errorHandler?{provide:Ba,useValue:r.errorHandler}:[],{provide:kt,useValue:r||{}},r?.useHash?Hv():zv(),$v(),r?.preloadingStrategy?ah(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?Wv(r):[],r?.bindToComponentInputs?ch().\u0275providers:[],r?.enableViewTransitions?uh().\u0275providers:[],Gv()]}}static forChild(e){return{ngModule:n,providers:[{provide:cn,multi:!0,useValue:e}]}}static \u0275fac=function(r){return new(r||n)};static \u0275mod=Te({type:n});static \u0275inj=Ae({})}return n})();function $v(){return{provide:eh,useFactory:()=>{let n=p(Bl),t=p(Y),e=p(kt),r=p(Ds),i=p(on);return e.scrollOffset&&n.setOffset(e.scrollOffset),new Vv(i,r,n,t,e)}}}function Hv(){return{provide:Be,useClass:Xo}}function zv(){return{provide:Be,useClass:bi}}function Wv(n){return[n.initialNavigation==="disabled"?sh().\u0275providers:[],n.initialNavigation==="enabledBlocking"?ih().\u0275providers:[]]}var ja=new C("");function Gv(){return[{provide:ja,useFactory:nh},{provide:No,multi:!0,useExisting:ja}]}function iA(n){n||(n=p(xe));let t=new Ie(e=>{if(n.destroyed){e.next();return}return n.onDestroy(e.next.bind(e))});return e=>e.pipe(tr(t))}function sA(n,t){let e=t?.injector??p(q),r=new Eu(1),i=ol(()=>{let s;try{s=n()}catch(o){$(()=>r.error(o));return}$(()=>r.next(s))},{injector:e,manualCleanup:!0});return e.get(xe).onDestroy(()=>{i.destroy(),r.complete()}),r.asObservable()}function oA(n,t){let r=!t?.manualCleanup?t?.injector?.get(xe)??p(xe):null,i=qv(t?.equal),s;t?.requireSync?s=Q({kind:0},{equal:i}):s=Q({kind:1,value:t?.initialValue},{equal:i});let o,a=n.subscribe({next:c=>s.set({kind:1,value:c}),error:c=>{s.set({kind:2,error:c}),o?.()},complete:()=>{o?.()}});if(t?.requireSync&&s().kind===0)throw new E(601,!1);return o=r?.onDestroy(a.unsubscribe.bind(a)),bt(()=>{let c=s();switch(c.kind){case 1:return c.value;case 2:throw c.error;case 0:throw new E(601,!1)}},{equal:t?.equal})}function qv(n=Object.is){return(t,e)=>t.kind===1&&e.kind===1&&n(t.value,e.value)}function dh(n){n===void 0&&(n=p(q));let t=n.get(Kt);return e=>new Ie(r=>{let i=t.add(),s=!1;function o(){s||(i(),s=!0)}let a=e.subscribe({next:c=>{r.next(c),o()},complete:()=>{r.complete(),o()},error:c=>{r.error(c),o()}});return a.add(()=>{r.unsubscribe(),o()}),a})}var Dh=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,r){this._renderer=e,this._elementRef=r}setProperty(e,r){this._renderer.setProperty(this._elementRef.nativeElement,e,r)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(r){return new(r||n)(v(me),v(he))};static \u0275dir=O({type:n})}return n})(),Kr=(()=>{class n extends Dh{static \u0275fac=(()=>{let e;return function(i){return(e||(e=at(n)))(i||n)}})();static \u0275dir=O({type:n,features:[se]})}return n})(),Ft=new C(""),Kv={provide:Ft,useExisting:be(()=>Yv),multi:!0},Yv=(()=>{class n extends Kr{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=at(n)))(i||n)}})();static \u0275dir=O({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,i){r&1&&ae("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},standalone:!1,features:[Se([Kv]),se]})}return n})(),Zv={provide:Ft,useExisting:be(()=>wh),multi:!0};function Jv(){let n=Re()?Re().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var Xv=new C(""),wh=(()=>{class n extends Dh{_compositionMode;_composing=!1;constructor(e,r,i){super(e,r),this._compositionMode=i,this._compositionMode==null&&(this._compositionMode=!Jv())}writeValue(e){let r=e??"";this.setProperty("value",r)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(r){return new(r||n)(v(me),v(he),v(Xv,8))};static \u0275dir=O({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,i){r&1&&ae("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},standalone:!1,features:[Se([Zv]),se]})}return n})();function Ga(n){return n==null||qa(n)===0}function qa(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var Wn=new C(""),Yr=new C(""),Qv=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,hh=class{static min(t){return ey(t)}static max(t){return ty(t)}static required(t){return Ch(t)}static requiredTrue(t){return ny(t)}static email(t){return ry(t)}static minLength(t){return iy(t)}static maxLength(t){return sy(t)}static pattern(t){return oy(t)}static nullValidator(t){return bs()}static compose(t){return Rh(t)}static composeAsync(t){return Oh(t)}};function ey(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function ty(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Ch(n){return Ga(n.value)?{required:!0}:null}function ny(n){return n.value===!0?null:{required:!0}}function ry(n){return Ga(n.value)||Qv.test(n.value)?null:{email:!0}}function iy(n){return t=>{let e=t.value?.length??qa(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function sy(n){return t=>{let e=t.value?.length??qa(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function oy(n){if(!n)return bs;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),r=>{if(Ga(r.value))return null;let i=r.value;return t.test(i)?null:{pattern:{requiredPattern:e,actualValue:i}}}}function bs(n){return null}function Ih(n){return n!=null}function bh(n){return In(n)?z(n):n}function Ah(n){let t={};return n.forEach(e=>{t=e!=null?g(g({},t),e):t}),Object.keys(t).length===0?null:t}function Th(n,t){return t.map(e=>e(n))}function ay(n){return!n.validate}function Sh(n){return n.map(t=>ay(t)?t:e=>t.validate(e))}function Rh(n){if(!n)return null;let t=n.filter(Ih);return t.length==0?null:function(e){return Ah(Th(e,t))}}function Ka(n){return n!=null?Rh(Sh(n)):null}function Oh(n){if(!n)return null;let t=n.filter(Ih);return t.length==0?null:function(e){let r=Th(e,t).map(bh);return Tu(r).pipe(R(Ah))}}function Ya(n){return n!=null?Oh(Sh(n)):null}function fh(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function Ph(n){return n._rawValidators}function Mh(n){return n._rawAsyncValidators}function Ha(n){return n?Array.isArray(n)?n:[n]:[]}function As(n,t){return Array.isArray(n)?n.includes(t):n===t}function ph(n,t){let e=Ha(t);return Ha(n).forEach(i=>{As(e,i)||e.push(i)}),e}function gh(n,t){return Ha(t).filter(e=>!As(n,e))}var Ts=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Ka(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ya(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},vt=class extends Ts{name;get formDirective(){return null}get path(){return null}},tt=class extends Ts{_parent=null;name=null;valueAccessor=null},Ss=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},cy={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},IA=S(g({},cy),{"[class.ng-submitted]":"isSubmitted"}),bA=(()=>{class n extends Ss{constructor(e){super(e)}static \u0275fac=function(r){return new(r||n)(v(tt,2))};static \u0275dir=O({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,i){r&2&&Uo("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},standalone:!1,features:[se]})}return n})(),AA=(()=>{class n extends Ss{constructor(e){super(e)}static \u0275fac=function(r){return new(r||n)(v(vt,10))};static \u0275dir=O({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,i){r&2&&Uo("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},standalone:!1,features:[se]})}return n})();var Br="VALID",Is="INVALID",jn="PENDING",jr="DISABLED",Nt=class{},Rs=class extends Nt{value;source;constructor(t,e){super(),this.value=t,this.source=e}},Hr=class extends Nt{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},zr=class extends Nt{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},$n=class extends Nt{status;source;constructor(t,e){super(),this.status=t,this.source=e}},Os=class extends Nt{source;constructor(t){super(),this.source=t}},Gr=class extends Nt{source;constructor(t){super(),this.source=t}};function Za(n){return(Ns(n)?n.validators:n)||null}function uy(n){return Array.isArray(n)?Ka(n):n||null}function Ja(n,t){return(Ns(t)?t.asyncValidators:n)||null}function ly(n){return Array.isArray(n)?Ya(n):n||null}function Ns(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function kh(n,t,e){let r=n.controls;if(!(t?Object.keys(r):r).length)throw new E(1e3,"");if(!r[e])throw new E(1001,"")}function Nh(n,t,e){n._forEachChild((r,i)=>{if(e[i]===void 0)throw new E(1002,"")})}var Hn=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return $(this.statusReactive)}set status(t){$(()=>this.statusReactive.set(t))}_status=bt(()=>this.statusReactive());statusReactive=Q(void 0);get valid(){return this.status===Br}get invalid(){return this.status===Is}get pending(){return this.status==jn}get disabled(){return this.status===jr}get enabled(){return this.status!==jr}errors;get pristine(){return $(this.pristineReactive)}set pristine(t){$(()=>this.pristineReactive.set(t))}_pristine=bt(()=>this.pristineReactive());pristineReactive=Q(!0);get dirty(){return!this.pristine}get touched(){return $(this.touchedReactive)}set touched(t){$(()=>this.touchedReactive.set(t))}_touched=bt(()=>this.touchedReactive());touchedReactive=Q(!1);get untouched(){return!this.touched}_events=new B;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(ph(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(ph(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(gh(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(gh(t,this._rawAsyncValidators))}hasValidator(t){return As(this._rawValidators,t)}hasAsyncValidator(t){return As(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let r=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(S(g({},t),{sourceControl:r})),e&&t.emitEvent!==!1&&this._events.next(new zr(!0,r))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=t.sourceControl??this;this._forEachChild(i=>{i.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:r})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,r),e&&t.emitEvent!==!1&&this._events.next(new zr(!1,r))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let r=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(S(g({},t),{sourceControl:r})),e&&t.emitEvent!==!1&&this._events.next(new Hr(!1,r))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=t.sourceControl??this;this._forEachChild(i=>{i.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,r),e&&t.emitEvent!==!1&&this._events.next(new Hr(!0,r))}markAsPending(t={}){this.status=jn;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new $n(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(S(g({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=jr,this.errors=null,this._forEachChild(i=>{i.disable(S(g({},t),{onlySelf:!0}))}),this._updateValue();let r=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Rs(this.value,r)),this._events.next(new $n(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(S(g({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Br,this._forEachChild(r=>{r.enable(S(g({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(S(g({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Br||this.status===jn)&&this._runAsyncValidator(r,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Rs(this.value,e)),this._events.next(new $n(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(S(g({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?jr:Br}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=jn,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let r=bh(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((r,i)=>r&&r._find(i),this)}getError(t,e){let r=e?this.get(e):this;return r&&r.errors?r.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,r){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||r)&&this._events.next(new $n(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,r)}_initObservables(){this.valueChanges=new ie,this.statusChanges=new ie}_calculateStatus(){return this._allControlsDisabled()?jr:this.errors?Is:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(jn)?jn:this._anyControlsHaveStatus(Is)?Is:Br}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let r=!this._anyControlsDirty(),i=this.pristine!==r;this.pristine=r,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),i&&this._events.next(new Hr(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new zr(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Ns(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=uy(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=ly(this._rawAsyncValidators)}},zn=class extends Hn{constructor(t,e,r){super(Za(e),Ja(r,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,r={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,r={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Nh(this,!0,t),Object.keys(t).forEach(r=>{kh(this,!0,r),this.controls[r].setValue(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(r=>{let i=this.controls[r];i&&i.patchValue(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((r,i)=>{r.reset(t?t[i]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new Gr(this))}getRawValue(){return this._reduceChildren({},(t,e,r)=>(t[r]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,r)=>r._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let r=this.controls[e];r&&t(r,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,r]of Object.entries(this.controls))if(this.contains(e)&&t(r))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,r,i)=>((r.enabled||this.disabled)&&(e[i]=r.value),e))}_reduceChildren(t,e){let r=t;return this._forEachChild((i,s)=>{r=e(r,i,s)}),r}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var za=class extends zn{};var un=new C("",{providedIn:"root",factory:()=>Zr}),Zr="always";function Fh(n,t){return[...t.path,n]}function qr(n,t,e=Zr){Xa(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),hy(n,t),py(n,t),fy(n,t),dy(n,t)}function Ps(n,t,e=!0){let r=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(r),t.valueAccessor.registerOnTouched(r)),ks(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function Ms(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function dy(n,t){if(t.valueAccessor.setDisabledState){let e=r=>{t.valueAccessor.setDisabledState(r)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function Xa(n,t){let e=Ph(n);t.validator!==null?n.setValidators(fh(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let r=Mh(n);t.asyncValidator!==null?n.setAsyncValidators(fh(r,t.asyncValidator)):typeof r=="function"&&n.setAsyncValidators([r]);let i=()=>n.updateValueAndValidity();Ms(t._rawValidators,i),Ms(t._rawAsyncValidators,i)}function ks(n,t){let e=!1;if(n!==null){if(t.validator!==null){let i=Ph(n);if(Array.isArray(i)&&i.length>0){let s=i.filter(o=>o!==t.validator);s.length!==i.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let i=Mh(n);if(Array.isArray(i)&&i.length>0){let s=i.filter(o=>o!==t.asyncValidator);s.length!==i.length&&(e=!0,n.setAsyncValidators(s))}}}let r=()=>{};return Ms(t._rawValidators,r),Ms(t._rawAsyncValidators,r),e}function hy(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Lh(n,t)})}function fy(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Lh(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function Lh(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function py(n,t){let e=(r,i)=>{t.valueAccessor.writeValue(r),i&&t.viewToModelUpdate(r)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function xh(n,t){n==null,Xa(n,t)}function gy(n,t){return ks(n,t)}function Qa(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function my(n){return Object.getPrototypeOf(n.constructor)===Kr}function Uh(n,t){n._syncPendingControls(),t.forEach(e=>{let r=e.control;r.updateOn==="submit"&&r._pendingChange&&(e.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function ec(n,t){if(!t)return null;Array.isArray(t);let e,r,i;return t.forEach(s=>{s.constructor===wh?e=s:my(s)?r=s:i=s}),i||r||e||null}function vy(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var yy={provide:vt,useExisting:be(()=>_y)},$r=Promise.resolve(),_y=(()=>{class n extends vt{callSetDisabledState;get submitted(){return $(this.submittedReactive)}_submitted=bt(()=>this.submittedReactive());submittedReactive=Q(!1);_directives=new Set;form;ngSubmit=new ie;options;constructor(e,r,i){super(),this.callSetDisabledState=i,this.form=new zn({},Ka(e),Ya(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){$r.then(()=>{let r=this._findContainer(e.path);e.control=r.registerControl(e.name,e.control),qr(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){$r.then(()=>{let r=this._findContainer(e.path);r&&r.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){$r.then(()=>{let r=this._findContainer(e.path),i=new zn({});xh(i,e),r.registerControl(e.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){$r.then(()=>{let r=this._findContainer(e.path);r&&r.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,r){$r.then(()=>{this.form.get(e.path).setValue(r)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),Uh(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new Os(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(r){return new(r||n)(v(Wn,10),v(Yr,10),v(un,8))};static \u0275dir=O({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,i){r&1&&ae("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[Se([yy]),se]})}return n})();function mh(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function vh(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var Wr=class extends Hn{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,r){super(Za(e),Ja(r,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ns(e)&&(e.nonNullable||e.initialValueIsDefault)&&(vh(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new Gr(this))}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){mh(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){mh(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){vh(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Ey=n=>n instanceof Wr;var Dy={provide:tt,useExisting:be(()=>wy)},yh=Promise.resolve(),wy=(()=>{class n extends tt{_changeDetectorRef;callSetDisabledState;control=new Wr;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new ie;constructor(e,r,i,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this._parent=e,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=ec(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let r=e.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Qa(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){qr(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){yh.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let r=e.isDisabled.currentValue,i=r!==0&&At(r);yh.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Fh(e,this._parent):[e]}static \u0275fac=function(r){return new(r||n)(v(vt,9),v(Wn,10),v(Yr,10),v(Ft,10),v(Ke,8),v(un,8))};static \u0275dir=O({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[Se([Dy]),se,de]})}return n})();var SA=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275dir=O({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})();var Cy={provide:Ft,useExisting:be(()=>by),multi:!0};var Iy=(()=>{class n{_accessors=[];add(e,r){this._accessors.push([e,r])}remove(e){for(let r=this._accessors.length-1;r>=0;--r)if(this._accessors[r][1]===e){this._accessors.splice(r,1);return}}select(e){this._accessors.forEach(r=>{this._isSameGroup(r,e)&&r[1]!==e&&r[1].fireUncheck(e.value)})}_isSameGroup(e,r){return e[0].control?e[0]._parent===r._control._parent&&e[1].name===r.name:!1}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),by=(()=>{class n extends Kr{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=p(un,{optional:!0})??Zr;constructor(e,r,i,s){super(e,r),this._registry=i,this._injector=s}ngOnInit(){this._control=this._injector.get(tt),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(r){return new(r||n)(v(me),v(he),v(Iy),v(q))};static \u0275dir=O({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(r,i){r&1&&ae("change",function(){return i.onChange()})("blur",function(){return i.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[Se([Cy]),se]})}return n})();var tc=new C(""),Ay={provide:tt,useExisting:be(()=>Ty)},Ty=(()=>{class n extends tt{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new ie;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,r,i,s,o){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=o,this._setValidators(e),this._setAsyncValidators(r),this.valueAccessor=ec(this,i)}ngOnChanges(e){if(this._isControlChanged(e)){let r=e.form.previousValue;r&&Ps(r,this,!1),qr(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Qa(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Ps(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(r){return new(r||n)(v(Wn,10),v(Yr,10),v(Ft,10),v(tc,8),v(un,8))};static \u0275dir=O({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[Se([Ay]),se,de]})}return n})(),Sy={provide:vt,useExisting:be(()=>Ry)},Ry=(()=>{class n extends vt{callSetDisabledState;get submitted(){return $(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=bt(()=>this._submittedReactive());_submittedReactive=Q(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new ie;constructor(e,r,i){super(),this.callSetDisabledState=i,this._setValidators(e),this._setAsyncValidators(r)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(ks(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let r=this.form.get(e.path);return qr(r,e,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),r}getControl(e){return this.form.get(e.path)}removeControl(e){Ps(e.control||null,e,!1),vy(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,r){this.form.get(e.path).setValue(r)}onSubmit(e){return this._submittedReactive.set(!0),Uh(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new Os(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,r={}){this.form.reset(e,r),this._submittedReactive.set(!1)}_updateDomValue(){this.directives.forEach(e=>{let r=e.control,i=this.form.get(e.path);r!==i&&(Ps(r||null,e),Ey(i)&&(qr(i,e,this.callSetDisabledState),e.control=i))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let r=this.form.get(e.path);xh(r,e),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let r=this.form.get(e.path);r&&gy(r,e)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Xa(this.form,this),this._oldForm&&ks(this._oldForm,this)}static \u0275fac=function(r){return new(r||n)(v(Wn,10),v(Yr,10),v(un,8))};static \u0275dir=O({type:n,selectors:[["","formGroup",""]],hostBindings:function(r,i){r&1&&ae("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[Se([Sy]),se,de]})}return n})();var Oy={provide:tt,useExisting:be(()=>Py)},Py=(()=>{class n extends tt{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new ie;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,r,i,s,o){super(),this._ngModelWarningConfig=o,this._parent=e,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=ec(this,s)}ngOnChanges(e){this._added||this._setUpControl(),Qa(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Fh(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(r){return new(r||n)(v(vt,13),v(Wn,10),v(Yr,10),v(Ft,10),v(tc,8))};static \u0275dir=O({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[Se([Oy]),se,de]})}return n})();var My={provide:Ft,useExisting:be(()=>Bh),multi:!0};function Vh(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function ky(n){return n.split(":")[0]}var Bh=(()=>{class n extends Kr{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=p(ut).injector;destroyRef=p(xe);cdr=p(Ke);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,_i({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let r=this._getOptionId(e),i=Vh(r,e);this.setProperty("value",i)}registerOnChange(e){this.onChange=r=>{this.value=this._getOptionValue(r),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),e))return r;return null}_getOptionValue(e){let r=ky(e);return this._optionMap.has(r)?this._optionMap.get(r):e}static \u0275fac=(()=>{let e;return function(i){return(e||(e=at(n)))(i||n)}})();static \u0275dir=O({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,i){r&1&&ae("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[Se([My]),se]})}return n})(),RA=(()=>{class n{_element;_renderer;_select;id;constructor(e,r,i){this._element=e,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(Vh(this.id,e)),this._select._writeValueAfterRender())}set value(e){this._setElementValue(e),this._select&&this._select._writeValueAfterRender()}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select._writeValueAfterRender())}static \u0275fac=function(r){return new(r||n)(v(he),v(me),v(Bh,9))};static \u0275dir=O({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),Ny={provide:Ft,useExisting:be(()=>jh),multi:!0};function _h(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Fy(n){return n.split(":")[0]}var jh=(()=>{class n extends Kr{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let r;if(Array.isArray(e)){let i=e.map(s=>this._getOptionId(s));r=(s,o)=>{s._setSelected(i.indexOf(o.toString())>-1)}}else r=(i,s)=>{i._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(e){this.onChange=r=>{let i=[],s=r.selectedOptions;if(s!==void 0){let o=s;for(let a=0;a<o.length;a++){let c=o[a],u=this._getOptionValue(c.value);i.push(u)}}else{let o=r.options;for(let a=0;a<o.length;a++){let c=o[a];if(c.selected){let u=this._getOptionValue(c.value);i.push(u)}}}this.value=i,e(i)}}_registerOption(e){let r=(this._idCounter++).toString();return this._optionMap.set(r,e),r}_getOptionId(e){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r)._value,e))return r;return null}_getOptionValue(e){let r=Fy(e);return this._optionMap.has(r)?this._optionMap.get(r)._value:e}static \u0275fac=(()=>{let e;return function(i){return(e||(e=at(n)))(i||n)}})();static \u0275dir=O({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,i){r&1&&ae("change",function(o){return i.onChange(o.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[Se([Ny]),se]})}return n})(),OA=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,r,i){this._element=e,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(_h(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(_h(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(r){return new(r||n)(v(he),v(me),v(jh,9))};static \u0275dir=O({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();var Ly=(()=>{class n{_validator=bs;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let r=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):bs,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(r){return new(r||n)};static \u0275dir=O({type:n,features:[de]})}return n})();var xy={provide:Wn,useExisting:be(()=>Uy),multi:!0};var Uy=(()=>{class n extends Ly{required;inputName="required";normalizeInput=At;createValidator=e=>Ch;enabled(e){return e}static \u0275fac=(()=>{let e;return function(i){return(e||(e=at(n)))(i||n)}})();static \u0275dir=O({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(r,i){r&2&&lt("required",i._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[Se([xy]),se]})}return n})();var $h=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=Te({type:n});static \u0275inj=Ae({})}return n})(),Wa=class extends Hn{constructor(t,e,r){super(Za(e),Ja(r,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(r=>{this.controls.push(r),this._registerControl(r)}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,r={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(t,e={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,r={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),e&&(this.controls.splice(i,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Nh(this,!1,t),t.forEach((r,i)=>{kh(this,!1,i),this.at(i).setValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((r,i)=>{this.at(i)&&this.at(i).patchValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((r,i)=>{r.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new Gr(this))}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,r)=>r._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,r)=>{t(e,r)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Eh(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var PA=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,r=null){let i=this._reduceControls(e),s={};return Eh(r)?s=r:r!==null&&(s.validators=r.validator,s.asyncValidators=r.asyncValidator),new zn(i,s)}record(e,r=null){let i=this._reduceControls(e);return new za(i,r)}control(e,r,i){let s={};return this.useNonNullable?(Eh(r)?s=r:(s.validators=r,s.asyncValidators=i),new Wr(e,S(g({},s),{nonNullable:!0}))):new Wr(e,r,i)}array(e,r,i){let s=e.map(o=>this._createControl(o));return new Wa(s,r,i)}_reduceControls(e){let r={};return Object.keys(e).forEach(i=>{r[i]=this._createControl(e[i])}),r}_createControl(e){if(e instanceof Wr)return e;if(e instanceof Hn)return e;if(Array.isArray(e)){let r=e[0],i=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(r,i,s)}else return this.control(e)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var MA=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:un,useValue:e.callSetDisabledState??Zr}]}}static \u0275fac=function(r){return new(r||n)};static \u0275mod=Te({type:n});static \u0275inj=Ae({imports:[$h]})}return n})(),kA=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:tc,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:un,useValue:e.callSetDisabledState??Zr}]}}static \u0275fac=function(r){return new(r||n)};static \u0275mod=Te({type:n});static \u0275inj=Ae({imports:[$h]})}return n})();var Hh=["toast-component",""];function Vy(n,t){if(n&1){let e=xo();Ue(0,"button",5),ae("click",function(){Do(e);let i=ye();return wo(i.remove())}),Ue(1,"span",6),ft(2,"\xD7"),dt()()}}function By(n,t){if(n&1&&(Fo(0),ft(1),Lo()),n&2){let e=ye(2);K(),Qt("[",e.duplicatesCount+1,"]")}}function jy(n,t){if(n&1&&(Ue(0,"div"),ft(1),sr(2,By,2,1,"ng-container",4),dt()),n&2){let e=ye();ht(e.options.titleClass),lt("aria-label",e.title),K(),Qt(" ",e.title," "),K(),oe("ngIf",e.duplicatesCount)}}function $y(n,t){if(n&1&&Xt(0,"div",7),n&2){let e=ye();ht(e.options.messageClass),oe("innerHTML",e.message,Ro)}}function Hy(n,t){if(n&1&&(Ue(0,"div",8),ft(1),dt()),n&2){let e=ye();ht(e.options.messageClass),lt("aria-label",e.message),K(),Qt(" ",e.message," ")}}function zy(n,t){if(n&1&&(Ue(0,"div"),Xt(1,"div",9),dt()),n&2){let e=ye();K(),or("width",e.width()+"%")}}function Wy(n,t){if(n&1){let e=xo();Ue(0,"button",5),ae("click",function(){Do(e);let i=ye();return wo(i.remove())}),Ue(1,"span",6),ft(2,"\xD7"),dt()()}}function Gy(n,t){if(n&1&&(Fo(0),ft(1),Lo()),n&2){let e=ye(2);K(),Qt("[",e.duplicatesCount+1,"]")}}function qy(n,t){if(n&1&&(Ue(0,"div"),ft(1),sr(2,Gy,2,1,"ng-container",4),dt()),n&2){let e=ye();ht(e.options.titleClass),lt("aria-label",e.title),K(),Qt(" ",e.title," "),K(),oe("ngIf",e.duplicatesCount)}}function Ky(n,t){if(n&1&&Xt(0,"div",7),n&2){let e=ye();ht(e.options.messageClass),oe("innerHTML",e.message,Ro)}}function Yy(n,t){if(n&1&&(Ue(0,"div",8),ft(1),dt()),n&2){let e=ye();ht(e.options.messageClass),lt("aria-label",e.message),K(),Qt(" ",e.message," ")}}function Zy(n,t){if(n&1&&(Ue(0,"div"),Xt(1,"div",9),dt()),n&2){let e=ye();K(),or("width",e.width()+"%")}}var nc=class{_attachedHost;component;viewContainerRef;injector;constructor(t,e){this.component=t,this.injector=e}attach(t,e){return this._attachedHost=t,t.attach(this,e)}detach(){let t=this._attachedHost;if(t)return this._attachedHost=void 0,t.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(t){this._attachedHost=t}},rc=class{_attachedPortal;_disposeFn;attach(t,e){return this._attachedPortal=t,this.attachComponentPortal(t,e)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(t){this._disposeFn=t}},ic=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new B;_activate=new B;_manualClose=new B;_resetTimeout=new B;_countDuplicate=new B;constructor(t){this._overlayRef=t}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(t,e){t&&this._resetTimeout.next(),e&&this._countDuplicate.next(++this.duplicatesCount)}},Gn=class{toastId;config;message;title;toastType;toastRef;_onTap=new B;_onAction=new B;constructor(t,e,r,i,s,o){this.toastId=t,this.config=e,this.message=r,this.title=i,this.toastType=s,this.toastRef=o,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(t){this._onAction.next(t)}onAction(){return this._onAction.asObservable()}},zh={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Wh=new C("ToastConfig"),sc=class extends rc{_hostDomElement;_componentFactoryResolver;_appRef;constructor(t,e,r){super(),this._hostDomElement=t,this._componentFactoryResolver=e,this._appRef=r}attachComponentPortal(t,e){let r=this._componentFactoryResolver.resolveComponentFactory(t.component),i;return i=r.create(t.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(t){return t.hostView.rootNodes[0]}},Jy=(()=>{class n{_document=p(V);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e=this._document.createElement("div");e.classList.add("overlay-container"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),this._containerElement=e}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),oc=class{_portalHost;constructor(t){this._portalHost=t}attach(t,e=!0){return this._portalHost.attach(t,e)}detach(){return this._portalHost.detach()}},Xy=(()=>{class n{_overlayContainer=p(Jy);_componentFactoryResolver=p(Ku);_appRef=p(ut);_document=p(V);_paneElements=new Map;create(e,r){return this._createOverlayRef(this.getPaneElement(e,r))}getPaneElement(e="",r){return this._paneElements.get(r)||this._paneElements.set(r,{}),this._paneElements.get(r)[e]||(this._paneElements.get(r)[e]=this._createPaneElement(e,r)),this._paneElements.get(r)[e]}_createPaneElement(e,r){let i=this._document.createElement("div");return i.id="toast-container",i.classList.add(e),i.classList.add("toast-container"),r?r.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalHost(e){return new sc(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new oc(this._createPortalHost(e))}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Fs=(()=>{class n{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(e,r,i,s,o){this.overlay=r,this._injector=i,this.sanitizer=s,this.ngZone=o,this.toastrConfig=g(g({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=g(g({},e.default.iconClasses),e.config.iconClasses))}show(e,r,i={},s=""){return this._preBuildNotification(s,e,r,this.applyConfig(i))}success(e,r,i={}){let s=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(s,e,r,this.applyConfig(i))}error(e,r,i={}){let s=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(s,e,r,this.applyConfig(i))}info(e,r,i={}){let s=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(s,e,r,this.applyConfig(i))}warning(e,r,i={}){let s=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(s,e,r,this.applyConfig(i))}clear(e){for(let r of this.toasts)if(e!==void 0){if(r.toastId===e){r.toastRef.manualClose();return}}else r.toastRef.manualClose()}remove(e){let r=this._findToast(e);if(!r||(r.activeToast.toastRef.close(),this.toasts.splice(r.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0}findDuplicate(e="",r="",i,s){let{includeTitleDuplicates:o}=this.toastrConfig;for(let a of this.toasts){let c=o&&a.title===e;if((!o||c)&&a.message===r)return a.toastRef.onDuplicate(i,s),a}return null}applyConfig(e={}){return g(g({},this.toastrConfig),e)}_findToast(e){for(let r=0;r<this.toasts.length;r++)if(this.toasts[r].toastId===e)return{index:r,activeToast:this.toasts[r]};return null}_preBuildNotification(e,r,i,s){return s.onActivateTick?this.ngZone.run(()=>this._buildNotification(e,r,i,s)):this._buildNotification(e,r,i,s)}_buildNotification(e,r,i,s){if(!s.toastComponent)throw new Error("toastComponent required");let o=this.findDuplicate(i,r,this.toastrConfig.resetTimeoutOnDuplicate&&s.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&i||r)&&this.toastrConfig.preventDuplicates&&o!==null)return o;this.previousToastMessage=r;let a=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(a=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let c=this.overlay.create(s.positionClass,this.overlayContainer);this.index=this.index+1;let u=r;r&&s.enableHtml&&(u=this.sanitizer.sanitize(ct.HTML,r));let d=new ic(c),f=new Gn(this.index,s,u,i,e,d),h=[{provide:Gn,useValue:f}],m=q.create({providers:h,parent:this._injector}),I=new nc(s.toastComponent,m),L=c.attach(I,s.newestOnTop);d.componentInstance=L.instance;let D={toastId:this.index,title:i||"",message:r||"",toastRef:d,onShown:d.afterActivate(),onHidden:d.afterClosed(),onTap:f.onTap(),onAction:f.onAction(),portal:L};return a||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{D.toastRef.activate()})),this.toasts.push(D),D}static \u0275fac=function(r){return new(r||n)(w(Wh),w(Xy),w(q),w(fa),w(Y))};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Qy=(()=>{class n{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=Q(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,r,i){this.toastrService=e,this.toastPackage=r,this.ngZone=i,this.message=r.message,this.title=r.title,this.options=r.config,this.originalTimeout=r.config.timeOut,this.toastClasses=`${r.toastType} ${r.config.toastClass}`,this.sub=r.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=r.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=r.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=r.toastRef.countDuplicate().subscribe(s=>{this.duplicatesCount=s}),this.state=Q({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(e=>S(g({},e),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let e=new Date().getTime(),r=this.hideTime-e;this.width.set(r/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(e=>S(g({},e),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(e=>S(g({},e),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(e,r){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),r)):this.timeout=setTimeout(()=>e(),r)}outsideInterval(e,r){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),r)):this.intervalId=setInterval(()=>e(),r)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}static \u0275fac=function(r){return new(r||n)(v(Fs),v(Gn),v(Y))};static \u0275cmp=rr({type:n,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(r,i){r&1&&ae("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),r&2&&(tl("@flyInOut",i._state),ht(i.toastClasses),or("display",i.displayStyle))},attrs:Hh,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(r,i){r&1&&sr(0,Vy,3,0,"button",0)(1,jy,3,5,"div",1)(2,$y,1,3,"div",2)(3,Hy,2,4,"div",3)(4,zy,2,2,"div",4),r&2&&(oe("ngIf",i.options.closeButton),K(),oe("ngIf",i.title),K(),oe("ngIf",i.message&&i.options.enableHtml),K(),oe("ngIf",i.message&&!i.options.enableHtml),K(),oe("ngIf",i.options.progressBar))},dependencies:[Fi],encapsulation:2,data:{animation:[jo("flyInOut",[cr("inactive",ar({opacity:0})),cr("active",ar({opacity:1})),cr("removed",ar({opacity:0})),wi("inactive => active",Di("{{ easeTime }}ms {{ easing }}")),wi("active => removed",Di("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return n})(),e_=S(g({},zh),{toastComponent:Qy}),cT=(n={})=>Fe([{provide:Wh,useValue:{default:e_,config:n}}]);var t_=(()=>{class n{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=Q(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=Q("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,r,i){this.toastrService=e,this.toastPackage=r,this.appRef=i,this.message=r.message,this.title=r.title,this.options=r.config,this.originalTimeout=r.config.timeOut,this.toastClasses=`${r.toastType} ${r.config.toastClass}`,this.sub=r.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=r.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=r.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=r.toastRef.countDuplicate().subscribe(s=>{this.duplicatesCount=s})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let e=new Date().getTime(),r=this.hideTime-e;this.width.set(r/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(r){return new(r||n)(v(Fs),v(Gn),v(ut))};static \u0275cmp=rr({type:n,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(r,i){r&1&&ae("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),r&2&&(ht(i.toastClasses),or("display",i.displayStyle))},attrs:Hh,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(r,i){r&1&&sr(0,Wy,3,0,"button",0)(1,qy,3,5,"div",1)(2,Ky,1,3,"div",2)(3,Yy,2,4,"div",3)(4,Zy,2,2,"div",4),r&2&&(oe("ngIf",i.options.closeButton),K(),oe("ngIf",i.title),K(),oe("ngIf",i.message&&i.options.enableHtml),K(),oe("ngIf",i.message&&!i.options.enableHtml),K(),oe("ngIf",i.options.progressBar))},dependencies:[Fi],encapsulation:2,changeDetection:0})}return n})(),uT=S(g({},zh),{toastComponent:t_});var Gh=(()=>{let t=class t{constructor(){this.http=p(Gi),this.toastr=p(Fs),this.requestTimeout=1e4}get(r,i={},s="/"){return this.http.get(`${s}${r}`,g({},i)).pipe(Wt(this.requestTimeout),ee(this.handleError.bind(this)))}getWithBody(r,i,s={},o=""){let a=`${o.replace(/\/$/,"")}${r}`;return console.log("GET with body URL:",i),this.http.request("GET",a,S(g({},s),{body:i,headers:s.headers??new Ze({"Content-Type":"application/json"})})).pipe(Wt(this.requestTimeout),ee(this.handleError.bind(this)))}post(r,i,s={},o="/"){return this.http.post(`${o}${r}`,i,g({},s)).pipe(Wt(this.requestTimeout),ee(this.handleError.bind(this)))}postFormData(r,i,s={},o="/"){return this.http.post(`${o}${r}`,i,g({},s)).pipe(Wt(this.requestTimeout),ee(this.handleError.bind(this)))}put(r,i,s={},o="/"){return this.http.put(`${o}${r}`,i,g({},s)).pipe(Wt(this.requestTimeout),ee(this.handleError.bind(this)))}delete(r,i={},s="/"){return this.http.delete(`${s}${r}`,g({},i)).pipe(Wt(this.requestTimeout),ee(this.handleError.bind(this)))}handleError(r){let i={header:"API Error ",message:"An unknown error occurred."};return r instanceof bu&&r.name=="TimeoutError"&&(i.header="Request Timeout",i.message="The request took too long to complete. Please try again later."),r instanceof St&&(Object.keys(r.error).length?(i.header="API Error - "+r.status,i.message=r.error.Message||r.error.message):(r.status===401&&(i.header="Unauthorized",i.message="We can't log you in because of authentication error"),i.header="API Error - "+r.status,i.message=r.error.message)),this.toastr.error(i.message,i.header),zt(()=>i)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var P=(function(n){return n.PosAccessToken="Vzle",n.BarcodeAccessToken="uWwO",n.TokenExpire="nTmh",n.TokenType="GSFk",n.Host="tynU",n.Username="PNQf",n.Brand="gMse",n.Roles="XfGR",n.PrintMode="JPZP",n.SelectedProfileTemplate="gTeU",n.Outlets="ehLw",n})(P||{});var qh=()=>{};var Zh=function(n){let t=[],e=0;for(let r=0;r<n.length;r++){let i=n.charCodeAt(r);i<128?t[e++]=i:i<2048?(t[e++]=i>>6|192,t[e++]=i&63|128):(i&64512)===55296&&r+1<n.length&&(n.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(n.charCodeAt(++r)&1023),t[e++]=i>>18|240,t[e++]=i>>12&63|128,t[e++]=i>>6&63|128,t[e++]=i&63|128):(t[e++]=i>>12|224,t[e++]=i>>6&63|128,t[e++]=i&63|128)}return t},n_=function(n){let t=[],e=0,r=0;for(;e<n.length;){let i=n[e++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){let s=n[e++];t[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){let s=n[e++],o=n[e++],a=n[e++],c=((i&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;t[r++]=String.fromCharCode(55296+(c>>10)),t[r++]=String.fromCharCode(56320+(c&1023))}else{let s=n[e++],o=n[e++];t[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return t.join("")},Ls={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(n,t){if(!Array.isArray(n))throw Error("encodeByteArray takes an array as a parameter");this.init_();let e=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<n.length;i+=3){let s=n[i],o=i+1<n.length,a=o?n[i+1]:0,c=i+2<n.length,u=c?n[i+2]:0,d=s>>2,f=(s&3)<<4|a>>4,h=(a&15)<<2|u>>6,m=u&63;c||(m=64,o||(h=64)),r.push(e[d],e[f],e[h],e[m])}return r.join("")},encodeString(n,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(n):this.encodeByteArray(Zh(n),t)},decodeString(n,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(n):n_(this.decodeStringToByteArray(n,t))},decodeStringToByteArray(n,t){this.init_();let e=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<n.length;){let s=e[n.charAt(i++)],a=i<n.length?e[n.charAt(i)]:0;++i;let u=i<n.length?e[n.charAt(i)]:64;++i;let f=i<n.length?e[n.charAt(i)]:64;if(++i,s==null||a==null||u==null||f==null)throw new cc;let h=s<<2|a>>4;if(r.push(h),u!==64){let m=a<<4&240|u>>2;if(r.push(m),f!==64){let I=u<<6&192|f;r.push(I)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let n=0;n<this.ENCODED_VALS.length;n++)this.byteToCharMap_[n]=this.ENCODED_VALS.charAt(n),this.charToByteMap_[this.byteToCharMap_[n]]=n,this.byteToCharMapWebSafe_[n]=this.ENCODED_VALS_WEBSAFE.charAt(n),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[n]]=n,n>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(n)]=n,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(n)]=n)}}},cc=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},r_=function(n){let t=Zh(n);return Ls.encodeByteArray(t,!0)},lc=function(n){return r_(n).replace(/\./g,"")},xs=function(n){try{return Ls.decodeString(n,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function Jh(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var i_=()=>Jh().__FIREBASE_DEFAULTS__,s_=()=>{if(typeof process>"u"||typeof process.env>"u")return;let n=process.env.__FIREBASE_DEFAULTS__;if(n)return JSON.parse(n)},o_=()=>{if(typeof document>"u")return;let n;try{n=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let t=n&&xs(n[1]);return t&&JSON.parse(t)},dc=()=>{try{return qh()||i_()||s_()||o_()}catch(n){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);return}},Xh=n=>{var t,e;return(e=(t=dc())===null||t===void 0?void 0:t.emulatorHosts)===null||e===void 0?void 0:e[n]};var hc=()=>{var n;return(n=dc())===null||n===void 0?void 0:n.config},fc=n=>{var t;return(t=dc())===null||t===void 0?void 0:t[`_${n}`]};var ln=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}wrapCallback(t){return(e,r)=>{e?this.reject(e):this.resolve(r),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(e):t(e,r))}}};function Xr(n){try{return(n.startsWith("http://")||n.startsWith("https://")?new URL(n).hostname:n).endsWith(".cloudworkstations.dev")}catch{return!1}}function Qh(n){return l(this,null,function*(){return(yield fetch(n,{credentials:"include"})).ok})}var Jr={};function a_(){let n={prod:[],emulator:[]};for(let t of Object.keys(Jr))Jr[t]?n.emulator.push(t):n.prod.push(t);return n}function c_(n){let t=document.getElementById(n),e=!1;return t||(t=document.createElement("div"),t.setAttribute("id",n),e=!0),{created:e,element:t}}var Kh=!1;function ef(n,t){if(typeof window>"u"||typeof document>"u"||!Xr(window.location.host)||Jr[n]===t||Jr[n]||Kh)return;Jr[n]=t;function e(h){return`__firebase__banner__${h}`}let r="__firebase__banner",s=a_().prod.length>0;function o(){let h=document.getElementById(r);h&&h.remove()}function a(h){h.style.display="flex",h.style.background="#7faaf0",h.style.position="fixed",h.style.bottom="5px",h.style.left="5px",h.style.padding=".5em",h.style.borderRadius="5px",h.style.alignItems="center"}function c(h,m){h.setAttribute("width","24"),h.setAttribute("id",m),h.setAttribute("height","24"),h.setAttribute("viewBox","0 0 24 24"),h.setAttribute("fill","none"),h.style.marginLeft="-6px"}function u(){let h=document.createElement("span");return h.style.cursor="pointer",h.style.marginLeft="16px",h.style.fontSize="24px",h.innerHTML=" &times;",h.onclick=()=>{Kh=!0,o()},h}function d(h,m){h.setAttribute("id",m),h.innerText="Learn more",h.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",h.setAttribute("target","__blank"),h.style.paddingLeft="5px",h.style.textDecoration="underline"}function f(){let h=c_(r),m=e("text"),I=document.getElementById(m)||document.createElement("span"),L=e("learnmore"),D=document.getElementById(L)||document.createElement("a"),T=e("preprendIcon"),k=document.getElementById(T)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(h.created){let H=h.element;a(H),d(D,L);let U=u();c(k,T),H.append(k,I,D,U),document.body.appendChild(H)}s?(I.innerText="Preview backend disconnected.",k.innerHTML=`<g clip-path="url(#clip0_6013_33858)">
3
+ <path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_6013_33858">
7
+ <rect width="24" height="24" fill="white"/>
8
+ </clipPath>
9
+ </defs>`):(k.innerHTML=`<g clip-path="url(#clip0_6083_34804)">
10
+ <path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/>
11
+ </g>
12
+ <defs>
13
+ <clipPath id="clip0_6083_34804">
14
+ <rect width="24" height="24" fill="white"/>
15
+ </clipPath>
16
+ </defs>`,I.innerText="Preview backend running in this workspace."),I.setAttribute("id",m)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",f):f()}function re(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function tf(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(re())}function nf(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function rf(){let n=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof n=="object"&&n.id!==void 0}function sf(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function of(){let n=re();return n.indexOf("MSIE ")>=0||n.indexOf("Trident/")>=0}function Us(){try{return typeof indexedDB=="object"}catch{return!1}}function af(){return new Promise((n,t)=>{try{let e=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),e||self.indexedDB.deleteDatabase(r),n(!0)},i.onupgradeneeded=()=>{e=!1},i.onerror=()=>{var s;t(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(e){t(e)}})}var u_="FirebaseError",He=class n extends Error{constructor(t,e,r){super(e),this.code=t,this.customData=r,this.name=u_,Object.setPrototypeOf(this,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,ze.prototype.create)}},ze=class{constructor(t,e,r){this.service=t,this.serviceName=e,this.errors=r}create(t,...e){let r=e[0]||{},i=`${this.service}/${t}`,s=this.errors[t],o=s?l_(s,r):"Error",a=`${this.serviceName}: ${o} (${i}).`;return new He(i,a,r)}};function l_(n,t){return n.replace(d_,(e,r)=>{let i=t[r];return i!=null?String(i):`<${r}?>`})}var d_=/\{\$([^}]+)}/g;function cf(n){for(let t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0}function Lt(n,t){if(n===t)return!0;let e=Object.keys(n),r=Object.keys(t);for(let i of e){if(!r.includes(i))return!1;let s=n[i],o=t[i];if(Yh(s)&&Yh(o)){if(!Lt(s,o))return!1}else if(s!==o)return!1}for(let i of r)if(!e.includes(i))return!1;return!0}function Yh(n){return n!==null&&typeof n=="object"}function qn(n){let t=[];for(let[e,r]of Object.entries(n))Array.isArray(r)?r.forEach(i=>{t.push(encodeURIComponent(e)+"="+encodeURIComponent(i))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function uf(n,t){let e=new uc(n,t);return e.subscribe.bind(e)}var uc=class{constructor(t,e){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(()=>{t(this)}).catch(r=>{this.error(r)})}next(t){this.forEachObserver(e=>{e.next(t)})}error(t){this.forEachObserver(e=>{e.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,e,r){let i;if(t===void 0&&e===void 0&&r===void 0)throw new Error("Missing Observer.");h_(t,["next","error","complete"])?i=t:i={next:t,error:e,complete:r},i.next===void 0&&(i.next=ac),i.error===void 0&&(i.error=ac),i.complete===void 0&&(i.complete=ac);let s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),s}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e<this.observers.length;e++)this.sendOne(e,t)}sendOne(t,e){this.task.then(()=>{if(this.observers!==void 0&&this.observers[t]!==void 0)try{e(this.observers[t])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function h_(n,t){if(typeof n!="object"||n===null)return!1;for(let e of t)if(e in n&&typeof n[e]=="function")return!0;return!1}function ac(){}var CT=14400*1e3;function xt(n){return n&&n._delegate?n._delegate:n}var Ce=class{constructor(t,e,r){this.name=t,this.instanceFactory=e,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}};var dn="[DEFAULT]";var pc=class{constructor(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){let e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){let r=new ln;if(this.instancesDeferred.set(e,r),this.isInitialized(e)||this.shouldAutoInitialize())try{let i=this.getOrInitializeService({instanceIdentifier:e});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(e).promise}getImmediate(t){var e;let r=this.normalizeInstanceIdentifier(t?.identifier),i=(e=t?.optional)!==null&&e!==void 0?e:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(p_(t))try{this.getOrInitializeService({instanceIdentifier:dn})}catch{}for(let[e,r]of this.instancesDeferred.entries()){let i=this.normalizeInstanceIdentifier(e);try{let s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(t=dn){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){return l(this,null,function*(){let t=Array.from(this.instances.values());yield Promise.all([...t.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...t.filter(e=>"_delete"in e).map(e=>e._delete())])})}isComponentSet(){return this.component!=null}isInitialized(t=dn){return this.instances.has(t)}getOptions(t=dn){return this.instancesOptions.get(t)||{}}initialize(t={}){let{options:e={}}=t,r=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let i=this.getOrInitializeService({instanceIdentifier:r,options:e});for(let[s,o]of this.instancesDeferred.entries()){let a=this.normalizeInstanceIdentifier(s);r===a&&o.resolve(i)}return i}onInit(t,e){var r;let i=this.normalizeInstanceIdentifier(e),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(t),this.onInitCallbacks.set(i,s);let o=this.instances.get(i);return o&&t(o,i),()=>{s.delete(t)}}invokeOnInitCallbacks(t,e){let r=this.onInitCallbacks.get(e);if(r)for(let i of r)try{i(t,e)}catch{}}getOrInitializeService({instanceIdentifier:t,options:e={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:f_(t),options:e}),this.instances.set(t,r),this.instancesOptions.set(t,e),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch{}return r||null}normalizeInstanceIdentifier(t=dn){return this.component?this.component.multipleInstances?t:dn:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function f_(n){return n===dn?void 0:n}function p_(n){return n.instantiationMode==="EAGER"}var Vs=class{constructor(t){this.name=t,this.providers=new Map}addComponent(t){let e=this.getProvider(t.name);if(e.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);e.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);let e=new pc(t,this);return this.providers.set(t,e),e}getProviders(){return Array.from(this.providers.values())}};var g_=[],F=(function(n){return n[n.DEBUG=0]="DEBUG",n[n.VERBOSE=1]="VERBOSE",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.SILENT=5]="SILENT",n})(F||{}),m_={debug:F.DEBUG,verbose:F.VERBOSE,info:F.INFO,warn:F.WARN,error:F.ERROR,silent:F.SILENT},v_=F.INFO,y_={[F.DEBUG]:"log",[F.VERBOSE]:"log",[F.INFO]:"info",[F.WARN]:"warn",[F.ERROR]:"error"},__=(n,t,...e)=>{if(t<n.logLevel)return;let r=new Date().toISOString(),i=y_[t];if(i)console[i](`[${r}] ${n.name}:`,...e);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)},Ut=class{constructor(t){this.name=t,this._logLevel=v_,this._logHandler=__,this._userLogHandler=null,g_.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in F))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?m_[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,F.DEBUG,...t),this._logHandler(this,F.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,F.VERBOSE,...t),this._logHandler(this,F.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,F.INFO,...t),this._logHandler(this,F.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,F.WARN,...t),this._logHandler(this,F.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,F.ERROR,...t),this._logHandler(this,F.ERROR,...t)}};var E_=(n,t)=>t.some(e=>n instanceof e),lf,df;function D_(){return lf||(lf=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function w_(){return df||(df=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var hf=new WeakMap,mc=new WeakMap,ff=new WeakMap,gc=new WeakMap,yc=new WeakMap;function C_(n){let t=new Promise((e,r)=>{let i=()=>{n.removeEventListener("success",s),n.removeEventListener("error",o)},s=()=>{e(nt(n.result)),i()},o=()=>{r(n.error),i()};n.addEventListener("success",s),n.addEventListener("error",o)});return t.then(e=>{e instanceof IDBCursor&&hf.set(e,n)}).catch(()=>{}),yc.set(t,n),t}function I_(n){if(mc.has(n))return;let t=new Promise((e,r)=>{let i=()=>{n.removeEventListener("complete",s),n.removeEventListener("error",o),n.removeEventListener("abort",o)},s=()=>{e(),i()},o=()=>{r(n.error||new DOMException("AbortError","AbortError")),i()};n.addEventListener("complete",s),n.addEventListener("error",o),n.addEventListener("abort",o)});mc.set(n,t)}var vc={get(n,t,e){if(n instanceof IDBTransaction){if(t==="done")return mc.get(n);if(t==="objectStoreNames")return n.objectStoreNames||ff.get(n);if(t==="store")return e.objectStoreNames[1]?void 0:e.objectStore(e.objectStoreNames[0])}return nt(n[t])},set(n,t,e){return n[t]=e,!0},has(n,t){return n instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in n}};function pf(n){vc=n(vc)}function b_(n){return n===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...e){let r=n.call(Bs(this),t,...e);return ff.set(r,t.sort?t.sort():[t]),nt(r)}:w_().includes(n)?function(...t){return n.apply(Bs(this),t),nt(hf.get(this))}:function(...t){return nt(n.apply(Bs(this),t))}}function A_(n){return typeof n=="function"?b_(n):(n instanceof IDBTransaction&&I_(n),E_(n,D_())?new Proxy(n,vc):n)}function nt(n){if(n instanceof IDBRequest)return C_(n);if(gc.has(n))return gc.get(n);let t=A_(n);return t!==n&&(gc.set(n,t),yc.set(t,n)),t}var Bs=n=>yc.get(n);function mf(n,t,{blocked:e,upgrade:r,blocking:i,terminated:s}={}){let o=indexedDB.open(n,t),a=nt(o);return r&&o.addEventListener("upgradeneeded",c=>{r(nt(o.result),c.oldVersion,c.newVersion,nt(o.transaction),c)}),e&&o.addEventListener("blocked",c=>e(c.oldVersion,c.newVersion,c)),a.then(c=>{s&&c.addEventListener("close",()=>s()),i&&c.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}var T_=["get","getKey","getAll","getAllKeys","count"],S_=["put","add","delete","clear"],_c=new Map;function gf(n,t){if(!(n instanceof IDBDatabase&&!(t in n)&&typeof t=="string"))return;if(_c.get(t))return _c.get(t);let e=t.replace(/FromIndex$/,""),r=t!==e,i=S_.includes(e);if(!(e in(r?IDBIndex:IDBObjectStore).prototype)||!(i||T_.includes(e)))return;let s=function(o,...a){return l(this,null,function*(){let c=this.transaction(o,i?"readwrite":"readonly"),u=c.store;return r&&(u=u.index(a.shift())),(yield Promise.all([u[e](...a),i&&c.done]))[0]})};return _c.set(t,s),s}pf(n=>S(g({},n),{get:(t,e,r)=>gf(t,e)||n.get(t,e,r),has:(t,e)=>!!gf(t,e)||n.has(t,e)}));var Dc=class{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(R_(e)){let r=e.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(e=>e).join(" ")}};function R_(n){let t=n.getComponent();return t?.type==="VERSION"}var wc="@firebase/app",vf="0.13.2";var yt=new Ut("@firebase/app"),O_="@firebase/app-compat",P_="@firebase/analytics-compat",M_="@firebase/analytics",k_="@firebase/app-check-compat",N_="@firebase/app-check",F_="@firebase/auth",L_="@firebase/auth-compat",x_="@firebase/database",U_="@firebase/data-connect",V_="@firebase/database-compat",B_="@firebase/functions",j_="@firebase/functions-compat",$_="@firebase/installations",H_="@firebase/installations-compat",z_="@firebase/messaging",W_="@firebase/messaging-compat",G_="@firebase/performance",q_="@firebase/performance-compat",K_="@firebase/remote-config",Y_="@firebase/remote-config-compat",Z_="@firebase/storage",J_="@firebase/storage-compat",X_="@firebase/firestore",Q_="@firebase/ai",eE="@firebase/firestore-compat",tE="firebase",nE="11.10.0";var Cc="[DEFAULT]",rE={[wc]:"fire-core",[O_]:"fire-core-compat",[M_]:"fire-analytics",[P_]:"fire-analytics-compat",[N_]:"fire-app-check",[k_]:"fire-app-check-compat",[F_]:"fire-auth",[L_]:"fire-auth-compat",[x_]:"fire-rtdb",[U_]:"fire-data-connect",[V_]:"fire-rtdb-compat",[B_]:"fire-fn",[j_]:"fire-fn-compat",[$_]:"fire-iid",[H_]:"fire-iid-compat",[z_]:"fire-fcm",[W_]:"fire-fcm-compat",[G_]:"fire-perf",[q_]:"fire-perf-compat",[K_]:"fire-rc",[Y_]:"fire-rc-compat",[Z_]:"fire-gcs",[J_]:"fire-gcs-compat",[X_]:"fire-fst",[eE]:"fire-fst-compat",[Q_]:"fire-vertex","fire-js":"fire-js",[tE]:"fire-js-all"};var Qr=new Map,iE=new Map,Ic=new Map;function yf(n,t){try{n.container.addComponent(t)}catch(e){yt.debug(`Component ${t.name} failed to register with FirebaseApp ${n.name}`,e)}}function _t(n){let t=n.name;if(Ic.has(t))return yt.debug(`There were multiple attempts to register component ${t}.`),!1;Ic.set(t,n);for(let e of Qr.values())yf(e,n);for(let e of iE.values())yf(e,n);return!0}function js(n,t){let e=n.container.getProvider("heartbeat").getImmediate({optional:!0});return e&&e.triggerHeartbeat(),n.container.getProvider(t)}function We(n){return n==null?!1:n.settings!==void 0}var sE={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Vt=new ze("app","Firebase",sE);var bc=class{constructor(t,e,r){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},e),this._name=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Ce("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw Vt.create("app-deleted",{appName:this._name})}};var Kn=nE;function Sc(n,t={}){let e=n;typeof t!="object"&&(t={name:t});let r=Object.assign({name:Cc,automaticDataCollectionEnabled:!0},t),i=r.name;if(typeof i!="string"||!i)throw Vt.create("bad-app-name",{appName:String(i)});if(e||(e=hc()),!e)throw Vt.create("no-options");let s=Qr.get(i);if(s){if(Lt(e,s.options)&&Lt(r,s.config))return s;throw Vt.create("duplicate-app",{appName:i})}let o=new Vs(i);for(let c of Ic.values())o.addComponent(c);let a=new bc(e,r,o);return Qr.set(i,a),a}function ti(n=Cc){let t=Qr.get(n);if(!t&&n===Cc&&hc())return Sc();if(!t)throw Vt.create("no-app",{appName:n});return t}function $s(){return Array.from(Qr.values())}function te(n,t,e){var r;let i=(r=rE[n])!==null&&r!==void 0?r:n;e&&(i+=`-${e}`);let s=i.match(/\s|\//),o=t.match(/\s|\//);if(s||o){let a=[`Unable to register library "${i}" with version "${t}":`];s&&a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&a.push("and"),o&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),yt.warn(a.join(" "));return}_t(new Ce(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}var oE="firebase-heartbeat-database",aE=1,ei="firebase-heartbeat-store",Ec=null;function wf(){return Ec||(Ec=mf(oE,aE,{upgrade:(n,t)=>{switch(t){case 0:try{n.createObjectStore(ei)}catch(e){console.warn(e)}}}}).catch(n=>{throw Vt.create("idb-open",{originalErrorMessage:n.message})})),Ec}function cE(n){return l(this,null,function*(){try{let e=(yield wf()).transaction(ei),r=yield e.objectStore(ei).get(Cf(n));return yield e.done,r}catch(t){if(t instanceof He)yt.warn(t.message);else{let e=Vt.create("idb-get",{originalErrorMessage:t?.message});yt.warn(e.message)}}})}function _f(n,t){return l(this,null,function*(){try{let r=(yield wf()).transaction(ei,"readwrite");yield r.objectStore(ei).put(t,Cf(n)),yield r.done}catch(e){if(e instanceof He)yt.warn(e.message);else{let r=Vt.create("idb-set",{originalErrorMessage:e?.message});yt.warn(r.message)}}})}function Cf(n){return`${n.name}!${n.options.appId}`}var uE=1024,lE=30,Ac=class{constructor(t){this.container=t,this._heartbeatsCache=null;let e=this.container.getProvider("app").getImmediate();this._storage=new Tc(e),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}triggerHeartbeat(){return l(this,null,function*(){var t,e;try{let i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=Ef();if(((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s))return;if(this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats.length>lE){let o=hE(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(o,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(r){yt.warn(r)}})}getHeartbeatsHeader(){return l(this,null,function*(){var t;try{if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let e=Ef(),{heartbeatsToSend:r,unsentEntries:i}=dE(this._heartbeatsCache.heartbeats),s=lc(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=e,i.length>0?(this._heartbeatsCache.heartbeats=i,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(e){return yt.warn(e),""}})}};function Ef(){return new Date().toISOString().substring(0,10)}function dE(n,t=uE){let e=[],r=n.slice();for(let i of n){let s=e.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),Df(e)>t){s.dates.pop();break}}else if(e.push({agent:i.agent,dates:[i.date]}),Df(e)>t){e.pop();break}r=r.slice(1)}return{heartbeatsToSend:e,unsentEntries:r}}var Tc=class{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return l(this,null,function*(){return Us()?af().then(()=>!0).catch(()=>!1):!1})}read(){return l(this,null,function*(){if(yield this._canUseIndexedDBPromise){let e=yield cE(this.app);return e?.heartbeats?e:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(t){return l(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let i=yield this.read();return _f(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:i.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return})}add(t){return l(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let i=yield this.read();return _f(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...t.heartbeats]})}else return})}};function Df(n){return lc(JSON.stringify({version:2,heartbeats:n})).length}function hE(n){if(n.length===0)return-1;let t=0,e=n[0].date;for(let r=1;r<n.length;r++)n[r].date<e&&(e=n[r].date,t=r);return t}function fE(n){_t(new Ce("platform-logger",t=>new Dc(t),"PRIVATE")),_t(new Ce("heartbeat",t=>new Ac(t),"PRIVATE")),te(wc,vf,n),te(wc,vf,"esm2017"),te("fire-js","")}fE("");var pE="firebase",gE="11.10.0";te(pE,gE,"app");var Zn=new nr("ANGULARFIRE2_VERSION");function Rc(n,t,e){if(t){if(t.length===1)return t[0];let s=t.filter(o=>o.app===e);if(s.length===1)return s[0]}return e.container.getProvider(n).getImmediate({optional:!0})}var zs=(n,t)=>{let e=t?[t]:$s(),r=[];return e.forEach(i=>{i.container.getProvider(n).instances.forEach(o=>{r.includes(o)||r.push(o)})}),r},Yn=(function(n){return n[n.SILENT=0]="SILENT",n[n.WARN=1]="WARN",n[n.VERBOSE=2]="VERBOSE",n})(Yn||{}),If=Bo()&&typeof Zone<"u"?Yn.WARN:Yn.SILENT;var Hs=class{zone;delegate;constructor(t,e=wu){this.zone=t,this.delegate=e}now(){return this.delegate.now()}schedule(t,e,r){let i=this.zone,s=function(o){i?i.runGuarded(()=>{t.apply(this,[o])}):t.apply(this,[o])};return this.delegate.schedule(s,e,r)}},Jn=(()=>{class n{outsideAngular;insideAngular;constructor(){let e=p(Y);this.outsideAngular=e.runOutsideAngular(()=>new Hs(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=e.run(()=>new Hs(typeof Zone>"u"?void 0:Zone.current,Du))}static \u0275fac=function(r){return new(r||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),bf=!1;function mE(n,t){!bf&&(If>Yn.SILENT||Bo())&&(bf=!0,console.warn("Calling Firebase APIs outside of an Injection context may destabilize your application leading to subtle change-detection and hydration bugs. Find more at https://github.com/angular/angularfire/blob/main/docs/zones.md")),If>=t&&console.warn(`Firebase API called outside injection context: ${n.name}`)}function vE(n){let t=p(Y,{optional:!0});return t?t.runOutsideAngular(()=>n()):n()}function hn(n){let t=p(Y,{optional:!0});return t?t.run(()=>n()):n()}var yE=(n,t,e)=>(...r)=>(t&&setTimeout(t,0),X(e,()=>hn(()=>n.apply(void 0,r)))),fn=(n,t,e)=>(e||=t?Yn.WARN:Yn.VERBOSE,function(){let r,i=arguments,s,o,a;try{s=p(Jn),o=p(Kt),a=p(Le)}catch{return mE(n,e),n.apply(this,i)}for(let u=0;u<arguments.length;u++)typeof i[u]=="function"&&(t&&(r||=hn(()=>o.add())),i[u]=yE(i[u],r,a));let c=vE(()=>n.apply(this,i));return t?c instanceof Ie?c.pipe(yo(s.outsideAngular),vo(s.insideAngular),dh(a)):c instanceof Promise?hn(()=>{let u=o.add();return new Promise((d,f)=>{c.then(h=>X(a,()=>hn(()=>d(h))),h=>X(a,()=>hn(()=>f(h)))).finally(u)})}):typeof c=="function"&&r?function(){return setTimeout(r,0),c.apply(this,arguments)}:hn(()=>c):c instanceof Ie?c.pipe(yo(s.outsideAngular),vo(s.insideAngular)):hn(()=>c)});var pn=class{constructor(t){return t}},ni=class{constructor(){return $s()}};function _E(n){return n&&n.length===1?n[0]:new pn(ti())}var Oc=new C("angularfire2._apps"),EE={provide:pn,useFactory:_E,deps:[[new It,Oc]]},DE={provide:ni,deps:[[new It,Oc]]};function wE(n){return(t,e)=>{let r=e.get(wn);te("angularfire",Zn.full,"core"),te("angularfire",Zn.full,"app"),te("angular",Mu.full,r.toString());let i=t.runOutsideAngular(()=>n(e));return new pn(i)}}function dS(n,...t){return Fe([EE,DE,{provide:Oc,useFactory:wE(n),multi:!0,deps:[Y,q,Jn,...t]}])}var hS=fn(Sc,!0);var CE=new Map,IE={activated:!1,tokenObservers:[]},bE={initialized:!1,enabled:!1};function Ge(n){return CE.get(n)||Object.assign({},IE)}function Rf(){return bE}var AE="https://content-firebaseappcheck.googleapis.com/v1";var TE="exchangeDebugToken",Af={OFFSET_DURATION:300*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:960*1e3},DS=1440*60*1e3;var kc=class{constructor(t,e,r,i,s){if(this.operation=t,this.retryPolicy=e,this.getWaitDuration=r,this.lowerBound=i,this.upperBound=s,this.pending=null,this.nextErrorWaitInterval=i,i>s)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(t){return l(this,null,function*(){this.stop();try{this.pending=new ln,this.pending.promise.catch(e=>{}),yield SE(this.getNextRun(t)),this.pending.resolve(),yield this.pending.promise,this.pending=new ln,this.pending.promise.catch(e=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(t){if(t)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}};function SE(n){return new Promise(t=>{setTimeout(t,n)})}var RE={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},Bt=new ze("appCheck","AppCheck",RE);function Of(n){if(!Ge(n).activated)throw Bt.create("use-before-activation",{appName:n.name})}function Pf(r,i){return l(this,arguments,function*({url:n,body:t},e){let s={"Content-Type":"application/json"},o=e.getImmediate({optional:!0});if(o){let m=yield o.getHeartbeatsHeader();m&&(s["X-Firebase-Client"]=m)}let a={method:"POST",body:JSON.stringify(t),headers:s},c;try{c=yield fetch(n,a)}catch(m){throw Bt.create("fetch-network-error",{originalErrorMessage:m?.message})}if(c.status!==200)throw Bt.create("fetch-status-error",{httpStatus:c.status});let u;try{u=yield c.json()}catch(m){throw Bt.create("fetch-parse-error",{originalErrorMessage:m?.message})}let d=u.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw Bt.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${u.ttl}`});let f=Number(d[1])*1e3,h=Date.now();return{token:u.token,expireTimeMillis:h+f,issuedAtTimeMillis:h}})}function Mf(n,t){let{projectId:e,appId:r,apiKey:i}=n.options;return{url:`${AE}/projects/${e}/apps/${r}:${TE}?key=${i}`,body:{debug_token:t}}}var OE="firebase-app-check-database",PE=1,Nc="firebase-app-check-store";var Ws=null;function ME(){return Ws||(Ws=new Promise((n,t)=>{try{let e=indexedDB.open(OE,PE);e.onsuccess=r=>{n(r.target.result)},e.onerror=r=>{var i;t(Bt.create("storage-open",{originalErrorMessage:(i=r.target.error)===null||i===void 0?void 0:i.message}))},e.onupgradeneeded=r=>{let i=r.target.result;switch(r.oldVersion){case 0:i.createObjectStore(Nc,{keyPath:"compositeKey"})}}}catch(e){t(Bt.create("storage-open",{originalErrorMessage:e?.message}))}}),Ws)}function kE(n,t){return NE(FE(n),t)}function NE(n,t){return l(this,null,function*(){let r=(yield ME()).transaction(Nc,"readwrite"),s=r.objectStore(Nc).put({compositeKey:n,value:t});return new Promise((o,a)=>{s.onsuccess=c=>{o()},r.onerror=c=>{var u;a(Bt.create("storage-set",{originalErrorMessage:(u=c.target.error)===null||u===void 0?void 0:u.message}))}})})}function FE(n){return`${n.options.appId}-${n.name}`}var ri=new Ut("@firebase/app-check");function Pc(n,t){return Us()?kE(n,t).catch(e=>{ri.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}function kf(){return Rf().enabled}function Nf(){return l(this,null,function*(){let n=Rf();if(n.enabled&&n.token)return n.token.promise;throw Error(`
17
+ Can't get debug token in production mode.
18
+ `)})}var LE={error:"UNKNOWN_ERROR"};function xE(n){return Ls.encodeString(JSON.stringify(n),!1)}function Fc(n,t=!1,e=!1){return l(this,null,function*(){let r=n.app;Of(r);let i=Ge(r),s=i.token,o;if(s&&!ii(s)&&(i.token=void 0,s=void 0),!s){let u=yield i.cachedTokenPromise;u&&(ii(u)?s=u:yield Pc(r,void 0))}if(!t&&s&&ii(s))return{token:s.token};let a=!1;if(kf())try{i.exchangeTokenPromise||(i.exchangeTokenPromise=Pf(Mf(r,yield Nf()),n.heartbeatServiceProvider).finally(()=>{i.exchangeTokenPromise=void 0}),a=!0);let u=yield i.exchangeTokenPromise;return yield Pc(r,u),i.token=u,{token:u.token}}catch(u){return u.code==="appCheck/throttled"||u.code==="appCheck/initial-throttle"?ri.warn(u.message):e&&ri.error(u),Mc(u)}try{i.exchangeTokenPromise||(i.exchangeTokenPromise=i.provider.getToken().finally(()=>{i.exchangeTokenPromise=void 0}),a=!0),s=yield Ge(r).exchangeTokenPromise}catch(u){u.code==="appCheck/throttled"||u.code==="appCheck/initial-throttle"?ri.warn(u.message):e&&ri.error(u),o=u}let c;return s?o?ii(s)?c={token:s.token,internalError:o}:c=Mc(o):(c={token:s.token},i.token=s,yield Pc(r,s)):c=Mc(o),a&&jE(r,c),c})}function UE(n){return l(this,null,function*(){let t=n.app;Of(t);let{provider:e}=Ge(t);if(kf()){let r=yield Nf(),{token:i}=yield Pf(Mf(t,r),n.heartbeatServiceProvider);return{token:i}}else{let{token:r}=yield e.getToken();return{token:r}}})}function VE(n,t,e,r){let{app:i}=n,s=Ge(i),o={next:e,error:r,type:t};if(s.tokenObservers=[...s.tokenObservers,o],s.token&&ii(s.token)){let a=s.token;Promise.resolve().then(()=>{e({token:a.token}),Tf(n)}).catch(()=>{})}s.cachedTokenPromise.then(()=>Tf(n))}function Ff(n,t){let e=Ge(n),r=e.tokenObservers.filter(i=>i.next!==t);r.length===0&&e.tokenRefresher&&e.tokenRefresher.isRunning()&&e.tokenRefresher.stop(),e.tokenObservers=r}function Tf(n){let{app:t}=n,e=Ge(t),r=e.tokenRefresher;r||(r=BE(n),e.tokenRefresher=r),!r.isRunning()&&e.isTokenAutoRefreshEnabled&&r.start()}function BE(n){let{app:t}=n;return new kc(()=>l(null,null,function*(){let e=Ge(t),r;if(e.token?r=yield Fc(n,!0):r=yield Fc(n),r.error)throw r.error;if(r.internalError)throw r.internalError}),()=>!0,()=>{let e=Ge(t);if(e.token){let r=e.token.issuedAtTimeMillis+(e.token.expireTimeMillis-e.token.issuedAtTimeMillis)*.5+3e5,i=e.token.expireTimeMillis-300*1e3;return r=Math.min(r,i),Math.max(0,r-Date.now())}else return 0},Af.RETRIAL_MIN_WAIT,Af.RETRIAL_MAX_WAIT)}function jE(n,t){let e=Ge(n).tokenObservers;for(let r of e)try{r.type==="EXTERNAL"&&t.error!=null?r.error(t.error):r.next(t)}catch{}}function ii(n){return n.expireTimeMillis-Date.now()>0}function Mc(n){return{token:xE(LE),error:n}}var Lc=class{constructor(t,e){this.app=t,this.heartbeatServiceProvider=e}_delete(){let{tokenObservers:t}=Ge(this.app);for(let e of t)Ff(this.app,e.next);return Promise.resolve()}};function $E(n,t){return new Lc(n,t)}function HE(n){return{getToken:t=>Fc(n,t),getLimitedUseToken:()=>UE(n),addTokenListener:t=>VE(n,"INTERNAL",t),removeTokenListener:t=>Ff(n.app,t)}}var zE="@firebase/app-check",WE="0.10.1";var GE="app-check",Sf="app-check-internal";function qE(){_t(new Ce(GE,n=>{let t=n.getProvider("app").getImmediate(),e=n.getProvider("heartbeat");return $E(t,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((n,t,e)=>{n.getProvider(Sf).initialize()})),_t(new Ce(Sf,n=>{let t=n.getProvider("app-check").getImmediate();return HE(t)},"PUBLIC").setInstantiationMode("EXPLICIT")),te(zE,WE)}qE();var KE="app-check";var Gs=class{constructor(){return zs(KE)}};var YE=["localhost","0.0.0.0","127.0.0.1"],NS=typeof window<"u"&&YE.includes(window.location.hostname);function Zf(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}var Jf=Zf,Xf=new ze("auth","Firebase",Zf());var Xs=new Ut("@firebase/auth");function ZE(n,...t){Xs.logLevel<=F.WARN&&Xs.warn(`Auth (${Kn}): ${n}`,...t)}function Ks(n,...t){Xs.logLevel<=F.ERROR&&Xs.error(`Auth (${Kn}): ${n}`,...t)}function it(n,...t){throw eu(n,...t)}function qe(n,...t){return eu(n,...t)}function Qc(n,t,e){let r=Object.assign(Object.assign({},Jf()),{[t]:e});return new ze("auth","Firebase",r).create(t,{appName:n.name})}function gn(n){return Qc(n,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function JE(n,t,e){let r=e;if(!(t instanceof r))throw r.name!==t.constructor.name&&it(n,"argument-error"),Qc(n,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function eu(n,...t){if(typeof n!="string"){let e=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=n.name),n._errorFactory.create(e,...r)}return Xf.create(n,...t)}function b(n,t,...e){if(!n)throw eu(t,...e)}function Et(n){let t="INTERNAL ASSERTION FAILED: "+n;throw Ks(t),new Error(t)}function wt(n,t){n||Et(t)}function Vc(){var n;return typeof self<"u"&&((n=self.location)===null||n===void 0?void 0:n.href)||""}function XE(){return Lf()==="http:"||Lf()==="https:"}function Lf(){var n;return typeof self<"u"&&((n=self.location)===null||n===void 0?void 0:n.protocol)||null}function QE(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(XE()||rf()||"connection"in navigator)?navigator.onLine:!0}function eD(){if(typeof navigator>"u")return null;let n=navigator;return n.languages&&n.languages[0]||n.language||null}var mn=class{constructor(t,e){this.shortDelay=t,this.longDelay=e,wt(e>t,"Short delay should be less than long delay!"),this.isMobile=tf()||sf()}get(){return QE()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function tu(n,t){wt(n.emulator,"Emulator should always be set here");let{url:e}=n.emulator;return t?`${e}${t.startsWith("/")?t.slice(1):t}`:e}var Qs=class{static initialize(t,e,r){this.fetchImpl=t,e&&(this.headersImpl=e),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Et("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Et("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Et("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var tD={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};var nD=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],rD=new mn(3e4,6e4);function nu(n,t){return n.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:n.tenantId}):t}function Qn(s,o,a,c){return l(this,arguments,function*(n,t,e,r,i={}){return Qf(n,i,()=>l(null,null,function*(){let u={},d={};r&&(t==="GET"?d=r:u={body:JSON.stringify(r)});let f=qn(Object.assign({key:n.config.apiKey},d)).slice(1),h=yield n._getAdditionalHeaders();h["Content-Type"]="application/json",n.languageCode&&(h["X-Firebase-Locale"]=n.languageCode);let m=Object.assign({method:t,headers:h},u);return nf()||(m.referrerPolicy="no-referrer"),n.emulatorConfig&&Xr(n.emulatorConfig.host)&&(m.credentials="include"),Qs.fetch()(yield ep(n,n.config.apiHost,e,f),m)}))})}function Qf(n,t,e){return l(this,null,function*(){n._canInitEmulator=!1;let r=Object.assign(Object.assign({},tD),t);try{let i=new Bc(n),s=yield Promise.race([e(),i.promise]);i.clearNetworkTimeout();let o=yield s.json();if("needConfirmation"in o)throw qs(n,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{let a=s.ok?o.errorMessage:o.error.message,[c,u]=a.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw qs(n,"credential-already-in-use",o);if(c==="EMAIL_EXISTS")throw qs(n,"email-already-in-use",o);if(c==="USER_DISABLED")throw qs(n,"user-disabled",o);let d=r[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw Qc(n,d,u);it(n,d)}}catch(i){if(i instanceof He)throw i;it(n,"network-request-failed",{message:String(i)})}})}function iD(s,o,a,c){return l(this,arguments,function*(n,t,e,r,i={}){let u=yield Qn(n,t,e,r,i);return"mfaPendingCredential"in u&&it(n,"multi-factor-auth-required",{_serverResponse:u}),u})}function ep(n,t,e,r){return l(this,null,function*(){let i=`${t}${e}?${r}`,s=n,o=s.config.emulator?tu(n.config,i):`${n.config.apiScheme}://${i}`;return nD.includes(e)&&(yield s._persistenceManagerAvailable,s._getPersistenceType()==="COOKIE")?s._getPersistence()._getFinalTarget(o).toString():o})}var Bc=class{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((e,r)=>{this.timer=setTimeout(()=>r(qe(this.auth,"network-request-failed")),rD.get())})}};function qs(n,t,e){let r={appName:n.name};e.email&&(r.email=e.email),e.phoneNumber&&(r.phoneNumber=e.phoneNumber);let i=qe(n,t,r);return i.customData._tokenResponse=e,i}function sD(n,t){return l(this,null,function*(){return Qn(n,"POST","/v1/accounts:delete",t)})}function eo(n,t){return l(this,null,function*(){return Qn(n,"POST","/v1/accounts:lookup",t)})}function si(n){if(n)try{let t=new Date(Number(n));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}function ru(n,t=!1){return l(this,null,function*(){let e=xt(n),r=yield e.getIdToken(t),i=iu(r);b(i&&i.exp&&i.auth_time&&i.iat,e.auth,"internal-error");let s=typeof i.firebase=="object"?i.firebase:void 0,o=s?.sign_in_provider;return{claims:i,token:r,authTime:si(xc(i.auth_time)),issuedAtTime:si(xc(i.iat)),expirationTime:si(xc(i.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}})}function xc(n){return Number(n)*1e3}function iu(n){let[t,e,r]=n.split(".");if(t===void 0||e===void 0||r===void 0)return Ks("JWT malformed, contained fewer than 3 sections"),null;try{let i=xs(e);return i?JSON.parse(i):(Ks("Failed to decode base64 JWT payload"),null)}catch(i){return Ks("Caught error parsing JWT payload as JSON",i?.toString()),null}}function xf(n){let t=iu(n);return b(t,"internal-error"),b(typeof t.exp<"u","internal-error"),b(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}function ai(n,t,e=!1){return l(this,null,function*(){if(e)return t;try{return yield t}catch(r){throw r instanceof He&&oD(r)&&n.auth.currentUser===n&&(yield n.auth.signOut()),r}})}function oD({code:n}){return n==="auth/user-disabled"||n==="auth/user-token-expired"}var jc=class{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){var e;if(t){let r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;let i=((e=this.user.stsTokenManager.expirationTime)!==null&&e!==void 0?e:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(t=!1){if(!this.isRunning)return;let e=this.getInterval(t);this.timerId=setTimeout(()=>l(this,null,function*(){yield this.iteration()}),e)}iteration(){return l(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(t){t?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}};var ci=class{constructor(t,e){this.createdAt=t,this.lastLoginAt=e,this._initializeTime()}_initializeTime(){this.lastSignInTime=si(this.lastLoginAt),this.creationTime=si(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};function to(n){return l(this,null,function*(){var t;let e=n.auth,r=yield n.getIdToken(),i=yield ai(n,eo(e,{idToken:r}));b(i?.users.length,e,"internal-error");let s=i.users[0];n._notifyReloadListener(s);let o=!((t=s.providerUserInfo)===null||t===void 0)&&t.length?tp(s.providerUserInfo):[],a=aD(n.providerData,o),c=n.isAnonymous,u=!(n.email&&s.passwordHash)&&!a?.length,d=c?u:!1,f={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:a,metadata:new ci(s.createdAt,s.lastLoginAt),isAnonymous:d};Object.assign(n,f)})}function su(n){return l(this,null,function*(){let t=xt(n);yield to(t),yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)})}function aD(n,t){return[...n.filter(r=>!t.some(i=>i.providerId===r.providerId)),...t]}function tp(n){return n.map(t=>{var{providerId:e}=t,r=mi(t,["providerId"]);return{providerId:e,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}function cD(n,t){return l(this,null,function*(){let e=yield Qf(n,{},()=>l(null,null,function*(){let r=qn({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:s}=n.config,o=yield ep(n,i,"/v1/token",`key=${s}`),a=yield n._getAdditionalHeaders();a["Content-Type"]="application/x-www-form-urlencoded";let c={method:"POST",headers:a,body:r};return n.emulatorConfig&&Xr(n.emulatorConfig.host)&&(c.credentials="include"),Qs.fetch()(o,c)}));return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token}})}function uD(n,t){return l(this,null,function*(){return Qn(n,"POST","/v2/accounts:revokeToken",nu(n,t))})}var oi=class n{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){b(t.idToken,"internal-error"),b(typeof t.idToken<"u","internal-error"),b(typeof t.refreshToken<"u","internal-error");let e="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):xf(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,e)}updateFromIdToken(t){b(t.length!==0,"internal-error");let e=xf(t);this.updateTokensAndExpiration(t,null,e)}getToken(t,e=!1){return l(this,null,function*(){return!e&&this.accessToken&&!this.isExpired?this.accessToken:(b(this.refreshToken,t,"user-token-expired"),this.refreshToken?(yield this.refresh(t,this.refreshToken),this.accessToken):null)})}clearRefreshToken(){this.refreshToken=null}refresh(t,e){return l(this,null,function*(){let{accessToken:r,refreshToken:i,expiresIn:s}=yield cD(t,e);this.updateTokensAndExpiration(r,i,Number(s))})}updateTokensAndExpiration(t,e,r){this.refreshToken=e||null,this.accessToken=t||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(t,e){let{refreshToken:r,accessToken:i,expirationTime:s}=e,o=new n;return r&&(b(typeof r=="string","internal-error",{appName:t}),o.refreshToken=r),i&&(b(typeof i=="string","internal-error",{appName:t}),o.accessToken=i),s&&(b(typeof s=="number","internal-error",{appName:t}),o.expirationTime=s),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new n,this.toJSON())}_performRefresh(){return Et("not implemented")}};function jt(n,t){b(typeof n=="string"||typeof n>"u","internal-error",{appName:t})}var $t=class n{constructor(t){var{uid:e,auth:r,stsTokenManager:i}=t,s=mi(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new jc(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new ci(s.createdAt||void 0,s.lastLoginAt||void 0)}getIdToken(t){return l(this,null,function*(){let e=yield ai(this,this.stsTokenManager.getToken(this.auth,t));return b(e,this.auth,"internal-error"),this.accessToken!==e&&(this.accessToken=e,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),e})}getIdTokenResult(t){return ru(this,t)}reload(){return su(this)}_assign(t){this!==t&&(b(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(e=>Object.assign({},e)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){let e=new n(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return e.metadata._copy(this.metadata),e}_onReload(t){b(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(t,e=!1){return l(this,null,function*(){let r=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),e&&(yield to(this)),yield this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)})}delete(){return l(this,null,function*(){if(We(this.auth.app))return Promise.reject(gn(this.auth));let t=yield this.getIdToken();return yield ai(this,sD(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>Object.assign({},t)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,e){var r,i,s,o,a,c,u,d;let f=(r=e.displayName)!==null&&r!==void 0?r:void 0,h=(i=e.email)!==null&&i!==void 0?i:void 0,m=(s=e.phoneNumber)!==null&&s!==void 0?s:void 0,I=(o=e.photoURL)!==null&&o!==void 0?o:void 0,L=(a=e.tenantId)!==null&&a!==void 0?a:void 0,D=(c=e._redirectEventId)!==null&&c!==void 0?c:void 0,T=(u=e.createdAt)!==null&&u!==void 0?u:void 0,k=(d=e.lastLoginAt)!==null&&d!==void 0?d:void 0,{uid:H,emailVerified:U,isAnonymous:ge,providerData:ke,stsTokenManager:gi}=e;b(H&&gi,t,"internal-error");let Sp=oi.fromJSON(this.name,gi);b(typeof H=="string",t,"internal-error"),jt(f,t.name),jt(h,t.name),b(typeof U=="boolean",t,"internal-error"),b(typeof ge=="boolean",t,"internal-error"),jt(m,t.name),jt(I,t.name),jt(L,t.name),jt(D,t.name),jt(T,t.name),jt(k,t.name);let po=new n({uid:H,auth:t,email:h,emailVerified:U,displayName:f,isAnonymous:ge,photoURL:I,phoneNumber:m,tenantId:L,stsTokenManager:Sp,createdAt:T,lastLoginAt:k});return ke&&Array.isArray(ke)&&(po.providerData=ke.map(Rp=>Object.assign({},Rp))),D&&(po._redirectEventId=D),po}static _fromIdTokenResponse(t,e,r=!1){return l(this,null,function*(){let i=new oi;i.updateFromServerResponse(e);let s=new n({uid:e.localId,auth:t,stsTokenManager:i,isAnonymous:r});return yield to(s),s})}static _fromGetAccountInfoResponse(t,e,r){return l(this,null,function*(){let i=e.users[0];b(i.localId!==void 0,"internal-error");let s=i.providerUserInfo!==void 0?tp(i.providerUserInfo):[],o=!(i.email&&i.passwordHash)&&!s?.length,a=new oi;a.updateFromIdToken(r);let c=new n({uid:i.localId,auth:t,stsTokenManager:a,isAnonymous:o}),u={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:s,metadata:new ci(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!s?.length};return Object.assign(c,u),c})}};var Uf=new Map;function Dt(n){wt(n instanceof Function,"Expected a class definition");let t=Uf.get(n);return t?(wt(t instanceof n,"Instance stored in cache mismatched with class"),t):(t=new n,Uf.set(n,t),t)}var lD=(()=>{class n{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return l(this,null,function*(){return!0})}_set(e,r){return l(this,null,function*(){this.storage[e]=r})}_get(e){return l(this,null,function*(){let r=this.storage[e];return r===void 0?null:r})}_remove(e){return l(this,null,function*(){delete this.storage[e]})}_addListener(e,r){}_removeListener(e,r){}}return n.type="NONE",n})(),$c=lD;function Ys(n,t,e){return`firebase:${n}:${t}:${e}`}var no=class n{constructor(t,e,r){this.persistence=t,this.auth=e,this.userKey=r;let{config:i,name:s}=this.auth;this.fullUserKey=Ys(this.userKey,i.apiKey,s),this.fullPersistenceKey=Ys("persistence",i.apiKey,s),this.boundEventHandler=e._onStorageEvent.bind(e),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}getCurrentUser(){return l(this,null,function*(){let t=yield this.persistence._get(this.fullUserKey);if(!t)return null;if(typeof t=="string"){let e=yield eo(this.auth,{idToken:t}).catch(()=>{});return e?$t._fromGetAccountInfoResponse(this.auth,e,t):null}return $t._fromJSON(this.auth,t)})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(t){return l(this,null,function*(){if(this.persistence===t)return;let e=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=t,e)return this.setCurrentUser(e)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(t,e,r="authUser"){return l(this,null,function*(){if(!e.length)return new n(Dt($c),t,r);let i=(yield Promise.all(e.map(u=>l(null,null,function*(){if(yield u._isAvailable())return u})))).filter(u=>u),s=i[0]||Dt($c),o=Ys(r,t.config.apiKey,t.name),a=null;for(let u of e)try{let d=yield u._get(o);if(d){let f;if(typeof d=="string"){let h=yield eo(t,{idToken:d}).catch(()=>{});if(!h)break;f=yield $t._fromGetAccountInfoResponse(t,h,d)}else f=$t._fromJSON(t,d);u!==s&&(a=f),s=u;break}}catch{}let c=i.filter(u=>u._shouldAllowMigration);return!s._shouldAllowMigration||!c.length?new n(s,t,r):(s=c[0],a&&(yield s._set(o,a.toJSON())),yield Promise.all(e.map(u=>l(null,null,function*(){if(u!==s)try{yield u._remove(o)}catch{}}))),new n(s,t,r))})}};function Vf(n){let t=n.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(sp(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(np(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ap(t))return"Blackberry";if(cp(t))return"Webos";if(rp(t))return"Safari";if((t.includes("chrome/")||ip(t))&&!t.includes("edge/"))return"Chrome";if(op(t))return"Android";{let e=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=n.match(e);if(r?.length===2)return r[1]}return"Other"}function np(n=re()){return/firefox\//i.test(n)}function rp(n=re()){let t=n.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function ip(n=re()){return/crios\//i.test(n)}function sp(n=re()){return/iemobile/i.test(n)}function op(n=re()){return/android/i.test(n)}function ap(n=re()){return/blackberry/i.test(n)}function cp(n=re()){return/webos/i.test(n)}function ou(n=re()){return/iphone|ipad|ipod/i.test(n)||/macintosh/i.test(n)&&/mobile/i.test(n)}function dD(n=re()){var t;return ou(n)&&!!(!((t=window.navigator)===null||t===void 0)&&t.standalone)}function hD(){return of()&&document.documentMode===10}function up(n=re()){return ou(n)||op(n)||cp(n)||ap(n)||/windows phone/i.test(n)||sp(n)}function lp(n,t=[]){let e;switch(n){case"Browser":e=Vf(re());break;case"Worker":e=`${Vf(re())}-${n}`;break;default:e=n}let r=t.length?t.join(","):"FirebaseCore-web";return`${e}/JsCore/${Kn}/${r}`}var Hc=class{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,e){let r=s=>new Promise((o,a)=>{try{let c=t(s);o(c)}catch(c){a(c)}});r.onAbort=e,this.queue.push(r);let i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}runMiddleware(t){return l(this,null,function*(){if(this.auth.currentUser===t)return;let e=[];try{for(let r of this.queue)yield r(t),r.onAbort&&e.push(r.onAbort)}catch(r){e.reverse();for(let i of e)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r?.message})}})}};function fD(e){return l(this,arguments,function*(n,t={}){return Qn(n,"GET","/v2/passwordPolicy",nu(n,t))})}var pD=6,zc=class{constructor(t){var e,r,i,s;let o=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(e=o.minPasswordLength)!==null&&e!==void 0?e:pD,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),o.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),o.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),o.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),o.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(i=(r=t.allowedNonAlphanumericCharacters)===null||r===void 0?void 0:r.join(""))!==null&&i!==void 0?i:"",this.forceUpgradeOnSignin=(s=t.forceUpgradeOnSignin)!==null&&s!==void 0?s:!1,this.schemaVersion=t.schemaVersion}validatePassword(t){var e,r,i,s,o,a;let c={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,c),this.validatePasswordCharacterOptions(t,c),c.isValid&&(c.isValid=(e=c.meetsMinPasswordLength)!==null&&e!==void 0?e:!0),c.isValid&&(c.isValid=(r=c.meetsMaxPasswordLength)!==null&&r!==void 0?r:!0),c.isValid&&(c.isValid=(i=c.containsLowercaseLetter)!==null&&i!==void 0?i:!0),c.isValid&&(c.isValid=(s=c.containsUppercaseLetter)!==null&&s!==void 0?s:!0),c.isValid&&(c.isValid=(o=c.containsNumericCharacter)!==null&&o!==void 0?o:!0),c.isValid&&(c.isValid=(a=c.containsNonAlphanumericCharacter)!==null&&a!==void 0?a:!0),c}validatePasswordLengthOptions(t,e){let r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(e.meetsMinPasswordLength=t.length>=r),i&&(e.meetsMaxPasswordLength=t.length<=i)}validatePasswordCharacterOptions(t,e){this.updatePasswordCharacterOptionsStatuses(e,!1,!1,!1,!1);let r;for(let i=0;i<t.length;i++)r=t.charAt(i),this.updatePasswordCharacterOptionsStatuses(e,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(t,e,r,i,s){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=e)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=s))}};var Wc=class{constructor(t,e,r,i){this.app=t,this.heartbeatServiceProvider=e,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new ro(this),this.idTokenSubscription=new ro(this),this.beforeStateQueue=new Hc(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Xf,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion,this._persistenceManagerAvailable=new Promise(s=>this._resolvePersistenceManagerAvailable=s)}_initializeWithPersistence(t,e){return e&&(this._popupRedirectResolver=Dt(e)),this._initializationPromise=this.queue(()=>l(this,null,function*(){var r,i,s;if(!this._deleted&&(this.persistenceManager=yield no.create(this,t),(r=this._resolvePersistenceManagerAvailable)===null||r===void 0||r.call(this),!this._deleted)){if(!((i=this._popupRedirectResolver)===null||i===void 0)&&i._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch{}yield this.initializeCurrentUser(e),this.lastNotifiedUid=((s=this.currentUser)===null||s===void 0?void 0:s.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return l(this,null,function*(){if(this._deleted)return;let t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUserFromIdToken(t){return l(this,null,function*(){try{let e=yield eo(this,{idToken:t}),r=yield $t._fromGetAccountInfoResponse(this,e,t);yield this.directlySetCurrentUser(r)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return l(this,null,function*(){var e;if(We(this.app)){let o=this.app.settings.authIdToken;return o?new Promise(a=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(a,a))}):this.directlySetCurrentUser(null)}let r=yield this.assertedPersistence.getCurrentUser(),i=r,s=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();let o=(e=this.redirectUser)===null||e===void 0?void 0:e._redirectEventId,a=i?._redirectEventId,c=yield this.tryRedirectSignIn(t);(!o||o===a)&&c?.user&&(i=c.user,s=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(s)try{yield this.beforeStateQueue.runMiddleware(i)}catch(o){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return b(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(t){return l(this,null,function*(){let e=null;try{e=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{yield this._setRedirectUser(null)}return e})}reloadAndSetCurrentUserOrClear(t){return l(this,null,function*(){try{yield to(t)}catch(e){if(e?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=eD()}_delete(){return l(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return l(this,null,function*(){if(We(this.app))return Promise.reject(gn(this));let e=t?xt(t):null;return e&&b(e.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(e&&e._clone(this))})}_updateCurrentUser(t,e=!1){return l(this,null,function*(){if(!this._deleted)return t&&b(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),e||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>l(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return l(this,null,function*(){return We(this.app)?Promise.reject(gn(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return We(this.app)?Promise.reject(gn(this)):this.queue(()=>l(this,null,function*(){yield this.assertedPersistence.setPersistence(Dt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return l(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());let e=this._getPasswordPolicyInternal();return e.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):e.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return l(this,null,function*(){let t=yield fD(this),e=new zc(t);this.tenantId===null?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e})}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(t){this._errorFactory=new ze("auth","Firebase",t())}onAuthStateChanged(t,e,r){return this.registerStateListener(this.authStateSubscription,t,e,r)}beforeAuthStateChanged(t,e){return this.beforeStateQueue.pushCallback(t,e)}onIdTokenChanged(t,e,r){return this.registerStateListener(this.idTokenSubscription,t,e,r)}authStateReady(){return new Promise((t,e)=>{if(this.currentUser)t();else{let r=this.onAuthStateChanged(()=>{r(),t()},e)}})}revokeAccessToken(t){return l(this,null,function*(){if(this.currentUser){let e=yield this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:e};this.tenantId!=null&&(r.tenantId=this.tenantId),yield uD(this,r)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,e){return l(this,null,function*(){let r=yield this.getOrInitRedirectPersistenceManager(e);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return l(this,null,function*(){if(!this.redirectPersistenceManager){let e=t&&Dt(t)||this._popupRedirectResolver;b(e,this,"argument-error"),this.redirectPersistenceManager=yield no.create(this,[Dt(e._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return l(this,null,function*(){var e,r;return this._isInitialized&&(yield this.queue(()=>l(this,null,function*(){}))),((e=this._currentUser)===null||e===void 0?void 0:e._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return l(this,null,function*(){if(t===this.currentUser)return this.queue(()=>l(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,e;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let r=(e=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&e!==void 0?e:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,e,r,i){if(this._deleted)return()=>{};let s=typeof e=="function"?e:e.next.bind(e),o=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(b(a,this,"internal-error"),a.then(()=>{o||s(this.currentUser)}),typeof e=="function"){let c=t.addObserver(e,r,i);return()=>{o=!0,c()}}else{let c=t.addObserver(e);return()=>{o=!0,c()}}}directlySetCurrentUser(t){return l(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return b(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=lp(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return l(this,null,function*(){var t;let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);let r=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();r&&(e["X-Firebase-Client"]=r);let i=yield this._getAppCheckToken();return i&&(e["X-Firebase-AppCheck"]=i),e})}_getAppCheckToken(){return l(this,null,function*(){var t;if(We(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return e?.error&&ZE(`Error while retrieving App Check token: ${e.error}`),e?.token})}};function ho(n){return xt(n)}var ro=class{constructor(t){this.auth=t,this.observer=null,this.addObserver=uf(e=>this.observer=e)}get next(){return b(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var au={loadJS(){return l(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function gD(n){au=n}function mD(n){return au.loadJS(n)}function vD(){return au.gapiScript}function dp(n){return`__${n}${Math.floor(Math.random()*1e6)}`}function cu(n,t){let e=js(n,"auth");if(e.isInitialized()){let i=e.getImmediate(),s=e.getOptions();if(Lt(s,t??{}))return i;it(i,"already-initialized")}return e.initialize({options:t})}function yD(n,t){let e=t?.persistence||[],r=(Array.isArray(e)?e:[e]).map(Dt);t?.errorMap&&n._updateErrorMap(t.errorMap),n._initializeWithPersistence(r,t?.popupRedirectResolver)}function uu(n,t,e){let r=ho(n);b(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");let i=!!e?.disableWarnings,s=hp(t),{host:o,port:a}=_D(t),c=a===null?"":`:${a}`,u={url:`${s}//${o}${c}/`},d=Object.freeze({host:o,port:a,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:i})});if(!r._canInitEmulator){b(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),b(Lt(u,r.config.emulator)&&Lt(d,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=u,r.emulatorConfig=d,r.settings.appVerificationDisabledForTesting=!0,Xr(o)?(Qh(`${s}//${o}${c}`),ef("Auth",!0)):i||ED()}function hp(n){let t=n.indexOf(":");return t<0?"":n.substr(0,t+1)}function _D(n){let t=hp(n),e=/(\/\/)?([^?#/]+)/.exec(n.substr(t.length));if(!e)return{host:"",port:null};let r=e[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let s=i[1];return{host:s,port:Bf(r.substr(s.length+1))}}else{let[s,o]=r.split(":");return{host:s,port:Bf(o)}}}function Bf(n){if(!n)return null;let t=Number(n);return isNaN(t)?null:t}function ED(){function n(){let t=document.createElement("p"),e=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",e.position="fixed",e.width="100%",e.backgroundColor="#ffffff",e.border=".1em solid #000000",e.color="#b50000",e.bottom="0px",e.left="0px",e.margin="0px",e.zIndex="10000",e.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",n):n())}var ui=class{constructor(t,e){this.providerId=t,this.signInMethod=e}toJSON(){return Et("not implemented")}_getIdTokenResponse(t){return Et("not implemented")}_linkToIdToken(t,e){return Et("not implemented")}_getReauthenticationResolver(t){return Et("not implemented")}};function Xn(n,t){return l(this,null,function*(){return iD(n,"POST","/v1/accounts:signInWithIdp",nu(n,t))})}var DD="http://localhost",io=class n extends ui{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){let e=new n(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(e.idToken=t.idToken),t.accessToken&&(e.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(e.nonce=t.nonce),t.pendingToken&&(e.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(e.accessToken=t.oauthToken,e.secret=t.oauthTokenSecret):it("argument-error"),e}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){let e=typeof t=="string"?JSON.parse(t):t,{providerId:r,signInMethod:i}=e,s=mi(e,["providerId","signInMethod"]);if(!r||!i)return null;let o=new n(r,i);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(t){let e=this.buildRequest();return Xn(t,e)}_linkToIdToken(t,e){let r=this.buildRequest();return r.idToken=e,Xn(t,r)}_getReauthenticationResolver(t){let e=this.buildRequest();return e.autoCreate=!1,Xn(t,e)}buildRequest(){let t={requestUri:DD,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{let e={};this.idToken&&(e.id_token=this.idToken),this.accessToken&&(e.access_token=this.accessToken),this.secret&&(e.oauth_token_secret=this.secret),e.providerId=this.providerId,this.nonce&&!this.pendingToken&&(e.nonce=this.nonce),t.postBody=qn(e)}return t}};var li=class{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}};var so=class extends li{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}};var fi=(()=>{class n extends so{constructor(){super("google.com"),this.addScope("profile")}static credential(e,r){return io._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:r})}static credentialFromResult(e){return n.credentialFromTaggedObject(e)}static credentialFromError(e){return n.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:r,oauthAccessToken:i}=e;if(!r&&!i)return null;try{return n.credential(r,i)}catch{return null}}}n.GOOGLE_SIGN_IN_METHOD="google.com",n.PROVIDER_ID="google.com";return n})();var di=class n{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,e,r,i=!1){return l(this,null,function*(){let s=yield $t._fromIdTokenResponse(t,r,i),o=jf(r);return new n({user:s,providerId:o,_tokenResponse:r,operationType:e})})}static _forOperation(t,e,r){return l(this,null,function*(){yield t._updateTokensIfNecessary(r,!0);let i=jf(r);return new n({user:t,providerId:i,_tokenResponse:r,operationType:e})})}};function jf(n){return n.providerId?n.providerId:"phoneNumber"in n?"phone":null}var Gc=class n extends He{constructor(t,e,r,i){var s;super(e.code,e.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,n.prototype),this.customData={appName:t.name,tenantId:(s=t.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:e.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(t,e,r,i){return new n(t,e,r,i)}};function fp(n,t,e,r){return(t==="reauthenticate"?e._getReauthenticationResolver(n):e._getIdTokenResponse(n)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?Gc._fromErrorAndOperation(n,s,t,r):s})}function wD(n,t,e=!1){return l(this,null,function*(){let r=yield ai(n,t._linkToIdToken(n.auth,yield n.getIdToken()),e);return di._forOperation(n,"link",r)})}function CD(n,t,e=!1){return l(this,null,function*(){let{auth:r}=n;if(We(r.app))return Promise.reject(gn(r));let i="reauthenticate";try{let s=yield ai(n,fp(r,i,t,n),e);b(s.idToken,r,"internal-error");let o=iu(s.idToken);b(o,r,"internal-error");let{sub:a}=o;return b(n.uid===a,r,"user-mismatch"),di._forOperation(n,i,s)}catch(s){throw s?.code==="auth/user-not-found"&&it(r,"user-mismatch"),s}})}function ID(n,t,e=!1){return l(this,null,function*(){if(We(n.app))return Promise.reject(gn(n));let r="signIn",i=yield fp(n,r,t),s=yield di._fromIdTokenResponse(n,r,i);return e||(yield n._updateCurrentUser(s.user)),s})}function pi(n,t,e,r){return xt(n).onIdTokenChanged(t,e,r)}function lu(n,t,e){return xt(n).beforeAuthStateChanged(t,e)}var oo="__sak";var ao=class{constructor(t,e){this.storageRetriever=t,this.type=e}_isAvailable(){try{return this.storage?(this.storage.setItem(oo,"1"),this.storage.removeItem(oo),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,e){return this.storage.setItem(t,JSON.stringify(e)),Promise.resolve()}_get(t){let e=this.storage.getItem(t);return Promise.resolve(e?JSON.parse(e):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}};var bD=1e3,AD=10,TD=(()=>{class n extends ao{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,r)=>this.onStorageEvent(e,r),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=up(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let r of Object.keys(this.listeners)){let i=this.storage.getItem(r),s=this.localCache[r];i!==s&&e(r,s,i)}}onStorageEvent(e,r=!1){if(!e.key){this.forAllChangedKeys((a,c,u)=>{this.notifyListeners(a,u)});return}let i=e.key;r?this.detachListener():this.stopPolling();let s=()=>{let a=this.storage.getItem(i);!r&&this.localCache[i]===a||this.notifyListeners(i,a)},o=this.storage.getItem(i);hD()&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(s,AD):s()}notifyListeners(e,r){this.localCache[e]=r;let i=this.listeners[e];if(i)for(let s of Array.from(i))s(r&&JSON.parse(r))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,r,i)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:r,newValue:i}),!0)})},bD)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,r){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(r)}_removeListener(e,r){this.listeners[e]&&(this.listeners[e].delete(r),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(e,r){return l(this,null,function*(){yield Ht(n.prototype,this,"_set").call(this,e,r),this.localCache[e]=JSON.stringify(r)})}_get(e){return l(this,null,function*(){let r=yield Ht(n.prototype,this,"_get").call(this,e);return this.localCache[e]=JSON.stringify(r),r})}_remove(e){return l(this,null,function*(){yield Ht(n.prototype,this,"_remove").call(this,e),delete this.localCache[e]})}}return n.type="LOCAL",n})(),pp=TD;var SD=(()=>{class n extends ao{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,r){}_removeListener(e,r){}}return n.type="SESSION",n})(),du=SD;function RD(n){return Promise.all(n.map(t=>l(null,null,function*(){try{return{fulfilled:!0,value:yield t}}catch(e){return{fulfilled:!1,reason:e}}})))}var OD=(()=>{class n{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let r=this.receivers.find(s=>s.isListeningto(e));if(r)return r;let i=new n(e);return this.receivers.push(i),i}isListeningto(e){return this.eventTarget===e}handleEvent(e){return l(this,null,function*(){let r=e,{eventId:i,eventType:s,data:o}=r.data,a=this.handlersMap[s];if(!a?.size)return;r.ports[0].postMessage({status:"ack",eventId:i,eventType:s});let c=Array.from(a).map(d=>l(this,null,function*(){return d(r.origin,o)})),u=yield RD(c);r.ports[0].postMessage({status:"done",eventId:i,eventType:s,response:u})})}_subscribe(e,r){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(r)}_unsubscribe(e,r){this.handlersMap[e]&&r&&this.handlersMap[e].delete(r),(!r||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}n.receivers=[];return n})();function hu(n="",t=10){let e="";for(let r=0;r<t;r++)e+=Math.floor(Math.random()*10);return n+e}var qc=class{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}_send(t,e,r=50){return l(this,null,function*(){let i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let s,o;return new Promise((a,c)=>{let u=hu("",20);i.port1.start();let d=setTimeout(()=>{c(new Error("unsupported_event"))},r);o={messageChannel:i,onMessage(f){let h=f;if(h.data.eventId===u)switch(h.data.status){case"ack":clearTimeout(d),s=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),a(h.data.response);break;default:clearTimeout(d),clearTimeout(s),c(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:t,eventId:u,data:e},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})})}};function rt(){return window}function PD(n){rt().location.href=n}function gp(){return typeof rt().WorkerGlobalScope<"u"&&typeof rt().importScripts=="function"}function MD(){return l(this,null,function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})}function kD(){var n;return((n=navigator?.serviceWorker)===null||n===void 0?void 0:n.controller)||null}function ND(){return gp()?self:null}var mp="firebaseLocalStorageDb",FD=1,co="firebaseLocalStorage",vp="fbase_key",vn=class{constructor(t){this.request=t}toPromise(){return new Promise((t,e)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{e(this.request.error)})})}};function fo(n,t){return n.transaction([co],t?"readwrite":"readonly").objectStore(co)}function LD(){let n=indexedDB.deleteDatabase(mp);return new vn(n).toPromise()}function Kc(){let n=indexedDB.open(mp,FD);return new Promise((t,e)=>{n.addEventListener("error",()=>{e(n.error)}),n.addEventListener("upgradeneeded",()=>{let r=n.result;try{r.createObjectStore(co,{keyPath:vp})}catch(i){e(i)}}),n.addEventListener("success",()=>l(null,null,function*(){let r=n.result;r.objectStoreNames.contains(co)?t(r):(r.close(),yield LD(),t(yield Kc()))}))})}function $f(n,t,e){return l(this,null,function*(){let r=fo(n,!0).put({[vp]:t,value:e});return new vn(r).toPromise()})}function xD(n,t){return l(this,null,function*(){let e=fo(n,!1).get(t),r=yield new vn(e).toPromise();return r===void 0?null:r.value})}function Hf(n,t){let e=fo(n,!0).delete(t);return new vn(e).toPromise()}var UD=800,VD=3,BD=(()=>{class n{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}_openDb(){return l(this,null,function*(){return this.db?this.db:(this.db=yield Kc(),this.db)})}_withRetries(e){return l(this,null,function*(){let r=0;for(;;)try{let i=yield this._openDb();return yield e(i)}catch(i){if(r++>VD)throw i;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return l(this,null,function*(){return gp()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return l(this,null,function*(){this.receiver=OD._getInstance(ND()),this.receiver._subscribe("keyChanged",(e,r)=>l(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(r.key)}})),this.receiver._subscribe("ping",(e,r)=>l(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return l(this,null,function*(){var e,r;if(this.activeServiceWorker=yield MD(),!this.activeServiceWorker)return;this.sender=new qc(this.activeServiceWorker);let i=yield this.sender._send("ping",{},800);i&&!((e=i[0])===null||e===void 0)&&e.fulfilled&&!((r=i[0])===null||r===void 0)&&r.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(e){return l(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||kD()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}})}_isAvailable(){return l(this,null,function*(){try{if(!indexedDB)return!1;let e=yield Kc();return yield $f(e,oo,"1"),yield Hf(e,oo),!0}catch{}return!1})}_withPendingWrite(e){return l(this,null,function*(){this.pendingWrites++;try{yield e()}finally{this.pendingWrites--}})}_set(e,r){return l(this,null,function*(){return this._withPendingWrite(()=>l(this,null,function*(){return yield this._withRetries(i=>$f(i,e,r)),this.localCache[e]=r,this.notifyServiceWorker(e)}))})}_get(e){return l(this,null,function*(){let r=yield this._withRetries(i=>xD(i,e));return this.localCache[e]=r,r})}_remove(e){return l(this,null,function*(){return this._withPendingWrite(()=>l(this,null,function*(){return yield this._withRetries(r=>Hf(r,e)),delete this.localCache[e],this.notifyServiceWorker(e)}))})}_poll(){return l(this,null,function*(){let e=yield this._withRetries(s=>{let o=fo(s,!1).getAll();return new vn(o).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];let r=[],i=new Set;if(e.length!==0)for(let{fbase_key:s,value:o}of e)i.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(o)&&(this.notifyListeners(s,o),r.push(s));for(let s of Object.keys(this.localCache))this.localCache[s]&&!i.has(s)&&(this.notifyListeners(s,null),r.push(s));return r})}notifyListeners(e,r){this.localCache[e]=r;let i=this.listeners[e];if(i)for(let s of Array.from(i))s(r)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>l(this,null,function*(){return this._poll()}),UD)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,r){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(r)}_removeListener(e,r){this.listeners[e]&&(this.listeners[e].delete(r),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}return n.type="LOCAL",n})(),yp=BD;var zS=dp("rcb"),WS=new mn(3e4,6e4);function _p(n,t){return t?Dt(t):(b(n._popupRedirectResolver,n,"argument-error"),n._popupRedirectResolver)}var hi=class extends ui{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Xn(t,this._buildIdpRequest())}_linkToIdToken(t,e){return Xn(t,this._buildIdpRequest(e))}_getReauthenticationResolver(t){return Xn(t,this._buildIdpRequest())}_buildIdpRequest(t){let e={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(e.idToken=t),e}};function jD(n){return ID(n.auth,new hi(n),n.bypassAuthState)}function $D(n){let{auth:t,user:e}=n;return b(e,t,"internal-error"),CD(e,new hi(n),n.bypassAuthState)}function HD(n){return l(this,null,function*(){let{auth:t,user:e}=n;return b(e,t,"internal-error"),wD(e,new hi(n),n.bypassAuthState)})}var uo=class{constructor(t,e,r,i,s=!1){this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(e)?e:[e]}execute(){return new Promise((t,e)=>l(this,null,function*(){this.pendingPromise={resolve:t,reject:e};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}}))}onAuthEvent(t){return l(this,null,function*(){let{urlResponse:e,sessionId:r,postBody:i,tenantId:s,error:o,type:a}=t;if(o){this.reject(o);return}let c={auth:this.auth,requestUri:e,sessionId:r,tenantId:s||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(a)(c))}catch(u){this.reject(u)}})}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return jD;case"linkViaPopup":case"linkViaRedirect":return HD;case"reauthViaPopup":case"reauthViaRedirect":return $D;default:it(this.auth,"internal-error")}}resolve(t){wt(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){wt(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}};var zD=new mn(2e3,1e4);function fu(n,t,e){return l(this,null,function*(){if(We(n.app))return Promise.reject(qe(n,"operation-not-supported-in-this-environment"));let r=ho(n);JE(n,t,li);let i=_p(r,e);return new WD(r,"signInViaPopup",t,i).executeNotNull()})}var WD=(()=>{class n extends uo{constructor(e,r,i,s,o){super(e,r,s,o),this.provider=i,this.authWindow=null,this.pollId=null,n.currentPopupAction&&n.currentPopupAction.cancel(),n.currentPopupAction=this}executeNotNull(){return l(this,null,function*(){let e=yield this.execute();return b(e,this.auth,"internal-error"),e})}onExecution(){return l(this,null,function*(){wt(this.filter.length===1,"Popup operations only handle one event");let e=hu();this.authWindow=yield this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(r=>{this.reject(r)}),this.resolver._isIframeWebStorageSupported(this.auth,r=>{r||this.reject(qe(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()})}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(qe(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,n.currentPopupAction=null}pollUserCancellation(){let e=()=>{var r,i;if(!((i=(r=this.authWindow)===null||r===void 0?void 0:r.window)===null||i===void 0)&&i.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(qe(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,zD.get())};e()}}n.currentPopupAction=null;return n})(),GD="pendingRedirect",Zs=new Map,Yc=class n extends uo{constructor(t,e,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],e,void 0,r),this.eventId=null}execute(){return l(this,null,function*(){let t=Zs.get(this.auth._key());if(!t){try{let r=(yield qD(this.resolver,this.auth))?yield Ht(n.prototype,this,"execute").call(this):null;t=()=>Promise.resolve(r)}catch(e){t=()=>Promise.reject(e)}Zs.set(this.auth._key(),t)}return this.bypassAuthState||Zs.set(this.auth._key(),()=>Promise.resolve(null)),t()})}onAuthEvent(t){return l(this,null,function*(){if(t.type==="signInViaRedirect")return Ht(n.prototype,this,"onAuthEvent").call(this,t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){let e=yield this.auth._redirectUserForId(t.eventId);if(e)return this.user=e,Ht(n.prototype,this,"onAuthEvent").call(this,t);this.resolve(null)}})}onExecution(){return l(this,null,function*(){})}cleanUp(){}};function qD(n,t){return l(this,null,function*(){let e=ZD(t),r=YD(n);if(!(yield r._isAvailable()))return!1;let i=(yield r._get(e))==="true";return yield r._remove(e),i})}function KD(n,t){Zs.set(n._key(),t)}function YD(n){return Dt(n._redirectPersistence)}function ZD(n){return Ys(GD,n.config.apiKey,n.name)}function JD(n,t,e=!1){return l(this,null,function*(){if(We(n.app))return Promise.reject(gn(n));let r=ho(n),i=_p(r,t),o=yield new Yc(r,i,e).execute();return o&&!e&&(delete o.user._redirectEventId,yield r._persistUserIfCurrent(o.user),yield r._setRedirectUser(null,t)),o})}var XD=600*1e3,Zc=class{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let e=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(t,r)&&(e=!0,this.sendToConsumer(t,r),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!QD(t)||(this.hasHandledPotentialRedirect=!0,e||(this.queuedRedirectEvent=t,e=!0)),e}sendToConsumer(t,e){var r;if(t.error&&!Ep(t)){let i=((r=t.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";e.onError(qe(this.auth,i))}else e.onAuthEvent(t)}isEventForConsumer(t,e){let r=e.eventId===null||!!t.eventId&&t.eventId===e.eventId;return e.filter.includes(t.type)&&r}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=XD&&this.cachedEventUids.clear(),this.cachedEventUids.has(zf(t))}saveEventToCache(t){this.cachedEventUids.add(zf(t)),this.lastProcessedEventTime=Date.now()}};function zf(n){return[n.type,n.eventId,n.sessionId,n.tenantId].filter(t=>t).join("-")}function Ep({type:n,error:t}){return n==="unknown"&&t?.code==="auth/no-auth-event"}function QD(n){switch(n.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Ep(n);default:return!1}}function ew(e){return l(this,arguments,function*(n,t={}){return Qn(n,"GET","/v1/projects",t)})}var tw=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nw=/^https?/;function rw(n){return l(this,null,function*(){if(n.config.emulator)return;let{authorizedDomains:t}=yield ew(n);for(let e of t)try{if(iw(e))return}catch{}it(n,"unauthorized-domain")})}function iw(n){let t=Vc(),{protocol:e,hostname:r}=new URL(t);if(n.startsWith("chrome-extension://")){let o=new URL(n);return o.hostname===""&&r===""?e==="chrome-extension:"&&n.replace("chrome-extension://","")===t.replace("chrome-extension://",""):e==="chrome-extension:"&&o.hostname===r}if(!nw.test(e))return!1;if(tw.test(n))return r===n;let i=n.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}var sw=new mn(3e4,6e4);function Wf(){let n=rt().___jsl;if(n?.H){for(let t of Object.keys(n.H))if(n.H[t].r=n.H[t].r||[],n.H[t].L=n.H[t].L||[],n.H[t].r=[...n.H[t].L],n.CP)for(let e=0;e<n.CP.length;e++)n.CP[e]=null}}function ow(n){return new Promise((t,e)=>{var r,i,s;function o(){Wf(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{Wf(),e(qe(n,"network-request-failed"))},timeout:sw.get()})}if(!((i=(r=rt().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)t(gapi.iframes.getContext());else if(!((s=rt().gapi)===null||s===void 0)&&s.load)o();else{let a=dp("iframefcb");return rt()[a]=()=>{gapi.load?o():e(qe(n,"network-request-failed"))},mD(`${vD()}?onload=${a}`).catch(c=>e(c))}}).catch(t=>{throw Js=null,t})}var Js=null;function aw(n){return Js=Js||ow(n),Js}var cw=new mn(5e3,15e3),uw="__/auth/iframe",lw="emulator/auth/iframe",dw={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},hw=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function fw(n){let t=n.config;b(t.authDomain,n,"auth-domain-config-required");let e=t.emulator?tu(t,lw):`https://${n.config.authDomain}/${uw}`,r={apiKey:t.apiKey,appName:n.name,v:Kn},i=hw.get(n.config.apiHost);i&&(r.eid=i);let s=n._getFrameworks();return s.length&&(r.fw=s.join(",")),`${e}?${qn(r).slice(1)}`}function pw(n){return l(this,null,function*(){let t=yield aw(n),e=rt().gapi;return b(e,n,"internal-error"),t.open({where:document.body,url:fw(n),messageHandlersFilter:e.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:dw,dontclear:!0},r=>new Promise((i,s)=>l(null,null,function*(){yield r.restyle({setHideOnLeave:!1});let o=qe(n,"network-request-failed"),a=rt().setTimeout(()=>{s(o)},cw.get());function c(){rt().clearTimeout(a),i(r)}r.ping(c).then(c,()=>{s(o)})})))})}var gw={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},mw=500,vw=600,yw="_blank",_w="http://localhost",lo=class{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function Ew(n,t,e,r=mw,i=vw){let s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString(),a="",c=Object.assign(Object.assign({},gw),{width:r.toString(),height:i.toString(),top:s,left:o}),u=re().toLowerCase();e&&(a=ip(u)?yw:e),np(u)&&(t=t||_w,c.scrollbars="yes");let d=Object.entries(c).reduce((h,[m,I])=>`${h}${m}=${I},`,"");if(dD(u)&&a!=="_self")return Dw(t||"",a),new lo(null);let f=window.open(t||"",a,d);b(f,n,"popup-blocked");try{f.focus()}catch{}return new lo(f)}function Dw(n,t){let e=document.createElement("a");e.href=n,e.target=t;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),e.dispatchEvent(r)}var ww="__/auth/handler",Cw="emulator/auth/handler",Iw=encodeURIComponent("fac");function Gf(n,t,e,r,i,s){return l(this,null,function*(){b(n.config.authDomain,n,"auth-domain-config-required"),b(n.config.apiKey,n,"invalid-api-key");let o={apiKey:n.config.apiKey,appName:n.name,authType:e,redirectUrl:r,v:Kn,eventId:i};if(t instanceof li){t.setDefaultLanguage(n.languageCode),o.providerId=t.providerId||"",cf(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(let[d,f]of Object.entries(s||{}))o[d]=f}if(t instanceof so){let d=t.getScopes().filter(f=>f!=="");d.length>0&&(o.scopes=d.join(","))}n.tenantId&&(o.tid=n.tenantId);let a=o;for(let d of Object.keys(a))a[d]===void 0&&delete a[d];let c=yield n._getAppCheckToken(),u=c?`#${Iw}=${encodeURIComponent(c)}`:"";return`${bw(n)}?${qn(a).slice(1)}${u}`})}function bw({config:n}){return n.emulator?tu(n,Cw):`https://${n.authDomain}/${ww}`}var Uc="webStorageSupport",Jc=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=du,this._completeRedirectFn=JD,this._overrideRedirectResult=KD}_openPopup(t,e,r,i){return l(this,null,function*(){var s;wt((s=this.eventManagers[t._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");let o=yield Gf(t,e,r,Vc(),i);return Ew(t,o,hu())})}_openRedirect(t,e,r,i){return l(this,null,function*(){yield this._originValidation(t);let s=yield Gf(t,e,r,Vc(),i);return PD(s),new Promise(()=>{})})}_initialize(t){let e=t._key();if(this.eventManagers[e]){let{manager:i,promise:s}=this.eventManagers[e];return i?Promise.resolve(i):(wt(s,"If manager is not set, promise should be"),s)}let r=this.initAndGetManager(t);return this.eventManagers[e]={promise:r},r.catch(()=>{delete this.eventManagers[e]}),r}initAndGetManager(t){return l(this,null,function*(){let e=yield pw(t),r=new Zc(t);return e.register("authEvent",i=>(b(i?.authEvent,t,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=e,r})}_isIframeWebStorageSupported(t,e){this.iframes[t._key()].send(Uc,{type:Uc},i=>{var s;let o=(s=i?.[0])===null||s===void 0?void 0:s[Uc];o!==void 0&&e(!!o),it(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){let e=t._key();return this.originValidationPromises[e]||(this.originValidationPromises[e]=rw(t)),this.originValidationPromises[e]}get _shouldInitProactively(){return up()||rp()||ou()}},Dp=Jc;var qf="@firebase/auth",Kf="1.10.8";var Xc=class{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}getToken(t){return l(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(t)}:null})}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;let e=this.auth.onIdTokenChanged(r=>{t(r?.stsTokenManager.accessToken||null)});this.internalListeners.set(t,e),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();let e=this.internalListeners.get(t);e&&(this.internalListeners.delete(t),e(),this.updateProactiveRefresh())}assertAuthConfigured(){b(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function Aw(n){switch(n){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function Tw(n){_t(new Ce("auth",(t,{options:e})=>{let r=t.getProvider("app").getImmediate(),i=t.getProvider("heartbeat"),s=t.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=r.options;b(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});let c={apiKey:o,authDomain:a,clientPlatform:n,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:lp(n)},u=new Wc(r,i,s,c);return yD(u,e),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,e,r)=>{t.getProvider("auth-internal").initialize()})),_t(new Ce("auth-internal",t=>{let e=ho(t.getProvider("auth").getImmediate());return(r=>new Xc(r))(e)},"PRIVATE").setInstantiationMode("EXPLICIT")),te(qf,Kf,Aw(n)),te(qf,Kf,"esm2017")}var Sw=300,Rw=fc("authIdTokenMaxAge")||Sw,Yf=null,Ow=n=>t=>l(null,null,function*(){let e=t&&(yield t.getIdTokenResult()),r=e&&(new Date().getTime()-Date.parse(e.issuedAtTime))/1e3;if(r&&r>Rw)return;let i=e?.token;Yf!==i&&(Yf=i,yield fetch(n,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))});function pu(n=ti()){let t=js(n,"auth");if(t.isInitialized())return t.getImmediate();let e=cu(n,{popupRedirectResolver:Dp,persistence:[yp,pp,du]}),r=fc("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){let s=new URL(r,location.origin);if(location.origin===s.origin){let o=Ow(s.toString());lu(e,o,()=>o(e.currentUser)),pi(e,a=>o(a))}}let i=Xh("auth");return i&&uu(e,`http://${i}`),e}function Pw(){var n,t;return(t=(n=document.getElementsByTagName("head"))===null||n===void 0?void 0:n[0])!==null&&t!==void 0?t:document}gD({loadJS(n){return new Promise((t,e)=>{let r=document.createElement("script");r.setAttribute("src",n),r.onload=t,r.onerror=i=>{let s=qe("internal-error");s.customData=i,e(s)},r.type="text/javascript",r.charset="UTF-8",Pw().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});Tw("Browser");function Ip(n){return new Ie(function(t){var e=pi(n,t.next.bind(t),t.error.bind(t),t.complete.bind(t));return{unsubscribe:e}})}var bp="auth",yn=class{constructor(t){return t}},gu=class{constructor(){return zs(bp)}};var mu=new C("angularfire2.auth-instances");function D0(n,t){let e=Rc(bp,n,t);return e&&new yn(e)}function w0(n){return(t,e)=>{let r=t.runOutsideAngular(()=>n(e));return new yn(r)}}var C0={provide:gu,deps:[[new It,mu]]},I0={provide:yn,useFactory:D0,deps:[[new It,mu],pn]};function UR(n,...t){return te("angularfire",Zn.full,"auth"),Fe([I0,C0,{provide:mu,useFactory:w0(n),multi:!0,deps:[Y,q,Jn,ni,[new It,Gs],...t]}])}var Ap=fn(Ip,!0);var VR=fn(pu,!0);var Tp=fn(fu,!0,2);var _n=class extends Error{};_n.prototype.name="InvalidTokenError";function b0(n){return decodeURIComponent(atob(n).replace(/(.)/g,(t,e)=>{let r=e.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function A0(n){let t=n.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return b0(t)}catch{return atob(t)}}function vu(n,t){if(typeof n!="string")throw new _n("Invalid token specified: must be a string");t||(t={});let e=t.header===!0?0:1,r=n.split(".")[e];if(typeof r!="string")throw new _n(`Invalid token specified: missing part #${e+1}`);let i;try{i=A0(r)}catch(s){throw new _n(`Invalid token specified: invalid base64 for part #${e+1} (${s.message})`)}try{return JSON.parse(i)}catch(s){throw new _n(`Invalid token specified: invalid json for part #${e+1} (${s.message})`)}}var XR=(()=>{let t=class t{constructor(){this.httpService=p(Gh),this._roles=new ue([]),this.route=p(Me),this.router=p(we),this.auth=p(yn),this.provider=new fi,this.user$=Ap(this.auth),this.destroy=new B,this.keys=[P.TokenExpire,P.BarcodeAccessToken,P.PosAccessToken,P.TokenType,P.Roles,P.Brand,P.Host,P.Username,P.PrintMode,P.SelectedProfileTemplate,P.Outlets]}login(r){return this.httpService.post("api/Token/Login",r).pipe(j(i=>this.storeLoginResponse(i)),j(i=>this.decodeRoles(i.token_pos)),j(()=>this.storeFormLogin(r)),Ou(1))}storeLoginResponse(r){localStorage.setItem(P.PosAccessToken,r.token_pos.access_token),localStorage.setItem(P.BarcodeAccessToken,r.token_barcode.access_token),localStorage.setItem(P.TokenExpire,r.token_pos.expiredAt),localStorage.setItem(P.TokenType,r.token_pos.token_type)}storeFormLogin(r){localStorage.setItem(P.Host,r.Host),localStorage.setItem(P.Username,r.Username)}decodeRoles(r){let i=vu(r.access_token);localStorage.setItem(P.Brand,i.Brand);let s=i["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return this._roles.next(s),this.storeRoles(),s}storeRoles(){localStorage.setItem(P.Roles,JSON.stringify(this._roles.value))}isTokenExpired(){let r=localStorage.getItem(P.BarcodeAccessToken);try{let i=vu(r),s=Math.floor(Date.now()/1e3);return i.exp?i.exp<s:!1}catch{return!0}}isAuthenticated(){return localStorage.getItem(P.BarcodeAccessToken)!==null&&!this.isTokenExpired()}getAuthToken(){return localStorage.getItem(P.BarcodeAccessToken)??""}getAuthTokenType(){return localStorage.getItem(P.TokenType)??""}redirectUrl(){return this.router.navigate(["/pages/shelf/barcode"])}automateLogon(){return l(this,null,function*(){return this.isAuthenticated()?yield this.router.navigate([""]):yield this.router.navigate([""])})}getDomain(){return localStorage.getItem(P.Host)!==null?localStorage.getItem(P.Host):""}logout(){return l(this,null,function*(){let r=[P.BarcodeAccessToken,P.PosAccessToken];for(let i of r)localStorage.removeItem(i);yield this.router.navigate([""])})}signInWithPopup(r){return z(Tp(this.auth,new fi)).pipe(J(i=>{let s=fi.credentialFromResult(i),o={Host:r,IDToken:s?.idToken};return this.httpService.post("api/token/LoginWithSocialProvider",o).pipe(R(a=>a),j(a=>this.storeLoginResponse(a)),j(a=>this.decodeRoles(a.token_pos)),ee(a=>_(null)))}),ee(i=>_(null)))}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}checkAuthKeysExists(){return[P.BarcodeAccessToken,P.PosAccessToken,P.TokenExpire,P.TokenType].every(i=>!!localStorage.getItem(i))}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();export{Qp as a,eg as b,Ll as c,Fi as d,tg as e,ng as f,sg as g,ag as h,cg as i,dg as j,Vl as k,NC as l,FC as m,ua as n,Rg as o,Ze as p,Dr as q,St as r,Gi as s,im as t,sm as u,om as v,ud as w,fa as x,Me as y,ka as z,we as A,Cs as B,xv as C,Bv as D,jv as E,iA as F,sA as G,oA as H,Ft as I,Yv as J,wh as K,hh as L,vt as M,tt as N,bA as O,AA as P,_y as Q,Wr as R,wy as S,SA as T,by as U,Ty as V,Ry as W,Py as X,Bh as Y,RA as Z,OA as _,Uy as $,PA as aa,MA as ba,kA as ca,Fs as da,Qy as ea,cT as fa,Gh as ga,dS as ha,hS as ia,UR as ja,VR as ka,P as la,XR as ma};