(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4736],{7662:(o,c,u)=>{"use strict";u.d(c,{cp:()=>We,IH:()=>Ee,Kz:()=>me,TI:()=>en});var n=u(1661),g=u(9646),d=u(9300),A=u(3900),R=u(4004),O=u(9751),N=u(8421),U=u(7579),ie=u(4482),L=u(5403);var K=u(5577),z=u(1884),ce=u(8675),Y=u(4650),G=u(3692),te=u(259),pe=u(655),ve=u(5819),Ie=u(1481),we=u(5898),Ve=u(7323);class We{constructor(xt){return xt}}const Se="analytics",Fe=n.nk.async,Ee=(0,n.u3)(we.IH,!0),me=(0,n.u3)(we.Kz,!0),xe=(0,n.u3)(we.Iv,!0);let Le=(()=>{class Ut{constructor(qe,$e,T){let F;this.disposables=[],(0,te.KN)("angularfire",n.q4.full,"user-tracking"),this.initialized=$e.runOutsideAngular(()=>new Promise(be=>{F=be})),Fe().then(()=>{const be=T.get(We);be?this.disposables=[(0,Ve.fD)(qe).subscribe(Pt=>{xe(be,Pt?.uid),F()})]:F()})}ngOnDestroy(){this.disposables.forEach(qe=>qe.unsubscribe())}}return Ut.\u0275fac=function(qe){return new(qe||Ut)(Y.LFG(Ve.gx),Y.LFG(Y.R0b),Y.LFG(Y.zs3))},Ut.\u0275prov=Y.Yz7({token:Ut,factory:Ut.\u0275fac}),Ut})();const bt="firebase_screen_id",Yt="outlet",It="screen_class",gn="screen_name";let jn=Math.floor(Math.random()*(Math.pow(2,32)-1))-Math.pow(2,31);const Mn={},Fn=Ut=>{const xt=[Ut[It],Ut[Yt]].join("#");if(Mn.hasOwnProperty(xt))return Mn[xt];{const qe=jn++;return Mn[xt]=qe,qe}},un=(Ut,xt,qe)=>Ut.events.pipe((0,d.h)(T=>T instanceof ve.jw)).pipe((0,A.w)(T=>{var F;const Pt=(null===(F=Ut.parseUrl(Ut.url.replace(/(?:\().+(?:\))/g,Xt=>Xt.replace("://",":///"))).root.children[T.snapshot.outlet])||void 0===F?void 0:F.toString())||"",Pn=Ut.routerState.root.children.map(Xt=>Xt).find(Xt=>Xt.outlet===T.snapshot.outlet);if(!Pn)return(0,g.of)(null);let _r=Pn;for(;_r.firstChild;)_r=_r.firstChild;const Ur=_r.pathFromRoot.map(Xt=>{var sn;return null===(sn=Xt.routeConfig)||void 0===sn?void 0:sn.path}).filter(Xt=>Xt).join("/")||"/",Ht={[gn]:Ur,page_path:`/${Pt}`,firebase_event_origin:"auto",firebase_screen:Ur,[Yt]:T.snapshot.outlet};xt&&(Ht.page_title=xt.getTitle());let At=Pn.component;if(At){if(At===ve.fw){let Xt=T.snapshot;for(;Xt.firstChild;)Xt=Xt.firstChild;At=Xt.component}}else At=T.snapshot.component;if("string"==typeof At)return(0,g.of)(Object.assign(Object.assign({},Ht),{[It]:At}));if(At){const Xt=qe.resolveComponentFactory(At);return(0,g.of)(Object.assign(Object.assign({},Ht),{[It]:Xt.selector}))}return(0,g.of)(null)}),(0,d.h)(T=>!!T),(0,R.U)(T=>Object.assign({firebase_screen_class:T[It],[bt]:Fn(T)},T)),function ee(Ut,xt,qe,$e){return(0,ie.e)((T,F)=>{let be;xt&&"function"!=typeof xt?({duration:qe,element:be,connector:$e}=xt):be=xt;const Pt=new Map,Pn=sn=>{Pt.forEach(sn),sn(F)},_r=sn=>Pn(wn=>wn.error(sn));let Ur=0,Ht=!1;const At=new L.Q(F,sn=>{try{const wn=Ut(sn);let kn=Pt.get(wn);if(!kn){Pt.set(wn,kn=$e?$e():new U.x);const vr=function Xt(sn,wn){const kn=new O.y(vr=>{Ur++;const rt=wn.subscribe(vr);return()=>{rt.unsubscribe(),0==--Ur&&Ht&&At.unsubscribe()}});return kn.key=sn,kn}(wn,kn);if(F.next(vr),qe){const rt=(0,L.x)(kn,()=>{kn.complete(),rt?.unsubscribe()},void 0,void 0,()=>Pt.delete(wn));At.add((0,N.Xf)(qe(vr)).subscribe(rt))}}kn.next(be?be(sn):sn)}catch(wn){_r(wn)}},()=>Pn(sn=>sn.complete()),_r,()=>Pt.clear(),()=>(Ht=!0,0===Ur));T.subscribe(At)})}(T=>T[Yt]),(0,K.z)(T=>T.pipe((0,z.x)((F,be)=>JSON.stringify(F)===JSON.stringify(be)),(0,ce.O)(void 0),function X(){return(0,ie.e)((Ut,xt)=>{let qe,$e=!1;Ut.subscribe((0,L.x)(xt,T=>{const F=qe;qe=T,$e&&xt.next([F,T]),$e=!0}))})}(),(0,R.U)(([F,be])=>F?Object.assign({firebase_previous_class:F[It],firebase_previous_screen:F[gn],firebase_previous_id:F[bt]},be):be))));let Wn=(()=>{class Ut{constructor(qe,$e,T,F,be,Pt){(0,te.KN)("angularfire",n.q4.full,"screen-tracking"),Fe().then(()=>{const Pn=Pt.get(We);!qe||!Pn||F.runOutsideAngular(()=>{this.disposable=un(qe,$e,T).pipe((0,A.w)(_r=>(0,pe.mG)(this,void 0,void 0,function*(){return be&&(yield be.initialized),me(Pn,"screen_view",_r)}))).subscribe()})})}ngOnDestroy(){this.disposable&&this.disposable.unsubscribe()}}return Ut.\u0275fac=function(qe){return new(qe||Ut)(Y.LFG(ve.F0,8),Y.LFG(Ie.Dx,8),Y.LFG(Y._Vd),Y.LFG(Y.R0b),Y.LFG(Le,8),Y.LFG(Y.zs3))},Ut.\u0275prov=Y.Yz7({token:Ut,factory:Ut.\u0275fac}),Ut})();const Zn=new Y.OlP("angularfire2.analytics-instances");function sr(Ut){return(xt,qe)=>{if(!n.nk.sync())return null;const $e=xt.runOutsideAngular(()=>Ut(qe));return new We($e)}}const Tr={provide:class Me{constructor(){return(0,n.vb)(Se)}},deps:[[new Y.FiY,Zn]]},bn={provide:We,useFactory:function Vn(Ut,xt){if(!n.nk.sync())return null;const qe=(0,n.JM)(Se,Ut,xt);return qe&&new We(qe)},deps:[[new Y.FiY,Zn],G.Ot]};let pn=(()=>{class Ut{constructor(qe,$e){(0,te.KN)("angularfire",n.q4.full,"analytics")}}return Ut.\u0275fac=function(qe){return new(qe||Ut)(Y.LFG(Wn,8),Y.LFG(Le,8))},Ut.\u0275mod=Y.oAB({type:Ut}),Ut.\u0275inj=Y.cJS({providers:[bn,Tr,{provide:Y.ip1,useValue:n.nk.async,multi:!0}]}),Ut})();function en(Ut,...xt){return{ngModule:pn,providers:[{provide:Zn,useFactory:sr(Ut),multi:!0,deps:[Y.R0b,Y.zs3,n.HU,G.z6,...xt]}]}}},163:(o,c,u)=>{"use strict";u.d(c,{nm:()=>Ct});var n=u(1661),R=(u(4650),u(3692),u(259),u(5861)),O=u(3847),N=u(3272),U=u(9572),ie=u(1877);const L=new Map,ee={activated:!1,tokenObservers:[]},K={initialized:!1,enabled:!1};function z(_t){return L.get(_t)||Object.assign({},ee)}function X(){return K}const Y="https://content-firebaseappcheck.googleapis.com/v1",pe="exchangeDebugToken",ve={OFFSET_DURATION:3e5,RETRIAL_MIN_WAIT:3e4,RETRIAL_MAX_WAIT:96e4};class we{constructor(le,ye,ze,tt,Pe){if(this.operation=le,this.retryPolicy=ye,this.getWaitDuration=ze,this.lowerBound=tt,this.upperBound=Pe,this.pending=null,this.nextErrorWaitInterval=tt,tt>Pe)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(le){var ye=this;return(0,R.Z)(function*(){ye.stop();try{ye.pending=new U.BH,yield function Ve(_t){return new Promise(le=>{setTimeout(le,_t)})}(ye.getNextRun(le)),ye.pending.resolve(),yield ye.pending.promise,ye.pending=new U.BH,yield ye.operation(),ye.pending.resolve(),yield ye.pending.promise,ye.process(!0).catch(()=>{})}catch(ze){ye.retryPolicy(ze)?ye.process(!1).catch(()=>{}):ye.stop()}})()}getNextRun(le){if(le)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{const ye=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),ye}}}const Se=new U.LL("appCheck","AppCheck",{"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.",throttled:"Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}"});function ae(_t,le){return me.apply(this,arguments)}function me(){return(me=(0,R.Z)(function*({url:_t,body:le},ye){const ze={"Content-Type":"application/json"},tt=ye.getImmediate({optional:!0});if(tt){const vn=yield tt.getHeartbeatsHeader();vn&&(ze["X-Firebase-Client"]=vn)}const Pe={method:"POST",body:JSON.stringify(le),headers:ze};let Je,vt;try{Je=yield fetch(_t,Pe)}catch(vn){throw Se.create("fetch-network-error",{originalErrorMessage:vn?.message})}if(200!==Je.status)throw Se.create("fetch-status-error",{httpStatus:Je.status});try{vt=yield Je.json()}catch(vn){throw Se.create("fetch-parse-error",{originalErrorMessage:vn?.message})}const Mt=vt.ttl.match(/^([\d.]+)(s)$/);if(!Mt||!Mt[2]||isNaN(Number(Mt[1])))throw Se.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${vt.ttl}`});const Vt=1e3*Number(Mt[1]),jt=Date.now();return{token:vt.token,expireTimeMillis:jt+Vt,issuedAtTimeMillis:jt}})).apply(this,arguments)}const xe="firebase-app-check-database",st=1,Le="firebase-app-check-store";let Ge=null;function Yt(_t,le){return kt.apply(this,arguments)}function kt(){return(kt=(0,R.Z)(function*(_t,le){const ze=(yield function ut(){return Ge||(Ge=new Promise((_t,le)=>{try{const ye=indexedDB.open(xe,st);ye.onsuccess=ze=>{_t(ze.target.result)},ye.onerror=ze=>{var tt;le(Se.create("storage-open",{originalErrorMessage:null===(tt=ze.target.error)||void 0===tt?void 0:tt.message}))},ye.onupgradeneeded=ze=>{0===ze.oldVersion&&ze.target.result.createObjectStore(Le,{keyPath:"compositeKey"})}}catch(ye){le(Se.create("storage-open",{originalErrorMessage:ye?.message}))}}),Ge)}()).transaction(Le,"readwrite"),Pe=ze.objectStore(Le).put({compositeKey:_t,value:le});return new Promise((Je,vt)=>{Pe.onsuccess=Mt=>{Je()},ze.onerror=Mt=>{var Vt;vt(Se.create("storage-set",{originalErrorMessage:null===(Vt=Mt.target.error)||void 0===Vt?void 0:Vt.message}))}})})).apply(this,arguments)}const Sn=new ie.Yd("@firebase/app-check");function jn(_t,le){return(0,U.hl)()?function $t(_t,le){return Yt(function gn(_t){return`${_t.options.appId}-${_t.name}`}(_t),le)}(_t,le).catch(ye=>{Sn.warn(`Failed to write token to IndexedDB. Error: ${ye}`)}):Promise.resolve()}function Wn(){return Zn.apply(this,arguments)}function Zn(){return(Zn=(0,R.Z)(function*(){const _t=X();if(_t.enabled&&_t.token)return _t.token.promise;throw Error("\n Can't get debug token in production mode.\n ")})).apply(this,arguments)}const sr={error:"UNKNOWN_ERROR"};function Tr(_t){return U.US.encodeString(JSON.stringify(_t),!1)}function bn(_t){return pn.apply(this,arguments)}function pn(){return(pn=(0,R.Z)(function*(_t,le=!1){const ye=_t.app;!function et(_t){if(!z(_t).activated)throw Se.create("use-before-activation",{appName:_t.name})}(ye);const ze=z(ye);let Pe,tt=ze.token;if(tt&&!T(tt)&&(ze.token=void 0,tt=void 0),!tt){const Mt=yield ze.cachedTokenPromise;Mt&&(T(Mt)?tt=Mt:yield jn(ye,void 0))}if(!le&&tt&&T(tt))return{token:tt.token};let vt,Je=!1;if(function un(){return X().enabled}()){ze.exchangeTokenPromise||(ze.exchangeTokenPromise=ae(function Qe(_t,le){const{projectId:ye,appId:ze,apiKey:tt}=_t.options;return{url:`${Y}/projects/${ye}/apps/${ze}:${pe}?key=${tt}`,body:{debug_token:le}}}(ye,yield Wn()),_t.heartbeatServiceProvider).finally(()=>{ze.exchangeTokenPromise=void 0}),Je=!0);const Mt=yield ze.exchangeTokenPromise;return yield jn(ye,Mt),ze.token=Mt,{token:Mt.token}}try{ze.exchangeTokenPromise||(ze.exchangeTokenPromise=ze.provider.getToken().finally(()=>{ze.exchangeTokenPromise=void 0}),Je=!0),tt=yield z(ye).exchangeTokenPromise}catch(Mt){"appCheck/throttled"===Mt.code?Sn.warn(Mt.message):Sn.error(Mt),Pe=Mt}return tt?Pe?vt=T(tt)?{token:tt.token,internalError:Pe}:F(Pe):(vt={token:tt.token},ze.token=tt,yield jn(ye,tt)):vt=F(Pe),Je&&function $e(_t,le){const ye=z(_t).tokenObservers;for(const ze of ye)try{"EXTERNAL"===ze.type&&null!=le.error?ze.error(le.error):ze.next(le)}catch{}}(ye,vt),vt})).apply(this,arguments)}function Ut(_t,le){const ye=z(_t),ze=ye.tokenObservers.filter(tt=>tt.next!==le);0===ze.length&&ye.tokenRefresher&&ye.tokenRefresher.isRunning()&&ye.tokenRefresher.stop(),ye.tokenObservers=ze}function xt(_t){const{app:le}=_t,ye=z(le);let ze=ye.tokenRefresher;ze||(ze=function qe(_t){const{app:le}=_t;return new we((0,R.Z)(function*(){let ze;if(ze=z(le).token?yield bn(_t,!0):yield bn(_t),ze.error)throw ze.error;if(ze.internalError)throw ze.internalError}),()=>!0,()=>{const ye=z(le);if(ye.token){let ze=ye.token.issuedAtTimeMillis+.5*(ye.token.expireTimeMillis-ye.token.issuedAtTimeMillis)+3e5;return ze=Math.min(ze,ye.token.expireTimeMillis-3e5),Math.max(0,ze-Date.now())}return 0},ve.RETRIAL_MIN_WAIT,ve.RETRIAL_MAX_WAIT)}(_t),ye.tokenRefresher=ze),!ze.isRunning()&&ye.isTokenAutoRefreshEnabled&&ze.start()}function T(_t){return _t.expireTimeMillis-Date.now()>0}function F(_t){return{token:Tr(sr),error:_t}}class be{constructor(le,ye){this.app=le,this.heartbeatServiceProvider=ye}_delete(){const{tokenObservers:le}=z(this.app);for(const ye of le)Ut(this.app,ye.next);return Promise.resolve()}}const Cn="app-check-internal";!function tr(){(0,O.Xd)(new N.wA("app-check",_t=>function Pt(_t,le){return new be(_t,le)}(_t.getProvider("app").getImmediate(),_t.getProvider("heartbeat")),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((_t,le,ye)=>{_t.getProvider(Cn).initialize()})),(0,O.Xd)(new N.wA(Cn,_t=>function Pn(_t){return{getToken:le=>bn(_t,le),addTokenListener:le=>function en(_t,le,ye,ze){const{app:tt}=_t,Pe=z(tt);if(Pe.tokenObservers=[...Pe.tokenObservers,{next:ye,error:ze,type:le}],Pe.token&&T(Pe.token)){const vt=Pe.token;Promise.resolve().then(()=>{ye({token:vt.token}),xt(_t)}).catch(()=>{})}Pe.cachedTokenPromise.then(()=>xt(_t))}(_t,"INTERNAL",le),removeTokenListener:le=>Ut(_t.app,le)}}(_t.getProvider("app-check").getImmediate()),"PUBLIC").setInstantiationMode("EXPLICIT")),(0,O.KN)("@firebase/app-check","0.6.4")}();class Ct{constructor(){return(0,n.vb)("app-check")}}typeof window<"u"&&window},3692:(o,c,u)=>{"use strict";u.d(c,{Ot:()=>A,ZF:()=>G,hX:()=>z,z6:()=>R});var n=u(259),g=u(4650),d=u(1661);class A{constructor(we){return we}}class R{constructor(){return(0,n.C6)()}}const U=new g.OlP("angularfire2._apps"),ie={provide:A,useFactory:function N(Ie){return Ie&&1===Ie.length?Ie[0]:new A((0,n.Mq)())},deps:[[new g.FiY,U]]},L={provide:R,deps:[[new g.FiY,U]]};function ee(Ie){return(we,Ve)=>{const We=we.runOutsideAngular(()=>Ie(Ve));return new A(We)}}let K=(()=>{class Ie{constructor(Ve){(0,n.KN)("angularfire",d.q4.full,"core"),(0,n.KN)("angularfire",d.q4.full,"app"),(0,n.KN)("angular",g.q4F.full,Ve.toString())}}return Ie.\u0275fac=function(Ve){return new(Ve||Ie)(g.LFG(g.Lbi))},Ie.\u0275mod=g.oAB({type:Ie}),Ie.\u0275inj=g.cJS({providers:[ie,L]}),Ie})();function z(Ie,...we){return{ngModule:K,providers:[{provide:U,useFactory:ee(Ie),multi:!0,deps:[g.R0b,g.zs3,d.HU,...we]}]}}const G=(0,d.u3)(n.ZF,!0)},7323:(o,c,u)=>{"use strict";u.d(c,{gx:()=>K,dh:()=>z,fD:()=>we,v0:()=>Qe,AR:()=>Ie,LS:()=>Fn,XB:()=>Zn,sB:()=>Vn,e5:()=>Tr,$g:()=>pn});var n=u(1661),g=u(4650),d=u(3692),A=u(259),R=u(163),O=u(6323),N=u(9751);function U(Ht){return new N.y(function(At){return{unsubscribe:(0,O.Aj)(Ht,At.next.bind(At),At.error.bind(At),At.complete.bind(At))}})}class K{constructor(At){return At}}class z{constructor(){return(0,n.vb)("auth")}}const X=new g.OlP("angularfire2.auth-instances");function G(Ht){return(At,Xt)=>{const sn=At.runOutsideAngular(()=>Ht(Xt));return new K(sn)}}const te={provide:z,deps:[[new g.FiY,X]]},pe={provide:K,useFactory:function Y(Ht,At){const Xt=(0,n.JM)("auth",Ht,At);return Xt&&new K(Xt)},deps:[[new g.FiY,X],d.Ot]};let ve=(()=>{class Ht{constructor(){(0,A.KN)("angularfire",n.q4.full,"auth")}}return Ht.\u0275fac=function(Xt){return new(Xt||Ht)},Ht.\u0275mod=g.oAB({type:Ht}),Ht.\u0275inj=g.cJS({providers:[pe,te]}),Ht})();function Ie(Ht,...At){return{ngModule:ve,providers:[{provide:X,useFactory:G(Ht),multi:!0,deps:[g.R0b,g.zs3,n.HU,d.z6,[new g.FiY,R.nm],...At]}]}}const we=(0,n.u3)(U,!0),Qe=(0,n.u3)(O.v0,!0),Fn=(0,n.u3)(O.LS,!0),Zn=(0,n.u3)(O.XB,!0),Vn=(0,n.u3)(O.sB,!0),Tr=(0,n.u3)(O.e5,!0),pn=(0,n.u3)(O.$g,!0)},7382:(o,c,u)=>{"use strict";u.d(c,{vo:()=>Xl,EW:()=>df,N8:()=>Ru,Kk:()=>hf,vh:()=>Qm,en:()=>af,FE:()=>eh,g2:()=>ff,v8:()=>sf,IO:()=>nh,iH:()=>rh,e0:()=>md});var n=u(1661),g=u(4650),d=u(7323),A=u(3692),R=u(259),O=u(163),N=u(9751),U=u(8996),ie=u(9646),L=u(6451),ee=u(4986),K=u(7272),z=u(5698),ce=u(4482),X=u(5403),Y=u(5032),te=u(9718),pe=u(5577);function ve(y,f){return f?p=>(0,K.z)(f.pipe((0,z.q)(1),function G(){return(0,ce.e)((y,f)=>{y.subscribe((0,X.x)(f,Y.Z))})}()),p.pipe(ve(y))):(0,pe.z)((p,C)=>y(p,C).pipe((0,z.q)(1),(0,te.h)(p)))}var Ie=u(3532);var Se=u(4004),Me=u(3900),et=u(5026),Fe=u(1884),Ee=u(5861),ae=u(3847),me=u(3272),$=u(9572),ue=u(1877);const Qe="@firebase/database";let st="";class ke{constructor(f){this.domStorage_=f,this.prefix_="firebase:"}set(f,p){null==p?this.domStorage_.removeItem(this.prefixedName_(f)):this.domStorage_.setItem(this.prefixedName_(f),(0,$.Wl)(p))}get(f){const p=this.domStorage_.getItem(this.prefixedName_(f));return null==p?null:(0,$.cI)(p)}remove(f){this.domStorage_.removeItem(this.prefixedName_(f))}prefixedName_(f){return this.prefix_+f}toString(){return this.domStorage_.toString()}}class Ge{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(f,p){null==p?delete this.cache_[f]:this.cache_[f]=p}get(f){return(0,$.r3)(this.cache_,f)?this.cache_[f]:null}remove(f){delete this.cache_[f]}}const ut=function(y){try{if(typeof window<"u"&&typeof window[y]<"u"){const f=window[y];return f.setItem("firebase:sentinel","cache"),f.removeItem("firebase:sentinel"),new ke(f)}}catch{}return new Ge},pt=ut("localStorage"),$t=ut("sessionStorage"),bt=new ue.Yd("@firebase/database"),St=function(){let y=1;return function(){return y++}}(),Yt=function(y){const f=(0,$.dS)(y),p=new $.gQ;p.update(f);const C=p.digest();return $.US.encodeByteArray(C)},kt=function(...y){let f="";for(let p=0;pp?p:V+f));return C};function Ut(y,f){for(const p in y)y.hasOwnProperty(p)&&f(p,y[p])}const xt=function(y){(0,$.hu)(!un(y),"Invalid JSON number");const C=1023;let V,ne,de,Ne,ot;0===y?(ne=0,de=0,V=1/y==-1/0?1:0):(V=y<0,(y=Math.abs(y))>=Math.pow(2,1-C)?(Ne=Math.min(Math.floor(Math.log(y)/Math.LN2),C),ne=Ne+C,de=Math.round(y*Math.pow(2,52-Ne)-Math.pow(2,52))):(ne=0,de=Math.round(y/Math.pow(2,-1074))));const at=[];for(ot=52;ot;ot-=1)at.push(de%2?1:0),de=Math.floor(de/2);for(ot=11;ot;ot-=1)at.push(ne%2?1:0),ne=Math.floor(ne/2);at.push(V?1:0),at.reverse();const Bt=at.join("");let Zt="";for(ot=0;ot<64;ot+=8){let Qt=parseInt(Bt.substr(ot,8),2).toString(16);1===Qt.length&&(Qt="0"+Qt),Zt+=Qt}return Zt.toLowerCase()},F=new RegExp("^-?(0*)\\d{1,10}$"),Pn=function(y){if(F.test(y)){const f=Number(y);if(f>=-2147483648&&f<=2147483647)return f}return null},_r=function(y){try{y()}catch(f){setTimeout(()=>{throw Mn("Exception was thrown by user callback.",f.stack||""),f},Math.floor(0))}},Ur=function(){return("object"==typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},Ht=function(y,f){const p=setTimeout(y,f);return"number"==typeof p&&typeof Deno<"u"&&Deno.unrefTimer?Deno.unrefTimer(p):"object"==typeof p&&p.unref&&p.unref(),p};class At{constructor(f,p){this.appName_=f,this.appCheckProvider=p,this.appCheck=p?.getImmediate({optional:!0}),this.appCheck||p?.get().then(C=>this.appCheck=C)}getToken(f){return this.appCheck?this.appCheck.getToken(f):new Promise((p,C)=>{setTimeout(()=>{this.appCheck?this.getToken(f).then(p,C):p(null)},0)})}addTokenChangeListener(f){var p;null===(p=this.appCheckProvider)||void 0===p||p.get().then(C=>C.addTokenListener(f))}notifyForInvalidToken(){Mn(`Provided AppCheck credentials for the app named "${this.appName_}" are invalid. This usually indicates your app was not initialized correctly.`)}}class Xt{constructor(f,p,C){this.appName_=f,this.firebaseOptions_=p,this.authProvider_=C,this.auth_=null,this.auth_=C.getImmediate({optional:!0}),this.auth_||C.onInit(V=>this.auth_=V)}getToken(f){return this.auth_?this.auth_.getToken(f).catch(p=>p&&"auth/token-not-initialized"===p.code?(Sn("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(p)):new Promise((p,C)=>{setTimeout(()=>{this.auth_?this.getToken(f).then(p,C):p(null)},0)})}addTokenChangeListener(f){this.auth_?this.auth_.addAuthTokenListener(f):this.authProvider_.get().then(p=>p.addAuthTokenListener(f))}removeTokenChangeListener(f){this.authProvider_.get().then(p=>p.removeAuthTokenListener(f))}notifyForInvalidToken(){let f='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';f+="credential"in this.firebaseOptions_?'Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?'Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':'Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',Mn(f)}}let sn=(()=>{class y{constructor(p){this.accessToken=p}getToken(p){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(p){p(this.accessToken)}removeTokenChangeListener(p){}notifyForInvalidToken(){}}return y.OWNER="owner",y})();const Ye=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,nn="websocket",En="long_polling";class yn{constructor(f,p,C,V,ne=!1,de="",Ne=!1,ot=!1){this.secure=p,this.namespace=C,this.webSocketOnly=V,this.nodeAdmin=ne,this.persistenceKey=de,this.includeNamespaceInQueryParams=Ne,this.isUsingEmulator=ot,this._host=f.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=pt.get("host:"+f)||this._host}isCacheableHost(){return"s-"===this.internalHost.substr(0,2)}isCustomHost(){return"firebaseio.com"!==this._domain&&"firebaseio-demo.com"!==this._domain}get host(){return this._host}set host(f){f!==this.internalHost&&(this.internalHost=f,this.isCacheableHost()&&pt.set("host:"+this._host,this.internalHost))}toString(){let f=this.toURLString();return this.persistenceKey&&(f+="<"+this.persistenceKey+">"),f}toURLString(){return`${this.secure?"https://":"http://"}${this.host}/${this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:""}`}}function gt(y,f,p){let C;if((0,$.hu)("string"==typeof f,"typeof type must == string"),(0,$.hu)("object"==typeof p,"typeof params must == object"),f===nn)C=(y.secure?"wss://":"ws://")+y.internalHost+"/.ws?";else{if(f!==En)throw new Error("Unknown connection type: "+f);C=(y.secure?"https://":"http://")+y.internalHost+"/.lp?"}(function Gn(y){return y.host!==y.internalHost||y.isCustomHost()||y.includeNamespaceInQueryParams})(y)&&(p.ns=y.namespace);const V=[];return Ut(p,(ne,de)=>{V.push(ne+"="+de)}),C+V.join("&")}class lt{constructor(){this.counters_={}}incrementCounter(f,p=1){(0,$.r3)(this.counters_,f)||(this.counters_[f]=0),this.counters_[f]+=p}get(){return(0,$.p$)(this.counters_)}}const He={},nt={};function mt(y){const f=y.toString();return He[f]||(He[f]=new lt),He[f]}class Cn{constructor(f){this.onMessage_=f,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(f,p){this.closeAfterResponse=f,this.onClose=p,this.closeAfterResponse{this.onMessage_(C[V])});if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}class Gr{constructor(f,p,C,V,ne,de,Ne){this.connId=f,this.repoInfo=p,this.applicationId=C,this.appCheckToken=V,this.authToken=ne,this.transportSessionId=de,this.lastSessionId=Ne,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=cr(f),this.stats_=mt(p),this.urlFn=ot=>(this.appCheckToken&&(ot.ac=this.appCheckToken),gt(p,En,ot))}open(f,p){this.curSegmentNum=0,this.onDisconnect_=p,this.myPacketOrderer=new Cn(f),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null},Math.floor(3e4)),function(y){if((0,$.Yr)()||"complete"===document.readyState)y();else{let f=!1;const p=function(){document.body?f||(f=!0,y()):setTimeout(p,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",p,!1),window.addEventListener("load",p,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&p()}),window.attachEvent("onload",p))}}(()=>{if(this.isClosed_)return;this.scriptTagHolder=new ni((...ne)=>{const[de,Ne,ot,at,Bt]=ne;if(this.incrementIncomingBytes_(ne),this.scriptTagHolder)if(this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null),this.everConnected_=!0,"start"===de)this.id=Ne,this.password=ot;else{if("close"!==de)throw new Error("Unrecognized command received: "+de);Ne?(this.scriptTagHolder.sendNewPolls=!1,this.myPacketOrderer.closeAfter(Ne,()=>{this.onClosed_()})):this.onClosed_()}},(...ne)=>{const[de,Ne]=ne;this.incrementIncomingBytes_(ne),this.myPacketOrderer.handleResponse(de,Ne)},()=>{this.onClosed_()},this.urlFn);const C={start:"t"};C.ser=Math.floor(1e8*Math.random()),this.scriptTagHolder.uniqueCallbackIdentifier&&(C.cb=this.scriptTagHolder.uniqueCallbackIdentifier),C.v="5",this.transportSessionId&&(C.s=this.transportSessionId),this.lastSessionId&&(C.ls=this.lastSessionId),this.applicationId&&(C.p=this.applicationId),this.appCheckToken&&(C.ac=this.appCheckToken),typeof location<"u"&&location.hostname&&Ye.test(location.hostname)&&(C.r="f");const V=this.urlFn(C);this.log_("Connecting via long-poll to "+V),this.scriptTagHolder.addTag(V,()=>{})})}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){Gr.forceAllow_=!0}static forceDisallow(){Gr.forceDisallow_=!0}static isAvailable(){return!((0,$.Yr)()||!Gr.forceAllow_&&(Gr.forceDisallow_||!(typeof document<"u")||null==document.createElement||"object"==typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href)||"object"==typeof Windows&&"object"==typeof Windows.UI))}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(f){const p=(0,$.Wl)(f);this.bytesSent+=p.length,this.stats_.incrementCounter("bytes_sent",p.length);const C=(0,$.h$)(p),V=en(C,1840);for(let ne=0;nedocument.domain="'+document.domain+'";<\/script>');const de=""+ne+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(de),this.myIFrame.doc.close()}catch(Ne){Sn("frame writing exception"),Ne.stack&&Sn(Ne.stack),Sn(Ne)}}}static createIFrame_(){const f=document.createElement("iframe");if(f.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(f);try{f.contentWindow.document||Sn("No IE domain setting required")}catch{const C=document.domain;f.src="javascript:void((function(){document.open();document.domain='"+C+"';document.close();})())"}return f.contentDocument?f.doc=f.contentDocument:f.contentWindow?f.doc=f.contentWindow.document:f.document&&(f.doc=f.document),f}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout(()=>{null!==this.myIFrame&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)},Math.floor(0)));const f=this.onDisconnect;f&&(this.onDisconnect=null,f())}startLongPoll(f,p){for(this.myID=f,this.myPW=p,this.alive=!0;this.newRequest_(););}newRequest_(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;const f={};f.id=this.myID,f.pw=this.myPW,f.ser=this.currentSerial;let p=this.urlFn(f),C="",V=0;for(;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+30+C.length<=1870;){const de=this.pendingSegs.shift();C=C+"&seg"+V+"="+de.seg+"&ts"+V+"="+de.ts+"&d"+V+"="+de.d,V++}return p+=C,this.addLongPollTag_(p,this.currentSerial),!0}return!1}enqueueSegment(f,p,C){this.pendingSegs.push({seg:f,ts:p,d:C}),this.alive&&this.newRequest_()}addLongPollTag_(f,p){this.outstandingRequests.add(p);const C=()=>{this.outstandingRequests.delete(p),this.newRequest_()},V=setTimeout(C,Math.floor(25e3));this.addTag(f,()=>{clearTimeout(V),C()})}addTag(f,p){(0,$.Yr)()?this.doNodeLongPoll(f,p):setTimeout(()=>{try{if(!this.sendNewPolls)return;const C=this.myIFrame.doc.createElement("script");C.type="text/javascript",C.async=!0,C.src=f,C.onload=C.onreadystatechange=function(){const V=C.readyState;(!V||"loaded"===V||"complete"===V)&&(C.onload=C.onreadystatechange=null,C.parentNode&&C.parentNode.removeChild(C),p())},C.onerror=()=>{Sn("Long-poll script failed to load: "+f),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(C)}catch{}},Math.floor(1))}}let ye=null;typeof MozWebSocket<"u"?ye=MozWebSocket:typeof WebSocket<"u"&&(ye=WebSocket);let ze=(()=>{class y{constructor(p,C,V,ne,de,Ne,ot){this.connId=p,this.applicationId=V,this.appCheckToken=ne,this.authToken=de,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=cr(this.connId),this.stats_=mt(C),this.connURL=y.connectionURL_(C,Ne,ot,ne,V),this.nodeAdmin=C.nodeAdmin}static connectionURL_(p,C,V,ne,de){const Ne={v:"5"};return!(0,$.Yr)()&&typeof location<"u"&&location.hostname&&Ye.test(location.hostname)&&(Ne.r="f"),C&&(Ne.s=C),V&&(Ne.ls=V),ne&&(Ne.ac=ne),de&&(Ne.p=de),gt(p,nn,Ne)}open(p,C){this.onDisconnect=C,this.onMessage=p,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,pt.set("previous_websocket_failure",!0);try{let V;if((0,$.Yr)()){V={headers:{"User-Agent":`Firebase/5/${st}/${process.platform}/${this.nodeAdmin?"AdminNode":"Node"}`,"X-Firebase-GMPID":this.applicationId||""}},this.authToken&&(V.headers.Authorization=`Bearer ${this.authToken}`),this.appCheckToken&&(V.headers["X-Firebase-AppCheck"]=this.appCheckToken);const de=process.env,Ne=0===this.connURL.indexOf("wss://")?de.HTTPS_PROXY||de.https_proxy:de.HTTP_PROXY||de.http_proxy;Ne&&(V.proxy={origin:Ne})}this.mySock=new ye(this.connURL,[],V)}catch(V){this.log_("Error instantiating WebSocket.");const ne=V.message||V.data;return ne&&this.log_(ne),void this.onClosed_()}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0},this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=V=>{this.handleIncomingFrame(V)},this.mySock.onerror=V=>{this.log_("WebSocket error. Closing connection.");const ne=V.message||V.data;ne&&this.log_(ne),this.onClosed_()}}start(){}static forceDisallow(){y.forceDisallow_=!0}static isAvailable(){let p=!1;if(typeof navigator<"u"&&navigator.userAgent){const V=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);V&&V.length>1&&parseFloat(V[1])<4.4&&(p=!0)}return!p&&null!==ye&&!y.forceDisallow_}static previouslyFailed(){return pt.isInMemoryStorage||!0===pt.get("previous_websocket_failure")}markConnectionHealthy(){pt.remove("previous_websocket_failure")}appendFrame_(p){if(this.frames.push(p),this.frames.length===this.totalFrames){const C=this.frames.join("");this.frames=null;const V=(0,$.cI)(C);this.onMessage(V)}}handleNewFrameCount_(p){this.totalFrames=p,this.frames=[]}extractFrameCount_(p){if((0,$.hu)(null===this.frames,"We already have a frame buffer"),p.length<=6){const C=Number(p);if(!isNaN(C))return this.handleNewFrameCount_(C),null}return this.handleNewFrameCount_(1),p}handleIncomingFrame(p){if(null===this.mySock)return;const C=p.data;if(this.bytesReceived+=C.length,this.stats_.incrementCounter("bytes_received",C.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(C);else{const V=this.extractFrameCount_(C);null!==V&&this.appendFrame_(V)}}send(p){this.resetKeepAlive();const C=(0,$.Wl)(p);this.bytesSent+=C.length,this.stats_.incrementCounter("bytes_sent",C.length);const V=en(C,16384);V.length>1&&this.sendString_(String(V.length));for(let ne=0;ne{this.mySock&&this.sendString_("0"),this.resetKeepAlive()},Math.floor(45e3))}sendString_(p){try{this.mySock.send(p)}catch(C){this.log_("Exception thrown from WebSocket.send():",C.message||C.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}return y.responsesRequiredToBeHealthy=2,y.healthyTimeout=3e4,y})(),tt=(()=>{class y{constructor(p){this.initTransports_(p)}static get ALL_TRANSPORTS(){return[Gr,ze]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}initTransports_(p){const C=ze&&ze.isAvailable();let V=C&&!ze.previouslyFailed();if(p.webSocketOnly&&(C||Mn("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),V=!0),V)this.transports_=[ze];else{const ne=this.transports_=[];for(const de of y.ALL_TRANSPORTS)de&&de.isAvailable()&&ne.push(de);y.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}return y.globalTransportInitialized_=!1,y})();class is{constructor(f,p,C,V,ne,de,Ne,ot,at,Bt){this.id=f,this.repoInfo_=p,this.applicationId_=C,this.appCheckToken_=V,this.authToken_=ne,this.onMessage_=de,this.onReady_=Ne,this.onDisconnect_=ot,this.onKill_=at,this.lastSessionId=Bt,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=cr("c:"+this.id+":"),this.transportManager_=new tt(p),this.log_("Connection created"),this.start_()}start_(){const f=this.transportManager_.initialTransport();this.conn_=new f(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=f.responsesRequiredToBeHealthy||0;const p=this.connReceiver_(this.conn_),C=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(()=>{this.conn_&&this.conn_.open(p,C)},Math.floor(0));const V=f.healthyTimeout||0;V>0&&(this.healthyTimeout_=Ht(()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>102400?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes. Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>10240?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes. Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))},Math.floor(V)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(f){return p=>{f===this.conn_?this.onConnectionLost_(p):f===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(f){return p=>{2!==this.state_&&(f===this.rx_?this.onPrimaryMessageReceived_(p):f===this.secondaryConn_?this.onSecondaryMessageReceived_(p):this.log_("message on old connection"))}}sendRequest(f){this.sendData_({t:"d",d:f})}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(f){if("t"in f){const p=f.t;"a"===p?this.upgradeIfSecondaryHealthy_():"r"===p?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):"o"===p&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(f){const p=bn("t",f),C=bn("d",f);if("c"===p)this.onSecondaryControl_(C);else{if("d"!==p)throw new Error("Unknown protocol layer: "+p);this.pendingDataMessages.push(C)}}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(f){const p=bn("t",f),C=bn("d",f);"c"===p?this.onControl_(C):"d"===p&&this.onDataMessage_(C)}onDataMessage_(f){this.onPrimaryResponse_(),this.onMessage_(f)}onPrimaryResponse_(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(f){const p=bn("t",f);if("d"in f){const C=f.d;if("h"===p){const V=Object.assign({},C);this.repoInfo_.isUsingEmulator&&(V.h=this.repoInfo_.host),this.onHandshake_(V)}else if("n"===p){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let V=0;V{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())},Math.floor(6e4))}onReset_(f){this.log_("Reset packet received. New host: "+f),this.repoInfo_.host=f,1===this.state_?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(f,p){this.log_("Realtime connection established."),this.conn_=f,this.state_=1,this.onReady_&&(this.onReady_(p,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):Ht(()=>{this.sendPingOnPrimaryIfNecessary_()},Math.floor(5e3))}sendPingOnPrimaryIfNecessary_(){!this.isHealthy_&&1===this.state_&&(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))}onSecondaryConnectionLost_(){const f=this.secondaryConn_;this.secondaryConn_=null,(this.tx_===f||this.rx_===f)&&this.close()}onConnectionLost_(f){this.conn_=null,f||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(pt.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()}onConnectionShutdown_(f){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(f),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(f){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(f)}close(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}class Wi{put(f,p,C,V){}merge(f,p,C,V){}refreshAuthToken(f){}refreshAppCheckToken(f){}onDisconnectPut(f,p,C){}onDisconnectMerge(f,p,C){}onDisconnectCancel(f,p){}reportStats(f){}}class Vi{constructor(f){this.allowedEvents_=f,this.listeners_={},(0,$.hu)(Array.isArray(f)&&f.length>0,"Requires a non-empty array")}trigger(f,...p){if(Array.isArray(this.listeners_[f])){const C=[...this.listeners_[f]];for(let V=0;Vp===f),"Unknown event: "+f)}}class Pi extends Vi{constructor(){super(["online"]),this.online_=!0,typeof window<"u"&&typeof window.addEventListener<"u"&&!(0,$.uI)()&&(window.addEventListener("online",()=>{this.online_||(this.online_=!0,this.trigger("online",!0))},!1),window.addEventListener("offline",()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))},!1))}static getInstance(){return new Pi}getInitialEvent(f){return(0,$.hu)("online"===f,"Unknown event type: "+f),[this.online_]}currentlyOnline(){return this.online_}}const di=32,Ao=768;class dr{constructor(f,p){if(void 0===p){this.pieces_=f.split("/");let C=0;for(let V=0;V0&&(this.pieces_[C]=this.pieces_[V],C++);this.pieces_.length=C,this.pieceNum_=0}else this.pieces_=f,this.pieceNum_=p}toString(){let f="";for(let p=this.pieceNum_;p=y.pieces_.length?null:y.pieces_[y.pieceNum_]}function Yi(y){return y.pieces_.length-y.pieceNum_}function kr(y){let f=y.pieceNum_;return f=y.pieces_.length)return null;const f=[];for(let p=y.pieceNum_;p0&&p.push(C[V])}return new dr(p,0)}function br(y){return y.pieceNum_>=y.pieces_.length}function gi(y,f){const p=pr(y),C=pr(f);if(null===p)return f;if(p===C)return gi(kr(y),kr(f));throw new Error("INTERNAL ERROR: innerPath ("+f+") is not within outerPath ("+y+")")}function uo(y,f){if(Yi(y)!==Yi(f))return!1;for(let p=y.pieceNum_,C=f.pieceNum_;p<=y.pieces_.length;p++,C++)if(y.pieces_[p]!==f.pieces_[C])return!1;return!0}function Mi(y,f){let p=y.pieceNum_,C=f.pieceNum_;if(Yi(y)>Yi(f))return!1;for(;pAo)throw new Error(y.errorPrefix_+"has a key path longer than "+Ao+" bytes ("+y.byteLength_+").");if(y.parts_.length>di)throw new Error(y.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+di+") or object contains a cycle "+Fi(y))}function Fi(y){return 0===y.parts_.length?"":"in property '"+y.parts_.join(".")+"'"}class $i extends Vi{constructor(){let f,p;super(["visible"]),typeof document<"u"&&typeof document.addEventListener<"u"&&(typeof document.hidden<"u"?(p="visibilitychange",f="hidden"):typeof document.mozHidden<"u"?(p="mozvisibilitychange",f="mozHidden"):typeof document.msHidden<"u"?(p="msvisibilitychange",f="msHidden"):typeof document.webkitHidden<"u"&&(p="webkitvisibilitychange",f="webkitHidden")),this.visible_=!0,p&&document.addEventListener(p,()=>{const C=!document[f];C!==this.visible_&&(this.visible_=C,this.trigger("visible",C))},!1)}static getInstance(){return new $i}getInitialEvent(f){return(0,$.hu)("visible"===f,"Unknown event type: "+f),[this.visible_]}}const hi=1e3;let Ki,Es=(()=>{class y extends Wi{constructor(p,C,V,ne,de,Ne,ot,at){if(super(),this.repoInfo_=p,this.applicationId_=C,this.onDataUpdate_=V,this.onConnectStatus_=ne,this.onServerInfoUpdate_=de,this.authTokenProvider_=Ne,this.appCheckTokenProvider_=ot,this.authOverride_=at,this.id=y.nextPersistentConnectionId_++,this.log_=cr("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=hi,this.maxReconnectDelay_=3e5,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,at&&!(0,$.Yr)())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");$i.getInstance().on("visible",this.onVisible_,this),-1===p.host.indexOf("fblocal")&&Pi.getInstance().on("online",this.onOnline_,this)}sendRequest(p,C,V){const ne=++this.requestNumber_,de={r:ne,a:p,b:C};this.log_((0,$.Wl)(de)),(0,$.hu)(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(de),V&&(this.requestCBHash_[ne]=V)}get(p){this.initConnection_();const C=new $.BH,ne={action:"g",request:{p:p._path.toString(),q:p._queryObject},onComplete:Ne=>{const ot=Ne.d;"ok"===Ne.s?C.resolve(ot):C.reject(ot)}};return this.outstandingGets_.push(ne),this.outstandingGetCount_++,this.connected_&&this.sendGet_(this.outstandingGets_.length-1),C.promise}listen(p,C,V,ne){this.initConnection_();const de=p._queryIdentifier,Ne=p._path.toString();this.log_("Listen called for "+Ne+" "+de),this.listens.has(Ne)||this.listens.set(Ne,new Map),(0,$.hu)(p._queryParams.isDefault()||!p._queryParams.loadsAllData(),"listen() called for non-default but complete query"),(0,$.hu)(!this.listens.get(Ne).has(de),"listen() called twice for same path/queryId.");const ot={onComplete:ne,hashFn:C,query:p,tag:V};this.listens.get(Ne).set(de,ot),this.connected_&&this.sendListen_(ot)}sendGet_(p){const C=this.outstandingGets_[p];this.sendRequest("g",C.request,V=>{delete this.outstandingGets_[p],this.outstandingGetCount_--,0===this.outstandingGetCount_&&(this.outstandingGets_=[]),C.onComplete&&C.onComplete(V)})}sendListen_(p){const C=p.query,V=C._path.toString(),ne=C._queryIdentifier;this.log_("Listen on "+V+" for "+ne);const de={p:V};p.tag&&(de.q=C._queryObject,de.t=p.tag),de.h=p.hashFn(),this.sendRequest("q",de,ot=>{const at=ot.d,Bt=ot.s;y.warnOnListenWarnings_(at,C),(this.listens.get(V)&&this.listens.get(V).get(ne))===p&&(this.log_("listen response",ot),"ok"!==Bt&&this.removeListen_(V,ne),p.onComplete&&p.onComplete(Bt,at))})}static warnOnListenWarnings_(p,C){if(p&&"object"==typeof p&&(0,$.r3)(p,"w")){const V=(0,$.DV)(p,"w");if(Array.isArray(V)&&~V.indexOf("no_index")){const ne='".indexOn": "'+C._queryParams.getIndex().toString()+'"',de=C._path.toString();Mn(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${ne} at ${de} to your security rules for better performance.`)}}}refreshAuthToken(p){this.authToken_=p,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},()=>{}),this.reduceReconnectDelayIfAdminCredential_(p)}reduceReconnectDelayIfAdminCredential_(p){(p&&40===p.length||(0,$.GJ)(p))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)}refreshAppCheckToken(p){this.appCheckToken_=p,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},()=>{})}tryAuth(){if(this.connected_&&this.authToken_){const p=this.authToken_,C=(0,$.w9)(p)?"auth":"gauth",V={cred:p};null===this.authOverride_?V.noauth=!0:"object"==typeof this.authOverride_&&(V.authvar=this.authOverride_),this.sendRequest(C,V,ne=>{const de=ne.s,Ne=ne.d||"error";this.authToken_===p&&("ok"===de?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(de,Ne))})}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},p=>{const C=p.s,V=p.d||"error";"ok"===C?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(C,V)})}unlisten(p,C){const V=p._path.toString(),ne=p._queryIdentifier;this.log_("Unlisten called for "+V+" "+ne),(0,$.hu)(p._queryParams.isDefault()||!p._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(V,ne)&&this.connected_&&this.sendUnlisten_(V,ne,p._queryObject,C)}sendUnlisten_(p,C,V,ne){this.log_("Unlisten on "+p+" for "+C);const de={p};ne&&(de.q=V,de.t=ne),this.sendRequest("n",de)}onDisconnectPut(p,C,V){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",p,C,V):this.onDisconnectRequestQueue_.push({pathString:p,action:"o",data:C,onComplete:V})}onDisconnectMerge(p,C,V){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",p,C,V):this.onDisconnectRequestQueue_.push({pathString:p,action:"om",data:C,onComplete:V})}onDisconnectCancel(p,C){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",p,null,C):this.onDisconnectRequestQueue_.push({pathString:p,action:"oc",data:null,onComplete:C})}sendOnDisconnect_(p,C,V,ne){const de={p:C,d:V};this.log_("onDisconnect "+p,de),this.sendRequest(p,de,Ne=>{ne&&setTimeout(()=>{ne(Ne.s,Ne.d)},Math.floor(0))})}put(p,C,V,ne){this.putInternal("p",p,C,V,ne)}merge(p,C,V,ne){this.putInternal("m",p,C,V,ne)}putInternal(p,C,V,ne,de){this.initConnection_();const Ne={p:C,d:V};void 0!==de&&(Ne.h=de),this.outstandingPuts_.push({action:p,request:Ne,onComplete:ne}),this.outstandingPutCount_++,this.connected_?this.sendPut_(this.outstandingPuts_.length-1):this.log_("Buffering put: "+C)}sendPut_(p){const C=this.outstandingPuts_[p].action,V=this.outstandingPuts_[p].request,ne=this.outstandingPuts_[p].onComplete;this.outstandingPuts_[p].queued=this.connected_,this.sendRequest(C,V,de=>{this.log_(C+" response",de),delete this.outstandingPuts_[p],this.outstandingPutCount_--,0===this.outstandingPutCount_&&(this.outstandingPuts_=[]),ne&&ne(de.s,de.d)})}reportStats(p){if(this.connected_){const C={c:p};this.log_("reportStats",C),this.sendRequest("s",C,V=>{"ok"!==V.s&&this.log_("reportStats","Error sending stats: "+V.d)})}}onDataMessage_(p){if("r"in p){this.log_("from server: "+(0,$.Wl)(p));const C=p.r,V=this.requestCBHash_[C];V&&(delete this.requestCBHash_[C],V(p.b))}else{if("error"in p)throw"A server-side error has occurred: "+p.error;"a"in p&&this.onDataPush_(p.a,p.b)}}onDataPush_(p,C){this.log_("handleServerMessage",p,C),"d"===p?this.onDataUpdate_(C.p,C.d,!1,C.t):"m"===p?this.onDataUpdate_(C.p,C.d,!0,C.t):"c"===p?this.onListenRevoked_(C.p,C.q):"ac"===p?this.onAuthRevoked_(C.s,C.d):"apc"===p?this.onAppCheckRevoked_(C.s,C.d):"sd"===p?this.onSecurityDebugPacket_(C):Dn("Unrecognized action received from server: "+(0,$.Wl)(p)+"\nAre you using the latest client?")}onReady_(p,C){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(p),this.lastSessionId=C,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(p){(0,$.hu)(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(()=>{this.establishConnectionTimer_=null,this.establishConnection_()},Math.floor(p))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(p){p&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=hi,this.realtime_||this.scheduleConnect_(0)),this.visible_=p}onOnline_(p){p?(this.log_("Browser went online."),this.reconnectDelay_=hi,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){this.visible_?this.lastConnectionEstablishedTime_&&((new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=hi),this.lastConnectionEstablishedTime_=null):(this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime());const p=(new Date).getTime()-this.lastConnectionAttemptTime_;let C=Math.max(0,this.reconnectDelay_-p);C=Math.random()*C,this.log_("Trying to reconnect in "+C+"ms"),this.scheduleConnect_(C),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)}establishConnection_(){var p=this;return(0,Ee.Z)(function*(){if(p.shouldReconnect_()){p.log_("Making a connection attempt"),p.lastConnectionAttemptTime_=(new Date).getTime(),p.lastConnectionEstablishedTime_=null;const C=p.onDataMessage_.bind(p),V=p.onReady_.bind(p),ne=p.onRealtimeDisconnect_.bind(p),de=p.id+":"+y.nextConnectionId_++,Ne=p.lastSessionId;let ot=!1,at=null;const Bt=function(){at?at.close():(ot=!0,ne())};p.realtime_={close:Bt,sendRequest:function(Un){(0,$.hu)(at,"sendRequest call when we're not connected not allowed."),at.sendRequest(Un)}};const Qt=p.forceTokenRefresh_;p.forceTokenRefresh_=!1;try{const[Un,gr]=yield Promise.all([p.authTokenProvider_.getToken(Qt),p.appCheckTokenProvider_.getToken(Qt)]);ot?Sn("getToken() completed but was canceled"):(Sn("getToken() completed. Creating connection."),p.authToken_=Un&&Un.accessToken,p.appCheckToken_=gr&&gr.token,at=new is(de,p.repoInfo_,p.applicationId_,p.appCheckToken_,p.authToken_,C,V,ne,Ei=>{Mn(Ei+" ("+p.repoInfo_.toString()+")"),p.interrupt("server_kill")},Ne))}catch(Un){p.log_("Failed to get token: "+Un),ot||(p.repoInfo_.nodeAdmin&&Mn(Un),Bt())}}})()}interrupt(p){Sn("Interrupting connection for reason: "+p),this.interruptReasons_[p]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(p){Sn("Resuming connection for reason: "+p),delete this.interruptReasons_[p],(0,$.xb)(this.interruptReasons_)&&(this.reconnectDelay_=hi,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(p){const C=p-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:C})}cancelSentTransactions_(){for(let p=0;ppn(de)).join("$"):"default";const ne=this.removeListen_(p,V);ne&&ne.onComplete&&ne.onComplete("permission_denied")}removeListen_(p,C){const V=new dr(p).toString();let ne;if(this.listens.has(V)){const de=this.listens.get(V);ne=de.get(C),de.delete(C),0===de.size&&this.listens.delete(V)}else ne=void 0;return ne}onAuthRevoked_(p,C){Sn("Auth token revoked: "+p+"/"+C),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),("invalid_token"===p||"permission_denied"===p)&&(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(p,C){Sn("App check token revoked: "+p+"/"+C),this.appCheckToken_=null,this.forceTokenRefresh_=!0,("invalid_token"===p||"permission_denied"===p)&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=3&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(p){this.securityDebugCallback_?this.securityDebugCallback_(p):"msg"in p&&console.log("FIREBASE: "+p.msg.replace("\n","\nFIREBASE: "))}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const p of this.listens.values())for(const C of p.values())this.sendListen_(C);for(let p=0;p0}peek(){if(0===this.nodeStack_.length)return null;const f=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(f.key,f.value):{key:f.key,value:f.value}}}let ns,Zi=(()=>{class y{constructor(p,C,V,ne,de){this.key=p,this.value=C,this.color=V??y.RED,this.left=ne??Si.EMPTY_NODE,this.right=de??Si.EMPTY_NODE}copy(p,C,V,ne,de){return new y(p??this.key,C??this.value,V??this.color,ne??this.left,de??this.right)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(p){return this.left.inorderTraversal(p)||!!p(this.key,this.value)||this.right.inorderTraversal(p)}reverseTraversal(p){return this.right.reverseTraversal(p)||p(this.key,this.value)||this.left.reverseTraversal(p)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(p,C,V){let ne=this;const de=V(p,ne.key);return ne=de<0?ne.copy(null,null,null,ne.left.insert(p,C,V),null):0===de?ne.copy(null,C,null,null,null):ne.copy(null,null,null,null,ne.right.insert(p,C,V)),ne.fixUp_()}removeMin_(){if(this.left.isEmpty())return Si.EMPTY_NODE;let p=this;return!p.left.isRed_()&&!p.left.left.isRed_()&&(p=p.moveRedLeft_()),p=p.copy(null,null,null,p.left.removeMin_(),null),p.fixUp_()}remove(p,C){let V,ne;if(V=this,C(p,V.key)<0)!V.left.isEmpty()&&!V.left.isRed_()&&!V.left.left.isRed_()&&(V=V.moveRedLeft_()),V=V.copy(null,null,null,V.left.remove(p,C),null);else{if(V.left.isRed_()&&(V=V.rotateRight_()),!V.right.isEmpty()&&!V.right.isRed_()&&!V.right.left.isRed_()&&(V=V.moveRedRight_()),0===C(p,V.key)){if(V.right.isEmpty())return Si.EMPTY_NODE;ne=V.right.min_(),V=V.copy(ne.key,ne.value,null,null,V.right.removeMin_())}V=V.copy(null,null,null,null,V.right.remove(p,C))}return V.fixUp_()}isRed_(){return this.color}fixUp_(){let p=this;return p.right.isRed_()&&!p.left.isRed_()&&(p=p.rotateLeft_()),p.left.isRed_()&&p.left.left.isRed_()&&(p=p.rotateRight_()),p.left.isRed_()&&p.right.isRed_()&&(p=p.colorFlip_()),p}moveRedLeft_(){let p=this.colorFlip_();return p.right.left.isRed_()&&(p=p.copy(null,null,null,null,p.right.rotateRight_()),p=p.rotateLeft_(),p=p.colorFlip_()),p}moveRedRight_(){let p=this.colorFlip_();return p.left.left.isRed_()&&(p=p.rotateRight_(),p=p.colorFlip_()),p}rotateLeft_(){const p=this.copy(null,null,y.RED,null,this.right.left);return this.right.copy(null,null,this.color,p,null)}rotateRight_(){const p=this.copy(null,null,y.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,p)}colorFlip_(){const p=this.left.copy(null,null,!this.left.color,null,null),C=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,p,C)}checkMaxDepth_(){const p=this.check_();return Math.pow(2,p)<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");const p=this.left.check_();if(p!==this.right.check_())throw new Error("Black depths differ");return p+(this.isRed_()?0:1)}}return y.RED=!0,y.BLACK=!1,y})();class Si{constructor(f,p=Si.EMPTY_NODE){this.comparator_=f,this.root_=p}insert(f,p){return new Si(this.comparator_,this.root_.insert(f,p,this.comparator_).copy(null,null,Zi.BLACK,null,null))}remove(f){return new Si(this.comparator_,this.root_.remove(f,this.comparator_).copy(null,null,Zi.BLACK,null,null))}get(f){let p,C=this.root_;for(;!C.isEmpty();){if(p=this.comparator_(f,C.key),0===p)return C.value;p<0?C=C.left:p>0&&(C=C.right)}return null}getPredecessorKey(f){let p,C=this.root_,V=null;for(;!C.isEmpty();){if(p=this.comparator_(f,C.key),0===p){if(C.left.isEmpty())return V?V.key:null;for(C=C.left;!C.right.isEmpty();)C=C.right;return C.key}p<0?C=C.left:p>0&&(V=C,C=C.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(f){return this.root_.inorderTraversal(f)}reverseTraversal(f){return this.root_.reverseTraversal(f)}getIterator(f){return new os(this.root_,null,this.comparator_,!1,f)}getIteratorFrom(f,p){return new os(this.root_,f,this.comparator_,!1,p)}getReverseIteratorFrom(f,p){return new os(this.root_,f,this.comparator_,!0,p)}getReverseIterator(f){return new os(this.root_,null,this.comparator_,!0,f)}}function Ui(y,f){return sr(y.name,f.name)}function Cs(y,f){return sr(y,f)}Si.EMPTY_NODE=new class no{copy(f,p,C,V,ne){return this}insert(f,p,C){return new Zi(f,p,null)}remove(f,p){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(f){return!1}reverseTraversal(f){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}};const Ke=function(y){return"number"==typeof y?"number:"+xt(y):"string:"+y},yt=function(y){if(y.isLeafNode()){const f=y.val();(0,$.hu)("string"==typeof f||"number"==typeof f||"object"==typeof f&&(0,$.r3)(f,".sv"),"Priority must be a string or number.")}else(0,$.hu)(y===ns||y.isEmpty(),"priority of unexpected type.");(0,$.hu)(y===ns||y.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};let Rt,Tn,An,rn=(()=>{class y{constructor(p,C=y.__childrenNodeConstructor.EMPTY_NODE){this.value_=p,this.priorityNode_=C,this.lazyHash_=null,(0,$.hu)(null!=this.value_,"LeafNode shouldn't be created with null/undefined value."),yt(this.priorityNode_)}static set __childrenNodeConstructor(p){Rt=p}static get __childrenNodeConstructor(){return Rt}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(p){return new y(this.value_,p)}getImmediateChild(p){return".priority"===p?this.priorityNode_:y.__childrenNodeConstructor.EMPTY_NODE}getChild(p){return br(p)?this:".priority"===pr(p)?this.priorityNode_:y.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(p,C){return null}updateImmediateChild(p,C){return".priority"===p?this.updatePriority(C):C.isEmpty()&&".priority"!==p?this:y.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(p,C).updatePriority(this.priorityNode_)}updateChild(p,C){const V=pr(p);return null===V?C:C.isEmpty()&&".priority"!==V?this:((0,$.hu)(".priority"!==V||1===Yi(p),".priority must be the last token in a path"),this.updateImmediateChild(V,y.__childrenNodeConstructor.EMPTY_NODE.updateChild(kr(p),C)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(p,C){return!1}val(p){return p&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(null===this.lazyHash_){let p="";this.priorityNode_.isEmpty()||(p+="priority:"+Ke(this.priorityNode_.val())+":");const C=typeof this.value_;p+=C+":",p+="number"===C?xt(this.value_):this.value_,this.lazyHash_=Yt(p)}return this.lazyHash_}getValue(){return this.value_}compareTo(p){return p===y.__childrenNodeConstructor.EMPTY_NODE?1:p instanceof y.__childrenNodeConstructor?-1:((0,$.hu)(p.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(p))}compareToLeafNode_(p){const C=typeof p.value_,V=typeof this.value_,ne=y.VALUE_TYPE_ORDER.indexOf(C),de=y.VALUE_TYPE_ORDER.indexOf(V);return(0,$.hu)(ne>=0,"Unknown leaf type: "+C),(0,$.hu)(de>=0,"Unknown leaf type: "+V),ne===de?"object"===V?0:this.value_parseInt(Array(this.count+1).join("1"),2))();this.bits_=f+1&V}nextBitIsOne(){const f=!(this.bits_&1<{const de=(0,$.DV)(this.indexSet_,ne);if((0,$.hu)(de,"Missing index implementation for "+ne),V===bs){if(de.isDefinedOn(f.node)){const Ne=[],ot=p.getIterator(Ir.Wrap);let at=ot.getNext();for(;at;)at.name!==f.name&&Ne.push(at),at=ot.getNext();return Ne.push(f),Ci(Ne,de.getCompare())}return bs}{const Ne=p.get(f.name);let ot=V;return Ne&&(ot=ot.remove(new Ir(f.name,Ne))),ot.insert(f,f.node)}});return new wi(C,this.indexSet_)}removeFromIndexes(f,p){const C=(0,$.UI)(this.indexes_,V=>{if(V===bs)return V;{const ne=p.get(f.name);return ne?V.remove(new Ir(f.name,ne)):V}});return new wi(C,this.indexSet_)}}let Ri,mr=(()=>{class y{constructor(p,C,V){this.children_=p,this.priorityNode_=C,this.indexMap_=V,this.lazyHash_=null,this.priorityNode_&&yt(this.priorityNode_),this.children_.isEmpty()&&(0,$.hu)(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}static get EMPTY_NODE(){return Ri||(Ri=new y(new Si(Cs),null,wi.Default))}isLeafNode(){return!1}getPriority(){return this.priorityNode_||Ri}updatePriority(p){return this.children_.isEmpty()?this:new y(this.children_,p,this.indexMap_)}getImmediateChild(p){if(".priority"===p)return this.getPriority();{const C=this.children_.get(p);return null===C?Ri:C}}getChild(p){const C=pr(p);return null===C?this:this.getImmediateChild(C).getChild(kr(p))}hasChild(p){return null!==this.children_.get(p)}updateImmediateChild(p,C){if((0,$.hu)(C,"We should always be passing snapshot nodes"),".priority"===p)return this.updatePriority(C);{const V=new Ir(p,C);let ne,de;C.isEmpty()?(ne=this.children_.remove(p),de=this.indexMap_.removeFromIndexes(V,this.children_)):(ne=this.children_.insert(p,C),de=this.indexMap_.addToIndexes(V,this.children_));const Ne=ne.isEmpty()?Ri:this.priorityNode_;return new y(ne,Ne,de)}}updateChild(p,C){const V=pr(p);if(null===V)return C;{(0,$.hu)(".priority"!==pr(p)||1===Yi(p),".priority must be the last token in a path");const ne=this.getImmediateChild(V).updateChild(kr(p),C);return this.updateImmediateChild(V,ne)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(p){if(this.isEmpty())return null;const C={};let V=0,ne=0,de=!0;if(this.forEachChild(or,(Ne,ot)=>{C[Ne]=ot.val(p),V++,de&&y.INTEGER_REGEXP_.test(Ne)?ne=Math.max(ne,Number(Ne)):de=!1}),!p&&de&&ne<2*V){const Ne=[];for(const ot in C)Ne[ot]=C[ot];return Ne}return p&&!this.getPriority().isEmpty()&&(C[".priority"]=this.getPriority().val()),C}hash(){if(null===this.lazyHash_){let p="";this.getPriority().isEmpty()||(p+="priority:"+Ke(this.getPriority().val())+":"),this.forEachChild(or,(C,V)=>{const ne=V.hash();""!==ne&&(p+=":"+C+":"+ne)}),this.lazyHash_=""===p?"":Yt(p)}return this.lazyHash_}getPredecessorChildName(p,C,V){const ne=this.resolveIndex_(V);if(ne){const de=ne.getPredecessorKey(new Ir(p,C));return de?de.name:null}return this.children_.getPredecessorKey(p)}getFirstChildName(p){const C=this.resolveIndex_(p);if(C){const V=C.minKey();return V&&V.name}return this.children_.minKey()}getFirstChild(p){const C=this.getFirstChildName(p);return C?new Ir(C,this.children_.get(C)):null}getLastChildName(p){const C=this.resolveIndex_(p);if(C){const V=C.maxKey();return V&&V.name}return this.children_.maxKey()}getLastChild(p){const C=this.getLastChildName(p);return C?new Ir(C,this.children_.get(C)):null}forEachChild(p,C){const V=this.resolveIndex_(p);return V?V.inorderTraversal(ne=>C(ne.name,ne.node)):this.children_.inorderTraversal(C)}getIterator(p){return this.getIteratorFrom(p.minPost(),p)}getIteratorFrom(p,C){const V=this.resolveIndex_(C);if(V)return V.getIteratorFrom(p,ne=>ne);{const ne=this.children_.getIteratorFrom(p.name,Ir.Wrap);let de=ne.peek();for(;null!=de&&C.compare(de,p)<0;)ne.getNext(),de=ne.peek();return ne}}getReverseIterator(p){return this.getReverseIteratorFrom(p.maxPost(),p)}getReverseIteratorFrom(p,C){const V=this.resolveIndex_(C);if(V)return V.getReverseIteratorFrom(p,ne=>ne);{const ne=this.children_.getReverseIteratorFrom(p.name,Ir.Wrap);let de=ne.peek();for(;null!=de&&C.compare(de,p)>0;)ne.getNext(),de=ne.peek();return ne}}compareTo(p){return this.isEmpty()?p.isEmpty()?0:-1:p.isLeafNode()||p.isEmpty()?1:p===ro?-1:0}withIndex(p){if(p===Ii||this.indexMap_.hasIndex(p))return this;{const C=this.indexMap_.addIndex(p,this.children_);return new y(this.children_,this.priorityNode_,C)}}isIndexed(p){return p===Ii||this.indexMap_.hasIndex(p)}equals(p){if(p===this)return!0;if(p.isLeafNode())return!1;{const C=p;if(this.getPriority().equals(C.getPriority())){if(this.children_.count()===C.children_.count()){const V=this.getIterator(or),ne=C.getIterator(or);let de=V.getNext(),Ne=ne.getNext();for(;de&&Ne;){if(de.name!==Ne.name||!de.node.equals(Ne.node))return!1;de=V.getNext(),Ne=ne.getNext()}return null===de&&null===Ne}return!1}return!1}}resolveIndex_(p){return p===Ii?null:this.indexMap_.get(p.toString())}}return y.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,y})();const ro=new class ho extends mr{constructor(){super(new Si(Cs),mr.EMPTY_NODE,wi.Default)}compareTo(f){return f===this?0:1}equals(f){return f===this}getPriority(){return this}getImmediateChild(f){return mr.EMPTY_NODE}isEmpty(){return!1}};Object.defineProperties(Ir,{MIN:{value:new Ir(Zn,mr.EMPTY_NODE)},MAX:{value:new Ir(Vn,ro)}}),qi.__EMPTY_NODE=mr.EMPTY_NODE,rn.__childrenNodeConstructor=mr,function Ue(y){ns=y}(ro),function ci(y){An=y}(ro);const ua=!0;function x(y,f=null){if(null===y)return mr.EMPTY_NODE;if("object"==typeof y&&".priority"in y&&(f=y[".priority"]),(0,$.hu)(null===f||"string"==typeof f||"number"==typeof f||"object"==typeof f&&".sv"in f,"Invalid priority type found: "+typeof f),"object"==typeof y&&".value"in y&&null!==y[".value"]&&(y=y[".value"]),"object"!=typeof y||".sv"in y)return new rn(y,x(f));if(y instanceof Array||!ua){let p=mr.EMPTY_NODE;return Ut(y,(C,V)=>{if((0,$.r3)(y,C)&&"."!==C.substring(0,1)){const ne=x(V);(ne.isLeafNode()||!ne.isEmpty())&&(p=p.updateImmediateChild(C,ne))}}),p.updatePriority(x(f))}{const p=[];let C=!1;if(Ut(y,(de,Ne)=>{if("."!==de.substring(0,1)){const ot=x(Ne);ot.isEmpty()||(C=C||!ot.getPriority().isEmpty(),p.push(new Ir(de,ot)))}}),0===p.length)return mr.EMPTY_NODE;const ne=Ci(p,Ui,de=>de.name,Cs);if(C){const de=Ci(p,or.getCompare());return new mr(ne,x(f),new wi({".priority":de},{".priority":or}))}return new mr(ne,x(f),wi.Default)}}!function Or(y){Tn=y}(x);class w extends ts{constructor(f){super(),this.indexPath_=f,(0,$.hu)(!br(f)&&".priority"!==pr(f),"Can't create PathIndex with empty path or .priority key")}extractChild(f){return f.getChild(this.indexPath_)}isDefinedOn(f){return!f.getChild(this.indexPath_).isEmpty()}compare(f,p){const C=this.extractChild(f.node),V=this.extractChild(p.node),ne=C.compareTo(V);return 0===ne?sr(f.name,p.name):ne}makePost(f,p){const C=x(f),V=mr.EMPTY_NODE.updateChild(this.indexPath_,C);return new Ir(p,V)}maxPost(){const f=mr.EMPTY_NODE.updateChild(this.indexPath_,ro);return new Ir(Vn,f)}toString(){return ys(this.indexPath_,0).join("/")}}const S=new class v extends ts{compare(f,p){const C=f.node.compareTo(p.node);return 0===C?sr(f.name,p.name):C}isDefinedOn(f){return!0}indexedValueChanged(f,p){return!f.equals(p)}minPost(){return Ir.MIN}maxPost(){return Ir.MAX}makePost(f,p){const C=x(f);return new Ir(p,C)}toString(){return".value"}};function Q(y){return{type:"value",snapshotNode:y}}function Ze(y,f){return{type:"child_added",snapshotNode:f,childName:y}}function Ot(y,f){return{type:"child_removed",snapshotNode:f,childName:y}}function hn(y,f,p){return{type:"child_changed",snapshotNode:f,childName:y,oldSnap:p}}class Pr{constructor(f){this.index_=f}updateChild(f,p,C,V,ne,de){(0,$.hu)(f.isIndexed(this.index_),"A node must be indexed if only a child is updated");const Ne=f.getImmediateChild(p);return Ne.getChild(V).equals(C.getChild(V))&&Ne.isEmpty()===C.isEmpty()||(null!=de&&(C.isEmpty()?f.hasChild(p)?de.trackChildChange(Ot(p,Ne)):(0,$.hu)(f.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):Ne.isEmpty()?de.trackChildChange(Ze(p,C)):de.trackChildChange(hn(p,C,Ne))),f.isLeafNode()&&C.isEmpty())?f:f.updateImmediateChild(p,C).withIndex(this.index_)}updateFullNode(f,p,C){return null!=C&&(f.isLeafNode()||f.forEachChild(or,(V,ne)=>{p.hasChild(V)||C.trackChildChange(Ot(V,ne))}),p.isLeafNode()||p.forEachChild(or,(V,ne)=>{if(f.hasChild(V)){const de=f.getImmediateChild(V);de.equals(ne)||C.trackChildChange(hn(V,ne,de))}else C.trackChildChange(Ze(V,ne))})),p.withIndex(this.index_)}updatePriority(f,p){return f.isEmpty()?mr.EMPTY_NODE:f.updatePriority(p)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}class Zr{constructor(f){this.indexedFilter_=new Pr(f.getIndex()),this.index_=f.getIndex(),this.startPost_=Zr.getStartPost_(f),this.endPost_=Zr.getEndPost_(f),this.startIsInclusive_=!f.startAfterSet_,this.endIsInclusive_=!f.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(f){const p=this.startIsInclusive_?this.index_.compare(this.getStartPost(),f)<=0:this.index_.compare(this.getStartPost(),f)<0,C=this.endIsInclusive_?this.index_.compare(f,this.getEndPost())<=0:this.index_.compare(f,this.getEndPost())<0;return p&&C}updateChild(f,p,C,V,ne,de){return this.matches(new Ir(p,C))||(C=mr.EMPTY_NODE),this.indexedFilter_.updateChild(f,p,C,V,ne,de)}updateFullNode(f,p,C){p.isLeafNode()&&(p=mr.EMPTY_NODE);let V=p.withIndex(this.index_);V=V.updatePriority(mr.EMPTY_NODE);const ne=this;return p.forEachChild(or,(de,Ne)=>{ne.matches(new Ir(de,Ne))||(V=V.updateImmediateChild(de,mr.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(f,V,C)}updatePriority(f,p){return f}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(f){if(f.hasStart()){const p=f.getIndexStartName();return f.getIndex().makePost(f.getIndexStartValue(),p)}return f.getIndex().minPost()}static getEndPost_(f){if(f.hasEnd()){const p=f.getIndexEndName();return f.getIndex().makePost(f.getIndexEndValue(),p)}return f.getIndex().maxPost()}}class ii{constructor(f){this.withinDirectionalStart=p=>this.reverse_?this.withinEndPost(p):this.withinStartPost(p),this.withinDirectionalEnd=p=>this.reverse_?this.withinStartPost(p):this.withinEndPost(p),this.withinStartPost=p=>{const C=this.index_.compare(this.rangedFilter_.getStartPost(),p);return this.startIsInclusive_?C<=0:C<0},this.withinEndPost=p=>{const C=this.index_.compare(p,this.rangedFilter_.getEndPost());return this.endIsInclusive_?C<=0:C<0},this.rangedFilter_=new Zr(f),this.index_=f.getIndex(),this.limit_=f.getLimit(),this.reverse_=!f.isViewFromLeft(),this.startIsInclusive_=!f.startAfterSet_,this.endIsInclusive_=!f.endBeforeSet_}updateChild(f,p,C,V,ne,de){return this.rangedFilter_.matches(new Ir(p,C))||(C=mr.EMPTY_NODE),f.getImmediateChild(p).equals(C)?f:f.numChildren()Zt(Un,Qt)}else de=this.index_.getCompare();const Ne=f;(0,$.hu)(Ne.numChildren()===this.limit_,"");const ot=new Ir(p,C),at=this.reverse_?Ne.getFirstChild(this.index_):Ne.getLastChild(this.index_),Bt=this.rangedFilter_.matches(ot);if(Ne.hasChild(p)){const Zt=Ne.getImmediateChild(p);let Qt=V.getChildAfterChild(this.index_,at,this.reverse_);for(;null!=Qt&&(Qt.name===p||Ne.hasChild(Qt.name));)Qt=V.getChildAfterChild(this.index_,Qt,this.reverse_);const Un=null==Qt?1:de(Qt,ot);if(Bt&&!C.isEmpty()&&Un>=0)return ne?.trackChildChange(hn(p,C,Zt)),Ne.updateImmediateChild(p,C);{ne?.trackChildChange(Ot(p,Zt));const Ei=Ne.updateImmediateChild(p,mr.EMPTY_NODE);return null!=Qt&&this.rangedFilter_.matches(Qt)?(ne?.trackChildChange(Ze(Qt.name,Qt.node)),Ei.updateImmediateChild(Qt.name,Qt.node)):Ei}}return C.isEmpty()?f:Bt&&de(at,ot)>=0?(null!=ne&&(ne.trackChildChange(Ot(at.name,at.node)),ne.trackChildChange(Ze(p,C))),Ne.updateImmediateChild(p,C).updateImmediateChild(at.name,mr.EMPTY_NODE)):f}}class Ti{constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=or}hasStart(){return this.startSet_}isViewFromLeft(){return""===this.viewFrom_?this.startSet_:"l"===this.viewFrom_}getIndexStartValue(){return(0,$.hu)(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return(0,$.hu)(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:Zn}hasEnd(){return this.endSet_}getIndexEndValue(){return(0,$.hu)(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return(0,$.hu)(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:Vn}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&""!==this.viewFrom_}getLimit(){return(0,$.hu)(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===or}copy(){const f=new Ti;return f.limitSet_=this.limitSet_,f.limit_=this.limit_,f.startSet_=this.startSet_,f.startAfterSet_=this.startAfterSet_,f.indexStartValue_=this.indexStartValue_,f.startNameSet_=this.startNameSet_,f.indexStartName_=this.indexStartName_,f.endSet_=this.endSet_,f.endBeforeSet_=this.endBeforeSet_,f.indexEndValue_=this.indexEndValue_,f.endNameSet_=this.endNameSet_,f.indexEndName_=this.indexEndName_,f.index_=this.index_,f.viewFrom_=this.viewFrom_,f}}function ks(y){const f={};if(y.isDefault())return f;let p;if(y.index_===or?p="$priority":y.index_===S?p="$value":y.index_===Ii?p="$key":((0,$.hu)(y.index_ instanceof w,"Unrecognized index type!"),p=y.index_.toString()),f.orderBy=(0,$.Wl)(p),y.startSet_){const C=y.startAfterSet_?"startAfter":"startAt";f[C]=(0,$.Wl)(y.indexStartValue_),y.startNameSet_&&(f[C]+=","+(0,$.Wl)(y.indexStartName_))}if(y.endSet_){const C=y.endBeforeSet_?"endBefore":"endAt";f[C]=(0,$.Wl)(y.indexEndValue_),y.endNameSet_&&(f[C]+=","+(0,$.Wl)(y.indexEndName_))}return y.limitSet_&&(y.isViewFromLeft()?f.limitToFirst=y.limit_:f.limitToLast=y.limit_),f}function xl(y){const f={};if(y.startSet_&&(f.sp=y.indexStartValue_,y.startNameSet_&&(f.sn=y.indexStartName_),f.sin=!y.startAfterSet_),y.endSet_&&(f.ep=y.indexEndValue_,y.endNameSet_&&(f.en=y.indexEndName_),f.ein=!y.endBeforeSet_),y.limitSet_){f.l=y.limit_;let p=y.viewFrom_;""===p&&(p=y.isViewFromLeft()?"l":"r"),f.vf=p}return y.index_!==or&&(f.i=y.index_.toString()),f}class Xs extends Wi{constructor(f,p,C,V){super(),this.repoInfo_=f,this.onDataUpdate_=p,this.authTokenProvider_=C,this.appCheckTokenProvider_=V,this.log_=cr("p:rest:"),this.listens_={}}reportStats(f){throw new Error("Method not implemented.")}static getListenId_(f,p){return void 0!==p?"tag$"+p:((0,$.hu)(f._queryParams.isDefault(),"should have a tag if it's not a default query."),f._path.toString())}listen(f,p,C,V){const ne=f._path.toString();this.log_("Listen called for "+ne+" "+f._queryIdentifier);const de=Xs.getListenId_(f,C),Ne={};this.listens_[de]=Ne;const ot=ks(f._queryParams);this.restRequest_(ne+".json",ot,(at,Bt)=>{let Zt=Bt;if(404===at&&(Zt=null,at=null),null===at&&this.onDataUpdate_(ne,Zt,!1,C),(0,$.DV)(this.listens_,de)===Ne){let Qt;Qt=at?401===at?"permission_denied":"rest_error:"+at:"ok",V(Qt,null)}})}unlisten(f,p){const C=Xs.getListenId_(f,p);delete this.listens_[C]}get(f){const p=ks(f._queryParams),C=f._path.toString(),V=new $.BH;return this.restRequest_(C+".json",p,(ne,de)=>{let Ne=de;404===ne&&(Ne=null,ne=null),null===ne?(this.onDataUpdate_(C,Ne,!1,null),V.resolve(Ne)):V.reject(new Error(Ne))}),V.promise}refreshAuthToken(f){}restRequest_(f,p={},C){return p.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(([V,ne])=>{V&&V.accessToken&&(p.auth=V.accessToken),ne&&ne.token&&(p.ac=ne.token);const de=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+f+"?ns="+this.repoInfo_.namespace+(0,$.xO)(p);this.log_("Sending REST request for "+de);const Ne=new XMLHttpRequest;Ne.onreadystatechange=()=>{if(C&&4===Ne.readyState){this.log_("REST Response for "+de+" received. status:",Ne.status,"response:",Ne.responseText);let ot=null;if(Ne.status>=200&&Ne.status<300){try{ot=(0,$.cI)(Ne.responseText)}catch{Mn("Failed to parse JSON response for "+de+": "+Ne.responseText)}C(null,ot)}else 401!==Ne.status&&404!==Ne.status&&Mn("Got unsuccessful REST response for "+de+" Status: "+Ne.status),C(Ne.status);C=null}},Ne.open("GET",de,!0),Ne.send()})}}class xo{constructor(){this.rootNode_=mr.EMPTY_NODE}getNode(f){return this.rootNode_.getChild(f)}updateSnapshot(f,p){this.rootNode_=this.rootNode_.updateChild(f,p)}}function va(){return{value:null,children:new Map}}function mo(y,f,p){if(br(f))y.value=p,y.children.clear();else if(null!==y.value)y.value=y.value.updateChild(f,p);else{const C=pr(f);y.children.has(C)||y.children.set(C,va()),mo(y.children.get(C),f=kr(f),p)}}function Ba(y,f,p){null!==y.value?p(f,y.value):function _a(y,f){y.children.forEach((p,C)=>{f(C,p)})}(y,(C,V)=>{Ba(V,new dr(f.toString()+"/"+C),p)})}class Pl{constructor(f){this.collection_=f,this.last_=null}get(){const f=this.collection_.get(),p=Object.assign({},f);return this.last_&&Ut(this.last_,(C,V)=>{p[C]=p[C]-V}),this.last_=f,p}}class Rl{constructor(f,p){this.server_=p,this.statsToReport_={},this.statsListener_=new Pl(f);const C=1e4+2e4*Math.random();Ht(this.reportStats_.bind(this),Math.floor(C))}reportStats_(){const f=this.statsListener_.get(),p={};let C=!1;Ut(f,(V,ne)=>{ne>0&&(0,$.r3)(this.statsToReport_,V)&&(p[V]=ne,C=!0)}),C&&this.server_.reportStats(p),Ht(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))}}var pi=(()=>{return(y=pi||(pi={}))[y.OVERWRITE=0]="OVERWRITE",y[y.MERGE=1]="MERGE",y[y.ACK_USER_WRITE=2]="ACK_USER_WRITE",y[y.LISTEN_COMPLETE=3]="LISTEN_COMPLETE",pi;var y})();function Hs(y){return{fromUser:!1,fromServer:!0,queryId:y,tagged:!0}}class ai{constructor(f,p,C){this.path=f,this.affectedTree=p,this.revert=C,this.type=pi.ACK_USER_WRITE,this.source={fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}operationForChild(f){if(br(this.path)){if(null!=this.affectedTree.value)return(0,$.hu)(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const p=this.affectedTree.subtree(new dr(f));return new ai(ur(),p,this.revert)}}return(0,$.hu)(pr(this.path)===f,"operationForChild called for unrelated child."),new ai(kr(this.path),this.affectedTree,this.revert)}}class fn{constructor(f,p){this.source=f,this.path=p,this.type=pi.LISTEN_COMPLETE}operationForChild(f){return br(this.path)?new fn(this.source,ur()):new fn(this.source,kr(this.path))}}class Di{constructor(f,p,C){this.source=f,this.path=p,this.snap=C,this.type=pi.OVERWRITE}operationForChild(f){return br(this.path)?new Di(this.source,ur(),this.snap.getImmediateChild(f)):new Di(this.source,kr(this.path),this.snap)}}class go{constructor(f,p,C){this.source=f,this.path=p,this.children=C,this.type=pi.MERGE}operationForChild(f){if(br(this.path)){const p=this.children.subtree(new dr(f));return p.isEmpty()?null:p.value?new Di(this.source,ur(),p.value):new go(this.source,ur(),p)}return(0,$.hu)(pr(this.path)===f,"Can't get a merge for a child not on the path of the operation"),new go(this.source,kr(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}class Po{constructor(f,p,C){this.node_=f,this.fullyInitialized_=p,this.filtered_=C}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(f){if(br(f))return this.isFullyInitialized()&&!this.filtered_;const p=pr(f);return this.isCompleteForChild(p)}isCompleteForChild(f){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(f)}getNode(){return this.node_}}class Qn{constructor(f){this.query_=f,this.index_=this.query_._queryParams.getIndex()}}function Mo(y,f,p,C,V,ne){const de=C.filter(Ne=>Ne.type===p);de.sort((Ne,ot)=>function Wt(y,f,p){if(null==f.childName||null==p.childName)throw(0,$.g5)("Should only compare child_ events.");const C=new Ir(f.childName,f.snapshotNode),V=new Ir(p.childName,p.snapshotNode);return y.index_.compare(C,V)}(y,Ne,ot)),de.forEach(Ne=>{const ot=function Nn(y,f,p){return"value"===f.type||"child_removed"===f.type||(f.prevName=p.getPredecessorChildName(f.childName,f.snapshotNode,y.index_)),f}(y,Ne,ne);V.forEach(at=>{at.respondsTo(Ne.type)&&f.push(at.createEvent(ot,y.query_))})})}function j(y,f){return{eventCache:y,serverCache:f}}function ge(y,f,p,C){return j(new Po(f,p,C),y.serverCache)}function oe(y,f,p,C){return j(y.eventCache,new Po(f,p,C))}function Re(y){return y.eventCache.isFullyInitialized()?y.eventCache.getNode():null}function ct(y){return y.serverCache.isFullyInitialized()?y.serverCache.getNode():null}let Kt;class In{constructor(f,p=(()=>(Kt||(Kt=new Si(Tr)),Kt))()){this.value=f,this.children=p}static fromObject(f){let p=new In(null);return Ut(f,(C,V)=>{p=p.set(new dr(C),V)}),p}isEmpty(){return null===this.value&&this.children.isEmpty()}findRootMostMatchingPathAndValue(f,p){if(null!=this.value&&p(this.value))return{path:ur(),value:this.value};if(br(f))return null;{const C=pr(f),V=this.children.get(C);if(null!==V){const ne=V.findRootMostMatchingPathAndValue(kr(f),p);return null!=ne?{path:hr(new dr(C),ne.path),value:ne.value}:null}return null}}findRootMostValueAndPath(f){return this.findRootMostMatchingPathAndValue(f,()=>!0)}subtree(f){if(br(f))return this;{const p=pr(f),C=this.children.get(p);return null!==C?C.subtree(kr(f)):new In(null)}}set(f,p){if(br(f))return new In(p,this.children);{const C=pr(f),ne=(this.children.get(C)||new In(null)).set(kr(f),p),de=this.children.insert(C,ne);return new In(this.value,de)}}remove(f){if(br(f))return this.children.isEmpty()?new In(null):new In(null,this.children);{const p=pr(f),C=this.children.get(p);if(C){const V=C.remove(kr(f));let ne;return ne=V.isEmpty()?this.children.remove(p):this.children.insert(p,V),null===this.value&&ne.isEmpty()?new In(null):new In(this.value,ne)}return this}}get(f){if(br(f))return this.value;{const p=pr(f),C=this.children.get(p);return C?C.get(kr(f)):null}}setTree(f,p){if(br(f))return p;{const C=pr(f),ne=(this.children.get(C)||new In(null)).setTree(kr(f),p);let de;return de=ne.isEmpty()?this.children.remove(C):this.children.insert(C,ne),new In(this.value,de)}}fold(f){return this.fold_(ur(),f)}fold_(f,p){const C={};return this.children.inorderTraversal((V,ne)=>{C[V]=ne.fold_(hr(f,V),p)}),p(f,this.value,C)}findOnPath(f,p){return this.findOnPath_(f,ur(),p)}findOnPath_(f,p,C){const V=!!this.value&&C(p,this.value);if(V)return V;if(br(f))return null;{const ne=pr(f),de=this.children.get(ne);return de?de.findOnPath_(kr(f),hr(p,ne),C):null}}foreachOnPath(f,p){return this.foreachOnPath_(f,ur(),p)}foreachOnPath_(f,p,C){if(br(f))return this;{this.value&&C(p,this.value);const V=pr(f),ne=this.children.get(V);return ne?ne.foreachOnPath_(kr(f),hr(p,V),C):new In(null)}}foreach(f){this.foreach_(ur(),f)}foreach_(f,p){this.children.inorderTraversal((C,V)=>{V.foreach_(hr(f,C),p)}),this.value&&p(f,this.value)}foreachChild(f){this.children.inorderTraversal((p,C)=>{C.value&&f(p,C.value)})}}class Vr{constructor(f){this.writeTree_=f}static empty(){return new Vr(new In(null))}}function Wr(y,f,p){if(br(f))return new Vr(new In(p));{const C=y.writeTree_.findRootMostValueAndPath(f);if(null!=C){const V=C.path;let ne=C.value;const de=gi(V,f);return ne=ne.updateChild(de,p),new Vr(y.writeTree_.set(V,ne))}{const V=new In(p),ne=y.writeTree_.setTree(f,V);return new Vr(ne)}}}function si(y,f,p){let C=y;return Ut(p,(V,ne)=>{C=Wr(C,hr(f,V),ne)}),C}function Yr(y,f){if(br(f))return Vr.empty();{const p=y.writeTree_.setTree(f,new In(null));return new Vr(p)}}function Fr(y,f){return null!=On(y,f)}function On(y,f){const p=y.writeTree_.findRootMostValueAndPath(f);return null!=p?y.writeTree_.get(p.path).getChild(gi(p.path,f)):null}function bi(y){const f=[],p=y.writeTree_.value;return null!=p?p.isLeafNode()||p.forEachChild(or,(C,V)=>{f.push(new Ir(C,V))}):y.writeTree_.children.inorderTraversal((C,V)=>{null!=V.value&&f.push(new Ir(C,V.value))}),f}function ms(y,f){if(br(f))return y;{const p=On(y,f);return new Vr(null!=p?new In(p):y.writeTree_.subtree(f))}}function Nr(y){return y.writeTree_.isEmpty()}function Hn(y,f){return Os(ur(),y.writeTree_,f)}function Os(y,f,p){if(null!=f.value)return p.updateChild(y,f.value);{let C=null;return f.children.inorderTraversal((V,ne)=>{".priority"===V?((0,$.hu)(null!==ne.value,"Priority writes must always be leaf nodes"),C=ne.value):p=Os(hr(y,V),ne,p)}),!p.getChild(y).isEmpty()&&null!==C&&(p=p.updateChild(hr(y,".priority"),C)),p}}function Rr(y,f){return js(f,y)}function ll(y,f){if(y.snap)return Mi(y.path,f);for(const p in y.children)if(y.children.hasOwnProperty(p)&&Mi(hr(y.path,p),f))return!0;return!1}function kl(y){return y.visible}function $a(y,f,p){let C=Vr.empty();for(let V=0;V{C=C.updateImmediateChild(ne,de)}),C;if(p){const ne=ms(y.visibleWrites,f);return p.forEachChild(or,(de,Ne)=>{const ot=Hn(ms(ne,new dr(de)),Ne);C=C.updateImmediateChild(de,ot)}),bi(ne).forEach(de=>{C=C.updateImmediateChild(de.name,de.node)}),C}return bi(ms(y.visibleWrites,f)).forEach(de=>{C=C.updateImmediateChild(de.name,de.node)}),C}(y.writeTree,y.treePath,f)}function dl(y,f,p,C){return function Ea(y,f,p,C,V){(0,$.hu)(C||V,"Either existingEventSnap or existingServerSnap must exist");const ne=hr(f,p);if(Fr(y.visibleWrites,ne))return null;{const de=ms(y.visibleWrites,ne);return Nr(de)?V.getChild(p):Hn(de,V.getChild(p))}}(y.writeTree,y.treePath,f,p,C)}function Lt(y,f){return function Qs(y,f){return On(y.visibleWrites,f)}(y.writeTree,hr(y.treePath,f))}function yo(y,f,p){return function ul(y,f,p,C){const V=hr(f,p),ne=On(y.visibleWrites,V);return null!=ne?ne:C.isCompleteForChild(p)?Hn(ms(y.visibleWrites,V),C.getNode().getImmediateChild(p)):null}(y.writeTree,y.treePath,f,p)}function Ua(y,f){return js(hr(y.treePath,f),y.writeTree)}function js(y,f){return{treePath:y,writeTree:f}}class Jo{constructor(){this.changeMap=new Map}trackChildChange(f){const p=f.type,C=f.childName;(0,$.hu)("child_added"===p||"child_changed"===p||"child_removed"===p,"Only child changes supported for tracking"),(0,$.hu)(".priority"!==C,"Only non-priority child changes can be tracked.");const V=this.changeMap.get(C);if(V){const ne=V.type;if("child_added"===p&&"child_removed"===ne)this.changeMap.set(C,hn(C,f.snapshotNode,V.snapshotNode));else if("child_removed"===p&&"child_added"===ne)this.changeMap.delete(C);else if("child_removed"===p&&"child_changed"===ne)this.changeMap.set(C,Ot(C,V.oldSnap));else if("child_changed"===p&&"child_added"===ne)this.changeMap.set(C,Ze(C,f.snapshotNode));else{if("child_changed"!==p||"child_changed"!==ne)throw(0,$.g5)("Illegal combination of changes: "+f+" occurred after "+V);this.changeMap.set(C,hn(C,f.snapshotNode,V.oldSnap))}}else this.changeMap.set(C,f)}getChanges(){return Array.from(this.changeMap.values())}}const vo=new class Js{getCompleteChild(f){return null}getChildAfterChild(f,p,C){return null}};class eo{constructor(f,p,C=null){this.writes_=f,this.viewCache_=p,this.optCompleteServerCache_=C}getCompleteChild(f){const p=this.viewCache_.eventCache;if(p.isCompleteForChild(f))return p.getNode().getImmediateChild(f);{const C=null!=this.optCompleteServerCache_?new Po(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return yo(this.writes_,f,C)}}getChildAfterChild(f,p,C){const V=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:ct(this.viewCache_),ne=function ba(y,f,p,C,V,ne){return function Ss(y,f,p,C,V,ne,de){let Ne;const ot=ms(y.visibleWrites,f),at=On(ot,ur());if(null!=at)Ne=at;else{if(null==p)return[];Ne=Hn(ot,p)}if(Ne=Ne.withIndex(de),Ne.isEmpty()||Ne.isLeafNode())return[];{const Bt=[],Zt=de.getCompare(),Qt=ne?Ne.getReverseIteratorFrom(C,de):Ne.getIteratorFrom(C,de);let Un=Qt.getNext();for(;Un&&Bt.length1)return f;const gr=kr(p),ao=ot.getNode().getImmediateChild(Un).updateChild(gr,C);at=".priority"===Un?Bt.updatePriority(ot.getNode(),ao):Bt.updateChild(ot.getNode(),Un,ao,gr,vo,null)}const Zt=oe(f,at,ot.isFullyInitialized()||br(p),Bt.filtersNodes());return oc(y,Zt,p,V,new eo(V,Zt,ne),Ne)}function Sa(y,f,p,C,V,ne,de){const Ne=f.eventCache;let ot,at;const Bt=new eo(V,f,ne);if(br(p))at=y.filter.updateFullNode(f.eventCache.getNode(),C,de),ot=ge(f,at,!0,y.filter.filtersNodes());else{const Zt=pr(p);if(".priority"===Zt)at=y.filter.updatePriority(f.eventCache.getNode(),C),ot=ge(f,at,Ne.isFullyInitialized(),Ne.isFiltered());else{const Qt=kr(p),Un=Ne.getNode().getImmediateChild(Zt);let gr;if(br(Qt))gr=C;else{const Ei=Bt.getCompleteChild(Zt);gr=null!=Ei?".priority"===Qr(Qt)&&Ei.getChild(ss(Qt)).isEmpty()?Ei:Ei.updateChild(Qt,C):mr.EMPTY_NODE}ot=Un.equals(gr)?f:ge(f,y.filter.updateChild(Ne.getNode(),Zt,gr,Qt,Bt,de),Ne.isFullyInitialized(),y.filter.filtersNodes())}}return ot}function da(y,f){return y.eventCache.isCompleteForChild(f)}function Ga(y,f,p){return p.foreach((C,V)=>{f=f.updateChild(C,V)}),f}function Fo(y,f,p,C,V,ne,de,Ne){if(f.serverCache.getNode().isEmpty()&&!f.serverCache.isFullyInitialized())return f;let at,ot=f;at=br(p)?C:new In(null).setTree(p,C);const Bt=f.serverCache.getNode();return at.children.inorderTraversal((Zt,Qt)=>{if(Bt.hasChild(Zt)){const gr=Ga(0,f.serverCache.getNode().getImmediateChild(Zt),Qt);ot=Ia(y,ot,new dr(Zt),gr,V,ne,de,Ne)}}),at.children.inorderTraversal((Zt,Qt)=>{const Un=!f.serverCache.isCompleteForChild(Zt)&&null===Qt.value;if(!Bt.hasChild(Zt)&&!Un){const Ei=Ga(0,f.serverCache.getNode().getImmediateChild(Zt),Qt);ot=Ia(y,ot,new dr(Zt),Ei,V,ne,de,Ne)}}),ot}class vi{constructor(f,p){this.query_=f,this.eventRegistrations_=[];const C=this.query_._queryParams,V=new Pr(C.getIndex()),ne=function Rs(y){return y.loadsAllData()?new Pr(y.getIndex()):y.hasLimit()?new ii(y):new Zr(y)}(C);this.processor_=function Ac(y){return{filter:y}}(ne);const de=p.serverCache,Ne=p.eventCache,ot=V.updateFullNode(mr.EMPTY_NODE,de.getNode(),null),at=ne.updateFullNode(mr.EMPTY_NODE,Ne.getNode(),null),Bt=new Po(ot,de.isFullyInitialized(),V.filtersNodes()),Zt=new Po(at,Ne.isFullyInitialized(),ne.filtersNodes());this.viewCache_=j(Zt,Bt),this.eventGenerator_=new Qn(this.query_)}get query(){return this.query_}}function Ns(y,f){const p=ct(y.viewCache_);return p&&(y.query._queryParams.loadsAllData()||!br(f)&&!p.getImmediateChild(pr(f)).isEmpty())?p.getChild(f):null}function Ta(y){return 0===y.eventRegistrations_.length}function Li(y,f,p){const C=[];if(p){(0,$.hu)(null==f,"A cancel should cancel all event registrations.");const V=y.query._path;y.eventRegistrations_.forEach(ne=>{const de=ne.createCancelEvent(p,V);de&&C.push(de)})}if(f){let V=[];for(let ne=0;ne{const Bt=hr(p,ot);da(f,pr(Bt))&&(Ne=Sa(y,Ne,Bt,at,V,ne,de))}),C.foreach((ot,at)=>{const Bt=hr(p,ot);da(f,pr(Bt))||(Ne=Sa(y,Ne,Bt,at,V,ne,de))}),Ne}(y,f,at.path,at.children,C,V,ne):((0,$.hu)(at.source.fromServer,"Unknown source."),Ne=at.source.tagged||f.serverCache.isFiltered(),de=Fo(y,f,at.path,at.children,C,V,Ne,ne))}else if(p.type===pi.ACK_USER_WRITE){const at=p;de=at.revert?function za(y,f,p,C,V,ne){let de;if(null!=Lt(C,p))return f;{const Ne=new eo(C,f,V),ot=f.eventCache.getNode();let at;if(br(p)||".priority"===pr(p)){let Bt;if(f.serverCache.isFullyInitialized())Bt=Ca(C,ct(f));else{const Zt=f.serverCache.getNode();(0,$.hu)(Zt instanceof mr,"serverChildren would be complete if leaf node"),Bt=Oo(C,Zt)}at=y.filter.updateFullNode(ot,Bt,ne)}else{const Bt=pr(p);let Zt=yo(C,Bt,f.serverCache);null==Zt&&f.serverCache.isCompleteForChild(Bt)&&(Zt=ot.getImmediateChild(Bt)),at=null!=Zt?y.filter.updateChild(ot,Bt,Zt,kr(p),Ne,ne):f.eventCache.getNode().hasChild(Bt)?y.filter.updateChild(ot,Bt,mr.EMPTY_NODE,kr(p),Ne,ne):ot,at.isEmpty()&&f.serverCache.isFullyInitialized()&&(de=Ca(C,ct(f)),de.isLeafNode()&&(at=y.filter.updateFullNode(at,de,ne)))}return de=f.serverCache.isFullyInitialized()||null!=Lt(C,ur()),ge(f,at,de,y.filter.filtersNodes())}}(y,f,at.path,C,V,ne):function wa(y,f,p,C,V,ne,de){if(null!=Lt(V,p))return f;const Ne=f.serverCache.isFiltered(),ot=f.serverCache;if(null!=C.value){if(br(p)&&ot.isFullyInitialized()||ot.isCompleteForPath(p))return Ia(y,f,p,ot.getNode().getChild(p),V,ne,Ne,de);if(br(p)){let at=new In(null);return ot.getNode().forEachChild(Ii,(Bt,Zt)=>{at=at.set(new dr(Bt),Zt)}),Fo(y,f,p,at,V,ne,Ne,de)}return f}{let at=new In(null);return C.foreach((Bt,Zt)=>{const Qt=hr(p,Bt);ot.isCompleteForPath(Qt)&&(at=at.set(Bt,ot.getNode().getChild(Qt)))}),Fo(y,f,p,at,V,ne,Ne,de)}}(y,f,at.path,at.affectedTree,C,V,ne)}else{if(p.type!==pi.LISTEN_COMPLETE)throw(0,$.g5)("Unknown operation type: "+p.type);de=function Ha(y,f,p,C,V){const ne=f.serverCache;return oc(y,oe(f,ne.getNode(),ne.isFullyInitialized()||br(p),ne.isFiltered()),p,C,vo,V)}(y,f,p.path,C,ne)}const ot=ne.getChanges();return function Ws(y,f,p){const C=f.eventCache;if(C.isFullyInitialized()){const V=C.getNode().isLeafNode()||C.getNode().isEmpty(),ne=Re(y);(p.length>0||!y.eventCache.isFullyInitialized()||V&&!C.getNode().equals(ne)||!C.getNode().getPriority().equals(ne.getPriority()))&&p.push(Q(Re(f)))}}(f,de,ot),{viewCache:de,changes:ot}}(y.processor_,V,f,p,C);return function sc(y,f){(0,$.hu)(f.eventCache.getNode().isIndexed(y.filter.getIndex()),"Event snap not indexed"),(0,$.hu)(f.serverCache.getNode().isIndexed(y.filter.getIndex()),"Server snap not indexed")}(y.processor_,ne.viewCache),(0,$.hu)(ne.viewCache.serverCache.isFullyInitialized()||!V.serverCache.isFullyInitialized(),"Once a server snap is complete, it should never go back"),y.viewCache_=ne.viewCache,au(y,ne.changes,ne.viewCache.eventCache.getNode(),null)}function au(y,f,p,C){return function ir(y,f,p,C){const V=[],ne=[];return f.forEach(de=>{"child_changed"===de.type&&y.index_.indexedValueChanged(de.oldSnap,de.snapshotNode)&&ne.push(function Yn(y,f){return{type:"child_moved",snapshotNode:f,childName:y}}(de.childName,de.snapshotNode))}),Mo(y,V,"child_removed",f,C,p),Mo(y,V,"child_added",f,C,p),Mo(y,V,"child_moved",ne,C,p),Mo(y,V,"child_changed",f,C,p),Mo(y,V,"value",f,C,p),V}(y.eventGenerator_,f,p,C?[C]:y.eventRegistrations_)}let io,Tt;class _i{constructor(){this.views=new Map}}function rs(y,f,p,C){const V=f.source.queryId;if(null!==V){const ne=y.views.get(V);return(0,$.hu)(null!=ne,"SyncTree gave us an op for an invalid query."),ja(ne,f,p,C)}{let ne=[];for(const de of y.views.values())ne=ne.concat(ja(de,f,p,C));return ne}}function Ys(y,f,p,C,V){const de=y.views.get(f._queryIdentifier);if(!de){let Ne=Ca(p,V?C:null),ot=!1;Ne?ot=!0:C instanceof mr?(Ne=Oo(p,C),ot=!1):(Ne=mr.EMPTY_NODE,ot=!1);const at=j(new Po(Ne,ot,!1),new Po(C,V,!1));return new vi(f,at)}return de}function H(y){const f=[];for(const p of y.views.values())p.query._queryParams.loadsAllData()||f.push(p);return f}function M(y,f){let p=null;for(const C of y.views.values())p=p||Ns(C,f);return p}function re(y,f){return f._queryParams.loadsAllData()?Be(y):y.views.get(f._queryIdentifier)}function he(y,f){return null!=re(y,f)}function De(y){return null!=Be(y)}function Be(y){for(const f of y.views.values())if(f.query._queryParams.loadsAllData())return f;return null}let Kn=1;class ei{constructor(f){this.listenProvider_=f,this.syncPointTree_=new In(null),this.pendingWriteTree_=function ic(){return{visibleWrites:Vr.empty(),allWrites:[],lastWriteId:-1}}(),this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function Gi(y,f,p,C,V){return function al(y,f,p,C,V){(0,$.hu)(C>y.lastWriteId,"Stacking an older write on top of newer ones"),void 0===V&&(V=!0),y.allWrites.push({path:f,snap:p,writeId:C,visible:V}),V&&(y.visibleWrites=Wr(y.visibleWrites,f,p)),y.lastWriteId=C}(y.pendingWriteTree_,f,p,C,V),V?ta(y,new Di({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},f,p)):[]}function Xi(y,f,p=!1){const C=function Ln(y,f){for(let p=0;pNe.writeId===f);(0,$.hu)(p>=0,"removeWrite called with nonexistent writeId.");const C=y.allWrites[p];y.allWrites.splice(p,1);let V=C.visible,ne=!1,de=y.allWrites.length-1;for(;V&&de>=0;){const Ne=y.allWrites[de];Ne.visible&&(de>=p&&ll(Ne,C.path)?V=!1:Mi(C.path,Ne.path)&&(ne=!0)),de--}return!!V&&(ne?(function ko(y){y.visibleWrites=$a(y.allWrites,kl,ur()),y.lastWriteId=y.allWrites.length>0?y.allWrites[y.allWrites.length-1].writeId:-1}(y),!0):(C.snap?y.visibleWrites=Yr(y.visibleWrites,C.path):Ut(C.children,ot=>{y.visibleWrites=Yr(y.visibleWrites,hr(C.path,ot))}),!0))}(y.pendingWriteTree_,f)){let ne=new In(null);return null!=C.snap?ne=ne.set(ur(),!0):Ut(C.children,de=>{ne=ne.set(new dr(de),!0)}),ta(y,new ai(C.path,ne,p))}return[]}function Eo(y,f,p){return ta(y,new Di({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},f,p))}function oi(y,f,p,C,V=!1){const ne=f._path,de=y.syncPointTree_.get(ne);let Ne=[];if(de&&("default"===f._queryIdentifier||he(de,f))){const ot=function B(y,f,p,C){const V=f._queryIdentifier,ne=[];let de=[];const Ne=De(y);if("default"===V)for(const[ot,at]of y.views.entries())de=de.concat(Li(at,p,C)),Ta(at)&&(y.views.delete(ot),at.query._queryParams.loadsAllData()||ne.push(at.query));else{const ot=y.views.get(V);ot&&(de=de.concat(Li(ot,p,C)),Ta(ot)&&(y.views.delete(V),ot.query._queryParams.loadsAllData()||ne.push(ot.query)))}return Ne&&!De(y)&&ne.push(new(function No(){return(0,$.hu)(io,"Reference.ts has not been loaded"),io}())(f._repo,f._path)),{removed:ne,events:de}}(de,f,p,C);(function $o(y){return 0===y.views.size})(de)&&(y.syncPointTree_=y.syncPointTree_.remove(ne));const at=ot.removed;if(Ne=ot.events,!V){const Bt=-1!==at.findIndex(Qt=>Qt._queryParams.loadsAllData()),Zt=y.syncPointTree_.findOnPath(ne,(Qt,Un)=>De(Un));if(Bt&&!Zt){const Qt=y.syncPointTree_.subtree(ne);if(!Qt.isEmpty()){const Un=function Xu(y){return y.fold((f,p,C)=>{if(p&&De(p))return[Be(p)];{let V=[];return p&&(V=H(p)),Ut(C,(ne,de)=>{V=V.concat(de)}),V}})}(Qt);for(let gr=0;gr0&&!C&&(Bt?y.listenProvider_.stopListening(Nl(f),null):at.forEach(Qt=>{const Un=y.queryToTagMap.get(na(Qt));y.listenProvider_.stopListening(Nl(Qt),Un)}))}!function Ll(y,f){for(let p=0;p{const gr=gi(Qt,V);ne=ne||M(Un,gr),de=de||De(Un)});let ot,Ne=y.syncPointTree_.get(V);Ne?(de=de||De(Ne),ne=ne||M(Ne,ur())):(Ne=new _i,y.syncPointTree_=y.syncPointTree_.set(V,Ne)),null!=ne?ot=!0:(ot=!1,ne=mr.EMPTY_NODE,y.syncPointTree_.subtree(V).foreachChild((Un,gr)=>{const Ei=M(gr,ur());Ei&&(ne=ne.updateImmediateChild(Un,Ei))}));const at=he(Ne,f);if(!at&&!f._queryParams.loadsAllData()){const Qt=na(f);(0,$.hu)(!y.queryToTagMap.has(Qt),"View does not exist, but we have a tag");const Un=function Bd(){return Kn++}();y.queryToTagMap.set(Qt,Un),y.tagToQueryMap.set(Un,Qt)}let Zt=function lu(y,f,p,C,V,ne){const de=Ys(y,f,C,V,ne);return y.views.has(f._queryIdentifier)||y.views.set(f._queryIdentifier,de),function ha(y,f){y.eventRegistrations_.push(f)}(de,p),function ea(y,f){const p=y.viewCache_.eventCache,C=[];return p.getNode().isLeafNode()||p.getNode().forEachChild(or,(ne,de)=>{C.push(Ze(ne,de))}),p.isFullyInitialized()&&C.push(Q(p.getNode())),au(y,C,p.getNode(),f)}(de,p)}(Ne,f,p,Rr(y.pendingWriteTree_,V),ne,ot);if(!at&&!de&&!C){const Qt=re(Ne,f);Zt=Zt.concat(function as(y,f,p){const C=f._path,V=Fl(y,f),ne=xc(y,p),de=y.listenProvider_.startListening(Nl(f),V,ne.hashFn,ne.onComplete),Ne=y.syncPointTree_.subtree(C);if(V)(0,$.hu)(!De(Ne.value),"If we're adding a query, it shouldn't be shadowed");else{const ot=Ne.fold((at,Bt,Zt)=>{if(!br(at)&&Bt&&De(Bt))return[Be(Bt).query];{let Qt=[];return Bt&&(Qt=Qt.concat(H(Bt).map(Un=>Un.query))),Ut(Zt,(Un,gr)=>{Qt=Qt.concat(gr)}),Qt}});for(let at=0;at{const at=M(Ne,gi(de,f));if(at)return at});return zs(V,f,ne,p,!0)}function ta(y,f){return Ya(f,y.syncPointTree_,null,Rr(y.pendingWriteTree_,ur()))}function Ya(y,f,p,C){if(br(y.path))return du(y,f,p,C);{const V=f.get(ur());null==p&&null!=V&&(p=M(V,ur()));let ne=[];const de=pr(y.path),Ne=y.operationForChild(de),ot=f.children.get(de);if(ot&&Ne){const at=p?p.getImmediateChild(de):null,Bt=Ua(C,de);ne=ne.concat(Ya(Ne,ot,at,Bt))}return V&&(ne=ne.concat(rs(V,y,C,p))),ne}}function du(y,f,p,C){const V=f.get(ur());null==p&&null!=V&&(p=M(V,ur()));let ne=[];return f.children.inorderTraversal((de,Ne)=>{const ot=p?p.getImmediateChild(de):null,at=Ua(C,de),Bt=y.operationForChild(de);Bt&&(ne=ne.concat(du(Bt,Ne,ot,at)))}),V&&(ne=ne.concat(rs(V,y,C,p))),ne}function xc(y,f){const p=f.query,C=Fl(y,p);return{hashFn:()=>(function Fh(y){return y.viewCache_.serverCache.getNode()}(f)||mr.EMPTY_NODE).hash(),onComplete:V=>{if("ok"===V)return C?function zr(y,f,p){const C=Aa(y,p);if(C){const V=ac(C),ne=V.path,de=V.queryId,Ne=gi(ne,f);return hu(y,ne,new fn(Hs(de),Ne))}return[]}(y,p._path,C):function Ol(y,f){return ta(y,new fn({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},f))}(y,p._path);{const ne=function T(y,f){let p="Unknown Error";"too_big"===y?p="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===y?p="Client doesn't have permission to access the desired data.":"unavailable"===y&&(p="The service is unavailable");const C=new Error(y+" at "+f._path.toString()+": "+p);return C.code=y.toUpperCase(),C}(V,p);return oi(y,p,null,ne)}}}}function Fl(y,f){const p=na(f);return y.queryToTagMap.get(p)}function na(y){return y._path.toString()+"$"+y._queryIdentifier}function Aa(y,f){return y.tagToQueryMap.get(f)}function ac(y){const f=y.indexOf("$");return(0,$.hu)(-1!==f&&f{const at=Bi(ot,f.getImmediateChild(Ne),p);at!==ot&&(ne=ne.updateImmediateChild(Ne,at))}),ne}}class Bl{constructor(f="",p=null,C={children:{},childCount:0}){this.name=f,this.parent=p,this.node=C}}function qa(y,f){let p=f instanceof dr?f:new dr(f),C=y,V=pr(p);for(;null!==V;){const ne=(0,$.DV)(C.node.children,V)||{children:{},childCount:0};C=new Bl(V,C,ne),p=kr(p),V=pr(p)}return C}function Uo(y){return y.node.value}function Vl(y,f){y.node.value=f,Xa(y)}function fl(y){return y.node.childCount>0}function Mc(y,f){Ut(y.node.children,(p,C)=>{f(new Bl(p,y,C))})}function Qu(y,f,p,C){p&&!C&&f(y),Mc(y,V=>{Qu(V,f,!0,C)}),p&&C&&f(y)}function pl(y){return new dr(null===y.parent?y.name:pl(y.parent)+"/"+y.name)}function Xa(y){null!==y.parent&&function mu(y,f,p){const C=function pu(y){return void 0===Uo(y)&&!fl(y)}(p),V=(0,$.r3)(y.node.children,f);C&&V?(delete y.node.children[f],y.node.childCount--,Xa(y)):!C&&!V&&(y.node.children[f]=p.node,y.node.childCount++,Xa(y))}(y.parent,y.name,y)}const lc=/[\[\].#$\/\u0000-\u001F\u007F]/,cc=/[\[\].#$\u0000-\u001F\u007F]/,$l=10485760,Go=function(y){return"string"==typeof y&&0!==y.length&&!lc.test(y)},Hi=function(y){return"string"==typeof y&&0!==y.length&&!cc.test(y)},Qa=function(y){return null===y||"string"==typeof y||"number"==typeof y&&!un(y)||y&&"object"==typeof y&&(0,$.r3)(y,".sv")},Co=function(y,f,p,C){C&&void 0===f||Ja((0,$.gK)(y,"value"),f,p)},Ja=function(y,f,p){const C=p instanceof dr?new qs(p,y):p;if(void 0===f)throw new Error(y+"contains undefined "+Fi(C));if("function"==typeof f)throw new Error(y+"contains a function "+Fi(C)+" with contents = "+f.toString());if(un(f))throw new Error(y+"contains "+f.toString()+" "+Fi(C));if("string"==typeof f&&f.length>$l/3&&(0,$.ug)(f)>$l)throw new Error(y+"contains a string greater than "+$l+" utf8 bytes "+Fi(C)+" ('"+f.substring(0,50)+"...')");if(f&&"object"==typeof f){let V=!1,ne=!1;if(Ut(f,(de,Ne)=>{if(".value"===de)V=!0;else if(".priority"!==de&&".sv"!==de&&(ne=!0,!Go(de)))throw new Error(y+" contains an invalid key ("+de+") "+Fi(C)+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');(function fs(y,f){y.parts_.length>0&&(y.byteLength_+=1),y.parts_.push(f),y.byteLength_+=(0,$.ug)(f),Zo(y)})(C,de),Ja(y,Ne,C),function $s(y){const f=y.parts_.pop();y.byteLength_-=(0,$.ug)(f),y.parts_.length>0&&(y.byteLength_-=1)}(C)}),V&&ne)throw new Error(y+' contains ".value" child '+Fi(C)+" in addition to actual children.")}},Ul=function(y,f,p,C){if(!(C&&void 0===p||Go(p)))throw new Error((0,$.gK)(y,f)+'was an invalid key = "'+p+'". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},yu=function(y,f,p,C){if(!(C&&void 0===p||Hi(p)))throw new Error((0,$.gK)(y,f)+'was an invalid path = "'+p+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},vu=function(y,f,p,C){p&&(p=p.replace(/^\/*\.info(\/|$)/,"/")),yu(y,f,p,C)},Ks=function(y,f){const p=f.path.toString();if("string"!=typeof f.repoInfo.host||0===f.repoInfo.host.length||!Go(f.repoInfo.namespace)&&"localhost"!==f.repoInfo.host.split(":")[0]||0!==p.length&&!function(y){return y&&(y=y.replace(/^\/*\.info(\/|$)/,"/")),Hi(y)}(p))throw new Error((0,$.gK)(y,"url")+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')};class ml{constructor(){this.eventLists_=[],this.recursionDepth_=0}}function dc(y,f){let p=null;for(let C=0;Cuo(C,f))}function xi(y,f,p){dc(y,p),ra(y,C=>Mi(C,f)||Mi(f,C))}function ra(y,f){y.recursionDepth_++;let p=!0;for(let C=0;Cx(at));de=function cu(y,f,p,C){const V=Aa(y,C);if(V){const ne=ac(V),de=ne.path,Ne=ne.queryId,ot=gi(de,f),at=In.fromObject(p);return hu(y,de,new go(Hs(Ne),ot,at))}return[]}(y.serverSyncTree_,ne,ot,V)}else{const ot=x(p);de=Bo(y.serverSyncTree_,ne,ot,V)}else if(C){const ot=(0,$.UI)(p,at=>x(at));de=function so(y,f,p){const C=In.fromObject(p);return ta(y,new go({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},f,C))}(y.serverSyncTree_,ne,ot)}else{const ot=x(p);de=Eo(y.serverSyncTree_,ne,ot)}let Ne=ne;de.length>0&&(Ne=bo(y,ne)),xi(y.eventQueue_,Ne,de)}function Ae(y,f){Dt(y,"connected",f),!1===f&&function ki(y){Pa(y,"onDisconnectEvents");const f=P(y),p=va();Ba(y.onDisconnect_,ur(),(V,ne)=>{const de=ws(V,ne,y.serverSyncTree_,f);mo(p,V,de)});let C=[];Ba(p,ur(),(V,ne)=>{C=C.concat(Eo(y.serverSyncTree_,V,ne));const de=function ia(y,f){const p=pl(Io(y,f)),C=qa(y.transactionQueueTree_,f);return function Za(y,f,p){let C=p?y:y.parent;for(;null!==C;){if(f(C))return!0;C=C.parent}}(C,V=>{bu(y,V)}),bu(y,C),Qu(C,V=>{bu(y,V)}),p}(y,V);bo(y,de)}),y.onDisconnect_=va(),xi(y.eventQueue_,ur(),C)}(y)}function Dt(y,f,p){const C=new dr("/.info/"+f),V=x(p);y.infoData_.updateSnapshot(C,V);const ne=Eo(y.infoSyncTree_,C,V);xi(y.eventQueue_,C,ne)}function cn(y){return y.nextWriteId_++}function Hl(y,f,p){let C;C=".info"===pr(f._path)?oi(y.infoSyncTree_,f,p):oi(y.serverSyncTree_,f,p),kc(y.eventQueue_,f._path,C)}function Pa(y,...f){let p="";y.persistentConnection_&&(p=y.persistentConnection_.id+":"),Sn(p,...f)}function ti(y,f,p){return hl(y.serverSyncTree_,f,p)||mr.EMPTY_NODE}function fc(y,f=y.transactionQueueTree_){if(f||Cu(y,f),Uo(f)){const p=Eu(y,f);(0,$.hu)(p.length>0,"Sending zero length transaction queue"),p.every(V=>0===V.status)&&function Fc(y,f,p){const C=p.map(at=>at.currentWriteId),V=ti(y,f,C);let ne=V;const de=V.hash();for(let at=0;at{Pa(y,"transaction put response",{path:ot.toString(),status:at});let Bt=[];if("ok"===at){const Zt=[];for(let Qt=0;Qtp[Qt].onComplete(null,!0,p[Qt].currentOutputSnapshotResolved)),p[Qt].unwatcher();Cu(y,qa(y.transactionQueueTree_,f)),fc(y,y.transactionQueueTree_),xi(y.eventQueue_,f,Bt);for(let Qt=0;Qt{fc(y,p)})}function bo(y,f){const p=Io(y,f),C=pl(p);return function Vd(y,f,p){if(0===f.length)return;const C=[];let V=[];const de=f.filter(Ne=>0===Ne.status).map(Ne=>Ne.currentWriteId);for(let Ne=0;Ne=gl)Bt=!0,Zt="maxretry",V=V.concat(Xi(y.serverSyncTree_,ot.currentWriteId,!0));else{const Qt=ti(y,ot.path,de);ot.currentInputSnapshot=Qt;const Un=f[Ne].update(Qt.val());if(void 0!==Un){Ja("transaction failed: Data returned ",Un,ot.path);let gr=x(Un);"object"==typeof Un&&null!=Un&&(0,$.r3)(Un,".priority")||(gr=gr.updatePriority(Qt.getPriority()));const ao=ot.currentWriteId,Cc=P(y),bc=Pc(gr,Qt,Cc);ot.currentOutputSnapshotRaw=gr,ot.currentOutputSnapshotResolved=bc,ot.currentWriteId=cn(y),de.splice(de.indexOf(ao),1),V=V.concat(Gi(y.serverSyncTree_,ot.path,bc,ot.currentWriteId,ot.applyLocally)),V=V.concat(Xi(y.serverSyncTree_,ao,!0))}else Bt=!0,Zt="nodata",V=V.concat(Xi(y.serverSyncTree_,ot.currentWriteId,!0))}xi(y.eventQueue_,p,V),V=[],Bt&&(f[Ne].status=2,setTimeout(f[Ne].unwatcher,Math.floor(0)),f[Ne].onComplete&&C.push("nodata"===Zt?()=>f[Ne].onComplete(null,!1,f[Ne].currentInputSnapshot):()=>f[Ne].onComplete(new Error(Zt),!1,null)))}Cu(y,y.transactionQueueTree_);for(let Ne=0;NeC.order-V.order),p}function Nc(y,f,p){const C=Uo(f);if(C)for(let V=0;V{Nc(y,V,p)})}function Cu(y,f){const p=Uo(f);if(p){let C=0;for(let V=0;V0?p:void 0)}Mc(f,C=>{Cu(y,C)})}function bu(y,f){const p=Uo(f);if(p){const C=[];let V=[],ne=-1;for(let de=0;de.firebaseio.com instead"),(!C||"undefined"===C)&&"localhost"!==p.domain&&jn("Cannot parse Firebase url. Please use https://.firebaseio.com"),p.secure||typeof window<"u"&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&Mn("Insecure Firebase access from a secure page. Please use https in calls to new Firebase()."),{repoInfo:new yn(p.host,p.secure,C,"ws"===p.scheme||"wss"===p.scheme,f,"",C!==p.subdomain),path:new dr(p.pathString)}},qr=function(y){let f="",p="",C="",V="",ne="",de=!0,Ne="https",ot=443;if("string"==typeof y){let at=y.indexOf("//");at>=0&&(Ne=y.substring(0,at-1),y=y.substring(at+2));let Bt=y.indexOf("/");-1===Bt&&(Bt=y.length);let Zt=y.indexOf("?");-1===Zt&&(Zt=y.length),f=y.substring(0,Math.min(Bt,Zt)),Bt0){let V=p[C];try{V=decodeURIComponent(V.replace(/\+/g," "))}catch{}f+="/"+V}return f}(y.substring(Bt,Zt)));const Qt=function Nh(y){const f={};"?"===y.charAt(0)&&(y=y.substring(1));for(const p of y.split("&")){if(0===p.length)continue;const C=p.split("=");2===C.length?f[decodeURIComponent(C[0])]=decodeURIComponent(C[1]):Mn(`Invalid query segment '${p}' in query '${y}'`)}return f}(y.substring(Math.min(y.length,Zt)));at=f.indexOf(":"),at>=0?(de="https"===Ne||"wss"===Ne,ot=parseInt(f.substring(at+1),10)):at=f.length;const Un=f.slice(0,at);if("localhost"===Un.toLowerCase())p="localhost";else if(Un.split(".").length<=2)p=Un;else{const gr=f.indexOf(".");C=f.substring(0,gr).toLowerCase(),p=f.substring(gr+1),ne=C}"ns"in Qt&&(ne=Qt.ns)}return{host:f,port:ot,domain:p,subdomain:C,secure:de,scheme:Ne,pathString:V,namespace:ne}};class Lc{constructor(f,p,C,V){this.eventType=f,this.eventRegistration=p,this.snapshot=C,this.prevName=V}getPath(){const f=this.snapshot.ref;return"value"===this.eventType?f._path:f.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+(0,$.Wl)(this.snapshot.exportVal())}}class mc{constructor(f,p,C){this.eventRegistration=f,this.error=p,this.path=C}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}class gc{constructor(f,p){this.snapshotCallback=f,this.cancelCallback=p}onValue(f,p){this.snapshotCallback.call(null,f,p)}onCancel(f){return(0,$.hu)(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,f)}get hasCancelCallback(){return!!this.cancelCallback}matches(f){return this.snapshotCallback===f.snapshotCallback||void 0!==this.snapshotCallback.userCallback&&this.snapshotCallback.userCallback===f.snapshotCallback.userCallback&&this.snapshotCallback.context===f.snapshotCallback.context}}class So{constructor(f,p,C,V){this._repo=f,this._path=p,this._queryParams=C,this._orderByCalled=V}get key(){return br(this._path)?null:Qr(this._path)}get ref(){return new sa(this._repo,this._path)}get _queryIdentifier(){const f=xl(this._queryParams),p=pn(f);return"{}"===p?"default":p}get _queryObject(){return xl(this._queryParams)}isEqual(f){if(!((f=(0,$.m9)(f))instanceof So))return!1;const p=this._repo===f._repo,C=uo(this._path,f._path);return p&&C&&this._queryIdentifier===f._queryIdentifier}toJSON(){return this.toString()}toString(){return this._repo.toString()+function xs(y){let f="";for(let p=y.pieceNum_;pf(new yl(V,nl(this.ref,C),or)))}hasChild(f){const p=new dr(f);return!this._node.getChild(p).isEmpty()}hasChildren(){return!this._node.isLeafNode()&&!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}}function ed(y,f){return(y=(0,$.m9)(y))._checkNotDeleted("ref"),void 0!==f?nl(y._root,f):y._root}function nl(y,f){return null===pr((y=(0,$.m9)(y))._path)?vu("child","path",f,!1):yu("child","path",f,!1),new sa(y._repo,hr(y._path,f))}function oa(y){y=(0,$.m9)(y);const f=new gc(()=>{}),p=new vl(f);return function qn(y,f,p){const C=function uu(y,f){const p=f._path;let C=null;y.syncPointTree_.foreachOnPath(p,(at,Bt)=>{const Zt=gi(at,p);C=C||M(Bt,Zt)});let V=y.syncPointTree_.get(p);V?C=C||M(V,ur()):(V=new _i,y.syncPointTree_=y.syncPointTree_.set(p,V));const ne=null!=C,de=ne?new Po(C,!0,!1):null;return function Zu(y){return Re(y.viewCache_)}(Ys(V,f,Rr(y.pendingWriteTree_,f._path),ne?de.getNode():mr.EMPTY_NODE,ne))}(y.serverSyncTree_,f);return null!=C?Promise.resolve(C):y.server_.get(f).then(V=>{const ne=x(V).withIndex(f._queryParams.getIndex());let de;if(Da(y.serverSyncTree_,f,p,!0),f._queryParams.loadsAllData())de=Eo(y.serverSyncTree_,f._path,ne);else{const Ne=Fl(y.serverSyncTree_,f);de=Bo(y.serverSyncTree_,f._path,ne,Ne)}return xi(y.eventQueue_,f._path,de),oi(y.serverSyncTree_,f,p,null,!0),ne},V=>(Pa(y,"get for query "+(0,$.Wl)(f)+" failed: "+V),Promise.reject(new Error(V))))}(y._repo,y,p).then(C=>new yl(C,new sa(y._repo,y._path),y._queryParams.getIndex()))}class vl{constructor(f){this.callbackContext=f}respondsTo(f){return"value"===f}createEvent(f,p){const C=p._queryParams.getIndex();return new Lc("value",this,new yl(f.snapshotNode,new sa(p._repo,p._path),C))}getEventRunner(f){return"cancel"===f.getEventType()?()=>this.callbackContext.onCancel(f.error):()=>this.callbackContext.onValue(f.snapshot,null)}createCancelEvent(f,p){return this.callbackContext.hasCancelCallback?new mc(this,f,p):null}matches(f){return f instanceof vl&&(!f.callbackContext||!this.callbackContext||f.callbackContext.matches(this.callbackContext))}hasAnyCallback(){return null!==this.callbackContext}}class rl{constructor(f,p){this.eventType=f,this.callbackContext=p}respondsTo(f){let p="children_added"===f?"child_added":f;return p="children_removed"===p?"child_removed":p,this.eventType===p}createCancelEvent(f,p){return this.callbackContext.hasCancelCallback?new mc(this,f,p):null}createEvent(f,p){(0,$.hu)(null!=f.childName,"Child events should have a childName.");const C=nl(new sa(p._repo,p._path),f.childName),V=p._queryParams.getIndex();return new Lc(f.type,this,new yl(f.snapshotNode,C,V),f.prevName)}getEventRunner(f){return"cancel"===f.getEventType()?()=>this.callbackContext.onCancel(f.error):()=>this.callbackContext.onValue(f.snapshot,f.prevName)}matches(f){return f instanceof rl&&this.eventType===f.eventType&&(!this.callbackContext||!f.callbackContext||this.callbackContext.matches(f.callbackContext))}hasAnyCallback(){return!!this.callbackContext}}function _l(y,f,p,C,V){let ne;if("object"==typeof C&&(ne=void 0,V=C),"function"==typeof C&&(ne=C),V&&V.onlyOnce){const ot=p,at=(Bt,Zt)=>{Hl(y._repo,y,Ne),ot(Bt,Zt)};at.userCallback=p.userCallback,at.context=p.context,p=at}const de=new gc(p,ne||void 0),Ne="value"===f?new vl(de):new rl(f,de);return function Gl(y,f,p){let C;C=".info"===pr(f._path)?Da(y.infoSyncTree_,f,p):Da(y.serverSyncTree_,f,p),kc(y.eventQueue_,f._path,C)}(y._repo,y,Ne),()=>Hl(y._repo,y,Ne)}class Oa{}class td extends Oa{constructor(f,p){super(),this._value=f,this._key=p}_apply(f){Co("endAt",this._value,f._path,!0);const p=function Gs(y,f,p){const C=y.copy();return C.endSet_=!0,void 0===f&&(f=null),C.indexEndValue_=f,void 0!==p?(C.endNameSet_=!0,C.indexEndName_=p):(C.endNameSet_=!1,C.indexEndName_=""),C}(f._queryParams,this._value,this._key);if(zl(p),ka(p),f._queryParams.hasEnd())throw new Error("endAt: Starting point was already set (by another call to endAt, endBefore or equalTo).");return new So(f._repo,f._path,p,f._orderByCalled)}}class Hd extends Oa{constructor(f,p){super(),this._value=f,this._key=p}_apply(f){Co("startAt",this._value,f._path,!0);const p=function Is(y,f,p){const C=y.copy();return C.startSet_=!0,void 0===f&&(f=null),C.indexStartValue_=f,null!=p?(C.startNameSet_=!0,C.indexStartName_=p):(C.startNameSet_=!1,C.indexStartName_=""),C}(f._queryParams,this._value,this._key);if(zl(p),ka(p),f._queryParams.hasStart())throw new Error("startAt: Starting point was already set (by another call to startAt, startBefore or equalTo).");return new So(f._repo,f._path,p,f._orderByCalled)}}function zh(y=null,f){return Ul("startAt","key",f,!0),new Hd(y,f)}class cp extends Oa{constructor(f){super(),this._limit=f}_apply(f){if(f._queryParams.hasLimit())throw new Error("limitToFirst: Limit was already set (by another call to limitToFirst or limitToLast).");return new So(f._repo,f._path,function yi(y,f){const p=y.copy();return p.limitSet_=!0,p.limit_=f,p.viewFrom_="l",p}(f._queryParams,this._limit),f._orderByCalled)}}function jl(y){if("number"!=typeof y||Math.floor(y)!==y||y<=0)throw new Error("limitToFirst: First argument must be a positive integer.");return new cp(y)}class aa extends Oa{constructor(f){super(),this._limit=f}_apply(f){if(f._queryParams.hasLimit())throw new Error("limitToLast: Limit was already set (by another call to limitToFirst or limitToLast).");return new So(f._repo,f._path,function fi(y,f){const p=y.copy();return p.limitSet_=!0,p.limit_=f,p.viewFrom_="r",p}(f._queryParams,this._limit),f._orderByCalled)}}function $c(y){if("number"!=typeof y||Math.floor(y)!==y||y<=0)throw new Error("limitToLast: First argument must be a positive integer.");return new aa(y)}class up extends Oa{constructor(f){super(),this._path=f}_apply(f){!function Bc(y,f){if(!0===y._orderByCalled)throw new Error(f+": You can't combine multiple orderBy calls.")}(f,"orderByChild");const p=new dr(this._path);if(br(p))throw new Error("orderByChild: cannot pass in empty path. Use orderByValue() instead.");const C=new w(p),V=function po(y,f){const p=y.copy();return p.index_=f,p}(f._queryParams,C);return ka(V),new So(f._repo,f._path,V,!0)}}function dp(y){if("$key"===y)throw new Error('orderByChild: "$key" is invalid. Use orderByKey() instead.');if("$priority"===y)throw new Error('orderByChild: "$priority" is invalid. Use orderByPriority() instead.');if("$value"===y)throw new Error('orderByChild: "$value" is invalid. Use orderByValue() instead.');return yu("orderByChild","path",y,!1),new up(y)}class jh extends Oa{constructor(f,p){super(),this._value=f,this._key=p}_apply(f){if(Co("equalTo",this._value,f._path,!1),f._queryParams.hasStart())throw new Error("equalTo: Starting point was already set (by another call to startAt/startAfter or equalTo).");if(f._queryParams.hasEnd())throw new Error("equalTo: Ending point was already set (by another call to endAt/endBefore or equalTo).");return new td(this._value,this._key)._apply(new Hd(this._value,this._key)._apply(f))}}function fp(y,f){return Ul("equalTo","key",f,!0),new jh(y,f)}function pp(y,...f){let p=(0,$.m9)(y);for(const C of f)p=C._apply(p);return p}(function Wa(y){(0,$.hu)(!io,"__referenceConstructor has already been defined"),io=y})(sa),function Jt(y){(0,$.hu)(!Tt,"__referenceConstructor has already been defined"),Tt=y}(sa);const Wd="FIREBASE_DATABASE_EMULATOR_HOST",Fa={};let Uc=!1;class Gm{constructor(f,p){this._repoInternal=f,this.app=p,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(function W(y,f,p){if(y.stats_=mt(y.repoInfo_),y.forceRestClient_||Ur())y.server_=new Xs(y.repoInfo_,(C,V,ne,de)=>{J(y,C,V,ne,de)},y.authTokenProvider_,y.appCheckProvider_),setTimeout(()=>Ae(y,!0),0);else{if(typeof p<"u"&&null!==p){if("object"!=typeof p)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{(0,$.Wl)(p)}catch(C){throw new Error("Invalid authOverride provided: "+C)}}y.persistentConnection_=new Es(y.repoInfo_,f,(C,V,ne,de)=>{J(y,C,V,ne,de)},C=>{Ae(y,C)},C=>{!function Xe(y,f){Ut(f,(p,C)=>{Dt(y,p,C)})}(y,C)},y.authTokenProvider_,y.appCheckProvider_,p),y.server_=y.persistentConnection_}y.authTokenProvider_.addTokenChangeListener(C=>{y.server_.refreshAuthToken(C)}),y.appCheckProvider_.addTokenChangeListener(C=>{y.server_.refreshAppCheckToken(C.token)}),y.statsReporter_=function qt(y,f){const p=y.toString();return nt[p]||(nt[p]=f()),nt[p]}(y.repoInfo_,()=>new Rl(y.stats_,y.server_)),y.infoData_=new xo,y.infoSyncTree_=new ei({startListening:(C,V,ne,de)=>{let Ne=[];const ot=y.infoData_.getNode(C._path);return ot.isEmpty()||(Ne=Eo(y.infoSyncTree_,C._path,ot),setTimeout(()=>{de("ok")},0)),Ne},stopListening:()=>{}}),Dt(y,"connected",!1),y.serverSyncTree_=new ei({startListening:(C,V,ne,de)=>(y.server_.listen(C,ne,V,(Ne,ot)=>{const at=de(Ne,ot);xi(y.eventQueue_,C._path,at)}),[]),stopListening:(C,V)=>{y.server_.unlisten(C,V)}})}(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new sa(this._repo,ur())),this._rootInternal}_delete(){return null!==this._rootInternal&&(function Kh(y,f){const p=Fa[f];(!p||p[y.key]!==y)&&jn(`Database ${f}(${y.repoInfo_}) has already been deleted.`),function Oc(y){y.persistentConnection_&&y.persistentConnection_.interrupt(hc)}(y),delete p[y.key]}(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(f){null===this._rootInternal&&jn("Cannot call "+f+" on a deleted database.")}}function Hm(y=(0,ae.Mq)(),f){const p=(0,ae.qX)(y,"database").getImmediate({identifier:f});if(!p._instanceStarted){const C=(0,$.P0)("database");C&&function Yd(y,f,p,C={}){(y=(0,$.m9)(y))._checkNotDeleted("useEmulator"),y._instanceStarted&&jn("Cannot call useEmulator() after instance has already been initialized.");const V=y._repoInternal;let ne;if(V.repoInfo_.nodeAdmin)C.mockUserToken&&jn('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),ne=new sn(sn.OWNER);else if(C.mockUserToken){const de="string"==typeof C.mockUserToken?C.mockUserToken:(0,$.Sg)(C.mockUserToken,y.app.options.projectId);ne=new sn(de)}!function Wh(y,f,p,C){y.repoInfo_=new yn(`${f}:${p}`,!1,y.repoInfo_.namespace,y.repoInfo_.webSocketOnly,y.repoInfo_.nodeAdmin,y.repoInfo_.persistenceKey,y.repoInfo_.includeNamespaceInQueryParams,!0),C&&(y.authTokenProvider_=C)}(V,f,p,ne)}(p,...C)}return p}Es.prototype.simpleListen=function(y,f){this.sendRequest("q",{p:y},f)},Es.prototype.echo=function(y,f){this.sendRequest("echo",{d:y},f)},function yp(y){(function Le(y){st=y})(ae.Jn),(0,ae.Xd)(new me.wA("database",(f,{instanceIdentifier:p})=>function Yh(y,f,p,C,V){let ne=C||y.options.databaseURL;void 0===ne&&(y.options.projectId||jn("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),Sn("Using default host for project ",y.options.projectId),ne=`${y.options.projectId}-default-rtdb.firebaseio.com`);let ot,at,de=Ju(ne,V),Ne=de.repoInfo;typeof process<"u"&&process.env&&(at=process.env[Wd]),at?(ot=!0,ne=`http://${at}?ns=${Ne.namespace}`,de=Ju(ne,V),Ne=de.repoInfo):ot=!de.repoInfo.secure;const Bt=V&&ot?new sn(sn.OWNER):new Xt(y.name,y.options,f);Ks("Invalid Firebase Database URL",de),br(de.path)||jn("Database URL must point to the root of a Firebase Database (not including a child path).");const Zt=function $m(y,f,p,C){let V=Fa[f.name];V||(V={},Fa[f.name]=V);let ne=V[y.toURLString()];return ne&&jn("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),ne=new _u(y,Uc,p,C),V[y.toURLString()]=ne,ne}(Ne,y,Bt,new At(y.name,p));return new Gm(Zt,y)}(f.getProvider("app").getImmediate(),f.getProvider("auth-internal"),f.getProvider("app-check-internal"),p),"PUBLIC").setMultipleInstances(!0)),(0,ae.KN)(Qe,"0.14.4",y),(0,ae.KN)(Qe,"0.14.4","esm2017")}();var Yl=function(){return Yl=Object.assign||function(f){for(var p,C=1,V=arguments.length;C{return(y=Ds||(Ds={})).added="child_added",y.removed="child_removed",y.changed="child_changed",y.moved="child_moved",y.value="value",Ds;var y})(),od=Object.freeze(((Wo={})[Ds.added]=function op(y,f,p,C){return _l(y,"child_added",f,p,C)},Wo[Ds.removed]=function ap(y,f,p,C){return _l(y,"child_removed",f,p,C)},Wo[Ds.changed]=function Uh(y,f,p,C){return _l(y,"child_changed",f,p,C)},Wo[Ds.moved]=function Gd(y,f,p,C){return _l(y,"child_moved",f,p,C)},Wo[Ds.value]=function Ud(y,f,p,C){return _l(y,"value",f,p,C)},Wo));function Zl(y,f){return new N.y(function(p){var C=od[f](y,function(V,ne){p.next({snapshot:V,prevKey:ne,event:f})},p.error.bind(p));return{unsubscribe:function(){!function Vc(y,f,p){let C=null;const V=p?new gc(p):null;"value"===f?C=new vl(V):f&&(C=new rl(f,V)),Hl(y._repo,y,C)}(y,f,C)}}}).pipe(function We(y,f=ee.z){const p=function Ve(y=0,f,p=ee.P){let C=-1;return null!=f&&((0,Ie.K)(f)?p=f:C=f),new N.y(V=>{let ne=function we(y){return y instanceof Date&&!isNaN(y)}(y)?+y-p.now():y;ne<0&&(ne=0);let de=0;return p.schedule(function(){V.closed||(V.next(de++),0<=C?this.schedule(void 0,C):V.complete())},ne)})}(y,f);return ve(()=>p)}(0))}function Au(y,f){return void 0===f&&(f={}),Zl(y,Ds.value).pipe((0,Se.U)(function(p){return il(p,f)}))}function il(y,f){var p;void 0===f&&(f={});var C=y.snapshot.val();return y.snapshot.exists()&&"object"==typeof C?Yl(Yl({},C),f.keyField?((p={})[f.keyField]=y.snapshot.key,p):null):C}function dd(y,f){void 0===f&&(f={});var p=function ad(y){return(null==y||0===y.length)&&(y=[Ds.added,Ds.removed,Ds.changed,Ds.moved]),y}(f.events);return function ud(y){return(0,U.D)(oa(y)).pipe((0,Se.U)(function(f){return{snapshot:f,prevKey:null,event:Ds.value}}))}(y).pipe((0,Me.w)(function(C){if(!C.snapshot.exists())return(0,ie.of)([]);var V=[(0,ie.of)(C)];return p.forEach(function(ne){V.push(Zl(y,ne))}),L.T.apply(void 0,V).pipe((0,et.R)(bp,[]))}),(0,Fe.x)())}function Cp(y,f){return void 0===f&&(f={}),dd(y).pipe((0,Se.U)(function(p){return p.map(function(C){return il(C,f)})}))}function xu(y,f){for(var p=y.length,C=0;C-1){var at=y[de-1];(at&&at.snapshot.key||null)!==C&&(y=y.filter(function(Zt){return Zt.snapshot.key!==p.key})).splice(Ne,0,f)}else{if(null==C)return jc([f],y);(y=y.slice()).splice(Ne,0,f)}return y;case Ds.removed:return y.filter(function(Zt){return Zt.snapshot.key!==p.key});case Ds.changed:return y.map(function(Zt){return Zt.snapshot.key===ne?f:Zt});case Ds.moved:if(de>-1){var Bt=y.splice(de,1)[0];return(y=y.slice()).splice(Ne,0,Bt),y}return y;default:return y}}class Xl{constructor(f){return f}}const hd="database",Jd=new g.OlP("angularfire2.database-instances");function Ql(y){return(f,p)=>{const C=f.runOutsideAngular(()=>y(p));return new Xl(C)}}const rf={provide:class nf{constructor(){return(0,n.vb)(hd)}},deps:[[new g.FiY,Jd]]},la={provide:Xl,useFactory:function fd(y,f){const p=(0,n.JM)(hd,y,f);return p&&new Xl(p)},deps:[[new g.FiY,Jd],A.Ot]};let sl=(()=>{class y{constructor(){(0,R.KN)("angularfire",n.q4.full,"rtdb")}}return y.\u0275fac=function(p){return new(p||y)},y.\u0275mod=g.oAB({type:y}),y.\u0275inj=g.cJS({providers:[la,rf]}),y})();function sf(y,...f){return{ngModule:sl,providers:[{provide:Jd,useFactory:Ql(y),multi:!0,deps:[g.R0b,g.zs3,n.HU,A.z6,[new g.FiY,d.dh],[new g.FiY,O.nm],...f]}]}}const af=(0,n.u3)(Cp,!0),eh=(0,n.u3)(Au,!0),df=(0,n.u3)(fp,!0),Ru=(0,n.u3)(Hm,!0),hf=(0,n.u3)(jl,!0),Qm=(0,n.u3)($c,!0),ff=(0,n.u3)(dp,!0),nh=(0,n.u3)(pp,!0),rh=(0,n.u3)(ed,!0),md=(0,n.u3)(zh,!0)},3562:(o,c,u)=>{"use strict";u.d(c,{gg:()=>Fe,ET:()=>It,hJ:()=>Dn,BS:()=>bt,oe:()=>Fn,JU:()=>Zn,_1:()=>Yt,QT:()=>Ut,kl:()=>xt,Xk:()=>qe,zN:()=>F,ad:()=>be,b9:()=>_r,cf:()=>Xt,Xo:()=>wn,Cm:()=>ke,IO:()=>kn,pl:()=>ft,TQ:()=>nn,r7:()=>Gn,ar:()=>lt});var n=u(1661),g=u(4650),d=u(7323),A=u(3692),R=u(259),O=u(163),N=u(2577),U=u(9751),ie=u(4004),L={includeMetadataChanges:!1};function ee(nt,mt){return void 0===mt&&(mt=L),new U.y(function(qt){return{unsubscribe:(0,N.cf)(nt,mt,{next:qt.next.bind(qt),error:qt.error.bind(qt),complete:qt.complete.bind(qt)})}})}function z(nt,mt){return void 0===mt&&(mt={}),function K(nt){return ee(nt,{includeMetadataChanges:!0})}(nt).pipe((0,ie.U)(function(qt){return ce(qt,mt)}))}function ce(nt,mt){void 0===mt&&(mt={});var qt=nt.data();return!nt.exists()||"object"!=typeof qt||null===qt||mt.idField&&(qt[mt.idField]=nt.id),qt}function et(nt,mt){return void 0===mt&&(mt={}),function We(nt){return ee(nt,{includeMetadataChanges:!0}).pipe((0,ie.U)(function(mt){return mt.docs}))}(nt).pipe((0,ie.U)(function(qt){return qt.map(function(Cn){return ce(Cn,mt)})}))}class Fe{constructor(mt){return mt}}const Ee="firestore",$=new g.OlP("angularfire2.firestore-instances");function Qe(nt){return(mt,qt)=>{const Cn=mt.runOutsideAngular(()=>nt(qt));return new Fe(Cn)}}const xe={provide:class ae{constructor(){return(0,n.vb)(Ee)}},deps:[[new g.FiY,$]]},st={provide:Fe,useFactory:function ue(nt,mt){const qt=(0,n.JM)(Ee,nt,mt);return qt&&new Fe(qt)},deps:[[new g.FiY,$],A.Ot]};let Le=(()=>{class nt{constructor(){(0,R.KN)("angularfire",n.q4.full,"fst")}}return nt.\u0275fac=function(qt){return new(qt||nt)},nt.\u0275mod=g.oAB({type:nt}),nt.\u0275inj=g.cJS({providers:[st,xe]}),nt})();function ke(nt,...mt){return{ngModule:Le,providers:[{provide:$,useFactory:Qe(nt),multi:!0,deps:[g.R0b,g.zs3,n.HU,A.z6,[new g.FiY,d.dh],[new g.FiY,O.nm],...mt]}]}}const bt=(0,n.u3)(et,!0),Yt=(0,n.u3)(z,!0),It=(0,n.u3)(N.ET,!0),Dn=(0,n.u3)(N.hJ,!0),Fn=(0,n.u3)(N.oe,!0),Zn=(0,n.u3)(N.JU,!0),Ut=(0,n.u3)(N.QT,!0),xt=(0,n.u3)(N.kl,!0),qe=(0,n.u3)(N.Xk,!0),F=(0,n.u3)(N.zN,!0),be=(0,n.u3)(N.ad,!0),_r=(0,n.u3)(N.b9,!0),Xt=(0,n.u3)(N.cf,!0),wn=(0,n.u3)(N.Xo,!0),kn=(0,n.u3)(N.IO,!0),ft=(0,n.u3)(N.pl,!0),nn=(0,n.u3)(N.TQ,!0),Gn=(0,n.u3)(N.r7,!0),lt=(0,n.u3)(N.ar,!0)},4575:(o,c,u)=>{"use strict";u.d(c,{$C:()=>Ie,FI:()=>U,V1:()=>we,W$:()=>te});var n=u(4650),g=u(1661),d=u(3692),A=u(7323),R=u(259),O=u(163),N=u(3629);class U{constructor(Se){return Se}}const ie="functions",K=new n.OlP("angularfire2.functions-instances");function ce(We){return(Se,Me)=>{const et=Se.runOutsideAngular(()=>We(Me));return new U(et)}}const X={provide:class L{constructor(){return(0,g.vb)(ie)}},deps:[[new n.FiY,K]]},Y={provide:U,useFactory:function z(We,Se){const Me=(0,g.JM)(ie,We,Se);return Me&&new U(Me)},deps:[[new n.FiY,K],d.Ot]};let G=(()=>{class We{constructor(){(0,R.KN)("angularfire",g.q4.full,"fn")}}return We.\u0275fac=function(Me){return new(Me||We)},We.\u0275mod=n.oAB({type:We}),We.\u0275inj=n.cJS({providers:[Y,X]}),We})();function te(We,...Se){return{ngModule:G,providers:[{provide:K,useFactory:ce(We),multi:!0,deps:[n.R0b,n.zs3,g.HU,d.z6,[new n.FiY,A.dh],[new n.FiY,O.nm],...Se]}]}}const Ie=(0,g.u3)(N.$C,!0),we=(0,g.u3)(N.V1,!0)},1661:(o,c,u)=>{"use strict";u.d(c,{q4:()=>qs,HU:()=>Ki,vb:()=>ps,JM:()=>_s,nk:()=>es,u3:()=>ns});var n=u(4650),g=u(259),d=u(5861),A=u(3847),R=u(9572),O=u(3272),N=u(1877);u(9329);const ie="@firebase/remote-config",L="0.4.4",ce=new R.LL("remoteconfig","Remote Config",{"registration-window":"Undefined window object. This SDK only supports usage in a browser environment.","registration-project-id":"Undefined project identifier. Check Firebase app initialization.","registration-api-key":"Undefined API key. Check Firebase app initialization.","registration-app-id":"Undefined app identifier. Check Firebase app initialization.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","storage-delete":"Error thrown when deleting from storage. Original error: {$originalErrorMessage}.","fetch-client-network":"Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-timeout":'The config fetch request timed out. Configure timeout using "fetchTimeoutMillis" SDK setting.',"fetch-throttle":'The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',"fetch-client-parse":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","indexed-db-unavailable":"Indexed DB is not supported by current browser"});class Qe{constructor(Ke,yt,Rt,rn){this.client=Ke,this.storage=yt,this.storageCache=Rt,this.logger=rn}isCachedDataFresh(Ke,yt){if(!yt)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;const Rt=Date.now()-yt,rn=Rt<=Ke;return this.logger.debug(`Config fetch cache check. Cache age millis: ${Rt}. Cache max age millis (minimumFetchIntervalMillis setting): ${Ke}. Is cache hit: ${rn}.`),rn}fetch(Ke){var yt=this;return(0,d.Z)(function*(){const[Rt,rn]=yield Promise.all([yt.storage.getLastSuccessfulFetchTimestampMillis(),yt.storage.getLastSuccessfulFetchResponse()]);if(rn&&yt.isCachedDataFresh(Ke.cacheMaxAgeMillis,Rt))return rn;Ke.eTag=rn&&rn.eTag;const Tn=yield yt.client.fetch(Ke),An=[yt.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())];return 200===Tn.status&&An.push(yt.storage.setLastSuccessfulFetchResponse(Tn)),yield Promise.all(An),Tn})()}}function xe(Ue=navigator){return Ue.languages&&Ue.languages[0]||Ue.language}class st{constructor(Ke,yt,Rt,rn,Tn,An){this.firebaseInstallations=Ke,this.sdkVersion=yt,this.namespace=Rt,this.projectId=rn,this.apiKey=Tn,this.appId=An}fetch(Ke){var yt=this;return(0,d.Z)(function*(){const[Rt,rn]=yield Promise.all([yt.firebaseInstallations.getId(),yt.firebaseInstallations.getToken()]),An=`${window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com"}/v1/projects/${yt.projectId}/namespaces/${yt.namespace}:fetch?key=${yt.apiKey}`,Or={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":Ke.eTag||"*"},ci={sdk_version:yt.sdkVersion,app_instance_id:Rt,app_instance_id_token:rn,app_id:yt.appId,language_code:xe()},Hr={method:"POST",headers:Or,body:JSON.stringify(ci)},or=fetch(An,Hr),Sr=new Promise((Ri,mr)=>{Ke.signal.addEventListener(()=>{const ho=new Error("The operation was aborted.");ho.name="AbortError",mr(ho)})});let Ms;try{yield Promise.race([or,Sr]),Ms=yield or}catch(Ri){let mr="fetch-client-network";throw"AbortError"===Ri?.name&&(mr="fetch-timeout"),ce.create(mr,{originalErrorMessage:Ri?.message})}let Ci=Ms.status;const ar=Ms.headers.get("ETag")||void 0;let bs,wi;if(200===Ms.status){let Ri;try{Ri=yield Ms.json()}catch(mr){throw ce.create("fetch-client-parse",{originalErrorMessage:mr?.message})}bs=Ri.entries,wi=Ri.state}if("INSTANCE_STATE_UNSPECIFIED"===wi?Ci=500:"NO_CHANGE"===wi?Ci=304:("NO_TEMPLATE"===wi||"EMPTY_CONFIG"===wi)&&(bs={}),304!==Ci&&200!==Ci)throw ce.create("fetch-status",{httpStatus:Ci});return{status:Ci,eTag:ar,config:bs}})()}}class Ge{constructor(Ke,yt){this.client=Ke,this.storage=yt}fetch(Ke){var yt=this;return(0,d.Z)(function*(){const Rt=(yield yt.storage.getThrottleMetadata())||{backoffCount:0,throttleEndTimeMillis:Date.now()};return yt.attemptFetch(Ke,Rt)})()}attemptFetch(Ke,{throttleEndTimeMillis:yt,backoffCount:Rt}){var rn=this;return(0,d.Z)(function*(){yield function Le(Ue,Ke){return new Promise((yt,Rt)=>{const rn=Math.max(Ke-Date.now(),0),Tn=setTimeout(yt,rn);Ue.addEventListener(()=>{clearTimeout(Tn),Rt(ce.create("fetch-throttle",{throttleEndTimeMillis:Ke}))})})}(Ke.signal,yt);try{const Tn=yield rn.client.fetch(Ke);return yield rn.storage.deleteThrottleMetadata(),Tn}catch(Tn){if(!function ke(Ue){if(!(Ue instanceof R.ZR&&Ue.customData))return!1;const Ke=Number(Ue.customData.httpStatus);return 429===Ke||500===Ke||503===Ke||504===Ke}(Tn))throw Tn;const An={throttleEndTimeMillis:Date.now()+(0,R.$s)(Rt),backoffCount:Rt+1};return yield rn.storage.setThrottleMetadata(An),rn.attemptFetch(Ke,An)}})()}}class $t{constructor(Ke,yt,Rt,rn,Tn){this.app=Ke,this._client=yt,this._storageCache=Rt,this._storage=rn,this._logger=Tn,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}get fetchTimeMillis(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1}get lastFetchStatus(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"}}function bt(Ue,Ke){const yt=Ue.target.error||void 0;return ce.create(Ke,{originalErrorMessage:yt&&yt?.message})}const St="app_namespace_store";class It{constructor(Ke,yt,Rt,rn=function Et(){return new Promise((Ue,Ke)=>{try{const yt=indexedDB.open("firebase_remote_config",1);yt.onerror=Rt=>{Ke(bt(Rt,"storage-open"))},yt.onsuccess=Rt=>{Ue(Rt.target.result)},yt.onupgradeneeded=Rt=>{0===Rt.oldVersion&&Rt.target.result.createObjectStore(St,{keyPath:"compositeKey"})}}catch(yt){Ke(ce.create("storage-open",{originalErrorMessage:yt?.message}))}})}()){this.appId=Ke,this.appName=yt,this.namespace=Rt,this.openDbPromise=rn}getLastFetchStatus(){return this.get("last_fetch_status")}setLastFetchStatus(Ke){return this.set("last_fetch_status",Ke)}getLastSuccessfulFetchTimestampMillis(){return this.get("last_successful_fetch_timestamp_millis")}setLastSuccessfulFetchTimestampMillis(Ke){return this.set("last_successful_fetch_timestamp_millis",Ke)}getLastSuccessfulFetchResponse(){return this.get("last_successful_fetch_response")}setLastSuccessfulFetchResponse(Ke){return this.set("last_successful_fetch_response",Ke)}getActiveConfig(){return this.get("active_config")}setActiveConfig(Ke){return this.set("active_config",Ke)}getActiveConfigEtag(){return this.get("active_config_etag")}setActiveConfigEtag(Ke){return this.set("active_config_etag",Ke)}getThrottleMetadata(){return this.get("throttle_metadata")}setThrottleMetadata(Ke){return this.set("throttle_metadata",Ke)}deleteThrottleMetadata(){return this.delete("throttle_metadata")}get(Ke){var yt=this;return(0,d.Z)(function*(){const Rt=yield yt.openDbPromise;return new Promise((rn,Tn)=>{const Or=Rt.transaction([St],"readonly").objectStore(St),ci=yt.createCompositeKey(Ke);try{const Hr=Or.get(ci);Hr.onerror=or=>{Tn(bt(or,"storage-get"))},Hr.onsuccess=or=>{const Sr=or.target.result;rn(Sr?Sr.value:void 0)}}catch(Hr){Tn(ce.create("storage-get",{originalErrorMessage:Hr?.message}))}})})()}set(Ke,yt){var Rt=this;return(0,d.Z)(function*(){const rn=yield Rt.openDbPromise;return new Promise((Tn,An)=>{const ci=rn.transaction([St],"readwrite").objectStore(St),Hr=Rt.createCompositeKey(Ke);try{const or=ci.put({compositeKey:Hr,value:yt});or.onerror=Sr=>{An(bt(Sr,"storage-set"))},or.onsuccess=()=>{Tn()}}catch(or){An(ce.create("storage-set",{originalErrorMessage:or?.message}))}})})()}delete(Ke){var yt=this;return(0,d.Z)(function*(){const Rt=yield yt.openDbPromise;return new Promise((rn,Tn)=>{const Or=Rt.transaction([St],"readwrite").objectStore(St),ci=yt.createCompositeKey(Ke);try{const Hr=Or.delete(ci);Hr.onerror=or=>{Tn(bt(or,"storage-delete"))},Hr.onsuccess=()=>{rn()}}catch(Hr){Tn(ce.create("storage-delete",{originalErrorMessage:Hr?.message}))}})})()}createCompositeKey(Ke){return[this.appId,this.appName,this.namespace,Ke].join()}}class gn{constructor(Ke){this.storage=Ke}getLastFetchStatus(){return this.lastFetchStatus}getLastSuccessfulFetchTimestampMillis(){return this.lastSuccessfulFetchTimestampMillis}getActiveConfig(){return this.activeConfig}loadFromStorage(){var Ke=this;return(0,d.Z)(function*(){const yt=Ke.storage.getLastFetchStatus(),Rt=Ke.storage.getLastSuccessfulFetchTimestampMillis(),rn=Ke.storage.getActiveConfig(),Tn=yield yt;Tn&&(Ke.lastFetchStatus=Tn);const An=yield Rt;An&&(Ke.lastSuccessfulFetchTimestampMillis=An);const Or=yield rn;Or&&(Ke.activeConfig=Or)})()}setLastFetchStatus(Ke){return this.lastFetchStatus=Ke,this.storage.setLastFetchStatus(Ke)}setLastSuccessfulFetchTimestampMillis(Ke){return this.lastSuccessfulFetchTimestampMillis=Ke,this.storage.setLastSuccessfulFetchTimestampMillis(Ke)}setActiveConfig(Ke){return this.activeConfig=Ke,this.storage.setActiveConfig(Ke)}}function jn(){return Mn.apply(this,arguments)}function Mn(){return(Mn=(0,d.Z)(function*(){if(!(0,R.hl)())return!1;try{return yield(0,R.eu)()}catch{return!1}})).apply(this,arguments)}!function Sn(){(0,A.Xd)(new O.wA("remote-config",function Ue(Ke,{instanceIdentifier:yt}){const Rt=Ke.getProvider("app").getImmediate(),rn=Ke.getProvider("installations-internal").getImmediate();if(typeof window>"u")throw ce.create("registration-window");if(!(0,R.hl)())throw ce.create("indexed-db-unavailable");const{projectId:Tn,apiKey:An,appId:Or}=Rt.options;if(!Tn)throw ce.create("registration-project-id");if(!An)throw ce.create("registration-api-key");if(!Or)throw ce.create("registration-app-id");const ci=new It(Or,Rt.name,yt=yt||"firebase"),Hr=new gn(ci),or=new N.Yd(ie);or.logLevel=N.in.ERROR;const Sr=new st(rn,A.Jn,yt,Tn,An,Or),Ms=new Ge(Sr,ci),Ci=new Qe(Ms,ci,Hr,or),ar=new $t(Rt,Ci,Hr,ci,or);return function We(Ue){const Ke=(0,R.m9)(Ue);Ke._initializePromise||(Ke._initializePromise=Ke._storageCache.loadFromStorage().then(()=>{Ke._isInitializationComplete=!0}))}(ar),ar},"PUBLIC").setMultipleInstances(!0)),(0,A.KN)(ie,L),(0,A.KN)(ie,L,"esm2017")}();var Fn=u(8766);const un="/firebase-messaging-sw.js",Wn="/firebase-cloud-messaging-push-scope",Zn="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",Vn="https://fcmregistrations.googleapis.com/v1",sr="google.c.a.c_id",Tr="google.c.a.c_l",bn="google.c.a.ts",pn="google.c.a.e";var Ut=(()=>{return(Ue=Ut||(Ut={})).PUSH_RECEIVED="push-received",Ue.NOTIFICATION_CLICKED="notification-clicked",Ut;var Ue})();function xt(Ue){const Ke=new Uint8Array(Ue);return btoa(String.fromCharCode(...Ke)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function qe(Ue){const yt=(Ue+"=".repeat((4-Ue.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),Rt=atob(yt),rn=new Uint8Array(Rt.length);for(let Tn=0;TnTn.name).includes($e))return null;let Ke=null;return(yield(0,Fn.X3)($e,T,{upgrade:(Rt=(0,d.Z)(function*(rn,Tn,An,Or){var ci;if(Tn<2||!rn.objectStoreNames.contains(F))return;const Hr=Or.objectStore(F),or=yield Hr.index("fcmSenderId").get(Ue);if(yield Hr.clear(),or)if(2===Tn){const Sr=or;if(!Sr.auth||!Sr.p256dh||!Sr.endpoint)return;Ke={token:Sr.fcmToken,createTime:null!==(ci=Sr.createTime)&&void 0!==ci?ci:Date.now(),subscriptionOptions:{auth:Sr.auth,p256dh:Sr.p256dh,endpoint:Sr.endpoint,swScope:Sr.swScope,vapidKey:"string"==typeof Sr.vapidKey?Sr.vapidKey:xt(Sr.vapidKey)}}}else if(3===Tn){const Sr=or;Ke={token:Sr.fcmToken,createTime:Sr.createTime,subscriptionOptions:{auth:xt(Sr.auth),p256dh:xt(Sr.p256dh),endpoint:Sr.endpoint,swScope:Sr.swScope,vapidKey:xt(Sr.vapidKey)}}}else if(4===Tn){const Sr=or;Ke={token:Sr.fcmToken,createTime:Sr.createTime,subscriptionOptions:{auth:xt(Sr.auth),p256dh:xt(Sr.p256dh),endpoint:Sr.endpoint,swScope:Sr.swScope,vapidKey:xt(Sr.vapidKey)}}}}),function(Tn,An,Or,ci){return Rt.apply(this,arguments)})})).close(),yield(0,Fn.Lj)($e),yield(0,Fn.Lj)("fcm_vapid_details_db"),yield(0,Fn.Lj)("undefined"),function Pn(Ue){if(!Ue||!Ue.subscriptionOptions)return!1;const{subscriptionOptions:Ke}=Ue;return"number"==typeof Ue.createTime&&Ue.createTime>0&&"string"==typeof Ue.token&&Ue.token.length>0&&"string"==typeof Ke.auth&&Ke.auth.length>0&&"string"==typeof Ke.p256dh&&Ke.p256dh.length>0&&"string"==typeof Ke.endpoint&&Ke.endpoint.length>0&&"string"==typeof Ke.swScope&&Ke.swScope.length>0&&"string"==typeof Ke.vapidKey&&Ke.vapidKey.length>0}(Ke)?Ke:null;var Rt}),Pt.apply(this,arguments)}const _r="firebase-messaging-database",Ur=1,Ht="firebase-messaging-store";let At=null;function Xt(){return At||(At=(0,Fn.X3)(_r,Ur,{upgrade:(Ue,Ke)=>{0===Ke&&Ue.createObjectStore(Ht)}})),At}function sn(Ue){return wn.apply(this,arguments)}function wn(){return wn=(0,d.Z)(function*(Ue){const Ke=Ye(Ue),Rt=yield(yield Xt()).transaction(Ht).objectStore(Ht).get(Ke);if(Rt)return Rt;{const rn=yield function be(Ue){return Pt.apply(this,arguments)}(Ue.appConfig.senderId);if(rn)return yield kn(Ue,rn),rn}}),wn.apply(this,arguments)}function kn(Ue,Ke){return vr.apply(this,arguments)}function vr(){return(vr=(0,d.Z)(function*(Ue,Ke){const yt=Ye(Ue),rn=(yield Xt()).transaction(Ht,"readwrite");return yield rn.objectStore(Ht).put(Ke,yt),yield rn.done,Ke})).apply(this,arguments)}function Te(){return(Te=(0,d.Z)(function*(Ue){const Ke=Ye(Ue),Rt=(yield Xt()).transaction(Ht,"readwrite");yield Rt.objectStore(Ht).delete(Ke),yield Rt.done})).apply(this,arguments)}function Ye({appConfig:Ue}){return Ue.appId}const dt=new R.LL("messaging","Messaging",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"only-available-in-window":"This method is available in a Window context.","only-available-in-sw":"This method is available in a service worker context.","permission-default":"The notification permission was not granted and dismissed instead.","permission-blocked":"The notification permission was not granted and blocked instead.","unsupported-browser":"This browser doesn't support the API's required to use the Firebase SDK.","indexed-db-unsupported":"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)","failed-service-worker-registration":"We are unable to register the default service worker. {$browserErrorMessage}","token-subscribe-failed":"A problem occurred while subscribing the user to FCM: {$errorInfo}","token-subscribe-no-token":"FCM returned no token when subscribing the user to push.","token-unsubscribe-failed":"A problem occurred while unsubscribing the user from FCM: {$errorInfo}","token-update-failed":"A problem occurred while updating the user from FCM: {$errorInfo}","token-update-no-token":"FCM returned no token when updating the user to push.","use-sw-after-get-token":"The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.","invalid-sw-registration":"The input to useServiceWorker() must be a ServiceWorkerRegistration.","invalid-bg-handler":"The input to setBackgroundMessageHandler() must be a function.","invalid-vapid-key":"The public VAPID key must be a string.","use-vapid-key-after-get-token":"The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."});function Gt(Ue,Ke){return nn.apply(this,arguments)}function nn(){return(nn=(0,d.Z)(function*(Ue,Ke){const yt=yield He(Ue),Rt=mt(Ke),rn={method:"POST",headers:yt,body:JSON.stringify(Rt)};let Tn;try{Tn=yield(yield fetch(lt(Ue.appConfig),rn)).json()}catch(An){throw dt.create("token-subscribe-failed",{errorInfo:An?.toString()})}if(Tn.error)throw dt.create("token-subscribe-failed",{errorInfo:Tn.error.message});if(!Tn.token)throw dt.create("token-subscribe-no-token");return Tn.token})).apply(this,arguments)}function yn(){return(yn=(0,d.Z)(function*(Ue,Ke){const yt=yield He(Ue),Rt=mt(Ke.subscriptionOptions),rn={method:"PATCH",headers:yt,body:JSON.stringify(Rt)};let Tn;try{Tn=yield(yield fetch(`${lt(Ue.appConfig)}/${Ke.token}`,rn)).json()}catch(An){throw dt.create("token-update-failed",{errorInfo:An?.toString()})}if(Tn.error)throw dt.create("token-update-failed",{errorInfo:Tn.error.message});if(!Tn.token)throw dt.create("token-update-no-token");return Tn.token})).apply(this,arguments)}function Gn(Ue,Ke){return gt.apply(this,arguments)}function gt(){return(gt=(0,d.Z)(function*(Ue,Ke){const Rt={method:"DELETE",headers:yield He(Ue)};try{const Tn=yield(yield fetch(`${lt(Ue.appConfig)}/${Ke}`,Rt)).json();if(Tn.error)throw dt.create("token-unsubscribe-failed",{errorInfo:Tn.error.message})}catch(rn){throw dt.create("token-unsubscribe-failed",{errorInfo:rn?.toString()})}})).apply(this,arguments)}function lt({projectId:Ue}){return`${Vn}/projects/${Ue}/registrations`}function He(Ue){return nt.apply(this,arguments)}function nt(){return(nt=(0,d.Z)(function*({appConfig:Ue,installations:Ke}){const yt=yield Ke.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":Ue.apiKey,"x-goog-firebase-installations-auth":`FIS ${yt}`})})).apply(this,arguments)}function mt({p256dh:Ue,auth:Ke,endpoint:yt,vapidKey:Rt}){const rn={web:{endpoint:yt,auth:Ke,p256dh:Ue}};return Rt!==Zn&&(rn.web.applicationPubKey=Rt),rn}const qt=6048e5;function tr(){return tr=(0,d.Z)(function*(Ue){const Ke=yield function Er(Ue,Ke){return Bn.apply(this,arguments)}(Ue.swRegistration,Ue.vapidKey),yt={vapidKey:Ue.vapidKey,swScope:Ue.swRegistration.scope,endpoint:Ke.endpoint,auth:xt(Ke.getKey("auth")),p256dh:xt(Ke.getKey("p256dh"))},Rt=yield sn(Ue.firebaseDependencies);if(Rt){if(function Cr(Ue,Ke){return Ke.vapidKey===Ue.vapidKey&&Ke.endpoint===Ue.endpoint&&Ke.auth===Ue.auth&&Ke.p256dh===Ue.p256dh}(Rt.subscriptionOptions,yt))return Date.now()>=Rt.createTime+qt?function Ct(Ue,Ke){return zt.apply(this,arguments)}(Ue,{token:Rt.token,createTime:Date.now(),subscriptionOptions:yt}):Rt.token;try{yield Gn(Ue.firebaseDependencies,Rt.token)}catch(rn){console.warn(rn)}return tn(Ue.firebaseDependencies,yt)}return tn(Ue.firebaseDependencies,yt)}),tr.apply(this,arguments)}function nr(){return nr=(0,d.Z)(function*(Ue){const Ke=yield sn(Ue.firebaseDependencies);Ke&&(yield Gn(Ue.firebaseDependencies,Ke.token),yield function rt(Ue){return Te.apply(this,arguments)}(Ue.firebaseDependencies));const yt=yield Ue.swRegistration.pushManager.getSubscription();return!yt||yt.unsubscribe()}),nr.apply(this,arguments)}function zt(){return zt=(0,d.Z)(function*(Ue,Ke){try{const yt=yield function En(Ue,Ke){return yn.apply(this,arguments)}(Ue.firebaseDependencies,Ke),Rt=Object.assign(Object.assign({},Ke),{token:yt,createTime:Date.now()});return yield kn(Ue.firebaseDependencies,Rt),yt}catch(yt){throw yield function fr(Ue){return nr.apply(this,arguments)}(Ue),yt}}),zt.apply(this,arguments)}function tn(Ue,Ke){return xn.apply(this,arguments)}function xn(){return(xn=(0,d.Z)(function*(Ue,Ke){const Rt={token:yield Gt(Ue,Ke),createTime:Date.now(),subscriptionOptions:Ke};return yield kn(Ue,Rt),Rt.token})).apply(this,arguments)}function Bn(){return(Bn=(0,d.Z)(function*(Ue,Ke){return(yield Ue.pushManager.getSubscription())||Ue.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:qe(Ke)})})).apply(this,arguments)}function Ar(Ue){const Ke={from:Ue.from,collapseKey:Ue.collapse_key,messageId:Ue.fcmMessageId};return function Jr(Ue,Ke){if(!Ke.notification)return;Ue.notification={};const yt=Ke.notification.title;yt&&(Ue.notification.title=yt);const Rt=Ke.notification.body;Rt&&(Ue.notification.body=Rt);const rn=Ke.notification.image;rn&&(Ue.notification.image=rn);const Tn=Ke.notification.icon;Tn&&(Ue.notification.icon=Tn)}(Ke,Ue),function Dr(Ue,Ke){Ke.data&&(Ue.data=Ke.data)}(Ke,Ue),function li(Ue,Ke){var yt,Rt,rn,Tn,An;if(!(Ke.fcmOptions||null!==(yt=Ke.notification)&&void 0!==yt&&yt.click_action))return;Ue.fcmOptions={};const Or=null!==(rn=null===(Rt=Ke.fcmOptions)||void 0===Rt?void 0:Rt.link)&&void 0!==rn?rn:null===(Tn=Ke.notification)||void 0===Tn?void 0:Tn.click_action;Or&&(Ue.fcmOptions.link=Or);const ci=null===(An=Ke.fcmOptions)||void 0===An?void 0:An.analytics_label;ci&&(Ue.fcmOptions.analyticsLabel=ci)}(Ke,Ue),Ke}function rr(Ue,Ke){const yt=[];for(let Rt=0;Rt{})}catch(Ke){throw dt.create("failed-service-worker-registration",{browserErrorMessage:Ke?.message})}})).apply(this,arguments)}function ze(){return(ze=(0,d.Z)(function*(Ue,Ke){if(!Ke&&!Ue.swRegistration&&(yield _t(Ue)),Ke||!Ue.swRegistration){if(!(Ke instanceof ServiceWorkerRegistration))throw dt.create("invalid-sw-registration");Ue.swRegistration=Ke}})).apply(this,arguments)}function Pe(){return(Pe=(0,d.Z)(function*(Ue,Ke){Ke?Ue.vapidKey=Ke:Ue.vapidKey||(Ue.vapidKey=Zn)})).apply(this,arguments)}function vt(){return vt=(0,d.Z)(function*(Ue,Ke){if(!navigator)throw dt.create("only-available-in-window");if("default"===Notification.permission&&(yield Notification.requestPermission()),"granted"!==Notification.permission)throw dt.create("permission-blocked");return yield function tt(Ue,Ke){return Pe.apply(this,arguments)}(Ue,Ke?.vapidKey),yield function ye(Ue,Ke){return ze.apply(this,arguments)}(Ue,Ke?.serviceWorkerRegistration),function Cn(Ue){return tr.apply(this,arguments)}(Ue)}),vt.apply(this,arguments)}function Vt(){return(Vt=(0,d.Z)(function*(Ue,Ke,yt){const Rt=function jt(Ue){switch(Ue){case Ut.NOTIFICATION_CLICKED:return"notification_open";case Ut.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(Ke);(yield Ue.firebaseDependencies.analyticsProvider.get()).logEvent(Rt,{message_id:yt[sr],message_name:yt[Tr],message_time:yt[bn],message_device_time:Math.floor(Date.now()/1e3)})})).apply(this,arguments)}function $n(){return $n=(0,d.Z)(function*(Ue,Ke){const yt=Ke.data;if(!yt.isFirebaseMessaging)return;Ue.onMessageHandler&&yt.messageType===Ut.PUSH_RECEIVED&&("function"==typeof Ue.onMessageHandler?Ue.onMessageHandler(Ar(yt)):Ue.onMessageHandler.next(Ar(yt)));const Rt=yt.data;(function mn(Ue){return"object"==typeof Ue&&!!Ue&&sr in Ue})(Rt)&&"1"===Rt[pn]&&(yield function Mt(Ue,Ke,yt){return Vt.apply(this,arguments)}(Ue,yt.messageType,Rt))}),$n.apply(this,arguments)}const er="@firebase/messaging",Oi=Ue=>{const Ke=new ni(Ue.getProvider("app").getImmediate(),Ue.getProvider("installations-internal").getImmediate(),Ue.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",yt=>function vn(Ue,Ke){return $n.apply(this,arguments)}(Ke,yt)),Ke},Mr=Ue=>{const Ke=Ue.getProvider("messaging").getImmediate();return{getToken:Rt=>function Je(Ue,Ke){return vt.apply(this,arguments)}(Ke,Rt)}};function Ji(){return is.apply(this,arguments)}function is(){return(is=(0,d.Z)(function*(){try{yield(0,R.eu)()}catch{return!1}return typeof window<"u"&&(0,R.hl)()&&(0,R.zI)()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")})).apply(this,arguments)}!function ri(){(0,A.Xd)(new O.wA("messaging",Oi,"PUBLIC")),(0,A.Xd)(new O.wA("messaging-internal",Mr,"PRIVATE")),(0,A.KN)(er,"0.12.4"),(0,A.KN)(er,"0.12.4","esm2017")}();var Yi=u(5898),kr=u(4408),xs=u(7565);const ss=new class ys extends xs.v{}(class Qr extends kr.o{constructor(Ke,yt){super(Ke,yt),this.scheduler=Ke,this.work=yt}schedule(Ke,yt=0){return yt>0?super.schedule(Ke,yt):(this.delay=yt,this.state=Ke,this.scheduler.flush(this),this)}execute(Ke,yt){return yt>0||this.closed?super.execute(Ke,yt):this._execute(Ke,yt)}requestAsyncId(Ke,yt,Rt=0){return null!=Rt&&Rt>0||null==Rt&&this.delay>0?super.requestAsyncId(Ke,yt,Rt):(Ke.flush(this),0)}});var br=u(4986),gi=u(9751),vs=u(8505),uo=u(9468),Mi=u(5363);const qs=new n.GfV("7.5.0"),fs="__angularfire_symbol__analyticsIsSupportedValue",$s="__angularfire_symbol__analyticsIsSupported",Zo="__angularfire_symbol__remoteConfigIsSupportedValue",Fi="__angularfire_symbol__remoteConfigIsSupported",$i="__angularfire_symbol__messagingIsSupportedValue",hi="__angularfire_symbol__messagingIsSupported";globalThis[$s]||(globalThis[$s]=(0,Yi.Gb)().then(Ue=>globalThis[fs]=Ue).catch(()=>globalThis[fs]=!1)),globalThis[hi]||(globalThis[hi]=Ji().then(Ue=>globalThis[$i]=Ue).catch(()=>globalThis[$i]=!1)),globalThis[Fi]||(globalThis[Fi]=jn().then(Ue=>globalThis[Zo]=Ue).catch(()=>globalThis[Zo]=!1));const es={async:()=>globalThis[$s],sync:()=>{const Ue=globalThis[fs];if(void 0===Ue)throw new Error((Ue=>`The APP_INITIALIZER that is "making" isSupported() sync for the sake of convenient DI has not resolved in this\ncontext. Rather than injecting ${Ue} in the constructor, first ensure that ${Ue} is supported by calling\n\`await isSupported()\`, then retrieve the instance from the injector manually \`injector.get(${Ue})\`.`)("Analytics"));return Ue}};function _s(Ue,Ke,yt){if(Ke){if(1===Ke.length)return Ke[0];const Tn=Ke.filter(An=>An.app===yt);if(1===Tn.length)return Tn[0]}return yt.container.getProvider(Ue).getImmediate({optional:!0})}const ps=(Ue,Ke)=>{const yt=Ke?[Ke]:(0,g.C6)(),Rt=[];return yt.forEach(rn=>{rn.container.getProvider(Ue).instances.forEach(An=>{Rt.includes(An)||Rt.push(An)})}),Rt};function Es(){}class Ir{constructor(Ke,yt=ss){this.zone=Ke,this.delegate=yt}now(){return this.delegate.now()}schedule(Ke,yt,Rt){const rn=this.zone;return this.delegate.schedule(function(An){rn.runGuarded(()=>{Ke.apply(this,[An])})},yt,Rt)}}class ts{constructor(Ke){this.zone=Ke,this.task=null}call(Ke,yt){const Rt=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",Es,{},Es,Es)),yt.pipe((0,vs.b)({next:Rt,complete:Rt,error:Rt})).subscribe(Ke).add(Rt)}unscheduleTask(){setTimeout(()=>{null!=this.task&&"scheduled"===this.task.state&&(this.task.invoke(),this.task=null)},10)}}let Ki=(()=>{class Ue{constructor(yt){this.ngZone=yt,this.outsideAngular=yt.runOutsideAngular(()=>new Ir(Zone.current)),this.insideAngular=yt.run(()=>new Ir(Zone.current,br.z)),globalThis.\u0275AngularFireScheduler||(globalThis.\u0275AngularFireScheduler=this)}}return Ue.\u0275fac=function(yt){return new(yt||Ue)(n.LFG(n.R0b))},Ue.\u0275prov=n.Yz7({token:Ue,factory:Ue.\u0275fac,providedIn:"root"}),Ue})();function qi(){const Ue=globalThis.\u0275AngularFireScheduler;if(!Ue)throw new Error("Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using\nprovideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).");return Ue}function os(Ue){return qi().ngZone.run(()=>Ue())}function Si(Ue){return qi(),function Ui(Ue){return function(yt){return(yt=yt.lift(new ts(Ue.ngZone))).pipe((0,uo.R)(Ue.outsideAngular),(0,Mi.Q)(Ue.insideAngular))}}(qi())(Ue)}const Cs=(Ue,Ke)=>function(){const Rt=arguments;return Ke&&setTimeout(()=>{"scheduled"===Ke.state&&Ke.invoke()},10),os(()=>Ue.apply(void 0,Rt))},ns=(Ue,Ke)=>function(){let yt;const Rt=arguments;for(let Tn=0;TnZone.current.scheduleMacroTask("firebaseZoneBlock",Es,{},Es,Es)))),Rt[Tn]=Cs(Rt[Tn],yt));const rn=function Ii(Ue){return qi().ngZone.runOutsideAngular(()=>Ue())}(()=>Ue.apply(this,Rt));if(!Ke){if(rn instanceof gi.y){const Tn=qi();return rn.pipe((0,uo.R)(Tn.outsideAngular),(0,Mi.Q)(Tn.insideAngular))}return os(()=>rn)}return rn instanceof gi.y?rn.pipe(Si):rn instanceof Promise?os(()=>new Promise((Tn,An)=>rn.then(Or=>os(()=>Tn(Or)),Or=>os(()=>An(Or))))):"function"==typeof rn&&yt?function(){return setTimeout(()=>{yt&&"scheduled"===yt.state&&yt.invoke()},10),rn.apply(this,arguments)}:os(()=>rn)}},9856:(o,c,u)=>{"use strict";u.d(c,{Br:()=>An,w:()=>Wn,We:()=>qe,eh:()=>$e,dr:()=>T,BJ:()=>F,oU:()=>be,cs:()=>os,ql:()=>Pt,fn:()=>_r,gZ:()=>Ur,YG:()=>Ht,Sm:()=>At,PM:()=>Xt,FN:()=>sn,Zi:()=>wn,tO:()=>kn,Dq:()=>vr,nz:()=>rt,hM:()=>Te,wI:()=>Ye,W2:()=>ft,IJ:()=>nn,W4:()=>En,jY:()=>gt,Gu:()=>lt,gu:()=>He,ju:()=>mt,MB:()=>qt,pK:()=>Cn,Ie:()=>tr,u8:()=>Ct,IK:()=>zt,td:()=>tn,Q$:()=>xn,q_:()=>Er,yh:()=>Bn,z0:()=>Cr,B7:()=>Br,se:()=>Gr,H$:()=>tt,jP:()=>Ki,Nd:()=>Pe,VI:()=>Je,cJ:()=>vt,GO:()=>Mt,t9:()=>Vt,n0:()=>jt,CK:()=>vn,A$:()=>$n,Hr:()=>er,g2:()=>is,Bs:()=>Wi,wd:()=>Vi,sr:()=>di,Pc:()=>ua,r4:()=>Ri,HT:()=>Or,_q:()=>ci,IN:()=>or,SH:()=>_s,t4:()=>Us,U5:()=>Vn,YI:()=>no,QI:()=>sr,j9:()=>Tr,yF:()=>Ms});var n=u(4650),g=u(433),d=u(655),A=u(8421),R=u(9751),O=u(5577),N=u(1144),U=u(576),ie=u(3268);const L=["addListener","removeListener"],ee=["addEventListener","removeEventListener"],K=["on","off"];function z(x,w,v,S){if((0,U.m)(v)&&(S=v,v=void 0),S)return z(x,w,v).pipe((0,ie.Z)(S));const[Q,Ze]=function G(x){return(0,U.m)(x.addEventListener)&&(0,U.m)(x.removeEventListener)}(x)?ee.map(Ot=>hn=>x[Ot](w,hn,v)):function X(x){return(0,U.m)(x.addListener)&&(0,U.m)(x.removeListener)}(x)?L.map(ce(x,w)):function Y(x){return(0,U.m)(x.on)&&(0,U.m)(x.off)}(x)?K.map(ce(x,w)):[];if(!Q&&(0,N.z)(x))return(0,O.z)(Ot=>z(Ot,w,v))((0,A.Xf)(x));if(!Q)throw new TypeError("Invalid event target");return new R.y(Ot=>{const hn=(...Yn)=>Ot.next(1Ze(hn)})}function ce(x,w){return v=>S=>x[v](w,S)}var te=u(7579),pe=u(1135),ve=u(5819),We=(u(9950),u(4802),u(3139),u(1671)),Se=u(3756),Me=u(471),et=u(604),Fe=u(4239),ae=(u(3509),u(7936)),st=u(9300),Le=u(3900),ke=u(1884),Ge=u(6895);const pt=We.i,St=["*"],Sn=x=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(x):"function"==typeof requestAnimationFrame?requestAnimationFrame(x):setTimeout(x),cr=x=>!!x.resolveComponentFactory;let Dn=(()=>{class x{constructor(v,S){this.injector=v,this.el=S,this.onChange=()=>{},this.onTouched=()=>{}}writeValue(v){this.el.nativeElement.value=this.lastValue=v??"",jn(this.el)}handleChangeEvent(v,S){v===this.el.nativeElement&&(S!==this.lastValue&&(this.lastValue=S,this.onChange(S)),jn(this.el))}_handleBlurEvent(v){v===this.el.nativeElement&&(this.onTouched(),jn(this.el))}registerOnChange(v){this.onChange=v}registerOnTouched(v){this.onTouched=v}setDisabledState(v){this.el.nativeElement.disabled=v}ngOnDestroy(){this.statusChanges&&this.statusChanges.unsubscribe()}ngAfterViewInit(){let v;try{v=this.injector.get(g.a5)}catch{}if(!v)return;v.statusChanges&&(this.statusChanges=v.statusChanges.subscribe(()=>jn(this.el)));const S=v.control;S&&["markAsTouched","markAllAsTouched","markAsUntouched","markAsDirty","markAsPristine"].forEach(Ze=>{if(typeof S[Ze]<"u"){const Ot=S[Ze].bind(S);S[Ze]=(...hn)=>{Ot(...hn),jn(this.el)}}})}}return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.zs3),n.Y36(n.SBq))},x.\u0275dir=n.lG2({type:x,hostBindings:function(v,S){1&v&&n.NdJ("ionBlur",function(Ze){return S._handleBlurEvent(Ze.target)})}}),x})();const jn=x=>{Sn(()=>{const w=x.nativeElement,v=null!=w.value&&w.value.toString().length>0,S=Mn(w);Fn(w,S);const Q=w.closest("ion-item");Q&&Fn(Q,v?[...S,"item-has-value"]:S)})},Mn=x=>{const w=x.classList,v=[];for(let S=0;S{const v=x.classList;v.remove("ion-valid","ion-invalid","ion-touched","ion-untouched","ion-dirty","ion-pristine"),v.add(...w)},un=(x,w)=>x.substring(0,w.length)===w;let Wn=(()=>{class x extends Dn{constructor(v,S){super(v,S)}writeValue(v){this.el.nativeElement.checked=this.lastValue=v??!1,jn(this.el)}_handleIonChange(v){this.handleChangeEvent(v,v.checked)}}return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.zs3),n.Y36(n.SBq))},x.\u0275dir=n.lG2({type:x,selectors:[["ion-checkbox"],["ion-toggle"]],hostBindings:function(v,S){1&v&&n.NdJ("ionChange",function(Ze){return S._handleIonChange(Ze.target)})},features:[n._Bn([{provide:g.JU,useExisting:x,multi:!0}]),n.qOj]}),x})(),Vn=(()=>{class x extends Dn{constructor(v,S){super(v,S)}_handleIonSelect(v){this.handleChangeEvent(v,v.checked)}}return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.zs3),n.Y36(n.SBq))},x.\u0275dir=n.lG2({type:x,selectors:[["ion-radio"]],hostBindings:function(v,S){1&v&&n.NdJ("ionSelect",function(Ze){return S._handleIonSelect(Ze.target)})},features:[n._Bn([{provide:g.JU,useExisting:x,multi:!0}]),n.qOj]}),x})(),sr=(()=>{class x extends Dn{constructor(v,S){super(v,S)}_handleChangeEvent(v){this.handleChangeEvent(v,v.value)}}return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.zs3),n.Y36(n.SBq))},x.\u0275dir=n.lG2({type:x,selectors:[["ion-range"],["ion-select"],["ion-radio-group"],["ion-segment"],["ion-datetime"]],hostBindings:function(v,S){1&v&&n.NdJ("ionChange",function(Ze){return S._handleChangeEvent(Ze.target)})},features:[n._Bn([{provide:g.JU,useExisting:x,multi:!0}]),n.qOj]}),x})(),Tr=(()=>{class x extends Dn{constructor(v,S){super(v,S)}_handleInputEvent(v){this.handleChangeEvent(v,v.value)}}return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.zs3),n.Y36(n.SBq))},x.\u0275dir=n.lG2({type:x,selectors:[["ion-input",3,"type","number"],["ion-textarea"],["ion-searchbar"]],hostBindings:function(v,S){1&v&&n.NdJ("ionChange",function(Ze){return S._handleInputEvent(Ze.target)})},features:[n._Bn([{provide:g.JU,useExisting:x,multi:!0}]),n.qOj]}),x})();const bn=(x,w)=>{const v=x.prototype;w.forEach(S=>{Object.defineProperty(v,S,{get(){return this.el[S]},set(Q){this.z.runOutsideAngular(()=>this.el[S]=Q)}})})},pn=(x,w)=>{const v=x.prototype;w.forEach(S=>{v[S]=function(){const Q=arguments;return this.z.runOutsideAngular(()=>this.el[S].apply(this.el,Q))}})},en=(x,w,v)=>{v.forEach(S=>x[S]=z(w,S))};function xt(x){return function(v){const{defineCustomElementFn:S,inputs:Q,methods:Ze}=x;return void 0!==S&&S(),Q&&bn(v,Q),Ze&&pn(v,Ze),v}}let qe=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-accordion"]],inputs:{disabled:"disabled",mode:"mode",readonly:"readonly",toggleIcon:"toggleIcon",toggleIconSlot:"toggleIconSlot",value:"value"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["disabled","mode","readonly","toggleIcon","toggleIconSlot","value"]})],x),x})(),$e=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionChange"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-accordion-group"]],inputs:{animated:"animated",disabled:"disabled",expand:"expand",mode:"mode",multiple:"multiple",readonly:"readonly",value:"value"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["animated","disabled","expand","mode","multiple","readonly","value"]})],x),x})(),T=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-app"]],ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0})],x),x})(),F=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-avatar"]],ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0})],x),x})(),be=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-back-button"]],inputs:{color:"color",defaultHref:"defaultHref",disabled:"disabled",icon:"icon",mode:"mode",routerAnimation:"routerAnimation",text:"text",type:"type"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","defaultHref","disabled","icon","mode","routerAnimation","text","type"]})],x),x})(),Pt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionBackdropTap"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-backdrop"]],inputs:{stopPropagation:"stopPropagation",tappable:"tappable",visible:"visible"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["stopPropagation","tappable","visible"]})],x),x})(),_r=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionFocus","ionBlur"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-breadcrumb"]],inputs:{active:"active",color:"color",disabled:"disabled",download:"download",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",separator:"separator",target:"target"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["active","color","disabled","download","href","mode","rel","routerAnimation","routerDirection","separator","target"]})],x),x})(),Ur=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionCollapsedClick"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-breadcrumbs"]],inputs:{color:"color",itemsAfterCollapse:"itemsAfterCollapse",itemsBeforeCollapse:"itemsBeforeCollapse",maxItems:"maxItems",mode:"mode"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","itemsAfterCollapse","itemsBeforeCollapse","maxItems","mode"]})],x),x})(),Ht=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionFocus","ionBlur"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-button"]],inputs:{buttonType:"buttonType",color:"color",disabled:"disabled",download:"download",expand:"expand",fill:"fill",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",shape:"shape",size:"size",strong:"strong",target:"target",type:"type"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["buttonType","color","disabled","download","expand","fill","href","mode","rel","routerAnimation","routerDirection","shape","size","strong","target","type"]})],x),x})(),At=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-buttons"]],inputs:{collapse:"collapse"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["collapse"]})],x),x})(),Xt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-card"]],inputs:{button:"button",color:"color",disabled:"disabled",download:"download",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",target:"target",type:"type"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["button","color","disabled","download","href","mode","rel","routerAnimation","routerDirection","target","type"]})],x),x})(),sn=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-card-content"]],inputs:{mode:"mode"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["mode"]})],x),x})(),wn=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-card-header"]],inputs:{color:"color",mode:"mode",translucent:"translucent"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","mode","translucent"]})],x),x})(),kn=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-card-subtitle"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","mode"]})],x),x})(),vr=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-card-title"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","mode"]})],x),x})(),rt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionChange","ionFocus","ionBlur"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-checkbox"]],inputs:{checked:"checked",color:"color",disabled:"disabled",indeterminate:"indeterminate",mode:"mode",name:"name",value:"value"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["checked","color","disabled","indeterminate","mode","name","value"]})],x),x})(),Te=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-chip"]],inputs:{color:"color",disabled:"disabled",mode:"mode",outline:"outline"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","disabled","mode","outline"]})],x),x})(),Ye=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-col"]],inputs:{offset:"offset",offsetLg:"offsetLg",offsetMd:"offsetMd",offsetSm:"offsetSm",offsetXl:"offsetXl",offsetXs:"offsetXs",pull:"pull",pullLg:"pullLg",pullMd:"pullMd",pullSm:"pullSm",pullXl:"pullXl",pullXs:"pullXs",push:"push",pushLg:"pushLg",pushMd:"pushMd",pushSm:"pushSm",pushXl:"pushXl",pushXs:"pushXs",size:"size",sizeLg:"sizeLg",sizeMd:"sizeMd",sizeSm:"sizeSm",sizeXl:"sizeXl",sizeXs:"sizeXs"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["offset","offsetLg","offsetMd","offsetSm","offsetXl","offsetXs","pull","pullLg","pullMd","pullSm","pullXl","pullXs","push","pushLg","pushMd","pushSm","pushXl","pushXs","size","sizeLg","sizeMd","sizeSm","sizeXl","sizeXs"]})],x),x})(),ft=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionScrollStart","ionScroll","ionScrollEnd"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-content"]],inputs:{color:"color",forceOverscroll:"forceOverscroll",fullscreen:"fullscreen",scrollEvents:"scrollEvents",scrollX:"scrollX",scrollY:"scrollY"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","forceOverscroll","fullscreen","scrollEvents","scrollX","scrollY"],methods:["getScrollElement","scrollToTop","scrollToBottom","scrollByPoint","scrollToPoint"]})],x),x})(),nn=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-fab"]],inputs:{activated:"activated",edge:"edge",horizontal:"horizontal",vertical:"vertical"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["activated","edge","horizontal","vertical"],methods:["close"]})],x),x})(),En=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionFocus","ionBlur"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-fab-button"]],inputs:{activated:"activated",closeIcon:"closeIcon",color:"color",disabled:"disabled",download:"download",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",show:"show",size:"size",target:"target",translucent:"translucent",type:"type"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["activated","closeIcon","color","disabled","download","href","mode","rel","routerAnimation","routerDirection","show","size","target","translucent","type"]})],x),x})(),gt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-grid"]],inputs:{fixed:"fixed"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["fixed"]})],x),x})(),lt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-header"]],inputs:{collapse:"collapse",mode:"mode",translucent:"translucent"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["collapse","mode","translucent"]})],x),x})(),He=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-icon"]],inputs:{color:"color",flipRtl:"flipRtl",icon:"icon",ios:"ios",lazy:"lazy",md:"md",mode:"mode",name:"name",sanitize:"sanitize",size:"size",src:"src"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","flipRtl","icon","ios","lazy","md","mode","name","sanitize","size","src"]})],x),x})(),mt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionInfinite"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-infinite-scroll"]],inputs:{disabled:"disabled",position:"position",threshold:"threshold"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["disabled","position","threshold"],methods:["complete"]})],x),x})(),qt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-infinite-scroll-content"]],inputs:{loadingSpinner:"loadingSpinner",loadingText:"loadingText"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["loadingSpinner","loadingText"]})],x),x})(),Cn=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionInput","ionChange","ionBlur","ionFocus"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-input"]],inputs:{accept:"accept",autocapitalize:"autocapitalize",autocomplete:"autocomplete",autocorrect:"autocorrect",autofocus:"autofocus",clearInput:"clearInput",clearOnEdit:"clearOnEdit",color:"color",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",inputmode:"inputmode",max:"max",maxlength:"maxlength",min:"min",minlength:"minlength",mode:"mode",multiple:"multiple",name:"name",pattern:"pattern",placeholder:"placeholder",readonly:"readonly",required:"required",size:"size",spellcheck:"spellcheck",step:"step",type:"type",value:"value"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["accept","autocapitalize","autocomplete","autocorrect","autofocus","clearInput","clearOnEdit","color","debounce","disabled","enterkeyhint","inputmode","max","maxlength","min","minlength","mode","multiple","name","pattern","placeholder","readonly","required","size","spellcheck","step","type","value"],methods:["setFocus","getInputElement"]})],x),x})(),tr=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-item"]],inputs:{button:"button",color:"color",counter:"counter",counterFormatter:"counterFormatter",detail:"detail",detailIcon:"detailIcon",disabled:"disabled",download:"download",fill:"fill",href:"href",lines:"lines",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",shape:"shape",target:"target",type:"type"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["button","color","counter","counterFormatter","detail","detailIcon","disabled","download","fill","href","lines","mode","rel","routerAnimation","routerDirection","shape","target","type"]})],x),x})(),Ct=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-item-option"]],inputs:{color:"color",disabled:"disabled",download:"download",expandable:"expandable",href:"href",mode:"mode",rel:"rel",target:"target",type:"type"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","disabled","download","expandable","href","mode","rel","target","type"]})],x),x})(),zt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionSwipe"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-item-options"]],inputs:{side:"side"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["side"]})],x),x})(),tn=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionDrag"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-item-sliding"]],inputs:{disabled:"disabled"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["disabled"],methods:["getOpenAmount","getSlidingRatio","open","close","closeOpened"]})],x),x})(),xn=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-label"]],inputs:{color:"color",mode:"mode",position:"position"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","mode","position"]})],x),x})(),Er=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-list"]],inputs:{inset:"inset",lines:"lines",mode:"mode"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["inset","lines","mode"],methods:["closeSlidingItems"]})],x),x})(),Bn=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-list-header"]],inputs:{color:"color",lines:"lines",mode:"mode"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","lines","mode"]})],x),x})(),Cr=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionWillOpen","ionWillClose","ionDidOpen","ionDidClose"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-menu"]],inputs:{contentId:"contentId",disabled:"disabled",maxEdgeStart:"maxEdgeStart",menuId:"menuId",side:"side",swipeGesture:"swipeGesture",type:"type"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["contentId","disabled","maxEdgeStart","menuId","side","swipeGesture","type"],methods:["isOpen","isActive","open","close","toggle","setOpen"]})],x),x})(),Br=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionFocus","ionBlur"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-radio"]],inputs:{color:"color",disabled:"disabled",mode:"mode",name:"name",value:"value"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","disabled","mode","name","value"]})],x),x})(),Gr=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionChange"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-radio-group"]],inputs:{allowEmptySelection:"allowEmptySelection",name:"name",value:"value"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["allowEmptySelection","name","value"]})],x),x})(),tt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-ripple-effect"]],inputs:{type:"type"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["type"],methods:["addRipple"]})],x),x})(),Pe=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-row"]],ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0})],x),x})(),Je=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionInput","ionChange","ionCancel","ionClear","ionBlur","ionFocus"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-searchbar"]],inputs:{animated:"animated",autocomplete:"autocomplete",autocorrect:"autocorrect",cancelButtonIcon:"cancelButtonIcon",cancelButtonText:"cancelButtonText",clearIcon:"clearIcon",color:"color",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",inputmode:"inputmode",mode:"mode",placeholder:"placeholder",searchIcon:"searchIcon",showCancelButton:"showCancelButton",showClearButton:"showClearButton",spellcheck:"spellcheck",type:"type",value:"value"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["animated","autocomplete","autocorrect","cancelButtonIcon","cancelButtonText","clearIcon","color","debounce","disabled","enterkeyhint","inputmode","mode","placeholder","searchIcon","showCancelButton","showClearButton","spellcheck","type","value"],methods:["setFocus","getInputElement"]})],x),x})(),vt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionChange"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-segment"]],inputs:{color:"color",disabled:"disabled",mode:"mode",scrollable:"scrollable",selectOnFocus:"selectOnFocus",swipeGesture:"swipeGesture",value:"value"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","disabled","mode","scrollable","selectOnFocus","swipeGesture","value"]})],x),x})(),Mt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-segment-button"]],inputs:{disabled:"disabled",layout:"layout",mode:"mode",type:"type",value:"value"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["disabled","layout","mode","type","value"]})],x),x})(),Vt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionChange","ionCancel","ionDismiss","ionFocus","ionBlur"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-select"]],inputs:{cancelText:"cancelText",compareWith:"compareWith",disabled:"disabled",interface:"interface",interfaceOptions:"interfaceOptions",mode:"mode",multiple:"multiple",name:"name",okText:"okText",placeholder:"placeholder",selectedText:"selectedText",value:"value"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["cancelText","compareWith","disabled","interface","interfaceOptions","mode","multiple","name","okText","placeholder","selectedText","value"],methods:["open"]})],x),x})(),jt=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-select-option"]],inputs:{disabled:"disabled",value:"value"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["disabled","value"]})],x),x})(),vn=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-skeleton-text"]],inputs:{animated:"animated"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["animated"]})],x),x})(),$n=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-slide"]],ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0})],x),x})(),er=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionSlidesDidLoad","ionSlideTap","ionSlideDoubleTap","ionSlideWillChange","ionSlideDidChange","ionSlideNextStart","ionSlidePrevStart","ionSlideNextEnd","ionSlidePrevEnd","ionSlideTransitionStart","ionSlideTransitionEnd","ionSlideDrag","ionSlideReachStart","ionSlideReachEnd","ionSlideTouchStart","ionSlideTouchEnd"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-slides"]],inputs:{mode:"mode",options:"options",pager:"pager",scrollbar:"scrollbar"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["mode","options","pager","scrollbar"],methods:["update","updateAutoHeight","slideTo","slideNext","slidePrev","getActiveIndex","getPreviousIndex","length","isEnd","isBeginning","startAutoplay","stopAutoplay","lockSwipeToNext","lockSwipeToPrev","lockSwipes","getSwiper"]})],x),x})(),is=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement,en(this,this.el,["ionChange","ionInput","ionBlur","ionFocus"])}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-textarea"]],inputs:{autoGrow:"autoGrow",autocapitalize:"autocapitalize",autofocus:"autofocus",clearOnEdit:"clearOnEdit",color:"color",cols:"cols",debounce:"debounce",disabled:"disabled",enterkeyhint:"enterkeyhint",inputmode:"inputmode",maxlength:"maxlength",minlength:"minlength",mode:"mode",name:"name",placeholder:"placeholder",readonly:"readonly",required:"required",rows:"rows",spellcheck:"spellcheck",value:"value",wrap:"wrap"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["autoGrow","autocapitalize","autofocus","clearOnEdit","color","cols","debounce","disabled","enterkeyhint","inputmode","maxlength","minlength","mode","name","placeholder","readonly","required","rows","spellcheck","value","wrap"],methods:["setFocus","getInputElement"]})],x),x})(),Wi=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-thumbnail"]],ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0})],x),x})(),Vi=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-title"]],inputs:{color:"color",size:"size"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","size"]})],x),x})(),di=(()=>{let x=class{constructor(v,S,Q){this.z=Q,v.detach(),this.el=S.nativeElement}};return x.\u0275fac=function(v){return new(v||x)(n.Y36(n.sBO),n.Y36(n.SBq),n.Y36(n.R0b))},x.\u0275cmp=n.Xpm({type:x,selectors:[["ion-toolbar"]],inputs:{color:"color",mode:"mode"},ngContentSelectors:St,decls:1,vars:0,template:function(v,S){1&v&&(n.F$t(),n.Hsn(0))},encapsulation:2,changeDetection:0}),x=(0,d.gn)([xt({defineCustomElementFn:void 0,inputs:["color","mode"]})],x),x})();class Ao{constructor(w={}){this.data=w}get(w){return this.data[w]}}let dr=(()=>{class x{constructor(v,S){this.zone=v,this.appRef=S}create(v,S,Q){return new ur(v,S,Q,this.appRef,this.zone)}}return x.\u0275fac=function(v){return new(v||x)(n.LFG(n.R0b),n.LFG(n.z2F))},x.\u0275prov=n.Yz7({token:x,factory:x.\u0275fac}),x})();class ur{constructor(w,v,S,Q,Ze){this.resolverOrInjector=w,this.injector=v,this.location=S,this.appRef=Q,this.zone=Ze,this.elRefMap=new WeakMap,this.elEventsMap=new WeakMap}attachViewToDom(w,v,S,Q){return this.zone.run(()=>new Promise(Ze=>{Ze(pr(this.zone,this.resolverOrInjector,this.injector,this.location,this.appRef,this.elRefMap,this.elEventsMap,w,v,S,Q))}))}removeViewFromDom(w,v){return this.zone.run(()=>new Promise(S=>{const Q=this.elRefMap.get(v);if(Q){Q.destroy(),this.elRefMap.delete(v);const Ze=this.elEventsMap.get(v);Ze&&(Ze(),this.elEventsMap.delete(v))}S()}))}}const pr=(x,w,v,S,Q,Ze,Ot,hn,Yn,Pr,Zr)=>{let ii;const Ti=n.zs3.create({providers:xs(Pr),parent:v});if(w&&cr(w)){const Is=w.resolveComponentFactory(Yn);ii=S?S.createComponent(Is,S.length,Ti):Is.create(Ti)}else{if(!S)return null;ii=S.createComponent(Yn,{index:S.indexOf,injector:Ti,environmentInjector:w})}const Rs=ii.instance,yi=ii.location.nativeElement;if(Pr&&Object.assign(Rs,Pr),Zr)for(const Is of Zr)yi.classList.add(Is);const fi=kr(x,Rs,yi);return hn.appendChild(yi),S||Q.attachView(ii.hostView),ii.changeDetectorRef.reattach(),Ze.set(yi,ii),Ot.set(yi,fi),yi},Yi=[Me.L,Me.a,Me.b,Me.c,Me.d],kr=(x,w,v)=>x.run(()=>{const S=Yi.filter(Q=>"function"==typeof w[Q]).map(Q=>{const Ze=Ot=>w[Q](Ot.detail);return v.addEventListener(Q,Ze),()=>v.removeEventListener(Q,Ze)});return()=>S.forEach(Q=>Q())}),Qr=new n.OlP("NavParamsToken"),xs=x=>[{provide:Qr,useValue:x},{provide:Ao,useFactory:ys,deps:[Qr]}],ys=x=>new Ao(x),hr=(x,w)=>((x=x.filter(v=>v.stackId!==w.stackId)).push(w),x),vs=(x,w)=>{const v=x.createUrlTree(["."],{relativeTo:w});return x.serializeUrl(v)},Mi=(x,w)=>{if(!x)return;const v=qs(w);for(let S=0;S=x.length)return v[S];if(v[S]!==x[S])return}},qs=x=>x.split("/").map(w=>w.trim()).filter(w=>""!==w),fs=x=>{x&&(x.ref.destroy(),x.unlistenEvents())};class $s{constructor(w,v,S,Q,Ze,Ot){this.containerEl=v,this.router=S,this.navCtrl=Q,this.zone=Ze,this.location=Ot,this.views=[],this.skipTransition=!1,this.nextId=0,this.tabsPrefix=void 0!==w?qs(w):void 0}createView(w,v){var S;const Q=vs(this.router,v),Ze=null===(S=w?.location)||void 0===S?void 0:S.nativeElement,Ot=kr(this.zone,w.instance,Ze);return{id:this.nextId++,stackId:Mi(this.tabsPrefix,Q),unlistenEvents:Ot,element:Ze,ref:w,url:Q}}getExistingView(w){const v=vs(this.router,w),S=this.views.find(Q=>Q.url===v);return S&&S.ref.changeDetectorRef.reattach(),S}setActive(w){var v,S;const Q=this.navCtrl.consumeTransition();let{direction:Ze,animation:Ot,animationBuilder:hn}=Q;const Yn=this.activeView,Pr=((x,w)=>!w||x.stackId!==w.stackId)(w,Yn);Pr&&(Ze="back",Ot=void 0);const Zr=this.views.slice();let ii;const Ti=this.router;Ti.getCurrentNavigation?ii=Ti.getCurrentNavigation():!(null===(v=Ti.navigations)||void 0===v)&&v.value&&(ii=Ti.navigations.value),null!==(S=ii?.extras)&&void 0!==S&&S.replaceUrl&&this.views.length>0&&this.views.splice(-1,1);const Rs=this.views.includes(w),yi=this.insertView(w,Ze);Rs||w.ref.changeDetectorRef.detectChanges();const fi=w.animationBuilder;return void 0===hn&&"back"===Ze&&!Pr&&void 0!==fi&&(hn=fi),Yn&&(Yn.animationBuilder=hn),this.zone.runOutsideAngular(()=>this.wait(()=>(Yn&&Yn.ref.changeDetectorRef.detach(),w.ref.changeDetectorRef.reattach(),this.transition(w,Yn,Ot,this.canGoBack(1),!1,hn).then(()=>Zo(w,yi,Zr,this.location,this.zone)).then(()=>({enteringView:w,direction:Ze,animation:Ot,tabSwitch:Pr})))))}canGoBack(w,v=this.getActiveStackId()){return this.getStack(v).length>w}pop(w,v=this.getActiveStackId()){return this.zone.run(()=>{var S,Q;const Ze=this.getStack(v);if(Ze.length<=w)return Promise.resolve(!1);const Ot=Ze[Ze.length-w-1];let hn=Ot.url;const Yn=Ot.savedData;if(Yn){const Zr=Yn.get("primary");null!==(Q=null===(S=Zr?.route)||void 0===S?void 0:S._routerState)&&void 0!==Q&&Q.snapshot.url&&(hn=Zr.route._routerState.snapshot.url)}const{animationBuilder:Pr}=this.navCtrl.consumeTransition();return this.navCtrl.navigateBack(hn,Object.assign(Object.assign({},Ot.savedExtras),{animation:Pr})).then(()=>!0)})}startBackTransition(){const w=this.activeView;if(w){const v=this.getStack(w.stackId),S=v[v.length-2],Q=S.animationBuilder;return this.wait(()=>this.transition(S,w,"back",this.canGoBack(2),!0,Q))}return Promise.resolve()}endBackTransition(w){w?(this.skipTransition=!0,this.pop(1)):this.activeView&&Fi(this.activeView,this.views,this.views,this.location,this.zone)}getLastUrl(w){const v=this.getStack(w);return v.length>0?v[v.length-1]:void 0}getRootUrl(w){const v=this.getStack(w);return v.length>0?v[0]:void 0}getActiveStackId(){return this.activeView?this.activeView.stackId:void 0}hasRunningTask(){return void 0!==this.runningTask}destroy(){this.containerEl=void 0,this.views.forEach(fs),this.activeView=void 0,this.views=[]}getStack(w){return this.views.filter(v=>v.stackId===w)}insertView(w,v){return this.activeView=w,this.views=((x,w,v)=>"root"===v?hr(x,w):"forward"===v?((x,w)=>(x.indexOf(w)>=0?x=x.filter(S=>S.stackId!==w.stackId||S.id<=w.id):x.push(w),x))(x,w):((x,w)=>x.indexOf(w)>=0?x.filter(S=>S.stackId!==w.stackId||S.id<=w.id):hr(x,w))(x,w))(this.views,w,v),this.views.slice()}transition(w,v,S,Q,Ze,Ot){if(this.skipTransition)return this.skipTransition=!1,Promise.resolve(!1);if(v===w)return Promise.resolve(!1);const hn=w?w.element:void 0,Yn=v?v.element:void 0,Pr=this.containerEl;return hn&&hn!==Yn&&(hn.classList.add("ion-page"),hn.classList.add("ion-page-invisible"),hn.parentElement!==Pr&&Pr.appendChild(hn),Pr.commit)?Pr.commit(hn,Yn,{deepWait:!0,duration:void 0===S?0:void 0,direction:S,showGoBack:Q,progressAnimation:Ze,animationBuilder:Ot}):Promise.resolve(!1)}wait(w){return(0,d.mG)(this,void 0,void 0,function*(){void 0!==this.runningTask&&(yield this.runningTask,this.runningTask=void 0);const v=this.runningTask=w();return v.finally(()=>this.runningTask=void 0),v})}}const Zo=(x,w,v,S,Q)=>"function"==typeof requestAnimationFrame?new Promise(Ze=>{requestAnimationFrame(()=>{Fi(x,w,v,S,Q),Ze()})}):Promise.resolve(),Fi=(x,w,v,S,Q)=>{Q.run(()=>v.filter(Ze=>!w.includes(Ze)).forEach(fs)),w.forEach(Ze=>{const hn=S.path().split("?")[0].split("#")[0];if(Ze!==x&&Ze.url!==hn){const Yn=Ze.element;Yn.setAttribute("aria-hidden","true"),Yn.classList.add("ion-page-hidden"),Ze.ref.changeDetectorRef.detach()}})};let $i=(()=>{class x{get(v,S){const Q=Ps();return Q?Q.get(v,S):null}getBoolean(v,S){const Q=Ps();return!!Q&&Q.getBoolean(v,S)}getNumber(v,S){const Q=Ps();return Q?Q.getNumber(v,S):0}}return x.\u0275fac=function(v){return new(v||x)},x.\u0275prov=n.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})();const hi=new n.OlP("USERCONFIG"),Ps=()=>{if(typeof window<"u"){const x=window.Ionic;if(x?.config)return x.config}return null};let Us=(()=>{class x{constructor(v,S){this.doc=v,this.backButton=new te.x,this.keyboardDidShow=new te.x,this.keyboardDidHide=new te.x,this.pause=new te.x,this.resume=new te.x,this.resize=new te.x,S.run(()=>{var Q;let Ze;this.win=v.defaultView,this.backButton.subscribeWithPriority=function(Ot,hn){return this.subscribe(Yn=>Yn.register(Ot,Pr=>S.run(()=>hn(Pr))))},es(this.pause,v,"pause"),es(this.resume,v,"resume"),es(this.backButton,v,"ionBackButton"),es(this.resize,this.win,"resize"),es(this.keyboardDidShow,this.win,"ionKeyboardDidShow"),es(this.keyboardDidHide,this.win,"ionKeyboardDidHide"),this._readyPromise=new Promise(Ot=>{Ze=Ot}),null!==(Q=this.win)&&void 0!==Q&&Q.cordova?v.addEventListener("deviceready",()=>{Ze("cordova")},{once:!0}):Ze("dom")})}is(v){return(0,We.a)(this.win,v)}platforms(){return(0,We.g)(this.win)}ready(){return this._readyPromise}get isRTL(){return"rtl"===this.doc.dir}getQueryParam(v){return Zs(this.win.location.href,v)}isLandscape(){return!this.isPortrait()}isPortrait(){var v,S;return null===(S=(v=this.win).matchMedia)||void 0===S?void 0:S.call(v,"(orientation: portrait)").matches}testUserAgent(v){const S=this.win.navigator;return!!(S?.userAgent&&S.userAgent.indexOf(v)>=0)}url(){return this.win.location.href}width(){return this.win.innerWidth}height(){return this.win.innerHeight}}return x.\u0275fac=function(v){return new(v||x)(n.LFG(Ge.K0),n.LFG(n.R0b))},x.\u0275prov=n.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})();const Zs=(x,w)=>{w=w.replace(/[[\]\\]/g,"\\$&");const S=new RegExp("[\\?&]"+w+"=([^&#]*)").exec(x);return S?decodeURIComponent(S[1].replace(/\+/g," ")):null},es=(x,w,v)=>{w&&w.addEventListener(v,S=>{x.next(S?.detail)})};let _s=(()=>{class x{constructor(v,S,Q,Ze){this.location=S,this.serializer=Q,this.router=Ze,this.direction=Es,this.animated=Ir,this.guessDirection="forward",this.lastNavId=-1,Ze&&Ze.events.subscribe(Ot=>{if(Ot instanceof ve.OD){const hn=Ot.restoredState?Ot.restoredState.navigationId:Ot.id;this.guessDirection=hn{this.pop(),Ot()})}navigateForward(v,S={}){return this.setDirection("forward",S.animated,S.animationDirection,S.animation),this.navigate(v,S)}navigateBack(v,S={}){return this.setDirection("back",S.animated,S.animationDirection,S.animation),this.navigate(v,S)}navigateRoot(v,S={}){return this.setDirection("root",S.animated,S.animationDirection,S.animation),this.navigate(v,S)}back(v={animated:!0,animationDirection:"back"}){return this.setDirection("back",v.animated,v.animationDirection,v.animation),this.location.back()}pop(){return(0,d.mG)(this,void 0,void 0,function*(){let v=this.topOutlet;for(;v&&!(yield v.pop());)v=v.parentOutlet})}setDirection(v,S,Q,Ze){this.direction=v,this.animated=ps(v,S,Q),this.animationBuilder=Ze}setTopOutlet(v){this.topOutlet=v}consumeTransition(){let S,v="root";const Q=this.animationBuilder;return"auto"===this.direction?(v=this.guessDirection,S=this.guessAnimation):(S=this.animated,v=this.direction),this.direction=Es,this.animated=Ir,this.animationBuilder=void 0,{direction:v,animation:S,animationBuilder:Q}}navigate(v,S){if(Array.isArray(v))return this.router.navigate(v,S);{const Q=this.serializer.parse(v.toString());return void 0!==S.queryParams&&(Q.queryParams=Object.assign({},S.queryParams)),void 0!==S.fragment&&(Q.fragment=S.fragment),this.router.navigateByUrl(Q,S)}}}return x.\u0275fac=function(v){return new(v||x)(n.LFG(Us),n.LFG(Ge.Ye),n.LFG(ve.Hx),n.LFG(ve.F0,8))},x.\u0275prov=n.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})();const ps=(x,w,v)=>{if(!1!==w){if(void 0!==v)return v;if("forward"===x||"back"===x)return x;if("root"===x&&!0===w)return"forward"}},Es="auto",Ir=void 0;class ts{}let Ki=(()=>{class x{constructor(v,S,Q,Ze,Ot,hn,Yn,Pr,Zr,ii,Ti,Rs,yi,fi){this.parentContexts=v,this.location=S,this.config=Ot,this.navCtrl=hn,this.environmentInjector=Yn,this.componentFactoryResolver=Pr,this.parentOutlet=fi,this.activated=null,this.activatedView=null,this._activatedRoute=null,this.proxyMap=new WeakMap,this.currentActivatedRoute$=new pe.X(null),this.stackEvents=new n.vpe,this.activateEvents=new n.vpe,this.deactivateEvents=new n.vpe,this.nativeEl=ii.nativeElement,this.name=Q||ve.eC,this.tabsPrefix="true"===Ze?vs(Ti,yi):void 0,this.stackCtrl=new $s(this.tabsPrefix,this.nativeEl,Ti,hn,Rs,Zr),v.onChildOutletCreated(this.name,this)}set animation(v){this.nativeEl.animation=v}set animated(v){this.nativeEl.animated=v}set swipeGesture(v){this._swipeGesture=v,this.nativeEl.swipeHandler=v?{canStart:()=>this.stackCtrl.canGoBack(1)&&!this.stackCtrl.hasRunningTask(),onStart:()=>this.stackCtrl.startBackTransition(),onEnd:S=>this.stackCtrl.endBackTransition(S)}:void 0}ngOnDestroy(){this.stackCtrl.destroy()}getContext(){return this.parentContexts.getContext(this.name)}ngOnInit(){if(!this.activated){const v=this.getContext();v?.route&&this.activateWith(v.route,v.resolver||null)}new Promise(v=>(0,Se.c)(this.nativeEl,v)).then(()=>{void 0===this._swipeGesture&&(this.swipeGesture=this.config.getBoolean("swipeBackEnabled","ios"===this.nativeEl.mode))})}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){throw new Error("incompatible reuse strategy")}attach(v,S){throw new Error("incompatible reuse strategy")}deactivate(){if(this.activated){if(this.activatedView){const S=this.getContext();this.activatedView.savedData=new Map(S.children.contexts);const Q=this.activatedView.savedData.get("primary");if(Q&&S.route&&(Q.route=Object.assign({},S.route)),this.activatedView.savedExtras={},S.route){const Ze=S.route.snapshot;this.activatedView.savedExtras.queryParams=Ze.queryParams,this.activatedView.savedExtras.fragment=Ze.fragment}}const v=this.component;this.activatedView=null,this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(v)}}activateWith(v,S){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=v;let Q,Ze=this.stackCtrl.getExistingView(v);if(Ze){Q=this.activated=Ze.ref;const Ot=Ze.savedData;Ot&&(this.getContext().children.contexts=Ot),this.updateActivatedRouteProxy(Q.instance,v)}else{const Ot=v._futureSnapshot,hn=Ot.routeConfig.component;if(null==hn&&Ot.component)return void console.warn("[Ionic Warning]: Standalone components are not currently supported with ion-router-outlet. You can track this feature request at https://github.com/ionic-team/ionic-framework/issues/25404");const Yn=this.parentContexts.getOrCreateContext(this.name).children,Pr=new pe.X(null),Zr=this.createActivatedRouteProxy(Pr,v),ii=new qi(Zr,Yn,this.location.injector);if((S=S||this.componentFactoryResolver)&&cr(S)){const Ti=S.resolveComponentFactory(hn);Q=this.activated=this.location.createComponent(Ti,this.location.length,ii)}else Q=this.activated=this.location.createComponent(hn,{index:this.location.length,injector:ii,environmentInjector:S??this.environmentInjector});Pr.next(Q.instance),Ze=this.stackCtrl.createView(this.activated,v),this.proxyMap.set(Q.instance,Zr),this.currentActivatedRoute$.next({component:Q.instance,activatedRoute:v})}this.activatedView=Ze,this.stackCtrl.setActive(Ze).then(Ot=>{this.navCtrl.setTopOutlet(this),this.activateEvents.emit(Q.instance),this.stackEvents.emit(Ot)})}canGoBack(v=1,S){return this.stackCtrl.canGoBack(v,S)}pop(v=1,S){return this.stackCtrl.pop(v,S)}getLastUrl(v){const S=this.stackCtrl.getLastUrl(v);return S?S.url:void 0}getLastRouteView(v){return this.stackCtrl.getLastUrl(v)}getRootView(v){return this.stackCtrl.getRootUrl(v)}getActiveStackId(){return this.stackCtrl.getActiveStackId()}createActivatedRouteProxy(v,S){const Q=new ve.gz;return Q._futureSnapshot=S._futureSnapshot,Q._routerState=S._routerState,Q.snapshot=S.snapshot,Q.outlet=S.outlet,Q.component=S.component,Q._paramMap=this.proxyObservable(v,"paramMap"),Q._queryParamMap=this.proxyObservable(v,"queryParamMap"),Q.url=this.proxyObservable(v,"url"),Q.params=this.proxyObservable(v,"params"),Q.queryParams=this.proxyObservable(v,"queryParams"),Q.fragment=this.proxyObservable(v,"fragment"),Q.data=this.proxyObservable(v,"data"),Q}proxyObservable(v,S){return v.pipe((0,st.h)(Q=>!!Q),(0,Le.w)(Q=>this.currentActivatedRoute$.pipe((0,st.h)(Ze=>null!==Ze&&Ze.component===Q),(0,Le.w)(Ze=>Ze&&Ze.activatedRoute[S]),(0,ke.x)())))}updateActivatedRouteProxy(v,S){const Q=this.proxyMap.get(v);if(!Q)throw new Error("Could not find activated route proxy for view");Q._futureSnapshot=S._futureSnapshot,Q._routerState=S._routerState,Q.snapshot=S.snapshot,Q.outlet=S.outlet,Q.component=S.component,this.currentActivatedRoute$.next({component:v,activatedRoute:S})}}return x.\u0275fac=function(v){return new(v||x)(n.Y36(ve.y6),n.Y36(n.s_b),n.$8M("name"),n.$8M("tabs"),n.Y36($i),n.Y36(_s),n.Y36(ts,8),n.Y36(n._Vd,8),n.Y36(Ge.Ye),n.Y36(n.SBq),n.Y36(ve.F0),n.Y36(n.R0b),n.Y36(ve.gz),n.Y36(x,12))},x.\u0275dir=n.lG2({type:x,selectors:[["ion-router-outlet"]],inputs:{animated:"animated",animation:"animation",swipeGesture:"swipeGesture"},outputs:{stackEvents:"stackEvents",activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),x})();class qi{constructor(w,v,S){this.route=w,this.childContexts=v,this.parent=S}get(w,v){return w===ve.gz?this.route:w===ve.y6?this.childContexts:this.parent.get(w,v)}}let os=(()=>{class x{constructor(v,S,Q){this.routerOutlet=v,this.navCtrl=S,this.config=Q}onClick(v){var S;const Q=this.defaultHref||this.config.get("backButtonDefaultHref");null!==(S=this.routerOutlet)&&void 0!==S&&S.canGoBack()?(this.navCtrl.setDirection("back",void 0,void 0,this.routerAnimation),this.routerOutlet.pop(),v.preventDefault()):null!=Q&&(this.navCtrl.navigateBack(Q,{animation:this.routerAnimation}),v.preventDefault())}}return x.\u0275fac=function(v){return new(v||x)(n.Y36(Ki,8),n.Y36(_s),n.Y36($i))},x.\u0275dir=n.lG2({type:x,selectors:[["ion-back-button"]],hostBindings:function(v,S){1&v&&n.NdJ("click",function(Ze){return S.onClick(Ze)})},inputs:{defaultHref:"defaultHref",routerAnimation:"routerAnimation"}}),x})(),no=(()=>{class x{constructor(v,S,Q,Ze,Ot){this.locationStrategy=v,this.navCtrl=S,this.elementRef=Q,this.router=Ze,this.routerLink=Ot,this.routerDirection="forward"}ngOnInit(){this.updateTargetUrlAndHref()}ngOnChanges(){this.updateTargetUrlAndHref()}updateTargetUrlAndHref(){var v;if(null!==(v=this.routerLink)&&void 0!==v&&v.urlTree){const S=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));this.elementRef.nativeElement.href=S}}onClick(v){this.navCtrl.setDirection(this.routerDirection,void 0,void 0,this.routerAnimation),v.preventDefault()}}return x.\u0275fac=function(v){return new(v||x)(n.Y36(Ge.S$),n.Y36(_s),n.Y36(n.SBq),n.Y36(ve.F0),n.Y36(ve.rH,8))},x.\u0275dir=n.lG2({type:x,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(v,S){1&v&&n.NdJ("click",function(Ze){return S.onClick(Ze)})},inputs:{routerDirection:"routerDirection",routerAnimation:"routerAnimation"},features:[n.TTD]}),x})();class rn{constructor(w){this.ctrl=w}create(w){return this.ctrl.create(w||{})}dismiss(w,v,S){return this.ctrl.dismiss(w,v,S)}getTop(){return this.ctrl.getTop()}}let An=(()=>{class x extends rn{constructor(){super(Fe.a)}}return x.\u0275fac=function(v){return new(v||x)},x.\u0275prov=n.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})(),Or=(()=>{class x extends rn{constructor(){super(Fe.l)}}return x.\u0275fac=function(v){return new(v||x)},x.\u0275prov=n.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})(),ci=(()=>{class x{open(v){return et.m.open(v)}close(v){return et.m.close(v)}toggle(v){return et.m.toggle(v)}enable(v,S){return et.m.enable(v,S)}swipeGesture(v,S){return et.m.swipeGesture(v,S)}isOpen(v){return et.m.isOpen(v)}isEnabled(v){return et.m.isEnabled(v)}get(v){return et.m.get(v)}getOpen(){return et.m.getOpen()}getMenus(){return et.m.getMenus()}}return x.\u0275fac=function(v){return new(v||x)},x.\u0275prov=n.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})(),or=(()=>{class x extends rn{constructor(v,S,Q,Ze){super(Fe.m),this.angularDelegate=v,this.resolver=S,this.injector=Q,this.environmentInjector=Ze}create(v){var S;return super.create(Object.assign(Object.assign({},v),{delegate:this.angularDelegate.create(null!==(S=this.resolver)&&void 0!==S?S:this.environmentInjector,this.injector)}))}}return x.\u0275fac=function(v){return new(v||x)(n.LFG(dr),n.LFG(n._Vd),n.LFG(n.zs3),n.LFG(ts,8))},x.\u0275prov=n.Yz7({token:x,factory:x.\u0275fac}),x})(),Sr=(()=>{class x extends rn{constructor(v,S,Q,Ze){super(Fe.c),this.angularDelegate=v,this.resolver=S,this.injector=Q,this.environmentInjector=Ze}create(v){var S;return super.create(Object.assign(Object.assign({},v),{delegate:this.angularDelegate.create(null!==(S=this.resolver)&&void 0!==S?S:this.environmentInjector,this.injector)}))}}return x.\u0275fac=function(v){return new(v||x)(n.LFG(dr),n.LFG(n._Vd),n.LFG(n.zs3),n.LFG(ts,8))},x.\u0275prov=n.Yz7({token:x,factory:x.\u0275fac}),x})(),Ms=(()=>{class x extends rn{constructor(){super(Fe.t)}}return x.\u0275fac=function(v){return new(v||x)},x.\u0275prov=n.Yz7({token:x,factory:x.\u0275fac,providedIn:"root"}),x})();class Ri{shouldDetach(w){return!1}shouldAttach(w){return!1}store(w,v){}retrieve(w){return null}shouldReuseRoute(w,v){if(w.routeConfig!==v.routeConfig)return!1;const S=w.params,Q=v.params,Ze=Object.keys(S),Ot=Object.keys(Q);if(Ze.length!==Ot.length)return!1;for(const hn of Ze)if(Q[hn]!==S[hn])return!1;return!0}}const mr=(x,w,v)=>()=>{if(w.defaultView&&typeof window<"u"){(x=>{const w=window,v=w.Ionic;v&&v.config&&"Object"!==v.config.constructor.name||(w.Ionic=w.Ionic||{},w.Ionic.config=Object.assign(Object.assign({},w.Ionic.config),x))})(Object.assign(Object.assign({},x),{_zoneGate:Ze=>v.run(Ze)}));const Q="__zone_symbol__addEventListener"in w.body?"__zone_symbol__addEventListener":"addEventListener";return function ut(){var x=[];if(typeof window<"u"){var w=window;(!w.customElements||w.Element&&(!w.Element.prototype.closest||!w.Element.prototype.matches||!w.Element.prototype.remove||!w.Element.prototype.getRootNode))&&x.push(u.e(6748).then(u.t.bind(u,723,23))),("function"!=typeof Object.assign||!Object.entries||!Array.prototype.find||!Array.prototype.includes||!String.prototype.startsWith||!String.prototype.endsWith||w.NodeList&&!w.NodeList.prototype.forEach||!w.fetch||!function(){try{var S=new URL("b","http://a");return S.pathname="c%20d","http://a/c%20d"===S.href&&S.searchParams}catch{return!1}}()||typeof WeakMap>"u")&&x.push(u.e(2214).then(u.t.bind(u,4144,23)))}return Promise.all(x)}().then(()=>((x,w)=>typeof window>"u"?Promise.resolve():(0,ae.p)().then(()=>(pt(),(0,ae.b)(JSON.parse('[["ion-menu_3",[[33,"ion-menu-button",{"color":[513],"disabled":[4],"menu":[1],"autoHide":[4,"auto-hide"],"type":[1],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]],[33,"ion-menu",{"contentId":[513,"content-id"],"menuId":[513,"menu-id"],"type":[1025],"disabled":[1028],"side":[513],"swipeGesture":[4,"swipe-gesture"],"maxEdgeStart":[2,"max-edge-start"],"isPaneVisible":[32],"isEndSide":[32],"isOpen":[64],"isActive":[64],"open":[64],"close":[64],"toggle":[64],"setOpen":[64]},[[16,"ionSplitPaneVisible","onSplitPaneChanged"],[2,"click","onBackdropClick"],[0,"keydown","onKeydown"]]],[1,"ion-menu-toggle",{"menu":[1],"autoHide":[4,"auto-hide"],"visible":[32]},[[16,"ionMenuChange","visibilityChanged"],[16,"ionSplitPaneVisible","visibilityChanged"]]]]],["ion-fab_3",[[33,"ion-fab-button",{"color":[513],"activated":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1],"show":[4],"translucent":[4],"type":[1],"size":[1],"closeIcon":[1,"close-icon"]}],[1,"ion-fab",{"horizontal":[1],"vertical":[1],"edge":[4],"activated":[1028],"close":[64],"toggle":[64]}],[1,"ion-fab-list",{"activated":[4],"side":[1]}]]],["ion-refresher_2",[[0,"ion-refresher-content",{"pullingIcon":[1025,"pulling-icon"],"pullingText":[1,"pulling-text"],"refreshingSpinner":[1025,"refreshing-spinner"],"refreshingText":[1,"refreshing-text"]}],[32,"ion-refresher",{"pullMin":[2,"pull-min"],"pullMax":[2,"pull-max"],"closeDuration":[1,"close-duration"],"snapbackDuration":[1,"snapback-duration"],"pullFactor":[2,"pull-factor"],"disabled":[4],"nativeRefresher":[32],"state":[32],"complete":[64],"cancel":[64],"getProgress":[64]}]]],["ion-back-button",[[33,"ion-back-button",{"color":[513],"defaultHref":[1025,"default-href"],"disabled":[516],"icon":[1],"text":[1],"type":[1],"routerAnimation":[16]}]]],["ion-toast",[[33,"ion-toast",{"overlayIndex":[2,"overlay-index"],"color":[513],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"duration":[2],"header":[1],"message":[1],"keyboardClose":[4,"keyboard-close"],"position":[1],"buttons":[16],"translucent":[4],"animated":[4],"icon":[1],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-card_5",[[33,"ion-card",{"color":[513],"button":[4],"type":[1],"disabled":[4],"download":[1],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}],[32,"ion-card-content"],[33,"ion-card-header",{"color":[513],"translucent":[4]}],[33,"ion-card-subtitle",{"color":[513]}],[33,"ion-card-title",{"color":[513]}]]],["ion-item-option_3",[[33,"ion-item-option",{"color":[513],"disabled":[4],"download":[1],"expandable":[4],"href":[1],"rel":[1],"target":[1],"type":[1]}],[32,"ion-item-options",{"side":[1],"fireSwipeEvent":[64]}],[0,"ion-item-sliding",{"disabled":[4],"state":[32],"getOpenAmount":[64],"getSlidingRatio":[64],"open":[64],"close":[64],"closeOpened":[64]}]]],["ion-accordion_2",[[49,"ion-accordion",{"value":[1],"disabled":[4],"readonly":[4],"toggleIcon":[1,"toggle-icon"],"toggleIconSlot":[1,"toggle-icon-slot"],"state":[32],"isNext":[32],"isPrevious":[32]}],[33,"ion-accordion-group",{"animated":[4],"multiple":[4],"value":[1025],"disabled":[4],"readonly":[4],"expand":[1],"requestAccordionToggle":[64],"getAccordions":[64]},[[0,"keydown","onKeydown"]]]]],["ion-breadcrumb_2",[[33,"ion-breadcrumb",{"collapsed":[4],"last":[4],"showCollapsedIndicator":[4,"show-collapsed-indicator"],"color":[1],"active":[4],"disabled":[4],"download":[1],"href":[1],"rel":[1],"separator":[4],"target":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}],[33,"ion-breadcrumbs",{"color":[1],"maxItems":[2,"max-items"],"itemsBeforeCollapse":[2,"items-before-collapse"],"itemsAfterCollapse":[2,"items-after-collapse"],"collapsed":[32],"activeChanged":[32]},[[0,"collapsedClick","onCollapsedClick"]]]]],["ion-infinite-scroll_2",[[32,"ion-infinite-scroll-content",{"loadingSpinner":[1025,"loading-spinner"],"loadingText":[1,"loading-text"]}],[0,"ion-infinite-scroll",{"threshold":[1],"disabled":[4],"position":[1],"isLoading":[32],"complete":[64]}]]],["ion-reorder_2",[[33,"ion-reorder",null,[[2,"click","onClick"]]],[0,"ion-reorder-group",{"disabled":[4],"state":[32],"complete":[64]}]]],["ion-segment_2",[[33,"ion-segment-button",{"disabled":[4],"layout":[1],"type":[1],"value":[1],"checked":[32]}],[33,"ion-segment",{"color":[513],"disabled":[4],"scrollable":[4],"swipeGesture":[4,"swipe-gesture"],"value":[1025],"selectOnFocus":[4,"select-on-focus"],"activated":[32]},[[0,"keydown","onKeyDown"]]]]],["ion-tab-bar_2",[[33,"ion-tab-button",{"disabled":[4],"download":[1],"href":[1],"rel":[1],"layout":[1025],"selected":[1028],"tab":[1],"target":[1]},[[8,"ionTabBarChanged","onTabBarChanged"]]],[33,"ion-tab-bar",{"color":[513],"selectedTab":[1,"selected-tab"],"translucent":[4],"keyboardVisible":[32]}]]],["ion-chip",[[33,"ion-chip",{"color":[513],"outline":[4],"disabled":[4]}]]],["ion-datetime-button",[[33,"ion-datetime-button",{"color":[513],"disabled":[516],"datetime":[1],"datetimePresentation":[32],"dateText":[32],"timeText":[32],"datetimeActive":[32],"selectedButton":[32]}]]],["ion-searchbar",[[34,"ion-searchbar",{"color":[513],"animated":[4],"autocomplete":[1],"autocorrect":[1],"cancelButtonIcon":[1,"cancel-button-icon"],"cancelButtonText":[1,"cancel-button-text"],"clearIcon":[1,"clear-icon"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"placeholder":[1],"searchIcon":[1,"search-icon"],"showCancelButton":[1,"show-cancel-button"],"showClearButton":[1,"show-clear-button"],"spellcheck":[4],"type":[1],"value":[1025],"focused":[32],"noAnimate":[32],"setFocus":[64],"getInputElement":[64]}]]],["ion-toggle",[[33,"ion-toggle",{"color":[513],"name":[1],"checked":[1028],"disabled":[4],"value":[1],"enableOnOffLabels":[4,"enable-on-off-labels"],"activated":[32]}]]],["ion-nav_2",[[1,"ion-nav",{"delegate":[16],"swipeGesture":[1028,"swipe-gesture"],"animated":[4],"animation":[16],"rootParams":[16],"root":[1],"push":[64],"insert":[64],"insertPages":[64],"pop":[64],"popTo":[64],"popToRoot":[64],"removeIndex":[64],"setRoot":[64],"setPages":[64],"setRouteId":[64],"getRouteId":[64],"getActive":[64],"getByIndex":[64],"canGoBack":[64],"getPrevious":[64]}],[0,"ion-nav-link",{"component":[1],"componentProps":[16],"routerDirection":[1,"router-direction"],"routerAnimation":[16]}]]],["ion-input",[[34,"ion-input",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"accept":[1],"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[4],"enterkeyhint":[1],"inputmode":[1],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[1],"value":[1032],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["ion-textarea",[[34,"ion-textarea",{"fireFocusEvents":[4,"fire-focus-events"],"color":[513],"autocapitalize":[1],"autofocus":[4],"clearOnEdit":[1028,"clear-on-edit"],"debounce":[2],"disabled":[4],"inputmode":[1],"enterkeyhint":[1],"maxlength":[2],"minlength":[2],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"cols":[2],"rows":[2],"wrap":[1],"autoGrow":[516,"auto-grow"],"value":[1025],"hasFocus":[32],"setFocus":[64],"setBlur":[64],"getInputElement":[64]}]]],["ion-backdrop",[[33,"ion-backdrop",{"visible":[4],"tappable":[4],"stopPropagation":[4,"stop-propagation"]},[[2,"click","onMouseDown"]]]]],["ion-loading",[[34,"ion-loading",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"message":[1],"cssClass":[1,"css-class"],"duration":[2],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"spinner":[1025],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-modal",[[33,"ion-modal",{"hasController":[4,"has-controller"],"overlayIndex":[2,"overlay-index"],"delegate":[16],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"breakpoints":[16],"initialBreakpoint":[2,"initial-breakpoint"],"backdropBreakpoint":[2,"backdrop-breakpoint"],"handle":[4],"handleBehavior":[1,"handle-behavior"],"component":[1],"componentProps":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"showBackdrop":[4,"show-backdrop"],"animated":[4],"swipeToClose":[4,"swipe-to-close"],"presentingElement":[16],"htmlAttributes":[16],"isOpen":[4,"is-open"],"trigger":[1],"keepContentsMounted":[4,"keep-contents-mounted"],"canDismiss":[4,"can-dismiss"],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"setCurrentBreakpoint":[64],"getCurrentBreakpoint":[64]}]]],["ion-route_4",[[0,"ion-route",{"url":[1],"component":[1],"componentProps":[16],"beforeLeave":[16],"beforeEnter":[16]}],[0,"ion-route-redirect",{"from":[1],"to":[1]}],[0,"ion-router",{"root":[1],"useHash":[4,"use-hash"],"canTransition":[64],"push":[64],"back":[64],"printDebug":[64],"navChanged":[64]},[[8,"popstate","onPopState"],[4,"ionBackButton","onBackButton"]]],[1,"ion-router-link",{"color":[513],"href":[1],"rel":[1],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"target":[1]}]]],["ion-avatar_3",[[33,"ion-avatar"],[33,"ion-badge",{"color":[513]}],[1,"ion-thumbnail"]]],["ion-col_3",[[1,"ion-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]],[1,"ion-grid",{"fixed":[4]}],[1,"ion-row"]]],["ion-slide_2",[[0,"ion-slide"],[36,"ion-slides",{"options":[8],"pager":[4],"scrollbar":[4],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"getPreviousIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipeToNext":[64],"lockSwipeToPrev":[64],"lockSwipes":[64],"getSwiper":[64]}]]],["ion-tab_2",[[1,"ion-tab",{"active":[1028],"delegate":[16],"tab":[1],"component":[1],"setActive":[64]}],[1,"ion-tabs",{"useRouter":[1028,"use-router"],"selectedTab":[32],"select":[64],"getTab":[64],"getSelected":[64],"setRouteId":[64],"getRouteId":[64]}]]],["ion-img",[[1,"ion-img",{"alt":[1],"src":[1],"loadSrc":[32],"loadError":[32]}]]],["ion-progress-bar",[[33,"ion-progress-bar",{"type":[1],"reversed":[4],"value":[2],"buffer":[2],"color":[513]}]]],["ion-range",[[33,"ion-range",{"color":[513],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"pinFormatter":[16],"snaps":[4],"step":[2],"ticks":[4],"activeBarStart":[1026,"active-bar-start"],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["ion-split-pane",[[33,"ion-split-pane",{"contentId":[513,"content-id"],"disabled":[4],"when":[8],"visible":[32]}]]],["ion-text",[[1,"ion-text",{"color":[513]}]]],["ion-virtual-scroll",[[0,"ion-virtual-scroll",{"approxItemHeight":[2,"approx-item-height"],"approxHeaderHeight":[2,"approx-header-height"],"approxFooterHeight":[2,"approx-footer-height"],"headerFn":[16],"footerFn":[16],"items":[16],"itemHeight":[16],"headerHeight":[16],"footerHeight":[16],"renderItem":[16],"renderHeader":[16],"renderFooter":[16],"nodeRender":[16],"domRender":[16],"totalHeight":[32],"positionForItem":[64],"checkRange":[64],"checkEnd":[64]},[[9,"resize","onResize"]]]]],["ion-picker-column-internal",[[33,"ion-picker-column-internal",{"items":[16],"value":[1032],"color":[513],"numericInput":[4,"numeric-input"],"isActive":[32],"scrollActiveItemIntoView":[64],"setValue":[64]}]]],["ion-picker-internal",[[33,"ion-picker-internal"]]],["ion-radio_2",[[33,"ion-radio",{"color":[513],"name":[1],"disabled":[4],"value":[8],"checked":[32],"buttonTabindex":[32],"setFocus":[64],"setButtonTabindex":[64]}],[0,"ion-radio-group",{"allowEmptySelection":[4,"allow-empty-selection"],"name":[1],"value":[1032]},[[4,"keydown","onKeydown"]]]]],["ion-ripple-effect",[[1,"ion-ripple-effect",{"type":[1],"addRipple":[64]}]]],["ion-button_2",[[33,"ion-button",{"color":[513],"buttonType":[1025,"button-type"],"disabled":[516],"expand":[513],"fill":[1537],"routerDirection":[1,"router-direction"],"routerAnimation":[16],"download":[1],"href":[1],"rel":[1],"shape":[513],"size":[513],"strong":[4],"target":[1],"type":[1]}],[1,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32],"ariaLabel":[32]}]]],["ion-datetime_3",[[33,"ion-datetime",{"color":[1],"name":[1],"disabled":[4],"readonly":[4],"isDateEnabled":[16],"min":[1025],"max":[1025],"presentation":[1],"cancelText":[1,"cancel-text"],"doneText":[1,"done-text"],"clearText":[1,"clear-text"],"yearValues":[8,"year-values"],"monthValues":[8,"month-values"],"dayValues":[8,"day-values"],"hourValues":[8,"hour-values"],"minuteValues":[8,"minute-values"],"locale":[1],"firstDayOfWeek":[2,"first-day-of-week"],"multiple":[4],"value":[1025],"showDefaultTitle":[4,"show-default-title"],"showDefaultButtons":[4,"show-default-buttons"],"showClearButton":[4,"show-clear-button"],"showDefaultTimeLabel":[4,"show-default-time-label"],"hourCycle":[1,"hour-cycle"],"size":[1],"preferWheel":[4,"prefer-wheel"],"showMonthAndYear":[32],"activeParts":[32],"workingParts":[32],"isPresented":[32],"isTimePopoverOpen":[32],"confirm":[64],"reset":[64],"cancel":[64]}],[34,"ion-picker",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"columns":[16],"cssClass":[1,"css-class"],"duration":[2],"showBackdrop":[4,"show-backdrop"],"backdropDismiss":[4,"backdrop-dismiss"],"animated":[4],"htmlAttributes":[16],"presented":[32],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64],"getColumn":[64]}],[32,"ion-picker-column",{"col":[16]}]]],["ion-action-sheet",[[34,"ion-action-sheet",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"buttons":[16],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"header":[1],"subHeader":[1,"sub-header"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-alert",[[34,"ion-alert",{"overlayIndex":[2,"overlay-index"],"keyboardClose":[4,"keyboard-close"],"enterAnimation":[16],"leaveAnimation":[16],"cssClass":[1,"css-class"],"header":[1],"subHeader":[1,"sub-header"],"message":[1],"buttons":[16],"inputs":[1040],"backdropDismiss":[4,"backdrop-dismiss"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"present":[64],"dismiss":[64],"onDidDismiss":[64],"onWillDismiss":[64]},[[4,"keydown","onKeydown"]]]]],["ion-popover",[[33,"ion-popover",{"hasController":[4,"has-controller"],"delegate":[16],"overlayIndex":[2,"overlay-index"],"enterAnimation":[16],"leaveAnimation":[16],"component":[1],"componentProps":[16],"keyboardClose":[4,"keyboard-close"],"cssClass":[1,"css-class"],"backdropDismiss":[4,"backdrop-dismiss"],"event":[8],"showBackdrop":[4,"show-backdrop"],"translucent":[4],"animated":[4],"htmlAttributes":[16],"triggerAction":[1,"trigger-action"],"trigger":[1],"size":[1],"dismissOnSelect":[4,"dismiss-on-select"],"reference":[1],"side":[1],"alignment":[1025],"arrow":[4],"isOpen":[4,"is-open"],"keyboardEvents":[4,"keyboard-events"],"keepContentsMounted":[4,"keep-contents-mounted"],"presented":[32],"presentFromTrigger":[64],"present":[64],"dismiss":[64],"getParentPopover":[64],"onDidDismiss":[64],"onWillDismiss":[64]}]]],["ion-checkbox",[[33,"ion-checkbox",{"color":[513],"name":[1],"checked":[1028],"indeterminate":[1028],"disabled":[4],"value":[8]}]]],["ion-select_3",[[33,"ion-select",{"disabled":[4],"cancelText":[1,"cancel-text"],"okText":[1,"ok-text"],"placeholder":[1],"name":[1],"selectedText":[1,"selected-text"],"multiple":[4],"interface":[1],"interfaceOptions":[8,"interface-options"],"compareWith":[1,"compare-with"],"value":[1032],"isExpanded":[32],"open":[64]}],[1,"ion-select-option",{"disabled":[4],"value":[8]}],[34,"ion-select-popover",{"header":[1],"subHeader":[1,"sub-header"],"message":[1],"multiple":[4],"options":[16]},[[0,"ionChange","onSelect"]]]]],["ion-app_8",[[0,"ion-app",{"setFocus":[64]}],[1,"ion-content",{"color":[513],"fullscreen":[4],"forceOverscroll":[1028,"force-overscroll"],"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"scrollEvents":[4,"scroll-events"],"getScrollElement":[64],"getBackgroundElement":[64],"scrollToTop":[64],"scrollToBottom":[64],"scrollByPoint":[64],"scrollToPoint":[64]},[[8,"appload","onAppLoad"]]],[36,"ion-footer",{"collapse":[1],"translucent":[4],"keyboardVisible":[32]}],[36,"ion-header",{"collapse":[1],"translucent":[4]}],[1,"ion-router-outlet",{"mode":[1025],"delegate":[16],"animated":[4],"animation":[16],"swipeHandler":[16],"commit":[64],"setRouteId":[64],"getRouteId":[64]}],[33,"ion-title",{"color":[513],"size":[1]}],[33,"ion-toolbar",{"color":[513]},[[0,"ionStyle","childrenStyle"]]],[34,"ion-buttons",{"collapse":[4]}]]],["ion-spinner",[[1,"ion-spinner",{"color":[513],"duration":[2],"name":[1],"paused":[4]}]]],["ion-item_8",[[33,"ion-item-divider",{"color":[513],"sticky":[4]}],[32,"ion-item-group"],[1,"ion-skeleton-text",{"animated":[4]}],[32,"ion-list",{"lines":[1],"inset":[4],"closeSlidingItems":[64]}],[33,"ion-list-header",{"color":[513],"lines":[1]}],[49,"ion-item",{"color":[513],"button":[4],"detail":[4],"detailIcon":[1,"detail-icon"],"disabled":[4],"download":[1],"fill":[1],"shape":[1],"href":[1],"rel":[1],"lines":[1],"counter":[4],"routerAnimation":[16],"routerDirection":[1,"router-direction"],"target":[1],"type":[1],"counterFormatter":[16],"multipleInputs":[32],"focusable":[32],"counterString":[32]},[[0,"ionChange","handleIonChange"],[0,"ionColor","labelColorChanged"],[0,"ionStyle","itemStyle"]]],[34,"ion-label",{"color":[513],"position":[1],"noAnimate":[32]}],[33,"ion-note",{"color":[513]}]]]]'),w))))(0,{exclude:["ion-tabs","ion-tab"],syncQueue:!0,raf:Sn,jmp:Ze=>v.runOutsideAngular(Ze),ael(Ze,Ot,hn,Yn){Ze[Q](Ot,hn,Yn)},rel(Ze,Ot,hn,Yn){Ze.removeEventListener(Ot,hn,Yn)}}))}};let ua=(()=>{class x{static forRoot(v){return{ngModule:x,providers:[{provide:hi,useValue:v},{provide:n.ip1,useFactory:mr,multi:!0,deps:[hi,Ge.K0,n.R0b]}]}}}return x.\u0275fac=function(v){return new(v||x)},x.\u0275mod=n.oAB({type:x}),x.\u0275inj=n.cJS({providers:[dr,or,Sr],imports:[[Ge.ez]]}),x})()},9442:(o,c,u)=>{"use strict";u.d(c,{c:()=>X});var n=u(3756);let g;const A=Y=>Y.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),R=Y=>(void 0===g&&(g=void 0===Y.style.animationName&&void 0!==Y.style.webkitAnimationName?"-webkit-":""),g),O=(Y,G,te)=>{const pe=G.startsWith("animation")?R(Y):"";Y.style.setProperty(pe+G,te)},N=(Y,G)=>{const te=G.startsWith("animation")?R(Y):"";Y.style.removeProperty(te+G)},L=[],ce=(Y=[],G)=>{if(void 0!==G){const te=Array.isArray(G)?G:[G];return[...Y,...te]}return Y},X=Y=>{let G,te,pe,ve,Ie,we,et,xe,st,Le,ke,$t,bt,Ve=[],We=[],Se=[],Me=!1,Fe={},Ee=[],ae=[],me={},$=0,ue=!1,Qe=!1,Ge=!0,ut=!1,pt=!0,St=!1;const Yt=Y,kt=[],Et=[],It=[],gn=[],Sn=[],cr=[],Dn=[],jn=[],Mn=[],Fn=[],un="function"==typeof AnimationEffect||"function"==typeof window.AnimationEffect,Wn="function"==typeof Element&&"function"==typeof Element.prototype.animate&&un,Vn=()=>Fn,en=(Pe,Je)=>((Je?.oneTimeCallback?Et:kt).push({c:Pe,o:Je}),bt),xt=()=>{if(Wn)Fn.forEach(Pe=>{Pe.cancel()}),Fn.length=0;else{const Pe=It.slice();(0,n.r)(()=>{Pe.forEach(Je=>{N(Je,"animation-name"),N(Je,"animation-duration"),N(Je,"animation-timing-function"),N(Je,"animation-iteration-count"),N(Je,"animation-delay"),N(Je,"animation-play-state"),N(Je,"animation-fill-mode"),N(Je,"animation-direction")})})}},qe=()=>{Sn.forEach(Pe=>{Pe?.parentNode&&Pe.parentNode.removeChild(Pe)}),Sn.length=0},wn=()=>void 0!==Ie?Ie:et?et.getFill():"both",kn=()=>void 0!==st?st:void 0!==we?we:et?et.getDirection():"normal",vr=()=>ue?"linear":void 0!==pe?pe:et?et.getEasing():"linear",rt=()=>Qe?0:void 0!==Le?Le:void 0!==te?te:et?et.getDuration():0,Te=()=>void 0!==ve?ve:et?et.getIterations():1,Ye=()=>void 0!==ke?ke:void 0!==G?G:et?et.getDelay():0,tr=()=>{0!==$&&($--,0===$&&((()=>{mn(),jn.forEach(Vt=>Vt()),Mn.forEach(Vt=>Vt());const Pe=Ge?1:0,Je=Ee,vt=ae,Mt=me;It.forEach(Vt=>{const jt=Vt.classList;Je.forEach(vn=>jt.add(vn)),vt.forEach(vn=>jt.remove(vn));for(const vn in Mt)Mt.hasOwnProperty(vn)&&O(Vt,vn,Mt[vn])}),kt.forEach(Vt=>Vt.c(Pe,bt)),Et.forEach(Vt=>Vt.c(Pe,bt)),Et.length=0,pt=!0,Ge&&(ut=!0),Ge=!0})(),et&&et.animationFinish()))},fr=(Pe=!0)=>{qe();const Je=(Y=>(Y.forEach(G=>{for(const te in G)if(G.hasOwnProperty(te)){const pe=G[te];if("easing"===te)G["animation-timing-function"]=pe,delete G[te];else{const ve=A(te);ve!==te&&(G[ve]=pe,delete G[te])}}}),Y))(Ve);It.forEach(vt=>{if(Je.length>0){const Mt=((Y=[])=>Y.map(G=>{const te=G.offset,pe=[];for(const ve in G)G.hasOwnProperty(ve)&&"offset"!==ve&&pe.push(`${ve}: ${G[ve]};`);return`${100*te}% { ${pe.join(" ")} }`}).join(" "))(Je);$t=void 0!==Y?Y:(Y=>{let G=L.indexOf(Y);return G<0&&(G=L.push(Y)-1),`ion-animation-${G}`})(Mt);const Vt=((Y,G,te)=>{const pe=(Y=>{const G=Y.getRootNode();return G.head||G})(te),ve=R(te),Ie=pe.querySelector("#"+Y);if(Ie)return Ie;const we=(te.ownerDocument||document).createElement("style");return we.id=Y,we.textContent=`@${ve}keyframes ${Y} { ${G} } @${ve}keyframes ${Y}-alt { ${G} }`,pe.appendChild(we),we})($t,Mt,vt);Sn.push(Vt),O(vt,"animation-duration",`${rt()}ms`),O(vt,"animation-timing-function",vr()),O(vt,"animation-delay",`${Ye()}ms`),O(vt,"animation-fill-mode",wn()),O(vt,"animation-direction",kn());const jt=Te()===1/0?"infinite":Te().toString();O(vt,"animation-iteration-count",jt),O(vt,"animation-play-state","paused"),Pe&&O(vt,"animation-name",`${Vt.id}-alt`),(0,n.r)(()=>{O(vt,"animation-name",Vt.id||null)})}})},Ct=(Pe=!0)=>{(()=>{cr.forEach(Mt=>Mt()),Dn.forEach(Mt=>Mt());const Pe=We,Je=Se,vt=Fe;It.forEach(Mt=>{const Vt=Mt.classList;Pe.forEach(jt=>Vt.add(jt)),Je.forEach(jt=>Vt.remove(jt));for(const jt in vt)vt.hasOwnProperty(jt)&&O(Mt,jt,vt[jt])})})(),Ve.length>0&&(Wn?(It.forEach(Pe=>{const Je=Pe.animate(Ve,{id:Yt,delay:Ye(),duration:rt(),easing:vr(),iterations:Te(),fill:wn(),direction:kn()});Je.pause(),Fn.push(Je)}),Fn.length>0&&(Fn[0].onfinish=()=>{tr()})):fr(Pe)),Me=!0},zt=Pe=>{if(Pe=Math.min(Math.max(Pe,0),.9999),Wn)Fn.forEach(Je=>{Je.currentTime=Je.effect.getComputedTiming().delay+rt()*Pe,Je.pause()});else{const Je=`-${rt()*Pe}ms`;It.forEach(vt=>{Ve.length>0&&(O(vt,"animation-delay",Je),O(vt,"animation-play-state","paused"))})}},tn=Pe=>{Fn.forEach(Je=>{Je.effect.updateTiming({delay:Ye(),duration:rt(),easing:vr(),iterations:Te(),fill:wn(),direction:kn()})}),void 0!==Pe&&zt(Pe)},xn=(Pe=!0,Je)=>{(0,n.r)(()=>{It.forEach(vt=>{O(vt,"animation-name",$t||null),O(vt,"animation-duration",`${rt()}ms`),O(vt,"animation-timing-function",vr()),O(vt,"animation-delay",void 0!==Je?`-${Je*rt()}ms`:`${Ye()}ms`),O(vt,"animation-fill-mode",wn()||null),O(vt,"animation-direction",kn()||null);const Mt=Te()===1/0?"infinite":Te().toString();O(vt,"animation-iteration-count",Mt),Pe&&O(vt,"animation-name",`${$t}-alt`),(0,n.r)(()=>{O(vt,"animation-name",$t||null)})})})},Er=(Pe=!1,Je=!0,vt)=>(Pe&&gn.forEach(Mt=>{Mt.update(Pe,Je,vt)}),Wn?tn(vt):xn(Je,vt),bt),Jr=()=>{Me&&(Wn?Fn.forEach(Pe=>{Pe.pause()}):It.forEach(Pe=>{O(Pe,"animation-play-state","paused")}),St=!0)},li=()=>{xe=void 0,tr()},mn=()=>{xe&&clearTimeout(xe)},_t=Pe=>new Promise(Je=>{Pe?.sync&&(Qe=!0,en(()=>Qe=!1,{oneTimeCallback:!0})),Me||Ct(),ut&&(Wn?(zt(0),tn()):xn(),ut=!1),pt&&($=gn.length+1,pt=!1),en(()=>Je(),{oneTimeCallback:!0}),gn.forEach(vt=>{vt.play()}),Wn?(Fn.forEach(Pe=>{Pe.play()}),(0===Ve.length||0===It.length)&&tr()):(()=>{if(mn(),(0,n.r)(()=>{It.forEach(Pe=>{Ve.length>0&&O(Pe,"animation-play-state","running")})}),0===Ve.length||0===It.length)tr();else{const Pe=Ye()||0,Je=rt()||0,vt=Te()||1;isFinite(vt)&&(xe=setTimeout(li,Pe+Je*vt+100)),((Y,G)=>{let te;const pe={passive:!0},Ie=we=>{Y===we.target&&(te&&te(),mn(),(0,n.r)(()=>{It.forEach(Pe=>{N(Pe,"animation-duration"),N(Pe,"animation-delay"),N(Pe,"animation-play-state")}),(0,n.r)(tr)}))};Y&&(Y.addEventListener("webkitAnimationEnd",Ie,pe),Y.addEventListener("animationend",Ie,pe),te=()=>{Y.removeEventListener("webkitAnimationEnd",Ie,pe),Y.removeEventListener("animationend",Ie,pe)})})(It[0])}})(),St=!1}),ye=(Pe,Je)=>{const vt=Ve[0];return void 0===vt||void 0!==vt.offset&&0!==vt.offset?Ve=[{offset:0,[Pe]:Je},...Ve]:vt[Pe]=Je,bt};return bt={parentAnimation:et,elements:It,childAnimations:gn,id:Yt,animationFinish:tr,from:ye,to:(Pe,Je)=>{const vt=Ve[Ve.length-1];return void 0===vt||void 0!==vt.offset&&1!==vt.offset?Ve=[...Ve,{offset:1,[Pe]:Je}]:vt[Pe]=Je,bt},fromTo:(Pe,Je,vt)=>ye(Pe,Je).to(Pe,vt),parent:Pe=>(et=Pe,bt),play:_t,pause:()=>(gn.forEach(Pe=>{Pe.pause()}),Jr(),bt),stop:()=>{gn.forEach(Pe=>{Pe.stop()}),Me&&(xt(),Me=!1),ue=!1,Qe=!1,pt=!0,st=void 0,Le=void 0,ke=void 0,$=0,ut=!1,Ge=!0,St=!1},destroy:Pe=>(gn.forEach(Je=>{Je.destroy(Pe)}),(Pe=>{xt(),Pe&&qe()})(Pe),It.length=0,gn.length=0,Ve.length=0,kt.length=0,Et.length=0,Me=!1,pt=!0,bt),keyframes:Pe=>{const Je=Ve!==Pe;return Ve=Pe,Je&&(Pe=>{Wn?Vn().forEach(Je=>{if(Je.effect.setKeyframes)Je.effect.setKeyframes(Pe);else{const vt=new KeyframeEffect(Je.effect.target,Pe,Je.effect.getTiming());Je.effect=vt}}):fr()})(Ve),bt},addAnimation:Pe=>{if(null!=Pe)if(Array.isArray(Pe))for(const Je of Pe)Je.parent(bt),gn.push(Je);else Pe.parent(bt),gn.push(Pe);return bt},addElement:Pe=>{if(null!=Pe)if(1===Pe.nodeType)It.push(Pe);else if(Pe.length>=0)for(let Je=0;Je(Ie=Pe,Er(!0),bt),direction:Pe=>(we=Pe,Er(!0),bt),iterations:Pe=>(ve=Pe,Er(!0),bt),duration:Pe=>(!Wn&&0===Pe&&(Pe=1),te=Pe,Er(!0),bt),easing:Pe=>(pe=Pe,Er(!0),bt),delay:Pe=>(G=Pe,Er(!0),bt),getWebAnimations:Vn,getKeyframes:()=>Ve,getFill:wn,getDirection:kn,getDelay:Ye,getIterations:Te,getEasing:vr,getDuration:rt,afterAddRead:Pe=>(jn.push(Pe),bt),afterAddWrite:Pe=>(Mn.push(Pe),bt),afterClearStyles:(Pe=[])=>{for(const Je of Pe)me[Je]="";return bt},afterStyles:(Pe={})=>(me=Pe,bt),afterRemoveClass:Pe=>(ae=ce(ae,Pe),bt),afterAddClass:Pe=>(Ee=ce(Ee,Pe),bt),beforeAddRead:Pe=>(cr.push(Pe),bt),beforeAddWrite:Pe=>(Dn.push(Pe),bt),beforeClearStyles:(Pe=[])=>{for(const Je of Pe)Fe[Je]="";return bt},beforeStyles:(Pe={})=>(Fe=Pe,bt),beforeRemoveClass:Pe=>(Se=ce(Se,Pe),bt),beforeAddClass:Pe=>(We=ce(We,Pe),bt),onFinish:en,isRunning:()=>0!==$&&!St,progressStart:(Pe=!1,Je)=>(gn.forEach(vt=>{vt.progressStart(Pe,Je)}),Jr(),ue=Pe,Me||Ct(),Er(!1,!0,Je),bt),progressStep:Pe=>(gn.forEach(Je=>{Je.progressStep(Pe)}),zt(Pe),bt),progressEnd:(Pe,Je,vt)=>(ue=!1,gn.forEach(Mt=>{Mt.progressEnd(Pe,Je,vt)}),void 0!==vt&&(Le=vt),ut=!1,Ge=!0,0===Pe?(st="reverse"===kn()?"normal":"reverse","reverse"===st&&(Ge=!1),Wn?(Er(),zt(1-Je)):(ke=(1-Je)*rt()*-1,Er(!1,!1))):1===Pe&&(Wn?(Er(),zt(Je)):(ke=Je*rt()*-1,Er(!1,!1))),void 0!==Pe&&(en(()=>{Le=void 0,st=void 0,ke=void 0},{oneTimeCallback:!0}),et||_t()),bt)}}},3509:(o,c,u)=>{"use strict";u.d(c,{G:()=>R});class g{constructor(N,U,ie,L,ee){this.id=U,this.name=ie,this.disableScroll=ee,this.priority=1e6*L+U,this.ctrl=N}canStart(){return!!this.ctrl&&this.ctrl.canStart(this.name)}start(){return!!this.ctrl&&this.ctrl.start(this.name,this.id,this.priority)}capture(){if(!this.ctrl)return!1;const N=this.ctrl.capture(this.name,this.id,this.priority);return N&&this.disableScroll&&this.ctrl.disableScroll(this.id),N}release(){this.ctrl&&(this.ctrl.release(this.id),this.disableScroll&&this.ctrl.enableScroll(this.id))}destroy(){this.release(),this.ctrl=void 0}}class d{constructor(N,U,ie,L){this.id=U,this.disable=ie,this.disableScroll=L,this.ctrl=N}block(){if(this.ctrl){if(this.disable)for(const N of this.disable)this.ctrl.disableGesture(N,this.id);this.disableScroll&&this.ctrl.disableScroll(this.id)}}unblock(){if(this.ctrl){if(this.disable)for(const N of this.disable)this.ctrl.enableGesture(N,this.id);this.disableScroll&&this.ctrl.enableScroll(this.id)}}destroy(){this.unblock(),this.ctrl=void 0}}const A="backdrop-no-scroll",R=new class n{constructor(){this.gestureId=0,this.requestedStart=new Map,this.disabledGestures=new Map,this.disabledScroll=new Set}createGesture(N){return new g(this,this.newID(),N.name,N.priority||0,!!N.disableScroll)}createBlocker(N={}){return new d(this,this.newID(),N.disable,!!N.disableScroll)}start(N,U,ie){return this.canStart(N)?(this.requestedStart.set(U,ie),!0):(this.requestedStart.delete(U),!1)}capture(N,U,ie){if(!this.start(N,U,ie))return!1;const L=this.requestedStart;let ee=-1e4;if(L.forEach(K=>{ee=Math.max(ee,K)}),ee===ie){this.capturedId=U,L.clear();const K=new CustomEvent("ionGestureCaptured",{detail:{gestureName:N}});return document.dispatchEvent(K),!0}return L.delete(U),!1}release(N){this.requestedStart.delete(N),this.capturedId===N&&(this.capturedId=void 0)}disableGesture(N,U){let ie=this.disabledGestures.get(N);void 0===ie&&(ie=new Set,this.disabledGestures.set(N,ie)),ie.add(U)}enableGesture(N,U){const ie=this.disabledGestures.get(N);void 0!==ie&&ie.delete(U)}disableScroll(N){this.disabledScroll.add(N),1===this.disabledScroll.size&&document.body.classList.add(A)}enableScroll(N){this.disabledScroll.delete(N),0===this.disabledScroll.size&&document.body.classList.remove(A)}canStart(N){return!(void 0!==this.capturedId||this.isDisabled(N))}isCaptured(){return void 0!==this.capturedId}isScrollDisabled(){return this.disabledScroll.size>0}isDisabled(N){const U=this.disabledGestures.get(N);return!!(U&&U.size>0)}newID(){return this.gestureId++,this.gestureId}}},7593:(o,c,u)=>{"use strict";u.r(c),u.d(c,{MENU_BACK_BUTTON_PRIORITY:()=>R,OVERLAY_BACK_BUTTON_PRIORITY:()=>A,blockHardwareBackButton:()=>g,startHardwareBackButton:()=>d});var n=u(5861);const g=()=>{document.addEventListener("backbutton",()=>{})},d=()=>{const O=document;let N=!1;O.addEventListener("backbutton",()=>{if(N)return;let U=0,ie=[];const L=new CustomEvent("ionBackButton",{bubbles:!1,detail:{register(z,ce){ie.push({priority:z,handler:ce,id:U++})}}});O.dispatchEvent(L);const ee=function(){var z=(0,n.Z)(function*(ce){try{if(ce?.handler){const X=ce.handler(K);null!=X&&(yield X)}}catch(X){console.error(X)}});return function(X){return z.apply(this,arguments)}}(),K=()=>{if(ie.length>0){let z={priority:Number.MIN_SAFE_INTEGER,handler:()=>{},id:-1};ie.forEach(ce=>{ce.priority>=z.priority&&(z=ce)}),N=!0,ie=ie.filter(ce=>ce.id!==z.id),ee(z).then(()=>N=!1)}};K()})},A=100,R=99},3756:(o,c,u)=>{"use strict";u.d(c,{a:()=>N,b:()=>U,c:()=>d,d:()=>ce,e:()=>X,f:()=>z,g:()=>ie,h:()=>Ie,i:()=>O,j:()=>A,k:()=>K,l:()=>Y,m:()=>ee,n:()=>G,o:()=>ve,p:()=>pe,q:()=>we,r:()=>L,s:()=>Ve,t:()=>n,u:()=>te});const n=(We,Se=0)=>new Promise(Me=>{g(We,Se,Me)}),g=(We,Se=0,Me)=>{let et,Fe;const Ee={passive:!0},me=()=>{et&&et()},$=ue=>{(void 0===ue||We===ue.target)&&(me(),Me(ue))};return We&&(We.addEventListener("webkitTransitionEnd",$,Ee),We.addEventListener("transitionend",$,Ee),Fe=setTimeout($,Se+500),et=()=>{Fe&&(clearTimeout(Fe),Fe=void 0),We.removeEventListener("webkitTransitionEnd",$,Ee),We.removeEventListener("transitionend",$,Ee)}),me},d=(We,Se)=>{We.componentOnReady?We.componentOnReady().then(Me=>Se(Me)):L(()=>Se(We))},A=(We,Se=[])=>{const Me={};return Se.forEach(et=>{We.hasAttribute(et)&&(null!==We.getAttribute(et)&&(Me[et]=We.getAttribute(et)),We.removeAttribute(et))}),Me},R=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],O=We=>A(We,R),N=(We,Se,Me,et)=>{var Fe;if(typeof window<"u"){const ae=null===(Fe=window?.Ionic)||void 0===Fe?void 0:Fe.config;if(ae){const me=ae.get("_ael");if(me)return me(We,Se,Me,et);if(ae._ael)return ae._ael(We,Se,Me,et)}}return We.addEventListener(Se,Me,et)},U=(We,Se,Me,et)=>{var Fe;if(typeof window<"u"){const ae=null===(Fe=window?.Ionic)||void 0===Fe?void 0:Fe.config;if(ae){const me=ae.get("_rel");if(me)return me(We,Se,Me,et);if(ae._rel)return ae._rel(We,Se,Me,et)}}return We.removeEventListener(Se,Me,et)},ie=(We,Se=We)=>We.shadowRoot||Se,L=We=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(We):"function"==typeof requestAnimationFrame?requestAnimationFrame(We):setTimeout(We),ee=We=>!!We.shadowRoot&&!!We.attachShadow,K=We=>{const Se=We.closest("ion-item");return Se?Se.querySelector("ion-label"):null},z=We=>{if(We.focus(),We.classList.contains("ion-focusable")){const Se=We.closest("ion-app");Se&&Se.setFocus([We])}},ce=(We,Se)=>{let Me;const et=We.getAttribute("aria-labelledby"),Fe=We.id;let Ee=null!==et&&""!==et.trim()?et:Se+"-lbl",ae=null!==et&&""!==et.trim()?document.getElementById(et):K(We);return ae?(null===et&&(ae.id=Ee),Me=ae.textContent,ae.setAttribute("aria-hidden","true")):""!==Fe.trim()&&(ae=document.querySelector(`label[for="${Fe}"]`),ae&&(""!==ae.id?Ee=ae.id:ae.id=Ee=`${Fe}-lbl`,Me=ae.textContent)),{label:ae,labelId:Ee,labelText:Me}},X=(We,Se,Me,et,Fe)=>{if(We||ee(Se)){let Ee=Se.querySelector("input.aux-input");Ee||(Ee=Se.ownerDocument.createElement("input"),Ee.type="hidden",Ee.classList.add("aux-input"),Se.appendChild(Ee)),Ee.disabled=Fe,Ee.name=Me,Ee.value=et||""}},Y=(We,Se,Me)=>Math.max(We,Math.min(Se,Me)),G=(We,Se)=>{if(!We){const Me="ASSERT: "+Se;throw console.error(Me),new Error(Me)}},te=We=>We.timeStamp||Date.now(),pe=We=>{if(We){const Se=We.changedTouches;if(Se&&Se.length>0){const Me=Se[0];return{x:Me.clientX,y:Me.clientY}}if(void 0!==We.pageX)return{x:We.pageX,y:We.pageY}}return{x:0,y:0}},ve=We=>{const Se="rtl"===document.dir;switch(We){case"start":return Se;case"end":return!Se;default:throw new Error(`"${We}" is not a valid value for [side]. Use "start" or "end" instead.`)}},Ie=(We,Se)=>{const Me=We._original||We;return{_original:We,emit:we(Me.emit.bind(Me),Se)}},we=(We,Se=0)=>{let Me;return(...et)=>{clearTimeout(Me),Me=setTimeout(We,Se,...et)}},Ve=(We,Se)=>{if(We??(We={}),Se??(Se={}),We===Se)return!0;const Me=Object.keys(We);if(Me.length!==Object.keys(Se).length)return!1;for(const et of Me)if(!(et in Se)||We[et]!==Se[et])return!1;return!0}},7936:(o,c,u)=>{"use strict";u.d(c,{B:()=>_t,H:()=>gn,a:()=>ut,b:()=>Cn,c:()=>ni,e:()=>_r,f:()=>Gr,g:()=>pt,h:()=>Et,i:()=>Pn,j:()=>vr,k:()=>tr,p:()=>Y,r:()=>Ct,s:()=>ce});var n=u(5861);let d,A,R,O=!1,N=!1,U=!1,ie=!1,L=!1;const ee=typeof window<"u"?window:{},K=ee.document||{head:{}},z={$flags$:0,$resourcesUrl$:"",jmp:le=>le(),raf:le=>requestAnimationFrame(le),ael:(le,ye,ze,tt)=>le.addEventListener(ye,ze,tt),rel:(le,ye,ze,tt)=>le.removeEventListener(ye,ze,tt),ce:(le,ye)=>new CustomEvent(le,ye)},ce=le=>{Object.assign(z,le)},Y=le=>Promise.resolve(le),G=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch{}return!1})(),te=(le,ye,ze,tt)=>{ze&&ze.map(([Pe,Je,vt])=>{const Mt=ve(le,Pe),Vt=pe(ye,vt),jt=Ie(Pe);z.ael(Mt,Je,Vt,jt),(ye.$rmListeners$=ye.$rmListeners$||[]).push(()=>z.rel(Mt,Je,Vt,jt))})},pe=(le,ye)=>ze=>{try{256&le.$flags$?le.$lazyInstance$[ye](ze):(le.$queuedListeners$=le.$queuedListeners$||[]).push([ye,ze])}catch(tt){xn(tt)}},ve=(le,ye)=>4&ye?K:8&ye?ee:16&ye?K.body:le,Ie=le=>0!=(2&le),Me="s-id",et="sty-id",ae="http://www.w3.org/1999/xlink",ue=new WeakMap,Qe=(le,ye,ze)=>{let tt=Cr.get(le);G&&ze?(tt=tt||new CSSStyleSheet,"string"==typeof tt?tt=ye:tt.replaceSync(ye)):tt=ye,Cr.set(le,tt)},xe=(le,ye,ze,tt)=>{let Pe=Le(ye,ze);const Je=Cr.get(Pe);if(le=11===le.nodeType?le:K,Je)if("string"==typeof Je){let Mt,vt=ue.get(le=le.head||le);vt||ue.set(le,vt=new Set),vt.has(Pe)||(le.host&&(Mt=le.querySelector(`[${et}="${Pe}"]`))?Mt.innerHTML=Je:(Mt=K.createElement("style"),Mt.innerHTML=Je,le.insertBefore(Mt,le.querySelector("link"))),vt&&vt.add(Pe))}else le.adoptedStyleSheets.includes(Je)||(le.adoptedStyleSheets=[...le.adoptedStyleSheets,Je]);return Pe},Le=(le,ye)=>"sc-"+(ye&&32&le.$flags$?le.$tagName$+"-"+ye:le.$tagName$),ke=le=>le.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),ut=le=>Ar.push(le),pt=le=>nr(le).$modeName$,$t={},kt=le=>"object"==(le=typeof le)||"function"===le,Et=(le,ye,...ze)=>{let tt=null,Pe=null,Je=null,vt=!1,Mt=!1;const Vt=[],jt=$n=>{for(let er=0;er<$n.length;er++)tt=$n[er],Array.isArray(tt)?jt(tt):null!=tt&&"boolean"!=typeof tt&&((vt="function"!=typeof le&&!kt(tt))&&(tt=String(tt)),vt&&Mt?Vt[Vt.length-1].$text$+=tt:Vt.push(vt?It(null,tt):tt),Mt=vt)};if(jt(ze),ye){ye.key&&(Pe=ye.key),ye.name&&(Je=ye.name);{const $n=ye.className||ye.class;$n&&(ye.class="object"!=typeof $n?$n:Object.keys($n).filter(er=>$n[er]).join(" "))}}if("function"==typeof le)return le(null===ye?{}:ye,Vt,cr);const vn=It(le,null);return vn.$attrs$=ye,Vt.length>0&&(vn.$children$=Vt),vn.$key$=Pe,vn.$name$=Je,vn},It=(le,ye)=>({$flags$:0,$tag$:le,$text$:ye,$elm$:null,$children$:null,$attrs$:null,$key$:null,$name$:null}),gn={},cr={forEach:(le,ye)=>le.map(Dn).forEach(ye),map:(le,ye)=>le.map(Dn).map(ye).map(jn)},Dn=le=>({vattrs:le.$attrs$,vchildren:le.$children$,vkey:le.$key$,vname:le.$name$,vtag:le.$tag$,vtext:le.$text$}),jn=le=>{if("function"==typeof le.vtag){const ze=Object.assign({},le.vattrs);return le.vkey&&(ze.key=le.vkey),le.vname&&(ze.name=le.vname),Et(le.vtag,ze,...le.vchildren||[])}const ye=It(le.vtag,le.vtext);return ye.$attrs$=le.vattrs,ye.$children$=le.vchildren,ye.$key$=le.vkey,ye.$name$=le.vname,ye},Mn=(le,ye,ze,tt,Pe,Je)=>{if(ze!==tt){let vt=tn(le,ye),Mt=ye.toLowerCase();if("class"===ye){const Vt=le.classList,jt=un(ze),vn=un(tt);Vt.remove(...jt.filter($n=>$n&&!vn.includes($n))),Vt.add(...vn.filter($n=>$n&&!jt.includes($n)))}else if("style"===ye){for(const Vt in ze)(!tt||null==tt[Vt])&&(Vt.includes("-")?le.style.removeProperty(Vt):le.style[Vt]="");for(const Vt in tt)(!ze||tt[Vt]!==ze[Vt])&&(Vt.includes("-")?le.style.setProperty(Vt,tt[Vt]):le.style[Vt]=tt[Vt])}else if("key"!==ye)if("ref"===ye)tt&&tt(le);else if(vt||"o"!==ye[0]||"n"!==ye[1]){const Vt=kt(tt);if((vt||Vt&&null!==tt)&&!Pe)try{if(le.tagName.includes("-"))le[ye]=tt;else{const vn=tt??"";"list"===ye?vt=!1:(null==ze||le[ye]!=vn)&&(le[ye]=vn)}}catch{}let jt=!1;Mt!==(Mt=Mt.replace(/^xlink\:?/,""))&&(ye=Mt,jt=!0),null==tt||!1===tt?(!1!==tt||""===le.getAttribute(ye))&&(jt?le.removeAttributeNS(ae,ye):le.removeAttribute(ye)):(!vt||4&Je||Pe)&&!Vt&&(tt=!0===tt?"":tt,jt?le.setAttributeNS(ae,ye,tt):le.setAttribute(ye,tt))}else ye="-"===ye[2]?ye.slice(3):tn(ee,Mt)?Mt.slice(2):Mt[2]+ye.slice(3),ze&&z.rel(le,ye,ze,!1),tt&&z.ael(le,ye,tt,!1)}},Fn=/\s/,un=le=>le?le.split(Fn):[],Wn=(le,ye,ze,tt)=>{const Pe=11===ye.$elm$.nodeType&&ye.$elm$.host?ye.$elm$.host:ye.$elm$,Je=le&&le.$attrs$||$t,vt=ye.$attrs$||$t;for(tt in Je)tt in vt||Mn(Pe,tt,Je[tt],void 0,ze,ye.$flags$);for(tt in vt)Mn(Pe,tt,Je[tt],vt[tt],ze,ye.$flags$)},Zn=(le,ye,ze,tt)=>{const Pe=ye.$children$[ze];let vt,Mt,Vt,Je=0;if(O||(U=!0,"slot"===Pe.$tag$&&(d&&tt.classList.add(d+"-s"),Pe.$flags$|=Pe.$children$?2:1)),null!==Pe.$text$)vt=Pe.$elm$=K.createTextNode(Pe.$text$);else if(1&Pe.$flags$)vt=Pe.$elm$=K.createTextNode("");else{if(ie||(ie="svg"===Pe.$tag$),vt=Pe.$elm$=K.createElementNS(ie?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&Pe.$flags$?"slot-fb":Pe.$tag$),ie&&"foreignObject"===Pe.$tag$&&(ie=!1),Wn(null,Pe,ie),(le=>null!=le)(d)&&vt["s-si"]!==d&&vt.classList.add(vt["s-si"]=d),Pe.$children$)for(Je=0;Je{z.$flags$|=1;const ze=le.childNodes;for(let tt=ze.length-1;tt>=0;tt--){const Pe=ze[tt];Pe["s-hn"]!==R&&Pe["s-ol"]&&(Ut(Pe).insertBefore(Pe,en(Pe)),Pe["s-ol"].remove(),Pe["s-ol"]=void 0,U=!0),ye&&Vn(Pe,ye)}z.$flags$&=-2},sr=(le,ye,ze,tt,Pe,Je)=>{let Mt,vt=le["s-cr"]&&le["s-cr"].parentNode||le;for(vt.shadowRoot&&vt.tagName===R&&(vt=vt.shadowRoot);Pe<=Je;++Pe)tt[Pe]&&(Mt=Zn(null,ze,Pe,le),Mt&&(tt[Pe].$elm$=Mt,vt.insertBefore(Mt,en(ye))))},Tr=(le,ye,ze,tt,Pe)=>{for(;ye<=ze;++ye)(tt=le[ye])&&(Pe=tt.$elm$,be(tt),N=!0,Pe["s-ol"]?Pe["s-ol"].remove():Vn(Pe,!0),Pe.remove())},pn=(le,ye)=>le.$tag$===ye.$tag$&&("slot"===le.$tag$?le.$name$===ye.$name$:le.$key$===ye.$key$),en=le=>le&&le["s-ol"]||le,Ut=le=>(le["s-ol"]?le["s-ol"]:le).parentNode,xt=(le,ye)=>{const ze=ye.$elm$=le.$elm$,tt=le.$children$,Pe=ye.$children$,Je=ye.$tag$,vt=ye.$text$;let Mt;null===vt?(ie="svg"===Je||"foreignObject"!==Je&&ie,"slot"===Je||Wn(le,ye,ie),null!==tt&&null!==Pe?((le,ye,ze,tt)=>{let Oi,Mr,Pe=0,Je=0,vt=0,Mt=0,Vt=ye.length-1,jt=ye[0],vn=ye[Vt],$n=tt.length-1,er=tt[0],xr=tt[$n];for(;Pe<=Vt&&Je<=$n;)if(null==jt)jt=ye[++Pe];else if(null==vn)vn=ye[--Vt];else if(null==er)er=tt[++Je];else if(null==xr)xr=tt[--$n];else if(pn(jt,er))xt(jt,er),jt=ye[++Pe],er=tt[++Je];else if(pn(vn,xr))xt(vn,xr),vn=ye[--Vt],xr=tt[--$n];else if(pn(jt,xr))("slot"===jt.$tag$||"slot"===xr.$tag$)&&Vn(jt.$elm$.parentNode,!1),xt(jt,xr),le.insertBefore(jt.$elm$,vn.$elm$.nextSibling),jt=ye[++Pe],xr=tt[--$n];else if(pn(vn,er))("slot"===jt.$tag$||"slot"===xr.$tag$)&&Vn(vn.$elm$.parentNode,!1),xt(vn,er),le.insertBefore(vn.$elm$,jt.$elm$),vn=ye[--Vt],er=tt[++Je];else{for(vt=-1,Mt=Pe;Mt<=Vt;++Mt)if(ye[Mt]&&null!==ye[Mt].$key$&&ye[Mt].$key$===er.$key$){vt=Mt;break}vt>=0?(Mr=ye[vt],Mr.$tag$!==er.$tag$?Oi=Zn(ye&&ye[Je],ze,vt,le):(xt(Mr,er),ye[vt]=void 0,Oi=Mr.$elm$),er=tt[++Je]):(Oi=Zn(ye&&ye[Je],ze,Je,le),er=tt[++Je]),Oi&&Ut(jt.$elm$).insertBefore(Oi,en(jt.$elm$))}Pe>Vt?sr(le,null==tt[$n+1]?null:tt[$n+1].$elm$,ze,tt,Je,$n):Je>$n&&Tr(ye,Pe,Vt)})(ze,tt,ye,Pe):null!==Pe?(null!==le.$text$&&(ze.textContent=""),sr(ze,null,ye,Pe,0,Pe.length-1)):null!==tt&&Tr(tt,0,tt.length-1),ie&&"svg"===Je&&(ie=!1)):(Mt=ze["s-cr"])?Mt.parentNode.textContent=vt:le.$text$!==vt&&(ze.data=vt)},qe=le=>{const ye=le.childNodes;let ze,tt,Pe,Je,vt,Mt;for(tt=0,Pe=ye.length;tt{let ye,ze,tt,Pe,Je,vt,Mt=0;const Vt=le.childNodes,jt=Vt.length;for(;Mt=0;vt--)ze=tt[vt],!ze["s-cn"]&&!ze["s-nr"]&&ze["s-hn"]!==ye["s-hn"]&&(F(ze,Pe)?(Je=$e.find(vn=>vn.$nodeToRelocate$===ze),N=!0,ze["s-sn"]=ze["s-sn"]||Pe,Je?Je.$slotRefNode$=ye:$e.push({$slotRefNode$:ye,$nodeToRelocate$:ze}),ze["s-sr"]&&$e.map(vn=>{F(vn.$nodeToRelocate$,ze["s-sn"])&&(Je=$e.find($n=>$n.$nodeToRelocate$===ze),Je&&!vn.$slotRefNode$&&(vn.$slotRefNode$=Je.$slotRefNode$))})):$e.some(vn=>vn.$nodeToRelocate$===ze)||$e.push({$nodeToRelocate$:ze}));1===ye.nodeType&&T(ye)}},F=(le,ye)=>1===le.nodeType?null===le.getAttribute("slot")&&""===ye||le.getAttribute("slot")===ye:le["s-sn"]===ye||""===ye,be=le=>{le.$attrs$&&le.$attrs$.ref&&le.$attrs$.ref(null),le.$children$&&le.$children$.map(be)},Pn=le=>nr(le).$hostElement$,_r=(le,ye,ze)=>{const tt=Pn(le);return{emit:Pe=>Ur(tt,ye,{bubbles:!!(4&ze),composed:!!(2&ze),cancelable:!!(1&ze),detail:Pe})}},Ur=(le,ye,ze)=>{const tt=z.ce(ye,ze);return le.dispatchEvent(tt),tt},Ht=(le,ye)=>{ye&&!le.$onRenderResolve$&&ye["s-p"]&&ye["s-p"].push(new Promise(ze=>le.$onRenderResolve$=ze))},At=(le,ye)=>{if(le.$flags$|=16,!(4&le.$flags$))return Ht(le,le.$ancestorComponent$),ni(()=>Xt(le,ye));le.$flags$|=512},Xt=(le,ye)=>{const tt=le.$lazyInstance$;let Pe;return ye&&(le.$flags$|=256,le.$queuedListeners$&&(le.$queuedListeners$.map(([Je,vt])=>Te(tt,Je,vt)),le.$queuedListeners$=null),Pe=Te(tt,"componentWillLoad")),Pe=Ye(Pe,()=>Te(tt,"componentWillRender")),Ye(Pe,()=>sn(le,tt,ye))},sn=function(){var le=(0,n.Z)(function*(ye,ze,tt){const Pe=ye.$hostElement$,vt=Pe["s-rc"];tt&&(le=>{const ye=le.$cmpMeta$,ze=le.$hostElement$,tt=ye.$flags$,Je=xe(ze.shadowRoot?ze.shadowRoot:ze.getRootNode(),ye,le.$modeName$);10&tt&&(ze["s-sc"]=Je,ze.classList.add(Je+"-h"),2&tt&&ze.classList.add(Je+"-s"))})(ye);wn(ye,ze),vt&&(vt.map(Vt=>Vt()),Pe["s-rc"]=void 0);{const Vt=Pe["s-p"],jt=()=>kn(ye);0===Vt.length?jt():(Promise.all(Vt).then(jt),ye.$flags$|=4,Vt.length=0)}});return function(ze,tt,Pe){return le.apply(this,arguments)}}(),wn=(le,ye,ze)=>{try{ye=ye.render&&ye.render(),le.$flags$&=-17,le.$flags$|=2,((le,ye)=>{const ze=le.$hostElement$,tt=le.$cmpMeta$,Pe=le.$vnode$||It(null,null),Je=(le=>le&&le.$tag$===gn)(ye)?ye:Et(null,null,ye);if(R=ze.tagName,tt.$attrsToReflect$&&(Je.$attrs$=Je.$attrs$||{},tt.$attrsToReflect$.map(([vt,Mt])=>Je.$attrs$[Mt]=ze[vt])),Je.$tag$=null,Je.$flags$|=4,le.$vnode$=Je,Je.$elm$=Pe.$elm$=ze.shadowRoot||ze,d=ze["s-sc"],A=ze["s-cr"],O=0!=(1&tt.$flags$),N=!1,xt(Pe,Je),z.$flags$|=1,U){T(Je.$elm$);let vt,Mt,Vt,jt,vn,$n,er=0;for(;er<$e.length;er++)vt=$e[er],Mt=vt.$nodeToRelocate$,Mt["s-ol"]||(Vt=K.createTextNode(""),Vt["s-nr"]=Mt,Mt.parentNode.insertBefore(Mt["s-ol"]=Vt,Mt));for(er=0;er<$e.length;er++)if(vt=$e[er],Mt=vt.$nodeToRelocate$,vt.$slotRefNode$){for(jt=vt.$slotRefNode$.parentNode,vn=vt.$slotRefNode$.nextSibling,Vt=Mt["s-ol"];Vt=Vt.previousSibling;)if($n=Vt["s-nr"],$n&&$n["s-sn"]===Mt["s-sn"]&&jt===$n.parentNode&&($n=$n.nextSibling,!$n||!$n["s-nr"])){vn=$n;break}(!vn&&jt!==Mt.parentNode||Mt.nextSibling!==vn)&&Mt!==vn&&(!Mt["s-hn"]&&Mt["s-ol"]&&(Mt["s-hn"]=Mt["s-ol"].parentNode.nodeName),jt.insertBefore(Mt,vn))}else 1===Mt.nodeType&&(Mt.hidden=!0)}N&&qe(Je.$elm$),z.$flags$&=-2,$e.length=0})(le,ye)}catch(tt){xn(tt,le.$hostElement$)}return null},kn=le=>{const ze=le.$hostElement$,Pe=le.$lazyInstance$,Je=le.$ancestorComponent$;Te(Pe,"componentDidRender"),64&le.$flags$?Te(Pe,"componentDidUpdate"):(le.$flags$|=64,ft(ze),Te(Pe,"componentDidLoad"),le.$onReadyResolve$(ze),Je||rt()),le.$onInstanceResolve$(ze),le.$onRenderResolve$&&(le.$onRenderResolve$(),le.$onRenderResolve$=void 0),512&le.$flags$&&Br(()=>At(le,!1)),le.$flags$&=-517},vr=le=>{{const ye=nr(le),ze=ye.$hostElement$.isConnected;return ze&&2==(18&ye.$flags$)&&At(ye,!1),ze}},rt=le=>{ft(K.documentElement),Br(()=>Ur(ee,"appload",{detail:{namespace:"ionic"}}))},Te=(le,ye,ze)=>{if(le&&le[ye])try{return le[ye](ze)}catch(tt){xn(tt)}},Ye=(le,ye)=>le&&le.then?le.then(ye):ye(),ft=le=>le.classList.add("hydrated"),Gt=(le,ye,ze,tt,Pe,Je,vt)=>{let Mt,Vt,jt,vn;if(1===Je.nodeType){for(Mt=Je.getAttribute("c-id"),Mt&&(Vt=Mt.split("."),(Vt[0]===vt||"0"===Vt[0])&&(jt={$flags$:0,$hostId$:Vt[0],$nodeId$:Vt[1],$depth$:Vt[2],$index$:Vt[3],$tag$:Je.tagName.toLowerCase(),$elm$:Je,$attrs$:null,$children$:null,$key$:null,$name$:null,$text$:null},ye.push(jt),Je.removeAttribute("c-id"),le.$children$||(le.$children$=[]),le.$children$[jt.$index$]=jt,le=jt,tt&&"0"===jt.$depth$&&(tt[jt.$index$]=jt.$elm$))),vn=Je.childNodes.length-1;vn>=0;vn--)Gt(le,ye,ze,tt,Pe,Je.childNodes[vn],vt);if(Je.shadowRoot)for(vn=Je.shadowRoot.childNodes.length-1;vn>=0;vn--)Gt(le,ye,ze,tt,Pe,Je.shadowRoot.childNodes[vn],vt)}else if(8===Je.nodeType)Vt=Je.nodeValue.split("."),(Vt[1]===vt||"0"===Vt[1])&&(Mt=Vt[0],jt={$flags$:0,$hostId$:Vt[1],$nodeId$:Vt[2],$depth$:Vt[3],$index$:Vt[4],$elm$:Je,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},"t"===Mt?(jt.$elm$=Je.nextSibling,jt.$elm$&&3===jt.$elm$.nodeType&&(jt.$text$=jt.$elm$.textContent,ye.push(jt),Je.remove(),le.$children$||(le.$children$=[]),le.$children$[jt.$index$]=jt,tt&&"0"===jt.$depth$&&(tt[jt.$index$]=jt.$elm$))):jt.$hostId$===vt&&("s"===Mt?(jt.$tag$="slot",Je["s-sn"]=Vt[5]?jt.$name$=Vt[5]:"",Je["s-sr"]=!0,tt&&(jt.$elm$=K.createElement(jt.$tag$),jt.$name$&&jt.$elm$.setAttribute("name",jt.$name$),Je.parentNode.insertBefore(jt.$elm$,Je),Je.remove(),"0"===jt.$depth$&&(tt[jt.$index$]=jt.$elm$)),ze.push(jt),le.$children$||(le.$children$=[]),le.$children$[jt.$index$]=jt):"r"===Mt&&(tt?Je.remove():(Pe["s-cr"]=Je,Je["s-cn"]=!0))));else if(le&&"style"===le.$tag$){const $n=It(null,Je.textContent);$n.$elm$=Je,$n.$index$="0",le.$children$=[$n]}},nn=(le,ye)=>{if(1===le.nodeType){let ze=0;for(;ze{if(ye.$members$){le.watchers&&(ye.$watchers$=le.watchers);const tt=Object.entries(ye.$members$),Pe=le.prototype;if(tt.map(([Je,[vt]])=>{31&vt||2&ze&&32&vt?Object.defineProperty(Pe,Je,{get(){return((le,ye)=>nr(this).$instanceValues$.get(ye))(0,Je)},set(Mt){((le,ye,ze,tt)=>{const Pe=nr(le),Je=Pe.$hostElement$,vt=Pe.$instanceValues$.get(ye),Mt=Pe.$flags$,Vt=Pe.$lazyInstance$;ze=((le,ye)=>null==le||kt(le)?le:4&ye?"false"!==le&&(""===le||!!le):2&ye?parseFloat(le):1&ye?String(le):le)(ze,tt.$members$[ye][0]);const jt=Number.isNaN(vt)&&Number.isNaN(ze);if((!(8&Mt)||void 0===vt)&&ze!==vt&&!jt&&(Pe.$instanceValues$.set(ye,ze),Vt)){if(tt.$watchers$&&128&Mt){const $n=tt.$watchers$[ye];$n&&$n.map(er=>{try{Vt[er](ze,vt,ye)}catch(xr){xn(xr,Je)}})}2==(18&Mt)&&At(Pe,!1)}})(this,Je,Mt,ye)},configurable:!0,enumerable:!0}):1&ze&&64&vt&&Object.defineProperty(Pe,Je,{value(...Mt){const Vt=nr(this);return Vt.$onInstancePromise$.then(()=>Vt.$lazyInstance$[Je](...Mt))}})}),1&ze){const Je=new Map;Pe.attributeChangedCallback=function(vt,Mt,Vt){z.jmp(()=>{const jt=Je.get(vt);if(this.hasOwnProperty(jt))Vt=this[jt],delete this[jt];else if(Pe.hasOwnProperty(jt)&&"number"==typeof this[jt]&&this[jt]==Vt)return;this[jt]=(null!==Vt||"boolean"!=typeof this[jt])&&Vt})},le.observedAttributes=tt.filter(([vt,Mt])=>15&Mt[0]).map(([vt,Mt])=>{const Vt=Mt[1]||vt;return Je.set(Vt,vt),512&Mt[0]&&ye.$attrsToReflect$.push([vt,Vt]),Vt})}}return le},lt=function(){var le=(0,n.Z)(function*(ye,ze,tt,Pe,Je){if(!(32&ze.$flags$)){{if(ze.$flags$|=32,(Je=Bn(tt)).then){const jt=()=>{};Je=yield Je,jt()}Je.isProxied||(tt.$watchers$=Je.watchers,gt(Je,tt,2),Je.isProxied=!0);const Vt=()=>{};ze.$flags$|=8;try{new Je(ze)}catch(jt){xn(jt)}ze.$flags$&=-9,ze.$flags$|=128,Vt(),He(ze.$lazyInstance$)}if(Je.style){let Vt=Je.style;"string"!=typeof Vt&&(Vt=Vt[ze.$modeName$=(le=>Ar.map(ye=>ye(le)).find(ye=>!!ye))(ye)]);const jt=Le(tt,ze.$modeName$);if(!Cr.has(jt)){const vn=()=>{};Qe(jt,Vt,!!(1&tt.$flags$)),vn()}}}const vt=ze.$ancestorComponent$,Mt=()=>At(ze,!0);vt&&vt["s-rc"]?vt["s-rc"].push(Mt):Mt()});return function(ze,tt,Pe,Je,vt){return le.apply(this,arguments)}}(),He=le=>{Te(le,"connectedCallback")},mt=le=>{const ye=le["s-cr"]=K.createComment("");ye["s-cn"]=!0,le.insertBefore(ye,le.firstChild)},Cn=(le,ye={})=>{const tt=[],Pe=ye.exclude||[],Je=ee.customElements,vt=K.head,Mt=vt.querySelector("meta[charset]"),Vt=K.createElement("style"),jt=[],vn=K.querySelectorAll(`[${et}]`);let $n,er=!0,xr=0;for(Object.assign(z,ye),z.$resourcesUrl$=new URL(ye.resourcesUrl||"./",K.baseURI).href,z.$flags$|=2;xr{Oi[1].map(Mr=>{const ri={$flags$:Mr[0],$tagName$:Mr[1],$members$:Mr[2],$listeners$:Mr[3]};ri.$members$=Mr[2],ri.$listeners$=Mr[3],ri.$attrsToReflect$=[],ri.$watchers$={};const Ji=ri.$tagName$,is=class extends HTMLElement{constructor(Wi){super(Wi),zt(Wi=this,ri),1&ri.$flags$&&Wi.attachShadow({mode:"open",delegatesFocus:!!(16&ri.$flags$)})}connectedCallback(){$n&&(clearTimeout($n),$n=null),er?jt.push(this):z.jmp(()=>(le=>{if(!(1&z.$flags$)){const ye=nr(le),ze=ye.$cmpMeta$,tt=()=>{};if(1&ye.$flags$)te(le,ye,ze.$listeners$),He(ye.$lazyInstance$);else{let Pe;if(ye.$flags$|=1,Pe=le.getAttribute(Me),Pe){if(1&ze.$flags$){const Je=xe(le.shadowRoot,ze,le.getAttribute("s-mode"));le.classList.remove(Je+"-h",Je+"-s")}((le,ye,ze,tt)=>{const Je=le.shadowRoot,vt=[],Vt=Je?[]:null,jt=tt.$vnode$=It(ye,null);z.$orgLocNodes$||nn(K.body,z.$orgLocNodes$=new Map),le[Me]=ze,le.removeAttribute(Me),Gt(jt,vt,[],Vt,le,le,ze),vt.map(vn=>{const $n=vn.$hostId$+"."+vn.$nodeId$,er=z.$orgLocNodes$.get($n),xr=vn.$elm$;er&&""===er["s-en"]&&er.parentNode.insertBefore(xr,er.nextSibling),Je||(xr["s-hn"]=ye,er&&(xr["s-ol"]=er,xr["s-ol"]["s-nr"]=xr)),z.$orgLocNodes$.delete($n)}),Je&&Vt.map(vn=>{vn&&Je.appendChild(vn)})})(le,ze.$tagName$,Pe,ye)}Pe||12&ze.$flags$&&mt(le);{let Je=le;for(;Je=Je.parentNode||Je.host;)if(1===Je.nodeType&&Je.hasAttribute("s-id")&&Je["s-p"]||Je["s-p"]){Ht(ye,ye.$ancestorComponent$=Je);break}}ze.$members$&&Object.entries(ze.$members$).map(([Je,[vt]])=>{if(31&vt&&le.hasOwnProperty(Je)){const Mt=le[Je];delete le[Je],le[Je]=Mt}}),Br(()=>lt(le,ye,ze))}tt()}})(this))}disconnectedCallback(){z.jmp(()=>(le=>{if(!(1&z.$flags$)){const ye=nr(this),ze=ye.$lazyInstance$;ye.$rmListeners$&&(ye.$rmListeners$.map(tt=>tt()),ye.$rmListeners$=void 0),Te(ze,"disconnectedCallback")}})())}componentOnReady(){return nr(this).$onReadyPromise$}};ri.$lazyBundleId$=Oi[0],!Pe.includes(Ji)&&!Je.get(Ji)&&(tt.push(Ji),Je.define(Ji,gt(is,ri,1)))})}),Vt.innerHTML=tt+"{visibility:hidden}.hydrated{visibility:inherit}",Vt.setAttribute("data-styles",""),vt.insertBefore(Vt,Mt?Mt.nextSibling:vt.firstChild),er=!1,jt.length?jt.map(Oi=>Oi.connectedCallback()):z.jmp(()=>$n=setTimeout(rt,30))},tr=le=>{const ye=new URL(le,z.$resourcesUrl$);return ye.origin!==ee.location.origin?ye.href:ye.pathname},fr=new WeakMap,nr=le=>fr.get(le),Ct=(le,ye)=>fr.set(ye.$lazyInstance$=le,ye),zt=(le,ye)=>{const ze={$flags$:0,$hostElement$:le,$cmpMeta$:ye,$instanceValues$:new Map};return ze.$onInstancePromise$=new Promise(tt=>ze.$onInstanceResolve$=tt),ze.$onReadyPromise$=new Promise(tt=>ze.$onReadyResolve$=tt),le["s-p"]=[],le["s-rc"]=[],te(le,ze,ye.$listeners$),fr.set(le,ze)},tn=(le,ye)=>ye in le,xn=(le,ye)=>(0,console.error)(le,ye),Er=new Map,Bn=(le,ye,ze)=>{const tt=le.$tagName$.replace(/-/g,"_"),Pe=le.$lazyBundleId$,Je=Er.get(Pe);return Je?Je[tt]:u(863)(`./${Pe}.entry.js`).then(vt=>(Er.set(Pe,vt),vt[tt]),xn)},Cr=new Map,Ar=[],Jr=[],Dr=[],li=(le,ye)=>ze=>{le.push(ze),L||(L=!0,ye&&4&z.$flags$?Br(rr):z.raf(rr))},mn=le=>{for(let ye=0;ye{mn(Jr),mn(Dr),(L=Jr.length>0)&&z.raf(rr)},Br=le=>Y().then(le),Gr=li(Jr,!1),ni=li(Dr,!0),_t={isDev:!1,isBrowser:!0,isServer:!1,isTesting:!1}},3139:(o,c,u)=>{"use strict";u.r(c),u.d(c,{GESTURE_CONTROLLER:()=>n.G,createGesture:()=>ie});var n=u(3509);const g=(z,ce,X,Y)=>{const G=d(z)?{capture:!!Y.capture,passive:!!Y.passive}:!!Y.capture;let te,pe;return z.__zone_symbol__addEventListener?(te="__zone_symbol__addEventListener",pe="__zone_symbol__removeEventListener"):(te="addEventListener",pe="removeEventListener"),z[te](ce,X,G),()=>{z[pe](ce,X,G)}},d=z=>{if(void 0===A)try{const ce=Object.defineProperty({},"passive",{get:()=>{A=!0}});z.addEventListener("optsTest",()=>{},ce)}catch{A=!1}return!!A};let A;const N=z=>z instanceof Document?z:z.ownerDocument,ie=z=>{let ce=!1,X=!1,Y=!0,G=!1;const te=Object.assign({disableScroll:!1,direction:"x",gesturePriority:0,passive:!0,maxAngle:40,threshold:10},z),pe=te.canStart,ve=te.onWillStart,Ie=te.onStart,we=te.onEnd,Ve=te.notCaptured,We=te.onMove,Se=te.threshold,Me=te.passive,et=te.blurOnStart,Fe={type:"pan",startX:0,startY:0,startTime:0,currentX:0,currentY:0,velocityX:0,velocityY:0,deltaX:0,deltaY:0,currentTime:0,event:void 0,data:void 0},Ee=((z,ce,X)=>{const Y=X*(Math.PI/180),G="x"===z,te=Math.cos(Y),pe=ce*ce;let ve=0,Ie=0,we=!1,Ve=0;return{start(We,Se){ve=We,Ie=Se,Ve=0,we=!0},detect(We,Se){if(!we)return!1;const Me=We-ve,et=Se-Ie,Fe=Me*Me+et*et;if(Fete?1:ae<-te?-1:0,we=!1,!0},isGesture:()=>0!==Ve,getDirection:()=>Ve}})(te.direction,te.threshold,te.maxAngle),ae=n.G.createGesture({name:z.gestureName,priority:z.gesturePriority,disableScroll:z.disableScroll}),ue=()=>{ce&&(G=!1,We&&We(Fe))},Qe=()=>!(ae&&!ae.capture()||(ce=!0,Y=!1,Fe.startX=Fe.currentX,Fe.startY=Fe.currentY,Fe.startTime=Fe.currentTime,ve?ve(Fe).then(st):st(),0)),st=()=>{et&&(()=>{if(typeof document<"u"){const pt=document.activeElement;pt?.blur&&pt.blur()}})(),Ie&&Ie(Fe),Y=!0},Le=()=>{ce=!1,X=!1,G=!1,Y=!0,ae.release()},ke=pt=>{const $t=ce,bt=Y;if(Le(),bt){if(L(Fe,pt),$t)return void(we&&we(Fe));Ve&&Ve(Fe)}},Ge=((z,ce,X,Y,G)=>{let te,pe,ve,Ie,we,Ve,We,Se=0;const Me=xe=>{Se=Date.now()+2e3,ce(xe)&&(!pe&&X&&(pe=g(z,"touchmove",X,G)),ve||(ve=g(xe.target,"touchend",Fe,G)),Ie||(Ie=g(xe.target,"touchcancel",Fe,G)))},et=xe=>{Se>Date.now()||ce(xe)&&(!Ve&&X&&(Ve=g(N(z),"mousemove",X,G)),We||(We=g(N(z),"mouseup",Ee,G)))},Fe=xe=>{ae(),Y&&Y(xe)},Ee=xe=>{me(),Y&&Y(xe)},ae=()=>{pe&&pe(),ve&&ve(),Ie&&Ie(),pe=ve=Ie=void 0},me=()=>{Ve&&Ve(),We&&We(),Ve=We=void 0},$=()=>{ae(),me()},ue=(xe=!0)=>{xe?(te||(te=g(z,"touchstart",Me,G)),we||(we=g(z,"mousedown",et,G))):(te&&te(),we&&we(),te=we=void 0,$())};return{enable:ue,stop:$,destroy:()=>{ue(!1),Y=X=ce=void 0}}})(te.el,pt=>{const $t=K(pt);return!(X||!Y||(ee(pt,Fe),Fe.startX=Fe.currentX,Fe.startY=Fe.currentY,Fe.startTime=Fe.currentTime=$t,Fe.velocityX=Fe.velocityY=Fe.deltaX=Fe.deltaY=0,Fe.event=pt,pe&&!1===pe(Fe))||(ae.release(),!ae.start()))&&(X=!0,0===Se?Qe():(Ee.start(Fe.startX,Fe.startY),!0))},pt=>{ce?!G&&Y&&(G=!0,L(Fe,pt),requestAnimationFrame(ue)):(L(Fe,pt),Ee.detect(Fe.currentX,Fe.currentY)&&(!Ee.isGesture()||!Qe())&&ut())},ke,{capture:!1,passive:Me}),ut=()=>{Le(),Ge.stop(),Ve&&Ve(Fe)};return{enable(pt=!0){pt||(ce&&ke(void 0),Le()),Ge.enable(pt)},destroy(){ae.destroy(),Ge.destroy()}}},L=(z,ce)=>{if(!ce)return;const X=z.currentX,Y=z.currentY,G=z.currentTime;ee(ce,z);const te=z.currentX,pe=z.currentY,Ie=(z.currentTime=K(ce))-G;if(Ie>0&&Ie<100){const Ve=(pe-Y)/Ie;z.velocityX=(te-X)/Ie*.7+.3*z.velocityX,z.velocityY=.7*Ve+.3*z.velocityY}z.deltaX=te-z.startX,z.deltaY=pe-z.startY,z.event=ce},ee=(z,ce)=>{let X=0,Y=0;if(z){const G=z.changedTouches;if(G&&G.length>0){const te=G[0];X=te.clientX,Y=te.clientY}else void 0!==z.pageX&&(X=z.pageX,Y=z.pageY)}ce.currentX=X,ce.currentY=Y},K=z=>z.timeStamp||Date.now()},471:(o,c,u)=>{"use strict";u.d(c,{L:()=>A,a:()=>R,b:()=>O,c:()=>N,d:()=>U,e:()=>Se,g:()=>Fe,l:()=>Ve,s:()=>Me,t:()=>ee});var n=u(5861),g=u(7936),d=u(3756);const A="ionViewWillEnter",R="ionViewDidEnter",O="ionViewWillLeave",N="ionViewDidLeave",U="ionViewWillUnload",ee=Ee=>new Promise((ae,me)=>{(0,g.c)(()=>{K(Ee),z(Ee).then($=>{$.animation&&$.animation.destroy(),ce(Ee),ae($)},$=>{ce(Ee),me($)})})}),K=Ee=>{const ae=Ee.enteringEl,me=Ee.leavingEl;et(ae,me,Ee.direction),Ee.showGoBack?ae.classList.add("can-go-back"):ae.classList.remove("can-go-back"),Me(ae,!1),ae.style.setProperty("pointer-events","none"),me&&(Me(me,!1),me.style.setProperty("pointer-events","none"))},z=function(){var Ee=(0,n.Z)(function*(ae){const me=yield X(ae);return me&&g.B.isBrowser?Y(me,ae):G(ae)});return function(me){return Ee.apply(this,arguments)}}(),ce=Ee=>{const ae=Ee.enteringEl,me=Ee.leavingEl;ae.classList.remove("ion-page-invisible"),ae.style.removeProperty("pointer-events"),void 0!==me&&(me.classList.remove("ion-page-invisible"),me.style.removeProperty("pointer-events"))},X=function(){var Ee=(0,n.Z)(function*(ae){return ae.leavingEl&&ae.animated&&0!==ae.duration?ae.animationBuilder?ae.animationBuilder:"ios"===ae.mode?(yield Promise.resolve().then(u.bind(u,9950))).iosTransitionAnimation:(yield Promise.resolve().then(u.bind(u,4802))).mdTransitionAnimation:void 0});return function(me){return Ee.apply(this,arguments)}}(),Y=function(){var Ee=(0,n.Z)(function*(ae,me){yield te(me,!0);const $=ae(me.baseEl,me);Ie(me.enteringEl,me.leavingEl);const ue=yield ve($,me);return me.progressCallback&&me.progressCallback(void 0),ue&&we(me.enteringEl,me.leavingEl),{hasCompleted:ue,animation:$}});return function(me,$){return Ee.apply(this,arguments)}}(),G=function(){var Ee=(0,n.Z)(function*(ae){const me=ae.enteringEl,$=ae.leavingEl;return yield te(ae,!1),Ie(me,$),we(me,$),{hasCompleted:!0}});return function(me){return Ee.apply(this,arguments)}}(),te=function(){var Ee=(0,n.Z)(function*(ae,me){const ue=(void 0!==ae.deepWait?ae.deepWait:me)?[Se(ae.enteringEl),Se(ae.leavingEl)]:[We(ae.enteringEl),We(ae.leavingEl)];yield Promise.all(ue),yield pe(ae.viewIsReady,ae.enteringEl)});return function(me,$){return Ee.apply(this,arguments)}}(),pe=function(){var Ee=(0,n.Z)(function*(ae,me){ae&&(yield ae(me))});return function(me,$){return Ee.apply(this,arguments)}}(),ve=(Ee,ae)=>{const me=ae.progressCallback,$=new Promise(ue=>{Ee.onFinish(Qe=>ue(1===Qe))});return me?(Ee.progressStart(!0),me(Ee)):Ee.play(),$},Ie=(Ee,ae)=>{Ve(ae,O),Ve(Ee,A)},we=(Ee,ae)=>{Ve(Ee,R),Ve(ae,N)},Ve=(Ee,ae)=>{if(Ee){const me=new CustomEvent(ae,{bubbles:!1,cancelable:!1});Ee.dispatchEvent(me)}},We=Ee=>Ee?new Promise(ae=>(0,d.c)(Ee,ae)):Promise.resolve(),Se=function(){var Ee=(0,n.Z)(function*(ae){const me=ae;if(me){if(null!=me.componentOnReady){if(null!=(yield me.componentOnReady()))return}else if(null!=me.__registerHost)return void(yield new Promise(ue=>(0,d.r)(ue)));yield Promise.all(Array.from(me.children).map(Se))}});return function(me){return Ee.apply(this,arguments)}}(),Me=(Ee,ae)=>{ae?(Ee.setAttribute("aria-hidden","true"),Ee.classList.add("ion-page-hidden")):(Ee.hidden=!1,Ee.removeAttribute("aria-hidden"),Ee.classList.remove("ion-page-hidden"))},et=(Ee,ae,me)=>{void 0!==Ee&&(Ee.style.zIndex="back"===me?"99":"101"),void 0!==ae&&(ae.style.zIndex="100")},Fe=Ee=>Ee.classList.contains("ion-page")?Ee:Ee.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")||Ee},604:(o,c,u)=>{"use strict";u.d(c,{m:()=>ee});var n=u(5861),g=u(7593),d=u(3756),A=u(1671),R=u(9442);const O=K=>(0,R.c)().duration(K?400:300),N=K=>{let z,ce;const X=K.width+8,Y=(0,R.c)(),G=(0,R.c)();K.isEndSide?(z=X+"px",ce="0px"):(z=-X+"px",ce="0px"),Y.addElement(K.menuInnerEl).fromTo("transform",`translateX(${z})`,`translateX(${ce})`);const pe="ios"===(0,A.b)(K),ve=pe?.2:.25;return G.addElement(K.backdropEl).fromTo("opacity",.01,ve),O(pe).addAnimation([Y,G])},U=K=>{let z,ce;const X=(0,A.b)(K),Y=K.width;K.isEndSide?(z=-Y+"px",ce=Y+"px"):(z=Y+"px",ce=-Y+"px");const G=(0,R.c)().addElement(K.menuInnerEl).fromTo("transform",`translateX(${ce})`,"translateX(0px)"),te=(0,R.c)().addElement(K.contentEl).fromTo("transform","translateX(0px)",`translateX(${z})`),pe=(0,R.c)().addElement(K.backdropEl).fromTo("opacity",.01,.32);return O("ios"===X).addAnimation([G,te,pe])},ie=K=>{const z=(0,A.b)(K),ce=K.width*(K.isEndSide?-1:1)+"px",X=(0,R.c)().addElement(K.contentEl).fromTo("transform","translateX(0px)",`translateX(${ce})`);return O("ios"===z).addAnimation(X)},ee=(()=>{const K=new Map,z=[],ce=function(){var st=(0,n.Z)(function*(Le){const ke=yield Ie(Le);return!!ke&&ke.open()});return function(ke){return st.apply(this,arguments)}}(),X=function(){var st=(0,n.Z)(function*(Le){const ke=yield void 0!==Le?Ie(Le):we();return void 0!==ke&&ke.close()});return function(ke){return st.apply(this,arguments)}}(),Y=function(){var st=(0,n.Z)(function*(Le){const ke=yield Ie(Le);return!!ke&&ke.toggle()});return function(ke){return st.apply(this,arguments)}}(),G=function(){var st=(0,n.Z)(function*(Le,ke){const Ge=yield Ie(ke);return Ge&&(Ge.disabled=!Le),Ge});return function(ke,Ge){return st.apply(this,arguments)}}(),te=function(){var st=(0,n.Z)(function*(Le,ke){const Ge=yield Ie(ke);return Ge&&(Ge.swipeGesture=Le),Ge});return function(ke,Ge){return st.apply(this,arguments)}}(),pe=function(){var st=(0,n.Z)(function*(Le){if(null!=Le){const ke=yield Ie(Le);return void 0!==ke&&ke.isOpen()}return void 0!==(yield we())});return function(ke){return st.apply(this,arguments)}}(),ve=function(){var st=(0,n.Z)(function*(Le){const ke=yield Ie(Le);return!!ke&&!ke.disabled});return function(ke){return st.apply(this,arguments)}}(),Ie=function(){var st=(0,n.Z)(function*(Le){return yield xe(),"start"===Le||"end"===Le?Qe(ut=>ut.side===Le&&!ut.disabled)||Qe(ut=>ut.side===Le):null!=Le?Qe(Ge=>Ge.menuId===Le):Qe(Ge=>!Ge.disabled)||(z.length>0?z[0].el:void 0)});return function(ke){return st.apply(this,arguments)}}(),we=function(){var st=(0,n.Z)(function*(){return yield xe(),me()});return function(){return st.apply(this,arguments)}}(),Ve=function(){var st=(0,n.Z)(function*(){return yield xe(),$()});return function(){return st.apply(this,arguments)}}(),We=function(){var st=(0,n.Z)(function*(){return yield xe(),ue()});return function(){return st.apply(this,arguments)}}(),Se=(st,Le)=>{K.set(st,Le)},Fe=st=>{const Le=st.side;z.filter(ke=>ke.side===Le&&ke!==st).forEach(ke=>ke.disabled=!0)},Ee=function(){var st=(0,n.Z)(function*(Le,ke,Ge){if(ue())return!1;if(ke){const ut=yield we();ut&&Le.el!==ut&&(yield ut.setOpen(!1,!1))}return Le._setOpen(ke,Ge)});return function(ke,Ge,ut){return st.apply(this,arguments)}}(),me=()=>Qe(st=>st._isOpen),$=()=>z.map(st=>st.el),ue=()=>z.some(st=>st.isAnimating),Qe=st=>{const Le=z.find(st);if(void 0!==Le)return Le.el},xe=()=>Promise.all(Array.from(document.querySelectorAll("ion-menu")).map(st=>new Promise(Le=>(0,d.c)(st,Le))));return Se("reveal",ie),Se("push",U),Se("overlay",N),typeof document<"u"&&document.addEventListener("ionBackButton",st=>{const Le=me();Le&&st.detail.register(g.MENU_BACK_BUTTON_PRIORITY,()=>Le.close())}),{registerAnimation:Se,get:Ie,getMenus:Ve,getOpen:we,isEnabled:ve,swipeGesture:te,isAnimating:We,isOpen:pe,enable:G,toggle:Y,close:X,open:ce,_getOpenSync:me,_createAnimation:(st,Le)=>{const ke=K.get(st);if(!ke)throw new Error("animation not registered");return ke(Le)},_register:st=>{z.indexOf(st)<0&&(st.disabled||Fe(st),z.push(st))},_unregister:st=>{const Le=z.indexOf(st);Le>-1&&z.splice(Le,1)},_setOpen:Ee,_setActiveMenu:Fe}})()},1671:(o,c,u)=>{"use strict";u.d(c,{a:()=>ee,b:()=>ue,c:()=>d,g:()=>L,i:()=>Qe});var n=u(7936);class g{constructor(){this.m=new Map}reset(st){this.m=new Map(Object.entries(st))}get(st,Le){const ke=this.m.get(st);return void 0!==ke?ke:Le}getBoolean(st,Le=!1){const ke=this.m.get(st);return void 0===ke?Le:"string"==typeof ke?"true"===ke:!!ke}getNumber(st,Le){const ke=parseFloat(this.m.get(st));return isNaN(ke)?void 0!==Le?Le:NaN:ke}set(st,Le){this.m.set(st,Le)}}const d=new g,U="ionic:",ie="ionic-persist-config",L=xe=>K(xe),ee=(xe,st)=>("string"==typeof xe&&(st=xe,xe=void 0),L(xe).includes(st)),K=(xe=window)=>{if(typeof xe>"u")return[];xe.Ionic=xe.Ionic||{};let st=xe.Ionic.platforms;return null==st&&(st=xe.Ionic.platforms=z(xe),st.forEach(Le=>xe.document.documentElement.classList.add(`plt-${Le}`))),st},z=xe=>{const st=d.get("platform");return Object.keys(me).filter(Le=>{const ke=st?.[Le];return"function"==typeof ke?ke(xe):me[Le](xe)})},X=xe=>!!(Ee(xe,/iPad/i)||Ee(xe,/Macintosh/i)&&we(xe)),te=xe=>Ee(xe,/android|sink/i),we=xe=>ae(xe,"(any-pointer:coarse)"),We=xe=>Se(xe)||Me(xe),Se=xe=>!!(xe.cordova||xe.phonegap||xe.PhoneGap),Me=xe=>!!xe.Capacitor?.isNative,Ee=(xe,st)=>st.test(xe.navigator.userAgent),ae=(xe,st)=>{var Le;return null===(Le=xe.matchMedia)||void 0===Le?void 0:Le.call(xe,st).matches},me={ipad:X,iphone:xe=>Ee(xe,/iPhone/i),ios:xe=>Ee(xe,/iPhone|iPod/i)||X(xe),android:te,phablet:xe=>{const st=xe.innerWidth,Le=xe.innerHeight,ke=Math.min(st,Le),Ge=Math.max(st,Le);return ke>390&&ke<520&&Ge>620&&Ge<800},tablet:xe=>{const st=xe.innerWidth,Le=xe.innerHeight,ke=Math.min(st,Le),Ge=Math.max(st,Le);return X(xe)||(xe=>te(xe)&&!Ee(xe,/mobile/i))(xe)||ke>460&&ke<820&&Ge>780&&Ge<1400},cordova:Se,capacitor:Me,electron:xe=>Ee(xe,/electron/i),pwa:xe=>{var st;return!!(null!==(st=xe.matchMedia)&&void 0!==st&&st.call(xe,"(display-mode: standalone)").matches||xe.navigator.standalone)},mobile:we,mobileweb:xe=>we(xe)&&!We(xe),desktop:xe=>!we(xe),hybrid:We};let $;const ue=xe=>xe&&(0,n.g)(xe)||$,Qe=(xe={})=>{if(typeof window>"u")return;const st=window.document,Le=window,ke=Le.Ionic=Le.Ionic||{},Ge={};xe._ael&&(Ge.ael=xe._ael),xe._rel&&(Ge.rel=xe._rel),xe._ce&&(Ge.ce=xe._ce),(0,n.s)(Ge);const ut=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(xe=>{try{const st=xe.sessionStorage.getItem(ie);return null!==st?JSON.parse(st):{}}catch{return{}}})(Le)),{persistConfig:!1}),ke.config),(xe=>{const st={};return xe.location.search.slice(1).split("&").map(Le=>Le.split("=")).map(([Le,ke])=>[decodeURIComponent(Le),decodeURIComponent(ke)]).filter(([Le])=>((xe,st)=>xe.substr(0,st.length)===st)(Le,U)).map(([Le,ke])=>[Le.slice(U.length),ke]).forEach(([Le,ke])=>{st[Le]=ke}),st})(Le)),xe);d.reset(ut),d.getBoolean("persistConfig")&&((xe,st)=>{try{xe.sessionStorage.setItem(ie,JSON.stringify(st))}catch{return}})(Le,ut),K(Le),ke.config=d,ke.mode=$=d.get("mode",st.documentElement.getAttribute("mode")||(ee(Le,"ios")?"ios":"md")),d.set("mode",$),st.documentElement.setAttribute("mode",$),st.documentElement.classList.add($),d.getBoolean("_testing")&&d.set("animated",!1);const pt=bt=>{var St;return null===(St=bt.tagName)||void 0===St?void 0:St.startsWith("ION-")},$t=bt=>["ios","md"].includes(bt);(0,n.a)(bt=>{for(;bt;){const St=bt.mode||bt.getAttribute("mode");if(St){if($t(St))return St;pt(bt)&&console.warn('Invalid ionic mode: "'+St+'", expected: "ios" or "md"')}bt=bt.parentElement}return $})}},9950:(o,c,u)=>{"use strict";u.r(c),u.d(c,{iosTransitionAnimation:()=>K,shadow:()=>O});var n=u(9442),g=u(471);u(7936);const R=z=>document.querySelector(`${z}.ion-cloned-element`),O=z=>z.shadowRoot||z,N=z=>{const ce="ION-TABS"===z.tagName?z:z.querySelector("ion-tabs"),X="ion-content ion-header:not(.header-collapse-condense-inactive) ion-title.title-large";if(null!=ce){const Y=ce.querySelector("ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)");return null!=Y?Y.querySelector(X):null}return z.querySelector(X)},U=(z,ce)=>{const X="ION-TABS"===z.tagName?z:z.querySelector("ion-tabs");let Y=[];if(null!=X){const G=X.querySelector("ion-tab:not(.tab-hidden), .ion-page:not(.ion-page-hidden)");null!=G&&(Y=G.querySelectorAll("ion-buttons"))}else Y=z.querySelectorAll("ion-buttons");for(const G of Y){const te=G.closest("ion-header"),pe=te&&!te.classList.contains("header-collapse-condense-inactive"),ve=G.querySelector("ion-back-button"),Ie=G.classList.contains("buttons-collapse");if(null!==ve&&("start"===G.slot||""===G.slot)&&(Ie&&pe&&ce||!Ie))return ve}return null},L=(z,ce,X,Y,G,te)=>{const pe=ce?`calc(100% - ${te.right+4}px)`:te.left-4+"px",ve=ce?"7px":"-7px",Ie=ce?"-4px":"4px",we=ce?"-4px":"4px",Ve=ce?"right":"left",We=ce?"left":"right",et=X?[{offset:0,opacity:1,transform:`translate3d(${Ie}, ${te.top-46}px, 0) scale(1)`},{offset:.6,opacity:0},{offset:1,opacity:0,transform:`translate3d(${ve}, ${G.top-40}px, 0) scale(2.1)`}]:[{offset:0,opacity:0,transform:`translate3d(${ve}, ${G.top-40}px, 0) scale(2.1)`},{offset:1,opacity:1,transform:`translate3d(${Ie}, ${te.top-46}px, 0) scale(1)`}],ae=X?[{offset:0,opacity:1,transform:`translate3d(${we}, ${te.top-46}px, 0) scale(1)`},{offset:.2,opacity:0,transform:`translate3d(${we}, ${te.top-41}px, 0) scale(0.6)`},{offset:1,opacity:0,transform:`translate3d(${we}, ${te.top-41}px, 0) scale(0.6)`}]:[{offset:0,opacity:0,transform:`translate3d(${we}, ${te.top-41}px, 0) scale(0.6)`},{offset:1,opacity:1,transform:`translate3d(${we}, ${te.top-46}px, 0) scale(1)`}],me=(0,n.c)(),$=(0,n.c)(),ue=R("ion-back-button"),Qe=O(ue).querySelector(".button-text"),xe=O(ue).querySelector("ion-icon");ue.text=Y.text,ue.mode=Y.mode,ue.icon=Y.icon,ue.color=Y.color,ue.disabled=Y.disabled,ue.style.setProperty("display","block"),ue.style.setProperty("position","fixed"),$.addElement(xe),me.addElement(Qe),me.beforeStyles({"transform-origin":`${Ve} center`}).beforeAddWrite(()=>{Y.style.setProperty("display","none"),ue.style.setProperty(Ve,pe)}).afterAddWrite(()=>{Y.style.setProperty("display",""),ue.style.setProperty("display","none"),ue.style.removeProperty(Ve)}).keyframes(et),$.beforeStyles({"transform-origin":`${We} center`}).keyframes(ae),z.addAnimation([me,$])},ee=(z,ce,X,Y,G,te)=>{const pe=ce?`calc(100% - ${G.right}px)`:`${G.left}px`,ve=ce?"-18px":"18px",Ie=ce?"right":"left",We=X?[{offset:0,opacity:0,transform:`translate3d(${ve}, ${te.top-4}px, 0) scale(0.49)`},{offset:.1,opacity:0},{offset:1,opacity:1,transform:`translate3d(0, ${G.top-2}px, 0) scale(1)`}]:[{offset:0,opacity:.99,transform:`translate3d(0, ${G.top-2}px, 0) scale(1)`},{offset:.6,opacity:0},{offset:1,opacity:0,transform:`translate3d(${ve}, ${te.top-4}px, 0) scale(0.5)`}],Se=R("ion-title"),Me=(0,n.c)();Se.innerText=Y.innerText,Se.size=Y.size,Se.color=Y.color,Me.addElement(Se),Me.beforeStyles({"transform-origin":`${Ie} center`,height:"46px",display:"",position:"relative",[Ie]:pe}).beforeAddWrite(()=>{Y.style.setProperty("display","none")}).afterAddWrite(()=>{Y.style.setProperty("display",""),Se.style.setProperty("display","none")}).keyframes(We),z.addAnimation(Me)},K=(z,ce)=>{try{const X="cubic-bezier(0.32,0.72,0,1)",Y="opacity",G="transform",te="0%",ve="rtl"===z.ownerDocument.dir,Ie=ve?"-99.5%":"99.5%",we=ve?"33%":"-33%",Ve=ce.enteringEl,We=ce.leavingEl,Se="back"===ce.direction,Me=Ve.querySelector(":scope > ion-content"),et=Ve.querySelectorAll(":scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *"),Fe=Ve.querySelectorAll(":scope > ion-header > ion-toolbar"),Ee=(0,n.c)(),ae=(0,n.c)();if(Ee.addElement(Ve).duration(ce.duration||540).easing(ce.easing||X).fill("both").beforeRemoveClass("ion-page-invisible"),We&&z){const Qe=(0,n.c)();Qe.addElement(z),Ee.addAnimation(Qe)}if(Me||0!==Fe.length||0!==et.length?(ae.addElement(Me),ae.addElement(et)):ae.addElement(Ve.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")),Ee.addAnimation(ae),Se?ae.beforeClearStyles([Y]).fromTo("transform",`translateX(${we})`,`translateX(${te})`).fromTo(Y,.8,1):ae.beforeClearStyles([Y]).fromTo("transform",`translateX(${Ie})`,`translateX(${te})`),Me){const Qe=O(Me).querySelector(".transition-effect");if(Qe){const xe=Qe.querySelector(".transition-cover"),st=Qe.querySelector(".transition-shadow"),Le=(0,n.c)(),ke=(0,n.c)(),Ge=(0,n.c)();Le.addElement(Qe).beforeStyles({opacity:"1",display:"block"}).afterStyles({opacity:"",display:""}),ke.addElement(xe).beforeClearStyles([Y]).fromTo(Y,0,.1),Ge.addElement(st).beforeClearStyles([Y]).fromTo(Y,.03,.7),Le.addAnimation([ke,Ge]),ae.addAnimation([Le])}}const me=Ve.querySelector("ion-header.header-collapse-condense"),{forward:$,backward:ue}=((z,ce,X,Y,G)=>{const te=U(Y,X),pe=N(G),ve=N(Y),Ie=U(G,X),we=null!==te&&null!==pe&&!X,Ve=null!==ve&&null!==Ie&&X;if(we){const We=pe.getBoundingClientRect(),Se=te.getBoundingClientRect();ee(z,ce,X,pe,We,Se),L(z,ce,X,te,We,Se)}else if(Ve){const We=ve.getBoundingClientRect(),Se=Ie.getBoundingClientRect();ee(z,ce,X,ve,We,Se),L(z,ce,X,Ie,We,Se)}return{forward:we,backward:Ve}})(Ee,ve,Se,Ve,We);if(Fe.forEach(Qe=>{const xe=(0,n.c)();xe.addElement(Qe),Ee.addAnimation(xe);const st=(0,n.c)();st.addElement(Qe.querySelector("ion-title"));const Le=(0,n.c)(),ke=Array.from(Qe.querySelectorAll("ion-buttons,[menuToggle]")),Ge=Qe.closest("ion-header"),ut=Ge?.classList.contains("header-collapse-condense-inactive");let pt;pt=ke.filter(Se?kt=>{const Et=kt.classList.contains("buttons-collapse");return Et&&!ut||!Et}:kt=>!kt.classList.contains("buttons-collapse")),Le.addElement(pt);const $t=(0,n.c)();$t.addElement(Qe.querySelectorAll(":scope > *:not(ion-title):not(ion-buttons):not([menuToggle])"));const bt=(0,n.c)();bt.addElement(O(Qe).querySelector(".toolbar-background"));const St=(0,n.c)(),Yt=Qe.querySelector("ion-back-button");if(Yt&&St.addElement(Yt),xe.addAnimation([st,Le,$t,bt,St]),Le.fromTo(Y,.01,1),$t.fromTo(Y,.01,1),Se)ut||st.fromTo("transform",`translateX(${we})`,`translateX(${te})`).fromTo(Y,.01,1),$t.fromTo("transform",`translateX(${we})`,`translateX(${te})`),St.fromTo(Y,.01,1);else if(me||st.fromTo("transform",`translateX(${Ie})`,`translateX(${te})`).fromTo(Y,.01,1),$t.fromTo("transform",`translateX(${Ie})`,`translateX(${te})`),bt.beforeClearStyles([Y,"transform"]),Ge?.translucent?bt.fromTo("transform",ve?"translateX(-100%)":"translateX(100%)","translateX(0px)"):bt.fromTo(Y,.01,"var(--opacity)"),$||St.fromTo(Y,.01,1),Yt&&!$){const Et=(0,n.c)();Et.addElement(O(Yt).querySelector(".button-text")).fromTo("transform",ve?"translateX(-100px)":"translateX(100px)","translateX(0px)"),xe.addAnimation(Et)}}),We){const Qe=(0,n.c)(),xe=We.querySelector(":scope > ion-content"),st=We.querySelectorAll(":scope > ion-header > ion-toolbar"),Le=We.querySelectorAll(":scope > ion-header > *:not(ion-toolbar), :scope > ion-footer > *");if(xe||0!==st.length||0!==Le.length?(Qe.addElement(xe),Qe.addElement(Le)):Qe.addElement(We.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")),Ee.addAnimation(Qe),Se){Qe.beforeClearStyles([Y]).fromTo("transform",`translateX(${te})`,ve?"translateX(-100%)":"translateX(100%)");const ke=(0,g.g)(We);Ee.afterAddWrite(()=>{"normal"===Ee.getDirection()&&ke.style.setProperty("display","none")})}else Qe.fromTo("transform",`translateX(${te})`,`translateX(${we})`).fromTo(Y,1,.8);if(xe){const ke=O(xe).querySelector(".transition-effect");if(ke){const Ge=ke.querySelector(".transition-cover"),ut=ke.querySelector(".transition-shadow"),pt=(0,n.c)(),$t=(0,n.c)(),bt=(0,n.c)();pt.addElement(ke).beforeStyles({opacity:"1",display:"block"}).afterStyles({opacity:"",display:""}),$t.addElement(Ge).beforeClearStyles([Y]).fromTo(Y,.1,0),bt.addElement(ut).beforeClearStyles([Y]).fromTo(Y,.7,.03),pt.addAnimation([$t,bt]),Qe.addAnimation([pt])}}st.forEach(ke=>{const Ge=(0,n.c)();Ge.addElement(ke);const ut=(0,n.c)();ut.addElement(ke.querySelector("ion-title"));const pt=(0,n.c)(),$t=ke.querySelectorAll("ion-buttons,[menuToggle]"),bt=ke.closest("ion-header"),St=bt?.classList.contains("header-collapse-condense-inactive"),Yt=Array.from($t).filter(cr=>{const Dn=cr.classList.contains("buttons-collapse");return Dn&&!St||!Dn});pt.addElement(Yt);const kt=(0,n.c)(),Et=ke.querySelectorAll(":scope > *:not(ion-title):not(ion-buttons):not([menuToggle])");Et.length>0&&kt.addElement(Et);const It=(0,n.c)();It.addElement(O(ke).querySelector(".toolbar-background"));const gn=(0,n.c)(),Sn=ke.querySelector("ion-back-button");if(Sn&&gn.addElement(Sn),Ge.addAnimation([ut,pt,kt,gn,It]),Ee.addAnimation(Ge),gn.fromTo(Y,.99,0),pt.fromTo(Y,.99,0),kt.fromTo(Y,.99,0),Se){if(St||ut.fromTo("transform",`translateX(${te})`,ve?"translateX(-100%)":"translateX(100%)").fromTo(Y,.99,0),kt.fromTo("transform",`translateX(${te})`,ve?"translateX(-100%)":"translateX(100%)"),It.beforeClearStyles([Y,"transform"]),bt?.translucent?It.fromTo("transform","translateX(0px)",ve?"translateX(-100%)":"translateX(100%)"):It.fromTo(Y,"var(--opacity)",0),Sn&&!ue){const Dn=(0,n.c)();Dn.addElement(O(Sn).querySelector(".button-text")).fromTo("transform",`translateX(${te})`,`translateX(${(ve?-124:124)+"px"})`),Ge.addAnimation(Dn)}}else St||ut.fromTo("transform",`translateX(${te})`,`translateX(${we})`).fromTo(Y,.99,0).afterClearStyles([G,Y]),kt.fromTo("transform",`translateX(${te})`,`translateX(${we})`).afterClearStyles([G,Y]),gn.afterClearStyles([Y]),ut.afterClearStyles([Y]),pt.afterClearStyles([Y])})}return Ee}catch(X){throw X}}},4802:(o,c,u)=>{"use strict";u.r(c),u.d(c,{mdTransitionAnimation:()=>A});var n=u(9442),g=u(471);u(7936);const A=(R,O)=>{const N="40px",ie="back"===O.direction,ee=O.leavingEl,K=(0,g.g)(O.enteringEl),z=K.querySelector("ion-toolbar"),ce=(0,n.c)();if(ce.addElement(K).fill("both").beforeRemoveClass("ion-page-invisible"),ie?ce.duration(O.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)"):ce.duration(O.duration||280).easing("cubic-bezier(0.36,0.66,0.04,1)").fromTo("transform",`translateY(${N})`,"translateY(0px)").fromTo("opacity",.01,1),z){const X=(0,n.c)();X.addElement(z),ce.addAnimation(X)}if(ee&&ie){ce.duration(O.duration||200).easing("cubic-bezier(0.47,0,0.745,0.715)");const X=(0,n.c)();X.addElement((0,g.g)(ee)).onFinish(Y=>{1===Y&&X.elements.length>0&&X.elements[0].style.setProperty("display","none")}).fromTo("transform","translateY(0px)",`translateY(${N})`).fromTo("opacity",1,0),ce.addAnimation(X)}return ce}},4239:(o,c,u)=>{"use strict";u.d(c,{B:()=>Le,a:()=>U,b:()=>ie,c:()=>z,d:()=>et,e:()=>X,f:()=>Ee,g:()=>$,h:()=>O,i:()=>Qe,j:()=>te,k:()=>Se,l:()=>L,m:()=>ee,s:()=>st,t:()=>ce});var n=u(5861),g=u(1671),d=u(7593),A=u(3756);let R=0;const O=new WeakMap,N=ke=>({create:Ge=>Y(ke,Ge),dismiss:(Ge,ut,pt)=>Ve(document,Ge,ut,ke,pt),getTop:()=>(0,n.Z)(function*(){return Se(document,ke)})()}),U=N("ion-alert"),ie=N("ion-action-sheet"),L=N("ion-loading"),ee=N("ion-modal"),z=N("ion-popover"),ce=N("ion-toast"),X=ke=>{typeof document<"u"&&we(document);const Ge=R++;ke.overlayIndex=Ge,ke.hasAttribute("id")||(ke.id=`ion-overlay-${Ge}`)},Y=(ke,Ge)=>typeof window<"u"&&typeof window.customElements<"u"?window.customElements.whenDefined(ke).then(()=>{const ut=document.createElement(ke);return ut.classList.add("overlay-hidden"),Object.assign(ut,Object.assign(Object.assign({},Ge),{hasController:!0})),ae(document).appendChild(ut),new Promise(pt=>(0,A.c)(ut,pt))}):Promise.resolve(),G='[tabindex]:not([tabindex^="-"]), input:not([type=hidden]):not([tabindex^="-"]), textarea:not([tabindex^="-"]), button:not([tabindex^="-"]), select:not([tabindex^="-"]), .ion-focusable:not([tabindex^="-"])',te=(ke,Ge)=>{let ut=ke.querySelector(G);const pt=ut?.shadowRoot;pt&&(ut=pt.querySelector(G)||ut),ut?(0,A.f)(ut):Ge.focus()},ve=(ke,Ge)=>{const ut=Array.from(ke.querySelectorAll(G));let pt=ut.length>0?ut[ut.length-1]:null;const $t=pt?.shadowRoot;$t&&(pt=$t.querySelector(G)||pt),pt?pt.focus():Ge.focus()},we=ke=>{0===R&&(R=1,ke.addEventListener("focus",Ge=>{((ke,Ge)=>{const ut=Se(Ge,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover"),pt=ke.target;ut&&pt&&!ut.classList.contains("ion-disable-focus-trap")&&(ut.shadowRoot?(()=>{if(ut.contains(pt))ut.lastFocus=pt;else{const St=ut.lastFocus;te(ut,ut),St===Ge.activeElement&&ve(ut,ut),ut.lastFocus=Ge.activeElement}})():(()=>{if(ut===pt)ut.lastFocus=void 0;else{const St=(0,A.g)(ut);if(!St.contains(pt))return;const Yt=St.querySelector(".ion-overlay-wrapper");if(!Yt)return;if(Yt.contains(pt))ut.lastFocus=pt;else{const kt=ut.lastFocus;te(Yt,ut),kt===Ge.activeElement&&ve(Yt,ut),ut.lastFocus=Ge.activeElement}}})())})(Ge,ke)},!0),ke.addEventListener("ionBackButton",Ge=>{const ut=Se(ke);ut?.backdropDismiss&&Ge.detail.register(d.OVERLAY_BACK_BUTTON_PRIORITY,()=>ut.dismiss(void 0,Le))}),ke.addEventListener("keyup",Ge=>{if("Escape"===Ge.key){const ut=Se(ke);ut?.backdropDismiss&&ut.dismiss(void 0,Le)}}))},Ve=(ke,Ge,ut,pt,$t)=>{const bt=Se(ke,pt,$t);return bt?bt.dismiss(Ge,ut):Promise.reject("overlay does not exist")},Se=(ke,Ge,ut)=>{const pt=((ke,Ge)=>(void 0===Ge&&(Ge="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast"),Array.from(ke.querySelectorAll(Ge)).filter(ut=>ut.overlayIndex>0)))(ke,Ge).filter($t=>!(ke=>ke.classList.contains("overlay-hidden"))($t));return void 0===ut?pt[pt.length-1]:pt.find($t=>$t.id===ut)},Me=(ke=!1)=>{const ut=ae(document).querySelector("ion-router-outlet, ion-nav, #ion-view-container-root");ut&&(ke?ut.setAttribute("aria-hidden","true"):ut.removeAttribute("aria-hidden"))},et=function(){var ke=(0,n.Z)(function*(Ge,ut,pt,$t,bt){var St,Yt;if(Ge.presented)return;Me(!0),Ge.presented=!0,Ge.willPresent.emit(),null===(St=Ge.willPresentShorthand)||void 0===St||St.emit();const kt=(0,g.b)(Ge),Et=Ge.enterAnimation?Ge.enterAnimation:g.c.get(ut,"ios"===kt?pt:$t);(yield me(Ge,Et,Ge.el,bt))&&(Ge.didPresent.emit(),null===(Yt=Ge.didPresentShorthand)||void 0===Yt||Yt.emit()),"ION-TOAST"!==Ge.el.tagName&&Fe(Ge.el),Ge.keyboardClose&&(null===document.activeElement||!Ge.el.contains(document.activeElement))&&Ge.el.focus()});return function(ut,pt,$t,bt,St){return ke.apply(this,arguments)}}(),Fe=function(){var ke=(0,n.Z)(function*(Ge){let ut=document.activeElement;if(!ut)return;const pt=ut?.shadowRoot;pt&&(ut=pt.querySelector(G)||ut),yield Ge.onDidDismiss(),ut.focus()});return function(ut){return ke.apply(this,arguments)}}(),Ee=function(){var ke=(0,n.Z)(function*(Ge,ut,pt,$t,bt,St,Yt){var kt,Et;if(!Ge.presented)return!1;Me(!1),Ge.presented=!1;try{Ge.el.style.setProperty("pointer-events","none"),Ge.willDismiss.emit({data:ut,role:pt}),null===(kt=Ge.willDismissShorthand)||void 0===kt||kt.emit({data:ut,role:pt});const It=(0,g.b)(Ge),gn=Ge.leaveAnimation?Ge.leaveAnimation:g.c.get($t,"ios"===It?bt:St);"gesture"!==pt&&(yield me(Ge,gn,Ge.el,Yt)),Ge.didDismiss.emit({data:ut,role:pt}),null===(Et=Ge.didDismissShorthand)||void 0===Et||Et.emit({data:ut,role:pt}),O.delete(Ge),Ge.el.classList.add("overlay-hidden"),Ge.el.style.removeProperty("pointer-events")}catch(It){console.error(It)}return Ge.el.remove(),!0});return function(ut,pt,$t,bt,St,Yt,kt){return ke.apply(this,arguments)}}(),ae=ke=>ke.querySelector("ion-app")||ke.body,me=function(){var ke=(0,n.Z)(function*(Ge,ut,pt,$t){pt.classList.remove("overlay-hidden");const St=ut(Ge.el,$t);(!Ge.animated||!g.c.getBoolean("animated",!0))&&St.duration(0),Ge.keyboardClose&&St.beforeAddWrite(()=>{const kt=pt.ownerDocument.activeElement;kt?.matches("input,ion-input, ion-textarea")&&kt.blur()});const Yt=O.get(Ge)||[];return O.set(Ge,[...Yt,St]),yield St.play(),!0});return function(ut,pt,$t,bt){return ke.apply(this,arguments)}}(),$=(ke,Ge)=>{let ut;const pt=new Promise($t=>ut=$t);return ue(ke,Ge,$t=>{ut($t.detail)}),pt},ue=(ke,Ge,ut)=>{const pt=$t=>{(0,A.b)(ke,Ge,pt),ut($t)};(0,A.a)(ke,Ge,pt)},Qe=ke=>"cancel"===ke||ke===Le,xe=ke=>ke(),st=(ke,Ge)=>{if("function"==typeof ke)return g.c.get("_zoneGate",xe)(()=>{try{return ke(Ge)}catch(pt){throw pt}})},Le="backdrop"},9572:(o,c,u)=>{"use strict";u.d(c,{$s:()=>sn,BH:()=>Ve,DV:()=>Dn,GJ:()=>Sn,L:()=>ie,LL:()=>pt,P0:()=>ve,Pz:()=>we,Sg:()=>We,UI:()=>Mn,US:()=>O,Wl:()=>Yt,Yr:()=>Qe,ZR:()=>ut,aH:()=>Ie,b$:()=>ae,cI:()=>St,dS:()=>Pt,eu:()=>Le,g5:()=>d,gK:()=>$e,gQ:()=>Tr,h$:()=>U,hl:()=>st,hu:()=>g,m9:()=>vr,ne:()=>bn,p$:()=>ee,pd:()=>sr,q4:()=>pe,r3:()=>cr,ru:()=>Ee,tV:()=>L,uI:()=>Me,ug:()=>Pn,vZ:()=>Fn,w1:()=>$,w9:()=>gn,xO:()=>Zn,xb:()=>jn,z$:()=>Se,zI:()=>ke,zd:()=>Vn});const n={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},g=function(rt,Te){if(!rt)throw d(Te)},d=function(rt){return new Error("Firebase Database ("+n.SDK_VERSION+") INTERNAL ASSERT FAILED: "+rt)},A=function(rt){const Te=[];let Ye=0;for(let ft=0;ft>6|192,Te[Ye++]=63&dt|128):55296==(64512&dt)&&ft+1>18|240,Te[Ye++]=dt>>12&63|128,Te[Ye++]=dt>>6&63|128,Te[Ye++]=63&dt|128):(Te[Ye++]=dt>>12|224,Te[Ye++]=dt>>6&63|128,Te[Ye++]=63&dt|128)}return Te},O={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:"function"==typeof atob,encodeByteArray(rt,Te){if(!Array.isArray(rt))throw Error("encodeByteArray takes an array as a parameter");this.init_();const Ye=Te?this.byteToCharMapWebSafe_:this.byteToCharMap_,ft=[];for(let dt=0;dt>6,nt=63&Gn;yn||(nt=64,nn||(He=64)),ft.push(Ye[Gt>>2],Ye[(3&Gt)<<4|En>>4],Ye[He],Ye[nt])}return ft.join("")},encodeString(rt,Te){return this.HAS_NATIVE_SUPPORT&&!Te?btoa(rt):this.encodeByteArray(A(rt),Te)},decodeString(rt,Te){return this.HAS_NATIVE_SUPPORT&&!Te?atob(rt):function(rt){const Te=[];let Ye=0,ft=0;for(;Ye191&&dt<224){const Gt=rt[Ye++];Te[ft++]=String.fromCharCode((31&dt)<<6|63&Gt)}else if(dt>239&&dt<365){const yn=((7&dt)<<18|(63&rt[Ye++])<<12|(63&rt[Ye++])<<6|63&rt[Ye++])-65536;Te[ft++]=String.fromCharCode(55296+(yn>>10)),Te[ft++]=String.fromCharCode(56320+(1023&yn))}else{const Gt=rt[Ye++],nn=rt[Ye++];Te[ft++]=String.fromCharCode((15&dt)<<12|(63&Gt)<<6|63&nn)}}return Te.join("")}(this.decodeStringToByteArray(rt,Te))},decodeStringToByteArray(rt,Te){this.init_();const Ye=Te?this.charToByteMapWebSafe_:this.charToByteMap_,ft=[];for(let dt=0;dt>4),64!==Gn&&(ft.push(En<<4&240|Gn>>2),64!==lt&&ft.push(Gn<<6&192|lt))}return ft},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let rt=0;rt=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(rt)]=rt,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(rt)]=rt)}}};class N extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const U=function(rt){const Te=A(rt);return O.encodeByteArray(Te,!0)},ie=function(rt){return U(rt).replace(/\./g,"")},L=function(rt){try{return O.decodeString(rt,!0)}catch(Te){console.error("base64Decode failed: ",Te)}return null};function ee(rt){return K(void 0,rt)}function K(rt,Te){if(!(Te instanceof Object))return Te;switch(Te.constructor){case Date:return new Date(Te.getTime());case Object:void 0===rt&&(rt={});break;case Array:rt=[];break;default:return Te}for(const Ye in Te)!Te.hasOwnProperty(Ye)||!z(Ye)||(rt[Ye]=K(rt[Ye],Te[Ye]));return rt}function z(rt){return"__proto__"!==rt}const te=()=>{try{return function ce(){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.")}().__FIREBASE_DEFAULTS__||(()=>{if(typeof process>"u"||typeof process.env>"u")return;const rt=process.env.__FIREBASE_DEFAULTS__;return rt?JSON.parse(rt):void 0})()||(()=>{if(typeof document>"u")return;let rt;try{rt=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const Te=rt&&L(rt[1]);return Te&&JSON.parse(Te)})()}catch(rt){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${rt}`)}},pe=rt=>{var Te,Ye;return null===(Ye=null===(Te=te())||void 0===Te?void 0:Te.emulatorHosts)||void 0===Ye?void 0:Ye[rt]},ve=rt=>{const Te=pe(rt);if(!Te)return;const Ye=Te.lastIndexOf(":");if(Ye<=0||Ye+1===Te.length)throw new Error(`Invalid host ${Te} with no separate hostname and port!`);const ft=parseInt(Te.substring(Ye+1),10);return"["===Te[0]?[Te.substring(1,Ye-1),ft]:[Te.substring(0,Ye),ft]},Ie=()=>{var rt;return null===(rt=te())||void 0===rt?void 0:rt.config},we=rt=>{var Te;return null===(Te=te())||void 0===Te?void 0:Te[`_${rt}`]};class Ve{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((Te,Ye)=>{this.resolve=Te,this.reject=Ye})}wrapCallback(Te){return(Ye,ft)=>{Ye?this.reject(Ye):this.resolve(ft),"function"==typeof Te&&(this.promise.catch(()=>{}),1===Te.length?Te(Ye):Te(Ye,ft))}}}function We(rt,Te){if(rt.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const ft=Te||"demo-project",dt=rt.iat||0,Gt=rt.sub||rt.user_id;if(!Gt)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const nn=Object.assign({iss:`https://securetoken.google.com/${ft}`,aud:ft,iat:dt,exp:dt+3600,auth_time:dt,sub:Gt,user_id:Gt,firebase:{sign_in_provider:"custom",identities:{}}},rt);return[ie(JSON.stringify({alg:"none",type:"JWT"})),ie(JSON.stringify(nn)),""].join(".")}function Se(){return typeof navigator<"u"&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function Me(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Se())}function Ee(){const rt="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof rt&&void 0!==rt.id}function ae(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function $(){const rt=Se();return rt.indexOf("MSIE ")>=0||rt.indexOf("Trident/")>=0}function Qe(){return!0===n.NODE_CLIENT||!0===n.NODE_ADMIN}function st(){try{return"object"==typeof indexedDB}catch{return!1}}function Le(){return new Promise((rt,Te)=>{try{let Ye=!0;const ft="validate-browser-context-for-indexeddb-analytics-module",dt=self.indexedDB.open(ft);dt.onsuccess=()=>{dt.result.close(),Ye||self.indexedDB.deleteDatabase(ft),rt(!0)},dt.onupgradeneeded=()=>{Ye=!1},dt.onerror=()=>{var Gt;Te((null===(Gt=dt.error)||void 0===Gt?void 0:Gt.message)||"")}}catch(Ye){Te(Ye)}})}function ke(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}class ut extends Error{constructor(Te,Ye,ft){super(Ye),this.code=Te,this.customData=ft,this.name="FirebaseError",Object.setPrototypeOf(this,ut.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,pt.prototype.create)}}class pt{constructor(Te,Ye,ft){this.service=Te,this.serviceName=Ye,this.errors=ft}create(Te,...Ye){const ft=Ye[0]||{},dt=`${this.service}/${Te}`,Gt=this.errors[Te],nn=Gt?function $t(rt,Te){return rt.replace(bt,(Ye,ft)=>{const dt=Te[ft];return null!=dt?String(dt):`<${ft}?>`})}(Gt,ft):"Error";return new ut(dt,`${this.serviceName}: ${nn} (${dt}).`,ft)}}const bt=/\{\$([^}]+)}/g;function St(rt){return JSON.parse(rt)}function Yt(rt){return JSON.stringify(rt)}const kt=function(rt){let Te={},Ye={},ft={},dt="";try{const Gt=rt.split(".");Te=St(L(Gt[0])||""),Ye=St(L(Gt[1])||""),dt=Gt[2],ft=Ye.d||{},delete Ye.d}catch{}return{header:Te,claims:Ye,data:ft,signature:dt}},gn=function(rt){const Ye=kt(rt).claims;return!!Ye&&"object"==typeof Ye&&Ye.hasOwnProperty("iat")},Sn=function(rt){const Te=kt(rt).claims;return"object"==typeof Te&&!0===Te.admin};function cr(rt,Te){return Object.prototype.hasOwnProperty.call(rt,Te)}function Dn(rt,Te){if(Object.prototype.hasOwnProperty.call(rt,Te))return rt[Te]}function jn(rt){for(const Te in rt)if(Object.prototype.hasOwnProperty.call(rt,Te))return!1;return!0}function Mn(rt,Te,Ye){const ft={};for(const dt in rt)Object.prototype.hasOwnProperty.call(rt,dt)&&(ft[dt]=Te.call(Ye,rt[dt],dt,rt));return ft}function Fn(rt,Te){if(rt===Te)return!0;const Ye=Object.keys(rt),ft=Object.keys(Te);for(const dt of Ye){if(!ft.includes(dt))return!1;const Gt=rt[dt],nn=Te[dt];if(un(Gt)&&un(nn)){if(!Fn(Gt,nn))return!1}else if(Gt!==nn)return!1}for(const dt of ft)if(!Ye.includes(dt))return!1;return!0}function un(rt){return null!==rt&&"object"==typeof rt}function Zn(rt){const Te=[];for(const[Ye,ft]of Object.entries(rt))Array.isArray(ft)?ft.forEach(dt=>{Te.push(encodeURIComponent(Ye)+"="+encodeURIComponent(dt))}):Te.push(encodeURIComponent(Ye)+"="+encodeURIComponent(ft));return Te.length?"&"+Te.join("&"):""}function Vn(rt){const Te={};return rt.replace(/^\?/,"").split("&").forEach(ft=>{if(ft){const[dt,Gt]=ft.split("=");Te[decodeURIComponent(dt)]=decodeURIComponent(Gt)}}),Te}function sr(rt){const Te=rt.indexOf("?");if(!Te)return"";const Ye=rt.indexOf("#",Te);return rt.substring(Te,Ye>0?Ye:void 0)}class Tr{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(let Te=1;Te>>31)}let Gn,gt,dt=this.chain_[0],Gt=this.chain_[1],nn=this.chain_[2],En=this.chain_[3],yn=this.chain_[4];for(let lt=0;lt<80;lt++){lt<40?lt<20?(Gn=En^Gt&(nn^En),gt=1518500249):(Gn=Gt^nn^En,gt=1859775393):lt<60?(Gn=Gt&nn|En&(Gt|nn),gt=2400959708):(Gn=Gt^nn^En,gt=3395469782);const He=(dt<<5|dt>>>27)+Gn+yn+gt+ft[lt]&4294967295;yn=En,En=nn,nn=4294967295&(Gt<<30|Gt>>>2),Gt=dt,dt=He}this.chain_[0]=this.chain_[0]+dt&4294967295,this.chain_[1]=this.chain_[1]+Gt&4294967295,this.chain_[2]=this.chain_[2]+nn&4294967295,this.chain_[3]=this.chain_[3]+En&4294967295,this.chain_[4]=this.chain_[4]+yn&4294967295}update(Te,Ye){if(null==Te)return;void 0===Ye&&(Ye=Te.length);const ft=Ye-this.blockSize;let dt=0;const Gt=this.buf_;let nn=this.inbuf_;for(;dt=56;dt--)this.buf_[dt]=255&Ye,Ye/=256;this.compress_(this.buf_);let ft=0;for(let dt=0;dt<5;dt++)for(let Gt=24;Gt>=0;Gt-=8)Te[ft]=this.chain_[dt]>>Gt&255,++ft;return Te}}function bn(rt,Te){const Ye=new pn(rt,Te);return Ye.subscribe.bind(Ye)}class pn{constructor(Te,Ye){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=Ye,this.task.then(()=>{Te(this)}).catch(ft=>{this.error(ft)})}next(Te){this.forEachObserver(Ye=>{Ye.next(Te)})}error(Te){this.forEachObserver(Ye=>{Ye.error(Te)}),this.close(Te)}complete(){this.forEachObserver(Te=>{Te.complete()}),this.close()}subscribe(Te,Ye,ft){let dt;if(void 0===Te&&void 0===Ye&&void 0===ft)throw new Error("Missing Observer.");dt=function Ut(rt,Te){if("object"!=typeof rt||null===rt)return!1;for(const Ye of Te)if(Ye in rt&&"function"==typeof rt[Ye])return!0;return!1}(Te,["next","error","complete"])?Te:{next:Te,error:Ye,complete:ft},void 0===dt.next&&(dt.next=xt),void 0===dt.error&&(dt.error=xt),void 0===dt.complete&&(dt.complete=xt);const Gt=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?dt.error(this.finalError):dt.complete()}catch{}}),this.observers.push(dt),Gt}unsubscribeOne(Te){void 0===this.observers||void 0===this.observers[Te]||(delete this.observers[Te],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(Te){if(!this.finalized)for(let Ye=0;Ye{if(void 0!==this.observers&&void 0!==this.observers[Te])try{Ye(this.observers[Te])}catch(ft){typeof console<"u"&&console.error&&console.error(ft)}})}close(Te){this.finalized||(this.finalized=!0,void 0!==Te&&(this.finalError=Te),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function xt(){}function $e(rt,Te){return`${rt} failed: ${Te} argument `}const Pt=function(rt){const Te=[];let Ye=0;for(let ft=0;ft=55296&&dt<=56319){const Gt=dt-55296;ft++,g(ft>6|192,Te[Ye++]=63&dt|128):dt<65536?(Te[Ye++]=dt>>12|224,Te[Ye++]=dt>>6&63|128,Te[Ye++]=63&dt|128):(Te[Ye++]=dt>>18|240,Te[Ye++]=dt>>12&63|128,Te[Ye++]=dt>>6&63|128,Te[Ye++]=63&dt|128)}return Te},Pn=function(rt){let Te=0;for(let Ye=0;Ye=55296&&ft<=56319?(Te+=4,Ye++):Te+=3}return Te},Ur=1e3,Ht=2,At=144e5,Xt=.5;function sn(rt,Te=Ur,Ye=Ht){const ft=Te*Math.pow(Ye,rt),dt=Math.round(Xt*ft*(Math.random()-.5)*2);return Math.min(At,ft+dt)}function vr(rt){return rt&&rt._delegate?rt._delegate:rt}},4487:function(module,exports,__webpack_require__){var c;typeof navigator<"u"&&(c=function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(c){_useWebWorker=!!c},getWebWorker=function(){return _useWebWorker},setLocationHref=function(c){locationHref=c},getLocationHref=function(){return locationHref};function createTag(o){return document.createElement(o)}function extendPrototype(o,c){var u,g,n=o.length;for(u=0;u1?u[1]=1:u[1]<=0&&(u[1]=0),HSVtoRGB(u[0],u[1],u[2])}function addBrightnessToRGB(o,c){var u=RGBtoHSV(255*o[0],255*o[1],255*o[2]);return u[2]+=c,u[2]>1?u[2]=1:u[2]<0&&(u[2]=0),HSVtoRGB(u[0],u[1],u[2])}function addHueToRGB(o,c){var u=RGBtoHSV(255*o[0],255*o[1],255*o[2]);return u[0]+=c/360,u[0]>1?u[0]-=1:u[0]<0&&(u[0]+=1),HSVtoRGB(u[0],u[1],u[2])}var rgbToHex=function(){var c,u,o=[];for(c=0;c<256;c+=1)u=c.toString(16),o[c]=1===u.length?"0"+u:u;return function(n,g,d){return n<0&&(n=0),g<0&&(g=0),d<0&&(d=0),"#"+o[n]+o[g]+o[d]}}(),setSubframeEnabled=function(c){subframeEnabled=!!c},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(c){expressionsPlugin=c},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(c){expressionsInterfaces=c},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(c){defaultCurveSegments=c},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(c){idPrefix$1=c},getIdPrefix=function(){return idPrefix$1};function createNS(o){return document.createElementNS(svgNS,o)}function _typeof$5(o){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(o)}var dataManager=function(){var u,n,o=1,c=[],g={onmessage:function(){},postMessage:function(ee){u({data:ee})}},d={postMessage:function(ee){g.onmessage({data:ee})}};function R(){n||((n=function A(L){if(window.Worker&&window.Blob&&getWebWorker()){var ee=new Blob(["var _workerSelf = self; self.onmessage = ",L.toString()],{type:"text/javascript"}),K=URL.createObjectURL(ee);return new Worker(K)}return u=L,g}(function(ee){if(d.dataManager||(d.dataManager=function K(){function ce(Ee,ae){var me,$,Qe,xe,st,Le,ue=Ee.length;for($=0;$=0;ae-=1)if("sh"===Ee[ae].ty)if(Ee[ae].ks.k.i)pe(Ee[ae].ks.k);else for(ue=Ee[ae].ks.k.length,$=0;$me[0]||!(me[0]>Ee[0])&&(Ee[1]>me[1]||!(me[1]>Ee[1])&&(Ee[2]>me[2]||!(me[2]>Ee[2])&&null))}var Ee,Ie=function(){var Ee=[4,4,14];function ae($){$.t.d={k:[{s:$.t.d,t:0}]}}function me($){var ue,Qe=$.length;for(ue=0;ue=0;ue-=1)if("sh"===$[ue].ty)if($[ue].ks.k.i)$[ue].ks.k.c=$[ue].closed;else for(st=$[ue].ks.k.length,xe=0;xe500)&&(this._imageLoaded(),clearInterval(G)),Y+=1}.bind(this),50)}function R(X){var Y={assetData:X},G=n(X,this.assetsPath,this.path);return dataManager.loadData(G,function(te){Y.img=te,this._footageLoaded()}.bind(this),function(){Y.img={},this._footageLoaded()}.bind(this)),Y}function ce(){this._imageLoaded=c.bind(this),this._footageLoaded=u.bind(this),this.testImageLoaded=g.bind(this),this.createFootageData=R.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return ce.prototype={loadAssets:function O(X,Y){this.imagesLoadedCb=Y;var G,te=X.length;for(G=0;Gthis.animationData.op&&(this.animationData.op=o.op,this.totalFrames=Math.floor(o.op-this.animationData.ip));var u,d,c=this.animationData.layers,n=c.length,g=o.layers,A=g.length;for(d=0;dthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(o){this.triggerRenderFrameError(o)}},AnimationItem.prototype.play=function(o){o&&this.name!==o||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(o){o&&this.name!==o||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(o){o&&this.name!==o||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(o){o&&this.name!==o||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(o){for(var c,u=0;u=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?c>=this.totalFrames?(this.playCount+=1,this.checkSegments(c%this.totalFrames)||(this.setCurrentRawFrameValue(c%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(c):this.checkSegments(c>this.totalFrames?c%this.totalFrames:0)||(u=!0,c=this.totalFrames-1):c<0?this.checkSegments(c%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(u=!0,c=0):(this.setCurrentRawFrameValue(this.totalFrames+c%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(c),u&&(this.setCurrentRawFrameValue(c),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(o,c){this.playCount=0,o[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=o[0]-o[1],this.timeCompleted=this.totalFrames,this.firstFrame=o[1],this.setCurrentRawFrameValue(this.totalFrames-.001-c)):o[1]>o[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=o[1]-o[0],this.timeCompleted=this.totalFrames,this.firstFrame=o[0],this.setCurrentRawFrameValue(.001+c)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(o,c){var u=-1;this.isPaused&&(this.currentRawFrame+this.firstFramec&&(u=c-o)),this.firstFrame=o,this.totalFrames=c-o,this.timeCompleted=this.totalFrames,-1!==u&&this.goToAndStop(u,!0)},AnimationItem.prototype.playSegments=function(o,c){if(c&&(this.segments.length=0),"object"===_typeof$4(o[0])){var u,n=o.length;for(u=0;u=0;me-=1)c[me].animation.destroy(ae)},o.freeze=function Se(){A=!0},o.unfreeze=function Me(){A=!1,We()},o.setVolume=function et(ae,me){var $;for($=0;$=.001?function ce(Y,G,te,pe){for(var ve=0;ve<4;++ve){var Ie=K(G,te,pe);if(0===Ie)return G;G-=(ee(G,te,pe)-Y)/Ie}return G}(G,Se,te,pe):0===Me?Se:function z(Y,G,te,pe,ve){var Ie,we,Ve=0;do{(Ie=ee(we=G+(te-G)/2,pe,ve)-Y)>0?te=we:G=we}while(Math.abs(Ie)>1e-7&&++Ve<10);return we}(G,Ie,Ie+O,te,pe)}},o}(),pooling={double:function o(c){return c.concat(createSizedArray(c.length))}},poolFactory=function(o,c,u){var n=0,g=o,d=createSizedArray(g);return{newElement:function R(){return n?d[n-=1]:c()},release:function O(N){n===g&&(d=pooling.double(d),g*=2),u&&u(N),d[n]=N,n+=1}}},bezierLengthPool=poolFactory(8,function o(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function o(){return{lengths:[],totalLength:0}},function c(u){var n,g=u.lengths.length;for(n=0;n-.001&&Y<.001}var n=function(L,ee,K,z){var X,Y,G,te,pe,Ie,ce=getDefaultCurveSegments(),ve=0,we=[],Ve=[],We=bezierLengthPool.newElement();for(G=K.length,X=0;XY?-1:1,pe=!0;pe;)if(z[X]<=Y&&z[X+1]>Y?(G=(Y-z[X])/(z[X+1]-z[X]),pe=!1):X+=te,X<0||X>=ce-1){if(X===ce-1)return K[X];pe=!1}return K[X]+(K[X+1]-K[X])*G}var U=createTypedArray("float32",8);return{getSegmentsLength:function g(L){var Y,ee=segmentsLengthPool.newElement(),K=L.c,z=L.v,ce=L.o,X=L.i,G=L._length,te=ee.lengths,pe=0;for(Y=0;Y1&&(ce=1);var pe,G=O(ce,Y),te=O(X=X>1?1:X,Y),ve=L.length,Ie=1-G,we=1-te,Ve=Ie*Ie*Ie,We=G*Ie*Ie*3,Se=G*G*Ie*3,Me=G*G*G,et=Ie*Ie*we,Fe=G*Ie*we+Ie*G*we+Ie*Ie*te,Ee=G*G*we+Ie*G*te+G*Ie*te,ae=G*G*te,me=Ie*we*we,$=G*we*we+Ie*te*we+Ie*we*te,ue=G*te*we+Ie*te*te+G*we*te,Qe=G*te*te,xe=we*we*we,st=te*we*we+we*te*we+we*we*te,Le=te*te*we+we*te*te+te*we*te,ke=te*te*te;for(pe=0;peve?pe>Ie?pe-ve-Ie:Ie-ve-pe:Ie>ve?Ie-ve-pe:ve-pe-Ie)>-1e-4&&we<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(o,c){var n,u=this.offsetTime;"multidimensional"===this.propType&&(n=createTypedArray("float32",this.pv.length));for(var O,N,U,g=c.lastIndex,d=g,A=this.keyframes.length-1,R=!0;R;){if(O=this.keyframes[d],N=this.keyframes[d+1],d===A-1&&o>=N.t-u){O.h&&(O=N),g=0;break}if(N.t-u>o){g=d;break}d=X||o=X?te.points.length-1:0;for(L=te.points[pe].point.length,ie=0;ie=we&&ve=X?(n[0]=G[0],n[1]=G[1],n[2]=G[2]):o<=Y?(n[0]=O.s[0],n[1]=O.s[1],n[2]=O.s[2]):quaternionToEuler(n,slerp(createQuaternion(O.s),createQuaternion(G),(o-Y)/(X-Y)));else for(d=0;d=X?ee=1:o1e-6?(L=Math.acos(ee),K=Math.sin(L),z=Math.sin((1-u)*L)/K,ce=Math.sin(u*L)/K):(z=1-u,ce=u),n[0]=z*g+ce*O,n[1]=z*d+ce*N,n[2]=z*A+ce*U,n[3]=z*R+ce*ie,n}function quaternionToEuler(o,c){var u=c[0],n=c[1],g=c[2],d=c[3],A=Math.atan2(2*n*d-2*u*g,1-2*n*n-2*g*g),R=Math.asin(2*u*n+2*g*d),O=Math.atan2(2*u*d-2*n*g,1-2*u*u-2*g*g);o[0]=A/degToRads,o[1]=R/degToRads,o[2]=O/degToRads}function createQuaternion(o){var c=o[0]*degToRads,u=o[1]*degToRads,n=o[2]*degToRads,g=Math.cos(c/2),d=Math.cos(u/2),A=Math.cos(n/2),R=Math.sin(c/2),O=Math.sin(u/2),N=Math.sin(n/2);return[R*O*A+g*d*N,R*d*A+g*O*N,g*O*A-R*d*N,g*d*A-R*O*N]}function getValueAtCurrentTime(){var o=this.comp.renderedFrame-this.offsetTime,c=this.keyframes[0].t-this.offsetTime,u=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(o===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=u&&o>=u||this._caching.lastFrame=o&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var n=this.interpolateValue(o,this._caching);this.pv=n}return this._caching.lastFrame=o,this.pv}function setVValue(o){var c;if("unidimensional"===this.propType)mathAbs(this.v-(c=o*this.mult))>1e-5&&(this.v=c,this._mdf=!0);else for(var u=0,n=this.v.length;u1e-5&&(this.v[u]=c,this._mdf=!0),u+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length){if(this.lock)return void this.setVValue(this.pv);this.lock=!0,this._mdf=this._isFirstFrame;var o,c=this.effectsSequence.length,u=this.kf?this.pv:this.data.k;for(o=0;o=this._maxLength&&this.doubleArrayLength(),u){case"v":d=this.v;break;case"i":d=this.i;break;case"o":d=this.o;break;default:d=[]}(!d[n]||d[n]&&!g)&&(d[n]=pointPool.newElement()),d[n][0]=o,d[n][1]=c},ShapePath.prototype.setTripleAt=function(o,c,u,n,g,d,A,R){this.setXYAt(o,c,"v",A,R),this.setXYAt(u,n,"o",A,R),this.setXYAt(g,d,"i",A,R)},ShapePath.prototype.reverse=function(){var o=new ShapePath;o.setPathData(this.c,this._length);var c=this.v,u=this.o,n=this.i,g=0;this.c&&(o.setTripleAt(c[0][0],c[0][1],n[0][0],n[0][1],u[0][0],u[0][1],0,!1),g=1);var R,d=this._length-1,A=this._length;for(R=g;R=Fe[Fe.length-1].t-this.offsetTime)pe=Fe[Fe.length-1].s?Fe[Fe.length-1].s[0]:Fe[Fe.length-2].e[0],Ie=!0;else{for(var $,ue,Qe,Ee=te,ae=Fe.length-1,me=!0;me&&($=Fe[Ee],!((ue=Fe[Ee+1]).t-this.offsetTime>X));)Ee=ue.t-this.offsetTime)Me=1;else if(X<$.t-this.offsetTime)Me=0;else{var xe;Qe.__fnct?xe=Qe.__fnct:(xe=BezierFactory.getBezierEasing($.o.x,$.o.y,$.i.x,$.i.y).get,Qe.__fnct=xe),Me=xe((X-($.t-this.offsetTime))/(ue.t-this.offsetTime-($.t-this.offsetTime)))}ve=ue.s?ue.s[0]:$.e[0]}pe=$.s[0]}for(We=Y._length,Se=pe.i[0].length,G.lastIndex=te,we=0;weG&&X>G)||(this._caching.lastIndex=te0||$>-1e-6&&$<0?n(1e4*$)/1e4:$}function me(){var $=this.props;return"matrix("+ae($[0])+","+ae($[1])+","+ae($[4])+","+ae($[5])+","+ae($[12])+","+ae($[13])+")"}return function(){this.reset=g,this.rotate=d,this.rotateX=A,this.rotateY=R,this.rotateZ=O,this.skew=U,this.skewFromAxis=ie,this.shear=N,this.scale=L,this.setTransform=ee,this.translate=K,this.transform=z,this.multiply=ce,this.applyToPoint=pe,this.applyToX=ve,this.applyToY=Ie,this.applyToZ=we,this.applyToPointArray=et,this.applyToTriplePoints=Me,this.applyToPointStringified=Fe,this.toCSS=Ee,this.to2dCSS=me,this.clone=G,this.cloneFromProps=te,this.equals=Y,this.inversePoints=Se,this.inversePoint=We,this.getInverseMatrix=Ve,this._t=this.transform,this.isIdentity=X,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(o){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(o)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(o){setLocationHref(o)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(o){setSubframeEnabled(o)}function setPrefix(o){setIdPrefix(o)}function loadAnimation(o){return!0===standalone&&(o.animationData=JSON.parse(animationData)),animationManager.loadAnimation(o)}function setQuality(o){if("string"==typeof o)switch(o){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(o)&&o>1&&setDefaultCurveSegments(o);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return typeof navigator<"u"}function installPlugin(o,c){"expressions"===o&&setExpressionsPlugin(c)}function getFactory(o){switch(o){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(o){for(var c=queryString.split("&"),u=0;u=1?d.push({s:o-1,e:c-1}):(d.push({s:o,e:1}),d.push({s:0,e:c-1}));var R,N,A=[],O=d.length;for(R=0;Rn+u||A.push([N.s*g<=n?0:(N.s*g-n)/u,N.e*g>=n+u?1:(N.e*g-n)/u]);return A.length||A.push([0,0]),A},TrimModifier.prototype.releasePathsData=function(o){var c,u=o.length;for(c=0;c1?1+n:this.s.v<0?0+n:this.s.v+n)>(u=this.e.v>1?1+n:this.e.v<0?0+n:this.e.v+n)){var g=c;c=u,u=g}c=1e-4*Math.round(1e4*c),u=1e-4*Math.round(1e4*u),this.sValue=c,this.eValue=u}else c=this.sValue,u=this.eValue;var d,A,O,N,U,ie,L,R=this.shapes.length,ee=0;if(u===c)for(A=0;A=0;A-=1)if((z=this.shapes[A]).shape._mdf){for((ce=z.localShapeCollection).releaseShapes(),2===this.m&&R>1?(te=this.calculateShapeEdges(c,u,z.totalShapeLength,G,ee),G+=z.totalShapeLength):te=[[X,Y]],N=te.length,O=0;O=1?K.push({s:z.totalShapeLength*(X-1),e:z.totalShapeLength*(Y-1)}):(K.push({s:z.totalShapeLength*X,e:z.totalShapeLength}),K.push({s:0,e:z.totalShapeLength*(Y-1)}));var pe=this.addShapes(z,K[0]);if(K[0].s!==K[0].e){if(K.length>1)if(z.shape.paths.shapes[z.shape.paths._length-1].c){var Ie=pe.pop();this.addPaths(pe,ce),pe=this.addShapes(z,K[1],Ie)}else this.addPaths(pe,ce),pe=this.addShapes(z,K[1]);this.addPaths(pe,ce)}}z.shape.paths=ce}}},TrimModifier.prototype.addPaths=function(o,c){var u,n=o.length;for(u=0;uc.e){u.c=!1;break}c.s<=N&&c.e>=N+U.addedLength?(this.addSegment(g[d].v[R-1],g[d].o[R-1],g[d].i[R],g[d].v[R],u,ie,ce),ce=!1):(ee=bez.getNewSegment(g[d].v[R-1],g[d].v[R],g[d].o[R-1],g[d].i[R],(c.s-N)/U.addedLength,(c.e-N)/U.addedLength,L[R-1]),this.addSegmentFromArray(ee,u,ie,ce),ce=!1,u.c=!1),N+=U.addedLength,ie+=1}if(g[d].c&&L.length){if(U=L[R-1],N<=c.e){var X=L[R-1].addedLength;c.s<=N&&c.e>=N+X?(this.addSegment(g[d].v[R-1],g[d].o[R-1],g[d].i[0],g[d].v[0],u,ie,ce),ce=!1):(ee=bez.getNewSegment(g[d].v[R-1],g[d].v[0],g[d].o[R-1],g[d].i[0],(c.s-N)/X,(c.e-N)/X,L[R-1]),this.addSegmentFromArray(ee,u,ie,ce),ce=!1,u.c=!1)}else u.c=!1;N+=U.addedLength,ie+=1}if(u._length&&(u.setXYAt(u.v[z][0],u.v[z][1],"i",z),u.setXYAt(u.v[u._length-1][0],u.v[u._length-1][1],"o",u._length-1)),N>c.e)break;d=this.p.keyframes[this.p.keyframes.length-1].t?(U=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/N,0),ie=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/N,0)):(U=this.p.pv,ie=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/N,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){U=[],ie=[];var L=this.px,ee=this.py;L._caching.lastFrame+L.offsetTime<=L.keyframes[0].t?(U[0]=L.getValueAtTime((L.keyframes[0].t+.01)/N,0),U[1]=ee.getValueAtTime((ee.keyframes[0].t+.01)/N,0),ie[0]=L.getValueAtTime(L.keyframes[0].t/N,0),ie[1]=ee.getValueAtTime(ee.keyframes[0].t/N,0)):L._caching.lastFrame+L.offsetTime>=L.keyframes[L.keyframes.length-1].t?(U[0]=L.getValueAtTime(L.keyframes[L.keyframes.length-1].t/N,0),U[1]=ee.getValueAtTime(ee.keyframes[ee.keyframes.length-1].t/N,0),ie[0]=L.getValueAtTime((L.keyframes[L.keyframes.length-1].t-.01)/N,0),ie[1]=ee.getValueAtTime((ee.keyframes[ee.keyframes.length-1].t-.01)/N,0)):(U=[L.pv,ee.pv],ie[0]=L.getValueAtTime((L._caching.lastFrame+L.offsetTime-.01)/N,L.offsetTime),ie[1]=ee.getValueAtTime((ee._caching.lastFrame+ee.offsetTime-.01)/N,ee.offsetTime))}else U=ie=o;this.v.rotate(-Math.atan2(U[1]-ie[1],U[0]-ie[0]))}this.data.p&&this.data.p.s?this.v.translate(this.px.v,this.py.v,this.data.p.z?-this.pz.v:0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function n(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function g(){}},extendPrototype([DynamicPropertyContainer],A),A.prototype.addDynamicProperty=function d(O){this._addDynamicProperty(O),this.elem.addDynamicProperty(O),this._isDirty=!0},A.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function R(O,N,U){return new A(O,N,U)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(o,c){return 1e5*Math.abs(o-c)<=Math.min(Math.abs(o),Math.abs(c))}function floatZero(o){return Math.abs(o)<=1e-5}function lerp(o,c,u){return o*(1-u)+c*u}function lerpPoint(o,c,u){return[lerp(o[0],c[0],u),lerp(o[1],c[1],u)]}function quadRoots(o,c,u){if(0===o)return[];var n=c*c-4*o*u;if(n<0)return[];var g=-c/(2*o);if(0===n)return[g];var d=Math.sqrt(n)/(2*o);return[g-d,g+d]}function polynomialCoefficients(o,c,u,n){return[3*c-o-3*u+n,3*o-6*c+3*u,-3*o+3*c,o]}function singlePoint(o){return new PolynomialBezier(o,o,o,o,!1)}function PolynomialBezier(o,c,u,n,g){g&&pointEqual(o,c)&&(c=lerpPoint(o,n,1/3)),g&&pointEqual(u,n)&&(u=lerpPoint(o,n,2/3));var d=polynomialCoefficients(o[0],c[0],u[0],n[0]),A=polynomialCoefficients(o[1],c[1],u[1],n[1]);this.a=[d[0],A[0]],this.b=[d[1],A[1]],this.c=[d[2],A[2]],this.d=[d[3],A[3]],this.points=[o,c,u,n]}function extrema(o,c){var u=o.points[0][c],n=o.points[o.points.length-1][c];if(u>n){var g=n;n=u,u=g}for(var d=quadRoots(3*o.a[c],2*o.b[c],o.c[c]),A=0;A0&&d[A]<1){var R=o.point(d[A])[c];Rn&&(n=R)}return{min:u,max:n}}function intersectData(o,c,u){var n=o.boundingBox();return{cx:n.cx,cy:n.cy,width:n.width,height:n.height,bez:o,t:(c+u)/2,t1:c,t2:u}}function splitData(o){var c=o.bez.split(.5);return[intersectData(c[0],o.t1,o.t),intersectData(c[1],o.t,o.t2)]}function boxIntersect(o,c){return 2*Math.abs(o.cx-c.cx)=d||o.width<=n&&o.height<=n&&c.width<=n&&c.height<=n)return void g.push([o.t,c.t]);var A=splitData(o),R=splitData(c);intersectsImpl(A[0],R[0],u+1,n,g,d),intersectsImpl(A[0],R[1],u+1,n,g,d),intersectsImpl(A[1],R[0],u+1,n,g,d),intersectsImpl(A[1],R[1],u+1,n,g,d)}}function crossProduct(o,c){return[o[1]*c[2]-o[2]*c[1],o[2]*c[0]-o[0]*c[2],o[0]*c[1]-o[1]*c[0]]}function lineIntersection(o,c,u,n){var A=[u[0],u[1],1],R=[n[0],n[1],1],O=crossProduct(crossProduct([o[0],o[1],1],[c[0],c[1],1]),crossProduct(A,R));return floatZero(O[2])?null:[O[0]/O[2],O[1]/O[2]]}function polarOffset(o,c,u){return[o[0]+Math.cos(c)*u,o[1]-Math.sin(c)*u]}function pointDistance(o,c){return Math.hypot(o[0]-c[0],o[1]-c[1])}function pointEqual(o,c){return floatEqual(o[0],c[0])&&floatEqual(o[1],c[1])}function ZigZagModifier(){}function setPoint(o,c,u,n,g,d,A){var R=u-Math.PI/2,O=u+Math.PI/2,N=c[0]+Math.cos(u)*n*g,U=c[1]-Math.sin(u)*n*g;o.setTripleAt(N,U,N+Math.cos(R)*d,U-Math.sin(R)*d,N+Math.cos(O)*A,U-Math.sin(O)*A,o.length())}function getPerpendicularVector(o,c){var u=[c[0]-o[0],c[1]-o[1]],n=.5*-Math.PI;return[Math.cos(n)*u[0]-Math.sin(n)*u[1],Math.sin(n)*u[0]+Math.cos(n)*u[1]]}function getProjectingAngle(o,c){var u=0===c?o.length()-1:c-1,n=(c+1)%o.length(),A=getPerpendicularVector(o.v[u],o.v[n]);return Math.atan2(0,1)-Math.atan2(A[1],A[0])}function zigZagCorner(o,c,u,n,g,d,A){var R=getProjectingAngle(c,u),O=c.v[u%c._length],N=c.v[0===u?c._length-1:u-1],U=c.v[(u+1)%c._length],ie=2===d?Math.sqrt(Math.pow(O[0]-N[0],2)+Math.pow(O[1]-N[1],2)):0,L=2===d?Math.sqrt(Math.pow(O[0]-U[0],2)+Math.pow(O[1]-U[1],2)):0;setPoint(o,c.v[u%c._length],R,A,n,L/(2*(g+1)),ie/(2*(g+1)),d)}function zigZagSegment(o,c,u,n,g,d){for(var A=0;A1&&c.length>1&&(g=getIntersection(o[0],c[c.length-1]))?[[o[0].split(g[0])[0]],[c[c.length-1].split(g[1])[1]]]:[u,n]}function pruneIntersections(o){for(var c,u=1;u1&&(c=pruneSegmentIntersection(o[o.length-1],o[0]),o[o.length-1]=c[0],o[0]=c[1]),o}function offsetSegmentSplit(o,c){var n,g,d,A,u=o.inflectionPoints();return 0===u.length?[offsetSegment(o,c)]:1===u.length||floatEqual(u[1],1)?(g=(d=o.split(u[0]))[1],[offsetSegment(n=d[0],c),offsetSegment(g,c)]):(n=(d=o.split(u[0]))[0],A=(d=d[1].split((u[1]-u[0])/(1-u[0])))[0],g=d[1],[offsetSegment(n,c),offsetSegment(A,c),offsetSegment(g,c)])}function OffsetPathModifier(){}function getFontProperties(o){for(var d,c=o.fStyle?o.fStyle.split(" "):[],u="normal",n="normal",g=c.length,A=0;A0;)this._elements.unshift(c[u-=1]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(o){var c,u=o.length;for(c=0;c0?Math.floor(L):Math.ceil(L),z=this.pMatrix.props,ce=this.rMatrix.props,X=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var G,te,Y=0;if(L>0){for(;YK;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),Y-=1;ee&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-ee,!0),Y-=ee)}for(n=1===this.data.m?0:this._currentCopies-1,g=1===this.data.m?1:-1,d=this._currentCopies;d;){if(te=(u=(c=this.elemsData[n].it)[c.length-1].transform.mProps.v.props).length,c[c.length-1].transform.mProps._mdf=!0,c[c.length-1].transform.op._mdf=!0,c[c.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+n/(this._currentCopies-1)*(this.eo.v-this.so.v),0!==Y){for((0!==n&&1===g||n!==this._currentCopies-1&&-1===g)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(ce[0],ce[1],ce[2],ce[3],ce[4],ce[5],ce[6],ce[7],ce[8],ce[9],ce[10],ce[11],ce[12],ce[13],ce[14],ce[15]),this.matrix.transform(X[0],X[1],X[2],X[3],X[4],X[5],X[6],X[7],X[8],X[9],X[10],X[11],X[12],X[13],X[14],X[15]),this.matrix.transform(z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7],z[8],z[9],z[10],z[11],z[12],z[13],z[14],z[15]),G=0;G0&&n<1?[c]:[]:[c-n,c+n].filter(function(g){return g>0&&g<1})},PolynomialBezier.prototype.split=function(o){if(o<=0)return[singlePoint(this.points[0]),this];if(o>=1)return[this,singlePoint(this.points[this.points.length-1])];var c=lerpPoint(this.points[0],this.points[1],o),u=lerpPoint(this.points[1],this.points[2],o),n=lerpPoint(this.points[2],this.points[3],o),g=lerpPoint(c,u,o),d=lerpPoint(u,n,o),A=lerpPoint(g,d,o);return[new PolynomialBezier(this.points[0],c,g,A,!0),new PolynomialBezier(A,d,n,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var o=this.bounds();return{left:o.x.min,right:o.x.max,top:o.y.min,bottom:o.y.max,width:o.x.max-o.x.min,height:o.y.max-o.y.min,cx:(o.x.max+o.x.min)/2,cy:(o.y.max+o.y.min)/2}},PolynomialBezier.prototype.intersections=function(o,c,u){void 0===c&&(c=2),void 0===u&&(u=7);var n=[];return intersectsImpl(intersectData(this,0,1),intersectData(o,0,1),0,c,n,u),n},PolynomialBezier.shapeSegment=function(o,c){var u=(c+1)%o.length();return new PolynomialBezier(o.v[c],o.o[c],o.i[u],o.v[u],!0)},PolynomialBezier.shapeSegmentInverted=function(o,c){var u=(c+1)%o.length();return new PolynomialBezier(o.v[u],o.i[u],o.o[c],o.v[c],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(o,c){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(o,c.s,0,null,this),this.frequency=PropertyFactory.getProp(o,c.r,0,null,this),this.pointsType=PropertyFactory.getProp(o,c.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(o,c,u,n){var g=o._length,d=shapePool.newElement();if(d.c=o.c,o.c||(g-=1),0===g)return d;var A=-1,R=PolynomialBezier.shapeSegment(o,0);zigZagCorner(d,o,0,c,u,n,A);for(var O=0;O=0;A-=1)O=PolynomialBezier.shapeSegmentInverted(o,A),N.push(offsetSegmentSplit(O,c));N=pruneIntersections(N);var U=null,ie=null;for(A=0;A=55296&&$<=56319){var ue=ae.charCodeAt(1);ue>=56320&&ue<=57343&&(me=1024*($-55296)+ue-56320+65536)}return me}function Ve(ae){var me=pe(ae);return me>=N&&me<=U}var Fe=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return Fe.isModifier=function ve(ae,me){var $=ae.toString(16)+me.toString(16);return-1!==ie.indexOf($)},Fe.isZeroWidthJoiner=function Ie(ae){return 8205===ae},Fe.isFlagEmoji=function We(ae){return Ve(ae.substr(0,2))&&Ve(ae.substr(2,2))},Fe.isRegionalCode=Ve,Fe.isCombinedCharacter=function Se(ae){return-1!==u.indexOf(ae)},Fe.isRegionalFlag=function Me(ae,me){var $=pe(ae.substr(me,2));if($!==n)return!1;var ue=0;for(me+=2;ue<5;){if(($=pe(ae.substr(me,2)))<917601||$>917626)return!1;ue+=1,me+=2}return 917631===pe(ae.substr(me,2))},Fe.isVariationSelector=function we(ae){return 65039===ae},Fe.BLACK_FLAG_CODE_POINT=n,Fe.prototype={addChars:function X(ae){if(ae){this.chars||(this.chars=[]);var me,ue,xe,$=ae.length,Qe=this.chars.length;for(me=0;me<$;me+=1){for(ue=0,xe=!1;ue0&&(st=!1),st){var Ge=createTag("style");Ge.setAttribute("f-forigin",$[ue].fOrigin),Ge.setAttribute("f-origin",$[ue].origin),Ge.setAttribute("f-family",$[ue].fFamily),Ge.type="text/css",Ge.innerText="@font-face {font-family: "+$[ue].fFamily+"; font-style: normal; src: url('"+$[ue].fPath+"');}",me.appendChild(Ge)}}else if("g"===$[ue].fOrigin||1===$[ue].origin){for(Le=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),ke=0;kec?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var c,u=this.renderableComponents.length;for(c=0;c.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(o){this.audio.rate(o)},AudioElement.prototype.volume=function(o){this._volumeMultiplier=o,this._previousVolume=o*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(o){var c,n,u=this.layers.length;for(this.completeLayers=!0,c=u-1;c>=0;c-=1)this.elements[c]||(n=this.layers[c]).ip-n.st<=o-this.layers[c].st&&n.op-n.st>o-this.layers[c].st&&this.buildItem(c),this.completeLayers=!!this.elements[c]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(o){switch(o.ty){case 2:return this.createImage(o);case 0:return this.createComp(o);case 1:return this.createSolid(o);case 3:default:return this.createNull(o);case 4:return this.createShape(o);case 5:return this.createText(o);case 6:return this.createAudio(o);case 13:return this.createCamera(o);case 15:return this.createFootage(o)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(o){return new AudioElement(o,this.globalData,this)},BaseRenderer.prototype.createFootage=function(o){return new FootageElement(o,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var o,c=this.layers.length;for(o=0;o0&&(this.maskElement.setAttribute("id",L),this.element.maskedElement.setAttribute(Y,"url("+getLocationHref()+"#"+L+")"),n.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var c=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:c,localMat:c,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0)},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var u=this.finalTransform.mat,n=0,g=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;n1&&(n+=" C"+c.o[g-1][0]+","+c.o[g-1][1]+" "+c.i[0][0]+","+c.i[0][1]+" "+c.v[0][0]+","+c.v[0][1]),u.lastPath!==n){var A="";u.elem&&(c.c&&(A=o.inv?this.solidPath+n:n),u.elem.setAttribute("d",A)),u.lastPath=n}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var o={createFilter:function c(n,g){var d=createNS("filter");return d.setAttribute("id",n),!0!==g&&(d.setAttribute("filterUnits","objectBoundingBox"),d.setAttribute("x","0%"),d.setAttribute("y","0%"),d.setAttribute("width","100%"),d.setAttribute("height","100%")),d},createAlphaToLuminanceFilter:function u(){var n=createNS("feColorMatrix");return n.setAttribute("type","matrix"),n.setAttribute("color-interpolation-filters","sRGB"),n.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),n}};return o}(),featureSupport=function(){var o={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(o.maskType=!1),/firefox/i.test(navigator.userAgent)&&(o.svgLumaHidden=!1),o}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(o){var c,R,u="SourceGraphic",n=o.data.ef?o.data.ef.length:0,g=createElementID(),d=filtersFactory.createFilter(g,!0),A=0;for(this.filters=[],c=0;c=0&&!this.shapeModifiers[c].processShapes(this._isFirstFrame);c-=1);}},searchProcessedElement:function(c){for(var u=this.processedElements,n=0,g=u.length;n.01)return!1;u+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var o=0,c=this.data.k.k.length;o0;)X=L.transformers[Ve].mProps._mdf||X,we-=1,Ve-=1;if(X)for(we=pe-L.styles[G].lvl,Ve=L.transformers.length-1;we>0;)Ie.multiply(L.transformers[Ve].mProps.v),we-=1,Ve-=1}else Ie=o;if(z=(ve=L.sh.paths)._length,X){for(ce="",K=0;K=1?et=.99:et<=-1&&(et=-.99);var Fe=Se*et,Ee=Math.cos(Me+L.a.v)*Fe+ce[0],ae=Math.sin(Me+L.a.v)*Fe+ce[1];K.setAttribute("fx",Ee),K.setAttribute("fy",ae),z&&!L.g._collapsable&&(L.of.setAttribute("fx",Ee),L.of.setAttribute("fy",ae))}}function U(ie,L,ee){var K=L.style,z=L.d;z&&(z._mdf||ee)&&z.dashStr&&(K.pElem.setAttribute("stroke-dasharray",z.dashStr),K.pElem.setAttribute("stroke-dashoffset",z.dashoffset[0])),L.c&&(L.c._mdf||ee)&&K.pElem.setAttribute("stroke","rgb("+bmFloor(L.c.v[0])+","+bmFloor(L.c.v[1])+","+bmFloor(L.c.v[2])+")"),(L.o._mdf||ee)&&K.pElem.setAttribute("stroke-opacity",L.o.v),(L.w._mdf||ee)&&(K.pElem.setAttribute("stroke-width",L.w.v),K.msElem&&K.msElem.setAttribute("stroke-width",L.w.v))}return{createRenderFunction:function n(ie){switch(ie.ty){case"fl":return R;case"gf":return N;case"gs":return O;case"st":return U;case"sh":case"el":case"rc":case"sr":return A;case"tr":return g;case"no":return d;default:return null}}}}();function SVGShapeElement(o,c,u){this.shapes=[],this.shapesData=o.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(o,c,u),this.prevViewData=[]}function LetterProps(o,c,u,n,g,d){this.o=o,this.sw=c,this.sc=u,this.fc=n,this.m=g,this.p=d,this._mdf={o:!0,sw:!!c,sc:!!u,fc:!!n,m:!0,p:!0}}function TextProperty(o,c){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,c.d&&c.d.sid&&(c.d=o.globalData.slotManager.getProp(c.d)),this.data=c,this.elem=o,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var o,u,n,d,c=this.shapes.length,g=this.stylesList.length,A=[],R=!1;for(n=0;n1&&R&&this.setShapesAsAnimated(A)}},SVGShapeElement.prototype.setShapesAsAnimated=function(o){var c,u=o.length;for(c=0;c=0;O-=1){if((ce=this.searchProcessedElement(o[O]))?c[O]=u[ce-1]:o[O]._render=A,"fl"===o[O].ty||"st"===o[O].ty||"gf"===o[O].ty||"gs"===o[O].ty||"no"===o[O].ty)ce?c[O].style.closed=!1:c[O]=this.createStyleElement(o[O],g),o[O]._render&&c[O].style.pElem.parentNode!==n&&n.appendChild(c[O].style.pElem),L.push(c[O].style);else if("gr"===o[O].ty){if(ce)for(ie=c[O].it.length,U=0;U1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(o){this.effectsSequence.push(o),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(o){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||o){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var c=this.currentData,u=this.keysIndex;if(this.lock)return void this.setCurrentData(this.currentData);this.lock=!0,this._mdf=!1;var n,g=this.effectsSequence.length,d=o||this.data.d.k[this.keysIndex].s;for(n=0;nc);)u+=1;return this.keysIndex!==u&&(this.keysIndex=u),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(o){for(var g,d,c=[],u=0,n=o.length,A=!1,R=!1,O="";u=55296&&g<=56319?FontManager.isRegionalFlag(o,u)?O=o.substr(u,14):(d=o.charCodeAt(u+1))>=56320&&d<=57343&&(FontManager.isModifier(g,d)?(O=o.substr(u,2),A=!0):O=FontManager.isFlagEmoji(o.substr(u,4))?o.substr(u,4):o.substr(u,2)):g>56319?(d=o.charCodeAt(u+1),FontManager.isVariationSelector(g)&&(A=!0)):FontManager.isZeroWidthJoiner(g)&&(A=!0,R=!0),A?(c[c.length-1]+=O,A=!1):c.push(O),u+=O.length;return c},TextProperty.prototype.completeTextData=function(o){o.__complete=!0;var g,d,A,O,ce,X,G,c=this.elem.globalData.fontManager,u=this.data,n=[],R=0,N=u.m.g,U=0,ie=0,L=0,ee=[],K=0,z=0,Y=c.getFontByName(o.f),te=0,pe=getFontProperties(Y);o.fWeight=pe.weight,o.fStyle=pe.style,o.finalSize=o.s,o.finalText=this.buildFinalText(o.t),d=o.finalText.length,o.finalLineHeight=o.lh;var Ie,ve=o.tr/1e3*o.finalSize;if(o.sz)for(var Se,Me,we=!0,Ve=o.sz[0],We=o.sz[1];we;){Se=0,K=0,d=(Me=this.buildFinalText(o.t)).length,ve=o.tr/1e3*o.finalSize;var et=-1;for(g=0;gVe&&" "!==Me[g]?(-1===et?d+=1:g=et,Se+=o.finalLineHeight||1.2*o.finalSize,Me.splice(g,et===g?1:0,"\r"),et=-1,K=0):(K+=te,K+=ve);Se+=Y.ascent*o.finalSize/100,this.canResize&&o.finalSize>this.minimumFontSize&&Wez?K:z,K=-2*ve,O="",A=!0,L+=1):O=Ee,c.chars?(G=c.getCharData(Ee,Y.fStyle,c.getFontByName(o.f).fFamily),te=A?0:G.w*o.finalSize/100):te=c.measureText(O,o.f,o.finalSize)," "===Ee?Fe+=te+ve:(K+=te+ve+Fe,Fe=0),n.push({l:te,an:te,add:U,n:A,anIndexes:[],val:O,line:L,animatorJustifyOffset:0}),2==N){if(U+=te,""===O||" "===O||g===d-1){for((""===O||" "===O)&&(U-=te);ie<=g;)n[ie].an=U,n[ie].ind=R,n[ie].extra=te,ie+=1;R+=1,U=0}}else if(3==N){if(U+=te,""===O||g===d-1){for(""===O&&(U-=te);ie<=g;)n[ie].an=U,n[ie].ind=R,n[ie].extra=te,ie+=1;U=0,R+=1}}else n[R].ind=R,n[R].extra=0,R+=1;if(o.l=n,z=K>z?K:z,ee.push(K),o.sz)o.boxWidth=o.sz[0],o.justifyOffset=0;else switch(o.boxWidth=z,o.j){case 1:o.justifyOffset=-o.boxWidth;break;case 2:o.justifyOffset=-o.boxWidth/2;break;default:o.justifyOffset=0}o.lineWidths=ee;var me,$,ae=u.a;X=ae.length;var ue,Qe,xe=[];for(ce=0;ce0?R=this.ne.v/100:O=-this.ne.v/100,this.xe.v>0?N=1-this.xe.v/100:U=1+this.xe.v/100;var ie=BezierFactory.getBezierEasing(R,O,N,U).get,L=0,ee=this.finalS,K=this.finalE,z=this.data.sh;if(2===z)L=ie(L=K===ee?A>=K?1:0:o(0,c(.5/(K-ee)+(A-ee)/(K-ee),1)));else if(3===z)L=ie(L=K===ee?A>=K?0:1:1-o(0,c(.5/(K-ee)+(A-ee)/(K-ee),1)));else if(4===z)K===ee?L=0:(L=o(0,c(.5/(K-ee)+(A-ee)/(K-ee),1)))<.5?L*=2:L=1-2*(L-.5),L=ie(L);else if(5===z){if(K===ee)L=0;else{var ce=K-ee,X=-ce/2+(A=c(o(0,A+.5-ee),K-ee)),Y=ce/2;L=Math.sqrt(1-X*X/(Y*Y))}L=ie(L)}else 6===z?(K===ee?L=0:(A=c(o(0,A+.5-ee),K-ee),L=(1+Math.cos(Math.PI+2*Math.PI*A/(K-ee)))/2),L=ie(L)):(A>=u(ee)&&(L=o(0,c(A-ee<0?c(K,1)-(ee-A):K-A,1))),L=ie(L));if(100!==this.sm.v){var G=.01*this.sm.v;0===G&&(G=1e-8);var te=.5-.5*G;L1&&(L=1)}return L*this.a.v},getValue:function(A){this.iterateDynamicProperties(),this._mdf=A||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,A&&2===this.data.r&&(this.e.v=this._currentTextLength);var R=2===this.data.r?1:100/this.data.totalChars,O=this.o.v/R,N=this.s.v/R+O,U=this.e.v/R+O;if(N>U){var ie=N;N=U,U=ie}this.finalS=N,this.finalE=U}},extendPrototype([DynamicPropertyContainer],n),{getTextSelectorProp:function g(d,A,R){return new n(d,A,R)}}}();function TextAnimatorDataProperty(o,c,u){var n={propType:!1},g=PropertyFactory.getProp,d=c.a;this.a={r:d.r?g(o,d.r,0,degToRads,u):n,rx:d.rx?g(o,d.rx,0,degToRads,u):n,ry:d.ry?g(o,d.ry,0,degToRads,u):n,sk:d.sk?g(o,d.sk,0,degToRads,u):n,sa:d.sa?g(o,d.sa,0,degToRads,u):n,s:d.s?g(o,d.s,1,.01,u):n,a:d.a?g(o,d.a,1,0,u):n,o:d.o?g(o,d.o,0,.01,u):n,p:d.p?g(o,d.p,1,0,u):n,sw:d.sw?g(o,d.sw,0,0,u):n,sc:d.sc?g(o,d.sc,1,0,u):n,fc:d.fc?g(o,d.fc,1,0,u):n,fh:d.fh?g(o,d.fh,0,0,u):n,fs:d.fs?g(o,d.fs,0,.01,u):n,fb:d.fb?g(o,d.fb,0,.01,u):n,t:d.t?g(o,d.t,0,0,u):n},this.s=TextSelectorProp.getTextSelectorProp(o,c.s,u),this.s.t=c.s.t}function TextAnimatorProperty(o,c,u){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=o,this._renderType=c,this._elem=u,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(u)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var o,c=this._textData.a.length,n=PropertyFactory.getProp;for(o=0;o=K+sr||!pe?(ke=te.point[0]+(z.point[0]-te.point[0])*(Ve=(K+sr-ce)/z.partialLength),Ge=te.point[1]+(z.point[1]-te.point[1])*Ve,d.translate(-u[0]*L[U].an*.005,-u[1]*Fe*.01),X=!1):pe&&(ce+=z.partialLength,(Y+=1)>=pe.length&&(Y=0,ve[G+=1]?pe=ve[G].points:Se.v.c?(Y=0,pe=ve[G=0].points):(ce-=z.partialLength,pe=null)),pe&&(te=z,Ie=(z=pe[Y]).partialLength));d.translate(-(Le=L[U].an/2-L[U].add),0,0)}else d.translate(-(Le=L[U].an/2-L[U].add),0,0),d.translate(-u[0]*L[U].an*.005,-u[1]*Fe*.01,0);for($=0;$o?this.textSpans[o].span:createNS(R?"g":"text"),G<=o){if(O.setAttribute("stroke-linecap","butt"),O.setAttribute("stroke-linejoin","round"),O.setAttribute("stroke-miterlimit","4"),this.textSpans[o].span=O,R){var pe=createNS("g");O.appendChild(pe),this.textSpans[o].childSpan=pe}this.textSpans[o].span=O,this.layerElement.appendChild(O)}O.style.display="inherit"}if(N.reset(),ie&&(A[o].n&&(L=-z,ee+=u.yOffset,ee+=K?1:0,K=!1),this.applyTextPropertiesToMatrix(u,N,A[o].line,L,ee),L+=A[o].l||0,L+=z),R){var ve;if(1===(te=this.globalData.fontManager.getCharData(u.finalText[o],n.fStyle,this.globalData.fontManager.getFontByName(u.f).fFamily)).t)ve=new SVGCompElement(te.data,this.globalData,this);else{var Ie=emptyShapeData;te.data&&te.data.shapes&&(Ie=this.buildShapeData(te.data,u.finalSize)),ve=new SVGShapeElement(Ie,this.globalData,this)}if(this.textSpans[o].glyph){var we=this.textSpans[o].glyph;this.textSpans[o].childSpan.removeChild(we.layerElement),we.destroy()}this.textSpans[o].glyph=ve,ve._debug=!0,ve.prepareFrame(0),ve.renderFrame(),this.textSpans[o].childSpan.appendChild(ve.layerElement),1===te.t&&this.textSpans[o].childSpan.setAttribute("transform","scale("+u.finalSize/100+","+u.finalSize/100+")")}else ie&&O.setAttribute("transform","translate("+N.props[12]+","+N.props[13]+")"),O.textContent=A[o].val,O.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}ie&&O&&O.setAttribute("d","")}else{var ce=this.textContainer,X="start";switch(u.j){case 1:X="end";break;case 2:X="middle";break;default:X="start"}ce.setAttribute("text-anchor",X),ce.setAttribute("letter-spacing",z);var Y=this.buildTextContents(u.finalText);for(c=Y.length,ee=u.ps?u.ps[1]+u.ascent:0,o=0;o=0;c-=1)(this.completeLayers||this.elements[c])&&this.elements[c].prepareFrame(o-this.layers[c].st);if(this.globalData._mdf)for(c=0;c=0;u-=1)(this.completeLayers||this.elements[u])&&(this.elements[u].prepareFrame(this.renderedFrame-this.layers[u].st),this.elements[u]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var o,c=this.layers.length;for(o=0;o=0;n-=1)c.finalTransform.multiply(c.transforms[n].transform.mProps.v);c._mdf=d},processSequences:function(c){var u,n=this.sequenceList.length;for(u=0;u=1){this.buffers=[];var c=this.globalData.canvasContext,u=assetLoader.createCanvas(c.canvas.width,c.canvas.height);this.buffers.push(u);var n=assetLoader.createCanvas(c.canvas.width,c.canvas.height);this.buffers.push(n),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var c=this.globalData;if(c.blendMode!==this.data.bm){c.blendMode=this.data.bm;var u=getBlendMode(this.data.bm);c.canvasContext.globalCompositeOperation=u}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(c){c.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var u=this.buffers[0].getContext("2d");this.clearCanvas(u),u.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var c=this.buffers[1],u=c.getContext("2d");if(this.clearCanvas(u),u.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var g=assetLoader.getLumaCanvas(this.canvasContext.canvas);g.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(g,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(c,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(c){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||c)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var u=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(u),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(u),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(o,c){var u={data:o,type:o.ty,preTransforms:this.transformsManager.addTransformSequence(c),transforms:[],elements:[],closed:!0===o.hd},n={};if("fl"===o.ty||"st"===o.ty?(n.c=PropertyFactory.getProp(this,o.c,1,255,this),n.c.k||(u.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):("gf"===o.ty||"gs"===o.ty)&&(n.s=PropertyFactory.getProp(this,o.s,1,null,this),n.e=PropertyFactory.getProp(this,o.e,1,null,this),n.h=PropertyFactory.getProp(this,o.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,o.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,o.g,this)),n.o=PropertyFactory.getProp(this,o.o,0,.01,this),"st"===o.ty||"gs"===o.ty){if(u.lc=lineCapEnum[o.lc||2],u.lj=lineJoinEnum[o.lj||2],1==o.lj&&(u.ml=o.ml),n.w=PropertyFactory.getProp(this,o.w,0,null,this),n.w.k||(u.wi=n.w.v),o.d){var g=new DashProperty(this,o.d,"canvas",this);n.d=g,n.d.k||(u.da=n.d.dashArray,u.do=n.d.dashoffset[0])}}else u.r=2===o.r?"evenodd":"nonzero";return this.stylesList.push(u),n.style=u,n},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(o){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,o.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,o,this)}}},CVShapeElement.prototype.createShapeElement=function(o){var c=new CVShapeData(this,o,this.stylesList,this.transformsManager);return this.shapes.push(c),this.addShapeToModifiers(c),c},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var o,c=this.itemsData.length;for(o=0;o=0;d-=1){if((ie=this.searchProcessedElement(o[d]))?c[d]=u[ie-1]:o[d]._shouldRender=n,"fl"===o[d].ty||"st"===o[d].ty||"gf"===o[d].ty||"gs"===o[d].ty)ie?c[d].style.closed=!1:c[d]=this.createStyleElement(o[d],K),N.push(c[d].style);else if("gr"===o[d].ty){if(ie)for(O=c[d].it.length,R=0;R=0;g-=1)"tr"===c[g].ty?this.renderShapeTransform(o,A=u[g].transform):"sh"===c[g].ty||"el"===c[g].ty||"rc"===c[g].ty||"sr"===c[g].ty?this.renderPath(c[g],u[g]):"fl"===c[g].ty?this.renderFill(c[g],u[g],A):"st"===c[g].ty?this.renderStroke(c[g],u[g],A):"gf"===c[g].ty||"gs"===c[g].ty?this.renderGradientFill(c[g],u[g],A):"gr"===c[g].ty&&this.renderShape(A,c[g].it,u[g].it);n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(o,c){if(this._isFirstFrame||c._mdf||o.transforms._mdf){var g,d,A,u=o.trNodes,n=c.paths,R=n._length;u.length=0;var O=o.transforms.finalTransform;for(A=0;A=1?U=.99:U<=-1&&(U=-.99);var ie=O*U,L=Math.cos(N+c.a.v)*ie+A[0],ee=Math.sin(N+c.a.v)*ie+A[1];g=d.createRadialGradient(L,ee,0,A[0],A[1],O)}var K,z=o.g.p,ce=c.g.c,X=1;for(K=0;Kd&&"xMidYMid slice"===O||g(g=u/n)&&"meet"===R||dg&&"slice"===R)?(u-this.transformCanvas.w*(n/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===N&&(dg&&"slice"===R)?(u-this.transformCanvas.w*(n/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===U&&(d>g&&"meet"===R||dg&&"meet"===R||d=0;o-=1)this.elements[o]&&this.elements[o].destroy&&this.elements[o].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(o,c){if((this.renderedFrame!==o||!0!==this.renderConfig.clearCanvas||c)&&!this.destroyed&&-1!==o){this.renderedFrame=o,this.globalData.frameNum=o-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||c,this.globalData.projectInterface.currentFrame=o;var u,n=this.layers.length;for(this.completeLayers||this.checkLayers(o),u=n-1;u>=0;u-=1)(this.completeLayers||this.elements[u])&&this.elements[u].prepareFrame(o-this.layers[u].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),u=n-1;u>=0;u-=1)(this.completeLayers||this.elements[u])&&this.elements[u].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(o){var c=this.elements;if(!c[o]&&99!==this.layers[o].ty){var u=this.createItem(this.layers[o],this,this.globalData);c[o]=u,u.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var o=2*this._length,c=0;for(c=this._length;c=0;c-=1)(this.completeLayers||this.elements[c])&&this.elements[c].renderFrame()},CVCompElement.prototype.destroy=function(){var o;for(o=this.layers.length-1;o>=0;o-=1)this.elements[o]&&this.elements[o].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(o){return new CVCompElement(o,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(o){return new CVCompElement(o,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var c=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var u=this.finalTransform.mat.toCSS();c.transform=u,c.webkitTransform=u}this.finalTransform._opMdf&&(c.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var o;this.data.hasMask?((o=createNS("rect")).setAttribute("width",this.data.sw),o.setAttribute("height",this.data.sh),o.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((o=createTag("div")).style.width=this.data.sw+"px",o.style.height=this.data.sh+"px",o.style.backgroundColor=this.data.sc),this.layerElement.appendChild(o)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var o;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),o=this.svgElement;else{o=createNS("svg");var c=this.comp.data?this.comp.data:this.globalData.compSize;o.setAttribute("width",c.w),o.setAttribute("height",c.h),o.appendChild(this.shapesContainer),this.layerElement.appendChild(o)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=o},HShapeElement.prototype.getTransformedPoint=function(o,c){var u,n=o.length;for(u=0;u0&&O<1&&g[L].push(this.calculateF(O,o,c,u,n,L)):(N=A*A-4*R*d)>=0&&((U=(-A+bmSqrt(N))/(2*d))>0&&U<1&&g[L].push(this.calculateF(U,o,c,u,n,L)),(ie=(-A-bmSqrt(N))/(2*d))>0&&ie<1&&g[L].push(this.calculateF(ie,o,c,u,n,L))));this.shapeBoundingBox.left=bmMin.apply(null,g[0]),this.shapeBoundingBox.top=bmMin.apply(null,g[1]),this.shapeBoundingBox.right=bmMax.apply(null,g[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,g[1])},HShapeElement.prototype.calculateF=function(o,c,u,n,g,d){return bmPow(1-o,3)*c[d]+3*bmPow(1-o,2)*o*u[d]+3*(1-o)*bmPow(o,2)*n[d]+bmPow(o,3)*g[d]},HShapeElement.prototype.calculateBoundingBox=function(o,c){var u,n=o.length;for(u=0;uu&&(u=g)}u*=o.mult}else u=o.v*o.mult;c.x-=u,c.xMax+=u,c.y-=u,c.yMax+=u},HShapeElement.prototype.currentBoxContains=function(o){return this.currentBBox.x<=o.x&&this.currentBBox.y<=o.y&&this.currentBBox.width+this.currentBBox.x>=o.x+o.width&&this.currentBBox.height+this.currentBBox.y>=o.y+o.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var o=this.tempBoundingBox,c=999999;if(o.x=c,o.xMax=-c,o.y=c,o.yMax=-c,this.calculateBoundingBox(this.itemsData,o),o.width=o.xMax=0;c-=1){var n=this.hierarchy[c].finalTransform.mProp;this.mat.translate(-n.p.v[0],-n.p.v[1],n.p.v[2]),this.mat.rotateX(-n.or.v[0]).rotateY(-n.or.v[1]).rotateZ(n.or.v[2]),this.mat.rotateX(-n.rx.v).rotateY(-n.ry.v).rotateZ(n.rz.v),this.mat.scale(1/n.s.v[0],1/n.s.v[1],1/n.s.v[2]),this.mat.translate(n.a.v[0],n.a.v[1],n.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var g;g=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var d=Math.sqrt(Math.pow(g[0],2)+Math.pow(g[1],2)+Math.pow(g[2],2)),A=[g[0]/d,g[1]/d,g[2]/d],R=Math.sqrt(A[2]*A[2]+A[0]*A[0]),O=Math.atan2(A[1],R),N=Math.atan2(A[0],-A[2]);this.mat.rotateY(N).rotateX(-O)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var U=!this._prevMat.equals(this.mat);if((U||this.pe._mdf)&&this.comp.threeDElements){var ie,L,ee;for(u=this.comp.threeDElements.length,c=0;c=o)return this.threeDElements[c].perspectiveElem;c+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(o,c){var n,g,u=createTag("div");styleDiv(u);var d=createTag("div");if(styleDiv(d),"3d"===c){(n=u.style).width=this.globalData.compSize.w+"px",n.height=this.globalData.compSize.h+"px";var A="50% 50%";n.webkitTransformOrigin=A,n.mozTransformOrigin=A,n.transformOrigin=A;var R="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(g=d.style).transform=R,g.webkitTransform=R}u.appendChild(d);var O={container:d,perspectiveElem:u,startPos:o,endPos:o,type:c};return this.threeDElements.push(O),O},HybridRendererBase.prototype.build3dContainers=function(){var o,u,c=this.layers.length,n="";for(o=0;o=0;o-=1)this.resizerElem.appendChild(this.threeDElements[o].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(o,c){for(var u=0,n=this.threeDElements.length;uo/c?(g=o/this.globalData.compSize.w,d=o/this.globalData.compSize.w,A=0,R=(c-this.globalData.compSize.h*(o/this.globalData.compSize.w))/2):(g=c/this.globalData.compSize.h,d=c/this.globalData.compSize.h,A=(o-this.globalData.compSize.w*(c/this.globalData.compSize.h))/2,R=0);var O=this.resizerElem.style;O.webkitTransform="matrix3d("+g+",0,0,0,0,"+d+",0,0,0,0,1,0,"+A+","+R+",0,1)",O.transform=O.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var u,o=this.globalData.compSize.w,c=this.globalData.compSize.h,n=this.threeDElements.length;for(u=0;u=N;)Se/=2,Me/=2,et>>>=1;return(Se+et)/Me};return Ve.int32=function(){return 0|we.g(4)},Ve.quick=function(){return we.g(4)/4294967296},Ve.double=Ve,ce(Y(we.S),o),(te.pass||pe||function(We,Se,Me,et){return et&&(et.S&&K(et,we),We.state=function(){return K(we,{})}),Me?(c[A]=We,Se):We})(Ve,Ie,"global"in te?te.global:this==c,te.state)},ce(c.random(),o)}function initialize$2(o){seedRandom([],o)}var propTypes={SHAPE:"shape"};function _typeof$1(o){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(o)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(o){return o.constructor===Array||o.constructor===Float32Array}function isNumerable(o,c){return"number"===o||c instanceof Number||"boolean"===o||"string"===o}function $bm_neg(o){var c=_typeof$1(o);if("number"===c||o instanceof Number||"boolean"===c)return-o;if($bm_isInstanceOfArray(o)){var u,n=o.length,g=[];for(u=0;uu){var n=u;u=c,c=n}return Math.min(Math.max(o,c),u)}function radiansToDegrees(o){return o/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(o){return o*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(o,c){if("number"==typeof o||o instanceof Number)return Math.abs(o-(c=c||0));c||(c=helperLengthArray);var u,n=Math.min(o.length,c.length),g=0;for(u=0;u.5?N/(2-g-d):N/(g+d),g){case c:A=(u-n)/N+(u1&&(u-=1),u<1/6?o+6*(c-o)*u:u<.5?c:u<2/3?o+(c-o)*(2/3-u)*6:o}function hslToRgb(o){var g,d,A,c=o[0],u=o[1],n=o[2];if(0===u)g=n,A=n,d=n;else{var R=n<.5?n*(1+u):n+u-n*u,O=2*n-R;g=hue2rgb(O,R,c+1/3),d=hue2rgb(O,R,c),A=hue2rgb(O,R,c-1/3)}return[g,d,A,o[3]]}function linear(o,c,u,n,g){if((void 0===n||void 0===g)&&(n=c,g=u,c=0,u=1),u=u)return g;var A=u===c?0:(o-c)/(u-c);if(!n.length)return n+(g-n)*A;var R,O=n.length,N=createTypedArray("float32",O);for(R=0;R1){for(g=0;g1?c=1:c<0&&(c=0);var A=o(c);if($bm_isInstanceOfArray(g)){var R,O=g.length,N=createTypedArray("float32",O);for(R=0;Rdata.k[c].t&&odata.k[c+1].t-o?(n=c+2,g=data.k[c+1].t):(n=c+1,g=data.k[c].t);break}}-1===n&&(n=c+1,g=data.k[c].t)}else n=0,g=0;var d={};return d.index=n,d.time=g/elem.comp.globalData.frameRate,d}function key(o){var c,u,n;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+o);c={time:data.k[o-=1].t/elem.comp.globalData.frameRate,value:[]};var g=Object.prototype.hasOwnProperty.call(data.k[o],"s")?data.k[o].s:data.k[o-1].e;for(n=g.length,u=0;uce.length-1)&&(ee=ce.length-1),Y=X-(G=ce[ce.length-1-ee].t)),"pingpong"===L){if(Math.floor((z-G)/Y)%2!=0)return this.getValueAtTime((Y-(z-G)%Y+G)/this.comp.globalData.frameRate,0)}else{if("offset"===L){var we=this.getValueAtTime(G/this.comp.globalData.frameRate,0),Ve=this.getValueAtTime(X/this.comp.globalData.frameRate,0),We=this.getValueAtTime(((z-G)%Y+G)/this.comp.globalData.frameRate,0),Se=Math.floor((z-G)/Y);if(this.pv.length){for(pe=(ve=new Array(we.length)).length,te=0;te=X)return this.pv;if(K?G=X+(Y=ee?Math.abs(this.elem.comp.globalData.frameRate*ee):Math.max(0,this.elem.data.op-X)):((!ee||ee>ce.length-1)&&(ee=ce.length-1),Y=(G=ce[ee].t)-X),"pingpong"===L){if(Math.floor((X-z)/Y)%2==0)return this.getValueAtTime(((X-z)%Y+X)/this.comp.globalData.frameRate,0)}else{if("offset"===L){var we=this.getValueAtTime(X/this.comp.globalData.frameRate,0),Ve=this.getValueAtTime(G/this.comp.globalData.frameRate,0),We=this.getValueAtTime((Y-(X-z)%Y+X)/this.comp.globalData.frameRate,0),Se=Math.floor((X-z)/Y)+1;if(this.pv.length){for(pe=(ve=new Array(we.length)).length,te=0;te1?(K+L-z)/(ee-1):1,Y=0,G=0;for(te=this.pv.length?createTypedArray("float32",this.pv.length):0;YY){var we=z.c&&G===te-1?0:G+1;ve=bez.getPointInSegment(z.v[G],z.v[we],z.o[G],z.i[we],(Y-pe)/X[G].addedLength,X[G]);break}pe+=X[G].addedLength,G+=1}return ve||(ve=z.c?[z.v[0][0],z.v[0][1]]:[z.v[z._length-1][0],z.v[z._length-1][1]]),ve},vectorOnPath:function(ee,K,z){1==ee?ee=this.v.c:0==ee&&(ee=.999);var ce=this.pointOnPath(ee,K),X=this.pointOnPath(ee+.001,K),Y=X[0]-ce[0],G=X[1]-ce[1],te=Math.sqrt(Math.pow(Y,2)+Math.pow(G,2));return 0===te?[0,0]:"tangent"===z?[Y/te,G/te]:[-G/te,Y/te]},tangentOnPath:function(ee,K){return this.vectorOnPath(ee,K,"tangent")},normalOnPath:function(ee,K){return this.vectorOnPath(ee,K,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([U],O),extendPrototype([U],N),N.prototype.getValueAtTime=function R(L){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),L*=this.elem.globalData.frameRate,(L-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime=N?K<0?n:g:n+ee*Math.pow((R-o)/K,1/u),U[L]=ie,L+=1,d+=256/255;return U.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){var c,u=this.filterManager.effectElements;this.feFuncRComposed&&(o||u[3].p._mdf||u[4].p._mdf||u[5].p._mdf||u[6].p._mdf||u[7].p._mdf)&&(c=this.getTableValue(u[3].p.v,u[4].p.v,u[5].p.v,u[6].p.v,u[7].p.v),this.feFuncRComposed.setAttribute("tableValues",c),this.feFuncGComposed.setAttribute("tableValues",c),this.feFuncBComposed.setAttribute("tableValues",c)),this.feFuncR&&(o||u[10].p._mdf||u[11].p._mdf||u[12].p._mdf||u[13].p._mdf||u[14].p._mdf)&&(c=this.getTableValue(u[10].p.v,u[11].p.v,u[12].p.v,u[13].p.v,u[14].p.v),this.feFuncR.setAttribute("tableValues",c)),this.feFuncG&&(o||u[17].p._mdf||u[18].p._mdf||u[19].p._mdf||u[20].p._mdf||u[21].p._mdf)&&(c=this.getTableValue(u[17].p.v,u[18].p.v,u[19].p.v,u[20].p.v,u[21].p.v),this.feFuncG.setAttribute("tableValues",c)),this.feFuncB&&(o||u[24].p._mdf||u[25].p._mdf||u[26].p._mdf||u[27].p._mdf||u[28].p._mdf)&&(c=this.getTableValue(u[24].p.v,u[25].p.v,u[26].p.v,u[27].p.v,u[28].p.v),this.feFuncB.setAttribute("tableValues",c)),this.feFuncA&&(o||u[31].p._mdf||u[32].p._mdf||u[33].p._mdf||u[34].p._mdf||u[35].p._mdf)&&(c=this.getTableValue(u[31].p.v,u[32].p.v,u[33].p.v,u[34].p.v,u[35].p.v),this.feFuncA.setAttribute("tableValues",c))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(o){if(o||this.filterManager._mdf){if((o||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),o||this.filterManager.effectElements[0].p._mdf){var c=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*c[0]),Math.round(255*c[1]),Math.round(255*c[2])))}if((o||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),o||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var u=this.filterManager.effectElements[3].p.v,n=(this.filterManager.effectElements[2].p.v-90)*degToRads,g=u*Math.cos(n),d=u*Math.sin(n);this.feOffset.setAttribute("dx",g),this.feOffset.setAttribute("dy",d)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(o,c,u){this.initialized=!1,this.filterManager=c,this.filterElem=o,this.elem=u,u.matteElement=createNS("g"),u.matteElement.appendChild(u.layerElement),u.matteElement.appendChild(u.transformedElement),u.baseElement=u.matteElement}function SVGGaussianBlurEffect(o,c,u,n){o.setAttribute("x","-100%"),o.setAttribute("y","-100%"),o.setAttribute("width","300%"),o.setAttribute("height","300%"),this.filterManager=c;var g=createNS("feGaussianBlur");g.setAttribute("result",n),o.appendChild(g),this.feGaussianBlur=g}function TransformEffect(){}function SVGTransformEffect(o,c){this.init(c)}function CVTransformEffect(o){this.init(o)}return SVGMatte3Effect.prototype.findSymbol=function(o){for(var c=0,u=_svgMatteSymbols.length;c{"use strict";u.d(c,{e$:()=>Ge,CT:()=>ut});var n=u(4650),g=u(6895),d=u(8996),A=u(9646),R=u(4408),O=u(727);const N={schedule(Yt){let kt=requestAnimationFrame,Et=cancelAnimationFrame;const{delegate:It}=N;It&&(kt=It.requestAnimationFrame,Et=It.cancelAnimationFrame);const gn=kt(Sn=>{Et=void 0,Yt(Sn)});return new O.w0(()=>Et?.(gn))},requestAnimationFrame(...Yt){const{delegate:kt}=N;return(kt?.requestAnimationFrame||requestAnimationFrame)(...Yt)},cancelAnimationFrame(...Yt){const{delegate:kt}=N;return(kt?.cancelAnimationFrame||cancelAnimationFrame)(...Yt)},delegate:void 0};var ie=u(7565);const ee=new class L extends ie.v{flush(kt){this._active=!0;const Et=this._scheduled;this._scheduled=void 0;const{actions:It}=this;let gn;kt=kt||It.shift();do{if(gn=kt.execute(kt.state,kt.delay))break}while((kt=It[0])&&kt.id===Et&&It.shift());if(this._active=!1,gn){for(;(kt=It[0])&&kt.id===Et&&It.shift();)kt.unsubscribe();throw gn}}}(class U extends R.o{constructor(kt,Et){super(kt,Et),this.scheduler=kt,this.work=Et}requestAsyncId(kt,Et,It=0){return null!==It&&It>0?super.requestAsyncId(kt,Et,It):(kt.actions.push(this),kt._scheduled||(kt._scheduled=N.requestAnimationFrame(()=>kt.flush(void 0))))}recycleAsyncId(kt,Et,It=0){var gn;if(null!=It?It>0:this.delay>0)return super.recycleAsyncId(kt,Et,It);const{actions:Sn}=kt;null!=Et&&(null===(gn=Sn[Sn.length-1])||void 0===gn?void 0:gn.id)!==Et&&(N.cancelAnimationFrame(Et),kt._scheduled=void 0)}});var z=u(7579),ce=u(1135),X=u(9770),Y=u(9751),G=u(4004),te=u(4707),pe=u(4033),ve=u(576),Ie=u(8421),we=u(4482);const We={connector:()=>new z.x};function et(Yt,kt,Et,It){Et&&!(0,ve.m)(Et)&&(It=Et);const gn=(0,ve.m)(Et)?Et:void 0;return Sn=>function Me(Yt,kt){const Et=(0,ve.m)(Yt)?Yt:()=>Yt;return(0,ve.m)(kt)?function Se(Yt,kt=We){const{connector:Et}=kt;return(0,we.e)((It,gn)=>{const Sn=Et();(0,Ie.Xf)(Yt(function Ve(Yt){return new Y.y(kt=>Yt.subscribe(kt))}(Sn))).subscribe(gn),gn.add(It.subscribe(Sn))})}(kt,{connector:Et}):It=>new pe.c(It,Et)}(new te.t(Yt,kt,It),gn)(Sn)}var Fe=u(8343),Ee=u(5363),ae=u(9300),me=u(3900),$=u(2722);const ue=["container"],Qe=new n.OlP("LottieOptions");let st=(()=>{class Yt{constructor(Et,It){this.ngZone=Et,this.options=It,this.player$=function xe(Yt){const kt=Yt();return kt instanceof Promise?(0,d.D)(kt).pipe((0,G.U)(Et=>Et.default||Et),et(1),(0,Fe.x)()):(0,A.of)(kt)}(this.options.player).pipe((0,Ee.Q)(ee))}loadAnimation(Et){return this.player$.pipe((0,G.U)(It=>this.createAnimationItem(It,Et)))}resolveOptions(Et,It){return Object.assign({container:It,renderer:"svg",loop:!0,autoplay:!0},Et)}createAnimationItem(Et,It){return this.ngZone.runOutsideAngular(()=>Et.loadAnimation(It))}}return Yt.\u0275fac=function(Et){return new(Et||Yt)(n.LFG(n.R0b),n.LFG(Qe))},Yt.\u0275prov=n.Yz7({token:Yt,factory:Yt.\u0275fac}),Yt})(),Le=(()=>{class Yt{constructor(Et,It,gn){this.ngZone=Et,this.platformId=It,this.animationLoader=gn,this.options=null,this.containerClass=null,this.styles=null,this.animationCreated=this.getAnimationItem(),this.complete=this.awaitAnimationItemAndStartListening("complete"),this.loopComplete=this.awaitAnimationItemAndStartListening("loopComplete"),this.enterFrame=this.awaitAnimationItemAndStartListening("enterFrame"),this.segmentStart=this.awaitAnimationItemAndStartListening("segmentStart"),this.configReady=this.awaitAnimationItemAndStartListening("config_ready"),this.dataReady=this.awaitAnimationItemAndStartListening("data_ready"),this.domLoaded=this.awaitAnimationItemAndStartListening("DOMLoaded"),this.destroy=this.awaitAnimationItemAndStartListening("destroy"),this.error=this.awaitAnimationItemAndStartListening("error"),this.destroy$=new z.x,this.loadAnimation$=new z.x,this.animationItem$=new ce.X(null),this.setupLoadAnimationListener()}ngOnDestroy(){this.destroy$.next(),this.destroyAnimation()}loadAnimation(Et,It){this.loadAnimation$.next([Et,It])}getAnimationItem(){return(0,X.P)(()=>this.animationItem$).pipe((0,ae.h)(Et=>null!==Et))}awaitAnimationItemAndStartListening(Et){return this.getAnimationItem().pipe((0,me.w)(It=>new Y.y(gn=>{It.addEventListener(Et,Sn=>{this.ngZone.runOutsideAngular(()=>{gn.next(Sn)})})})))}setupLoadAnimationListener(){this.loadAnimation$.pipe((0,ae.h)(([Et])=>(0,g.NF)(this.platformId)&&void 0!==Et.options),(0,me.w)(([Et,It])=>(this.destroyAnimation(),this.animationLoader.loadAnimation(this.animationLoader.resolveOptions(Et.options.currentValue,It)))),(0,$.R)(this.destroy$)).subscribe(Et=>{this.animationItem$.next(Et)})}destroyAnimation(){const Et=this.animationItem$.getValue();null!==Et&&(Et.destroy(),this.animationItem$.next(null))}}return Yt.\u0275fac=function(Et){return new(Et||Yt)(n.Y36(n.R0b),n.Y36(n.Lbi),n.Y36(st))},Yt.\u0275dir=n.lG2({type:Yt,selectors:[["","lottie",""]],inputs:{options:"options",containerClass:"containerClass",styles:"styles"},outputs:{animationCreated:"animationCreated",complete:"complete",loopComplete:"loopComplete",enterFrame:"enterFrame",segmentStart:"segmentStart",configReady:"configReady",dataReady:"dataReady",domLoaded:"domLoaded",destroy:"destroy",error:"error"}}),Yt})(),Ge=(()=>{class Yt extends Le{constructor(Et,It,gn){super(Et,It,gn),this.width=null,this.height=null,this.container=null}ngOnChanges(Et){super.loadAnimation(Et,this.container.nativeElement)}}return Yt.\u0275fac=function(Et){return new(Et||Yt)(n.Y36(n.R0b),n.Y36(n.Lbi),n.Y36(st))},Yt.\u0275cmp=n.Xpm({type:Yt,selectors:[["ng-lottie"]],viewQuery:function(Et,It){if(1&Et&&n.Gf(ue,7),2&Et){let gn;n.iGM(gn=n.CRH())&&(It.container=gn.first)}},inputs:{width:"width",height:"height"},features:[n.qOj,n.TTD],decls:2,vars:6,consts:[[3,"ngStyle","ngClass"],["container",""]],template:function(Et,It){1&Et&&n._UZ(0,"div",0,1),2&Et&&(n.Udp("width",It.width||"100%")("height",It.height||"100%"),n.Q6J("ngStyle",It.styles)("ngClass",It.containerClass))},dependencies:[g.mk,g.PC],encapsulation:2,changeDetection:0}),Yt})(),ut=(()=>{class Yt{static forRoot(Et){return{ngModule:Yt,providers:[st,{provide:Qe,useValue:Et}]}}}return Yt.\u0275fac=function(Et){return new(Et||Yt)},Yt.\u0275mod=n.oAB({type:Yt}),Yt.\u0275inj=n.cJS({imports:[g.ez]}),Yt})()},1135:(o,c,u)=>{"use strict";u.d(c,{X:()=>g});var n=u(7579);class g extends n.x{constructor(A){super(),this._value=A}get value(){return this.getValue()}_subscribe(A){const R=super._subscribe(A);return!R.closed&&A.next(this._value),R}getValue(){const{hasError:A,thrownError:R,_value:O}=this;if(A)throw R;return this._throwIfClosed(),O}next(A){super.next(this._value=A)}}},9751:(o,c,u)=>{"use strict";u.d(c,{y:()=>U});var n=u(930),g=u(727),d=u(8822),A=u(9635),R=u(2416),O=u(576),N=u(2806);let U=(()=>{class K{constructor(ce){ce&&(this._subscribe=ce)}lift(ce){const X=new K;return X.source=this,X.operator=ce,X}subscribe(ce,X,Y){const G=function ee(K){return K&&K instanceof n.Lv||function L(K){return K&&(0,O.m)(K.next)&&(0,O.m)(K.error)&&(0,O.m)(K.complete)}(K)&&(0,g.Nn)(K)}(ce)?ce:new n.Hp(ce,X,Y);return(0,N.x)(()=>{const{operator:te,source:pe}=this;G.add(te?te.call(G,pe):pe?this._subscribe(G):this._trySubscribe(G))}),G}_trySubscribe(ce){try{return this._subscribe(ce)}catch(X){ce.error(X)}}forEach(ce,X){return new(X=ie(X))((Y,G)=>{const te=new n.Hp({next:pe=>{try{ce(pe)}catch(ve){G(ve),te.unsubscribe()}},error:G,complete:Y});this.subscribe(te)})}_subscribe(ce){var X;return null===(X=this.source)||void 0===X?void 0:X.subscribe(ce)}[d.L](){return this}pipe(...ce){return(0,A.U)(ce)(this)}toPromise(ce){return new(ce=ie(ce))((X,Y)=>{let G;this.subscribe(te=>G=te,te=>Y(te),()=>X(G))})}}return K.create=z=>new K(z),K})();function ie(K){var z;return null!==(z=K??R.v.Promise)&&void 0!==z?z:Promise}},4707:(o,c,u)=>{"use strict";u.d(c,{t:()=>d});var n=u(7579),g=u(6063);class d extends n.x{constructor(R=1/0,O=1/0,N=g.l){super(),this._bufferSize=R,this._windowTime=O,this._timestampProvider=N,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=O===1/0,this._bufferSize=Math.max(1,R),this._windowTime=Math.max(1,O)}next(R){const{isStopped:O,_buffer:N,_infiniteTimeWindow:U,_timestampProvider:ie,_windowTime:L}=this;O||(N.push(R),!U&&N.push(ie.now()+L)),this._trimBuffer(),super.next(R)}_subscribe(R){this._throwIfClosed(),this._trimBuffer();const O=this._innerSubscribe(R),{_infiniteTimeWindow:N,_buffer:U}=this,ie=U.slice();for(let L=0;L{"use strict";u.d(c,{x:()=>N});var n=u(9751),g=u(727);const A=(0,u(3888).d)(ie=>function(){ie(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var R=u(8737),O=u(2806);let N=(()=>{class ie extends n.y{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(ee){const K=new U(this,this);return K.operator=ee,K}_throwIfClosed(){if(this.closed)throw new A}next(ee){(0,O.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const K of this.currentObservers)K.next(ee)}})}error(ee){(0,O.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=ee;const{observers:K}=this;for(;K.length;)K.shift().error(ee)}})}complete(){(0,O.x)(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:ee}=this;for(;ee.length;)ee.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var ee;return(null===(ee=this.observers)||void 0===ee?void 0:ee.length)>0}_trySubscribe(ee){return this._throwIfClosed(),super._trySubscribe(ee)}_subscribe(ee){return this._throwIfClosed(),this._checkFinalizedStatuses(ee),this._innerSubscribe(ee)}_innerSubscribe(ee){const{hasError:K,isStopped:z,observers:ce}=this;return K||z?g.Lc:(this.currentObservers=null,ce.push(ee),new g.w0(()=>{this.currentObservers=null,(0,R.P)(ce,ee)}))}_checkFinalizedStatuses(ee){const{hasError:K,thrownError:z,isStopped:ce}=this;K?ee.error(z):ce&&ee.complete()}asObservable(){const ee=new n.y;return ee.source=this,ee}}return ie.create=(L,ee)=>new U(L,ee),ie})();class U extends N{constructor(L,ee){super(),this.destination=L,this.source=ee}next(L){var ee,K;null===(K=null===(ee=this.destination)||void 0===ee?void 0:ee.next)||void 0===K||K.call(ee,L)}error(L){var ee,K;null===(K=null===(ee=this.destination)||void 0===ee?void 0:ee.error)||void 0===K||K.call(ee,L)}complete(){var L,ee;null===(ee=null===(L=this.destination)||void 0===L?void 0:L.complete)||void 0===ee||ee.call(L)}_subscribe(L){var ee,K;return null!==(K=null===(ee=this.source)||void 0===ee?void 0:ee.subscribe(L))&&void 0!==K?K:g.Lc}}},930:(o,c,u)=>{"use strict";u.d(c,{Hp:()=>Y,Lv:()=>K});var n=u(576),g=u(727),d=u(2416),A=u(7849),R=u(5032);const O=ie("C",void 0,void 0);function ie(Ie,we,Ve){return{kind:Ie,value:we,error:Ve}}var L=u(3410),ee=u(2806);class K extends g.w0{constructor(we){super(),this.isStopped=!1,we?(this.destination=we,(0,g.Nn)(we)&&we.add(this)):this.destination=ve}static create(we,Ve,We){return new Y(we,Ve,We)}next(we){this.isStopped?pe(function U(Ie){return ie("N",Ie,void 0)}(we),this):this._next(we)}error(we){this.isStopped?pe(function N(Ie){return ie("E",void 0,Ie)}(we),this):(this.isStopped=!0,this._error(we))}complete(){this.isStopped?pe(O,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(we){this.destination.next(we)}_error(we){try{this.destination.error(we)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const z=Function.prototype.bind;function ce(Ie,we){return z.call(Ie,we)}class X{constructor(we){this.partialObserver=we}next(we){const{partialObserver:Ve}=this;if(Ve.next)try{Ve.next(we)}catch(We){G(We)}}error(we){const{partialObserver:Ve}=this;if(Ve.error)try{Ve.error(we)}catch(We){G(We)}else G(we)}complete(){const{partialObserver:we}=this;if(we.complete)try{we.complete()}catch(Ve){G(Ve)}}}class Y extends K{constructor(we,Ve,We){let Se;if(super(),(0,n.m)(we)||!we)Se={next:we??void 0,error:Ve??void 0,complete:We??void 0};else{let Me;this&&d.v.useDeprecatedNextContext?(Me=Object.create(we),Me.unsubscribe=()=>this.unsubscribe(),Se={next:we.next&&ce(we.next,Me),error:we.error&&ce(we.error,Me),complete:we.complete&&ce(we.complete,Me)}):Se=we}this.destination=new X(Se)}}function G(Ie){d.v.useDeprecatedSynchronousErrorHandling?(0,ee.O)(Ie):(0,A.h)(Ie)}function pe(Ie,we){const{onStoppedNotification:Ve}=d.v;Ve&&L.z.setTimeout(()=>Ve(Ie,we))}const ve={closed:!0,next:R.Z,error:function te(Ie){throw Ie},complete:R.Z}},727:(o,c,u)=>{"use strict";u.d(c,{Lc:()=>O,w0:()=>R,Nn:()=>N});var n=u(576);const d=(0,u(3888).d)(ie=>function(ee){ie(this),this.message=ee?`${ee.length} errors occurred during unsubscription:\n${ee.map((K,z)=>`${z+1}) ${K.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=ee});var A=u(8737);class R{constructor(L){this.initialTeardown=L,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let L;if(!this.closed){this.closed=!0;const{_parentage:ee}=this;if(ee)if(this._parentage=null,Array.isArray(ee))for(const ce of ee)ce.remove(this);else ee.remove(this);const{initialTeardown:K}=this;if((0,n.m)(K))try{K()}catch(ce){L=ce instanceof d?ce.errors:[ce]}const{_finalizers:z}=this;if(z){this._finalizers=null;for(const ce of z)try{U(ce)}catch(X){L=L??[],X instanceof d?L=[...L,...X.errors]:L.push(X)}}if(L)throw new d(L)}}add(L){var ee;if(L&&L!==this)if(this.closed)U(L);else{if(L instanceof R){if(L.closed||L._hasParent(this))return;L._addParent(this)}(this._finalizers=null!==(ee=this._finalizers)&&void 0!==ee?ee:[]).push(L)}}_hasParent(L){const{_parentage:ee}=this;return ee===L||Array.isArray(ee)&&ee.includes(L)}_addParent(L){const{_parentage:ee}=this;this._parentage=Array.isArray(ee)?(ee.push(L),ee):ee?[ee,L]:L}_removeParent(L){const{_parentage:ee}=this;ee===L?this._parentage=null:Array.isArray(ee)&&(0,A.P)(ee,L)}remove(L){const{_finalizers:ee}=this;ee&&(0,A.P)(ee,L),L instanceof R&&L._removeParent(this)}}R.EMPTY=(()=>{const ie=new R;return ie.closed=!0,ie})();const O=R.EMPTY;function N(ie){return ie instanceof R||ie&&"closed"in ie&&(0,n.m)(ie.remove)&&(0,n.m)(ie.add)&&(0,n.m)(ie.unsubscribe)}function U(ie){(0,n.m)(ie)?ie():ie.unsubscribe()}},2416:(o,c,u)=>{"use strict";u.d(c,{v:()=>n});const n={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},4033:(o,c,u)=>{"use strict";u.d(c,{c:()=>O});var n=u(9751),g=u(727),d=u(8343),A=u(5403),R=u(4482);class O extends n.y{constructor(U,ie){super(),this.source=U,this.subjectFactory=ie,this._subject=null,this._refCount=0,this._connection=null,(0,R.A)(U)&&(this.lift=U.lift)}_subscribe(U){return this.getSubject().subscribe(U)}getSubject(){const U=this._subject;return(!U||U.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:U}=this;this._subject=this._connection=null,U?.unsubscribe()}connect(){let U=this._connection;if(!U){U=this._connection=new g.w0;const ie=this.getSubject();U.add(this.source.subscribe((0,A.x)(ie,void 0,()=>{this._teardown(),ie.complete()},L=>{this._teardown(),ie.error(L)},()=>this._teardown()))),U.closed&&(this._connection=null,U=g.w0.EMPTY)}return U}refCount(){return(0,d.x)()(this)}}},9841:(o,c,u)=>{"use strict";u.d(c,{a:()=>L});var n=u(9751),g=u(4742),d=u(8996),A=u(4671),R=u(3268),O=u(3269),N=u(1810),U=u(5403),ie=u(9672);function L(...z){const ce=(0,O.yG)(z),X=(0,O.jO)(z),{args:Y,keys:G}=(0,g.D)(z);if(0===Y.length)return(0,d.D)([],ce);const te=new n.y(function ee(z,ce,X=A.y){return Y=>{K(ce,()=>{const{length:G}=z,te=new Array(G);let pe=G,ve=G;for(let Ie=0;Ie{const we=(0,d.D)(z[Ie],ce);let Ve=!1;we.subscribe((0,U.x)(Y,We=>{te[Ie]=We,Ve||(Ve=!0,ve--),ve||Y.next(X(te.slice()))},()=>{--pe||Y.complete()}))},Y)},Y)}}(Y,ce,G?pe=>(0,N.n)(G,pe):A.y));return X?te.pipe((0,R.Z)(X)):te}function K(z,ce,X){z?(0,ie.f)(X,z,ce):ce()}},7272:(o,c,u)=>{"use strict";u.d(c,{z:()=>R});var n=u(8189),d=u(3269),A=u(8996);function R(...O){return function g(){return(0,n.J)(1)}()((0,A.D)(O,(0,d.yG)(O)))}},9770:(o,c,u)=>{"use strict";u.d(c,{P:()=>d});var n=u(9751),g=u(8421);function d(A){return new n.y(R=>{(0,g.Xf)(A()).subscribe(R)})}},515:(o,c,u)=>{"use strict";u.d(c,{E:()=>g});const g=new(u(9751).y)(R=>R.complete())},8996:(o,c,u)=>{"use strict";u.d(c,{D:()=>we});var n=u(8421),g=u(5363),d=u(9468),O=u(9751),U=u(2202),ie=u(576),L=u(9672);function K(Ve,We){if(!Ve)throw new Error("Iterable cannot be null");return new O.y(Se=>{(0,L.f)(Se,We,()=>{const Me=Ve[Symbol.asyncIterator]();(0,L.f)(Se,We,()=>{Me.next().then(et=>{et.done?Se.complete():Se.next(et.value)})},0,!0)})})}var z=u(3670),ce=u(8239),X=u(1144),Y=u(6495),G=u(2206),te=u(4532),pe=u(3260);function we(Ve,We){return We?function Ie(Ve,We){if(null!=Ve){if((0,z.c)(Ve))return function A(Ve,We){return(0,n.Xf)(Ve).pipe((0,d.R)(We),(0,g.Q)(We))}(Ve,We);if((0,X.z)(Ve))return function N(Ve,We){return new O.y(Se=>{let Me=0;return We.schedule(function(){Me===Ve.length?Se.complete():(Se.next(Ve[Me++]),Se.closed||this.schedule())})})}(Ve,We);if((0,ce.t)(Ve))return function R(Ve,We){return(0,n.Xf)(Ve).pipe((0,d.R)(We),(0,g.Q)(We))}(Ve,We);if((0,G.D)(Ve))return K(Ve,We);if((0,Y.T)(Ve))return function ee(Ve,We){return new O.y(Se=>{let Me;return(0,L.f)(Se,We,()=>{Me=Ve[U.h](),(0,L.f)(Se,We,()=>{let et,Fe;try{({value:et,done:Fe}=Me.next())}catch(Ee){return void Se.error(Ee)}Fe?Se.complete():Se.next(et)},0,!0)}),()=>(0,ie.m)(Me?.return)&&Me.return()})}(Ve,We);if((0,pe.L)(Ve))return function ve(Ve,We){return K((0,pe.Q)(Ve),We)}(Ve,We)}throw(0,te.z)(Ve)}(Ve,We):(0,n.Xf)(Ve)}},8421:(o,c,u)=>{"use strict";u.d(c,{Xf:()=>z});var n=u(655),g=u(1144),d=u(8239),A=u(9751),R=u(3670),O=u(2206),N=u(4532),U=u(6495),ie=u(3260),L=u(576),ee=u(7849),K=u(8822);function z(Ie){if(Ie instanceof A.y)return Ie;if(null!=Ie){if((0,R.c)(Ie))return function ce(Ie){return new A.y(we=>{const Ve=Ie[K.L]();if((0,L.m)(Ve.subscribe))return Ve.subscribe(we);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(Ie);if((0,g.z)(Ie))return function X(Ie){return new A.y(we=>{for(let Ve=0;Ve{Ie.then(Ve=>{we.closed||(we.next(Ve),we.complete())},Ve=>we.error(Ve)).then(null,ee.h)})}(Ie);if((0,O.D)(Ie))return te(Ie);if((0,U.T)(Ie))return function G(Ie){return new A.y(we=>{for(const Ve of Ie)if(we.next(Ve),we.closed)return;we.complete()})}(Ie);if((0,ie.L)(Ie))return function pe(Ie){return te((0,ie.Q)(Ie))}(Ie)}throw(0,N.z)(Ie)}function te(Ie){return new A.y(we=>{(function ve(Ie,we){var Ve,We,Se,Me;return(0,n.mG)(this,void 0,void 0,function*(){try{for(Ve=(0,n.KL)(Ie);!(We=yield Ve.next()).done;)if(we.next(We.value),we.closed)return}catch(et){Se={error:et}}finally{try{We&&!We.done&&(Me=Ve.return)&&(yield Me.call(Ve))}finally{if(Se)throw Se.error}}we.complete()})})(Ie,we).catch(Ve=>we.error(Ve))})}},6451:(o,c,u)=>{"use strict";u.d(c,{T:()=>O});var n=u(8189),g=u(8421),d=u(515),A=u(3269),R=u(8996);function O(...N){const U=(0,A.yG)(N),ie=(0,A._6)(N,1/0),L=N;return L.length?1===L.length?(0,g.Xf)(L[0]):(0,n.J)(ie)((0,R.D)(L,U)):d.E}},9646:(o,c,u)=>{"use strict";u.d(c,{of:()=>d});var n=u(3269),g=u(8996);function d(...A){const R=(0,n.yG)(A);return(0,g.D)(A,R)}},5403:(o,c,u)=>{"use strict";u.d(c,{Q:()=>d,x:()=>g});var n=u(930);function g(A,R,O,N,U){return new d(A,R,O,N,U)}class d extends n.Lv{constructor(R,O,N,U,ie,L){super(R),this.onFinalize=ie,this.shouldUnsubscribe=L,this._next=O?function(ee){try{O(ee)}catch(K){R.error(K)}}:super._next,this._error=U?function(ee){try{U(ee)}catch(K){R.error(K)}finally{this.unsubscribe()}}:super._error,this._complete=N?function(){try{N()}catch(ee){R.error(ee)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var R;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:O}=this;super.unsubscribe(),!O&&(null===(R=this.onFinalize)||void 0===R||R.call(this))}}}},262:(o,c,u)=>{"use strict";u.d(c,{K:()=>A});var n=u(8421),g=u(5403),d=u(4482);function A(R){return(0,d.e)((O,N)=>{let L,U=null,ie=!1;U=O.subscribe((0,g.x)(N,void 0,void 0,ee=>{L=(0,n.Xf)(R(ee,A(R)(O))),U?(U.unsubscribe(),U=null,L.subscribe(N)):ie=!0})),ie&&(U.unsubscribe(),U=null,L.subscribe(N))})}},4351:(o,c,u)=>{"use strict";u.d(c,{b:()=>d});var n=u(5577),g=u(576);function d(A,R){return(0,g.m)(R)?(0,n.z)(A,R,1):(0,n.z)(A,1)}},6590:(o,c,u)=>{"use strict";u.d(c,{d:()=>d});var n=u(4482),g=u(5403);function d(A){return(0,n.e)((R,O)=>{let N=!1;R.subscribe((0,g.x)(O,U=>{N=!0,O.next(U)},()=>{N||O.next(A),O.complete()}))})}},1884:(o,c,u)=>{"use strict";u.d(c,{x:()=>A});var n=u(4671),g=u(4482),d=u(5403);function A(O,N=n.y){return O=O??R,(0,g.e)((U,ie)=>{let L,ee=!0;U.subscribe((0,d.x)(ie,K=>{const z=N(K);(ee||!O(L,z))&&(ee=!1,L=z,ie.next(K))}))})}function R(O,N){return O===N}},9300:(o,c,u)=>{"use strict";u.d(c,{h:()=>d});var n=u(4482),g=u(5403);function d(A,R){return(0,n.e)((O,N)=>{let U=0;O.subscribe((0,g.x)(N,ie=>A.call(R,ie,U++)&&N.next(ie)))})}},590:(o,c,u)=>{"use strict";u.d(c,{P:()=>N});var n=u(6805),g=u(9300),d=u(5698),A=u(6590),R=u(8068),O=u(4671);function N(U,ie){const L=arguments.length>=2;return ee=>ee.pipe(U?(0,g.h)((K,z)=>U(K,z,ee)):O.y,(0,d.q)(1),L?(0,A.d)(ie):(0,R.T)(()=>new n.K))}},4004:(o,c,u)=>{"use strict";u.d(c,{U:()=>d});var n=u(4482),g=u(5403);function d(A,R){return(0,n.e)((O,N)=>{let U=0;O.subscribe((0,g.x)(N,ie=>{N.next(A.call(R,ie,U++))}))})}},9718:(o,c,u)=>{"use strict";u.d(c,{h:()=>g});var n=u(4004);function g(d){return(0,n.U)(()=>d)}},8189:(o,c,u)=>{"use strict";u.d(c,{J:()=>d});var n=u(5577),g=u(4671);function d(A=1/0){return(0,n.z)(g.y,A)}},5577:(o,c,u)=>{"use strict";u.d(c,{z:()=>U});var n=u(4004),g=u(8421),d=u(4482),A=u(9672),R=u(5403),N=u(576);function U(ie,L,ee=1/0){return(0,N.m)(L)?U((K,z)=>(0,n.U)((ce,X)=>L(K,ce,z,X))((0,g.Xf)(ie(K,z))),ee):("number"==typeof L&&(ee=L),(0,d.e)((K,z)=>function O(ie,L,ee,K,z,ce,X,Y){const G=[];let te=0,pe=0,ve=!1;const Ie=()=>{ve&&!G.length&&!te&&L.complete()},we=We=>te{ce&&L.next(We),te++;let Se=!1;(0,g.Xf)(ee(We,pe++)).subscribe((0,R.x)(L,Me=>{z?.(Me),ce?we(Me):L.next(Me)},()=>{Se=!0},void 0,()=>{if(Se)try{for(te--;G.length&&teVe(Me)):Ve(Me)}Ie()}catch(Me){L.error(Me)}}))};return ie.subscribe((0,R.x)(L,we,()=>{ve=!0,Ie()})),()=>{Y?.()}}(K,z,ie,ee)))}},5363:(o,c,u)=>{"use strict";u.d(c,{Q:()=>A});var n=u(9672),g=u(4482),d=u(5403);function A(R,O=0){return(0,g.e)((N,U)=>{N.subscribe((0,d.x)(U,ie=>(0,n.f)(U,R,()=>U.next(ie),O),()=>(0,n.f)(U,R,()=>U.complete(),O),ie=>(0,n.f)(U,R,()=>U.error(ie),O)))})}},8343:(o,c,u)=>{"use strict";u.d(c,{x:()=>d});var n=u(4482),g=u(5403);function d(){return(0,n.e)((A,R)=>{let O=null;A._refCount++;const N=(0,g.x)(R,void 0,void 0,void 0,()=>{if(!A||A._refCount<=0||0<--A._refCount)return void(O=null);const U=A._connection,ie=O;O=null,U&&(!ie||U===ie)&&U.unsubscribe(),R.unsubscribe()});A.subscribe(N),N.closed||(O=A.connect())})}},5026:(o,c,u)=>{"use strict";u.d(c,{R:()=>A});var n=u(4482),g=u(5403);function A(R,O){return(0,n.e)(function d(R,O,N,U,ie){return(L,ee)=>{let K=N,z=O,ce=0;L.subscribe((0,g.x)(ee,X=>{const Y=ce++;z=K?R(z,X,Y):(K=!0,X),U&&ee.next(z)},ie&&(()=>{K&&ee.next(z),ee.complete()})))}}(R,O,arguments.length>=2,!0))}},3099:(o,c,u)=>{"use strict";u.d(c,{B:()=>R});var n=u(8421),g=u(7579),d=u(930),A=u(4482);function R(N={}){const{connector:U=(()=>new g.x),resetOnError:ie=!0,resetOnComplete:L=!0,resetOnRefCountZero:ee=!0}=N;return K=>{let z,ce,X,Y=0,G=!1,te=!1;const pe=()=>{ce?.unsubscribe(),ce=void 0},ve=()=>{pe(),z=X=void 0,G=te=!1},Ie=()=>{const we=z;ve(),we?.unsubscribe()};return(0,A.e)((we,Ve)=>{Y++,!te&&!G&&pe();const We=X=X??U();Ve.add(()=>{Y--,0===Y&&!te&&!G&&(ce=O(Ie,ee))}),We.subscribe(Ve),!z&&Y>0&&(z=new d.Hp({next:Se=>We.next(Se),error:Se=>{te=!0,pe(),ce=O(ve,ie,Se),We.error(Se)},complete:()=>{G=!0,pe(),ce=O(ve,L),We.complete()}}),(0,n.Xf)(we).subscribe(z))})(K)}}function O(N,U,...ie){if(!0===U)return void N();if(!1===U)return;const L=new d.Hp({next:()=>{L.unsubscribe(),N()}});return U(...ie).subscribe(L)}},8675:(o,c,u)=>{"use strict";u.d(c,{O:()=>A});var n=u(7272),g=u(3269),d=u(4482);function A(...R){const O=(0,g.yG)(R);return(0,d.e)((N,U)=>{(O?(0,n.z)(R,N,O):(0,n.z)(R,N)).subscribe(U)})}},9468:(o,c,u)=>{"use strict";u.d(c,{R:()=>g});var n=u(4482);function g(d,A=0){return(0,n.e)((R,O)=>{O.add(d.schedule(()=>R.subscribe(O),A))})}},3900:(o,c,u)=>{"use strict";u.d(c,{w:()=>A});var n=u(8421),g=u(4482),d=u(5403);function A(R,O){return(0,g.e)((N,U)=>{let ie=null,L=0,ee=!1;const K=()=>ee&&!ie&&U.complete();N.subscribe((0,d.x)(U,z=>{ie?.unsubscribe();let ce=0;const X=L++;(0,n.Xf)(R(z,X)).subscribe(ie=(0,d.x)(U,Y=>U.next(O?O(z,Y,X,ce++):Y),()=>{ie=null,K()}))},()=>{ee=!0,K()}))})}},5698:(o,c,u)=>{"use strict";u.d(c,{q:()=>A});var n=u(515),g=u(4482),d=u(5403);function A(R){return R<=0?()=>n.E:(0,g.e)((O,N)=>{let U=0;O.subscribe((0,d.x)(N,ie=>{++U<=R&&(N.next(ie),R<=U&&N.complete())}))})}},2722:(o,c,u)=>{"use strict";u.d(c,{R:()=>R});var n=u(4482),g=u(5403),d=u(8421),A=u(5032);function R(O){return(0,n.e)((N,U)=>{(0,d.Xf)(O).subscribe((0,g.x)(U,()=>U.complete(),A.Z)),!U.closed&&N.subscribe(U)})}},8505:(o,c,u)=>{"use strict";u.d(c,{b:()=>R});var n=u(576),g=u(4482),d=u(5403),A=u(4671);function R(O,N,U){const ie=(0,n.m)(O)||N||U?{next:O,error:N,complete:U}:O;return ie?(0,g.e)((L,ee)=>{var K;null===(K=ie.subscribe)||void 0===K||K.call(ie);let z=!0;L.subscribe((0,d.x)(ee,ce=>{var X;null===(X=ie.next)||void 0===X||X.call(ie,ce),ee.next(ce)},()=>{var ce;z=!1,null===(ce=ie.complete)||void 0===ce||ce.call(ie),ee.complete()},ce=>{var X;z=!1,null===(X=ie.error)||void 0===X||X.call(ie,ce),ee.error(ce)},()=>{var ce,X;z&&(null===(ce=ie.unsubscribe)||void 0===ce||ce.call(ie)),null===(X=ie.finalize)||void 0===X||X.call(ie)}))}):A.y}},8068:(o,c,u)=>{"use strict";u.d(c,{T:()=>A});var n=u(6805),g=u(4482),d=u(5403);function A(O=R){return(0,g.e)((N,U)=>{let ie=!1;N.subscribe((0,d.x)(U,L=>{ie=!0,U.next(L)},()=>ie?U.complete():U.error(O())))})}function R(){return new n.K}},4408:(o,c,u)=>{"use strict";u.d(c,{o:()=>R});var n=u(727);class g extends n.w0{constructor(N,U){super()}schedule(N,U=0){return this}}const d={setInterval(O,N,...U){const{delegate:ie}=d;return ie?.setInterval?ie.setInterval(O,N,...U):setInterval(O,N,...U)},clearInterval(O){const{delegate:N}=d;return(N?.clearInterval||clearInterval)(O)},delegate:void 0};var A=u(8737);class R extends g{constructor(N,U){super(N,U),this.scheduler=N,this.work=U,this.pending=!1}schedule(N,U=0){var ie;if(this.closed)return this;this.state=N;const L=this.id,ee=this.scheduler;return null!=L&&(this.id=this.recycleAsyncId(ee,L,U)),this.pending=!0,this.delay=U,this.id=null!==(ie=this.id)&&void 0!==ie?ie:this.requestAsyncId(ee,this.id,U),this}requestAsyncId(N,U,ie=0){return d.setInterval(N.flush.bind(N,this),ie)}recycleAsyncId(N,U,ie=0){if(null!=ie&&this.delay===ie&&!1===this.pending)return U;null!=U&&d.clearInterval(U)}execute(N,U){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const ie=this._execute(N,U);if(ie)return ie;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(N,U){let L,ie=!1;try{this.work(N)}catch(ee){ie=!0,L=ee||new Error("Scheduled action threw falsy error")}if(ie)return this.unsubscribe(),L}unsubscribe(){if(!this.closed){const{id:N,scheduler:U}=this,{actions:ie}=U;this.work=this.state=this.scheduler=null,this.pending=!1,(0,A.P)(ie,this),null!=N&&(this.id=this.recycleAsyncId(U,N,null)),this.delay=null,super.unsubscribe()}}}},7565:(o,c,u)=>{"use strict";u.d(c,{v:()=>d});var n=u(6063);class g{constructor(R,O=g.now){this.schedulerActionCtor=R,this.now=O}schedule(R,O=0,N){return new this.schedulerActionCtor(this,R).schedule(N,O)}}g.now=n.l.now;class d extends g{constructor(R,O=g.now){super(R,O),this.actions=[],this._active=!1}flush(R){const{actions:O}=this;if(this._active)return void O.push(R);let N;this._active=!0;do{if(N=R.execute(R.state,R.delay))break}while(R=O.shift());if(this._active=!1,N){for(;R=O.shift();)R.unsubscribe();throw N}}}},4986:(o,c,u)=>{"use strict";u.d(c,{P:()=>A,z:()=>d});var n=u(4408);const d=new(u(7565).v)(n.o),A=d},6063:(o,c,u)=>{"use strict";u.d(c,{l:()=>n});const n={now:()=>(n.delegate||Date).now(),delegate:void 0}},3410:(o,c,u)=>{"use strict";u.d(c,{z:()=>n});const n={setTimeout(g,d,...A){const{delegate:R}=n;return R?.setTimeout?R.setTimeout(g,d,...A):setTimeout(g,d,...A)},clearTimeout(g){const{delegate:d}=n;return(d?.clearTimeout||clearTimeout)(g)},delegate:void 0}},2202:(o,c,u)=>{"use strict";u.d(c,{h:()=>g});const g=function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},8822:(o,c,u)=>{"use strict";u.d(c,{L:()=>n});const n="function"==typeof Symbol&&Symbol.observable||"@@observable"},6805:(o,c,u)=>{"use strict";u.d(c,{K:()=>g});const g=(0,u(3888).d)(d=>function(){d(this),this.name="EmptyError",this.message="no elements in sequence"})},3269:(o,c,u)=>{"use strict";u.d(c,{_6:()=>O,jO:()=>A,yG:()=>R});var n=u(576),g=u(3532);function d(N){return N[N.length-1]}function A(N){return(0,n.m)(d(N))?N.pop():void 0}function R(N){return(0,g.K)(d(N))?N.pop():void 0}function O(N,U){return"number"==typeof d(N)?N.pop():U}},4742:(o,c,u)=>{"use strict";u.d(c,{D:()=>R});const{isArray:n}=Array,{getPrototypeOf:g,prototype:d,keys:A}=Object;function R(N){if(1===N.length){const U=N[0];if(n(U))return{args:U,keys:null};if(function O(N){return N&&"object"==typeof N&&g(N)===d}(U)){const ie=A(U);return{args:ie.map(L=>U[L]),keys:ie}}}return{args:N,keys:null}}},8737:(o,c,u)=>{"use strict";function n(g,d){if(g){const A=g.indexOf(d);0<=A&&g.splice(A,1)}}u.d(c,{P:()=>n})},3888:(o,c,u)=>{"use strict";function n(g){const A=g(R=>{Error.call(R),R.stack=(new Error).stack});return A.prototype=Object.create(Error.prototype),A.prototype.constructor=A,A}u.d(c,{d:()=>n})},1810:(o,c,u)=>{"use strict";function n(g,d){return g.reduce((A,R,O)=>(A[R]=d[O],A),{})}u.d(c,{n:()=>n})},2806:(o,c,u)=>{"use strict";u.d(c,{O:()=>A,x:()=>d});var n=u(2416);let g=null;function d(R){if(n.v.useDeprecatedSynchronousErrorHandling){const O=!g;if(O&&(g={errorThrown:!1,error:null}),R(),O){const{errorThrown:N,error:U}=g;if(g=null,N)throw U}}else R()}function A(R){n.v.useDeprecatedSynchronousErrorHandling&&g&&(g.errorThrown=!0,g.error=R)}},9672:(o,c,u)=>{"use strict";function n(g,d,A,R=0,O=!1){const N=d.schedule(function(){A(),O?g.add(this.schedule(null,R)):this.unsubscribe()},R);if(g.add(N),!O)return N}u.d(c,{f:()=>n})},4671:(o,c,u)=>{"use strict";function n(g){return g}u.d(c,{y:()=>n})},1144:(o,c,u)=>{"use strict";u.d(c,{z:()=>n});const n=g=>g&&"number"==typeof g.length&&"function"!=typeof g},2206:(o,c,u)=>{"use strict";u.d(c,{D:()=>g});var n=u(576);function g(d){return Symbol.asyncIterator&&(0,n.m)(d?.[Symbol.asyncIterator])}},576:(o,c,u)=>{"use strict";function n(g){return"function"==typeof g}u.d(c,{m:()=>n})},3670:(o,c,u)=>{"use strict";u.d(c,{c:()=>d});var n=u(8822),g=u(576);function d(A){return(0,g.m)(A[n.L])}},6495:(o,c,u)=>{"use strict";u.d(c,{T:()=>d});var n=u(2202),g=u(576);function d(A){return(0,g.m)(A?.[n.h])}},8239:(o,c,u)=>{"use strict";u.d(c,{t:()=>g});var n=u(576);function g(d){return(0,n.m)(d?.then)}},3260:(o,c,u)=>{"use strict";u.d(c,{L:()=>A,Q:()=>d});var n=u(655),g=u(576);function d(R){return(0,n.FC)(this,arguments,function*(){const N=R.getReader();try{for(;;){const{value:U,done:ie}=yield(0,n.qq)(N.read());if(ie)return yield(0,n.qq)(void 0);yield yield(0,n.qq)(U)}}finally{N.releaseLock()}})}function A(R){return(0,g.m)(R?.getReader)}},3532:(o,c,u)=>{"use strict";u.d(c,{K:()=>g});var n=u(576);function g(d){return d&&(0,n.m)(d.schedule)}},4482:(o,c,u)=>{"use strict";u.d(c,{A:()=>g,e:()=>d});var n=u(576);function g(A){return(0,n.m)(A?.lift)}function d(A){return R=>{if(g(R))return R.lift(function(O){try{return A(O,this)}catch(N){this.error(N)}});throw new TypeError("Unable to lift unknown Observable type")}}},3268:(o,c,u)=>{"use strict";u.d(c,{Z:()=>A});var n=u(4004);const{isArray:g}=Array;function A(R){return(0,n.U)(O=>function d(R,O){return g(O)?R(...O):R(O)}(R,O))}},5032:(o,c,u)=>{"use strict";function n(){}u.d(c,{Z:()=>n})},9635:(o,c,u)=>{"use strict";u.d(c,{U:()=>d,z:()=>g});var n=u(4671);function g(...A){return d(A)}function d(A){return 0===A.length?n.y:1===A.length?A[0]:function(O){return A.reduce((N,U)=>U(N),O)}}},7849:(o,c,u)=>{"use strict";u.d(c,{h:()=>d});var n=u(2416),g=u(3410);function d(A){g.z.setTimeout(()=>{const{onUnhandledError:R}=n.v;if(!R)throw A;R(A)})}},4532:(o,c,u)=>{"use strict";function n(g){return new TypeError(`You provided ${null!==g&&"object"==typeof g?"an invalid object":`'${g}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}u.d(c,{z:()=>n})},655:(o,c,u)=>{"use strict";function A(Fe,Ee){var ae={};for(var me in Fe)Object.prototype.hasOwnProperty.call(Fe,me)&&Ee.indexOf(me)<0&&(ae[me]=Fe[me]);if(null!=Fe&&"function"==typeof Object.getOwnPropertySymbols){var $=0;for(me=Object.getOwnPropertySymbols(Fe);$=0;xe--)(Qe=Fe[xe])&&(ue=($<3?Qe(ue):$>3?Qe(Ee,ae,ue):Qe(Ee,ae))||ue);return $>3&&ue&&Object.defineProperty(Ee,ae,ue),ue}function U(Fe,Ee,ae,me){return new(ae||(ae=Promise))(function(ue,Qe){function xe(ke){try{Le(me.next(ke))}catch(Ge){Qe(Ge)}}function st(ke){try{Le(me.throw(ke))}catch(Ge){Qe(Ge)}}function Le(ke){ke.done?ue(ke.value):function $(ue){return ue instanceof ae?ue:new ae(function(Qe){Qe(ue)})}(ke.value).then(xe,st)}Le((me=me.apply(Fe,Ee||[])).next())})}function G(Fe){return this instanceof G?(this.v=Fe,this):new G(Fe)}function te(Fe,Ee,ae){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var $,me=ae.apply(Fe,Ee||[]),ue=[];return $={},Qe("next"),Qe("throw"),Qe("return"),$[Symbol.asyncIterator]=function(){return this},$;function Qe(ut){me[ut]&&($[ut]=function(pt){return new Promise(function($t,bt){ue.push([ut,pt,$t,bt])>1||xe(ut,pt)})})}function xe(ut,pt){try{!function st(ut){ut.value instanceof G?Promise.resolve(ut.value.v).then(Le,ke):Ge(ue[0][2],ut)}(me[ut](pt))}catch($t){Ge(ue[0][3],$t)}}function Le(ut){xe("next",ut)}function ke(ut){xe("throw",ut)}function Ge(ut,pt){ut(pt),ue.shift(),ue.length&&xe(ue[0][0],ue[0][1])}}function ve(Fe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var ae,Ee=Fe[Symbol.asyncIterator];return Ee?Ee.call(Fe):(Fe=function K(Fe){var Ee="function"==typeof Symbol&&Symbol.iterator,ae=Ee&&Fe[Ee],me=0;if(ae)return ae.call(Fe);if(Fe&&"number"==typeof Fe.length)return{next:function(){return Fe&&me>=Fe.length&&(Fe=void 0),{value:Fe&&Fe[me++],done:!Fe}}};throw new TypeError(Ee?"Object is not iterable.":"Symbol.iterator is not defined.")}(Fe),ae={},me("next"),me("throw"),me("return"),ae[Symbol.asyncIterator]=function(){return this},ae);function me(ue){ae[ue]=Fe[ue]&&function(Qe){return new Promise(function(xe,st){!function $(ue,Qe,xe,st){Promise.resolve(st).then(function(Le){ue({value:Le,done:xe})},Qe)}(xe,st,(Qe=Fe[ue](Qe)).done,Qe.value)})}}}u.d(c,{FC:()=>te,KL:()=>ve,_T:()=>A,gn:()=>R,mG:()=>U,qq:()=>G})},6895:(o,c,u)=>{"use strict";u.d(c,{Do:()=>pe,EM:()=>ts,H9:()=>qs,HT:()=>A,JF:()=>Zi,K0:()=>O,Mx:()=>Dr,NF:()=>es,Nd:()=>gi,O5:()=>tt,Ov:()=>Pi,PC:()=>xr,PM:()=>_s,S$:()=>Y,V_:()=>ie,Ye:()=>ve,Zx:()=>Mi,b0:()=>te,bD:()=>hi,ez:()=>$i,mk:()=>rr,q:()=>d,sg:()=>le,tP:()=>Oi,uU:()=>Qr,w_:()=>R});var n=u(4650);let g=null;function d(){return g}function A(j){g||(g=j)}class R{}const O=new n.OlP("DocumentToken");let N=(()=>{class j{historyGo(oe){throw new Error("Not implemented")}}return j.\u0275fac=function(oe){return new(oe||j)},j.\u0275prov=n.Yz7({token:j,factory:function(){return function U(){return(0,n.LFG)(L)}()},providedIn:"platform"}),j})();const ie=new n.OlP("Location Initialized");let L=(()=>{class j extends N{constructor(oe){super(),this._doc=oe,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return d().getBaseHref(this._doc)}onPopState(oe){const Re=d().getGlobalEventTarget(this._doc,"window");return Re.addEventListener("popstate",oe,!1),()=>Re.removeEventListener("popstate",oe)}onHashChange(oe){const Re=d().getGlobalEventTarget(this._doc,"window");return Re.addEventListener("hashchange",oe,!1),()=>Re.removeEventListener("hashchange",oe)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(oe){this._location.pathname=oe}pushState(oe,Re,ct){ee()?this._history.pushState(oe,Re,ct):this._location.hash=ct}replaceState(oe,Re,ct){ee()?this._history.replaceState(oe,Re,ct):this._location.hash=ct}forward(){this._history.forward()}back(){this._history.back()}historyGo(oe=0){this._history.go(oe)}getState(){return this._history.state}}return j.\u0275fac=function(oe){return new(oe||j)(n.LFG(O))},j.\u0275prov=n.Yz7({token:j,factory:function(){return function K(){return new L((0,n.LFG)(O))}()},providedIn:"platform"}),j})();function ee(){return!!window.history.pushState}function z(j,ge){if(0==j.length)return ge;if(0==ge.length)return j;let oe=0;return j.endsWith("/")&&oe++,ge.startsWith("/")&&oe++,2==oe?j+ge.substring(1):1==oe?j+ge:j+"/"+ge}function ce(j){const ge=j.match(/#|\?|$/),oe=ge&&ge.index||j.length;return j.slice(0,oe-("/"===j[oe-1]?1:0))+j.slice(oe)}function X(j){return j&&"?"!==j[0]?"?"+j:j}let Y=(()=>{class j{historyGo(oe){throw new Error("Not implemented")}}return j.\u0275fac=function(oe){return new(oe||j)},j.\u0275prov=n.Yz7({token:j,factory:function(){return(0,n.f3M)(te)},providedIn:"root"}),j})();const G=new n.OlP("appBaseHref");let te=(()=>{class j extends Y{constructor(oe,Re){super(),this._platformLocation=oe,this._removeListenerFns=[],this._baseHref=Re??this._platformLocation.getBaseHrefFromDOM()??(0,n.f3M)(O).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(oe){this._removeListenerFns.push(this._platformLocation.onPopState(oe),this._platformLocation.onHashChange(oe))}getBaseHref(){return this._baseHref}prepareExternalUrl(oe){return z(this._baseHref,oe)}path(oe=!1){const Re=this._platformLocation.pathname+X(this._platformLocation.search),ct=this._platformLocation.hash;return ct&&oe?`${Re}${ct}`:Re}pushState(oe,Re,ct,Kt){const ln=this.prepareExternalUrl(ct+X(Kt));this._platformLocation.pushState(oe,Re,ln)}replaceState(oe,Re,ct,Kt){const ln=this.prepareExternalUrl(ct+X(Kt));this._platformLocation.replaceState(oe,Re,ln)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(oe=0){this._platformLocation.historyGo?.(oe)}}return j.\u0275fac=function(oe){return new(oe||j)(n.LFG(N),n.LFG(G,8))},j.\u0275prov=n.Yz7({token:j,factory:j.\u0275fac,providedIn:"root"}),j})(),pe=(()=>{class j extends Y{constructor(oe,Re){super(),this._platformLocation=oe,this._baseHref="",this._removeListenerFns=[],null!=Re&&(this._baseHref=Re)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(oe){this._removeListenerFns.push(this._platformLocation.onPopState(oe),this._platformLocation.onHashChange(oe))}getBaseHref(){return this._baseHref}path(oe=!1){let Re=this._platformLocation.hash;return null==Re&&(Re="#"),Re.length>0?Re.substring(1):Re}prepareExternalUrl(oe){const Re=z(this._baseHref,oe);return Re.length>0?"#"+Re:Re}pushState(oe,Re,ct,Kt){let ln=this.prepareExternalUrl(ct+X(Kt));0==ln.length&&(ln=this._platformLocation.pathname),this._platformLocation.pushState(oe,Re,ln)}replaceState(oe,Re,ct,Kt){let ln=this.prepareExternalUrl(ct+X(Kt));0==ln.length&&(ln=this._platformLocation.pathname),this._platformLocation.replaceState(oe,Re,ln)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(oe=0){this._platformLocation.historyGo?.(oe)}}return j.\u0275fac=function(oe){return new(oe||j)(n.LFG(N),n.LFG(G,8))},j.\u0275prov=n.Yz7({token:j,factory:j.\u0275fac}),j})(),ve=(()=>{class j{constructor(oe){this._subject=new n.vpe,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=oe;const Re=this._locationStrategy.getBaseHref();this._basePath=function We(j){if(new RegExp("^(https?:)?//").test(j)){const[,oe]=j.split(/\/\/[^\/]+/);return oe}return j}(ce(Ve(Re))),this._locationStrategy.onPopState(ct=>{this._subject.emit({url:this.path(!0),pop:!0,state:ct.state,type:ct.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(oe=!1){return this.normalize(this._locationStrategy.path(oe))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(oe,Re=""){return this.path()==this.normalize(oe+X(Re))}normalize(oe){return j.stripTrailingSlash(function we(j,ge){if(!j||!ge.startsWith(j))return ge;const oe=ge.substring(j.length);return""===oe||["/",";","?","#"].includes(oe[0])?oe:ge}(this._basePath,Ve(oe)))}prepareExternalUrl(oe){return oe&&"/"!==oe[0]&&(oe="/"+oe),this._locationStrategy.prepareExternalUrl(oe)}go(oe,Re="",ct=null){this._locationStrategy.pushState(ct,"",oe,Re),this._notifyUrlChangeListeners(this.prepareExternalUrl(oe+X(Re)),ct)}replaceState(oe,Re="",ct=null){this._locationStrategy.replaceState(ct,"",oe,Re),this._notifyUrlChangeListeners(this.prepareExternalUrl(oe+X(Re)),ct)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(oe=0){this._locationStrategy.historyGo?.(oe)}onUrlChange(oe){return this._urlChangeListeners.push(oe),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(Re=>{this._notifyUrlChangeListeners(Re.url,Re.state)})),()=>{const Re=this._urlChangeListeners.indexOf(oe);this._urlChangeListeners.splice(Re,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(oe="",Re){this._urlChangeListeners.forEach(ct=>ct(oe,Re))}subscribe(oe,Re,ct){return this._subject.subscribe({next:oe,error:Re,complete:ct})}}return j.normalizeQueryParams=X,j.joinWithSlash=z,j.stripTrailingSlash=ce,j.\u0275fac=function(oe){return new(oe||j)(n.LFG(Y))},j.\u0275prov=n.Yz7({token:j,factory:function(){return function Ie(){return new ve((0,n.LFG)(Y))}()},providedIn:"root"}),j})();function Ve(j){return j.replace(/\/index.html$/,"")}const Se={ADP:[void 0,void 0,0],AFN:[void 0,"\u060b",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058f",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20bc"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GHS:[void 0,"GH\u20b5"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202fCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]};var Me=(()=>((Me=Me||{})[Me.Decimal=0]="Decimal",Me[Me.Percent=1]="Percent",Me[Me.Currency=2]="Currency",Me[Me.Scientific=3]="Scientific",Me))(),Fe=(()=>((Fe=Fe||{})[Fe.Format=0]="Format",Fe[Fe.Standalone=1]="Standalone",Fe))(),Ee=(()=>((Ee=Ee||{})[Ee.Narrow=0]="Narrow",Ee[Ee.Abbreviated=1]="Abbreviated",Ee[Ee.Wide=2]="Wide",Ee[Ee.Short=3]="Short",Ee))(),ae=(()=>((ae=ae||{})[ae.Short=0]="Short",ae[ae.Medium=1]="Medium",ae[ae.Long=2]="Long",ae[ae.Full=3]="Full",ae))(),me=(()=>((me=me||{})[me.Decimal=0]="Decimal",me[me.Group=1]="Group",me[me.List=2]="List",me[me.PercentSign=3]="PercentSign",me[me.PlusSign=4]="PlusSign",me[me.MinusSign=5]="MinusSign",me[me.Exponential=6]="Exponential",me[me.SuperscriptingExponent=7]="SuperscriptingExponent",me[me.PerMille=8]="PerMille",me[me.Infinity=9]="Infinity",me[me.NaN=10]="NaN",me[me.TimeSeparator=11]="TimeSeparator",me[me.CurrencyDecimal=12]="CurrencyDecimal",me[me.CurrencyGroup=13]="CurrencyGroup",me))();function ut(j,ge){return Mn((0,n.cg1)(j)[n.wAp.DateFormat],ge)}function pt(j,ge){return Mn((0,n.cg1)(j)[n.wAp.TimeFormat],ge)}function $t(j,ge){return Mn((0,n.cg1)(j)[n.wAp.DateTimeFormat],ge)}function bt(j,ge){const oe=(0,n.cg1)(j),Re=oe[n.wAp.NumberSymbols][ge];if(typeof Re>"u"){if(ge===me.CurrencyDecimal)return oe[n.wAp.NumberSymbols][me.Decimal];if(ge===me.CurrencyGroup)return oe[n.wAp.NumberSymbols][me.Group]}return Re}function St(j,ge){return(0,n.cg1)(j)[n.wAp.NumberFormats][ge]}function Sn(j){if(!j[n.wAp.ExtraData])throw new Error(`Missing extra locale data for the locale "${j[n.wAp.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Mn(j,ge){for(let oe=ge;oe>-1;oe--)if(typeof j[oe]<"u")return j[oe];throw new Error("Locale data API: locale data undefined")}function Fn(j){const[ge,oe]=j.split(":");return{hours:+ge,minutes:+oe}}const Wn=2,Vn=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,sr={},Tr=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var bn=(()=>((bn=bn||{})[bn.Short=0]="Short",bn[bn.ShortGMT=1]="ShortGMT",bn[bn.Long=2]="Long",bn[bn.Extended=3]="Extended",bn))(),pn=(()=>((pn=pn||{})[pn.FullYear=0]="FullYear",pn[pn.Month=1]="Month",pn[pn.Date=2]="Date",pn[pn.Hours=3]="Hours",pn[pn.Minutes=4]="Minutes",pn[pn.Seconds=5]="Seconds",pn[pn.FractionalSeconds=6]="FractionalSeconds",pn[pn.Day=7]="Day",pn))(),en=(()=>((en=en||{})[en.DayPeriods=0]="DayPeriods",en[en.Days=1]="Days",en[en.Months=2]="Months",en[en.Eras=3]="Eras",en))();function Ut(j,ge,oe,Re){let ct=function dt(j){if(nn(j))return j;if("number"==typeof j&&!isNaN(j))return new Date(j);if("string"==typeof j){if(j=j.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(j)){const[ct,Kt=1,ln=1]=j.split("-").map(In=>+In);return xt(ct,Kt-1,ln)}const oe=parseFloat(j);if(!isNaN(j-oe))return new Date(oe);let Re;if(Re=j.match(Vn))return function Gt(j){const ge=new Date(0);let oe=0,Re=0;const ct=j[8]?ge.setUTCFullYear:ge.setFullYear,Kt=j[8]?ge.setUTCHours:ge.setHours;j[9]&&(oe=Number(j[9]+j[10]),Re=Number(j[9]+j[11])),ct.call(ge,Number(j[1]),Number(j[2])-1,Number(j[3]));const ln=Number(j[4]||0)-oe,In=Number(j[5]||0)-Re,Vr=Number(j[6]||0),Wr=Math.floor(1e3*parseFloat("0."+(j[7]||0)));return Kt.call(ge,ln,In,Vr,Wr),ge}(Re)}const ge=new Date(j);if(!nn(ge))throw new Error(`Unable to convert "${j}" into a date`);return ge}(j);ge=qe(oe,ge)||ge;let In,ln=[];for(;ge;){if(In=Tr.exec(ge),!In){ln.push(ge);break}{ln=ln.concat(In.slice(1));const si=ln.pop();if(!si)break;ge=si}}let Vr=ct.getTimezoneOffset();Re&&(Vr=Te(Re,Vr),ct=function ft(j,ge,oe){const Re=oe?-1:1,ct=j.getTimezoneOffset();return function Ye(j,ge){return(j=new Date(j.getTime())).setMinutes(j.getMinutes()+ge),j}(j,Re*(Te(ge,ct)-ct))}(ct,Re,!0));let Wr="";return ln.forEach(si=>{const Yr=function rt(j){if(vr[j])return vr[j];let ge;switch(j){case"G":case"GG":case"GGG":ge=Pn(en.Eras,Ee.Abbreviated);break;case"GGGG":ge=Pn(en.Eras,Ee.Wide);break;case"GGGGG":ge=Pn(en.Eras,Ee.Narrow);break;case"y":ge=be(pn.FullYear,1,0,!1,!0);break;case"yy":ge=be(pn.FullYear,2,0,!0,!0);break;case"yyy":ge=be(pn.FullYear,3,0,!1,!0);break;case"yyyy":ge=be(pn.FullYear,4,0,!1,!0);break;case"Y":ge=kn(1);break;case"YY":ge=kn(2,!0);break;case"YYY":ge=kn(3);break;case"YYYY":ge=kn(4);break;case"M":case"L":ge=be(pn.Month,1,1);break;case"MM":case"LL":ge=be(pn.Month,2,1);break;case"MMM":ge=Pn(en.Months,Ee.Abbreviated);break;case"MMMM":ge=Pn(en.Months,Ee.Wide);break;case"MMMMM":ge=Pn(en.Months,Ee.Narrow);break;case"LLL":ge=Pn(en.Months,Ee.Abbreviated,Fe.Standalone);break;case"LLLL":ge=Pn(en.Months,Ee.Wide,Fe.Standalone);break;case"LLLLL":ge=Pn(en.Months,Ee.Narrow,Fe.Standalone);break;case"w":ge=wn(1);break;case"ww":ge=wn(2);break;case"W":ge=wn(1,!0);break;case"d":ge=be(pn.Date,1);break;case"dd":ge=be(pn.Date,2);break;case"c":case"cc":ge=be(pn.Day,1);break;case"ccc":ge=Pn(en.Days,Ee.Abbreviated,Fe.Standalone);break;case"cccc":ge=Pn(en.Days,Ee.Wide,Fe.Standalone);break;case"ccccc":ge=Pn(en.Days,Ee.Narrow,Fe.Standalone);break;case"cccccc":ge=Pn(en.Days,Ee.Short,Fe.Standalone);break;case"E":case"EE":case"EEE":ge=Pn(en.Days,Ee.Abbreviated);break;case"EEEE":ge=Pn(en.Days,Ee.Wide);break;case"EEEEE":ge=Pn(en.Days,Ee.Narrow);break;case"EEEEEE":ge=Pn(en.Days,Ee.Short);break;case"a":case"aa":case"aaa":ge=Pn(en.DayPeriods,Ee.Abbreviated);break;case"aaaa":ge=Pn(en.DayPeriods,Ee.Wide);break;case"aaaaa":ge=Pn(en.DayPeriods,Ee.Narrow);break;case"b":case"bb":case"bbb":ge=Pn(en.DayPeriods,Ee.Abbreviated,Fe.Standalone,!0);break;case"bbbb":ge=Pn(en.DayPeriods,Ee.Wide,Fe.Standalone,!0);break;case"bbbbb":ge=Pn(en.DayPeriods,Ee.Narrow,Fe.Standalone,!0);break;case"B":case"BB":case"BBB":ge=Pn(en.DayPeriods,Ee.Abbreviated,Fe.Format,!0);break;case"BBBB":ge=Pn(en.DayPeriods,Ee.Wide,Fe.Format,!0);break;case"BBBBB":ge=Pn(en.DayPeriods,Ee.Narrow,Fe.Format,!0);break;case"h":ge=be(pn.Hours,1,-12);break;case"hh":ge=be(pn.Hours,2,-12);break;case"H":ge=be(pn.Hours,1);break;case"HH":ge=be(pn.Hours,2);break;case"m":ge=be(pn.Minutes,1);break;case"mm":ge=be(pn.Minutes,2);break;case"s":ge=be(pn.Seconds,1);break;case"ss":ge=be(pn.Seconds,2);break;case"S":ge=be(pn.FractionalSeconds,1);break;case"SS":ge=be(pn.FractionalSeconds,2);break;case"SSS":ge=be(pn.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":ge=Ur(bn.Short);break;case"ZZZZZ":ge=Ur(bn.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":ge=Ur(bn.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":ge=Ur(bn.Long);break;default:return null}return vr[j]=ge,ge}(si);Wr+=Yr?Yr(ct,oe,Vr):"''"===si?"'":si.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),Wr}function xt(j,ge,oe){const Re=new Date(0);return Re.setFullYear(j,ge,oe),Re.setHours(0,0,0),Re}function qe(j,ge){const oe=function ue(j){return(0,n.cg1)(j)[n.wAp.LocaleId]}(j);if(sr[oe]=sr[oe]||{},sr[oe][ge])return sr[oe][ge];let Re="";switch(ge){case"shortDate":Re=ut(j,ae.Short);break;case"mediumDate":Re=ut(j,ae.Medium);break;case"longDate":Re=ut(j,ae.Long);break;case"fullDate":Re=ut(j,ae.Full);break;case"shortTime":Re=pt(j,ae.Short);break;case"mediumTime":Re=pt(j,ae.Medium);break;case"longTime":Re=pt(j,ae.Long);break;case"fullTime":Re=pt(j,ae.Full);break;case"short":const ct=qe(j,"shortTime"),Kt=qe(j,"shortDate");Re=$e($t(j,ae.Short),[ct,Kt]);break;case"medium":const ln=qe(j,"mediumTime"),In=qe(j,"mediumDate");Re=$e($t(j,ae.Medium),[ln,In]);break;case"long":const Vr=qe(j,"longTime"),Wr=qe(j,"longDate");Re=$e($t(j,ae.Long),[Vr,Wr]);break;case"full":const si=qe(j,"fullTime"),Yr=qe(j,"fullDate");Re=$e($t(j,ae.Full),[si,Yr])}return Re&&(sr[oe][ge]=Re),Re}function $e(j,ge){return ge&&(j=j.replace(/\{([^}]+)}/g,function(oe,Re){return null!=ge&&Re in ge?ge[Re]:oe})),j}function T(j,ge,oe="-",Re,ct){let Kt="";(j<0||ct&&j<=0)&&(ct?j=1-j:(j=-j,Kt=oe));let ln=String(j);for(;ln.length0||In>-oe)&&(In+=oe),j===pn.Hours)0===In&&-12===oe&&(In=12);else if(j===pn.FractionalSeconds)return function F(j,ge){return T(j,3).substring(0,ge)}(In,ge);const Vr=bt(ln,me.MinusSign);return T(In,ge,Vr,Re,ct)}}function Pn(j,ge,oe=Fe.Format,Re=!1){return function(ct,Kt){return function _r(j,ge,oe,Re,ct,Kt){switch(oe){case en.Months:return function st(j,ge,oe){const Re=(0,n.cg1)(j),Kt=Mn([Re[n.wAp.MonthsFormat],Re[n.wAp.MonthsStandalone]],ge);return Mn(Kt,oe)}(ge,ct,Re)[j.getMonth()];case en.Days:return function xe(j,ge,oe){const Re=(0,n.cg1)(j),Kt=Mn([Re[n.wAp.DaysFormat],Re[n.wAp.DaysStandalone]],ge);return Mn(Kt,oe)}(ge,ct,Re)[j.getDay()];case en.DayPeriods:const ln=j.getHours(),In=j.getMinutes();if(Kt){const Wr=function cr(j){const ge=(0,n.cg1)(j);return Sn(ge),(ge[n.wAp.ExtraData][2]||[]).map(Re=>"string"==typeof Re?Fn(Re):[Fn(Re[0]),Fn(Re[1])])}(ge),si=function Dn(j,ge,oe){const Re=(0,n.cg1)(j);Sn(Re);const Kt=Mn([Re[n.wAp.ExtraData][0],Re[n.wAp.ExtraData][1]],ge)||[];return Mn(Kt,oe)||[]}(ge,ct,Re),Yr=Wr.findIndex(Fr=>{if(Array.isArray(Fr)){const[On,bi]=Fr,ms=ln>=On.hours&&In>=On.minutes,Nr=ln0?Math.floor(ct/60):Math.ceil(ct/60);switch(j){case bn.Short:return(ct>=0?"+":"")+T(ln,2,Kt)+T(Math.abs(ct%60),2,Kt);case bn.ShortGMT:return"GMT"+(ct>=0?"+":"")+T(ln,1,Kt);case bn.Long:return"GMT"+(ct>=0?"+":"")+T(ln,2,Kt)+":"+T(Math.abs(ct%60),2,Kt);case bn.Extended:return 0===Re?"Z":(ct>=0?"+":"")+T(ln,2,Kt)+":"+T(Math.abs(ct%60),2,Kt);default:throw new Error(`Unknown zone width "${j}"`)}}}const Ht=0,At=4;function sn(j){return xt(j.getFullYear(),j.getMonth(),j.getDate()+(At-j.getDay()))}function wn(j,ge=!1){return function(oe,Re){let ct;if(ge){const Kt=new Date(oe.getFullYear(),oe.getMonth(),1).getDay()-1,ln=oe.getDate();ct=1+Math.floor((ln+Kt)/7)}else{const Kt=sn(oe),ln=function Xt(j){const ge=xt(j,Ht,1).getDay();return xt(j,0,1+(ge<=At?At:At+7)-ge)}(Kt.getFullYear()),In=Kt.getTime()-ln.getTime();ct=1+Math.round(In/6048e5)}return T(ct,j,bt(Re,me.MinusSign))}}function kn(j,ge=!1){return function(oe,Re){return T(sn(oe).getFullYear(),j,bt(Re,me.MinusSign),ge)}}const vr={};function Te(j,ge){j=j.replace(/:/g,"");const oe=Date.parse("Jan 01, 1970 00:00:00 "+j)/6e4;return isNaN(oe)?ge:oe}function nn(j){return j instanceof Date&&!isNaN(j.valueOf())}const En=/^(\d+)?\.((\d+)(-(\d+))?)?$/,yn=22,Gn=".",gt="0",lt=";",He=",",nt="#",mt="\xa4";function Cn(j,ge,oe,Re,ct,Kt,ln=!1){let In="",Vr=!1;if(isFinite(j)){let Wr=function tn(j){let Re,ct,Kt,ln,In,ge=Math.abs(j)+"",oe=0;for((ct=ge.indexOf(Gn))>-1&&(ge=ge.replace(Gn,"")),(Kt=ge.search(/e/i))>0?(ct<0&&(ct=Kt),ct+=+ge.slice(Kt+1),ge=ge.substring(0,Kt)):ct<0&&(ct=ge.length),Kt=0;ge.charAt(Kt)===gt;Kt++);if(Kt===(In=ge.length))Re=[0],ct=1;else{for(In--;ge.charAt(In)===gt;)In--;for(ct-=Kt,Re=[],ln=0;Kt<=In;Kt++,ln++)Re[ln]=Number(ge.charAt(Kt))}return ct>yn&&(Re=Re.splice(0,yn-1),oe=ct-1,ct=1),{digits:Re,exponent:oe,integerLen:ct}}(j);ln&&(Wr=function zt(j){if(0===j.digits[0])return j;const ge=j.digits.length-j.integerLen;return j.exponent?j.exponent+=2:(0===ge?j.digits.push(0,0):1===ge&&j.digits.push(0),j.integerLen+=2),j}(Wr));let si=ge.minInt,Yr=ge.minFrac,Fr=ge.maxFrac;if(Kt){const Os=Kt.match(En);if(null===Os)throw new Error(`${Kt} is not a valid digit info`);const Rr=Os[1],al=Os[3],ui=Os[5];null!=Rr&&(si=Er(Rr)),null!=al&&(Yr=Er(al)),null!=ui?Fr=Er(ui):null!=al&&Yr>Fr&&(Fr=Yr)}!function xn(j,ge,oe){if(ge>oe)throw new Error(`The minimum number of digits after fraction (${ge}) is higher than the maximum (${oe}).`);let Re=j.digits,ct=Re.length-j.integerLen;const Kt=Math.min(Math.max(ge,ct),oe);let ln=Kt+j.integerLen,In=Re[ln];if(ln>0){Re.splice(Math.max(j.integerLen,ln));for(let Yr=ln;Yr=5)if(ln-1<0){for(let Yr=0;Yr>ln;Yr--)Re.unshift(0),j.integerLen++;Re.unshift(1),j.integerLen++}else Re[ln-1]++;for(;ct=Wr?bi.pop():Vr=!1),Fr>=10?1:0},0);si&&(Re.unshift(si),j.integerLen++)}(Wr,Yr,Fr);let On=Wr.digits,bi=Wr.integerLen;const ms=Wr.exponent;let Nr=[];for(Vr=On.every(Os=>!Os);bi0?Nr=On.splice(bi,On.length):(Nr=On,On=[0]);const Hn=[];for(On.length>=ge.lgSize&&Hn.unshift(On.splice(-ge.lgSize,On.length).join(""));On.length>ge.gSize;)Hn.unshift(On.splice(-ge.gSize,On.length).join(""));On.length&&Hn.unshift(On.join("")),In=Hn.join(bt(oe,Re)),Nr.length&&(In+=bt(oe,ct)+Nr.join("")),ms&&(In+=bt(oe,me.Exponential)+"+"+ms)}else In=bt(oe,me.Infinity);return In=j<0&&!Vr?ge.negPre+In+ge.negSuf:ge.posPre+In+ge.posSuf,In}function Ct(j,ge="-"){const oe={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},Re=j.split(lt),ct=Re[0],Kt=Re[1],ln=-1!==ct.indexOf(Gn)?ct.split(Gn):[ct.substring(0,ct.lastIndexOf(gt)+1),ct.substring(ct.lastIndexOf(gt)+1)],In=ln[0],Vr=ln[1]||"";oe.posPre=In.substring(0,In.indexOf(nt));for(let si=0;si{class j{constructor(oe,Re,ct,Kt){this._iterableDiffers=oe,this._keyValueDiffers=Re,this._ngEl=ct,this._renderer=Kt,this.initialClasses=mn,this.stateMap=new Map}set klass(oe){this.initialClasses=null!=oe?oe.trim().split(li):mn}set ngClass(oe){this.rawClass="string"==typeof oe?oe.trim().split(li):oe}ngDoCheck(){for(const Re of this.initialClasses)this._updateState(Re,!0);const oe=this.rawClass;if(Array.isArray(oe)||oe instanceof Set)for(const Re of oe)this._updateState(Re,!0);else if(null!=oe)for(const Re of Object.keys(oe))this._updateState(Re,Boolean(oe[Re]));this._applyStateDiff()}_updateState(oe,Re){const ct=this.stateMap.get(oe);void 0!==ct?(ct.enabled!==Re&&(ct.changed=!0,ct.enabled=Re),ct.touched=!0):this.stateMap.set(oe,{enabled:Re,changed:!0,touched:!0})}_applyStateDiff(){for(const oe of this.stateMap){const Re=oe[0],ct=oe[1];ct.changed?(this._toggleClass(Re,ct.enabled),ct.changed=!1):ct.touched||(ct.enabled&&this._toggleClass(Re,!1),this.stateMap.delete(Re)),ct.touched=!1}}_toggleClass(oe,Re){(oe=oe.trim()).length>0&&oe.split(li).forEach(ct=>{Re?this._renderer.addClass(this._ngEl.nativeElement,ct):this._renderer.removeClass(this._ngEl.nativeElement,ct)})}}return j.\u0275fac=function(oe){return new(oe||j)(n.Y36(n.ZZ4),n.Y36(n.aQg),n.Y36(n.SBq),n.Y36(n.Qsj))},j.\u0275dir=n.lG2({type:j,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),j})();class _t{constructor(ge,oe,Re,ct){this.$implicit=ge,this.ngForOf=oe,this.index=Re,this.count=ct}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let le=(()=>{class j{set ngForOf(oe){this._ngForOf=oe,this._ngForOfDirty=!0}set ngForTrackBy(oe){this._trackByFn=oe}get ngForTrackBy(){return this._trackByFn}constructor(oe,Re,ct){this._viewContainer=oe,this._template=Re,this._differs=ct,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(oe){oe&&(this._template=oe)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const oe=this._ngForOf;!this._differ&&oe&&(this._differ=this._differs.find(oe).create(this.ngForTrackBy))}if(this._differ){const oe=this._differ.diff(this._ngForOf);oe&&this._applyChanges(oe)}}_applyChanges(oe){const Re=this._viewContainer;oe.forEachOperation((ct,Kt,ln)=>{if(null==ct.previousIndex)Re.createEmbeddedView(this._template,new _t(ct.item,this._ngForOf,-1,-1),null===ln?void 0:ln);else if(null==ln)Re.remove(null===Kt?void 0:Kt);else if(null!==Kt){const In=Re.get(Kt);Re.move(In,ln),ye(In,ct)}});for(let ct=0,Kt=Re.length;ct{ye(Re.get(ct.currentIndex),ct)})}static ngTemplateContextGuard(oe,Re){return!0}}return j.\u0275fac=function(oe){return new(oe||j)(n.Y36(n.s_b),n.Y36(n.Rgc),n.Y36(n.ZZ4))},j.\u0275dir=n.lG2({type:j,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),j})();function ye(j,ge){j.context.$implicit=ge.item}let tt=(()=>{class j{constructor(oe,Re){this._viewContainer=oe,this._context=new Pe,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=Re}set ngIf(oe){this._context.$implicit=this._context.ngIf=oe,this._updateView()}set ngIfThen(oe){Je("ngIfThen",oe),this._thenTemplateRef=oe,this._thenViewRef=null,this._updateView()}set ngIfElse(oe){Je("ngIfElse",oe),this._elseTemplateRef=oe,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(oe,Re){return!0}}return j.\u0275fac=function(oe){return new(oe||j)(n.Y36(n.s_b),n.Y36(n.Rgc))},j.\u0275dir=n.lG2({type:j,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),j})();class Pe{constructor(){this.$implicit=null,this.ngIf=null}}function Je(j,ge){if(ge&&!ge.createEmbeddedView)throw new Error(`${j} must be a TemplateRef, but received '${(0,n.AaK)(ge)}'.`)}let xr=(()=>{class j{constructor(oe,Re,ct){this._ngEl=oe,this._differs=Re,this._renderer=ct,this._ngStyle=null,this._differ=null}set ngStyle(oe){this._ngStyle=oe,!this._differ&&oe&&(this._differ=this._differs.find(oe).create())}ngDoCheck(){if(this._differ){const oe=this._differ.diff(this._ngStyle);oe&&this._applyChanges(oe)}}_setStyle(oe,Re){const[ct,Kt]=oe.split("."),ln=-1===ct.indexOf("-")?void 0:n.JOm.DashCase;null!=Re?this._renderer.setStyle(this._ngEl.nativeElement,ct,Kt?`${Re}${Kt}`:Re,ln):this._renderer.removeStyle(this._ngEl.nativeElement,ct,ln)}_applyChanges(oe){oe.forEachRemovedItem(Re=>this._setStyle(Re.key,null)),oe.forEachAddedItem(Re=>this._setStyle(Re.key,Re.currentValue)),oe.forEachChangedItem(Re=>this._setStyle(Re.key,Re.currentValue))}}return j.\u0275fac=function(oe){return new(oe||j)(n.Y36(n.SBq),n.Y36(n.aQg),n.Y36(n.Qsj))},j.\u0275dir=n.lG2({type:j,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),j})(),Oi=(()=>{class j{constructor(oe){this._viewContainerRef=oe,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(oe){if(oe.ngTemplateOutlet||oe.ngTemplateOutletInjector){const Re=this._viewContainerRef;if(this._viewRef&&Re.remove(Re.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:ct,ngTemplateOutletContext:Kt,ngTemplateOutletInjector:ln}=this;this._viewRef=Re.createEmbeddedView(ct,Kt,ln?{injector:ln}:void 0)}else this._viewRef=null}else this._viewRef&&oe.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return j.\u0275fac=function(oe){return new(oe||j)(n.Y36(n.s_b))},j.\u0275dir=n.lG2({type:j,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[n.TTD]}),j})();function ri(j,ge){return new n.vHH(2100,!1)}class Ji{createSubscription(ge,oe){return ge.subscribe({next:oe,error:Re=>{throw Re}})}dispose(ge){ge.unsubscribe()}}class is{createSubscription(ge,oe){return ge.then(oe,Re=>{throw Re})}dispose(ge){}}const Wi=new is,Vi=new Ji;let Pi=(()=>{class j{constructor(oe){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=oe}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(oe){return this._obj?oe!==this._obj?(this._dispose(),this.transform(oe)):this._latestValue:(oe&&this._subscribe(oe),this._latestValue)}_subscribe(oe){this._obj=oe,this._strategy=this._selectStrategy(oe),this._subscription=this._strategy.createSubscription(oe,Re=>this._updateLatestValue(oe,Re))}_selectStrategy(oe){if((0,n.QGY)(oe))return Wi;if((0,n.F4k)(oe))return Vi;throw ri()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(oe,Re){oe===this._obj&&(this._latestValue=Re,this._ref.markForCheck())}}return j.\u0275fac=function(oe){return new(oe||j)(n.Y36(n.sBO,16))},j.\u0275pipe=n.Yjl({name:"async",type:j,pure:!1,standalone:!0}),j})();const Yi=new n.OlP("DATE_PIPE_DEFAULT_TIMEZONE"),kr=new n.OlP("DATE_PIPE_DEFAULT_OPTIONS");let Qr=(()=>{class j{constructor(oe,Re,ct){this.locale=oe,this.defaultTimezone=Re,this.defaultOptions=ct}transform(oe,Re,ct,Kt){if(null==oe||""===oe||oe!=oe)return null;try{return Ut(oe,Re??this.defaultOptions?.dateFormat??"mediumDate",Kt||this.locale,ct??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(ln){throw ri()}}}return j.\u0275fac=function(oe){return new(oe||j)(n.Y36(n.soG,16),n.Y36(Yi,24),n.Y36(kr,24))},j.\u0275pipe=n.Yjl({name:"date",type:j,pure:!0,standalone:!0}),j})(),gi=(()=>{class j{constructor(oe){this.differs=oe,this.keyValues=[],this.compareFn=vs}transform(oe,Re=vs){if(!oe||!(oe instanceof Map)&&"object"!=typeof oe)return null;this.differ||(this.differ=this.differs.find(oe).create());const ct=this.differ.diff(oe),Kt=Re!==this.compareFn;return ct&&(this.keyValues=[],ct.forEachItem(ln=>{this.keyValues.push(function br(j,ge){return{key:j,value:ge}}(ln.key,ln.currentValue))})),(ct||Kt)&&(this.keyValues.sort(Re),this.compareFn=Re),this.keyValues}}return j.\u0275fac=function(oe){return new(oe||j)(n.Y36(n.aQg,16))},j.\u0275pipe=n.Yjl({name:"keyvalue",type:j,pure:!1,standalone:!0}),j})();function vs(j,ge){const oe=j.key,Re=ge.key;if(oe===Re)return 0;if(void 0===oe)return 1;if(void 0===Re)return-1;if(null===oe)return 1;if(null===Re)return-1;if("string"==typeof oe&&"string"==typeof Re)return oe{class j{constructor(oe){this._locale=oe}transform(oe,Re,ct){if(!fs(oe))return null;ct=ct||this._locale;try{return function fr(j,ge,oe){return Cn(j,Ct(St(ge,Me.Percent),bt(ge,me.MinusSign)),ge,me.Group,me.Decimal,oe,!0).replace(new RegExp("%","g"),bt(ge,me.PercentSign))}($s(oe),ct,Re)}catch(Kt){throw ri()}}}return j.\u0275fac=function(oe){return new(oe||j)(n.Y36(n.soG,16))},j.\u0275pipe=n.Yjl({name:"percent",type:j,pure:!0,standalone:!0}),j})(),qs=(()=>{class j{constructor(oe,Re="USD"){this._locale=oe,this._defaultCurrencyCode=Re}transform(oe,Re=this._defaultCurrencyCode,ct="symbol",Kt,ln){if(!fs(oe))return null;ln=ln||this._locale,"boolean"==typeof ct&&(ct=ct?"symbol":"code");let In=Re||this._defaultCurrencyCode;"code"!==ct&&(In="symbol"===ct||"symbol-narrow"===ct?function un(j,ge,oe="en"){const Re=function It(j){return(0,n.cg1)(j)[n.wAp.Currencies]}(oe)[j]||Se[j]||[],ct=Re[1];return"narrow"===ge&&"string"==typeof ct?ct:Re[0]||j}(In,"symbol"===ct?"wide":"narrow",ln):ct);try{return function tr(j,ge,oe,Re,ct){const ln=Ct(St(ge,Me.Currency),bt(ge,me.MinusSign));return ln.minFrac=function Zn(j){let ge;const oe=Se[j];return oe&&(ge=oe[2]),"number"==typeof ge?ge:Wn}(Re),ln.maxFrac=ln.minFrac,Cn(j,ln,ge,me.CurrencyGroup,me.CurrencyDecimal,ct).replace(mt,oe).replace(mt,"").trim()}($s(oe),ln,In,Re,Kt)}catch(Vr){throw ri()}}}return j.\u0275fac=function(oe){return new(oe||j)(n.Y36(n.soG,16),n.Y36(n.EJc,16))},j.\u0275pipe=n.Yjl({name:"currency",type:j,pure:!0,standalone:!0}),j})();function fs(j){return!(null==j||""===j||j!=j)}function $s(j){if("string"==typeof j&&!isNaN(Number(j)-parseFloat(j)))return Number(j);if("number"!=typeof j)throw new Error(`${j} is not a number`);return j}let $i=(()=>{class j{}return j.\u0275fac=function(oe){return new(oe||j)},j.\u0275mod=n.oAB({type:j}),j.\u0275inj=n.cJS({}),j})();const hi="browser",Ps="server";function es(j){return j===hi}function _s(j){return j===Ps}let ts=(()=>{class j{}return j.\u0275prov=(0,n.Yz7)({token:j,providedIn:"root",factory:()=>new Ki((0,n.LFG)(O),window)}),j})();class Ki{constructor(ge,oe){this.document=ge,this.window=oe,this.offset=()=>[0,0]}setOffset(ge){this.offset=Array.isArray(ge)?()=>ge:ge}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(ge){this.supportsScrolling()&&this.window.scrollTo(ge[0],ge[1])}scrollToAnchor(ge){if(!this.supportsScrolling())return;const oe=function Ii(j,ge){const oe=j.getElementById(ge)||j.getElementsByName(ge)[0];if(oe)return oe;if("function"==typeof j.createTreeWalker&&j.body&&(j.body.createShadowRoot||j.body.attachShadow)){const Re=j.createTreeWalker(j.body,NodeFilter.SHOW_ELEMENT);let ct=Re.currentNode;for(;ct;){const Kt=ct.shadowRoot;if(Kt){const ln=Kt.getElementById(ge)||Kt.querySelector(`[name="${ge}"]`);if(ln)return ln}ct=Re.nextNode()}}return null}(this.document,ge);oe&&(this.scrollToElement(oe),oe.focus())}setHistoryScrollRestoration(ge){if(this.supportScrollRestoration()){const oe=this.window.history;oe&&oe.scrollRestoration&&(oe.scrollRestoration=ge)}}scrollToElement(ge){const oe=ge.getBoundingClientRect(),Re=oe.left+this.window.pageXOffset,ct=oe.top+this.window.pageYOffset,Kt=this.offset();this.window.scrollTo(Re-Kt[0],ct-Kt[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const ge=qi(this.window.history)||qi(Object.getPrototypeOf(this.window.history));return!(!ge||!ge.writable&&!ge.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function qi(j){return Object.getOwnPropertyDescriptor(j,"scrollRestoration")}class Zi{}},4650:(o,c,u)=>{"use strict";u.d(c,{$8M:()=>Ia,$WT:()=>Jr,$Z:()=>Ef,AFp:()=>b0,ALo:()=>U_,AaK:()=>U,Akn:()=>Na,AsE:()=>xm,BQk:()=>Gf,CHM:()=>S,CRH:()=>Q_,CZH:()=>uy,CqO:()=>ym,D6c:()=>wb,EJc:()=>$C,EpF:()=>wg,F$t:()=>Od,F4k:()=>Tg,FYo:()=>_c,FiY:()=>Bo,G48:()=>ab,Gf:()=>Z_,GfV:()=>Jl,GkF:()=>Hf,Gpc:()=>ee,Gre:()=>Mh,Hsn:()=>Pg,JOm:()=>Hi,KtG:()=>Q,LFG:()=>Ht,LSH:()=>qd,Lbi:()=>LC,Lck:()=>OE,MAs:()=>Vf,MMx:()=>mv,MR2:()=>jc,NdJ:()=>Ih,OlP:()=>vi,Oqu:()=>Ph,P3R:()=>Qh,PXZ:()=>tb,Q6J:()=>Ch,QGY:()=>gm,Qsj:()=>Wm,R0b:()=>nc,RDi:()=>ap,Rgc:()=>Nm,SBq:()=>sl,Sil:()=>GC,Suo:()=>X_,TTD:()=>Ir,TgZ:()=>kd,Udp:()=>wm,W1O:()=>n0,XFs:()=>un,Xpm:()=>Cn,Xts:()=>Du,Y36:()=>tc,YKP:()=>D_,YNc:()=>pm,Yjl:()=>Er,Yz7:()=>bt,Z0I:()=>Et,ZZ4:()=>Uv,_Bn:()=>T_,_UZ:()=>mm,_Vd:()=>Ql,_c5:()=>Ib,_uU:()=>Am,aQg:()=>Gv,c2e:()=>BC,cJS:()=>Yt,cg1:()=>ey,dDg:()=>XC,dqk:()=>bn,eFA:()=>F0,eJc:()=>wv,ekj:()=>nu,eoX:()=>R0,f3M:()=>Xt,g9A:()=>S0,h0i:()=>np,hGG:()=>Sb,hij:()=>Hu,iGM:()=>q_,ifc:()=>nn,ip1:()=>C0,jDz:()=>x_,kL8:()=>ty,kYT:()=>zt,lG2:()=>xn,lcZ:()=>G_,lnq:()=>zu,lqb:()=>il,lri:()=>P0,n5z:()=>sc,oAB:()=>Ct,oxw:()=>_m,q4F:()=>lf,qLn:()=>Ec,qOj:()=>vh,qZA:()=>Uf,rWj:()=>M0,s9C:()=>Fs,sBO:()=>lb,s_b:()=>ay,soG:()=>dy,tb:()=>w0,tp0:()=>Da,uIk:()=>Eh,vHH:()=>G,vpe:()=>ou,wAp:()=>Lr,xi3:()=>H_,xp6:()=>gf,ynx:()=>bh,z2F:()=>hy,zSh:()=>od,zs3:()=>Bt});var n=u(7579),g=u(727),d=u(9751),A=u(6451),R=u(3099);function O(r){for(let i in r)if(r[i]===O)return i;throw Error("Could not find renamed property on target object.")}function N(r,i){for(const a in i)i.hasOwnProperty(a)&&!r.hasOwnProperty(a)&&(r[a]=i[a])}function U(r){if("string"==typeof r)return r;if(Array.isArray(r))return"["+r.map(U).join(", ")+"]";if(null==r)return""+r;if(r.overriddenName)return`${r.overriddenName}`;if(r.name)return`${r.name}`;const i=r.toString();if(null==i)return""+i;const a=i.indexOf("\n");return-1===a?i:i.substring(0,a)}function ie(r,i){return null==r||""===r?null===i?"":i:null==i||""===i?r:r+" "+i}const L=O({__forward_ref__:O});function ee(r){return r.__forward_ref__=ee,r.toString=function(){return U(this())},r}function K(r){return z(r)?r():r}function z(r){return"function"==typeof r&&r.hasOwnProperty(L)&&r.__forward_ref__===ee}function ce(r){return r&&!!r.\u0275providers}const Y="https://g.co/ng/security#xss";class G extends Error{constructor(i,a){super(te(i,a)),this.code=i}}function te(r,i){return`NG0${Math.abs(r)}${i?": "+i.trim():""}`}function pe(r){return"string"==typeof r?r:null==r?"":String(r)}function We(r,i){throw new G(-201,!1)}function ke(r,i){null==r&&function Ge(r,i,a,h){throw new Error(`ASSERTION ERROR: ${r}`+(null==h?"":` [Expected=> ${a} ${h} ${i} <=Actual]`))}(i,r,null,"!=")}function bt(r){return{token:r.token,providedIn:r.providedIn||null,factory:r.factory,value:void 0}}function Yt(r){return{providers:r.providers||[],imports:r.imports||[]}}function kt(r){return It(r,Dn)||It(r,Mn)}function Et(r){return null!==kt(r)}function It(r,i){return r.hasOwnProperty(i)?r[i]:null}function cr(r){return r&&(r.hasOwnProperty(jn)||r.hasOwnProperty(Fn))?r[jn]:null}const Dn=O({\u0275prov:O}),jn=O({\u0275inj:O}),Mn=O({ngInjectableDef:O}),Fn=O({ngInjectorDef:O});var un=(()=>((un=un||{})[un.Default=0]="Default",un[un.Host=1]="Host",un[un.Self=2]="Self",un[un.SkipSelf=4]="SkipSelf",un[un.Optional=8]="Optional",un))();let Wn;function Vn(r){const i=Wn;return Wn=r,i}function sr(r,i,a){const h=kt(r);return h&&"root"==h.providedIn?void 0===h.value?h.value=h.factory():h.value:a&un.Optional?null:void 0!==i?i:void We(U(r))}const bn=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),xt={},qe="__NG_DI_FLAG__",$e="ngTempTokenPath",T="ngTokenPath",F=/\n/gm,be="\u0275",Pt="__source";let Pn;function _r(r){const i=Pn;return Pn=r,i}function Ur(r,i=un.Default){if(void 0===Pn)throw new G(-203,!1);return null===Pn?sr(r,void 0,i):Pn.get(r,i&un.Optional?null:void 0,i)}function Ht(r,i=un.Default){return(function Zn(){return Wn}()||Ur)(K(r),i)}function Xt(r,i=un.Default){return Ht(r,sn(i))}function sn(r){return typeof r>"u"||"number"==typeof r?r:0|(r.optional&&8)|(r.host&&1)|(r.self&&2)|(r.skipSelf&&4)}function wn(r){const i=[];for(let a=0;a((ft=ft||{})[ft.OnPush=0]="OnPush",ft[ft.Default=1]="Default",ft))(),nn=(()=>{return(r=nn||(nn={}))[r.Emulated=0]="Emulated",r[r.None=2]="None",r[r.ShadowDom=3]="ShadowDom",nn;var r})();const En={},yn=[],Gn=O({\u0275cmp:O}),gt=O({\u0275dir:O}),lt=O({\u0275pipe:O}),He=O({\u0275mod:O}),nt=O({\u0275fac:O}),mt=O({__NG_ELEMENT_ID__:O});let qt=0;function Cn(r){return Ye(()=>{const a=!0===r.standalone,h={},_={type:r.type,providersResolver:null,decls:r.decls,vars:r.vars,factory:null,template:r.template||null,consts:r.consts||null,ngContentSelectors:r.ngContentSelectors,hostBindings:r.hostBindings||null,hostVars:r.hostVars||0,hostAttrs:r.hostAttrs||null,contentQueries:r.contentQueries||null,declaredInputs:h,inputs:null,outputs:null,exportAs:r.exportAs||null,onPush:r.changeDetection===ft.OnPush,directiveDefs:null,pipeDefs:null,standalone:a,dependencies:a&&r.dependencies||null,getStandaloneInjector:null,selectors:r.selectors||yn,viewQuery:r.viewQuery||null,features:r.features||null,data:r.data||{},encapsulation:r.encapsulation||nn.Emulated,id:"c"+qt++,styles:r.styles||yn,_:null,setInput:null,schemas:r.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},b=r.dependencies,k=r.features;return _.inputs=tn(r.inputs,h),_.outputs=tn(r.outputs),k&&k.forEach(Z=>Z(_)),_.directiveDefs=b?()=>("function"==typeof b?b():b).map(fr).filter(nr):null,_.pipeDefs=b?()=>("function"==typeof b?b():b).map(Ar).filter(nr):null,_})}function fr(r){return Bn(r)||Cr(r)}function nr(r){return null!==r}function Ct(r){return Ye(()=>({type:r.type,bootstrap:r.bootstrap||yn,declarations:r.declarations||yn,imports:r.imports||yn,exports:r.exports||yn,transitiveCompileScopes:null,schemas:r.schemas||null,id:r.id||null}))}function zt(r,i){return Ye(()=>{const a=Dr(r,!0);a.declarations=i.declarations||yn,a.imports=i.imports||yn,a.exports=i.exports||yn})}function tn(r,i){if(null==r)return En;const a={};for(const h in r)if(r.hasOwnProperty(h)){let _=r[h],b=_;Array.isArray(_)&&(b=_[1],_=_[0]),a[_]=h,i&&(i[_]=b)}return a}const xn=Cn;function Er(r){return{type:r.type,name:r.name,factory:null,pure:!1!==r.pure,standalone:!0===r.standalone,onDestroy:r.type.prototype.ngOnDestroy||null}}function Bn(r){return r[Gn]||null}function Cr(r){return r[gt]||null}function Ar(r){return r[lt]||null}function Jr(r){const i=Bn(r)||Cr(r)||Ar(r);return null!==i&&i.standalone}function Dr(r,i){const a=r[He]||null;if(!a&&!0===i)throw new Error(`Type ${U(r)} does not have '\u0275mod' property.`);return a}const li=0,mn=1,rr=2,Br=3,Gr=4,ni=5,_t=6,le=7,ye=8,ze=9,tt=10,Pe=11,Je=12,vt=13,Mt=14,Vt=15,jt=16,vn=17,$n=18,er=19,xr=20,Oi=21,Mr=22,Ji=1,is=2,Wi=7,Vi=8,Pi=9,di=10;function dr(r){return Array.isArray(r)&&"object"==typeof r[Ji]}function ur(r){return Array.isArray(r)&&!0===r[Ji]}function pr(r){return 0!=(4&r.flags)}function Yi(r){return r.componentOffset>-1}function kr(r){return 1==(1&r.flags)}function Qr(r){return null!==r.template}function xs(r){return 0!=(256&r[rr])}function ps(r,i){return r.hasOwnProperty(nt)?r[nt]:null}class Es{constructor(i,a,h){this.previousValue=i,this.currentValue=a,this.firstChange=h}isFirstChange(){return this.firstChange}}function Ir(){return ts}function ts(r){return r.type.prototype.ngOnChanges&&(r.setInput=qi),Ki}function Ki(){const r=os(this),i=r?.current;if(i){const a=r.previous;if(a===En)r.previous=i;else for(let h in i)a[h]=i[h];r.current=null,this.ngOnChanges(i)}}function qi(r,i,a,h){const _=this.declaredInputs[a],b=os(r)||function Zi(r,i){return r[Ii]=i}(r,{previous:En,current:null}),k=b.current||(b.current={}),Z=b.previous,se=Z[_];k[_]=new Es(se&&se.currentValue,i,Z===En),r[h]=i}Ir.ngInherit=!0;const Ii="__ngSimpleChanges__";function os(r){return r[Ii]||null}const Ui=function(r,i,a){};function Ue(r){for(;Array.isArray(r);)r=r[li];return r}function yt(r,i){return Ue(i[r])}function Rt(r,i){return Ue(i[r.index])}function Tn(r,i){return r.data[i]}function An(r,i){return r[i]}function Or(r,i){const a=i[r];return dr(a)?a:a[li]}function Hr(r){return 64==(64&r[rr])}function Sr(r,i){return null==i?null:r[i]}function Ms(r){r[$n]=0}function Ci(r,i){r[ni]+=i;let a=r,h=r[Br];for(;null!==h&&(1===i&&1===a[ni]||-1===i&&0===a[ni]);)h[ni]+=i,a=h,h=h[Br]}const ar={lFrame:Ml(null),bindingsEnabled:!0};function ro(){return ar.bindingsEnabled}function w(){return ar.lFrame.lView}function v(){return ar.lFrame.tView}function S(r){return ar.lFrame.contextLView=r,r[ye]}function Q(r){return ar.lFrame.contextLView=null,r}function Ze(){let r=Ot();for(;null!==r&&64===r.type;)r=r.parent;return r}function Ot(){return ar.lFrame.currentTNode}function Yn(r,i){const a=ar.lFrame;a.currentTNode=r,a.isParent=i}function Pr(){return ar.lFrame.isParent}function Zr(){ar.lFrame.isParent=!1}function yi(){const r=ar.lFrame;let i=r.bindingRootIndex;return-1===i&&(i=r.bindingRootIndex=r.tView.bindingStartIndex),i}function fi(){return ar.lFrame.bindingIndex}function fo(){return ar.lFrame.bindingIndex++}function Gs(r){const i=ar.lFrame,a=i.bindingIndex;return i.bindingIndex=i.bindingIndex+r,a}function ks(r,i){const a=ar.lFrame;a.bindingIndex=a.bindingRootIndex=r,Xs(i)}function Xs(r){ar.lFrame.currentDirectiveIndex=r}function va(){return ar.lFrame.currentQueryIndex}function mo(r){ar.lFrame.currentQueryIndex=r}function Xo(r){const i=r[mn];return 2===i.type?i.declTNode:1===i.type?r[_t]:null}function Ba(r,i,a){if(a&un.SkipSelf){let _=i,b=r;for(;!(_=_.parent,null!==_||a&un.Host||(_=Xo(b),null===_||(b=b[Vt],10&_.type))););if(null===_)return!1;i=_,r=b}const h=ar.lFrame=Pl();return h.currentTNode=i,h.lView=r,!0}function _a(r){const i=Pl(),a=r[mn];ar.lFrame=i,i.currentTNode=a.firstChild,i.lView=r,i.tView=a,i.contextLView=r,i.bindingIndex=a.bindingStartIndex,i.inI18n=!1}function Pl(){const r=ar.lFrame,i=null===r?null:r.child;return null===i?Ml(r):i}function Ml(r){const i={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:r,child:null,inI18n:!1};return null!==r&&(r.child=i),i}function Va(){const r=ar.lFrame;return ar.lFrame=r.parent,r.currentTNode=null,r.lView=null,r}const rc=Va;function Rl(){const r=Va();r.isParent=!0,r.tView=null,r.selectedIndex=-1,r.contextLView=null,r.elementDepthCount=0,r.currentDirectiveIndex=-1,r.currentNamespace=null,r.bindingRootIndex=-1,r.bindingIndex=-1,r.currentQueryIndex=0}function Ni(){return ar.lFrame.selectedIndex}function Hs(r){ar.lFrame.selectedIndex=r}function ai(){const r=ar.lFrame;return Tn(r.tView,r.selectedIndex)}function Mo(r,i){for(let a=i.directiveStart,h=i.directiveEnd;a=h)break}else i[se]<0&&(r[$n]+=65536),(Z>11>16&&(3&r[rr])===i){r[rr]+=2048,Ui(4,Z,b);try{b.call(Z)}finally{Ui(5,Z,b)}}}else{Ui(4,Z,b);try{b.call(Z)}finally{Ui(5,Z,b)}}}const Re=-1;class ct{constructor(i,a,h){this.factory=i,this.resolving=!1,this.canSeeViewProviders=a,this.injectImpl=h}}function On(r,i,a){let h=0;for(;hi){k=b-1;break}}}for(;b>16}(r),h=i;for(;a>0;)h=h[Vt],a--;return h}let Ln=!0;function Ro(r){const i=Ln;return Ln=r,i}const ko=255,kl=5;let $a=0;const zs={};function Ea(r,i){const a=Qs(r,i);if(-1!==a)return a;const h=i[mn];h.firstCreatePass&&(r.injectorIndex=i.length,ul(h.data,r),ul(i,null),ul(h.blueprint,null));const _=Ss(r,i),b=r.injectorIndex;if(Os(_)){const k=Rr(_),Z=ui(_,i),se=Z[mn].data;for(let _e=0;_e<8;_e++)i[b+_e]=Z[k+_e]|se[k+_e]}return i[b+8]=_,b}function ul(r,i){r.push(0,0,0,0,0,0,0,0,i)}function Qs(r,i){return-1===r.injectorIndex||r.parent&&r.parent.injectorIndex===r.injectorIndex||null===i[r.injectorIndex+8]?-1:r.injectorIndex}function Ss(r,i){if(r.parent&&-1!==r.parent.injectorIndex)return r.parent.injectorIndex;let a=0,h=null,_=i;for(;null!==_;){if(h=oc(_),null===h)return Re;if(a++,_=_[Vt],-1!==h.injectorIndex)return h.injectorIndex|a<<16}return Re}function ic(r,i,a){!function cl(r,i,a){let h;"string"==typeof a?h=a.charCodeAt(0)||0:a.hasOwnProperty(mt)&&(h=a[mt]),null==h&&(h=a[mt]=$a++);const _=h&ko;i.data[r+(_>>kl)]|=1<<_}(r,i,a)}function Oo(r,i,a){if(a&un.Optional||void 0!==r)return r;We()}function dl(r,i,a,h){if(a&un.Optional&&void 0===h&&(h=null),!(a&(un.Self|un.Host))){const _=r[ze],b=Vn(void 0);try{return _?_.get(i,h,a&un.Optional):sr(i,h,a&un.Optional)}finally{Vn(b)}}return Oo(h,0,a)}function Lt(r,i,a,h=un.Default,_){if(null!==r){if(1024&i[rr]){const k=function Ws(r,i,a,h,_){let b=r,k=i;for(;null!==b&&null!==k&&1024&k[rr]&&!(256&k[rr]);){const Z=ba(b,k,a,h|un.Self,zs);if(Z!==zs)return Z;let se=b.parent;if(!se){const _e=k[Oi];if(_e){const Oe=_e.get(a,zs,h);if(Oe!==zs)return Oe}se=oc(k),k=k[Vt]}b=se}return _}(r,i,a,h,zs);if(k!==zs)return k}const b=ba(r,i,a,h,zs);if(b!==zs)return b}return dl(i,a,h,_)}function ba(r,i,a,h,_){const b=function Jo(r){if("string"==typeof r)return r.charCodeAt(0)||0;const i=r.hasOwnProperty(mt)?r[mt]:void 0;return"number"==typeof i?i>=0?i&ko:Ac:i}(a);if("function"==typeof b){if(!Ba(i,r,h))return h&un.Host?Oo(_,0,h):dl(i,a,h,_);try{const k=b(h);if(null!=k||h&un.Optional)return k;We()}finally{rc()}}else if("number"==typeof b){let k=null,Z=Qs(r,i),se=Re,_e=h&un.Host?i[jt][_t]:null;for((-1===Z||h&un.SkipSelf)&&(se=-1===Z?Ss(r,i):i[Z+8],se!==Re&&vo(h,!1)?(k=i[mn],Z=Rr(se),i=ui(se,i)):Z=-1);-1!==Z;){const Oe=i[mn];if(Js(b,Z,Oe.data)){const it=yo(Z,i,a,k,h,_e);if(it!==zs)return it}se=i[Z+8],se!==Re&&vo(h,i[mn].data[Z+8]===_e)&&Js(b,Z,i)?(k=Oe,Z=Rr(se),i=ui(se,i)):Z=-1}}return _}function yo(r,i,a,h,_,b){const k=i[mn],Z=k.data[r+8],Oe=Ua(Z,k,a,null==h?Yi(Z)&&Ln:h!=k&&0!=(3&Z.type),_&un.Host&&b===Z);return null!==Oe?js(i,k,Oe,Z):zs}function Ua(r,i,a,h,_){const b=r.providerIndexes,k=i.data,Z=1048575&b,se=r.directiveStart,Oe=b>>20,wt=_?Z+Oe:r.directiveEnd;for(let Nt=h?Z:Z+Oe;Nt=se&&an.type===a)return Nt}if(_){const Nt=k[se];if(Nt&&Qr(Nt)&&Nt.type===a)return se}return null}function js(r,i,a,h){let _=r[a];const b=i.data;if(function Kt(r){return r instanceof ct}(_)){const k=_;k.resolving&&function Ie(r,i){const a=i?`. Dependency path: ${i.join(" > ")} > ${r}`:"";throw new G(-200,`Circular dependency in DI detected for ${r}${a}`)}(function ve(r){return"function"==typeof r?r.name||r.toString():"object"==typeof r&&null!=r&&"function"==typeof r.type?r.type.name||r.type.toString():pe(r)}(b[a]));const Z=Ro(k.canSeeViewProviders);k.resolving=!0;const se=k.injectImpl?Vn(k.injectImpl):null;Ba(r,h,un.Default);try{_=r[a]=k.factory(void 0,b,r,h),i.firstCreatePass&&a>=h.directiveStart&&function ir(r,i,a){const{ngOnChanges:h,ngOnInit:_,ngDoCheck:b}=i.type.prototype;if(h){const k=ts(i);(a.preOrderHooks||(a.preOrderHooks=[])).push(r,k),(a.preOrderCheckHooks||(a.preOrderCheckHooks=[])).push(r,k)}_&&(a.preOrderHooks||(a.preOrderHooks=[])).push(0-r,_),b&&((a.preOrderHooks||(a.preOrderHooks=[])).push(r,b),(a.preOrderCheckHooks||(a.preOrderCheckHooks=[])).push(r,b))}(a,b[a],i)}finally{null!==se&&Vn(se),Ro(Z),k.resolving=!1,rc()}}return _}function Js(r,i,a){return!!(a[i+(r>>kl)]&1<{const i=r.prototype.constructor,a=i[nt]||_o(i),h=Object.prototype;let _=Object.getPrototypeOf(r.prototype).constructor;for(;_&&_!==h;){const b=_[nt]||_o(_);if(b&&b!==a)return b;_=Object.getPrototypeOf(_)}return b=>new b})}function _o(r){return z(r)?()=>{const i=_o(K(r));return i&&i()}:ps(r)}function oc(r){const i=r[mn],a=i.type;return 2===a?i.declTNode:1===a?r[_t]:null}function Ia(r){return function Ca(r,i){if("class"===i)return r.classes;if("style"===i)return r.styles;const a=r.attrs;if(a){const h=a.length;let _=0;for(;_{const h=function Fo(r){return function(...a){if(r){const h=r(...a);for(const _ in h)this[_]=h[_]}}}(i);function _(...b){if(this instanceof _)return h.apply(this,b),this;const k=new _(...b);return Z.annotation=k,Z;function Z(se,_e,Oe){const it=se.hasOwnProperty(da)?se[da]:Object.defineProperty(se,da,{value:[]})[da];for(;it.length<=Oe;)it.push(null);return(it[Oe]=it[Oe]||[]).push(k),se}}return a&&(_.prototype=Object.create(a.prototype)),_.prototype.ngMetadataName=r,_.annotationCls=_,_})}class vi{constructor(i,a){this._desc=i,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof a?this.__NG_ELEMENT_ID__=a:void 0!==a&&(this.\u0275prov=bt({token:this,providedIn:a.providedIn||"root",factory:a.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ys(r,i){r.forEach(a=>Array.isArray(a)?Ys(a,i):i(a))}function lu(r,i,a){i>=r.length?r.push(a):r.splice(i,0,a)}function B(r,i){return i>=r.length-1?r.pop():r.splice(i,1)[0]}function H(r,i){const a=[];for(let h=0;h=0?r[1|h]=a:(h=~h,function he(r,i,a,h){let _=r.length;if(_==i)r.push(a,h);else if(1===_)r.push(h,r[0]),r[0]=a;else{for(_--,r.push(r[_-1],r[_]);_>i;)r[_]=r[_-2],_--;r[i]=a,r[i+1]=h}}(r,h,i,a)),h}function Tt(r,i){const a=Jt(r,i);if(a>=0)return r[1|a]}function Jt(r,i){return function Kn(r,i,a){let h=0,_=r.length>>a;for(;_!==h;){const b=h+(_-h>>1),k=r[b<i?_=b:h=b+1}return~(_<((Hi=Hi||{})[Hi.Important=1]="Important",Hi[Hi.DashCase=2]="DashCase",Hi))();const uc=new Map;let el=0;const kc="__ngContext__";function xi(r,i){dr(i)?(r[kc]=i[xr],function Ul(r){uc.set(r[xr],r)}(i)):r[kc]=i}let Dt;function cn(r,i){return Dt(r,i)}function lr(r){const i=r[Br];return ur(i)?i[Br]:i}function Ho(r){return pa(r[vt])}function zo(r){return pa(r[Gr])}function pa(r){for(;null!==r&&!ur(r);)r=r[Gr];return r}function oo(r,i,a,h,_){if(null!=h){let b,k=!1;ur(h)?b=h:dr(h)&&(k=!0,h=h[li]);const Z=Ue(h);0===r&&null!==a?null==_?Nh(i,a,Z):Ra(i,a,Z,_||null,!0):1===r&&null!==a?Ra(i,a,Z,_||null,!0):2===r?function ed(r,i,a){const h=pc(r,i);h&&function qr(r,i,a,h){r.removeChild(i,a,h)}(r,h,i,a)}(i,Z,k):3===r&&i.destroyNode(Z),null!=b&&function Bm(r,i,a,h,_){const b=a[Wi];b!==Ue(a)&&oo(i,r,h,b,_);for(let Z=di;Z0&&(r[a-1][Gr]=h[Gr]);const b=B(r,di+i);!function Pa(r,i){nl(r,i,i[Pe],2,null,null),i[li]=null,i[_t]=null}(h[mn],h);const k=b[er];null!==k&&k.detachView(b[mn]),h[Br]=null,h[Gr]=null,h[rr]&=-65}return h}function Io(r,i){if(!(128&i[rr])){const a=i[Pe];a.destroyNode&&nl(r,i,a,3,null,null),function ti(r){let i=r[vt];if(!i)return Eu(r[mn],r);for(;i;){let a=null;if(dr(i))a=i[vt];else{const h=i[di];h&&(a=h)}if(!a){for(;i&&!i[Gr]&&i!==r;)dr(i)&&Eu(i[mn],i),i=i[Br];null===i&&(i=r),dr(i)&&Eu(i[mn],i),a=i&&i[Gr]}i=a}}(i)}}function Eu(r,i){if(!(128&i[rr])){i[rr]&=-65,i[rr]|=128,function Cu(r,i){let a;if(null!=r&&null!=(a=r.destroyHooks))for(let h=0;h=0?h[_=k]():h[_=-k].unsubscribe(),b+=2}else{const k=h[_=a[b+1]];a[b].call(k)}if(null!==h){for(let b=_+1;b-1){const{encapsulation:b}=r.data[h.directiveStart+_];if(b===nn.None||b===nn.Emulated)return null}return Rt(h,a)}}(r,i.parent,a)}function Ra(r,i,a,h,_){r.insertBefore(i,a,h,_)}function Nh(r,i,a){r.appendChild(i,a)}function Ju(r,i,a,h,_){null!==h?Ra(r,i,a,h,_):Nh(r,i,a)}function pc(r,i){return r.parentNode(i)}function mc(r,i,a){return $d(r,i,a)}let So,Gd,Oa,$d=function gc(r,i,a){return 40&r.type?Rt(r,a):null};function ka(r,i,a,h){const _=ia(r,h,i),b=i[Pe],Z=mc(h.parent||i[_t],h,i);if(null!=_)if(Array.isArray(a))for(let se=0;ser,createScript:r=>r,createScriptURL:r=>r})}catch{}return Oa}()?.createScriptURL(r)||r}class Hd{constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Y})`}}function aa(r){return r instanceof Hd?r.changingThisBreaksApplicationSecurity:r}function $c(r,i){const a=function up(r){return r instanceof Hd&&r.getTypeName()||null}(r);if(null!=a&&a!==i){if("ResourceURL"===a&&"URL"===i)return!0;throw new Error(`Required a safe ${i}, got a ${a} (see ${Y})`)}return a===i}const pp=/^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;var Qi=(()=>((Qi=Qi||{})[Qi.NONE=0]="NONE",Qi[Qi.HTML=1]="HTML",Qi[Qi.STYLE=2]="STYLE",Qi[Qi.SCRIPT=3]="SCRIPT",Qi[Qi.URL=4]="URL",Qi[Qi.RESOURCE_URL=5]="RESOURCE_URL",Qi))();function qd(r){const i=Tu();return i?i.sanitize(Qi.URL,r)||"":$c(r,"URL")?aa(r):function Wd(r){return(r=String(r)).match(pp)?r:"unsafe:"+r}(pe(r))}function Yl(r){const i=Tu();if(i)return Hh(i.sanitize(Qi.RESOURCE_URL,r)||"");if($c(r,"ResourceURL"))return Hh(aa(r));throw new G(904,!1)}function Qh(r,i,a){return function sd(r,i){return"src"===i&&("embed"===r||"frame"===r||"iframe"===r||"media"===r||"script"===r)||"href"===i&&("base"===r||"link"===r)?Yl:qd}(i,a)(r)}function Tu(){const r=w();return r&&r[Je]}const Du=new vi("ENVIRONMENT_INITIALIZER"),Jh=new vi("INJECTOR",-1),ef=new vi("INJECTOR_DEF_TYPES");class tf{get(i,a=xt){if(a===xt){const h=new Error(`NullInjectorError: No provider for ${U(i)}!`);throw h.name="NullInjectorError",h}return a}}function jc(r){return{\u0275providers:r}}function Kl(...r){return{\u0275providers:yc(0,r),\u0275fromNgModule:!0}}function yc(r,...i){const a=[],h=new Set;let _;return Ys(i,b=>{const k=b;Xd(k,a,[],h)&&(_||(_=[]),_.push(k))}),void 0!==_&&Ep(_,a),a}function Ep(r,i){for(let a=0;a{i.push(b)})}}function Xd(r,i,a,h){if(!(r=K(r)))return!1;let _=null,b=cr(r);const k=!b&&Bn(r);if(b||k){if(k&&!k.standalone)return!1;_=r}else{const se=r.ngModule;if(b=cr(se),!b)return!1;_=se}const Z=h.has(_);if(k){if(Z)return!1;if(h.add(_),k.dependencies){const se="function"==typeof k.dependencies?k.dependencies():k.dependencies;for(const _e of se)Xd(_e,i,a,h)}}else{if(!b)return!1;{if(null!=b.imports&&!Z){let _e;h.add(_);try{Ys(b.imports,Oe=>{Xd(Oe,i,a,h)&&(_e||(_e=[]),_e.push(Oe))})}finally{}void 0!==_e&&Ep(_e,i)}if(!Z){const _e=ps(_)||(()=>new _);i.push({provide:_,useFactory:_e,deps:yn},{provide:ef,useValue:_,multi:!0},{provide:Du,useValue:()=>Ht(_),multi:!0})}const se=b.providers;null==se||Z||Qd(se,Oe=>{i.push(Oe)})}}return _!==r&&void 0!==r.providers}function Qd(r,i){for(let a of r)ce(a)&&(a=a.\u0275providers),Array.isArray(a)?Qd(a,i):i(a)}const jm=O({provide:String,useValue:O});function Wc(r){return null!==r&&"object"==typeof r&&jm in r}function Wo(r){return"function"==typeof r}const od=new vi("Set Injector scope."),Zl={},ad={};let ld;function Au(){return void 0===ld&&(ld=new tf),ld}class il{}class cd extends il{get destroyed(){return this._destroyed}constructor(i,a,h,_){super(),this.parent=a,this.source=h,this.scopes=_,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Yc(i,k=>this.processProvider(k)),this.records.set(Jh,El(void 0,this)),_.has("environment")&&this.records.set(il,El(void 0,this));const b=this.records.get(od);null!=b&&"string"==typeof b.value&&this.scopes.add(b.value),this.injectorDefTypes=new Set(this.get(ef.multi,yn,un.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const i of this._ngOnDestroyHooks)i.ngOnDestroy();for(const i of this._onDestroyHooks)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(i){this._onDestroyHooks.push(i)}runInContext(i){this.assertNotDestroyed();const a=_r(this),h=Vn(void 0);try{return i()}finally{_r(a),Vn(h)}}get(i,a=xt,h=un.Default){this.assertNotDestroyed(),h=sn(h);const _=_r(this),b=Vn(void 0);try{if(!(h&un.SkipSelf)){let Z=this.records.get(i);if(void 0===Z){const se=function Pu(r){return"function"==typeof r||"object"==typeof r&&r instanceof vi}(i)&&kt(i);Z=se&&this.injectableDefInScope(se)?El(ud(i),Zl):null,this.records.set(i,Z)}if(null!=Z)return this.hydrate(i,Z)}return(h&un.Self?Au():this.parent).get(i,a=h&un.Optional&&a===xt?null:a)}catch(k){if("NullInjectorError"===k.name){if((k[$e]=k[$e]||[]).unshift(U(i)),_)throw k;return function rt(r,i,a,h){const _=r[$e];throw i[Pt]&&_.unshift(i[Pt]),r.message=function Te(r,i,a,h=null){r=r&&"\n"===r.charAt(0)&&r.charAt(1)==be?r.slice(2):r;let _=U(i);if(Array.isArray(i))_=i.map(U).join(" -> ");else if("object"==typeof i){let b=[];for(let k in i)if(i.hasOwnProperty(k)){let Z=i[k];b.push(k+":"+("string"==typeof Z?JSON.stringify(Z):U(Z)))}_=`{${b.join(", ")}}`}return`${a}${h?"("+h+")":""}[${_}]: ${r.replace(F,"\n ")}`}("\n"+r.message,_,a,h),r[T]=_,r[$e]=null,r}(k,i,"R3InjectorError",this.source)}throw k}finally{Vn(b),_r(_)}}resolveInjectorInitializers(){const i=_r(this),a=Vn(void 0);try{const h=this.get(Du.multi,yn,un.Self);for(const _ of h)_()}finally{_r(i),Vn(a)}}toString(){const i=[],a=this.records;for(const h of a.keys())i.push(U(h));return`R3Injector[${i.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new G(205,!1)}processProvider(i){let a=Wo(i=K(i))?i:K(i&&i.provide);const h=function Cp(r){return Wc(r)?El(void 0,r.useValue):El(xu(r),Zl)}(i);if(Wo(i)||!0!==i.multi)this.records.get(a);else{let _=this.records.get(a);_||(_=El(void 0,Zl,!0),_.factory=()=>wn(_.multi),this.records.set(a,_)),a=i,_.multi.push(i)}this.records.set(a,h)}hydrate(i,a){return a.value===Zl&&(a.value=ad,a.value=a.factory()),"object"==typeof a.value&&a.value&&function Ip(r){return null!==r&&"object"==typeof r&&"function"==typeof r.ngOnDestroy}(a.value)&&this._ngOnDestroyHooks.add(a.value),a.value}injectableDefInScope(i){if(!i.providedIn)return!1;const a=K(i.providedIn);return"string"==typeof a?"any"===a||this.scopes.has(a):this.injectorDefTypes.has(a)}}function ud(r){const i=kt(r),a=null!==i?i.factory:ps(r);if(null!==a)return a;if(r instanceof vi)throw new G(204,!1);if(r instanceof Function)return function dd(r){const i=r.length;if(i>0)throw H(i,"?"),new G(204,!1);const a=function gn(r){const i=r&&(r[Dn]||r[Mn]);return i?(function Sn(r){if(r.hasOwnProperty("name"))return r.name;(""+r).match(/^function\s*([^\s(]+)/)}(r),i):null}(r);return null!==a?()=>a.factory(r):()=>new r}(r);throw new G(204,!1)}function xu(r,i,a){let h;if(Wo(r)){const _=K(r);return ps(_)||ud(_)}if(Wc(r))h=()=>K(r.useValue);else if(function ql(r){return!(!r||!r.useFactory)}(r))h=()=>r.useFactory(...wn(r.deps||[]));else if(function vc(r){return!(!r||!r.useExisting)}(r))h=()=>Ht(K(r.useExisting));else{const _=K(r&&(r.useClass||r.provide));if(!function bp(r){return!!r.deps}(r))return ps(_)||ud(_);h=()=>new _(...wn(r.deps))}return h}function El(r,i,a=!1){return{factory:r,value:i,multi:a?[]:void 0}}function Yc(r,i){for(const a of r)Array.isArray(a)?Yc(a,i):a&&ce(a)?Yc(a.\u0275providers,i):i(a)}class Xl{}class hd{}class fd{resolveComponentFactory(i){throw function nf(r){const i=Error(`No component factory found for ${U(r)}. Did you add it to @NgModule.entryComponents?`);return i.ngComponent=r,i}(i)}}let Ql=(()=>{class r{}return r.NULL=new fd,r})();function rf(){return la(Ze(),w())}function la(r,i){return new sl(Rt(r,i))}let sl=(()=>{class r{constructor(a){this.nativeElement=a}}return r.__NG_ELEMENT_ID__=rf,r})();function sf(r){return r instanceof sl?r.nativeElement:r}class _c{}let Wm=(()=>{class r{}return r.__NG_ELEMENT_ID__=()=>function Mu(){const r=w(),a=Or(Ze().index,r);return(dr(a)?a:r)[Pe]}(),r})(),af=(()=>{class r{}return r.\u0275prov=bt({token:r,providedIn:"root",factory:()=>null}),r})();class Jl{constructor(i){this.full=i,this.major=i.split(".")[0],this.minor=i.split(".")[1],this.patch=i.split(".").slice(2).join(".")}}const lf=new Jl("15.2.1"),eh={},cf="ngOriginalError";function uf(r){return r[cf]}class Ec{constructor(){this._console=console}handleError(i){const a=this._findOriginalError(i);this._console.error("ERROR",i),a&&this._console.error("ORIGINAL ERROR",a)}_findOriginalError(i){let a=i&&uf(i);for(;a&&uf(a);)a=uf(a);return a||null}}function Cl(r){return r instanceof Function?r():r}function wp(r,i,a){let h=r.length;for(;;){const _=r.indexOf(i,a);if(-1===_)return _;if(0===_||r.charCodeAt(_-1)<=32){const b=i.length;if(_+b===h||r.charCodeAt(_+b)<=32)return _}a=_+1}}const Tp="ng-template";function Jm(r,i,a){let h=0;for(;hb?"":_[it+1].toLowerCase();const Nt=8&h?wt:null;if(Nt&&-1!==wp(Nt,_e,0)||2&h&&_e!==wt){if(ca(h))return!1;k=!0}}}}else{if(!k&&!ca(h)&&!ca(se))return!1;if(k&&ca(se))continue;k=!1,h=se|1&h}}return ca(h)||k}function ca(r){return 0==(1&r)}function tg(r,i,a,h){if(null===i)return-1;let _=0;if(h||!a){let b=!1;for(;_-1)for(a++;a0?'="'+Z+'"':"")+"]"}else 8&h?_+="."+k:4&h&&(_+=" "+k);else""!==_&&!ca(k)&&(i+=sh(b,_),_=""),h=k,b=b||!ca(h);a++}return""!==_&&(i+=sh(b,_)),i}const jr={};function gf(r){md(v(),w(),Ni()+r,!1)}function md(r,i,a,h){if(!h)if(3==(3&i[rr])){const b=r.preOrderCheckHooks;null!==b&&Nn(i,b,a)}else{const b=r.preOrderHooks;null!==b&&Wt(i,b,0,a)}Hs(a)}function ot(r,i=null,a=null,h){const _=at(r,i,a,h);return _.resolveInjectorInitializers(),_}function at(r,i=null,a=null,h,_=new Set){const b=[a||yn,Kl(r)];return h=h||("object"==typeof r?void 0:U(r)),new cd(b,i||Au(),h||null,_)}let Bt=(()=>{class r{static create(a,h){if(Array.isArray(a))return ot({name:""},h,a,"");{const _=a.name??"";return ot({name:_},a.parent,a.providers,_)}}}return r.THROW_IF_NOT_FOUND=xt,r.NULL=new tf,r.\u0275prov=bt({token:r,providedIn:"any",factory:()=>Ht(Jh)}),r.__NG_ELEMENT_ID__=-1,r})();function tc(r,i=un.Default){const a=w();return null===a?Ht(r,i):Lt(Ze(),a,K(r),i)}function Ef(){throw new Error("invalid")}function Cf(r,i){const a=r.contentQueries;if(null!==a)for(let h=0;hMr&&md(r,i,Mr,!1),Ui(k?2:0,_),a(h,_)}finally{Hs(b),Ui(k?3:1,_)}}function hh(r,i,a){if(pr(i)){const _=i.directiveEnd;for(let b=i.directiveStart;b<_;b++){const k=r.data[b];k.contentQueries&&k.contentQueries(1,a[b],b)}}}function Op(r,i,a){ro()&&(function Vp(r,i,a,h){const _=a.directiveStart,b=a.directiveEnd;Yi(a)&&function Cd(r,i,a){const h=Rt(i,r),_=ug(a),b=r[tt],k=bd(r,yd(r,_,null,a.onPush?32:16,h,i,b,b.createRenderer(h,a),null,null,null));r[i.index]=k}(i,a,r.data[_+a.componentOffset]),r.firstCreatePass||Ea(a,i),xi(h,i);const k=a.initialInputs;for(let Z=_;Z0;){const a=r[--i];if("number"==typeof a&&a<0)return a}return 0})(k)!=Z&&k.push(Z),k.push(a,h,b)}}(r,i,h,Ou(r,a,_.hostVars,jr),_)}function Il(r,i,a,h,_,b){const k=Rt(r,i);!function Qc(r,i,a,h,_,b,k){if(null==b)r.removeAttribute(i,_,a);else{const Z=null==k?pe(b):k(b,h||"",_);r.setAttribute(i,_,Z,a)}}(i[Pe],k,b,r.value,a,h,_)}function wy(r,i,a,h,_,b){const k=b[i];if(null!==k){const Z=h.setInput;for(let se=0;se0&&Yp(a)}}function Yp(r){for(let h=Ho(r);null!==h;h=zo(h))for(let _=di;_0&&Yp(b)}const a=r[mn].components;if(null!==a)for(let h=0;h0&&Yp(_)}}function Dy(r,i){const a=Or(i,r),h=a[mn];(function Kp(r,i){for(let a=i.length;a-1&&(Vd(i,h),B(a,h))}this._attachedToViewContainer=!1}Io(this._lView[mn],this._lView)}onDestroy(i){Np(this._lView[mn],this._lView,null,i)}markForCheck(){qp(this._cdRefInjectingView||this._lView)}detach(){this._lView[rr]&=-65}reattach(){this._lView[rr]|=64}detectChanges(){yh(this._lView[mn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new G(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function cs(r,i){nl(r,i,i[Pe],2,null,null)}(this._lView[mn],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new G(902,!1);this._appRef=i}}class xy extends Fu{constructor(i){super(i),this._view=i}detectChanges(){const i=this._view;yh(i[mn],i,i[ye],!1)}checkNoChanges(){}get context(){return null}}class Df extends Ql{constructor(i){super(),this.ngModule=i}resolveComponentFactory(i){const a=Bn(i);return new Nu(a,this.ngModule)}}function yg(r){const i=[];for(let a in r)r.hasOwnProperty(a)&&i.push({propName:r[a],templateName:a});return i}class vg{constructor(i,a){this.injector=i,this.parentInjector=a}get(i,a,h){h=sn(h);const _=this.injector.get(i,eh,h);return _!==eh||a===eh?_:this.parentInjector.get(i,a,h)}}class Nu extends hd{get inputs(){return yg(this.componentDef.inputs)}get outputs(){return yg(this.componentDef.outputs)}constructor(i,a){super(),this.componentDef=i,this.ngModule=a,this.componentType=i.type,this.selector=function Ap(r){return r.map(mf).join(",")}(i.selectors),this.ngContentSelectors=i.ngContentSelectors?i.ngContentSelectors:[],this.isBoundToModule=!!a}create(i,a,h,_){let b=(_=_||this.ngModule)instanceof il?_:_?.injector;b&&null!==this.componentDef.getStandaloneInjector&&(b=this.componentDef.getStandaloneInjector(b)||b);const k=b?new vg(i,b):i,Z=k.get(_c,null);if(null===Z)throw new G(407,!1);const se=k.get(af,null),_e=Z.createRenderer(null,this.componentDef),Oe=this.componentDef.selectors[0][0]||"div",it=h?function Fp(r,i,a){return r.selectRootElement(i,a===nn.ShadowDom)}(_e,h,this.componentDef.encapsulation):ma(_e,Oe,function Jp(r){const i=r.toLowerCase();return"svg"===i?"svg":"math"===i?"math":null}(Oe)),wt=this.componentDef.onPush?288:272,Nt=ph(0,null,null,1,0,null,null,null,null,null),an=yd(null,Nt,null,wt,null,null,Z,_e,se,k,null);let Rn,Xn;_a(an);try{const yr=this.componentDef;let $r,_n=null;yr.findHostDirectiveDefs?($r=[],_n=new Map,yr.findHostDirectiveDefs(yr,$r,_n),$r.push(yr)):$r=[yr];const Xr=function em(r,i){const a=r[mn],h=Mr;return r[h]=i,ku(a,h,2,"#host",null)}(an,it),Vs=function Py(r,i,a,h,_,b,k,Z){const se=_[mn];!function tm(r,i,a,h){for(const _ of r)i.mergedAttrs=Nr(i.mergedAttrs,_.hostAttrs);null!==i.mergedAttrs&&(Id(i,i.mergedAttrs,!0),null!==a&&Su(h,a,i))}(h,r,i,k);const _e=b.createRenderer(i,a),Oe=yd(_,ug(a),null,a.onPush?32:16,_[r.index],r,b,_e,Z||null,null,null);return se.firstCreatePass&&gh(se,r,h.length-1),bd(_,Oe),_[r.index]=Oe}(Xr,it,yr,$r,an,Z,_e);Xn=Tn(Nt,Mr),it&&function nm(r,i,a,h){if(h)On(r,a,["ng-version",lf.full]);else{const{attrs:_,classes:b}=function ng(r){const i=[],a=[];let h=1,_=2;for(;h0&&$h(r,a,b.join(" "))}}(_e,yr,it,h),void 0!==a&&function Ry(r,i,a){const h=r.projection=[];for(let _=0;_=0;h--){const _=r[h];_.hostVars=i+=_.hostVars,_.hostAttrs=Nr(_.hostAttrs,a=Nr(a,_.hostAttrs))}}(h)}function xf(r){return r===En?{}:r===yn?[]:r}function im(r,i){const a=r.viewQuery;r.viewQuery=a?(h,_)=>{i(h,_),a(h,_)}:i}function ky(r,i){const a=r.contentQueries;r.contentQueries=a?(h,_,b)=>{i(h,_,b),a(h,_,b)}:i}function sm(r,i){const a=r.hostBindings;r.hostBindings=a?(h,_)=>{i(h,_),a(h,_)}:i}function Td(r){return!!Mf(r)&&(Array.isArray(r)||!(r instanceof Map)&&Symbol.iterator in r)}function Mf(r){return null!==r&&("function"==typeof r||"object"==typeof r)}function Sl(r,i,a){return r[i]=a}function Ko(r,i,a){return!Object.is(r[i],a)&&(r[i]=a,!0)}function wc(r,i,a,h){const _=Ko(r,i,a);return Ko(r,i+1,h)||_}function Eh(r,i,a,h){const _=w();return Ko(_,fo(),i)&&(v(),Il(ai(),_,r,i,a,h)),Eh}function Dd(r,i,a,h){return Ko(r,fo(),a)?i+pe(a)+h:jr}function xd(r,i,a,h,_,b,k,Z){const _e=function Rf(r,i,a,h,_){const b=wc(r,i,a,h);return Ko(r,i+2,_)||b}(r,fi(),a,_,k);return Gs(3),_e?i+pe(a)+h+pe(_)+b+pe(k)+Z:jr}function pm(r,i,a,h,_,b,k,Z){const se=w(),_e=v(),Oe=r+Mr,it=_e.firstCreatePass?function fm(r,i,a,h,_,b,k,Z,se){const _e=i.consts,Oe=ku(i,r,4,k||null,Sr(_e,Z));mh(i,a,Oe,Sr(_e,se)),Mo(i,Oe);const it=Oe.tViews=ph(2,Oe,h,_,b,i.directiveRegistry,i.pipeRegistry,null,i.schemas,_e);return null!==i.queries&&(i.queries.template(i,Oe),it.queries=i.queries.embeddedTView(Oe)),Oe}(Oe,_e,se,i,a,h,_,b,k):_e.data[Oe];Yn(it,!1);const wt=se[Pe].createComment("");ka(_e,se,wt,it),xi(wt,se),bd(se,se[Oe]=wf(wt,se,wt,it)),kr(it)&&Op(_e,se,it),null!=k&&fh(se,it,Z)}function Vf(r){return An(function ii(){return ar.lFrame.contextLView}(),Mr+r)}function Ch(r,i,a){const h=w();return Ko(h,fo(),i)&&ga(v(),ai(),h,r,i,h[Pe],a,!1),Ch}function $f(r,i,a,h,_){const k=_?"class":"style";Qp(r,a,i.inputs[k],k,h)}function kd(r,i,a,h){const _=w(),b=v(),k=Mr+r,Z=_[Pe],se=b.firstCreatePass?function Rd(r,i,a,h,_,b){const k=i.consts,se=ku(i,r,2,h,Sr(k,_));return mh(i,a,se,Sr(k,b)),null!==se.attrs&&Id(se,se.attrs,!1),null!==se.mergedAttrs&&Id(se,se.mergedAttrs,!0),null!==i.queries&&i.queries.elementStart(i,se),se}(k,b,_,i,a,h):b.data[k],_e=_[k]=ma(Z,i,function Qn(){return ar.lFrame.currentNamespace}()),Oe=kr(se);return Yn(se,!0),Su(Z,_e,se),32!=(32&se.flags)&&ka(b,_,_e,se),0===function Ri(){return ar.lFrame.elementDepthCount}()&&xi(_e,_),function mr(){ar.lFrame.elementDepthCount++}(),Oe&&(Op(b,_,se),hh(b,se,_)),null!==h&&fh(_,se),kd}function Uf(){let r=Ze();Pr()?Zr():(r=r.parent,Yn(r,!1));const i=r;!function ho(){ar.lFrame.elementDepthCount--}();const a=v();return a.firstCreatePass&&(Mo(a,r),pr(r)&&a.queries.elementEnd(r)),null!=i.classesWithoutHost&&function Wr(r){return 0!=(8&r.flags)}(i)&&$f(a,i,w(),i.classesWithoutHost,!0),null!=i.stylesWithoutHost&&function si(r){return 0!=(16&r.flags)}(i)&&$f(a,i,w(),i.stylesWithoutHost,!1),Uf}function mm(r,i,a,h){return kd(r,i,a,h),Uf(),mm}function bh(r,i,a){const h=w(),_=v(),b=r+Mr,k=_.firstCreatePass?function Ny(r,i,a,h,_){const b=i.consts,k=Sr(b,h),Z=ku(i,r,8,"ng-container",k);return null!==k&&Id(Z,k,!0),mh(i,a,Z,Sr(b,_)),null!==i.queries&&i.queries.elementStart(i,Z),Z}(b,_,h,i,a):_.data[b];Yn(k,!0);const Z=h[b]=h[Pe].createComment("");return ka(_,h,Z,k),xi(Z,h),kr(k)&&(Op(_,h,k),hh(_,k,h)),null!=a&&fh(h,k),bh}function Gf(){let r=Ze();const i=v();return Pr()?Zr():(r=r.parent,Yn(r,!1)),i.firstCreatePass&&(Mo(i,r),pr(r)&&i.queries.elementEnd(r)),Gf}function Hf(r,i,a){return bh(r,i,a),Gf(),Hf}function wg(){return w()}function gm(r){return!!r&&"function"==typeof r.then}function Tg(r){return!!r&&"function"==typeof r.subscribe}const ym=Tg;function Ih(r,i,a,h){const _=w(),b=v(),k=Ze();return function vm(r,i,a,h,_,b,k){const Z=kr(h),_e=r.firstCreatePass&&Xp(r),Oe=i[ye],it=Zp(i);let wt=!0;if(3&h.type||k){const Rn=Rt(h,i),Xn=k?k(Rn):Rn,yr=it.length,$r=k?Xr=>k(Ue(Xr[h.index])):h.index;let _n=null;if(!k&&Z&&(_n=function Ag(r,i,a,h){const _=r.cleanup;if(null!=_)for(let b=0;b<_.length-1;b+=2){const k=_[b];if(k===a&&_[b+1]===h){const Z=i[le],se=_[b+2];return Z.length>se?Z[se]:null}"string"==typeof k&&(b+=2)}return null}(r,i,_,h.index)),null!==_n)(_n.__ngLastListenerFn__||_n).__ngNextListenerFn__=b,_n.__ngLastListenerFn__=b,wt=!1;else{b=mi(h,i,Oe,b,!1);const Xr=a.listen(Xn,_,b);it.push(b,Xr),_e&&_e.push(_,$r,yr,yr+1)}}else b=mi(h,i,Oe,b,!1);const Nt=h.outputs;let an;if(wt&&null!==Nt&&(an=Nt[_])){const Rn=an.length;if(Rn)for(let Xn=0;Xn-1?Or(r.index,i):i);let se=Sh(i,a,h,k),_e=b.__ngNextListenerFn__;for(;_e;)se=Sh(i,a,_e,k)&&se,_e=_e.__ngNextListenerFn__;return _&&!1===se&&(k.preventDefault(),k.returnValue=!1),se}}function _m(r=1){return function pi(r){return(ar.lFrame.contextLView=function Qo(r,i){for(;r>0;)i=i[Vt],r--;return i}(r,ar.lFrame.contextLView))[ye]}(r)}function xg(r,i){let a=null;const h=function nh(r){const i=r.attrs;if(null!=i){const a=i.indexOf(5);if(!(1&a))return i[a+1]}return null}(r);for(let _=0;_>17&32767}function bm(r){return 2|r}function us(r){return(131068&r)>>2}function Wf(r,i){return-131069&r|i<<2}function kg(r){return 1|r}function $y(r,i,a,h,_){const b=r[a+1],k=null===i;let Z=h?Bu(b):us(b),se=!1;for(;0!==Z&&(!1===se||k);){const Oe=r[Z+1];e_(r[Z],i)&&(se=!0,r[Z+1]=h?kg(Oe):bm(Oe)),Z=h?Bu(Oe):us(Oe)}se&&(r[a+1]=h?bm(b):kg(b))}function e_(r,i){return null===r||null==i||(Array.isArray(r)?r[1]:r)===i||!(!Array.isArray(r)||"string"!=typeof i)&&Jt(r,i)>=0}const To={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Uy(r){return r.substring(To.key,To.keyEnd)}function Og(r){return r.substring(To.value,To.valueEnd)}function Fg(r,i){const a=To.textEnd;return a===i?-1:(i=To.keyEnd=function Yf(r,i,a){for(;i32;)i++;return i}(r,To.key=i,a),tu(r,i,a))}function $u(r,i){const a=To.textEnd;let h=To.key=tu(r,i,a);return a===h?-1:(h=To.keyEnd=function Hy(r,i,a){let h;for(;i=65&&(-33&h)<=90||h>=48&&h<=57);)i++;return i}(r,h,a),h=Ng(r,h,a),h=To.value=tu(r,h,a),h=To.valueEnd=function Lg(r,i,a){let h=-1,_=-1,b=-1,k=i,Z=k;for(;k32&&(Z=k),b=_,_=h,h=-33&se}return Z}(r,h,a),Ng(r,h,a))}function Gy(r){To.key=0,To.keyEnd=0,To.value=0,To.valueEnd=0,To.textEnd=r.length}function tu(r,i,a){for(;i=0;a=$u(i,a))Hg(r,Uy(i),Og(i))}function ol(r,i){for(let a=function wh(r){return Gy(r),Fg(r,tu(r,0,To.textEnd))}(i);a>=0;a=Fg(i,a))Be(r,Uy(i),!0)}function Tl(r,i,a,h){const _=w(),b=v(),k=Gs(2);b.firstUpdatePass&&Tm(b,r,k,h),i!==jr&&Ko(_,k,i)&&Ah(b,b.data[Ni()],_,_[Pe],r,_[k+1]=function zy(r,i){return null==r||("string"==typeof i?r+=i:"object"==typeof r&&(r=U(aa(r)))),r}(i,a),h,k)}function Dl(r,i,a,h){const _=v(),b=Gs(2);_.firstUpdatePass&&Tm(_,null,b,h);const k=w();if(a!==jr&&Ko(k,b,a)){const Z=_.data[Ni()];if(xh(Z,h)&&!Vg(_,b)){let se=h?Z.classesWithoutHost:Z.stylesWithoutHost;null!==se&&(a=ie(se,a||"")),$f(_,Z,k,a,h)}else!function qf(r,i,a,h,_,b,k,Z){_===jr&&(_=yn);let se=0,_e=0,Oe=0<_.length?_[0]:null,it=0=r.expandoStartIndex}function Tm(r,i,a,h){const _=r.data;if(null===_[a+1]){const b=_[Ni()],k=Vg(r,a);xh(b,h)&&null===i&&!k&&(i=!1),i=function $g(r,i,a,h){const _=function xo(r){const i=ar.lFrame.currentDirectiveIndex;return-1===i?null:r[i]}(r);let b=h?i.residualClasses:i.residualStyles;if(null===_)0===(h?i.classBindings:i.styleBindings)&&(a=Gu(a=Kf(null,r,i,a,h),i.attrs,h),b=null);else{const k=i.directiveStylingLast;if(-1===k||r[k]!==_)if(a=Kf(_,r,i,a,h),null===b){let se=function Ug(r,i,a){const h=a?i.classBindings:i.styleBindings;if(0!==us(h))return r[Bu(h)]}(r,i,h);void 0!==se&&Array.isArray(se)&&(se=Kf(null,r,i,se[1],h),se=Gu(se,i.attrs,h),function Uu(r,i,a,h){r[Bu(a?i.classBindings:i.styleBindings)]=h}(r,i,h,se))}else b=function Gg(r,i,a){let h;const _=i.directiveEnd;for(let b=1+i.directiveStylingLast;b<_;b++)h=Gu(h,r[b].hostAttrs,a);return Gu(h,i.attrs,a)}(r,i,h)}return void 0!==b&&(h?i.residualClasses=b:i.residualStyles=b),a}(_,b,i,h),function Qv(r,i,a,h,_,b){let k=b?i.classBindings:i.styleBindings,Z=Bu(k),se=us(k);r[h]=a;let Oe,_e=!1;if(Array.isArray(a)?(Oe=a[1],(null===Oe||Jt(a,Oe)>0)&&(_e=!0)):Oe=a,_)if(0!==se){const wt=Bu(r[Z+1]);r[h+1]=jf(wt,Z),0!==wt&&(r[wt+1]=Wf(r[wt+1],h)),r[Z+1]=function Zv(r,i){return 131071&r|i<<17}(r[Z+1],h)}else r[h+1]=jf(Z,0),0!==Z&&(r[Z+1]=Wf(r[Z+1],h)),Z=h;else r[h+1]=jf(se,0),0===Z?Z=h:r[se+1]=Wf(r[se+1],h),se=h;_e&&(r[h+1]=bm(r[h+1])),$y(r,Oe,h,!0),$y(r,Oe,h,!1),function Jv(r,i,a,h,_){const b=_?r.residualClasses:r.residualStyles;null!=b&&"string"==typeof i&&Jt(b,i)>=0&&(a[h+1]=kg(a[h+1]))}(i,Oe,r,h,b),k=jf(Z,se),b?i.classBindings=k:i.styleBindings=k}(_,b,i,a,k,h)}}function Kf(r,i,a,h,_){let b=null;const k=a.directiveEnd;let Z=a.directiveStylingLast;for(-1===Z?Z=a.directiveStart:Z++;Z0;){const se=r[_],_e=Array.isArray(se),Oe=_e?se[1]:se,it=null===Oe;let wt=a[_+1];wt===jr&&(wt=it?yn:void 0);let Nt=it?Tt(wt,h):Oe===h?wt:void 0;if(_e&&!Fd(Nt)&&(Nt=Tt(se,h)),Fd(Nt)&&(Z=Nt,k))return Z;const an=r[_+1];_=k?Bu(an):us(an)}if(null!==i){let se=b?i.residualClasses:i.residualStyles;null!=se&&(Z=Tt(se,h))}return Z}function Fd(r){return void 0!==r}function xh(r,i){return 0!=(r.flags&(i?8:16))}function Am(r,i=""){const a=w(),h=v(),_=r+Mr,b=h.firstCreatePass?ku(h,_,1,i,null):h.data[_],k=a[_]=function Gl(r,i){return r.createText(i)}(a[Pe],i);ka(h,a,k,b),Yn(b,!1)}function Ph(r){return Hu("",r,""),Ph}function Hu(r,i,a){const h=w(),_=Dd(h,r,i,a);return _!==jr&&Ic(h,Ni(),_),Hu}function xm(r,i,a,h,_){const b=w(),k=function Ad(r,i,a,h,_,b){const Z=wc(r,fi(),a,_);return Gs(2),Z?i+pe(a)+h+pe(_)+b:jr}(b,r,i,a,h,_);return k!==jr&&Ic(b,Ni(),k),xm}function zu(r,i,a,h,_,b,k){const Z=w(),se=xd(Z,r,i,a,h,_,b,k);return se!==jr&&Ic(Z,Ni(),se),zu}function Mh(r,i,a){Dl(Be,ol,Dd(w(),r,i,a),!0)}const Ku=void 0;var tv=["en",[["a","p"],["AM","PM"],Ku],[["AM","PM"],Ku,Ku],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Ku,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Ku,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Ku,"{1} 'at' {0}",Ku],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function iu(r){const a=Math.floor(Math.abs(r)),h=r.toString().replace(/^[^.]*\.?/,"").length;return 1===a&&0===h?1:5}];let Nd={};function ey(r){const i=function nv(r){return r.toLowerCase().replace(/_/g,"-")}(r);let a=ny(i);if(a)return a;const h=i.split("-")[0];if(a=ny(h),a)return a;if("en"===h)return tv;throw new G(701,!1)}function ty(r){return ey(r)[Lr.PluralCase]}function ny(r){return r in Nd||(Nd[r]=bn.ng&&bn.ng.common&&bn.ng.common.locales&&bn.ng.common.locales[r]),Nd[r]}var Lr=(()=>((Lr=Lr||{})[Lr.LocaleId=0]="LocaleId",Lr[Lr.DayPeriodsFormat=1]="DayPeriodsFormat",Lr[Lr.DayPeriodsStandalone=2]="DayPeriodsStandalone",Lr[Lr.DaysFormat=3]="DaysFormat",Lr[Lr.DaysStandalone=4]="DaysStandalone",Lr[Lr.MonthsFormat=5]="MonthsFormat",Lr[Lr.MonthsStandalone=6]="MonthsStandalone",Lr[Lr.Eras=7]="Eras",Lr[Lr.FirstDayOfWeek=8]="FirstDayOfWeek",Lr[Lr.WeekendRange=9]="WeekendRange",Lr[Lr.DateFormat=10]="DateFormat",Lr[Lr.TimeFormat=11]="TimeFormat",Lr[Lr.DateTimeFormat=12]="DateTimeFormat",Lr[Lr.NumberSymbols=13]="NumberSymbols",Lr[Lr.NumberFormats=14]="NumberFormats",Lr[Lr.CurrencyCode=15]="CurrencyCode",Lr[Lr.CurrencySymbol=16]="CurrencySymbol",Lr[Lr.CurrencyName=17]="CurrencyName",Lr[Lr.Currencies=18]="Currencies",Lr[Lr.Directionality=19]="Directionality",Lr[Lr.PluralCase=20]="PluralCase",Lr[Lr.ExtraData=21]="ExtraData",Lr))();const su="en-US";let ry=su;function uv(r,i,a,h,_){if(r=K(r),Array.isArray(r))for(let b=0;b>20;if(Wo(r)||!r.multi){const Nt=new ct(se,_,tc),an=hv(Z,i,_?Oe:Oe+wt,it);-1===an?(ic(Ea(_e,k),b,Z),dv(b,r,i.length),i.push(Z),_e.directiveStart++,_e.directiveEnd++,_&&(_e.providerIndexes+=1048576),a.push(Nt),k.push(Nt)):(a[an]=Nt,k[an]=Nt)}else{const Nt=hv(Z,i,Oe+wt,it),an=hv(Z,i,Oe,Oe+wt),Xn=an>=0&&a[an];if(_&&!Xn||!_&&!(Nt>=0&&a[Nt])){ic(Ea(_e,k),b,Z);const yr=function kE(r,i,a,h,_){const b=new ct(r,a,tc);return b.multi=[],b.index=i,b.componentProviders=0,w_(b,_,h&&!a),b}(_?RE:ME,a.length,_,h,se);!_&&Xn&&(a[an].providerFactory=yr),dv(b,r,i.length,0),i.push(Z),_e.directiveStart++,_e.directiveEnd++,_&&(_e.providerIndexes+=1048576),a.push(yr),k.push(yr)}else dv(b,r,Nt>-1?Nt:an,w_(a[_?an:Nt],se,!_&&h));!_&&h&&Xn&&a[an].componentProviders++}}}function dv(r,i,a,h){const _=Wo(i),b=function Ds(r){return!!r.useClass}(i);if(_||b){const se=(b?K(i.useClass):i).prototype.ngOnDestroy;if(se){const _e=r.destroyHooks||(r.destroyHooks=[]);if(!_&&i.multi){const Oe=_e.indexOf(a);-1===Oe?_e.push(a,[h,se]):_e[Oe+1].push(h,se)}else _e.push(a,se)}}}function w_(r,i,a){return a&&r.componentProviders++,r.multi.push(i)-1}function hv(r,i,a,h){for(let _=a;_{a.providersResolver=(h,_)=>function PE(r,i,a){const h=v();if(h.firstCreatePass){const _=Qr(r);uv(a,h.data,h.blueprint,_,!0),uv(i,h.data,h.blueprint,_,!1)}}(h,_?_(r):r,i)}}class np{}class D_{}function OE(r,i){return new A_(r,i??null)}class A_ extends np{constructor(i,a){super(),this._parent=a,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new Df(this);const h=Dr(i);this._bootstrapComponents=Cl(h.bootstrap),this._r3Injector=at(i,a,[{provide:np,useValue:this},{provide:Ql,useValue:this.componentFactoryResolver}],U(i),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(i)}get injector(){return this._r3Injector}destroy(){const i=this._r3Injector;!i.destroyed&&i.destroy(),this.destroyCbs.forEach(a=>a()),this.destroyCbs=null}onDestroy(i){this.destroyCbs.push(i)}}class pv extends D_{constructor(i){super(),this.moduleType=i}create(i){return new A_(this.moduleType,i)}}class FE extends np{constructor(i,a,h){super(),this.componentFactoryResolver=new Df(this),this.instance=null;const _=new cd([...i,{provide:np,useValue:this},{provide:Ql,useValue:this.componentFactoryResolver}],a||Au(),h,new Set(["environment"]));this.injector=_,_.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(i){this.injector.onDestroy(i)}}function mv(r,i,a=null){return new FE(r,i,a).injector}let NE=(()=>{class r{constructor(a){this._injector=a,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(a){if(!a.standalone)return null;if(!this.cachedInjectors.has(a.id)){const h=yc(0,a.type),_=h.length>0?mv([h],this._injector,`Standalone[${a.type.name}]`):null;this.cachedInjectors.set(a.id,_)}return this.cachedInjectors.get(a.id)}ngOnDestroy(){try{for(const a of this.cachedInjectors.values())null!==a&&a.destroy()}finally{this.cachedInjectors.clear()}}}return r.\u0275prov=bt({token:r,providedIn:"environment",factory:()=>new r(Ht(il))}),r})();function x_(r){r.getStandaloneInjector=i=>i.get(NE).getOrCreateStandaloneInjector(r)}function Om(r,i){const a=r[i];return a===jr?void 0:a}function U_(r,i){const a=v();let h;const _=r+Mr;a.firstCreatePass?(h=function tC(r,i){if(i)for(let a=i.length-1;a>=0;a--){const h=i[a];if(r===h.name)return h}}(i,a.pipeRegistry),a.data[_]=h,h.onDestroy&&(a.destroyHooks||(a.destroyHooks=[])).push(_,h.onDestroy)):h=a.data[_];const b=h.factory||(h.factory=ps(h.type)),k=Vn(tc);try{const Z=Ro(!1),se=b();return Ro(Z),function Bf(r,i,a,h){a>=r.data.length&&(r.data[a]=null,r.blueprint[a]=null),i[a]=h}(a,w(),_,se),se}finally{Vn(k)}}function G_(r,i,a){const h=r+Mr,_=w(),b=An(_,h);return Fm(_,h)?function N_(r,i,a,h,_,b){const k=i+a;return Ko(r,k,_)?Sl(r,k+1,b?h.call(b,_):h(_)):Om(r,k+1)}(_,yi(),i,b.transform,a,b):b.transform(a)}function H_(r,i,a,h){const _=r+Mr,b=w(),k=An(b,_);return Fm(b,_)?function L_(r,i,a,h,_,b,k){const Z=i+a;return wc(r,Z,_,b)?Sl(r,Z+2,k?h.call(k,_,b):h(_,b)):Om(r,Z+2)}(b,yi(),i,k.transform,a,h,k):k.transform(a,h)}function Fm(r,i){return r[mn].data[i].pure}function yv(r){return i=>{setTimeout(r,void 0,i)}}const ou=class sC extends n.x{constructor(i=!1){super(),this.__isAsync=i}emit(i){super.next(i)}subscribe(i,a,h){let _=i,b=a||(()=>null),k=h;if(i&&"object"==typeof i){const se=i;_=se.next?.bind(se),b=se.error?.bind(se),k=se.complete?.bind(se)}this.__isAsync&&(b=yv(b),_&&(_=yv(_)),k&&(k=yv(k)));const Z=super.subscribe({next:_,error:b,complete:k});return i instanceof g.w0&&i.add(Z),Z}};function oC(){return this._results[Symbol.iterator]()}class vv{get changes(){return this._changes||(this._changes=new ou)}constructor(i=!1){this._emitDistinctChangesOnly=i,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const a=vv.prototype;a[Symbol.iterator]||(a[Symbol.iterator]=oC)}get(i){return this._results[i]}map(i){return this._results.map(i)}filter(i){return this._results.filter(i)}find(i){return this._results.find(i)}reduce(i,a){return this._results.reduce(i,a)}forEach(i){this._results.forEach(i)}some(i){return this._results.some(i)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(i,a){const h=this;h.dirty=!1;const _=function rs(r){return r.flat(Number.POSITIVE_INFINITY)}(i);(this._changesDetected=!function $o(r,i,a){if(r.length!==i.length)return!1;for(let h=0;h{class r{}return r.__NG_ELEMENT_ID__=cC,r})();const aC=Nm,lC=class extends aC{constructor(i,a,h){super(),this._declarationLView=i,this._declarationTContainer=a,this.elementRef=h}createEmbeddedView(i,a){const h=this._declarationTContainer.tViews,_=yd(this._declarationLView,h,i,16,null,h.declTNode,null,null,null,null,a||null);_[vn]=this._declarationLView[this._declarationTContainer.index];const k=this._declarationLView[er];return null!==k&&(_[er]=k.createEmbeddedView(h)),bl(h,_,i),new Fu(_)}};function cC(){return oy(Ze(),w())}function oy(r,i){return 4&r.type?new lC(i,r,la(r,i)):null}let ay=(()=>{class r{}return r.__NG_ELEMENT_ID__=uC,r})();function uC(){return W_(Ze(),w())}const dC=ay,z_=class extends dC{constructor(i,a,h){super(),this._lContainer=i,this._hostTNode=a,this._hostLView=h}get element(){return la(this._hostTNode,this._hostLView)}get injector(){return new eo(this._hostTNode,this._hostLView)}get parentInjector(){const i=Ss(this._hostTNode,this._hostLView);if(Os(i)){const a=ui(i,this._hostLView),h=Rr(i);return new eo(a[mn].data[h+8],a)}return new eo(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){const a=j_(this._lContainer);return null!==a&&a[i]||null}get length(){return this._lContainer.length-di}createEmbeddedView(i,a,h){let _,b;"number"==typeof h?_=h:null!=h&&(_=h.index,b=h.injector);const k=i.createEmbeddedView(a||{},b);return this.insert(k,_),k}createComponent(i,a,h,_,b){const k=i&&!function No(r){return"function"==typeof r}(i);let Z;if(k)Z=a;else{const it=a||{};Z=it.index,h=it.injector,_=it.projectableNodes,b=it.environmentInjector||it.ngModuleRef}const se=k?i:new Nu(Bn(i)),_e=h||this.parentInjector;if(!b&&null==se.ngModule){const wt=(k?_e:this.parentInjector).get(il,null);wt&&(b=wt)}const Oe=se.create(_e,_,void 0,b);return this.insert(Oe.hostView,Z),Oe}insert(i,a){const h=i._lView,_=h[mn];if(function or(r){return ur(r[Br])}(h)){const Oe=this.indexOf(i);if(-1!==Oe)this.detach(Oe);else{const it=h[Br],wt=new z_(it,it[_t],it[Br]);wt.detach(wt.indexOf(i))}}const b=this._adjustIndex(a),k=this._lContainer;!function fc(r,i,a,h){const _=di+h,b=a.length;h>0&&(a[_-1][Gr]=i),h0)h.push(k[Z/2]);else{const _e=b[Z+1],Oe=i[-se];for(let it=di;it{class r{constructor(a){this.appInits=a,this.resolve=cy,this.reject=cy,this.initialized=!1,this.done=!1,this.donePromise=new Promise((h,_)=>{this.resolve=h,this.reject=_})}runInitializers(){if(this.initialized)return;const a=[],h=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let _=0;_{b.subscribe({complete:Z,error:se})});a.push(k)}}Promise.all(a).then(()=>{h()}).catch(_=>{this.reject(_)}),0===a.length&&h(),this.initialized=!0}}return r.\u0275fac=function(a){return new(a||r)(Ht(C0,8))},r.\u0275prov=bt({token:r,factory:r.\u0275fac,providedIn:"root"}),r})();const b0=new vi("AppId",{providedIn:"root",factory:function I0(){return`${Pv()}${Pv()}${Pv()}`}});function Pv(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const S0=new vi("Platform Initializer"),LC=new vi("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),w0=new vi("appBootstrapListener");let BC=(()=>{class r{log(a){console.log(a)}warn(a){console.warn(a)}}return r.\u0275fac=function(a){return new(a||r)},r.\u0275prov=bt({token:r,factory:r.\u0275fac,providedIn:"platform"}),r})();const dy=new vi("LocaleId",{providedIn:"root",factory:()=>Xt(dy,un.Optional|un.SkipSelf)||function VC(){return typeof $localize<"u"&&$localize.locale||su}()}),$C=new vi("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"});class UC{constructor(i,a){this.ngModuleFactory=i,this.componentFactories=a}}let GC=(()=>{class r{compileModuleSync(a){return new pv(a)}compileModuleAsync(a){return Promise.resolve(this.compileModuleSync(a))}compileModuleAndAllComponentsSync(a){const h=this.compileModuleSync(a),b=Cl(Dr(a).declarations).reduce((k,Z)=>{const se=Bn(Z);return se&&k.push(new Nu(se)),k},[]);return new UC(h,b)}compileModuleAndAllComponentsAsync(a){return Promise.resolve(this.compileModuleAndAllComponentsSync(a))}clearCache(){}clearCacheFor(a){}getModuleId(a){}}return r.\u0275fac=function(a){return new(a||r)},r.\u0275prov=bt({token:r,factory:r.\u0275fac,providedIn:"root"}),r})();const jC=(()=>Promise.resolve(0))();function Mv(r){typeof Zone>"u"?jC.then(()=>{r&&r.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",r)}class nc{constructor({enableLongStackTrace:i=!1,shouldCoalesceEventChangeDetection:a=!1,shouldCoalesceRunChangeDetection:h=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new ou(!1),this.onMicrotaskEmpty=new ou(!1),this.onStable=new ou(!1),this.onError=new ou(!1),typeof Zone>"u")throw new G(908,!1);Zone.assertZonePatched();const _=this;_._nesting=0,_._outer=_._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(_._inner=_._inner.fork(new Zone.TaskTrackingZoneSpec)),i&&Zone.longStackTraceZoneSpec&&(_._inner=_._inner.fork(Zone.longStackTraceZoneSpec)),_.shouldCoalesceEventChangeDetection=!h&&a,_.shouldCoalesceRunChangeDetection=h,_.lastRequestAnimationFrameId=-1,_.nativeRequestAnimationFrame=function WC(){let r=bn.requestAnimationFrame,i=bn.cancelAnimationFrame;if(typeof Zone<"u"&&r&&i){const a=r[Zone.__symbol__("OriginalDelegate")];a&&(r=a);const h=i[Zone.__symbol__("OriginalDelegate")];h&&(i=h)}return{nativeRequestAnimationFrame:r,nativeCancelAnimationFrame:i}}().nativeRequestAnimationFrame,function qC(r){const i=()=>{!function KC(r){r.isCheckStableRunning||-1!==r.lastRequestAnimationFrameId||(r.lastRequestAnimationFrameId=r.nativeRequestAnimationFrame.call(bn,()=>{r.fakeTopEventTask||(r.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{r.lastRequestAnimationFrameId=-1,kv(r),r.isCheckStableRunning=!0,Rv(r),r.isCheckStableRunning=!1},void 0,()=>{},()=>{})),r.fakeTopEventTask.invoke()}),kv(r))}(r)};r._inner=r._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(a,h,_,b,k,Z)=>{try{return A0(r),a.invokeTask(_,b,k,Z)}finally{(r.shouldCoalesceEventChangeDetection&&"eventTask"===b.type||r.shouldCoalesceRunChangeDetection)&&i(),x0(r)}},onInvoke:(a,h,_,b,k,Z,se)=>{try{return A0(r),a.invoke(_,b,k,Z,se)}finally{r.shouldCoalesceRunChangeDetection&&i(),x0(r)}},onHasTask:(a,h,_,b)=>{a.hasTask(_,b),h===_&&("microTask"==b.change?(r._hasPendingMicrotasks=b.microTask,kv(r),Rv(r)):"macroTask"==b.change&&(r.hasPendingMacrotasks=b.macroTask))},onHandleError:(a,h,_,b)=>(a.handleError(_,b),r.runOutsideAngular(()=>r.onError.emit(b)),!1)})}(_)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!nc.isInAngularZone())throw new G(909,!1)}static assertNotInAngularZone(){if(nc.isInAngularZone())throw new G(909,!1)}run(i,a,h){return this._inner.run(i,a,h)}runTask(i,a,h,_){const b=this._inner,k=b.scheduleEventTask("NgZoneEvent: "+_,i,YC,cy,cy);try{return b.runTask(k,a,h)}finally{b.cancelTask(k)}}runGuarded(i,a,h){return this._inner.runGuarded(i,a,h)}runOutsideAngular(i){return this._outer.run(i)}}const YC={};function Rv(r){if(0==r._nesting&&!r.hasPendingMicrotasks&&!r.isStable)try{r._nesting++,r.onMicrotaskEmpty.emit(null)}finally{if(r._nesting--,!r.hasPendingMicrotasks)try{r.runOutsideAngular(()=>r.onStable.emit(null))}finally{r.isStable=!0}}}function kv(r){r.hasPendingMicrotasks=!!(r._hasPendingMicrotasks||(r.shouldCoalesceEventChangeDetection||r.shouldCoalesceRunChangeDetection)&&-1!==r.lastRequestAnimationFrameId)}function A0(r){r._nesting++,r.isStable&&(r.isStable=!1,r.onUnstable.emit(null))}function x0(r){r._nesting--,Rv(r)}class ZC{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new ou,this.onMicrotaskEmpty=new ou,this.onStable=new ou,this.onError=new ou}run(i,a,h){return i.apply(a,h)}runGuarded(i,a,h){return i.apply(a,h)}runOutsideAngular(i){return i()}runTask(i,a,h,_){return i.apply(a,h)}}const P0=new vi(""),M0=new vi("");let Ov,XC=(()=>{class r{constructor(a,h,_){this._ngZone=a,this.registry=h,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,Ov||(function QC(r){Ov=r}(_),_.addToWindow(h)),this._watchAngularEvents(),a.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{nc.assertNotInAngularZone(),Mv(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Mv(()=>{for(;0!==this._callbacks.length;){let a=this._callbacks.pop();clearTimeout(a.timeoutId),a.doneCb(this._didWork)}this._didWork=!1});else{let a=this.getPendingTasks();this._callbacks=this._callbacks.filter(h=>!h.updateCb||!h.updateCb(a)||(clearTimeout(h.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(a=>({source:a.source,creationLocation:a.creationLocation,data:a.data})):[]}addCallback(a,h,_){let b=-1;h&&h>0&&(b=setTimeout(()=>{this._callbacks=this._callbacks.filter(k=>k.timeoutId!==b),a(this._didWork,this.getPendingTasks())},h)),this._callbacks.push({doneCb:a,timeoutId:b,updateCb:_})}whenStable(a,h,_){if(_&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(a,h,_),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(a){this.registry.registerApplication(a,this)}unregisterApplication(a){this.registry.unregisterApplication(a)}findProviders(a,h,_){return[]}}return r.\u0275fac=function(a){return new(a||r)(Ht(nc),Ht(R0),Ht(M0))},r.\u0275prov=bt({token:r,factory:r.\u0275fac}),r})(),R0=(()=>{class r{constructor(){this._applications=new Map}registerApplication(a,h){this._applications.set(a,h)}unregisterApplication(a){this._applications.delete(a)}unregisterAllApplications(){this._applications.clear()}getTestability(a){return this._applications.get(a)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(a,h=!0){return Ov?.findTestabilityInTree(this,a,h)??null}}return r.\u0275fac=function(a){return new(a||r)},r.\u0275prov=bt({token:r,factory:r.\u0275fac,providedIn:"platform"}),r})(),Ld=null;const k0=new vi("AllowMultipleToken"),Fv=new vi("PlatformDestroyListeners"),qu=!1;class tb{constructor(i,a){this.name=i,this.token=a}}function F0(r,i,a=[]){const h=`Platform: ${i}`,_=new vi(h);return(b=[])=>{let k=Nv();if(!k||k.injector.get(k0,!1)){const Z=[...a,...b,{provide:_,useValue:!0}];r?r(Z):function nb(r){if(Ld&&!Ld.get(k0,!1))throw new G(400,!1);Ld=r;const i=r.get(L0);(function O0(r){const i=r.get(S0,null);i&&i.forEach(a=>a())})(r)}(function N0(r=[],i){return Bt.create({name:i,providers:[{provide:od,useValue:"platform"},{provide:Fv,useValue:new Set([()=>Ld=null])},...r]})}(Z,h))}return function ib(r){const i=Nv();if(!i)throw new G(401,!1);return i}()}}function Nv(){return Ld?.get(L0)??null}let L0=(()=>{class r{constructor(a){this._injector=a,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(a,h){const _=function V0(r,i){let a;return a="noop"===r?new ZC:("zone.js"===r?void 0:r)||new nc(i),a}(h?.ngZone,function B0(r){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!r||!r.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!r||!r.ngZoneRunCoalescing)||!1}}(h)),b=[{provide:nc,useValue:_}];return _.run(()=>{const k=Bt.create({providers:b,parent:this.injector,name:a.moduleType.name}),Z=a.create(k),se=Z.injector.get(Ec,null);if(!se)throw new G(402,!1);return _.runOutsideAngular(()=>{const _e=_.onError.subscribe({next:Oe=>{se.handleError(Oe)}});Z.onDestroy(()=>{fy(this._modules,Z),_e.unsubscribe()})}),function $0(r,i,a){try{const h=a();return gm(h)?h.catch(_=>{throw i.runOutsideAngular(()=>r.handleError(_)),_}):h}catch(h){throw i.runOutsideAngular(()=>r.handleError(h)),h}}(se,_,()=>{const _e=Z.injector.get(uy);return _e.runInitializers(),_e.donePromise.then(()=>(function rv(r){ke(r,"Expected localeId to be defined"),"string"==typeof r&&(ry=r.toLowerCase().replace(/_/g,"-"))}(Z.injector.get(dy,su)||su),this._moduleDoBootstrap(Z),Z))})})}bootstrapModule(a,h=[]){const _=U0({},h);return function JC(r,i,a){const h=new pv(a);return Promise.resolve(h)}(0,0,a).then(b=>this.bootstrapModuleFactory(b,_))}_moduleDoBootstrap(a){const h=a.injector.get(hy);if(a._bootstrapComponents.length>0)a._bootstrapComponents.forEach(_=>h.bootstrap(_));else{if(!a.instance.ngDoBootstrap)throw new G(-403,!1);a.instance.ngDoBootstrap(h)}this._modules.push(a)}onDestroy(a){this._destroyListeners.push(a)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new G(404,!1);this._modules.slice().forEach(h=>h.destroy()),this._destroyListeners.forEach(h=>h());const a=this._injector.get(Fv,null);a&&(a.forEach(h=>h()),a.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return r.\u0275fac=function(a){return new(a||r)(Ht(Bt))},r.\u0275prov=bt({token:r,factory:r.\u0275fac,providedIn:"platform"}),r})();function U0(r,i){return Array.isArray(i)?i.reduce(U0,r):{...r,...i}}let hy=(()=>{class r{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(a,h,_){this._zone=a,this._injector=h,this._exceptionHandler=_,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const b=new d.y(Z=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{Z.next(this._stable),Z.complete()})}),k=new d.y(Z=>{let se;this._zone.runOutsideAngular(()=>{se=this._zone.onStable.subscribe(()=>{nc.assertNotInAngularZone(),Mv(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,Z.next(!0))})})});const _e=this._zone.onUnstable.subscribe(()=>{nc.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{Z.next(!1)}))});return()=>{se.unsubscribe(),_e.unsubscribe()}});this.isStable=(0,A.T)(b,k.pipe((0,R.B)()))}bootstrap(a,h){const _=a instanceof hd;if(!this._injector.get(uy).done){!_&&Jr(a);throw new G(405,qu)}let k;k=_?a:this._injector.get(Ql).resolveComponentFactory(a),this.componentTypes.push(k.componentType);const Z=function eb(r){return r.isBoundToModule}(k)?void 0:this._injector.get(np),_e=k.create(Bt.NULL,[],h||k.selector,Z),Oe=_e.location.nativeElement,it=_e.injector.get(P0,null);return it?.registerApplication(Oe),_e.onDestroy(()=>{this.detachView(_e.hostView),fy(this.components,_e),it?.unregisterApplication(Oe)}),this._loadComponent(_e),_e}tick(){if(this._runningTick)throw new G(101,!1);try{this._runningTick=!0;for(let a of this._views)a.detectChanges()}catch(a){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(a))}finally{this._runningTick=!1}}attachView(a){const h=a;this._views.push(h),h.attachToAppRef(this)}detachView(a){const h=a;fy(this._views,h),h.detachFromAppRef()}_loadComponent(a){this.attachView(a.hostView),this.tick(),this.components.push(a);const h=this._injector.get(w0,[]);h.push(...this._bootstrapListeners),h.forEach(_=>_(a))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(a=>a()),this._views.slice().forEach(a=>a.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(a){return this._destroyListeners.push(a),()=>fy(this._destroyListeners,a)}destroy(){if(this._destroyed)throw new G(406,!1);const a=this._injector;a.destroy&&!a.destroyed&&a.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return r.\u0275fac=function(a){return new(a||r)(Ht(nc),Ht(il),Ht(Ec))},r.\u0275prov=bt({token:r,factory:r.\u0275fac,providedIn:"root"}),r})();function fy(r,i){const a=r.indexOf(i);a>-1&&r.splice(a,1)}function ab(){}let lb=(()=>{class r{}return r.__NG_ELEMENT_ID__=cb,r})();function cb(r){return function ub(r,i,a){if(Yi(r)&&!a){const h=Or(r.index,i);return new Fu(h,h)}return 47&r.type?new Fu(i[jt],i):null}(Ze(),w(),16==(16&r))}class W0{constructor(){}supports(i){return Td(i)}create(i){return new gb(i)}}const mb=(r,i)=>i;class gb{constructor(i){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=i||mb}forEachItem(i){let a;for(a=this._itHead;null!==a;a=a._next)i(a)}forEachOperation(i){let a=this._itHead,h=this._removalsHead,_=0,b=null;for(;a||h;){const k=!h||a&&a.currentIndex{k=this._trackByFn(_,Z),null!==a&&Object.is(a.trackById,k)?(h&&(a=this._verifyReinsertion(a,Z,k,_)),Object.is(a.item,Z)||this._addIdentityChange(a,Z)):(a=this._mismatch(a,Z,k,_),h=!0),a=a._next,_++}),this.length=_;return this._truncate(a),this.collection=i,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let i;for(i=this._previousItHead=this._itHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._additionsHead;null!==i;i=i._nextAdded)i.previousIndex=i.currentIndex;for(this._additionsHead=this._additionsTail=null,i=this._movesHead;null!==i;i=i._nextMoved)i.previousIndex=i.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(i,a,h,_){let b;return null===i?b=this._itTail:(b=i._prev,this._remove(i)),null!==(i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(h,null))?(Object.is(i.item,a)||this._addIdentityChange(i,a),this._reinsertAfter(i,b,_)):null!==(i=null===this._linkedRecords?null:this._linkedRecords.get(h,_))?(Object.is(i.item,a)||this._addIdentityChange(i,a),this._moveAfter(i,b,_)):i=this._addAfter(new yb(a,h),b,_),i}_verifyReinsertion(i,a,h,_){let b=null===this._unlinkedRecords?null:this._unlinkedRecords.get(h,null);return null!==b?i=this._reinsertAfter(b,i._prev,_):i.currentIndex!=_&&(i.currentIndex=_,this._addToMoves(i,_)),i}_truncate(i){for(;null!==i;){const a=i._next;this._addToRemovals(this._unlink(i)),i=a}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(i,a,h){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(i);const _=i._prevRemoved,b=i._nextRemoved;return null===_?this._removalsHead=b:_._nextRemoved=b,null===b?this._removalsTail=_:b._prevRemoved=_,this._insertAfter(i,a,h),this._addToMoves(i,h),i}_moveAfter(i,a,h){return this._unlink(i),this._insertAfter(i,a,h),this._addToMoves(i,h),i}_addAfter(i,a,h){return this._insertAfter(i,a,h),this._additionsTail=null===this._additionsTail?this._additionsHead=i:this._additionsTail._nextAdded=i,i}_insertAfter(i,a,h){const _=null===a?this._itHead:a._next;return i._next=_,i._prev=a,null===_?this._itTail=i:_._prev=i,null===a?this._itHead=i:a._next=i,null===this._linkedRecords&&(this._linkedRecords=new Y0),this._linkedRecords.put(i),i.currentIndex=h,i}_remove(i){return this._addToRemovals(this._unlink(i))}_unlink(i){null!==this._linkedRecords&&this._linkedRecords.remove(i);const a=i._prev,h=i._next;return null===a?this._itHead=h:a._next=h,null===h?this._itTail=a:h._prev=a,i}_addToMoves(i,a){return i.previousIndex===a||(this._movesTail=null===this._movesTail?this._movesHead=i:this._movesTail._nextMoved=i),i}_addToRemovals(i){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Y0),this._unlinkedRecords.put(i),i.currentIndex=null,i._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=i,i._prevRemoved=null):(i._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=i),i}_addIdentityChange(i,a){return i.item=a,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=i:this._identityChangesTail._nextIdentityChange=i,i}}class yb{constructor(i,a){this.item=i,this.trackById=a,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class vb{constructor(){this._head=null,this._tail=null}add(i){null===this._head?(this._head=this._tail=i,i._nextDup=null,i._prevDup=null):(this._tail._nextDup=i,i._prevDup=this._tail,i._nextDup=null,this._tail=i)}get(i,a){let h;for(h=this._head;null!==h;h=h._nextDup)if((null===a||a<=h.currentIndex)&&Object.is(h.trackById,i))return h;return null}remove(i){const a=i._prevDup,h=i._nextDup;return null===a?this._head=h:a._nextDup=h,null===h?this._tail=a:h._prevDup=a,null===this._head}}class Y0{constructor(){this.map=new Map}put(i){const a=i.trackById;let h=this.map.get(a);h||(h=new vb,this.map.set(a,h)),h.add(i)}get(i,a){const _=this.map.get(i);return _?_.get(i,a):null}remove(i){const a=i.trackById;return this.map.get(a).remove(i)&&this.map.delete(a),i}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function K0(r,i,a){const h=r.previousIndex;if(null===h)return h;let _=0;return a&&h{if(a&&a.key===_)this._maybeAddToChanges(a,h),this._appendAfter=a,a=a._next;else{const b=this._getOrCreateRecordForKey(_,h);a=this._insertBeforeOrAppend(a,b)}}),a){a._prev&&(a._prev._next=null),this._removalsHead=a;for(let h=a;null!==h;h=h._nextRemoved)h===this._mapHead&&(this._mapHead=null),this._records.delete(h.key),h._nextRemoved=h._next,h.previousValue=h.currentValue,h.currentValue=null,h._prev=null,h._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(i,a){if(i){const h=i._prev;return a._next=i,a._prev=h,i._prev=a,h&&(h._next=a),i===this._mapHead&&(this._mapHead=a),this._appendAfter=i,i}return this._appendAfter?(this._appendAfter._next=a,a._prev=this._appendAfter):this._mapHead=a,this._appendAfter=a,null}_getOrCreateRecordForKey(i,a){if(this._records.has(i)){const _=this._records.get(i);this._maybeAddToChanges(_,a);const b=_._prev,k=_._next;return b&&(b._next=k),k&&(k._prev=b),_._next=null,_._prev=null,_}const h=new Eb(i);return this._records.set(i,h),h.currentValue=a,this._addToAdditions(h),h}_reset(){if(this.isDirty){let i;for(this._previousMapHead=this._mapHead,i=this._previousMapHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._changesHead;null!==i;i=i._nextChanged)i.previousValue=i.currentValue;for(i=this._additionsHead;null!=i;i=i._nextAdded)i.previousValue=i.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(i,a){Object.is(a,i.currentValue)||(i.previousValue=i.currentValue,i.currentValue=a,this._addToChanges(i))}_addToAdditions(i){null===this._additionsHead?this._additionsHead=this._additionsTail=i:(this._additionsTail._nextAdded=i,this._additionsTail=i)}_addToChanges(i){null===this._changesHead?this._changesHead=this._changesTail=i:(this._changesTail._nextChanged=i,this._changesTail=i)}_forEach(i,a){i instanceof Map?i.forEach(a):Object.keys(i).forEach(h=>a(i[h],h))}}class Eb{constructor(i){this.key=i,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function Z0(){return new Uv([new W0])}let Uv=(()=>{class r{constructor(a){this.factories=a}static create(a,h){if(null!=h){const _=h.factories.slice();a=a.concat(_)}return new r(a)}static extend(a){return{provide:r,useFactory:h=>r.create(a,h||Z0()),deps:[[r,new Da,new Bo]]}}find(a){const h=this.factories.find(_=>_.supports(a));if(null!=h)return h;throw new G(901,!1)}}return r.\u0275prov=bt({token:r,providedIn:"root",factory:Z0}),r})();function X0(){return new Gv([new q0])}let Gv=(()=>{class r{constructor(a){this.factories=a}static create(a,h){if(h){const _=h.factories.slice();a=a.concat(_)}return new r(a)}static extend(a){return{provide:r,useFactory:h=>r.create(a,h||X0()),deps:[[r,new Da,new Bo]]}}find(a){const h=this.factories.find(_=>_.supports(a));if(h)return h;throw new G(901,!1)}}return r.\u0275prov=bt({token:r,providedIn:"root",factory:X0}),r})();const Ib=F0(null,"core",[]);let Sb=(()=>{class r{constructor(a){}}return r.\u0275fac=function(a){return new(a||r)(Ht(hy))},r.\u0275mod=Ct({type:r}),r.\u0275inj=Yt({}),r})();function wb(r){return"boolean"==typeof r?r:null!=r&&"false"!==r}},433:(o,c,u)=>{"use strict";u.d(c,{qu:()=>Ri,NI:()=>jt,u:()=>Fi,sg:()=>vs,u5:()=>ua,JU:()=>X,a5:()=>Wn,JJ:()=>Tr,JL:()=>bn,On:()=>Pi,UX:()=>x,kI:()=>Fe,_Y:()=>di});var n=u(4650),g=u(6895),d=u(8996),A=u(9751),R=u(4742),O=u(8421),N=u(3269),U=u(5403),ie=u(3268),L=u(1810),K=u(4004);let z=(()=>{class w{constructor(S,Q){this._renderer=S,this._elementRef=Q,this.onChange=Ze=>{},this.onTouched=()=>{}}setProperty(S,Q){this._renderer.setProperty(this._elementRef.nativeElement,S,Q)}registerOnTouched(S){this.onTouched=S}registerOnChange(S){this.onChange=S}setDisabledState(S){this.setProperty("disabled",S)}}return w.\u0275fac=function(S){return new(S||w)(n.Y36(n.Qsj),n.Y36(n.SBq))},w.\u0275dir=n.lG2({type:w}),w})(),ce=(()=>{class w extends z{}return w.\u0275fac=function(){let v;return function(Q){return(v||(v=n.n5z(w)))(Q||w)}}(),w.\u0275dir=n.lG2({type:w,features:[n.qOj]}),w})();const X=new n.OlP("NgValueAccessor"),te={provide:X,useExisting:(0,n.Gpc)(()=>Ie),multi:!0},ve=new n.OlP("CompositionEventMode");let Ie=(()=>{class w extends z{constructor(S,Q,Ze){super(S,Q),this._compositionMode=Ze,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function pe(){const w=(0,g.q)()?(0,g.q)().getUserAgent():"";return/android (\d+)/.test(w.toLowerCase())}())}writeValue(S){this.setProperty("value",S??"")}_handleInput(S){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(S)}_compositionStart(){this._composing=!0}_compositionEnd(S){this._composing=!1,this._compositionMode&&this.onChange(S)}}return w.\u0275fac=function(S){return new(S||w)(n.Y36(n.Qsj),n.Y36(n.SBq),n.Y36(ve,8))},w.\u0275dir=n.lG2({type:w,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(S,Q){1&S&&n.NdJ("input",function(Ot){return Q._handleInput(Ot.target.value)})("blur",function(){return Q.onTouched()})("compositionstart",function(){return Q._compositionStart()})("compositionend",function(Ot){return Q._compositionEnd(Ot.target.value)})},features:[n._Bn([te]),n.qOj]}),w})();const we=!1;function Ve(w){return null==w||("string"==typeof w||Array.isArray(w))&&0===w.length}function We(w){return null!=w&&"number"==typeof w.length}const Se=new n.OlP("NgValidators"),Me=new n.OlP("NgAsyncValidators"),et=/^(?=.{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])?)*$/;class Fe{static min(v){return function Ee(w){return v=>{if(Ve(v.value)||Ve(w))return null;const S=parseFloat(v.value);return!isNaN(S)&&S{if(Ve(v.value)||Ve(w))return null;const S=parseFloat(v.value);return!isNaN(S)&&S>w?{max:{max:w,actual:v.value}}:null}}(v)}static required(v){return function me(w){return Ve(w.value)?{required:!0}:null}(v)}static requiredTrue(v){return function $(w){return!0===w.value?null:{required:!0}}(v)}static email(v){return function ue(w){return Ve(w.value)||et.test(w.value)?null:{email:!0}}(v)}static minLength(v){return function Qe(w){return v=>Ve(v.value)||!We(v.value)?null:v.value.lengthWe(v.value)&&v.value.length>w?{maxlength:{requiredLength:w,actualLength:v.value.length}}:null}(v)}static pattern(v){return function st(w){if(!w)return Le;let v,S;return"string"==typeof w?(S="","^"!==w.charAt(0)&&(S+="^"),S+=w,"$"!==w.charAt(w.length-1)&&(S+="$"),v=new RegExp(S)):(S=w.toString(),v=w),Q=>{if(Ve(Q.value))return null;const Ze=Q.value;return v.test(Ze)?null:{pattern:{requiredPattern:S,actualValue:Ze}}}}(v)}static nullValidator(v){return null}static compose(v){return St(v)}static composeAsync(v){return kt(v)}}function Le(w){return null}function ke(w){return null!=w}function Ge(w){const v=(0,n.QGY)(w)?(0,d.D)(w):w;if(we&&!(0,n.CqO)(v)){let S="Expected async validator to return Promise or Observable.";throw"object"==typeof w&&(S+=" Are you using a synchronous validator where an async validator is expected?"),new n.vHH(-1101,S)}return v}function ut(w){let v={};return w.forEach(S=>{v=null!=S?{...v,...S}:v}),0===Object.keys(v).length?null:v}function pt(w,v){return v.map(S=>S(w))}function bt(w){return w.map(v=>function $t(w){return!w.validate}(v)?v:S=>v.validate(S))}function St(w){if(!w)return null;const v=w.filter(ke);return 0==v.length?null:function(S){return ut(pt(S,v))}}function Yt(w){return null!=w?St(bt(w)):null}function kt(w){if(!w)return null;const v=w.filter(ke);return 0==v.length?null:function(S){return function ee(...w){const v=(0,N.jO)(w),{args:S,keys:Q}=(0,R.D)(w),Ze=new A.y(Ot=>{const{length:hn}=S;if(!hn)return void Ot.complete();const Yn=new Array(hn);let Pr=hn,Zr=hn;for(let ii=0;ii{Ti||(Ti=!0,Zr--),Yn[ii]=Rs},()=>Pr--,void 0,()=>{(!Pr||!Ti)&&(Zr||Ot.next(Q?(0,L.n)(Q,Yn):Yn),Ot.complete())}))}});return v?Ze.pipe((0,ie.Z)(v)):Ze}(pt(S,v).map(Ge)).pipe((0,K.U)(ut))}}function Et(w){return null!=w?kt(bt(w)):null}function It(w,v){return null===w?[v]:Array.isArray(w)?[...w,v]:[w,v]}function gn(w){return w._rawValidators}function Sn(w){return w._rawAsyncValidators}function cr(w){return w?Array.isArray(w)?w:[w]:[]}function Dn(w,v){return Array.isArray(w)?w.includes(v):w===v}function jn(w,v){const S=cr(v);return cr(w).forEach(Ze=>{Dn(S,Ze)||S.push(Ze)}),S}function Mn(w,v){return cr(v).filter(S=>!Dn(w,S))}class Fn{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(v){this._rawValidators=v||[],this._composedValidatorFn=Yt(this._rawValidators)}_setAsyncValidators(v){this._rawAsyncValidators=v||[],this._composedAsyncValidatorFn=Et(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(v){this._onDestroyCallbacks.push(v)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(v=>v()),this._onDestroyCallbacks=[]}reset(v){this.control&&this.control.reset(v)}hasError(v,S){return!!this.control&&this.control.hasError(v,S)}getError(v,S){return this.control?this.control.getError(v,S):null}}class un extends Fn{get formDirective(){return null}get path(){return null}}class Wn extends Fn{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Zn{constructor(v){this._cd=v}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let Tr=(()=>{class w extends Zn{constructor(S){super(S)}}return w.\u0275fac=function(S){return new(S||w)(n.Y36(Wn,2))},w.\u0275dir=n.lG2({type:w,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(S,Q){2&S&&n.ekj("ng-untouched",Q.isUntouched)("ng-touched",Q.isTouched)("ng-pristine",Q.isPristine)("ng-dirty",Q.isDirty)("ng-valid",Q.isValid)("ng-invalid",Q.isInvalid)("ng-pending",Q.isPending)},features:[n.qOj]}),w})(),bn=(()=>{class w extends Zn{constructor(S){super(S)}}return w.\u0275fac=function(S){return new(S||w)(n.Y36(un,10))},w.\u0275dir=n.lG2({type:w,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(S,Q){2&S&&n.ekj("ng-untouched",Q.isUntouched)("ng-touched",Q.isTouched)("ng-pristine",Q.isPristine)("ng-dirty",Q.isDirty)("ng-valid",Q.isValid)("ng-invalid",Q.isInvalid)("ng-pending",Q.isPending)("ng-submitted",Q.isSubmitted)},features:[n.qOj]}),w})();function Ht(w,v){return w?`with name: '${v}'`:`at index: ${v}`}const wn=!1,kn="VALID",vr="INVALID",rt="PENDING",Te="DISABLED";function Ye(w){return(nn(w)?w.validators:w)||null}function dt(w,v){return(nn(v)?v.asyncValidators:w)||null}function nn(w){return null!=w&&!Array.isArray(w)&&"object"==typeof w}function En(w,v,S){const Q=w.controls;if(!(v?Object.keys(Q):Q).length)throw new n.vHH(1e3,wn?function At(w){return`\n There are no form controls registered with this ${w?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(v):"");if(!Q[S])throw new n.vHH(1001,wn?function Xt(w,v){return`Cannot find form control ${Ht(w,v)}`}(v,S):"")}function yn(w,v,S){w._forEachChild((Q,Ze)=>{if(void 0===S[Ze])throw new n.vHH(1002,wn?function sn(w,v){return`Must supply a value for form control ${Ht(w,v)}`}(v,Ze):"")})}class Gn{constructor(v,S){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(v),this._assignAsyncValidators(S)}get validator(){return this._composedValidatorFn}set validator(v){this._rawValidators=this._composedValidatorFn=v}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(v){this._rawAsyncValidators=this._composedAsyncValidatorFn=v}get parent(){return this._parent}get valid(){return this.status===kn}get invalid(){return this.status===vr}get pending(){return this.status==rt}get disabled(){return this.status===Te}get enabled(){return this.status!==Te}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(v){this._assignValidators(v)}setAsyncValidators(v){this._assignAsyncValidators(v)}addValidators(v){this.setValidators(jn(v,this._rawValidators))}addAsyncValidators(v){this.setAsyncValidators(jn(v,this._rawAsyncValidators))}removeValidators(v){this.setValidators(Mn(v,this._rawValidators))}removeAsyncValidators(v){this.setAsyncValidators(Mn(v,this._rawAsyncValidators))}hasValidator(v){return Dn(this._rawValidators,v)}hasAsyncValidator(v){return Dn(this._rawAsyncValidators,v)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(v={}){this.touched=!0,this._parent&&!v.onlySelf&&this._parent.markAsTouched(v)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(v=>v.markAllAsTouched())}markAsUntouched(v={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(S=>{S.markAsUntouched({onlySelf:!0})}),this._parent&&!v.onlySelf&&this._parent._updateTouched(v)}markAsDirty(v={}){this.pristine=!1,this._parent&&!v.onlySelf&&this._parent.markAsDirty(v)}markAsPristine(v={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(S=>{S.markAsPristine({onlySelf:!0})}),this._parent&&!v.onlySelf&&this._parent._updatePristine(v)}markAsPending(v={}){this.status=rt,!1!==v.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!v.onlySelf&&this._parent.markAsPending(v)}disable(v={}){const S=this._parentMarkedDirty(v.onlySelf);this.status=Te,this.errors=null,this._forEachChild(Q=>{Q.disable({...v,onlySelf:!0})}),this._updateValue(),!1!==v.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...v,skipPristineCheck:S}),this._onDisabledChange.forEach(Q=>Q(!0))}enable(v={}){const S=this._parentMarkedDirty(v.onlySelf);this.status=kn,this._forEachChild(Q=>{Q.enable({...v,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:v.emitEvent}),this._updateAncestors({...v,skipPristineCheck:S}),this._onDisabledChange.forEach(Q=>Q(!1))}_updateAncestors(v){this._parent&&!v.onlySelf&&(this._parent.updateValueAndValidity(v),v.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(v){this._parent=v}getRawValue(){return this.value}updateValueAndValidity(v={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===kn||this.status===rt)&&this._runAsyncValidator(v.emitEvent)),!1!==v.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!v.onlySelf&&this._parent.updateValueAndValidity(v)}_updateTreeValidity(v={emitEvent:!0}){this._forEachChild(S=>S._updateTreeValidity(v)),this.updateValueAndValidity({onlySelf:!0,emitEvent:v.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Te:kn}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(v){if(this.asyncValidator){this.status=rt,this._hasOwnPendingAsyncValidator=!0;const S=Ge(this.asyncValidator(this));this._asyncValidationSubscription=S.subscribe(Q=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(Q,{emitEvent:v})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(v,S={}){this.errors=v,this._updateControlsErrors(!1!==S.emitEvent)}get(v){let S=v;return null==S||(Array.isArray(S)||(S=S.split(".")),0===S.length)?null:S.reduce((Q,Ze)=>Q&&Q._find(Ze),this)}getError(v,S){const Q=S?this.get(S):this;return Q&&Q.errors?Q.errors[v]:null}hasError(v,S){return!!this.getError(v,S)}get root(){let v=this;for(;v._parent;)v=v._parent;return v}_updateControlsErrors(v){this.status=this._calculateStatus(),v&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(v)}_initObservables(){this.valueChanges=new n.vpe,this.statusChanges=new n.vpe}_calculateStatus(){return this._allControlsDisabled()?Te:this.errors?vr:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(rt)?rt:this._anyControlsHaveStatus(vr)?vr:kn}_anyControlsHaveStatus(v){return this._anyControls(S=>S.status===v)}_anyControlsDirty(){return this._anyControls(v=>v.dirty)}_anyControlsTouched(){return this._anyControls(v=>v.touched)}_updatePristine(v={}){this.pristine=!this._anyControlsDirty(),this._parent&&!v.onlySelf&&this._parent._updatePristine(v)}_updateTouched(v={}){this.touched=this._anyControlsTouched(),this._parent&&!v.onlySelf&&this._parent._updateTouched(v)}_registerOnCollectionChange(v){this._onCollectionChange=v}_setUpdateStrategy(v){nn(v)&&null!=v.updateOn&&(this._updateOn=v.updateOn)}_parentMarkedDirty(v){return!v&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(v){return null}_assignValidators(v){this._rawValidators=Array.isArray(v)?v.slice():v,this._composedValidatorFn=function ft(w){return Array.isArray(w)?Yt(w):w||null}(this._rawValidators)}_assignAsyncValidators(v){this._rawAsyncValidators=Array.isArray(v)?v.slice():v,this._composedAsyncValidatorFn=function Gt(w){return Array.isArray(w)?Et(w):w||null}(this._rawAsyncValidators)}}class gt extends Gn{constructor(v,S,Q){super(Ye(S),dt(Q,S)),this.controls=v,this._initObservables(),this._setUpdateStrategy(S),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(v,S){return this.controls[v]?this.controls[v]:(this.controls[v]=S,S.setParent(this),S._registerOnCollectionChange(this._onCollectionChange),S)}addControl(v,S,Q={}){this.registerControl(v,S),this.updateValueAndValidity({emitEvent:Q.emitEvent}),this._onCollectionChange()}removeControl(v,S={}){this.controls[v]&&this.controls[v]._registerOnCollectionChange(()=>{}),delete this.controls[v],this.updateValueAndValidity({emitEvent:S.emitEvent}),this._onCollectionChange()}setControl(v,S,Q={}){this.controls[v]&&this.controls[v]._registerOnCollectionChange(()=>{}),delete this.controls[v],S&&this.registerControl(v,S),this.updateValueAndValidity({emitEvent:Q.emitEvent}),this._onCollectionChange()}contains(v){return this.controls.hasOwnProperty(v)&&this.controls[v].enabled}setValue(v,S={}){yn(this,!0,v),Object.keys(v).forEach(Q=>{En(this,!0,Q),this.controls[Q].setValue(v[Q],{onlySelf:!0,emitEvent:S.emitEvent})}),this.updateValueAndValidity(S)}patchValue(v,S={}){null!=v&&(Object.keys(v).forEach(Q=>{const Ze=this.controls[Q];Ze&&Ze.patchValue(v[Q],{onlySelf:!0,emitEvent:S.emitEvent})}),this.updateValueAndValidity(S))}reset(v={},S={}){this._forEachChild((Q,Ze)=>{Q.reset(v[Ze],{onlySelf:!0,emitEvent:S.emitEvent})}),this._updatePristine(S),this._updateTouched(S),this.updateValueAndValidity(S)}getRawValue(){return this._reduceChildren({},(v,S,Q)=>(v[Q]=S.getRawValue(),v))}_syncPendingControls(){let v=this._reduceChildren(!1,(S,Q)=>!!Q._syncPendingControls()||S);return v&&this.updateValueAndValidity({onlySelf:!0}),v}_forEachChild(v){Object.keys(this.controls).forEach(S=>{const Q=this.controls[S];Q&&v(Q,S)})}_setUpControls(){this._forEachChild(v=>{v.setParent(this),v._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(v){for(const[S,Q]of Object.entries(this.controls))if(this.contains(S)&&v(Q))return!0;return!1}_reduceValue(){return this._reduceChildren({},(S,Q,Ze)=>((Q.enabled||this.disabled)&&(S[Ze]=Q.value),S))}_reduceChildren(v,S){let Q=v;return this._forEachChild((Ze,Ot)=>{Q=S(Q,Ze,Ot)}),Q}_allControlsDisabled(){for(const v of Object.keys(this.controls))if(this.controls[v].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(v){return this.controls.hasOwnProperty(v)?this.controls[v]:null}}class nt extends gt{}const qt=new n.OlP("CallSetDisabledState",{providedIn:"root",factory:()=>Cn}),Cn="always";function tr(w,v){return[...v.path,w]}function fr(w,v,S=Cn){tn(w,v),v.valueAccessor.writeValue(w.value),(w.disabled||"always"===S)&&v.valueAccessor.setDisabledState?.(w.disabled),function Er(w,v){v.valueAccessor.registerOnChange(S=>{w._pendingValue=S,w._pendingChange=!0,w._pendingDirty=!0,"change"===w.updateOn&&Cr(w,v)})}(w,v),function Ar(w,v){const S=(Q,Ze)=>{v.valueAccessor.writeValue(Q),Ze&&v.viewToModelUpdate(Q)};w.registerOnChange(S),v._registerOnDestroy(()=>{w._unregisterOnChange(S)})}(w,v),function Bn(w,v){v.valueAccessor.registerOnTouched(()=>{w._pendingTouched=!0,"blur"===w.updateOn&&w._pendingChange&&Cr(w,v),"submit"!==w.updateOn&&w.markAsTouched()})}(w,v),function zt(w,v){if(v.valueAccessor.setDisabledState){const S=Q=>{v.valueAccessor.setDisabledState(Q)};w.registerOnDisabledChange(S),v._registerOnDestroy(()=>{w._unregisterOnDisabledChange(S)})}}(w,v)}function nr(w,v,S=!0){const Q=()=>{};v.valueAccessor&&(v.valueAccessor.registerOnChange(Q),v.valueAccessor.registerOnTouched(Q)),xn(w,v),w&&(v._invokeOnDestroyCallbacks(),w._registerOnCollectionChange(()=>{}))}function Ct(w,v){w.forEach(S=>{S.registerOnValidatorChange&&S.registerOnValidatorChange(v)})}function tn(w,v){const S=gn(w);null!==v.validator?w.setValidators(It(S,v.validator)):"function"==typeof S&&w.setValidators([S]);const Q=Sn(w);null!==v.asyncValidator?w.setAsyncValidators(It(Q,v.asyncValidator)):"function"==typeof Q&&w.setAsyncValidators([Q]);const Ze=()=>w.updateValueAndValidity();Ct(v._rawValidators,Ze),Ct(v._rawAsyncValidators,Ze)}function xn(w,v){let S=!1;if(null!==w){if(null!==v.validator){const Ze=gn(w);if(Array.isArray(Ze)&&Ze.length>0){const Ot=Ze.filter(hn=>hn!==v.validator);Ot.length!==Ze.length&&(S=!0,w.setValidators(Ot))}}if(null!==v.asyncValidator){const Ze=Sn(w);if(Array.isArray(Ze)&&Ze.length>0){const Ot=Ze.filter(hn=>hn!==v.asyncValidator);Ot.length!==Ze.length&&(S=!0,w.setAsyncValidators(Ot))}}}const Q=()=>{};return Ct(v._rawValidators,Q),Ct(v._rawAsyncValidators,Q),S}function Cr(w,v){w._pendingDirty&&w.markAsDirty(),w.setValue(w._pendingValue,{emitModelToViewChange:!1}),v.viewToModelUpdate(w._pendingValue),w._pendingChange=!1}function ni(w,v){if(!w.hasOwnProperty("model"))return!1;const S=w.model;return!!S.isFirstChange()||!Object.is(v,S.currentValue)}function ye(w,v){if(!v)return null;let S,Q,Ze;return Array.isArray(v),v.forEach(Ot=>{Ot.constructor===Ie?S=Ot:function _t(w){return Object.getPrototypeOf(w.constructor)===ce}(Ot)?Q=Ot:Ze=Ot}),Ze||Q||S||null}function Mt(w,v){const S=w.indexOf(v);S>-1&&w.splice(S,1)}function Vt(w){return"object"==typeof w&&null!==w&&2===Object.keys(w).length&&"value"in w&&"disabled"in w}const jt=class extends Gn{constructor(v=null,S,Q){super(Ye(S),dt(Q,S)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(v),this._setUpdateStrategy(S),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),nn(S)&&(S.nonNullable||S.initialValueIsDefault)&&(this.defaultValue=Vt(v)?v.value:v)}setValue(v,S={}){this.value=this._pendingValue=v,this._onChange.length&&!1!==S.emitModelToViewChange&&this._onChange.forEach(Q=>Q(this.value,!1!==S.emitViewToModelChange)),this.updateValueAndValidity(S)}patchValue(v,S={}){this.setValue(v,S)}reset(v=this.defaultValue,S={}){this._applyFormState(v),this.markAsPristine(S),this.markAsUntouched(S),this.setValue(this.value,S),this._pendingChange=!1}_updateValue(){}_anyControls(v){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(v){this._onChange.push(v)}_unregisterOnChange(v){Mt(this._onChange,v)}registerOnDisabledChange(v){this._onDisabledChange.push(v)}_unregisterOnDisabledChange(v){Mt(this._onDisabledChange,v)}_forEachChild(v){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(v){Vt(v)?(this.value=this._pendingValue=v.value,v.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=v}},Wi={provide:Wn,useExisting:(0,n.Gpc)(()=>Pi)},Vi=(()=>Promise.resolve())();let Pi=(()=>{class w extends Wn{constructor(S,Q,Ze,Ot,hn,Yn){super(),this._changeDetectorRef=hn,this.callSetDisabledState=Yn,this.control=new jt,this._registered=!1,this.update=new n.vpe,this._parent=S,this._setValidators(Q),this._setAsyncValidators(Ze),this.valueAccessor=ye(0,Ot)}ngOnChanges(S){if(this._checkForErrors(),!this._registered||"name"in S){if(this._registered&&(this._checkName(),this.formDirective)){const Q=S.name.previousValue;this.formDirective.removeControl({name:Q,path:this._getPath(Q)})}this._setUpControl()}"isDisabled"in S&&this._updateDisabled(S),ni(S,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(S){this.viewModel=S,this.update.emit(S)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){fr(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()}_updateValue(S){Vi.then(()=>{this.control.setValue(S,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(S){const Q=S.isDisabled.currentValue,Ze=0!==Q&&(0,n.D6c)(Q);Vi.then(()=>{Ze&&!this.control.disabled?this.control.disable():!Ze&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(S){return this._parent?tr(S,this._parent):[S]}}return w.\u0275fac=function(S){return new(S||w)(n.Y36(un,9),n.Y36(Se,10),n.Y36(Me,10),n.Y36(X,10),n.Y36(n.sBO,8),n.Y36(qt,8))},w.\u0275dir=n.lG2({type:w,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[n._Bn([Wi]),n.qOj,n.TTD]}),w})(),di=(()=>{class w{}return w.\u0275fac=function(S){return new(S||w)},w.\u0275dir=n.lG2({type:w,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),w})(),Yi=(()=>{class w{}return w.\u0275fac=function(S){return new(S||w)},w.\u0275mod=n.oAB({type:w}),w.\u0275inj=n.cJS({}),w})();const ss=new n.OlP("NgModelWithFormControlWarning"),gi={provide:un,useExisting:(0,n.Gpc)(()=>vs)};let vs=(()=>{class w extends un{constructor(S,Q,Ze){super(),this.callSetDisabledState=Ze,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new n.vpe,this._setValidators(S),this._setAsyncValidators(Q)}ngOnChanges(S){this._checkFormPresent(),S.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(xn(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(S){const Q=this.form.get(S.path);return fr(Q,S,this.callSetDisabledState),Q.updateValueAndValidity({emitEvent:!1}),this.directives.push(S),Q}getControl(S){return this.form.get(S.path)}removeControl(S){nr(S.control||null,S,!1),function ze(w,v){const S=w.indexOf(v);S>-1&&w.splice(S,1)}(this.directives,S)}addFormGroup(S){this._setUpFormContainer(S)}removeFormGroup(S){this._cleanUpFormContainer(S)}getFormGroup(S){return this.form.get(S.path)}addFormArray(S){this._setUpFormContainer(S)}removeFormArray(S){this._cleanUpFormContainer(S)}getFormArray(S){return this.form.get(S.path)}updateModel(S,Q){this.form.get(S.path).setValue(Q)}onSubmit(S){return this.submitted=!0,function le(w,v){w._syncPendingControls(),v.forEach(S=>{const Q=S.control;"submit"===Q.updateOn&&Q._pendingChange&&(S.viewToModelUpdate(Q._pendingValue),Q._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(S),"dialog"===S?.target?.method}onReset(){this.resetForm()}resetForm(S){this.form.reset(S),this.submitted=!1}_updateDomValue(){this.directives.forEach(S=>{const Q=S.control,Ze=this.form.get(S.path);Q!==Ze&&(nr(Q||null,S),(w=>w instanceof jt)(Ze)&&(fr(Ze,S,this.callSetDisabledState),S.control=Ze))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(S){const Q=this.form.get(S.path);(function Jr(w,v){tn(w,v)})(Q,S),Q.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(S){if(this.form){const Q=this.form.get(S.path);Q&&function Dr(w,v){return xn(w,v)}(Q,S)&&Q.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){tn(this.form,this),this._oldForm&&xn(this._oldForm,this)}_checkFormPresent(){}}return w.\u0275fac=function(S){return new(S||w)(n.Y36(Se,10),n.Y36(Me,10),n.Y36(qt,8))},w.\u0275dir=n.lG2({type:w,selectors:[["","formGroup",""]],hostBindings:function(S,Q){1&S&&n.NdJ("submit",function(Ot){return Q.onSubmit(Ot)})("reset",function(){return Q.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[n._Bn([gi]),n.qOj,n.TTD]}),w})();const Zo={provide:Wn,useExisting:(0,n.Gpc)(()=>Fi)};let Fi=(()=>{class w extends Wn{set isDisabled(S){}constructor(S,Q,Ze,Ot,hn){super(),this._ngModelWarningConfig=hn,this._added=!1,this.update=new n.vpe,this._ngModelWarningSent=!1,this._parent=S,this._setValidators(Q),this._setAsyncValidators(Ze),this.valueAccessor=ye(0,Ot)}ngOnChanges(S){this._added||this._setUpControl(),ni(S,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(S){this.viewModel=S,this.update.emit(S)}get path(){return tr(null==this.name?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}}return w._ngModelWarningSentOnce=!1,w.\u0275fac=function(S){return new(S||w)(n.Y36(un,13),n.Y36(Se,10),n.Y36(Me,10),n.Y36(X,10),n.Y36(ss,8))},w.\u0275dir=n.lG2({type:w,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[n._Bn([Zo]),n.qOj,n.TTD]}),w})(),Ms=(()=>{class w{}return w.\u0275fac=function(S){return new(S||w)},w.\u0275mod=n.oAB({type:w}),w.\u0275inj=n.cJS({imports:[Yi]}),w})();class Ci extends Gn{constructor(v,S,Q){super(Ye(S),dt(Q,S)),this.controls=v,this._initObservables(),this._setUpdateStrategy(S),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(v){return this.controls[this._adjustIndex(v)]}push(v,S={}){this.controls.push(v),this._registerControl(v),this.updateValueAndValidity({emitEvent:S.emitEvent}),this._onCollectionChange()}insert(v,S,Q={}){this.controls.splice(v,0,S),this._registerControl(S),this.updateValueAndValidity({emitEvent:Q.emitEvent})}removeAt(v,S={}){let Q=this._adjustIndex(v);Q<0&&(Q=0),this.controls[Q]&&this.controls[Q]._registerOnCollectionChange(()=>{}),this.controls.splice(Q,1),this.updateValueAndValidity({emitEvent:S.emitEvent})}setControl(v,S,Q={}){let Ze=this._adjustIndex(v);Ze<0&&(Ze=0),this.controls[Ze]&&this.controls[Ze]._registerOnCollectionChange(()=>{}),this.controls.splice(Ze,1),S&&(this.controls.splice(Ze,0,S),this._registerControl(S)),this.updateValueAndValidity({emitEvent:Q.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(v,S={}){yn(this,!1,v),v.forEach((Q,Ze)=>{En(this,!1,Ze),this.at(Ze).setValue(Q,{onlySelf:!0,emitEvent:S.emitEvent})}),this.updateValueAndValidity(S)}patchValue(v,S={}){null!=v&&(v.forEach((Q,Ze)=>{this.at(Ze)&&this.at(Ze).patchValue(Q,{onlySelf:!0,emitEvent:S.emitEvent})}),this.updateValueAndValidity(S))}reset(v=[],S={}){this._forEachChild((Q,Ze)=>{Q.reset(v[Ze],{onlySelf:!0,emitEvent:S.emitEvent})}),this._updatePristine(S),this._updateTouched(S),this.updateValueAndValidity(S)}getRawValue(){return this.controls.map(v=>v.getRawValue())}clear(v={}){this.controls.length<1||(this._forEachChild(S=>S._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:v.emitEvent}))}_adjustIndex(v){return v<0?v+this.length:v}_syncPendingControls(){let v=this.controls.reduce((S,Q)=>!!Q._syncPendingControls()||S,!1);return v&&this.updateValueAndValidity({onlySelf:!0}),v}_forEachChild(v){this.controls.forEach((S,Q)=>{v(S,Q)})}_updateValue(){this.value=this.controls.filter(v=>v.enabled||this.disabled).map(v=>v.value)}_anyControls(v){return this.controls.some(S=>S.enabled&&v(S))}_setUpControls(){this._forEachChild(v=>this._registerControl(v))}_allControlsDisabled(){for(const v of this.controls)if(v.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(v){v.setParent(this),v._registerOnCollectionChange(this._onCollectionChange)}_find(v){return this.at(v)??null}}function wi(w){return!!w&&(void 0!==w.asyncValidators||void 0!==w.validators||void 0!==w.updateOn)}let Ri=(()=>{class w{constructor(){this.useNonNullable=!1}get nonNullable(){const S=new w;return S.useNonNullable=!0,S}group(S,Q=null){const Ze=this._reduceControls(S);let Ot={};return wi(Q)?Ot=Q:null!==Q&&(Ot.validators=Q.validator,Ot.asyncValidators=Q.asyncValidator),new gt(Ze,Ot)}record(S,Q=null){const Ze=this._reduceControls(S);return new nt(Ze,Q)}control(S,Q,Ze){let Ot={};return this.useNonNullable?(wi(Q)?Ot=Q:(Ot.validators=Q,Ot.asyncValidators=Ze),new jt(S,{...Ot,nonNullable:!0})):new jt(S,Q,Ze)}array(S,Q,Ze){const Ot=S.map(hn=>this._createControl(hn));return new Ci(Ot,Q,Ze)}_reduceControls(S){const Q={};return Object.keys(S).forEach(Ze=>{Q[Ze]=this._createControl(S[Ze])}),Q}_createControl(S){return S instanceof jt||S instanceof Gn?S:Array.isArray(S)?this.control(S[0],S.length>1?S[1]:null,S.length>2?S[2]:null):this.control(S)}}return w.\u0275fac=function(S){return new(S||w)},w.\u0275prov=n.Yz7({token:w,factory:w.\u0275fac,providedIn:"root"}),w})(),ua=(()=>{class w{static withConfig(S){return{ngModule:w,providers:[{provide:qt,useValue:S.callSetDisabledState??Cn}]}}}return w.\u0275fac=function(S){return new(S||w)},w.\u0275mod=n.oAB({type:w}),w.\u0275inj=n.cJS({imports:[Ms]}),w})(),x=(()=>{class w{static withConfig(S){return{ngModule:w,providers:[{provide:ss,useValue:S.warnOnNgModelWithFormControl??"always"},{provide:qt,useValue:S.callSetDisabledState??Cn}]}}}return w.\u0275fac=function(S){return new(S||w)},w.\u0275mod=n.oAB({type:w}),w.\u0275inj=n.cJS({imports:[Ms]}),w})()},1481:(o,c,u)=>{"use strict";u.d(c,{Cb:()=>At,Dx:()=>bn,b2:()=>Wn,h_:()=>Vn,ki:()=>Xt,q6:()=>jn});var n=u(6895),g=u(4650);class d extends n.w_{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class A extends d{static makeCurrent(){(0,n.HT)(new A)}onAndCancel(lt,He,nt){return lt.addEventListener(He,nt,!1),()=>{lt.removeEventListener(He,nt,!1)}}dispatchEvent(lt,He){lt.dispatchEvent(He)}remove(lt){lt.parentNode&<.parentNode.removeChild(lt)}createElement(lt,He){return(He=He||this.getDefaultDocument()).createElement(lt)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(lt){return lt.nodeType===Node.ELEMENT_NODE}isShadowRoot(lt){return lt instanceof DocumentFragment}getGlobalEventTarget(lt,He){return"window"===He?window:"document"===He?lt:"body"===He?lt.body:null}getBaseHref(lt){const He=function O(){return R=R||document.querySelector("base"),R?R.getAttribute("href"):null}();return null==He?null:function U(gt){N=N||document.createElement("a"),N.setAttribute("href",gt);const lt=N.pathname;return"/"===lt.charAt(0)?lt:`/${lt}`}(He)}resetBaseElement(){R=null}getUserAgent(){return window.navigator.userAgent}getCookie(lt){return(0,n.Mx)(document.cookie,lt)}}let N,R=null;const ie=new g.OlP("TRANSITION_ID"),ee=[{provide:g.ip1,useFactory:function L(gt,lt,He){return()=>{He.get(g.CZH).donePromise.then(()=>{const nt=(0,n.q)(),mt=lt.querySelectorAll(`style[ng-transition="${gt}"]`);for(let qt=0;qt{class gt{build(){return new XMLHttpRequest}}return gt.\u0275fac=function(He){return new(He||gt)},gt.\u0275prov=g.Yz7({token:gt,factory:gt.\u0275fac}),gt})();const ce=new g.OlP("EventManagerPlugins");let X=(()=>{class gt{constructor(He,nt){this._zone=nt,this._eventNameToPlugin=new Map,He.forEach(mt=>mt.manager=this),this._plugins=He.slice().reverse()}addEventListener(He,nt,mt){return this._findPluginFor(nt).addEventListener(He,nt,mt)}addGlobalEventListener(He,nt,mt){return this._findPluginFor(nt).addGlobalEventListener(He,nt,mt)}getZone(){return this._zone}_findPluginFor(He){const nt=this._eventNameToPlugin.get(He);if(nt)return nt;const mt=this._plugins;for(let qt=0;qt{class gt{constructor(){this.usageCount=new Map}addStyles(He){for(const nt of He)1===this.changeUsageCount(nt,1)&&this.onStyleAdded(nt)}removeStyles(He){for(const nt of He)0===this.changeUsageCount(nt,-1)&&this.onStyleRemoved(nt)}onStyleRemoved(He){}onStyleAdded(He){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(He,nt){const mt=this.usageCount;let qt=mt.get(He)??0;return qt+=nt,qt>0?mt.set(He,qt):mt.delete(He),qt}ngOnDestroy(){for(const He of this.getAllStyles())this.onStyleRemoved(He);this.usageCount.clear()}}return gt.\u0275fac=function(He){return new(He||gt)},gt.\u0275prov=g.Yz7({token:gt,factory:gt.\u0275fac}),gt})(),te=(()=>{class gt extends G{constructor(He){super(),this.doc=He,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(He){for(const nt of this.hostNodes)this.addStyleToHost(nt,He)}onStyleRemoved(He){const nt=this.styleRef;nt.get(He)?.forEach(qt=>qt.remove()),nt.delete(He)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(He){this.hostNodes.add(He);for(const nt of this.getAllStyles())this.addStyleToHost(He,nt)}removeHost(He){this.hostNodes.delete(He)}addStyleToHost(He,nt){const mt=this.doc.createElement("style");mt.textContent=nt,He.appendChild(mt);const qt=this.styleRef.get(nt);qt?qt.push(mt):this.styleRef.set(nt,[mt])}resetHostNodes(){const He=this.hostNodes;He.clear(),He.add(this.doc.head)}}return gt.\u0275fac=function(He){return new(He||gt)(g.LFG(n.K0))},gt.\u0275prov=g.Yz7({token:gt,factory:gt.\u0275fac}),gt})();const pe={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/MathML/"},ve=/%COMP%/g,Me=new g.OlP("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function Ee(gt,lt){return lt.flat(100).map(He=>He.replace(ve,gt))}function ae(gt){return lt=>{if("__ngUnwrap__"===lt)return gt;!1===gt(lt)&&(lt.preventDefault(),lt.returnValue=!1)}}let me=(()=>{class gt{constructor(He,nt,mt,qt){this.eventManager=He,this.sharedStylesHost=nt,this.appId=mt,this.removeStylesOnCompDestory=qt,this.rendererByCompId=new Map,this.defaultRenderer=new $(He)}createRenderer(He,nt){if(!He||!nt)return this.defaultRenderer;const mt=this.getOrCreateRenderer(He,nt);return mt instanceof ke?mt.applyToHost(He):mt instanceof Le&&mt.applyStyles(),mt}getOrCreateRenderer(He,nt){const mt=this.rendererByCompId;let qt=mt.get(nt.id);if(!qt){const Cn=this.eventManager,tr=this.sharedStylesHost,fr=this.removeStylesOnCompDestory;switch(nt.encapsulation){case g.ifc.Emulated:qt=new ke(Cn,tr,nt,this.appId,fr);break;case g.ifc.ShadowDom:return new st(Cn,tr,He,nt);default:qt=new Le(Cn,tr,nt,fr)}qt.onDestroy=()=>mt.delete(nt.id),mt.set(nt.id,qt)}return qt}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return gt.\u0275fac=function(He){return new(He||gt)(g.LFG(X),g.LFG(te),g.LFG(g.AFp),g.LFG(Me))},gt.\u0275prov=g.Yz7({token:gt,factory:gt.\u0275fac}),gt})();class ${constructor(lt){this.eventManager=lt,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(lt,He){return He?document.createElementNS(pe[He]||He,lt):document.createElement(lt)}createComment(lt){return document.createComment(lt)}createText(lt){return document.createTextNode(lt)}appendChild(lt,He){(xe(lt)?lt.content:lt).appendChild(He)}insertBefore(lt,He,nt){lt&&(xe(lt)?lt.content:lt).insertBefore(He,nt)}removeChild(lt,He){lt&<.removeChild(He)}selectRootElement(lt,He){let nt="string"==typeof lt?document.querySelector(lt):lt;if(!nt)throw new Error(`The selector "${lt}" did not match any elements`);return He||(nt.textContent=""),nt}parentNode(lt){return lt.parentNode}nextSibling(lt){return lt.nextSibling}setAttribute(lt,He,nt,mt){if(mt){He=mt+":"+He;const qt=pe[mt];qt?lt.setAttributeNS(qt,He,nt):lt.setAttribute(He,nt)}else lt.setAttribute(He,nt)}removeAttribute(lt,He,nt){if(nt){const mt=pe[nt];mt?lt.removeAttributeNS(mt,He):lt.removeAttribute(`${nt}:${He}`)}else lt.removeAttribute(He)}addClass(lt,He){lt.classList.add(He)}removeClass(lt,He){lt.classList.remove(He)}setStyle(lt,He,nt,mt){mt&(g.JOm.DashCase|g.JOm.Important)?lt.style.setProperty(He,nt,mt&g.JOm.Important?"important":""):lt.style[He]=nt}removeStyle(lt,He,nt){nt&g.JOm.DashCase?lt.style.removeProperty(He):lt.style[He]=""}setProperty(lt,He,nt){lt[He]=nt}setValue(lt,He){lt.nodeValue=He}listen(lt,He,nt){return"string"==typeof lt?this.eventManager.addGlobalEventListener(lt,He,ae(nt)):this.eventManager.addEventListener(lt,He,ae(nt))}}function xe(gt){return"TEMPLATE"===gt.tagName&&void 0!==gt.content}class st extends ${constructor(lt,He,nt,mt){super(lt),this.sharedStylesHost=He,this.hostEl=nt,this.shadowRoot=nt.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const qt=Ee(mt.id,mt.styles);for(const Cn of qt){const tr=document.createElement("style");tr.textContent=Cn,this.shadowRoot.appendChild(tr)}}nodeOrShadowRoot(lt){return lt===this.hostEl?this.shadowRoot:lt}appendChild(lt,He){return super.appendChild(this.nodeOrShadowRoot(lt),He)}insertBefore(lt,He,nt){return super.insertBefore(this.nodeOrShadowRoot(lt),He,nt)}removeChild(lt,He){return super.removeChild(this.nodeOrShadowRoot(lt),He)}parentNode(lt){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(lt)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class Le extends ${constructor(lt,He,nt,mt,qt=nt.id){super(lt),this.sharedStylesHost=He,this.removeStylesOnCompDestory=mt,this.rendererUsageCount=0,this.styles=Ee(qt,nt.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class ke extends Le{constructor(lt,He,nt,mt,qt){const Cn=mt+"-"+nt.id;super(lt,He,nt,qt,Cn),this.contentAttr=function et(gt){return"_ngcontent-%COMP%".replace(ve,gt)}(Cn),this.hostAttr=function Fe(gt){return"_nghost-%COMP%".replace(ve,gt)}(Cn)}applyToHost(lt){this.applyStyles(),this.setAttribute(lt,this.hostAttr,"")}createElement(lt,He){const nt=super.createElement(lt,He);return super.setAttribute(nt,this.contentAttr,""),nt}}let Ge=(()=>{class gt extends Y{constructor(He){super(He)}supports(He){return!0}addEventListener(He,nt,mt){return He.addEventListener(nt,mt,!1),()=>this.removeEventListener(He,nt,mt)}removeEventListener(He,nt,mt){return He.removeEventListener(nt,mt)}}return gt.\u0275fac=function(He){return new(He||gt)(g.LFG(n.K0))},gt.\u0275prov=g.Yz7({token:gt,factory:gt.\u0275fac}),gt})();const ut=["alt","control","meta","shift"],pt={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},$t={alt:gt=>gt.altKey,control:gt=>gt.ctrlKey,meta:gt=>gt.metaKey,shift:gt=>gt.shiftKey};let bt=(()=>{class gt extends Y{constructor(He){super(He)}supports(He){return null!=gt.parseEventName(He)}addEventListener(He,nt,mt){const qt=gt.parseEventName(nt),Cn=gt.eventCallback(qt.fullKey,mt,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>(0,n.q)().onAndCancel(He,qt.domEventName,Cn))}static parseEventName(He){const nt=He.toLowerCase().split("."),mt=nt.shift();if(0===nt.length||"keydown"!==mt&&"keyup"!==mt)return null;const qt=gt._normalizeKey(nt.pop());let Cn="",tr=nt.indexOf("code");if(tr>-1&&(nt.splice(tr,1),Cn="code."),ut.forEach(nr=>{const Ct=nt.indexOf(nr);Ct>-1&&(nt.splice(Ct,1),Cn+=nr+".")}),Cn+=qt,0!=nt.length||0===qt.length)return null;const fr={};return fr.domEventName=mt,fr.fullKey=Cn,fr}static matchEventFullKeyCode(He,nt){let mt=pt[He.key]||He.key,qt="";return nt.indexOf("code.")>-1&&(mt=He.code,qt="code."),!(null==mt||!mt)&&(mt=mt.toLowerCase()," "===mt?mt="space":"."===mt&&(mt="dot"),ut.forEach(Cn=>{Cn!==mt&&(0,$t[Cn])(He)&&(qt+=Cn+".")}),qt+=mt,qt===nt)}static eventCallback(He,nt,mt){return qt=>{gt.matchEventFullKeyCode(qt,He)&&mt.runGuarded(()=>nt(qt))}}static _normalizeKey(He){return"esc"===He?"escape":He}}return gt.\u0275fac=function(He){return new(He||gt)(g.LFG(n.K0))},gt.\u0275prov=g.Yz7({token:gt,factory:gt.\u0275fac}),gt})();const jn=(0,g.eFA)(g._c5,"browser",[{provide:g.Lbi,useValue:n.bD},{provide:g.g9A,useValue:function gn(){A.makeCurrent()},multi:!0},{provide:n.K0,useFactory:function cr(){return(0,g.RDi)(document),document},deps:[]}]),Mn=new g.OlP(""),Fn=[{provide:g.rWj,useClass:class K{addToWindow(lt){g.dqk.getAngularTestability=(nt,mt=!0)=>{const qt=lt.findTestabilityInTree(nt,mt);if(null==qt)throw new Error("Could not find testability for element.");return qt},g.dqk.getAllAngularTestabilities=()=>lt.getAllTestabilities(),g.dqk.getAllAngularRootElements=()=>lt.getAllRootElements(),g.dqk.frameworkStabilizers||(g.dqk.frameworkStabilizers=[]),g.dqk.frameworkStabilizers.push(nt=>{const mt=g.dqk.getAllAngularTestabilities();let qt=mt.length,Cn=!1;const tr=function(fr){Cn=Cn||fr,qt--,0==qt&&nt(Cn)};mt.forEach(function(fr){fr.whenStable(tr)})})}findTestabilityInTree(lt,He,nt){return null==He?null:lt.getTestability(He)??(nt?(0,n.q)().isShadowRoot(He)?this.findTestabilityInTree(lt,He.host,!0):this.findTestabilityInTree(lt,He.parentElement,!0):null)}},deps:[]},{provide:g.lri,useClass:g.dDg,deps:[g.R0b,g.eoX,g.rWj]},{provide:g.dDg,useClass:g.dDg,deps:[g.R0b,g.eoX,g.rWj]}],un=[{provide:g.zSh,useValue:"root"},{provide:g.qLn,useFactory:function Sn(){return new g.qLn},deps:[]},{provide:ce,useClass:Ge,multi:!0,deps:[n.K0,g.R0b,g.Lbi]},{provide:ce,useClass:bt,multi:!0,deps:[n.K0]},{provide:me,useClass:me,deps:[X,te,g.AFp,Me]},{provide:g.FYo,useExisting:me},{provide:G,useExisting:te},{provide:te,useClass:te,deps:[n.K0]},{provide:X,useClass:X,deps:[ce,g.R0b]},{provide:n.JF,useClass:z,deps:[]},[]];let Wn=(()=>{class gt{constructor(He){}static withServerTransition(He){return{ngModule:gt,providers:[{provide:g.AFp,useValue:He.appId},{provide:ie,useExisting:g.AFp},ee]}}}return gt.\u0275fac=function(He){return new(He||gt)(g.LFG(Mn,12))},gt.\u0275mod=g.oAB({type:gt}),gt.\u0275inj=g.cJS({providers:[...un,...Fn],imports:[n.ez,g.hGG]}),gt})(),Vn=(()=>{class gt{constructor(He){this._doc=He,this._dom=(0,n.q)()}addTag(He,nt=!1){return He?this._getOrCreateElement(He,nt):null}addTags(He,nt=!1){return He?He.reduce((mt,qt)=>(qt&&mt.push(this._getOrCreateElement(qt,nt)),mt),[]):[]}getTag(He){return He&&this._doc.querySelector(`meta[${He}]`)||null}getTags(He){if(!He)return[];const nt=this._doc.querySelectorAll(`meta[${He}]`);return nt?[].slice.call(nt):[]}updateTag(He,nt){if(!He)return null;nt=nt||this._parseSelector(He);const mt=this.getTag(nt);return mt?this._setMetaElementAttributes(He,mt):this._getOrCreateElement(He,!0)}removeTag(He){this.removeTagElement(this.getTag(He))}removeTagElement(He){He&&this._dom.remove(He)}_getOrCreateElement(He,nt=!1){if(!nt){const Cn=this._parseSelector(He),tr=this.getTags(Cn).filter(fr=>this._containsAttributes(He,fr))[0];if(void 0!==tr)return tr}const mt=this._dom.createElement("meta");return this._setMetaElementAttributes(He,mt),this._doc.getElementsByTagName("head")[0].appendChild(mt),mt}_setMetaElementAttributes(He,nt){return Object.keys(He).forEach(mt=>nt.setAttribute(this._getMetaKeyMap(mt),He[mt])),nt}_parseSelector(He){const nt=He.name?"name":"property";return`${nt}="${He[nt]}"`}_containsAttributes(He,nt){return Object.keys(He).every(mt=>nt.getAttribute(this._getMetaKeyMap(mt))===He[mt])}_getMetaKeyMap(He){return sr[He]||He}}return gt.\u0275fac=function(He){return new(He||gt)(g.LFG(n.K0))},gt.\u0275prov=g.Yz7({token:gt,factory:function(He){let nt=null;return nt=He?new He:function Zn(){return new Vn((0,g.LFG)(n.K0))}(),nt},providedIn:"root"}),gt})();const sr={httpEquiv:"http-equiv"};let bn=(()=>{class gt{constructor(He){this._doc=He}getTitle(){return this._doc.title}setTitle(He){this._doc.title=He||""}}return gt.\u0275fac=function(He){return new(He||gt)(g.LFG(n.K0))},gt.\u0275prov=g.Yz7({token:gt,factory:function(He){let nt=null;return nt=He?new He:function Tr(){return new bn((0,g.LFG)(n.K0))}(),nt},providedIn:"root"}),gt})();function At(gt){return gt}typeof window<"u"&&window;let Xt=(()=>{class gt{constructor(){this.store={},this.onSerializeCallbacks={},this.store=function sn(gt,lt){const He=gt.getElementById(lt+"-state");let nt={};if(He&&He.textContent)try{nt=JSON.parse(function Ht(gt){const lt={"&a;":"&","&q;":'"',"&s;":"'","&l;":"<","&g;":">"};return gt.replace(/&[^;]+;/g,He=>lt[He])}(He.textContent))}catch(mt){console.warn("Exception while restoring TransferState for app "+lt,mt)}return nt}((0,g.f3M)(n.K0),(0,g.f3M)(g.AFp))}get(He,nt){return void 0!==this.store[He]?this.store[He]:nt}set(He,nt){this.store[He]=nt}remove(He){delete this.store[He]}hasKey(He){return this.store.hasOwnProperty(He)}get isEmpty(){return 0===Object.keys(this.store).length}onSerialize(He,nt){this.onSerializeCallbacks[He]=nt}toJson(){for(const He in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(He))try{this.store[He]=this.onSerializeCallbacks[He]()}catch(nt){console.warn("Exception in onSerialize callback: ",nt)}return JSON.stringify(this.store)}}return gt.\u0275fac=function(He){return new(He||gt)},gt.\u0275prov=g.Yz7({token:gt,factory:gt.\u0275fac,providedIn:"root"}),gt})()},5819:(o,c,u)=>{"use strict";u.d(c,{gz:()=>xs,jw:()=>Mr,y6:()=>es,OD:()=>le,eC:()=>pt,wm:()=>ba,wN:()=>ui,F0:()=>Ss,rH:()=>Ca,Bz:()=>au,lC:()=>ps,Hx:()=>F,fw:()=>ts});var n=u(4650),g=u(8996),d=u(9646),A=u(1135),R=u(6805),O=u(9841),N=u(7272),U=u(9770),ie=u(9635),L=u(9751),ee=u(576);function K(B,H){const M=(0,ee.m)(B)?B:()=>B,re=he=>he.error(M());return new L.y(H?he=>H.schedule(re,0,he):re)}var z=u(515),ce=u(4033),X=u(7579),Y=u(6895),G=u(4004),te=u(3900),pe=u(5698),ve=u(8675),Ie=u(9300),we=u(5577),Ve=u(590),We=u(4351),Se=u(8505),Me=u(262),et=u(5026),Fe=u(4482),Ee=u(5403);function ae(B){return B<=0?()=>z.E:(0,Fe.e)((H,M)=>{let re=[];H.subscribe((0,Ee.x)(M,he=>{re.push(he),B{for(const he of re)M.next(he);M.complete()},void 0,()=>{re=null}))})}var me=u(8068),$=u(6590),ue=u(4671);function Qe(B,H){const M=arguments.length>=2;return re=>re.pipe(B?(0,Ie.h)((he,De)=>B(he,De,re)):ue.y,ae(1),M?(0,$.d)(H):(0,me.T)(()=>new R.K))}var st=u(9718);function Le(B){return(0,Fe.e)((H,M)=>{try{H.subscribe(M)}finally{M.add(B)}})}var ke=u(8343),Ge=u(8189),ut=u(1481);const pt="primary",$t=Symbol("RouteTitle");class bt{constructor(H){this.params=H||{}}has(H){return Object.prototype.hasOwnProperty.call(this.params,H)}get(H){if(this.has(H)){const M=this.params[H];return Array.isArray(M)?M[0]:M}return null}getAll(H){if(this.has(H)){const M=this.params[H];return Array.isArray(M)?M:[M]}return[]}get keys(){return Object.keys(this.params)}}function St(B){return new bt(B)}function Yt(B,H,M){const re=M.path.split("/");if(re.length>B.length||"full"===M.pathMatch&&(H.hasChildren()||re.lengthre[De]===he)}return B===H}function gn(B){return Array.prototype.concat.apply([],B)}function Sn(B){return B.length>0?B[B.length-1]:null}function Dn(B,H){for(const M in B)B.hasOwnProperty(M)&&H(B[M],M)}function jn(B){return(0,n.CqO)(B)?B:(0,n.QGY)(B)?(0,g.D)(Promise.resolve(B)):(0,d.of)(B)}const Mn=!1,Fn={exact:function Vn(B,H,M){if(!$e(B.segments,H.segments)||!pn(B.segments,H.segments,M)||B.numberOfChildren!==H.numberOfChildren)return!1;for(const re in H.children)if(!B.children[re]||!Vn(B.children[re],H.children[re],M))return!1;return!0},subset:Tr},un={exact:function Zn(B,H){return Et(B,H)},subset:function sr(B,H){return Object.keys(H).length<=Object.keys(B).length&&Object.keys(H).every(M=>It(B[M],H[M]))},ignored:()=>!0};function Wn(B,H,M){return Fn[M.paths](B.root,H.root,M.matrixParams)&&un[M.queryParams](B.queryParams,H.queryParams)&&!("exact"===M.fragment&&B.fragment!==H.fragment)}function Tr(B,H,M){return bn(B,H,H.segments,M)}function bn(B,H,M,re){if(B.segments.length>M.length){const he=B.segments.slice(0,M.length);return!(!$e(he,M)||H.hasChildren()||!pn(he,M,re))}if(B.segments.length===M.length){if(!$e(B.segments,M)||!pn(B.segments,M,re))return!1;for(const he in H.children)if(!B.children[he]||!Tr(B.children[he],H.children[he],re))return!1;return!0}{const he=M.slice(0,B.segments.length),De=M.slice(B.segments.length);return!!($e(B.segments,he)&&pn(B.segments,he,re)&&B.children[pt])&&bn(B.children[pt],H,De,re)}}function pn(B,H,M){return H.every((re,he)=>un[M](B[he].parameters,re.parameters))}class en{constructor(H=new Ut([],{}),M={},re=null){this.root=H,this.queryParams=M,this.fragment=re}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=St(this.queryParams)),this._queryParamMap}toString(){return Pt.serialize(this)}}class Ut{constructor(H,M){this.segments=H,this.children=M,this.parent=null,Dn(M,(re,he)=>re.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Pn(this)}}class xt{constructor(H,M){this.path=H,this.parameters=M}get parameterMap(){return this._parameterMap||(this._parameterMap=St(this.parameters)),this._parameterMap}toString(){return kn(this)}}function $e(B,H){return B.length===H.length&&B.every((M,re)=>M.path===H[re].path)}let F=(()=>{class B{}return B.\u0275fac=function(M){return new(M||B)},B.\u0275prov=n.Yz7({token:B,factory:function(){return new be},providedIn:"root"}),B})();class be{parse(H){const M=new En(H);return new en(M.parseRootSegment(),M.parseQueryParams(),M.parseFragment())}serialize(H){const M=`/${_r(H.root,!0)}`,re=function rt(B){const H=Object.keys(B).map(M=>{const re=B[M];return Array.isArray(re)?re.map(he=>`${Ht(M)}=${Ht(he)}`).join("&"):`${Ht(M)}=${Ht(re)}`}).filter(M=>!!M);return H.length?`?${H.join("&")}`:""}(H.queryParams);return`${M}${re}${"string"==typeof H.fragment?`#${function At(B){return encodeURI(B)}(H.fragment)}`:""}`}}const Pt=new be;function Pn(B){return B.segments.map(H=>kn(H)).join("/")}function _r(B,H){if(!B.hasChildren())return Pn(B);if(H){const M=B.children[pt]?_r(B.children[pt],!1):"",re=[];return Dn(B.children,(he,De)=>{De!==pt&&re.push(`${De}:${_r(he,!1)}`)}),re.length>0?`${M}(${re.join("//")})`:M}{const M=function T(B,H){let M=[];return Dn(B.children,(re,he)=>{he===pt&&(M=M.concat(H(re,he)))}),Dn(B.children,(re,he)=>{he!==pt&&(M=M.concat(H(re,he)))}),M}(B,(re,he)=>he===pt?[_r(B.children[pt],!1)]:[`${he}:${_r(re,!1)}`]);return 1===Object.keys(B.children).length&&null!=B.children[pt]?`${Pn(B)}/${M[0]}`:`${Pn(B)}/(${M.join("//")})`}}function Ur(B){return encodeURIComponent(B).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Ht(B){return Ur(B).replace(/%3B/gi,";")}function Xt(B){return Ur(B).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function sn(B){return decodeURIComponent(B)}function wn(B){return sn(B.replace(/\+/g,"%20"))}function kn(B){return`${Xt(B.path)}${function vr(B){return Object.keys(B).map(H=>`;${Xt(H)}=${Xt(B[H])}`).join("")}(B.parameters)}`}const Te=/^[^\/()?;=#]+/;function Ye(B){const H=B.match(Te);return H?H[0]:""}const ft=/^[^=?&#]+/,Gt=/^[^&#]+/;class En{constructor(H){this.url=H,this.remaining=H}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ut([],{}):new Ut([],this.parseChildren())}parseQueryParams(){const H={};if(this.consumeOptional("?"))do{this.parseQueryParam(H)}while(this.consumeOptional("&"));return H}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const H=[];for(this.peekStartsWith("(")||H.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),H.push(this.parseSegment());let M={};this.peekStartsWith("/(")&&(this.capture("/"),M=this.parseParens(!0));let re={};return this.peekStartsWith("(")&&(re=this.parseParens(!1)),(H.length>0||Object.keys(M).length>0)&&(re[pt]=new Ut(H,M)),re}parseSegment(){const H=Ye(this.remaining);if(""===H&&this.peekStartsWith(";"))throw new n.vHH(4009,Mn);return this.capture(H),new xt(sn(H),this.parseMatrixParams())}parseMatrixParams(){const H={};for(;this.consumeOptional(";");)this.parseParam(H);return H}parseParam(H){const M=Ye(this.remaining);if(!M)return;this.capture(M);let re="";if(this.consumeOptional("=")){const he=Ye(this.remaining);he&&(re=he,this.capture(re))}H[sn(M)]=sn(re)}parseQueryParam(H){const M=function dt(B){const H=B.match(ft);return H?H[0]:""}(this.remaining);if(!M)return;this.capture(M);let re="";if(this.consumeOptional("=")){const Be=function nn(B){const H=B.match(Gt);return H?H[0]:""}(this.remaining);Be&&(re=Be,this.capture(re))}const he=wn(M),De=wn(re);if(H.hasOwnProperty(he)){let Be=H[he];Array.isArray(Be)||(Be=[Be],H[he]=Be),Be.push(De)}else H[he]=De}parseParens(H){const M={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const re=Ye(this.remaining),he=this.remaining[re.length];if("/"!==he&&")"!==he&&";"!==he)throw new n.vHH(4010,Mn);let De;re.indexOf(":")>-1?(De=re.slice(0,re.indexOf(":")),this.capture(De),this.capture(":")):H&&(De=pt);const Be=this.parseChildren();M[De]=1===Object.keys(Be).length?Be[pt]:new Ut([],Be),this.consumeOptional("//")}return M}peekStartsWith(H){return this.remaining.startsWith(H)}consumeOptional(H){return!!this.peekStartsWith(H)&&(this.remaining=this.remaining.substring(H.length),!0)}capture(H){if(!this.consumeOptional(H))throw new n.vHH(4011,Mn)}}function yn(B){return B.segments.length>0?new Ut([],{[pt]:B}):B}function Gn(B){const H={};for(const re of Object.keys(B.children)){const De=Gn(B.children[re]);(De.segments.length>0||De.hasChildren())&&(H[re]=De)}return function gt(B){if(1===B.numberOfChildren&&B.children[pt]){const H=B.children[pt];return new Ut(B.segments.concat(H.segments),H.children)}return B}(new Ut(B.segments,H))}function lt(B){return B instanceof en}const He=!1;function Cn(B,H,M,re,he){if(0===M.length)return nr(H.root,H.root,H.root,re,he);const De=function tn(B){if("string"==typeof B[0]&&1===B.length&&"/"===B[0])return new zt(!0,0,B);let H=0,M=!1;const re=B.reduce((he,De,Be)=>{if("object"==typeof De&&null!=De){if(De.outlets){const Tt={};return Dn(De.outlets,(Jt,zn)=>{Tt[zn]="string"==typeof Jt?Jt.split("/"):Jt}),[...he,{outlets:Tt}]}if(De.segmentPath)return[...he,De.segmentPath]}return"string"!=typeof De?[...he,De]:0===Be?(De.split("/").forEach((Tt,Jt)=>{0==Jt&&"."===Tt||(0==Jt&&""===Tt?M=!0:".."===Tt?H++:""!=Tt&&he.push(Tt))}),he):[...he,De]},[]);return new zt(M,H,re)}(M);return De.toRoot()?nr(H.root,H.root,new Ut([],{}),re,he):function Be(Jt){const zn=function Bn(B,H,M,re){if(B.isAbsolute)return new xn(H.root,!0,0);if(-1===re)return new xn(M,M===H.root,0);return function Cr(B,H,M){let re=B,he=H,De=M;for(;De>he;){if(De-=he,re=re.parent,!re)throw new n.vHH(4005,He&&"Invalid number of '../'");he=re.segments.length}return new xn(re,!1,he-De)}(M,re+(tr(B.commands[0])?0:1),B.numberOfDoubleDots)}(De,H,B.snapshot?._urlSegment,Jt),Kn=zn.processChildren?Dr(zn.segmentGroup,zn.index,De.commands):Jr(zn.segmentGroup,zn.index,De.commands);return nr(H.root,zn.segmentGroup,Kn,re,he)}(B.snapshot?._lastPathIndex)}function tr(B){return"object"==typeof B&&null!=B&&!B.outlets&&!B.segmentPath}function fr(B){return"object"==typeof B&&null!=B&&B.outlets}function nr(B,H,M,re,he){let Be,De={};re&&Dn(re,(Jt,zn)=>{De[zn]=Array.isArray(Jt)?Jt.map(Kn=>`${Kn}`):`${Jt}`}),Be=B===H?M:Ct(B,H,M);const Tt=yn(Gn(Be));return new en(Tt,De,he)}function Ct(B,H,M){const re={};return Dn(B.children,(he,De)=>{re[De]=he===H?M:Ct(he,H,M)}),new Ut(B.segments,re)}class zt{constructor(H,M,re){if(this.isAbsolute=H,this.numberOfDoubleDots=M,this.commands=re,H&&re.length>0&&tr(re[0]))throw new n.vHH(4003,He&&"Root segment cannot have matrix parameters");const he=re.find(fr);if(he&&he!==Sn(re))throw new n.vHH(4004,He&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class xn{constructor(H,M,re){this.segmentGroup=H,this.processChildren=M,this.index=re}}function Jr(B,H,M){if(B||(B=new Ut([],{})),0===B.segments.length&&B.hasChildren())return Dr(B,H,M);const re=function li(B,H,M){let re=0,he=H;const De={match:!1,pathIndex:0,commandIndex:0};for(;he=M.length)return De;const Be=B.segments[he],Tt=M[re];if(fr(Tt))break;const Jt=`${Tt}`,zn=re0&&void 0===Jt)break;if(Jt&&zn&&"object"==typeof zn&&void 0===zn.outlets){if(!Gr(Jt,zn,Be))return De;re+=2}else{if(!Gr(Jt,{},Be))return De;re++}he++}return{match:!0,pathIndex:he,commandIndex:re}}(B,H,M),he=M.slice(re.commandIndex);if(re.match&&re.pathIndex{"string"==typeof De&&(De=[De]),null!==De&&(he[Be]=Jr(B.children[Be],H,De))}),Dn(B.children,(De,Be)=>{void 0===re[Be]&&(he[Be]=De)}),new Ut(B.segments,he))}}function mn(B,H,M){const re=B.segments.slice(0,H);let he=0;for(;he{"string"==typeof M&&(M=[M]),null!==M&&(H[re]=mn(new Ut([],{}),0,M))}),H}function Br(B){const H={};return Dn(B,(M,re)=>H[re]=`${M}`),H}function Gr(B,H,M){return B==M.path&&Et(H,M.parameters)}const ni="imperative";class _t{constructor(H,M){this.id=H,this.url=M}}class le extends _t{constructor(H,M,re="imperative",he=null){super(H,M),this.type=0,this.navigationTrigger=re,this.restoredState=he}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class ye extends _t{constructor(H,M,re){super(H,M),this.urlAfterRedirects=re,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class ze extends _t{constructor(H,M,re,he){super(H,M),this.reason=re,this.code=he,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class tt extends _t{constructor(H,M,re,he){super(H,M),this.reason=re,this.code=he,this.type=16}}class Pe extends _t{constructor(H,M,re,he){super(H,M),this.error=re,this.target=he,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Je extends _t{constructor(H,M,re,he){super(H,M),this.urlAfterRedirects=re,this.state=he,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class vt extends _t{constructor(H,M,re,he){super(H,M),this.urlAfterRedirects=re,this.state=he,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Mt extends _t{constructor(H,M,re,he,De){super(H,M),this.urlAfterRedirects=re,this.state=he,this.shouldActivate=De,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Vt extends _t{constructor(H,M,re,he){super(H,M),this.urlAfterRedirects=re,this.state=he,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class jt extends _t{constructor(H,M,re,he){super(H,M),this.urlAfterRedirects=re,this.state=he,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class vn{constructor(H){this.route=H,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class $n{constructor(H){this.route=H,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class er{constructor(H){this.snapshot=H,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class xr{constructor(H){this.snapshot=H,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Oi{constructor(H){this.snapshot=H,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Mr{constructor(H){this.snapshot=H,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ri{constructor(H,M,re){this.routerEvent=H,this.position=M,this.anchor=re,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let Wi=(()=>{class B{createUrlTree(M,re,he,De,Be,Tt){return Cn(M||re.root,he,De,Be,Tt)}}return B.\u0275fac=function(M){return new(M||B)},B.\u0275prov=n.Yz7({token:B,factory:B.\u0275fac}),B})(),Pi=(()=>{class B{}return B.\u0275fac=function(M){return new(M||B)},B.\u0275prov=n.Yz7({token:B,factory:function(H){return Wi.\u0275fac(H)},providedIn:"root"}),B})();class di{constructor(H){this._root=H}get root(){return this._root.value}parent(H){const M=this.pathFromRoot(H);return M.length>1?M[M.length-2]:null}children(H){const M=Ao(H,this._root);return M?M.children.map(re=>re.value):[]}firstChild(H){const M=Ao(H,this._root);return M&&M.children.length>0?M.children[0].value:null}siblings(H){const M=dr(H,this._root);return M.length<2?[]:M[M.length-2].children.map(he=>he.value).filter(he=>he!==H)}pathFromRoot(H){return dr(H,this._root).map(M=>M.value)}}function Ao(B,H){if(B===H.value)return H;for(const M of H.children){const re=Ao(B,M);if(re)return re}return null}function dr(B,H){if(B===H.value)return[H];for(const M of H.children){const re=dr(B,M);if(re.length)return re.unshift(H),re}return[]}class ur{constructor(H,M){this.value=H,this.children=M}toString(){return`TreeNode(${this.value})`}}function pr(B){const H={};return B&&B.children.forEach(M=>H[M.value.outlet]=M),H}class Yi extends di{constructor(H,M){super(H),this.snapshot=M,gi(this,H)}toString(){return this.snapshot.toString()}}function kr(B,H){const M=function Qr(B,H){const Be=new hr([],{},{},"",{},pt,H,null,B.root,-1,{});return new br("",new ur(Be,[]))}(B,H),re=new A.X([new xt("",{})]),he=new A.X({}),De=new A.X({}),Be=new A.X({}),Tt=new A.X(""),Jt=new xs(re,he,Be,Tt,De,pt,H,M.root);return Jt.snapshot=M.root,new Yi(new ur(Jt,[]),M)}class xs{constructor(H,M,re,he,De,Be,Tt,Jt){this.url=H,this.params=M,this.queryParams=re,this.fragment=he,this.data=De,this.outlet=Be,this.component=Tt,this.title=this.data?.pipe((0,G.U)(zn=>zn[$t]))??(0,d.of)(void 0),this._futureSnapshot=Jt}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._paramMap=this.params.pipe((0,G.U)(H=>St(H)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe((0,G.U)(H=>St(H)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function ys(B,H="emptyOnly"){const M=B.pathFromRoot;let re=0;if("always"!==H)for(re=M.length-1;re>=1;){const he=M[re],De=M[re-1];if(he.routeConfig&&""===he.routeConfig.path)re--;else{if(De.component)break;re--}}return function ss(B){return B.reduce((H,M)=>({params:{...H.params,...M.params},data:{...H.data,...M.data},resolve:{...M.data,...H.resolve,...M.routeConfig?.data,...M._resolvedData}}),{params:{},data:{},resolve:{}})}(M.slice(re))}class hr{get title(){return this.data?.[$t]}constructor(H,M,re,he,De,Be,Tt,Jt,zn,Kn,ei){this.url=H,this.params=M,this.queryParams=re,this.fragment=he,this.data=De,this.outlet=Be,this.component=Tt,this.routeConfig=Jt,this._urlSegment=zn,this._lastPathIndex=Kn,this._resolve=ei}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._paramMap=St(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=St(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(re=>re.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class br extends di{constructor(H,M){super(M),this.url=H,gi(this,M)}toString(){return vs(this._root)}}function gi(B,H){H.value._routerState=B,H.children.forEach(M=>gi(B,M))}function vs(B){const H=B.children.length>0?` { ${B.children.map(vs).join(", ")} } `:"";return`${B.value}${H}`}function uo(B){if(B.snapshot){const H=B.snapshot,M=B._futureSnapshot;B.snapshot=M,Et(H.queryParams,M.queryParams)||B.queryParams.next(M.queryParams),H.fragment!==M.fragment&&B.fragment.next(M.fragment),Et(H.params,M.params)||B.params.next(M.params),function kt(B,H){if(B.length!==H.length)return!1;for(let M=0;MEt(M.parameters,H[re].parameters))}(B.url,H.url);return M&&!(!B.parent!=!H.parent)&&(!B.parent||Mi(B.parent,H.parent))}function fs(B,H,M){if(M&&B.shouldReuseRoute(H.value,M.value.snapshot)){const re=M.value;re._futureSnapshot=H.value;const he=function $s(B,H,M){return H.children.map(re=>{for(const he of M.children)if(B.shouldReuseRoute(re.value,he.value.snapshot))return fs(B,re,he);return fs(B,re)})}(B,H,M);return new ur(re,he)}{if(B.shouldAttach(H.value)){const De=B.retrieve(H.value);if(null!==De){const Be=De.route;return Be.value._futureSnapshot=H.value,Be.children=H.children.map(Tt=>fs(B,Tt)),Be}}const re=function Zo(B){return new xs(new A.X(B.url),new A.X(B.params),new A.X(B.queryParams),new A.X(B.fragment),new A.X(B.data),B.outlet,B.component,B)}(H.value),he=H.children.map(De=>fs(B,De));return new ur(re,he)}}const Fi="ngNavigationCancelingError";function $i(B,H){const{redirectTo:M,navigationBehaviorOptions:re}=lt(H)?{redirectTo:H,navigationBehaviorOptions:void 0}:H,he=hi(!1,0,H);return he.url=M,he.navigationBehaviorOptions=re,he}function hi(B,H,M){const re=new Error("NavigationCancelingError: "+(B||""));return re[Fi]=!0,re.cancellationCode=H,M&&(re.url=M),re}function Ps(B){return Us(B)&<(B.url)}function Us(B){return B&&B[Fi]}class Zs{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new es,this.attachRef=null}}let es=(()=>{class B{constructor(){this.contexts=new Map}onChildOutletCreated(M,re){const he=this.getOrCreateContext(M);he.outlet=re,this.contexts.set(M,he)}onChildOutletDestroyed(M){const re=this.getContext(M);re&&(re.outlet=null,re.attachRef=null)}onOutletDeactivated(){const M=this.contexts;return this.contexts=new Map,M}onOutletReAttached(M){this.contexts=M}getOrCreateContext(M){let re=this.getContext(M);return re||(re=new Zs,this.contexts.set(M,re)),re}getContext(M){return this.contexts.get(M)||null}}return B.\u0275fac=function(M){return new(M||B)},B.\u0275prov=n.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),B})();const _s=!1;let ps=(()=>{class B{constructor(){this.activated=null,this._activatedRoute=null,this.name=pt,this.activateEvents=new n.vpe,this.deactivateEvents=new n.vpe,this.attachEvents=new n.vpe,this.detachEvents=new n.vpe,this.parentContexts=(0,n.f3M)(es),this.location=(0,n.f3M)(n.s_b),this.changeDetector=(0,n.f3M)(n.sBO),this.environmentInjector=(0,n.f3M)(n.lqb)}ngOnChanges(M){if(M.name){const{firstChange:re,previousValue:he}=M.name;if(re)return;this.isTrackedInParentContexts(he)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(he)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(M){return this.parentContexts.getContext(M)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const M=this.parentContexts.getContext(this.name);M?.route&&(M.attachRef?this.attach(M.attachRef,M.route):this.activateWith(M.route,M.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new n.vHH(4012,_s);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new n.vHH(4012,_s);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new n.vHH(4012,_s);this.location.detach();const M=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(M.instance),M}attach(M,re){this.activated=M,this._activatedRoute=re,this.location.insert(M.hostView),this.attachEvents.emit(M.instance)}deactivate(){if(this.activated){const M=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(M)}}activateWith(M,re){if(this.isActivated)throw new n.vHH(4013,_s);this._activatedRoute=M;const he=this.location,Be=M.snapshot.component,Tt=this.parentContexts.getOrCreateContext(this.name).children,Jt=new Es(M,Tt,he.injector);if(re&&function Ir(B){return!!B.resolveComponentFactory}(re)){const zn=re.resolveComponentFactory(Be);this.activated=he.createComponent(zn,he.length,Jt)}else this.activated=he.createComponent(Be,{index:he.length,injector:Jt,environmentInjector:re??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return B.\u0275fac=function(M){return new(M||B)},B.\u0275dir=n.lG2({type:B,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[n.TTD]}),B})();class Es{constructor(H,M,re){this.route=H,this.childContexts=M,this.parent=re}get(H,M){return H===xs?this.route:H===es?this.childContexts:this.parent.get(H,M)}}let ts=(()=>{class B{}return B.\u0275fac=function(M){return new(M||B)},B.\u0275cmp=n.Xpm({type:B,selectors:[["ng-component"]],standalone:!0,features:[n.jDz],decls:1,vars:0,template:function(M,re){1&M&&n._UZ(0,"router-outlet")},dependencies:[ps],encapsulation:2}),B})();function Ki(B,H){return B.providers&&!B._injector&&(B._injector=(0,n.MMx)(B.providers,H,`Route: ${B.path}`)),B._injector??H}function ns(B){const H=B.children&&B.children.map(ns),M=H?{...B,children:H}:{...B};return!M.component&&!M.loadComponent&&(H||M.loadChildren)&&M.outlet&&M.outlet!==pt&&(M.component=ts),M}function Ue(B){return B.outlet||pt}function Ke(B,H){const M=B.filter(re=>Ue(re)===H);return M.push(...B.filter(re=>Ue(re)!==H)),M}function yt(B){if(!B)return null;if(B.routeConfig?._injector)return B.routeConfig._injector;for(let H=B.parent;H;H=H.parent){const M=H.routeConfig;if(M?._loadedInjector)return M._loadedInjector;if(M?._injector)return M._injector}return null}class rn{constructor(H,M,re,he){this.routeReuseStrategy=H,this.futureState=M,this.currState=re,this.forwardEvent=he}activate(H){const M=this.futureState._root,re=this.currState?this.currState._root:null;this.deactivateChildRoutes(M,re,H),uo(this.futureState.root),this.activateChildRoutes(M,re,H)}deactivateChildRoutes(H,M,re){const he=pr(M);H.children.forEach(De=>{const Be=De.value.outlet;this.deactivateRoutes(De,he[Be],re),delete he[Be]}),Dn(he,(De,Be)=>{this.deactivateRouteAndItsChildren(De,re)})}deactivateRoutes(H,M,re){const he=H.value,De=M?M.value:null;if(he===De)if(he.component){const Be=re.getContext(he.outlet);Be&&this.deactivateChildRoutes(H,M,Be.children)}else this.deactivateChildRoutes(H,M,re);else De&&this.deactivateRouteAndItsChildren(M,re)}deactivateRouteAndItsChildren(H,M){H.value.component&&this.routeReuseStrategy.shouldDetach(H.value.snapshot)?this.detachAndStoreRouteSubtree(H,M):this.deactivateRouteAndOutlet(H,M)}detachAndStoreRouteSubtree(H,M){const re=M.getContext(H.value.outlet),he=re&&H.value.component?re.children:M,De=pr(H);for(const Be of Object.keys(De))this.deactivateRouteAndItsChildren(De[Be],he);if(re&&re.outlet){const Be=re.outlet.detach(),Tt=re.children.onOutletDeactivated();this.routeReuseStrategy.store(H.value.snapshot,{componentRef:Be,route:H,contexts:Tt})}}deactivateRouteAndOutlet(H,M){const re=M.getContext(H.value.outlet),he=re&&H.value.component?re.children:M,De=pr(H);for(const Be of Object.keys(De))this.deactivateRouteAndItsChildren(De[Be],he);re&&re.outlet&&(re.outlet.deactivate(),re.children.onOutletDeactivated(),re.attachRef=null,re.resolver=null,re.route=null)}activateChildRoutes(H,M,re){const he=pr(M);H.children.forEach(De=>{this.activateRoutes(De,he[De.value.outlet],re),this.forwardEvent(new Mr(De.value.snapshot))}),H.children.length&&this.forwardEvent(new xr(H.value.snapshot))}activateRoutes(H,M,re){const he=H.value,De=M?M.value:null;if(uo(he),he===De)if(he.component){const Be=re.getOrCreateContext(he.outlet);this.activateChildRoutes(H,M,Be.children)}else this.activateChildRoutes(H,M,re);else if(he.component){const Be=re.getOrCreateContext(he.outlet);if(this.routeReuseStrategy.shouldAttach(he.snapshot)){const Tt=this.routeReuseStrategy.retrieve(he.snapshot);this.routeReuseStrategy.store(he.snapshot,null),Be.children.onOutletReAttached(Tt.contexts),Be.attachRef=Tt.componentRef,Be.route=Tt.route.value,Be.outlet&&Be.outlet.attach(Tt.componentRef,Tt.route.value),uo(Tt.route.value),this.activateChildRoutes(H,null,Be.children)}else{const Tt=yt(he.snapshot),Jt=Tt?.get(n._Vd)??null;Be.attachRef=null,Be.route=he,Be.resolver=Jt,Be.injector=Tt,Be.outlet&&Be.outlet.activateWith(he,Be.injector),this.activateChildRoutes(H,null,Be.children)}}else this.activateChildRoutes(H,null,re)}}class Tn{constructor(H){this.path=H,this.route=this.path[this.path.length-1]}}class An{constructor(H,M){this.component=H,this.route=M}}function Or(B,H,M){const re=B._root;return or(re,H?H._root:null,M,[re.value])}function Hr(B,H){const M=Symbol(),re=H.get(B,M);return re===M?"function"!=typeof B||(0,n.Z0I)(B)?H.get(B):B:re}function or(B,H,M,re,he={canDeactivateChecks:[],canActivateChecks:[]}){const De=pr(H);return B.children.forEach(Be=>{(function Sr(B,H,M,re,he={canDeactivateChecks:[],canActivateChecks:[]}){const De=B.value,Be=H?H.value:null,Tt=M?M.getContext(B.value.outlet):null;if(Be&&De.routeConfig===Be.routeConfig){const Jt=function Ms(B,H,M){if("function"==typeof M)return M(B,H);switch(M){case"pathParamsChange":return!$e(B.url,H.url);case"pathParamsOrQueryParamsChange":return!$e(B.url,H.url)||!Et(B.queryParams,H.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Mi(B,H)||!Et(B.queryParams,H.queryParams);default:return!Mi(B,H)}}(Be,De,De.routeConfig.runGuardsAndResolvers);Jt?he.canActivateChecks.push(new Tn(re)):(De.data=Be.data,De._resolvedData=Be._resolvedData),or(B,H,De.component?Tt?Tt.children:null:M,re,he),Jt&&Tt&&Tt.outlet&&Tt.outlet.isActivated&&he.canDeactivateChecks.push(new An(Tt.outlet.component,Be))}else Be&&Ci(H,Tt,he),he.canActivateChecks.push(new Tn(re)),or(B,null,De.component?Tt?Tt.children:null:M,re,he)})(Be,De[Be.value.outlet],M,re.concat([Be.value]),he),delete De[Be.value.outlet]}),Dn(De,(Be,Tt)=>Ci(Be,M.getContext(Tt),he)),he}function Ci(B,H,M){const re=pr(B),he=B.value;Dn(re,(De,Be)=>{Ci(De,he.component?H?H.children.getContext(Be):null:H,M)}),M.canDeactivateChecks.push(new An(he.component&&H&&H.outlet&&H.outlet.isActivated?H.outlet.component:null,he))}function ar(B){return"function"==typeof B}function w(B){return B instanceof R.K||"EmptyError"===B?.name}const v=Symbol("INITIAL_VALUE");function S(){return(0,te.w)(B=>(0,O.a)(B.map(H=>H.pipe((0,pe.q)(1),(0,ve.O)(v)))).pipe((0,G.U)(H=>{for(const M of H)if(!0!==M){if(M===v)return v;if(!1===M||M instanceof en)return M}return!0}),(0,Ie.h)(H=>H!==v),(0,pe.q)(1)))}function Rs(B){return(0,ie.z)((0,Se.b)(H=>{if(lt(H))throw $i(0,H)}),(0,G.U)(H=>!0===H))}const fi={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Is(B,H,M,re,he){const De=fo(B,H,M);return De.matched?function yi(B,H,M,re){const he=H.canMatch;if(!he||0===he.length)return(0,d.of)(!0);const De=he.map(Be=>{const Tt=Hr(Be,B);return jn(function ro(B){return B&&ar(B.canMatch)}(Tt)?Tt.canMatch(H,M):B.runInContext(()=>Tt(H,M)))});return(0,d.of)(De).pipe(S(),Rs())}(re=Ki(H,re),H,M).pipe((0,G.U)(Be=>!0===Be?De:{...fi})):(0,d.of)(De)}function fo(B,H,M){if(""===H.path)return"full"===H.pathMatch&&(B.hasChildren()||M.length>0)?{...fi}:{matched:!0,consumedSegments:[],remainingSegments:M,parameters:{},positionalParamSegments:{}};const he=(H.matcher||Yt)(M,B,H);if(!he)return{...fi};const De={};Dn(he.posParams,(Tt,Jt)=>{De[Jt]=Tt.path});const Be=he.consumed.length>0?{...De,...he.consumed[he.consumed.length-1].parameters}:De;return{matched:!0,consumedSegments:he.consumed,remainingSegments:M.slice(he.consumed.length),parameters:Be,positionalParamSegments:he.posParams??{}}}function Gs(B,H,M,re){if(M.length>0&&function ks(B,H,M){return M.some(re=>Xs(B,H,re)&&Ue(re)!==pt)}(B,M,re)){const De=new Ut(H,function po(B,H,M,re){const he={};he[pt]=re,re._sourceSegment=B,re._segmentIndexShift=H.length;for(const De of M)if(""===De.path&&Ue(De)!==pt){const Be=new Ut([],{});Be._sourceSegment=B,Be._segmentIndexShift=H.length,he[Ue(De)]=Be}return he}(B,H,re,new Ut(M,B.children)));return De._sourceSegment=B,De._segmentIndexShift=H.length,{segmentGroup:De,slicedSegments:[]}}if(0===M.length&&function xl(B,H,M){return M.some(re=>Xs(B,H,re))}(B,M,re)){const De=new Ut(B.segments,function Al(B,H,M,re,he){const De={};for(const Be of re)if(Xs(B,M,Be)&&!he[Ue(Be)]){const Tt=new Ut([],{});Tt._sourceSegment=B,Tt._segmentIndexShift=H.length,De[Ue(Be)]=Tt}return{...he,...De}}(B,H,M,re,B.children));return De._sourceSegment=B,De._segmentIndexShift=H.length,{segmentGroup:De,slicedSegments:M}}const he=new Ut(B.segments,B.children);return he._sourceSegment=B,he._segmentIndexShift=H.length,{segmentGroup:he,slicedSegments:M}}function Xs(B,H,M){return(!(B.hasChildren()||H.length>0)||"full"!==M.pathMatch)&&""===M.path}function xo(B,H,M,re){return!!(Ue(B)===re||re!==pt&&Xs(H,M,B))&&("**"===B.path||fo(H,B,M).matched)}function va(B,H,M){return 0===H.length&&!B.children[M]}const mo=!1;class Xo{constructor(H){this.segmentGroup=H||null}}class Ba{constructor(H){this.urlTree=H}}function _a(B){return K(new Xo(B))}function Pl(B){return K(new Ba(B))}class Rl{constructor(H,M,re,he,De){this.injector=H,this.configLoader=M,this.urlSerializer=re,this.urlTree=he,this.config=De,this.allowRedirects=!0}apply(){const H=Gs(this.urlTree.root,[],[],this.config).segmentGroup,M=new Ut(H.segments,H.children);return this.expandSegmentGroup(this.injector,this.config,M,pt).pipe((0,G.U)(De=>this.createUrlTree(Gn(De),this.urlTree.queryParams,this.urlTree.fragment))).pipe((0,Me.K)(De=>{if(De instanceof Ba)return this.allowRedirects=!1,this.match(De.urlTree);throw De instanceof Xo?this.noMatchError(De):De}))}match(H){return this.expandSegmentGroup(this.injector,this.config,H.root,pt).pipe((0,G.U)(he=>this.createUrlTree(Gn(he),H.queryParams,H.fragment))).pipe((0,Me.K)(he=>{throw he instanceof Xo?this.noMatchError(he):he}))}noMatchError(H){return new n.vHH(4002,mo)}createUrlTree(H,M,re){const he=yn(H);return new en(he,M,re)}expandSegmentGroup(H,M,re,he){return 0===re.segments.length&&re.hasChildren()?this.expandChildren(H,M,re).pipe((0,G.U)(De=>new Ut([],De))):this.expandSegment(H,re,M,re.segments,he,!0)}expandChildren(H,M,re){const he=[];for(const De of Object.keys(re.children))"primary"===De?he.unshift(De):he.push(De);return(0,g.D)(he).pipe((0,We.b)(De=>{const Be=re.children[De],Tt=Ke(M,De);return this.expandSegmentGroup(H,Tt,Be,De).pipe((0,G.U)(Jt=>({segment:Jt,outlet:De})))}),(0,et.R)((De,Be)=>(De[Be.outlet]=Be.segment,De),{}),Qe())}expandSegment(H,M,re,he,De,Be){return(0,g.D)(re).pipe((0,We.b)(Tt=>this.expandSegmentAgainstRoute(H,M,re,Tt,he,De,Be).pipe((0,Me.K)(zn=>{if(zn instanceof Xo)return(0,d.of)(null);throw zn}))),(0,Ve.P)(Tt=>!!Tt),(0,Me.K)((Tt,Jt)=>{if(w(Tt))return va(M,he,De)?(0,d.of)(new Ut([],{})):_a(M);throw Tt}))}expandSegmentAgainstRoute(H,M,re,he,De,Be,Tt){return xo(he,M,De,Be)?void 0===he.redirectTo?this.matchSegmentAgainstRoute(H,M,he,De,Be):Tt&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(H,M,re,he,De,Be):_a(M):_a(M)}expandSegmentAgainstRouteUsingRedirect(H,M,re,he,De,Be){return"**"===he.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(H,re,he,Be):this.expandRegularSegmentAgainstRouteUsingRedirect(H,M,re,he,De,Be)}expandWildCardWithParamsAgainstRouteUsingRedirect(H,M,re,he){const De=this.applyRedirectCommands([],re.redirectTo,{});return re.redirectTo.startsWith("/")?Pl(De):this.lineralizeSegments(re,De).pipe((0,we.z)(Be=>{const Tt=new Ut(Be,{});return this.expandSegment(H,Tt,M,Be,he,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(H,M,re,he,De,Be){const{matched:Tt,consumedSegments:Jt,remainingSegments:zn,positionalParamSegments:Kn}=fo(M,he,De);if(!Tt)return _a(M);const ei=this.applyRedirectCommands(Jt,he.redirectTo,Kn);return he.redirectTo.startsWith("/")?Pl(ei):this.lineralizeSegments(he,ei).pipe((0,we.z)(Gi=>this.expandSegment(H,M,re,Gi.concat(zn),Be,!1)))}matchSegmentAgainstRoute(H,M,re,he,De){return"**"===re.path?(H=Ki(re,H),re.loadChildren?(re._loadedRoutes?(0,d.of)({routes:re._loadedRoutes,injector:re._loadedInjector}):this.configLoader.loadChildren(H,re)).pipe((0,G.U)(Tt=>(re._loadedRoutes=Tt.routes,re._loadedInjector=Tt.injector,new Ut(he,{})))):(0,d.of)(new Ut(he,{}))):Is(M,re,he,H).pipe((0,te.w)(({matched:Be,consumedSegments:Tt,remainingSegments:Jt})=>Be?this.getChildConfig(H=re._injector??H,re,he).pipe((0,we.z)(Kn=>{const ei=Kn.injector??H,Gi=Kn.routes,{segmentGroup:Lo,slicedSegments:Xi}=Gs(M,Tt,Jt,Gi),Eo=new Ut(Lo.segments,Lo.children);if(0===Xi.length&&Eo.hasChildren())return this.expandChildren(ei,Gi,Eo).pipe((0,G.U)(oi=>new Ut(Tt,oi)));if(0===Gi.length&&0===Xi.length)return(0,d.of)(new Ut(Tt,{}));const so=Ue(re)===De;return this.expandSegment(ei,Eo,Gi,Xi,so?pt:De,!0).pipe((0,G.U)(zr=>new Ut(Tt.concat(zr.segments),zr.children)))})):_a(M)))}getChildConfig(H,M,re){return M.children?(0,d.of)({routes:M.children,injector:H}):M.loadChildren?void 0!==M._loadedRoutes?(0,d.of)({routes:M._loadedRoutes,injector:M._loadedInjector}):function Ti(B,H,M,re){const he=H.canLoad;if(void 0===he||0===he.length)return(0,d.of)(!0);const De=he.map(Be=>{const Tt=Hr(Be,B);return jn(function wi(B){return B&&ar(B.canLoad)}(Tt)?Tt.canLoad(H,M):B.runInContext(()=>Tt(H,M)))});return(0,d.of)(De).pipe(S(),Rs())}(H,M,re).pipe((0,we.z)(he=>he?this.configLoader.loadChildren(H,M).pipe((0,Se.b)(De=>{M._loadedRoutes=De.routes,M._loadedInjector=De.injector})):function Va(B){return K(hi(mo,3))}())):(0,d.of)({routes:[],injector:H})}lineralizeSegments(H,M){let re=[],he=M.root;for(;;){if(re=re.concat(he.segments),0===he.numberOfChildren)return(0,d.of)(re);if(he.numberOfChildren>1||!he.children[pt])return H.redirectTo,K(new n.vHH(4e3,mo));he=he.children[pt]}}applyRedirectCommands(H,M,re){return this.applyRedirectCreateUrlTree(M,this.urlSerializer.parse(M),H,re)}applyRedirectCreateUrlTree(H,M,re,he){const De=this.createSegmentGroup(H,M.root,re,he);return new en(De,this.createQueryParams(M.queryParams,this.urlTree.queryParams),M.fragment)}createQueryParams(H,M){const re={};return Dn(H,(he,De)=>{if("string"==typeof he&&he.startsWith(":")){const Tt=he.substring(1);re[De]=M[Tt]}else re[De]=he}),re}createSegmentGroup(H,M,re,he){const De=this.createSegments(H,M.segments,re,he);let Be={};return Dn(M.children,(Tt,Jt)=>{Be[Jt]=this.createSegmentGroup(H,Tt,re,he)}),new Ut(De,Be)}createSegments(H,M,re,he){return M.map(De=>De.path.startsWith(":")?this.findPosParam(H,De,he):this.findOrReturn(De,re))}findPosParam(H,M,re){const he=re[M.path.substring(1)];if(!he)throw new n.vHH(4001,mo);return he}findOrReturn(H,M){let re=0;for(const he of M){if(he.path===H.path)return M.splice(re),he;re++}return H}}class Ni{}class fn{constructor(H,M,re,he,De,Be,Tt){this.injector=H,this.rootComponentType=M,this.config=re,this.urlTree=he,this.url=De,this.paramsInheritanceStrategy=Be,this.urlSerializer=Tt}recognize(){const H=Gs(this.urlTree.root,[],[],this.config.filter(M=>void 0===M.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,H,pt).pipe((0,G.U)(M=>{if(null===M)return null;const re=new hr([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},pt,this.rootComponentType,null,this.urlTree.root,-1,{}),he=new ur(re,M),De=new br(this.url,he);return this.inheritParamsAndData(De._root),De}))}inheritParamsAndData(H){const M=H.value,re=ys(M,this.paramsInheritanceStrategy);M.params=Object.freeze(re.params),M.data=Object.freeze(re.data),H.children.forEach(he=>this.inheritParamsAndData(he))}processSegmentGroup(H,M,re,he){return 0===re.segments.length&&re.hasChildren()?this.processChildren(H,M,re):this.processSegment(H,M,re,re.segments,he)}processChildren(H,M,re){return(0,g.D)(Object.keys(re.children)).pipe((0,We.b)(he=>{const De=re.children[he],Be=Ke(M,he);return this.processSegmentGroup(H,Be,De,he)}),(0,et.R)((he,De)=>he&&De?(he.push(...De),he):null),function xe(B,H=!1){return(0,Fe.e)((M,re)=>{let he=0;M.subscribe((0,Ee.x)(re,De=>{const Be=B(De,he++);(Be||H)&&re.next(De),!Be&&re.complete()}))})}(he=>null!==he),(0,$.d)(null),Qe(),(0,G.U)(he=>{if(null===he)return null;const De=Qn(he);return function Di(B){B.sort((H,M)=>H.value.outlet===pt?-1:M.value.outlet===pt?1:H.value.outlet.localeCompare(M.value.outlet))}(De),De}))}processSegment(H,M,re,he,De){return(0,g.D)(M).pipe((0,We.b)(Be=>this.processSegmentAgainstRoute(Be._injector??H,Be,re,he,De)),(0,Ve.P)(Be=>!!Be),(0,Me.K)(Be=>{if(w(Be))return va(re,he,De)?(0,d.of)([]):(0,d.of)(null);throw Be}))}processSegmentAgainstRoute(H,M,re,he,De){if(M.redirectTo||!xo(M,re,he,De))return(0,d.of)(null);let Be;if("**"===M.path){const Tt=he.length>0?Sn(he).parameters:{},Jt=Nn(re)+he.length,zn=new hr(he,Tt,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,j(M),Ue(M),M.component??M._loadedComponent??null,M,Mo(re),Jt,ge(M));Be=(0,d.of)({snapshot:zn,consumedSegments:[],remainingSegments:[]})}else Be=Is(re,M,he,H).pipe((0,G.U)(({matched:Tt,consumedSegments:Jt,remainingSegments:zn,parameters:Kn})=>{if(!Tt)return null;const ei=Nn(re)+Jt.length;return{snapshot:new hr(Jt,Kn,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,j(M),Ue(M),M.component??M._loadedComponent??null,M,Mo(re),ei,ge(M)),consumedSegments:Jt,remainingSegments:zn}}));return Be.pipe((0,te.w)(Tt=>{if(null===Tt)return(0,d.of)(null);const{snapshot:Jt,consumedSegments:zn,remainingSegments:Kn}=Tt;H=M._injector??H;const ei=M._loadedInjector??H,Gi=function go(B){return B.children?B.children:B.loadChildren?B._loadedRoutes:[]}(M),{segmentGroup:Lo,slicedSegments:Xi}=Gs(re,zn,Kn,Gi.filter(so=>void 0===so.redirectTo));if(0===Xi.length&&Lo.hasChildren())return this.processChildren(ei,Gi,Lo).pipe((0,G.U)(so=>null===so?null:[new ur(Jt,so)]));if(0===Gi.length&&0===Xi.length)return(0,d.of)([new ur(Jt,[])]);const Eo=Ue(M)===De;return this.processSegment(ei,Gi,Lo,Xi,Eo?pt:De).pipe((0,G.U)(so=>null===so?null:[new ur(Jt,so)]))}))}}function Po(B){const H=B.value.routeConfig;return H&&""===H.path&&void 0===H.redirectTo}function Qn(B){const H=[],M=new Set;for(const re of B){if(!Po(re)){H.push(re);continue}const he=H.find(De=>re.value.routeConfig===De.value.routeConfig);void 0!==he?(he.children.push(...re.children),M.add(he)):H.push(re)}for(const re of M){const he=Qn(re.children);H.push(new ur(re.value,he))}return H.filter(re=>!M.has(re))}function Mo(B){let H=B;for(;H._sourceSegment;)H=H._sourceSegment;return H}function Nn(B){let H=B,M=H._segmentIndexShift??0;for(;H._sourceSegment;)H=H._sourceSegment,M+=H._segmentIndexShift??0;return M-1}function j(B){return B.data||{}}function ge(B){return B.resolve||{}}function Vr(B){return"string"==typeof B.title||null===B.title}function Wr(B){return(0,te.w)(H=>{const M=B(H);return M?(0,g.D)(M).pipe((0,G.U)(()=>H)):(0,d.of)(H)})}const Fr=new n.OlP("ROUTES");let On=(()=>{class B{constructor(M,re){this.injector=M,this.compiler=re,this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap}loadComponent(M){if(this.componentLoaders.get(M))return this.componentLoaders.get(M);if(M._loadedComponent)return(0,d.of)(M._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(M);const re=jn(M.loadComponent()).pipe((0,G.U)(ms),(0,Se.b)(De=>{this.onLoadEndListener&&this.onLoadEndListener(M),M._loadedComponent=De}),Le(()=>{this.componentLoaders.delete(M)})),he=new ce.c(re,()=>new X.x).pipe((0,ke.x)());return this.componentLoaders.set(M,he),he}loadChildren(M,re){if(this.childrenLoaders.get(re))return this.childrenLoaders.get(re);if(re._loadedRoutes)return(0,d.of)({routes:re._loadedRoutes,injector:re._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(re);const De=this.loadModuleFactoryOrRoutes(re.loadChildren).pipe((0,G.U)(Tt=>{this.onLoadEndListener&&this.onLoadEndListener(re);let Jt,zn,Kn=!1;Array.isArray(Tt)?zn=Tt:(Jt=Tt.create(M).injector,zn=gn(Jt.get(Fr,[],n.XFs.Self|n.XFs.Optional)));return{routes:zn.map(ns),injector:Jt}}),Le(()=>{this.childrenLoaders.delete(re)})),Be=new ce.c(De,()=>new X.x).pipe((0,ke.x)());return this.childrenLoaders.set(re,Be),Be}loadModuleFactoryOrRoutes(M){return jn(M()).pipe((0,G.U)(ms),(0,we.z)(he=>he instanceof n.YKP||Array.isArray(he)?(0,d.of)(he):(0,g.D)(this.compiler.compileModuleAsync(he))))}}return B.\u0275fac=function(M){return new(M||B)(n.LFG(n.zs3),n.LFG(n.Sil))},B.\u0275prov=n.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),B})();function ms(B){return function bi(B){return B&&"object"==typeof B&&"default"in B}(B)?B.default:B}let Hn=(()=>{class B{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new X.x,this.configLoader=(0,n.f3M)(On),this.environmentInjector=(0,n.f3M)(n.lqb),this.urlSerializer=(0,n.f3M)(F),this.rootContexts=(0,n.f3M)(es),this.navigationId=0,this.afterPreactivation=()=>(0,d.of)(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=he=>this.events.next(new $n(he)),this.configLoader.onLoadStartListener=he=>this.events.next(new vn(he))}complete(){this.transitions?.complete()}handleNavigationRequest(M){const re=++this.navigationId;this.transitions?.next({...this.transitions.value,...M,id:re})}setupNavigations(M){return this.transitions=new A.X({id:0,targetPageId:0,currentUrlTree:M.currentUrlTree,currentRawUrl:M.currentUrlTree,extractedUrl:M.urlHandlingStrategy.extract(M.currentUrlTree),urlAfterRedirects:M.urlHandlingStrategy.extract(M.currentUrlTree),rawUrl:M.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:ni,restoredState:null,currentSnapshot:M.routerState.snapshot,targetSnapshot:null,currentRouterState:M.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe((0,Ie.h)(re=>0!==re.id),(0,G.U)(re=>({...re,extractedUrl:M.urlHandlingStrategy.extract(re.rawUrl)})),(0,te.w)(re=>{let he=!1,De=!1;return(0,d.of)(re).pipe((0,Se.b)(Be=>{this.currentNavigation={id:Be.id,initialUrl:Be.rawUrl,extractedUrl:Be.extractedUrl,trigger:Be.source,extras:Be.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),(0,te.w)(Be=>{const Tt=M.browserUrlTree.toString(),Jt=!M.navigated||Be.extractedUrl.toString()!==Tt||Tt!==M.currentUrlTree.toString();if(!Jt&&"reload"!==(Be.extras.onSameUrlNavigation??M.onSameUrlNavigation)){const Kn="";return this.events.next(new tt(Be.id,M.serializeUrl(re.rawUrl),Kn,0)),M.rawUrlTree=Be.rawUrl,Be.resolve(null),z.E}if(M.urlHandlingStrategy.shouldProcessUrl(Be.rawUrl))return Os(Be.source)&&(M.browserUrlTree=Be.extractedUrl),(0,d.of)(Be).pipe((0,te.w)(Kn=>{const ei=this.transitions?.getValue();return this.events.next(new le(Kn.id,this.urlSerializer.serialize(Kn.extractedUrl),Kn.source,Kn.restoredState)),ei!==this.transitions?.getValue()?z.E:Promise.resolve(Kn)}),function pi(B,H,M,re){return(0,te.w)(he=>function rc(B,H,M,re,he){return new Rl(B,H,M,re,he).apply()}(B,H,M,he.extractedUrl,re).pipe((0,G.U)(De=>({...he,urlAfterRedirects:De}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,M.config),(0,Se.b)(Kn=>{this.currentNavigation={...this.currentNavigation,finalUrl:Kn.urlAfterRedirects},re.urlAfterRedirects=Kn.urlAfterRedirects}),function oe(B,H,M,re,he){return(0,we.z)(De=>function ai(B,H,M,re,he,De,Be="emptyOnly"){return new fn(B,H,M,re,he,Be,De).recognize().pipe((0,te.w)(Tt=>null===Tt?function Hs(B){return new L.y(H=>H.error(B))}(new Ni):(0,d.of)(Tt)))}(B,H,M,De.urlAfterRedirects,re.serialize(De.urlAfterRedirects),re,he).pipe((0,G.U)(Be=>({...De,targetSnapshot:Be}))))}(this.environmentInjector,this.rootComponentType,M.config,this.urlSerializer,M.paramsInheritanceStrategy),(0,Se.b)(Kn=>{if(re.targetSnapshot=Kn.targetSnapshot,"eager"===M.urlUpdateStrategy){if(!Kn.extras.skipLocationChange){const Gi=M.urlHandlingStrategy.merge(Kn.urlAfterRedirects,Kn.rawUrl);M.setBrowserUrl(Gi,Kn)}M.browserUrlTree=Kn.urlAfterRedirects}const ei=new Je(Kn.id,this.urlSerializer.serialize(Kn.extractedUrl),this.urlSerializer.serialize(Kn.urlAfterRedirects),Kn.targetSnapshot);this.events.next(ei)}));if(Jt&&M.urlHandlingStrategy.shouldProcessUrl(M.rawUrlTree)){const{id:Kn,extractedUrl:ei,source:Gi,restoredState:Lo,extras:Xi}=Be,Eo=new le(Kn,this.urlSerializer.serialize(ei),Gi,Lo);this.events.next(Eo);const so=kr(ei,this.rootComponentType).snapshot;return re={...Be,targetSnapshot:so,urlAfterRedirects:ei,extras:{...Xi,skipLocationChange:!1,replaceUrl:!1}},(0,d.of)(re)}{const Kn="";return this.events.next(new tt(Be.id,M.serializeUrl(re.extractedUrl),Kn,1)),M.rawUrlTree=Be.rawUrl,Be.resolve(null),z.E}}),(0,Se.b)(Be=>{const Tt=new vt(Be.id,this.urlSerializer.serialize(Be.extractedUrl),this.urlSerializer.serialize(Be.urlAfterRedirects),Be.targetSnapshot);this.events.next(Tt)}),(0,G.U)(Be=>re={...Be,guards:Or(Be.targetSnapshot,Be.currentSnapshot,this.rootContexts)}),function Q(B,H){return(0,we.z)(M=>{const{targetSnapshot:re,currentSnapshot:he,guards:{canActivateChecks:De,canDeactivateChecks:Be}}=M;return 0===Be.length&&0===De.length?(0,d.of)({...M,guardsResult:!0}):function Ze(B,H,M,re){return(0,g.D)(B).pipe((0,we.z)(he=>function ii(B,H,M,re,he){const De=H&&H.routeConfig?H.routeConfig.canDeactivate:null;if(!De||0===De.length)return(0,d.of)(!0);const Be=De.map(Tt=>{const Jt=yt(H)??he,zn=Hr(Tt,Jt);return jn(function ho(B){return B&&ar(B.canDeactivate)}(zn)?zn.canDeactivate(B,H,M,re):Jt.runInContext(()=>zn(B,H,M,re))).pipe((0,Ve.P)())});return(0,d.of)(Be).pipe(S())}(he.component,he.route,M,H,re)),(0,Ve.P)(he=>!0!==he,!0))}(Be,re,he,B).pipe((0,we.z)(Tt=>Tt&&function bs(B){return"boolean"==typeof B}(Tt)?function Ot(B,H,M,re){return(0,g.D)(H).pipe((0,We.b)(he=>(0,N.z)(function Yn(B,H){return null!==B&&H&&H(new er(B)),(0,d.of)(!0)}(he.route.parent,re),function hn(B,H){return null!==B&&H&&H(new Oi(B)),(0,d.of)(!0)}(he.route,re),function Zr(B,H,M){const re=H[H.length-1],De=H.slice(0,H.length-1).reverse().map(Be=>function ci(B){const H=B.routeConfig?B.routeConfig.canActivateChild:null;return H&&0!==H.length?{node:B,guards:H}:null}(Be)).filter(Be=>null!==Be).map(Be=>(0,U.P)(()=>{const Tt=Be.guards.map(Jt=>{const zn=yt(Be.node)??M,Kn=Hr(Jt,zn);return jn(function mr(B){return B&&ar(B.canActivateChild)}(Kn)?Kn.canActivateChild(re,B):zn.runInContext(()=>Kn(re,B))).pipe((0,Ve.P)())});return(0,d.of)(Tt).pipe(S())}));return(0,d.of)(De).pipe(S())}(B,he.path,M),function Pr(B,H,M){const re=H.routeConfig?H.routeConfig.canActivate:null;if(!re||0===re.length)return(0,d.of)(!0);const he=re.map(De=>(0,U.P)(()=>{const Be=yt(H)??M,Tt=Hr(De,Be);return jn(function Ri(B){return B&&ar(B.canActivate)}(Tt)?Tt.canActivate(H,B):Be.runInContext(()=>Tt(H,B))).pipe((0,Ve.P)())}));return(0,d.of)(he).pipe(S())}(B,he.route,M))),(0,Ve.P)(he=>!0!==he,!0))}(re,De,B,H):(0,d.of)(Tt)),(0,G.U)(Tt=>({...M,guardsResult:Tt})))})}(this.environmentInjector,Be=>this.events.next(Be)),(0,Se.b)(Be=>{if(re.guardsResult=Be.guardsResult,lt(Be.guardsResult))throw $i(0,Be.guardsResult);const Tt=new Mt(Be.id,this.urlSerializer.serialize(Be.extractedUrl),this.urlSerializer.serialize(Be.urlAfterRedirects),Be.targetSnapshot,!!Be.guardsResult);this.events.next(Tt)}),(0,Ie.h)(Be=>!!Be.guardsResult||(M.restoreHistory(Be),this.cancelNavigationTransition(Be,"",3),!1)),Wr(Be=>{if(Be.guards.canActivateChecks.length)return(0,d.of)(Be).pipe((0,Se.b)(Tt=>{const Jt=new Vt(Tt.id,this.urlSerializer.serialize(Tt.extractedUrl),this.urlSerializer.serialize(Tt.urlAfterRedirects),Tt.targetSnapshot);this.events.next(Jt)}),(0,te.w)(Tt=>{let Jt=!1;return(0,d.of)(Tt).pipe(function Re(B,H){return(0,we.z)(M=>{const{targetSnapshot:re,guards:{canActivateChecks:he}}=M;if(!he.length)return(0,d.of)(M);let De=0;return(0,g.D)(he).pipe((0,We.b)(Be=>function ct(B,H,M,re){const he=B.routeConfig,De=B._resolve;return void 0!==he?.title&&!Vr(he)&&(De[$t]=he.title),function Kt(B,H,M,re){const he=function ln(B){return[...Object.keys(B),...Object.getOwnPropertySymbols(B)]}(B);if(0===he.length)return(0,d.of)({});const De={};return(0,g.D)(he).pipe((0,we.z)(Be=>function In(B,H,M,re){const he=yt(H)??re,De=Hr(B,he);return jn(De.resolve?De.resolve(H,M):he.runInContext(()=>De(H,M)))}(B[Be],H,M,re).pipe((0,Ve.P)(),(0,Se.b)(Tt=>{De[Be]=Tt}))),ae(1),(0,st.h)(De),(0,Me.K)(Be=>w(Be)?z.E:K(Be)))}(De,B,H,re).pipe((0,G.U)(Be=>(B._resolvedData=Be,B.data=ys(B,M).resolve,he&&Vr(he)&&(B.data[$t]=he.title),null)))}(Be.route,re,B,H)),(0,Se.b)(()=>De++),ae(1),(0,we.z)(Be=>De===he.length?(0,d.of)(M):z.E))})}(M.paramsInheritanceStrategy,this.environmentInjector),(0,Se.b)({next:()=>Jt=!0,complete:()=>{Jt||(M.restoreHistory(Tt),this.cancelNavigationTransition(Tt,"",2))}}))}),(0,Se.b)(Tt=>{const Jt=new jt(Tt.id,this.urlSerializer.serialize(Tt.extractedUrl),this.urlSerializer.serialize(Tt.urlAfterRedirects),Tt.targetSnapshot);this.events.next(Jt)}))}),Wr(Be=>{const Tt=Jt=>{const zn=[];Jt.routeConfig?.loadComponent&&!Jt.routeConfig._loadedComponent&&zn.push(this.configLoader.loadComponent(Jt.routeConfig).pipe((0,Se.b)(Kn=>{Jt.component=Kn}),(0,G.U)(()=>{})));for(const Kn of Jt.children)zn.push(...Tt(Kn));return zn};return(0,O.a)(Tt(Be.targetSnapshot.root)).pipe((0,$.d)(),(0,pe.q)(1))}),Wr(()=>this.afterPreactivation()),(0,G.U)(Be=>{const Tt=function qs(B,H,M){const re=fs(B,H._root,M?M._root:void 0);return new Yi(re,H)}(M.routeReuseStrategy,Be.targetSnapshot,Be.currentRouterState);return re={...Be,targetRouterState:Tt}}),(0,Se.b)(Be=>{M.currentUrlTree=Be.urlAfterRedirects,M.rawUrlTree=M.urlHandlingStrategy.merge(Be.urlAfterRedirects,Be.rawUrl),M.routerState=Be.targetRouterState,"deferred"===M.urlUpdateStrategy&&(Be.extras.skipLocationChange||M.setBrowserUrl(M.rawUrlTree,Be),M.browserUrlTree=Be.urlAfterRedirects)}),((B,H,M)=>(0,G.U)(re=>(new rn(H,re.targetRouterState,re.currentRouterState,M).activate(B),re)))(this.rootContexts,M.routeReuseStrategy,Be=>this.events.next(Be)),(0,Se.b)({next:Be=>{he=!0,this.lastSuccessfulNavigation=this.currentNavigation,M.navigated=!0,this.events.next(new ye(Be.id,this.urlSerializer.serialize(Be.extractedUrl),this.urlSerializer.serialize(M.currentUrlTree))),M.titleStrategy?.updateTitle(Be.targetRouterState.snapshot),Be.resolve(!0)},complete:()=>{he=!0}}),Le(()=>{he||De||this.cancelNavigationTransition(re,"",1),this.currentNavigation?.id===re.id&&(this.currentNavigation=null)}),(0,Me.K)(Be=>{if(De=!0,Us(Be)){Ps(Be)||(M.navigated=!0,M.restoreHistory(re,!0));const Tt=new ze(re.id,this.urlSerializer.serialize(re.extractedUrl),Be.message,Be.cancellationCode);if(this.events.next(Tt),Ps(Be)){const Jt=M.urlHandlingStrategy.merge(Be.url,M.rawUrlTree),zn={skipLocationChange:re.extras.skipLocationChange,replaceUrl:"eager"===M.urlUpdateStrategy||Os(re.source)};M.scheduleNavigation(Jt,ni,null,zn,{resolve:re.resolve,reject:re.reject,promise:re.promise})}else re.resolve(!1)}else{M.restoreHistory(re,!0);const Tt=new Pe(re.id,this.urlSerializer.serialize(re.extractedUrl),Be,re.targetSnapshot??void 0);this.events.next(Tt);try{re.resolve(M.errorHandler(Be))}catch(Jt){re.reject(Jt)}}return z.E}))}))}cancelNavigationTransition(M,re,he){const De=new ze(M.id,this.urlSerializer.serialize(M.extractedUrl),re,he);this.events.next(De),M.resolve(!1)}}return B.\u0275fac=function(M){return new(M||B)},B.\u0275prov=n.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),B})();function Os(B){return B!==ni}let Rr=(()=>{class B{buildTitle(M){let re,he=M.root;for(;void 0!==he;)re=this.getResolvedTitleForRoute(he)??re,he=he.children.find(De=>De.outlet===pt);return re}getResolvedTitleForRoute(M){return M.data[$t]}}return B.\u0275fac=function(M){return new(M||B)},B.\u0275prov=n.Yz7({token:B,factory:function(){return(0,n.f3M)(al)},providedIn:"root"}),B})(),al=(()=>{class B extends Rr{constructor(M){super(),this.title=M}updateTitle(M){const re=this.buildTitle(M);void 0!==re&&this.title.setTitle(re)}}return B.\u0275fac=function(M){return new(M||B)(n.LFG(ut.Dx))},B.\u0275prov=n.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),B})(),ui=(()=>{class B{}return B.\u0275fac=function(M){return new(M||B)},B.\u0275prov=n.Yz7({token:B,factory:function(){return(0,n.f3M)(Ro)},providedIn:"root"}),B})();class Ln{shouldDetach(H){return!1}store(H,M){}shouldAttach(H){return!1}retrieve(H){return null}shouldReuseRoute(H,M){return H.routeConfig===M.routeConfig}}let Ro=(()=>{class B extends Ln{}return B.\u0275fac=function(){let H;return function(re){return(H||(H=n.n5z(B)))(re||B)}}(),B.\u0275prov=n.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),B})();const ko=new n.OlP("",{providedIn:"root",factory:()=>({})});let kl=(()=>{class B{}return B.\u0275fac=function(M){return new(M||B)},B.\u0275prov=n.Yz7({token:B,factory:function(){return(0,n.f3M)($a)},providedIn:"root"}),B})(),$a=(()=>{class B{shouldProcessUrl(M){return!0}extract(M){return M}merge(M,re){return M}}return B.\u0275fac=function(M){return new(M||B)},B.\u0275prov=n.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),B})();function cl(B){throw B}function Ea(B,H,M){return H.parse("/")}const ul={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Qs={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Ss=(()=>{class B{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=(0,n.f3M)(n.c2e),this.isNgZoneEnabled=!1,this.options=(0,n.f3M)(ko,{optional:!0})||{},this.errorHandler=this.options.errorHandler||cl,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||Ea,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=(0,n.f3M)(kl),this.routeReuseStrategy=(0,n.f3M)(ui),this.urlCreationStrategy=(0,n.f3M)(Pi),this.titleStrategy=(0,n.f3M)(Rr),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=gn((0,n.f3M)(Fr,{optional:!0})??[]),this.navigationTransitions=(0,n.f3M)(Hn),this.urlSerializer=(0,n.f3M)(F),this.location=(0,n.f3M)(Y.Ye),this.isNgZoneEnabled=(0,n.f3M)(n.R0b)instanceof n.R0b&&n.R0b.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new en,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=kr(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(M=>{this.lastSuccessfulId=M.id,this.currentPageId=M.targetPageId},M=>{this.console.warn(`Unhandled Navigation Error: ${M}`)})}resetRootComponentType(M){this.routerState.root.component=M,this.navigationTransitions.rootComponentType=M}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const M=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),ni,M)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(M=>{const re="popstate"===M.type?"popstate":"hashchange";"popstate"===re&&setTimeout(()=>{this.navigateToSyncWithBrowser(M.url,re,M.state)},0)}))}navigateToSyncWithBrowser(M,re,he){const De={replaceUrl:!0},Be=he?.navigationId?he:null;if(he){const Jt={...he};delete Jt.navigationId,delete Jt.\u0275routerPageId,0!==Object.keys(Jt).length&&(De.state=Jt)}const Tt=this.parseUrl(M);this.scheduleNavigation(Tt,re,Be,De)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(M){this.config=M.map(ns),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(M,re={}){const{relativeTo:he,queryParams:De,fragment:Be,queryParamsHandling:Tt,preserveFragment:Jt}=re,zn=Jt?this.currentUrlTree.fragment:Be;let Kn=null;switch(Tt){case"merge":Kn={...this.currentUrlTree.queryParams,...De};break;case"preserve":Kn=this.currentUrlTree.queryParams;break;default:Kn=De||null}return null!==Kn&&(Kn=this.removeEmptyProps(Kn)),this.urlCreationStrategy.createUrlTree(he,this.routerState,this.currentUrlTree,M,Kn,zn??null)}navigateByUrl(M,re={skipLocationChange:!1}){const he=lt(M)?M:this.parseUrl(M),De=this.urlHandlingStrategy.merge(he,this.rawUrlTree);return this.scheduleNavigation(De,ni,null,re)}navigate(M,re={skipLocationChange:!1}){return function ic(B){for(let H=0;H{const De=M[he];return null!=De&&(re[he]=De),re},{})}scheduleNavigation(M,re,he,De,Be){if(this.disposed)return Promise.resolve(!1);let Tt,Jt,zn,Kn;return Be?(Tt=Be.resolve,Jt=Be.reject,zn=Be.promise):zn=new Promise((ei,Gi)=>{Tt=ei,Jt=Gi}),Kn="computed"===this.canceledNavigationResolution?he&&he.\u0275routerPageId?he.\u0275routerPageId:De.replaceUrl||De.skipLocationChange?this.browserPageId??0:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:Kn,source:re,restoredState:he,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:M,extras:De,resolve:Tt,reject:Jt,promise:zn,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),zn.catch(ei=>Promise.reject(ei))}setBrowserUrl(M,re){const he=this.urlSerializer.serialize(M),De={...re.extras.state,...this.generateNgRouterState(re.id,re.targetPageId)};this.location.isCurrentPathEqualTo(he)||re.extras.replaceUrl?this.location.replaceState(he,"",De):this.location.go(he,"",De)}restoreHistory(M,re=!1){if("computed"===this.canceledNavigationResolution){const he=this.currentPageId-M.targetPageId;"popstate"!==M.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==this.getCurrentNavigation()?.finalUrl||0===he?this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===he&&(this.resetState(M),this.browserUrlTree=M.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(he)}else"replace"===this.canceledNavigationResolution&&(re&&this.resetState(M),this.resetUrlToCurrentUrlTree())}resetState(M){this.routerState=M.currentRouterState,this.currentUrlTree=M.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,M.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(M,re){return"computed"===this.canceledNavigationResolution?{navigationId:M,\u0275routerPageId:re}:{navigationId:M}}}return B.\u0275fac=function(M){return new(M||B)},B.\u0275prov=n.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),B})(),Ca=(()=>{class B{constructor(M,re,he,De,Be,Tt){this.router=M,this.route=re,this.tabIndexAttribute=he,this.renderer=De,this.el=Be,this.locationStrategy=Tt,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.href=null,this.commands=null,this.onChanges=new X.x;const Jt=Be.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===Jt||"area"===Jt,this.isAnchorElement?this.subscription=M.events.subscribe(zn=>{zn instanceof ye&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(M){this._preserveFragment=(0,n.D6c)(M)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(M){this._skipLocationChange=(0,n.D6c)(M)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(M){this._replaceUrl=(0,n.D6c)(M)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(M){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",M)}ngOnChanges(M){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(M){null!=M?(this.commands=Array.isArray(M)?M:[M],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(M,re,he,De,Be){return!!(null===this.urlTree||this.isAnchorElement&&(0!==M||re||he||De||Be||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const M=null===this.href?null:(0,n.P3R)(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",M)}applyAttributeValue(M,re){const he=this.renderer,De=this.el.nativeElement;null!==re?he.setAttribute(De,M,re):he.removeAttribute(De,M)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return B.\u0275fac=function(M){return new(M||B)(n.Y36(Ss),n.Y36(xs),n.$8M("tabindex"),n.Y36(n.Qsj),n.Y36(n.SBq),n.Y36(Y.S$))},B.\u0275dir=n.lG2({type:B,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(M,re){1&M&&n.NdJ("click",function(De){return re.onClick(De.button,De.ctrlKey,De.shiftKey,De.altKey,De.metaKey)}),2&M&&n.uIk("target",re.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[n.TTD]}),B})();class Lt{}let ba=(()=>{class B{preload(M,re){return re().pipe((0,Me.K)(()=>(0,d.of)(null)))}}return B.\u0275fac=function(M){return new(M||B)},B.\u0275prov=n.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),B})(),Ua=(()=>{class B{constructor(M,re,he,De,Be){this.router=M,this.injector=he,this.preloadingStrategy=De,this.loader=Be}setUpPreloading(){this.subscription=this.router.events.pipe((0,Ie.h)(M=>M instanceof ye),(0,We.b)(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(M,re){const he=[];for(const De of re){De.providers&&!De._injector&&(De._injector=(0,n.MMx)(De.providers,M,`Route: ${De.path}`));const Be=De._injector??M,Tt=De._loadedInjector??Be;De.loadChildren&&!De._loadedRoutes&&void 0===De.canLoad||De.loadComponent&&!De._loadedComponent?he.push(this.preloadConfig(Be,De)):(De.children||De._loadedRoutes)&&he.push(this.processRoutes(Tt,De.children??De._loadedRoutes))}return(0,g.D)(he).pipe((0,Ge.J)())}preloadConfig(M,re){return this.preloadingStrategy.preload(re,()=>{let he;he=re.loadChildren&&void 0===re.canLoad?this.loader.loadChildren(M,re):(0,d.of)(null);const De=he.pipe((0,we.z)(Be=>null===Be?(0,d.of)(void 0):(re._loadedRoutes=Be.routes,re._loadedInjector=Be.injector,this.processRoutes(Be.injector??M,Be.routes))));if(re.loadComponent&&!re._loadedComponent){const Be=this.loader.loadComponent(re);return(0,g.D)([De,Be]).pipe((0,Ge.J)())}return De})}}return B.\u0275fac=function(M){return new(M||B)(n.LFG(Ss),n.LFG(n.Sil),n.LFG(n.lqb),n.LFG(Lt),n.LFG(On))},B.\u0275prov=n.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),B})();const js=new n.OlP("");let Jo=(()=>{class B{constructor(M,re,he,De,Be={}){this.urlSerializer=M,this.transitions=re,this.viewportScroller=he,this.zone=De,this.options=Be,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},Be.scrollPositionRestoration=Be.scrollPositionRestoration||"disabled",Be.anchorScrolling=Be.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(M=>{M instanceof le?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=M.navigationTrigger,this.restoredId=M.restoredState?M.restoredState.navigationId:0):M instanceof ye&&(this.lastId=M.id,this.scheduleScrollEvent(M,this.urlSerializer.parse(M.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(M=>{M instanceof ri&&(M.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(M.position):M.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(M.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(M,re){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new ri(M,"popstate"===this.lastSource?this.store[this.restoredId]:null,re))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return B.\u0275fac=function(M){n.$Z()},B.\u0275prov=n.Yz7({token:B,factory:B.\u0275fac}),B})();var Js=(()=>((Js=Js||{})[Js.COMPLETE=0]="COMPLETE",Js[Js.FAILED=1]="FAILED",Js[Js.REDIRECTING=2]="REDIRECTING",Js))();const eo=!1;function _o(B,H){return{\u0275kind:B,\u0275providers:H}}const Ws=new n.OlP("",{providedIn:"root",factory:()=>!1});function da(){const B=(0,n.f3M)(n.zs3);return H=>{const M=B.get(n.z2F);if(H!==M.components[0])return;const re=B.get(Ss),he=B.get(to);1===B.get(Ga)&&re.initialNavigation(),B.get(za,null,n.XFs.Optional)?.setUpPreloading(),B.get(js,null,n.XFs.Optional)?.init(),re.resetRootComponentType(M.componentTypes[0]),he.closed||(he.next(),he.unsubscribe())}}const to=new n.OlP(eo?"bootstrap done indicator":"",{factory:()=>new X.x}),Ga=new n.OlP(eo?"initial navigation":"",{providedIn:"root",factory:()=>1});function Ha(){let B=[];return B=eo?[{provide:n.Xts,multi:!0,useFactory:()=>{const H=(0,n.f3M)(Ss);return()=>H.events.subscribe(M=>{console.group?.(`Router Event: ${M.constructor.name}`),console.log(function Ji(B){if(!("type"in B))return`Unknown Router Event: ${B.constructor.name}`;switch(B.type){case 14:return`ActivationEnd(path: '${B.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${B.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${B.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${B.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${B.id}, url: '${B.url}', urlAfterRedirects: '${B.urlAfterRedirects}', state: ${B.state}, shouldActivate: ${B.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${B.id}, url: '${B.url}', urlAfterRedirects: '${B.urlAfterRedirects}', state: ${B.state})`;case 2:return`NavigationCancel(id: ${B.id}, url: '${B.url}')`;case 16:return`NavigationSkipped(id: ${B.id}, url: '${B.url}')`;case 1:return`NavigationEnd(id: ${B.id}, url: '${B.url}', urlAfterRedirects: '${B.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${B.id}, url: '${B.url}', error: ${B.error})`;case 0:return`NavigationStart(id: ${B.id}, url: '${B.url}')`;case 6:return`ResolveEnd(id: ${B.id}, url: '${B.url}', urlAfterRedirects: '${B.urlAfterRedirects}', state: ${B.state})`;case 5:return`ResolveStart(id: ${B.id}, url: '${B.url}', urlAfterRedirects: '${B.urlAfterRedirects}', state: ${B.state})`;case 10:return`RouteConfigLoadEnd(path: ${B.route.path})`;case 9:return`RouteConfigLoadStart(path: ${B.route.path})`;case 4:return`RoutesRecognized(id: ${B.id}, url: '${B.url}', urlAfterRedirects: '${B.urlAfterRedirects}', state: ${B.state})`;case 15:return`Scroll(anchor: '${B.anchor}', position: '${B.position?`${B.position[0]}, ${B.position[1]}`:null}')`}}(M)),console.log(M),console.groupEnd?.()})}}]:[],_o(1,B)}const za=new n.OlP(eo?"router preloader":"");function vi(B){return _o(0,[{provide:za,useExisting:Ua},{provide:Lt,useExisting:B}])}const Ta=!1,Li=new n.OlP(Ta?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),ja=[Y.Ye,{provide:F,useClass:be},Ss,es,{provide:xs,useFactory:function sc(B){return B.routerState.root},deps:[Ss]},On,Ta?{provide:Ws,useValue:!0}:[]];function ea(){return new n.PXZ("Router",Ss)}let au=(()=>{class B{constructor(M){}static forRoot(M,re){return{ngModule:B,providers:[ja,Ta&&re?.enableTracing?Ha().\u0275providers:[],{provide:Fr,multi:!0,useValue:M},{provide:Li,useFactory:No,deps:[[Ss,new n.FiY,new n.tp0]]},{provide:ko,useValue:re||{}},re?.useHash?{provide:Y.S$,useClass:Y.Do}:{provide:Y.S$,useClass:Y.b0},{provide:js,useFactory:()=>{const B=(0,n.f3M)(Y.EM),H=(0,n.f3M)(n.R0b),M=(0,n.f3M)(ko),re=(0,n.f3M)(Hn),he=(0,n.f3M)(F);return M.scrollOffset&&B.setOffset(M.scrollOffset),new Jo(he,re,B,H,M)}},re?.preloadingStrategy?vi(re.preloadingStrategy).\u0275providers:[],{provide:n.PXZ,multi:!0,useFactory:ea},re?.initialNavigation?$o(re):[],[{provide:rs,useFactory:da},{provide:n.tb,multi:!0,useExisting:rs}]]}}static forChild(M){return{ngModule:B,providers:[{provide:Fr,multi:!0,useValue:M}]}}}return B.\u0275fac=function(M){return new(M||B)(n.LFG(Li,8))},B.\u0275mod=n.oAB({type:B}),B.\u0275inj=n.cJS({imports:[ts]}),B})();function No(B){if(Ta&&B)throw new n.vHH(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function $o(B){return["disabled"===B.initialNavigation?_o(3,[{provide:n.ip1,multi:!0,useFactory:()=>{const H=(0,n.f3M)(Ss);return()=>{H.setUpLocationChangeListener()}}},{provide:Ga,useValue:2}]).\u0275providers:[],"enabledBlocking"===B.initialNavigation?_o(2,[{provide:Ga,useValue:0},{provide:n.ip1,multi:!0,deps:[n.zs3],useFactory:H=>{const M=H.get(Y.V_,Promise.resolve());return()=>M.then(()=>new Promise(re=>{const he=H.get(Ss),De=H.get(to);(function vo(B,H){B.events.pipe((0,Ie.h)(M=>M instanceof ye||M instanceof ze||M instanceof Pe||M instanceof tt),(0,G.U)(M=>M instanceof ye||M instanceof tt?Js.COMPLETE:M instanceof ze&&(0===M.code||1===M.code)?Js.REDIRECTING:Js.FAILED),(0,Ie.h)(M=>M!==Js.REDIRECTING),(0,pe.q)(1)).subscribe(()=>{H()})})(he,()=>{re(!0)}),H.get(Hn).afterPreactivation=()=>(re(!0),De.closed?(0,d.of)(void 0):De),he.initialNavigation()}))}}]).\u0275providers:[]]}const rs=new n.OlP(Ta?"Router Initializer":"")},1877:(o,c,u)=>{"use strict";u.d(c,{Yd:()=>N,in:()=>g});const n=[];var g=(()=>{return(L=g||(g={}))[L.DEBUG=0]="DEBUG",L[L.VERBOSE=1]="VERBOSE",L[L.INFO=2]="INFO",L[L.WARN=3]="WARN",L[L.ERROR=4]="ERROR",L[L.SILENT=5]="SILENT",g;var L})();const d={debug:g.DEBUG,verbose:g.VERBOSE,info:g.INFO,warn:g.WARN,error:g.ERROR,silent:g.SILENT},A=g.INFO,R={[g.DEBUG]:"log",[g.VERBOSE]:"log",[g.INFO]:"info",[g.WARN]:"warn",[g.ERROR]:"error"},O=(L,ee,...K)=>{if(ee{"use strict";u.d(c,{IH:()=>F,Gb:()=>Pt,Kz:()=>sn,Iv:()=>Ur});var n=u(5861),g=u(3847),d=u(1877),A=u(9572),R=u(3272);u(9329);const N="analytics",U="firebase_id",ie="origin",L=6e4,ee="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",K="https://www.googletagmanager.com/gtag/js",z=new d.Yd("@firebase/analytics");function ce(Te){return Promise.all(Te.map(Ye=>Ye.catch(ft=>ft)))}function te(){return(te=(0,n.Z)(function*(Te,Ye,ft,dt,Gt,nn){const En=dt[Gt];try{if(En)yield Ye[En];else{const Gn=(yield ce(ft)).find(gt=>gt.measurementId===Gt);Gn&&(yield Ye[Gn.appId])}}catch(yn){z.error(yn)}Te("config",Gt,nn)})).apply(this,arguments)}function ve(){return(ve=(0,n.Z)(function*(Te,Ye,ft,dt,Gt){try{let nn=[];if(Gt&&Gt.send_to){let En=Gt.send_to;Array.isArray(En)||(En=[En]);const yn=yield ce(ft);for(const Gn of En){const gt=yn.find(He=>He.measurementId===Gn),lt=gt&&Ye[gt.appId];if(!lt){nn=[];break}nn.push(lt)}}0===nn.length&&(nn=Object.values(Ye)),yield Promise.all(nn),Te("event",dt,Gt||{})}catch(nn){z.error(nn)}})).apply(this,arguments)}const Se=new A.LL("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.'}),Me=30,Ee=new class Fe{constructor(Ye={},ft=1e3){this.throttleMetadata=Ye,this.intervalMillis=ft}getThrottleMetadata(Ye){return this.throttleMetadata[Ye]}setThrottleMetadata(Ye,ft){this.throttleMetadata[Ye]=ft}deleteThrottleMetadata(Ye){delete this.throttleMetadata[Ye]}};function ae(Te){return new Headers({Accept:"application/json","x-goog-api-key":Te})}function $(){return($=(0,n.Z)(function*(Te){var Ye;const{appId:ft,apiKey:dt}=Te,Gt={method:"GET",headers:ae(dt)},nn=ee.replace("{app-id}",ft),En=yield fetch(nn,Gt);if(200!==En.status&&304!==En.status){let yn="";try{const Gn=yield En.json();null!==(Ye=Gn.error)&&void 0!==Ye&&Ye.message&&(yn=Gn.error.message)}catch{}throw Se.create("config-fetch-failed",{httpStatus:En.status,responseMessage:yn})}return En.json()})).apply(this,arguments)}function Qe(){return(Qe=(0,n.Z)(function*(Te,Ye=Ee,ft){const{appId:dt,apiKey:Gt,measurementId:nn}=Te.options;if(!dt)throw Se.create("no-app-id");if(!Gt){if(nn)return{measurementId:nn,appId:dt};throw Se.create("no-api-key")}const En=Ye.getThrottleMetadata(dt)||{backoffCount:0,throttleEndTimeMillis:Date.now()},yn=new Ge;return setTimeout((0,n.Z)(function*(){yn.abort()}),void 0!==ft?ft:L),xe({appId:dt,apiKey:Gt,measurementId:nn},En,yn,Ye)})).apply(this,arguments)}function xe(Te,Ye,ft){return st.apply(this,arguments)}function st(){return st=(0,n.Z)(function*(Te,{throttleEndTimeMillis:Ye,backoffCount:ft},dt,Gt=Ee){var nn;const{appId:En,measurementId:yn}=Te;try{yield function Le(Te,Ye){return new Promise((ft,dt)=>{const Gt=Math.max(Ye-Date.now(),0),nn=setTimeout(ft,Gt);Te.addEventListener(()=>{clearTimeout(nn),dt(Se.create("fetch-throttle",{throttleEndTimeMillis:Ye}))})})}(dt,Ye)}catch(Gn){if(yn)return z.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${yn} provided in the "measurementId" field in the local Firebase config. [${Gn?.message}]`),{appId:En,measurementId:yn};throw Gn}try{const Gn=yield function me(Te){return $.apply(this,arguments)}(Te);return Gt.deleteThrottleMetadata(En),Gn}catch(Gn){const gt=Gn;if(!function ke(Te){if(!(Te instanceof A.ZR&&Te.customData))return!1;const Ye=Number(Te.customData.httpStatus);return 429===Ye||500===Ye||503===Ye||504===Ye}(gt)){if(Gt.deleteThrottleMetadata(En),yn)return z.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${yn} provided in the "measurementId" field in the local Firebase config. [${gt?.message}]`),{appId:En,measurementId:yn};throw Gn}const lt=503===Number(null===(nn=gt?.customData)||void 0===nn?void 0:nn.httpStatus)?(0,A.$s)(ft,Gt.intervalMillis,Me):(0,A.$s)(ft,Gt.intervalMillis),He={throttleEndTimeMillis:Date.now()+lt,backoffCount:ft+1};return Gt.setThrottleMetadata(En,He),z.debug(`Calling attemptFetch again in ${lt} millis`),xe(Te,He,dt,Gt)}}),st.apply(this,arguments)}class Ge{constructor(){this.listeners=[]}addEventListener(Ye){this.listeners.push(Ye)}abort(){this.listeners.forEach(Ye=>Ye())}}let ut,cr;function $t(){return($t=(0,n.Z)(function*(Te,Ye,ft,dt,Gt){if(Gt&&Gt.global)Te("event",ft,dt);else{const nn=yield Ye;Te("event",ft,Object.assign(Object.assign({},dt),{send_to:nn}))}})).apply(this,arguments)}function kt(){return(kt=(0,n.Z)(function*(Te,Ye,ft,dt){if(dt&&dt.global)return Te("set",{user_id:ft}),Promise.resolve();Te("config",yield Ye,{update:!0,user_id:ft})})).apply(this,arguments)}function Fn(){return(Fn=(0,n.Z)(function*(){if(!(0,A.hl)())return z.warn(Se.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{yield(0,A.eu)()}catch(Te){return z.warn(Se.create("indexeddb-unavailable",{errorInfo:Te?.toString()}).message),!1}return!0})).apply(this,arguments)}function Wn(){return Wn=(0,n.Z)(function*(Te,Ye,ft,dt,Gt,nn,En){var yn;const Gn=function ue(Te){return Qe.apply(this,arguments)}(Te);Gn.then(mt=>{ft[mt.measurementId]=mt.appId,Te.options.measurementId&&mt.measurementId!==Te.options.measurementId&&z.warn(`The measurement ID in the local Firebase config (${Te.options.measurementId}) does not match the measurement ID fetched from the server (${mt.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(mt=>z.error(mt)),Ye.push(Gn);const gt=function Mn(){return Fn.apply(this,arguments)}().then(mt=>{if(mt)return dt.getId()}),[lt,He]=yield Promise.all([Gn,gt]);(function Ve(Te){const Ye=window.document.getElementsByTagName("script");for(const ft of Object.values(Ye))if(ft.src&&ft.src.includes(K)&&ft.src.includes(Te))return ft;return null})(nn)||function X(Te,Ye){const ft=document.createElement("script");ft.src=`${K}?l=${Te}&id=${Ye}`,ft.async=!0,document.head.appendChild(ft)}(nn,lt.measurementId),cr&&(Gt("consent","default",cr),function Dn(Te){cr=Te}(void 0)),Gt("js",new Date);const nt=null!==(yn=En?.config)&&void 0!==yn?yn:{};return nt[ie]="firebase",nt.update=!0,null!=He&&(nt[U]=He),Gt("config",lt.measurementId,nt),ut&&(Gt("set",ut),function jn(Te){ut=Te}(void 0)),lt.measurementId}),Wn.apply(this,arguments)}class Zn{constructor(Ye){this.app=Ye}_delete(){return delete Vn[this.app.options.appId],Promise.resolve()}}let Vn={},sr=[];const Tr={};let en,Ut,bn="dataLayer",pn="gtag",xt=!1;function T(Te,Ye,ft){!function $e(){const Te=[];if((0,A.ru)()&&Te.push("This is a browser extension environment."),(0,A.zI)()||Te.push("Cookies are not available."),Te.length>0){const Ye=Te.map((dt,Gt)=>`(${Gt+1}) ${dt}`).join(" "),ft=Se.create("invalid-analytics-context",{errorInfo:Ye});z.warn(ft.message)}}();const dt=Te.options.appId;if(!dt)throw Se.create("no-app-id");if(!Te.options.apiKey){if(!Te.options.measurementId)throw Se.create("no-api-key");z.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${Te.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=Vn[dt])throw Se.create("already-exists",{id:dt});if(!xt){!function Y(Te){let Ye=[];Array.isArray(window[Te])?Ye=window[Te]:window[Te]=Ye}(bn);const{wrappedGtag:nn,gtagCore:En}=function we(Te,Ye,ft,dt,Gt){let nn=function(...En){window[dt].push(arguments)};return window[Gt]&&"function"==typeof window[Gt]&&(nn=window[Gt]),window[Gt]=function Ie(Te,Ye,ft,dt){function nn(){return nn=(0,n.Z)(function*(En,yn,Gn){try{"event"===En?yield function pe(Te,Ye,ft,dt,Gt){return ve.apply(this,arguments)}(Te,Ye,ft,yn,Gn):"config"===En?yield function G(Te,Ye,ft,dt,Gt,nn){return te.apply(this,arguments)}(Te,Ye,ft,dt,yn,Gn):"consent"===En?Te("consent","update",Gn):Te("set",yn)}catch(gt){z.error(gt)}}),nn.apply(this,arguments)}return function Gt(En,yn,Gn){return nn.apply(this,arguments)}}(nn,Te,Ye,ft),{gtagCore:nn,wrappedGtag:window[Gt]}}(Vn,sr,Tr,bn,pn);Ut=nn,en=En,xt=!0}return Vn[dt]=function un(Te,Ye,ft,dt,Gt,nn,En){return Wn.apply(this,arguments)}(Te,sr,Tr,Ye,en,bn,ft),new Zn(Te)}function F(Te=(0,g.Mq)()){Te=(0,A.m9)(Te);const Ye=(0,g.qX)(Te,N);return Ye.isInitialized()?Ye.getImmediate():function be(Te,Ye={}){const ft=(0,g.qX)(Te,N);if(ft.isInitialized()){const Gt=ft.getImmediate();if((0,A.vZ)(Ye,ft.getOptions()))return Gt;throw Se.create("already-initialized")}return ft.initialize({options:Ye})}(Te)}function Pt(){return Pn.apply(this,arguments)}function Pn(){return(Pn=(0,n.Z)(function*(){if((0,A.ru)()||!(0,A.zI)()||!(0,A.hl)())return!1;try{return yield(0,A.eu)()}catch{return!1}})).apply(this,arguments)}function Ur(Te,Ye,ft){Te=(0,A.m9)(Te),function Yt(Te,Ye,ft,dt){return kt.apply(this,arguments)}(Ut,Vn[Te.app.options.appId],Ye,ft).catch(dt=>z.error(dt))}function sn(Te,Ye,ft,dt){Te=(0,A.m9)(Te),function pt(Te,Ye,ft,dt,Gt){return $t.apply(this,arguments)}(Ut,Vn[Te.app.options.appId],Ye,ft,dt).catch(Gt=>z.error(Gt))}const kn="@firebase/analytics";!function rt(){(0,g.Xd)(new R.wA(N,(Ye,{options:ft})=>T(Ye.getProvider("app").getImmediate(),Ye.getProvider("installations-internal").getImmediate(),ft),"PUBLIC")),(0,g.Xd)(new R.wA("analytics-internal",function Te(Ye){try{const ft=Ye.getProvider(N).getImmediate();return{logEvent:(dt,Gt,nn)=>sn(ft,dt,Gt,nn)}}catch(ft){throw Se.create("interop-component-reg-failed",{reason:ft})}},"PRIVATE")),(0,g.KN)(kn,"0.9.4"),(0,g.KN)(kn,"0.9.4","esm2017")}()},259:(o,c,u)=>{"use strict";u.d(c,{C6:()=>n.C6,KN:()=>n.KN,Mq:()=>n.Mq,ZF:()=>n.ZF});var n=u(3847);(0,n.KN)("firebase","9.17.2","app")},6323:(o,c,u)=>{"use strict";u.d(c,{lI:()=>Fo,v0:()=>_u,Aj:()=>rc,LS:()=>or,XB:()=>Us,sB:()=>Ui,e5:()=>x,$g:()=>za});var n=u(5861),g=u(9572),d=u(3847),A=u(1877),R=u(655),O=u(3272);const X=function z(){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."}},Y=new g.LL("auth","Firebase",{"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."}),te=new A.Yd("@firebase/auth");function pe(W,...I){te.logLevel<=A.in.ERROR&&te.error(`Auth (${d.Jn}): ${W}`,...I)}function ve(W,...I){throw We(W,...I)}function Ie(W,...I){return We(W,...I)}function We(W,...I){if("string"!=typeof W){const P=I[0],J=[...I.slice(1)];return J[0]&&(J[0].appName=W.name),W._errorFactory.create(P,...J)}return Y.create(W,...I)}function Se(W,I,...P){if(!W)throw We(I,...P)}function Me(W){const I="INTERNAL ASSERTION FAILED: "+W;throw pe(I),new Error(I)}function et(W,I){W||Me(I)}const Fe=new Map;function Ee(W){et(W instanceof Function,"Expected a class definition");let I=Fe.get(W);return I?(et(I instanceof W,"Instance stored in cache mismatched with class"),I):(I=new W,Fe.set(W,I),I)}function $(){var W;return typeof self<"u"&&(null===(W=self.location)||void 0===W?void 0:W.href)||""}function ue(){return"http:"===Qe()||"https:"===Qe()}function Qe(){var W;return typeof self<"u"&&(null===(W=self.location)||void 0===W?void 0:W.protocol)||null}class Le{constructor(I,P){this.shortDelay=I,this.longDelay=P,et(P>I,"Short delay should be less than long delay!"),this.isMobile=(0,g.uI)()||(0,g.b$)()}get(){return function xe(){return!(typeof navigator<"u"&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(ue()||(0,g.ru)()||"connection"in navigator))||navigator.onLine}()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function ke(W,I){et(W.emulator,"Emulator should always be set here");const{url:P}=W.emulator;return I?`${P}${I.startsWith("/")?I.slice(1):I}`:P}class Ge{static initialize(I,P,J){this.fetchImpl=I,P&&(this.headersImpl=P),J&&(this.responseImpl=J)}static fetch(){return this.fetchImpl?this.fetchImpl:typeof self<"u"&&"fetch"in self?self.fetch:void Me("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:typeof self<"u"&&"Headers"in self?self.Headers:void Me("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:typeof self<"u"&&"Response"in self?self.Response:void Me("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const ut={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:"internal-error",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",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"},pt=new Le(3e4,6e4);function $t(W,I){return W.tenantId&&!I.tenantId?Object.assign(Object.assign({},I),{tenantId:W.tenantId}):I}function bt(W,I,P,J){return St.apply(this,arguments)}function St(){return(St=(0,n.Z)(function*(W,I,P,J,Ae={}){return Yt(W,Ae,(0,n.Z)(function*(){let Xe={},Dt={};J&&("GET"===I?Dt=J:Xe={body:JSON.stringify(J)});const cn=(0,g.xO)(Object.assign({key:W.config.apiKey},Dt)).slice(1),qn=yield W._getAdditionalHeaders();return qn["Content-Type"]="application/json",W.languageCode&&(qn["X-Firebase-Locale"]=W.languageCode),Ge.fetch()(gn(W,W.config.apiHost,P,cn),Object.assign({method:I,headers:qn,referrerPolicy:"no-referrer"},Xe))}))})).apply(this,arguments)}function Yt(W,I,P){return kt.apply(this,arguments)}function kt(){return(kt=(0,n.Z)(function*(W,I,P){W._canInitEmulator=!1;const J=Object.assign(Object.assign({},ut),I);try{const Ae=new Sn(W),Xe=yield Promise.race([P(),Ae.promise]);Ae.clearNetworkTimeout();const Dt=yield Xe.json();if("needConfirmation"in Dt)throw cr(W,"account-exists-with-different-credential",Dt);if(Xe.ok&&!("errorMessage"in Dt))return Dt;{const cn=Xe.ok?Dt.errorMessage:Dt.error.message,[qn,lr]=cn.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===qn)throw cr(W,"credential-already-in-use",Dt);if("EMAIL_EXISTS"===qn)throw cr(W,"email-already-in-use",Dt);if("USER_DISABLED"===qn)throw cr(W,"user-disabled",Dt);const Kr=J[qn]||qn.toLowerCase().replace(/[_\s]+/g,"-");if(lr)throw function we(W,I,P){const J=Object.assign(Object.assign({},X()),{[I]:P});return new g.LL("auth","Firebase",J).create(I,{appName:W.name})}(W,Kr,lr);ve(W,Kr)}}catch(Ae){if(Ae instanceof g.ZR)throw Ae;ve(W,"internal-error",{message:String(Ae)})}})).apply(this,arguments)}function Et(W,I,P,J){return It.apply(this,arguments)}function It(){return(It=(0,n.Z)(function*(W,I,P,J,Ae={}){const Xe=yield bt(W,I,P,J,Ae);return"mfaPendingCredential"in Xe&&ve(W,"multi-factor-auth-required",{_serverResponse:Xe}),Xe})).apply(this,arguments)}function gn(W,I,P,J){const Ae=`${I}${P}?${J}`;return W.config.emulator?ke(W.config,Ae):`${W.config.apiScheme}://${Ae}`}class Sn{constructor(I){this.auth=I,this.timer=null,this.promise=new Promise((P,J)=>{this.timer=setTimeout(()=>J(Ie(this.auth,"network-request-failed")),pt.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function cr(W,I,P){const J={appName:W.name};P.email&&(J.email=P.email),P.phoneNumber&&(J.phoneNumber=P.phoneNumber);const Ae=Ie(W,I,J);return Ae.customData._tokenResponse=P,Ae}function jn(){return(jn=(0,n.Z)(function*(W,I){return bt(W,"POST","/v1/accounts:delete",I)})).apply(this,arguments)}function Wn(){return(Wn=(0,n.Z)(function*(W,I){return bt(W,"POST","/v1/accounts:lookup",I)})).apply(this,arguments)}function Zn(W){if(W)try{const I=new Date(Number(W));if(!isNaN(I.getTime()))return I.toUTCString()}catch{}}function Tr(){return(Tr=(0,n.Z)(function*(W,I=!1){const P=(0,g.m9)(W),J=yield P.getIdToken(I),Ae=pn(J);Se(Ae&&Ae.exp&&Ae.auth_time&&Ae.iat,P.auth,"internal-error");const Xe="object"==typeof Ae.firebase?Ae.firebase:void 0,Dt=Xe?.sign_in_provider;return{claims:Ae,token:J,authTime:Zn(bn(Ae.auth_time)),issuedAtTime:Zn(bn(Ae.iat)),expirationTime:Zn(bn(Ae.exp)),signInProvider:Dt||null,signInSecondFactor:Xe?.sign_in_second_factor||null}})).apply(this,arguments)}function bn(W){return 1e3*Number(W)}function pn(W){const[I,P,J]=W.split(".");if(void 0===I||void 0===P||void 0===J)return pe("JWT malformed, contained fewer than 3 sections"),null;try{const Ae=(0,g.tV)(P);return Ae?JSON.parse(Ae):(pe("Failed to decode base64 JWT payload"),null)}catch(Ae){return pe("Caught error parsing JWT payload as JSON",Ae?.toString()),null}}function Ut(W,I){return xt.apply(this,arguments)}function xt(){return(xt=(0,n.Z)(function*(W,I,P=!1){if(P)return I;try{return yield I}catch(J){throw J instanceof g.ZR&&function qe({code:W}){return"auth/user-disabled"===W||"auth/user-token-expired"===W}(J)&&W.auth.currentUser===W&&(yield W.auth.signOut()),J}})).apply(this,arguments)}class $e{constructor(I){this.user=I,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(I){var P;if(I){const J=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),J}{this.errorBackoff=3e4;const Ae=(null!==(P=this.user.stsTokenManager.expirationTime)&&void 0!==P?P:0)-Date.now()-3e5;return Math.max(0,Ae)}}schedule(I=!1){var P=this;if(!this.isRunning)return;const J=this.getInterval(I);this.timerId=setTimeout((0,n.Z)(function*(){yield P.iteration()}),J)}iteration(){var I=this;return(0,n.Z)(function*(){try{yield I.user.getIdToken(!0)}catch(P){return void("auth/network-request-failed"===P?.code&&I.schedule(!0))}I.schedule()})()}}class T{constructor(I,P){this.createdAt=I,this.lastLoginAt=P,this._initializeTime()}_initializeTime(){this.lastSignInTime=Zn(this.lastLoginAt),this.creationTime=Zn(this.createdAt)}_copy(I){this.createdAt=I.createdAt,this.lastLoginAt=I.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}function F(W){return be.apply(this,arguments)}function be(){return be=(0,n.Z)(function*(W){var I;const P=W.auth,J=yield W.getIdToken(),Ae=yield Ut(W,function un(W,I){return Wn.apply(this,arguments)}(P,{idToken:J}));Se(Ae?.users.length,P,"internal-error");const Xe=Ae.users[0];W._notifyReloadListener(Xe);const Dt=null!==(I=Xe.providerUserInfo)&&void 0!==I&&I.length?function Ur(W){return W.map(I=>{var{providerId:P}=I,J=(0,R._T)(I,["providerId"]);return{providerId:P,uid:J.rawId||"",displayName:J.displayName||null,email:J.email||null,phoneNumber:J.phoneNumber||null,photoURL:J.photoUrl||null}})}(Xe.providerUserInfo):[],cn=function _r(W,I){return[...W.filter(J=>!I.some(Ae=>Ae.providerId===J.providerId)),...I]}(W.providerData,Dt),Kr=!!W.isAnonymous&&!(W.email&&Xe.passwordHash||cn?.length),ki={uid:Xe.localId,displayName:Xe.displayName||null,photoURL:Xe.photoUrl||null,email:Xe.email||null,emailVerified:Xe.emailVerified||!1,phoneNumber:Xe.phoneNumber||null,tenantId:Xe.tenantId||null,providerData:cn,metadata:new T(Xe.createdAt,Xe.lastLoginAt),isAnonymous:Kr};Object.assign(W,ki)}),be.apply(this,arguments)}function Pn(){return(Pn=(0,n.Z)(function*(W){const I=(0,g.m9)(W);yield F(I),yield I.auth._persistUserIfCurrent(I),I.auth._notifyListenersIfCurrent(I)})).apply(this,arguments)}function At(){return(At=(0,n.Z)(function*(W,I){const P=yield Yt(W,{},(0,n.Z)(function*(){const J=(0,g.xO)({grant_type:"refresh_token",refresh_token:I}).slice(1),{tokenApiHost:Ae,apiKey:Xe}=W.config,Dt=gn(W,Ae,"/v1/token",`key=${Xe}`),cn=yield W._getAdditionalHeaders();return cn["Content-Type"]="application/x-www-form-urlencoded",Ge.fetch()(Dt,{method:"POST",headers:cn,body:J})}));return{accessToken:P.access_token,expiresIn:P.expires_in,refreshToken:P.refresh_token}})).apply(this,arguments)}class Xt{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(I){Se(I.idToken,"internal-error"),Se(typeof I.idToken<"u","internal-error"),Se(typeof I.refreshToken<"u","internal-error");const P="expiresIn"in I&&typeof I.expiresIn<"u"?Number(I.expiresIn):function en(W){const I=pn(W);return Se(I,"internal-error"),Se(typeof I.exp<"u","internal-error"),Se(typeof I.iat<"u","internal-error"),Number(I.exp)-Number(I.iat)}(I.idToken);this.updateTokensAndExpiration(I.idToken,I.refreshToken,P)}getToken(I,P=!1){var J=this;return(0,n.Z)(function*(){return Se(!J.accessToken||J.refreshToken,I,"user-token-expired"),P||!J.accessToken||J.isExpired?J.refreshToken?(yield J.refresh(I,J.refreshToken),J.accessToken):null:J.accessToken})()}clearRefreshToken(){this.refreshToken=null}refresh(I,P){var J=this;return(0,n.Z)(function*(){const{accessToken:Ae,refreshToken:Xe,expiresIn:Dt}=yield function Ht(W,I){return At.apply(this,arguments)}(I,P);J.updateTokensAndExpiration(Ae,Xe,Number(Dt))})()}updateTokensAndExpiration(I,P,J){this.refreshToken=P||null,this.accessToken=I||null,this.expirationTime=Date.now()+1e3*J}static fromJSON(I,P){const{refreshToken:J,accessToken:Ae,expirationTime:Xe}=P,Dt=new Xt;return J&&(Se("string"==typeof J,"internal-error",{appName:I}),Dt.refreshToken=J),Ae&&(Se("string"==typeof Ae,"internal-error",{appName:I}),Dt.accessToken=Ae),Xe&&(Se("number"==typeof Xe,"internal-error",{appName:I}),Dt.expirationTime=Xe),Dt}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(I){this.accessToken=I.accessToken,this.refreshToken=I.refreshToken,this.expirationTime=I.expirationTime}_clone(){return Object.assign(new Xt,this.toJSON())}_performRefresh(){return Me("not implemented")}}function sn(W,I){Se("string"==typeof W||typeof W>"u","internal-error",{appName:I})}class wn{constructor(I){var{uid:P,auth:J,stsTokenManager:Ae}=I,Xe=(0,R._T)(I,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new $e(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=P,this.auth=J,this.stsTokenManager=Ae,this.accessToken=Ae.accessToken,this.displayName=Xe.displayName||null,this.email=Xe.email||null,this.emailVerified=Xe.emailVerified||!1,this.phoneNumber=Xe.phoneNumber||null,this.photoURL=Xe.photoURL||null,this.isAnonymous=Xe.isAnonymous||!1,this.tenantId=Xe.tenantId||null,this.providerData=Xe.providerData?[...Xe.providerData]:[],this.metadata=new T(Xe.createdAt||void 0,Xe.lastLoginAt||void 0)}getIdToken(I){var P=this;return(0,n.Z)(function*(){const J=yield Ut(P,P.stsTokenManager.getToken(P.auth,I));return Se(J,P.auth,"internal-error"),P.accessToken!==J&&(P.accessToken=J,yield P.auth._persistUserIfCurrent(P),P.auth._notifyListenersIfCurrent(P)),J})()}getIdTokenResult(I){return function sr(W){return Tr.apply(this,arguments)}(this,I)}reload(){return function Pt(W){return Pn.apply(this,arguments)}(this)}_assign(I){this!==I&&(Se(this.uid===I.uid,this.auth,"internal-error"),this.displayName=I.displayName,this.photoURL=I.photoURL,this.email=I.email,this.emailVerified=I.emailVerified,this.phoneNumber=I.phoneNumber,this.isAnonymous=I.isAnonymous,this.tenantId=I.tenantId,this.providerData=I.providerData.map(P=>Object.assign({},P)),this.metadata._copy(I.metadata),this.stsTokenManager._assign(I.stsTokenManager))}_clone(I){return new wn(Object.assign(Object.assign({},this),{auth:I,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(I){Se(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=I,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(I){this.reloadListener?this.reloadListener(I):this.reloadUserInfo=I}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(I,P=!1){var J=this;return(0,n.Z)(function*(){let Ae=!1;I.idToken&&I.idToken!==J.stsTokenManager.accessToken&&(J.stsTokenManager.updateFromServerResponse(I),Ae=!0),P&&(yield F(J)),yield J.auth._persistUserIfCurrent(J),Ae&&J.auth._notifyListenersIfCurrent(J)})()}delete(){var I=this;return(0,n.Z)(function*(){const P=yield I.getIdToken();return yield Ut(I,function Dn(W,I){return jn.apply(this,arguments)}(I.auth,{idToken:P})),I.stsTokenManager.clearRefreshToken(),I.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(I=>Object.assign({},I)),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(I,P){var J,Ae,Xe,Dt,cn,qn,lr,Kr;const ki=null!==(J=P.displayName)&&void 0!==J?J:void 0,Ho=null!==(Ae=P.email)&&void 0!==Ae?Ae:void 0,zo=null!==(Xe=P.phoneNumber)&&void 0!==Xe?Xe:void 0,pa=null!==(Dt=P.photoURL)&&void 0!==Dt?Dt:void 0,oo=null!==(cn=P.tenantId)&&void 0!==cn?cn:void 0,Gl=null!==(qn=P._redirectEventId)&&void 0!==qn?qn:void 0,Hl=null!==(lr=P.createdAt)&&void 0!==lr?lr:void 0,Oc=null!==(Kr=P.lastLoginAt)&&void 0!==Kr?Kr:void 0,{uid:ma,emailVerified:Pa,isAnonymous:Ma,providerData:cs,stsTokenManager:ti}=P;Se(ma&&ti,I,"internal-error");const fc=Xt.fromJSON(this.name,ti);Se("string"==typeof ma,I,"internal-error"),sn(ki,I.name),sn(Ho,I.name),Se("boolean"==typeof Pa,I,"internal-error"),Se("boolean"==typeof Ma,I,"internal-error"),sn(zo,I.name),sn(pa,I.name),sn(oo,I.name),sn(Gl,I.name),sn(Hl,I.name),sn(Oc,I.name);const Fc=new wn({uid:ma,auth:I,email:Ho,emailVerified:Pa,displayName:ki,isAnonymous:Ma,photoURL:pa,phoneNumber:zo,tenantId:oo,stsTokenManager:fc,createdAt:Hl,lastLoginAt:Oc});return cs&&Array.isArray(cs)&&(Fc.providerData=cs.map(bo=>Object.assign({},bo))),Gl&&(Fc._redirectEventId=Gl),Fc}static _fromIdTokenResponse(I,P,J=!1){return(0,n.Z)(function*(){const Ae=new Xt;Ae.updateFromServerResponse(P);const Xe=new wn({uid:P.localId,auth:I,stsTokenManager:Ae,isAnonymous:J});return yield F(Xe),Xe})()}}const vr=(()=>{class W{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return(0,n.Z)(function*(){return!0})()}_set(P,J){var Ae=this;return(0,n.Z)(function*(){Ae.storage[P]=J})()}_get(P){var J=this;return(0,n.Z)(function*(){const Ae=J.storage[P];return void 0===Ae?null:Ae})()}_remove(P){var J=this;return(0,n.Z)(function*(){delete J.storage[P]})()}_addListener(P,J){}_removeListener(P,J){}}return W.type="NONE",W})();function rt(W,I,P){return`firebase:${W}:${I}:${P}`}class Te{constructor(I,P,J){this.persistence=I,this.auth=P,this.userKey=J;const{config:Ae,name:Xe}=this.auth;this.fullUserKey=rt(this.userKey,Ae.apiKey,Xe),this.fullPersistenceKey=rt("persistence",Ae.apiKey,Xe),this.boundEventHandler=P._onStorageEvent.bind(P),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(I){return this.persistence._set(this.fullUserKey,I.toJSON())}getCurrentUser(){var I=this;return(0,n.Z)(function*(){const P=yield I.persistence._get(I.fullUserKey);return P?wn._fromJSON(I.auth,P):null})()}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(I){var P=this;return(0,n.Z)(function*(){if(P.persistence===I)return;const J=yield P.getCurrentUser();return yield P.removeCurrentUser(),P.persistence=I,J?P.setCurrentUser(J):void 0})()}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(I,P,J="authUser"){return(0,n.Z)(function*(){if(!P.length)return new Te(Ee(vr),I,J);const Ae=(yield Promise.all(P.map(function(){var lr=(0,n.Z)(function*(Kr){if(yield Kr._isAvailable())return Kr});return function(Kr){return lr.apply(this,arguments)}}()))).filter(lr=>lr);let Xe=Ae[0]||Ee(vr);const Dt=rt(J,I.config.apiKey,I.name);let cn=null;for(const lr of P)try{const Kr=yield lr._get(Dt);if(Kr){const ki=wn._fromJSON(I,Kr);lr!==Xe&&(cn=ki),Xe=lr;break}}catch{}const qn=Ae.filter(lr=>lr._shouldAllowMigration);return Xe._shouldAllowMigration&&qn.length?(Xe=qn[0],cn&&(yield Xe._set(Dt,cn.toJSON())),yield Promise.all(P.map(function(){var lr=(0,n.Z)(function*(Kr){if(Kr!==Xe)try{yield Kr._remove(Dt)}catch{}});return function(Kr){return lr.apply(this,arguments)}}())),new Te(Xe,I,J)):new Te(Xe,I,J)})()}}function Ye(W){const I=W.toLowerCase();if(I.includes("opera/")||I.includes("opr/")||I.includes("opios/"))return"Opera";if(nn(I))return"IEMobile";if(I.includes("msie")||I.includes("trident/"))return"IE";if(I.includes("edge/"))return"Edge";if(ft(I))return"Firefox";if(I.includes("silk/"))return"Silk";if(yn(I))return"Blackberry";if(Gn(I))return"Webos";if(dt(I))return"Safari";if((I.includes("chrome/")||Gt(I))&&!I.includes("edge/"))return"Chrome";if(En(I))return"Android";{const J=W.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(2===J?.length)return J[1]}return"Other"}function ft(W=(0,g.z$)()){return/firefox\//i.test(W)}function dt(W=(0,g.z$)()){const I=W.toLowerCase();return I.includes("safari/")&&!I.includes("chrome/")&&!I.includes("crios/")&&!I.includes("android")}function Gt(W=(0,g.z$)()){return/crios\//i.test(W)}function nn(W=(0,g.z$)()){return/iemobile/i.test(W)}function En(W=(0,g.z$)()){return/android/i.test(W)}function yn(W=(0,g.z$)()){return/blackberry/i.test(W)}function Gn(W=(0,g.z$)()){return/webos/i.test(W)}function gt(W=(0,g.z$)()){return/iphone|ipad|ipod/i.test(W)||/macintosh/i.test(W)&&/mobile/i.test(W)}function mt(W=(0,g.z$)()){return gt(W)||En(W)||Gn(W)||yn(W)||/windows phone/i.test(W)||nn(W)}function Cn(W,I=[]){let P;switch(W){case"Browser":P=Ye((0,g.z$)());break;case"Worker":P=`${Ye((0,g.z$)())}-${W}`;break;default:P=W}const J=I.length?I.join(","):"FirebaseCore-web";return`${P}/JsCore/${d.Jn}/${J}`}class tr{constructor(I){this.auth=I,this.queue=[]}pushCallback(I,P){const J=Xe=>new Promise((Dt,cn)=>{try{Dt(I(Xe))}catch(qn){cn(qn)}});J.onAbort=P,this.queue.push(J);const Ae=this.queue.length-1;return()=>{this.queue[Ae]=()=>Promise.resolve()}}runMiddleware(I){var P=this;return(0,n.Z)(function*(){if(P.auth.currentUser===I)return;const J=[];try{for(const Ae of P.queue)yield Ae(I),Ae.onAbort&&J.push(Ae.onAbort)}catch(Ae){J.reverse();for(const Xe of J)try{Xe()}catch{}throw P.auth._errorFactory.create("login-blocked",{originalMessage:Ae?.message})}})()}}class fr{constructor(I,P,J){this.app=I,this.heartbeatServiceProvider=P,this.config=J,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Ct(this),this.idTokenSubscription=new Ct(this),this.beforeStateQueue=new tr(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Y,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=I.name,this.clientVersion=J.sdkClientVersion}_initializeWithPersistence(I,P){var J=this;return P&&(this._popupRedirectResolver=Ee(P)),this._initializationPromise=this.queue((0,n.Z)(function*(){var Ae,Xe;if(!J._deleted&&(J.persistenceManager=yield Te.create(J,I),!J._deleted)){if(null!==(Ae=J._popupRedirectResolver)&&void 0!==Ae&&Ae._shouldInitProactively)try{yield J._popupRedirectResolver._initialize(J)}catch{}yield J.initializeCurrentUser(P),J.lastNotifiedUid=(null===(Xe=J.currentUser)||void 0===Xe?void 0:Xe.uid)||null,!J._deleted&&(J._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){var I=this;return(0,n.Z)(function*(){if(I._deleted)return;const P=yield I.assertedPersistence.getCurrentUser();if(I.currentUser||P){if(I.currentUser&&P&&I.currentUser.uid===P.uid)return I._currentUser._assign(P),void(yield I.currentUser.getIdToken());yield I._updateCurrentUser(P,!0)}})()}initializeCurrentUser(I){var P=this;return(0,n.Z)(function*(){var J;const Ae=yield P.assertedPersistence.getCurrentUser();let Xe=Ae,Dt=!1;if(I&&P.config.authDomain){yield P.getOrInitRedirectPersistenceManager();const cn=null===(J=P.redirectUser)||void 0===J?void 0:J._redirectEventId,qn=Xe?._redirectEventId,lr=yield P.tryRedirectSignIn(I);(!cn||cn===qn)&&lr?.user&&(Xe=lr.user,Dt=!0)}if(!Xe)return P.directlySetCurrentUser(null);if(!Xe._redirectEventId){if(Dt)try{yield P.beforeStateQueue.runMiddleware(Xe)}catch(cn){Xe=Ae,P._popupRedirectResolver._overrideRedirectResult(P,()=>Promise.reject(cn))}return Xe?P.reloadAndSetCurrentUserOrClear(Xe):P.directlySetCurrentUser(null)}return Se(P._popupRedirectResolver,P,"argument-error"),yield P.getOrInitRedirectPersistenceManager(),P.redirectUser&&P.redirectUser._redirectEventId===Xe._redirectEventId?P.directlySetCurrentUser(Xe):P.reloadAndSetCurrentUserOrClear(Xe)})()}tryRedirectSignIn(I){var P=this;return(0,n.Z)(function*(){let J=null;try{J=yield P._popupRedirectResolver._completeRedirectFn(P,I,!0)}catch{yield P._setRedirectUser(null)}return J})()}reloadAndSetCurrentUserOrClear(I){var P=this;return(0,n.Z)(function*(){try{yield F(I)}catch(J){if("auth/network-request-failed"!==J?.code)return P.directlySetCurrentUser(null)}return P.directlySetCurrentUser(I)})()}useDeviceLanguage(){this.languageCode=function st(){if(typeof navigator>"u")return null;const W=navigator;return W.languages&&W.languages[0]||W.language||null}()}_delete(){var I=this;return(0,n.Z)(function*(){I._deleted=!0})()}updateCurrentUser(I){var P=this;return(0,n.Z)(function*(){const J=I?(0,g.m9)(I):null;return J&&Se(J.auth.config.apiKey===P.config.apiKey,P,"invalid-user-token"),P._updateCurrentUser(J&&J._clone(P))})()}_updateCurrentUser(I,P=!1){var J=this;return(0,n.Z)(function*(){if(!J._deleted)return I&&Se(J.tenantId===I.tenantId,J,"tenant-id-mismatch"),P||(yield J.beforeStateQueue.runMiddleware(I)),J.queue((0,n.Z)(function*(){yield J.directlySetCurrentUser(I),J.notifyAuthListeners()}))})()}signOut(){var I=this;return(0,n.Z)(function*(){return yield I.beforeStateQueue.runMiddleware(null),(I.redirectPersistenceManager||I._popupRedirectResolver)&&(yield I._setRedirectUser(null)),I._updateCurrentUser(null,!0)})()}setPersistence(I){var P=this;return this.queue((0,n.Z)(function*(){yield P.assertedPersistence.setPersistence(Ee(I))}))}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(I){this._errorFactory=new g.LL("auth","Firebase",I())}onAuthStateChanged(I,P,J){return this.registerStateListener(this.authStateSubscription,I,P,J)}beforeAuthStateChanged(I,P){return this.beforeStateQueue.pushCallback(I,P)}onIdTokenChanged(I,P,J){return this.registerStateListener(this.idTokenSubscription,I,P,J)}toJSON(){var I;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(I=this._currentUser)||void 0===I?void 0:I.toJSON()}}_setRedirectUser(I,P){var J=this;return(0,n.Z)(function*(){const Ae=yield J.getOrInitRedirectPersistenceManager(P);return null===I?Ae.removeCurrentUser():Ae.setCurrentUser(I)})()}getOrInitRedirectPersistenceManager(I){var P=this;return(0,n.Z)(function*(){if(!P.redirectPersistenceManager){const J=I&&Ee(I)||P._popupRedirectResolver;Se(J,P,"argument-error"),P.redirectPersistenceManager=yield Te.create(P,[Ee(J._redirectPersistence)],"redirectUser"),P.redirectUser=yield P.redirectPersistenceManager.getCurrentUser()}return P.redirectPersistenceManager})()}_redirectUserForId(I){var P=this;return(0,n.Z)(function*(){var J,Ae;return P._isInitialized&&(yield P.queue((0,n.Z)(function*(){}))),(null===(J=P._currentUser)||void 0===J?void 0:J._redirectEventId)===I?P._currentUser:(null===(Ae=P.redirectUser)||void 0===Ae?void 0:Ae._redirectEventId)===I?P.redirectUser:null})()}_persistUserIfCurrent(I){var P=this;return(0,n.Z)(function*(){if(I===P.currentUser)return P.queue((0,n.Z)(function*(){return P.directlySetCurrentUser(I)}))})()}_notifyListenersIfCurrent(I){I===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 I,P;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const J=null!==(P=null===(I=this.currentUser)||void 0===I?void 0:I.uid)&&void 0!==P?P:null;this.lastNotifiedUid!==J&&(this.lastNotifiedUid=J,this.authStateSubscription.next(this.currentUser))}registerStateListener(I,P,J,Ae){if(this._deleted)return()=>{};const Xe="function"==typeof P?P:P.next.bind(P),Dt=this._isInitialized?Promise.resolve():this._initializationPromise;return Se(Dt,this,"internal-error"),Dt.then(()=>Xe(this.currentUser)),"function"==typeof P?I.addObserver(P,J,Ae):I.addObserver(P)}directlySetCurrentUser(I){var P=this;return(0,n.Z)(function*(){P.currentUser&&P.currentUser!==I&&P._currentUser._stopProactiveRefresh(),I&&P.isProactiveRefreshEnabled&&I._startProactiveRefresh(),P.currentUser=I,I?yield P.assertedPersistence.setCurrentUser(I):yield P.assertedPersistence.removeCurrentUser()})()}queue(I){return this.operations=this.operations.then(I,I),this.operations}get assertedPersistence(){return Se(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(I){!I||this.frameworks.includes(I)||(this.frameworks.push(I),this.frameworks.sort(),this.clientVersion=Cn(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){var I=this;return(0,n.Z)(function*(){var P;const J={"X-Client-Version":I.clientVersion};I.app.options.appId&&(J["X-Firebase-gmpid"]=I.app.options.appId);const Ae=yield null===(P=I.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===P?void 0:P.getHeartbeatsHeader();return Ae&&(J["X-Firebase-Client"]=Ae),J})()}}function nr(W){return(0,g.m9)(W)}class Ct{constructor(I){this.auth=I,this.observer=null,this.addObserver=(0,g.ne)(P=>this.observer=P)}get next(){return Se(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function tn(W){const I=W.indexOf(":");return I<0?"":W.substr(0,I+1)}function Er(W){if(!W)return null;const I=Number(W);return isNaN(I)?null:I}class Cr{constructor(I,P){this.providerId=I,this.signInMethod=P}toJSON(){return Me("not implemented")}_getIdTokenResponse(I){return Me("not implemented")}_linkToIdToken(I,P){return Me("not implemented")}_getReauthenticationResolver(I){return Me("not implemented")}}function Dr(W,I){return li.apply(this,arguments)}function li(){return(li=(0,n.Z)(function*(W,I){return bt(W,"POST","/v1/accounts:update",I)})).apply(this,arguments)}function Gr(){return(Gr=(0,n.Z)(function*(W,I){return Et(W,"POST","/v1/accounts:signInWithPassword",$t(W,I))})).apply(this,arguments)}function ni(W,I){return _t.apply(this,arguments)}function _t(){return(_t=(0,n.Z)(function*(W,I){return bt(W,"POST","/v1/accounts:sendOobCode",$t(W,I))})).apply(this,arguments)}function tt(){return(tt=(0,n.Z)(function*(W,I){return ni(W,I)})).apply(this,arguments)}function jt(){return(jt=(0,n.Z)(function*(W,I){return Et(W,"POST","/v1/accounts:signInWithEmailLink",$t(W,I))})).apply(this,arguments)}function $n(){return($n=(0,n.Z)(function*(W,I){return Et(W,"POST","/v1/accounts:signInWithEmailLink",$t(W,I))})).apply(this,arguments)}class er extends Cr{constructor(I,P,J,Ae=null){super("password",J),this._email=I,this._password=P,this._tenantId=Ae}static _fromEmailAndPassword(I,P){return new er(I,P,"password")}static _fromEmailAndCode(I,P,J=null){return new er(I,P,"emailLink",J)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(I){const P="string"==typeof I?JSON.parse(I):I;if(P?.email&&P?.password){if("password"===P.signInMethod)return this._fromEmailAndPassword(P.email,P.password);if("emailLink"===P.signInMethod)return this._fromEmailAndCode(P.email,P.password,P.tenantId)}return null}_getIdTokenResponse(I){var P=this;return(0,n.Z)(function*(){switch(P.signInMethod){case"password":return function Br(W,I){return Gr.apply(this,arguments)}(I,{returnSecureToken:!0,email:P._email,password:P._password});case"emailLink":return function Vt(W,I){return jt.apply(this,arguments)}(I,{email:P._email,oobCode:P._password});default:ve(I,"internal-error")}})()}_linkToIdToken(I,P){var J=this;return(0,n.Z)(function*(){switch(J.signInMethod){case"password":return Dr(I,{idToken:P,returnSecureToken:!0,email:J._email,password:J._password});case"emailLink":return function vn(W,I){return $n.apply(this,arguments)}(I,{idToken:P,email:J._email,oobCode:J._password});default:ve(I,"internal-error")}})()}_getReauthenticationResolver(I){return this._getIdTokenResponse(I)}}function xr(W,I){return Oi.apply(this,arguments)}function Oi(){return(Oi=(0,n.Z)(function*(W,I){return Et(W,"POST","/v1/accounts:signInWithIdp",$t(W,I))})).apply(this,arguments)}function is(){return(is=(0,n.Z)(function*(W,I){return bt(W,"POST","/v1/accounts:sendVerificationCode",$t(W,I))})).apply(this,arguments)}function Vi(){return(Vi=(0,n.Z)(function*(W,I){return Et(W,"POST","/v1/accounts:signInWithPhoneNumber",$t(W,I))})).apply(this,arguments)}function di(){return(di=(0,n.Z)(function*(W,I){const P=yield Et(W,"POST","/v1/accounts:signInWithPhoneNumber",$t(W,I));if(P.temporaryProof)throw cr(W,"account-exists-with-different-credential",P);return P})).apply(this,arguments)}const Ao={USER_NOT_FOUND:"user-not-found"};function ur(){return(ur=(0,n.Z)(function*(W,I){return Et(W,"POST","/v1/accounts:signInWithPhoneNumber",$t(W,Object.assign(Object.assign({},I),{operation:"REAUTH"})),Ao)})).apply(this,arguments)}class pr extends Cr{constructor(I){super("phone","phone"),this.params=I}static _fromVerification(I,P){return new pr({verificationId:I,verificationCode:P})}static _fromTokenResponse(I,P){return new pr({phoneNumber:I,temporaryProof:P})}_getIdTokenResponse(I){return function Wi(W,I){return Vi.apply(this,arguments)}(I,this._makeVerificationRequest())}_linkToIdToken(I,P){return function Pi(W,I){return di.apply(this,arguments)}(I,Object.assign({idToken:P},this._makeVerificationRequest()))}_getReauthenticationResolver(I){return function dr(W,I){return ur.apply(this,arguments)}(I,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:I,phoneNumber:P,verificationId:J,verificationCode:Ae}=this.params;return I&&P?{temporaryProof:I,phoneNumber:P}:{sessionInfo:J,code:Ae}}toJSON(){const I={providerId:this.providerId};return this.params.phoneNumber&&(I.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(I.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(I.verificationCode=this.params.verificationCode),this.params.verificationId&&(I.verificationId=this.params.verificationId),I}static fromJSON(I){"string"==typeof I&&(I=JSON.parse(I));const{verificationId:P,verificationCode:J,phoneNumber:Ae,temporaryProof:Xe}=I;return J||P||Ae||Xe?new pr({verificationId:P,verificationCode:J,phoneNumber:Ae,temporaryProof:Xe}):null}}class Qr{constructor(I){var P,J,Ae,Xe,Dt,cn;const qn=(0,g.zd)((0,g.pd)(I)),lr=null!==(P=qn.apiKey)&&void 0!==P?P:null,Kr=null!==(J=qn.oobCode)&&void 0!==J?J:null,ki=function Yi(W){switch(W){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(Ae=qn.mode)&&void 0!==Ae?Ae:null);Se(lr&&Kr&&ki,"argument-error"),this.apiKey=lr,this.operation=ki,this.code=Kr,this.continueUrl=null!==(Xe=qn.continueUrl)&&void 0!==Xe?Xe:null,this.languageCode=null!==(Dt=qn.languageCode)&&void 0!==Dt?Dt:null,this.tenantId=null!==(cn=qn.tenantId)&&void 0!==cn?cn:null}static parseLink(I){const P=function kr(W){const I=(0,g.zd)((0,g.pd)(W)).link,P=I?(0,g.zd)((0,g.pd)(I)).deep_link_id:null,J=(0,g.zd)((0,g.pd)(W)).deep_link_id;return(J?(0,g.zd)((0,g.pd)(J)).link:null)||J||P||I||W}(I);try{return new Qr(P)}catch{return null}}}let ys=(()=>{class W{constructor(){this.providerId=W.PROVIDER_ID}static credential(P,J){return er._fromEmailAndPassword(P,J)}static credentialWithLink(P,J){const Ae=Qr.parseLink(J);return Se(Ae,"argument-error"),er._fromEmailAndCode(P,Ae.code,Ae.tenantId)}}return W.PROVIDER_ID="password",W.EMAIL_PASSWORD_SIGN_IN_METHOD="password",W.EMAIL_LINK_SIGN_IN_METHOD="emailLink",W})();class ss{constructor(I){this.providerId=I,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(I){this.defaultLanguageCode=I}setCustomParameters(I){return this.customParameters=I,this}getCustomParameters(){return this.customParameters}}class hr extends ss{constructor(){super(...arguments),this.scopes=[]}addScope(I){return this.scopes.includes(I)||this.scopes.push(I),this}getScopes(){return[...this.scopes]}}function Fi(W,I){return $i.apply(this,arguments)}function $i(){return($i=(0,n.Z)(function*(W,I){return Et(W,"POST","/v1/accounts:signUp",$t(W,I))})).apply(this,arguments)}class hi{constructor(I){this.user=I.user,this.providerId=I.providerId,this._tokenResponse=I._tokenResponse,this.operationType=I.operationType}static _fromIdTokenResponse(I,P,J,Ae=!1){return(0,n.Z)(function*(){const Xe=yield wn._fromIdTokenResponse(I,J,Ae),Dt=Ps(J);return new hi({user:Xe,providerId:Dt,_tokenResponse:J,operationType:P})})()}static _forOperation(I,P,J){return(0,n.Z)(function*(){yield I._updateTokensIfNecessary(J,!0);const Ae=Ps(J);return new hi({user:I,providerId:Ae,_tokenResponse:J,operationType:P})})()}}function Ps(W){return W.providerId?W.providerId:"phoneNumber"in W?"phone":null}function Us(W){return Zs.apply(this,arguments)}function Zs(){return(Zs=(0,n.Z)(function*(W){var I;const P=nr(W);if(yield P._initializationPromise,null!==(I=P.currentUser)&&void 0!==I&&I.isAnonymous)return new hi({user:P.currentUser,providerId:null,operationType:"signIn"});const J=yield Fi(P,{returnSecureToken:!0}),Ae=yield hi._fromIdTokenResponse(P,"signIn",J,!0);return yield P._updateCurrentUser(Ae.user),Ae})).apply(this,arguments)}class es extends g.ZR{constructor(I,P,J,Ae){var Xe;super(P.code,P.message),this.operationType=J,this.user=Ae,Object.setPrototypeOf(this,es.prototype),this.customData={appName:I.name,tenantId:null!==(Xe=I.tenantId)&&void 0!==Xe?Xe:void 0,_serverResponse:P.customData._serverResponse,operationType:J}}static _fromErrorAndOperation(I,P,J,Ae){return new es(I,P,J,Ae)}}function _s(W,I,P,J){return("reauthenticate"===I?P._getReauthenticationResolver(W):P._getIdTokenResponse(W)).catch(Xe=>{throw"auth/multi-factor-auth-required"===Xe.code?es._fromErrorAndOperation(W,Xe,I,J):Xe})}function ts(W,I){return Ki.apply(this,arguments)}function Ki(){return(Ki=(0,n.Z)(function*(W,I,P=!1){const J=yield Ut(W,I._linkToIdToken(W.auth,yield W.getIdToken()),P);return hi._forOperation(W,"link",J)})).apply(this,arguments)}function os(W,I){return Zi.apply(this,arguments)}function Zi(){return(Zi=(0,n.Z)(function*(W,I,P=!1){const{auth:J}=W,Ae="reauthenticate";try{const Xe=yield Ut(W,_s(J,Ae,I,W),P);Se(Xe.idToken,J,"internal-error");const Dt=pn(Xe.idToken);Se(Dt,J,"internal-error");const{sub:cn}=Dt;return Se(W.uid===cn,J,"user-mismatch"),hi._forOperation(W,Ae,Xe)}catch(Xe){throw"auth/user-not-found"===Xe?.code&&ve(J,"user-mismatch"),Xe}})).apply(this,arguments)}function no(W,I){return Si.apply(this,arguments)}function Si(){return(Si=(0,n.Z)(function*(W,I,P=!1){const J="signIn",Ae=yield _s(W,J,I),Xe=yield hi._fromIdTokenResponse(W,J,Ae);return P||(yield W._updateCurrentUser(Xe.user)),Xe})).apply(this,arguments)}function Ui(W,I){return Cs.apply(this,arguments)}function Cs(){return(Cs=(0,n.Z)(function*(W,I){return no(nr(W),I)})).apply(this,arguments)}function or(W,I,P){return Sr.apply(this,arguments)}function Sr(){return Sr=(0,n.Z)(function*(W,I,P){const J=(0,g.m9)(W),Ae={requestType:"PASSWORD_RESET",email:I};P&&function Hr(W,I,P){var J;Se((null===(J=P.url)||void 0===J?void 0:J.length)>0,W,"invalid-continue-uri"),Se(typeof P.dynamicLinkDomain>"u"||P.dynamicLinkDomain.length>0,W,"invalid-dynamic-link-domain"),I.continueUrl=P.url,I.dynamicLinkDomain=P.dynamicLinkDomain,I.canHandleCodeInApp=P.handleCodeInApp,P.iOS&&(Se(P.iOS.bundleId.length>0,W,"missing-ios-bundle-id"),I.iOSBundleId=P.iOS.bundleId),P.android&&(Se(P.android.packageName.length>0,W,"missing-android-pkg-name"),I.androidInstallApp=P.android.installApp,I.androidMinimumVersionCode=P.android.minimumVersion,I.androidPackageName=P.android.packageName)}(J,Ae,P),yield function ze(W,I){return tt.apply(this,arguments)}(J,Ae)}),Sr.apply(this,arguments)}function x(W,I,P){return Ui((0,g.m9)(W),ys.credential(I,P))}function rc(W,I,P,J){return(0,g.m9)(W).onAuthStateChanged(I,P,J)}const Wt="__sak";class j{constructor(I,P){this.storageRetriever=I,this.type=P}_isAvailable(){try{return this.storage?(this.storage.setItem(Wt,"1"),this.storage.removeItem(Wt),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(I,P){return this.storage.setItem(I,JSON.stringify(P)),Promise.resolve()}_get(I){const P=this.storage.getItem(I);return Promise.resolve(P?JSON.parse(P):null)}_remove(I){return this.storage.removeItem(I),Promise.resolve()}get storage(){return this.storageRetriever()}}const Kt=(()=>{class W extends j{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(P,J)=>this.onStorageEvent(P,J),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function ge(){const W=(0,g.z$)();return dt(W)||gt(W)}()&&function qt(){try{return!(!window||window===window.top)}catch{return!1}}(),this.fallbackToPolling=mt(),this._shouldAllowMigration=!0}forAllChangedKeys(P){for(const J of Object.keys(this.listeners)){const Ae=this.storage.getItem(J),Xe=this.localCache[J];Ae!==Xe&&P(J,Xe,Ae)}}onStorageEvent(P,J=!1){if(!P.key)return void this.forAllChangedKeys((cn,qn,lr)=>{this.notifyListeners(cn,lr)});const Ae=P.key;if(J?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const cn=this.storage.getItem(Ae);if(P.newValue!==cn)null!==P.newValue?this.storage.setItem(Ae,P.newValue):this.storage.removeItem(Ae);else if(this.localCache[Ae]===P.newValue&&!J)return}const Xe=()=>{const cn=this.storage.getItem(Ae);!J&&this.localCache[Ae]===cn||this.notifyListeners(Ae,cn)},Dt=this.storage.getItem(Ae);!function nt(){return(0,g.w1)()&&10===document.documentMode}()||Dt===P.newValue||P.newValue===P.oldValue?Xe():setTimeout(Xe,10)}notifyListeners(P,J){this.localCache[P]=J;const Ae=this.listeners[P];if(Ae)for(const Xe of Array.from(Ae))Xe(J&&JSON.parse(J))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((P,J,Ae)=>{this.onStorageEvent(new StorageEvent("storage",{key:P,oldValue:J,newValue:Ae}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(P,J){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[P]||(this.listeners[P]=new Set,this.localCache[P]=this.storage.getItem(P)),this.listeners[P].add(J)}_removeListener(P,J){this.listeners[P]&&(this.listeners[P].delete(J),0===this.listeners[P].size&&delete this.listeners[P]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}_set(P,J){var Ae=()=>super._set,Xe=this;return(0,n.Z)(function*(){yield Ae().call(Xe,P,J),Xe.localCache[P]=JSON.stringify(J)})()}_get(P){var J=()=>super._get,Ae=this;return(0,n.Z)(function*(){const Xe=yield J().call(Ae,P);return Ae.localCache[P]=JSON.stringify(Xe),Xe})()}_remove(P){var J=()=>super._remove,Ae=this;return(0,n.Z)(function*(){yield J().call(Ae,P),delete Ae.localCache[P]})()}}return W.type="LOCAL",W})(),In=(()=>{class W extends j{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(P,J){}_removeListener(P,J){}}return W.type="SESSION",W})();let Wr=(()=>{class W{constructor(P){this.eventTarget=P,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(P){const J=this.receivers.find(Xe=>Xe.isListeningto(P));if(J)return J;const Ae=new W(P);return this.receivers.push(Ae),Ae}isListeningto(P){return this.eventTarget===P}handleEvent(P){var J=this;return(0,n.Z)(function*(){const Ae=P,{eventId:Xe,eventType:Dt,data:cn}=Ae.data,qn=J.handlersMap[Dt];if(!qn?.size)return;Ae.ports[0].postMessage({status:"ack",eventId:Xe,eventType:Dt});const lr=Array.from(qn).map(function(){var ki=(0,n.Z)(function*(Ho){return Ho(Ae.origin,cn)});return function(Ho){return ki.apply(this,arguments)}}()),Kr=yield function Vr(W){return Promise.all(W.map(function(){var I=(0,n.Z)(function*(P){try{return{fulfilled:!0,value:yield P}}catch(J){return{fulfilled:!1,reason:J}}});return function(P){return I.apply(this,arguments)}}()))}(lr);Ae.ports[0].postMessage({status:"done",eventId:Xe,eventType:Dt,response:Kr})})()}_subscribe(P,J){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[P]||(this.handlersMap[P]=new Set),this.handlersMap[P].add(J)}_unsubscribe(P,J){this.handlersMap[P]&&J&&this.handlersMap[P].delete(J),(!J||0===this.handlersMap[P].size)&&delete this.handlersMap[P],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}return W.receivers=[],W})();function si(W="",I=10){let P="";for(let J=0;J{const Kr=si("",20);Xe.port1.start();const ki=setTimeout(()=>{lr(new Error("unsupported_event"))},J);cn={messageChannel:Xe,onMessage(Ho){const zo=Ho;if(zo.data.eventId===Kr)switch(zo.data.status){case"ack":clearTimeout(ki),Dt=setTimeout(()=>{lr(new Error("timeout"))},3e3);break;case"done":clearTimeout(Dt),qn(zo.data.response);break;default:clearTimeout(ki),clearTimeout(Dt),lr(new Error("invalid_response"))}}},Ae.handlers.add(cn),Xe.port1.addEventListener("message",cn.onMessage),Ae.target.postMessage({eventType:I,eventId:Kr,data:P},[Xe.port2])}).finally(()=>{cn&&Ae.removeMessageHandler(cn)})})()}}function Fr(){return window}function bi(){return typeof Fr().WorkerGlobalScope<"u"&&"function"==typeof Fr().importScripts}function Nr(){return(Nr=(0,n.Z)(function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch{return null}})).apply(this,arguments)}const Rr="firebaseLocalStorageDb",al=1,ui="firebaseLocalStorage",Ln="fbase_key";class Ro{constructor(I){this.request=I}toPromise(){return new Promise((I,P)=>{this.request.addEventListener("success",()=>{I(this.request.result)}),this.request.addEventListener("error",()=>{P(this.request.error)})})}}function ll(W,I){return W.transaction([ui],I?"readwrite":"readonly").objectStore(ui)}function kl(){const W=indexedDB.open(Rr,al);return new Promise((I,P)=>{W.addEventListener("error",()=>{P(W.error)}),W.addEventListener("upgradeneeded",()=>{const J=W.result;try{J.createObjectStore(ui,{keyPath:Ln})}catch(Ae){P(Ae)}}),W.addEventListener("success",(0,n.Z)(function*(){const J=W.result;J.objectStoreNames.contains(ui)?I(J):(J.close(),yield function ko(){const W=indexedDB.deleteDatabase(Rr);return new Ro(W).toPromise()}(),I(yield kl()))}))})}function $a(W,I,P){return zs.apply(this,arguments)}function zs(){return(zs=(0,n.Z)(function*(W,I,P){const J=ll(W,!0).put({[Ln]:I,value:P});return new Ro(J).toPromise()})).apply(this,arguments)}function Ea(){return(Ea=(0,n.Z)(function*(W,I){const P=ll(W,!1).get(I),J=yield new Ro(P).toPromise();return void 0===J?null:J.value})).apply(this,arguments)}function ul(W,I){const P=ll(W,!0).delete(I);return new Ro(P).toPromise()}const Ca=(()=>{class W{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(){var P=this;return(0,n.Z)(function*(){return P.db||(P.db=yield kl()),P.db})()}_withRetries(P){var J=this;return(0,n.Z)(function*(){let Ae=0;for(;;)try{const Xe=yield J._openDb();return yield P(Xe)}catch(Xe){if(Ae++>3)throw Xe;J.db&&(J.db.close(),J.db=void 0)}})()}initializeServiceWorkerMessaging(){var P=this;return(0,n.Z)(function*(){return bi()?P.initializeReceiver():P.initializeSender()})()}initializeReceiver(){var P=this;return(0,n.Z)(function*(){P.receiver=Wr._getInstance(function Os(){return bi()?self:null}()),P.receiver._subscribe("keyChanged",function(){var J=(0,n.Z)(function*(Ae,Xe){return{keyProcessed:(yield P._poll()).includes(Xe.key)}});return function(Ae,Xe){return J.apply(this,arguments)}}()),P.receiver._subscribe("ping",function(){var J=(0,n.Z)(function*(Ae,Xe){return["keyChanged"]});return function(Ae,Xe){return J.apply(this,arguments)}}())})()}initializeSender(){var P=this;return(0,n.Z)(function*(){var J,Ae;if(P.activeServiceWorker=yield function ms(){return Nr.apply(this,arguments)}(),!P.activeServiceWorker)return;P.sender=new Yr(P.activeServiceWorker);const Xe=yield P.sender._send("ping",{},800);Xe&&null!==(J=Xe[0])&&void 0!==J&&J.fulfilled&&null!==(Ae=Xe[0])&&void 0!==Ae&&Ae.value.includes("keyChanged")&&(P.serviceWorkerReceiverAvailable=!0)})()}notifyServiceWorker(P){var J=this;return(0,n.Z)(function*(){if(J.sender&&J.activeServiceWorker&&function Hn(){var W;return(null===(W=navigator?.serviceWorker)||void 0===W?void 0:W.controller)||null}()===J.activeServiceWorker)try{yield J.sender._send("keyChanged",{key:P},J.serviceWorkerReceiverAvailable?800:50)}catch{}})()}_isAvailable(){return(0,n.Z)(function*(){try{if(!indexedDB)return!1;const P=yield kl();return yield $a(P,Wt,"1"),yield ul(P,Wt),!0}catch{}return!1})()}_withPendingWrite(P){var J=this;return(0,n.Z)(function*(){J.pendingWrites++;try{yield P()}finally{J.pendingWrites--}})()}_set(P,J){var Ae=this;return(0,n.Z)(function*(){return Ae._withPendingWrite((0,n.Z)(function*(){return yield Ae._withRetries(Xe=>$a(Xe,P,J)),Ae.localCache[P]=J,Ae.notifyServiceWorker(P)}))})()}_get(P){var J=this;return(0,n.Z)(function*(){const Ae=yield J._withRetries(Xe=>function cl(W,I){return Ea.apply(this,arguments)}(Xe,P));return J.localCache[P]=Ae,Ae})()}_remove(P){var J=this;return(0,n.Z)(function*(){return J._withPendingWrite((0,n.Z)(function*(){return yield J._withRetries(Ae=>ul(Ae,P)),delete J.localCache[P],J.notifyServiceWorker(P)}))})()}_poll(){var P=this;return(0,n.Z)(function*(){const J=yield P._withRetries(Dt=>{const cn=ll(Dt,!1).getAll();return new Ro(cn).toPromise()});if(!J)return[];if(0!==P.pendingWrites)return[];const Ae=[],Xe=new Set;for(const{fbase_key:Dt,value:cn}of J)Xe.add(Dt),JSON.stringify(P.localCache[Dt])!==JSON.stringify(cn)&&(P.notifyListeners(Dt,cn),Ae.push(Dt));for(const Dt of Object.keys(P.localCache))P.localCache[Dt]&&!Xe.has(Dt)&&(P.notifyListeners(Dt,null),Ae.push(Dt));return Ae})()}notifyListeners(P,J){this.localCache[P]=J;const Ae=this.listeners[P];if(Ae)for(const Xe of Array.from(Ae))Xe(J)}startPolling(){var P=this;this.stopPolling(),this.pollTimer=setInterval((0,n.Z)(function*(){return P._poll()}),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(P,J){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[P]||(this.listeners[P]=new Set,this._get(P)),this.listeners[P].add(J)}_removeListener(P,J){this.listeners[P]&&(this.listeners[P].delete(J),0===this.listeners[P].size&&delete this.listeners[P]),0===Object.keys(this.listeners).length&&this.stopPolling()}}return W.type="LOCAL",W})();function ba(){return(ba=(0,n.Z)(function*(W){return(yield bt(W,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""})).apply(this,arguments)}function Ua(W){return new Promise((I,P)=>{const J=document.createElement("script");J.setAttribute("src",W),J.onload=I,J.onerror=Ae=>{const Xe=Ie("internal-error");Xe.customData=Ae,P(Xe)},J.type="text/javascript",J.charset="UTF-8",function yo(){var W,I;return null!==(I=null===(W=document.getElementsByTagName("head"))||void 0===W?void 0:W[0])&&void 0!==I?I:document}().appendChild(J)})}function js(W){return`__${W}${Math.floor(1e6*Math.random())}`}const vo=1e12;class eo{constructor(I){this.auth=I,this.counter=vo,this._widgets=new Map}render(I,P){const J=this.counter;return this._widgets.set(J,new Ac(I,this.auth.name,P||{})),this.counter++,J}reset(I){var P;const J=I||vo;null===(P=this._widgets.get(J))||void 0===P||P.delete(),this._widgets.delete(J)}getResponse(I){var P;return(null===(P=this._widgets.get(I||vo))||void 0===P?void 0:P.getResponse())||""}execute(I){var P=this;return(0,n.Z)(function*(){var J;return null===(J=P._widgets.get(I||vo))||void 0===J||J.execute(),""})()}}class Ac{constructor(I,P,J){this.params=J,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const Ae="string"==typeof I?document.getElementById(I):I;Se(Ae,"argument-error",{appName:P}),this.container=Ae,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),!this.timerId&&(this.timerId=window.setTimeout(()=>{this.responseToken=function sc(W){const I=[],P="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let J=0;J{if(this.timerId=null,this.responseToken=null,P)try{P()}catch{}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}const _o=js("rcb"),Ws=new Le(3e4,6e4);class Ia{constructor(){var I;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!(null===(I=Fr().grecaptcha)||void 0===I||!I.render)}load(I,P=""){return Se(function Sa(W){return W.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(W)}(P),I,"argument-error"),this.shouldResolveImmediately(P)?Promise.resolve(Fr().grecaptcha):new Promise((J,Ae)=>{const Xe=Fr().setTimeout(()=>{Ae(Ie(I,"network-request-failed"))},Ws.get());Fr()[_o]=()=>{Fr().clearTimeout(Xe),delete Fr()[_o];const cn=Fr().grecaptcha;if(!cn)return void Ae(Ie(I,"internal-error"));const qn=cn.render;cn.render=(lr,Kr)=>{const ki=qn(lr,Kr);return this.counter++,ki},this.hostLanguage=P,J(cn)},Ua(`https://www.google.com/recaptcha/api.js??${(0,g.xO)({onload:_o,render:"explicit",hl:P})}`).catch(()=>{clearTimeout(Xe),Ae(Ie(I,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(I){var P;return!(null===(P=Fr().grecaptcha)||void 0===P||!P.render)&&(I===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class da{load(I){return(0,n.Z)(function*(){return new eo(I)})()}clearedOneInstance(){}}const to="recaptcha",Ga={theme:"light",type:"image"};class Fo{constructor(I,P=Object.assign({},Ga),J){this.parameters=P,this.type=to,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=nr(J),this.isInvisible="invisible"===this.parameters.size,Se(typeof document<"u",this.auth,"operation-not-supported-in-this-environment");const Ae="string"==typeof I?document.getElementById(I):I;Se(Ae,this.auth,"argument-error"),this.container=Ae,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new da:new Ia,this.validateStartingState()}verify(){var I=this;return(0,n.Z)(function*(){I.assertNotDestroyed();const P=yield I.render(),J=I.getAssertedRecaptcha();return J.getResponse(P)||new Promise(Xe=>{const Dt=cn=>{cn&&(I.tokenChangeListeners.delete(Dt),Xe(cn))};I.tokenChangeListeners.add(Dt),I.isInvisible&&J.execute(P)})})()}render(){try{this.assertNotDestroyed()}catch(I){return Promise.reject(I)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(I=>{throw this.renderPromise=null,I})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(I=>{this.container.removeChild(I)})}validateStartingState(){Se(!this.parameters.sitekey,this.auth,"argument-error"),Se(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),Se(typeof document<"u",this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(I){return P=>{if(this.tokenChangeListeners.forEach(J=>J(P)),"function"==typeof I)I(P);else if("string"==typeof I){const J=Fr()[I];"function"==typeof J&&J(P)}}}assertNotDestroyed(){Se(!this.destroyed,this.auth,"internal-error")}makeRenderPromise(){var I=this;return(0,n.Z)(function*(){if(yield I.init(),!I.widgetId){let P=I.container;if(!I.isInvisible){const J=document.createElement("div");P.appendChild(J),P=J}I.widgetId=I.getAssertedRecaptcha().render(P,I.parameters)}return I.widgetId})()}init(){var I=this;return(0,n.Z)(function*(){Se(ue()&&!bi(),I.auth,"internal-error"),yield function wa(){let W=null;return new Promise(I=>{"complete"!==document.readyState?(W=()=>I(),window.addEventListener("load",W)):I()}).catch(I=>{throw W&&window.removeEventListener("load",W),I})}(),I.recaptcha=yield I._recaptchaLoader.load(I.auth,I.auth.languageCode||void 0);const P=yield function Lt(W){return ba.apply(this,arguments)}(I.auth);Se(P,I.auth,"internal-error"),I.parameters.sitekey=P})()}getAssertedRecaptcha(){return Se(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}class Ha{constructor(I,P){this.verificationId=I,this.onConfirmation=P}confirm(I){const P=pr._fromVerification(this.verificationId,I);return this.onConfirmation(P)}}function za(W,I,P){return vi.apply(this,arguments)}function vi(){return(vi=(0,n.Z)(function*(W,I,P){const J=nr(W),Ae=yield function ha(W,I,P){return Li.apply(this,arguments)}(J,I,(0,g.m9)(P));return new Ha(Ae,Xe=>Ui(J,Xe))})).apply(this,arguments)}function Li(){return Li=(0,n.Z)(function*(W,I,P){var J;const Ae=yield P.verify();try{let Xe;if(Se("string"==typeof Ae,W,"argument-error"),Se(P.type===to,W,"argument-error"),Xe="string"==typeof I?{phoneNumber:I}:I,"session"in Xe){const Dt=Xe.session;if("phoneNumber"in Xe)return Se("enroll"===Dt.type,W,"internal-error"),(yield function go(W,I){return bt(W,"POST","/v2/accounts/mfaEnrollment:start",$t(W,I))}(W,{idToken:Dt.credential,phoneEnrollmentInfo:{phoneNumber:Xe.phoneNumber,recaptchaToken:Ae}})).phoneSessionInfo.sessionInfo;{Se("signin"===Dt.type,W,"internal-error");const cn=(null===(J=Xe.multiFactorHint)||void 0===J?void 0:J.uid)||Xe.multiFactorUid;return Se(cn,W,"missing-multi-factor-info"),(yield function Oo(W,I){return bt(W,"POST","/v2/accounts/mfaSignIn:start",$t(W,I))}(W,{mfaPendingCredential:Dt.credential,mfaEnrollmentId:cn,phoneSignInInfo:{recaptchaToken:Ae}})).phoneResponseInfo.sessionInfo}}{const{sessionInfo:Dt}=yield function Ji(W,I){return is.apply(this,arguments)}(W,{phoneNumber:Xe.phoneNumber,recaptchaToken:Ae});return Dt}}finally{P._reset()}}),Li.apply(this,arguments)}class _i extends Cr{constructor(I){super("custom","custom"),this.params=I}_getIdTokenResponse(I){return xr(I,this._buildIdpRequest())}_linkToIdToken(I,P){return xr(I,this._buildIdpRequest(P))}_getReauthenticationResolver(I){return xr(I,this._buildIdpRequest())}_buildIdpRequest(I){const P={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 I&&(P.idToken=I),P}}function Wa(W){return no(W.auth,new _i(W),W.bypassAuthState)}function No(W){const{auth:I,user:P}=W;return Se(P,I,"internal-error"),os(P,new _i(W),W.bypassAuthState)}function $o(W){return rs.apply(this,arguments)}function rs(){return(rs=(0,n.Z)(function*(W){const{auth:I,user:P}=W;return Se(P,I,"internal-error"),ts(P,new _i(W),W.bypassAuthState)})).apply(this,arguments)}class Ys{constructor(I,P,J,Ae,Xe=!1){this.auth=I,this.resolver=J,this.user=Ae,this.bypassAuthState=Xe,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(P)?P:[P]}execute(){var I=this;return new Promise(function(){var P=(0,n.Z)(function*(J,Ae){I.pendingPromise={resolve:J,reject:Ae};try{I.eventManager=yield I.resolver._initialize(I.auth),yield I.onExecution(),I.eventManager.registerConsumer(I)}catch(Xe){I.reject(Xe)}});return function(J,Ae){return P.apply(this,arguments)}}())}onAuthEvent(I){var P=this;return(0,n.Z)(function*(){const{urlResponse:J,sessionId:Ae,postBody:Xe,tenantId:Dt,error:cn,type:qn}=I;if(cn)return void P.reject(cn);const lr={auth:P.auth,requestUri:J,sessionId:Ae,tenantId:Dt||void 0,postBody:Xe||void 0,user:P.user,bypassAuthState:P.bypassAuthState};try{P.resolve(yield P.getIdpTask(qn)(lr))}catch(Kr){P.reject(Kr)}})()}onError(I){this.reject(I)}getIdpTask(I){switch(I){case"signInViaPopup":case"signInViaRedirect":return Wa;case"linkViaPopup":case"linkViaRedirect":return $o;case"reauthViaPopup":case"reauthViaRedirect":return No;default:ve(this.auth,"internal-error")}}resolve(I){et(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(I),this.unregisterAndCleanUp()}reject(I){et(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(I),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}new Le(2e3,1e4);const Tt="pendingRedirect",Jt=new Map;class zn extends Ys{constructor(I,P,J=!1){super(I,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],P,void 0,J),this.eventId=null}execute(){var I=()=>super.execute,P=this;return(0,n.Z)(function*(){let J=Jt.get(P.auth._key());if(!J){try{const Xe=(yield function Kn(W,I){return ei.apply(this,arguments)}(P.resolver,P.auth))?yield I().call(P):null;J=()=>Promise.resolve(Xe)}catch(Ae){J=()=>Promise.reject(Ae)}Jt.set(P.auth._key(),J)}return P.bypassAuthState||Jt.set(P.auth._key(),()=>Promise.resolve(null)),J()})()}onAuthEvent(I){var P=()=>super.onAuthEvent,J=this;return(0,n.Z)(function*(){if("signInViaRedirect"===I.type)return P().call(J,I);if("unknown"!==I.type){if(I.eventId){const Ae=yield J.auth._redirectUserForId(I.eventId);if(Ae)return J.user=Ae,P().call(J,I);J.resolve(null)}}else J.resolve(null)})()}onExecution(){return(0,n.Z)(function*(){})()}cleanUp(){}}function ei(){return(ei=(0,n.Z)(function*(W,I){const P=function Ol(W){return rt(Tt,W.config.apiKey,W.name)}(I),J=function so(W){return Ee(W._redirectPersistence)}(W);if(!(yield J._isAvailable()))return!1;const Ae="true"===(yield J._get(P));return yield J._remove(P),Ae})).apply(this,arguments)}function Eo(W,I){Jt.set(W._key(),I)}function Fl(W,I){return na.apply(this,arguments)}function na(){return(na=(0,n.Z)(function*(W,I,P=!1){const J=nr(W),Ae=function io(W,I){return I?Ee(I):(Se(W._popupRedirectResolver,W,"argument-error"),W._popupRedirectResolver)}(J,I),Dt=yield new zn(J,Ae,P).execute();return Dt&&!P&&(delete Dt.user._redirectEventId,yield J._persistUserIfCurrent(Dt.user),yield J._setRedirectUser(null,I)),Dt})).apply(this,arguments)}class Xu{constructor(I){this.auth=I,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(I){this.consumers.add(I),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,I)&&(this.sendToConsumer(this.queuedRedirectEvent,I),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(I){this.consumers.delete(I)}onEvent(I){if(this.hasEventBeenHandled(I))return!1;let P=!1;return this.consumers.forEach(J=>{this.isEventForConsumer(I,J)&&(P=!0,this.sendToConsumer(I,J),this.saveEventToCache(I))}),this.hasHandledPotentialRedirect||!function Bd(W){switch(W.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Ll(W);default:return!1}}(I)||(this.hasHandledPotentialRedirect=!0,P||(this.queuedRedirectEvent=I,P=!0)),P}sendToConsumer(I,P){var J;if(I.error&&!Ll(I)){const Ae=(null===(J=I.error.code)||void 0===J?void 0:J.split("auth/")[1])||"internal-error";P.onError(Ie(this.auth,Ae))}else P.onAuthEvent(I)}isEventForConsumer(I,P){const J=null===P.eventId||!!I.eventId&&I.eventId===P.eventId;return P.filter.includes(I.type)&&J}hasEventBeenHandled(I){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(Nl(I))}saveEventToCache(I){this.cachedEventUids.add(Nl(I)),this.lastProcessedEventTime=Date.now()}}function Nl(W){return[W.type,W.eventId,W.sessionId,W.tenantId].filter(I=>I).join("-")}function Ll({type:W,error:I}){return"unknown"===W&&"auth/no-auth-event"===I?.code}function Ka(){return(Ka=(0,n.Z)(function*(W,I={}){return bt(W,"GET","/v1/projects",I)})).apply(this,arguments)}const ls=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Ai=/^https?/;function xa(){return xa=(0,n.Z)(function*(W){if(W.config.emulator)return;const{authorizedDomains:I}=yield function as(W){return Ka.apply(this,arguments)}(W);for(const P of I)try{if(Vo(P))return}catch{}ve(W,"unauthorized-domain")}),xa.apply(this,arguments)}function Vo(W){const I=$(),{protocol:P,hostname:J}=new URL(I);if(W.startsWith("chrome-extension://")){const Dt=new URL(W);return""===Dt.hostname&&""===J?"chrome-extension:"===P&&W.replace("chrome-extension://","")===I.replace("chrome-extension://",""):"chrome-extension:"===P&&Dt.hostname===J}if(!Ai.test(P))return!1;if(ls.test(W))return J===W;const Ae=W.replace(/\./g,"\\.");return new RegExp("^(.+\\."+Ae+"|"+Ae+")$","i").test(J)}const ws=new Le(3e4,6e4);function Pc(){const W=Fr().___jsl;if(W?.H)for(const I of Object.keys(W.H))if(W.H[I].r=W.H[I].r||[],W.H[I].L=W.H[I].L||[],W.H[I].r=[...W.H[I].L],W.CP)for(let P=0;P{var J,Ae,Xe;function Dt(){Pc(),gapi.load("gapi.iframes",{callback:()=>{I(gapi.iframes.getContext())},ontimeout:()=>{Pc(),P(Ie(W,"network-request-failed"))},timeout:ws.get()})}if(null!==(Ae=null===(J=Fr().gapi)||void 0===J?void 0:J.iframes)&&void 0!==Ae&&Ae.Iframe)I(gapi.iframes.getContext());else{if(null===(Xe=Fr().gapi)||void 0===Xe||!Xe.load){const cn=js("iframefcb");return Fr()[cn]=()=>{gapi.load?Dt():P(Ie(W,"network-request-failed"))},Ua(`https://apis.google.com/js/api.js?onload=${cn}`).catch(qn=>P(qn))}Dt()}}).catch(I=>{throw Bl=null,I})}(W),Bl}(W),P=Fr().gapi;return Se(P,W,"internal-error"),I.open({where:document.body,url:Qu(W),messageHandlersFilter:P.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:pu,dontclear:!0},J=>new Promise(function(){var Ae=(0,n.Z)(function*(Xe,Dt){yield J.restyle({setHideOnLeave:!1});const cn=Ie(W,"network-request-failed"),qn=Fr().setTimeout(()=>{Dt(cn)},Uo.get());function lr(){Fr().clearTimeout(qn),Xe(J)}J.ping(lr).then(lr,()=>{Dt(cn)})});return function(Xe,Dt){return Ae.apply(this,arguments)}}()))}),pl.apply(this,arguments)}const Xa={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},mu=500,lc=600,cc="_blank",$l="http://localhost";class Go{constructor(I){this.window=I,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}const Qa="__/auth/handler",Co="emulator/auth/handler";function Ja(W,I,P,J,Ae,Xe){Se(W.config.authDomain,W,"auth-domain-config-required"),Se(W.config.apiKey,W,"invalid-api-key");const Dt={apiKey:W.config.apiKey,appName:W.name,authType:P,redirectUrl:J,v:d.Jn,eventId:Ae};if(I instanceof ss){I.setDefaultLanguage(W.languageCode),Dt.providerId=I.providerId||"",(0,g.xb)(I.getCustomParameters())||(Dt.customParameters=JSON.stringify(I.getCustomParameters()));for(const[qn,lr]of Object.entries(Xe||{}))Dt[qn]=lr}if(I instanceof hr){const qn=I.getScopes().filter(lr=>""!==lr);qn.length>0&&(Dt.scopes=qn.join(","))}W.tenantId&&(Dt.tid=W.tenantId);const cn=Dt;for(const qn of Object.keys(cn))void 0===cn[qn]&&delete cn[qn];return`${function uc({config:W}){return W.emulator?ke(W,Co):`https://${W.authDomain}/${Qa}`}(W)}?${(0,g.xO)(cn).slice(1)}`}const el="webStorageSupport",Ul=class Rc{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=In,this._completeRedirectFn=Fl,this._overrideRedirectResult=Eo}_openPopup(I,P,J,Ae){var Xe=this;return(0,n.Z)(function*(){var Dt;et(null===(Dt=Xe.eventManagers[I._key()])||void 0===Dt?void 0:Dt.manager,"_initialize() not called before _openPopup()");const cn=Ja(I,P,J,$(),Ae);return function Hi(W,I,P,J=mu,Ae=lc){const Xe=Math.max((window.screen.availHeight-Ae)/2,0).toString(),Dt=Math.max((window.screen.availWidth-J)/2,0).toString();let cn="";const qn=Object.assign(Object.assign({},Xa),{width:J.toString(),height:Ae.toString(),top:Xe,left:Dt}),lr=(0,g.z$)().toLowerCase();P&&(cn=Gt(lr)?cc:P),ft(lr)&&(I=I||$l,qn.scrollbars="yes");const Kr=Object.entries(qn).reduce((Ho,[zo,pa])=>`${Ho}${zo}=${pa},`,"");if(function He(W=(0,g.z$)()){var I;return gt(W)&&!(null===(I=window.navigator)||void 0===I||!I.standalone)}(lr)&&"_self"!==cn)return function gu(W,I){const P=document.createElement("a");P.href=W,P.target=I;const J=document.createEvent("MouseEvent");J.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),P.dispatchEvent(J)}(I||"",cn),new Go(null);const ki=window.open(I||"",cn,Kr);Se(ki,W,"popup-blocked");try{ki.focus()}catch{}return new Go(ki)}(I,cn,si())})()}_openRedirect(I,P,J,Ae){var Xe=this;return(0,n.Z)(function*(){return yield Xe._originValidation(I),function On(W){Fr().location.href=W}(Ja(I,P,J,$(),Ae)),new Promise(()=>{})})()}_initialize(I){const P=I._key();if(this.eventManagers[P]){const{manager:Ae,promise:Xe}=this.eventManagers[P];return Ae?Promise.resolve(Ae):(et(Xe,"If manager is not set, promise should be"),Xe)}const J=this.initAndGetManager(I);return this.eventManagers[P]={promise:J},J.catch(()=>{delete this.eventManagers[P]}),J}initAndGetManager(I){var P=this;return(0,n.Z)(function*(){const J=yield function Za(W){return pl.apply(this,arguments)}(I),Ae=new Xu(I);return J.register("authEvent",Xe=>(Se(Xe?.authEvent,I,"invalid-auth-event"),{status:Ae.onEvent(Xe.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),P.eventManagers[I._key()]={manager:Ae},P.iframes[I._key()]=J,Ae})()}_isIframeWebStorageSupported(I,P){this.iframes[I._key()].send(el,{type:el},Ae=>{var Xe;const Dt=null===(Xe=Ae?.[0])||void 0===Xe?void 0:Xe[el];void 0!==Dt&&P(!!Dt),ve(I,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(I){const P=I._key();return this.originValidationPromises[P]||(this.originValidationPromises[P]=function fu(W){return xa.apply(this,arguments)}(I)),this.originValidationPromises[P]}get _shouldInitProactively(){return mt()||dt()||gt()}};var Ks="@firebase/auth";class dc{constructor(I){this.auth=I,this.internalListeners=new Map}getUid(){var I;return this.assertAuthConfigured(),(null===(I=this.auth.currentUser)||void 0===I?void 0:I.uid)||null}getToken(I){var P=this;return(0,n.Z)(function*(){return P.assertAuthConfigured(),yield P.auth._initializationPromise,P.auth.currentUser?{accessToken:yield P.auth.currentUser.getIdToken(I)}:null})()}addAuthTokenListener(I){if(this.assertAuthConfigured(),this.internalListeners.has(I))return;const P=this.auth.onIdTokenChanged(J=>{I(J?.stsTokenManager.accessToken||null)});this.internalListeners.set(I,P),this.updateProactiveRefresh()}removeAuthTokenListener(I){this.assertAuthConfigured();const P=this.internalListeners.get(I);P&&(this.internalListeners.delete(I),P(),this.updateProactiveRefresh())}assertAuthConfigured(){Se(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}const tl=(0,g.Pz)("authIdTokenMaxAge")||300;let hc=null;const gl=W=>function(){var I=(0,n.Z)(function*(P){const J=P&&(yield P.getIdTokenResult()),Ae=J&&((new Date).getTime()-Date.parse(J.issuedAtTime))/1e3;if(Ae&&Ae>tl)return;const Xe=J?.token;hc!==Xe&&(hc=Xe,yield fetch(W,{method:Xe?"POST":"DELETE",headers:Xe?{Authorization:`Bearer ${Xe}`}:{}}))});return function(P){return I.apply(this,arguments)}}();function _u(W=(0,d.Mq)()){const I=(0,d.qX)(W,"auth");if(I.isInitialized())return I.getImmediate();const P=function ae(W,I){const P=(0,d.qX)(W,"auth");if(P.isInitialized()){const Ae=P.getImmediate(),Xe=P.getOptions();if((0,g.vZ)(Xe,I??{}))return Ae;ve(Ae,"already-initialized")}return P.initialize({options:I})}(W,{popupRedirectResolver:Ul,persistence:[Ca,Kt,In]}),J=(0,g.Pz)("authTokenSyncURL");if(J){const Xe=gl(J);(function Va(W,I,P){(0,g.m9)(W).beforeAuthStateChanged(I,P)})(P,Xe,()=>Xe(P.currentUser)),function Ml(W,I,P,J){(0,g.m9)(W).onIdTokenChanged(I,P,J)}(P,Dt=>Xe(Dt))}const Ae=(0,g.q4)("auth");return Ae&&function zt(W,I,P){const J=nr(W);Se(J._canInitEmulator,J,"emulator-config-failed"),Se(/^https?:\/\//.test(I),J,"invalid-emulator-scheme");const Ae=!!P?.disableWarnings,Xe=tn(I),{host:Dt,port:cn}=function xn(W){const I=tn(W),P=/(\/\/)?([^?#/]+)/.exec(W.substr(I.length));if(!P)return{host:"",port:null};const J=P[2].split("@").pop()||"",Ae=/^(\[[^\]]+\])(:|$)/.exec(J);if(Ae){const Xe=Ae[1];return{host:Xe,port:Er(J.substr(Xe.length+1))}}{const[Xe,Dt]=J.split(":");return{host:Xe,port:Er(Dt)}}}(I);J.config.emulator={url:`${Xe}//${Dt}${null===cn?"":`:${cn}`}/`},J.settings.appVerificationDisabledForTesting=!0,J.emulatorConfig=Object.freeze({host:Dt,port:cn,protocol:Xe.replace(":",""),options:Object.freeze({disableWarnings:Ae})}),Ae||function Bn(){function W(){const I=document.createElement("p"),P=I.style;I.innerText="Running in emulator mode. Do not use with production credentials.",P.position="fixed",P.width="100%",P.backgroundColor="#ffffff",P.border=".1em solid #000000",P.color="#b50000",P.bottom="0px",P.left="0px",P.margin="0px",P.zIndex="10000",P.textAlign="center",I.classList.add("firebase-emulator-warning"),document.body.appendChild(I)}typeof console<"u"&&"function"==typeof console.info&&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"&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",W):W())}()}(P,`http://${Ae}`),P}!function xi(W){(0,d.Xd)(new O.wA("auth",(I,{options:P})=>{const J=I.getProvider("app").getImmediate(),Ae=I.getProvider("heartbeat"),{apiKey:Xe,authDomain:Dt}=J.options;return((cn,qn)=>{Se(Xe&&!Xe.includes(":"),"invalid-api-key",{appName:cn.name}),Se(!Dt?.includes(":"),"argument-error",{appName:cn.name});const lr={apiKey:Xe,authDomain:Dt,clientPlatform:W,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Cn(W)},Kr=new fr(cn,qn,lr);return function me(W,I){const P=I?.persistence||[],J=(Array.isArray(P)?P:[P]).map(Ee);I?.errorMap&&W._updateErrorMap(I.errorMap),W._initializeWithPersistence(J,I?.popupRedirectResolver)}(Kr,P),Kr})(J,Ae)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((I,P,J)=>{I.getProvider("auth-internal").initialize()})),(0,d.Xd)(new O.wA("auth-internal",I=>{const P=nr(I.getProvider("auth").getImmediate());return new dc(P)},"PRIVATE").setInstantiationMode("EXPLICIT")),(0,d.KN)(Ks,"0.21.4",function kc(W){switch(W){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(W)),(0,d.KN)(Ks,"0.21.4","esm2017")}("Browser")},2577:(o,c,u)=>{"use strict";u.d(c,{F8:()=>Yf,EK:()=>Nr,ET:()=>Lr,hJ:()=>Mg,oe:()=>a_,JU:()=>Em,QT:()=>Ku,kl:()=>tv,Xk:()=>Nd,zN:()=>o_,ad:()=>bm,b9:()=>Yy,cf:()=>nv,Xo:()=>jg,IO:()=>xm,pl:()=>ty,TQ:()=>Ky,r7:()=>ny,ar:()=>zg});var U,n=u(5861),g=u(3847),d=u(3272),A=u(1877),R=u(9572),O=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},N={},ie=ie||{},L=O||self;function ee(){}function K(s){var e=typeof s;return"array"==(e="object"!=e?e:s?Array.isArray(s)?"array":e:"null")||"object"==e&&"number"==typeof s.length}function z(s){var e=typeof s;return"object"==e&&null!=s||"function"==e}var X="closure_uid_"+(1e9*Math.random()>>>0),Y=0;function G(s,e,t){return s.call.apply(s.bind,arguments)}function te(s,e,t){if(!s)throw Error();if(2e?1:0}function $(){var s=L.navigator;return s&&(s=s.userAgent)?s:""}function ue(s){return-1!=$().indexOf(s)}function Qe(s){return Qe[" "](s),s}Qe[" "]=ee;var bt,s,st=ue("Opera"),Le=ue("Trident")||ue("MSIE"),ke=ue("Edge"),Ge=ke||Le,ut=ue("Gecko")&&!(-1!=$().toLowerCase().indexOf("webkit")&&!ue("Edge"))&&!(ue("Trident")||ue("MSIE"))&&!ue("Edge"),pt=-1!=$().toLowerCase().indexOf("webkit")&&!ue("Edge");function $t(){var s=L.document;return s?s.documentMode:void 0}e:{var St="",Yt=(s=$(),ut?/rv:([^\);]+)(\)|;)/.exec(s):ke?/Edge\/([\d\.]+)/.exec(s):Le?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(s):pt?/WebKit\/(\S+)/.exec(s):st?/(?:Version)[ \/]?(\S+)/.exec(s):void 0);if(Yt&&(St=Yt?Yt[1]:""),Le){var kt=$t();if(null!=kt&&kt>parseFloat(St)){bt=String(kt);break e}}bt=St}var Et={};var cr=L.document&&Le&&($t()||parseInt(bt,10))||void 0;function Dn(s,e){if(et.call(this,s?s.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,s){var t=this.type=s.type,l=s.changedTouches&&s.changedTouches.length?s.changedTouches[0]:null;if(this.target=s.target||s.srcElement,this.g=e,e=s.relatedTarget){if(ut){e:{try{Qe(e.nodeName);var m=!0;break e}catch{}m=!1}m||(e=null)}}else"mouseover"==t?e=s.fromElement:"mouseout"==t&&(e=s.toElement);this.relatedTarget=e,l?(this.clientX=void 0!==l.clientX?l.clientX:l.pageX,this.clientY=void 0!==l.clientY?l.clientY:l.pageY,this.screenX=l.screenX||0,this.screenY=l.screenY||0):(this.clientX=void 0!==s.clientX?s.clientX:s.pageX,this.clientY=void 0!==s.clientY?s.clientY:s.pageY,this.screenX=s.screenX||0,this.screenY=s.screenY||0),this.button=s.button,this.key=s.key||"",this.ctrlKey=s.ctrlKey,this.altKey=s.altKey,this.shiftKey=s.shiftKey,this.metaKey=s.metaKey,this.pointerId=s.pointerId||0,this.pointerType="string"==typeof s.pointerType?s.pointerType:jn[s.pointerType]||"",this.state=s.state,this.i=s,s.defaultPrevented&&Dn.X.h.call(this)}}Ie(Dn,et);var jn={2:"touch",3:"pen",4:"mouse"};Dn.prototype.h=function(){Dn.X.h.call(this);var s=this.i;s.preventDefault?s.preventDefault():s.returnValue=!1};var Mn="closure_listenable_"+(1e6*Math.random()|0),Fn=0;function un(s,e,t,l,m){this.listener=s,this.proxy=null,this.src=e,this.type=t,this.capture=!!l,this.ha=m,this.key=++Fn,this.ba=this.ea=!1}function Wn(s){s.ba=!0,s.listener=null,s.proxy=null,s.src=null,s.ha=null}function Zn(s,e,t){for(const l in s)e.call(t,s[l],l,s)}function Vn(s){const e={};for(const t in s)e[t]=s[t];return e}const sr="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Tr(s,e){let t,l;for(let m=1;m>>0);function At(s){return"function"==typeof s?s:(s[Ht]||(s[Ht]=function(e){return s.handleEvent(e)}),s[Ht])}function Xt(){we.call(this),this.i=new bn(this),this.P=this,this.I=null}function sn(s,e){var t,l=s.I;if(l)for(t=[];l;l=l.I)t.push(l);if(s=s.P,l=e.type||e,"string"==typeof e)e=new et(e,s);else if(e instanceof et)e.target=e.target||s;else{var m=e;Tr(e=new et(l,s),m)}if(m=!0,t)for(var E=t.length-1;0<=E;E--){var D=e.g=t[E];m=wn(D,l,!0,e)&&m}if(m=wn(D=e.g=s,l,!0,e)&&m,m=wn(D,l,!1,e)&&m,t)for(E=0;Enew Ye,s=>s.reset());class Ye{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}function ft(s){L.setTimeout(()=>{throw s},0)}function dt(s,e){Gt||function nn(){var s=L.Promise.resolve(void 0);Gt=function(){s.then(Gn)}}(),En||(Gt(),En=!0),yn.add(s,e)}var En=!1,yn=new class rt{constructor(){this.h=this.g=null}add(e,t){const l=Te.get();l.set(e,t),this.h?this.h.next=l:this.g=l,this.h=l}};function Gn(){for(var s;s=vr();){try{s.h.call(s.g)}catch(t){ft(t)}var e=Te;e.j(s),100>e.h&&(e.h++,s.next=e.g,e.g=s)}En=!1}function gt(s,e){Xt.call(this),this.h=s||1,this.g=e||L,this.j=pe(this.lb,this),this.l=Date.now()}function lt(s){s.ca=!1,s.R&&(s.g.clearTimeout(s.R),s.R=null)}function He(s,e,t){if("function"==typeof s)t&&(s=pe(s,t));else{if(!s||"function"!=typeof s.handleEvent)throw Error("Invalid listener argument");s=pe(s.handleEvent,s)}return 2147483647{s.g=null,s.i&&(s.i=!1,nt(s))},s.j);const e=s.h;s.h=null,s.m.apply(null,e)}Ie(gt,Xt),(U=gt.prototype).ca=!1,U.R=null,U.lb=function(){if(this.ca){var s=Date.now()-this.l;0l.length)){var m=l[1];if(Array.isArray(m)&&!(1>m.length)){var E=m[0];if("noop"!=E&&"stop"!=E&&"close"!=E)for(var D=1;De.length?$n:(e=e.substr(l,t),s.C=l+t,e))}function Ji(s){s.V=Date.now()+s.O,is(s,s.O)}function is(s,e){if(null!=s.B)throw Error("WatchDog timer not null");s.B=Br(pe(s.gb,s),e)}function Wi(s){s.B&&(L.clearTimeout(s.B),s.B=null)}function Vi(s){0==s.l.G||s.I||Rs(s.l,s)}function Pi(s){Wi(s);var e=s.L;e&&"function"==typeof e.na&&e.na(),s.L=null,lt(s.T),fr(s.S),s.g&&(e=s.g,s.g=null,e.abort(),e.na())}function di(s,e){try{var t=s.l;if(0!=t.G&&(t.g==s||Ki(t.h,s)))if(!s.J&&Ki(t.h,s)&&3==t.G){try{var l=t.Fa.g.parse(e)}catch{l=null}if(Array.isArray(l)&&3==l.length){var m=l;if(0==m[0]){e:if(!t.u){if(t.g){if(!(t.g.F+3e3m[2]&&t.L&&0==t.A&&!t.v&&(t.v=Br(pe(t.cb,t),6e3));if(1>=ts(t.h)&&t.ja){try{t.ja()}catch{}t.ja=void 0}}else fi(t,11)}else if((s.J||t.g==s)&&Ti(t),!Ee(e))for(m=t.Fa.g.parse(e),e=0;eje)&&(3!=je||Ge||this.g&&(this.h.h||this.g.fa()||Ri(this.g)))){this.I||4!=je||7==e||Dr(),Wi(this);var t=this.g.aa();this.Y=t;t:if(Oi(this)){var l=Ri(this.g);s="";var m=l.length,E=4==wi(this.g);if(!this.h.i){if(typeof TextDecoder>"u"){Pi(this),Vi(this);var D="";break t}this.h.i=new L.TextDecoder}for(e=0;ee)throw Error("Bad port number "+e);s.m=e}else s.m=null}function ss(s,e,t){e instanceof Fi?(s.i=e,function es(s,e){e&&!s.j&&($i(s),s.i=null,s.g.forEach(function(t,l){var m=l.toLowerCase();l!=m&&(hi(this,l),Us(this,m,t))},s)),s.j=e}(s.i,s.h)):(t||(e=vs(e,$s)),s.i=new Fi(e,s.h))}function hr(s,e,t){s.i.set(e,t)}function br(s){return hr(s,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),s}function gi(s,e){return s?e?decodeURI(s.replace(/%25/g,"%2525")):decodeURIComponent(s):""}function vs(s,e,t){return"string"==typeof s?(s=encodeURI(s).replace(e,uo),t&&(s=s.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),s):null}function uo(s){return"%"+((s=s.charCodeAt(0))>>4&15).toString(16)+(15&s).toString(16)}kr.prototype.toString=function(){var s=[],e=this.j;e&&s.push(vs(e,Mi,!0),":");var t=this.g;return(t||"file"==e)&&(s.push("//"),(e=this.s)&&s.push(vs(e,Mi,!0),"@"),s.push(encodeURIComponent(String(t)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.m)&&s.push(":",String(t))),(t=this.l)&&(this.g&&"/"!=t.charAt(0)&&s.push("/"),s.push(vs(t,"/"==t.charAt(0)?fs:qs,!0))),(t=this.i.toString())&&s.push("?",t),(t=this.o)&&s.push("#",vs(t,Zo)),s.join("")};var Mi=/[#\/\?@]/g,qs=/[#\?:]/g,fs=/[#\?]/g,$s=/[#\?@]/g,Zo=/#/g;function Fi(s,e){this.h=this.g=null,this.i=s||null,this.j=!!e}function $i(s){s.g||(s.g=new Map,s.h=0,s.i&&function Yi(s,e){if(s){s=s.split("&");for(var t=0;t=s.j}function ts(s){return s.h?1:s.g?s.g.size:0}function Ki(s,e){return s.h?s.h==e:!!s.g&&s.g.has(e)}function qi(s,e){s.g?s.g.add(e):s.h=e}function Ii(s,e){s.h&&s.h==e?s.h=null:s.g&&s.g.has(e)&&s.g.delete(e)}function os(s){if(null!=s.h)return s.i.concat(s.h.D);if(null!=s.g&&0!==s.g.size){let e=s.i;for(const t of s.g.values())e=e.concat(t.D);return e}return Se(s.i)}function Zi(){}function no(){this.g=new Zi}function Si(s,e,t){const l=t||"";try{ur(s,function(m,E){let D=m;z(m)&&(D=kn(m)),e.push(l+E+"="+encodeURIComponent(D))})}catch(m){throw e.push(l+"type="+encodeURIComponent("_badmap")),m}}function Cs(s,e,t,l,m){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,m(l)}catch{}}function ns(s){this.l=s.ac||null,this.j=s.jb||!1}function Ue(s,e){Xt.call(this),this.D=s,this.u=e,this.m=void 0,this.readyState=Ke,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}ps.prototype.cancel=function(){if(this.i=os(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const s of this.g.values())s.cancel();this.g.clear()}},Zi.prototype.stringify=function(s){return L.JSON.stringify(s,void 0)},Zi.prototype.parse=function(s){return L.JSON.parse(s,void 0)},Ie(ns,_t),ns.prototype.g=function(){return new Ue(this.l,this.j)},ns.prototype.i=function(s){return function(){return s}}({}),Ie(Ue,Xt);var Ke=0;function yt(s){s.j.read().then(s.Ta.bind(s)).catch(s.ga.bind(s))}function Rt(s){s.readyState=4,s.l=null,s.j=null,s.A=null,rn(s)}function rn(s){s.onreadystatechange&&s.onreadystatechange.call(s)}(U=Ue.prototype).open=function(s,e){if(this.readyState!=Ke)throw this.abort(),Error("Error reopening a connection");this.C=s,this.B=e,this.readyState=1,rn(this)},U.send=function(s){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};s&&(e.body=s),(this.D||L).fetch(new Request(this.B,e)).then(this.Wa.bind(this),this.ga.bind(this))},U.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,Rt(this)),this.readyState=Ke},U.Wa=function(s){if(this.g&&(this.l=s,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=s.headers,this.readyState=2,rn(this)),this.g&&(this.readyState=3,rn(this),this.g)))if("arraybuffer"===this.responseType)s.arrayBuffer().then(this.Ua.bind(this),this.ga.bind(this));else if(typeof L.ReadableStream<"u"&&"body"in s){if(this.j=s.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;yt(this)}else s.text().then(this.Va.bind(this),this.ga.bind(this))},U.Ta=function(s){if(this.g){if(this.u&&s.value)this.response.push(s.value);else if(!this.u){var e=s.value?s.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!s.done}))&&(this.response=this.responseText+=e)}s.done?Rt(this):rn(this),3==this.readyState&&yt(this)}},U.Va=function(s){this.g&&(this.response=this.responseText=s,Rt(this))},U.Ua=function(s){this.g&&(this.response=s,Rt(this))},U.ga=function(){this.g&&Rt(this)},U.setRequestHeader=function(s,e){this.v.append(s,e)},U.getResponseHeader=function(s){return this.h&&this.h.get(s.toLowerCase())||""},U.getAllResponseHeaders=function(){if(!this.h)return"";const s=[],e=this.h.entries();for(var t=e.next();!t.done;)s.push((t=t.value)[0]+": "+t[1]),t=e.next();return s.join("\r\n")},Object.defineProperty(Ue.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(s){this.m=s?"include":"same-origin"}});var Tn=L.JSON.parse;function An(s){Xt.call(this),this.headers=new Map,this.u=s||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=Or,this.K=this.L=!1}Ie(An,Xt);var Or="",ci=/^https?$/i,Hr=["POST","PUT"];function Sr(s,e){s.h=!1,s.g&&(s.l=!0,s.g.abort(),s.l=!1),s.j=e,s.m=5,Ms(s),ar(s)}function Ms(s){s.D||(s.D=!0,sn(s,"complete"),sn(s,"error"))}function Ci(s){if(s.h&&typeof ie<"u"&&(!s.C[1]||4!=wi(s)||2!=s.aa()))if(s.v&&4==wi(s))He(s.Ha,0,s);else if(sn(s,"readystatechange"),4==wi(s)){s.h=!1;try{const q=s.aa();e:switch(q){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e=!0;break e;default:e=!1}var t;if(!(t=e)){var l;if(l=0===q){var m=String(s.H).match(pr)[1]||null;if(!m&&L.self&&L.self.location){var E=L.self.location.protocol;m=E.substr(0,E.length-1)}l=!ci.test(m?m.toLowerCase():"")}t=l}if(t)sn(s,"complete"),sn(s,"success");else{s.m=6;try{var D=2Ce)E=Math.max(0,m[fe].h-100),q=!1;else try{Si(je,D,"req"+Ce+"_")}catch{l&&l(je)}}if(q){l=D.join("&");break e}}}return s=s.i.splice(0,t),e.D=s,l}function Yn(s){s.g||s.u||(s.Z=1,dt(s.Ia,s),s.A=0)}function Pr(s){return!(s.g||s.u||3<=s.A||(s.Z++,s.u=Br(pe(s.Ia,s),yi(s,s.A)),s.A++,0))}function Zr(s){null!=s.B&&(L.clearTimeout(s.B),s.B=null)}function ii(s){s.g=new Mt(s,s.j,"rpc",s.Z),null===s.o&&(s.g.H=s.s),s.g.N=0;var e=Qr(s.sa);hr(e,"RID","rpc"),hr(e,"SID",s.I),hr(e,"CI",s.L?"0":"1"),hr(e,"AID",s.T),hr(e,"TYPE","xmlhttp"),Ot(s,e),s.o&&s.s&&ho(e,s.o,s.s),s.J&&s.g.setTimeout(s.J);var t=s.g;s=s.ka,t.K=1,t.v=br(Qr(e)),t.s=null,t.P=!0,xr(t,s)}function Ti(s){null!=s.v&&(L.clearTimeout(s.v),s.v=null)}function Rs(s,e){var t=null;if(s.g==e){Ti(s),Zr(s),s.g=null;var l=2}else{if(!Ki(s.h,e))return;t=e.D,Ii(s.h,e),l=1}if(0!=s.G)if(s.pa=e.Y,e.i)if(1==l){t=e.s?e.s.length:0,e=Date.now()-e.F;var m=s.C;sn(l=Ar(),new rr(l,t)),S(s)}else Yn(s);else if(3==(m=e.o)||0==m&&0=s.h.j-(s.m?1:0)||(s.m?(s.i=e.D.concat(s.i),0):1==s.G||2==s.G||s.C>=(s.Za?0:s.$a)||(s.m=Br(pe(s.Ja,s,e),yi(s,s.C)),s.C++,0)))}(s,e)||2==l&&Pr(s)))switch(t&&0"content-type"==E.toLowerCase()),m=L.FormData&&s instanceof L.FormData,!(0<=We(Hr,e))||l||m||t.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[E,D]of t)this.g.setRequestHeader(E,D);this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{bs(this),0=this.P)){var s=2*this.P;this.j.info("BP detection timer enabled: "+s),this.B=Br(pe(this.eb,this),s)}},U.eb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.L=!1,this.K=!0,mn(10),w(this),ii(this))},U.cb=function(){null!=this.v&&(this.v=null,w(this),Pr(this),mn(19))},U.kb=function(s){s?(this.j.info("Successfully pinged google.com"),mn(2)):(this.j.info("Failed to ping google.com"),mn(1))},(U=Al.prototype).xa=function(){},U.wa=function(){},U.va=function(){},U.ua=function(){},U.Ra=function(){},po.prototype.g=function(s,e){return new ks(s,e)},Ie(ks,Xt),ks.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.H=!0);var s=this.g,e=this.l,t=this.h||void 0;mn(0),s.V=e,s.ia=t||{},s.L=s.Y,s.F=fo(s,null,s.V),S(s)},ks.prototype.close=function(){x(this.g)},ks.prototype.u=function(s){var e=this.g;if("string"==typeof s){var t={};t.__data__=s,s=t}else this.v&&((t={}).__data__=kn(s),s=t);e.i.push(new class{constructor(s,e){this.h=s,this.g=e}}(e.ab++,s)),3==e.G&&S(e)},ks.prototype.M=function(){this.g.l=null,delete this.j,x(this.g),delete this.g,ks.X.M.call(this)},Ie(xl,tt),Ie(Xs,Pe),Ie(xo,Al),xo.prototype.xa=function(){sn(this.g,"a")},xo.prototype.wa=function(s){sn(this.g,new xl(s))},xo.prototype.va=function(s){sn(this.g,new Xs)},xo.prototype.ua=function(){sn(this.g,"b")},po.prototype.createWebChannel=po.prototype.g,ks.prototype.send=ks.prototype.u,ks.prototype.open=ks.prototype.m,ks.prototype.close=ks.prototype.close,Gr.NO_ERROR=0,Gr.TIMEOUT=8,Gr.HTTP_ERROR=6,ni.COMPLETE="complete",ye.EventType=ze,ze.OPEN="a",ze.CLOSE="b",ze.ERROR="c",ze.MESSAGE="d",Xt.prototype.listen=Xt.prototype.N,An.prototype.listenOnce=An.prototype.O,An.prototype.getLastError=An.prototype.Oa,An.prototype.getLastErrorCode=An.prototype.Ea,An.prototype.getStatus=An.prototype.aa,An.prototype.getResponseJson=An.prototype.Sa,An.prototype.getResponseText=An.prototype.fa,An.prototype.send=An.prototype.da,An.prototype.setWithCredentials=An.prototype.Ka;var va=N.createWebChannelTransport=function(){return new po},mo=N.getStatEventTarget=function(){return Ar()},Xo=N.ErrorCode=Gr,Ba=N.EventType=ni,_a=N.Event=Bn,Pl=N.Stat={sb:0,vb:1,wb:2,Pb:3,Ub:4,Rb:5,Sb:6,Qb:7,Ob:8,Tb:9,PROXY:10,NOPROXY:11,Mb:12,Ib:13,Jb:14,Hb:15,Kb:16,Lb:17,ob:18,nb:19,pb:20},Ml=N.FetchXmlHttpFactory=ns,Va=N.WebChannel=ye,rc=N.XhrIo=An;const Rl="@firebase/firestore";class pi{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}pi.UNAUTHENTICATED=new pi(null),pi.GOOGLE_CREDENTIALS=new pi("google-credentials-uid"),pi.FIRST_PARTY=new pi("first-party-uid"),pi.MOCK_USER=new pi("mock-user");let Qo="9.17.2";const Ni=new A.Yd("@firebase/firestore");function Hs(){return Ni.logLevel}function fn(s,...e){if(Ni.logLevel<=A.in.DEBUG){const t=e.map(Po);Ni.debug(`Firestore (${Qo}): ${s}`,...t)}}function Di(s,...e){if(Ni.logLevel<=A.in.ERROR){const t=e.map(Po);Ni.error(`Firestore (${Qo}): ${s}`,...t)}}function go(s,...e){if(Ni.logLevel<=A.in.WARN){const t=e.map(Po);Ni.warn(`Firestore (${Qo}): ${s}`,...t)}}function Po(s){if("string"==typeof s)return s;try{return JSON.stringify(s)}catch{return s}}function Qn(s="Unexpected state"){const e=`FIRESTORE (${Qo}) INTERNAL ASSERTION FAILED: `+s;throw Di(e),new Error(e)}function ir(s,e){s||Qn()}function Nn(s,e){return s}const Wt={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class j extends R.ZR{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class ge{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}class oe{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class Re{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(pi.UNAUTHENTICATED))}shutdown(){}}class ct{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class Kt{constructor(e){this.t=e,this.currentUser=pi.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){var l=this;let m=this.i;const E=Ce=>this.i!==m?(m=this.i,t(Ce)):Promise.resolve();let D=new ge;this.o=()=>{this.i++,this.currentUser=this.u(),D.resolve(),D=new ge,e.enqueueRetryable(()=>E(this.currentUser))};const q=()=>{const Ce=D;e.enqueueRetryable((0,n.Z)(function*(){yield Ce.promise,yield E(l.currentUser)}))},fe=Ce=>{fn("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=Ce,this.auth.addAuthTokenListener(this.o),q()};this.t.onInit(Ce=>fe(Ce)),setTimeout(()=>{if(!this.auth){const Ce=this.t.getImmediate({optional:!0});Ce?fe(Ce):(fn("FirebaseAuthCredentialsProvider","Auth not yet detected"),D.resolve(),D=new ge)}},0),q()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(l=>this.i!==e?(fn("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):l?(ir("string"==typeof l.accessToken),new oe(l.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return ir(null===e||"string"==typeof e),new pi(e)}}class ln{constructor(e,t,l,m){this.h=e,this.l=t,this.m=l,this.g=m,this.type="FirstParty",this.user=pi.FIRST_PARTY,this.p=new Map}I(){return this.g?this.g():(ir(!("object"!=typeof this.h||null===this.h||!this.h.auth||!this.h.auth.getAuthHeaderValueForFirstParty)),this.h.auth.getAuthHeaderValueForFirstParty([]))}get headers(){this.p.set("X-Goog-AuthUser",this.l);const e=this.I();return e&&this.p.set("Authorization",e),this.m&&this.p.set("X-Goog-Iam-Authorization-Token",this.m),this.p}}class In{constructor(e,t,l,m){this.h=e,this.l=t,this.m=l,this.g=m}getToken(){return Promise.resolve(new ln(this.h,this.l,this.m,this.g))}start(e,t){e.enqueueRetryable(()=>t(pi.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class Vr{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Wr{constructor(e){this.T=e,this.forceRefresh=!1,this.appCheck=null,this.A=null}start(e,t){const l=E=>{null!=E.error&&fn("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${E.error.message}`);const D=E.token!==this.A;return this.A=E.token,fn("FirebaseAppCheckTokenProvider",`Received ${D?"new":"existing"} token.`),D?t(E.token):Promise.resolve()};this.o=E=>{e.enqueueRetryable(()=>l(E))};const m=E=>{fn("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=E,this.appCheck.addTokenListener(this.o)};this.T.onInit(E=>m(E)),setTimeout(()=>{if(!this.appCheck){const E=this.T.getImmediate({optional:!0});E?m(E):fn("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(t=>t?(ir("string"==typeof t.token),this.A=t.token,new Vr(t.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function Yr(s){const e=typeof self<"u"&&(self.crypto||self.msCrypto),t=new Uint8Array(s);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(t);else for(let l=0;le?1:0}function bi(s,e,t){return s.length===e.length&&s.every((l,m)=>t(l,e[m]))}class Nr{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new j(Wt.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new j(Wt.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new j(Wt.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new j(Wt.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return Nr.fromMillis(Date.now())}static fromDate(e){return Nr.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),l=Math.floor(1e6*(e-1e3*t));return new Nr(t,l)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?On(this.nanoseconds,e.nanoseconds):On(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}class Hn{constructor(e){this.timestamp=e}static fromTimestamp(e){return new Hn(e)}static min(){return new Hn(new Nr(0,0))}static max(){return new Hn(new Nr(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class Os{constructor(e,t,l){void 0===t?t=0:t>e.length&&Qn(),void 0===l?l=e.length-t:l>e.length-t&&Qn(),this.segments=e,this.offset=t,this.len=l}get length(){return this.len}isEqual(e){return 0===Os.comparator(this,e)}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof Os?e.forEach(l=>{t.push(l)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return this.construct(this.segments,this.offset+(e=void 0===e?1:e),this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.lengthD)return 1}return e.lengtht.length?1:0}}class Rr extends Os{construct(e,t,l){return new Rr(e,t,l)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){const t=[];for(const l of e){if(l.indexOf("//")>=0)throw new j(Wt.INVALID_ARGUMENT,`Invalid segment (${l}). Paths must not contain // in them.`);t.push(...l.split("/").filter(m=>m.length>0))}return new Rr(t)}static emptyPath(){return new Rr([])}}const al=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class ui extends Os{construct(e,t,l){return new ui(e,t,l)}static isValidIdentifier(e){return al.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),ui.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new ui(["__name__"])}static fromServerFormat(e){const t=[];let l="",m=0;const E=()=>{if(0===l.length)throw new j(Wt.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(l),l=""};let D=!1;for(;m=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===Rr.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return Rr.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Ln(new Rr(e.slice()))}}function ul(s){return new Qs(s.readTime,s.key,-1)}class Qs{constructor(e,t,l){this.readTime=e,this.documentKey=t,this.largestBatchId=l}static min(){return new Qs(Hn.min(),Ln.empty(),-1)}static max(){return new Qs(Hn.max(),Ln.empty(),-1)}}function Ss(s,e){let t=s.readTime.compareTo(e.readTime);return 0!==t?t:(t=Ln.comparator(s.documentKey,e.documentKey),0!==t?t:On(s.largestBatchId,e.largestBatchId))}const ic="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class Ca{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}function Oo(s){return dl.apply(this,arguments)}function dl(){return dl=(0,n.Z)(function*(s){if(s.code!==Wt.FAILED_PRECONDITION||s.message!==ic)throw s;fn("LocalStore","Unexpectedly lost primary lease")}),dl.apply(this,arguments)}class Lt{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(t=>{this.isDone=!0,this.result=t,this.nextCallback&&this.nextCallback(t)},t=>{this.isDone=!0,this.error=t,this.catchCallback&&this.catchCallback(t)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&Qn(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new Lt((l,m)=>{this.nextCallback=E=>{this.wrapSuccess(e,E).next(l,m)},this.catchCallback=E=>{this.wrapFailure(t,E).next(l,m)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{const t=e();return t instanceof Lt?t:Lt.resolve(t)}catch(t){return Lt.reject(t)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):Lt.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):Lt.reject(t)}static resolve(e){return new Lt((t,l)=>{t(e)})}static reject(e){return new Lt((t,l)=>{l(e)})}static waitFor(e){return new Lt((t,l)=>{let m=0,E=0,D=!1;e.forEach(q=>{++m,q.next(()=>{++E,D&&E===m&&t()},fe=>l(fe))}),D=!0,E===m&&t()})}static or(e){let t=Lt.resolve(!1);for(const l of e)t=t.next(m=>m?Lt.resolve(m):l());return t}static forEach(e,t){const l=[];return e.forEach((m,E)=>{l.push(t.call(this,m,E))}),this.waitFor(l)}static mapArray(e,t){return new Lt((l,m)=>{const E=e.length,D=new Array(E);let q=0;for(let fe=0;fe{D[Ce]=je,++q,q===E&&l(D)},je=>m(je))}})}static doWhile(e,t){return new Lt((l,m)=>{const E=()=>{!0===e()?t().next(()=>{E()},m):l()};E()})}}function Jo(s){return"IndexedDbTransactionError"===s.name}let Ws=(()=>{class s{constructor(t,l){this.previousValue=t,l&&(l.sequenceNumberHandler=m=>this.ut(m),this.ct=m=>l.writeSequenceNumber(m))}ut(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue}next(){const t=++this.previousValue;return this.ct&&this.ct(t),t}}return s.at=-1,s})();class da{constructor(e,t,l,m,E,D,q,fe){this.databaseId=e,this.appId=t,this.persistenceKey=l,this.host=m,this.ssl=E,this.forceLongPolling=D,this.autoDetectLongPolling=q,this.useFetchStreams=fe}}class to{constructor(e,t){this.projectId=e,this.database=t||"(default)"}static empty(){return new to("","")}get isDefaultDatabase(){return"(default)"===this.database}isEqual(e){return e instanceof to&&e.projectId===this.projectId&&e.database===this.database}}function Ga(s){let e=0;for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&e++;return e}function Fo(s,e){for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&e(t,s[t])}function wa(s){for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e))return!1;return!0}function Ha(s){return null==s}function za(s){return 0===s&&1/s==-1/0}class Fh extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class Ns{constructor(e){this.binaryString=e}static fromBase64String(e){const t=function(l){try{return atob(l)}catch(m){throw m instanceof DOMException?new Fh("Invalid base64 string: "+m):m}}(e);return new Ns(t)}static fromUint8Array(e){const t=function(l){let m="";for(let E=0;Ee$o(t,e))}function Ys(s,e){if(s===e)return 0;const t=No(s),l=No(e);if(t!==l)return On(t,l);switch(t){case 0:case 9007199254740991:return 0;case 1:return On(s.booleanValue,e.booleanValue);case 2:return function(m,E){const D=Li(m.integerValue||m.doubleValue),q=Li(E.integerValue||E.doubleValue);return Dq?1:D===q?0:isNaN(D)?isNaN(q)?0:-1:1}(s,e);case 3:return lu(s.timestampValue,e.timestampValue);case 4:return lu(io(s),io(e));case 5:return On(s.stringValue,e.stringValue);case 6:return function(m,E){const D=ja(m),q=ja(E);return D.compareTo(q)}(s.bytesValue,e.bytesValue);case 7:return function(m,E){const D=m.split("/"),q=E.split("/");for(let fe=0;fee.mapValue.fields[t]=Jt(l)),e}if(s.arrayValue){const e={arrayValue:{values:[]}};for(let t=0;t<(s.arrayValue.values||[]).length;++t)e.arrayValue.values[t]=Jt(s.arrayValue.values[t]);return e}return Object.assign({},s)}function zn(s){return"__max__"===(((s.mapValue||{}).fields||{}).__type__||{}).stringValue}class Xi{constructor(e,t){this.position=e,this.inclusive=t}}function Eo(s,e,t){let l=0;for(let m=0;m":return e>0;case">=":return e>=0;default:return Qn()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}getFirstInequalityField(){return this.isInequality()?this.field:null}}class oi extends Ol{constructor(e,t){super(),this.filters=e,this.op=t,this.ft=null}static create(e,t){return new oi(e,t)}matches(e){return Bo(this)?void 0===this.filters.find(t=>!t.matches(e)):void 0!==this.filters.find(t=>t.matches(e))}getFlattenedFilters(){return null!==this.ft||(this.ft=this.filters.reduce((e,t)=>e.concat(t.getFlattenedFilters()),[])),this.ft}getFilters(){return Object.assign([],this.filters)}getFirstInequalityField(){const e=this.dt(t=>t.isInequality());return null!==e?e.field:null}dt(e){for(const t of this.getFlattenedFilters())if(e(t))return t;return null}}function Bo(s){return"and"===s.op}function Da(s){return function hl(s){for(const e of s.filters)if(e instanceof oi)return!1;return!0}(s)&&Bo(s)}function uu(s){if(s instanceof zr)return s.field.canonicalString()+s.op.toString()+B(s.value);if(Da(s))return s.filters.map(e=>uu(e)).join(",");{const e=s.filters.map(t=>uu(t)).join(",");return`${s.op}(${e})`}}function ta(s,e){return s instanceof zr?(t=s,(l=e)instanceof zr&&t.op===l.op&&t.field.isEqual(l.field)&&$o(t.value,l.value)):s instanceof oi?function(t,l){return l instanceof oi&&t.op===l.op&&t.filters.length===l.filters.length&&t.filters.reduce((m,E,D)=>m&&ta(E,l.filters[D]),!0)}(s,e):void Qn();var t,l}function du(s){return s instanceof zr?`${(e=s).field.canonicalString()} ${e.op} ${B(e.value)}`:s instanceof oi?function(e){return e.op.toString()+" {"+e.getFilters().map(du).join(" ,")+"}"}(s):"Filter";var e}class xc extends zr{constructor(e,t,l){super(e,t,l),this.key=Ln.fromName(l.referenceValue)}matches(e){const t=Ln.comparator(e.key,this.key);return this.matchesComparison(t)}}class Fl extends zr{constructor(e,t){super(e,"in",t),this.keys=Aa(0,t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class na extends zr{constructor(e,t){super(e,"not-in",t),this.keys=Aa(0,t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function Aa(s,e){var t;return((null===(t=e.arrayValue)||void 0===t?void 0:t.values)||[]).map(l=>Ln.fromName(l.referenceValue))}class ac extends zr{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return he(t)&&rs(t.arrayValue,this.value)}}class hu extends zr{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return null!==t&&rs(this.value.arrayValue,t)}}class Xu extends zr{constructor(e,t){super(e,"not-in",t)}matches(e){if(rs(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return null!==t&&!rs(this.value.arrayValue,t)}}class Nl extends zr{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!he(t)||!t.arrayValue.values)&&t.arrayValue.values.some(l=>rs(this.value.arrayValue,l))}}class Ll{constructor(e,t="asc"){this.field=e,this.dir=t}}function Bd(s,e){return s.dir===e.dir&&s.field.isEqual(e.field)}class as{constructor(e,t){this.comparator=e,this.root=t||ls.EMPTY}insert(e,t){return new as(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,ls.BLACK,null,null))}remove(e){return new as(this.comparator,this.root.remove(e,this.comparator).copy(null,null,ls.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const l=this.comparator(e,t.key);if(0===l)return t.value;l<0?t=t.left:l>0&&(t=t.right)}return null}indexOf(e){let t=0,l=this.root;for(;!l.isEmpty();){const m=this.comparator(e,l.key);if(0===m)return t+l.left.size;m<0?l=l.left:(t+=l.left.size+1,l=l.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,l)=>(e(t,l),!1))}toString(){const e=[];return this.inorderTraversal((t,l)=>(e.push(`${t}:${l}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Ka(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Ka(this.root,e,this.comparator,!1)}getReverseIterator(){return new Ka(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Ka(this.root,e,this.comparator,!0)}}class Ka{constructor(e,t,l,m){this.isReverse=m,this.nodeStack=[];let E=1;for(;!e.isEmpty();)if(E=t?l(e.key,t):1,t&&m&&(E*=-1),E<0)e=this.isReverse?e.left:e.right;else{if(0===E){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class ls{constructor(e,t,l,m,E){this.key=e,this.value=t,this.color=l??ls.RED,this.left=m??ls.EMPTY,this.right=E??ls.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,l,m,E){return new ls(e??this.key,t??this.value,l??this.color,m??this.left,E??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,l){let m=this;const E=l(e,m.key);return m=E<0?m.copy(null,null,null,m.left.insert(e,t,l),null):0===E?m.copy(null,t,null,null,null):m.copy(null,null,null,null,m.right.insert(e,t,l)),m.fixUp()}removeMin(){if(this.left.isEmpty())return ls.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,t){let l,m=this;if(t(e,m.key)<0)m.left.isEmpty()||m.left.isRed()||m.left.left.isRed()||(m=m.moveRedLeft()),m=m.copy(null,null,null,m.left.remove(e,t),null);else{if(m.left.isRed()&&(m=m.rotateRight()),m.right.isEmpty()||m.right.isRed()||m.right.left.isRed()||(m=m.moveRedRight()),0===t(e,m.key)){if(m.right.isEmpty())return ls.EMPTY;l=m.right.min(),m=m.copy(l.key,l.value,null,null,m.right.removeMin())}m=m.copy(null,null,null,null,m.right.remove(e,t))}return m.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,ls.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,ls.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw Qn();const e=this.left.check();if(e!==this.right.check())throw Qn();return e+(this.isRed()?0:1)}}ls.EMPTY=null,ls.RED=!0,ls.BLACK=!1,ls.EMPTY=new class{constructor(){this.size=0}get key(){throw Qn()}get value(){throw Qn()}get color(){throw Qn()}get left(){throw Qn()}get right(){throw Qn()}copy(s,e,t,l,m){return this}insert(s,e,t){return new ls(s,e)}remove(s,e){return this}isEmpty(){return!0}inorderTraversal(s){return!1}reverseTraversal(s){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class Ai{constructor(e){this.comparator=e,this.data=new as(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,l)=>(e(t),!1))}forEachInRange(e,t){const l=this.data.getIteratorFrom(e[0]);for(;l.hasNext();){const m=l.getNext();if(this.comparator(m.key,e[1])>=0)return;t(m.key)}}forEachWhile(e,t){let l;for(l=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();l.hasNext();)if(!e(l.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new fu(this.data.getIterator())}getIteratorFrom(e){return new fu(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size{t=t.add(l)}),t}isEqual(e){if(!(e instanceof Ai)||this.size!==e.size)return!1;const t=this.data.getIterator(),l=e.data.getIterator();for(;t.hasNext();){const m=t.getNext().key,E=l.getNext().key;if(0!==this.comparator(m,E))return!1}return!0}toArray(){const e=[];return this.forEach(t=>{e.push(t)}),e}toString(){const e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){const t=new Ai(this.comparator);return t.data=e,t}}class fu{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class Vo{constructor(e){this.fields=e,e.sort(ui.comparator)}static empty(){return new Vo([])}unionWith(e){let t=new Ai(ui.comparator);for(const l of this.fields)t=t.add(l);for(const l of e)t=t.add(l);return new Vo(t.toArray())}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return bi(this.fields,e.fields,(t,l)=>t.isEqual(l))}}class ws{constructor(e){this.value=e}static empty(){return new ws({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let l=0;l{if(!t.isImmediateParentOf(q)){const fe=this.getFieldsMap(t);this.applyChanges(fe,l,m),l={},m=[],t=q.popLast()}D?l[q.lastSegment()]=Jt(D):m.push(q.lastSegment())});const E=this.getFieldsMap(t);this.applyChanges(E,l,m)}delete(e){const t=this.field(e.popLast());Tt(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return $o(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let l=0;le[m]=E);for(const m of l)delete e[m]}clone(){return new ws(Jt(this.value))}}function Pc(s){const e=[];return Fo(s.fields,(t,l)=>{const m=new ui([t]);if(Tt(l)){const E=Pc(l.mapValue).fields;if(0===E.length)e.push(m);else for(const D of E)e.push(m.child(D))}else e.push(m)}),new Vo(e)}class Bi{constructor(e,t,l,m,E,D,q){this.key=e,this.documentType=t,this.version=l,this.readTime=m,this.createTime=E,this.data=D,this.documentState=q}static newInvalidDocument(e){return new Bi(e,0,Hn.min(),Hn.min(),Hn.min(),ws.empty(),0)}static newFoundDocument(e,t,l,m){return new Bi(e,1,t,Hn.min(),l,m,0)}static newNoDocument(e,t){return new Bi(e,2,t,Hn.min(),Hn.min(),ws.empty(),0)}static newUnknownDocument(e,t){return new Bi(e,3,t,Hn.min(),Hn.min(),ws.empty(),2)}convertToFoundDocument(e,t){return!this.createTime.isEqual(Hn.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=ws.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=ws.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Hn.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof Bi&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new Bi(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class Bl{constructor(e,t=null,l=[],m=[],E=null,D=null,q=null){this.path=e,this.collectionGroup=t,this.orderBy=l,this.filters=m,this.limit=E,this.startAt=D,this.endAt=q,this._t=null}}function qa(s,e=null,t=[],l=[],m=null,E=null,D=null){return new Bl(s,e,t,l,m,E,D)}function Uo(s){const e=Nn(s);if(null===e._t){let t=e.path.canonicalString();null!==e.collectionGroup&&(t+="|cg:"+e.collectionGroup),t+="|f:",t+=e.filters.map(l=>uu(l)).join(","),t+="|ob:",t+=e.orderBy.map(l=>{return(m=l).field.canonicalString()+m.dir;var m}).join(","),Ha(e.limit)||(t+="|l:",t+=e.limit),e.startAt&&(t+="|lb:",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map(l=>B(l)).join(",")),e.endAt&&(t+="|ub:",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map(l=>B(l)).join(",")),e._t=t}return e._t}function Vl(s,e){if(s.limit!==e.limit||s.orderBy.length!==e.orderBy.length)return!1;for(let t=0;t0?s.explicitOrderBy[0].field:null}function cc(s){for(const e of s.filters){const t=e.getFirstInequalityField();if(null!==t)return t}return null}function $l(s){return null!==s.collectionGroup}function Go(s){const e=Nn(s);if(null===e.wt){e.wt=[];const t=cc(e),l=lc(e);if(null!==t&&null===l)t.isKeyField()||e.wt.push(new Ll(t)),e.wt.push(new Ll(ui.keyField(),"asc"));else{let m=!1;for(const E of e.explicitOrderBy)e.wt.push(E),E.field.isKeyField()&&(m=!0);if(!m){const E=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";e.wt.push(new Ll(ui.keyField(),E))}}}return e.wt}function Hi(s){const e=Nn(s);if(!e.gt)if("F"===e.limitType)e.gt=qa(e.path,e.collectionGroup,Go(e),e.filters,e.limit,e.startAt,e.endAt);else{const t=[];for(const E of Go(e))t.push(new Ll(E.field,"desc"===E.dir?"asc":"desc"));const l=e.endAt?new Xi(e.endAt.position,e.endAt.inclusive):null,m=e.startAt?new Xi(e.startAt.position,e.startAt.inclusive):null;e.gt=qa(e.path,e.collectionGroup,t,e.filters,e.limit,l,m)}return e.gt}function gu(s,e){e.getFirstInequalityField(),cc(s);const t=s.filters.concat([e]);return new Za(s.path,s.collectionGroup,s.explicitOrderBy.slice(),t,s.limit,s.limitType,s.startAt,s.endAt)}function Qa(s,e,t){return new Za(s.path,s.collectionGroup,s.explicitOrderBy.slice(),s.filters.slice(),e,t,s.startAt,s.endAt)}function Co(s,e){return Vl(Hi(s),Hi(e))&&s.limitType===e.limitType}function Ja(s){return`${Uo(Hi(s))}|lt:${s.limitType}`}function uc(s){return`Query(target=${function(e){let t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=`, filters: [${e.filters.map(l=>du(l)).join(", ")}]`),Ha(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=`, orderBy: [${e.orderBy.map(l=>{return`${(m=l).field.canonicalString()} (${m.dir})`;var m}).join(", ")}]`),e.startAt&&(t+=", startAt: ",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map(l=>B(l)).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map(l=>B(l)).join(",")),`Target(${t})`}(Hi(s))}; limitType=${s.limitType})`}function el(s,e){return e.isFoundDocument()&&function(t,l){const m=l.key.path;return null!==t.collectionGroup?l.key.hasCollectionId(t.collectionGroup)&&t.path.isPrefixOf(m):Ln.isDocumentKey(t.path)?t.path.isEqual(m):t.path.isImmediateParentOf(m)}(s,e)&&function(t,l){for(const m of Go(t))if(!m.field.isKeyField()&&null===l.data.field(m.field))return!1;return!0}(s,e)&&function(t,l){for(const m of t.filters)if(!m.matches(l))return!1;return!0}(s,e)&&(l=e,!((t=s).startAt&&!function(m,E,D){const q=Eo(m,E,D);return m.inclusive?q<=0:q<0}(t.startAt,Go(t),l)||t.endAt&&!function(m,E,D){const q=Eo(m,E,D);return m.inclusive?q>=0:q>0}(t.endAt,Go(t),l)));var t,l}function Ul(s){return(e,t)=>{let l=!1;for(const m of Go(s)){const E=yu(m,e,t);if(0!==E)return E;l=l||m.field.isKeyField()}return 0}}function yu(s,e,t){const l=s.field.isKeyField()?Ln.comparator(e.key,t.key):function(m,E,D){const q=E.data.field(m),fe=D.data.field(m);return null!==q&&null!==fe?Ys(q,fe):Qn()}(s.field,e,t);switch(s.dir){case"asc":return l;case"desc":return-1*l;default:return Qn()}}function vu(s,e){if(s.yt){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:za(e)?"-0":e}}function fa(s){return{integerValue:""+s}}function Ks(s,e){return function vi(s){return"number"==typeof s&&Number.isInteger(s)&&!za(s)&&s<=Number.MAX_SAFE_INTEGER&&s>=Number.MIN_SAFE_INTEGER}(e)?fa(e):vu(s,e)}class ml{constructor(){this._=void 0}}function dc(s,e,t){return s instanceof ra?function(l,m){const E={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:l.seconds,nanos:l.nanoseconds}}}};return m&&(E.fields.__previous_value__=m),{mapValue:E}}(t,e):s instanceof tl?hc(s,e):s instanceof gl?_u(s,e):function(l,m){const E=xi(l,m),D=I(E)+I(l.It);return re(E)&&re(l.It)?fa(D):vu(l.Tt,D)}(s,e)}function kc(s,e,t){return s instanceof tl?hc(s,e):s instanceof gl?_u(s,e):t}function xi(s,e){return s instanceof W?re(t=e)||(l=t)&&"doubleValue"in l?e:{integerValue:0}:null;var l,t}class ra extends ml{}class tl extends ml{constructor(e){super(),this.elements=e}}function hc(s,e){const t=P(e);for(const l of s.elements)t.some(m=>$o(m,l))||t.push(l);return{arrayValue:{values:t}}}class gl extends ml{constructor(e){super(),this.elements=e}}function _u(s,e){let t=P(e);for(const l of s.elements)t=t.filter(m=>!$o(m,l));return{arrayValue:{values:t}}}class W extends ml{constructor(e,t){super(),this.Tt=e,this.It=t}}function I(s){return Li(s.integerValue||s.doubleValue)}function P(s){return he(s)&&s.arrayValue.values?s.arrayValue.values.slice():[]}class Xe{constructor(e,t){this.version=e,this.transformResults=t}}class Dt{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new Dt}static exists(e){return new Dt(void 0,e)}static updateTime(e){return new Dt(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function cn(s,e){return void 0!==s.updateTime?e.isFoundDocument()&&e.version.isEqual(s.updateTime):void 0===s.exists||s.exists===e.isFoundDocument()}class qn{}function lr(s,e){if(!s.hasLocalMutations||e&&0===e.fields.length)return null;if(null===e)return s.isNoDocument()?new ma(s.key,Dt.none()):new pa(s.key,s.data,Dt.none());{const t=s.data,l=ws.empty();let m=new Ai(ui.comparator);for(let E of e.fields)if(!m.has(E)){let D=t.field(E);null===D&&E.length>1&&(E=E.popLast(),D=t.field(E)),null===D?l.delete(E):l.set(E,D),m=m.add(E)}return new oo(s.key,l,new Vo(m.toArray()),Dt.none())}}function Kr(s,e,t){s instanceof pa?function(l,m,E){const D=l.value.clone(),q=Hl(l.fieldTransforms,m,E.transformResults);D.setAll(q),m.convertToFoundDocument(E.version,D).setHasCommittedMutations()}(s,e,t):s instanceof oo?function(l,m,E){if(!cn(l.precondition,m))return void m.convertToUnknownDocument(E.version);const D=Hl(l.fieldTransforms,m,E.transformResults),q=m.data;q.setAll(Gl(l)),q.setAll(D),m.convertToFoundDocument(E.version,q).setHasCommittedMutations()}(s,e,t):e.convertToNoDocument(t.version).setHasCommittedMutations()}function ki(s,e,t,l){return s instanceof pa?function(m,E,D,q){if(!cn(m.precondition,E))return D;const fe=m.value.clone(),Ce=Oc(m.fieldTransforms,q,E);return fe.setAll(Ce),E.convertToFoundDocument(E.version,fe).setHasLocalMutations(),null}(s,e,t,l):s instanceof oo?function(m,E,D,q){if(!cn(m.precondition,E))return D;const fe=Oc(m.fieldTransforms,q,E),Ce=E.data;return Ce.setAll(Gl(m)),Ce.setAll(fe),E.convertToFoundDocument(E.version,Ce).setHasLocalMutations(),null===D?null:D.unionWith(m.fieldMask.fields).unionWith(m.fieldTransforms.map(je=>je.field))}(s,e,t,l):(D=t,cn(s.precondition,E=e)?(E.convertToNoDocument(E.version).setHasLocalMutations(),null):D);var E,D}function Ho(s,e){let t=null;for(const l of s.fieldTransforms){const m=e.data.field(l.field),E=xi(l.transform,m||null);null!=E&&(null===t&&(t=ws.empty()),t.set(l.field,E))}return t||null}function zo(s,e){return s.type===e.type&&!!s.key.isEqual(e.key)&&!!s.precondition.isEqual(e.precondition)&&(l=e.fieldTransforms,!!(void 0===(t=s.fieldTransforms)&&void 0===l||t&&l&&bi(t,l,(m,E)=>function Ae(s,e){return s.field.isEqual(e.field)&&(l=e.transform,(t=s.transform)instanceof tl&&l instanceof tl||t instanceof gl&&l instanceof gl?bi(t.elements,l.elements,$o):t instanceof W&&l instanceof W?$o(t.It,l.It):t instanceof ra&&l instanceof ra);var t,l}(m,E))))&&(0===s.type?s.value.isEqual(e.value):1!==s.type||s.data.isEqual(e.data)&&s.fieldMask.isEqual(e.fieldMask));var t,l}class pa extends qn{constructor(e,t,l,m=[]){super(),this.key=e,this.value=t,this.precondition=l,this.fieldTransforms=m,this.type=0}getFieldMask(){return null}}class oo extends qn{constructor(e,t,l,m,E=[]){super(),this.key=e,this.data=t,this.fieldMask=l,this.precondition=m,this.fieldTransforms=E,this.type=1}getFieldMask(){return this.fieldMask}}function Gl(s){const e=new Map;return s.fieldMask.fields.forEach(t=>{if(!t.isEmpty()){const l=s.data.field(t);e.set(t,l)}}),e}function Hl(s,e,t){const l=new Map;ir(s.length===t.length);for(let m=0;m{for(const[m,E]of l)e(m,E)})}isEmpty(){return wa(this.inner)}size(){return this.innerSize}}const Vd=new as(Ln.comparator);function Io(){return Vd}const Eu=new as(Ln.comparator);function Nc(...s){let e=Eu;for(const t of s)e=e.insert(t.key,t);return e}function Cu(s){let e=Eu;return s.forEach((t,l)=>e=e.insert(t,l.overlayedDocument)),e}function ia(){return Ra()}function bu(){return Ra()}function Ra(){return new bo(s=>s.toString(),(s,e)=>s.isEqual(e))}const Nh=new as(Ln.comparator),Ju=new Ai(Ln.comparator);function qr(...s){let e=Ju;for(const t of s)e=e.add(t);return e}const sp=new Ai(On);function pc(){return sp}class Lc{constructor(e,t,l,m,E){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=l,this.documentUpdates=m,this.resolvedLimboDocuments=E}static createSynthesizedRemoteEventForCurrentChange(e,t,l){const m=new Map;return m.set(e,mc.createSynthesizedTargetChangeForCurrentChange(e,t,l)),new Lc(Hn.min(),m,pc(),Io(),qr())}}class mc{constructor(e,t,l,m,E){this.resumeToken=e,this.current=t,this.addedDocuments=l,this.modifiedDocuments=m,this.removedDocuments=E}static createSynthesizedTargetChangeForCurrentChange(e,t,l){return new mc(l,t,qr(),qr(),qr())}}class gc{constructor(e,t,l,m){this.Et=e,this.removedTargetIds=t,this.key=l,this.At=m}}class $d{constructor(e,t){this.targetId=e,this.Rt=t}}class So{constructor(e,t,l=Ns.EMPTY_BYTE_STRING,m=null){this.state=e,this.targetIds=t,this.resumeToken=l,this.cause=m}}class Bc{constructor(){this.bt=0,this.vt=sa(),this.Pt=Ns.EMPTY_BYTE_STRING,this.Vt=!1,this.St=!0}get current(){return this.Vt}get resumeToken(){return this.Pt}get Dt(){return 0!==this.bt}get Ct(){return this.St}xt(e){e.approximateByteSize()>0&&(this.St=!0,this.Pt=e)}Nt(){let e=qr(),t=qr(),l=qr();return this.vt.forEach((m,E)=>{switch(E){case 0:e=e.add(m);break;case 2:t=t.add(m);break;case 1:l=l.add(m);break;default:Qn()}}),new mc(this.Pt,this.Vt,e,t,l)}kt(){this.St=!1,this.vt=sa()}Ot(e,t){this.St=!0,this.vt=this.vt.insert(e,t)}Mt(e){this.St=!0,this.vt=this.vt.remove(e)}Ft(){this.bt+=1}$t(){this.bt-=1}Bt(){this.St=!0,this.Vt=!0}}class ka{constructor(e){this.Lt=e,this.qt=new Map,this.Ut=Io(),this.Kt=zl(),this.Gt=new Ai(On)}Qt(e){for(const t of e.Et)e.At&&e.At.isFoundDocument()?this.jt(t,e.At):this.zt(t,e.key,e.At);for(const t of e.removedTargetIds)this.zt(t,e.key,e.At)}Wt(e){this.forEachTarget(e,t=>{const l=this.Ht(t);switch(e.state){case 0:this.Jt(t)&&l.xt(e.resumeToken);break;case 1:l.$t(),l.Dt||l.kt(),l.xt(e.resumeToken);break;case 2:l.$t(),l.Dt||this.removeTarget(t);break;case 3:this.Jt(t)&&(l.Bt(),l.xt(e.resumeToken));break;case 4:this.Jt(t)&&(this.Yt(t),l.xt(e.resumeToken));break;default:Qn()}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.qt.forEach((l,m)=>{this.Jt(m)&&t(m)})}Zt(e){const t=e.targetId,l=e.Rt.count,m=this.Xt(t);if(m){const E=m.target;if(fl(E))if(0===l){const D=new Ln(E.path);this.zt(t,D,Bi.newNoDocument(D,Hn.min()))}else ir(1===l);else this.te(t)!==l&&(this.Yt(t),this.Gt=this.Gt.add(t))}}ee(e){const t=new Map;this.qt.forEach((E,D)=>{const q=this.Xt(D);if(q){if(E.current&&fl(q.target)){const fe=new Ln(q.target.path);null!==this.Ut.get(fe)||this.ne(D,fe)||this.zt(D,fe,Bi.newNoDocument(fe,e))}E.Ct&&(t.set(D,E.Nt()),E.kt())}});let l=qr();this.Kt.forEach((E,D)=>{let q=!0;D.forEachWhile(fe=>{const Ce=this.Xt(fe);return!Ce||2===Ce.purpose||(q=!1,!1)}),q&&(l=l.add(E))}),this.Ut.forEach((E,D)=>D.setReadTime(e));const m=new Lc(e,t,this.Gt,this.Ut,l);return this.Ut=Io(),this.Kt=zl(),this.Gt=new Ai(On),m}jt(e,t){if(!this.Jt(e))return;const l=this.ne(e,t.key)?2:0;this.Ht(e).Ot(t.key,l),this.Ut=this.Ut.insert(t.key,t),this.Kt=this.Kt.insert(t.key,this.se(t.key).add(e))}zt(e,t,l){if(!this.Jt(e))return;const m=this.Ht(e);this.ne(e,t)?m.Ot(t,1):m.Mt(t),this.Kt=this.Kt.insert(t,this.se(t).delete(e)),l&&(this.Ut=this.Ut.insert(t,l))}removeTarget(e){this.qt.delete(e)}te(e){const t=this.Ht(e).Nt();return this.Lt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}Ft(e){this.Ht(e).Ft()}Ht(e){let t=this.qt.get(e);return t||(t=new Bc,this.qt.set(e,t)),t}se(e){let t=this.Kt.get(e);return t||(t=new Ai(On),this.Kt=this.Kt.insert(e,t)),t}Jt(e){const t=null!==this.Xt(e);return t||fn("WatchChangeAggregator","Detected inactive target",e),t}Xt(e){const t=this.qt.get(e);return t&&t.Dt?null:this.Lt.ie(e)}Yt(e){this.qt.set(e,new Bc),this.Lt.getRemoteKeysForTarget(e).forEach(t=>{this.zt(e,t,null)})}ne(e,t){return this.Lt.getRemoteKeysForTarget(e).has(t)}}function zl(){return new as(Ln.comparator)}function sa(){return new as(Ln.comparator)}const yl={asc:"ASCENDING",desc:"DESCENDING"},ed={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},Lh={and:"AND",or:"OR"};class nl{constructor(e,t){this.databaseId=e,this.yt=t}}function Iu(s,e){return s.yt?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function Bh(s,e){return s.yt?e.toBase64():e.toUint8Array()}function Bm(s,e){return Iu(s,e.toTimestamp())}function Ts(s){return ir(!!s),Hn.fromTimestamp(function(e){const t=ha(e);return new Nr(t.seconds,t.nanos)}(s))}function Vh(s,e){return(t=s,new Rr(["projects",t.projectId,"databases",t.database])).child("documents").child(e).canonicalString();var t}function $h(s){const e=Rr.fromString(s);return ir(dp(e)),e}function Su(s,e){return Vh(s.databaseId,e.path)}function oa(s,e){const t=$h(e);if(t.get(1)!==s.databaseId.projectId)throw new j(Wt.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+t.get(1)+" vs "+s.databaseId.projectId);if(t.get(3)!==s.databaseId.database)throw new j(Wt.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+t.get(3)+" vs "+s.databaseId.database);return new Ln(Ud(t))}function vl(s,e){return Vh(s.databaseId,e)}function _l(s){return new Rr(["projects",s.databaseId.projectId,"databases",s.databaseId.database]).canonicalString()}function Ud(s){return ir(s.length>4&&"documents"===s.get(4)),s.popFirst(5)}function op(s,e,t){return{name:Su(s,e),fields:t.value.mapValue.fields}}function Gh(s,e){return{documents:[vl(s,e.path)]}}function nd(s,e){const t={structuredQuery:{}},l=e.path;null!==e.collectionGroup?(t.parent=vl(s,l),t.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(t.parent=vl(s,l.popLast()),t.structuredQuery.from=[{collectionId:l.lastSegment()}]);const m=function(fe){if(0!==fe.length)return $c(oi.create(fe,"and"))}(e.filters);m&&(t.structuredQuery.where=m);const E=function(fe){if(0!==fe.length)return fe.map(Ce=>{return{field:jl((je=Ce).field),direction:lp(je.dir)};var je})}(e.orderBy);E&&(t.structuredQuery.orderBy=E);const D=(Ce=e.limit,s.yt||Ha(Ce)?Ce:{value:Ce});var Ce,q,fe;return null!==D&&(t.structuredQuery.limit=D),e.startAt&&(t.structuredQuery.startAt={before:(q=e.startAt).inclusive,values:q.position}),e.endAt&&(t.structuredQuery.endAt={before:!(fe=e.endAt).inclusive,values:fe.position}),t}function Hh(s){let e=function rl(s){const e=$h(s);return 4===e.length?Rr.emptyPath():Ud(e)}(s.parent);const t=s.structuredQuery,l=t.from?t.from.length:0;let m=null;if(l>0){ir(1===l);const je=t.from[0];je.allDescendants?m=je.collectionId:e=e.child(je.collectionId)}let E=[];t.where&&(E=function(je){const ht=zh(je);return ht instanceof oi&&Da(ht)?ht.getFilters():[ht]}(t.where));let D=[];t.orderBy&&(D=t.orderBy.map(je=>{return new Ll(aa((ht=je).field),function(Ft){switch(Ft){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(ht.direction));var ht}));let q=null;t.limit&&(q=function(je){let ht;return ht="object"==typeof je?je.value:je,Ha(ht)?null:ht}(t.limit));let fe=null;var je;t.startAt&&(fe=new Xi((je=t.startAt).values||[],!!je.before));let Ce=null;return t.endAt&&(Ce=function(je){return new Xi(je.values||[],!je.before)}(t.endAt)),function pl(s,e,t,l,m,E,D,q){return new Za(s,e,t,l,m,E,D,q)}(e,m,D,E,q,"F",fe,Ce)}function zh(s){return void 0!==s.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":const t=aa(e.unaryFilter.field);return zr.create(t,"==",{doubleValue:NaN});case"IS_NULL":const l=aa(e.unaryFilter.field);return zr.create(l,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const m=aa(e.unaryFilter.field);return zr.create(m,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const E=aa(e.unaryFilter.field);return zr.create(E,"!=",{nullValue:"NULL_VALUE"});default:return Qn()}}(s):void 0!==s.fieldFilter?zr.create(aa((e=s).fieldFilter.field),function(t){switch(t){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return Qn()}}(e.fieldFilter.op),e.fieldFilter.value):void 0!==s.compositeFilter?function(e){return oi.create(e.compositeFilter.filters.map(t=>zh(t)),function(t){switch(t){case"AND":return"and";case"OR":return"or";default:return Qn()}}(e.compositeFilter.op))}(s):Qn();var e}function lp(s){return yl[s]}function Vm(s){return ed[s]}function cp(s){return Lh[s]}function jl(s){return{fieldPath:s.canonicalString()}}function aa(s){return ui.fromServerFormat(s.fieldPath)}function $c(s){return s instanceof zr?function(e){if("=="===e.op){if(Be(e.value))return{unaryFilter:{field:jl(e.field),op:"IS_NAN"}};if(De(e.value))return{unaryFilter:{field:jl(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Be(e.value))return{unaryFilter:{field:jl(e.field),op:"IS_NOT_NAN"}};if(De(e.value))return{unaryFilter:{field:jl(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:jl(e.field),op:Vm(e.op),value:e.value}}}(s):s instanceof oi?function(e){const t=e.getFilters().map(l=>$c(l));return 1===t.length?t[0]:{compositeFilter:{op:cp(e.op),filters:t}}}(s):Qn()}function up(s){const e=[];return s.fields.forEach(t=>e.push(t.canonicalString())),{fieldPaths:e}}function dp(s){return s.length>=4&&"projects"===s.get(0)&&"databases"===s.get(2)}class Zh{constructor(e,t,l,m){this.batchId=e,this.localWriteTime=t,this.baseMutations=l,this.mutations=m}applyToRemoteDocument(e,t){const l=t.mutationResults;for(let m=0;m{const E=e.get(m.key),D=E.overlayedDocument;let q=this.applyToLocalView(D,E.mutatedFields);q=t.has(m.key)?null:q;const fe=lr(D,q);null!==fe&&l.set(m.key,fe),D.isValidDocument()||D.convertToNoDocument(Hn.min())}),l}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),qr())}isEqual(e){return this.batchId===e.batchId&&bi(this.mutations,e.mutations,(t,l)=>zo(t,l))&&bi(this.baseMutations,e.baseMutations,(t,l)=>zo(t,l))}}class wu{constructor(e,t,l,m){this.batch=e,this.commitVersion=t,this.mutationResults=l,this.docVersions=m}static from(e,t,l){ir(e.mutations.length===l.length);let m=Nh;const E=e.mutations;for(let D=0;D{this.fe(t,60),this.Te(l,t)})}fe(e,t){e.de(t)}me(e){e.de(2)}}yc.Ee=new yc;class Cp{constructor(){this.Ze=new xu}addToCollectionParentIndex(e,t){return this.Ze.add(t),Lt.resolve()}getCollectionParents(e,t){return Lt.resolve(this.Ze.getEntries(t))}addFieldIndex(e,t){return Lt.resolve()}deleteFieldIndex(e,t){return Lt.resolve()}getDocumentsMatchingTarget(e,t){return Lt.resolve(null)}getIndexType(e,t){return Lt.resolve(0)}getFieldIndexes(e,t){return Lt.resolve([])}getNextCollectionGroupToUpdate(e){return Lt.resolve(null)}getMinOffset(e,t){return Lt.resolve(Qs.min())}getMinOffsetFromCollectionGroup(e,t){return Lt.resolve(Qs.min())}updateCollectionGroup(e,t,l){return Lt.resolve()}updateIndexEntries(e,t){return Lt.resolve()}}class xu{constructor(){this.index={}}add(e){const t=e.lastSegment(),l=e.popLast(),m=this.index[t]||new Ai(Rr.comparator),E=!m.has(l);return this.index[t]=m.add(l),E}has(e){const t=e.lastSegment(),l=e.popLast(),m=this.index[t];return m&&m.has(l)}getEntries(e){return(this.index[e]||new Ai(Rr.comparator)).toArray()}}new Uint8Array(0);class Yo{constructor(e,t,l){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=l}static withCacheSize(e){return new Yo(e,Yo.DEFAULT_COLLECTION_PERCENTILE,Yo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}Yo.DEFAULT_COLLECTION_PERCENTILE=10,Yo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Yo.DEFAULT=new Yo(41943040,Yo.DEFAULT_COLLECTION_PERCENTILE,Yo.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Yo.DISABLED=new Yo(-1,0,0);class _c{constructor(e){this.Pn=e}next(){return this.Pn+=2,this.Pn}static Vn(){return new _c(0)}static Sn(){return new _c(-1)}}class Km{constructor(){this.changes=new bo(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,Bi.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();const l=this.changes.get(t);return void 0!==l?Lt.resolve(l):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}class Xm{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}class hf{constructor(e,t,l,m){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=l,this.indexManager=m}getDocument(e,t){let l=null;return this.documentOverlayCache.getOverlay(e,t).next(m=>(l=m,this.remoteDocumentCache.getEntry(e,t))).next(m=>(null!==l&&ki(l.mutation,m,Vo.empty(),Nr.now()),m))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(l=>this.getLocalViewOfDocuments(e,l,qr()).next(()=>l))}getLocalViewOfDocuments(e,t,l=qr()){const m=ia();return this.populateOverlays(e,m,t).next(()=>this.computeViews(e,t,m,l).next(E=>{let D=Nc();return E.forEach((q,fe)=>{D=D.insert(q,fe.overlayedDocument)}),D}))}getOverlayedDocuments(e,t){const l=ia();return this.populateOverlays(e,l,t).next(()=>this.computeViews(e,t,l,qr()))}populateOverlays(e,t,l){const m=[];return l.forEach(E=>{t.has(E)||m.push(E)}),this.documentOverlayCache.getOverlays(e,m).next(E=>{E.forEach((D,q)=>{t.set(D,q)})})}computeViews(e,t,l,m){let E=Io();const D=Ra(),q=Ra();return t.forEach((fe,Ce)=>{const je=l.get(Ce.key);m.has(Ce.key)&&(void 0===je||je.mutation instanceof oo)?E=E.insert(Ce.key,Ce):void 0!==je?(D.set(Ce.key,je.mutation.getFieldMask()),ki(je.mutation,Ce,je.mutation.getFieldMask(),Nr.now())):D.set(Ce.key,Vo.empty())}),this.recalculateAndSaveOverlays(e,E).next(fe=>(fe.forEach((Ce,je)=>D.set(Ce,je)),t.forEach((Ce,je)=>{var ht;return q.set(Ce,new Xm(je,null!==(ht=D.get(Ce))&&void 0!==ht?ht:null))}),q))}recalculateAndSaveOverlays(e,t){const l=Ra();let m=new as((D,q)=>D-q),E=qr();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(D=>{for(const q of D)q.keys().forEach(fe=>{const Ce=t.get(fe);if(null===Ce)return;let je=l.get(fe)||Vo.empty();je=q.applyToLocalView(Ce,je),l.set(fe,je);const ht=(m.get(q.batchId)||qr()).add(fe);m=m.insert(q.batchId,ht)})}).next(()=>{const D=[],q=m.getReverseIterator();for(;q.hasNext();){const fe=q.getNext(),Ce=fe.key,je=fe.value,ht=bu();je.forEach(Ft=>{if(!E.has(Ft)){const on=lr(t.get(Ft),l.get(Ft));null!==on&&ht.set(Ft,on),E=E.add(Ft)}}),D.push(this.documentOverlayCache.saveOverlays(e,Ce,ht))}return Lt.waitFor(D)}).next(()=>l)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(l=>this.recalculateAndSaveOverlays(e,l))}getDocumentsMatchingQuery(e,t,l){return Ln.isDocumentKey((m=t).path)&&null===m.collectionGroup&&0===m.filters.length?this.getDocumentsMatchingDocumentQuery(e,t.path):$l(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,l):this.getDocumentsMatchingCollectionQuery(e,t,l);var m}getNextDocuments(e,t,l,m){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,l,m).next(E=>{const D=m-E.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,l.largestBatchId,m-E.size):Lt.resolve(ia());let q=-1,fe=E;return D.next(Ce=>Lt.forEach(Ce,(je,ht)=>(q{fe=fe.insert(je,Ft)}))).next(()=>this.populateOverlays(e,Ce,E)).next(()=>this.computeViews(e,fe,Ce,qr())).next(je=>({batchId:q,changes:Cu(je)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new Ln(t)).next(l=>{let m=Nc();return l.isFoundDocument()&&(m=m.insert(l.key,l)),m})}getDocumentsMatchingCollectionGroupQuery(e,t,l){const m=t.collectionGroup;let E=Nc();return this.indexManager.getCollectionParents(e,m).next(D=>Lt.forEach(D,q=>{const fe=(Ce=t,je=q.child(m),new Za(je,null,Ce.explicitOrderBy.slice(),Ce.filters.slice(),Ce.limit,Ce.limitType,Ce.startAt,Ce.endAt));var Ce,je;return this.getDocumentsMatchingCollectionQuery(e,fe,l).next(Ce=>{Ce.forEach((je,ht)=>{E=E.insert(je,ht)})})}).next(()=>E))}getDocumentsMatchingCollectionQuery(e,t,l){let m;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,l.largestBatchId).next(E=>(m=E,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,l,m))).next(E=>{m.forEach((q,fe)=>{const Ce=fe.getKey();null===E.get(Ce)&&(E=E.insert(Ce,Bi.newInvalidDocument(Ce)))});let D=Nc();return E.forEach((q,fe)=>{const Ce=m.get(q);void 0!==Ce&&ki(Ce.mutation,fe,Vo.empty(),Nr.now()),el(t,fe)&&(D=D.insert(q,fe))}),D})}}class Qm{constructor(e){this.Tt=e,this.es=new Map,this.ns=new Map}getBundleMetadata(e,t){return Lt.resolve(this.es.get(t))}saveBundleMetadata(e,t){var l;return this.es.set(t.id,{id:(l=t).id,version:l.version,createTime:Ts(l.createTime)}),Lt.resolve()}getNamedQuery(e,t){return Lt.resolve(this.ns.get(t))}saveNamedQuery(e,t){return this.ns.set(t.name,{name:(l=t).name,query:_p(l.bundledQuery),readTime:Ts(l.readTime)}),Lt.resolve();var l}}class _y{constructor(){this.overlays=new as(Ln.comparator),this.ss=new Map}getOverlay(e,t){return Lt.resolve(this.overlays.get(t))}getOverlays(e,t){const l=ia();return Lt.forEach(t,m=>this.getOverlay(e,m).next(E=>{null!==E&&l.set(m,E)})).next(()=>l)}saveOverlays(e,t,l){return l.forEach((m,E)=>{this.ce(e,t,E)}),Lt.resolve()}removeOverlaysForBatchId(e,t,l){const m=this.ss.get(l);return void 0!==m&&(m.forEach(E=>this.overlays=this.overlays.remove(E)),this.ss.delete(l)),Lt.resolve()}getOverlaysForCollection(e,t,l){const m=ia(),E=t.length+1,D=new Ln(t.child("")),q=this.overlays.getIteratorFrom(D);for(;q.hasNext();){const fe=q.getNext().value,Ce=fe.getKey();if(!t.isPrefixOf(Ce.path))break;Ce.path.length===E&&fe.largestBatchId>l&&m.set(fe.getKey(),fe)}return Lt.resolve(m)}getOverlaysForCollectionGroup(e,t,l,m){let E=new as((Ce,je)=>Ce-je);const D=this.overlays.getIterator();for(;D.hasNext();){const Ce=D.getNext().value;if(Ce.getKey().getCollectionGroup()===t&&Ce.largestBatchId>l){let je=E.get(Ce.largestBatchId);null===je&&(je=ia(),E=E.insert(Ce.largestBatchId,je)),je.set(Ce.getKey(),Ce)}}const q=ia(),fe=E.getIterator();for(;fe.hasNext()&&(fe.getNext().value.forEach((Ce,je)=>q.set(Ce,je)),!(q.size()>=m)););return Lt.resolve(q)}ce(e,t,l){const m=this.overlays.get(l.key);if(null!==m){const D=this.ss.get(m.largestBatchId).delete(l.key);this.ss.set(m.largestBatchId,D)}this.overlays=this.overlays.insert(l.key,new Xh(t,l));let E=this.ss.get(t);void 0===E&&(E=qr(),this.ss.set(t,E)),this.ss.set(t,E.add(l.key))}}class th{constructor(){this.rs=new Ai(wo.os),this.us=new Ai(wo.cs)}isEmpty(){return this.rs.isEmpty()}addReference(e,t){const l=new wo(e,t);this.rs=this.rs.add(l),this.us=this.us.add(l)}hs(e,t){e.forEach(l=>this.addReference(l,t))}removeReference(e,t){this.ls(new wo(e,t))}fs(e,t){e.forEach(l=>this.removeReference(l,t))}ds(e){const t=new Ln(new Rr([])),l=new wo(t,e),m=new wo(t,e+1),E=[];return this.us.forEachInRange([l,m],D=>{this.ls(D),E.push(D.key)}),E}_s(){this.rs.forEach(e=>this.ls(e))}ls(e){this.rs=this.rs.delete(e),this.us=this.us.delete(e)}ws(e){const t=new Ln(new Rr([])),l=new wo(t,e),m=new wo(t,e+1);let E=qr();return this.us.forEachInRange([l,m],D=>{E=E.add(D.key)}),E}containsKey(e){const t=new wo(e,0),l=this.rs.firstAfterOrEqual(t);return null!==l&&e.isEqual(l.key)}}class wo{constructor(e,t){this.key=e,this.gs=t}static os(e,t){return Ln.comparator(e.key,t.key)||On(e.gs,t.gs)}static cs(e,t){return On(e.gs,t.gs)||Ln.comparator(e.key,t.key)}}class wp{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.ys=1,this.ps=new Ai(wo.os)}checkEmpty(e){return Lt.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,l,m){const E=this.ys;this.ys++;const D=new Zh(E,t,l,m);this.mutationQueue.push(D);for(const q of m)this.ps=this.ps.add(new wo(q.key,E)),this.indexManager.addToCollectionParentIndex(e,q.key.path.popLast());return Lt.resolve(D)}lookupMutationBatch(e,t){return Lt.resolve(this.Is(t))}getNextMutationBatchAfterBatchId(e,t){const m=this.Ts(t+1),E=m<0?0:m;return Lt.resolve(this.mutationQueue.length>E?this.mutationQueue[E]:null)}getHighestUnacknowledgedBatchId(){return Lt.resolve(0===this.mutationQueue.length?-1:this.ys-1)}getAllMutationBatches(e){return Lt.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const l=new wo(t,0),m=new wo(t,Number.POSITIVE_INFINITY),E=[];return this.ps.forEachInRange([l,m],D=>{const q=this.Is(D.gs);E.push(q)}),Lt.resolve(E)}getAllMutationBatchesAffectingDocumentKeys(e,t){let l=new Ai(On);return t.forEach(m=>{const E=new wo(m,0),D=new wo(m,Number.POSITIVE_INFINITY);this.ps.forEachInRange([E,D],q=>{l=l.add(q.gs)})}),Lt.resolve(this.Es(l))}getAllMutationBatchesAffectingQuery(e,t){const l=t.path,m=l.length+1;let E=l;Ln.isDocumentKey(E)||(E=E.child(""));const D=new wo(new Ln(E),0);let q=new Ai(On);return this.ps.forEachWhile(fe=>{const Ce=fe.key.path;return!!l.isPrefixOf(Ce)&&(Ce.length===m&&(q=q.add(fe.gs)),!0)},D),Lt.resolve(this.Es(q))}Es(e){const t=[];return e.forEach(l=>{const m=this.Is(l);null!==m&&t.push(m)}),t}removeMutationBatch(e,t){ir(0===this.As(t.batchId,"removed")),this.mutationQueue.shift();let l=this.ps;return Lt.forEach(t.mutations,m=>{const E=new wo(m.key,t.batchId);return l=l.delete(E),this.referenceDelegate.markPotentiallyOrphaned(e,m.key)}).next(()=>{this.ps=l})}bn(e){}containsKey(e,t){const l=new wo(t,0),m=this.ps.firstAfterOrEqual(l);return Lt.resolve(t.isEqual(m&&m.key))}performConsistencyCheck(e){return Lt.resolve()}As(e,t){return this.Ts(e)}Ts(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}Is(e){const t=this.Ts(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class Tp{constructor(e){this.Rs=e,this.docs=new as(Ln.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){const l=t.key,m=this.docs.get(l),E=m?m.size:0,D=this.Rs(t);return this.docs=this.docs.insert(l,{document:t.mutableCopy(),size:D}),this.size+=D-E,this.indexManager.addToCollectionParentIndex(e,l.path.popLast())}removeEntry(e){const t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){const l=this.docs.get(t);return Lt.resolve(l?l.document.mutableCopy():Bi.newInvalidDocument(t))}getEntries(e,t){let l=Io();return t.forEach(m=>{const E=this.docs.get(m);l=l.insert(m,E?E.document.mutableCopy():Bi.newInvalidDocument(m))}),Lt.resolve(l)}getDocumentsMatchingQuery(e,t,l,m){let E=Io();const D=t.path,q=new Ln(D.child("")),fe=this.docs.getIteratorFrom(q);for(;fe.hasNext();){const{key:Ce,value:{document:je}}=fe.getNext();if(!D.isPrefixOf(Ce.path))break;Ce.path.length>D.length+1||Ss(ul(je),l)<=0||(m.has(je.key)||el(t,je))&&(E=E.insert(je.key,je.mutableCopy()))}return Lt.resolve(E)}getAllFromCollectionGroup(e,t,l,m){Qn()}bs(e,t){return Lt.forEach(this.docs,l=>t(l))}newChangeBuffer(e){return new Jm(this)}getSize(e){return Lt.resolve(this.size)}}class Jm extends Km{constructor(e){super(),this.Xn=e}applyChanges(e){const t=[];return this.changes.forEach((l,m)=>{m.isValidDocument()?t.push(this.Xn.addEntry(e,m)):this.Xn.removeEntry(l)}),Lt.waitFor(t)}getFromCache(e,t){return this.Xn.getEntry(e,t)}getAllFromCache(e,t){return this.Xn.getEntries(e,t)}}class Dp{constructor(e){this.persistence=e,this.vs=new bo(t=>Uo(t),Vl),this.lastRemoteSnapshotVersion=Hn.min(),this.highestTargetId=0,this.Ps=0,this.Vs=new th,this.targetCount=0,this.Ss=_c.Vn()}forEachTarget(e,t){return this.vs.forEach((l,m)=>t(m)),Lt.resolve()}getLastRemoteSnapshotVersion(e){return Lt.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return Lt.resolve(this.Ps)}allocateTargetId(e){return this.highestTargetId=this.Ss.next(),Lt.resolve(this.highestTargetId)}setTargetsMetadata(e,t,l){return l&&(this.lastRemoteSnapshotVersion=l),t>this.Ps&&(this.Ps=t),Lt.resolve()}xn(e){this.vs.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this.Ss=new _c(t),this.highestTargetId=t),e.sequenceNumber>this.Ps&&(this.Ps=e.sequenceNumber)}addTargetData(e,t){return this.xn(t),this.targetCount+=1,Lt.resolve()}updateTargetData(e,t){return this.xn(t),Lt.resolve()}removeTargetData(e,t){return this.vs.delete(t.target),this.Vs.ds(t.targetId),this.targetCount-=1,Lt.resolve()}removeTargets(e,t,l){let m=0;const E=[];return this.vs.forEach((D,q)=>{q.sequenceNumber<=t&&null===l.get(q.targetId)&&(this.vs.delete(D),E.push(this.removeMatchingKeysForTargetId(e,q.targetId)),m++)}),Lt.waitFor(E).next(()=>m)}getTargetCount(e){return Lt.resolve(this.targetCount)}getTargetData(e,t){const l=this.vs.get(t)||null;return Lt.resolve(l)}addMatchingKeys(e,t,l){return this.Vs.hs(t,l),Lt.resolve()}removeMatchingKeys(e,t,l){this.Vs.fs(t,l);const m=this.persistence.referenceDelegate,E=[];return m&&t.forEach(D=>{E.push(m.markPotentiallyOrphaned(e,D))}),Lt.waitFor(E)}removeMatchingKeysForTargetId(e,t){return this.Vs.ds(t),Lt.resolve()}getMatchingKeysForTargetId(e,t){const l=this.Vs.ws(t);return Lt.resolve(l)}containsKey(e,t){return Lt.resolve(this.Vs.containsKey(t))}}class ff{constructor(e,t){this.Ds={},this.overlays={},this.Cs=new Ws(0),this.xs=!1,this.xs=!0,this.referenceDelegate=e(this),this.Ns=new Dp(this),this.indexManager=new Cp,this.remoteDocumentCache=new Tp(l=>this.referenceDelegate.ks(l)),this.Tt=new vp(t),this.Os=new Qm(this.Tt)}start(){return Promise.resolve()}shutdown(){return this.xs=!1,Promise.resolve()}get started(){return this.xs}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new _y,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let l=this.Ds[e.toKey()];return l||(l=new wp(t,this.referenceDelegate),this.Ds[e.toKey()]=l),l}getTargetCache(){return this.Ns}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Os}runTransaction(e,t,l){fn("MemoryPersistence","Starting transaction:",e);const m=new eg(this.Cs.next());return this.referenceDelegate.Ms(),l(m).next(E=>this.referenceDelegate.Fs(m).next(()=>E)).toPromise().then(E=>(m.raiseOnCommittedEvent(),E))}$s(e,t){return Lt.or(Object.values(this.Ds).map(l=>()=>l.containsKey(e,t)))}}class eg extends Ca{constructor(e){super(),this.currentSequenceNumber=e}}class ca{constructor(e){this.persistence=e,this.Bs=new th,this.Ls=null}static qs(e){return new ca(e)}get Us(){if(this.Ls)return this.Ls;throw Qn()}addReference(e,t,l){return this.Bs.addReference(l,t),this.Us.delete(l.toString()),Lt.resolve()}removeReference(e,t,l){return this.Bs.removeReference(l,t),this.Us.add(l.toString()),Lt.resolve()}markPotentiallyOrphaned(e,t){return this.Us.add(t.toString()),Lt.resolve()}removeTarget(e,t){this.Bs.ds(t.targetId).forEach(m=>this.Us.add(m.toString()));const l=this.persistence.getTargetCache();return l.getMatchingKeysForTargetId(e,t.targetId).next(m=>{m.forEach(E=>this.Us.add(E.toString()))}).next(()=>l.removeTargetData(e,t))}Ms(){this.Ls=new Set}Fs(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Lt.forEach(this.Us,l=>{const m=Ln.fromPath(l);return this.Ks(e,m).next(E=>{E||t.removeEntry(m,Hn.min())})}).next(()=>(this.Ls=null,t.apply(e)))}updateLimboDocument(e,t){return this.Ks(e,t).next(l=>{l?this.Us.delete(t.toString()):this.Us.add(t.toString())})}ks(e){return 0}Ks(e,t){return Lt.or([()=>Lt.resolve(this.Bs.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.$s(e,t)])}}class mf{constructor(e,t,l,m){this.targetId=e,this.fromCache=t,this.Ci=l,this.xi=m}static Ni(e,t){let l=qr(),m=qr();for(const E of t.docChanges)switch(E.type){case 0:l=l.add(E.doc.key);break;case 1:m=m.add(E.doc.key)}return new mf(e,t.fromCache,l,m)}}class Ap{constructor(){this.ki=!1}initialize(e,t){this.Oi=e,this.indexManager=t,this.ki=!0}getDocumentsMatchingQuery(e,t,l,m){return this.Mi(e,t).next(E=>E||this.Fi(e,t,m,l)).next(E=>E||this.$i(e,t))}Mi(e,t){if(mu(t))return Lt.resolve(null);let l=Hi(t);return this.indexManager.getIndexType(e,l).next(m=>0===m?null:(null!==t.limit&&1===m&&(t=Qa(t,null,"F"),l=Hi(t)),this.indexManager.getDocumentsMatchingTarget(e,l).next(E=>{const D=qr(...E);return this.Oi.getDocuments(e,D).next(q=>this.indexManager.getMinOffset(e,l).next(fe=>{const Ce=this.Bi(t,q);return this.Li(t,Ce,D,fe.readTime)?this.Mi(e,Qa(t,null,"F")):this.qi(e,Ce,t,fe)}))})))}Fi(e,t,l,m){return mu(t)||m.isEqual(Hn.min())?this.$i(e,t):this.Oi.getDocuments(e,l).next(E=>{const D=this.Bi(t,E);return this.Li(t,D,l,m)?this.$i(e,t):(Hs()<=A.in.DEBUG&&fn("QueryEngine","Re-using previous result from %s to execute query: %s",m.toString(),uc(t)),this.qi(e,D,t,function Ea(s,e){const t=s.toTimestamp().seconds,l=s.toTimestamp().nanoseconds+1,m=Hn.fromTimestamp(1e9===l?new Nr(t+1,0):new Nr(t,l));return new Qs(m,Ln.empty(),e)}(m,-1)))})}Bi(e,t){let l=new Ai(Ul(e));return t.forEach((m,E)=>{el(e,E)&&(l=l.add(E))}),l}Li(e,t,l,m){if(null===e.limit)return!1;if(l.size!==t.size)return!0;const E="F"===e.limitType?t.last():t.first();return!!E&&(E.hasPendingWrites||E.version.compareTo(m)>0)}$i(e,t){return Hs()<=A.in.DEBUG&&fn("QueryEngine","Using full collection scan to execute query:",uc(t)),this.Oi.getDocumentsMatchingQuery(e,t,Qs.min())}qi(e,t,l,m){return this.Oi.getDocumentsMatchingQuery(e,l,m).next(E=>(t.forEach(D=>{E=E.insert(D.key,D)}),E))}}class ng{constructor(e,t,l,m){this.persistence=e,this.Ui=t,this.Tt=m,this.Ki=new as(On),this.Gi=new bo(E=>Uo(E),Vl),this.Qi=new Map,this.ji=e.getRemoteDocumentCache(),this.Ns=e.getTargetCache(),this.Os=e.getBundleCache(),this.zi(l)}zi(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new hf(this.ji,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.ji.setIndexManager(this.indexManager),this.Ui.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.Ki))}}function gf(s,e){return md.apply(this,arguments)}function md(){return md=(0,n.Z)(function*(s,e){const t=Nn(s);return yield t.persistence.runTransaction("Handle user change","readonly",l=>{let m;return t.mutationQueue.getAllMutationBatches(l).next(E=>(m=E,t.zi(e),t.mutationQueue.getAllMutationBatches(l))).next(E=>{const D=[],q=[];let fe=qr();for(const Ce of m){D.push(Ce.batchId);for(const je of Ce.mutations)fe=fe.add(je.key)}for(const Ce of E){q.push(Ce.batchId);for(const je of Ce.mutations)fe=fe.add(je.key)}return t.localDocuments.getDocuments(l,fe).next(Ce=>({Wi:Ce,removedBatchIds:D,addedBatchIds:q}))})})}),md.apply(this,arguments)}function y(s){const e=Nn(s);return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.Ns.getLastRemoteSnapshotVersion(t))}function C(s,e){const t=Nn(s);return t.persistence.runTransaction("Get next mutation batch","readonly",l=>(void 0===e&&(e=-1),t.mutationQueue.getNextMutationBatchAfterBatchId(l,e)))}function ne(s,e,t){return de.apply(this,arguments)}function de(){return de=(0,n.Z)(function*(s,e,t){const l=Nn(s),m=l.Ki.get(e),E=t?"readwrite":"readwrite-primary";try{t||(yield l.persistence.runTransaction("Release target",E,D=>l.persistence.referenceDelegate.removeTarget(D,m)))}catch(D){if(!Jo(D))throw D;fn("LocalStore",`Failed to update sequence numbers for target ${e}: ${D}`)}l.Ki=l.Ki.remove(e),l.Gi.delete(m.target)}),de.apply(this,arguments)}function Ne(s,e,t){const l=Nn(s);let m=Hn.min(),E=qr();return l.persistence.runTransaction("Execute query","readonly",D=>function(q,fe,Ce){const je=Nn(q),ht=je.Gi.get(Ce);return void 0!==ht?Lt.resolve(je.Ki.get(ht)):je.Ns.getTargetData(fe,Ce)}(l,D,Hi(e)).next(q=>{if(q)return m=q.lastLimboFreeSnapshotVersion,l.Ns.getMatchingKeysForTargetId(D,q.targetId).next(fe=>{E=fe})}).next(()=>l.Ui.getDocumentsMatchingQuery(D,e,t?m:Hn.min(),t?E:qr())).next(q=>(function Bt(s,e,t){let l=s.Qi.get(e)||Hn.min();t.forEach((m,E)=>{E.readTime.compareTo(l)>0&&(l=E.readTime)}),s.Qi.set(e,l)}(l,function Rc(s){return s.collectionGroup||(s.path.length%2==1?s.path.lastSegment():s.path.get(s.path.length-2))}(e),q),{documents:q,Yi:E})))}class Zc{constructor(){this.activeTargetIds=pc()}sr(e){this.activeTargetIds=this.activeTargetIds.add(e)}ir(e){this.activeTargetIds=this.activeTargetIds.delete(e)}nr(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class Rp{constructor(){this.Ur=new Zc,this.Kr={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,l){}addLocalQueryTarget(e){return this.Ur.sr(e),this.Kr[e]||"not-current"}updateQueryState(e,t,l){this.Kr[e]=t}removeLocalQueryTarget(e){this.Ur.ir(e)}isLocalQueryTarget(e){return this.Ur.activeTargetIds.has(e)}clearQueryState(e){delete this.Kr[e]}getAllActiveQueryTargets(){return this.Ur.activeTargetIds}isActiveQueryTarget(e){return this.Ur.activeTargetIds.has(e)}start(){return this.Ur=new Zc,Promise.resolve()}handleUserChange(e,t,l){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class yf{Gr(e){}shutdown(){}}class rg{constructor(){this.Qr=()=>this.jr(),this.zr=()=>this.Wr(),this.Hr=[],this.Jr()}Gr(e){this.Hr.push(e)}shutdown(){window.removeEventListener("online",this.Qr),window.removeEventListener("offline",this.zr)}Jr(){window.addEventListener("online",this.Qr),window.addEventListener("offline",this.zr)}jr(){fn("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.Hr)e(0)}Wr(){fn("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.Hr)e(1)}static C(){return typeof window<"u"&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}const ig={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class Ey{constructor(e){this.Yr=e.Yr,this.Zr=e.Zr}Xr(e){this.eo=e}no(e){this.so=e}onMessage(e){this.io=e}close(){this.Zr()}send(e){this.Yr(e)}ro(){this.eo()}oo(e){this.so(e)}uo(e){this.io(e)}}class Cy extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId,this.co=(e.ssl?"https":"http")+"://"+e.host,this.ao="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}get ho(){return!1}lo(e,t,l,m,E){const D=this.fo(e,t);fn("RestConnection","Sending: ",D,l);const q={};return this._o(q,m,E),this.wo(e,D,q,l).then(fe=>(fn("RestConnection","Received: ",fe),fe),fe=>{throw go("RestConnection",`${e} failed with error: `,fe,"url: ",D,"request:",l),fe})}mo(e,t,l,m,E,D){return this.lo(e,t,l,m,E)}_o(e,t,l){e["X-Goog-Api-Client"]="gl-js/ fire/"+Qo,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((m,E)=>e[E]=m),l&&l.headers.forEach((m,E)=>e[E]=m)}fo(e,t){return`${this.co}/v1/${t}:${ig[e]}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams}wo(e,t,l,m){return new Promise((E,D)=>{const q=new rc;q.setWithCredentials(!0),q.listenOnce(Ba.COMPLETE,()=>{try{switch(q.getLastErrorCode()){case Xo.NO_ERROR:const Ce=q.getResponseJson();fn("Connection","XHR received:",JSON.stringify(Ce)),E(Ce);break;case Xo.TIMEOUT:fn("Connection",'RPC "'+e+'" timed out'),D(new j(Wt.DEADLINE_EXCEEDED,"Request time out"));break;case Xo.HTTP_ERROR:const je=q.getStatus();if(fn("Connection",'RPC "'+e+'" failed with status:',je,"response text:",q.getResponseText()),je>0){let ht=q.getResponseJson();Array.isArray(ht)&&(ht=ht[0]);const Ft=ht?.error;if(Ft&&Ft.status&&Ft.message){const on=function(dn){const Jn=dn.toLowerCase().replace(/_/g,"-");return Object.values(Wt).indexOf(Jn)>=0?Jn:Wt.UNKNOWN}(Ft.status);D(new j(on,Ft.message))}else D(new j(Wt.UNKNOWN,"Server responded with status "+q.getStatus()))}else D(new j(Wt.UNAVAILABLE,"Connection failed."));break;default:Qn()}}finally{fn("Connection",'RPC "'+e+'" completed.')}});const fe=JSON.stringify(m);q.send(t,"POST",fe,l,15)})}yo(e,t,l){const m=[this.co,"/","google.firestore.v1.Firestore","/",e,"/channel"],E=va(),D=mo(),q={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(q.xmlHttpFactory=new Ml({})),this._o(q.initMessageHeaders,t,l),q.encodeInitMessageHeaders=!0;const fe=m.join("");fn("Connection","Creating WebChannel: "+fe,q);const Ce=E.createWebChannel(fe,q);let je=!1,ht=!1;const Ft=new Ey({Yr:dn=>{ht?fn("Connection","Not sending because WebChannel is closed:",dn):(je||(fn("Connection","Opening WebChannel transport."),Ce.open(),je=!0),fn("Connection","WebChannel sending:",dn),Ce.send(dn))},Zr:()=>Ce.close()}),on=(dn,Jn,wr)=>{dn.listen(Jn,ds=>{try{wr(ds)}catch(As){setTimeout(()=>{throw As},0)}})};return on(Ce,Va.EventType.OPEN,()=>{ht||fn("Connection","WebChannel transport opened.")}),on(Ce,Va.EventType.CLOSE,()=>{ht||(ht=!0,fn("Connection","WebChannel transport closed"),Ft.oo())}),on(Ce,Va.EventType.ERROR,dn=>{ht||(ht=!0,go("Connection","WebChannel transport errored:",dn),Ft.oo(new j(Wt.UNAVAILABLE,"The operation could not be completed")))}),on(Ce,Va.EventType.MESSAGE,dn=>{var Jn;if(!ht){const wr=dn.data[0];ir(!!wr);const As=wr.error||(null===(Jn=wr[0])||void 0===Jn?void 0:Jn.error);if(As){fn("Connection","WebChannel received error:",As);const zi=As.status;let Do=function(ji){const qo=cs[ji];if(void 0!==qo)return Fc(qo)}(zi),hs=As.message;void 0===Do&&(Do=Wt.INTERNAL,hs="Unknown error status: "+zi+" with message "+As.message),ht=!0,Ft.oo(new j(Do,hs)),Ce.close()}else fn("Connection","WebChannel received:",wr),Ft.uo(wr)}}),on(D,_a.STAT_EVENT,dn=>{dn.stat===Pl.PROXY?fn("Connection","Detected buffering proxy"):dn.stat===Pl.NOPROXY&&fn("Connection","Detected no buffering proxy")}),setTimeout(()=>{Ft.ro()},0),Ft}}function vf(){return typeof document<"u"?document:null}function ah(s){return new nl(s,!0)}class _f{constructor(e,t,l=1e3,m=1.5,E=6e4){this.Ys=e,this.timerId=t,this.po=l,this.Io=m,this.To=E,this.Eo=0,this.Ao=null,this.Ro=Date.now(),this.reset()}reset(){this.Eo=0}bo(){this.Eo=this.To}vo(e){this.cancel();const t=Math.floor(this.Eo+this.Po()),l=Math.max(0,Date.now()-this.Ro),m=Math.max(0,t-l);m>0&&fn("ExponentialBackoff",`Backing off for ${m} ms (base delay: ${this.Eo} ms, delay with jitter: ${t} ms, last attempt: ${l} ms ago)`),this.Ao=this.Ys.enqueueAfterDelay(this.timerId,m,()=>(this.Ro=Date.now(),e())),this.Eo*=this.Io,this.Eothis.To&&(this.Eo=this.To)}Vo(){null!==this.Ao&&(this.Ao.skipDelay(),this.Ao=null)}cancel(){null!==this.Ao&&(this.Ao.cancel(),this.Ao=null)}Po(){return(Math.random()-.5)*this.Eo}}class og{constructor(e,t,l,m,E,D,q,fe){this.Ys=e,this.So=l,this.Do=m,this.connection=E,this.authCredentialsProvider=D,this.appCheckCredentialsProvider=q,this.listener=fe,this.state=0,this.Co=0,this.xo=null,this.No=null,this.stream=null,this.ko=new _f(e,t)}Oo(){return 1===this.state||5===this.state||this.Mo()}Mo(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.Fo()}stop(){var e=this;return(0,n.Z)(function*(){e.Oo()&&(yield e.close(0))})()}$o(){this.state=0,this.ko.reset()}Bo(){this.Mo()&&null===this.xo&&(this.xo=this.Ys.enqueueAfterDelay(this.So,6e4,()=>this.Lo()))}qo(e){this.Uo(),this.stream.send(e)}Lo(){var e=this;return(0,n.Z)(function*(){if(e.Mo())return e.close(0)})()}Uo(){this.xo&&(this.xo.cancel(),this.xo=null)}Ko(){this.No&&(this.No.cancel(),this.No=null)}close(e,t){var l=this;return(0,n.Z)(function*(){l.Uo(),l.Ko(),l.ko.cancel(),l.Co++,4!==e?l.ko.reset():t&&t.code===Wt.RESOURCE_EXHAUSTED?(Di(t.toString()),Di("Using maximum backoff delay to prevent overloading the backend."),l.ko.bo()):t&&t.code===Wt.UNAUTHENTICATED&&3!==l.state&&(l.authCredentialsProvider.invalidateToken(),l.appCheckCredentialsProvider.invalidateToken()),null!==l.stream&&(l.Go(),l.stream.close(),l.stream=null),l.state=e,yield l.listener.no(t)})()}Go(){}auth(){this.state=1;const e=this.Qo(this.Co),t=this.Co;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([l,m])=>{this.Co===t&&this.jo(l,m)},l=>{e(()=>{const m=new j(Wt.UNKNOWN,"Fetching auth token failed: "+l.message);return this.zo(m)})})}jo(e,t){const l=this.Qo(this.Co);this.stream=this.Wo(e,t),this.stream.Xr(()=>{l(()=>(this.state=2,this.No=this.Ys.enqueueAfterDelay(this.Do,1e4,()=>(this.Mo()&&(this.state=3),Promise.resolve())),this.listener.Xr()))}),this.stream.no(m=>{l(()=>this.zo(m))}),this.stream.onMessage(m=>{l(()=>this.onMessage(m))})}Fo(){var e=this;this.state=5,this.ko.vo((0,n.Z)(function*(){e.state=0,e.start()}))}zo(e){return fn("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}Qo(e){return t=>{this.Ys.enqueueAndForget(()=>this.Co===e?t():(fn("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class ag extends og{constructor(e,t,l,m,E,D){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,l,m,D),this.Tt=E}Wo(e,t){return this.connection.yo("Listen",e,t)}onMessage(e){this.ko.reset();const t=function ap(s,e){let t;if("targetChange"in e){const l="NO_CHANGE"===(fe=e.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===fe?1:"REMOVE"===fe?2:"CURRENT"===fe?3:"RESET"===fe?4:Qn(),m=e.targetChange.targetIds||[],E=function(fe,Ce){return fe.yt?(ir(void 0===Ce||"string"==typeof Ce),Ns.fromBase64String(Ce||"")):(ir(void 0===Ce||Ce instanceof Uint8Array),Ns.fromUint8Array(Ce||new Uint8Array))}(s,e.targetChange.resumeToken),D=e.targetChange.cause,q=D&&function(fe){const Ce=void 0===fe.code?Wt.UNKNOWN:Fc(fe.code);return new j(Ce,fe.message||"")}(D);t=new So(l,m,E,q||null)}else if("documentChange"in e){const l=e.documentChange,m=oa(s,l.document.name),E=Ts(l.document.updateTime),D=l.document.createTime?Ts(l.document.createTime):Hn.min(),q=new ws({mapValue:{fields:l.document.fields}}),fe=Bi.newFoundDocument(m,E,D,q);t=new gc(l.targetIds||[],l.removedTargetIds||[],fe.key,fe)}else if("documentDelete"in e){const l=e.documentDelete,m=oa(s,l.document),E=l.readTime?Ts(l.readTime):Hn.min(),D=Bi.newNoDocument(m,E);t=new gc([],l.removedTargetIds||[],D.key,D)}else if("documentRemove"in e){const l=e.documentRemove,m=oa(s,l.document);t=new gc([],l.removedTargetIds||[],m,null)}else{if(!("filter"in e))return Qn();{const l=e.filter,E=new Ma(l.count||0);t=new $d(l.targetId,E)}}var fe;return t}(this.Tt,e),l=function(m){if(!("targetChange"in m))return Hn.min();const E=m.targetChange;return E.targetIds&&E.targetIds.length?Hn.min():E.readTime?Ts(E.readTime):Hn.min()}(e);return this.listener.Ho(t,l)}Jo(e){const t={};t.database=_l(this.Tt),t.addTarget=function(m,E){let D;const q=E.target;return D=fl(q)?{documents:Gh(m,q)}:{query:nd(m,q)},D.targetId=E.targetId,E.resumeToken.approximateByteSize()>0?D.resumeToken=Bh(m,E.resumeToken):E.snapshotVersion.compareTo(Hn.min())>0&&(D.readTime=Iu(m,E.snapshotVersion.toTimestamp())),D}(this.Tt,e);const l=function Hd(s,e){const t=function(l,m){switch(m){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return Qn()}}(0,e.purpose);return null==t?null:{"goog-listen-tags":t}}(0,e);l&&(t.labels=l),this.qo(t)}Yo(e){const t={};t.database=_l(this.Tt),t.removeTarget=e,this.qo(t)}}class lg extends og{constructor(e,t,l,m,E,D){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,l,m,D),this.Tt=E,this.Zo=!1}get Xo(){return this.Zo}start(){this.Zo=!1,this.lastStreamToken=void 0,super.start()}Go(){this.Zo&&this.tu([])}Wo(e,t){return this.connection.yo("Write",e,t)}onMessage(e){if(ir(!!e.streamToken),this.lastStreamToken=e.streamToken,this.Zo){this.ko.reset();const t=function td(s,e){return s&&s.length>0?(ir(void 0!==e),s.map(t=>function(l,m){let E=Ts(l.updateTime?l.updateTime:m);return E.isEqual(Hn.min())&&(E=Ts(m)),new Xe(E,l.transformResults||[])}(t,e))):[]}(e.writeResults,e.commitTime),l=Ts(e.commitTime);return this.listener.eu(l,t)}return ir(!e.writeResults||0===e.writeResults.length),this.Zo=!0,this.listener.nu()}su(){const e={};e.database=_l(this.Tt),this.qo(e)}tu(e){const t={streamToken:this.lastStreamToken,writes:e.map(l=>function Vc(s,e){let t;if(e instanceof pa)t={update:op(s,e.key,e.value)};else if(e instanceof ma)t={delete:Su(s,e.key)};else if(e instanceof oo)t={update:op(s,e.key,e.data),updateMask:up(e.fieldMask)};else{if(!(e instanceof Pa))return Qn();t={verify:Su(s,e.key)}}return e.fieldTransforms.length>0&&(t.updateTransforms=e.fieldTransforms.map(l=>function(m,E){const D=E.transform;if(D instanceof ra)return{fieldPath:E.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(D instanceof tl)return{fieldPath:E.field.canonicalString(),appendMissingElements:{values:D.elements}};if(D instanceof gl)return{fieldPath:E.field.canonicalString(),removeAllFromArray:{values:D.elements}};if(D instanceof W)return{fieldPath:E.field.canonicalString(),increment:D.It};throw Qn()}(0,l))),e.precondition.isNone||(t.currentDocument=void 0!==(m=e.precondition).updateTime?{updateTime:Bm(s,m.updateTime)}:void 0!==m.exists?{exists:m.exists}:Qn()),t;var m}(this.Tt,l))};this.qo(t)}}class kp extends class{}{constructor(e,t,l,m){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=l,this.Tt=m,this.iu=!1}ru(){if(this.iu)throw new j(Wt.FAILED_PRECONDITION,"The client has already been terminated.")}lo(e,t,l){return this.ru(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([m,E])=>this.connection.lo(e,t,l,m,E)).catch(m=>{throw"FirebaseError"===m.name?(m.code===Wt.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),m):new j(Wt.UNKNOWN,m.toString())})}mo(e,t,l,m){return this.ru(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([E,D])=>this.connection.mo(e,t,l,E,D,m)).catch(E=>{throw"FirebaseError"===E.name?(E.code===Wt.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),E):new j(Wt.UNKNOWN,E.toString())})}terminate(){this.iu=!0}}class by{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.ou=0,this.uu=null,this.cu=!0}au(){0===this.ou&&(this.hu("Unknown"),this.uu=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.uu=null,this.lu("Backend didn't respond within 10 seconds."),this.hu("Offline"),Promise.resolve())))}fu(e){"Online"===this.state?this.hu("Unknown"):(this.ou++,this.ou>=1&&(this.du(),this.lu(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.hu("Offline")))}set(e){this.du(),this.ou=0,"Online"===e&&(this.cu=!1),this.hu(e)}hu(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}lu(e){const t=`Could not reach Cloud Firestore backend. ${e}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.cu?(Di(t),this.cu=!1):fn("OnlineStateTracker",t)}du(){null!==this.uu&&(this.uu.cancel(),this.uu=null)}}class zv{constructor(e,t,l,m,E){var D=this;this.localStore=e,this.datastore=t,this.asyncQueue=l,this.remoteSyncer={},this._u=[],this.wu=new Map,this.mu=new Set,this.gu=[],this.yu=E,this.yu.Gr(q=>{l.enqueueAndForget((0,n.Z)(function*(){var fe;bl(D)&&(fn("RemoteStore","Restarting streams for network reachability change."),yield(fe=(0,n.Z)(function*(Ce){const je=Nn(Ce);je.mu.add(4),yield gd(je),je.pu.set("Unknown"),je.mu.delete(4),yield tc(je)}),function(Ce){return fe.apply(this,arguments)})(D))}))}),this.pu=new by(l,m)}}function tc(s){return Ef.apply(this,arguments)}function Ef(){return Ef=(0,n.Z)(function*(s){if(bl(s))for(const e of s.gu)yield e(!0)}),Ef.apply(this,arguments)}function gd(s){return Cf.apply(this,arguments)}function Cf(){return Cf=(0,n.Z)(function*(s){for(const e of s.gu)yield e(!1)}),Cf.apply(this,arguments)}function bf(s,e){const t=Nn(s);t.wu.has(e.targetId)||(t.wu.set(e.targetId,e),Ou(t)?uh(t):_d(t).Mo()&&yd(t,e))}function ch(s,e){const t=Nn(s),l=_d(t);t.wu.delete(e),l.Mo()&&ku(t,e),0===t.wu.size&&(l.Mo()?l.Bo():bl(t)&&t.pu.set("Unknown"))}function yd(s,e){s.Iu.Ft(e.targetId),_d(s).Jo(e)}function ku(s,e){s.Iu.Ft(e),_d(s).Yo(e)}function uh(s){s.Iu=new ka({getRemoteKeysForTarget:e=>s.remoteSyncer.getRemoteKeysForTarget(e),ie:e=>s.wu.get(e)||null}),_d(s).start(),s.pu.au()}function Ou(s){return bl(s)&&!_d(s).Oo()&&s.wu.size>0}function bl(s){return 0===Nn(s).mu.size}function dh(s){s.Iu=void 0}function cg(s){return hh.apply(this,arguments)}function hh(){return hh=(0,n.Z)(function*(s){s.wu.forEach((e,t)=>{yd(s,e)})}),hh.apply(this,arguments)}function Op(s,e){return fh.apply(this,arguments)}function fh(){return fh=(0,n.Z)(function*(s,e){dh(s),Ou(s)?(s.pu.fu(e),uh(s)):s.pu.set("Unknown")}),fh.apply(this,arguments)}function ug(s,e,t){return ph.apply(this,arguments)}function ph(){return ph=(0,n.Z)(function*(s,e,t){if(s.pu.set("Online"),e instanceof So&&2===e.state&&e.cause)try{yield(l=(0,n.Z)(function*(m,E){const D=E.cause;for(const q of E.targetIds)m.wu.has(q)&&(yield m.remoteSyncer.rejectListen(q,D),m.wu.delete(q),m.Iu.removeTarget(q))}),function(m,E){return l.apply(this,arguments)})(s,e)}catch(l){fn("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),l),yield If(s,l)}else if(e instanceof gc?s.Iu.Qt(e):e instanceof $d?s.Iu.Zt(e):s.Iu.Wt(e),!t.isEqual(Hn.min()))try{const l=yield y(s.localStore);t.compareTo(l)>=0&&(yield function(m,E){const D=m.Iu.ee(E);return D.targetChanges.forEach((q,fe)=>{if(q.resumeToken.approximateByteSize()>0){const Ce=m.wu.get(fe);Ce&&m.wu.set(fe,Ce.withResumeToken(q.resumeToken,E))}}),D.targetMismatches.forEach(q=>{const fe=m.wu.get(q);if(!fe)return;m.wu.set(q,fe.withResumeToken(Ns.EMPTY_BYTE_STRING,fe.snapshotVersion)),ku(m,q);const Ce=new Qi(fe.target,q,1,fe.sequenceNumber);yd(m,Ce)}),m.remoteSyncer.applyRemoteEvent(D)}(s,t))}catch(l){fn("RemoteStore","Failed to raise snapshot:",l),yield If(s,l)}var l}),ph.apply(this,arguments)}function If(s,e,t){return Fp.apply(this,arguments)}function Fp(){return Fp=(0,n.Z)(function*(s,e,t){if(!Jo(e))throw e;s.mu.add(1),yield gd(s),s.pu.set("Offline"),t||(t=()=>y(s.localStore)),s.asyncQueue.enqueueRetryable((0,n.Z)(function*(){fn("RemoteStore","Retrying IndexedDB access"),yield t(),s.mu.delete(1),yield tc(s)}))}),Fp.apply(this,arguments)}function Np(s,e){return e().catch(t=>If(s,t,e))}function vd(s){return Sf.apply(this,arguments)}function Sf(){return Sf=(0,n.Z)(function*(s){const e=Nn(s),t=Xc(e);let l=e._u.length>0?e._u[e._u.length-1].batchId:-1;for(;dg(e);)try{const m=yield C(e.localStore,l);if(null===m){0===e._u.length&&t.Bo();break}l=m.batchId,Iy(e,m)}catch(m){yield If(e,m)}hg(e)&&ga(e)}),Sf.apply(this,arguments)}function dg(s){return bl(s)&&s._u.length<10}function Iy(s,e){s._u.push(e);const t=Xc(s);t.Mo()&&t.Xo&&t.tu(e.mutations)}function hg(s){return bl(s)&&!Xc(s).Oo()&&s._u.length>0}function ga(s){Xc(s).start()}function fg(s){return Lp.apply(this,arguments)}function Lp(){return Lp=(0,n.Z)(function*(s){Xc(s).su()}),Lp.apply(this,arguments)}function jv(s){return mh.apply(this,arguments)}function mh(){return mh=(0,n.Z)(function*(s){const e=Xc(s);for(const t of s._u)e.tu(t.mutations)}),mh.apply(this,arguments)}function pg(s,e,t){return Bp.apply(this,arguments)}function Bp(){return Bp=(0,n.Z)(function*(s,e,t){const l=s._u.shift(),m=wu.from(l,e,t);yield Np(s,()=>s.remoteSyncer.applySuccessfulWrite(m)),yield vd(s)}),Bp.apply(this,arguments)}function Sy(s,e){return Vp.apply(this,arguments)}function Vp(){return Vp=(0,n.Z)(function*(s,e){var t;e&&Xc(s).Xo&&(yield(t=(0,n.Z)(function*(l,m){if(function fc(s){switch(s){default:return Qn();case Wt.CANCELLED:case Wt.UNKNOWN:case Wt.DEADLINE_EXCEEDED:case Wt.RESOURCE_EXHAUSTED:case Wt.INTERNAL:case Wt.UNAVAILABLE:case Wt.UNAUTHENTICATED:return!1;case Wt.INVALID_ARGUMENT:case Wt.NOT_FOUND:case Wt.ALREADY_EXISTS:case Wt.PERMISSION_DENIED:case Wt.FAILED_PRECONDITION:case Wt.ABORTED:case Wt.OUT_OF_RANGE:case Wt.UNIMPLEMENTED:case Wt.DATA_LOSS:return!0}}(E=m.code)&&E!==Wt.ABORTED){const D=l._u.shift();Xc(l).$o(),yield Np(l,()=>l.remoteSyncer.rejectFailedWrite(D.batchId,m)),yield vd(l)}var E}),function(l,m){return t.apply(this,arguments)})(s,e)),hg(s)&&ga(s)}),Vp.apply(this,arguments)}function $p(s,e){return Up.apply(this,arguments)}function Up(){return Up=(0,n.Z)(function*(s,e){const t=Nn(s);t.asyncQueue.verifyOperationInProgress(),fn("RemoteStore","RemoteStore received new credentials");const l=bl(t);t.mu.add(3),yield gd(t),l&&t.pu.set("Unknown"),yield t.remoteSyncer.handleCredentialChange(e),t.mu.delete(3),yield tc(t)}),Up.apply(this,arguments)}function gh(){return gh=(0,n.Z)(function*(s,e){const t=Nn(s);e?(t.mu.delete(2),yield tc(t)):e||(t.mu.add(2),yield gd(t),t.pu.set("Unknown"))}),gh.apply(this,arguments)}function _d(s){return s.Tu||(s.Tu=function(e,t,l){const m=Nn(e);return m.ru(),new ag(t,m.connection,m.authCredentials,m.appCheckCredentials,m.Tt,l)}(s.datastore,s.asyncQueue,{Xr:cg.bind(null,s),no:Op.bind(null,s),Ho:ug.bind(null,s)}),s.gu.push(function(){var e=(0,n.Z)(function*(t){t?(s.Tu.$o(),Ou(s)?uh(s):s.pu.set("Unknown")):(yield s.Tu.stop(),dh(s))});return function(t){return e.apply(this,arguments)}}())),s.Tu}function Xc(s){return s.Eu||(s.Eu=function(e,t,l){const m=Nn(e);return m.ru(),new lg(t,m.connection,m.authCredentials,m.appCheckCredentials,m.Tt,l)}(s.datastore,s.asyncQueue,{Xr:fg.bind(null,s),no:Sy.bind(null,s),nu:jv.bind(null,s),eu:pg.bind(null,s)}),s.gu.push(function(){var e=(0,n.Z)(function*(t){t?(s.Eu.$o(),yield vd(s)):(yield s.Eu.stop(),s._u.length>0&&(fn("RemoteStore",`Stopping write stream with ${s._u.length} pending writes`),s._u=[]))});return function(t){return e.apply(this,arguments)}}())),s.Eu}class Hp{constructor(e,t,l,m,E){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=l,this.op=m,this.removalCallback=E,this.deferred=new ge,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(D=>{})}static createAndSchedule(e,t,l,m,E){const D=Date.now()+l,q=new Hp(e,t,D,m,E);return q.start(l),q}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new j(Wt.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function Ed(s,e){if(Di("AsyncQueue",`${e}: ${s}`),Jo(s))return new j(Wt.UNAVAILABLE,`${e}: ${s}`);throw s}class Cd{constructor(e){this.comparator=e?(t,l)=>e(t,l)||Ln.comparator(t.key,l.key):(t,l)=>Ln.comparator(t.key,l.key),this.keyedMap=Nc(),this.sortedSet=new as(this.comparator)}static emptySet(e){return new Cd(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,l)=>(e(t),!1))}add(e){const t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){const t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof Cd)||this.size!==e.size)return!1;const t=this.sortedSet.getIterator(),l=e.sortedSet.getIterator();for(;t.hasNext();){const m=t.getNext().key,E=l.getNext().key;if(!m.isEqual(E))return!1}return!0}toString(){const e=[];return this.forEach(t=>{e.push(t.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}copy(e,t){const l=new Cd;return l.comparator=this.comparator,l.keyedMap=e,l.sortedSet=t,l}}class Il{constructor(){this.Au=new as(Ln.comparator)}track(e){const t=e.doc.key,l=this.Au.get(t);l?0!==e.type&&3===l.type?this.Au=this.Au.insert(t,e):3===e.type&&1!==l.type?this.Au=this.Au.insert(t,{type:l.type,doc:e.doc}):2===e.type&&2===l.type?this.Au=this.Au.insert(t,{type:2,doc:e.doc}):2===e.type&&0===l.type?this.Au=this.Au.insert(t,{type:0,doc:e.doc}):1===e.type&&0===l.type?this.Au=this.Au.remove(t):1===e.type&&2===l.type?this.Au=this.Au.insert(t,{type:1,doc:l.doc}):0===e.type&&1===l.type?this.Au=this.Au.insert(t,{type:2,doc:e.doc}):Qn():this.Au=this.Au.insert(t,e)}Ru(){const e=[];return this.Au.inorderTraversal((t,l)=>{e.push(l)}),e}}class Qc{constructor(e,t,l,m,E,D,q,fe,Ce){this.query=e,this.docs=t,this.oldDocs=l,this.docChanges=m,this.mutatedKeys=E,this.fromCache=D,this.syncStateChanged=q,this.excludesMetadataChanges=fe,this.hasCachedResults=Ce}static fromInitialDocuments(e,t,l,m,E){const D=[];return t.forEach(q=>{D.push({type:0,doc:q})}),new Qc(e,t,Cd.emptySet(t),D,l,m,!0,!1,E)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Co(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const t=this.docChanges,l=e.docChanges;if(t.length!==l.length)return!1;for(let m=0;mJa(e),Co),this.onlineState="Unknown",this.vu=new Set}}function wf(s,e){return zp.apply(this,arguments)}function zp(){return zp=(0,n.Z)(function*(s,e){const t=Nn(s),l=e.query;let m=!1,E=t.queries.get(l);if(E||(m=!0,E=new wy),m)try{E.bu=yield t.onListen(l)}catch(D){const q=Ed(D,`Initialization of query '${uc(e.query)}' failed`);return void e.onError(q)}t.queries.set(l,E),E.listeners.push(e),e.Pu(t.onlineState),E.bu&&e.Vu(E.bu)&&Kp(t)}),zp.apply(this,arguments)}function jp(s,e){return Wp.apply(this,arguments)}function Wp(){return Wp=(0,n.Z)(function*(s,e){const t=Nn(s),l=e.query;let m=!1;const E=t.queries.get(l);if(E){const D=E.listeners.indexOf(e);D>=0&&(E.listeners.splice(D,1),m=0===E.listeners.length)}if(m)return t.queries.delete(l),t.onUnlisten(l)}),Wp.apply(this,arguments)}function Yp(s,e){const t=Nn(s);let l=!1;for(const m of e){const D=t.queries.get(m.query);if(D){for(const q of D.listeners)q.Vu(m)&&(l=!0);D.bu=m}}l&&Kp(t)}function Dy(s,e,t){const l=Nn(s),m=l.queries.get(e);if(m)for(const E of m.listeners)E.onError(t);l.queries.delete(e)}function Kp(s){s.vu.forEach(e=>{e.next()})}class bd{constructor(e,t,l){this.query=e,this.Su=t,this.Du=!1,this.Cu=null,this.onlineState="Unknown",this.options=l||{}}Vu(e){if(!this.options.includeMetadataChanges){const l=[];for(const m of e.docChanges)3!==m.type&&l.push(m);e=new Qc(e.query,e.docs,e.oldDocs,l,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.Du?this.xu(e)&&(this.Su.next(e),t=!0):this.Nu(e,this.onlineState)&&(this.ku(e),t=!0),this.Cu=e,t}onError(e){this.Su.error(e)}Pu(e){this.onlineState=e;let t=!1;return this.Cu&&!this.Du&&this.Nu(this.Cu,e)&&(this.ku(this.Cu),t=!0),t}Nu(e,t){return!e.fromCache||(!this.options.Ou||!("Offline"!==t))&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}xu(e){return e.docChanges.length>0||!!(e.syncStateChanged||this.Cu&&this.Cu.hasPendingWrites!==e.hasPendingWrites)&&!0===this.options.includeMetadataChanges}ku(e){e=Qc.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Du=!0,this.Su.next(e)}}class Ay{constructor(e){this.key=e}}class Zp{constructor(e){this.key=e}}class Xp{constructor(e,t){this.query=e,this.Ku=t,this.Gu=null,this.hasCachedResults=!1,this.current=!1,this.Qu=qr(),this.mutatedKeys=qr(),this.ju=Ul(e),this.zu=new Cd(this.ju)}get Wu(){return this.Ku}Hu(e,t){const l=t?t.Ju:new Il,m=t?t.zu:this.zu;let E=t?t.mutatedKeys:this.mutatedKeys,D=m,q=!1;const fe="F"===this.query.limitType&&m.size===this.query.limit?m.last():null,Ce="L"===this.query.limitType&&m.size===this.query.limit?m.first():null;if(e.inorderTraversal((je,ht)=>{const Ft=m.get(je),on=el(this.query,ht)?ht:null,dn=!!Ft&&this.mutatedKeys.has(Ft.key),Jn=!!on&&(on.hasLocalMutations||this.mutatedKeys.has(on.key)&&on.hasCommittedMutations);let wr=!1;Ft&&on?Ft.data.isEqual(on.data)?dn!==Jn&&(l.track({type:3,doc:on}),wr=!0):this.Yu(Ft,on)||(l.track({type:2,doc:on}),wr=!0,(fe&&this.ju(on,fe)>0||Ce&&this.ju(on,Ce)<0)&&(q=!0)):!Ft&&on?(l.track({type:0,doc:on}),wr=!0):Ft&&!on&&(l.track({type:1,doc:Ft}),wr=!0,(fe||Ce)&&(q=!0)),wr&&(on?(D=D.add(on),E=Jn?E.add(je):E.delete(je)):(D=D.delete(je),E=E.delete(je)))}),null!==this.query.limit)for(;D.size>this.query.limit;){const je="F"===this.query.limitType?D.last():D.first();D=D.delete(je.key),E=E.delete(je.key),l.track({type:1,doc:je})}return{zu:D,Ju:l,Li:q,mutatedKeys:E}}Yu(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,l){const m=this.zu;this.zu=e.zu,this.mutatedKeys=e.mutatedKeys;const E=e.Ju.Ru();E.sort((Ce,je)=>function(ht,Ft){const on=dn=>{switch(dn){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Qn()}};return on(ht)-on(Ft)}(Ce.type,je.type)||this.ju(Ce.doc,je.doc)),this.Zu(l);const D=t?this.Xu():[],q=0===this.Qu.size&&this.current?1:0,fe=q!==this.Gu;return this.Gu=q,0!==E.length||fe?{snapshot:new Qc(this.query,e.zu,m,E,e.mutatedKeys,0===q,fe,!1,!!l&&l.resumeToken.approximateByteSize()>0),tc:D}:{tc:D}}Pu(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({zu:this.zu,Ju:new Il,mutatedKeys:this.mutatedKeys,Li:!1},!1)):{tc:[]}}ec(e){return!this.Ku.has(e)&&!!this.zu.has(e)&&!this.zu.get(e).hasLocalMutations}Zu(e){e&&(e.addedDocuments.forEach(t=>this.Ku=this.Ku.add(t)),e.modifiedDocuments.forEach(t=>{}),e.removedDocuments.forEach(t=>this.Ku=this.Ku.delete(t)),this.current=e.current)}Xu(){if(!this.current)return[];const e=this.Qu;this.Qu=qr(),this.zu.forEach(l=>{this.ec(l.key)&&(this.Qu=this.Qu.add(l.key))});const t=[];return e.forEach(l=>{this.Qu.has(l)||t.push(new Zp(l))}),this.Qu.forEach(l=>{e.has(l)||t.push(new Ay(l))}),t}nc(e){this.Ku=e.Yi,this.Qu=qr();const t=this.Hu(e.documents);return this.applyChanges(t,!0)}sc(){return Qc.fromInitialDocuments(this.query,this.zu,this.mutatedKeys,0===this.Gu,this.hasCachedResults)}}class mg{constructor(e,t,l){this.query=e,this.targetId=t,this.view=l}}class gg{constructor(e){this.key=e,this.ic=!1}}class Qp{constructor(e,t,l,m,E,D){this.localStore=e,this.remoteStore=t,this.eventManager=l,this.sharedClientState=m,this.currentUser=E,this.maxConcurrentLimboResolutions=D,this.rc={},this.oc=new bo(q=>Ja(q),Co),this.uc=new Map,this.cc=new Set,this.ac=new as(Ln.comparator),this.hc=new Map,this.lc=new th,this.fc={},this.dc=new Map,this._c=_c.Sn(),this.onlineState="Unknown",this.wc=void 0}get isPrimaryClient(){return!0===this.wc}}function Ic(s,e){return Id.apply(this,arguments)}function Id(){return Id=(0,n.Z)(function*(s,e){const t=function Eh(s){const e=Nn(s);return e.remoteStore.remoteSyncer.applyRemoteEvent=vg.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=Eg.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=Yv.bind(null,e),e.rc.Ho=Yp.bind(null,e.eventManager),e.rc.gc=Dy.bind(null,e.eventManager),e}(s);let l,m;const E=t.oc.get(e);if(E)l=E.targetId,t.sharedClientState.addLocalQueryTarget(l),m=E.view.sc();else{const D=yield function V(s,e){const t=Nn(s);return t.persistence.runTransaction("Allocate target","readwrite",l=>{let m;return t.Ns.getTargetData(l,e).next(E=>E?(m=E,Lt.resolve(m)):t.Ns.allocateTargetId(l).next(D=>(m=new Qi(e,D,0,l.currentSequenceNumber),t.Ns.addTargetData(l,m).next(()=>m))))}).then(l=>{const m=t.Ki.get(l.targetId);return(null===m||l.snapshotVersion.compareTo(m.snapshotVersion)>0)&&(t.Ki=t.Ki.insert(l.targetId,l),t.Gi.set(e,l.targetId)),l})}(t.localStore,Hi(e));t.isPrimaryClient&&bf(t.remoteStore,D);const q=t.sharedClientState.addLocalQueryTarget(D.targetId);l=D.targetId,m=yield function Sd(s,e,t,l,m){return Fu.apply(this,arguments)}(t,e,l,"current"===q,D.resumeToken)}return m}),Id.apply(this,arguments)}function Fu(){return Fu=(0,n.Z)(function*(s,e,t,l,m){s.mc=(ht,Ft,on)=>{return(dn=(0,n.Z)(function*(Jn,wr,ds,As){let zi=wr.view.Hu(ds);zi.Li&&(zi=yield Ne(Jn.localStore,wr.query,!1).then(({documents:ji})=>wr.view.Hu(ji,zi)));const Do=As&&As.targetChanges.get(wr.targetId),hs=wr.view.applyChanges(zi,Jn.isPrimaryClient,Do);return im(Jn,wr.targetId,hs.tc),hs.snapshot}),function(Jn,wr,ds,As){return dn.apply(this,arguments)})(s,ht,Ft,on);var dn};const E=yield Ne(s.localStore,e,!0),D=new Xp(e,E.Yi),q=D.Hu(E.documents),fe=mc.createSynthesizedTargetChangeForCurrentChange(t,l&&"Offline"!==s.onlineState,m),Ce=D.applyChanges(q,s.isPrimaryClient,fe);im(s,t,Ce.tc);const je=new mg(e,t,D);return s.oc.set(e,je),s.uc.has(t)?s.uc.get(t).push(e):s.uc.set(t,[e]),Ce.snapshot}),Fu.apply(this,arguments)}function xy(s,e){return Df.apply(this,arguments)}function Df(){return Df=(0,n.Z)(function*(s,e){const t=Nn(s),l=t.oc.get(e),m=t.uc.get(l.targetId);if(m.length>1)return t.uc.set(l.targetId,m.filter(E=>!Co(E,e))),void t.oc.delete(e);t.isPrimaryClient?(t.sharedClientState.removeLocalQueryTarget(l.targetId),t.sharedClientState.isActiveQueryTarget(l.targetId)||(yield ne(t.localStore,l.targetId,!1).then(()=>{t.sharedClientState.clearQueryState(l.targetId),ch(t.remoteStore,l.targetId),wd(t,l.targetId)}).catch(Oo))):(wd(t,l.targetId),yield ne(t.localStore,l.targetId,!0))}),Df.apply(this,arguments)}function Jp(){return Jp=(0,n.Z)(function*(s,e,t){const l=function Jc(s){const e=Nn(s);return e.remoteStore.remoteSyncer.applySuccessfulWrite=Py.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=My.bind(null,e),e}(s);try{const m=yield function(E,D){const q=Nn(E),fe=Nr.now(),Ce=D.reduce((Ft,on)=>Ft.add(on.key),qr());let je,ht;return q.persistence.runTransaction("Locally write mutations","readwrite",Ft=>{let on=Io(),dn=qr();return q.ji.getEntries(Ft,Ce).next(Jn=>{on=Jn,on.forEach((wr,ds)=>{ds.isValidDocument()||(dn=dn.add(wr))})}).next(()=>q.localDocuments.getOverlayedDocuments(Ft,on)).next(Jn=>{je=Jn;const wr=[];for(const ds of D){const As=Ho(ds,je.get(ds.key).overlayedDocument);null!=As&&wr.push(new oo(ds.key,As,Pc(As.value.mapValue),Dt.exists(!0)))}return q.mutationQueue.addMutationBatch(Ft,fe,wr,D)}).next(Jn=>{ht=Jn;const wr=Jn.applyToLocalDocumentSet(je,dn);return q.documentOverlayCache.saveOverlays(Ft,Jn.batchId,wr)})}).then(()=>({batchId:ht.batchId,changes:Cu(je)}))}(l.localStore,e);l.sharedClientState.addPendingMutation(m.batchId),function(E,D,q){let fe=E.fc[E.currentUser.toKey()];fe||(fe=new as(On)),fe=fe.insert(D,q),E.fc[E.currentUser.toKey()]=fe}(l,m.batchId,t),yield Sc(l,m.changes),yield vd(l.remoteStore)}catch(m){const E=Ed(m,"Failed to persist write");t.reject(E)}}),Jp.apply(this,arguments)}function vg(s,e){return Nu.apply(this,arguments)}function Nu(){return Nu=(0,n.Z)(function*(s,e){const t=Nn(s);try{const l=yield function f(s,e){const t=Nn(s),l=e.snapshotVersion;let m=t.Ki;return t.persistence.runTransaction("Apply remote event","readwrite-primary",E=>{const D=t.ji.newChangeBuffer({trackRemovals:!0});m=t.Ki;const q=[];e.targetChanges.forEach((je,ht)=>{const Ft=m.get(ht);if(!Ft)return;q.push(t.Ns.removeMatchingKeys(E,je.removedDocuments,ht).next(()=>t.Ns.addMatchingKeys(E,je.addedDocuments,ht)));let on=Ft.withSequenceNumber(E.currentSequenceNumber);var dn,Jn,wr;e.targetMismatches.has(ht)?on=on.withResumeToken(Ns.EMPTY_BYTE_STRING,Hn.min()).withLastLimboFreeSnapshotVersion(Hn.min()):je.resumeToken.approximateByteSize()>0&&(on=on.withResumeToken(je.resumeToken,l)),m=m.insert(ht,on),Jn=on,wr=je,(0===(dn=Ft).resumeToken.approximateByteSize()||Jn.snapshotVersion.toMicroseconds()-dn.snapshotVersion.toMicroseconds()>=3e8||wr.addedDocuments.size+wr.modifiedDocuments.size+wr.removedDocuments.size>0)&&q.push(t.Ns.updateTargetData(E,on))});let fe=Io(),Ce=qr();if(e.documentUpdates.forEach(je=>{e.resolvedLimboDocuments.has(je)&&q.push(t.persistence.referenceDelegate.updateLimboDocument(E,je))}),q.push(function p(s,e,t){let l=qr(),m=qr();return t.forEach(E=>l=l.add(E)),e.getEntries(s,l).next(E=>{let D=Io();return t.forEach((q,fe)=>{const Ce=E.get(q);fe.isFoundDocument()!==Ce.isFoundDocument()&&(m=m.add(q)),fe.isNoDocument()&&fe.version.isEqual(Hn.min())?(e.removeEntry(q,fe.readTime),D=D.insert(q,fe)):!Ce.isValidDocument()||fe.version.compareTo(Ce.version)>0||0===fe.version.compareTo(Ce.version)&&Ce.hasPendingWrites?(e.addEntry(fe),D=D.insert(q,fe)):fn("LocalStore","Ignoring outdated watch update for ",q,". Current version:",Ce.version," Watch version:",fe.version)}),{Hi:D,Ji:m}})}(E,D,e.documentUpdates).next(je=>{fe=je.Hi,Ce=je.Ji})),!l.isEqual(Hn.min())){const je=t.Ns.getLastRemoteSnapshotVersion(E).next(ht=>t.Ns.setTargetsMetadata(E,E.currentSequenceNumber,l));q.push(je)}return Lt.waitFor(q).next(()=>D.apply(E)).next(()=>t.localDocuments.getLocalViewOfDocuments(E,fe,Ce)).next(()=>fe)}).then(E=>(t.Ki=m,E))}(t.localStore,e);e.targetChanges.forEach((m,E)=>{const D=t.hc.get(E);D&&(ir(m.addedDocuments.size+m.modifiedDocuments.size+m.removedDocuments.size<=1),m.addedDocuments.size>0?D.ic=!0:m.modifiedDocuments.size>0?ir(D.ic):m.removedDocuments.size>0&&(ir(D.ic),D.ic=!1))}),yield Sc(t,l,e)}catch(l){yield Oo(l)}}),Nu.apply(this,arguments)}function _g(s,e,t){const l=Nn(s);if(l.isPrimaryClient&&0===t||!l.isPrimaryClient&&1===t){const m=[];l.oc.forEach((E,D)=>{const q=D.view.Pu(e);q.snapshot&&m.push(q.snapshot)}),function(E,D){const q=Nn(E);q.onlineState=D;let fe=!1;q.queries.forEach((Ce,je)=>{for(const ht of je.listeners)ht.Pu(D)&&(fe=!0)}),fe&&Kp(q)}(l.eventManager,e),m.length&&l.rc.Ho(m),l.onlineState=e,l.isPrimaryClient&&l.sharedClientState.setOnlineState(e)}}function Yv(s,e,t){return em.apply(this,arguments)}function em(){return em=(0,n.Z)(function*(s,e,t){const l=Nn(s);l.sharedClientState.updateQueryState(e,"rejected",t);const m=l.hc.get(e),E=m&&m.key;if(E){let D=new as(Ln.comparator);D=D.insert(E,Bi.newNoDocument(E,Hn.min()));const q=qr().add(E),fe=new Lc(Hn.min(),new Map,new Ai(On),D,q);yield vg(l,fe),l.ac=l.ac.remove(E),l.hc.delete(e),sm(l)}else yield ne(l.localStore,e,!1).then(()=>wd(l,e,t)).catch(Oo)}),em.apply(this,arguments)}function Py(s,e){return tm.apply(this,arguments)}function tm(){return tm=(0,n.Z)(function*(s,e){const t=Nn(s),l=e.batch.batchId;try{const m=yield function xp(s,e){const t=Nn(s);return t.persistence.runTransaction("Acknowledge batch","readwrite-primary",l=>{const m=e.batch.keys(),E=t.ji.newChangeBuffer({trackRemovals:!0});return function(D,q,fe,Ce){const je=fe.batch,ht=je.keys();let Ft=Lt.resolve();return ht.forEach(on=>{Ft=Ft.next(()=>Ce.getEntry(q,on)).next(dn=>{const Jn=fe.docVersions.get(on);ir(null!==Jn),dn.version.compareTo(Jn)<0&&(je.applyToRemoteDocument(dn,fe),dn.isValidDocument()&&(dn.setReadTime(fe.commitVersion),Ce.addEntry(dn)))})}),Ft.next(()=>D.mutationQueue.removeMutationBatch(q,je))}(t,l,e,E).next(()=>E.apply(l)).next(()=>t.mutationQueue.performConsistencyCheck(l)).next(()=>t.documentOverlayCache.removeOverlaysForBatchId(l,m,e.batch.batchId)).next(()=>t.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(l,function(D){let q=qr();for(let fe=0;fe0&&(q=q.add(D.batch.mutations[fe].key));return q}(e))).next(()=>t.localDocuments.getDocuments(l,m))})}(t.localStore,e);vh(t,l,null),Af(t,l),t.sharedClientState.updateMutationState(l,"acknowledged"),yield Sc(t,m)}catch(m){yield Oo(m)}}),tm.apply(this,arguments)}function My(s,e,t){return nm.apply(this,arguments)}function nm(){return nm=(0,n.Z)(function*(s,e,t){const l=Nn(s);try{const m=yield function(E,D){const q=Nn(E);return q.persistence.runTransaction("Reject batch","readwrite-primary",fe=>{let Ce;return q.mutationQueue.lookupMutationBatch(fe,D).next(je=>(ir(null!==je),Ce=je.keys(),q.mutationQueue.removeMutationBatch(fe,je))).next(()=>q.mutationQueue.performConsistencyCheck(fe)).next(()=>q.documentOverlayCache.removeOverlaysForBatchId(fe,Ce,D)).next(()=>q.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(fe,Ce)).next(()=>q.localDocuments.getDocuments(fe,Ce))})}(l.localStore,e);vh(l,e,t),Af(l,e),l.sharedClientState.updateMutationState(e,"rejected",t),yield Sc(l,m)}catch(m){yield Oo(m)}}),nm.apply(this,arguments)}function Af(s,e){(s.dc.get(e)||[]).forEach(t=>{t.resolve()}),s.dc.delete(e)}function vh(s,e,t){const l=Nn(s);let m=l.fc[l.currentUser.toKey()];if(m){const E=m.get(e);E&&(t?E.reject(t):E.resolve(),m=m.remove(e)),l.fc[l.currentUser.toKey()]=m}}function wd(s,e,t=null){s.sharedClientState.removeLocalQueryTarget(e);for(const l of s.uc.get(e))s.oc.delete(l),t&&s.rc.gc(l,t);s.uc.delete(e),s.isPrimaryClient&&s.lc.ds(e).forEach(l=>{s.lc.containsKey(l)||xf(s,l)})}function xf(s,e){s.cc.delete(e.path.canonicalString());const t=s.ac.get(e);null!==t&&(ch(s.remoteStore,t),s.ac=s.ac.remove(e),s.hc.delete(t),sm(s))}function im(s,e,t){for(const l of t)l instanceof Ay?(s.lc.addReference(l.key,e),ky(s,l)):l instanceof Zp?(fn("SyncEngine","Document no longer in limbo: "+l.key),s.lc.removeReference(l.key,e),s.lc.containsKey(l.key)||xf(s,l.key)):Qn()}function ky(s,e){const t=e.key,l=t.path.canonicalString();s.ac.get(t)||s.cc.has(l)||(fn("SyncEngine","New document in limbo: "+t),s.cc.add(l),sm(s))}function sm(s){for(;s.cc.size>0&&s.ac.size{D.push(l.mc(fe,e,t).then(Ce=>{if((Ce||t)&&l.isPrimaryClient&&l.sharedClientState.updateQueryState(fe.targetId,Ce?.fromCache?"not-current":"current"),Ce){m.push(Ce);const je=mf.Ni(fe.targetId,Ce);E.push(je)}}))}),yield Promise.all(D),l.rc.Ho(m),yield(q=(0,n.Z)(function*(fe,Ce){const je=Nn(fe);try{yield je.persistence.runTransaction("notifyLocalViewChanges","readwrite",ht=>Lt.forEach(Ce,Ft=>Lt.forEach(Ft.Ci,on=>je.persistence.referenceDelegate.addReference(ht,Ft.targetId,on)).next(()=>Lt.forEach(Ft.xi,on=>je.persistence.referenceDelegate.removeReference(ht,Ft.targetId,on)))))}catch(ht){if(!Jo(ht))throw ht;fn("LocalStore","Failed to update sequence numbers: "+ht)}for(const ht of Ce){const Ft=ht.targetId;if(!ht.fromCache){const on=je.Ki.get(Ft),Jn=on.withLastLimboFreeSnapshotVersion(on.snapshotVersion);je.Ki=je.Ki.insert(Ft,Jn)}}}),function(fe,Ce){return q.apply(this,arguments)})(l.localStore,E))}),om.apply(this,arguments)}function Oy(s,e){return am.apply(this,arguments)}function am(){return am=(0,n.Z)(function*(s,e){const t=Nn(s);if(!t.currentUser.isEqual(e)){fn("SyncEngine","User change. New user:",e.toKey());const l=yield gf(t.localStore,e);t.currentUser=e,(m=t).dc.forEach(D=>{D.forEach(q=>{q.reject(new j(Wt.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),m.dc.clear(),t.sharedClientState.handleUserChange(e,l.removedBatchIds,l.addedBatchIds),yield Sc(t,l.Wi)}var m}),am.apply(this,arguments)}function Eg(s,e){const t=Nn(s),l=t.hc.get(e);if(l&&l.ic)return qr().add(l.key);{let m=qr();const E=t.uc.get(e);if(!E)return m;for(const D of E){const q=t.oc.get(D);m=m.unionWith(q.view.Wu)}return m}}class Ad{constructor(){this.synchronizeTabs=!1}initialize(e){var t=this;return(0,n.Z)(function*(){t.Tt=ah(e.databaseInfo.databaseId),t.sharedClientState=t.Ic(e),t.persistence=t.Tc(e),yield t.persistence.start(),t.localStore=t.Ec(e),t.gcScheduler=t.Ac(e,t.localStore),t.indexBackfillerScheduler=t.Rc(e,t.localStore)})()}Ac(e,t){return null}Rc(e,t){return null}Ec(e){return function jr(s,e,t,l){return new ng(s,e,t,l)}(this.persistence,new Ap,e.initialUser,this.Tt)}Tc(e){return new ff(ca.qs,this.Tt)}Ic(e){return new Rp}terminate(){var e=this;return(0,n.Z)(function*(){e.gcScheduler&&e.gcScheduler.stop(),yield e.sharedClientState.shutdown(),yield e.persistence.shutdown()})()}}class eu{initialize(e,t){var l=this;return(0,n.Z)(function*(){l.localStore||(l.localStore=e.localStore,l.sharedClientState=e.sharedClientState,l.datastore=l.createDatastore(t),l.remoteStore=l.createRemoteStore(t),l.eventManager=l.createEventManager(t),l.syncEngine=l.createSyncEngine(t,!e.synchronizeTabs),l.sharedClientState.onlineStateHandler=m=>_g(l.syncEngine,m,1),l.remoteStore.remoteSyncer.handleCredentialChange=Oy.bind(null,l.syncEngine),yield function Gp(s,e){return gh.apply(this,arguments)}(l.remoteStore,l.syncEngine.isPrimaryClient))})()}createEventManager(e){return new Ty}createDatastore(e){const t=ah(e.databaseInfo.databaseId),l=new Cy(e.databaseInfo);return new kp(e.authCredentials,e.appCheckCredentials,l,t)}createRemoteStore(e){return t=this.localStore,l=this.datastore,m=e.asyncQueue,E=q=>_g(this.syncEngine,q,0),D=rg.C()?new rg:new yf,new zv(t,l,m,E,D);var t,l,m,E,D}createSyncEngine(e,t){return function(l,m,E,D,q,fe,Ce){const je=new Qp(l,m,E,D,q,fe);return Ce&&(je.wc=!0),je}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}terminate(){return(e=(0,n.Z)(function*(t){const l=Nn(t);fn("RemoteStore","RemoteStore shutting down."),l.mu.add(5),yield gd(l),l.yu.shutdown(),l.pu.set("Unknown")}),function(t){return e.apply(this,arguments)})(this.remoteStore);var e}}class Tc{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.vc(this.observer.next,e)}error(e){this.observer.error?this.vc(this.observer.error,e):Di("Uncaught Error in snapshot listener:",e.toString())}Pc(){this.muted=!0}vc(e,t){this.muted||setTimeout(()=>{this.muted||e(t)},0)}}class Sg{constructor(e,t,l,m){var E=this;this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=l,this.databaseInfo=m,this.user=pi.UNAUTHENTICATED,this.clientId=Fr.R(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(l,function(){var D=(0,n.Z)(function*(q){fn("FirestoreClient","Received user=",q.uid),yield E.authCredentialListener(q),E.user=q});return function(q){return D.apply(this,arguments)}}()),this.appCheckCredentials.start(l,D=>(fn("FirestoreClient","Received new app check token=",D),this.appCheckCredentialListener(D,this.user)))}getConfiguration(){var e=this;return(0,n.Z)(function*(){return{asyncQueue:e.asyncQueue,databaseInfo:e.databaseInfo,clientId:e.clientId,authCredentials:e.authCredentials,appCheckCredentials:e.appCheckCredentials,initialUser:e.user,maxConcurrentLimboResolutions:100}})()}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new j(Wt.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){var e=this;this.asyncQueue.enterRestrictedMode();const t=new ge;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((0,n.Z)(function*(){try{e.onlineComponents&&(yield e.onlineComponents.terminate()),e.offlineComponents&&(yield e.offlineComponents.terminate()),e.authCredentials.shutdown(),e.appCheckCredentials.shutdown(),t.resolve()}catch(l){const m=Ed(l,"Failed to shutdown persistence");t.reject(m)}})),t.promise}}function kf(){return kf=(0,n.Z)(function*(s,e){s.asyncQueue.verifyOperationInProgress(),fn("FirestoreClient","Initializing OfflineComponentProvider");const t=yield s.getConfiguration();yield e.initialize(t);let l=t.initialUser;s.setCredentialChangeListener(function(){var m=(0,n.Z)(function*(E){l.isEqual(E)||(yield gf(e.localStore,E),l=E)});return function(E){return m.apply(this,arguments)}}()),e.persistence.setDatabaseDeletedListener(()=>s.terminate()),s.offlineComponents=e}),kf.apply(this,arguments)}function Of(){return Of=(0,n.Z)(function*(s,e){s.asyncQueue.verifyOperationInProgress();const t=yield Ff(s);fn("FirestoreClient","Initializing OnlineComponentProvider");const l=yield s.getConfiguration();yield e.initialize(t,l),s.setCredentialChangeListener(m=>$p(e.remoteStore,m)),s.setAppCheckTokenChangeListener((m,E)=>$p(e.remoteStore,E)),s.onlineComponents=e}),Of.apply(this,arguments)}function Ff(s){return Nf.apply(this,arguments)}function Nf(){return Nf=(0,n.Z)(function*(s){return s.offlineComponents||(fn("FirestoreClient","Using default OfflineComponentProvider"),yield function dm(s,e){return kf.apply(this,arguments)}(s,new Ad)),s.offlineComponents}),Nf.apply(this,arguments)}function Lf(s){return fm.apply(this,arguments)}function fm(){return fm=(0,n.Z)(function*(s){return s.onlineComponents||(fn("FirestoreClient","Using default OnlineComponentProvider"),yield function hm(s,e){return Of.apply(this,arguments)}(s,new eu)),s.onlineComponents}),fm.apply(this,arguments)}function Rd(s){return kd.apply(this,arguments)}function kd(){return kd=(0,n.Z)(function*(s){const e=yield Lf(s),t=e.eventManager;return t.onListen=Ic.bind(null,e.syncEngine),t.onUnlisten=xy.bind(null,e.syncEngine),t}),kd.apply(this,arguments)}function bh(s,e,t={}){const l=new ge;return s.asyncQueue.enqueueAndForget((0,n.Z)(function*(){return function(m,E,D,q,fe){const Ce=new Tc({next:ht=>{E.enqueueAndForget(()=>jp(m,je));const Ft=ht.docs.has(D);!Ft&&ht.fromCache?fe.reject(new j(Wt.UNAVAILABLE,"Failed to get document because the client is offline.")):Ft&&ht.fromCache&&q&&"server"===q.source?fe.reject(new j(Wt.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):fe.resolve(ht)},error:ht=>fe.reject(ht)}),je=new bd(Xa(D.path),Ce,{includeMetadataChanges:!0,Ou:!0});return wf(m,je)}(yield Rd(s),s.asyncQueue,e,t,l)})),l.promise}const ym=new Map;function Ih(s,e,t){if(!t)throw new j(Wt.INVALID_ARGUMENT,`Function ${s}() cannot be called with an empty ${e}.`)}function Ag(s){if(!Ln.isDocumentKey(s))throw new j(Wt.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${s} has ${s.length}.`)}function vm(s){if(Ln.isDocumentKey(s))throw new j(Wt.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${s} has ${s.length}.`)}function Sh(s){if(void 0===s)return"undefined";if(null===s)return"null";if("string"==typeof s)return s.length>20&&(s=`${s.substring(0,20)}...`),JSON.stringify(s);if("number"==typeof s||"boolean"==typeof s)return""+s;if("object"==typeof s){if(s instanceof Array)return"an array";{const e=(t=s).constructor?t.constructor.name:null;return e?`a custom ${e} object`:"an object"}}var t;return"function"==typeof s?"a function":Qn()}function mi(s,e){if("_delegate"in s&&(s=s._delegate),!(s instanceof e)){if(e.name===s.constructor.name)throw new j(Wt.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const t=Sh(s);throw new j(Wt.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${t}`)}}return s}class xg{constructor(e){var t;if(void 0===e.host){if(void 0!==e.ssl)throw new j(Wt.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new j(Wt.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.useFetchStreams=!!e.useFetchStreams,function Dg(s,e,t,l){if(!0===e&&!0===l)throw new j(Wt.INVALID_ARGUMENT,`${s} and ${t} cannot be used together.`)}("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling)}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class Od{constructor(e,t,l,m){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=l,this._app=m,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new xg({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new j(Wt.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new j(Wt.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new xg(e),void 0!==e.credentials&&(this._authCredentials=function(t){if(!t)return new Re;switch(t.type){case"gapi":return new In(t.client,t.sessionIndex||"0",t.iamToken||null,t.authTokenFactory||null);case"provider":return t.client;default:throw new j(Wt.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){const t=ym.get(e);t&&(fn("ComponentProvider","Removing Datastore"),ym.delete(e),t.terminate())}(this),Promise.resolve()}}class Fs{constructor(e,t,l){this.converter=t,this._key=l,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new wl(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new Fs(this.firestore,e,this._key)}}class lo{constructor(e,t,l){this.converter=t,this._query=l,this.type="query",this.firestore=e}withConverter(e){return new lo(this.firestore,e,this._query)}}class wl extends lo{constructor(e,t,l){super(e,t,Xa(l)),this._path=l,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new Fs(this.firestore,null,new Ln(e))}withConverter(e){return new wl(this.firestore,e,this._path)}}function Mg(s,e,...t){if(s=(0,R.m9)(s),Ih("collection","path",e),s instanceof Od){const l=Rr.fromString(e,...t);return vm(l),new wl(s,null,l)}{if(!(s instanceof Fs||s instanceof wl))throw new j(Wt.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const l=s._path.child(Rr.fromString(e,...t));return vm(l),new wl(s.firestore,null,l)}}function Em(s,e,...t){if(s=(0,R.m9)(s),1===arguments.length&&(e=Fr.R()),Ih("doc","path",e),s instanceof Od){const l=Rr.fromString(e,...t);return Ag(l),new Fs(s,null,new Ln(l))}{if(!(s instanceof Fs||s instanceof wl))throw new j(Wt.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const l=s._path.child(Rr.fromString(e,...t));return Ag(l),new Fs(s.firestore,s instanceof wl?s.converter:null,new Ln(l))}}class Rg{constructor(){this.qc=Promise.resolve(),this.Uc=[],this.Kc=!1,this.Gc=[],this.Qc=null,this.jc=!1,this.zc=!1,this.Wc=[],this.ko=new _f(this,"async_queue_retry"),this.Hc=()=>{const t=vf();t&&fn("AsyncQueue","Visibility state changed to "+t.visibilityState),this.ko.Vo()};const e=vf();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.Hc)}get isShuttingDown(){return this.Kc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Jc(),this.Yc(e)}enterRestrictedMode(e){if(!this.Kc){this.Kc=!0,this.zc=e||!1;const t=vf();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Hc)}}enqueue(e){if(this.Jc(),this.Kc)return new Promise(()=>{});const t=new ge;return this.Yc(()=>this.Kc&&this.zc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Uc.push(e),this.Zc()))}Zc(){var e=this;return(0,n.Z)(function*(){if(0!==e.Uc.length){try{yield e.Uc[0](),e.Uc.shift(),e.ko.reset()}catch(t){if(!Jo(t))throw t;fn("AsyncQueue","Operation failed with retryable error: "+t)}e.Uc.length>0&&e.ko.vo(()=>e.Zc())}})()}Yc(e){const t=this.qc.then(()=>(this.jc=!0,e().catch(l=>{throw this.Qc=l,this.jc=!1,Di("INTERNAL UNHANDLED ERROR: ",function(E){let D=E.message||"";return E.stack&&(D=E.stack.includes(E.message)?E.stack:E.message+"\n"+E.stack),D}(l)),l}).then(l=>(this.jc=!1,l))));return this.qc=t,t}enqueueAfterDelay(e,t,l){this.Jc(),this.Wc.indexOf(e)>-1&&(t=0);const m=Hp.createAndSchedule(this,e,t,l,E=>this.Xc(E));return this.Gc.push(m),m}Jc(){this.Qc&&Qn()}verifyOperationInProgress(){}ta(){var e=this;return(0,n.Z)(function*(){let t;do{t=e.qc,yield t}while(t!==e.qc)})()}ea(e){for(const t of this.Gc)if(t.timerId===e)return!0;return!1}na(e){return this.ta().then(()=>{this.Gc.sort((t,l)=>t.targetTimeMs-l.targetTimeMs);for(const t of this.Gc)if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.ta()})}sa(e){this.Wc.push(e)}Xc(e){const t=this.Gc.indexOf(e);this.Gc.splice(t,1)}}function zf(s){return function(e,t){if("object"!=typeof e||null===e)return!1;const l=e;for(const m of["next","error","complete"])if(m in l&&"function"==typeof l[m])return!0;return!1}(s)}class gs extends Od{constructor(e,t,l,m){super(e,t,l,m),this.type="firestore",this._queue=new Rg,this._persistenceKey=m?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||Wf(this),this._firestoreClient.terminate()}}function bm(s,e){const t="object"==typeof s?s:(0,g.Mq)(),l="string"==typeof s?s:e||"(default)",m=(0,g.qX)(t,"firestore").getImmediate({identifier:l});if(!m._initialized){const E=(0,R.P0)("firestore");E&&function Pg(s,e,t,l={}){var m;const E=(s=mi(s,Od))._getSettings();if("firestore.googleapis.com"!==E.host&&E.host!==e&&go("Host has been set in both settings() and useEmulator(), emulator host will be used"),s._setSettings(Object.assign(Object.assign({},E),{host:`${e}:${t}`,ssl:!1})),l.mockUserToken){let D,q;if("string"==typeof l.mockUserToken)D=l.mockUserToken,q=pi.MOCK_USER;else{D=(0,R.Sg)(l.mockUserToken,null===(m=s._app)||void 0===m?void 0:m.options.projectId);const fe=l.mockUserToken.sub||l.mockUserToken.user_id;if(!fe)throw new j(Wt.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");q=new pi(fe)}s._authCredentials=new ct(new oe(D,q))}}(m,...E)}return m}function us(s){return s._firestoreClient||Wf(s),s._firestoreClient.verifyNotTerminated(),s._firestoreClient}function Wf(s){var e;const t=s._freezeSettings(),l=(E=(null===(e=s._app)||void 0===e?void 0:e.options.appId)||"",new da(s._databaseId,E,s._persistenceKey,(q=t).host,q.ssl,q.experimentalForceLongPolling,q.experimentalAutoDetectLongPolling,q.useFetchStreams));var E,q;s._firestoreClient=new Sg(s._authCredentials,s._appCheckCredentials,s._queue,l)}class Vu{constructor(e){this._byteString=e}static fromBase64String(e){try{return new Vu(Ns.fromBase64String(e))}catch(t){throw new j(Wt.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}static fromUint8Array(e){return new Vu(Ns.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}class $u{constructor(...e){for(let t=0;t90)throw new j(Wt.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new j(Wt.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return On(this._lat,e._lat)||On(this._long,e._long)}}const Hy=/^__.*__$/;class Ng{constructor(e,t,l){this.data=e,this.fieldMask=t,this.fieldTransforms=l}toMutation(e,t){return null!==this.fieldMask?new oo(e,this.data,this.fieldMask,t,this.fieldTransforms):new pa(e,this.data,t,this.fieldTransforms)}}class Lg{constructor(e,t,l){this.data=e,this.fieldMask=t,this.fieldTransforms=l}toMutation(e,t){return new oo(e,this.data,this.fieldMask,t,this.fieldTransforms)}}function Im(s){switch(s){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Qn()}}class Sm{constructor(e,t,l,m,E,D){this.settings=e,this.databaseId=t,this.Tt=l,this.ignoreUndefinedProperties=m,void 0===E&&this.ia(),this.fieldTransforms=E||[],this.fieldMask=D||[]}get path(){return this.settings.path}get ra(){return this.settings.ra}oa(e){return new Sm(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.Tt,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}ua(e){var t;const l=null===(t=this.path)||void 0===t?void 0:t.child(e),m=this.oa({path:l,ca:!1});return m.aa(e),m}ha(e){var t;const l=null===(t=this.path)||void 0===t?void 0:t.child(e),m=this.oa({path:l,ca:!1});return m.ia(),m}la(e){return this.oa({path:void 0,ca:!0})}fa(e){return Ah(e,this.settings.methodName,this.settings.da||!1,this.path,this.settings._a)}contains(e){return void 0!==this.fieldMask.find(t=>e.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>e.isPrefixOf(t.field))}ia(){if(this.path)for(let e=0;efe.covers(ht.field))}else fe=null,Ce=D.fieldTransforms;return new Ng(new ws(q),fe,Ce)}class Th extends tu{_toFieldTransform(e){if(2!==e.ra)throw e.fa(1===e.ra?`${this._methodName}() can only appear at the top level of your update data`:`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof Th}}function Ug(s,e,t,l=!1){return Uu(t,s.wa(l?4:3,e))}function Uu(s,e){if(Kf(s=(0,R.m9)(s)))return Gu("Unsupported field value:",e,s),Gg(s,e);if(s instanceof tu)return function(t,l){if(!Im(l.ra))throw l.fa(`${t._methodName}() can only be used with update() and set()`);if(!l.path)throw l.fa(`${t._methodName}() is not currently supported inside arrays`);const m=t._toFieldTransform(l);m&&l.fieldTransforms.push(m)}(s,e),null;if(void 0===s&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),s instanceof Array){if(e.settings.ca&&4!==e.ra)throw e.fa("Nested arrays are not supported");return function(t,l){const m=[];let E=0;for(const D of t){let q=Uu(D,l.la(E));null==q&&(q={nullValue:"NULL_VALUE"}),m.push(q),E++}return{arrayValue:{values:m}}}(s,e)}return function(t,l){if(null===(t=(0,R.m9)(t)))return{nullValue:"NULL_VALUE"};if("number"==typeof t)return Ks(l.Tt,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){const m=Nr.fromDate(t);return{timestampValue:Iu(l.Tt,m)}}if(t instanceof Nr){const m=new Nr(t.seconds,1e3*Math.floor(t.nanoseconds/1e3));return{timestampValue:Iu(l.Tt,m)}}if(t instanceof Yf)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof Vu)return{bytesValue:Bh(l.Tt,t._byteString)};if(t instanceof Fs){const m=l.databaseId,E=t.firestore._databaseId;if(!E.isEqual(m))throw l.fa(`Document reference is for database ${E.projectId}/${E.database} but should be for database ${m.projectId}/${m.database}`);return{referenceValue:Vh(t.firestore._databaseId||l.databaseId,t._key.path)}}throw l.fa(`Unsupported field value: ${Sh(t)}`)}(s,e)}function Gg(s,e){const t={};return wa(s)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):Fo(s,(l,m)=>{const E=Uu(m,e.ua(l));null!=E&&(t[l]=E)}),{mapValue:{fields:t}}}function Kf(s){return!("object"!=typeof s||null===s||s instanceof Array||s instanceof Date||s instanceof Nr||s instanceof Yf||s instanceof Vu||s instanceof Fs||s instanceof tu)}function Gu(s,e,t){if(!Kf(t)||"object"!=typeof(l=t)||null===l||Object.getPrototypeOf(l)!==Object.prototype&&null!==Object.getPrototypeOf(l)){const l=Sh(t);throw e.fa("an object"===l?s+" a custom object":s+" "+l)}var l}function Dh(s,e,t){if((e=(0,R.m9)(e))instanceof $u)return e._internalPath;if("string"==typeof e)return qf(s,e);throw Ah("Field path arguments must be of type string or ",s,!1,void 0,t)}const Hg=new RegExp("[~\\*/\\[\\]]");function qf(s,e,t){if(e.search(Hg)>=0)throw Ah(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,s,!1,void 0,t);try{return new $u(...e.split("."))._internalPath}catch{throw Ah(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,s,!1,void 0,t)}}function Ah(s,e,t,l,m){const E=l&&!l.isEmpty(),D=void 0!==m;let q=`Function ${e}() called with invalid data`;t&&(q+=" (via `toFirestore()`)"),q+=". ";let fe="";return(E||D)&&(fe+=" (found",E&&(fe+=` in field ${l}`),D&&(fe+=` in document ${m}`),fe+=")"),new j(Wt.INVALID_ARGUMENT,q+s+fe)}function Dm(s,e){return s.some(t=>t.isEqual(e))}class Fd{constructor(e,t,l,m,E){this._firestore=e,this._userDataWriter=t,this._key=l,this._document=m,this._converter=E}get id(){return this._key.path.lastSegment()}get ref(){return new Fs(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new zy(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const t=this._document.data.field(xh("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class zy extends Fd{data(){return super.data()}}function xh(s,e){return"string"==typeof e?qf(s,e):e instanceof $u?e._internalPath:e._delegate._internalPath}class Ph{}class Hu extends Ph{}function xm(s,e,...t){let l=[];e instanceof Ph&&l.push(e),l=l.concat(t),function(m){const E=m.filter(q=>q instanceof ju).length,D=m.filter(q=>q instanceof zu).length;if(E>1||E>0&&D>0)throw new j(Wt.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(l);for(const m of l)s=m._apply(s);return s}class zu extends Hu{constructor(e,t,l){super(),this._field=e,this._op=t,this._value=l,this.type="where"}static _create(e,t,l){return new zu(e,t,l)}_apply(e){const t=this._parse(e);return qg(e._query,t),new lo(e.firestore,e.converter,gu(e._query,t))}_parse(e){const t=nu(e.firestore);return function(m,E,D,q,fe,Ce,je){let ht;if(fe.isKeyField()){if("array-contains"===Ce||"array-contains-any"===Ce)throw new j(Wt.INVALID_ARGUMENT,`Invalid Query. You can't perform '${Ce}' queries on documentId().`);if("in"===Ce||"not-in"===Ce){Kg(je,Ce);const Ft=[];for(const on of je)Ft.push(Yg(q,m,on));ht={arrayValue:{values:Ft}}}else ht=Yg(q,m,je)}else"in"!==Ce&&"not-in"!==Ce&&"array-contains-any"!==Ce||Kg(je,Ce),ht=Ug(D,"where",je,"in"===Ce||"not-in"===Ce);return zr.create(fe,Ce,ht)}(e._query,0,t,e.firestore._databaseId,this._field,this._op,this._value)}}function zg(s,e,t){const l=e,m=xh("where",s);return zu._create(m,l,t)}class ju extends Ph{constructor(e,t){super(),this.type=e,this._queryConstraints=t}static _create(e,t){return new ju(e,t)}_parse(e){const t=this._queryConstraints.map(l=>l._parse(e)).filter(l=>l.getFilters().length>0);return 1===t.length?t[0]:oi.create(t,this._getOperator())}_apply(e){const t=this._parse(e);return 0===t.getFilters().length?e:(function(l,m){let E=l;const D=m.getFlattenedFilters();for(const q of D)qg(E,q),E=gu(E,q)}(e._query,t),new lo(e.firestore,e.converter,gu(e._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}class Zf extends Hu{constructor(e,t){super(),this._field=e,this._direction=t,this.type="orderBy"}static _create(e,t){return new Zf(e,t)}_apply(e){const t=function(l,m,E){if(null!==l.startAt)throw new j(Wt.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==l.endAt)throw new j(Wt.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");const D=new Ll(m,E);return function(q,fe){if(null===lc(q)){const Ce=cc(q);null!==Ce&&Zg(0,Ce,fe.field)}}(l,D),D}(e._query,this._field,this._direction);return new lo(e.firestore,e.converter,function(l,m){const E=l.explicitOrderBy.concat([m]);return new Za(l.path,l.collectionGroup,E,l.filters.slice(),l.limit,l.limitType,l.startAt,l.endAt)}(e._query,t))}}function jg(s,e="asc"){const t=e,l=xh("orderBy",s);return Zf._create(l,t)}class Mh extends Hu{constructor(e,t,l){super(),this.type=e,this._limit=t,this._limitType=l}static _create(e,t,l){return new Mh(e,t,l)}_apply(e){return new lo(e.firestore,e.converter,Qa(e._query,this._limit,this._limitType))}}function Yy(s){return function _m(s,e){if(e<=0)throw new j(Wt.INVALID_ARGUMENT,`Function ${s}() requires a positive number, but it was: ${e}.`)}("limit",s),Mh._create("limit",s,"F")}class Xf extends Hu{constructor(e,t,l){super(),this.type=e,this._docOrFields=t,this._inclusive=l}static _create(e,t,l){return new Xf(e,t,l)}_apply(e){const t=function Wg(s,e,t,l){if(t[0]=(0,R.m9)(t[0]),t[0]instanceof Fd)return function(m,E,D,q,fe){if(!q)throw new j(Wt.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${D}().`);const Ce=[];for(const je of Go(m))if(je.field.isKeyField())Ce.push(M(E,q.key));else{const ht=q.data.field(je.field);if(ea(ht))throw new j(Wt.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+je.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===ht){const Ft=je.field.canonicalString();throw new j(Wt.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${Ft}' (used as the orderBy) does not exist.`)}Ce.push(ht)}return new Xi(Ce,fe)}(s._query,s.firestore._databaseId,e,t[0]._document,l);{const m=nu(s.firestore);return function(E,D,q,fe,Ce,je){const ht=E.explicitOrderBy;if(Ce.length>ht.length)throw new j(Wt.INVALID_ARGUMENT,`Too many arguments provided to ${fe}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const Ft=[];for(let on=0;on, or >=) must be on the same field. But you have inequality filters on '${l.toString()}' and '${m.toString()}'`);const E=lc(s);null!==E&&Zg(0,m,E)}const t=function(l,m){for(const E of l)for(const D of E.getFlattenedFilters())if(m.indexOf(D.op)>=0)return D.op;return null}(s.filters,function(l){switch(l){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(null!==t)throw new j(Wt.INVALID_ARGUMENT,t===e.op?`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`:`Invalid query. You cannot use '${e.op.toString()}' filters with '${t.toString()}' filters.`)}function Zg(s,e,t){if(!t.isEqual(e))throw new j(Wt.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${e.toString()}' and so you must also use '${e.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${t.toString()}' instead.`)}class qy{convertValue(e,t="none"){switch(No(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Li(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(ja(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw Qn()}}convertObject(e,t){const l={};return Fo(e.fields,(m,E)=>{l[m]=this.convertValue(E,t)}),l}convertGeoPoint(e){return new Yf(Li(e.latitude),Li(e.longitude))}convertArray(e,t){return(e.values||[]).map(l=>this.convertValue(l,t))}convertServerTimestamp(e,t){switch(t){case"previous":const l=au(e);return null==l?null:this.convertValue(l,t);case"estimate":return this.convertTimestamp(io(e));default:return null}}convertTimestamp(e){const t=ha(e);return new Nr(t.seconds,t.nanos)}convertDocumentKey(e,t){const l=Rr.fromString(e);ir(dp(l));const m=new to(l.get(1),l.get(3)),E=new Ln(l.popFirst(5));return m.isEqual(t)||Di(`Document ${E} contains a document reference within a different database (${m.projectId}/${m.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),E}}function Pm(s,e,t){let l;return l=s?t&&(t.merge||t.mergeFields)?s.toFirestore(e,t):s.toFirestore(e):e,l}class ru{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class Wu extends Fd{constructor(e,t,l,m,E,D){super(e,t,l,m,D),this._firestore=e,this._firestoreImpl=e,this.metadata=E}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const t=new Rh(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){const l=this._document.data.field(xh("DocumentSnapshot.get",e));if(null!==l)return this._userDataWriter.convertValue(l,t.serverTimestamps)}}}class Rh extends Wu{data(e={}){return super.data(e)}}class Yu{constructor(e,t,l,m){this._firestore=e,this._userDataWriter=t,this._snapshot=m,this.metadata=new ru(m.hasPendingWrites,m.fromCache),this.query=l}get docs(){const e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(l=>{e.call(t,new Rh(this._firestore,this._userDataWriter,l.key,l,new ru(this._snapshot.mutatedKeys.has(l.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new j(Wt.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(l,m){if(l._snapshot.oldDocs.isEmpty()){let E=0;return l._snapshot.docChanges.map(D=>({type:"added",doc:new Rh(l._firestore,l._userDataWriter,D.doc.key,D.doc,new ru(l._snapshot.mutatedKeys.has(D.doc.key),l._snapshot.fromCache),l.query.converter),oldIndex:-1,newIndex:E++}))}{let E=l._snapshot.oldDocs;return l._snapshot.docChanges.filter(D=>m||3!==D.type).map(D=>{const q=new Rh(l._firestore,l._userDataWriter,D.doc.key,D.doc,new ru(l._snapshot.mutatedKeys.has(D.doc.key),l._snapshot.fromCache),l.query.converter);let fe=-1,Ce=-1;return 0!==D.type&&(fe=E.indexOf(D.doc.key),E=E.delete(D.doc.key)),1!==D.type&&(E=E.add(D.doc),Ce=E.indexOf(D.doc.key)),{type:Jg(D.type),doc:q,oldIndex:fe,newIndex:Ce}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}function Jg(s){switch(s){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Qn()}}function Ku(s){s=mi(s,Fs);const e=mi(s.firestore,gs);return bh(us(e),s._key).then(t=>su(e,s,t))}class iu extends qy{constructor(e){super(),this.firestore=e}convertBytes(e){return new Vu(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new Fs(this.firestore,null,t)}}function tv(s){s=mi(s,Fs);const e=mi(s.firestore,gs),t=us(e),l=new iu(e);return function Ny(s,e){const t=new ge;return s.asyncQueue.enqueueAndForget((0,n.Z)(function*(){return(l=(0,n.Z)(function*(m,E,D){try{const q=yield function(fe,Ce){const je=Nn(fe);return je.persistence.runTransaction("read document","readonly",ht=>je.localDocuments.getDocument(ht,Ce))}(m,E);q.isFoundDocument()?D.resolve(q):q.isNoDocument()?D.resolve(null):D.reject(new j(Wt.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"))}catch(q){const fe=Ed(q,`Failed to get document '${E} from cache`);D.reject(fe)}}),function(m,E,D){return l.apply(this,arguments)})(yield function Bf(s){return Ff(s).then(e=>e.localStore)}(s),e,t);var l})),t.promise}(t,s._key).then(m=>new Wu(e,l,s._key,m,new ru(null!==m&&m.hasLocalMutations,!0),s.converter))}function Nd(s){s=mi(s,Fs);const e=mi(s.firestore,gs);return bh(us(e),s._key,{source:"server"}).then(t=>su(e,s,t))}function o_(s){s=mi(s,lo);const e=mi(s.firestore,gs),t=us(e),l=new iu(e);return function Hf(s,e,t={}){const l=new ge;return s.asyncQueue.enqueueAndForget((0,n.Z)(function*(){return function(m,E,D,q,fe){const Ce=new Tc({next:ht=>{E.enqueueAndForget(()=>jp(m,je)),ht.fromCache&&"server"===q.source?fe.reject(new j(Wt.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):fe.resolve(ht)},error:ht=>fe.reject(ht)}),je=new bd(D,Ce,{includeMetadataChanges:!0,Ou:!0});return wf(m,je)}(yield Rd(s),s.asyncQueue,e,t,l)})),l.promise}(t,s._query,{source:"server"}).then(m=>new Yu(e,l,s,m))}function ty(s,e,t){s=mi(s,Fs);const l=mi(s.firestore,gs),m=Pm(s.converter,e,t);return kh(l,[Na(nu(l),"setDoc",s._key,m,null!==s.converter,t).toMutation(s._key,Dt.none())])}function ny(s,e,t,...l){s=mi(s,Fs);const m=mi(s.firestore,gs),E=nu(m);let D;return D="string"==typeof(e=(0,R.m9)(e))||e instanceof $u?function $g(s,e,t,l,m,E){const D=s.wa(1,e,t),q=[Dh(e,l,t)],fe=[m];if(E.length%2!=0)throw new j(Wt.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let Ft=0;Ft=0;--Ft)if(!Dm(Ce,q[Ft])){const on=q[Ft];let dn=fe[Ft];dn=(0,R.m9)(dn);const Jn=D.ha(on);if(dn instanceof Th)Ce.push(on);else{const wr=Uu(dn,Jn);null!=wr&&(Ce.push(on),je.set(on,wr))}}const ht=new Vo(Ce);return new Lg(je,ht,D.fieldTransforms)}(E,"updateDoc",s._key,e,t,l):function Tm(s,e,t,l){const m=s.wa(1,e,t);Gu("Data must be an object, but it was:",m,l);const E=[],D=ws.empty();Fo(l,(fe,Ce)=>{const je=qf(e,fe,t);Ce=(0,R.m9)(Ce);const ht=m.ha(je);if(Ce instanceof Th)E.push(je);else{const Ft=Uu(Ce,ht);null!=Ft&&(E.push(je),D.set(je,Ft))}});const q=new Vo(E);return new Lg(D,q,m.fieldTransforms)}(E,"updateDoc",s._key,e),kh(m,[D.toMutation(s._key,Dt.exists(!0))])}function a_(s){return kh(mi(s.firestore,gs),[new ma(s._key,Dt.none())])}function Lr(s,e){const t=mi(s.firestore,gs),l=Em(s),m=Pm(s.converter,e);return kh(t,[Na(nu(s.firestore),"addDoc",l._key,m,null!==s.converter,{}).toMutation(l._key,Dt.exists(!1))]).then(()=>l)}function nv(s,...e){var t,l,m;s=(0,R.m9)(s);let E={includeMetadataChanges:!1},D=0;"object"!=typeof e[D]||zf(e[D])||(E=e[D],D++);const q={includeMetadataChanges:E.includeMetadataChanges};if(zf(e[D])){const ht=e[D];e[D]=null===(t=ht.next)||void 0===t?void 0:t.bind(ht),e[D+1]=null===(l=ht.error)||void 0===l?void 0:l.bind(ht),e[D+2]=null===(m=ht.complete)||void 0===m?void 0:m.bind(ht)}let fe,Ce,je;if(s instanceof Fs)Ce=mi(s.firestore,gs),je=Xa(s._key.path),fe={next:ht=>{e[D]&&e[D](su(Ce,s,ht))},error:e[D+1],complete:e[D+2]};else{const ht=mi(s,lo);Ce=mi(ht.firestore,gs),je=ht._query;const Ft=new iu(Ce);fe={next:on=>{e[D]&&e[D](new Yu(Ce,Ft,ht,on))},error:e[D+1],complete:e[D+2]},function Am(s){if("L"===s.limitType&&0===s.explicitOrderBy.length)throw new j(Wt.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(s._query)}return function(ht,Ft,on,dn){const Jn=new Tc(dn),wr=new bd(Ft,Jn,on);return ht.asyncQueue.enqueueAndForget((0,n.Z)(function*(){return wf(yield Rd(ht),wr)})),()=>{Jn.Pc(),ht.asyncQueue.enqueueAndForget((0,n.Z)(function*(){return jp(yield Rd(ht),wr)}))}}(us(Ce),je,q,fe)}function kh(s,e){return function(t,l){const m=new ge;return t.asyncQueue.enqueueAndForget((0,n.Z)(function*(){return function yg(s,e,t){return Jp.apply(this,arguments)}(yield function Ch(s){return Lf(s).then(e=>e.syncEngine)}(t),l,m)})),m.promise}(us(s),e)}function su(s,e,t){const l=t.docs.get(e._key),m=new iu(s);return new Wu(s,m,e._key,l,new ru(t.hasPendingWrites,t.fromCache),e.converter)}!function(s,e=!0){Qo=g.Jn,(0,g.Xd)(new d.wA("firestore",(t,{instanceIdentifier:l,options:m})=>{const E=t.getProvider("app").getImmediate(),D=new gs(new Kt(t.getProvider("auth-internal")),new Wr(t.getProvider("app-check-internal")),function(q,fe){if(!Object.prototype.hasOwnProperty.apply(q.options,["projectId"]))throw new j(Wt.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new to(q.options.projectId,fe)}(E,l),E);return m=Object.assign({useFetchStreams:e},m),D._setSettings(m),D},"PUBLIC").setMultipleInstances(!0)),(0,g.KN)(Rl,"3.8.4",s),(0,g.KN)(Rl,"3.8.4","esm2017")}()},3629:(o,c,u)=>{"use strict";u.d(c,{$C:()=>ue,V1:()=>xe});var n=u(5861),g=u(3847),d=u(9572),A=u(3272);const R="type.googleapis.com/google.protobuf.Int64Value",O="type.googleapis.com/google.protobuf.UInt64Value";function N(Le,ke){const Ge={};for(const ut in Le)Le.hasOwnProperty(ut)&&(Ge[ut]=ke(Le[ut]));return Ge}function U(Le){if(null==Le)return null;if(Le instanceof Number&&(Le=Le.valueOf()),"number"==typeof Le&&isFinite(Le)||!0===Le||!1===Le||"[object String]"===Object.prototype.toString.call(Le))return Le;if(Le instanceof Date)return Le.toISOString();if(Array.isArray(Le))return Le.map(ke=>U(ke));if("function"==typeof Le||"object"==typeof Le)return N(Le,ke=>U(ke));throw new Error("Data cannot be encoded in JSON: "+Le)}function ie(Le){if(null==Le)return Le;if(Le["@type"])switch(Le["@type"]){case R:case O:{const ke=Number(Le.value);if(isNaN(ke))throw new Error("Data cannot be decoded from JSON: "+Le);return ke}default:throw new Error("Data cannot be decoded from JSON: "+Le)}return Array.isArray(Le)?Le.map(ke=>ie(ke)):"function"==typeof Le||"object"==typeof Le?N(Le,ke=>ie(ke)):Le}const L="functions",ee={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class K extends d.ZR{constructor(ke,Ge,ut){super(`${L}/${ke}`,Ge||""),this.details=ut}}class X{constructor(ke,Ge,ut){this.auth=null,this.messaging=null,this.appCheck=null,this.auth=ke.getImmediate({optional:!0}),this.messaging=Ge.getImmediate({optional:!0}),this.auth||ke.get().then(pt=>this.auth=pt,()=>{}),this.messaging||Ge.get().then(pt=>this.messaging=pt,()=>{}),this.appCheck||ut.get().then(pt=>this.appCheck=pt,()=>{})}getAuthToken(){var ke=this;return(0,n.Z)(function*(){if(ke.auth)try{return(yield ke.auth.getToken())?.accessToken}catch{return}})()}getMessagingToken(){var ke=this;return(0,n.Z)(function*(){if(ke.messaging&&"Notification"in self&&"granted"===Notification.permission)try{return yield ke.messaging.getToken()}catch{return}})()}getAppCheckToken(){var ke=this;return(0,n.Z)(function*(){if(ke.appCheck){const Ge=yield ke.appCheck.getToken();return Ge.error?null:Ge.token}return null})()}getContext(){var ke=this;return(0,n.Z)(function*(){return{authToken:yield ke.getAuthToken(),messagingToken:yield ke.getMessagingToken(),appCheckToken:yield ke.getAppCheckToken()}})()}}const Y="us-central1";class te{constructor(ke,Ge,ut,pt,$t=Y,bt){this.app=ke,this.fetchImpl=bt,this.emulatorOrigin=null,this.contextProvider=new X(Ge,ut,pt),this.cancelAllRequests=new Promise(St=>{this.deleteService=()=>Promise.resolve(St())});try{const St=new URL($t);this.customDomain=St.origin,this.region=Y}catch{this.customDomain=null,this.region=$t}}_delete(){return this.deleteService()}_url(ke){const Ge=this.app.options.projectId;return null!==this.emulatorOrigin?`${this.emulatorOrigin}/${Ge}/${this.region}/${ke}`:null!==this.customDomain?`${this.customDomain}/${ke}`:`https://${this.region}-${Ge}.cloudfunctions.net/${ke}`}}function ve(Le,ke,Ge){return ut=>function We(Le,ke,Ge,ut){const pt=Le._url(ke);return function Se(Le,ke,Ge,ut){return Me.apply(this,arguments)}(Le,pt,Ge,ut)}(Le,ke,ut,Ge||{})}function we(Le,ke,Ge,ut){return Ve.apply(this,arguments)}function Ve(){return(Ve=(0,n.Z)(function*(Le,ke,Ge,ut){let pt;Ge["Content-Type"]="application/json";try{pt=yield ut(Le,{method:"POST",body:JSON.stringify(ke),headers:Ge})}catch{return{status:0,json:null}}let $t=null;try{$t=yield pt.json()}catch{}return{status:pt.status,json:$t}})).apply(this,arguments)}function Me(){return(Me=(0,n.Z)(function*(Le,ke,Ge,ut){const pt={data:Ge=U(Ge)},$t={},bt=yield Le.contextProvider.getContext();bt.authToken&&($t.Authorization="Bearer "+bt.authToken),bt.messagingToken&&($t["Firebase-Instance-ID-Token"]=bt.messagingToken),null!==bt.appCheckToken&&($t["X-Firebase-AppCheck"]=bt.appCheckToken);const Yt=function G(Le){let ke=null;return{promise:new Promise((Ge,ut)=>{ke=setTimeout(()=>{ut(new K("deadline-exceeded","deadline-exceeded"))},Le)}),cancel:()=>{ke&&clearTimeout(ke)}}}(ut.timeout||7e4),kt=yield Promise.race([we(ke,pt,$t,Le.fetchImpl),Yt.promise,Le.cancelAllRequests]);if(Yt.cancel(),!kt)throw new K("cancelled","Firebase Functions instance was deleted.");const Et=function ce(Le,ke){let pt,Ge=function z(Le){if(Le>=200&&Le<300)return"ok";switch(Le){case 0:case 500:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}(Le),ut=Ge;try{const $t=ke&&ke.error;if($t){const bt=$t.status;if("string"==typeof bt){if(!ee[bt])return new K("internal","internal");Ge=ee[bt],ut=bt}const St=$t.message;"string"==typeof St&&(ut=St),pt=$t.details,void 0!==pt&&(pt=ie(pt))}}catch{}return"ok"===Ge?null:new K(Ge,ut,pt)}(kt.status,kt.json);if(Et)throw Et;if(!kt.json)throw new K("internal","Response is not valid JSON object.");let It=kt.json.data;if(typeof It>"u"&&(It=kt.json.result),typeof It>"u")throw new K("internal","Response is missing data field.");return{data:ie(It)}})).apply(this,arguments)}const et="@firebase/functions";function ue(Le=(0,g.Mq)(),ke=Y){const ut=(0,g.qX)((0,d.m9)(Le),L).getImmediate({identifier:ke}),pt=(0,d.P0)("functions");return pt&&function Qe(Le,ke,Ge){!function pe(Le,ke,Ge){Le.emulatorOrigin=`http://${ke}:${Ge}`}((0,d.m9)(Le),ke,Ge)}(ut,...pt),ut}function xe(Le,ke,Ge){return ve((0,d.m9)(Le),ke,Ge)}!function $(Le,ke){(0,g.Xd)(new A.wA(L,(ut,{instanceIdentifier:pt})=>{const $t=ut.getProvider("app").getImmediate(),bt=ut.getProvider("auth-internal"),St=ut.getProvider("messaging-internal"),Yt=ut.getProvider("app-check-internal");return new te($t,bt,St,Yt,pt,Le)},"PUBLIC").setMultipleInstances(!0)),(0,g.KN)(et,"0.9.4",ke),(0,g.KN)(et,"0.9.4","esm2017")}(fetch.bind(self))},3847:(o,c,u)=>{"use strict";u.d(c,{C6:()=>Dn,Jn:()=>gn,KN:()=>Fn,Mq:()=>cr,Xd:()=>$t,ZF:()=>Sn,qX:()=>bt});var n=u(5861),g=u(3272),d=u(1877),A=u(9572),R=u(8766);class O{constructor(At){this.container=At}getPlatformInfoString(){return this.container.getProviders().map(Xt=>{if(function N(Ht){return"VERSION"===Ht.getComponent()?.type}(Xt)){const sn=Xt.getImmediate();return`${sn.library}/${sn.version}`}return null}).filter(Xt=>Xt).join(" ")}}const U="@firebase/app",L=new d.Yd("@firebase/app"),st="[DEFAULT]",Le={[U]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},ke=new Map,Ge=new Map;function ut(Ht,At){try{Ht.container.addComponent(At)}catch(Xt){L.debug(`Component ${At.name} failed to register with FirebaseApp ${Ht.name}`,Xt)}}function $t(Ht){const At=Ht.name;if(Ge.has(At))return L.debug(`There were multiple attempts to register component ${At}.`),!1;Ge.set(At,Ht);for(const Xt of ke.values())ut(Xt,Ht);return!0}function bt(Ht,At){const Xt=Ht.container.getProvider("heartbeat").getImmediate({optional:!0});return Xt&&Xt.triggerHeartbeat(),Ht.container.getProvider(At)}const Et=new A.LL("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","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","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}."});class It{constructor(At,Xt,sn){this._isDeleted=!1,this._options=Object.assign({},At),this._config=Object.assign({},Xt),this._name=Xt.name,this._automaticDataCollectionEnabled=Xt.automaticDataCollectionEnabled,this._container=sn,this.container.addComponent(new g.wA("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(At){this.checkDestroyed(),this._automaticDataCollectionEnabled=At}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(At){this._isDeleted=At}checkDestroyed(){if(this.isDeleted)throw Et.create("app-deleted",{appName:this._name})}}const gn="9.17.2";function Sn(Ht,At={}){let Xt=Ht;"object"!=typeof At&&(At={name:At});const sn=Object.assign({name:st,automaticDataCollectionEnabled:!1},At),wn=sn.name;if("string"!=typeof wn||!wn)throw Et.create("bad-app-name",{appName:String(wn)});if(Xt||(Xt=(0,A.aH)()),!Xt)throw Et.create("no-options");const kn=ke.get(wn);if(kn){if((0,A.vZ)(Xt,kn.options)&&(0,A.vZ)(sn,kn.config))return kn;throw Et.create("duplicate-app",{appName:wn})}const vr=new g.H0(wn);for(const Te of Ge.values())vr.addComponent(Te);const rt=new It(Xt,sn,vr);return ke.set(wn,rt),rt}function cr(Ht=st){const At=ke.get(Ht);if(!At&&Ht===st)return Sn();if(!At)throw Et.create("no-app",{appName:Ht});return At}function Dn(){return Array.from(ke.values())}function Fn(Ht,At,Xt){var sn;let wn=null!==(sn=Le[Ht])&&void 0!==sn?sn:Ht;Xt&&(wn+=`-${Xt}`);const kn=wn.match(/\s|\//),vr=At.match(/\s|\//);if(kn||vr){const rt=[`Unable to register library "${wn}" with version "${At}":`];return kn&&rt.push(`library name "${wn}" contains illegal characters (whitespace or "/")`),kn&&vr&&rt.push("and"),vr&&rt.push(`version name "${At}" contains illegal characters (whitespace or "/")`),void L.warn(rt.join(" "))}$t(new g.wA(`${wn}-version`,()=>({library:wn,version:At}),"VERSION"))}const Zn="firebase-heartbeat-database",Vn=1,sr="firebase-heartbeat-store";let Tr=null;function bn(){return Tr||(Tr=(0,R.X3)(Zn,Vn,{upgrade:(Ht,At)=>{0===At&&Ht.createObjectStore(sr)}}).catch(Ht=>{throw Et.create("idb-open",{originalErrorMessage:Ht.message})})),Tr}function en(){return(en=(0,n.Z)(function*(Ht){try{return(yield bn()).transaction(sr).objectStore(sr).get(qe(Ht))}catch(At){if(At instanceof A.ZR)L.warn(At.message);else{const Xt=Et.create("idb-get",{originalErrorMessage:At?.message});L.warn(Xt.message)}}})).apply(this,arguments)}function Ut(Ht,At){return xt.apply(this,arguments)}function xt(){return(xt=(0,n.Z)(function*(Ht,At){try{const sn=(yield bn()).transaction(sr,"readwrite");return yield sn.objectStore(sr).put(At,qe(Ht)),sn.done}catch(Xt){if(Xt instanceof A.ZR)L.warn(Xt.message);else{const sn=Et.create("idb-set",{originalErrorMessage:Xt?.message});L.warn(sn.message)}}})).apply(this,arguments)}function qe(Ht){return`${Ht.name}!${Ht.options.appId}`}class F{constructor(At){this.container=At,this._heartbeatsCache=null;const Xt=this.container.getProvider("app").getImmediate();this._storage=new Pn(Xt),this._heartbeatsCachePromise=this._storage.read().then(sn=>(this._heartbeatsCache=sn,sn))}triggerHeartbeat(){var At=this;return(0,n.Z)(function*(){const sn=At.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),wn=be();if(null===At._heartbeatsCache&&(At._heartbeatsCache=yield At._heartbeatsCachePromise),At._heartbeatsCache.lastSentHeartbeatDate!==wn&&!At._heartbeatsCache.heartbeats.some(kn=>kn.date===wn))return At._heartbeatsCache.heartbeats.push({date:wn,agent:sn}),At._heartbeatsCache.heartbeats=At._heartbeatsCache.heartbeats.filter(kn=>{const vr=new Date(kn.date).valueOf();return Date.now()-vr<=2592e6}),At._storage.overwrite(At._heartbeatsCache)})()}getHeartbeatsHeader(){var At=this;return(0,n.Z)(function*(){if(null===At._heartbeatsCache&&(yield At._heartbeatsCachePromise),null===At._heartbeatsCache||0===At._heartbeatsCache.heartbeats.length)return"";const Xt=be(),{heartbeatsToSend:sn,unsentEntries:wn}=function Pt(Ht,At=1024){const Xt=[];let sn=Ht.slice();for(const wn of Ht){const kn=Xt.find(vr=>vr.agent===wn.agent);if(kn){if(kn.dates.push(wn.date),_r(Xt)>At){kn.dates.pop();break}}else if(Xt.push({agent:wn.agent,dates:[wn.date]}),_r(Xt)>At){Xt.pop();break}sn=sn.slice(1)}return{heartbeatsToSend:Xt,unsentEntries:sn}}(At._heartbeatsCache.heartbeats),kn=(0,A.L)(JSON.stringify({version:2,heartbeats:sn}));return At._heartbeatsCache.lastSentHeartbeatDate=Xt,wn.length>0?(At._heartbeatsCache.heartbeats=wn,yield At._storage.overwrite(At._heartbeatsCache)):(At._heartbeatsCache.heartbeats=[],At._storage.overwrite(At._heartbeatsCache)),kn})()}}function be(){return(new Date).toISOString().substring(0,10)}class Pn{constructor(At){this.app=At,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return(0,n.Z)(function*(){return!!(0,A.hl)()&&(0,A.eu)().then(()=>!0).catch(()=>!1)})()}read(){var At=this;return(0,n.Z)(function*(){return(yield At._canUseIndexedDBPromise)&&(yield function pn(Ht){return en.apply(this,arguments)}(At.app))||{heartbeats:[]}})()}overwrite(At){var Xt=this;return(0,n.Z)(function*(){var sn;if(yield Xt._canUseIndexedDBPromise){const kn=yield Xt.read();return Ut(Xt.app,{lastSentHeartbeatDate:null!==(sn=At.lastSentHeartbeatDate)&&void 0!==sn?sn:kn.lastSentHeartbeatDate,heartbeats:At.heartbeats})}})()}add(At){var Xt=this;return(0,n.Z)(function*(){var sn;if(yield Xt._canUseIndexedDBPromise){const kn=yield Xt.read();return Ut(Xt.app,{lastSentHeartbeatDate:null!==(sn=At.lastSentHeartbeatDate)&&void 0!==sn?sn:kn.lastSentHeartbeatDate,heartbeats:[...kn.heartbeats,...At.heartbeats]})}})()}}function _r(Ht){return(0,A.L)(JSON.stringify({version:2,heartbeats:Ht})).length}!function Ur(Ht){$t(new g.wA("platform-logger",At=>new O(At),"PRIVATE")),$t(new g.wA("heartbeat",At=>new F(At),"PRIVATE")),Fn(U,"0.9.4",Ht),Fn(U,"0.9.4","esm2017"),Fn("fire-js","")}("")},3272:(o,c,u)=>{"use strict";u.d(c,{H0:()=>U,wA:()=>d});var n=u(5861),g=u(9572);class d{constructor(L,ee,K){this.name=L,this.instanceFactory=ee,this.type=K,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(L){return this.instantiationMode=L,this}setMultipleInstances(L){return this.multipleInstances=L,this}setServiceProps(L){return this.serviceProps=L,this}setInstanceCreatedCallback(L){return this.onInstanceCreated=L,this}}const A="[DEFAULT]";class R{constructor(L,ee){this.name=L,this.container=ee,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(L){const ee=this.normalizeInstanceIdentifier(L);if(!this.instancesDeferred.has(ee)){const K=new g.BH;if(this.instancesDeferred.set(ee,K),this.isInitialized(ee)||this.shouldAutoInitialize())try{const z=this.getOrInitializeService({instanceIdentifier:ee});z&&K.resolve(z)}catch{}}return this.instancesDeferred.get(ee).promise}getImmediate(L){var ee;const K=this.normalizeInstanceIdentifier(L?.identifier),z=null!==(ee=L?.optional)&&void 0!==ee&ⅇif(!this.isInitialized(K)&&!this.shouldAutoInitialize()){if(z)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:K})}catch(ce){if(z)return null;throw ce}}getComponent(){return this.component}setComponent(L){if(L.name!==this.name)throw Error(`Mismatching Component ${L.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=L,this.shouldAutoInitialize()){if(function N(ie){return"EAGER"===ie.instantiationMode}(L))try{this.getOrInitializeService({instanceIdentifier:A})}catch{}for(const[ee,K]of this.instancesDeferred.entries()){const z=this.normalizeInstanceIdentifier(ee);try{const ce=this.getOrInitializeService({instanceIdentifier:z});K.resolve(ce)}catch{}}}}clearInstance(L=A){this.instancesDeferred.delete(L),this.instancesOptions.delete(L),this.instances.delete(L)}delete(){var L=this;return(0,n.Z)(function*(){const ee=Array.from(L.instances.values());yield Promise.all([...ee.filter(K=>"INTERNAL"in K).map(K=>K.INTERNAL.delete()),...ee.filter(K=>"_delete"in K).map(K=>K._delete())])})()}isComponentSet(){return null!=this.component}isInitialized(L=A){return this.instances.has(L)}getOptions(L=A){return this.instancesOptions.get(L)||{}}initialize(L={}){const{options:ee={}}=L,K=this.normalizeInstanceIdentifier(L.instanceIdentifier);if(this.isInitialized(K))throw Error(`${this.name}(${K}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const z=this.getOrInitializeService({instanceIdentifier:K,options:ee});for(const[ce,X]of this.instancesDeferred.entries())K===this.normalizeInstanceIdentifier(ce)&&X.resolve(z);return z}onInit(L,ee){var K;const z=this.normalizeInstanceIdentifier(ee),ce=null!==(K=this.onInitCallbacks.get(z))&&void 0!==K?K:new Set;ce.add(L),this.onInitCallbacks.set(z,ce);const X=this.instances.get(z);return X&&L(X,z),()=>{ce.delete(L)}}invokeOnInitCallbacks(L,ee){const K=this.onInitCallbacks.get(ee);if(K)for(const z of K)try{z(L,ee)}catch{}}getOrInitializeService({instanceIdentifier:L,options:ee={}}){let K=this.instances.get(L);if(!K&&this.component&&(K=this.component.instanceFactory(this.container,{instanceIdentifier:(ie=L,ie===A?void 0:ie),options:ee}),this.instances.set(L,K),this.instancesOptions.set(L,ee),this.invokeOnInitCallbacks(K,L),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,L,K)}catch{}var ie;return K||null}normalizeInstanceIdentifier(L=A){return this.component?this.component.multipleInstances?L:A:L}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class U{constructor(L){this.name=L,this.providers=new Map}addComponent(L){const ee=this.getProvider(L.name);if(ee.isComponentSet())throw new Error(`Component ${L.name} has already been registered with ${this.name}`);ee.setComponent(L)}addOrOverwriteComponent(L){this.getProvider(L.name).isComponentSet()&&this.providers.delete(L.name),this.addComponent(L)}getProvider(L){if(this.providers.has(L))return this.providers.get(L);const ee=new R(L,this);return this.providers.set(L,ee),ee}getProviders(){return Array.from(this.providers.values())}}},9329:(o,c,u)=>{"use strict";var n=u(5861),g=u(3847),d=u(3272),A=u(9572),R=u(8766);const O="@firebase/installations",N="0.6.4",U=1e4,ie=`w:${N}`,L="FIS_v2",ee="https://firebaseinstallations.googleapis.com/v1",K=36e5,Y=new A.LL("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function G(Ct){return Ct instanceof A.ZR&&Ct.code.includes("request-failed")}function te({projectId:Ct}){return`${ee}/projects/${Ct}/installations`}function pe(Ct){return{token:Ct.token,requestStatus:2,expiresIn:Me(Ct.expiresIn),creationTime:Date.now()}}function ve(Ct,zt){return Ie.apply(this,arguments)}function Ie(){return(Ie=(0,n.Z)(function*(Ct,zt){const xn=(yield zt.json()).error;return Y.create("request-failed",{requestName:Ct,serverCode:xn.code,serverMessage:xn.message,serverStatus:xn.status})})).apply(this,arguments)}function we({apiKey:Ct}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":Ct})}function We(Ct){return Se.apply(this,arguments)}function Se(){return(Se=(0,n.Z)(function*(Ct){const zt=yield Ct();return zt.status>=500&&zt.status<600?Ct():zt})).apply(this,arguments)}function Me(Ct){return Number(Ct.replace("s","000"))}function Ee(){return(Ee=(0,n.Z)(function*({appConfig:Ct,heartbeatServiceProvider:zt},{fid:tn}){const xn=te(Ct),Er=we(Ct),Bn=zt.getImmediate({optional:!0});if(Bn){const Dr=yield Bn.getHeartbeatsHeader();Dr&&Er.append("x-firebase-client",Dr)}const Ar={method:"POST",headers:Er,body:JSON.stringify({fid:tn,authVersion:L,appId:Ct.appId,sdkVersion:ie})},Jr=yield We(()=>fetch(xn,Ar));if(Jr.ok){const Dr=yield Jr.json();return{fid:Dr.fid||tn,registrationStatus:2,refreshToken:Dr.refreshToken,authToken:pe(Dr.authToken)}}throw yield ve("Create Installation",Jr)})).apply(this,arguments)}function ae(Ct){return new Promise(zt=>{setTimeout(zt,Ct)})}const $=/^[cdef][\w-]{21}$/,ue="";function Qe(){try{const Ct=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(Ct),Ct[0]=112+Ct[0]%16;const tn=function xe(Ct){return function me(Ct){return btoa(String.fromCharCode(...Ct)).replace(/\+/g,"-").replace(/\//g,"_")}(Ct).substr(0,22)}(Ct);return $.test(tn)?tn:ue}catch{return ue}}function st(Ct){return`${Ct.appName}!${Ct.appId}`}const Le=new Map;function ke(Ct,zt){const tn=st(Ct);pt(tn,zt),function $t(Ct,zt){const tn=function St(){return!bt&&"BroadcastChannel"in self&&(bt=new BroadcastChannel("[Firebase] FID Change"),bt.onmessage=Ct=>{pt(Ct.data.key,Ct.data.fid)}),bt}();tn&&tn.postMessage({key:Ct,fid:zt}),function Yt(){0===Le.size&&bt&&(bt.close(),bt=null)}()}(tn,zt)}function pt(Ct,zt){const tn=Le.get(Ct);if(tn)for(const xn of tn)xn(zt)}let bt=null;const kt="firebase-installations-database",Et=1,It="firebase-installations-store";let gn=null;function Sn(){return gn||(gn=(0,R.X3)(kt,Et,{upgrade:(Ct,zt)=>{0===zt&&Ct.createObjectStore(It)}})),gn}function cr(Ct,zt){return Dn.apply(this,arguments)}function Dn(){return(Dn=(0,n.Z)(function*(Ct,zt){const tn=st(Ct),Er=(yield Sn()).transaction(It,"readwrite"),Bn=Er.objectStore(It),Cr=yield Bn.get(tn);return yield Bn.put(zt,tn),yield Er.done,(!Cr||Cr.fid!==zt.fid)&&ke(Ct,zt.fid),zt})).apply(this,arguments)}function jn(Ct){return Mn.apply(this,arguments)}function Mn(){return(Mn=(0,n.Z)(function*(Ct){const zt=st(Ct),xn=(yield Sn()).transaction(It,"readwrite");yield xn.objectStore(It).delete(zt),yield xn.done})).apply(this,arguments)}function Fn(Ct,zt){return un.apply(this,arguments)}function un(){return(un=(0,n.Z)(function*(Ct,zt){const tn=st(Ct),Er=(yield Sn()).transaction(It,"readwrite"),Bn=Er.objectStore(It),Cr=yield Bn.get(tn),Ar=zt(Cr);return void 0===Ar?yield Bn.delete(tn):yield Bn.put(Ar,tn),yield Er.done,Ar&&(!Cr||Cr.fid!==Ar.fid)&&ke(Ct,Ar.fid),Ar})).apply(this,arguments)}function Wn(Ct){return Zn.apply(this,arguments)}function Zn(){return Zn=(0,n.Z)(function*(Ct){let zt;const tn=yield Fn(Ct.appConfig,xn=>{const Er=function Vn(Ct){return xt(Ct||{fid:Qe(),registrationStatus:0})}(xn),Bn=function sr(Ct,zt){if(0===zt.registrationStatus){if(!navigator.onLine)return{installationEntry:zt,registrationPromise:Promise.reject(Y.create("app-offline"))};const tn={fid:zt.fid,registrationStatus:1,registrationTime:Date.now()},xn=function Tr(Ct,zt){return bn.apply(this,arguments)}(Ct,tn);return{installationEntry:tn,registrationPromise:xn}}return 1===zt.registrationStatus?{installationEntry:zt,registrationPromise:pn(Ct)}:{installationEntry:zt}}(Ct,Er);return zt=Bn.registrationPromise,Bn.installationEntry});return tn.fid===ue?{installationEntry:yield zt}:{installationEntry:tn,registrationPromise:zt}}),Zn.apply(this,arguments)}function bn(){return bn=(0,n.Z)(function*(Ct,zt){try{const tn=yield function Fe(Ct,zt){return Ee.apply(this,arguments)}(Ct,zt);return cr(Ct.appConfig,tn)}catch(tn){throw G(tn)&&409===tn.customData.serverCode?yield jn(Ct.appConfig):yield cr(Ct.appConfig,{fid:zt.fid,registrationStatus:0}),tn}}),bn.apply(this,arguments)}function pn(Ct){return en.apply(this,arguments)}function en(){return(en=(0,n.Z)(function*(Ct){let zt=yield Ut(Ct.appConfig);for(;1===zt.registrationStatus;)yield ae(100),zt=yield Ut(Ct.appConfig);if(0===zt.registrationStatus){const{installationEntry:tn,registrationPromise:xn}=yield Wn(Ct);return xn||tn}return zt})).apply(this,arguments)}function Ut(Ct){return Fn(Ct,zt=>{if(!zt)throw Y.create("installation-not-found");return xt(zt)})}function xt(Ct){return function qe(Ct){return 1===Ct.registrationStatus&&Ct.registrationTime+Ufetch(xn,Ar));if(Jr.ok)return pe(yield Jr.json());throw yield ve("Generate Auth Token",Jr)})).apply(this,arguments)}function be(Ct){return Pt.apply(this,arguments)}function Pt(){return Pt=(0,n.Z)(function*(Ct,zt=!1){let tn;const xn=yield Fn(Ct.appConfig,Bn=>{if(!Xt(Bn))throw Y.create("not-registered");const Cr=Bn.authToken;if(!zt&&function sn(Ct){return 2===Ct.requestStatus&&!function wn(Ct){const zt=Date.now();return zt{if(!Xt(zt))throw Y.create("not-registered");return function vr(Ct){return 1===Ct.requestStatus&&Ct.requestTime+U{const zt=Ct.getProvider("app").getImmediate(),tn=function nt(Ct){if(!Ct||!Ct.options)throw mt("App Configuration");if(!Ct.name)throw mt("App Name");const zt=["projectId","apiKey","appId"];for(const tn of zt)if(!Ct.options[tn])throw mt(tn);return{appName:Ct.name,projectId:Ct.options.projectId,apiKey:Ct.options.apiKey,appId:Ct.options.appId}}(zt);return{app:zt,appConfig:tn,heartbeatServiceProvider:(0,g.qX)(zt,"heartbeat"),_delete:()=>Promise.resolve()}},fr=Ct=>{const zt=Ct.getProvider("app").getImmediate(),tn=(0,g.qX)(zt,qt).getImmediate();return{getId:()=>function rt(Ct){return Te.apply(this,arguments)}(tn),getToken:Er=>function Ye(Ct){return ft.apply(this,arguments)}(tn,Er)}};(function nr(){(0,g.Xd)(new d.wA(qt,tr,"PUBLIC")),(0,g.Xd)(new d.wA("installations-internal",fr,"PRIVATE"))})(),(0,g.KN)(O,N),(0,g.KN)(O,N,"esm2017")},8766:(o,c,u)=>{"use strict";u.d(c,{Lj:()=>Ie,X3:()=>ve});var n=u(5861);const g=(Me,et)=>et.some(Fe=>Me instanceof Fe);let d,A;const N=new WeakMap,U=new WeakMap,ie=new WeakMap,L=new WeakMap,ee=new WeakMap;let ce={get(Me,et,Fe){if(Me instanceof IDBTransaction){if("done"===et)return U.get(Me);if("objectStoreNames"===et)return Me.objectStoreNames||ie.get(Me);if("store"===et)return Fe.objectStoreNames[1]?void 0:Fe.objectStore(Fe.objectStoreNames[0])}return te(Me[et])},set:(Me,et,Fe)=>(Me[et]=Fe,!0),has:(Me,et)=>Me instanceof IDBTransaction&&("done"===et||"store"===et)||et in Me};function G(Me){return"function"==typeof Me?function Y(Me){return Me!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function O(){return A||(A=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(Me)?function(...et){return Me.apply(pe(this),et),te(N.get(this))}:function(...et){return te(Me.apply(pe(this),et))}:function(et,...Fe){const Ee=Me.call(pe(this),et,...Fe);return ie.set(Ee,et.sort?et.sort():[et]),te(Ee)}}(Me):(Me instanceof IDBTransaction&&function z(Me){if(U.has(Me))return;const et=new Promise((Fe,Ee)=>{const ae=()=>{Me.removeEventListener("complete",me),Me.removeEventListener("error",$),Me.removeEventListener("abort",$)},me=()=>{Fe(),ae()},$=()=>{Ee(Me.error||new DOMException("AbortError","AbortError")),ae()};Me.addEventListener("complete",me),Me.addEventListener("error",$),Me.addEventListener("abort",$)});U.set(Me,et)}(Me),g(Me,function R(){return d||(d=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(Me,ce):Me)}function te(Me){if(Me instanceof IDBRequest)return function K(Me){const et=new Promise((Fe,Ee)=>{const ae=()=>{Me.removeEventListener("success",me),Me.removeEventListener("error",$)},me=()=>{Fe(te(Me.result)),ae()},$=()=>{Ee(Me.error),ae()};Me.addEventListener("success",me),Me.addEventListener("error",$)});return et.then(Fe=>{Fe instanceof IDBCursor&&N.set(Fe,Me)}).catch(()=>{}),ee.set(et,Me),et}(Me);if(L.has(Me))return L.get(Me);const et=G(Me);return et!==Me&&(L.set(Me,et),ee.set(et,Me)),et}const pe=Me=>ee.get(Me);function ve(Me,et,{blocked:Fe,upgrade:Ee,blocking:ae,terminated:me}={}){const $=indexedDB.open(Me,et),ue=te($);return Ee&&$.addEventListener("upgradeneeded",Qe=>{Ee(te($.result),Qe.oldVersion,Qe.newVersion,te($.transaction))}),Fe&&$.addEventListener("blocked",()=>Fe()),ue.then(Qe=>{me&&Qe.addEventListener("close",()=>me()),ae&&Qe.addEventListener("versionchange",()=>ae())}).catch(()=>{}),ue}function Ie(Me,{blocked:et}={}){const Fe=indexedDB.deleteDatabase(Me);return et&&Fe.addEventListener("blocked",()=>et()),te(Fe).then(()=>{})}const we=["get","getKey","getAll","getAllKeys","count"],Ve=["put","add","delete","clear"],We=new Map;function Se(Me,et){if(!(Me instanceof IDBDatabase)||et in Me||"string"!=typeof et)return;if(We.get(et))return We.get(et);const Fe=et.replace(/FromIndex$/,""),Ee=et!==Fe,ae=Ve.includes(Fe);if(!(Fe in(Ee?IDBIndex:IDBObjectStore).prototype)||!ae&&!we.includes(Fe))return;const me=function(){var $=(0,n.Z)(function*(ue,...Qe){const xe=this.transaction(ue,ae?"readwrite":"readonly");let st=xe.store;return Ee&&(st=st.index(Qe.shift())),(yield Promise.all([st[Fe](...Qe),ae&&xe.done]))[0]});return function(Qe){return $.apply(this,arguments)}}();return We.set(et,me),me}!function X(Me){ce=Me(ce)}(Me=>({...Me,get:(et,Fe,Ee)=>Se(et,Fe)||Me.get(et,Fe,Ee),has:(et,Fe)=>!!Se(et,Fe)||Me.has(et,Fe)}))},7436:(o,c,u)=>{"use strict";u.d(c,{_$:()=>Vn,kv:()=>xt,lO:()=>Ut,tJ:()=>Le});var n=u(5861),g=u(6895),d=u(4650),A=u(9300),R=u(590),O=u(4004),N=u(3900),U=u(1135),ie=u(8996);const L=["stripeElementRef"];function ee(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function K(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function z(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function ce(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function X(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function Y(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function G(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function te(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function pe(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function ve(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function Ie(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function we(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function Ve(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function We(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function Se(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function Me(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function et(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}function Fe(qe,$e){if(1&qe&&d.GkF(0,3),2&qe){const T=d.oxw();d.Q6J("ngTemplateOutlet",T.loadingTemplate)}}let Ee=(()=>{class qe{constructor(T){this.templateRef=T}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(d.Rgc))},qe.\u0275dir=d.lG2({type:qe,selectors:[["","ngxStripeLoadingTemplate",""]],standalone:!0}),qe})();const ae=new d.OlP("Stripe Publishable Key"),me=new d.OlP("Stripe Options"),$=new d.OlP("NGX_STRIPE_VERSION");class ue{constructor($e,T,F,be,Pt){this.version=$e,this.loader=T,this.window=F,this.key=be,this.options=Pt,this.stripe$=new U.X(void 0),this.stripe=this.stripe$.asObservable().pipe((0,A.h)(Pn=>Boolean(Pn))),this.loader.asStream().pipe((0,A.h)(Pn=>!0===Pn.loaded),(0,R.P)(),(0,O.U)(()=>this.window.getNativeWindow().Stripe)).subscribe(Pn=>{const _r=this.options?Pn(this.key,this.options):Pn(this.key);_r.registerAppInfo(this.getNgxStripeAppInfo(this.version)),this.stripe$.next(_r)})}getInstance(){return this.stripe$.getValue()}elements($e){return this.stripe.pipe((0,O.U)(T=>T.elements($e)),(0,R.P)())}redirectToCheckout($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.redirectToCheckout($e))),(0,R.P)())}confirmPayment($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.confirmPayment($e))),(0,R.P)())}confirmAcssDebitPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmAcssDebitPayment($e,T,F))),(0,R.P)())}confirmUsBankAccountPayment($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.confirmUsBankAccountPayment($e,T))),(0,R.P)())}confirmAlipayPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmAlipayPayment($e,T,F))),(0,R.P)())}confirmAuBecsDebitPayment($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.confirmAuBecsDebitPayment($e,T))),(0,R.P)())}confirmBancontactPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmBancontactPayment($e,T,F))),(0,R.P)())}confirmBoletoPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmBoletoPayment($e,T,F))),(0,R.P)())}confirmCardPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmCardPayment($e,T,F))),(0,R.P)())}confirmCustomerBalancePayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmCustomerBalancePayment($e,T,F))),(0,R.P)())}confirmEpsPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmEpsPayment($e,T,F))),(0,R.P)())}confirmFpxPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmFpxPayment($e,T,F))),(0,R.P)())}confirmGiropayPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmGiropayPayment($e,T,F))),(0,R.P)())}confirmGrabPayPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmGrabPayPayment($e,T,F))),(0,R.P)())}confirmIdealPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmIdealPayment($e,T,F))),(0,R.P)())}confirmKlarnaPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmKlarnaPayment($e,T,F))),(0,R.P)())}confirmKonbiniPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmKonbiniPayment($e,T,F))),(0,R.P)())}confirmOxxoPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmOxxoPayment($e,T,F))),(0,R.P)())}confirmP24Payment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmP24Payment($e,T,F))),(0,R.P)())}confirmPayNowPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmPayNowPayment($e,T,F))),(0,R.P)())}confirmPayPalPayment($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.confirmPayPalPayment($e,T))),(0,R.P)())}confirmPixPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmPixPayment($e,T,F))),(0,R.P)())}confirmPromptPayPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmPromptPayPayment($e,T,F))),(0,R.P)())}confirmSepaDebitPayment($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.confirmSepaDebitPayment($e,T))),(0,R.P)())}confirmSofortPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmSofortPayment($e,T,F))),(0,R.P)())}confirmWechatPayPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmWechatPayPayment($e,T,F))),(0,R.P)())}handleCardAction($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.handleCardAction($e))),(0,R.P)())}verifyMicrodepositsForPayment($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.verifyMicrodepositsForPayment($e,T))),(0,R.P)())}createRadarSession(){return this.stripe.pipe((0,N.w)($e=>(0,ie.D)($e.createRadarSession())),(0,R.P)())}collectBankAccountForPayment($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.collectBankAccountForPayment($e))),(0,R.P)())}createPaymentMethod($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.createPaymentMethod($e))),(0,R.P)())}retrievePaymentIntent($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.retrievePaymentIntent($e))),(0,R.P)())}confirmSetup($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.confirmSetup($e))),(0,R.P)())}confirmAcssDebitSetup($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmAcssDebitSetup($e,T,F))),(0,R.P)())}confirmUsBankAccountSetup($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.confirmUsBankAccountSetup($e,T))),(0,R.P)())}confirmAuBecsDebitSetup($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.confirmAuBecsDebitSetup($e,T))),(0,R.P)())}confirmBacsDebitSetup($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.confirmBacsDebitSetup($e,T))),(0,R.P)())}confirmBancontactSetup($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.confirmBancontactSetup($e,T))),(0,R.P)())}confirmCardSetup($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmCardSetup($e,T,F))),(0,R.P)())}confirmIdealSetup($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.confirmIdealSetup($e,T))),(0,R.P)())}confirmPayPalSetup($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.confirmPayPalSetup($e,T))),(0,R.P)())}confirmSepaDebitSetup($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.confirmSepaDebitSetup($e,T))),(0,R.P)())}confirmSofortSetup($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmSofortSetup($e,T,F))),(0,R.P)())}confirmAffirmPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmAffirmPayment($e,T,F))),(0,R.P)())}confirmAfterpayClearpayPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmAfterpayClearpayPayment($e,T,F))),(0,R.P)())}verifyMicrodepositsForSetup($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.verifyMicrodepositsForSetup($e,T))),(0,R.P)())}collectBankAccountForSetup($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.collectBankAccountForSetup($e))),(0,R.P)())}retrieveSetupIntent($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.retrieveSetupIntent($e))),(0,R.P)())}processOrder($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.processOrder($e))),(0,R.P)())}retrieveOrder($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.retrieveOrder($e))),(0,R.P)())}paymentRequest($e){return this.getInstance().paymentRequest($e)}createToken($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.createToken($e,T))),(0,R.P)())}createSource($e,T){return this.stripe.pipe((0,N.w)(F=>(0,ie.D)(F.createSource($e,T))),(0,R.P)())}retrieveSource($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.retrieveSource($e))),(0,R.P)())}verifyIdentity($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.verifyIdentity($e))),(0,R.P)())}collectFinancialConnectionsAccounts($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.collectFinancialConnectionsAccounts($e))),(0,R.P)())}collectBankAccountToken($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.collectBankAccountToken($e))),(0,R.P)())}createEphemeralKeyNonce($e){return this.stripe.pipe((0,N.w)(T=>(0,ie.D)(T.createEphemeralKeyNonce($e))),(0,R.P)())}handleCardPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.handleCardPayment($e,T,F))),(0,R.P)())}confirmPaymentIntent($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmPaymentIntent($e,T,F))),(0,R.P)())}handleCardSetup($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.handleCardSetup($e,T,F))),(0,R.P)())}confirmSetupIntent($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.confirmSetupIntent($e,T,F))),(0,R.P)())}handleFpxPayment($e,T,F){return this.stripe.pipe((0,N.w)(be=>(0,ie.D)(be.handleFpxPayment($e,T,F))),(0,R.P)())}getNgxStripeAppInfo($e){return{name:"ngx-stripe",url:"https://ngx-stripe.dev",partner_id:"pp_partner_JR4l1rmvUoPP4V",version:$e}}}let Qe=(()=>{class qe{constructor(T){this.platformId=T}getNativeWindow(){return(0,g.NF)(this.platformId)?window:{}}}return qe.\u0275fac=function(T){return new(T||qe)(d.LFG(d.Lbi))},qe.\u0275prov=d.Yz7({token:qe,factory:qe.\u0275fac}),qe})(),xe=(()=>{class qe{constructor(T){this.platformId=T}getNativeDocument(){return(0,g.NF)(this.platformId)?document:{}}}return qe.\u0275fac=function(T){return new(T||qe)(d.LFG(d.Lbi))},qe.\u0275prov=d.Yz7({token:qe,factory:qe.\u0275fac}),qe})(),st=(()=>{class qe{constructor(T,F,be){this.platformId=T,this.window=F,this.document=be,this.status=new U.X({error:!1,loaded:!1,loading:!1})}asStream(){return this.load(),this.status.asObservable()}isReady(){return this.status.getValue().loaded}load(){if((0,g.PM)(this.platformId))return;const T=this.status.getValue();if(this.window.getNativeWindow().hasOwnProperty("Stripe"))this.status.next({error:!1,loaded:!0,loading:!1});else if(!T.loaded&&!T.loading){this.status.next({...T,loading:!0});const F=this.document.getNativeDocument().createElement("script");F.type="text/javascript",F.async=!0,F.defer=!0,F.src="https://js.stripe.com/v3/",F.onload=()=>{this.status.next({error:!1,loaded:!0,loading:!1})},F.onerror=()=>{this.status.next({error:!0,loaded:!1,loading:!1})},this.document.getNativeDocument().body.appendChild(F)}}}return qe.\u0275fac=function(T){return new(T||qe)(d.LFG(d.Lbi),d.LFG(Qe),d.LFG(xe))},qe.\u0275prov=d.Yz7({token:qe,factory:qe.\u0275fac}),qe})(),Le=(()=>{class qe{constructor(T,F,be,Pt,Pn){this.version=T,this.key=F,this.options=be,this.loader=Pt,this.window=Pn,F&&(this.stripe=new ue(this.version,this.loader,this.window,F,be))}getStripeReference(){return this.loader.asStream().pipe((0,A.h)(T=>!0===T.loaded),(0,O.U)(()=>this.window.getNativeWindow().Stripe))}getInstance(){return this.stripe.getInstance()}setKey(T,F){return this.changeKey(T,F)}changeKey(T,F){return this.stripe=new ue(this.version,this.loader,this.window,T,F),this.stripe}elements(T){return this.stripe.elements(T)}redirectToCheckout(T){return this.stripe.redirectToCheckout(T)}confirmPayment(T){return this.stripe.confirmPayment(T)}confirmAcssDebitPayment(T,F,be){return this.stripe.confirmAcssDebitPayment(T,F,be)}confirmUsBankAccountPayment(T,F){return this.stripe.confirmUsBankAccountPayment(T,F)}confirmAlipayPayment(T,F,be){return this.stripe.confirmAlipayPayment(T,F,be)}confirmAuBecsDebitPayment(T,F){return this.stripe.confirmAuBecsDebitPayment(T,F)}confirmBancontactPayment(T,F,be){return this.stripe.confirmBancontactPayment(T,F,be)}confirmBoletoPayment(T,F,be){return this.stripe.confirmBoletoPayment(T,F,be)}confirmCardPayment(T,F,be){return this.stripe.confirmCardPayment(T,F,be)}confirmCustomerBalancePayment(T,F,be){return this.stripe.confirmCustomerBalancePayment(T,F,be)}confirmEpsPayment(T,F,be){return this.stripe.confirmEpsPayment(T,F,be)}confirmFpxPayment(T,F,be){return this.stripe.confirmFpxPayment(T,F,be)}confirmGiropayPayment(T,F,be){return this.stripe.confirmGiropayPayment(T,F,be)}confirmGrabPayPayment(T,F,be){return this.stripe.confirmGrabPayPayment(T,F,be)}confirmIdealPayment(T,F,be){return this.stripe.confirmIdealPayment(T,F,be)}confirmKlarnaPayment(T,F,be){return this.stripe.confirmKlarnaPayment(T,F,be)}confirmKonbiniPayment(T,F,be){return this.stripe.confirmKonbiniPayment(T,F,be)}confirmOxxoPayment(T,F,be){return this.stripe.confirmOxxoPayment(T,F,be)}confirmP24Payment(T,F,be){return this.stripe.confirmP24Payment(T,F,be)}confirmPayNowPayment(T,F,be){return this.stripe.confirmPayNowPayment(T,F,be)}confirmPayPalPayment(T,F){return this.stripe.confirmPayPalPayment(T,F)}confirmPixPayment(T,F,be){return this.stripe.confirmPixPayment(T,F,be)}confirmPromptPayPayment(T,F,be){return this.stripe.confirmPromptPayPayment(T,F,be)}confirmSepaDebitPayment(T,F){return this.stripe.confirmSepaDebitPayment(T,F)}confirmSofortPayment(T,F,be){return this.stripe.confirmSofortPayment(T,F,be)}confirmWechatPayPayment(T,F,be){return this.stripe.confirmWechatPayPayment(T,F,be)}handleCardAction(T){return this.stripe.handleCardAction(T)}verifyMicrodepositsForPayment(T,F){return this.stripe.verifyMicrodepositsForPayment(T,F)}createRadarSession(){return this.stripe.createRadarSession()}collectBankAccountForPayment(T){return this.stripe.collectBankAccountForPayment(T)}createPaymentMethod(T){return this.stripe.createPaymentMethod(T)}retrievePaymentIntent(T){return this.stripe.retrievePaymentIntent(T)}confirmSetup(T){return this.stripe.confirmSetup(T)}confirmAcssDebitSetup(T,F,be){return this.stripe.confirmAcssDebitSetup(T,F,be)}confirmUsBankAccountSetup(T,F){return this.stripe.confirmUsBankAccountSetup(T,F)}confirmAuBecsDebitSetup(T,F){return this.stripe.confirmAuBecsDebitSetup(T,F)}confirmBacsDebitSetup(T,F){return this.stripe.confirmBacsDebitSetup(T,F)}confirmBancontactSetup(T,F){return this.stripe.confirmBancontactSetup(T,F)}confirmCardSetup(T,F,be){return this.stripe.confirmCardSetup(T,F,be)}confirmIdealSetup(T,F){return this.stripe.confirmIdealSetup(T,F)}confirmPayPalSetup(T,F){return this.stripe.confirmPayPalSetup(T,F)}confirmSepaDebitSetup(T,F){return this.stripe.confirmSepaDebitSetup(T,F)}confirmSofortSetup(T,F,be){return this.stripe.confirmSofortSetup(T,F,be)}confirmAffirmPayment(T,F,be){return this.stripe.confirmAffirmPayment(T,F,be)}confirmAfterpayClearpayPayment(T,F,be){return this.stripe.confirmAfterpayClearpayPayment(T,F,be)}verifyMicrodepositsForSetup(T,F){return this.stripe.verifyMicrodepositsForSetup(T,F)}collectBankAccountForSetup(T){return this.stripe.collectBankAccountForSetup(T)}retrieveSetupIntent(T){return this.stripe.retrieveSetupIntent(T)}processOrder(T){return this.stripe.processOrder(T)}retrieveOrder(T){return this.stripe.retrieveOrder(T)}paymentRequest(T){return this.stripe.paymentRequest(T)}createToken(T,F){return this.stripe.createToken(T,F)}createSource(T,F){return this.stripe.createSource(T,F)}retrieveSource(T){return this.stripe.retrieveSource(T)}verifyIdentity(T){return this.stripe.verifyIdentity(T)}collectFinancialConnectionsAccounts(T){return this.stripe.collectFinancialConnectionsAccounts(T)}collectBankAccountToken(T){return this.stripe.collectBankAccountToken(T)}createEphemeralKeyNonce(T){return this.stripe.createEphemeralKeyNonce(T)}handleCardPayment(T,F,be){return this.stripe.handleCardPayment(T,F,be)}confirmPaymentIntent(T,F,be){return this.stripe.confirmPaymentIntent(T,F,be)}handleCardSetup(T,F,be){return this.stripe.handleCardSetup(T,F,be)}confirmSetupIntent(T,F,be){return this.stripe.confirmSetupIntent(T,F,be)}handleFpxPayment(T,F,be){return this.stripe.handleFpxPayment(T,F,be)}}return qe.\u0275fac=function(T){return new(T||qe)(d.LFG($),d.LFG(ae),d.LFG(me),d.LFG(st),d.LFG(Qe))},qe.\u0275prov=d.Yz7({token:qe,factory:qe.\u0275fac}),qe})(),ke=(()=>{class qe{constructor(T){this.stripeService=T}elements(T,F={}){return T?Object.keys(F).length>0?T.elements(F):T.elements():Object.keys(F).length>0?this.stripeService.elements(F):this.stripeService.elements()}paymentRequest(T,F){return T?T.paymentRequest(F):this.stripeService.paymentRequest(F)}mergeOptions(T,F){return!F||T&&T.classes||T&&T.classes?T||{}:{...T||{},classes:{base:F,complete:`${F}--complete`,empty:`${F}--empty`,focus:`${F}--focus`,invalid:`${F}--invalid`,webkitAutoFill:`${F}--webkit-autoFill`}}}}return qe.\u0275fac=function(T){return new(T||qe)(d.LFG(Le))},qe.\u0275prov=d.Yz7({token:qe,factory:qe.\u0275fac}),qe})(),Ge=(()=>{class qe{constructor(T){this.stripeElementsService=T,this.elements=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";const be=F.elementsOptions,Pt=F.stripe;(T.elementsOptions||T.stripe||!F._elements)&&(F._elements=yield F.stripeElementsService.elements(Pt,be).toPromise(),F.elements.emit(F._elements)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){"notready"===T.state&&(T.state="starting",T._elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.elements.emit(T._elements),T.state="ready")})()}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke))},qe.\u0275dir=d.lG2({type:qe,selectors:[["ngx-stripe-elements"],["","ngxStripeElements",""]],inputs:{elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{elements:"elements"},standalone:!0,features:[d.TTD]}),qe})(),ut=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe,this.loaderror=new d.vpe,this.loaderstart=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){return this.element.update(T)}getValue(){return this.elements.getElement("address").getValue()}getAddressElement(){return this.element}createElement(T){this.element&&this.element.unmount(),this.element=this.elements.create("address",T),this.element.on("change",F=>this.change.emit(F)),this.element.on("blur",()=>this.blur.emit()),this.element.on("focus",()=>this.focus.emit()),this.element.on("ready",()=>this.ready.emit()),this.element.on("escape",()=>this.escape.emit()),this.element.on("loaderror",()=>this.loaderror.emit()),this.element.on("loaderstart",()=>this.loaderstart.emit()),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-address"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape",loaderror:"loaderror",loaderstart:"loaderstart"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,ee,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),pt=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.load=new d.vpe,this.ready=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}getAffirmMessage(){return this.element}createElement(T){this.element&&this.element.unmount(),this.element=this.elements.create("affirmMessage",T),this.element.on("ready",()=>this.ready.emit()),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-affirm-message"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",ready:"ready"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,K,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),$t=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.load=new d.vpe,this.ready=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}getAfterpayClearpayMessage(){return this.element}createElement(T){this.element&&this.element.unmount(),this.element=this.elements.create("afterpayClearpayMessage",T),this.element.on("ready",()=>this.ready.emit()),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-afterpay-clearpay-message"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",ready:"ready"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,z,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),bt=(()=>{class qe{constructor(T,F,be){this.cdr=T,this.stripeElementsService=F,this.elementsProvider=be,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt))})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F)}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F))})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}getCard(){return this.element}createElement(T={}){this.state="ready",this.cdr.detectChanges(),this.element&&this.element.unmount(),this.element=this.elements.create("card",T),this.element.on("change",F=>this.change.emit(F)),this.element.on("blur",()=>this.blur.emit()),this.element.on("focus",()=>this.focus.emit()),this.element.on("ready",()=>this.ready.emit()),this.element.on("escape",()=>this.escape.emit()),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(d.sBO),d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-card"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,ce,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),St=(()=>{class qe{constructor(T){this.stripeElementsService=T,this.elements=new d.vpe,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";const be=F.elementsOptions,Pt=F.stripe;(T.elementsOptions||T.stripe||!F._elements)&&(F._elements=yield F.stripeElementsService.elements(Pt,be).toPromise(),F.elements.emit(F._elements)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){"notready"===T.state&&(T.state="starting",T._elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.elements.emit(T._elements),T.state="ready")})()}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke))},qe.\u0275dir=d.lG2({type:qe,selectors:[["ngx-stripe-card-group"],["","ngxStripeCardGroup",""]],inputs:{elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{elements:"elements",load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape"},standalone:!0,features:[d.TTD]}),qe})(),Yt=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.cardGroup=F,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){(T.options||T.containerClass)&&F.setupElement("options")})()}ngOnInit(){if(!this.cardGroup)throw new Error("StripeCardNumberComponent must have StripeCardGroupDirective parent");this.cardGroupSubscription=this.cardGroup.elements.subscribe(T=>{this.elements=T,this.setupElement("elements")})}ngOnDestroy(){this.element&&this.element.destroy(),this.cardGroupSubscription&&this.cardGroupSubscription.unsubscribe()}update(T){this.element.update(T)}getCardNumber(){return this.element}setupElement(T){const F=this.stripeElementsService.mergeOptions(this.options,this.containerClass);this.element&&"options"===T?this.update(F):this.elements&&"elements"===T&&(this.element=this.elements.create("cardNumber",F),this.element.on("change",be=>{this.change.emit(be),this.cardGroup?.change.emit(be)}),this.element.on("blur",()=>{this.blur.emit(),this.cardGroup?.blur.emit()}),this.element.on("focus",()=>{this.focus.emit(),this.cardGroup?.focus.emit()}),this.element.on("ready",()=>{this.ready.emit(),this.cardGroup?.ready.emit()}),this.element.on("escape",()=>{this.escape.emit(),this.cardGroup?.escape.emit()}),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element),this.cardGroup?.load.emit(this.element))}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(St,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-card-number"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,X,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf",F.cardGroup&&"ready"!==F.cardGroup.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),kt=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.cardGroup=F,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){(T.options||T.containerClass)&&F.setupElement("options")})()}ngOnInit(){if(!this.cardGroup)throw new Error("StripeCardExpiryComponent must have StripeCardGroupDirective parent");this.cardGroupSubscription=this.cardGroup.elements.subscribe(T=>{this.elements=T,this.setupElement("elements")})}ngOnDestroy(){this.element&&this.element.destroy(),this.cardGroupSubscription&&this.cardGroupSubscription.unsubscribe()}update(T){this.element.update(T)}getCardExpiry(){return this.element}setupElement(T){const F=this.stripeElementsService.mergeOptions(this.options,this.containerClass);this.element&&"options"===T?this.update(F):this.elements&&"elements"===T&&(this.element=this.elements.create("cardExpiry",F),this.element.on("change",be=>{this.change.emit(be),this.cardGroup?.change.emit(be)}),this.element.on("blur",()=>{this.blur.emit(),this.cardGroup?.blur.emit()}),this.element.on("focus",()=>{this.focus.emit(),this.cardGroup?.focus.emit()}),this.element.on("ready",()=>{this.ready.emit(),this.cardGroup?.ready.emit()}),this.element.on("escape",()=>{this.escape.emit(),this.cardGroup?.escape.emit()}),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element),this.cardGroup?.load.emit(this.element))}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(St,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-card-expiry"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,Y,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf",F.cardGroup&&"ready"!==F.cardGroup.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),Et=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.cardGroup=F,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){(T.options||T.containerClass)&&F.setupElement("options")})()}ngOnInit(){if(!this.cardGroup)throw new Error("StripeCardCvcComponent must have StripeCardGroupDirective parent");this.cardGroupSubscription=this.cardGroup.elements.subscribe(T=>{this.elements=T,this.setupElement("elements")})}ngOnDestroy(){this.element&&this.element.destroy(),this.cardGroupSubscription&&this.cardGroupSubscription.unsubscribe()}update(T){this.element.update(T)}getCardCvc(){return this.element}setupElement(T){const F=this.stripeElementsService.mergeOptions(this.options,this.containerClass);this.element&&"options"===T?this.update(F):this.elements&&"elements"===T&&(this.element=this.elements.create("cardCvc",F),this.element.on("change",be=>{this.change.emit(be),this.cardGroup?.change.emit(be)}),this.element.on("blur",()=>{this.blur.emit(),this.cardGroup?.blur.emit()}),this.element.on("focus",()=>{this.focus.emit(),this.cardGroup?.focus.emit()}),this.element.on("ready",()=>{this.ready.emit(),this.cardGroup?.ready.emit()}),this.element.on("escape",()=>{this.escape.emit(),this.cardGroup?.escape.emit()}),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element),this.cardGroup?.load.emit(this.element))}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(St,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-card-cvc"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,G,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf",F.cardGroup&&"ready"!==F.cardGroup.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),It=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}getEpsBankelement(){return this.element}createElement(T){this.element&&this.element.unmount(),this.element=this.elements.create("epsBank",T),this.element.on("change",F=>this.change.emit(F)),this.element.on("blur",()=>this.blur.emit()),this.element.on("focus",()=>this.focus.emit()),this.element.on("ready",()=>this.ready.emit()),this.element.on("escape",()=>this.escape.emit()),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-eps-bank"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,te,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),gn=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}getFpxBank(){return this.element}createElement(T={accountHolderType:"individual"}){this.element&&this.element.unmount(),this.element=this.elements.create("fpxBank",T),this.element.on("change",F=>this.change.emit(F)),this.element.on("blur",()=>this.blur.emit()),this.element.on("focus",()=>this.focus.emit()),this.element.on("ready",()=>this.ready.emit()),this.element.on("escape",()=>this.escape.emit()),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-fpx-bank"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,pe,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),Sn=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}getIban(){return this.element}createElement(T={}){this.element&&this.element.unmount(),this.element=this.elements.create("iban",T),this.element.on("change",F=>this.change.emit(F)),this.element.on("blur",()=>this.blur.emit()),this.element.on("focus",()=>this.focus.emit()),this.element.on("ready",()=>this.ready.emit()),this.element.on("escape",()=>this.escape.emit()),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-iban"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,ve,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),cr=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}getIdealBank(){return this.element}createElement(T={}){this.element&&this.element.unmount(),this.element=this.elements.create("idealBank",T),this.element.on("change",F=>this.change.emit(F)),this.element.on("blur",()=>this.blur.emit()),this.element.on("focus",()=>this.focus.emit()),this.element.on("ready",()=>this.ready.emit()),this.element.on("escape",()=>this.escape.emit()),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-ideal-bank"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,Ie,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),Dn=(()=>{class qe{constructor(T,F,be){this.cdr=T,this.stripeElementsService=F,this.elementsProvider=be,this.load=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt))})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F)}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F))})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}createElement(T){this.state="ready",this.cdr.detectChanges(),this.element&&this.element.unmount(),this.element=this.elements.create("issuingCardCvcDisplay",T),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(d.sBO),d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-issuing-card-cvc-display"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,we,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),jn=(()=>{class qe{constructor(T,F,be){this.cdr=T,this.stripeElementsService=F,this.elementsProvider=be,this.load=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt))})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F)}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F))})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}createElement(T){this.state="ready",this.cdr.detectChanges(),this.element&&this.element.unmount(),this.element=this.elements.create("issuingCardExpiryDisplay",T),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(d.sBO),d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-issuing-card-expiry-display"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,Ve,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),Mn=(()=>{class qe{constructor(T,F,be){this.cdr=T,this.stripeElementsService=F,this.elementsProvider=be,this.load=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt))})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F)}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F))})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}createElement(T){this.state="ready",this.cdr.detectChanges(),this.element&&this.element.unmount(),this.element=this.elements.create("issuingCardNumberDisplay",T),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(d.sBO),d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-issuing-card-number-display"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,We,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),Fn=(()=>{class qe{constructor(T,F,be){this.cdr=T,this.stripeElementsService=F,this.elementsProvider=be,this.load=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt))})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F)}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F))})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}createElement(T){this.state="ready",this.cdr.detectChanges(),this.element&&this.element.unmount(),this.element=this.elements.create("issuingCardPinDisplay",T),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(d.sBO),d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-issuing-card-pin-display"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,Se,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),un=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe,this.loaderror=new d.vpe,this.loaderstart=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&F.elements&&be&&F.createElement(Pt),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}getLinkAuthenticationElement(){return this.element}createElement(T){this.element&&this.element.unmount(),this.element=this.elements.create("linkAuthentication",T),this.element.on("change",F=>this.change.emit(F)),this.element.on("blur",()=>this.blur.emit()),this.element.on("focus",()=>this.focus.emit()),this.element.on("ready",()=>this.ready.emit()),this.element.on("escape",()=>this.escape.emit()),this.element.on("loaderror",()=>this.loaderror.emit()),this.element.on("loaderstart",()=>this.loaderstart.emit()),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-link-authentication"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape",loaderror:"loaderror",loaderstart:"loaderstart"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,Me,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),Wn=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}getP24Bankelement(){return this.element}createElement(T){this.element&&this.element.unmount(),this.element=this.elements.create("p24Bank",T),this.element.on("change",F=>this.change.emit(F)),this.element.on("blur",()=>this.blur.emit()),this.element.on("focus",()=>this.focus.emit()),this.element.on("ready",()=>this.ready.emit()),this.element.on("escape",()=>this.escape.emit()),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-p24-bank"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,et,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),Zn=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){this.element.update(T)}getAuBankAccount(){return this.element}createElement(T={}){this.element&&this.element.unmount(),this.element=this.elements.create("auBankAccount",T),this.element.on("change",F=>this.change.emit(F)),this.element.on("blur",()=>this.blur.emit()),this.element.on("focus",()=>this.focus.emit()),this.element.on("ready",()=>this.ready.emit()),this.element.on("escape",()=>this.escape.emit()),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-au-bank-account"]],contentQueries:function(T,F,be){if(1&T&&d.Suo(be,Ee,5,d.Rgc),2&T){let Pt;d.iGM(Pt=d.CRH())&&(F.loadingTemplate=Pt.first)}},viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape"},standalone:!0,features:[d.TTD,d.jDz],decls:3,vars:1,consts:[[1,"field"],["stripeElementRef",""],[3,"ngTemplateOutlet",4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(T,F){1&T&&(d.TgZ(0,"div",0,1),d.YNc(2,Fe,1,1,"ng-container",2),d.qZA()),2&T&&(d.xp6(2),d.Q6J("ngIf","ready"!==F.state&&F.loadingTemplate))},dependencies:[g.ez,g.O5,g.tP],encapsulation:2}),qe})(),Vn=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.doNotCreateUntilClientSecretIsSet=!1,this.load=new d.vpe,this.blur=new d.vpe,this.change=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.escape=new d.vpe,this.loaderror=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){F.state="starting";let be=!1;!F.elementsProvider&&(T.elementsOptions||T.stripe||T.clientSecret||T.appearance||!F.elements)&&(F.elements=yield F.stripeElementsService.elements(F.stripe,{...F.elementsOptions||{},...F.appearance?{appearance:F.appearance}:{},...F.clientSecret?{clientSecret:F.clientSecret}:{}}).toPromise(),be=!0);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt)),F.state="ready"})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe,{...T.elementsOptions||{},...T.appearance?{appearance:T.appearance}:{},...T.clientSecret?{clientSecret:T.clientSecret}:{}}).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}update(T){return this.element.update(T)}collapse(){return this.element.collapse()}fetchUpdates(){return(0,ie.D)(this.elements.fetchUpdates())}createElement(T={}){this.element&&this.element.unmount();try{this.element=this.elements.create("payment",T)}catch(F){throw this.elements=null,F}this.element.on("change",F=>this.change.emit(F)),this.element.on("blur",F=>this.blur.emit(F)),this.element.on("focus",F=>this.focus.emit(F)),this.element.on("ready",F=>this.ready.emit(F)),this.element.on("escape",F=>this.escape.emit(F)),this.element.on("loaderror",F=>this.loaderror.emit(F)),this.element.mount(this.stripeElementRef.nativeElement),this.load.emit(this.element)}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-payment"]],viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",options:"options",elementsOptions:"elementsOptions",stripe:"stripe",appearance:"appearance",clientSecret:"clientSecret",doNotCreateUntilClientSecretIsSet:"doNotCreateUntilClientSecretIsSet"},outputs:{load:"load",blur:"blur",change:"change",focus:"focus",ready:"ready",escape:"escape",loaderror:"loaderror"},standalone:!0,features:[d.TTD,d.jDz],decls:2,vars:0,consts:[[1,"field"],["stripeElementRef",""]],template:function(T,F){1&T&&d._UZ(0,"div",0,1)},dependencies:[g.ez],encapsulation:2}),qe})(),sr=(()=>{class qe{constructor(T,F){this.stripeElementsService=T,this.elementsProvider=F,this.load=new d.vpe,this.change=new d.vpe,this.blur=new d.vpe,this.focus=new d.vpe,this.ready=new d.vpe,this.token=new d.vpe,this.paymentMethod=new d.vpe,this.source=new d.vpe,this.cancel=new d.vpe,this.shippingaddresschange=new d.vpe,this.shippingoptionchange=new d.vpe,this.notavailable=new d.vpe,this.state="notready"}ngOnChanges(T){var F=this;return(0,n.Z)(function*(){let be=!1;if(!F.elementsProvider&&(T.elementsOptions||T.stripe||!F.elements)){const Pn=yield F.stripeElementsService.elements(F.stripe,F.elementsOptions).toPromise();F.elements=Pn,be=!0}T.paymentOptions&&F.paymentRequest&&F.updateRequest(F.paymentOptions);const Pt=F.stripeElementsService.mergeOptions(F.options,F.containerClass);(T.options||T.containerClass||!F.element||be)&&(F.element&&!be?F.update(Pt):F.elements&&be&&F.createElement(Pt))})()}ngOnInit(){var T=this;return(0,n.Z)(function*(){const F=T.stripeElementsService.mergeOptions(T.options,T.containerClass);T.elementsProvider?T.elementsSubscription=T.elementsProvider.elements.subscribe(be=>{T.elements=be,T.createElement(F),T.state="ready"}):"notready"===T.state&&(T.state="starting",T.elements=yield T.stripeElementsService.elements(T.stripe).toPromise(),T.createElement(F),T.state="ready")})()}ngOnDestroy(){this.element&&this.element.destroy(),this.elementsSubscription&&this.elementsSubscription.unsubscribe()}canMakePayment(){return(0,ie.D)(this.paymentRequest.canMakePayment())}update(T){this.element.update(T)}updateRequest(T){const{currency:F,total:be,displayItems:Pt,shippingOptions:Pn}=T;this.paymentRequest.update({currency:F,total:be,displayItems:Pt,shippingOptions:Pn})}show(){this.paymentRequest.show()}abort(){this.paymentRequest.abort()}isShowing(){return this.paymentRequest.isShowing()}getButton(){return this.element}createElement(T={}){var F=this;return(0,n.Z)(function*(){F.paymentRequest=F.stripeElementsService.paymentRequest(F.stripe,F.paymentOptions),F.paymentRequest.on("token",Pt=>F.token.emit(Pt)),F.paymentMethod.observed&&F.paymentRequest.on("paymentmethod",Pt=>F.paymentMethod.emit(Pt)),F.source.observed&&!F.paymentMethod.observed&&F.paymentRequest.on("source",Pt=>F.source.emit(Pt)),F.paymentRequest.on("cancel",()=>F.cancel.emit()),F.paymentRequest.on("shippingaddresschange",Pt=>F.shippingaddresschange.emit(Pt)),F.paymentRequest.on("shippingoptionchange",Pt=>F.shippingoptionchange.emit(Pt)),F.element&&F.element.unmount(),F.element=F.elements.create("paymentRequestButton",{paymentRequest:F.paymentRequest,...T}),(yield F.paymentRequest.canMakePayment())?(F.element.on("click",Pt=>F.change.emit(Pt)),F.element.on("blur",()=>F.blur.emit()),F.element.on("focus",()=>F.focus.emit()),F.element.on("ready",()=>F.ready.emit()),F.element.mount(F.stripeElementRef.nativeElement),F.load.emit({paymentRequestButton:F.element,paymentRequest:F.paymentRequest})):F.notavailable.emit()})()}}return qe.\u0275fac=function(T){return new(T||qe)(d.Y36(ke),d.Y36(Ge,8))},qe.\u0275cmp=d.Xpm({type:qe,selectors:[["ngx-stripe-payment-request-button"]],viewQuery:function(T,F){if(1&T&&d.Gf(L,5),2&T){let be;d.iGM(be=d.CRH())&&(F.stripeElementRef=be.first)}},inputs:{containerClass:"containerClass",paymentOptions:"paymentOptions",options:"options",elementsOptions:"elementsOptions",stripe:"stripe"},outputs:{load:"load",change:"change",blur:"blur",focus:"focus",ready:"ready",token:"token",paymentMethod:"paymentMethod",source:"source",cancel:"cancel",shippingaddresschange:"shippingaddresschange",shippingoptionchange:"shippingoptionchange",notavailable:"notavailable"},standalone:!0,features:[d.TTD,d.jDz],decls:2,vars:0,consts:[[1,"field"],["stripeElementRef",""]],template:function(T,F){1&T&&d._UZ(0,"div",0,1)},dependencies:[g.ez],encapsulation:2}),qe})(),Tr=(()=>{class qe{constructor(T,F,be,Pt,Pn){this.version=T,this.baseKey=F,this.baseOptions=be,this.loader=Pt,this.window=Pn}create(T,F){if(!T&&!this.baseKey)throw new Error("No key defined! Either you need to pass it as a parameter or define it when you call NgxStripeModule.forRoot()");return new ue(this.version,this.loader,this.window,T||this.baseKey,F||this.baseOptions)}}return qe.\u0275fac=function(T){return new(T||qe)(d.LFG($),d.LFG(ae),d.LFG(me),d.LFG(st),d.LFG(Qe))},qe.\u0275prov=d.Yz7({token:qe,factory:qe.\u0275fac}),qe})();const bn=[ut,pt,$t,bt,Yt,kt,Et,It,gn,Sn,cr,Dn,jn,Mn,Fn,un,Wn,Zn,Vn,sr];let Ut=(()=>{class qe{static forRoot(T,F){return{ngModule:qe,providers:[st,Le,Tr,ke,Qe,xe,{provide:ae,useValue:T},{provide:me,useValue:F},{provide:$,useValue:"15.6.0"}]}}static forChild(T,F){return{ngModule:qe,providers:[st,Le,Tr,ke,Qe,xe,{provide:ae,useValue:T},{provide:me,useValue:F},{provide:$,useValue:"15.6.0"}]}}}return qe.\u0275fac=function(T){return new(T||qe)},qe.\u0275mod=d.oAB({type:qe}),qe.\u0275inj=d.cJS({imports:[g.ez,bn]}),qe})();function xt(qe,$e){if(qe)return(0,d.f3M)(Tr).create(qe,$e);if((0,d.f3M)(ae))return(0,d.f3M)(Le);throw new Error("Publishable Key is required either global or pass as parameter")}},5861:(o,c,u)=>{"use strict";function n(d,A,R,O,N,U,ie){try{var L=d[U](ie),ee=L.value}catch(K){return void R(K)}L.done?A(ee):Promise.resolve(ee).then(O,N)}function g(d){return function(){var A=this,R=arguments;return new Promise(function(O,N){var U=d.apply(A,R);function ie(ee){n(U,O,N,ie,L,"next",ee)}function L(ee){n(U,O,N,ie,L,"throw",ee)}ie(void 0)})}}u.d(c,{Z:()=>g})}}]);