UNPKG

@ngageoint/mage.web-app

Version:

The MAGE web-app is the UI for interacting with the MAGE service in a web browser.

1 lines 503 kB
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[179],{82524:(rt,_e,_)=>{_.d(_e,{s:()=>R});var f=_(80529),v=_(96213),T=_(94650);let R=(()=>{class B{constructor(se){this.httpClient=se}getApi(){return this.httpClient.get("/api",{context:(new f.qT).set(v.h,!0)})}}return B.\u0275fac=function(se){return new(se||B)(T.LFG(f.eN))},B.\u0275prov=T.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),B})()},38159:(rt,_e,_)=>{_.d(_e,{n:()=>v});var f=_(94650);let v=(()=>{class T{constructor(){this.tokenKey="token",this.pollingIntervalKey="pollingInterval",this.timeIntervalKey="timeInterval",this.teamsKey="teams",this.mapPositionKey="mapPosition",this.coordinateSystemViewKey="coordinateSystemView",this.coordinateSystemEditKey="coordinateSystemEdit",this.timeZoneViewKey="timeZoneView",this.timeZoneEditKey="timeZoneEdit",this.timeFormatKey="timeFormat"}getToken(){return this.getLocalItem(this.tokenKey)}setToken(B){return this.setLocalItem(this.tokenKey,B)}removeToken(){return this.removeLocalItem(this.tokenKey)}setPollingInterval(B){return this.setLocalItem(this.pollingIntervalKey,B)}getPollingInterval(){return this.getLocalItem(this.pollingIntervalKey)}setTimeInterval(B){return this.setLocalItem(this.timeIntervalKey,JSON.stringify(B))}getTimeInterval(){const B=this.getLocalItem(this.timeIntervalKey);if(B){const V=JSON.parse(B);return V&&V.options&&(V.options.startDate&&(V.options.startDate=new Date(V.options.startDate)),V.options.endDate&&(V.options.endDate=new Date(V.options.endDate))),V}}getTeams(){const B=this.getLocalItem(this.teamsKey);if(B)return JSON.parse(B)}setTeams(B){return this.setLocalItem(this.teamsKey,JSON.stringify(B))}removeTeams(){return this.removeLocalItem(this.teamsKey)}setMapPosition(B){return this.setLocalItem(this.mapPositionKey,JSON.stringify(B))}getMapPosition(){const B=this.getLocalItem(this.mapPositionKey);if(B)return JSON.parse(B)}getCoordinateSystemView(){return this.getLocalItem(this.coordinateSystemViewKey)||"wgs84"}setCoordinateSystemView(B){return this.setLocalItem(this.coordinateSystemViewKey,B)}getCoordinateSystemEdit(){return this.getLocalItem(this.coordinateSystemEditKey)||this.getCoordinateSystemView()}setCoordinateSystemEdit(B){return this.setLocalItem(this.coordinateSystemEditKey,B)}getTimeZoneView(){return this.getLocalItem(this.timeZoneViewKey)||"local"}setTimeZoneView(B){return this.setLocalItem(this.timeZoneViewKey,B)}getTimeZoneEdit(){return this.getLocalItem(this.timeZoneEditKey)||this.getTimeZoneView()}setTimeZoneEdit(B){return this.setLocalItem(this.timeZoneEditKey,B)}getTimeFormat(){return this.getLocalItem(this.timeFormatKey)||"absolute"}setTimeFormat(B){return this.setLocalItem(this.timeFormatKey,B)}getLocalItem(B){try{if("localStorage"in window&&null!==window.localStorage)return localStorage.getItem(B)}catch{return}}setLocalItem(B,V){try{if("localStorage"in window&&null!==window.localStorage)return localStorage.setItem(B,V)}catch{return}}removeLocalItem(B){try{if("localStorage"in window&&null!==window.localStorage)return localStorage.removeItem(B)}catch{return!1}}}return T.\u0275fac=function(B){return new(B||T)},T.\u0275prov=f.Yz7({token:T,factory:T.\u0275fac,providedIn:"root"}),T})()},96213:(rt,_e,_)=>{_.d(_e,{N:()=>H,h:()=>z});var f=_(80529),v=_(77579),T=_(70262),R=_(63900),B=_(62843),V=_(28383),se=_(94650),Q=_(65938),Y=_(1584),$=_(38159);const z=new f.Xk(()=>!1);let H=(()=>{class Se{constructor(he,Ee,ye){this.dialog=he,this.userService=Ee,this.localStorageService=ye,this.isRefreshingToken=!1,this.tokenSubject=new v.x}intercept(he,Ee){return!0===he.context.get(z)?Ee.handle(he):he.url.startsWith("/api/")?Ee.handle(this.tokenRequest(he)).pipe((0,T.K)(Ue=>Ue instanceof f.UA&&401===Ue.status?(this.userService.setUser(null),this.isRefreshingToken||(this.isRefreshingToken=!0,this.dialog.open(V.h,{width:"600px",disableClose:!0,autoFocus:!1}).afterClosed().subscribe(()=>{this.isRefreshingToken=!1,this.tokenSubject.next()})),this.tokenSubject.pipe((0,R.w)(()=>Ee.handle(this.tokenRequest(he))))):(0,B._)(()=>Ue))):Ee.handle(he)}tokenRequest(he){const Ee=this.localStorageService.getToken();return he.clone({headers:he.headers.set("Authorization",`Bearer ${Ee}`)})}}return Se.\u0275fac=function(he){return new(he||Se)(se.LFG(Q.uw),se.LFG(Y.K),se.LFG($.n))},Se.\u0275prov=se.Yz7({token:Se,factory:Se.\u0275fac,providedIn:"root"}),Se})()},28383:(rt,_e,_)=>{_.d(_e,{h:()=>R});var f=_(94650),v=_(82524),T=_(65938);let R=(()=>{class B{constructor(se,Q){this.apiService=se,this.dialogRef=Q}ngOnInit(){this.apiService.getApi().subscribe(se=>{this.api=se})}onIngress(){this.dialogRef.close()}}return B.\u0275fac=function(se){return new(se||B)(f.Y36(v.s),f.Y36(T.so))},B.\u0275cmp=f.Xpm({type:B,selectors:[["authentication-dialog"]],decls:6,vars:2,consts:[[1,"mat-dialog-title"],["mat-dialog-content",""],[1,"ingress"],[3,"landing","api","complete"]],template:function(se,Q){1&se&&(f.TgZ(0,"div")(1,"h3",0),f._uU(2,"Please signin to continue to Mage"),f.qZA(),f.TgZ(3,"div",1)(4,"div",2)(5,"ingress",3),f.NdJ("complete",function(){return Q.onIngress()}),f.qZA()()()()),2&se&&(f.xp6(5),f.Q6J("landing",!1)("api",Q.api))},styles:[".ingress[_ngcontent-%COMP%]{width:100%;height:100%}"]}),B})()},1584:(rt,_e,_)=>{_.d(_e,{K:()=>Q});var f=_(80529),v=_(61135),T=_(77579),R=_(18505),B=_(96213),V=_(94650),se=_(38159);let Q=(()=>{class Y{constructor(z,H){this.httpClient=z,this.localStorageService=H,this._myself=new v.X(null),this.myself$=this._myself.asObservable()}signup(z){return this.httpClient.post("/api/users/signups",{username:z},{context:(new f.qT).set(B.h,!0)})}signupVerify(z,H){return this.httpClient.post("/api/users/signups/verifications",z,{headers:{Authorization:`Bearer ${H}`},context:(new f.qT).set(B.h,!0)})}signin(z,H){return this.httpClient.post("/auth/local/signin",{username:z,password:H,appVersion:"Web Client"})}idpSignin(z){let H=new T.x;const Ie=window.open("/auth/"+z+"/signin","_blank");return window.addEventListener("message",function he(Ee){window.removeEventListener("message",he,!1),Ee.origin===window.location.origin&&(H.next(Ee.data),Ie.close())},!1),H.asObservable()}ldapSignin(z,H){return this.httpClient.post("/api/ldap/signin",{username:z,password:H,appVersion:"Web Client"},{context:(new f.qT).set(B.h,!0)})}authorize(z,H){return this.httpClient.post("/auth/token?createDevice=false",{uid:H,appVersion:"Web Client"},{headers:{Authorization:`Bearer ${z}`}}).pipe((0,R.b)(Se=>{this.setUser(Se.user)}))}getMyself(){return this.httpClient.get("/api/users/myself").pipe((0,R.b)(z=>{this.setUser(z)}))}setUser(z){this._myself.next(z),this.myself=z,this.amAdmin=this.myself&&this.myself.role&&("ADMIN_ROLE"===this.myself.role.name||"EVENT_MANAGER_ROLE"===this.myself.role.name)}getUser(z,H){const Se={};return(H=H||{}).populate&&(Se.populate=H.populate),this.httpClient.post(`/api/users/${z}`,{params:Se})}hasPermission(z){return this.myself.role.permissions.includes(z)}addRecentEvent(z){return this.httpClient.post(`/api/users/${this.myself.id}/events/${z.id}/recent`,{})}getRecentEventId(){var z=this.myself.recentEventIds;return z.length>0?z[0]:null}logout(){return this.httpClient.post("/api/logout",null,{responseType:"text"}).pipe((0,R.b)(()=>{this.clearUser()}))}saveProfile(z){const H=new FormData;for(var Se in z)null!=z[Se]&&H.append(Se,z[Se]);return this.httpClient.put("/api/users/myself",H,{reportProgress:!0,observe:"events"})}updatePassword(z,H){return this.httpClient.put("/api/users/myself/password",{username:this.myself.username,password:z,newPassword:H,newPasswordConfirm:H},{context:(new f.qT).set(B.h,!0),responseType:"text"})}clearUser(){this.myself=null,this.amAdmin=null,this.localStorageService.removeToken()}}return Y.\u0275fac=function(z){return new(z||Y)(V.LFG(f.eN),V.LFG(se.n))},Y.\u0275prov=V.Yz7({token:Y,factory:Y.\u0275fac,providedIn:"root"}),Y})()},53255:(rt,_e,_)=>{var f=_(11481),v=_(94650),T=_(37340);function B(w){return new v.vHH(3e3,!1)}function pe(){return typeof window<"u"&&typeof window.document<"u"}function Ce(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Ze(w){switch(w.length){case 0:return new T.ZN;case 1:return w[0];default:return new T.ZE(w)}}function Ct(w,a,c,D,M=new Map,x=new Map){const ae=[],le=[];let Le=-1,Qe=null;if(D.forEach(pt=>{const _t=pt.get("offset"),Xt=_t==Le,Gt=Xt&&Qe||new Map;pt.forEach((St,xt)=>{let cn=xt,dn=St;if("offset"!==xt)switch(cn=a.normalizePropertyName(cn,ae),dn){case T.k1:dn=M.get(xt);break;case T.l3:dn=x.get(xt);break;default:dn=a.normalizeStyleValue(xt,cn,dn,ae)}Gt.set(cn,dn)}),Xt||le.push(Gt),Qe=Gt,Le=_t}),ae.length)throw function De(w){return new v.vHH(3502,!1)}();return le}function Pt(w,a,c,D){switch(a){case"start":w.onStart(()=>D(c&&dt(c,"start",w)));break;case"done":w.onDone(()=>D(c&&dt(c,"done",w)));break;case"destroy":w.onDestroy(()=>D(c&&dt(c,"destroy",w)))}}function dt(w,a,c){const x=At(w.element,w.triggerName,w.fromState,w.toState,a||w.phaseName,c.totalTime??w.totalTime,!!c.disabled),ae=w._data;return null!=ae&&(x._data=ae),x}function At(w,a,c,D,M="",x=0,ae){return{element:w,triggerName:a,fromState:c,toState:D,phaseName:M,totalTime:x,disabled:!!ae}}function wt(w,a,c){let D=w.get(a);return D||w.set(a,D=c),D}function en(w){const a=w.indexOf(":");return[w.substring(1,a),w.slice(a+1)]}let Nt=(w,a)=>!1,kt=(w,a,c)=>[],Kt=null;function st(w){const a=w.parentNode||w.host;return a===Kt?null:a}(Ce()||typeof Element<"u")&&(pe()?(Kt=(()=>document.documentElement)(),Nt=(w,a)=>{for(;a;){if(a===w)return!0;a=st(a)}return!1}):Nt=(w,a)=>w.contains(a),kt=(w,a,c)=>{if(c)return Array.from(w.querySelectorAll(a));const D=w.querySelector(a);return D?[D]:[]});let O=null,G=!1;const F=Nt,k=kt;let Pe=(()=>{class w{validateStyleProperty(c){return function be(w){O||(O=function re(){return typeof document<"u"?document.body:null}()||{},G=!!O.style&&"WebkitAppearance"in O.style);let a=!0;return O.style&&!function Ye(w){return"ebkit"==w.substring(1,6)}(w)&&(a=w in O.style,!a&&G&&(a="Webkit"+w.charAt(0).toUpperCase()+w.slice(1)in O.style)),a}(c)}matchesElement(c,D){return!1}containsElement(c,D){return F(c,D)}getParentElement(c){return st(c)}query(c,D,M){return k(c,D,M)}computeStyle(c,D,M){return M||""}animate(c,D,M,x,ae,le=[],Le){return new T.ZN(M,x)}}return w.\u0275fac=function(c){return new(c||w)},w.\u0275prov=v.Yz7({token:w,factory:w.\u0275fac}),w})(),je=(()=>{class w{}return w.NOOP=new Pe,w})();const P="ng-enter",me="ng-leave",We="ng-trigger",He=".ng-trigger",oe="ng-animating",q=".ng-animating";function Z(w){if("number"==typeof w)return w;const a=w.match(/^(-?[\.\d]+)(m?s)/);return!a||a.length<2?0:L(parseFloat(a[1]),a[2])}function L(w,a){return"s"===a?1e3*w:w}function X(w,a,c){return w.hasOwnProperty("duration")?w:function N(w,a,c){let M,x=0,ae="";if("string"==typeof w){const le=w.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===le)return a.push(B()),{duration:0,delay:0,easing:""};M=L(parseFloat(le[1]),le[2]);const Le=le[3];null!=Le&&(x=L(parseFloat(Le),le[4]));const Qe=le[5];Qe&&(ae=Qe)}else M=w;if(!c){let le=!1,Le=a.length;M<0&&(a.push(function V(){return new v.vHH(3100,!1)}()),le=!0),x<0&&(a.push(function se(){return new v.vHH(3101,!1)}()),le=!0),le&&a.splice(Le,0,B())}return{duration:M,delay:x,easing:ae}}(w,a,c)}function de(w,a={}){return Object.keys(w).forEach(c=>{a[c]=w[c]}),a}function Fe(w){const a=new Map;return Object.keys(w).forEach(c=>{a.set(c,w[c])}),a}function Vt(w,a=new Map,c){if(c)for(let[D,M]of c)a.set(D,M);for(let[D,M]of w)a.set(D,M);return a}function Xn(w,a,c){return c?a+":"+c+";":""}function jt(w){let a="";for(let c=0;c<w.style.length;c++){const D=w.style.item(c);a+=Xn(0,D,w.style.getPropertyValue(D))}for(const c in w.style)w.style.hasOwnProperty(c)&&!c.startsWith("_")&&(a+=Xn(0,vt(c),w.style[c]));w.setAttribute("style",a)}function on(w,a,c){w.style&&(a.forEach((D,M)=>{const x=Xe(M);c&&!c.has(M)&&c.set(M,w.style[x]),w.style[x]=D}),Ce()&&jt(w))}function an(w,a){w.style&&(a.forEach((c,D)=>{const M=Xe(D);w.style[M]=""}),Ce()&&jt(w))}function En(w){return Array.isArray(w)?1==w.length?w[0]:(0,T.vP)(w):w}const Mn=new RegExp("{{\\s*(.+?)\\s*}}","g");function te(w){let a=[];if("string"==typeof w){let c;for(;c=Mn.exec(w);)a.push(c[1]);Mn.lastIndex=0}return a}function ne(w,a,c){const D=w.toString(),M=D.replace(Mn,(x,ae)=>{let le=a[ae];return null==le&&(c.push(function Y(w){return new v.vHH(3003,!1)}()),le=""),le.toString()});return M==D?w:M}function j(w){const a=[];let c=w.next();for(;!c.done;)a.push(c.value),c=w.next();return a}const we=/-+([a-z0-9])/g;function Xe(w){return w.replace(we,(...a)=>a[1].toUpperCase())}function vt(w){return w.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function nn(w,a,c){switch(a.type){case 7:return w.visitTrigger(a,c);case 0:return w.visitState(a,c);case 1:return w.visitTransition(a,c);case 2:return w.visitSequence(a,c);case 3:return w.visitGroup(a,c);case 4:return w.visitAnimate(a,c);case 5:return w.visitKeyframes(a,c);case 6:return w.visitStyle(a,c);case 8:return w.visitReference(a,c);case 9:return w.visitAnimateChild(a,c);case 10:return w.visitAnimateRef(a,c);case 11:return w.visitQuery(a,c);case 12:return w.visitStagger(a,c);default:throw function $(w){return new v.vHH(3004,!1)}()}}function Vn(w,a){return window.getComputedStyle(w)[a]}function Kn(w,a){const c=[];return"string"==typeof w?w.split(/\s*,\s*/).forEach(D=>function kr(w,a,c){if(":"==w[0]){const Le=function Jr(w,a){switch(w){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(c,D)=>parseFloat(D)>parseFloat(c);case":decrement":return(c,D)=>parseFloat(D)<parseFloat(c);default:return a.push(function Te(w){return new v.vHH(3016,!1)}()),"* => *"}}(w,c);if("function"==typeof Le)return void a.push(Le);w=Le}const D=w.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==D||D.length<4)return c.push(function ce(w){return new v.vHH(3015,!1)}()),a;const M=D[1],x=D[2],ae=D[3];a.push(Br(M,ae));"<"==x[0]&&!("*"==M&&"*"==ae)&&a.push(Br(ae,M))}(D,c,a)):c.push(w),c}const qt=new Set(["true","1"]),qr=new Set(["false","0"]);function Br(w,a){const c=qt.has(w)||qr.has(w),D=qt.has(a)||qr.has(a);return(M,x)=>{let ae="*"==w||w==M,le="*"==a||a==x;return!ae&&c&&"boolean"==typeof M&&(ae=M?qt.has(w):qr.has(w)),!le&&D&&"boolean"==typeof x&&(le=x?qt.has(a):qr.has(a)),ae&&le}}const ei=new RegExp("s*:selfs*,?","g");function rr(w,a,c,D){return new tr(w).build(a,c,D)}class tr{constructor(a){this._driver=a}build(a,c,D){const M=new An(c);return this._resetContextStyleTimingState(M),nn(this,En(a),M)}_resetContextStyleTimingState(a){a.currentQuerySelector="",a.collectedStyles=new Map,a.collectedStyles.set("",new Map),a.currentTime=0}visitTrigger(a,c){let D=c.queryCount=0,M=c.depCount=0;const x=[],ae=[];return"@"==a.name.charAt(0)&&c.errors.push(function H(){return new v.vHH(3006,!1)}()),a.definitions.forEach(le=>{if(this._resetContextStyleTimingState(c),0==le.type){const Le=le,Qe=Le.name;Qe.toString().split(/\s*,\s*/).forEach(pt=>{Le.name=pt,x.push(this.visitState(Le,c))}),Le.name=Qe}else if(1==le.type){const Le=this.visitTransition(le,c);D+=Le.queryCount,M+=Le.depCount,ae.push(Le)}else c.errors.push(function Se(){return new v.vHH(3007,!1)}())}),{type:7,name:a.name,states:x,transitions:ae,queryCount:D,depCount:M,options:null}}visitState(a,c){const D=this.visitStyle(a.styles,c),M=a.options&&a.options.params||null;if(D.containsDynamicStyles){const x=new Set,ae=M||{};D.styles.forEach(le=>{le instanceof Map&&le.forEach(Le=>{te(Le).forEach(Qe=>{ae.hasOwnProperty(Qe)||x.add(Qe)})})}),x.size&&(j(x.values()),c.errors.push(function Ie(w,a){return new v.vHH(3008,!1)}()))}return{type:0,name:a.name,style:D,options:M?{params:M}:null}}visitTransition(a,c){c.queryCount=0,c.depCount=0;const D=nn(this,En(a.animation),c);return{type:1,matchers:Kn(a.expr,c.errors),animation:D,queryCount:c.queryCount,depCount:c.depCount,options:nr(a.options)}}visitSequence(a,c){return{type:2,steps:a.steps.map(D=>nn(this,D,c)),options:nr(a.options)}}visitGroup(a,c){const D=c.currentTime;let M=0;const x=a.steps.map(ae=>{c.currentTime=D;const le=nn(this,ae,c);return M=Math.max(M,c.currentTime),le});return c.currentTime=M,{type:3,steps:x,options:nr(a.options)}}visitAnimate(a,c){const D=function Ur(w,a){if(w.hasOwnProperty("duration"))return w;if("number"==typeof w)return Ir(X(w,a).duration,0,"");const c=w;if(c.split(/\s+/).some(x=>"{"==x.charAt(0)&&"{"==x.charAt(1))){const x=Ir(0,0,"");return x.dynamic=!0,x.strValue=c,x}const M=X(c,a);return Ir(M.duration,M.delay,M.easing)}(a.timings,c.errors);c.currentAnimateTimings=D;let M,x=a.styles?a.styles:(0,T.oB)({});if(5==x.type)M=this.visitKeyframes(x,c);else{let ae=a.styles,le=!1;if(!ae){le=!0;const Qe={};D.easing&&(Qe.easing=D.easing),ae=(0,T.oB)(Qe)}c.currentTime+=D.duration+D.delay;const Le=this.visitStyle(ae,c);Le.isEmptyStep=le,M=Le}return c.currentAnimateTimings=null,{type:4,timings:D,style:M,options:null}}visitStyle(a,c){const D=this._makeStyleAst(a,c);return this._validateStyleAst(D,c),D}_makeStyleAst(a,c){const D=[],M=Array.isArray(a.styles)?a.styles:[a.styles];for(let le of M)"string"==typeof le?le===T.l3?D.push(le):c.errors.push(new v.vHH(3002,!1)):D.push(Fe(le));let x=!1,ae=null;return D.forEach(le=>{if(le instanceof Map&&(le.has("easing")&&(ae=le.get("easing"),le.delete("easing")),!x))for(let Le of le.values())if(Le.toString().indexOf("{{")>=0){x=!0;break}}),{type:6,styles:D,easing:ae,offset:a.offset,containsDynamicStyles:x,options:null}}_validateStyleAst(a,c){const D=c.currentAnimateTimings;let M=c.currentTime,x=c.currentTime;D&&x>0&&(x-=D.duration+D.delay),a.styles.forEach(ae=>{"string"!=typeof ae&&ae.forEach((le,Le)=>{const Qe=c.collectedStyles.get(c.currentQuerySelector),pt=Qe.get(Le);let _t=!0;pt&&(x!=M&&x>=pt.startTime&&M<=pt.endTime&&(c.errors.push(function ye(w,a,c,D,M){return new v.vHH(3010,!1)}()),_t=!1),x=pt.startTime),_t&&Qe.set(Le,{startTime:x,endTime:M}),c.options&&function wn(w,a,c){const D=a.params||{},M=te(w);M.length&&M.forEach(x=>{D.hasOwnProperty(x)||c.push(function Q(w){return new v.vHH(3001,!1)}())})}(le,c.options,c.errors)})})}visitKeyframes(a,c){const D={type:5,styles:[],options:null};if(!c.currentAnimateTimings)return c.errors.push(function Ue(){return new v.vHH(3011,!1)}()),D;let x=0;const ae=[];let le=!1,Le=!1,Qe=0;const pt=a.steps.map(dn=>{const Cn=this._makeStyleAst(dn,c);let Pn=null!=Cn.offset?Cn.offset:function Gn(w){if("string"==typeof w)return null;let a=null;if(Array.isArray(w))w.forEach(c=>{if(c instanceof Map&&c.has("offset")){const D=c;a=parseFloat(D.get("offset")),D.delete("offset")}});else if(w instanceof Map&&w.has("offset")){const c=w;a=parseFloat(c.get("offset")),c.delete("offset")}return a}(Cn.styles),Rn=0;return null!=Pn&&(x++,Rn=Cn.offset=Pn),Le=Le||Rn<0||Rn>1,le=le||Rn<Qe,Qe=Rn,ae.push(Rn),Cn});Le&&c.errors.push(function ht(){return new v.vHH(3012,!1)}()),le&&c.errors.push(function ut(){return new v.vHH(3200,!1)}());const _t=a.steps.length;let Xt=0;x>0&&x<_t?c.errors.push(function Oe(){return new v.vHH(3202,!1)}()):0==x&&(Xt=1/(_t-1));const Gt=_t-1,St=c.currentTime,xt=c.currentAnimateTimings,cn=xt.duration;return pt.forEach((dn,Cn)=>{const Pn=Xt>0?Cn==Gt?1:Xt*Cn:ae[Cn],Rn=Pn*cn;c.currentTime=St+xt.delay+Rn,xt.duration=Rn,this._validateStyleAst(dn,c),dn.offset=Pn,D.styles.push(dn)}),D}visitReference(a,c){return{type:8,animation:nn(this,En(a.animation),c),options:nr(a.options)}}visitAnimateChild(a,c){return c.depCount++,{type:9,options:nr(a.options)}}visitAnimateRef(a,c){return{type:10,animation:this.visitReference(a.animation,c),options:nr(a.options)}}visitQuery(a,c){const D=c.currentQuerySelector,M=a.options||{};c.queryCount++,c.currentQuery=a;const[x,ae]=function ln(w){const a=!!w.split(/\s*,\s*/).find(c=>":self"==c);return a&&(w=w.replace(ei,"")),w=w.replace(/@\*/g,He).replace(/@\w+/g,c=>He+"-"+c.slice(1)).replace(/:animating/g,q),[w,a]}(a.selector);c.currentQuerySelector=D.length?D+" "+x:x,wt(c.collectedStyles,c.currentQuerySelector,new Map);const le=nn(this,En(a.animation),c);return c.currentQuery=null,c.currentQuerySelector=D,{type:11,selector:x,limit:M.limit||0,optional:!!M.optional,includeSelf:ae,animation:le,originalSelector:a.selector,options:nr(a.options)}}visitStagger(a,c){c.currentQuery||c.errors.push(function K(){return new v.vHH(3013,!1)}());const D="full"===a.timings?{duration:0,delay:0,easing:"full"}:X(a.timings,c.errors,!0);return{type:12,animation:nn(this,En(a.animation),c),timings:D,options:null}}}class An{constructor(a){this.errors=a,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function nr(w){return w?(w=de(w)).params&&(w.params=function Ar(w){return w?de(w):null}(w.params)):w={},w}function Ir(w,a,c){return{duration:w,delay:a,easing:c}}function qn(w,a,c,D,M,x,ae=null,le=!1){return{type:1,element:w,keyframes:a,preStyleProps:c,postStyleProps:D,duration:M,delay:x,totalTime:M+x,easing:ae,subTimeline:le}}class ti{constructor(){this._map=new Map}get(a){return this._map.get(a)||[]}append(a,c){let D=this._map.get(a);D||this._map.set(a,D=[]),D.push(...c)}has(a){return this._map.has(a)}clear(){this._map.clear()}}const as=new RegExp(":enter","g"),ir=new RegExp(":leave","g");function Li(w,a,c,D,M,x=new Map,ae=new Map,le,Le,Qe=[]){return(new Gs).buildKeyframes(w,a,c,D,M,x,ae,le,Le,Qe)}class Gs{buildKeyframes(a,c,D,M,x,ae,le,Le,Qe,pt=[]){Qe=Qe||new ti;const _t=new yi(a,c,Qe,M,x,pt,[]);_t.options=Le;const Xt=Le.delay?Z(Le.delay):0;_t.currentTimeline.delayNextStep(Xt),_t.currentTimeline.setStyles([ae],null,_t.errors,Le),nn(this,D,_t);const Gt=_t.timelines.filter(St=>St.containsAnimation());if(Gt.length&&le.size){let St;for(let xt=Gt.length-1;xt>=0;xt--){const cn=Gt[xt];if(cn.element===c){St=cn;break}}St&&!St.allowOnlyTimelineStyles()&&St.setStyles([le],null,_t.errors,Le)}return Gt.length?Gt.map(St=>St.buildKeyframes()):[qn(c,[],[],[],0,Xt,"",!1)]}visitTrigger(a,c){}visitState(a,c){}visitTransition(a,c){}visitAnimateChild(a,c){const D=c.subInstructions.get(c.element);if(D){const M=c.createSubContext(a.options),x=c.currentTimeline.currentTime,ae=this._visitSubInstructions(D,M,M.options);x!=ae&&c.transformIntoNewTimeline(ae)}c.previousNode=a}visitAnimateRef(a,c){const D=c.createSubContext(a.options);D.transformIntoNewTimeline(),this._applyAnimationRefDelays([a.options,a.animation.options],c,D),this.visitReference(a.animation,D),c.transformIntoNewTimeline(D.currentTimeline.currentTime),c.previousNode=a}_applyAnimationRefDelays(a,c,D){for(const M of a){const x=M?.delay;if(x){const ae="number"==typeof x?x:Z(ne(x,M?.params??{},c.errors));D.delayNextStep(ae)}}}_visitSubInstructions(a,c,D){let x=c.currentTimeline.currentTime;const ae=null!=D.duration?Z(D.duration):null,le=null!=D.delay?Z(D.delay):null;return 0!==ae&&a.forEach(Le=>{const Qe=c.appendInstructionToTimeline(Le,ae,le);x=Math.max(x,Qe.duration+Qe.delay)}),x}visitReference(a,c){c.updateOptions(a.options,!0),nn(this,a.animation,c),c.previousNode=a}visitSequence(a,c){const D=c.subContextCount;let M=c;const x=a.options;if(x&&(x.params||x.delay)&&(M=c.createSubContext(x),M.transformIntoNewTimeline(),null!=x.delay)){6==M.previousNode.type&&(M.currentTimeline.snapshotCurrentStyles(),M.previousNode=_i);const ae=Z(x.delay);M.delayNextStep(ae)}a.steps.length&&(a.steps.forEach(ae=>nn(this,ae,M)),M.currentTimeline.applyStylesToKeyframe(),M.subContextCount>D&&M.transformIntoNewTimeline()),c.previousNode=a}visitGroup(a,c){const D=[];let M=c.currentTimeline.currentTime;const x=a.options&&a.options.delay?Z(a.options.delay):0;a.steps.forEach(ae=>{const le=c.createSubContext(a.options);x&&le.delayNextStep(x),nn(this,ae,le),M=Math.max(M,le.currentTimeline.currentTime),D.push(le.currentTimeline)}),D.forEach(ae=>c.currentTimeline.mergeTimelineCollectedStyles(ae)),c.transformIntoNewTimeline(M),c.previousNode=a}_visitTiming(a,c){if(a.dynamic){const D=a.strValue;return X(c.params?ne(D,c.params,c.errors):D,c.errors)}return{duration:a.duration,delay:a.delay,easing:a.easing}}visitAnimate(a,c){const D=c.currentAnimateTimings=this._visitTiming(a.timings,c),M=c.currentTimeline;D.delay&&(c.incrementTime(D.delay),M.snapshotCurrentStyles());const x=a.style;5==x.type?this.visitKeyframes(x,c):(c.incrementTime(D.duration),this.visitStyle(x,c),M.applyStylesToKeyframe()),c.currentAnimateTimings=null,c.previousNode=a}visitStyle(a,c){const D=c.currentTimeline,M=c.currentAnimateTimings;!M&&D.hasCurrentStyleProperties()&&D.forwardFrame();const x=M&&M.easing||a.easing;a.isEmptyStep?D.applyEmptyStep(x):D.setStyles(a.styles,x,c.errors,c.options),c.previousNode=a}visitKeyframes(a,c){const D=c.currentAnimateTimings,M=c.currentTimeline.duration,x=D.duration,le=c.createSubContext().currentTimeline;le.easing=D.easing,a.styles.forEach(Le=>{le.forwardTime((Le.offset||0)*x),le.setStyles(Le.styles,Le.easing,c.errors,c.options),le.applyStylesToKeyframe()}),c.currentTimeline.mergeTimelineCollectedStyles(le),c.transformIntoNewTimeline(M+x),c.previousNode=a}visitQuery(a,c){const D=c.currentTimeline.currentTime,M=a.options||{},x=M.delay?Z(M.delay):0;x&&(6===c.previousNode.type||0==D&&c.currentTimeline.hasCurrentStyleProperties())&&(c.currentTimeline.snapshotCurrentStyles(),c.previousNode=_i);let ae=D;const le=c.invokeQuery(a.selector,a.originalSelector,a.limit,a.includeSelf,!!M.optional,c.errors);c.currentQueryTotal=le.length;let Le=null;le.forEach((Qe,pt)=>{c.currentQueryIndex=pt;const _t=c.createSubContext(a.options,Qe);x&&_t.delayNextStep(x),Qe===c.element&&(Le=_t.currentTimeline),nn(this,a.animation,_t),_t.currentTimeline.applyStylesToKeyframe(),ae=Math.max(ae,_t.currentTimeline.currentTime)}),c.currentQueryIndex=0,c.currentQueryTotal=0,c.transformIntoNewTimeline(ae),Le&&(c.currentTimeline.mergeTimelineCollectedStyles(Le),c.currentTimeline.snapshotCurrentStyles()),c.previousNode=a}visitStagger(a,c){const D=c.parentContext,M=c.currentTimeline,x=a.timings,ae=Math.abs(x.duration),le=ae*(c.currentQueryTotal-1);let Le=ae*c.currentQueryIndex;switch(x.duration<0?"reverse":x.easing){case"reverse":Le=le-Le;break;case"full":Le=D.currentStaggerTime}const pt=c.currentTimeline;Le&&pt.delayNextStep(Le);const _t=pt.currentTime;nn(this,a.animation,c),c.previousNode=a,D.currentStaggerTime=M.currentTime-_t+(M.startTime-D.currentTimeline.startTime)}}const _i={};class yi{constructor(a,c,D,M,x,ae,le,Le){this._driver=a,this.element=c,this.subInstructions=D,this._enterClassName=M,this._leaveClassName=x,this.errors=ae,this.timelines=le,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=_i,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=Le||new Vr(this._driver,c,0),le.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(a,c){if(!a)return;const D=a;let M=this.options;null!=D.duration&&(M.duration=Z(D.duration)),null!=D.delay&&(M.delay=Z(D.delay));const x=D.params;if(x){let ae=M.params;ae||(ae=this.options.params={}),Object.keys(x).forEach(le=>{(!c||!ae.hasOwnProperty(le))&&(ae[le]=ne(x[le],ae,this.errors))})}}_copyOptions(){const a={};if(this.options){const c=this.options.params;if(c){const D=a.params={};Object.keys(c).forEach(M=>{D[M]=c[M]})}}return a}createSubContext(a=null,c,D){const M=c||this.element,x=new yi(this._driver,M,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(M,D||0));return x.previousNode=this.previousNode,x.currentAnimateTimings=this.currentAnimateTimings,x.options=this._copyOptions(),x.updateOptions(a),x.currentQueryIndex=this.currentQueryIndex,x.currentQueryTotal=this.currentQueryTotal,x.parentContext=this,this.subContextCount++,x}transformIntoNewTimeline(a){return this.previousNode=_i,this.currentTimeline=this.currentTimeline.fork(this.element,a),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(a,c,D){const M={duration:c??a.duration,delay:this.currentTimeline.currentTime+(D??0)+a.delay,easing:""},x=new vr(this._driver,a.element,a.keyframes,a.preStyleProps,a.postStyleProps,M,a.stretchStartingKeyframe);return this.timelines.push(x),M}incrementTime(a){this.currentTimeline.forwardTime(this.currentTimeline.duration+a)}delayNextStep(a){a>0&&this.currentTimeline.delayNextStep(a)}invokeQuery(a,c,D,M,x,ae){let le=[];if(M&&le.push(this.element),a.length>0){a=(a=a.replace(as,"."+this._enterClassName)).replace(ir,"."+this._leaveClassName);let Qe=this._driver.query(this.element,a,1!=D);0!==D&&(Qe=D<0?Qe.slice(Qe.length+D,Qe.length):Qe.slice(0,D)),le.push(...Qe)}return!x&&0==le.length&&ae.push(function ve(w){return new v.vHH(3014,!1)}()),le}}class Vr{constructor(a,c,D,M){this._driver=a,this.element=c,this.startTime=D,this._elementTimelineStylesLookup=M,this.duration=0,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(c),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(c,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(a){const c=1===this._keyframes.size&&this._pendingStyles.size;this.duration||c?(this.forwardTime(this.currentTime+a),c&&this.snapshotCurrentStyles()):this.startTime+=a}fork(a,c){return this.applyStylesToKeyframe(),new Vr(this._driver,a,c||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(a){this.applyStylesToKeyframe(),this.duration=a,this._loadKeyframe()}_updateStyle(a,c){this._localTimelineStyles.set(a,c),this._globalTimelineStyles.set(a,c),this._styleSummary.set(a,{time:this.currentTime,value:c})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(a){a&&this._previousKeyframe.set("easing",a);for(let[c,D]of this._globalTimelineStyles)this._backFill.set(c,D||T.l3),this._currentKeyframe.set(c,T.l3);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(a,c,D,M){c&&this._previousKeyframe.set("easing",c);const x=M&&M.params||{},ae=function Ss(w,a){const c=new Map;let D;return w.forEach(M=>{if("*"===M){D=D||a.keys();for(let x of D)c.set(x,T.l3)}else Vt(M,c)}),c}(a,this._globalTimelineStyles);for(let[le,Le]of ae){const Qe=ne(Le,x,D);this._pendingStyles.set(le,Qe),this._localTimelineStyles.has(le)||this._backFill.set(le,this._globalTimelineStyles.get(le)??T.l3),this._updateStyle(le,Qe)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((a,c)=>{this._currentKeyframe.set(c,a)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((a,c)=>{this._currentKeyframe.has(c)||this._currentKeyframe.set(c,a)}))}snapshotCurrentStyles(){for(let[a,c]of this._localTimelineStyles)this._pendingStyles.set(a,c),this._updateStyle(a,c)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const a=[];for(let c in this._currentKeyframe)a.push(c);return a}mergeTimelineCollectedStyles(a){a._styleSummary.forEach((c,D)=>{const M=this._styleSummary.get(D);(!M||c.time>M.time)&&this._updateStyle(D,c.value)})}buildKeyframes(){this.applyStylesToKeyframe();const a=new Set,c=new Set,D=1===this._keyframes.size&&0===this.duration;let M=[];this._keyframes.forEach((le,Le)=>{const Qe=Vt(le,new Map,this._backFill);Qe.forEach((pt,_t)=>{pt===T.k1?a.add(_t):pt===T.l3&&c.add(_t)}),D||Qe.set("offset",Le/this.duration),M.push(Qe)});const x=a.size?j(a.values()):[],ae=c.size?j(c.values()):[];if(D){const le=M[0],Le=new Map(le);le.set("offset",0),Le.set("offset",1),M=[le,Le]}return qn(this.element,M,x,ae,this.duration,this.startTime,this.easing,!1)}}class vr extends Vr{constructor(a,c,D,M,x,ae,le=!1){super(a,c,ae.delay),this.keyframes=D,this.preStyleProps=M,this.postStyleProps=x,this._stretchStartingKeyframe=le,this.timings={duration:ae.duration,delay:ae.delay,easing:ae.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let a=this.keyframes,{delay:c,duration:D,easing:M}=this.timings;if(this._stretchStartingKeyframe&&c){const x=[],ae=D+c,le=c/ae,Le=Vt(a[0]);Le.set("offset",0),x.push(Le);const Qe=Vt(a[0]);Qe.set("offset",jr(le)),x.push(Qe);const pt=a.length-1;for(let _t=1;_t<=pt;_t++){let Xt=Vt(a[_t]);const Gt=Xt.get("offset");Xt.set("offset",jr((c+Gt*D)/ae)),x.push(Xt)}D=ae,c=0,M="",a=x}return qn(this.element,a,this.preStyleProps,this.postStyleProps,D,c,M,!0)}}function jr(w,a=3){const c=Math.pow(10,a-1);return Math.round(w*c)/c}class ls{}const Ts=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class cs extends ls{normalizePropertyName(a,c){return Xe(a)}normalizeStyleValue(a,c,D,M){let x="";const ae=D.toString().trim();if(Ts.has(c)&&0!==D&&"0"!==D)if("number"==typeof D)x="px";else{const le=D.match(/^[+-]?[\d\.]+([a-z]*)$/);le&&0==le[1].length&&M.push(function z(w,a){return new v.vHH(3005,!1)}())}return ae+x}}function Or(w,a,c,D,M,x,ae,le,Le,Qe,pt,_t,Xt){return{type:0,element:w,triggerName:a,isRemovalTransition:M,fromState:c,fromStyles:x,toState:D,toStyles:ae,timelines:le,queriedElements:Le,preStyleProps:Qe,postStyleProps:pt,totalTime:_t,errors:Xt}}const Fi={};class Ni{constructor(a,c,D){this._triggerName=a,this.ast=c,this._stateStyles=D}match(a,c,D,M){return function sr(w,a,c,D,M){return w.some(x=>x(a,c,D,M))}(this.ast.matchers,a,c,D,M)}buildStyles(a,c,D){let M=this._stateStyles.get("*");return void 0!==a&&(M=this._stateStyles.get(a?.toString())||M),M?M.buildStyles(c,D):new Map}build(a,c,D,M,x,ae,le,Le,Qe,pt){const _t=[],Xt=this.ast.options&&this.ast.options.params||Fi,St=this.buildStyles(D,le&&le.params||Fi,_t),xt=Le&&Le.params||Fi,cn=this.buildStyles(M,xt,_t),dn=new Set,Cn=new Map,Pn=new Map,Rn="void"===M,p={params:vi(xt,Xt),delay:this.ast.options?.delay},b=pt?[]:Li(a,c,this.ast.animation,x,ae,St,cn,p,Qe,_t);let m=0;if(b.forEach(ie=>{m=Math.max(ie.duration+ie.delay,m)}),_t.length)return Or(c,this._triggerName,D,M,Rn,St,cn,[],[],Cn,Pn,m,_t);b.forEach(ie=>{const Be=ie.element,Je=wt(Cn,Be,new Set);ie.preStyleProps.forEach(Yt=>Je.add(Yt));const yt=wt(Pn,Be,new Set);ie.postStyleProps.forEach(Yt=>yt.add(Yt)),Be!==c&&dn.add(Be)});const S=j(dn.values());return Or(c,this._triggerName,D,M,Rn,St,cn,b,S,Cn,Pn,m)}}function vi(w,a){const c=de(a);for(const D in w)w.hasOwnProperty(D)&&null!=w[D]&&(c[D]=w[D]);return c}class ki{constructor(a,c,D){this.styles=a,this.defaultParams=c,this.normalizer=D}buildStyles(a,c){const D=new Map,M=de(this.defaultParams);return Object.keys(a).forEach(x=>{const ae=a[x];null!==ae&&(M[x]=ae)}),this.styles.styles.forEach(x=>{"string"!=typeof x&&x.forEach((ae,le)=>{ae&&(ae=ne(ae,M,c));const Le=this.normalizer.normalizePropertyName(le,c);ae=this.normalizer.normalizeStyleValue(le,Le,ae,c),D.set(Le,ae)})}),D}}class Bi{constructor(a,c,D){this.name=a,this.ast=c,this._normalizer=D,this.transitionFactories=[],this.states=new Map,c.states.forEach(M=>{this.states.set(M.name,new ki(M.style,M.options&&M.options.params||{},D))}),ni(this.states,"true","1"),ni(this.states,"false","0"),c.transitions.forEach(M=>{this.transitionFactories.push(new Ni(a,M,this.states))}),this.fallbackTransition=function Ui(w,a,c){return new Ni(w,{type:1,animation:{type:2,steps:[],options:null},matchers:[(ae,le)=>!0],options:null,queryCount:0,depCount:0},a)}(a,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(a,c,D,M){return this.transitionFactories.find(ae=>ae.match(a,c,D,M))||null}matchStyles(a,c,D){return this.fallbackTransition.buildStyles(a,c,D)}}function ni(w,a,c){w.has(a)?w.has(c)||w.set(c,w.get(a)):w.has(c)&&w.set(a,w.get(c))}const us=new ti;class ds{constructor(a,c,D){this.bodyNode=a,this._driver=c,this._normalizer=D,this._animations=new Map,this._playersById=new Map,this.players=[]}register(a,c){const D=[],x=rr(this._driver,c,D,[]);if(D.length)throw function $e(w){return new v.vHH(3503,!1)}();this._animations.set(a,x)}_buildPlayer(a,c,D){const M=a.element,x=Ct(0,this._normalizer,0,a.keyframes,c,D);return this._driver.animate(M,x,a.duration,a.delay,a.easing,[],!0)}create(a,c,D={}){const M=[],x=this._animations.get(a);let ae;const le=new Map;if(x?(ae=Li(this._driver,c,x,P,me,new Map,new Map,D,us,M),ae.forEach(pt=>{const _t=wt(le,pt.element,new Map);pt.postStyleProps.forEach(Xt=>_t.set(Xt,null))})):(M.push(function Ke(){return new v.vHH(3300,!1)}()),ae=[]),M.length)throw function Et(w){return new v.vHH(3504,!1)}();le.forEach((pt,_t)=>{pt.forEach((Xt,Gt)=>{pt.set(Gt,this._driver.computeStyle(_t,Gt,T.l3))})});const Qe=Ze(ae.map(pt=>{const _t=le.get(pt.element);return this._buildPlayer(pt,new Map,_t)}));return this._playersById.set(a,Qe),Qe.onDestroy(()=>this.destroy(a)),this.players.push(Qe),Qe}destroy(a){const c=this._getPlayer(a);c.destroy(),this._playersById.delete(a);const D=this.players.indexOf(c);D>=0&&this.players.splice(D,1)}_getPlayer(a){const c=this._playersById.get(a);if(!c)throw function $t(w){return new v.vHH(3301,!1)}();return c}listen(a,c,D,M){const x=At(c,"","","");return Pt(this._getPlayer(a),D,x,M),()=>{}}command(a,c,D,M){if("register"==D)return void this.register(a,M[0]);if("create"==D)return void this.create(a,c,M[0]||{});const x=this._getPlayer(a);switch(D){case"play":x.play();break;case"pause":x.pause();break;case"reset":x.reset();break;case"restart":x.restart();break;case"finish":x.finish();break;case"init":x.init();break;case"setPosition":x.setPosition(parseFloat(M[0]));break;case"destroy":this.destroy(a)}}}const zr="ng-animate-queued",jn="ng-animate-disabled",Qs=[],Xs={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},bn={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Yn="__ng_removed";class As{constructor(a,c=""){this.namespaceId=c;const D=a&&a.hasOwnProperty("value");if(this.value=function Js(w){return w??null}(D?a.value:a),D){const x=de(a);delete x.value,this.options=x}else this.options={};this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(a){const c=a.params;if(c){const D=this.options.params;Object.keys(c).forEach(M=>{null==D[M]&&(D[M]=c[M])})}}}const Dr="void",Hn=new As(Dr);class xo{constructor(a,c,D){this.id=a,this.hostElement=c,this._engine=D,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+a,bt(c,this._hostClassName)}listen(a,c,D,M){if(!this._triggers.has(c))throw function Tt(w,a){return new v.vHH(3302,!1)}();if(null==D||0==D.length)throw function sn(w){return new v.vHH(3303,!1)}();if(!function er(w){return"start"==w||"done"==w}(D))throw function tn(w,a){return new v.vHH(3400,!1)}();const x=wt(this._elementListeners,a,[]),ae={name:c,phase:D,callback:M};x.push(ae);const le=wt(this._engine.statesByElement,a,new Map);return le.has(c)||(bt(a,We),bt(a,We+"-"+c),le.set(c,Hn)),()=>{this._engine.afterFlush(()=>{const Le=x.indexOf(ae);Le>=0&&x.splice(Le,1),this._triggers.has(c)||le.delete(c)})}}register(a,c){return!this._triggers.has(a)&&(this._triggers.set(a,c),!0)}_getTrigger(a){const c=this._triggers.get(a);if(!c)throw function Ot(w){return new v.vHH(3401,!1)}();return c}trigger(a,c,D,M=!0){const x=this._getTrigger(c),ae=new Rr(this.id,c,a);let le=this._engine.statesByElement.get(a);le||(bt(a,We),bt(a,We+"-"+c),this._engine.statesByElement.set(a,le=new Map));let Le=le.get(c);const Qe=new As(D,this.id);if(!(D&&D.hasOwnProperty("value"))&&Le&&Qe.absorbOptions(Le.options),le.set(c,Qe),Le||(Le=Hn),Qe.value!==Dr&&Le.value===Qe.value){if(!function Wr(w,a){const c=Object.keys(w),D=Object.keys(a);if(c.length!=D.length)return!1;for(let M=0;M<c.length;M++){const x=c[M];if(!a.hasOwnProperty(x)||w[x]!==a[x])return!1}return!0}(Le.params,Qe.params)){const xt=[],cn=x.matchStyles(Le.value,Le.params,xt),dn=x.matchStyles(Qe.value,Qe.params,xt);xt.length?this._engine.reportError(xt):this._engine.afterFlush(()=>{an(a,cn),on(a,dn)})}return}const Xt=wt(this._engine.playersByElement,a,[]);Xt.forEach(xt=>{xt.namespaceId==this.id&&xt.triggerName==c&&xt.queued&&xt.destroy()});let Gt=x.matchTransition(Le.value,Qe.value,a,Qe.params),St=!1;if(!Gt){if(!M)return;Gt=x.fallbackTransition,St=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:a,triggerName:c,transition:Gt,fromState:Le,toState:Qe,player:ae,isFallbackTransition:St}),St||(bt(a,zr),ae.onStart(()=>{Er(a,zr)})),ae.onDone(()=>{let xt=this.players.indexOf(ae);xt>=0&&this.players.splice(xt,1);const cn=this._engine.playersByElement.get(a);if(cn){let dn=cn.indexOf(ae);dn>=0&&cn.splice(dn,1)}}),this.players.push(ae),Xt.push(ae),ae}deregister(a){this._triggers.delete(a),this._engine.statesByElement.forEach(c=>c.delete(a)),this._elementListeners.forEach((c,D)=>{this._elementListeners.set(D,c.filter(M=>M.name!=a))})}clearElementCache(a){this._engine.statesByElement.delete(a),this._elementListeners.delete(a);const c=this._engine.playersByElement.get(a);c&&(c.forEach(D=>D.destroy()),this._engine.playersByElement.delete(a))}_signalRemovalForInnerTriggers(a,c){const D=this._engine.driver.query(a,He,!0);D.forEach(M=>{if(M[Yn])return;const x=this._engine.fetchNamespacesByElement(M);x.size?x.forEach(ae=>ae.triggerLeaveAnimation(M,c,!1,!0)):this.clearElementCache(M)}),this._engine.afterFlushAnimationsDone(()=>D.forEach(M=>this.clearElementCache(M)))}triggerLeaveAnimation(a,c,D,M){const x=this._engine.statesByElement.get(a),ae=new Map;if(x){const le=[];if(x.forEach((Le,Qe)=>{if(ae.set(Qe,Le.value),this._triggers.has(Qe)){const pt=this.trigger(a,Qe,Dr,M);pt&&le.push(pt)}}),le.length)return this._engine.markElementAsRemoved(this.id,a,!0,c,ae),D&&Ze(le).onDone(()=>this._engine.processLeaveNode(a)),!0}return!1}prepareLeaveAnimationListeners(a){const c=this._elementListeners.get(a),D=this._engine.statesByElement.get(a);if(c&&D){const M=new Set;c.forEach(x=>{const ae=x.name;if(M.has(ae))return;M.add(ae);const Le=this._triggers.get(ae).fallbackTransition,Qe=D.get(ae)||Hn,pt=new As(Dr),_t=new Rr(this.id,ae,a);this._engine.totalQueuedPlayers++,this._queue.push({element:a,triggerName:ae,transition:Le,fromState:Qe,toState:pt,player:_t,isFallbackTransition:!0})})}}removeNode(a,c){const D=this._engine;if(a.childElementCount&&this._signalRemovalForInnerTriggers(a,c),this.triggerLeaveAnimation(a,c,!0))return;let M=!1;if(D.totalAnimations){const x=D.players.length?D.playersByQueriedElement.get(a):[];if(x&&x.length)M=!0;else{let ae=a;for(;ae=ae.parentNode;)if(D.statesByElement.get(ae)){M=!0;break}}}if(this.prepareLeaveAnimationListeners(a),M)D.markElementAsRemoved(this.id,a,!1,c);else{const x=a[Yn];(!x||x===Xs)&&(D.afterFlush(()=>this.clearElementCache(a)),D.destroyInnerAnimations(a),D._onRemovalComplete(a,c))}}insertNode(a,c){bt(a,this._hostClassName)}drainQueuedTransitions(a){const c=[];return this._queue.forEach(D=>{const M=D.player;if(M.destroyed)return;const x=D.element,ae=this._elementListeners.get(x);ae&&ae.forEach(le=>{if(le.name==D.triggerName){const Le=At(x,D.triggerName,D.fromState.value,D.toState.value);Le._data=a,Pt(D.player,le.phase,Le,le.callback)}}),M.markedForDestroy?this._engine.afterFlush(()=>{M.destroy()}):c.push(D)}),this._queue=[],c.sort((D,M)=>{const x=D.transition.ast.depCount,ae=M.transition.ast.depCount;return 0==x||0==ae?x-ae:this._engine.driver.containsElement(D.element,M.element)?1:-1})}destroy(a){this.players.forEach(c=>c.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,a)}elementContainsData(a){let c=!1;return this._elementListeners.has(a)&&(c=!0),c=!!this._queue.find(D=>D.element===a)||c,c}}class ii{constructor(a,c,D){this.bodyNode=a,this.driver=c,this._normalizer=D,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(M,x)=>{}}_onRemovalComplete(a,c){this.onRemovalComplete(a,c)}get queuedPlayers(){const a=[];return this._namespaceList.forEach(c=>{c.players.forEach(D=>{D.queued&&a.push(D)})}),a}createNamespace(a,c){const D=new xo(a,c,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,c)?this._balanceNamespaceList(D,c):(this.newHostElements.set(c,D),this.collectEnterElement(c)),this._namespaceLookup[a]=D}_balanceNamespaceList(a,c){const D=this._namespaceList,M=this.namespacesByHostElement;if(D.length-1>=0){let ae=!1,le=this.driver.getParentElement(c);for(;le;){const Le=M.get(le);if(Le){const Qe=D.indexOf(Le);D.splice(Qe+1,0,a),ae=!0;break}le=this.driver.getParentElement(le)}ae||D.unshift(a)}else D.push(a);return M.set(c,a),a}register(a,c){let D=this._namespaceLookup[a];return D||(D=this.createNamespace(a,c)),D}registerTrigger(a,c,D){let M=this._namespaceLookup[a];M&&M.register(c,D)&&this.totalAnimations++}destroy(a,c){if(!a)return;const D=this._fetchNamespace(a);this.afterFlush(()=>{this.namespacesByHostElement.delete(D.hostElement),delete this._namespaceLookup[a];const M=this._namespaceList.indexOf(D);M>=0&&this._namespaceList.splice(M,1)}),this.afterFlushAnimationsDone(()=>D.destroy(c))}_fetchNamespace(a){return this._namespaceLookup[a]}fetchNamespacesByElement(a){const c=new Set,D=this.statesByElement.get(a);if(D)for(let M of D.values())if(M.namespaceId){const x=this._fetchNamespace(M.namespaceId);x&&c.add(x)}return c}trigger(a,c,D,M){if(fr(c)){const x=this._fetchNamespace(a);if(x)return x.trigger(c,D,M),!0}return!1}insertNode(a,c,D,M){if(!fr(c))return;const x=c[Yn];if(x&&x.setForRemoval){x.setForRemoval=!1,x.setForMove=!0;const ae=this.collectedLeaveElements.indexOf(c);ae>=0&&this.collectedLeaveElements.splice(ae,1)}if(a){const ae=this._fetchNamespace(a);ae&&ae.insertNode(c,D)}M&&this.collectEnterElement(c)}collectEnterElement(a){this.collectedEnterElements.push(a)}markElementAsDisabled(a,c){c?this.disabledNodes.has(a)||(this.disabledNodes.add(a),bt(a,jn)):this.disabledNodes.has(a)&&(this.disabledNodes.delete(a),Er(a,jn))}removeNode(a,c,D,M){if(fr(c)){const x=a?this._fetchNamespace(a):null;if(x?x.removeNode(c,M):this.markElementAsRemoved(a,c,!1,M),D){const ae=this.namespacesByHostElement.get(c);ae&&ae.id!==a&&ae.removeNode(c,M)}}else this._onRemovalComplete(c,M)}markElementAsRemoved(a,c,D,M,x){this.collectedLeaveElements.push(c),c[Yn]={namespaceId:a,setForRemoval:M,hasAnimation:D,removedBeforeQueried:!1,previousTriggersValues:x}}listen(a,c,D,M,x){return fr(c)?this._fetchNamespace(a).listen(c,D,M,x):()=>{}}_buildInstruction(a,c,D,M,x){return a.transition.build(this.driver,a.element,a.fromState.value,a.toState.value,D,M,a.fromState.options,a.toState.options,c,x)}destroyInnerAnimations(a){let c=this.driver.query(a,He,!0);c.forEach(D=>this.destroyActiveAnimationsForElement(D)),0!=this.playersByQueriedElement.size&&(c=this.driver.query(a,q,!0),c.forEach(D=>this.finishActiveQueriedAnimationOnElement(D)))}destroyActiveAnimationsForElement(a){const c=this.playersByElement.get(a);c&&c.forEach(D=>{D.queued?D.markedForDestroy=!0:D.destroy()})}finishActiveQueriedAnimationOnElement(a){const c=this.playersByQueriedElement.get(a);c&&c.forEach(D=>D.finish())}whenRenderingDone(){return new Promise(a=>{if(this.players.length)return Ze(this.players).onDone(()=>a());a()})}processLeaveNode(a){const c=a[Yn];if(c&&c.setForRemoval){if(a[Yn]=Xs,c.namespaceId){this.destroyInnerAnimations(a);const D=this._fetchNamespace(c.namespaceId);D&&D.clearElementCache(a)}this._onRemovalComplete(a,c.setForRemoval)}a.classList?.contains(jn)&&this.markElementAsDisabled(a,!1),this.driver.query(a,".ng-animate-disabled",!0).forEach(D=>{this.markElementAsDisabled(D,!1)})}flush(a=-1){let c=[];if(this.newHostElements.size&&(this.newHostElements.forEach((D,M)=>this._balanceNamespaceList(D,M)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let D=0;D<this.collectedEnterElements.length;D++)bt(this.collectedEnterElements[D],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const D=[];try{c=this._flushAnimations(D,a)}finally{for(let M=0;M<D.length;M++)D[M]()}}else for(let D=0;D<this.collectedLeaveElements.length;D++)this.processLeaveNode(this.collectedLeaveElements[D]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(D=>D()),this._flushFns=[],this._whenQuietFns.length){const D=this._whenQuietFns;this._whenQuietFns=[],c.length?Ze(c).onDone(()=>{D.forEach(M=>M())}):D.forEach(M=>M())}}reportError(a){throw function Ae(w){return new v.vHH(3402,!1)}()}_flushAnimations(a,c){const D=new ti,M=[],x=new Map,ae=[],le=new Map,Le=new Map,Qe=new Map,pt=new Set;this.disabledNodes.forEach(nt=>{pt.add(nt);const mt=this.driver.query(nt,".ng-animate-queued",!0);for(let ft=0;ft<mt.length;ft++)pt.add(mt[ft])});const _t=t