dealposbarcode 1.8.0 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ import{$a as Lo,$c as zu,A as Ao,Aa as O,Ab as N,Ac as yt,Ad as Zu,B as K,Ba as xo,Bb as Ou,Bd as Qr,C as w,Ca as C,Cb as jo,D as ln,Da as f,E as su,Ea as et,Eb as Ru,Ed as Xu,F as ou,Fa as vu,Fb as Mu,Fd as Ko,G as au,Ga as bi,Gb as Ei,H as Nn,Ha as ft,Hb as $r,I,Ia as Oe,Id as Zr,J as yi,Ja as F,Jd as Xr,K as we,Kb as ze,Kc as Ii,L as Oo,La as Ge,Lb as xe,Lc as $u,Ld as Yo,M as cu,Mb as $o,Mc as Gr,N as Ro,Na as yu,Nc as zr,O as lu,Oa as tt,Ob as Pu,Oc as zo,P as De,Pa as ke,Pb as Ho,Pc as Wr,Q as uu,Qa as Fo,Qb as un,Qc as it,Ra as pt,Rc as qr,Sa as Ur,Sb as Nu,Ta as jr,Tb as Re,Tc as bt,U as he,Ua as Bt,Ub as fe,Uc as Hu,Vb as Fn,Vc as Wo,W as Mo,Wa as X,Wb as ee,X as Br,Xa as wi,Xb as Ee,Xc as Ln,Ya as Di,Yc as We,Z as _e,Za as $,Zc as Gu,_ as xt,_a as H,_b as ku,_c as Jr,a as m,ac as xu,ad as Bn,b as P,ba as Po,bc as Fu,bd as Wu,ca as Te,cb as ve,cc as Lu,cd as qu,da as du,dc as Ce,dd as z,ea as hu,eb as bu,ec as Fe,ed as Ju,f as cn,fb as Bo,fc as Vt,fd as qo,g as h,ga as fu,gb as wu,gc as Ci,gd as Ku,ha as Ft,hb as nt,hc as Si,hd as Yu,ia as Lt,id as Ai,ja as No,jb as Vo,jc as Hr,jd as Kr,ka as pu,kb as kn,kc as dn,l as eu,lb as xn,lc as Bu,m as tu,ma as gu,mb as Du,mc as ye,md as Jo,n as Ne,nb as Tu,nc as ce,o as Co,oa as mu,ob as Eu,oc as Vu,p as So,pb as Cu,pc as Uu,q as x,qa as ko,qb as Su,r as me,ra as ae,rb as Iu,rc as Ut,s as nu,sa as Y,sb as Au,sc as ju,ta as V,tb as gt,tc as mt,u as iu,ua as Vr,ub as Uo,uc as _t,v as ru,va as U,wa as ht,wc as Le,x as Xe,xa as y,xc as Go,xd as Qu,y as Lr,ya as Ae,yb as Ti,yc as jt,z as Io,za as _u,zb as q,zc as vt,zd as Yr}from"./chunk-4JSMR3XG.js";var Ri=class{},ts=class{},wt=class n{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
2
+ `).forEach(e=>{let i=e.indexOf(":");if(i>0){let r=e.slice(0,i),s=r.toLowerCase(),o=e.slice(i+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,i)=>{this.setHeaderEntries(i,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,i])=>{this.setHeaderEntries(e,i)})}: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 i=t.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(t.name,e);let r=(t.op==="a"?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);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(c=>s.indexOf(c)===-1),o.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}break}}setHeaderEntries(t,e){let i=(Array.isArray(e)?e:[e]).map(s=>s.toString()),r=t.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var Zo=class{encodeKey(t){return ed(t)}encodeValue(t){return ed(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function Zp(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let s=r.indexOf("="),[o,c]=s==-1?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,s)),t.decodeValue(r.slice(s+1))],a=e.get(o)||[];a.push(c),e.set(o,a)}),e}var Xp=/%(\d[a-f0-9])/gi,eg={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ed(n){return encodeURIComponent(n).replace(Xp,(t,e)=>eg[e]??t)}function es(n){return`${n}`}var $t=class n{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new Zo,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=Zp(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let i=t.fromObject[e],r=Array.isArray(i)?i.map(es):[es(i)];this.map.set(e,r)})):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(i=>{let r=t[i];Array.isArray(r)?r.forEach(s=>{e.push({param:i,value:s,op:"a"})}):e.push({param:i,value:r,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(i=>e+"="+this.encoder.encodeValue(i)).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(es(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let i=this.map.get(t.param)||[],r=i.indexOf(es(t.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var Xo=class{constructor(){this.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 tg(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function td(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function nd(n){return typeof Blob<"u"&&n instanceof Blob}function id(n){return typeof FormData<"u"&&n instanceof FormData}function ng(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var Oi=class n{constructor(t,e,i,r){this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase();let s;if(tg(this.method)||r?(this.body=i!==void 0?i:null,s=r):s=i,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),this.transferCache=s.transferCache),this.headers??=new wt,this.context??=new Xo,!this.params)this.params=new $t,this.urlWithParams=e;else{let o=this.params.toString();if(o.length===0)this.urlWithParams=e;else{let c=e.indexOf("?"),a=c===-1?"?":c<e.length-1?"&":"";this.urlWithParams=e+a+o}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||td(this.body)||nd(this.body)||id(this.body)||ng(this.body)?this.body:this.body instanceof $t?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||id(this.body)?null:nd(this.body)?this.body.type||null:td(this.body)?null:typeof this.body=="string"?"text/plain":this.body instanceof $t?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?"application/json":null}clone(t={}){let e=t.method||this.method,i=t.url||this.url,r=t.responseType||this.responseType,s=t.transferCache??this.transferCache,o=t.body!==void 0?t.body:this.body,c=t.withCredentials??this.withCredentials,a=t.reportProgress??this.reportProgress,l=t.headers||this.headers,u=t.params||this.params,d=t.context??this.context;return t.setHeaders!==void 0&&(l=Object.keys(t.setHeaders).reduce((p,g)=>p.set(g,t.setHeaders[g]),l)),t.setParams&&(u=Object.keys(t.setParams).reduce((p,g)=>p.set(g,t.setParams[g]),u)),new n(e,i,o,{params:u,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:c,transferCache:s})}},Ht=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}(Ht||{}),Mi=class{constructor(t,e=200,i="OK"){this.headers=t.headers||new wt,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},ns=class n extends Mi{constructor(t={}){super(t),this.type=Ht.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})}},Pi=class n extends Mi{constructor(t={}){super(t),this.type=Ht.Response,this.body=t.body!==void 0?t.body:null}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})}},rt=class extends Mi{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,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}},cd=200,ig=204;function Qo(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,transferCache:n.transferCache}}var na=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let s;if(e instanceof Oi)s=e;else{let a;r.headers instanceof wt?a=r.headers:a=new wt(r.headers);let l;r.params&&(r.params instanceof $t?l=r.params:l=new $t({fromObject:r.params})),s=new Oi(e,i,r.body!==void 0?r.body:null,{headers:a,context:r.context,params:l,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache})}let o=w(s).pipe(xt(a=>this.handler.handle(a)));if(e instanceof Oi||r.observe==="events")return o;let c=o.pipe(he(a=>a instanceof Pi));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(I(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return a.body}));case"blob":return c.pipe(I(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new Error("Response is not a Blob.");return a.body}));case"text":return c.pipe(I(a=>{if(a.body!==null&&typeof a.body!="string")throw new Error("Response is not a string.");return a.body}));case"json":default:return c.pipe(I(a=>a.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:new $t().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,Qo(r,i))}post(e,i,r={}){return this.request("POST",e,Qo(r,i))}put(e,i,r={}){return this.request("PUT",e,Qo(r,i))}static{this.\u0275fac=function(i){return new(i||n)(C(Ri))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),rg=/^\)\]\}',?\n/,sg="X-Request-URL";function rd(n){if(n.url)return n.url;let t=sg.toLocaleLowerCase();return n.headers.get(t)}var og=(()=>{class n{constructor(){this.fetchImpl=f(ea,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e)),this.ngZone=f(H)}handle(e){return new Ne(i=>{let r=new AbortController;return this.doRequest(e,r.signal,i).then(ta,s=>i.error(new rt({error:s}))),()=>r.abort()})}doRequest(e,i,r){return h(this,null,function*(){let s=this.createRequestInit(e),o;try{let g=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,m({signal:i},s)));ag(g),r.next({type:Ht.Sent}),o=yield g}catch(g){r.error(new rt({error:g,status:g.status??0,statusText:g.statusText,url:e.urlWithParams,headers:g.headers}));return}let c=new wt(o.headers),a=o.statusText,l=rd(o)??e.urlWithParams,u=o.status,d=null;if(e.reportProgress&&r.next(new ns({headers:c,status:u,statusText:a,url:l})),o.body){let g=o.headers.get("content-length"),b=[],v=o.body.getReader(),_=0,S,k,D=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>h(this,null,function*(){for(;;){let{done:R,value:M}=yield v.read();if(R)break;if(b.push(M),_+=M.length,e.reportProgress){k=e.responseType==="text"?(k??"")+(S??=new TextDecoder).decode(M,{stream:!0}):void 0;let B=()=>r.next({type:Ht.DownloadProgress,total:g?+g:void 0,loaded:_,partialText:k});D?D.run(B):B()}}}));let E=this.concatChunks(b,_);try{let R=o.headers.get("Content-Type")??"";d=this.parseBody(e,E,R)}catch(R){r.error(new rt({error:R,headers:new wt(o.headers),status:o.status,statusText:o.statusText,url:rd(o)??e.urlWithParams}));return}}u===0&&(u=d?cd:0),u>=200&&u<300?(r.next(new Pi({body:d,headers:c,status:u,statusText:a,url:l})),r.complete()):r.error(new rt({error:d,headers:c,status:u,statusText:a,url:l}))})}parseBody(e,i,r){switch(e.responseType){case"json":let s=new TextDecoder().decode(i).replace(rg,"");return s===""?null:JSON.parse(s);case"text":return new TextDecoder().decode(i);case"blob":return new Blob([i],{type:r});case"arraybuffer":return i.buffer}}createRequestInit(e){let i={},r=e.withCredentials?"include":void 0;if(e.headers.forEach((s,o)=>i[s]=o.join(",")),e.headers.has("Accept")||(i.Accept="application/json, text/plain, */*"),!e.headers.has("Content-Type")){let s=e.detectContentTypeHeader();s!==null&&(i["Content-Type"]=s)}return{body:e.serializeBody(),method:e.method,headers:i,credentials:r}}concatChunks(e,i){let r=new Uint8Array(i),s=0;for(let o of e)r.set(o,s),s+=o.length;return r}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),ea=class{};function ta(){}function ag(n){n.then(ta,ta)}function ld(n,t){return t(n)}function cg(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}function lg(n,t,e){return(i,r)=>ke(e,()=>t(i,s=>n(s,r)))}var ug=new O(""),rs=new O(""),dg=new O(""),ud=new O("",{providedIn:"root",factory:()=>!0});function hg(){let n=null;return(t,e)=>{n===null&&(n=(f(ug,{optional:!0})??[]).reduceRight(cg,ld));let i=f(Di);if(f(ud)){let s=i.add();return n(t,e).pipe(Ft(()=>i.remove(s)))}else return n(t,e)}}var sd=(()=>{class n extends Ri{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null,this.pendingTasks=f(Di),this.contributeToStability=f(ud)}handle(e){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(rs),...this.injector.get(dg,[])]));this.chain=i.reduceRight((r,s)=>lg(r,s,this.injector),ld)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(Ft(()=>this.pendingTasks.remove(i)))}else return this.chain(e,i=>this.backend.handle(i))}static{this.\u0275fac=function(i){return new(i||n)(C(ts),C(tt))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})();var fg=/^\)\]\}',?\n/;function pg(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}var od=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new U(-2800,!1);let i=this.xhrFactory;return(i.\u0275loadImpl?K(i.\u0275loadImpl()):w(null)).pipe(ae(()=>new Ne(s=>{let o=i.build();if(o.open(e.method,e.urlWithParams),e.withCredentials&&(o.withCredentials=!0),e.headers.forEach((v,_)=>o.setRequestHeader(v,_.join(","))),e.headers.has("Accept")||o.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){let v=e.detectContentTypeHeader();v!==null&&o.setRequestHeader("Content-Type",v)}if(e.responseType){let v=e.responseType.toLowerCase();o.responseType=v!=="json"?v:"text"}let c=e.serializeBody(),a=null,l=()=>{if(a!==null)return a;let v=o.statusText||"OK",_=new wt(o.getAllResponseHeaders()),S=pg(o)||e.url;return a=new ns({headers:_,status:o.status,statusText:v,url:S}),a},u=()=>{let{headers:v,status:_,statusText:S,url:k}=l(),D=null;_!==ig&&(D=typeof o.response>"u"?o.responseText:o.response),_===0&&(_=D?cd:0);let E=_>=200&&_<300;if(e.responseType==="json"&&typeof D=="string"){let R=D;D=D.replace(fg,"");try{D=D!==""?JSON.parse(D):null}catch(M){D=R,E&&(E=!1,D={error:M,text:D})}}E?(s.next(new Pi({body:D,headers:v,status:_,statusText:S,url:k||void 0})),s.complete()):s.error(new rt({error:D,headers:v,status:_,statusText:S,url:k||void 0}))},d=v=>{let{url:_}=l(),S=new rt({error:v,status:o.status||0,statusText:o.statusText||"Unknown Error",url:_||void 0});s.error(S)},p=!1,g=v=>{p||(s.next(l()),p=!0);let _={type:Ht.DownloadProgress,loaded:v.loaded};v.lengthComputable&&(_.total=v.total),e.responseType==="text"&&o.responseText&&(_.partialText=o.responseText),s.next(_)},b=v=>{let _={type:Ht.UploadProgress,loaded:v.loaded};v.lengthComputable&&(_.total=v.total),s.next(_)};return o.addEventListener("load",u),o.addEventListener("error",d),o.addEventListener("timeout",d),o.addEventListener("abort",d),e.reportProgress&&(o.addEventListener("progress",g),c!==null&&o.upload&&o.upload.addEventListener("progress",b)),o.send(c),s.next({type:Ht.Sent}),()=>{o.removeEventListener("error",d),o.removeEventListener("abort",d),o.removeEventListener("load",u),o.removeEventListener("timeout",d),e.reportProgress&&(o.removeEventListener("progress",g),c!==null&&o.upload&&o.upload.removeEventListener("progress",b)),o.readyState!==o.DONE&&o.abort()}})))}static{this.\u0275fac=function(i){return new(i||n)(C(Qr))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),dd=new O(""),gg="XSRF-TOKEN",mg=new O("",{providedIn:"root",factory:()=>gg}),_g="X-XSRF-TOKEN",vg=new O("",{providedIn:"root",factory:()=>_g}),is=class{},yg=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Kr(e,this.cookieName),this.lastCookieString=e),this.lastToken}static{this.\u0275fac=function(i){return new(i||n)(C(z),C(nt),C(mg))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})();function bg(n,t){let e=n.url.toLowerCase();if(!f(dd)||n.method==="GET"||n.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(n);let i=f(is).getToken(),r=f(vg);return i!=null&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var ia=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}(ia||{});function hd(n,t){return{\u0275kind:n,\u0275providers:t}}function ED(...n){let t=[na,od,sd,{provide:Ri,useExisting:sd},{provide:ts,useFactory:()=>f(og,{optional:!0})??f(od)},{provide:rs,useValue:bg,multi:!0},{provide:dd,useValue:!0},{provide:is,useClass:yg}];for(let e of n)t.push(...e.\u0275providers);return Ge(t)}function CD(n){return hd(ia.Interceptors,n.map(t=>({provide:rs,useValue:t,multi:!0})))}var ad=new O("");function SD(){return hd(ia.LegacyInterceptors,[{provide:ad,useFactory:hg},{provide:rs,useExisting:ad,multi:!0}])}var oa=class extends qu{constructor(){super(...arguments),this.supportsDOMEvents=!0}},aa=class n extends oa{static makeCurrent(){Wu(new n)}onAndCancel(t,e,i){return t.addEventListener(e,i),()=>{t.removeEventListener(e,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=Dg();return e==null?null:Tg(e)}resetBaseElement(){Ni=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Kr(document.cookie,t)}},Ni=null;function Dg(){return Ni=Ni||document.querySelector("base"),Ni?Ni.getAttribute("href"):null}function Tg(n){return new URL(n,document.baseURI).pathname}var Eg=(()=>{class n{build(){return new XMLHttpRequest}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),ca=new O(""),md=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;if(i=this._plugins.find(s=>s.supports(e)),!i)throw new U(5101,!1);return this._eventNameToPlugin.set(e,i),i}static{this.\u0275fac=function(i){return new(i||n)(C(ca),C(H))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),ss=class{constructor(t){this._doc=t}},ra="ng-app-id",_d=(()=>{class n{constructor(e,i,r,s={}){this.doc=e,this.appId=i,this.nonce=r,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Yr(s),this.resetHostNodes()}addStyles(e){for(let i of e)this.changeUsageCount(i,1)===1&&this.onStyleAdded(i)}removeStyles(e){for(let i of e)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){let e=this.styleNodesInDOM;e&&(e.forEach(i=>i.remove()),e.clear());for(let i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(let i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(e){for(let i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){let i=this.styleRef;i.get(e)?.elements?.forEach(r=>r.remove()),i.delete(e)}collectServerRenderedStyles(){let e=this.doc.head?.querySelectorAll(`style[${ra}="${this.appId}"]`);if(e?.length){let i=new Map;return e.forEach(r=>{r.textContent!=null&&i.set(r.textContent,r)}),i}return null}changeUsageCount(e,i){let r=this.styleRef;if(r.has(e)){let s=r.get(e);return s.usage+=i,s.usage}return r.set(e,{usage:i,elements:[]}),i}getStyleElement(e,i){let r=this.styleNodesInDOM,s=r?.get(i);if(s?.parentNode===e)return r.delete(i),s.removeAttribute(ra),s;{let o=this.doc.createElement("style");return this.nonce&&o.setAttribute("nonce",this.nonce),o.textContent=i,this.platformIsServer&&o.setAttribute(ra,this.appId),e.appendChild(o),o}}addStyleToHost(e,i){let r=this.getStyleElement(e,i),s=this.styleRef,o=s.get(i)?.elements;o?o.push(r):s.set(i,{elements:[r],usage:1})}resetHostNodes(){let e=this.hostNodes;e.clear(),e.add(this.doc.head)}static{this.\u0275fac=function(i){return new(i||n)(C(z),C(Bo),C(Vo,8),C(nt))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),sa={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"},ua=/%COMP%/g,vd="%COMP%",Cg=`_nghost-${vd}`,Sg=`_ngcontent-${vd}`,Ig=!0,Ag=new O("",{providedIn:"root",factory:()=>Ig});function Og(n){return Sg.replace(ua,n)}function Rg(n){return Cg.replace(ua,n)}function yd(n,t){return t.map(e=>e.replace(ua,n))}var fd=(()=>{class n{constructor(e,i,r,s,o,c,a,l=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=c,this.ngZone=a,this.nonce=l,this.rendererByCompId=new Map,this.platformIsServer=Yr(c),this.defaultRenderer=new ki(e,o,a,this.platformIsServer)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===bi.ShadowDom&&(i=P(m({},i),{encapsulation:bi.Emulated}));let r=this.getOrCreateRenderer(e,i);return r instanceof os?r.applyToHost(e):r instanceof xi&&r.applyStyles(),r}getOrCreateRenderer(e,i){let r=this.rendererByCompId,s=r.get(i.id);if(!s){let o=this.doc,c=this.ngZone,a=this.eventManager,l=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,d=this.platformIsServer;switch(i.encapsulation){case bi.Emulated:s=new os(a,l,i,this.appId,u,o,c,d);break;case bi.ShadowDom:return new la(a,l,e,i,o,c,this.nonce,d);default:s=new xi(a,l,i,u,o,c,d);break}r.set(i.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(i){return new(i||n)(C(md),C(_d),C(Bo),C(Ag),C(z),C(nt),C(H),C(Vo))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),ki=class{constructor(t,e,i,r){this.eventManager=t,this.doc=e,this.ngZone=i,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,e){return e?this.doc.createElementNS(sa[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(pd(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(pd(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){e.remove()}selectRootElement(t,e){let i=typeof t=="string"?this.doc.querySelector(t):t;if(!i)throw new U(-5104,!1);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;let s=sa[r];s?t.setAttributeNS(s,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let r=sa[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(Ti.DashCase|Ti.Important)?t.style.setProperty(e,i,r&Ti.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Ti.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t!=null&&(t[e]=i)}setValue(t,e){t.nodeValue=e}listen(t,e,i){if(typeof t=="string"&&(t=Bn().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${e}`);return this.eventManager.addEventListener(t,e,this.decoratePreventDefault(i))}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function pd(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var la=class extends ki{constructor(t,e,i,r,s,o,c,a){super(t,s,o,a),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=yd(r.id,r.styles);for(let u of l){let d=document.createElement("style");c&&d.setAttribute("nonce",c),d.textContent=u,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},xi=class extends ki{constructor(t,e,i,r,s,o,c,a){super(t,s,o,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r,this.styles=a?yd(a,i.styles):i.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},os=class extends xi{constructor(t,e,i,r,s,o,c,a){let l=r+"-"+i.id;super(t,e,i,s,o,c,a,l),this.contentAttr=Og(l),this.hostAttr=Rg(l)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}},Mg=(()=>{class n extends ss{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}static{this.\u0275fac=function(i){return new(i||n)(C(z))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})(),gd=["alt","control","meta","shift"],Pg={"\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"},Ng={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},kg=(()=>{class n extends ss{constructor(e){super(e)}supports(e){return n.parseEventName(e)!=null}addEventListener(e,i,r){let s=n.parseEventName(i),o=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Bn().onAndCancel(e,s.domEventName,o))}static parseEventName(e){let i=e.toLowerCase().split("."),r=i.shift();if(i.length===0||!(r==="keydown"||r==="keyup"))return null;let s=n._normalizeKey(i.pop()),o="",c=i.indexOf("code");if(c>-1&&(i.splice(c,1),o="code."),gd.forEach(l=>{let u=i.indexOf(l);u>-1&&(i.splice(u,1),o+=l+".")}),o+=s,i.length!=0||s.length===0)return null;let a={};return a.domEventName=r,a.fullKey=o,a}static matchEventFullKeyCode(e,i){let r=Pg[e.key]||e.key,s="";return i.indexOf("code.")>-1&&(r=e.code,s="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),gd.forEach(o=>{if(o!==r){let c=Ng[o];c(e)&&(s+=o+".")}}),s+=r,s===i)}static eventCallback(e,i,r){return s=>{n.matchEventFullKeyCode(s,e)&&r.runGuarded(()=>i(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static{this.\u0275fac=function(i){return new(i||n)(C(z))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})();function YD(n,t){return Hu(m({rootComponent:n},xg(t)))}function xg(n){return{appProviders:[...Ug,...n?.providers??[]],platformProviders:Vg}}function Fg(){aa.makeCurrent()}function Lg(){return new Lo}function Bg(){return bu(document),document}var Vg=[{provide:nt,useValue:Qu},{provide:wu,useValue:Fg,multi:!0},{provide:z,useFactory:Bg,deps:[]}];var Ug=[{provide:yu,useValue:"root"},{provide:Lo,useFactory:Lg,deps:[]},{provide:ca,useClass:Mg,multi:!0,deps:[z,H,nt]},{provide:ca,useClass:kg,multi:!0,deps:[z]},fd,_d,md,{provide:Mu,useExisting:fd},{provide:Qr,useClass:Eg,deps:[]},[]];var bd=(()=>{class n{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static{this.\u0275fac=function(i){return new(i||n)(C(z))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var da=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=C(jg),r},providedIn:"root"})}}return n})(),jg=(()=>{class n extends da{constructor(e){super(),this._doc=e}sanitize(e,i){if(i==null)return null;switch(e){case gt.NONE:return i;case gt.HTML:return xn(i,"HTML")?kn(i):Au(this._doc,String(i)).toString();case gt.STYLE:return xn(i,"Style")?kn(i):i;case gt.SCRIPT:if(xn(i,"Script"))return kn(i);throw new U(5200,!1);case gt.URL:return xn(i,"URL")?kn(i):Iu(String(i));case gt.RESOURCE_URL:if(xn(i,"ResourceURL"))return kn(i);throw new U(5201,!1);default:throw new U(5202,!1)}}bypassSecurityTrustHtml(e){return Du(e)}bypassSecurityTrustStyle(e){return Tu(e)}bypassSecurityTrustScript(e){return Eu(e)}bypassSecurityTrustUrl(e){return Cu(e)}bypassSecurityTrustResourceUrl(e){return Su(e)}static{this.\u0275fac=function(i){return new(i||n)(C(z))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var A="primary",Qi=Symbol("RouteTitle"),ma=class{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 Gn(n){return new ma(n)}function Hg(n,t,e){let i=e.path.split("/");if(i.length>n.length||e.pathMatch==="full"&&(t.hasChildren()||i.length<n.length))return null;let r={};for(let s=0;s<i.length;s++){let o=i[s],c=n[s];if(o[0]===":")r[o.substring(1)]=c;else if(o!==c.path)return null}return{consumed:n.slice(0,i.length),posParams:r}}function Gg(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;++e)if(!st(n[e],t[e]))return!1;return!0}function st(n,t){let e=n?_a(n):void 0,i=t?_a(t):void 0;if(!e||!i||e.length!=i.length)return!1;let r;for(let s=0;s<e.length;s++)if(r=e[s],!Pd(n[r],t[r]))return!1;return!0}function _a(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function Pd(n,t){if(Array.isArray(n)&&Array.isArray(t)){if(n.length!==t.length)return!1;let e=[...n].sort(),i=[...t].sort();return e.every((r,s)=>i[s]===r)}else return n===t}function Nd(n){return n.length>0?n[n.length-1]:null}function Wt(n){return su(n)?n:zr(n)?K(Promise.resolve(n)):w(n)}var zg={exact:xd,subset:Fd},kd={exact:Wg,subset:qg,ignored:()=>!0};function Dd(n,t,e){return zg[e.paths](n.root,t.root,e.matrixParams)&&kd[e.queryParams](n.queryParams,t.queryParams)&&!(e.fragment==="exact"&&n.fragment!==t.fragment)}function Wg(n,t){return st(n,t)}function xd(n,t,e){if(!fn(n.segments,t.segments)||!ls(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(let i in t.children)if(!n.children[i]||!xd(n.children[i],t.children[i],e))return!1;return!0}function qg(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>Pd(n[e],t[e]))}function Fd(n,t,e){return Ld(n,t,t.segments,e)}function Ld(n,t,e,i){if(n.segments.length>e.length){let r=n.segments.slice(0,e.length);return!(!fn(r,e)||t.hasChildren()||!ls(r,e,i))}else if(n.segments.length===e.length){if(!fn(n.segments,e)||!ls(n.segments,e,i))return!1;for(let r in t.children)if(!n.children[r]||!Fd(n.children[r],t.children[r],i))return!1;return!0}else{let r=e.slice(0,n.segments.length),s=e.slice(n.segments.length);return!fn(n.segments,r)||!ls(n.segments,r,i)||!n.children[A]?!1:Ld(n.children[A],t,s,i)}}function ls(n,t,e){return t.every((i,r)=>kd[e](n[r].parameters,i.parameters))}var Tt=class{constructor(t=new L([],{}),e={},i=null){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap??=Gn(this.queryParams),this._queryParamMap}toString(){return Yg.serialize(this)}},L=class{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Object.values(e).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return us(this)}},hn=class{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap??=Gn(this.parameters),this._parameterMap}toString(){return Vd(this)}};function Jg(n,t){return fn(n,t)&&n.every((e,i)=>st(e.parameters,t[i].parameters))}function fn(n,t){return n.length!==t.length?!1:n.every((e,i)=>e.path===t[i].path)}function Kg(n,t){let e=[];return Object.entries(n.children).forEach(([i,r])=>{i===A&&(e=e.concat(t(r,i)))}),Object.entries(n.children).forEach(([i,r])=>{i!==A&&(e=e.concat(t(r,i)))}),e}var Zi=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:()=>new zn,providedIn:"root"})}}return n})(),zn=class{parse(t){let e=new ya(t);return new Tt(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){let e=`/${Fi(t.root,!0)}`,i=Xg(t.queryParams),r=typeof t.fragment=="string"?`#${Qg(t.fragment)}`:"";return`${e}${i}${r}`}},Yg=new zn;function us(n){return n.segments.map(t=>Vd(t)).join("/")}function Fi(n,t){if(!n.hasChildren())return us(n);if(t){let e=n.children[A]?Fi(n.children[A],!1):"",i=[];return Object.entries(n.children).forEach(([r,s])=>{r!==A&&i.push(`${r}:${Fi(s,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}else{let e=Kg(n,(i,r)=>r===A?[Fi(n.children[A],!1)]:[`${r}:${Fi(i,!1)}`]);return Object.keys(n.children).length===1&&n.children[A]!=null?`${us(n)}/${e[0]}`:`${us(n)}/(${e.join("//")})`}}function Bd(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function as(n){return Bd(n).replace(/%3B/gi,";")}function Qg(n){return encodeURI(n)}function va(n){return Bd(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ds(n){return decodeURIComponent(n)}function Td(n){return ds(n.replace(/\+/g,"%20"))}function Vd(n){return`${va(n.path)}${Zg(n.parameters)}`}function Zg(n){return Object.entries(n).map(([t,e])=>`;${va(t)}=${va(e)}`).join("")}function Xg(n){let t=Object.entries(n).map(([e,i])=>Array.isArray(i)?i.map(r=>`${as(e)}=${as(r)}`).join("&"):`${as(e)}=${as(i)}`).filter(e=>e);return t.length?`?${t.join("&")}`:""}var em=/^[^\/()?;#]+/;function ha(n){let t=n.match(em);return t?t[0]:""}var tm=/^[^\/()?;=#]+/;function nm(n){let t=n.match(tm);return t?t[0]:""}var im=/^[^=?&#]+/;function rm(n){let t=n.match(im);return t?t[0]:""}var sm=/^[^&#]+/;function om(n){let t=n.match(sm);return t?t[0]:""}var ya=class{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new L([],{}):new L([],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 i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[A]=new L(t,e)),i}parseSegment(){let t=ha(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new U(4009,!1);return this.capture(t),new hn(ds(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let e=nm(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let r=ha(this.remaining);r&&(i=r,this.capture(i))}t[ds(e)]=ds(i)}parseQueryParam(t){let e=rm(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let o=om(this.remaining);o&&(i=o,this.capture(i))}let r=Td(e),s=Td(i);if(t.hasOwnProperty(r)){let o=t[r];Array.isArray(o)||(o=[o],t[r]=o),o.push(s)}else t[r]=s}parseParens(t){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=ha(this.remaining),r=this.remaining[i.length];if(r!=="/"&&r!==")"&&r!==";")throw new U(4010,!1);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=A);let o=this.parseChildren();e[s]=Object.keys(o).length===1?o[A]:new L([],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 U(4011,!1)}};function Ud(n){return n.segments.length>0?new L([],{[A]:n}):n}function jd(n){let t={};for(let[i,r]of Object.entries(n.children)){let s=jd(r);if(i===A&&s.segments.length===0&&s.hasChildren())for(let[o,c]of Object.entries(s.children))t[o]=c;else(s.segments.length>0||s.hasChildren())&&(t[i]=s)}let e=new L(n.segments,t);return am(e)}function am(n){if(n.numberOfChildren===1&&n.children[A]){let t=n.children[A];return new L(n.segments.concat(t.segments),t.children)}return n}function $i(n){return n instanceof Tt}function cm(n,t,e=null,i=null){let r=$d(n);return Hd(r,t,e,i)}function $d(n){let t;function e(s){let o={};for(let a of s.children){let l=e(a);o[a.outlet]=l}let c=new L(s.url,o);return s===n&&(t=c),c}let i=e(n.root),r=Ud(i);return t??r}function Hd(n,t,e,i){let r=n;for(;r.parent;)r=r.parent;if(t.length===0)return fa(r,r,r,e,i);let s=lm(t);if(s.toRoot())return fa(r,r,new L([],{}),e,i);let o=um(s,r,n),c=o.processChildren?Vi(o.segmentGroup,o.index,s.commands):zd(o.segmentGroup,o.index,s.commands);return fa(r,o.segmentGroup,c,e,i)}function hs(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function Hi(n){return typeof n=="object"&&n!=null&&n.outlets}function fa(n,t,e,i,r){let s={};i&&Object.entries(i).forEach(([a,l])=>{s[a]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`});let o;n===t?o=e:o=Gd(n,t,e);let c=Ud(jd(o));return new Tt(c,s,r)}function Gd(n,t,e){let i={};return Object.entries(n.children).forEach(([r,s])=>{s===t?i[r]=e:i[r]=Gd(s,t,e)}),new L(n.segments,i)}var fs=class{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&hs(i[0]))throw new U(4003,!1);let r=i.find(Hi);if(r&&r!==Nd(i))throw new U(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function lm(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new fs(!0,0,n);let t=0,e=!1,i=n.reduce((r,s,o)=>{if(typeof s=="object"&&s!=null){if(s.outlets){let c={};return Object.entries(s.outlets).forEach(([a,l])=>{c[a]=typeof l=="string"?l.split("/"):l}),[...r,{outlets:c}]}if(s.segmentPath)return[...r,s.segmentPath]}return typeof s!="string"?[...r,s]:o===0?(s.split("/").forEach((c,a)=>{a==0&&c==="."||(a==0&&c===""?e=!0:c===".."?t++:c!=""&&r.push(c))}),r):[...r,s]},[]);return new fs(e,t,i)}var jn=class{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}};function um(n,t,e){if(n.isAbsolute)return new jn(t,!0,0);if(!e)return new jn(t,!1,NaN);if(e.parent===null)return new jn(e,!0,0);let i=hs(n.commands[0])?0:1,r=e.segments.length-1+i;return dm(e,r,n.numberOfDoubleDots)}function dm(n,t,e){let i=n,r=t,s=e;for(;s>r;){if(s-=r,i=i.parent,!i)throw new U(4005,!1);r=i.segments.length}return new jn(i,!1,r-s)}function hm(n){return Hi(n[0])?n[0].outlets:{[A]:n}}function zd(n,t,e){if(n??=new L([],{}),n.segments.length===0&&n.hasChildren())return Vi(n,t,e);let i=fm(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex<n.segments.length){let s=new L(n.segments.slice(0,i.pathIndex),{});return s.children[A]=new L(n.segments.slice(i.pathIndex),n.children),Vi(s,0,r)}else return i.match&&r.length===0?new L(n.segments,{}):i.match&&!n.hasChildren()?ba(n,t,e):i.match?Vi(n,0,r):ba(n,t,e)}function Vi(n,t,e){if(e.length===0)return new L(n.segments,{});{let i=hm(e),r={};if(Object.keys(i).some(s=>s!==A)&&n.children[A]&&n.numberOfChildren===1&&n.children[A].segments.length===0){let s=Vi(n.children[A],t,e);return new L(n.segments,s.children)}return Object.entries(i).forEach(([s,o])=>{typeof o=="string"&&(o=[o]),o!==null&&(r[s]=zd(n.children[s],t,o))}),Object.entries(n.children).forEach(([s,o])=>{i[s]===void 0&&(r[s]=o)}),new L(n.segments,r)}}function fm(n,t,e){let i=0,r=t,s={match:!1,pathIndex:0,commandIndex:0};for(;r<n.segments.length;){if(i>=e.length)return s;let o=n.segments[r],c=e[i];if(Hi(c))break;let a=`${c}`,l=i<e.length-1?e[i+1]:null;if(r>0&&a===void 0)break;if(a&&l&&typeof l=="object"&&l.outlets===void 0){if(!Cd(a,l,o))return s;i+=2}else{if(!Cd(a,{},o))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}function ba(n,t,e){let i=n.segments.slice(0,t),r=0;for(;r<e.length;){let s=e[r];if(Hi(s)){let a=pm(s.outlets);return new L(i,a)}if(r===0&&hs(e[0])){let a=n.segments[t];i.push(new hn(a.path,Ed(e[0]))),r++;continue}let o=Hi(s)?s.outlets[A]:`${s}`,c=r<e.length-1?e[r+1]:null;o&&c&&hs(c)?(i.push(new hn(o,Ed(c))),r+=2):(i.push(new hn(o,{})),r++)}return new L(i,{})}function pm(n){let t={};return Object.entries(n).forEach(([e,i])=>{typeof i=="string"&&(i=[i]),i!==null&&(t[e]=ba(new L([],{}),0,i))}),t}function Ed(n){let t={};return Object.entries(n).forEach(([e,i])=>t[e]=`${i}`),t}function Cd(n,t,e){return n==e.path&&st(t,e.parameters)}var Ui="imperative",ie=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}(ie||{}),Be=class{constructor(t,e){this.id=t,this.url=e}},Wn=class extends Be{constructor(t,e,i="imperative",r=null){super(t,e),this.type=ie.NavigationStart,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Et=class extends Be{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i,this.type=ie.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Pe=function(n){return n[n.Redirect=0]="Redirect",n[n.SupersededByNewNavigation=1]="SupersededByNewNavigation",n[n.NoDataFromResolver=2]="NoDataFromResolver",n[n.GuardRejected=3]="GuardRejected",n}(Pe||{}),ps=function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n}(ps||{}),Dt=class extends Be{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=ie.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},zt=class extends Be{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=ie.NavigationSkipped}},Gi=class extends Be{constructor(t,e,i,r){super(t,e),this.error=i,this.target=r,this.type=ie.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},gs=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ie.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},wa=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ie.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Da=class extends Be{constructor(t,e,i,r,s){super(t,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=s,this.type=ie.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Ta=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ie.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ea=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ie.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ca=class{constructor(t){this.route=t,this.type=ie.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Sa=class{constructor(t){this.route=t,this.type=ie.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Ia=class{constructor(t){this.snapshot=t,this.type=ie.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Aa=class{constructor(t){this.snapshot=t,this.type=ie.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Oa=class{constructor(t){this.snapshot=t,this.type=ie.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ra=class{constructor(t){this.snapshot=t,this.type=ie.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ms=class{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i,this.type=ie.Scroll}toString(){let t=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${t}')`}},zi=class{},qn=class{constructor(t,e){this.url=t,this.navigationBehaviorOptions=e}};function gm(n,t){return n.providers&&!n._injector&&(n._injector=Ho(n.providers,t,`Route: ${n.path}`)),n._injector??t}function qe(n){return n.outlet||A}function mm(n,t){let e=n.filter(i=>qe(i)===t);return e.push(...n.filter(i=>qe(i)!==t)),e}function Xi(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 Ma=class{get injector(){return Xi(this.route?.snapshot)??this.rootInjector}set injector(t){}constructor(t){this.rootInjector=t,this.outlet=null,this.route=null,this.children=new er(this.rootInjector),this.attachRef=null}},er=(()=>{class n{constructor(e){this.rootInjector=e,this.contexts=new Map}onChildOutletCreated(e,i){let r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){let i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new Ma(this.rootInjector),this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}static{this.\u0275fac=function(i){return new(i||n)(C(tt))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),_s=class{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=Pa(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){let e=Pa(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){let e=Na(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return Na(t,this._root).map(e=>e.value)}};function Pa(n,t){if(n===t.value)return t;for(let e of t.children){let i=Pa(n,e);if(i)return i}return null}function Na(n,t){if(n===t.value)return[t];for(let e of t.children){let i=Na(n,e);if(i.length)return i.unshift(t),i}return[]}var Me=class{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}};function Un(n){let t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}var vs=class extends _s{constructor(t,e){super(t),this.snapshot=e,$a(this,t)}toString(){return this.snapshot.toString()}};function Wd(n){let t=_m(n),e=new me([new hn("",{})]),i=new me({}),r=new me({}),s=new me({}),o=new me(""),c=new Ct(e,i,s,o,r,A,n,t.root);return c.snapshot=t.root,new vs(new Me(c,[]),t)}function _m(n){let t={},e={},i={},r="",s=new $n([],t,i,r,e,A,n,null,{});return new bs("",new Me(s,[]))}var Ct=class{constructor(t,e,i,r,s,o,c,a){this.urlSubject=t,this.paramsSubject=e,this.queryParamsSubject=i,this.fragmentSubject=r,this.dataSubject=s,this.outlet=o,this.component=c,this._futureSnapshot=a,this.title=this.dataSubject?.pipe(I(l=>l[Qi]))??w(void 0),this.url=t,this.params=e,this.queryParams=i,this.fragment=r,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(I(t=>Gn(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(I(t=>Gn(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function ys(n,t,e="emptyOnly"){let i,{routeConfig:r}=n;return t!==null&&(e==="always"||r?.path===""||!t.component&&!t.routeConfig?.loadComponent)?i={params:m(m({},t.params),n.params),data:m(m({},t.data),n.data),resolve:m(m(m(m({},n.data),t.data),r?.data),n._resolvedData)}:i={params:m({},n.params),data:m({},n.data),resolve:m(m({},n.data),n._resolvedData??{})},r&&Jd(r)&&(i.resolve[Qi]=r.title),i}var $n=class{get title(){return this.data?.[Qi]}constructor(t,e,i,r,s,o,c,a,l){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=c,this.routeConfig=a,this._resolve=l}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??=Gn(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Gn(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(i=>i.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${e}')`}},bs=class extends _s{constructor(t,e){super(e),this.url=t,$a(this,e)}toString(){return qd(this._root)}};function $a(n,t){t.value._routerState=n,t.children.forEach(e=>$a(n,e))}function qd(n){let t=n.children.length>0?` { ${n.children.map(qd).join(", ")} } `:"";return`${n.value}${t}`}function pa(n){if(n.snapshot){let t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,st(t.queryParams,e.queryParams)||n.queryParamsSubject.next(e.queryParams),t.fragment!==e.fragment&&n.fragmentSubject.next(e.fragment),st(t.params,e.params)||n.paramsSubject.next(e.params),Gg(t.url,e.url)||n.urlSubject.next(e.url),st(t.data,e.data)||n.dataSubject.next(e.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function ka(n,t){let e=st(n.params,t.params)&&Jg(n.url,t.url),i=!n.parent!=!t.parent;return e&&!i&&(!n.parent||ka(n.parent,t.parent))}function Jd(n){return typeof n.title=="string"||n.title===null}var vm=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=A,this.activateEvents=new $,this.deactivateEvents=new $,this.attachEvents=new $,this.detachEvents=new $,this.parentContexts=f(er),this.location=f($r),this.changeDetector=f(bt),this.inputBinder=f(Es,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(e){if(e.name){let{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),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 U(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new U(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new U(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,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,i){if(this.isActivated)throw new U(4013,!1);this._activatedRoute=e;let r=this.location,o=e.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,a=new xa(e,c,r.injector);this.activated=r.createComponent(o,{index:r.length,injector:a,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[pt]})}}return n})(),xa=class n{__ngOutletInjector(t){return new n(this.route,this.childContexts,t)}constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===Ct?this.route:t===er?this.childContexts:this.parent.get(t,e)}},Es=new O(""),Sd=(()=>{class n{constructor(){this.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:i}=e,r=yi([i.queryParams,i.params,i.data]).pipe(ae(([s,o,c],a)=>(c=m(m(m({},s),o),c),a===0?w(c):Promise.resolve(c)))).subscribe(s=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==i||i.component===null){this.unsubscribeFromRouteData(e);return}let o=zu(i.component);if(!o){this.unsubscribeFromRouteData(e);return}for(let{templateName:c}of o.inputs)e.activatedComponentRef.setInput(c,s[c])});this.outletDataSubscriptions.set(e,r)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})();function ym(n,t,e){let i=Wi(n,t._root,e?e._root:void 0);return new vs(i,t)}function Wi(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){let i=e.value;i._futureSnapshot=t.value;let r=bm(n,t,e);return new Me(i,r)}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(c=>Wi(n,c)),o}}let i=wm(t.value),r=t.children.map(s=>Wi(n,s));return new Me(i,r)}}function bm(n,t,e){return t.children.map(i=>{for(let r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Wi(n,i,r);return Wi(n,i)})}function wm(n){return new Ct(new me(n.url),new me(n.params),new me(n.queryParams),new me(n.fragment),new me(n.data),n.outlet,n.component,n)}var qi=class{constructor(t,e){this.redirectTo=t,this.navigationBehaviorOptions=e}},Kd="ngNavigationCancelingError";function ws(n,t){let{redirectTo:e,navigationBehaviorOptions:i}=$i(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=Yd(!1,Pe.Redirect);return r.url=e,r.navigationBehaviorOptions=i,r}function Yd(n,t){let e=new Error(`NavigationCancelingError: ${n||""}`);return e[Kd]=!0,e.cancellationCode=t,e}function Dm(n){return Qd(n)&&$i(n.url)}function Qd(n){return!!n&&n[Kd]}var Tm=(n,t,e,i)=>I(r=>(new Fa(t,r.targetRouterState,r.currentRouterState,e,i).activate(n),r)),Fa=class{constructor(t,e,i,r,s){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r,this.inputBindingEnabled=s}activate(t){let e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),pa(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){let r=Un(e);t.children.forEach(s=>{let o=s.value.outlet;this.deactivateRoutes(s,r[o],i),delete r[o]}),Object.values(r).forEach(s=>{this.deactivateRouteAndItsChildren(s,i)})}deactivateRoutes(t,e,i){let r=t.value,s=e?e.value:null;if(r===s)if(r.component){let o=i.getContext(r.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,i);else s&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){let i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,s=Un(t);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);if(i&&i.outlet){let o=i.outlet.detach(),c=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:o,route:t,contexts:c})}}deactivateRouteAndOutlet(t,e){let i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,s=Un(t);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(t,e,i){let r=Un(e);t.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],i),this.forwardEvent(new Ra(s.value.snapshot))}),t.children.length&&this.forwardEvent(new Aa(t.value.snapshot))}activateRoutes(t,e,i){let r=t.value,s=e?e.value:null;if(pa(r),r===s)if(r.component){let o=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,i);else if(r.component){let o=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let c=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(c.contexts),o.attachRef=c.componentRef,o.route=c.route.value,o.outlet&&o.outlet.attach(c.componentRef,c.route.value),pa(c.route.value),this.activateChildRoutes(t,null,o.children)}else o.attachRef=null,o.route=r,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(t,null,o.children)}else this.activateChildRoutes(t,null,i)}},Ds=class{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},Hn=class{constructor(t,e){this.component=t,this.route=e}};function Em(n,t,e){let i=n._root,r=t?t._root:null;return Li(i,r,e,[i.value])}function Cm(n){let t=n.routeConfig?n.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:n,guards:t}}function Kn(n,t){let e=Symbol(),i=t.get(n,e);return i===e?typeof n=="function"&&!_u(n)?n:t.get(n):i}function Li(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=Un(t);return n.children.forEach(o=>{Sm(o,s[o.value.outlet],e,i.concat([o.value]),r),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,c])=>ji(c,e.getContext(o),r)),r}function Sm(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=n.value,o=t?t.value:null,c=e?e.getContext(n.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){let a=Im(o,s,s.routeConfig.runGuardsAndResolvers);a?r.canActivateChecks.push(new Ds(i)):(s.data=o.data,s._resolvedData=o._resolvedData),s.component?Li(n,t,c?c.children:null,i,r):Li(n,t,e,i,r),a&&c&&c.outlet&&c.outlet.isActivated&&r.canDeactivateChecks.push(new Hn(c.outlet.component,o))}else o&&ji(t,c,r),r.canActivateChecks.push(new Ds(i)),s.component?Li(n,null,c?c.children:null,i,r):Li(n,null,e,i,r);return r}function Im(n,t,e){if(typeof e=="function")return e(n,t);switch(e){case"pathParamsChange":return!fn(n.url,t.url);case"pathParamsOrQueryParamsChange":return!fn(n.url,t.url)||!st(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ka(n,t)||!st(n.queryParams,t.queryParams);case"paramsChange":default:return!ka(n,t)}}function ji(n,t,e){let i=Un(n),r=n.value;Object.entries(i).forEach(([s,o])=>{r.component?t?ji(o,t.children.getContext(s),e):ji(o,null,e):ji(o,t,e)}),r.component?t&&t.outlet&&t.outlet.isActivated?e.canDeactivateChecks.push(new Hn(t.outlet.component,r)):e.canDeactivateChecks.push(new Hn(null,r)):e.canDeactivateChecks.push(new Hn(null,r))}function tr(n){return typeof n=="function"}function Am(n){return typeof n=="boolean"}function Om(n){return n&&tr(n.canLoad)}function Rm(n){return n&&tr(n.canActivate)}function Mm(n){return n&&tr(n.canActivateChild)}function Pm(n){return n&&tr(n.canDeactivate)}function Nm(n){return n&&tr(n.canMatch)}function Zd(n){return n instanceof ou||n?.name==="EmptyError"}var cs=Symbol("INITIAL_VALUE");function Jn(){return ae(n=>yi(n.map(t=>t.pipe(Te(1),ko(cs)))).pipe(I(t=>{for(let e of t)if(e!==!0){if(e===cs)return cs;if(e===!1||km(e))return e}return!0}),he(t=>t!==cs),Te(1)))}function km(n){return $i(n)||n instanceof qi}function xm(n,t){return we(e=>{let{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return o.length===0&&s.length===0?w(P(m({},e),{guardsResult:!0})):Fm(o,i,r,n).pipe(we(c=>c&&Am(c)?Lm(i,s,n,t):w(c)),I(c=>P(m({},e),{guardsResult:c})))})}function Fm(n,t,e,i){return K(n).pipe(we(r=>$m(r.component,r.route,e,t,i)),Lt(r=>r!==!0,!0))}function Lm(n,t,e,i){return K(t).pipe(xt(r=>cu(Vm(r.route.parent,i),Bm(r.route,i),jm(n,r.path,e),Um(n,r.route,e))),Lt(r=>r!==!0,!0))}function Bm(n,t){return n!==null&&t&&t(new Oa(n)),w(!0)}function Vm(n,t){return n!==null&&t&&t(new Ia(n)),w(!0)}function Um(n,t,e){let i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||i.length===0)return w(!0);let r=i.map(s=>Ro(()=>{let o=Xi(t)??e,c=Kn(s,o),a=Rm(c)?c.canActivate(t,n):ke(o,()=>c(t,n));return Wt(a).pipe(Lt())}));return w(r).pipe(Jn())}function jm(n,t,e){let i=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>Cm(o)).filter(o=>o!==null).map(o=>Ro(()=>{let c=o.guards.map(a=>{let l=Xi(o.node)??e,u=Kn(a,l),d=Mm(u)?u.canActivateChild(i,n):ke(l,()=>u(i,n));return Wt(d).pipe(Lt())});return w(c).pipe(Jn())}));return w(s).pipe(Jn())}function $m(n,t,e,i,r){let s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!s||s.length===0)return w(!0);let o=s.map(c=>{let a=Xi(t)??r,l=Kn(c,a),u=Pm(l)?l.canDeactivate(n,t,e,i):ke(a,()=>l(n,t,e,i));return Wt(u).pipe(Lt())});return w(o).pipe(Jn())}function Hm(n,t,e,i){let r=t.canLoad;if(r===void 0||r.length===0)return w(!0);let s=r.map(o=>{let c=Kn(o,n),a=Om(c)?c.canLoad(t,e):ke(n,()=>c(t,e));return Wt(a)});return w(s).pipe(Jn(),Xd(i))}function Xd(n){return tu(V(t=>{if(typeof t!="boolean")throw ws(n,t)}),I(t=>t===!0))}function Gm(n,t,e,i){let r=t.canMatch;if(!r||r.length===0)return w(!0);let s=r.map(o=>{let c=Kn(o,n),a=Nm(c)?c.canMatch(t,e):ke(n,()=>c(t,e));return Wt(a)});return w(s).pipe(Jn(),Xd(i))}var Ji=class{constructor(t){this.segmentGroup=t||null}},Ki=class extends Error{constructor(t){super(),this.urlTree=t}};function Vn(n){return ln(new Ji(n))}function zm(n){return ln(new U(4e3,!1))}function Wm(n){return ln(Yd(!1,Pe.GuardRejected))}var La=class{constructor(t,e){this.urlSerializer=t,this.urlTree=e}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),r.numberOfChildren===0)return w(i);if(r.numberOfChildren>1||!r.children[A])return zm(`${t.redirectTo}`);r=r.children[A]}}applyRedirectCommands(t,e,i,r,s){if(typeof e!="string"){let c=e,{queryParams:a,fragment:l,routeConfig:u,url:d,outlet:p,params:g,data:b,title:v}=r,_=ke(s,()=>c({params:g,data:b,queryParams:a,fragment:l,routeConfig:u,url:d,outlet:p,title:v}));if(_ instanceof Tt)throw new Ki(_);e=_}let o=this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,i);if(e[0]==="/")throw new Ki(o);return o}applyRedirectCreateUrlTree(t,e,i,r){let s=this.createSegmentGroup(t,e.root,i,r);return new Tt(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){let i={};return Object.entries(t).forEach(([r,s])=>{if(typeof s=="string"&&s[0]===":"){let c=s.substring(1);i[r]=e[c]}else i[r]=s}),i}createSegmentGroup(t,e,i,r){let s=this.createSegments(t,e.segments,i,r),o={};return Object.entries(e.children).forEach(([c,a])=>{o[c]=this.createSegmentGroup(t,a,i,r)}),new L(s,o)}createSegments(t,e,i,r){return e.map(s=>s.path[0]===":"?this.findPosParam(t,s,r):this.findOrReturn(s,i))}findPosParam(t,e,i){let r=i[e.path.substring(1)];if(!r)throw new U(4001,!1);return r}findOrReturn(t,e){let i=0;for(let r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}},Ba={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function qm(n,t,e,i,r){let s=eh(n,t,e);return s.matched?(i=gm(t,i),Gm(i,t,e,r).pipe(I(o=>o===!0?s:m({},Ba)))):w(s)}function eh(n,t,e){if(t.path==="**")return Jm(e);if(t.path==="")return t.pathMatch==="full"&&(n.hasChildren()||e.length>0)?m({},Ba):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let r=(t.matcher||Hg)(e,n,t);if(!r)return m({},Ba);let s={};Object.entries(r.posParams??{}).forEach(([c,a])=>{s[c]=a.path});let o=r.consumed.length>0?m(m({},s),r.consumed[r.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function Jm(n){return{matched:!0,parameters:n.length>0?Nd(n).parameters:{},consumedSegments:n,remainingSegments:[],positionalParamSegments:{}}}function Id(n,t,e,i){return e.length>0&&Qm(n,e,i)?{segmentGroup:new L(t,Ym(i,new L(e,n.children))),slicedSegments:[]}:e.length===0&&Zm(n,e,i)?{segmentGroup:new L(n.segments,Km(n,e,i,n.children)),slicedSegments:e}:{segmentGroup:new L(n.segments,n.children),slicedSegments:e}}function Km(n,t,e,i){let r={};for(let s of e)if(Cs(n,t,s)&&!i[qe(s)]){let o=new L([],{});r[qe(s)]=o}return m(m({},i),r)}function Ym(n,t){let e={};e[A]=t;for(let i of n)if(i.path===""&&qe(i)!==A){let r=new L([],{});e[qe(i)]=r}return e}function Qm(n,t,e){return e.some(i=>Cs(n,t,i)&&qe(i)!==A)}function Zm(n,t,e){return e.some(i=>Cs(n,t,i))}function Cs(n,t,e){return(n.hasChildren()||t.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Xm(n,t,e){return t.length===0&&!n.children[e]}var Va=class{};function e_(n,t,e,i,r,s,o="emptyOnly"){return new Ua(n,t,e,i,r,o,s).recognize()}var t_=31,Ua=class{constructor(t,e,i,r,s,o,c){this.injector=t,this.configLoader=e,this.rootComponentType=i,this.config=r,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=c,this.applyRedirects=new La(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new U(4002,`'${t.segmentGroup}'`)}recognize(){let t=Id(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(I(({children:e,rootSnapshot:i})=>{let r=new Me(i,e),s=new bs("",r),o=cm(i,[],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 $n([],Object.freeze({}),Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),A,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,A,e).pipe(I(i=>({children:i,rootSnapshot:e})),_e(i=>{if(i instanceof Ki)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof Ji?this.noMatchError(i):i}))}processSegmentGroup(t,e,i,r,s){return i.segments.length===0&&i.hasChildren()?this.processChildren(t,e,i,s):this.processSegment(t,e,i,i.segments,r,!0,s).pipe(I(o=>o instanceof Me?[o]:[]))}processChildren(t,e,i,r){let s=[];for(let o of Object.keys(i.children))o==="primary"?s.unshift(o):s.push(o);return K(s).pipe(xt(o=>{let c=i.children[o],a=mm(e,o);return this.processSegmentGroup(t,a,c,o,r)}),gu((o,c)=>(o.push(...c),o)),Po(null),pu(),we(o=>{if(o===null)return Vn(i);let c=th(o);return n_(c),w(c)}))}processSegment(t,e,i,r,s,o,c){return K(e).pipe(xt(a=>this.processSegmentAgainstRoute(a._injector??t,e,a,i,r,s,o,c).pipe(_e(l=>{if(l instanceof Ji)return w(null);throw l}))),Lt(a=>!!a),_e(a=>{if(Zd(a))return Xm(i,r,s)?w(new Va):Vn(i);throw a}))}processSegmentAgainstRoute(t,e,i,r,s,o,c,a){return qe(i)!==o&&(o===A||!Cs(r,s,i))?Vn(r):i.redirectTo===void 0?this.matchSegmentAgainstRoute(t,r,i,s,o,a):this.allowRedirects&&c?this.expandSegmentAgainstRouteUsingRedirect(t,r,e,i,s,o,a):Vn(r)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,s,o,c){let{matched:a,parameters:l,consumedSegments:u,positionalParamSegments:d,remainingSegments:p}=eh(e,r,s);if(!a)return Vn(e);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>t_&&(this.allowRedirects=!1));let g=new $n(s,l,Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Ad(r),qe(r),r.component??r._loadedComponent??null,r,Od(r)),b=ys(g,c,this.paramsInheritanceStrategy);g.params=Object.freeze(b.params),g.data=Object.freeze(b.data);let v=this.applyRedirects.applyRedirectCommands(u,r.redirectTo,d,g,t);return this.applyRedirects.lineralizeSegments(r,v).pipe(we(_=>this.processSegment(t,i,e,_.concat(p),o,!1,c)))}matchSegmentAgainstRoute(t,e,i,r,s,o){let c=qm(e,i,r,t,this.urlSerializer);return i.path==="**"&&(e.children={}),c.pipe(ae(a=>a.matched?(t=i._injector??t,this.getChildConfig(t,i,r).pipe(ae(({routes:l})=>{let u=i._loadedInjector??t,{parameters:d,consumedSegments:p,remainingSegments:g}=a,b=new $n(p,d,Object.freeze(m({},this.urlTree.queryParams)),this.urlTree.fragment,Ad(i),qe(i),i.component??i._loadedComponent??null,i,Od(i)),v=ys(b,o,this.paramsInheritanceStrategy);b.params=Object.freeze(v.params),b.data=Object.freeze(v.data);let{segmentGroup:_,slicedSegments:S}=Id(e,p,g,l);if(S.length===0&&_.hasChildren())return this.processChildren(u,l,_,b).pipe(I(D=>new Me(b,D)));if(l.length===0&&S.length===0)return w(new Me(b,[]));let k=qe(i)===s;return this.processSegment(u,l,_,S,k?A:s,!0,b).pipe(I(D=>new Me(b,D instanceof Me?[D]:[])))}))):Vn(e)))}getChildConfig(t,e,i){return e.children?w({routes:e.children,injector:t}):e.loadChildren?e._loadedRoutes!==void 0?w({routes:e._loadedRoutes,injector:e._loadedInjector}):Hm(t,e,i,this.urlSerializer).pipe(we(r=>r?this.configLoader.loadChildren(t,e).pipe(V(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):Wm(e))):w({routes:[],injector:t})}};function n_(n){n.sort((t,e)=>t.value.outlet===A?-1:e.value.outlet===A?1:t.value.outlet.localeCompare(e.value.outlet))}function i_(n){let t=n.value.routeConfig;return t&&t.path===""}function th(n){let t=[],e=new Set;for(let i of n){if(!i_(i)){t.push(i);continue}let r=t.find(s=>i.value.routeConfig===s.value.routeConfig);r!==void 0?(r.children.push(...i.children),e.add(r)):t.push(i)}for(let i of e){let r=th(i.children);t.push(new Me(i.value,r))}return t.filter(i=>!e.has(i))}function Ad(n){return n.data||{}}function Od(n){return n.resolve||{}}function r_(n,t,e,i,r,s){return we(o=>e_(n,t,e,i,o.extractedUrl,r,s).pipe(I(({state:c,tree:a})=>P(m({},o),{targetSnapshot:c,urlAfterRedirects:a}))))}function s_(n,t){return we(e=>{let{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return w(e);let s=new Set(r.map(a=>a.route)),o=new Set;for(let a of s)if(!o.has(a))for(let l of nh(a))o.add(l);let c=0;return K(o).pipe(xt(a=>s.has(a)?o_(a,i,n,t):(a.data=ys(a,a.parent,n).resolve,w(void 0))),V(()=>c++),No(1),we(a=>c===o.size?w(e):Xe))})}function nh(n){let t=n.children.map(e=>nh(e)).flat();return[n,...t]}function o_(n,t,e,i){let r=n.routeConfig,s=n._resolve;return r?.title!==void 0&&!Jd(r)&&(s[Qi]=r.title),a_(s,n,t,i).pipe(I(o=>(n._resolvedData=o,n.data=ys(n,n.parent,e).resolve,null)))}function a_(n,t,e,i){let r=_a(n);if(r.length===0)return w({});let s={};return K(r).pipe(we(o=>c_(n[o],t,e,i).pipe(Lt(),V(c=>{if(c instanceof qi)throw ws(new zn,c);s[o]=c}))),No(1),du(s),_e(o=>Zd(o)?Xe:ln(o)))}function c_(n,t,e,i){let r=Xi(t)??i,s=Kn(n,r),o=s.resolve?s.resolve(t,e):ke(r,()=>s(t,e));return Wt(o)}function ga(n){return ae(t=>{let e=n(t);return e?K(e).pipe(I(()=>t)):w(t)})}var ih=(()=>{class n{buildTitle(e){let i,r=e.root;for(;r!==void 0;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(s=>s.outlet===A);return i}getResolvedTitleForRoute(e){return e.data[Qi]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:()=>f(l_),providedIn:"root"})}}return n})(),l_=(()=>{class n extends ih{constructor(e){super(),this.title=e}updateTitle(e){let i=this.buildTitle(e);i!==void 0&&this.title.setTitle(i)}static{this.\u0275fac=function(i){return new(i||n)(C(bd))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),nr=new O("",{providedIn:"root",factory:()=>({})}),u_=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=ft({type:n,selectors:[["ng-component"]],standalone:!0,features:[yt],decls:1,vars:0,template:function(i,r){i&1&&Vt(0,"router-outlet")},dependencies:[vm],encapsulation:2})}}return n})();function Ha(n){let t=n.children&&n.children.map(Ha),e=t?P(m({},n),{children:t}):m({},n);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==A&&(e.component=u_),e}var Yi=new O(""),Ga=(()=>{class n{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=f(qr)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return w(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);let i=Wt(e.loadComponent()).pipe(I(rh),V(s=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=s}),Ft(()=>{this.componentLoaders.delete(e)})),r=new So(i,()=>new x).pipe(Co());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return w({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let s=d_(i,this.compiler,e,this.onLoadEndListener).pipe(Ft(()=>{this.childrenLoaders.delete(i)})),o=new So(s,()=>new x).pipe(Co());return this.childrenLoaders.set(i,o),o}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function d_(n,t,e,i){return Wt(n.loadChildren()).pipe(I(rh),we(r=>r instanceof Pu||Array.isArray(r)?w(r):K(t.compileModuleAsync(r))),I(r=>{i&&i(n);let s,o,c=!1;return Array.isArray(r)?(o=r,c=!0):(s=r.create(e).injector,o=s.get(Yi,[],{optional:!0,self:!0}).flat()),{routes:o.map(Ha),injector:s}}))}function h_(n){return n&&typeof n=="object"&&"default"in n}function rh(n){return h_(n)?n.default:n}var za=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:()=>f(f_),providedIn:"root"})}}return n})(),f_=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),sh=new O(""),oh=new O("");function p_(n,t,e){let i=n.get(oh),r=n.get(z);return n.get(H).runOutsideAngular(()=>{if(!r.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(l=>setTimeout(l));let s,o=new Promise(l=>{s=l}),c=r.startViewTransition(()=>(s(),g_(n))),{onViewTransitionCreated:a}=i;return a&&ke(n,()=>a({transition:c,from:t,to:e})),o})}function g_(n){return new Promise(t=>{Nu({read:()=>setTimeout(t)},{injector:n})})}var m_=new O(""),Wa=(()=>{class n{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new x,this.transitionAbortSubject=new x,this.configLoader=f(Ga),this.environmentInjector=f(tt),this.urlSerializer=f(Zi),this.rootContexts=f(er),this.location=f(Ai),this.inputBindingEnabled=f(Es,{optional:!0})!==null,this.titleStrategy=f(ih),this.options=f(nr,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=f(za),this.createViewTransition=f(sh,{optional:!0}),this.navigationErrorHandler=f(m_,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>w(void 0),this.rootComponentType=null;let e=r=>this.events.next(new Ca(r)),i=r=>this.events.next(new Sa(r));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=e}complete(){this.transitions?.complete()}handleNavigationRequest(e){let i=++this.navigationId;this.transitions?.next(P(m(m({},this.transitions.value),e),{id:i}))}setupNavigations(e,i,r){return this.transitions=new me({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:Ui,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(he(s=>s.id!==0),I(s=>P(m({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),ae(s=>{let o=!1,c=!1;return w(s).pipe(ae(a=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",Pe.SupersededByNewNavigation),Xe;this.currentTransition=s,this.currentNavigation={id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?P(m({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let l=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),u=a.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!l&&u!=="reload"){let d="";return this.events.next(new zt(a.id,this.urlSerializer.serialize(a.rawUrl),d,ps.IgnoredSameUrlNavigation)),a.resolve(!1),Xe}if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return w(a).pipe(ae(d=>{let p=this.transitions?.getValue();return this.events.next(new Wn(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),p!==this.transitions?.getValue()?Xe:Promise.resolve(d)}),r_(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),V(d=>{s.targetSnapshot=d.targetSnapshot,s.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation=P(m({},this.currentNavigation),{finalUrl:d.urlAfterRedirects});let p=new gs(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(p)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:d,extractedUrl:p,source:g,restoredState:b,extras:v}=a,_=new Wn(d,this.urlSerializer.serialize(p),g,b);this.events.next(_);let S=Wd(this.rootComponentType).snapshot;return this.currentTransition=s=P(m({},a),{targetSnapshot:S,urlAfterRedirects:p,extras:P(m({},v),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=p,w(s)}else{let d="";return this.events.next(new zt(a.id,this.urlSerializer.serialize(a.extractedUrl),d,ps.IgnoredByUrlHandlingStrategy)),a.resolve(!1),Xe}}),V(a=>{let l=new wa(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),I(a=>(this.currentTransition=s=P(m({},a),{guards:Em(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),s)),xm(this.environmentInjector,a=>this.events.next(a)),V(a=>{if(s.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw ws(this.urlSerializer,a.guardsResult);let l=new Da(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.events.next(l)}),he(a=>a.guardsResult?!0:(this.cancelNavigationTransition(a,"",Pe.GuardRejected),!1)),ga(a=>{if(a.guards.canActivateChecks.length)return w(a).pipe(V(l=>{let u=new Ta(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(u)}),ae(l=>{let u=!1;return w(l).pipe(s_(this.paramsInheritanceStrategy,this.environmentInjector),V({next:()=>u=!0,complete:()=>{u||this.cancelNavigationTransition(l,"",Pe.NoDataFromResolver)}}))}),V(l=>{let u=new Ea(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(u)}))}),ga(a=>{let l=u=>{let d=[];u.routeConfig?.loadComponent&&!u.routeConfig._loadedComponent&&d.push(this.configLoader.loadComponent(u.routeConfig).pipe(V(p=>{u.component=p}),I(()=>{})));for(let p of u.children)d.push(...l(p));return d};return yi(l(a.targetSnapshot.root)).pipe(Po(null),Te(1))}),ga(()=>this.afterPreactivation()),ae(()=>{let{currentSnapshot:a,targetSnapshot:l}=s,u=this.createViewTransition?.(this.environmentInjector,a.root,l.root);return u?K(u).pipe(I(()=>s)):w(s)}),I(a=>{let l=ym(e.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return this.currentTransition=s=P(m({},a),{targetRouterState:l}),this.currentNavigation.targetRouterState=l,s}),V(()=>{this.events.next(new zi)}),Tm(this.rootContexts,e.routeReuseStrategy,a=>this.events.next(a),this.inputBindingEnabled),Te(1),V({next:a=>{o=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Et(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0)},complete:()=>{o=!0}}),Y(this.transitionAbortSubject.pipe(V(a=>{throw a}))),Ft(()=>{!o&&!c&&this.cancelNavigationTransition(s,"",Pe.SupersededByNewNavigation),this.currentTransition?.id===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),_e(a=>{if(c=!0,Qd(a))this.events.next(new Dt(s.id,this.urlSerializer.serialize(s.extractedUrl),a.message,a.cancellationCode)),Dm(a)?this.events.next(new qn(a.url,a.navigationBehaviorOptions)):s.resolve(!1);else{let l=new Gi(s.id,this.urlSerializer.serialize(s.extractedUrl),a,s.targetSnapshot??void 0);try{let u=ke(this.environmentInjector,()=>this.navigationErrorHandler?.(l));if(u instanceof qi){let{message:d,cancellationCode:p}=ws(this.urlSerializer,u);this.events.next(new Dt(s.id,this.urlSerializer.serialize(s.extractedUrl),d,p)),this.events.next(new qn(u.redirectTo,u.navigationBehaviorOptions))}else{this.events.next(l);let d=e.errorHandler(a);s.resolve(!!d)}}catch(u){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(u)}}return Xe}))}))}cancelNavigationTransition(e,i,r){let s=new Dt(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);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))),i=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return e.toString()!==i?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function __(n){return n!==Ui}var v_=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:()=>f(y_),providedIn:"root"})}}return n})(),ja=class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}},y_=(()=>{class n extends ja{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(n)))(r||n)}})()}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ah=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:()=>f(b_),providedIn:"root"})}}return n})(),b_=(()=>{class n extends ah{constructor(){super(...arguments),this.location=f(Ai),this.urlSerializer=f(Zi),this.options=f(nr,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=f(za),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Tt,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Wd(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(i=>{i.type==="popstate"&&e(i.url,i.state)})}handleRouterEvent(e,i){if(e instanceof Wn)this.stateMemento=this.createStateMemento();else if(e instanceof zt)this.rawUrlTree=i.initialUrl;else if(e instanceof gs){if(this.urlUpdateStrategy==="eager"&&!i.extras.skipLocationChange){let r=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(i.targetBrowserUrl??r,i)}}else e instanceof zi?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,this.urlUpdateStrategy==="deferred"&&!i.extras.skipLocationChange&&this.setBrowserUrl(i.targetBrowserUrl??this.rawUrlTree,i)):e instanceof Dt&&(e.code===Pe.GuardRejected||e.code===Pe.NoDataFromResolver)?this.restoreHistory(i):e instanceof Gi?this.restoreHistory(i,!0):e instanceof Et&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,i){let r=e instanceof Tt?this.urlSerializer.serialize(e):e;if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){let s=this.browserPageId,o=m(m({},i.extras.state),this.generateNgRouterState(i.id,s));this.location.replaceState(r,"",o)}else{let s=m(m({},i.extras.state),this.generateNgRouterState(i.id,this.browserPageId+1));this.location.go(r,"",s)}}restoreHistory(e,i=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,s=this.currentPageId-r;s!==0?this.location.historyGo(s):this.currentUrlTree===e.finalUrl&&s===0&&(this.resetState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(n)))(r||n)}})()}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Bi=function(n){return n[n.COMPLETE=0]="COMPLETE",n[n.FAILED=1]="FAILED",n[n.REDIRECTING=2]="REDIRECTING",n}(Bi||{});function ch(n,t){n.events.pipe(he(e=>e instanceof Et||e instanceof Dt||e instanceof Gi||e instanceof zt),I(e=>e instanceof Et||e instanceof zt?Bi.COMPLETE:(e instanceof Dt?e.code===Pe.Redirect||e.code===Pe.SupersededByNewNavigation:!1)?Bi.REDIRECTING:Bi.FAILED),he(e=>e!==Bi.REDIRECTING),Te(1)).subscribe(()=>{t()})}function w_(n){throw n}var D_={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},T_={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},ot=(()=>{class n{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=f(Gr),this.stateManager=f(ah),this.options=f(nr,{optional:!0})||{},this.pendingTasks=f(Di),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=f(Wa),this.urlSerializer=f(Zi),this.location=f(Ai),this.urlHandlingStrategy=f(za),this._events=new x,this.errorHandler=this.options.errorHandler||w_,this.navigated=!1,this.routeReuseStrategy=f(v_),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=f(Yi,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!f(Es,{optional:!0}),this.eventsSubscription=new eu,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(i=>{try{let r=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(r!==null&&s!==null){if(this.stateManager.handleRouterEvent(i,s),i instanceof Dt&&i.code!==Pe.Redirect&&i.code!==Pe.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof Et)this.navigated=!0;else if(i instanceof qn){let o=i.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(i.url,r.currentRawUrl),a=m({browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||__(r.source)},o);this.scheduleNavigation(c,Ui,null,a,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}C_(i)&&this._events.next(i)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});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),Ui,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(e,"popstate",i)},0)})}navigateToSyncWithBrowser(e,i,r){let s={replaceUrl:!0},o=r?.navigationId?r:null;if(r){let a=m({},r);delete a.navigationId,delete a.\u0275routerPageId,Object.keys(a).length!==0&&(s.state=a)}let c=this.parseUrl(e);this.scheduleNavigation(c,i,o,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Ha),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,i={}){let{relativeTo:r,queryParams:s,fragment:o,queryParamsHandling:c,preserveFragment:a}=i,l=a?this.currentUrlTree.fragment:o,u=null;switch(c??this.options.defaultQueryParamsHandling){case"merge":u=m(m({},this.currentUrlTree.queryParams),s);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=s||null}u!==null&&(u=this.removeEmptyProps(u));let d;try{let p=r?r.snapshot:this.routerState.snapshot.root;d=$d(p)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),d=this.currentUrlTree.root}return Hd(d,e,u,l??null)}navigateByUrl(e,i={skipLocationChange:!1}){let r=$i(e)?e:this.parseUrl(e),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,Ui,null,i)}navigate(e,i={skipLocationChange:!1}){return E_(e),this.navigateByUrl(this.createUrlTree(e,i),i)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,i){let r;if(i===!0?r=m({},D_):i===!1?r=m({},T_):r=i,$i(e))return Dd(this.currentUrlTree,e,r);let s=this.parseUrl(e);return Dd(this.currentUrlTree,s,r)}removeEmptyProps(e){return Object.entries(e).reduce((i,[r,s])=>(s!=null&&(i[r]=s),i),{})}scheduleNavigation(e,i,r,s,o){if(this.disposed)return Promise.resolve(!1);let c,a,l;o?(c=o.resolve,a=o.reject,l=o.promise):l=new Promise((d,p)=>{c=d,a=p});let u=this.pendingTasks.add();return ch(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(u))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:s,resolve:c,reject:a,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(d=>Promise.reject(d))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function E_(n){for(let t=0;t<n.length;t++)if(n[t]==null)throw new U(4008,!1)}function C_(n){return!(n instanceof zi)&&!(n instanceof qn)}var Ts=class{};var S_=(()=>{class n{constructor(e,i,r,s,o){this.router=e,this.injector=r,this.preloadingStrategy=s,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(he(e=>e instanceof Et),xt(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){let r=[];for(let s of i){s.providers&&!s._injector&&(s._injector=Ho(s.providers,e,`Route: ${s.path}`));let o=s._injector??e,c=s._loadedInjector??o;(s.loadChildren&&!s._loadedRoutes&&s.canLoad===void 0||s.loadComponent&&!s._loadedComponent)&&r.push(this.preloadConfig(o,s)),(s.children||s._loadedRoutes)&&r.push(this.processRoutes(c,s.children??s._loadedRoutes))}return K(r).pipe(Oo())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;i.loadChildren&&i.canLoad===void 0?r=this.loader.loadChildren(e,i):r=w(null);let s=r.pipe(we(o=>o===null?w(void 0):(i._loadedRoutes=o.routes,i._loadedInjector=o.injector,this.processRoutes(o.injector??e,o.routes))));if(i.loadComponent&&!i._loadedComponent){let o=this.loader.loadComponent(i);return K([s,o]).pipe(Oo())}else return s})}static{this.\u0275fac=function(i){return new(i||n)(C(ot),C(qr),C(tt),C(Ts),C(Ga))}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),lh=new O(""),I_=(()=>{class n{constructor(e,i,r,s,o={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=s,this.options=o,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},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 Wn?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Et?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof zt&&e.code===ps.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof ms&&(e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new ms(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static{this.\u0275fac=function(i){Ou()}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac})}}return n})();function _T(n,...t){return Ge([{provide:Yi,multi:!0,useValue:n},[],{provide:Ct,useFactory:uh,deps:[ot]},{provide:Wr,multi:!0,useFactory:dh},t.map(e=>e.\u0275providers)])}function uh(n){return n.routerState.root}function ir(n,t){return{\u0275kind:n,\u0275providers:t}}function dh(){let n=f(X);return t=>{let e=n.get(it);if(t!==e.components[0])return;let i=n.get(ot),r=n.get(hh);n.get(qa)===1&&i.initialNavigation(),n.get(fh,null,xo.Optional)?.setUpPreloading(),n.get(lh,null,xo.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var hh=new O("",{factory:()=>new x}),qa=new O("",{providedIn:"root",factory:()=>1});function A_(){return ir(2,[{provide:qa,useValue:0},{provide:zo,multi:!0,deps:[X],useFactory:t=>{let e=t.get(Ju,Promise.resolve());return()=>e.then(()=>new Promise(i=>{let r=t.get(ot),s=t.get(hh);ch(r,()=>{i(!0)}),t.get(Wa).afterPreactivation=()=>(i(!0),s.closed?w(void 0):s),r.initialNavigation()}))}}])}function O_(){return ir(3,[{provide:zo,multi:!0,useFactory:()=>{let t=f(ot);return()=>{t.setUpLocationChangeListener()}}},{provide:qa,useValue:2}])}var fh=new O("");function R_(n){return ir(0,[{provide:fh,useExisting:S_},{provide:Ts,useExisting:n}])}function M_(){return ir(8,[Sd,{provide:Es,useExisting:Sd}])}function P_(n){let t=[{provide:sh,useValue:p_},{provide:oh,useValue:m({skipNextTransition:!!n?.skipInitialTransition},n)}];return ir(9,t)}var Rd=new O("ROUTER_FORROOT_GUARD"),N_=[Ai,{provide:Zi,useClass:zn},ot,er,{provide:Ct,useFactory:uh,deps:[ot]},Ga,[]],vT=(()=>{class n{constructor(e){}static forRoot(e,i){return{ngModule:n,providers:[N_,[],{provide:Yi,multi:!0,useValue:e},{provide:Rd,useFactory:L_,deps:[[ot,new et,new vu]]},{provide:nr,useValue:i||{}},i?.useHash?x_():F_(),k_(),i?.preloadingStrategy?R_(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?B_(i):[],i?.bindToComponentInputs?M_().\u0275providers:[],i?.enableViewTransitions?P_().\u0275providers:[],V_()]}}static forChild(e){return{ngModule:n,providers:[{provide:Yi,multi:!0,useValue:e}]}}static{this.\u0275fac=function(i){return new(i||n)(C(Rd,8))}}static{this.\u0275mod=Oe({type:n})}static{this.\u0275inj=Ae({})}}return n})();function k_(){return{provide:lh,useFactory:()=>{let n=f(Zu),t=f(H),e=f(nr),i=f(Wa),r=f(Zi);return e.scrollOffset&&n.setOffset(e.scrollOffset),new I_(r,i,n,t,e)}}}function x_(){return{provide:qo,useClass:Yu}}function F_(){return{provide:qo,useClass:Ku}}function L_(n){return"guarded"}function B_(n){return[n.initialNavigation==="disabled"?O_().\u0275providers:[],n.initialNavigation==="enabledBlocking"?A_().\u0275providers:[]]}var Md=new O("");function V_(){return[{provide:Md,useFactory:dh},{provide:Wr,multi:!0,useExisting:Md}]}function Ss(n){n||(Fo(Ss),n=f(wi));let t=new Ne(e=>n.onDestroy(e.next.bind(e)));return e=>e.pipe(Y(t))}function U_(n,t){!t?.injector&&Fo(U_);let e=t?.injector??f(X),i=new nu(1),r=Gu(()=>{let s;try{s=n()}catch(o){We(()=>i.error(o));return}We(()=>i.next(s))},{injector:e,manualCleanup:!0});return e.get(wi).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}var Th=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static{this.\u0275fac=function(i){return new(i||n)(N(Ei),N(ve))}}static{this.\u0275dir=F({type:n})}}return n})(),ec=(()=>{class n extends Th{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(n)))(r||n)}})()}static{this.\u0275dir=F({type:n,features:[xe]})}}return n})(),lr=new O(""),j_={provide:lr,useExisting:ht(()=>$_),multi:!0},$_=(()=>{class n extends ec{writeValue(e){this.setProperty("checked",e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(n)))(r||n)}})()}static{this.\u0275dir=F({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&ye("change",function(o){return r.onChange(o.target.checked)})("blur",function(){return r.onTouched()})},features:[vt([j_]),xe]})}}return n})(),H_={provide:lr,useExisting:ht(()=>Eh),multi:!0};function G_(){let n=Bn()?Bn().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var z_=new O(""),Eh=(()=>{class n extends Th{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!G_())}writeValue(e){let i=e??"";this.setProperty("value",i)}_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{this.\u0275fac=function(i){return new(i||n)(N(Ei),N(ve),N(z_,8))}}static{this.\u0275dir=F({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(i,r){i&1&&ye("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},features:[vt([H_]),xe]})}}return n})();function qt(n){return n==null||(typeof n=="string"||Array.isArray(n))&&n.length===0}function Ch(n){return n!=null&&typeof n.length=="number"}var tc=new O(""),nc=new O(""),W_=/^(?=.{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])?)*$/,ph=class{static min(t){return q_(t)}static max(t){return J_(t)}static required(t){return K_(t)}static requiredTrue(t){return Y_(t)}static email(t){return Q_(t)}static minLength(t){return Z_(t)}static maxLength(t){return X_(t)}static pattern(t){return ev(t)}static nullValidator(t){return Sh(t)}static compose(t){return Ph(t)}static composeAsync(t){return kh(t)}};function q_(n){return t=>{if(qt(t.value)||qt(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function J_(n){return t=>{if(qt(t.value)||qt(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function K_(n){return qt(n.value)?{required:!0}:null}function Y_(n){return n.value===!0?null:{required:!0}}function Q_(n){return qt(n.value)||W_.test(n.value)?null:{email:!0}}function Z_(n){return t=>qt(t.value)||!Ch(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function X_(n){return t=>Ch(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}function ev(n){if(!n)return Sh;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),i=>{if(qt(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Sh(n){return null}function Ih(n){return n!=null}function Ah(n){return zr(n)?K(n):n}function Oh(n){let t={};return n.forEach(e=>{t=e!=null?m(m({},t),e):t}),Object.keys(t).length===0?null:t}function Rh(n,t){return t.map(e=>e(n))}function tv(n){return!n.validate}function Mh(n){return n.map(t=>tv(t)?t:e=>t.validate(e))}function Ph(n){if(!n)return null;let t=n.filter(Ih);return t.length==0?null:function(e){return Oh(Rh(e,t))}}function Nh(n){return n!=null?Ph(Mh(n)):null}function kh(n){if(!n)return null;let t=n.filter(Ih);return t.length==0?null:function(e){let i=Rh(e,t).map(Ah);return lu(i).pipe(I(Oh))}}function xh(n){return n!=null?kh(Mh(n)):null}function gh(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function Fh(n){return n._rawValidators}function Lh(n){return n._rawAsyncValidators}function Ja(n){return n?Array.isArray(n)?n:[n]:[]}function As(n,t){return Array.isArray(n)?n.includes(t):n===t}function mh(n,t){let e=Ja(t);return Ja(n).forEach(r=>{As(e,r)||e.push(r)}),e}function _h(n,t){return Ja(t).filter(e=>!As(n,e))}var Os=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}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}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Nh(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=xh(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_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}},pn=class extends Os{get formDirective(){return null}get path(){return null}},Jt=class extends Os{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},Rs=class{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}},nv={"[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"},$T=P(m({},nv),{"[class.ng-submitted]":"isSubmitted"}),HT=(()=>{class n extends Rs{constructor(e){super(e)}static{this.\u0275fac=function(i){return new(i||n)(N(Jt,2))}}static{this.\u0275dir=F({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ee("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[xe]})}}return n})(),GT=(()=>{class n extends Rs{constructor(e){super(e)}static{this.\u0275fac=function(i){return new(i||n)(N(pn,10))}}static{this.\u0275dir=F({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ee("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[xe]})}}return n})();var rr="VALID",Is="INVALID",Yn="PENDING",sr="DISABLED",Kt=class{},Ms=class extends Kt{constructor(t,e){super(),this.value=t,this.source=e}},or=class extends Kt{constructor(t,e){super(),this.pristine=t,this.source=e}},ar=class extends Kt{constructor(t,e){super(),this.touched=t,this.source=e}},Qn=class extends Kt{constructor(t,e){super(),this.status=t,this.source=e}},Ka=class extends Kt{constructor(t){super(),this.source=t}},Ya=class extends Kt{constructor(t){super(),this.source=t}};function ic(n){return(xs(n)?n.validators:n)||null}function iv(n){return Array.isArray(n)?Nh(n):n||null}function rc(n,t){return(xs(t)?t.asyncValidators:n)||null}function rv(n){return Array.isArray(n)?xh(n):n||null}function xs(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function Bh(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new U(1e3,"");if(!i[e])throw new U(1001,"")}function Vh(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new U(1002,"")})}var Zn=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=Ln(()=>this.statusReactive()),this.statusReactive=ze(void 0),this._pristine=Ln(()=>this.pristineReactive()),this.pristineReactive=ze(!0),this._touched=Ln(()=>this.touchedReactive()),this.touchedReactive=ze(!1),this._events=new x,this.events=this._events.asObservable(),this._onDisabledChange=[],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 We(this.statusReactive)}set status(t){We(()=>this.statusReactive.set(t))}get valid(){return this.status===rr}get invalid(){return this.status===Is}get pending(){return this.status==Yn}get disabled(){return this.status===sr}get enabled(){return this.status!==sr}get pristine(){return We(this.pristineReactive)}set pristine(t){We(()=>this.pristineReactive.set(t))}get dirty(){return!this.pristine}get touched(){return We(this.touchedReactive)}set touched(t){We(()=>this.touchedReactive.set(t))}get untouched(){return!this.touched}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(mh(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(mh(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(_h(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(_h(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 i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(P(m({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new ar(!0,i))}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 i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new ar(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(P(m({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new or(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new or(!0,i))}markAsPending(t={}){this.status=Yn;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Qn(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(P(m({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=sr,this.errors=null,this._forEachChild(r=>{r.disable(P(m({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Ms(this.value,i)),this._events.next(new Qn(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(P(m({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=rr,this._forEachChild(i=>{i.enable(P(m({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(P(m({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!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 i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===rr||this.status===Yn)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Ms(this.value,e)),this._events.next(new Qn(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(P(m({},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()?sr:rr}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=Yn,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=Ah(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!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((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.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,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new Qn(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new $,this.statusChanges=new $}_calculateStatus(){return this._allControlsDisabled()?sr:this.errors?Is:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Yn)?Yn:this._anyControlsHaveStatus(Is)?Is:rr}_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 i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new or(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new ar(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){xs(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=iv(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=rv(this._rawAsyncValidators)}},Ps=class extends Zn{constructor(t,e,i){super(ic(e),rc(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}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,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.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,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Vh(this,!0,t),Object.keys(t).forEach(i=>{Bh(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_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 Qa=class extends Ps{};var ur=new O("CallSetDisabledState",{providedIn:"root",factory:()=>dr}),dr="always";function Uh(n,t){return[...t.path,n]}function Za(n,t,e=dr){sc(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),ov(n,t),cv(n,t),av(n,t),sv(n,t)}function vh(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),ks(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function Ns(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function sv(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function sc(n,t){let e=Fh(n);t.validator!==null?n.setValidators(gh(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Lh(n);t.asyncValidator!==null?n.setAsyncValidators(gh(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();Ns(t._rawValidators,r),Ns(t._rawAsyncValidators,r)}function ks(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=Fh(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=Lh(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return Ns(t._rawValidators,i),Ns(t._rawAsyncValidators,i),e}function ov(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&jh(n,t)})}function av(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&jh(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function jh(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function cv(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function lv(n,t){n==null,sc(n,t)}function uv(n,t){return ks(n,t)}function $h(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function dv(n){return Object.getPrototypeOf(n.constructor)===ec}function hv(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Hh(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===Eh?e=s:dv(s)?i=s:r=s}),r||i||e||null}function fv(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function yh(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function bh(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var cr=class extends Zn{constructor(t=null,e,i){super(ic(e),rc(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),xs(e)&&(e.nonNullable||e.initialValueIsDefault)&&(bh(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(i=>i(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}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){yh(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){yh(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){bh(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 pv=n=>n instanceof cr;var gv={provide:Jt,useExisting:ht(()=>mv)},wh=Promise.resolve(),mv=(()=>{class n extends Jt{constructor(e,i,r,s,o,c){super(),this._changeDetectorRef=o,this.callSetDisabledState=c,this.control=new cr,this._registered=!1,this.name="",this.update=new $,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Hh(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),$h(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(){Za(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){wh.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&Wo(i);wh.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Uh(e,this._parent):[e]}static{this.\u0275fac=function(i){return new(i||n)(N(pn,9),N(tc,10),N(nc,10),N(lr,10),N(bt,8),N(ur,8))}}static{this.\u0275dir=F({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"],features:[vt([gv]),xe,pt]})}}return n})(),WT=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return n})();var _v={provide:lr,useExisting:ht(()=>yv),multi:!0};var vv=(()=>{class n{constructor(){this._accessors=[]}add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),yv=(()=>{class n extends ec{constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=f(ur,{optional:!0})??dr}ngOnInit(){this._control=this._injector.get(Jt),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{this.\u0275fac=function(i){return new(i||n)(N(Ei),N(ve),N(vv),N(X))}}static{this.\u0275dir=F({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&ye("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[vt([_v]),xe]})}}return n})();var Gh=new O("");var bv={provide:pn,useExisting:ht(()=>wv)},wv=(()=>{class n extends pn{get submitted(){return We(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}constructor(e,i,r){super(),this.callSetDisabledState=r,this._submitted=Ln(()=>this._submittedReactive()),this._submittedReactive=ze(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new $,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),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 i=this.form.get(e.path);return Za(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){vh(e.control||null,e,!1),fv(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,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),hv(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new Ka(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new Ya(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(vh(i||null,e),pv(r)&&(Za(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);lv(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&uv(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){sc(this.form,this),this._oldForm&&ks(this._oldForm,this)}_checkFormPresent(){this.form}static{this.\u0275fac=function(i){return new(i||n)(N(tc,10),N(nc,10),N(ur,8))}}static{this.\u0275dir=F({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&ye("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[vt([bv]),xe,pt]})}}return n})();var Dv={provide:Jt,useExisting:ht(()=>Tv)},Tv=(()=>{class n extends Jt{set isDisabled(e){}static{this._ngModelWarningSentOnce=!1}constructor(e,i,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.name=null,this.update=new $,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Hh(this,s)}ngOnChanges(e){this._added||this._setUpControl(),$h(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 Uh(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static{this.\u0275fac=function(i){return new(i||n)(N(pn,13),N(tc,10),N(nc,10),N(lr,10),N(Gh,8))}}static{this.\u0275dir=F({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[vt([Dv]),xe,pt]})}}return n})();var zh=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Oe({type:n})}static{this.\u0275inj=Ae({})}}return n})(),Xa=class extends Zn{constructor(t,e,i){super(ic(e),rc(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Vh(this,!1,t),t.forEach((i,r)=>{Bh(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}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,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_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 Dh(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var qT=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),s={};return Dh(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new Ps(r,s)}record(e,i=null){let r=this._reduceControls(e);return new Qa(r,i)}control(e,i,r){let s={};return this.useNonNullable?(Dh(i)?s=i:(s.validators=i,s.asyncValidators=r),new cr(e,P(m({},s),{nonNullable:!0}))):new cr(e,i,r)}array(e,i,r){let s=e.map(o=>this._createControl(o));return new Xa(s,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof cr)return e;if(e instanceof Zn)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(i,r,s)}else return this.control(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var JT=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:ur,useValue:e.callSetDisabledState??dr}]}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Oe({type:n})}static{this.\u0275inj=Ae({imports:[zh]})}}return n})(),KT=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Gh,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:ur,useValue:e.callSetDisabledState??dr}]}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Oe({type:n})}static{this.\u0275inj=Ae({imports:[zh]})}}return n})();var Q="top",le="bottom",re="right",te="left",Fs="auto",Yt=[Q,le,re,te],St="start",gn="end",Wh="clippingParents",Ls="viewport",Xn="popper",qh="reference",oc=Yt.reduce(function(n,t){return n.concat([t+"-"+St,t+"-"+gn])},[]),Bs=[].concat(Yt,[Fs]).reduce(function(n,t){return n.concat([t,t+"-"+St,t+"-"+gn])},[]),Ev="beforeRead",Cv="read",Sv="afterRead",Iv="beforeMain",Av="main",Ov="afterMain",Rv="beforeWrite",Mv="write",Pv="afterWrite",Jh=[Ev,Cv,Sv,Iv,Av,Ov,Rv,Mv,Pv];function se(n){return n?(n.nodeName||"").toLowerCase():null}function G(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function Ve(n){var t=G(n).Element;return n instanceof t||n instanceof Element}function ne(n){var t=G(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function ei(n){if(typeof ShadowRoot>"u")return!1;var t=G(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function Nv(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},r=t.attributes[e]||{},s=t.elements[e];!ne(s)||!se(s)||(Object.assign(s.style,i),Object.keys(r).forEach(function(o){var c=r[o];c===!1?s.removeAttribute(o):s.setAttribute(o,c===!0?"":c)}))})}function kv(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],s=t.attributes[i]||{},o=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:e[i]),c=o.reduce(function(a,l){return a[l]="",a},{});!ne(r)||!se(r)||(Object.assign(r.style,c),Object.keys(s).forEach(function(a){r.removeAttribute(a)}))})}}var Kh={name:"applyStyles",enabled:!0,phase:"write",fn:Nv,effect:kv,requires:["computeStyles"]};function oe(n){return n.split("-")[0]}var Je=Math.max,mn=Math.min,It=Math.round;function ti(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function hr(){return!/^((?!chrome|android).)*safari/i.test(ti())}function Ue(n,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var i=n.getBoundingClientRect(),r=1,s=1;t&&ne(n)&&(r=n.offsetWidth>0&&It(i.width)/n.offsetWidth||1,s=n.offsetHeight>0&&It(i.height)/n.offsetHeight||1);var o=Ve(n)?G(n):window,c=o.visualViewport,a=!hr()&&e,l=(i.left+(a&&c?c.offsetLeft:0))/r,u=(i.top+(a&&c?c.offsetTop:0))/s,d=i.width/r,p=i.height/s;return{width:d,height:p,top:u,right:l+d,bottom:u+p,left:l,x:l,y:u}}function _n(n){var t=Ue(n),e=n.offsetWidth,i=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:i}}function fr(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&ei(e)){var i=t;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function be(n){return G(n).getComputedStyle(n)}function ac(n){return["table","td","th"].indexOf(se(n))>=0}function ue(n){return((Ve(n)?n.ownerDocument:n.document)||window.document).documentElement}function At(n){return se(n)==="html"?n:n.assignedSlot||n.parentNode||(ei(n)?n.host:null)||ue(n)}function Yh(n){return!ne(n)||be(n).position==="fixed"?null:n.offsetParent}function xv(n){var t=/firefox/i.test(ti()),e=/Trident/i.test(ti());if(e&&ne(n)){var i=be(n);if(i.position==="fixed")return null}var r=At(n);for(ei(r)&&(r=r.host);ne(r)&&["html","body"].indexOf(se(r))<0;){var s=be(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function Ke(n){for(var t=G(n),e=Yh(n);e&&ac(e)&&be(e).position==="static";)e=Yh(e);return e&&(se(e)==="html"||se(e)==="body"&&be(e).position==="static")?t:e||xv(n)||t}function vn(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function yn(n,t,e){return Je(n,mn(t,e))}function Qh(n,t,e){var i=yn(n,t,e);return i>e?e:i}function pr(){return{top:0,right:0,bottom:0,left:0}}function gr(n){return Object.assign({},pr(),n)}function mr(n,t){return t.reduce(function(e,i){return e[i]=n,e},{})}var Fv=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,gr(typeof t!="number"?t:mr(t,Yt))};function Lv(n){var t,e=n.state,i=n.name,r=n.options,s=e.elements.arrow,o=e.modifiersData.popperOffsets,c=oe(e.placement),a=vn(c),l=[te,re].indexOf(c)>=0,u=l?"height":"width";if(!(!s||!o)){var d=Fv(r.padding,e),p=_n(s),g=a==="y"?Q:te,b=a==="y"?le:re,v=e.rects.reference[u]+e.rects.reference[a]-o[a]-e.rects.popper[u],_=o[a]-e.rects.reference[a],S=Ke(s),k=S?a==="y"?S.clientHeight||0:S.clientWidth||0:0,D=v/2-_/2,E=d[g],R=k-p[u]-d[b],M=k/2-p[u]/2+D,B=yn(E,M,R),Z=a;e.modifiersData[i]=(t={},t[Z]=B,t.centerOffset=B-M,t)}}function Bv(n){var t=n.state,e=n.options,i=e.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||fr(t.elements.popper,r)&&(t.elements.arrow=r))}var cc={name:"arrow",enabled:!0,phase:"main",fn:Lv,effect:Bv,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function je(n){return n.split("-")[1]}var Vv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Uv(n,t){var e=n.x,i=n.y,r=t.devicePixelRatio||1;return{x:It(e*r)/r||0,y:It(i*r)/r||0}}function Zh(n){var t,e=n.popper,i=n.popperRect,r=n.placement,s=n.variation,o=n.offsets,c=n.position,a=n.gpuAcceleration,l=n.adaptive,u=n.roundOffsets,d=n.isFixed,p=o.x,g=p===void 0?0:p,b=o.y,v=b===void 0?0:b,_=typeof u=="function"?u({x:g,y:v}):{x:g,y:v};g=_.x,v=_.y;var S=o.hasOwnProperty("x"),k=o.hasOwnProperty("y"),D=te,E=Q,R=window;if(l){var M=Ke(e),B="clientHeight",Z="clientWidth";if(M===G(e)&&(M=ue(e),be(M).position!=="static"&&c==="absolute"&&(B="scrollHeight",Z="scrollWidth")),M=M,r===Q||(r===te||r===re)&&s===gn){E=le;var W=d&&M===R&&R.visualViewport?R.visualViewport.height:M[B];v-=W-i.height,v*=a?1:-1}if(r===te||(r===Q||r===le)&&s===gn){D=re;var J=d&&M===R&&R.visualViewport?R.visualViewport.width:M[Z];g-=J-i.width,g*=a?1:-1}}var de=Object.assign({position:c},l&&Vv),$e=u===!0?Uv({x:g,y:v},G(e)):{x:g,y:v};if(g=$e.x,v=$e.y,a){var ge;return Object.assign({},de,(ge={},ge[E]=k?"0":"",ge[D]=S?"0":"",ge.transform=(R.devicePixelRatio||1)<=1?"translate("+g+"px, "+v+"px)":"translate3d("+g+"px, "+v+"px, 0)",ge))}return Object.assign({},de,(t={},t[E]=k?v+"px":"",t[D]=S?g+"px":"",t.transform="",t))}function jv(n){var t=n.state,e=n.options,i=e.gpuAcceleration,r=i===void 0?!0:i,s=e.adaptive,o=s===void 0?!0:s,c=e.roundOffsets,a=c===void 0?!0:c,l={placement:oe(t.placement),variation:je(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Zh(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Zh(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Xh={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jv,data:{}};var Vs={passive:!0};function $v(n){var t=n.state,e=n.instance,i=n.options,r=i.scroll,s=r===void 0?!0:r,o=i.resize,c=o===void 0?!0:o,a=G(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&l.forEach(function(u){u.addEventListener("scroll",e.update,Vs)}),c&&a.addEventListener("resize",e.update,Vs),function(){s&&l.forEach(function(u){u.removeEventListener("scroll",e.update,Vs)}),c&&a.removeEventListener("resize",e.update,Vs)}}var ef={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:$v,data:{}};var Hv={left:"right",right:"left",bottom:"top",top:"bottom"};function ni(n){return n.replace(/left|right|bottom|top/g,function(t){return Hv[t]})}var Gv={start:"end",end:"start"};function Us(n){return n.replace(/start|end/g,function(t){return Gv[t]})}function bn(n){var t=G(n),e=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:e,scrollTop:i}}function wn(n){return Ue(ue(n)).left+bn(n).scrollLeft}function lc(n,t){var e=G(n),i=ue(n),r=e.visualViewport,s=i.clientWidth,o=i.clientHeight,c=0,a=0;if(r){s=r.width,o=r.height;var l=hr();(l||!l&&t==="fixed")&&(c=r.offsetLeft,a=r.offsetTop)}return{width:s,height:o,x:c+wn(n),y:a}}function uc(n){var t,e=ue(n),i=bn(n),r=(t=n.ownerDocument)==null?void 0:t.body,s=Je(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=Je(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),c=-i.scrollLeft+wn(n),a=-i.scrollTop;return be(r||e).direction==="rtl"&&(c+=Je(e.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:c,y:a}}function Dn(n){var t=be(n),e=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+r+i)}function js(n){return["html","body","#document"].indexOf(se(n))>=0?n.ownerDocument.body:ne(n)&&Dn(n)?n:js(At(n))}function Qt(n,t){var e;t===void 0&&(t=[]);var i=js(n),r=i===((e=n.ownerDocument)==null?void 0:e.body),s=G(i),o=r?[s].concat(s.visualViewport||[],Dn(i)?i:[]):i,c=t.concat(o);return r?c:c.concat(Qt(At(o)))}function ii(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function zv(n,t){var e=Ue(n,!1,t==="fixed");return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}function tf(n,t,e){return t===Ls?ii(lc(n,e)):Ve(t)?zv(t,e):ii(uc(ue(n)))}function Wv(n){var t=Qt(At(n)),e=["absolute","fixed"].indexOf(be(n).position)>=0,i=e&&ne(n)?Ke(n):n;return Ve(i)?t.filter(function(r){return Ve(r)&&fr(r,i)&&se(r)!=="body"}):[]}function dc(n,t,e,i){var r=t==="clippingParents"?Wv(n):[].concat(t),s=[].concat(r,[e]),o=s[0],c=s.reduce(function(a,l){var u=tf(n,l,i);return a.top=Je(u.top,a.top),a.right=mn(u.right,a.right),a.bottom=mn(u.bottom,a.bottom),a.left=Je(u.left,a.left),a},tf(n,o,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function _r(n){var t=n.reference,e=n.element,i=n.placement,r=i?oe(i):null,s=i?je(i):null,o=t.x+t.width/2-e.width/2,c=t.y+t.height/2-e.height/2,a;switch(r){case Q:a={x:o,y:t.y-e.height};break;case le:a={x:o,y:t.y+t.height};break;case re:a={x:t.x+t.width,y:c};break;case te:a={x:t.x-e.width,y:c};break;default:a={x:t.x,y:t.y}}var l=r?vn(r):null;if(l!=null){var u=l==="y"?"height":"width";switch(s){case St:a[l]=a[l]-(t[u]/2-e[u]/2);break;case gn:a[l]=a[l]+(t[u]/2-e[u]/2);break;default:}}return a}function Zt(n,t){t===void 0&&(t={});var e=t,i=e.placement,r=i===void 0?n.placement:i,s=e.strategy,o=s===void 0?n.strategy:s,c=e.boundary,a=c===void 0?Wh:c,l=e.rootBoundary,u=l===void 0?Ls:l,d=e.elementContext,p=d===void 0?Xn:d,g=e.altBoundary,b=g===void 0?!1:g,v=e.padding,_=v===void 0?0:v,S=gr(typeof _!="number"?_:mr(_,Yt)),k=p===Xn?qh:Xn,D=n.rects.popper,E=n.elements[b?k:p],R=dc(Ve(E)?E:E.contextElement||ue(n.elements.popper),a,u,o),M=Ue(n.elements.reference),B=_r({reference:M,element:D,strategy:"absolute",placement:r}),Z=ii(Object.assign({},D,B)),W=p===Xn?Z:M,J={top:R.top-W.top+S.top,bottom:W.bottom-R.bottom+S.bottom,left:R.left-W.left+S.left,right:W.right-R.right+S.right},de=n.modifiersData.offset;if(p===Xn&&de){var $e=de[r];Object.keys(J).forEach(function(ge){var nn=[re,le].indexOf(ge)>=0?1:-1,rn=[Q,le].indexOf(ge)>=0?"y":"x";J[ge]+=$e[rn]*nn})}return J}function hc(n,t){t===void 0&&(t={});var e=t,i=e.placement,r=e.boundary,s=e.rootBoundary,o=e.padding,c=e.flipVariations,a=e.allowedAutoPlacements,l=a===void 0?Bs:a,u=je(i),d=u?c?oc:oc.filter(function(b){return je(b)===u}):Yt,p=d.filter(function(b){return l.indexOf(b)>=0});p.length===0&&(p=d);var g=p.reduce(function(b,v){return b[v]=Zt(n,{placement:v,boundary:r,rootBoundary:s,padding:o})[oe(v)],b},{});return Object.keys(g).sort(function(b,v){return g[b]-g[v]})}function qv(n){if(oe(n)===Fs)return[];var t=ni(n);return[Us(n),t,Us(t)]}function Jv(n){var t=n.state,e=n.options,i=n.name;if(!t.modifiersData[i]._skip){for(var r=e.mainAxis,s=r===void 0?!0:r,o=e.altAxis,c=o===void 0?!0:o,a=e.fallbackPlacements,l=e.padding,u=e.boundary,d=e.rootBoundary,p=e.altBoundary,g=e.flipVariations,b=g===void 0?!0:g,v=e.allowedAutoPlacements,_=t.options.placement,S=oe(_),k=S===_,D=a||(k||!b?[ni(_)]:qv(_)),E=[_].concat(D).reduce(function(Pn,kt){return Pn.concat(oe(kt)===Fs?hc(t,{placement:kt,boundary:u,rootBoundary:d,padding:l,flipVariations:b,allowedAutoPlacements:v}):kt)},[]),R=t.rects.reference,M=t.rects.popper,B=new Map,Z=!0,W=E[0],J=0;J<E.length;J++){var de=E[J],$e=oe(de),ge=je(de)===St,nn=[Q,le].indexOf($e)>=0,rn=nn?"width":"height",Ie=Zt(t,{placement:de,boundary:u,rootBoundary:d,altBoundary:p,padding:l}),He=nn?ge?re:te:ge?le:Q;R[rn]>M[rn]&&(He=ni(He));var Pr=ni(He),sn=[];if(s&&sn.push(Ie[$e]<=0),c&&sn.push(Ie[He]<=0,Ie[Pr]<=0),sn.every(function(Pn){return Pn})){W=de,Z=!1;break}B.set(de,sn)}if(Z)for(var Nr=b?3:1,wo=function(kt){var vi=E.find(function(xr){var on=B.get(xr);if(on)return on.slice(0,kt).every(function(Do){return Do})});if(vi)return W=vi,"break"},_i=Nr;_i>0;_i--){var kr=wo(_i);if(kr==="break")break}t.placement!==W&&(t.modifiersData[i]._skip=!0,t.placement=W,t.reset=!0)}}var fc={name:"flip",enabled:!0,phase:"main",fn:Jv,requiresIfExists:["offset"],data:{_skip:!1}};function Kv(n,t,e){var i=oe(n),r=[te,Q].indexOf(i)>=0?-1:1,s=typeof e=="function"?e(Object.assign({},t,{placement:n})):e,o=s[0],c=s[1];return o=o||0,c=(c||0)*r,[te,re].indexOf(i)>=0?{x:c,y:o}:{x:o,y:c}}function Yv(n){var t=n.state,e=n.options,i=n.name,r=e.offset,s=r===void 0?[0,0]:r,o=Bs.reduce(function(u,d){return u[d]=Kv(d,t.rects,s),u},{}),c=o[t.placement],a=c.x,l=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=l),t.modifiersData[i]=o}var pc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Yv};function Qv(n){var t=n.state,e=n.name;t.modifiersData[e]=_r({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var nf={name:"popperOffsets",enabled:!0,phase:"read",fn:Qv,data:{}};function gc(n){return n==="x"?"y":"x"}function Zv(n){var t=n.state,e=n.options,i=n.name,r=e.mainAxis,s=r===void 0?!0:r,o=e.altAxis,c=o===void 0?!1:o,a=e.boundary,l=e.rootBoundary,u=e.altBoundary,d=e.padding,p=e.tether,g=p===void 0?!0:p,b=e.tetherOffset,v=b===void 0?0:b,_=Zt(t,{boundary:a,rootBoundary:l,padding:d,altBoundary:u}),S=oe(t.placement),k=je(t.placement),D=!k,E=vn(S),R=gc(E),M=t.modifiersData.popperOffsets,B=t.rects.reference,Z=t.rects.popper,W=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,J=typeof W=="number"?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),de=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$e={x:0,y:0};if(M){if(s){var ge,nn=E==="y"?Q:te,rn=E==="y"?le:re,Ie=E==="y"?"height":"width",He=M[E],Pr=He+_[nn],sn=He-_[rn],Nr=g?-Z[Ie]/2:0,wo=k===St?B[Ie]:Z[Ie],_i=k===St?-Z[Ie]:-B[Ie],kr=t.elements.arrow,Pn=g&&kr?_n(kr):{width:0,height:0},kt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:pr(),vi=kt[nn],xr=kt[rn],on=yn(0,B[Ie],Pn[Ie]),Do=D?B[Ie]/2-Nr-on-vi-J.mainAxis:wo-on-vi-J.mainAxis,zp=D?-B[Ie]/2+Nr+on+xr+J.mainAxis:_i+on+xr+J.mainAxis,To=t.elements.arrow&&Ke(t.elements.arrow),Wp=To?E==="y"?To.clientTop||0:To.clientLeft||0:0,zl=(ge=de?.[E])!=null?ge:0,qp=He+Do-zl-Wp,Jp=He+zp-zl,Wl=yn(g?mn(Pr,qp):Pr,He,g?Je(sn,Jp):sn);M[E]=Wl,$e[E]=Wl-He}if(c){var ql,Kp=E==="x"?Q:te,Yp=E==="x"?le:re,an=M[R],Fr=R==="y"?"height":"width",Jl=an+_[Kp],Kl=an-_[Yp],Eo=[Q,te].indexOf(S)!==-1,Yl=(ql=de?.[R])!=null?ql:0,Ql=Eo?Jl:an-B[Fr]-Z[Fr]-Yl+J.altAxis,Zl=Eo?an+B[Fr]+Z[Fr]-Yl-J.altAxis:Kl,Xl=g&&Eo?Qh(Ql,an,Zl):yn(g?Ql:Jl,an,g?Zl:Kl);M[R]=Xl,$e[R]=Xl-an}t.modifiersData[i]=$e}}var mc={name:"preventOverflow",enabled:!0,phase:"main",fn:Zv,requiresIfExists:["offset"]};function _c(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function vc(n){return n===G(n)||!ne(n)?bn(n):_c(n)}function Xv(n){var t=n.getBoundingClientRect(),e=It(t.width)/n.offsetWidth||1,i=It(t.height)/n.offsetHeight||1;return e!==1||i!==1}function yc(n,t,e){e===void 0&&(e=!1);var i=ne(t),r=ne(t)&&Xv(t),s=ue(t),o=Ue(n,r,e),c={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(i||!i&&!e)&&((se(t)!=="body"||Dn(s))&&(c=vc(t)),ne(t)?(a=Ue(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=wn(s))),{x:o.left+c.scrollLeft-a.x,y:o.top+c.scrollTop-a.y,width:o.width,height:o.height}}function e0(n){var t=new Map,e=new Set,i=[];n.forEach(function(s){t.set(s.name,s)});function r(s){e.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(c){if(!e.has(c)){var a=t.get(c);a&&r(a)}}),i.push(s)}return n.forEach(function(s){e.has(s.name)||r(s)}),i}function bc(n){var t=e0(n);return Jh.reduce(function(e,i){return e.concat(t.filter(function(r){return r.phase===i}))},[])}function wc(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}function Dc(n){var t=n.reduce(function(e,i){var r=e[i.name];return e[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,e},{});return Object.keys(t).map(function(e){return t[e]})}var rf={placement:"bottom",modifiers:[],strategy:"absolute"};function sf(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function of(n){n===void 0&&(n={});var t=n,e=t.defaultModifiers,i=e===void 0?[]:e,r=t.defaultOptions,s=r===void 0?rf:r;return function(c,a,l){l===void 0&&(l=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},rf,s),modifiersData:{},elements:{reference:c,popper:a},attributes:{},styles:{}},d=[],p=!1,g={state:u,setOptions:function(S){var k=typeof S=="function"?S(u.options):S;v(),u.options=Object.assign({},s,u.options,k),u.scrollParents={reference:Ve(c)?Qt(c):c.contextElement?Qt(c.contextElement):[],popper:Qt(a)};var D=bc(Dc([].concat(i,u.options.modifiers)));return u.orderedModifiers=D.filter(function(E){return E.enabled}),b(),g.update()},forceUpdate:function(){if(!p){var S=u.elements,k=S.reference,D=S.popper;if(sf(k,D)){u.rects={reference:yc(k,Ke(D),u.options.strategy==="fixed"),popper:_n(D)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(J){return u.modifiersData[J.name]=Object.assign({},J.data)});for(var E=0;E<u.orderedModifiers.length;E++){if(u.reset===!0){u.reset=!1,E=-1;continue}var R=u.orderedModifiers[E],M=R.fn,B=R.options,Z=B===void 0?{}:B,W=R.name;typeof M=="function"&&(u=M({state:u,options:Z,name:W,instance:g})||u)}}}},update:wc(function(){return new Promise(function(_){g.forceUpdate(),_(u)})}),destroy:function(){v(),p=!0}};if(!sf(c,a))return g;g.setOptions(l).then(function(_){!p&&l.onFirstUpdate&&l.onFirstUpdate(_)});function b(){u.orderedModifiers.forEach(function(_){var S=_.name,k=_.options,D=k===void 0?{}:k,E=_.effect;if(typeof E=="function"){var R=E({state:u,name:S,instance:g,options:D}),M=function(){};d.push(R||M)}})}function v(){d.forEach(function(_){return _()}),d=[]}return g}}var t0=[ef,nf,Xh,Kh],Tc=of({defaultModifiers:t0});var n0=["*"];var i0=["dialog"];function r0(n,t){if(n&1&&(Ce(0,"span"),Le(1),Fe()),n&2){let e=ce().$implicit,i=ce();Ee(i.highlightClass),q(),Go(e)}}function s0(n,t){if(n&1&&(Ci(0),Le(1),Si()),n&2){let e=ce().$implicit;q(),Go(e)}}function o0(n,t){if(n&1&&un(0,r0,2,4,"span",0)(1,s0,2,1,"ng-container"),n&2){let e=t.$index;ku(e%2!==0?0:1)}}var ff={animation:!0,transitionTimerDelayMs:5},Ac=(()=>{class n{constructor(){this.animation=ff.animation}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),a0=(()=>{class n{constructor(){this._ngbConfig=f(Ac),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function c0(n){let{transitionDelay:t,transitionDuration:e}=window.getComputedStyle(n),i=parseFloat(t),r=parseFloat(e);return(i+r)*1e3}function af(n){return n!=null?`${n}`:""}function Oc(n){return typeof n=="string"}function Ec(n){return n!=null}function l0(n){return n&&n.then}function u0(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function d0(n,t){return!t||typeof n.closest>"u"?null:n.closest(t)}function Rc(n){return(n||document.body).getBoundingClientRect()}function h0(n){return t=>new Ne(e=>{let i=o=>n.run(()=>e.next(o)),r=o=>n.run(()=>e.error(o)),s=()=>n.run(()=>e.complete());return t.subscribe({next:i,error:r,complete:s})})}function cf(n){return n.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function pf(n=document){let t=n?.activeElement;return t?t.shadowRoot?pf(t.shadowRoot):t:null}var f0=()=>{},{transitionTimerDelayMs:p0}=ff,$s=new Map,Xt=(n,t,e,i)=>{let r=i.context||{},s=$s.get(t);if(s)switch(i.runningTransition){case"continue":return Xe;case"stop":n.run(()=>s.transition$.complete()),r=Object.assign(s.context,r),$s.delete(t)}let o=e(t,i.animation,r)||f0;if(!i.animation||window.getComputedStyle(t).transitionProperty==="none")return n.run(()=>o()),w(void 0).pipe(h0(n));let c=new x,a=new x,l=c.pipe(fu(!0));$s.set(t,{transition$:c,complete:()=>{a.next(),a.complete()},context:r});let u=c0(t);return n.runOutsideAngular(()=>{let d=De(t,"transitionend").pipe(Y(l),he(({target:g})=>g===t)),p=uu(u+p0).pipe(Y(l));Mo(p,d,a).pipe(Y(l)).subscribe(()=>{$s.delete(t),n.run(()=>{o(),c.next(),c.complete()})})}),c.asObservable()};function g0(n,t){if(typeof navigator>"u")return"0px";let{classList:e}=n,i=e.contains("show");i||e.add("show"),n.style[t]="";let r=n.getBoundingClientRect()[t]+"px";return i||e.remove("show"),r}var m0=(n,t,e)=>{let{direction:i,maxSize:r,dimension:s}=e,{classList:o}=n;function c(){o.add("collapse"),i==="show"?o.add("show"):o.remove("show")}if(!t){c();return}return r||(r=g0(n,s),e.maxSize=r,n.style[s]=i!=="show"?r:"0px",o.remove("collapse"),o.remove("collapsing"),o.remove("show"),Rc(n),o.add("collapsing")),n.style[s]=i==="show"?r:"0px",()=>{c(),o.remove("collapsing"),n.style[s]=""}},_0=(()=>{class n{constructor(){this._ngbConfig=f(Ac),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),lf=(()=>{class n{constructor(){this._config=f(_0),this._element=f(ve),this._zone=f(H),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new $,this.horizontal=this._config.horizontal,this.shown=new $,this.hidden=new $}set collapsed(e){this._isCollapsed!==e&&(this._isCollapsed=e,this._afterInit&&this._runTransitionWithEvents(e,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(e=this._isCollapsed){this.collapsed=!e,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(e,i){return Xt(this._zone,this._element.nativeElement,m0,{animation:i,runningTransition:"stop",context:{direction:e?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(e,i){this._runTransition(e,i).subscribe(()=>{e?this.hidden.emit():this.shown.emit()})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,r){i&2&&ee("collapse-horizontal",r.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"],standalone:!0})}}return n})(),v0=0,PA=(()=>{class n{constructor(){this._vcr=f($r),this._element=f(ve).nativeElement,this._item=f(si),this._viewRef=null}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef&&(this._viewRef.destroy(),this._viewRef=null)}_createViewIfNotExists(){if(!this._viewRef){this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges();for(let e of this._viewRef.rootNodes)this._element.appendChild(e)}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordionBody",""]],contentQueries:function(i,r,s){if(i&1&&Ut(s,jo,7),i&2){let o;mt(o=_t())&&(r._bodyTpl=o.first)}},hostVars:2,hostBindings:function(i,r){i&2&&ee("accordion-body",!0)},standalone:!0})}}return n})(),y0=(()=>{class n{constructor(){this.item=f(si),this.ngbCollapse=f(lf)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region"],hostVars:4,hostBindings:function(i,r){i&2&&(dn("id",r.item.collapseId),Re("aria-labelledby",r.item.toggleId),ee("accordion-collapse",!0))},exportAs:["ngbAccordionCollapse"],standalone:!0,features:[$o([lf])]})}}return n})(),b0=(()=>{class n{constructor(){this.item=f(si),this.accordion=f(gf)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordionToggle",""]],hostVars:5,hostBindings:function(i,r){i&1&&ye("click",function(){return!r.item.disabled&&r.accordion.toggle(r.item.id)}),i&2&&(dn("id",r.item.toggleId),Re("aria-controls",r.item.collapseId)("aria-expanded",!r.item.collapsed),ee("collapsed",r.item.collapsed))},standalone:!0})}}return n})(),NA=(()=>{class n{constructor(){this.item=f(si)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["button","ngbAccordionButton",""]],hostAttrs:["type","button"],hostVars:3,hostBindings:function(i,r){i&2&&(dn("disabled",r.item.disabled),ee("accordion-button",!0))},standalone:!0,features:[$o([b0])]})}}return n})(),kA=(()=>{class n{constructor(){this.item=f(si)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading"],hostVars:4,hostBindings:function(i,r){i&2&&ee("accordion-header",!0)("collapsed",r.item.collapsed)},standalone:!0})}}return n})(),si=(()=>{class n{constructor(){this._accordion=f(gf),this._cd=f(bt),this._destroyRef=f(wi),this._collapsed=!0,this._id=`ngb-accordion-item-${v0++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new $,this.shown=new $,this.hide=new $,this.hidden=new $}set id(e){Oc(e)&&e!==""&&(this._id=e)}set destroyOnHide(e){this._destroyOnHide=e}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(e){e?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:e}=this._collapse;e.animation=!1,e.collapsed=this.collapsed,e.animation=this._accordion.animation,e.hidden.pipe(Ss(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),e.shown.pipe(Ss(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id)})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordionItem",""]],contentQueries:function(i,r,s){if(i&1&&Ut(s,y0,7),i&2){let o;mt(o=_t())&&(r._collapse=o.first)}},hostVars:3,hostBindings:function(i,r){i&2&&(dn("id",r.id),ee("accordion-item",!0))},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"],standalone:!0})}}return n})(),gf=(()=>{class n{constructor(){this._config=f(a0),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new $,this.shown=new $,this.hide=new $,this.hidden=new $}toggle(e){this._getItem(e)?.toggle()}expand(e){this._getItem(e)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(e=>!e.collapsed)||this._items.first.expand():this._items.forEach(e=>e.expand()))}collapse(e){this._getItem(e)?.collapse()}collapseAll(){this._items?.forEach(e=>e.collapse())}isExpanded(e){let i=this._getItem(e);return i?!i.collapsed:!1}_ensureCanExpand(e){return this.closeOthers?this._items?(this._items.find(i=>!i.collapsed&&e!==i)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(e){return this._items?.find(i=>i.id===e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbAccordion",""]],contentQueries:function(i,r,s){if(i&1&&Ut(s,si,4),i&2){let o;mt(o=_t())&&(r._items=o)}},hostVars:2,hostBindings:function(i,r){i&2&&ee("accordion",!0)},inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"],standalone:!0})}}return n})();var xA=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Oe({type:n})}static{this.\u0275inj=Ae({})}}return n})();var Ye=function(n){return n[n.Tab=9]="Tab",n[n.Enter=13]="Enter",n[n.Escape=27]="Escape",n[n.Space=32]="Space",n[n.PageUp=33]="PageUp",n[n.PageDown=34]="PageDown",n[n.End=35]="End",n[n.Home=36]="Home",n[n.ArrowLeft=37]="ArrowLeft",n[n.ArrowUp=38]="ArrowUp",n[n.ArrowRight=39]="ArrowRight",n[n.ArrowDown=40]="ArrowDown",n}(Ye||{});var Hs=(n,t)=>t?t.some(e=>e.contains(n)):!1,uf=(n,t)=>!t||d0(n,t)!=null,w0=(()=>{let n=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2,t=()=>/Android/.test(navigator.userAgent);return typeof navigator<"u"?!!navigator.userAgent&&(n()||t()):!1})(),D0=n=>w0?()=>setTimeout(()=>n(),100):n;function T0(n,t,e,i,r,s,o,c){e&&n.runOutsideAngular(D0(()=>{let a=p=>{let g=p.target;return p.button===2||Hs(g,o)?!1:e==="inside"?Hs(g,s)&&uf(g,c):e==="outside"?!Hs(g,s):uf(g,c)||!Hs(g,s)},l=De(t,"keydown").pipe(Y(r),he(p=>p.which===Ye.Escape),V(p=>p.preventDefault())),u=De(t,"mousedown").pipe(I(a),Y(r)),d=De(t,"mouseup").pipe(Vr(u),he(([p,g])=>g),hu(0),Y(r));Mo([l.pipe(I(p=>0)),d.pipe(I(p=>1))]).subscribe(p=>n.run(()=>i(p)))}))}var mf=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function _f(n){let t=Array.from(n.querySelectorAll(mf)).filter(e=>e.tabIndex!==-1);return[t[0],t[t.length-1]]}var E0=(n,t,e,i=!1)=>{n.runOutsideAngular(()=>{let r=De(t,"focusin").pipe(Y(e),I(s=>s.target));De(t,"keydown").pipe(Y(e),he(s=>s.which===Ye.Tab),Vr(r)).subscribe(([s,o])=>{let[c,a]=_f(t);(o===c||o===t)&&s.shiftKey&&(a.focus(),s.preventDefault()),o===a&&!s.shiftKey&&(c.focus(),s.preventDefault())}),i&&De(t,"click").pipe(Y(e),Vr(r),I(s=>s[1])).subscribe(s=>s.focus())})},C0=(()=>{class n{constructor(){this._element=f(z).documentElement}isRTL(){return(this._element.getAttribute("dir")||"").toLowerCase()==="rtl"}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),S0=/\s+/,I0=/ +/gi,A0={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]};function O0(n,t){let[e,i]=A0[n];return t&&i||e}var R0=/^left/,M0=/^right/,P0=/^start/,N0=/^end/;function k0(n,t){let[e,i]=t.split("-"),r=e.replace(R0,"start").replace(M0,"end"),s=[r];if(i){let o=i;(e==="left"||e==="right")&&(o=o.replace(P0,"top").replace(N0,"bottom")),s.push(`${r}-${o}`)}return n&&(s=s.map(o=>`${n}-${o}`)),s.join(" ")}function df({placement:n,baseClass:t},e){let i=Array.isArray(n)?n:n.split(S0),r=["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"],s=i.findIndex(l=>l==="auto");s>=0&&r.forEach(function(l){i.find(u=>u.search("^"+l)!==-1)==null&&i.splice(s++,1,l)});let o=i.map(l=>O0(l,e.isRTL()));return{placement:o.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!t,phase:"write",fn({state:l}){let u=new RegExp(t+"(-[a-z]+)*","gi"),d=l.elements.popper,p=l.placement,g=d.className;g=g.replace(u,""),g+=` ${k0(t,p)}`,g=g.trim().replace(I0," "),d.className=g}},fc,mc,cc,{enabled:!0,name:"flip",options:{fallbackPlacements:o}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function hf(n){return n}function x0(){let n=f(C0),t=null;return{createPopper(e){if(!t){let r=(e.updatePopperOptions||hf)(df(e,n));t=Tc(e.hostElement,e.targetElement,r)}},update(){t&&t.update()},setOptions(e){if(t){let r=(e.updatePopperOptions||hf)(df(e,n));t.setOptions(r)}},destroy(){t&&(t.destroy(),t=null)}}}function F0(n){return t=>(t.modifiers.push(pc,{name:"offset",options:{offset:()=>n}}),t)}var FA=new Date(1882,10,12),LA=new Date(2174,10,25);var BA=1e3*60*60*24;var Mc=1080,L0=24*Mc,B0=12*Mc+793,VA=29*L0+B0,UA=11*Mc+204;var V0=(()=>{class n{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=e=>e,this.container=null}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),vf=(()=>{class n{constructor(){this._disabled=!1,this.nativeElement=f(ve).nativeElement,this.tabindex=0}set disabled(e){this._disabled=e===""||e===!0}get disabled(){return this._disabled}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(i,r){i&2&&(dn("tabIndex",r.disabled?-1:r.tabindex),ee("disabled",r.disabled))},inputs:{tabindex:"tabindex",disabled:"disabled"},standalone:!0})}}return n})(),jA=(()=>{class n{constructor(){this.item=f(vf)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["button","ngbDropdownItem",""]],hostVars:1,hostBindings:function(i,r){i&2&&dn("disabled",r.item.disabled)},standalone:!0})}}return n})(),U0=(()=>{class n{constructor(){this.dropdown=f(yf),this.nativeElement=f(ve).nativeElement}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(i,r,s){if(i&1&&Ut(s,vf,4),i&2){let o;mt(o=_t())&&(r.menuItems=o)}},hostVars:4,hostBindings:function(i,r){i&1&&ye("keydown.ArrowUp",function(o){return r.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return r.dropdown.onKeyDown(o)})("keydown.Home",function(o){return r.dropdown.onKeyDown(o)})("keydown.End",function(o){return r.dropdown.onKeyDown(o)})("keydown.Enter",function(o){return r.dropdown.onKeyDown(o)})("keydown.Space",function(o){return r.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return r.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return r.dropdown.onKeyDown(o)}),i&2&&ee("dropdown-menu",!0)("show",r.dropdown.isOpen())},standalone:!0})}}return n})(),Cc=(()=>{class n{constructor(){this.dropdown=f(yf),this.nativeElement=f(ve).nativeElement}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(i,r){i&2&&(Re("aria-expanded",r.dropdown.isOpen()),ee("show",r.dropdown.isOpen()))},standalone:!0})}}return n})(),$A=(()=>{class n extends Cc{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(n)))(r||n)}})()}static{this.\u0275dir=F({type:n,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:3,hostBindings:function(i,r){i&1&&ye("click",function(){return r.dropdown.toggle()})("keydown.ArrowUp",function(o){return r.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return r.dropdown.onKeyDown(o)})("keydown.Home",function(o){return r.dropdown.onKeyDown(o)})("keydown.End",function(o){return r.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return r.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return r.dropdown.onKeyDown(o)}),i&2&&(Re("aria-expanded",r.dropdown.isOpen()),ee("show",r.dropdown.isOpen()))},standalone:!0,features:[vt([{provide:Cc,useExisting:ht(()=>n)}]),xe]})}}return n})(),yf=(()=>{class n{constructor(){this._changeDetector=f(bt),this._config=f(V0),this._document=f(z),this._ngZone=f(H),this._nativeElement=f(ve).nativeElement,this._destroyCloseHandlers$=new x,this._bodyContainer=null,this._positioning=x0(),this.autoClose=this._config.autoClose,this._open=!1,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.container=this._config.container,this.openChange=new $}ngOnInit(){this.display||(this.display=this._nativeElement.closest(".navbar")?"static":"dynamic")}ngAfterContentInit(){this._ngZone.onStable.pipe(Te(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){if(e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:this.container==="body"}),this._applyPlacementClasses()),e.dropdownClass){let{currentValue:i,previousValue:r}=e.dropdownClass;this._applyCustomDropdownClass(i,r)}e.autoClose&&this._open&&(this.autoClose=e.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),this.display==="dynamic"&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:this.container==="body",updatePopperOptions:e=>this.popperOptions(F0([0,2])(e))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),T0(this._ngZone,this._document,this.autoClose,e=>{this.close(),e===0&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._zoneSubscription?.unsubscribe(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(e){let i=e.which,r=this._getMenuElements(),s=-1,o=null,c=this._isEventFromToggle(e);if(!c&&r.length&&r.forEach((a,l)=>{a.contains(e.target)&&(o=a),a===pf(this._document)&&(s=l)}),i===Ye.Space||i===Ye.Enter){o&&(this.autoClose===!0||this.autoClose==="inside")&&De(o,"click").pipe(Te(1)).subscribe(()=>this.close());return}if(i===Ye.Tab){if(e.target&&this.isOpen()&&this.autoClose)if(this._anchor.nativeElement===e.target){this.container==="body"&&!e.shiftKey?(this._menu.nativeElement.setAttribute("tabindex","0"),this._menu.nativeElement.focus(),this._menu.nativeElement.removeAttribute("tabindex")):e.shiftKey&&this.close();return}else if(this.container==="body"){let a=this._menu.nativeElement.querySelectorAll(mf);e.shiftKey&&e.target===a[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===a[a.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else De(e.target,"focusout").pipe(Te(1)).subscribe(({relatedTarget:a})=>{this._nativeElement.contains(a)||this.close()});return}if(c||o){if(this.open(),r.length){switch(i){case Ye.ArrowDown:s=Math.min(s+1,r.length-1);break;case Ye.ArrowUp:if(this._isDropup()&&s===-1){s=r.length-1;break}s=Math.max(s-1,0);break;case Ye.Home:s=0;break;case Ye.End:s=r.length-1;break}r[s].focus()}e.preventDefault()}}_isDropup(){return this._nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){return this._menu?this._menu.menuItems.filter(({disabled:e})=>!e).map(({nativeElement:e})=>e):[]}_positionMenu(){let e=this._menu;this.isOpen()&&e&&(this.display==="dynamic"?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){this._menu&&this._nativeElement.appendChild(this._menu.nativeElement),this._bodyContainer&&(this._document.body.removeChild(this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),e==="body"){let i=this._menu.nativeElement,r=this._bodyContainer=this._bodyContainer||this._document.createElement("div");r.style.position="absolute",i.style.position="static",r.style.zIndex="1055",r.appendChild(i),this._document.body.appendChild(r)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(e,i){let r=this.container==="body"?this._bodyContainer:this._nativeElement;r&&(i&&r.classList.remove(i),e&&r.classList.add(e))}_applyPlacementClasses(e){if(this._menu){e||(e=this._getFirstPlacement(this.placement)),this._nativeElement.classList.remove("dropup","dropdown"),this.display==="static"?this._menu.nativeElement.setAttribute("data-bs-popper","static"):this._menu.nativeElement.removeAttribute("data-bs-popper");let i=e.search("^top")!==-1?"dropup":"dropdown";this._nativeElement.classList.add(i),this._bodyContainer&&(this._bodyContainer.classList.remove("dropup","dropdown"),this._bodyContainer.classList.add(i))}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=F({type:n,selectors:[["","ngbDropdown",""]],contentQueries:function(i,r,s){if(i&1&&(Ut(s,U0,5),Ut(s,Cc,5)),i&2){let o;mt(o=_t())&&(r._menu=o.first),mt(o=_t())&&(r._anchor=o.first)}},hostVars:2,hostBindings:function(i,r){i&2&&ee("show",r.isOpen())},inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:[0,"open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],standalone:!0,features:[pt]})}}return n})();var HA=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Oe({type:n})}static{this.\u0275inj=Ae({})}}return n})(),j0=(()=>{class n{constructor(){this._ngbConfig=f(Ac),this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ri=class{constructor(t,e,i){this.nodes=t,this.viewRef=e,this.componentRef=i}};var $0=(()=>{class n{constructor(){this._document=f(z)}hide(){let e=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),i=this._document.body,r=i.style,{overflow:s,paddingRight:o}=r;if(e>0){let c=parseFloat(window.getComputedStyle(i).paddingRight);r.paddingRight=`${c+e}px`}return r.overflow="hidden",()=>{e>0&&(r.paddingRight=o),r.overflow=s}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),H0=(()=>{class n{constructor(){this._nativeElement=f(ve).nativeElement,this._zone=f(H)}ngOnInit(){this._zone.onStable.asObservable().pipe(Te(1)).subscribe(()=>{Xt(this._zone,this._nativeElement,(e,i)=>{i&&Rc(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return Xt(this._zone,this._nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=ft({type:n,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(i,r){i&2&&(Ee("modal-backdrop"+(r.backdropClass?" "+r.backdropClass:"")),ee("show",!r.animation)("fade",r.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},standalone:!0,features:[yt],decls:0,vars:0,template:function(i,r){},encapsulation:2})}}return n})(),Gs=class{update(t){}close(t){}dismiss(t){}},G0=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],z0=["animation","backdropClass"],Sc=class{_applyWindowOptions(t,e){G0.forEach(i=>{Ec(e[i])&&(t[i]=e[i])})}_applyBackdropOptions(t,e){z0.forEach(i=>{Ec(e[i])&&(t[i]=e[i])})}update(t){this._applyWindowOptions(this._windowCmptRef.instance,t),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,t)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Y(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Y(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}constructor(t,e,i,r){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new x,this._dismissed=new x,this._hidden=new x,t.instance.dismissEvent.subscribe(s=>{this.dismiss(s)}),this.result=new Promise((s,o)=>{this._resolve=s,this._reject=o}),this.result.then(null,()=>{})}close(t){this._windowCmptRef&&(this._closed.next(t),this._resolve(t),this._removeModalElements())}_dismiss(t){this._dismissed.next(t),this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(!this._beforeDismiss)this._dismiss(t);else{let e=this._beforeDismiss();l0(e)?e.then(i=>{i!==!1&&this._dismiss(t)},()=>{}):e!==!1&&this._dismiss(t)}}_removeModalElements(){let t=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():w(void 0);t.subscribe(()=>{let{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){let{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),Br(t,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}},Ic=function(n){return n[n.BACKDROP_CLICK=0]="BACKDROP_CLICK",n[n.ESC=1]="ESC",n}(Ic||{}),W0=(()=>{class n{constructor(){this._document=f(z),this._elRef=f(ve),this._zone=f(H),this._closed$=new x,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new $,this.shown=new x,this.hidden=new x}get fullscreenClass(){return this.fullscreen===!0?" modal-fullscreen":Oc(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(Te(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){let{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},r=Xt(this._zone,e,()=>e.classList.remove("show"),i),s=Xt(this._zone,this._dialogEl.nativeElement,()=>{},i),o=Br(r,s);return o.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),o}_show(){let e={animation:this.animation,runningTransition:"continue"},i=Xt(this._zone,this._elRef.nativeElement,(s,o)=>{o&&Rc(s),s.classList.add("show")},e),r=Xt(this._zone,this._dialogEl.nativeElement,()=>{},e);Br(i,r).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){let{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{De(e,"keydown").pipe(Y(this._closed$),he(r=>r.which===Ye.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(Ic.ESC))}):this.backdrop==="static"&&this._bumpBackdrop()});let i=!1;De(this._dialogEl.nativeElement,"mousedown").pipe(Y(this._closed$),V(()=>i=!1),ae(()=>De(e,"mouseup").pipe(Y(this._closed$),Te(1))),he(({target:r})=>e===r)).subscribe(()=>{i=!0}),De(e,"click").pipe(Y(this._closed$)).subscribe(({target:r})=>{e===r&&(this.backdrop==="static"?this._bumpBackdrop():this.backdrop===!0&&!i&&this._zone.run(()=>this.dismiss(Ic.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){let{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){let i=e.querySelector("[ngbAutofocus]"),r=_f(e)[0];(i||r||e).focus()}}_restoreFocus(){let e=this._document.body,i=this._elWithFocus,r;i&&i.focus&&e.contains(i)?r=i:r=e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){this.backdrop==="static"&&Xt(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=ft({type:n,selectors:[["ngb-modal-window"]],viewQuery:function(i,r){if(i&1&&ju(i0,7),i&2){let s;mt(s=_t())&&(r._dialogEl=s.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(i,r){i&2&&(Re("aria-modal",!0)("aria-labelledby",r.ariaLabelledBy)("aria-describedby",r.ariaDescribedBy),Ee("modal d-block"+(r.windowClass?" "+r.windowClass:"")),ee("fade",r.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},standalone:!0,features:[yt],ngContentSelectors:n0,decls:4,vars:2,consts:[["dialog",""],["role","document"],[1,"modal-content"]],template:function(i,r){i&1&&(Vu(),Ce(0,"div",1,0)(2,"div",2),Uu(3),Fe()()),i&2&&Ee("modal-dialog"+(r.size?" modal-"+r.size:"")+(r.centered?" modal-dialog-centered":"")+r.fullscreenClass+(r.scrollable?" modal-dialog-scrollable":"")+(r.modalDialogClass?" "+r.modalDialogClass:""))},styles:[`ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}
3
+ `],encapsulation:2})}}return n})(),q0=(()=>{class n{constructor(){this._applicationRef=f(it),this._injector=f(X),this._environmentInjector=f(tt),this._document=f(z),this._scrollBar=f($0),this._activeWindowCmptHasChanged=new x,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new $;let e=f(H);this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){let i=this._windowCmpts[this._windowCmpts.length-1];E0(e,i.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(i.location.nativeElement)}})}_restoreScrollBar(){let e=this._scrollBarRestoreFn;e&&(this._scrollBarRestoreFn=null,e())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(e,i,r){let s=r.container instanceof HTMLElement?r.container:Ec(r.container)?this._document.querySelector(r.container):this._document.body;if(!s)throw new Error(`The specified modal container "${r.container||"body"}" was not found in the DOM.`);this._hideScrollBar();let o=new Gs;e=r.injector||e;let c=e.get(tt,null)||this._environmentInjector,a=this._getContentRef(e,c,i,o,r),l=r.backdrop!==!1?this._attachBackdrop(s):void 0,u=this._attachWindowComponent(s,a.nodes),d=new Sc(u,a,l,r.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(u),d.hidden.pipe(Te(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(this._document.body.classList.remove("modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),o.close=p=>{d.close(p)},o.dismiss=p=>{d.dismiss(p)},o.update=p=>{d.update(p)},d.update(r),this._modalRefs.length===1&&this._document.body.classList.add("modal-open"),l&&l.instance&&l.changeDetectorRef.detectChanges(),u.changeDetectorRef.detectChanges(),d}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e){let i=Jr(H0,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(i.hostView),e.appendChild(i.location.nativeElement),i}_attachWindowComponent(e,i){let r=Jr(W0,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:i});return this._applicationRef.attachView(r.hostView),e.appendChild(r.location.nativeElement),r}_getContentRef(e,i,r,s,o){return r?r instanceof jo?this._createFromTemplateRef(r,s):Oc(r)?this._createFromString(r):this._createFromComponent(e,i,r,s,o):new ri([])}_createFromTemplateRef(e,i){let r={$implicit:i,close(o){i.close(o)},dismiss(o){i.dismiss(o)}},s=e.createEmbeddedView(r);return this._applicationRef.attachView(s),new ri([s.rootNodes],s)}_createFromString(e){let i=this._document.createTextNode(`${e}`);return new ri([[i]])}_createFromComponent(e,i,r,s,o){let c=X.create({providers:[{provide:Gs,useValue:s}],parent:e}),a=Jr(r,{environmentInjector:i,elementInjector:c}),l=a.location.nativeElement;return o.scrollable&&l.classList.add("component-host-scrollable"),this._applicationRef.attachView(a.hostView),new ri([[l]],a.hostView,a)}_setAriaHidden(e){let i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&r.nodeName!=="SCRIPT"&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){let i=()=>{let r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{let i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),GA=(()=>{class n{constructor(){this._injector=f(X),this._modalStack=f(q0),this._config=f(j0)}open(e,i={}){let r=m(P(m({},this._config),{animation:this._config.animation}),i);return this._modalStack.open(this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var zA=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=Oe({type:n})}static{this.\u0275inj=Ae({})}}return n})();var WA=(()=>{class n{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(e){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);let i=af(this.result),r=Array.isArray(this.term)?this.term:[this.term],s=l=>this.accentSensitive?l:cf(l),o=r.map(l=>u0(s(af(l)))).filter(l=>l),c=this.accentSensitive?i:cf(i),a=o.length?c.split(new RegExp(`(${o.join("|")})`,"gmi")):[i];if(this.accentSensitive)this.parts=a;else{let l=0;this.parts=a.map(u=>i.substring(l,l+=u.length))}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=ft({type:n,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},standalone:!0,features:[pt,yt],decls:2,vars:0,consts:[[3,"class"]],template:function(i,r){i&1&&Fu(0,o0,2,1,null,null,xu),i&2&&Lu(r.parts)},styles:[`.ngb-highlight{font-weight:700}
4
+ `],encapsulation:2,changeDetection:0})}}return n})(),qA=new O("live announcer delay",{providedIn:"root",factory:()=>100});var bf=["toast-component",""];function J0(n,t){if(n&1){let e=Hr();Ce(0,"button",5),ye("click",function(){Ur(e);let r=ce();return jr(r.remove())}),Ce(1,"span",6),Le(2,"\xD7"),Fe()()}}function K0(n,t){if(n&1&&(Ci(0),Le(1),Si()),n&2){let e=ce(2);q(),jt("[",e.duplicatesCount+1,"]")}}function Y0(n,t){if(n&1&&(Ce(0,"div"),Le(1),un(2,K0,2,1,"ng-container",4),Fe()),n&2){let e=ce();Ee(e.options.titleClass),Re("aria-label",e.title),q(),jt(" ",e.title," "),q(),fe("ngIf",e.duplicatesCount)}}function Q0(n,t){if(n&1&&Vt(0,"div",7),n&2){let e=ce();Ee(e.options.messageClass),fe("innerHTML",e.message,Uo)}}function Z0(n,t){if(n&1&&(Ce(0,"div",8),Le(1),Fe()),n&2){let e=ce();Ee(e.options.messageClass),Re("aria-label",e.message),q(),jt(" ",e.message," ")}}function X0(n,t){if(n&1&&(Ce(0,"div"),Vt(1,"div",9),Fe()),n&2){let e=ce();q(),Fn("width",e.width()+"%")}}function ey(n,t){if(n&1){let e=Hr();Ce(0,"button",5),ye("click",function(){Ur(e);let r=ce();return jr(r.remove())}),Ce(1,"span",6),Le(2,"\xD7"),Fe()()}}function ty(n,t){if(n&1&&(Ci(0),Le(1),Si()),n&2){let e=ce(2);q(),jt("[",e.duplicatesCount+1,"]")}}function ny(n,t){if(n&1&&(Ce(0,"div"),Le(1),un(2,ty,2,1,"ng-container",4),Fe()),n&2){let e=ce();Ee(e.options.titleClass),Re("aria-label",e.title),q(),jt(" ",e.title," "),q(),fe("ngIf",e.duplicatesCount)}}function iy(n,t){if(n&1&&Vt(0,"div",7),n&2){let e=ce();Ee(e.options.messageClass),fe("innerHTML",e.message,Uo)}}function ry(n,t){if(n&1&&(Ce(0,"div",8),Le(1),Fe()),n&2){let e=ce();Ee(e.options.messageClass),Re("aria-label",e.message),q(),jt(" ",e.message," ")}}function sy(n,t){if(n&1&&(Ce(0,"div"),Vt(1,"div",9),Fe()),n&2){let e=ce();q(),Fn("width",e.width()+"%")}}var Pc=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}},Nc=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}},kc=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new x;_activate=new x;_manualClose=new x;_resetTimeout=new x;_countDuplicate=new x;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)}},oi=class{toastId;config;message;title;toastType;toastRef;_onTap=new x;_onAction=new x;constructor(t,e,i,r,s,o){this.toastId=t,this.config=e,this.message=i,this.title=r,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()}},wf={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"},Df=new O("ToastConfig"),xc=class extends Nc{_hostDomElement;_componentFactoryResolver;_appRef;constructor(t,e,i){super(),this._hostDomElement=t,this._componentFactoryResolver=e,this._appRef=i}attachComponentPortal(t,e){let i=this._componentFactoryResolver.resolveComponentFactory(t.component),r;return r=i.create(t.injector),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.detachView(r.hostView),r.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(r),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(r)),r}_getComponentRootNode(t){return t.hostView.rootNodes[0]}},oy=(()=>{class n{_document=f(z);_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(i){return new(i||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Fc=class{_portalHost;constructor(t){this._portalHost=t}attach(t,e=!0){return this._portalHost.attach(t,e)}detach(){return this._portalHost.detach()}},ay=(()=>{class n{_overlayContainer=f(oy);_componentFactoryResolver=f(Ru);_appRef=f(it);_document=f(z);_paneElements=new Map;create(e,i){return this._createOverlayRef(this.getPaneElement(e,i))}getPaneElement(e="",i){return this._paneElements.get(i)||this._paneElements.set(i,{}),this._paneElements.get(i)[e]||(this._paneElements.get(i)[e]=this._createPaneElement(e,i)),this._paneElements.get(i)[e]}_createPaneElement(e,i){let r=this._document.createElement("div");return r.id="toast-container",r.classList.add(e),r.classList.add("toast-container"),i?i.getContainerElement().appendChild(r):this._overlayContainer.getContainerElement().appendChild(r),r}_createPortalHost(e){return new xc(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new Fc(this._createPortalHost(e))}static \u0275fac=function(i){return new(i||n)};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),zs=(()=>{class n{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(e,i,r,s,o){this.overlay=i,this._injector=r,this.sanitizer=s,this.ngZone=o,this.toastrConfig=m(m({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=m(m({},e.default.iconClasses),e.config.iconClasses))}show(e,i,r={},s=""){return this._preBuildNotification(s,e,i,this.applyConfig(r))}success(e,i,r={}){let s=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(s,e,i,this.applyConfig(r))}error(e,i,r={}){let s=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(s,e,i,this.applyConfig(r))}info(e,i,r={}){let s=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(s,e,i,this.applyConfig(r))}warning(e,i,r={}){let s=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(s,e,i,this.applyConfig(r))}clear(e){for(let i of this.toasts)if(e!==void 0){if(i.toastId===e){i.toastRef.manualClose();return}}else i.toastRef.manualClose()}remove(e){let i=this._findToast(e);if(!i||(i.activeToast.toastRef.close(),this.toasts.splice(i.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 r=this.toasts[this.currentlyActive].toastRef;r.isInactive()||(this.currentlyActive=this.currentlyActive+1,r.activate())}return!0}findDuplicate(e="",i="",r,s){let{includeTitleDuplicates:o}=this.toastrConfig;for(let c of this.toasts){let a=o&&c.title===e;if((!o||a)&&c.message===i)return c.toastRef.onDuplicate(r,s),c}return null}applyConfig(e={}){return m(m({},this.toastrConfig),e)}_findToast(e){for(let i=0;i<this.toasts.length;i++)if(this.toasts[i].toastId===e)return{index:i,activeToast:this.toasts[i]};return null}_preBuildNotification(e,i,r,s){return s.onActivateTick?this.ngZone.run(()=>this._buildNotification(e,i,r,s)):this._buildNotification(e,i,r,s)}_buildNotification(e,i,r,s){if(!s.toastComponent)throw new Error("toastComponent required");let o=this.findDuplicate(r,i,this.toastrConfig.resetTimeoutOnDuplicate&&s.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&r||i)&&this.toastrConfig.preventDuplicates&&o!==null)return o;this.previousToastMessage=i;let c=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(c=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let a=this.overlay.create(s.positionClass,this.overlayContainer);this.index=this.index+1;let l=i;i&&s.enableHtml&&(l=this.sanitizer.sanitize(gt.HTML,i));let u=new kc(a),d=new oi(this.index,s,l,r,e,u),p=[{provide:oi,useValue:d}],g=X.create({providers:p,parent:this._injector}),b=new Pc(s.toastComponent,g),v=a.attach(b,s.newestOnTop);u.componentInstance=v.instance;let _={toastId:this.index,title:r||"",message:i||"",toastRef:u,onShown:u.afterActivate(),onHidden:u.afterClosed(),onTap:d.onTap(),onAction:d.onAction(),portal:v};return c||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{_.toastRef.activate()})),this.toasts.push(_),_}static \u0275fac=function(i){return new(i||n)(C(Df),C(ay),C(X),C(da),C(H))};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),cy=(()=>{class n{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=ze(-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,i,r){this.toastrService=e,this.toastPackage=i,this.ngZone=r,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(s=>{this.duplicatesCount=s}),this.state=ze({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=>P(m({},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(),i=this.hideTime-e;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(r=>100-r),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=>P(m({},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=>P(m({},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,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),i)):this.timeout=setTimeout(()=>e(),i)}outsideInterval(e,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),i)):this.intervalId=setInterval(()=>e(),i)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}static \u0275fac=function(i){return new(i||n)(N(zs),N(oi),N(H))};static \u0275cmp=ft({type:n,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(i,r){i&1&&ye("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),i&2&&(Bu("@flyInOut",r._state),Ee(r.toastClasses),Fn("display",r.displayStyle))},standalone:!0,features:[yt],attrs:bf,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(i,r){i&1&&un(0,J0,3,0,"button",0)(1,Y0,3,5,"div",1)(2,Q0,1,3,"div",2)(3,Z0,2,4,"div",3)(4,X0,2,2,"div",4),i&2&&(fe("ngIf",r.options.closeButton),q(),fe("ngIf",r.title),q(),fe("ngIf",r.message&&r.options.enableHtml),q(),fe("ngIf",r.message&&!r.options.enableHtml),q(),fe("ngIf",r.options.progressBar))},dependencies:[Jo],encapsulation:2,data:{animation:[Xu("flyInOut",[Xr("inactive",Zr({opacity:0})),Xr("active",Zr({opacity:1})),Xr("removed",Zr({opacity:0})),Yo("inactive => active",Ko("{{ easeTime }}ms {{ easing }}")),Yo("active => removed",Ko("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return n})(),ly=P(m({},wf),{toastComponent:cy}),cO=(n={})=>Ge([{provide:Df,useValue:{default:ly,config:n}}]);var uy=(()=>{class n{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=ze(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=ze("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(e,i,r){this.toastrService=e,this.toastPackage=i,this.appRef=r,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.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(),i=this.hideTime-e;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(r=>100-r),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(i){return new(i||n)(N(zs),N(oi),N(it))};static \u0275cmp=ft({type:n,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(i,r){i&1&&ye("click",function(){return r.tapToast()})("mouseenter",function(){return r.stickAround()})("mouseleave",function(){return r.delayedHideToast()}),i&2&&(Ee(r.toastClasses),Fn("display",r.displayStyle))},standalone:!0,features:[yt],attrs:bf,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(i,r){i&1&&un(0,ey,3,0,"button",0)(1,ny,3,5,"div",1)(2,iy,1,3,"div",2)(3,ry,2,4,"div",3)(4,sy,2,2,"div",4),i&2&&(fe("ngIf",r.options.closeButton),q(),fe("ngIf",r.title),q(),fe("ngIf",r.message&&r.options.enableHtml),q(),fe("ngIf",r.message&&!r.options.enableHtml),q(),fe("ngIf",r.options.progressBar))},dependencies:[Jo],encapsulation:2,changeDetection:0})}return n})(),lO=P(m({},wf),{toastComponent:uy});var Tf=(()=>{class n{constructor(){this.http=f(na),this.toastr=f(zs),this.requestTimeout=1e4}get(e,i={},r="/"){return this.http.get(`${r}${e}`,m({},i)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}post(e,i,r={},s="/"){return this.http.post(`${s}${e}`,i,m({},r)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}postFormData(e,i,r={},s="/"){return this.http.post(`${s}/${e}`,i,m({},r)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}put(e,i,r={},s="/"){return this.http.put(`${s}/${e}`,i,m({},r)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}delete(e,i={},r="/"){return this.http.delete(`${r}/${e}`,m({},i)).pipe(Nn(this.requestTimeout),_e(this.handleError.bind(this)))}handleError(e){let i={header:"API Error ",message:"An unknown error occurred."};return e instanceof au&&e.name=="TimeoutError"&&(i.header="Request Timeout",i.message="The request took too long to complete. Please try again later."),e instanceof rt&&(Object.keys(e.error).length?(i.header="API Error - "+e.status,i.message=e.error.Message||e.error.message):(e.status===401&&(i.header="Unauthorized",i.message="We can't log you in because of authentication error"),i.header="API Error - "+e.status,i.message=e.error.message)),this.toastr.error(i.message,i.header),ln(()=>i)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Cf=function(n){let t=[],e=0;for(let i=0;i<n.length;i++){let r=n.charCodeAt(i);r<128?t[e++]=r:r<2048?(t[e++]=r>>6|192,t[e++]=r&63|128):(r&64512)===55296&&i+1<n.length&&(n.charCodeAt(i+1)&64512)===56320?(r=65536+((r&1023)<<10)+(n.charCodeAt(++i)&1023),t[e++]=r>>18|240,t[e++]=r>>12&63|128,t[e++]=r>>6&63|128,t[e++]=r&63|128):(t[e++]=r>>12|224,t[e++]=r>>6&63|128,t[e++]=r&63|128)}return t},dy=function(n){let t=[],e=0,i=0;for(;e<n.length;){let r=n[e++];if(r<128)t[i++]=String.fromCharCode(r);else if(r>191&&r<224){let s=n[e++];t[i++]=String.fromCharCode((r&31)<<6|s&63)}else if(r>239&&r<365){let s=n[e++],o=n[e++],c=n[e++],a=((r&7)<<18|(s&63)<<12|(o&63)<<6|c&63)-65536;t[i++]=String.fromCharCode(55296+(a>>10)),t[i++]=String.fromCharCode(56320+(a&1023))}else{let s=n[e++],o=n[e++];t[i++]=String.fromCharCode((r&15)<<12|(s&63)<<6|o&63)}}return t.join("")},Sf={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_,i=[];for(let r=0;r<n.length;r+=3){let s=n[r],o=r+1<n.length,c=o?n[r+1]:0,a=r+2<n.length,l=a?n[r+2]:0,u=s>>2,d=(s&3)<<4|c>>4,p=(c&15)<<2|l>>6,g=l&63;a||(g=64,o||(p=64)),i.push(e[u],e[d],e[p],e[g])}return i.join("")},encodeString(n,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(n):this.encodeByteArray(Cf(n),t)},decodeString(n,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(n):dy(this.decodeStringToByteArray(n,t))},decodeStringToByteArray(n,t){this.init_();let e=t?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let r=0;r<n.length;){let s=e[n.charAt(r++)],c=r<n.length?e[n.charAt(r)]:0;++r;let l=r<n.length?e[n.charAt(r)]:64;++r;let d=r<n.length?e[n.charAt(r)]:64;if(++r,s==null||c==null||l==null||d==null)throw new Bc;let p=s<<2|c>>4;if(i.push(p),l!==64){let g=c<<4&240|l>>2;if(i.push(g),d!==64){let b=l<<6&192|d;i.push(b)}}}return i},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)}}},Bc=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},hy=function(n){let t=Cf(n);return Sf.encodeByteArray(t,!0)},Uc=function(n){return hy(n).replace(/\./g,"")},jc=function(n){try{return Sf.decodeString(n,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function fy(){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 py=()=>fy().__FIREBASE_DEFAULTS__,gy=()=>{if(typeof process>"u"||typeof process.env>"u")return;let n=process.env.__FIREBASE_DEFAULTS__;if(n)return JSON.parse(n)},my=()=>{if(typeof document>"u")return;let n;try{n=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let t=n&&jc(n[1]);return t&&JSON.parse(t)},$c=()=>{try{return py()||gy()||my()}catch(n){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);return}},If=n=>{var t,e;return(e=(t=$c())===null||t===void 0?void 0:t.emulatorHosts)===null||e===void 0?void 0:e[n]};var Hc=()=>{var n;return(n=$c())===null||n===void 0?void 0:n.config},Gc=n=>{var t;return(t=$c())===null||t===void 0?void 0:t[`_${n}`]};var Ws=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}wrapCallback(t){return(e,i)=>{e?this.reject(e):this.resolve(i),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(e):t(e,i))}}};function pe(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Af(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(pe())}function Of(){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 Mf(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Pf(){let n=pe();return n.indexOf("MSIE ")>=0||n.indexOf("Trident/")>=0}function Nf(){try{return typeof indexedDB=="object"}catch{return!1}}function kf(){return new Promise((n,t)=>{try{let e=!0,i="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(i);r.onsuccess=()=>{r.result.close(),e||self.indexedDB.deleteDatabase(i),n(!0)},r.onupgradeneeded=()=>{e=!1},r.onerror=()=>{var s;t(((s=r.error)===null||s===void 0?void 0:s.message)||"")}}catch(e){t(e)}})}var _y="FirebaseError",Qe=class n extends Error{constructor(t,e,i){super(e),this.code=t,this.customData=i,this.name=_y,Object.setPrototypeOf(this,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Ot.prototype.create)}},Ot=class{constructor(t,e,i){this.service=t,this.serviceName=e,this.errors=i}create(t,...e){let i=e[0]||{},r=`${this.service}/${t}`,s=this.errors[t],o=s?vy(s,i):"Error",c=`${this.serviceName}: ${o} (${r}).`;return new Qe(r,c,i)}};function vy(n,t){return n.replace(yy,(e,i)=>{let r=t[i];return r!=null?String(r):`<${i}?>`})}var yy=/\{\$([^}]+)}/g;function xf(n){for(let t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!1;return!0}function ai(n,t){if(n===t)return!0;let e=Object.keys(n),i=Object.keys(t);for(let r of e){if(!i.includes(r))return!1;let s=n[r],o=t[r];if(Ef(s)&&Ef(o)){if(!ai(s,o))return!1}else if(s!==o)return!1}for(let r of i)if(!e.includes(r))return!1;return!0}function Ef(n){return n!==null&&typeof n=="object"}function ci(n){let t=[];for(let[e,i]of Object.entries(n))Array.isArray(i)?i.forEach(r=>{t.push(encodeURIComponent(e)+"="+encodeURIComponent(r))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(i));return t.length?"&"+t.join("&"):""}function Ff(n,t){let e=new Vc(n,t);return e.subscribe.bind(e)}var Vc=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(i=>{this.error(i)})}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,i){let r;if(t===void 0&&e===void 0&&i===void 0)throw new Error("Missing Observer.");by(t,["next","error","complete"])?r=t:r={next:t,error:e,complete:i},r.next===void 0&&(r.next=Lc),r.error===void 0&&(r.error=Lc),r.complete===void 0&&(r.complete=Lc);let s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch{}}),this.observers.push(r),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(i){typeof console<"u"&&console.error&&console.error(i)}})}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 by(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 Lc(){}var bO=4*60*60*1e3;function Tn(n){return n&&n._delegate?n._delegate:n}var at=class{constructor(t,e,i){this.name=t,this.instanceFactory=e,this.type=i,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 En="[DEFAULT]";var zc=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 i=new Ws;if(this.instancesDeferred.set(e,i),this.isInitialized(e)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:e});r&&i.resolve(r)}catch{}}return this.instancesDeferred.get(e).promise}getImmediate(t){var e;let i=this.normalizeInstanceIdentifier(t?.identifier),r=(e=t?.optional)!==null&&e!==void 0?e:!1;if(this.isInitialized(i)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:i})}catch(s){if(r)return null;throw s}else{if(r)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(Dy(t))try{this.getOrInitializeService({instanceIdentifier:En})}catch{}for(let[e,i]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(e);try{let s=this.getOrInitializeService({instanceIdentifier:r});i.resolve(s)}catch{}}}}clearInstance(t=En){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}delete(){return h(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=En){return this.instances.has(t)}getOptions(t=En){return this.instancesOptions.get(t)||{}}initialize(t={}){let{options:e={}}=t,i=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(i))throw Error(`${this.name}(${i}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:i,options:e});for(let[s,o]of this.instancesDeferred.entries()){let c=this.normalizeInstanceIdentifier(s);i===c&&o.resolve(r)}return r}onInit(t,e){var i;let r=this.normalizeInstanceIdentifier(e),s=(i=this.onInitCallbacks.get(r))!==null&&i!==void 0?i:new Set;s.add(t),this.onInitCallbacks.set(r,s);let o=this.instances.get(r);return o&&t(o,r),()=>{s.delete(t)}}invokeOnInitCallbacks(t,e){let i=this.onInitCallbacks.get(e);if(i)for(let r of i)try{r(t,e)}catch{}}getOrInitializeService({instanceIdentifier:t,options:e={}}){let i=this.instances.get(t);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:wy(t),options:e}),this.instances.set(t,i),this.instancesOptions.set(t,e),this.invokeOnInitCallbacks(i,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,i)}catch{}return i||null}normalizeInstanceIdentifier(t=En){return this.component?this.component.multipleInstances?t:En:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function wy(n){return n===En?void 0:n}function Dy(n){return n.instantiationMode==="EAGER"}var qs=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 zc(t,this);return this.providers.set(t,e),e}getProviders(){return Array.from(this.providers.values())}};var Ty=[],j=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}(j||{}),Ey={debug:j.DEBUG,verbose:j.VERBOSE,info:j.INFO,warn:j.WARN,error:j.ERROR,silent:j.SILENT},Cy=j.INFO,Sy={[j.DEBUG]:"log",[j.VERBOSE]:"log",[j.INFO]:"info",[j.WARN]:"warn",[j.ERROR]:"error"},Iy=(n,t,...e)=>{if(t<n.logLevel)return;let i=new Date().toISOString(),r=Sy[t];if(r)console[r](`[${i}] ${n.name}:`,...e);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)},li=class{constructor(t){this.name=t,this._logLevel=Cy,this._logHandler=Iy,this._userLogHandler=null,Ty.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in j))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?Ey[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,j.DEBUG,...t),this._logHandler(this,j.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,j.VERBOSE,...t),this._logHandler(this,j.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,j.INFO,...t),this._logHandler(this,j.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,j.WARN,...t),this._logHandler(this,j.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,j.ERROR,...t),this._logHandler(this,j.ERROR,...t)}};var Ay=(n,t)=>t.some(e=>n instanceof e),Lf,Bf;function Oy(){return Lf||(Lf=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Ry(){return Bf||(Bf=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Vf=new WeakMap,qc=new WeakMap,Uf=new WeakMap,Wc=new WeakMap,Kc=new WeakMap;function My(n){let t=new Promise((e,i)=>{let r=()=>{n.removeEventListener("success",s),n.removeEventListener("error",o)},s=()=>{e(ct(n.result)),r()},o=()=>{i(n.error),r()};n.addEventListener("success",s),n.addEventListener("error",o)});return t.then(e=>{e instanceof IDBCursor&&Vf.set(e,n)}).catch(()=>{}),Kc.set(t,n),t}function Py(n){if(qc.has(n))return;let t=new Promise((e,i)=>{let r=()=>{n.removeEventListener("complete",s),n.removeEventListener("error",o),n.removeEventListener("abort",o)},s=()=>{e(),r()},o=()=>{i(n.error||new DOMException("AbortError","AbortError")),r()};n.addEventListener("complete",s),n.addEventListener("error",o),n.addEventListener("abort",o)});qc.set(n,t)}var Jc={get(n,t,e){if(n instanceof IDBTransaction){if(t==="done")return qc.get(n);if(t==="objectStoreNames")return n.objectStoreNames||Uf.get(n);if(t==="store")return e.objectStoreNames[1]?void 0:e.objectStore(e.objectStoreNames[0])}return ct(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 jf(n){Jc=n(Jc)}function Ny(n){return n===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...e){let i=n.call(Js(this),t,...e);return Uf.set(i,t.sort?t.sort():[t]),ct(i)}:Ry().includes(n)?function(...t){return n.apply(Js(this),t),ct(Vf.get(this))}:function(...t){return ct(n.apply(Js(this),t))}}function ky(n){return typeof n=="function"?Ny(n):(n instanceof IDBTransaction&&Py(n),Ay(n,Oy())?new Proxy(n,Jc):n)}function ct(n){if(n instanceof IDBRequest)return My(n);if(Wc.has(n))return Wc.get(n);let t=ky(n);return t!==n&&(Wc.set(n,t),Kc.set(t,n)),t}var Js=n=>Kc.get(n);function Hf(n,t,{blocked:e,upgrade:i,blocking:r,terminated:s}={}){let o=indexedDB.open(n,t),c=ct(o);return i&&o.addEventListener("upgradeneeded",a=>{i(ct(o.result),a.oldVersion,a.newVersion,ct(o.transaction),a)}),e&&o.addEventListener("blocked",a=>e(a.oldVersion,a.newVersion,a)),c.then(a=>{s&&a.addEventListener("close",()=>s()),r&&a.addEventListener("versionchange",l=>r(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}var xy=["get","getKey","getAll","getAllKeys","count"],Fy=["put","add","delete","clear"],Yc=new Map;function $f(n,t){if(!(n instanceof IDBDatabase&&!(t in n)&&typeof t=="string"))return;if(Yc.get(t))return Yc.get(t);let e=t.replace(/FromIndex$/,""),i=t!==e,r=Fy.includes(e);if(!(e in(i?IDBIndex:IDBObjectStore).prototype)||!(r||xy.includes(e)))return;let s=function(o,...c){return h(this,null,function*(){let a=this.transaction(o,r?"readwrite":"readonly"),l=a.store;return i&&(l=l.index(c.shift())),(yield Promise.all([l[e](...c),r&&a.done]))[0]})};return Yc.set(t,s),s}jf(n=>P(m({},n),{get:(t,e,i)=>$f(t,e)||n.get(t,e,i),has:(t,e)=>!!$f(t,e)||n.has(t,e)}));var Zc=class{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(Ly(e)){let i=e.getImmediate();return`${i.library}/${i.version}`}else return null}).filter(e=>e).join(" ")}};function Ly(n){let t=n.getComponent();return t?.type==="VERSION"}var Xc="@firebase/app",Gf="0.10.13";var Rt=new li("@firebase/app"),By="@firebase/app-compat",Vy="@firebase/analytics-compat",Uy="@firebase/analytics",jy="@firebase/app-check-compat",$y="@firebase/app-check",Hy="@firebase/auth",Gy="@firebase/auth-compat",zy="@firebase/database",Wy="@firebase/data-connect",qy="@firebase/database-compat",Jy="@firebase/functions",Ky="@firebase/functions-compat",Yy="@firebase/installations",Qy="@firebase/installations-compat",Zy="@firebase/messaging",Xy="@firebase/messaging-compat",eb="@firebase/performance",tb="@firebase/performance-compat",nb="@firebase/remote-config",ib="@firebase/remote-config-compat",rb="@firebase/storage",sb="@firebase/storage-compat",ob="@firebase/firestore",ab="@firebase/vertexai-preview",cb="@firebase/firestore-compat",lb="firebase",ub="10.14.1";var el="[DEFAULT]",db={[Xc]:"fire-core",[By]:"fire-core-compat",[Uy]:"fire-analytics",[Vy]:"fire-analytics-compat",[$y]:"fire-app-check",[jy]:"fire-app-check-compat",[Hy]:"fire-auth",[Gy]:"fire-auth-compat",[zy]:"fire-rtdb",[Wy]:"fire-data-connect",[qy]:"fire-rtdb-compat",[Jy]:"fire-fn",[Ky]:"fire-fn-compat",[Yy]:"fire-iid",[Qy]:"fire-iid-compat",[Zy]:"fire-fcm",[Xy]:"fire-fcm-compat",[eb]:"fire-perf",[tb]:"fire-perf-compat",[nb]:"fire-rc",[ib]:"fire-rc-compat",[rb]:"fire-gcs",[sb]:"fire-gcs-compat",[ob]:"fire-fst",[cb]:"fire-fst-compat",[ab]:"fire-vertex","fire-js":"fire-js",[lb]:"fire-js-all"};var vr=new Map,hb=new Map,tl=new Map;function zf(n,t){try{n.container.addComponent(t)}catch(e){Rt.debug(`Component ${t.name} failed to register with FirebaseApp ${n.name}`,e)}}function ui(n){let t=n.name;if(tl.has(t))return Rt.debug(`There were multiple attempts to register component ${t}.`),!1;tl.set(t,n);for(let e of vr.values())zf(e,n);for(let e of hb.values())zf(e,n);return!0}function sl(n,t){let e=n.container.getProvider("heartbeat").getImmediate({optional:!0});return e&&e.triggerHeartbeat(),n.container.getProvider(t)}function lt(n){return n.settings!==void 0}var fb={"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."},en=new Ot("app","Firebase",fb);var nl=class{constructor(t,e,i){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},e),this._name=e.name,this._automaticDataCollectionEnabled=e.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new at("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 en.create("app-deleted",{appName:this._name})}};var di=ub;function ol(n,t={}){let e=n;typeof t!="object"&&(t={name:t});let i=Object.assign({name:el,automaticDataCollectionEnabled:!1},t),r=i.name;if(typeof r!="string"||!r)throw en.create("bad-app-name",{appName:String(r)});if(e||(e=Hc()),!e)throw en.create("no-options");let s=vr.get(r);if(s){if(ai(e,s.options)&&ai(i,s.config))return s;throw en.create("duplicate-app",{appName:r})}let o=new qs(r);for(let a of tl.values())o.addComponent(a);let c=new nl(e,i,o);return vr.set(r,c),c}function Ks(n=el){let t=vr.get(n);if(!t&&n===el&&Hc())return ol();if(!t)throw en.create("no-app",{appName:n});return t}function Ys(){return Array.from(vr.values())}function Se(n,t,e){var i;let r=(i=db[n])!==null&&i!==void 0?i:n;e&&(r+=`-${e}`);let s=r.match(/\s|\//),o=t.match(/\s|\//);if(s||o){let c=[`Unable to register library "${r}" with version "${t}":`];s&&c.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&c.push("and"),o&&c.push(`version name "${t}" contains illegal characters (whitespace or "/")`),Rt.warn(c.join(" "));return}ui(new at(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}var pb="firebase-heartbeat-database",gb=1,yr="firebase-heartbeat-store",Qc=null;function Kf(){return Qc||(Qc=Hf(pb,gb,{upgrade:(n,t)=>{switch(t){case 0:try{n.createObjectStore(yr)}catch(e){console.warn(e)}}}}).catch(n=>{throw en.create("idb-open",{originalErrorMessage:n.message})})),Qc}function mb(n){return h(this,null,function*(){try{let e=(yield Kf()).transaction(yr),i=yield e.objectStore(yr).get(Yf(n));return yield e.done,i}catch(t){if(t instanceof Qe)Rt.warn(t.message);else{let e=en.create("idb-get",{originalErrorMessage:t?.message});Rt.warn(e.message)}}})}function Wf(n,t){return h(this,null,function*(){try{let i=(yield Kf()).transaction(yr,"readwrite");yield i.objectStore(yr).put(t,Yf(n)),yield i.done}catch(e){if(e instanceof Qe)Rt.warn(e.message);else{let i=en.create("idb-set",{originalErrorMessage:e?.message});Rt.warn(i.message)}}})}function Yf(n){return`${n.name}!${n.options.appId}`}var _b=1024,vb=30*24*60*60*1e3,il=class{constructor(t){this.container=t,this._heartbeatsCache=null;let e=this.container.getProvider("app").getImmediate();this._storage=new rl(e),this._heartbeatsCachePromise=this._storage.read().then(i=>(this._heartbeatsCache=i,i))}triggerHeartbeat(){return h(this,null,function*(){var t,e;try{let r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=qf();return((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)?void 0:(this._heartbeatsCache.heartbeats.push({date:s,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{let c=new Date(o.date).valueOf();return Date.now()-c<=vb}),this._storage.overwrite(this._heartbeatsCache))}catch(i){Rt.warn(i)}})}getHeartbeatsHeader(){return h(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=qf(),{heartbeatsToSend:i,unsentEntries:r}=yb(this._heartbeatsCache.heartbeats),s=Uc(JSON.stringify({version:2,heartbeats:i}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(e){return Rt.warn(e),""}})}};function qf(){return new Date().toISOString().substring(0,10)}function yb(n,t=_b){let e=[],i=n.slice();for(let r of n){let s=e.find(o=>o.agent===r.agent);if(s){if(s.dates.push(r.date),Jf(e)>t){s.dates.pop();break}}else if(e.push({agent:r.agent,dates:[r.date]}),Jf(e)>t){e.pop();break}i=i.slice(1)}return{heartbeatsToSend:e,unsentEntries:i}}var rl=class{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return h(this,null,function*(){return Nf()?kf().then(()=>!0).catch(()=>!1):!1})}read(){return h(this,null,function*(){if(yield this._canUseIndexedDBPromise){let e=yield mb(this.app);return e?.heartbeats?e:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(t){return h(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return Wf(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:r.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return})}add(t){return h(this,null,function*(){var e;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return Wf(this.app,{lastSentHeartbeatDate:(e=t.lastSentHeartbeatDate)!==null&&e!==void 0?e:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...t.heartbeats]})}else return})}};function Jf(n){return Uc(JSON.stringify({version:2,heartbeats:n})).length}function bb(n){ui(new at("platform-logger",t=>new Zc(t),"PRIVATE")),ui(new at("heartbeat",t=>new il(t),"PRIVATE")),Se(Xc,Gf,n),Se(Xc,Gf,"esm2017"),Se("fire-js","")}bb("");var wb="firebase",Db="10.14.1";Se(wb,Db,"app");var br=new Ii("ANGULARFIRE2_VERSION");function Qf(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 cl=(n,t)=>{let e=t?[t]:Ys(),i=[];return e.forEach(r=>{r.container.getProvider(n).instances.forEach(o=>{i.includes(o)||i.push(o)})}),i},Qs=class{constructor(){return cl(Tb)}},Tb="app-check";function hi(){}var Zs=class{zone;delegate;constructor(t,e=ru){this.zone=t,this.delegate=e}now(){return this.delegate.now()}schedule(t,e,i){let r=this.zone,s=function(o){r.runGuarded(()=>{t.apply(this,[o])})};return this.delegate.schedule(s,e,i)}},al=class{zone;task=null;constructor(t){this.zone=t}call(t,e){let i=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",hi,{},hi,hi)),e.pipe(V({next:i,complete:i,error:i})).subscribe(t).add(i)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},Xs=(()=>{class n{ngZone;outsideAngular;insideAngular;constructor(e){this.ngZone=e,this.outsideAngular=e.runOutsideAngular(()=>new Zs(Zone.current)),this.insideAngular=e.run(()=>new Zs(Zone.current,iu)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(i){return new(i||n)(C(H))};static \u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function eo(){let n=globalThis.\u0275AngularFireScheduler;if(!n)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
5
+ provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return n}function Eb(n){return eo().ngZone.runOutsideAngular(()=>n())}function Cn(n){return eo().ngZone.run(()=>n())}function Cb(n){return Sb(eo())(n)}function Sb(n){return function(e){return e=e.lift(new al(n.ngZone)),e.pipe(Ao(n.outsideAngular),Io(n.insideAngular))}}var Ib=(n,t)=>function(){let i=arguments;return t&&setTimeout(()=>{t.state==="scheduled"&&t.invoke()},10),Cn(()=>n.apply(void 0,i))},fi=(n,t)=>function(){let e,i=arguments;for(let s=0;s<arguments.length;s++)typeof i[s]=="function"&&(t&&(e||=Cn(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",hi,{},hi,hi))),i[s]=Ib(i[s],e));let r=Eb(()=>n.apply(this,i));if(!t)if(r instanceof Ne){let s=eo();return r.pipe(Ao(s.outsideAngular),Io(s.insideAngular))}else return Cn(()=>r);return r instanceof Ne?r.pipe(Cb):r instanceof Promise?Cn(()=>new Promise((s,o)=>r.then(c=>Cn(()=>s(c)),c=>Cn(()=>o(c))))):typeof r=="function"&&e?function(){return setTimeout(()=>{e&&e.state==="scheduled"&&e.invoke()},10),r.apply(this,arguments)}:Cn(()=>r)};var Sn=class{constructor(t){return t}},wr=class{constructor(){return Ys()}};function Ab(n){return n&&n.length===1?n[0]:new Sn(Ks())}var ll=new O("angularfire2._apps"),Ob={provide:Sn,useFactory:Ab,deps:[[new et,ll]]},Rb={provide:wr,deps:[[new et,ll]]};function Mb(n){return(t,e)=>{let i=e.get(nt);Se("angularfire",br.full,"core"),Se("angularfire",br.full,"app"),Se("angular",$u.full,i.toString());let r=t.runOutsideAngular(()=>n(e));return new Sn(r)}}function oR(n,...t){return Ge([Ob,Rb,{provide:ll,useFactory:Mb(n),multi:!0,deps:[H,X,Xs,...t]}])}var aR=fi(ol,!0);function hp(){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 fp=hp,pp=new Ot("auth","Firebase",hp());var oo=new li("@firebase/auth");function Pb(n,...t){oo.logLevel<=j.WARN&&oo.warn(`Auth (${di}): ${n}`,...t)}function no(n,...t){oo.logLevel<=j.ERROR&&oo.error(`Auth (${di}): ${n}`,...t)}function dt(n,...t){throw Il(n,...t)}function Ze(n,...t){return Il(n,...t)}function Sl(n,t,e){let i=Object.assign(Object.assign({},fp()),{[t]:e});return new Ot("auth","Firebase",i).create(t,{appName:n.name})}function In(n){return Sl(n,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Nb(n,t,e){let i=e;if(!(t instanceof i))throw i.name!==t.constructor.name&&dt(n,"argument-error"),Sl(n,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function Il(n,...t){if(typeof n!="string"){let e=t[0],i=[...t.slice(1)];return i[0]&&(i[0].appName=n.name),n._errorFactory.create(e,...i)}return pp.create(n,...t)}function T(n,t,...e){if(!n)throw Il(t,...e)}function Mt(n){let t="INTERNAL ASSERTION FAILED: "+n;throw no(t),new Error(t)}function Nt(n,t){n||Mt(t)}function hl(){var n;return typeof self<"u"&&((n=self.location)===null||n===void 0?void 0:n.href)||""}function kb(){return Zf()==="http:"||Zf()==="https:"}function Zf(){var n;return typeof self<"u"&&((n=self.location)===null||n===void 0?void 0:n.protocol)||null}function xb(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(kb()||Rf()||"connection"in navigator)?navigator.onLine:!0}function Fb(){if(typeof navigator>"u")return null;let n=navigator;return n.languages&&n.languages[0]||n.language||null}var An=class{constructor(t,e){this.shortDelay=t,this.longDelay=e,Nt(e>t,"Short delay should be less than long delay!"),this.isMobile=Af()||Mf()}get(){return xb()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function Al(n,t){Nt(n.emulator,"Emulator should always be set here");let{url:e}=n.emulator;return t?`${e}${t.startsWith("/")?t.slice(1):t}`:e}var ao=class{static initialize(t,e,i){this.fetchImpl=t,e&&(this.headersImpl=e),i&&(this.responseImpl=i)}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;Mt("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;Mt("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;Mt("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var Lb={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 Bb=new An(3e4,6e4);function Ol(n,t){return n.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:n.tenantId}):t}function mi(s,o,c,a){return h(this,arguments,function*(n,t,e,i,r={}){return gp(n,r,()=>h(this,null,function*(){let l={},u={};i&&(t==="GET"?u=i:l={body:JSON.stringify(i)});let d=ci(Object.assign({key:n.config.apiKey},u)).slice(1),p=yield n._getAdditionalHeaders();p["Content-Type"]="application/json",n.languageCode&&(p["X-Firebase-Locale"]=n.languageCode);let g=Object.assign({method:t,headers:p},l);return Of()||(g.referrerPolicy="no-referrer"),ao.fetch()(mp(n,n.config.apiHost,e,d),g)}))})}function gp(n,t,e){return h(this,null,function*(){n._canInitEmulator=!1;let i=Object.assign(Object.assign({},Lb),t);try{let r=new fl(n),s=yield Promise.race([e(),r.promise]);r.clearNetworkTimeout();let o=yield s.json();if("needConfirmation"in o)throw to(n,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{let c=s.ok?o.errorMessage:o.error.message,[a,l]=c.split(" : ");if(a==="FEDERATED_USER_ID_ALREADY_LINKED")throw to(n,"credential-already-in-use",o);if(a==="EMAIL_EXISTS")throw to(n,"email-already-in-use",o);if(a==="USER_DISABLED")throw to(n,"user-disabled",o);let u=i[a]||a.toLowerCase().replace(/[_\s]+/g,"-");if(l)throw Sl(n,u,l);dt(n,u)}}catch(r){if(r instanceof Qe)throw r;dt(n,"network-request-failed",{message:String(r)})}})}function Vb(s,o,c,a){return h(this,arguments,function*(n,t,e,i,r={}){let l=yield mi(n,t,e,i,r);return"mfaPendingCredential"in l&&dt(n,"multi-factor-auth-required",{_serverResponse:l}),l})}function mp(n,t,e,i){let r=`${t}${e}?${i}`;return n.config.emulator?Al(n.config,r):`${n.config.apiScheme}://${r}`}var fl=class{constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((e,i)=>{this.timer=setTimeout(()=>i(Ze(this.auth,"network-request-failed")),Bb.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}};function to(n,t,e){let i={appName:n.name};e.email&&(i.email=e.email),e.phoneNumber&&(i.phoneNumber=e.phoneNumber);let r=Ze(n,t,i);return r.customData._tokenResponse=e,r}function Ub(n,t){return h(this,null,function*(){return mi(n,"POST","/v1/accounts:delete",t)})}function _p(n,t){return h(this,null,function*(){return mi(n,"POST","/v1/accounts:lookup",t)})}function Dr(n){if(n)try{let t=new Date(Number(n));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}function Rl(n,t=!1){return h(this,null,function*(){let e=Tn(n),i=yield e.getIdToken(t),r=Ml(i);T(r&&r.exp&&r.auth_time&&r.iat,e.auth,"internal-error");let s=typeof r.firebase=="object"?r.firebase:void 0,o=s?.sign_in_provider;return{claims:r,token:i,authTime:Dr(ul(r.auth_time)),issuedAtTime:Dr(ul(r.iat)),expirationTime:Dr(ul(r.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}})}function ul(n){return Number(n)*1e3}function Ml(n){let[t,e,i]=n.split(".");if(t===void 0||e===void 0||i===void 0)return no("JWT malformed, contained fewer than 3 sections"),null;try{let r=jc(e);return r?JSON.parse(r):(no("Failed to decode base64 JWT payload"),null)}catch(r){return no("Caught error parsing JWT payload as JSON",r?.toString()),null}}function Xf(n){let t=Ml(n);return T(t,"internal-error"),T(typeof t.exp<"u","internal-error"),T(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}function Er(n,t,e=!1){return h(this,null,function*(){if(e)return t;try{return yield t}catch(i){throw i instanceof Qe&&jb(i)&&n.auth.currentUser===n&&(yield n.auth.signOut()),i}})}function jb({code:n}){return n==="auth/user-disabled"||n==="auth/user-token-expired"}var pl=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 i=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),i}else{this.errorBackoff=3e4;let r=((e=this.user.stsTokenManager.expirationTime)!==null&&e!==void 0?e:0)-Date.now()-3e5;return Math.max(0,r)}}schedule(t=!1){if(!this.isRunning)return;let e=this.getInterval(t);this.timerId=setTimeout(()=>h(this,null,function*(){yield this.iteration()}),e)}iteration(){return h(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(t){t?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}};var Cr=class{constructor(t,e){this.createdAt=t,this.lastLoginAt=e,this._initializeTime()}_initializeTime(){this.lastSignInTime=Dr(this.lastLoginAt),this.creationTime=Dr(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};function co(n){return h(this,null,function*(){var t;let e=n.auth,i=yield n.getIdToken(),r=yield Er(n,_p(e,{idToken:i}));T(r?.users.length,e,"internal-error");let s=r.users[0];n._notifyReloadListener(s);let o=!((t=s.providerUserInfo)===null||t===void 0)&&t.length?vp(s.providerUserInfo):[],c=$b(n.providerData,o),a=n.isAnonymous,l=!(n.email&&s.passwordHash)&&!c?.length,u=a?l:!1,d={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:c,metadata:new Cr(s.createdAt,s.lastLoginAt),isAnonymous:u};Object.assign(n,d)})}function Pl(n){return h(this,null,function*(){let t=Tn(n);yield co(t),yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)})}function $b(n,t){return[...n.filter(i=>!t.some(r=>r.providerId===i.providerId)),...t]}function vp(n){return n.map(t=>{var{providerId:e}=t,i=Lr(t,["providerId"]);return{providerId:e,uid:i.rawId||"",displayName:i.displayName||null,email:i.email||null,phoneNumber:i.phoneNumber||null,photoURL:i.photoUrl||null}})}function Hb(n,t){return h(this,null,function*(){let e=yield gp(n,{},()=>h(this,null,function*(){let i=ci({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:s}=n.config,o=mp(n,r,"/v1/token",`key=${s}`),c=yield n._getAdditionalHeaders();return c["Content-Type"]="application/x-www-form-urlencoded",ao.fetch()(o,{method:"POST",headers:c,body:i})}));return{accessToken:e.access_token,expiresIn:e.expires_in,refreshToken:e.refresh_token}})}function Gb(n,t){return h(this,null,function*(){return mi(n,"POST","/v2/accounts:revokeToken",Ol(n,t))})}var Tr=class n{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){T(t.idToken,"internal-error"),T(typeof t.idToken<"u","internal-error"),T(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){T(t.length!==0,"internal-error");let e=Xf(t);this.updateTokensAndExpiration(t,null,e)}getToken(t,e=!1){return h(this,null,function*(){return!e&&this.accessToken&&!this.isExpired?this.accessToken:(T(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 h(this,null,function*(){let{accessToken:i,refreshToken:r,expiresIn:s}=yield Hb(t,e);this.updateTokensAndExpiration(i,r,Number(s))})}updateTokensAndExpiration(t,e,i){this.refreshToken=e||null,this.accessToken=t||null,this.expirationTime=Date.now()+i*1e3}static fromJSON(t,e){let{refreshToken:i,accessToken:r,expirationTime:s}=e,o=new n;return i&&(T(typeof i=="string","internal-error",{appName:t}),o.refreshToken=i),r&&(T(typeof r=="string","internal-error",{appName:t}),o.accessToken=r),s&&(T(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 Mt("not implemented")}};function tn(n,t){T(typeof n=="string"||typeof n>"u","internal-error",{appName:t})}var gi=class n{constructor(t){var{uid:e,auth:i,stsTokenManager:r}=t,s=Lr(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new pl(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=i,this.stsTokenManager=r,this.accessToken=r.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 Cr(s.createdAt||void 0,s.lastLoginAt||void 0)}getIdToken(t){return h(this,null,function*(){let e=yield Er(this,this.stsTokenManager.getToken(this.auth,t));return T(e,this.auth,"internal-error"),this.accessToken!==e&&(this.accessToken=e,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),e})}getIdTokenResult(t){return Rl(this,t)}reload(){return Pl(this)}_assign(t){this!==t&&(T(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){T(!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 h(this,null,function*(){let i=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),i=!0),e&&(yield co(this)),yield this.auth._persistUserIfCurrent(this),i&&this.auth._notifyListenersIfCurrent(this)})}delete(){return h(this,null,function*(){if(lt(this.auth.app))return Promise.reject(In(this.auth));let t=yield this.getIdToken();return yield Er(this,Ub(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 i,r,s,o,c,a,l,u;let d=(i=e.displayName)!==null&&i!==void 0?i:void 0,p=(r=e.email)!==null&&r!==void 0?r:void 0,g=(s=e.phoneNumber)!==null&&s!==void 0?s:void 0,b=(o=e.photoURL)!==null&&o!==void 0?o:void 0,v=(c=e.tenantId)!==null&&c!==void 0?c:void 0,_=(a=e._redirectEventId)!==null&&a!==void 0?a:void 0,S=(l=e.createdAt)!==null&&l!==void 0?l:void 0,k=(u=e.lastLoginAt)!==null&&u!==void 0?u:void 0,{uid:D,emailVerified:E,isAnonymous:R,providerData:M,stsTokenManager:B}=e;T(D&&B,t,"internal-error");let Z=Tr.fromJSON(this.name,B);T(typeof D=="string",t,"internal-error"),tn(d,t.name),tn(p,t.name),T(typeof E=="boolean",t,"internal-error"),T(typeof R=="boolean",t,"internal-error"),tn(g,t.name),tn(b,t.name),tn(v,t.name),tn(_,t.name),tn(S,t.name),tn(k,t.name);let W=new n({uid:D,auth:t,email:p,emailVerified:E,displayName:d,isAnonymous:R,photoURL:b,phoneNumber:g,tenantId:v,stsTokenManager:Z,createdAt:S,lastLoginAt:k});return M&&Array.isArray(M)&&(W.providerData=M.map(J=>Object.assign({},J))),_&&(W._redirectEventId=_),W}static _fromIdTokenResponse(t,e,i=!1){return h(this,null,function*(){let r=new Tr;r.updateFromServerResponse(e);let s=new n({uid:e.localId,auth:t,stsTokenManager:r,isAnonymous:i});return yield co(s),s})}static _fromGetAccountInfoResponse(t,e,i){return h(this,null,function*(){let r=e.users[0];T(r.localId!==void 0,"internal-error");let s=r.providerUserInfo!==void 0?vp(r.providerUserInfo):[],o=!(r.email&&r.passwordHash)&&!s?.length,c=new Tr;c.updateFromIdToken(i);let a=new n({uid:r.localId,auth:t,stsTokenManager:c,isAnonymous:o}),l={uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:s,metadata:new Cr(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!s?.length};return Object.assign(a,l),a})}};var ep=new Map;function Pt(n){Nt(n instanceof Function,"Expected a class definition");let t=ep.get(n);return t?(Nt(t instanceof n,"Instance stored in cache mismatched with class"),t):(t=new n,ep.set(n,t),t)}var zb=(()=>{class n{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return h(this,null,function*(){return!0})}_set(e,i){return h(this,null,function*(){this.storage[e]=i})}_get(e){return h(this,null,function*(){let i=this.storage[e];return i===void 0?null:i})}_remove(e){return h(this,null,function*(){delete this.storage[e]})}_addListener(e,i){}_removeListener(e,i){}}return n.type="NONE",n})(),gl=zb;function io(n,t,e){return`firebase:${n}:${t}:${e}`}var lo=class n{constructor(t,e,i){this.persistence=t,this.auth=e,this.userKey=i;let{config:r,name:s}=this.auth;this.fullUserKey=io(this.userKey,r.apiKey,s),this.fullPersistenceKey=io("persistence",r.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 h(this,null,function*(){let t=yield this.persistence._get(this.fullUserKey);return t?gi._fromJSON(this.auth,t):null})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(t){return h(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,i="authUser"){return h(this,null,function*(){if(!e.length)return new n(Pt(gl),t,i);let r=(yield Promise.all(e.map(l=>h(this,null,function*(){if(yield l._isAvailable())return l})))).filter(l=>l),s=r[0]||Pt(gl),o=io(i,t.config.apiKey,t.name),c=null;for(let l of e)try{let u=yield l._get(o);if(u){let d=gi._fromJSON(t,u);l!==s&&(c=d),s=l;break}}catch{}let a=r.filter(l=>l._shouldAllowMigration);return!s._shouldAllowMigration||!a.length?new n(s,t,i):(s=a[0],c&&(yield s._set(o,c.toJSON())),yield Promise.all(e.map(l=>h(this,null,function*(){if(l!==s)try{yield l._remove(o)}catch{}}))),new n(s,t,i))})}};function tp(n){let t=n.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Dp(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(yp(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Ep(t))return"Blackberry";if(Cp(t))return"Webos";if(bp(t))return"Safari";if((t.includes("chrome/")||wp(t))&&!t.includes("edge/"))return"Chrome";if(Tp(t))return"Android";{let e=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,i=n.match(e);if(i?.length===2)return i[1]}return"Other"}function yp(n=pe()){return/firefox\//i.test(n)}function bp(n=pe()){let t=n.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function wp(n=pe()){return/crios\//i.test(n)}function Dp(n=pe()){return/iemobile/i.test(n)}function Tp(n=pe()){return/android/i.test(n)}function Ep(n=pe()){return/blackberry/i.test(n)}function Cp(n=pe()){return/webos/i.test(n)}function Nl(n=pe()){return/iphone|ipad|ipod/i.test(n)||/macintosh/i.test(n)&&/mobile/i.test(n)}function Wb(n=pe()){var t;return Nl(n)&&!!(!((t=window.navigator)===null||t===void 0)&&t.standalone)}function qb(){return Pf()&&document.documentMode===10}function Sp(n=pe()){return Nl(n)||Tp(n)||Cp(n)||Ep(n)||/windows phone/i.test(n)||Dp(n)}function Ip(n,t=[]){let e;switch(n){case"Browser":e=tp(pe());break;case"Worker":e=`${tp(pe())}-${n}`;break;default:e=n}let i=t.length?t.join(","):"FirebaseCore-web";return`${e}/JsCore/${di}/${i}`}var ml=class{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,e){let i=s=>new Promise((o,c)=>{try{let a=t(s);o(a)}catch(a){c(a)}});i.onAbort=e,this.queue.push(i);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}runMiddleware(t){return h(this,null,function*(){if(this.auth.currentUser===t)return;let e=[];try{for(let i of this.queue)yield i(t),i.onAbort&&e.push(i.onAbort)}catch(i){e.reverse();for(let r of e)try{r()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:i?.message})}})}};function Jb(e){return h(this,arguments,function*(n,t={}){return mi(n,"GET","/v2/passwordPolicy",Ol(n,t))})}var Kb=6,_l=class{constructor(t){var e,i,r,s;let o=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(e=o.minPasswordLength)!==null&&e!==void 0?e:Kb,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=(r=(i=t.allowedNonAlphanumericCharacters)===null||i===void 0?void 0:i.join(""))!==null&&r!==void 0?r:"",this.forceUpgradeOnSignin=(s=t.forceUpgradeOnSignin)!==null&&s!==void 0?s:!1,this.schemaVersion=t.schemaVersion}validatePassword(t){var e,i,r,s,o,c;let a={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,a),this.validatePasswordCharacterOptions(t,a),a.isValid&&(a.isValid=(e=a.meetsMinPasswordLength)!==null&&e!==void 0?e:!0),a.isValid&&(a.isValid=(i=a.meetsMaxPasswordLength)!==null&&i!==void 0?i:!0),a.isValid&&(a.isValid=(r=a.containsLowercaseLetter)!==null&&r!==void 0?r:!0),a.isValid&&(a.isValid=(s=a.containsUppercaseLetter)!==null&&s!==void 0?s:!0),a.isValid&&(a.isValid=(o=a.containsNumericCharacter)!==null&&o!==void 0?o:!0),a.isValid&&(a.isValid=(c=a.containsNonAlphanumericCharacter)!==null&&c!==void 0?c:!0),a}validatePasswordLengthOptions(t,e){let i=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;i&&(e.meetsMinPasswordLength=t.length>=i),r&&(e.meetsMaxPasswordLength=t.length<=r)}validatePasswordCharacterOptions(t,e){this.updatePasswordCharacterOptionsStatuses(e,!1,!1,!1,!1);let i;for(let r=0;r<t.length;r++)i=t.charAt(r),this.updatePasswordCharacterOptionsStatuses(e,i>="a"&&i<="z",i>="A"&&i<="Z",i>="0"&&i<="9",this.allowedNonAlphanumericCharacters.includes(i))}updatePasswordCharacterOptionsStatuses(t,e,i,r,s){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=e)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=i)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=s))}};var vl=class{constructor(t,e,i,r){this.app=t,this.heartbeatServiceProvider=e,this.appCheckServiceProvider=i,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new uo(this),this.idTokenSubscription=new uo(this),this.beforeStateQueue=new ml(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=pp,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(t,e){return e&&(this._popupRedirectResolver=Pt(e)),this._initializationPromise=this.queue(()=>h(this,null,function*(){var i,r;if(!this._deleted&&(this.persistenceManager=yield lo.create(this,t),!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=((r=this.currentUser)===null||r===void 0?void 0:r.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return h(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 h(this,null,function*(){try{let e=yield _p(this,{idToken:t}),i=yield gi._fromGetAccountInfoResponse(this,e,t);yield this.directlySetCurrentUser(i)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return h(this,null,function*(){var e;if(lt(this.app)){let o=this.app.settings.authIdToken;return o?new Promise(c=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(c,c))}):this.directlySetCurrentUser(null)}let i=yield this.assertedPersistence.getCurrentUser(),r=i,s=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();let o=(e=this.redirectUser)===null||e===void 0?void 0:e._redirectEventId,c=r?._redirectEventId,a=yield this.tryRedirectSignIn(t);(!o||o===c)&&a?.user&&(r=a.user,s=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(s)try{yield this.beforeStateQueue.runMiddleware(r)}catch(o){r=i,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return T(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)})}tryRedirectSignIn(t){return h(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 h(this,null,function*(){try{yield co(t)}catch(e){if(e?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=Fb()}_delete(){return h(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return h(this,null,function*(){if(lt(this.app))return Promise.reject(In(this));let e=t?Tn(t):null;return e&&T(e.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(e&&e._clone(this))})}_updateCurrentUser(t,e=!1){return h(this,null,function*(){if(!this._deleted)return t&&T(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),e||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>h(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return h(this,null,function*(){return lt(this.app)?Promise.reject(In(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return lt(this.app)?Promise.reject(In(this)):this.queue(()=>h(this,null,function*(){yield this.assertedPersistence.setPersistence(Pt(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return h(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 h(this,null,function*(){let t=yield Jb(this),e=new _l(t);this.tenantId===null?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new Ot("auth","Firebase",t())}onAuthStateChanged(t,e,i){return this.registerStateListener(this.authStateSubscription,t,e,i)}beforeAuthStateChanged(t,e){return this.beforeStateQueue.pushCallback(t,e)}onIdTokenChanged(t,e,i){return this.registerStateListener(this.idTokenSubscription,t,e,i)}authStateReady(){return new Promise((t,e)=>{if(this.currentUser)t();else{let i=this.onAuthStateChanged(()=>{i(),t()},e)}})}revokeAccessToken(t){return h(this,null,function*(){if(this.currentUser){let e=yield this.currentUser.getIdToken(),i={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:e};this.tenantId!=null&&(i.tenantId=this.tenantId),yield Gb(this,i)}})}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 h(this,null,function*(){let i=yield this.getOrInitRedirectPersistenceManager(e);return t===null?i.removeCurrentUser():i.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return h(this,null,function*(){if(!this.redirectPersistenceManager){let e=t&&Pt(t)||this._popupRedirectResolver;T(e,this,"argument-error"),this.redirectPersistenceManager=yield lo.create(this,[Pt(e._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return h(this,null,function*(){var e,i;return this._isInitialized&&(yield this.queue(()=>h(this,null,function*(){}))),((e=this._currentUser)===null||e===void 0?void 0:e._redirectEventId)===t?this._currentUser:((i=this.redirectUser)===null||i===void 0?void 0:i._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return h(this,null,function*(){if(t===this.currentUser)return this.queue(()=>h(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 i=(e=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&e!==void 0?e:null;this.lastNotifiedUid!==i&&(this.lastNotifiedUid=i,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,e,i,r){if(this._deleted)return()=>{};let s=typeof e=="function"?e:e.next.bind(e),o=!1,c=this._isInitialized?Promise.resolve():this._initializationPromise;if(T(c,this,"internal-error"),c.then(()=>{o||s(this.currentUser)}),typeof e=="function"){let a=t.addObserver(e,i,r);return()=>{o=!0,a()}}else{let a=t.addObserver(e);return()=>{o=!0,a()}}}directlySetCurrentUser(t){return h(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 T(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Ip(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return h(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 i=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();i&&(e["X-Firebase-Client"]=i);let r=yield this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e})}_getAppCheckToken(){return h(this,null,function*(){var t;let e=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return e?.error&&Pb(`Error while retrieving App Check token: ${e.error}`),e?.token})}};function yo(n){return Tn(n)}var uo=class{constructor(t){this.auth=t,this.observer=null,this.addObserver=Ff(e=>this.observer=e)}get next(){return T(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var kl={loadJS(){return h(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Yb(n){kl=n}function Qb(n){return kl.loadJS(n)}function Zb(){return kl.gapiScript}function Ap(n){return`__${n}${Math.floor(Math.random()*1e6)}`}function xl(n,t){let e=sl(n,"auth");if(e.isInitialized()){let r=e.getImmediate(),s=e.getOptions();if(ai(s,t??{}))return r;dt(r,"already-initialized")}return e.initialize({options:t})}function Xb(n,t){let e=t?.persistence||[],i=(Array.isArray(e)?e:[e]).map(Pt);t?.errorMap&&n._updateErrorMap(t.errorMap),n._initializeWithPersistence(i,t?.popupRedirectResolver)}function Fl(n,t,e){let i=yo(n);T(i._canInitEmulator,i,"emulator-config-failed"),T(/^https?:\/\//.test(t),i,"invalid-emulator-scheme");let r=!!e?.disableWarnings,s=Op(t),{host:o,port:c}=e1(t),a=c===null?"":`:${c}`;i.config.emulator={url:`${s}//${o}${a}/`},i.settings.appVerificationDisabledForTesting=!0,i.emulatorConfig=Object.freeze({host:o,port:c,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:r})}),r||t1()}function Op(n){let t=n.indexOf(":");return t<0?"":n.substr(0,t+1)}function e1(n){let t=Op(n),e=/(\/\/)?([^?#/]+)/.exec(n.substr(t.length));if(!e)return{host:"",port:null};let i=e[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(i);if(r){let s=r[1];return{host:s,port:np(i.substr(s.length+1))}}else{let[s,o]=i.split(":");return{host:s,port:np(o)}}}function np(n){if(!n)return null;let t=Number(n);return isNaN(t)?null:t}function t1(){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 Sr=class{constructor(t,e){this.providerId=t,this.signInMethod=e}toJSON(){return Mt("not implemented")}_getIdTokenResponse(t){return Mt("not implemented")}_linkToIdToken(t,e){return Mt("not implemented")}_getReauthenticationResolver(t){return Mt("not implemented")}};function pi(n,t){return h(this,null,function*(){return Vb(n,"POST","/v1/accounts:signInWithIdp",Ol(n,t))})}var n1="http://localhost",ho=class n extends Sr{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):dt("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:i,signInMethod:r}=e,s=Lr(e,["providerId","signInMethod"]);if(!i||!r)return null;let o=new n(i,r);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 pi(t,e)}_linkToIdToken(t,e){let i=this.buildRequest();return i.idToken=e,pi(t,i)}_getReauthenticationResolver(t){let e=this.buildRequest();return e.autoCreate=!1,pi(t,e)}buildRequest(){let t={requestUri:n1,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=ci(e)}return t}};var Ir=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 fo=class extends Ir{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}};var Rr=(()=>{class n extends fo{constructor(){super("google.com"),this.addScope("profile")}static credential(e,i){return ho._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:i})}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:i,oauthAccessToken:r}=e;if(!i&&!r)return null;try{return n.credential(i,r)}catch{return null}}}n.GOOGLE_SIGN_IN_METHOD="google.com",n.PROVIDER_ID="google.com";return n})();var Ar=class n{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,e,i,r=!1){return h(this,null,function*(){let s=yield gi._fromIdTokenResponse(t,i,r),o=ip(i);return new n({user:s,providerId:o,_tokenResponse:i,operationType:e})})}static _forOperation(t,e,i){return h(this,null,function*(){yield t._updateTokensIfNecessary(i,!0);let r=ip(i);return new n({user:t,providerId:r,_tokenResponse:i,operationType:e})})}};function ip(n){return n.providerId?n.providerId:"phoneNumber"in n?"phone":null}var yl=class n extends Qe{constructor(t,e,i,r){var s;super(e.code,e.message),this.operationType=i,this.user=r,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:i}}static _fromErrorAndOperation(t,e,i,r){return new n(t,e,i,r)}};function Rp(n,t,e,i){return(t==="reauthenticate"?e._getReauthenticationResolver(n):e._getIdTokenResponse(n)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?yl._fromErrorAndOperation(n,s,t,i):s})}function i1(n,t,e=!1){return h(this,null,function*(){let i=yield Er(n,t._linkToIdToken(n.auth,yield n.getIdToken()),e);return Ar._forOperation(n,"link",i)})}function r1(n,t,e=!1){return h(this,null,function*(){let{auth:i}=n;if(lt(i.app))return Promise.reject(In(i));let r="reauthenticate";try{let s=yield Er(n,Rp(i,r,t,n),e);T(s.idToken,i,"internal-error");let o=Ml(s.idToken);T(o,i,"internal-error");let{sub:c}=o;return T(n.uid===c,i,"user-mismatch"),Ar._forOperation(n,r,s)}catch(s){throw s?.code==="auth/user-not-found"&&dt(i,"user-mismatch"),s}})}function s1(n,t,e=!1){return h(this,null,function*(){if(lt(n.app))return Promise.reject(In(n));let i="signIn",r=yield Rp(n,i,t),s=yield Ar._fromIdTokenResponse(n,i,r);return e||(yield n._updateCurrentUser(s.user)),s})}function Mr(n,t,e,i){return Tn(n).onIdTokenChanged(t,e,i)}function Ll(n,t,e){return Tn(n).beforeAuthStateChanged(t,e)}var po="__sak";var go=class{constructor(t,e){this.storageRetriever=t,this.type=e}_isAvailable(){try{return this.storage?(this.storage.setItem(po,"1"),this.storage.removeItem(po),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 o1=1e3,a1=10,c1=(()=>{class n extends go{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,i)=>this.onStorageEvent(e,i),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Sp(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let i of Object.keys(this.listeners)){let r=this.storage.getItem(i),s=this.localCache[i];r!==s&&e(i,s,r)}}onStorageEvent(e,i=!1){if(!e.key){this.forAllChangedKeys((c,a,l)=>{this.notifyListeners(c,l)});return}let r=e.key;i?this.detachListener():this.stopPolling();let s=()=>{let c=this.storage.getItem(r);!i&&this.localCache[r]===c||this.notifyListeners(r,c)},o=this.storage.getItem(r);qb()&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(s,a1):s()}notifyListeners(e,i){this.localCache[e]=i;let r=this.listeners[e];if(r)for(let s of Array.from(r))s(i&&JSON.parse(i))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,i,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:i,newValue:r}),!0)})},o1)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,i){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(i)}_removeListener(e,i){this.listeners[e]&&(this.listeners[e].delete(i),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(e,i){return h(this,null,function*(){yield cn(n.prototype,this,"_set").call(this,e,i),this.localCache[e]=JSON.stringify(i)})}_get(e){return h(this,null,function*(){let i=yield cn(n.prototype,this,"_get").call(this,e);return this.localCache[e]=JSON.stringify(i),i})}_remove(e){return h(this,null,function*(){yield cn(n.prototype,this,"_remove").call(this,e),delete this.localCache[e]})}}return n.type="LOCAL",n})(),Mp=c1;var l1=(()=>{class n extends go{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,i){}_removeListener(e,i){}}return n.type="SESSION",n})(),Bl=l1;function u1(n){return Promise.all(n.map(t=>h(this,null,function*(){try{return{fulfilled:!0,value:yield t}}catch(e){return{fulfilled:!1,reason:e}}})))}var d1=(()=>{class n{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let i=this.receivers.find(s=>s.isListeningto(e));if(i)return i;let r=new n(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}handleEvent(e){return h(this,null,function*(){let i=e,{eventId:r,eventType:s,data:o}=i.data,c=this.handlersMap[s];if(!c?.size)return;i.ports[0].postMessage({status:"ack",eventId:r,eventType:s});let a=Array.from(c).map(u=>h(this,null,function*(){return u(i.origin,o)})),l=yield u1(a);i.ports[0].postMessage({status:"done",eventId:r,eventType:s,response:l})})}_subscribe(e,i){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(i)}_unsubscribe(e,i){this.handlersMap[e]&&i&&this.handlersMap[e].delete(i),(!i||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 Vl(n="",t=10){let e="";for(let i=0;i<t;i++)e+=Math.floor(Math.random()*10);return n+e}var bl=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,i=50){return h(this,null,function*(){let r=typeof MessageChannel<"u"?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let s,o;return new Promise((c,a)=>{let l=Vl("",20);r.port1.start();let u=setTimeout(()=>{a(new Error("unsupported_event"))},i);o={messageChannel:r,onMessage(d){let p=d;if(p.data.eventId===l)switch(p.data.status){case"ack":clearTimeout(u),s=setTimeout(()=>{a(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),c(p.data.response);break;default:clearTimeout(u),clearTimeout(s),a(new Error("invalid_response"));break}}},this.handlers.add(o),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:t,eventId:l,data:e},[r.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})})}};function ut(){return window}function h1(n){ut().location.href=n}function Pp(){return typeof ut().WorkerGlobalScope<"u"&&typeof ut().importScripts=="function"}function f1(){return h(this,null,function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})}function p1(){var n;return((n=navigator?.serviceWorker)===null||n===void 0?void 0:n.controller)||null}function g1(){return Pp()?self:null}var Np="firebaseLocalStorageDb",m1=1,mo="firebaseLocalStorage",kp="fbase_key",On=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 bo(n,t){return n.transaction([mo],t?"readwrite":"readonly").objectStore(mo)}function _1(){let n=indexedDB.deleteDatabase(Np);return new On(n).toPromise()}function wl(){let n=indexedDB.open(Np,m1);return new Promise((t,e)=>{n.addEventListener("error",()=>{e(n.error)}),n.addEventListener("upgradeneeded",()=>{let i=n.result;try{i.createObjectStore(mo,{keyPath:kp})}catch(r){e(r)}}),n.addEventListener("success",()=>h(this,null,function*(){let i=n.result;i.objectStoreNames.contains(mo)?t(i):(i.close(),yield _1(),t(yield wl()))}))})}function rp(n,t,e){return h(this,null,function*(){let i=bo(n,!0).put({[kp]:t,value:e});return new On(i).toPromise()})}function v1(n,t){return h(this,null,function*(){let e=bo(n,!1).get(t),i=yield new On(e).toPromise();return i===void 0?null:i.value})}function sp(n,t){let e=bo(n,!0).delete(t);return new On(e).toPromise()}var y1=800,b1=3,w1=(()=>{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 h(this,null,function*(){return this.db?this.db:(this.db=yield wl(),this.db)})}_withRetries(e){return h(this,null,function*(){let i=0;for(;;)try{let r=yield this._openDb();return yield e(r)}catch(r){if(i++>b1)throw r;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return h(this,null,function*(){return Pp()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return h(this,null,function*(){this.receiver=d1._getInstance(g1()),this.receiver._subscribe("keyChanged",(e,i)=>h(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(i.key)}})),this.receiver._subscribe("ping",(e,i)=>h(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return h(this,null,function*(){var e,i;if(this.activeServiceWorker=yield f1(),!this.activeServiceWorker)return;this.sender=new bl(this.activeServiceWorker);let r=yield this.sender._send("ping",{},800);r&&!((e=r[0])===null||e===void 0)&&e.fulfilled&&!((i=r[0])===null||i===void 0)&&i.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(e){return h(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||p1()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}})}_isAvailable(){return h(this,null,function*(){try{if(!indexedDB)return!1;let e=yield wl();return yield rp(e,po,"1"),yield sp(e,po),!0}catch{}return!1})}_withPendingWrite(e){return h(this,null,function*(){this.pendingWrites++;try{yield e()}finally{this.pendingWrites--}})}_set(e,i){return h(this,null,function*(){return this._withPendingWrite(()=>h(this,null,function*(){return yield this._withRetries(r=>rp(r,e,i)),this.localCache[e]=i,this.notifyServiceWorker(e)}))})}_get(e){return h(this,null,function*(){let i=yield this._withRetries(r=>v1(r,e));return this.localCache[e]=i,i})}_remove(e){return h(this,null,function*(){return this._withPendingWrite(()=>h(this,null,function*(){return yield this._withRetries(i=>sp(i,e)),delete this.localCache[e],this.notifyServiceWorker(e)}))})}_poll(){return h(this,null,function*(){let e=yield this._withRetries(s=>{let o=bo(s,!1).getAll();return new On(o).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];let i=[],r=new Set;if(e.length!==0)for(let{fbase_key:s,value:o}of e)r.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(o)&&(this.notifyListeners(s,o),i.push(s));for(let s of Object.keys(this.localCache))this.localCache[s]&&!r.has(s)&&(this.notifyListeners(s,null),i.push(s));return i})}notifyListeners(e,i){this.localCache[e]=i;let r=this.listeners[e];if(r)for(let s of Array.from(r))s(i)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>h(this,null,function*(){return this._poll()}),y1)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,i){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(i)}_removeListener(e,i){this.listeners[e]&&(this.listeners[e].delete(i),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}return n.type="LOCAL",n})(),xp=w1;var _R=Ap("rcb"),vR=new An(3e4,6e4);function Fp(n,t){return t?Pt(t):(T(n._popupRedirectResolver,n,"argument-error"),n._popupRedirectResolver)}var Or=class extends Sr{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return pi(t,this._buildIdpRequest())}_linkToIdToken(t,e){return pi(t,this._buildIdpRequest(e))}_getReauthenticationResolver(t){return pi(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 D1(n){return s1(n.auth,new Or(n),n.bypassAuthState)}function T1(n){let{auth:t,user:e}=n;return T(e,t,"internal-error"),r1(e,new Or(n),n.bypassAuthState)}function E1(n){return h(this,null,function*(){let{auth:t,user:e}=n;return T(e,t,"internal-error"),i1(e,new Or(n),n.bypassAuthState)})}var _o=class{constructor(t,e,i,r,s=!1){this.auth=t,this.resolver=i,this.user=r,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(e)?e:[e]}execute(){return new Promise((t,e)=>h(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(i){this.reject(i)}}))}onAuthEvent(t){return h(this,null,function*(){let{urlResponse:e,sessionId:i,postBody:r,tenantId:s,error:o,type:c}=t;if(o){this.reject(o);return}let a={auth:this.auth,requestUri:e,sessionId:i,tenantId:s||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(c)(a))}catch(l){this.reject(l)}})}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return D1;case"linkViaPopup":case"linkViaRedirect":return E1;case"reauthViaPopup":case"reauthViaRedirect":return T1;default:dt(this.auth,"internal-error")}}resolve(t){Nt(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){Nt(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 C1=new An(2e3,1e4);function Ul(n,t,e){return h(this,null,function*(){if(lt(n.app))return Promise.reject(Ze(n,"operation-not-supported-in-this-environment"));let i=yo(n);Nb(n,t,Ir);let r=Fp(i,e);return new S1(i,"signInViaPopup",t,r).executeNotNull()})}var S1=(()=>{class n extends _o{constructor(e,i,r,s,o){super(e,i,s,o),this.provider=r,this.authWindow=null,this.pollId=null,n.currentPopupAction&&n.currentPopupAction.cancel(),n.currentPopupAction=this}executeNotNull(){return h(this,null,function*(){let e=yield this.execute();return T(e,this.auth,"internal-error"),e})}onExecution(){return h(this,null,function*(){Nt(this.filter.length===1,"Popup operations only handle one event");let e=Vl();this.authWindow=yield this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(i=>{this.reject(i)}),this.resolver._isIframeWebStorageSupported(this.auth,i=>{i||this.reject(Ze(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(Ze(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 i,r;if(!((r=(i=this.authWindow)===null||i===void 0?void 0:i.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Ze(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,C1.get())};e()}}n.currentPopupAction=null;return n})(),I1="pendingRedirect",ro=new Map,Dl=class n extends _o{constructor(t,e,i=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],e,void 0,i),this.eventId=null}execute(){return h(this,null,function*(){let t=ro.get(this.auth._key());if(!t){try{let i=(yield A1(this.resolver,this.auth))?yield cn(n.prototype,this,"execute").call(this):null;t=()=>Promise.resolve(i)}catch(e){t=()=>Promise.reject(e)}ro.set(this.auth._key(),t)}return this.bypassAuthState||ro.set(this.auth._key(),()=>Promise.resolve(null)),t()})}onAuthEvent(t){return h(this,null,function*(){if(t.type==="signInViaRedirect")return cn(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,cn(n.prototype,this,"onAuthEvent").call(this,t);this.resolve(null)}})}onExecution(){return h(this,null,function*(){})}cleanUp(){}};function A1(n,t){return h(this,null,function*(){let e=M1(t),i=R1(n);if(!(yield i._isAvailable()))return!1;let r=(yield i._get(e))==="true";return yield i._remove(e),r})}function O1(n,t){ro.set(n._key(),t)}function R1(n){return Pt(n._redirectPersistence)}function M1(n){return io(I1,n.config.apiKey,n.name)}function P1(n,t,e=!1){return h(this,null,function*(){if(lt(n.app))return Promise.reject(In(n));let i=yo(n),r=Fp(i,t),o=yield new Dl(i,r,e).execute();return o&&!e&&(delete o.user._redirectEventId,yield i._persistUserIfCurrent(o.user),yield i._setRedirectUser(null,t)),o})}var N1=10*60*1e3,Tl=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(i=>{this.isEventForConsumer(t,i)&&(e=!0,this.sendToConsumer(t,i),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!k1(t)||(this.hasHandledPotentialRedirect=!0,e||(this.queuedRedirectEvent=t,e=!0)),e}sendToConsumer(t,e){var i;if(t.error&&!Lp(t)){let r=((i=t.error.code)===null||i===void 0?void 0:i.split("auth/")[1])||"internal-error";e.onError(Ze(this.auth,r))}else e.onAuthEvent(t)}isEventForConsumer(t,e){let i=e.eventId===null||!!t.eventId&&t.eventId===e.eventId;return e.filter.includes(t.type)&&i}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=N1&&this.cachedEventUids.clear(),this.cachedEventUids.has(op(t))}saveEventToCache(t){this.cachedEventUids.add(op(t)),this.lastProcessedEventTime=Date.now()}};function op(n){return[n.type,n.eventId,n.sessionId,n.tenantId].filter(t=>t).join("-")}function Lp({type:n,error:t}){return n==="unknown"&&t?.code==="auth/no-auth-event"}function k1(n){switch(n.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Lp(n);default:return!1}}function x1(e){return h(this,arguments,function*(n,t={}){return mi(n,"GET","/v1/projects",t)})}var F1=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,L1=/^https?/;function B1(n){return h(this,null,function*(){if(n.config.emulator)return;let{authorizedDomains:t}=yield x1(n);for(let e of t)try{if(V1(e))return}catch{}dt(n,"unauthorized-domain")})}function V1(n){let t=hl(),{protocol:e,hostname:i}=new URL(t);if(n.startsWith("chrome-extension://")){let o=new URL(n);return o.hostname===""&&i===""?e==="chrome-extension:"&&n.replace("chrome-extension://","")===t.replace("chrome-extension://",""):e==="chrome-extension:"&&o.hostname===i}if(!L1.test(e))return!1;if(F1.test(n))return i===n;let r=n.replace(/\./g,"\\.");return new RegExp("^(.+\\."+r+"|"+r+")$","i").test(i)}var U1=new An(3e4,6e4);function ap(){let n=ut().___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 j1(n){return new Promise((t,e)=>{var i,r,s;function o(){ap(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{ap(),e(Ze(n,"network-request-failed"))},timeout:U1.get()})}if(!((r=(i=ut().gapi)===null||i===void 0?void 0:i.iframes)===null||r===void 0)&&r.Iframe)t(gapi.iframes.getContext());else if(!((s=ut().gapi)===null||s===void 0)&&s.load)o();else{let c=Ap("iframefcb");return ut()[c]=()=>{gapi.load?o():e(Ze(n,"network-request-failed"))},Qb(`${Zb()}?onload=${c}`).catch(a=>e(a))}}).catch(t=>{throw so=null,t})}var so=null;function $1(n){return so=so||j1(n),so}var H1=new An(5e3,15e3),G1="__/auth/iframe",z1="emulator/auth/iframe",W1={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},q1=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function J1(n){let t=n.config;T(t.authDomain,n,"auth-domain-config-required");let e=t.emulator?Al(t,z1):`https://${n.config.authDomain}/${G1}`,i={apiKey:t.apiKey,appName:n.name,v:di},r=q1.get(n.config.apiHost);r&&(i.eid=r);let s=n._getFrameworks();return s.length&&(i.fw=s.join(",")),`${e}?${ci(i).slice(1)}`}function K1(n){return h(this,null,function*(){let t=yield $1(n),e=ut().gapi;return T(e,n,"internal-error"),t.open({where:document.body,url:J1(n),messageHandlersFilter:e.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:W1,dontclear:!0},i=>new Promise((r,s)=>h(this,null,function*(){yield i.restyle({setHideOnLeave:!1});let o=Ze(n,"network-request-failed"),c=ut().setTimeout(()=>{s(o)},H1.get());function a(){ut().clearTimeout(c),r(i)}i.ping(a).then(a,()=>{s(o)})})))})}var Y1={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Q1=500,Z1=600,X1="_blank",ew="http://localhost",vo=class{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}};function tw(n,t,e,i=Q1,r=Z1){let s=Math.max((window.screen.availHeight-r)/2,0).toString(),o=Math.max((window.screen.availWidth-i)/2,0).toString(),c="",a=Object.assign(Object.assign({},Y1),{width:i.toString(),height:r.toString(),top:s,left:o}),l=pe().toLowerCase();e&&(c=wp(l)?X1:e),yp(l)&&(t=t||ew,a.scrollbars="yes");let u=Object.entries(a).reduce((p,[g,b])=>`${p}${g}=${b},`,"");if(Wb(l)&&c!=="_self")return nw(t||"",c),new vo(null);let d=window.open(t||"",c,u);T(d,n,"popup-blocked");try{d.focus()}catch{}return new vo(d)}function nw(n,t){let e=document.createElement("a");e.href=n,e.target=t;let i=document.createEvent("MouseEvent");i.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),e.dispatchEvent(i)}var iw="__/auth/handler",rw="emulator/auth/handler",sw=encodeURIComponent("fac");function cp(n,t,e,i,r,s){return h(this,null,function*(){T(n.config.authDomain,n,"auth-domain-config-required"),T(n.config.apiKey,n,"invalid-api-key");let o={apiKey:n.config.apiKey,appName:n.name,authType:e,redirectUrl:i,v:di,eventId:r};if(t instanceof Ir){t.setDefaultLanguage(n.languageCode),o.providerId=t.providerId||"",xf(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(let[u,d]of Object.entries(s||{}))o[u]=d}if(t instanceof fo){let u=t.getScopes().filter(d=>d!=="");u.length>0&&(o.scopes=u.join(","))}n.tenantId&&(o.tid=n.tenantId);let c=o;for(let u of Object.keys(c))c[u]===void 0&&delete c[u];let a=yield n._getAppCheckToken(),l=a?`#${sw}=${encodeURIComponent(a)}`:"";return`${ow(n)}?${ci(c).slice(1)}${l}`})}function ow({config:n}){return n.emulator?Al(n,rw):`https://${n.authDomain}/${iw}`}var dl="webStorageSupport",El=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Bl,this._completeRedirectFn=P1,this._overrideRedirectResult=O1}_openPopup(t,e,i,r){return h(this,null,function*(){var s;Nt((s=this.eventManagers[t._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");let o=yield cp(t,e,i,hl(),r);return tw(t,o,Vl())})}_openRedirect(t,e,i,r){return h(this,null,function*(){yield this._originValidation(t);let s=yield cp(t,e,i,hl(),r);return h1(s),new Promise(()=>{})})}_initialize(t){let e=t._key();if(this.eventManagers[e]){let{manager:r,promise:s}=this.eventManagers[e];return r?Promise.resolve(r):(Nt(s,"If manager is not set, promise should be"),s)}let i=this.initAndGetManager(t);return this.eventManagers[e]={promise:i},i.catch(()=>{delete this.eventManagers[e]}),i}initAndGetManager(t){return h(this,null,function*(){let e=yield K1(t),i=new Tl(t);return e.register("authEvent",r=>(T(r?.authEvent,t,"invalid-auth-event"),{status:i.onEvent(r.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:i},this.iframes[t._key()]=e,i})}_isIframeWebStorageSupported(t,e){this.iframes[t._key()].send(dl,{type:dl},r=>{var s;let o=(s=r?.[0])===null||s===void 0?void 0:s[dl];o!==void 0&&e(!!o),dt(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){let e=t._key();return this.originValidationPromises[e]||(this.originValidationPromises[e]=B1(t)),this.originValidationPromises[e]}get _shouldInitProactively(){return Sp()||bp()||Nl()}},Bp=El;var lp="@firebase/auth",up="1.7.9";var Cl=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 h(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(i=>{t(i?.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(){T(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 cw(n){ui(new at("auth",(t,{options:e})=>{let i=t.getProvider("app").getImmediate(),r=t.getProvider("heartbeat"),s=t.getProvider("app-check-internal"),{apiKey:o,authDomain:c}=i.options;T(o&&!o.includes(":"),"invalid-api-key",{appName:i.name});let a={apiKey:o,authDomain:c,clientPlatform:n,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Ip(n)},l=new vl(i,r,s,a);return Xb(l,e),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,e,i)=>{t.getProvider("auth-internal").initialize()})),ui(new at("auth-internal",t=>{let e=yo(t.getProvider("auth").getImmediate());return(i=>new Cl(i))(e)},"PRIVATE").setInstantiationMode("EXPLICIT")),Se(lp,up,aw(n)),Se(lp,up,"esm2017")}var lw=5*60,uw=Gc("authIdTokenMaxAge")||lw,dp=null,dw=n=>t=>h(void 0,null,function*(){let e=t&&(yield t.getIdTokenResult()),i=e&&(new Date().getTime()-Date.parse(e.issuedAtTime))/1e3;if(i&&i>uw)return;let r=e?.token;dp!==r&&(dp=r,yield fetch(n,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});function jl(n=Ks()){let t=sl(n,"auth");if(t.isInitialized())return t.getImmediate();let e=xl(n,{popupRedirectResolver:Bp,persistence:[xp,Mp,Bl]}),i=Gc("authTokenSyncURL");if(i&&typeof isSecureContext=="boolean"&&isSecureContext){let s=new URL(i,location.origin);if(location.origin===s.origin){let o=dw(s.toString());Ll(e,o,()=>o(e.currentUser)),Mr(e,c=>o(c))}}let r=If("auth");return r&&Fl(e,`http://${r}`),e}function hw(){var n,t;return(t=(n=document.getElementsByTagName("head"))===null||n===void 0?void 0:n[0])!==null&&t!==void 0?t:document}Yb({loadJS(n){return new Promise((t,e)=>{let i=document.createElement("script");i.setAttribute("src",n),i.onload=t,i.onerror=r=>{let s=Ze("internal-error");s.customData=r,e(s)},i.type="text/javascript",i.charset="UTF-8",hw().appendChild(i)})},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="});cw("Browser");function jp(n){return new Ne(function(t){var e=Mr(n,t.next.bind(t),t.error.bind(t),t.complete.bind(t));return{unsubscribe:e}})}var $p="auth",Rn=class{constructor(t){return t}},$l=class{constructor(){return cl($p)}};var Hl=new O("angularfire2.auth-instances");function iD(n,t){let e=Qf($p,n,t);return e&&new Rn(e)}function rD(n){return(t,e)=>{let i=t.runOutsideAngular(()=>n(e));return new Rn(i)}}var sD={provide:$l,deps:[[new et,Hl]]},oD={provide:Rn,useFactory:iD,deps:[[new et,Hl],Sn]};function cM(n,...t){return Se("angularfire",br.full,"auth"),Ge([oD,sD,{provide:Hl,useFactory:rD(n),multi:!0,deps:[H,X,Xs,wr,[new et,Qs],...t]}])}var Hp=fi(jp,!0);var lM=fi(jl,!0);var Gp=fi(Ul,!0);var Mn=class extends Error{};Mn.prototype.name="InvalidTokenError";function aD(n){return decodeURIComponent(atob(n).replace(/(.)/g,(t,e)=>{let i=e.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}function cD(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 aD(t)}catch{return atob(t)}}function Gl(n,t){if(typeof n!="string")throw new Mn("Invalid token specified: must be a string");t||(t={});let e=t.header===!0?0:1,i=n.split(".")[e];if(typeof i!="string")throw new Mn(`Invalid token specified: missing part #${e+1}`);let r;try{r=cD(i)}catch(s){throw new Mn(`Invalid token specified: invalid base64 for part #${e+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new Mn(`Invalid token specified: invalid json for part #${e+1} (${s.message})`)}}var wM=(()=>{class n{constructor(){this.httpService=f(Tf),this._roles=new me([]),this.route=f(Ct),this.router=f(ot),this.auth=f(Rn),this.provider=new Rr,this.user$=Hp(this.auth),this.destroy=new x,this.automateLogon()}login(e){return this.httpService.post("api/Token/Login",e).pipe(V(i=>this.storeLoginResponse(i)),V(i=>this.decodeRoles(i)),V(()=>this.storeFormLogin(e)),mu(1))}storeLoginResponse(e){localStorage.setItem("Token",e.access_token),localStorage.setItem("ExpireDate",e.expiredAt),localStorage.setItem("TokenType",e.token_type)}storeFormLogin(e){localStorage.setItem("Domain",e.Host),localStorage.setItem("Username",e.Username)}decodeRoles(e){let i=Gl(e.access_token);localStorage.setItem("Brand",i.Brand);let r=i["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return this._roles.next(r),this.storeRoles(),r}storeRoles(){localStorage.setItem("Roles",JSON.stringify(this._roles.value))}isTokenExpired(){let e=localStorage.getItem("Token");try{let i=Gl(e),r=Math.floor(Date.now()/1e3);return i.exp?i.exp<r:!1}catch{return!0}}isAuthenticated(){return localStorage.getItem("Token")!==null&&!this.isTokenExpired()}getAuthToken(){return localStorage.getItem("Token")??""}getAuthTokenType(){return localStorage.getItem("TokenType")??""}redirectUrl(){return this.router.navigate(["/pages/shelf/barcode"])}automateLogon(){return h(this,null,function*(){return this.isAuthenticated()?yield this.router.navigate([""]):yield this.router.navigate([""])})}getDomain(){return localStorage.getItem("Domain")!==null?localStorage.getItem("Domain"):""}logout(){return h(this,null,function*(){let e=["ExpireDate","Token","TokenType","Roles","PrintMode"];for(let i of e)localStorage.removeItem(i);yield this.router.navigate([""])})}signInWithPopup(e){return K(Gp(this.auth,new Rr)).pipe(ae(i=>{let r=Rr.credentialFromResult(i),s={Host:e,IDToken:r?.idToken};return this.httpService.post("api/token/LoginWithSocialProvider",s).pipe(I(o=>o),V(o=>this.storeLoginResponse(o)),V(o=>this.decodeRoles(o)),_e(o=>w(null)))}),_e(i=>w(null)))}ngOnDestroy(){this.destroy.next(),this.destroy.complete()}checkAuthKeysExists(){return["ExpireDate","Token","TokenType","Roles","Brand","Domain","Username","PrintMode"].every(i=>!!localStorage.getItem(i))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();export{wt as a,Pi as b,rt as c,na as d,ED as e,CD as f,SD as g,fd as h,YD as i,bd as j,da as k,Ct as l,vm as m,ot as n,_T as o,vT as p,Ss as q,U_ as r,lr as s,$_ as t,Eh as u,ph as v,pn as w,HT as x,GT as y,Ps as z,cr as A,mv as B,WT as C,yv as D,wv as E,Tv as F,qT as G,JT as H,KT as I,lf as J,PA as K,y0 as L,NA as M,kA as N,si as O,gf as P,xA as Q,vf as R,jA as S,U0 as T,$A as U,yf as V,HA as W,Gs as X,GA as Y,zA as Z,WA as _,zs as $,cy as aa,cO as ba,Tf as ca,oR as da,aR as ea,cM as fa,lM as ga,Gl as ha,wM as ia};