Files
seiscomp-training/share/caps/www/main-SQS3H3RO.js

22 lines
486 KiB
JavaScript

var AC=Object.defineProperty,NC=Object.defineProperties;var kC=Object.getOwnPropertyDescriptors;var ig=Object.getOwnPropertySymbols;var OC=Object.prototype.hasOwnProperty,PC=Object.prototype.propertyIsEnumerable;var rg=(t,e,n)=>e in t?AC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,x=(t,e)=>{for(var n in e||={})OC.call(e,n)&&rg(t,n,e[n]);if(ig)for(var n of ig(e))PC.call(e,n)&&rg(t,n,e[n]);return t},le=(t,e)=>NC(t,kC(e));function sg(t,e){return Object.is(t,e)}var $e=null,ta=!1,ku=1,Ft=Symbol("SIGNAL");function re(t){let e=$e;return $e=t,e}function ag(){return $e}var Ao={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function ia(t){if(ta)throw new Error("");if($e===null)return;$e.consumerOnSignalRead(t);let e=$e.nextProducerIndex++;if(sa($e),e<$e.producerNode.length&&$e.producerNode[e]!==t&&Ro($e)){let n=$e.producerNode[e];oa(n,$e.producerIndexOfThis[e])}$e.producerNode[e]!==t&&($e.producerNode[e]=t,$e.producerIndexOfThis[e]=Ro($e)?dg(t,$e,e):0),$e.producerLastReadVersion[e]=t.version}function FC(){ku++}function lg(t){if(!(Ro(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===ku)){if(!t.producerMustRecompute(t)&&!Pu(t)){og(t);return}t.producerRecomputeValue(t),og(t)}}function cg(t){if(t.liveConsumerNode===void 0)return;let e=ta;ta=!0;try{for(let n of t.liveConsumerNode)n.dirty||LC(n)}finally{ta=e}}function ug(){return $e?.consumerAllowSignalWrites!==!1}function LC(t){t.dirty=!0,cg(t),t.consumerMarkedDirty?.(t)}function og(t){t.dirty=!1,t.lastCleanEpoch=ku}function ra(t){return t&&(t.nextProducerIndex=0),re(t)}function Ou(t,e){if(re(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(Ro(t))for(let n=t.nextProducerIndex;n<t.producerNode.length;n++)oa(t.producerNode[n],t.producerIndexOfThis[n]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function Pu(t){sa(t);for(let e=0;e<t.producerNode.length;e++){let n=t.producerNode[e],i=t.producerLastReadVersion[e];if(i!==n.version||(lg(n),i!==n.version))return!0}return!1}function Fu(t){if(sa(t),Ro(t))for(let e=0;e<t.producerNode.length;e++)oa(t.producerNode[e],t.producerIndexOfThis[e]);t.producerNode.length=t.producerLastReadVersion.length=t.producerIndexOfThis.length=0,t.liveConsumerNode&&(t.liveConsumerNode.length=t.liveConsumerIndexOfThis.length=0)}function dg(t,e,n){if(fg(t),t.liveConsumerNode.length===0&&hg(t))for(let i=0;i<t.producerNode.length;i++)t.producerIndexOfThis[i]=dg(t.producerNode[i],t,i);return t.liveConsumerIndexOfThis.push(n),t.liveConsumerNode.push(e)-1}function oa(t,e){if(fg(t),t.liveConsumerNode.length===1&&hg(t))for(let i=0;i<t.producerNode.length;i++)oa(t.producerNode[i],t.producerIndexOfThis[i]);let n=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[n],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[n],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let i=t.liveConsumerIndexOfThis[e],r=t.liveConsumerNode[e];sa(r),r.producerIndexOfThis[i]=e}}function Ro(t){return t.consumerIsAlwaysLive||(t?.liveConsumerNode?.length??0)>0}function sa(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function fg(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function hg(t){return t.producerNode!==void 0}function pg(t){let e=Object.create(VC);e.computation=t;let n=()=>{if(lg(e),ia(e),e.value===na)throw e.error;return e.value};return n[Ft]=e,n}var Au=Symbol("UNSET"),Nu=Symbol("COMPUTING"),na=Symbol("ERRORED"),VC=le(x({},Ao),{value:Au,dirty:!0,error:null,equal:sg,kind:"computed",producerMustRecompute(t){return t.value===Au||t.value===Nu},producerRecomputeValue(t){if(t.value===Nu)throw new Error("Detected cycle in computations.");let e=t.value;t.value=Nu;let n=ra(t),i,r=!1;try{i=t.computation(),re(null),r=e!==Au&&e!==na&&i!==na&&t.equal(e,i)}catch(o){i=na,t.error=o}finally{Ou(t,n)}if(r){t.value=e;return}t.value=i,t.version++}});function jC(){throw new Error}var gg=jC;function mg(){gg()}function vg(t){gg=t}var UC=null;function yg(t){let e=Object.create(Lu);e.value=t;let n=()=>(ia(e),e.value);return n[Ft]=e,n}function aa(t,e){ug()||mg(),t.equal(t.value,e)||(t.value=e,BC(t))}function _g(t,e){ug()||mg(),aa(t,e(t.value))}var Lu=le(x({},Ao),{equal:sg,value:void 0,kind:"signal"});function BC(t){t.version++,FC(),cg(t),UC?.()}function Q(t){return typeof t=="function"}function pr(t){let n=t(i=>{Error.call(i),i.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var la=pr(t=>function(n){t(this),this.message=n?`${n.length} errors occurred during unsubscription:
${n.map((i,r)=>`${r+1}) ${i.toString()}`).join(`
`)}`:"",this.name="UnsubscriptionError",this.errors=n});function Oi(t,e){if(t){let n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Ae=class t{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let o of n)o.remove(this);else n.remove(this);let{initialTeardown:i}=this;if(Q(i))try{i()}catch(o){e=o instanceof la?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{wg(o)}catch(s){e=e??[],s instanceof la?e=[...e,...s.errors]:e.push(s)}}if(e)throw new la(e)}}add(e){var n;if(e&&e!==this)if(this.closed)wg(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}}_hasParent(e){let{_parentage:n}=this;return n===e||Array.isArray(n)&&n.includes(e)}_addParent(e){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e}_removeParent(e){let{_parentage:n}=this;n===e?this._parentage=null:Array.isArray(n)&&Oi(n,e)}remove(e){let{_finalizers:n}=this;n&&Oi(n,e),e instanceof t&&e._removeParent(this)}};Ae.EMPTY=(()=>{let t=new Ae;return t.closed=!0,t})();var Vu=Ae.EMPTY;function ca(t){return t instanceof Ae||t&&"closed"in t&&Q(t.remove)&&Q(t.add)&&Q(t.unsubscribe)}function wg(t){Q(t)?t():t.unsubscribe()}var sn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var gr={setTimeout(t,e,...n){let{delegate:i}=gr;return i?.setTimeout?i.setTimeout(t,e,...n):setTimeout(t,e,...n)},clearTimeout(t){let{delegate:e}=gr;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function ua(t){gr.setTimeout(()=>{let{onUnhandledError:e}=sn;if(e)e(t);else throw t})}function No(){}var Cg=ju("C",void 0,void 0);function Dg(t){return ju("E",void 0,t)}function bg(t){return ju("N",t,void 0)}function ju(t,e,n){return{kind:t,value:e,error:n}}var Pi=null;function mr(t){if(sn.useDeprecatedSynchronousErrorHandling){let e=!Pi;if(e&&(Pi={errorThrown:!1,error:null}),t(),e){let{errorThrown:n,error:i}=Pi;if(Pi=null,n)throw i}}else t()}function Eg(t){sn.useDeprecatedSynchronousErrorHandling&&Pi&&(Pi.errorThrown=!0,Pi.error=t)}var Fi=class extends Ae{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,ca(e)&&e.add(this)):this.destination=zC}static create(e,n,i){return new vr(e,n,i)}next(e){this.isStopped?Bu(bg(e),this):this._next(e)}error(e){this.isStopped?Bu(Dg(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Bu(Cg,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},$C=Function.prototype.bind;function Uu(t,e){return $C.call(t,e)}var $u=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:n}=this;if(n.next)try{n.next(e)}catch(i){da(i)}}error(e){let{partialObserver:n}=this;if(n.error)try{n.error(e)}catch(i){da(i)}else da(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(n){da(n)}}},vr=class extends Fi{constructor(e,n,i){super();let r;if(Q(e)||!e)r={next:e??void 0,error:n??void 0,complete:i??void 0};else{let o;this&&sn.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&Uu(e.next,o),error:e.error&&Uu(e.error,o),complete:e.complete&&Uu(e.complete,o)}):r=e}this.destination=new $u(r)}};function da(t){sn.useDeprecatedSynchronousErrorHandling?Eg(t):ua(t)}function HC(t){throw t}function Bu(t,e){let{onStoppedNotification:n}=sn;n&&gr.setTimeout(()=>n(t,e))}var zC={closed:!0,next:No,error:HC,complete:No};var yr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Lt(t){return t}function Hu(...t){return zu(t)}function zu(t){return t.length===0?Lt:t.length===1?t[0]:function(n){return t.reduce((i,r)=>r(i),n)}}var z=(()=>{class t{constructor(n){n&&(this._subscribe=n)}lift(n){let i=new t;return i.source=this,i.operator=n,i}subscribe(n,i,r){let o=GC(n)?n:new vr(n,i,r);return mr(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(i){n.error(i)}}forEach(n,i){return i=Sg(i),new i((r,o)=>{let s=new vr({next:a=>{try{n(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(n){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(n)}[yr](){return this}pipe(...n){return zu(n)(this)}toPromise(n){return n=Sg(n),new n((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return t.create=e=>new t(e),t})();function Sg(t){var e;return(e=t??sn.Promise)!==null&&e!==void 0?e:Promise}function WC(t){return t&&Q(t.next)&&Q(t.error)&&Q(t.complete)}function GC(t){return t&&t instanceof Fi||WC(t)&&ca(t)}function Wu(t){return Q(t?.lift)}function de(t){return e=>{if(Wu(e))return e.lift(function(n){try{return t(n,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function ce(t,e,n,i,r){return new Gu(t,e,n,i,r)}var Gu=class extends Fi{constructor(e,n,i,r,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(l){e.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function _r(){return de((t,e)=>{let n=null;t._refCount++;let i=ce(e,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){n=null;return}let r=t._connection,o=n;n=null,r&&(!o||r===o)&&r.unsubscribe(),e.unsubscribe()});t.subscribe(i),i.closed||(n=t.connect())})}var wr=class extends z{constructor(e,n){super(),this.source=e,this.subjectFactory=n,this._subject=null,this._refCount=0,this._connection=null,Wu(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new Ae;let n=this.getSubject();e.add(this.source.subscribe(ce(n,void 0,()=>{this._teardown(),n.complete()},i=>{this._teardown(),n.error(i)},()=>this._teardown()))),e.closed&&(this._connection=null,e=Ae.EMPTY)}return e}refCount(){return _r()(this)}};var Ig=pr(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var H=(()=>{class t extends z{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let i=new fa(this,this);return i.operator=n,i}_throwIfClosed(){if(this.closed)throw new Ig}next(n){mr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(n)}})}error(n){mr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:i}=this;for(;i.length;)i.shift().error(n)}})}complete(){mr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:i,isStopped:r,observers:o}=this;return i||r?Vu:(this.currentObservers=null,o.push(n),new Ae(()=>{this.currentObservers=null,Oi(o,n)}))}_checkFinalizedStatuses(n){let{hasError:i,thrownError:r,isStopped:o}=this;i?n.error(r):o&&n.complete()}asObservable(){let n=new z;return n.source=this,n}}return t.create=(e,n)=>new fa(e,n),t})(),fa=class extends H{constructor(e,n){super(),this.destination=e,this.source=n}next(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,e)}error(e){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,e)}complete(){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||n===void 0||n.call(e)}_subscribe(e){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(e))!==null&&i!==void 0?i:Vu}};var ve=class extends H{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let n=super._subscribe(e);return!n.closed&&e.next(this._value),n}getValue(){let{hasError:e,thrownError:n,_value:i}=this;if(e)throw n;return this._throwIfClosed(),i}next(e){super.next(this._value=e)}};var qu={now(){return(qu.delegate||Date).now()},delegate:void 0};var ha=class extends Ae{constructor(e,n){super()}schedule(e,n=0){return this}};var ko={setInterval(t,e,...n){let{delegate:i}=ko;return i?.setInterval?i.setInterval(t,e,...n):setInterval(t,e,...n)},clearInterval(t){let{delegate:e}=ko;return(e?.clearInterval||clearInterval)(t)},delegate:void 0};var pa=class extends ha{constructor(e,n){super(e,n),this.scheduler=e,this.work=n,this.pending=!1}schedule(e,n=0){var i;if(this.closed)return this;this.state=e;let r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,n),this}requestAsyncId(e,n,i=0){return ko.setInterval(e.flush.bind(e,this),i)}recycleAsyncId(e,n,i=0){if(i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&ko.clearInterval(n)}execute(e,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let i=this._execute(e,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,n){let i=!1,r;try{this.work(e)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:e,scheduler:n}=this,{actions:i}=n;this.work=this.state=this.scheduler=null,this.pending=!1,Oi(i,this),e!=null&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,super.unsubscribe()}}};var Cr=class t{constructor(e,n=t.now){this.schedulerActionCtor=e,this.now=n}schedule(e,n=0,i){return new this.schedulerActionCtor(this,e).schedule(i,n)}};Cr.now=qu.now;var ga=class extends Cr{constructor(e,n=Cr.now){super(e,n),this.actions=[],this._active=!1}flush(e){let{actions:n}=this;if(this._active){n.push(e);return}let i;this._active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,i){for(;e=n.shift();)e.unsubscribe();throw i}}};var Qu=new ga(pa),Tg=Qu;var wt=new z(t=>t.complete());function ma(t){return t&&Q(t.schedule)}function Mg(t){return t[t.length-1]}function va(t){return Q(Mg(t))?t.pop():void 0}function si(t){return ma(Mg(t))?t.pop():void 0}function Rg(t,e,n,i){function r(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(u){try{c(i.next(u))}catch(d){s(d)}}function l(u){try{c(i.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):r(u.value).then(a,l)}c((i=i.apply(t,e||[])).next())})}function xg(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Li(t){return this instanceof Li?(this.v=t,this):new Li(t)}function Ag(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n.apply(t,e||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(p){return function(h){return Promise.resolve(h).then(p,d)}}function a(p,h){i[p]&&(r[p]=function(g){return new Promise(function(_,y){o.push([p,g,_,y])>1||l(p,g)})},h&&(r[p]=h(r[p])))}function l(p,h){try{c(i[p](h))}catch(g){f(o[0][3],g)}}function c(p){p.value instanceof Li?Promise.resolve(p.value.v).then(u,d):f(o[0][2],p)}function u(p){l("next",p)}function d(p){l("throw",p)}function f(p,h){p(h),o.shift(),o.length&&l(o[0][0],o[0][1])}}function Ng(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof xg=="function"?xg(t):t[Symbol.iterator](),n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n);function i(o){n[o]=t[o]&&function(s){return new Promise(function(a,l){s=t[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var ya=t=>t&&typeof t.length=="number"&&typeof t!="function";function _a(t){return Q(t?.then)}function wa(t){return Q(t[yr])}function Ca(t){return Symbol.asyncIterator&&Q(t?.[Symbol.asyncIterator])}function Da(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function qC(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ba=qC();function Ea(t){return Q(t?.[ba])}function Sa(t){return Ag(this,arguments,function*(){let n=t.getReader();try{for(;;){let{value:i,done:r}=yield Li(n.read());if(r)return yield Li(void 0);yield yield Li(i)}}finally{n.releaseLock()}})}function Ia(t){return Q(t?.getReader)}function Le(t){if(t instanceof z)return t;if(t!=null){if(wa(t))return QC(t);if(ya(t))return YC(t);if(_a(t))return ZC(t);if(Ca(t))return kg(t);if(Ea(t))return XC(t);if(Ia(t))return KC(t)}throw Da(t)}function QC(t){return new z(e=>{let n=t[yr]();if(Q(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function YC(t){return new z(e=>{for(let n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function ZC(t){return new z(e=>{t.then(n=>{e.closed||(e.next(n),e.complete())},n=>e.error(n)).then(null,ua)})}function XC(t){return new z(e=>{for(let n of t)if(e.next(n),e.closed)return;e.complete()})}function kg(t){return new z(e=>{JC(t,e).catch(n=>e.error(n))})}function KC(t){return kg(Sa(t))}function JC(t,e){var n,i,r,o;return Rg(this,void 0,void 0,function*(){try{for(n=Ng(t);i=yield n.next(),!i.done;){let s=i.value;if(e.next(s),e.closed)return}}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=n.return)&&(yield o.call(n))}finally{if(r)throw r.error}}e.complete()})}function Ct(t,e,n,i=0,r=!1){let o=e.schedule(function(){n(),r?t.add(this.schedule(null,i)):this.unsubscribe()},i);if(t.add(o),!r)return o}function Ta(t,e=0){return de((n,i)=>{n.subscribe(ce(i,r=>Ct(i,t,()=>i.next(r),e),()=>Ct(i,t,()=>i.complete(),e),r=>Ct(i,t,()=>i.error(r),e)))})}function Ma(t,e=0){return de((n,i)=>{i.add(t.schedule(()=>n.subscribe(i),e))})}function Og(t,e){return Le(t).pipe(Ma(e),Ta(e))}function Pg(t,e){return Le(t).pipe(Ma(e),Ta(e))}function Fg(t,e){return new z(n=>{let i=0;return e.schedule(function(){i===t.length?n.complete():(n.next(t[i++]),n.closed||this.schedule())})})}function Lg(t,e){return new z(n=>{let i;return Ct(n,e,()=>{i=t[ba](),Ct(n,e,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){n.error(s);return}o?n.complete():n.next(r)},0,!0)}),()=>Q(i?.return)&&i.return()})}function xa(t,e){if(!t)throw new Error("Iterable cannot be null");return new z(n=>{Ct(n,e,()=>{let i=t[Symbol.asyncIterator]();Ct(n,e,()=>{i.next().then(r=>{r.done?n.complete():n.next(r.value)})},0,!0)})})}function Vg(t,e){return xa(Sa(t),e)}function jg(t,e){if(t!=null){if(wa(t))return Og(t,e);if(ya(t))return Fg(t,e);if(_a(t))return Pg(t,e);if(Ca(t))return xa(t,e);if(Ea(t))return Lg(t,e);if(Ia(t))return Vg(t,e)}throw Da(t)}function be(t,e){return e?jg(t,e):Le(t)}function B(...t){let e=si(t);return be(t,e)}function Dr(t,e){let n=Q(t)?t:()=>t,i=r=>r.error(n());return new z(e?r=>e.schedule(i,0,r):i)}function Yu(t){return!!t&&(t instanceof z||Q(t.lift)&&Q(t.subscribe))}var Ln=pr(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function Ug(t){return t instanceof Date&&!isNaN(t)}function W(t,e){return de((n,i)=>{let r=0;n.subscribe(ce(i,o=>{i.next(t.call(e,o,r++))}))})}var{isArray:eD}=Array;function tD(t,e){return eD(e)?t(...e):t(e)}function Ra(t){return W(e=>tD(t,e))}var{isArray:nD}=Array,{getPrototypeOf:iD,prototype:rD,keys:oD}=Object;function Aa(t){if(t.length===1){let e=t[0];if(nD(e))return{args:e,keys:null};if(sD(e)){let n=oD(e);return{args:n.map(i=>e[i]),keys:n}}}return{args:t,keys:null}}function sD(t){return t&&typeof t=="object"&&iD(t)===rD}function Na(t,e){return t.reduce((n,i,r)=>(n[i]=e[r],n),{})}function Oo(...t){let e=si(t),n=va(t),{args:i,keys:r}=Aa(t);if(i.length===0)return be([],e);let o=new z(aD(i,e,r?s=>Na(r,s):Lt));return n?o.pipe(Ra(n)):o}function aD(t,e,n=Lt){return i=>{Bg(e,()=>{let{length:r}=t,o=new Array(r),s=r,a=r;for(let l=0;l<r;l++)Bg(e,()=>{let c=be(t[l],e),u=!1;c.subscribe(ce(i,d=>{o[l]=d,u||(u=!0,a--),a||i.next(n(o.slice()))},()=>{--s||i.complete()}))},i)},i)}}function Bg(t,e,n){t?Ct(n,t,e):e()}function $g(t,e,n,i,r,o,s,a){let l=[],c=0,u=0,d=!1,f=()=>{d&&!l.length&&!c&&e.complete()},p=g=>c<i?h(g):l.push(g),h=g=>{o&&e.next(g),c++;let _=!1;Le(n(g,u++)).subscribe(ce(e,y=>{r?.(y),o?p(y):e.next(y)},()=>{_=!0},void 0,()=>{if(_)try{for(c--;l.length&&c<i;){let y=l.shift();s?Ct(e,s,()=>h(y)):h(y)}f()}catch(y){e.error(y)}}))};return t.subscribe(ce(e,p,()=>{d=!0,f()})),()=>{a?.()}}function Ve(t,e,n=1/0){return Q(e)?Ve((i,r)=>W((o,s)=>e(i,o,r,s))(Le(t(i,r))),n):(typeof e=="number"&&(n=e),de((i,r)=>$g(i,r,t,n)))}function ai(t=1/0){return Ve(Lt,t)}function Hg(){return ai(1)}function br(...t){return Hg()(be(t,si(t)))}function ka(t){return new z(e=>{Le(t()).subscribe(e)})}function Zu(...t){let e=va(t),{args:n,keys:i}=Aa(t),r=new z(o=>{let{length:s}=n;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let u=0;u<s;u++){let d=!1;Le(n[u]).subscribe(ce(o,f=>{d||(d=!0,c--),a[u]=f},()=>l--,void 0,()=>{(!l||!d)&&(c||o.next(i?Na(i,a):a),o.complete())}))}});return e?r.pipe(Ra(e)):r}function Gt(t=0,e,n=Tg){let i=-1;return e!=null&&(ma(e)?n=e:i=e),new z(r=>{let o=Ug(t)?+t-n.now():t;o<0&&(o=0);let s=0;return n.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}function Po(t=0,e=Qu){return t<0&&(t=0),Gt(t,t,e)}function Dt(t,e){return de((n,i)=>{let r=0;n.subscribe(ce(i,o=>t.call(e,o,r++)&&i.next(o)))})}function li(t){return de((e,n)=>{let i=null,r=!1,o;i=e.subscribe(ce(n,void 0,void 0,s=>{o=Le(t(s,li(t)(e))),i?(i.unsubscribe(),i=null,o.subscribe(n)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(n))})}function zg(t,e,n,i,r){return(o,s)=>{let a=n,l=e,c=0;o.subscribe(ce(s,u=>{let d=c++;l=a?t(l,u,d):(a=!0,u),i&&s.next(l)},r&&(()=>{a&&s.next(l),s.complete()})))}}function Vn(t,e){return Q(e)?Ve(t,e,1):Ve(t,1)}function ci(t){return de((e,n)=>{let i=!1;e.subscribe(ce(n,r=>{i=!0,n.next(r)},()=>{i||n.next(t),n.complete()}))})}function jn(t){return t<=0?()=>wt:de((e,n)=>{let i=0;e.subscribe(ce(n,r=>{++i<=t&&(n.next(r),t<=i&&n.complete())}))})}function Oa(t=lD){return de((e,n)=>{let i=!1;e.subscribe(ce(n,r=>{i=!0,n.next(r)},()=>i?n.complete():n.error(t())))})}function lD(){return new Ln}function ui(t){return de((e,n)=>{try{e.subscribe(n)}finally{n.add(t)}})}function Un(t,e){let n=arguments.length>=2;return i=>i.pipe(t?Dt((r,o)=>t(r,o,i)):Lt,jn(1),n?ci(e):Oa(()=>new Ln))}function Er(t){return t<=0?()=>wt:de((e,n)=>{let i=[];e.subscribe(ce(n,r=>{i.push(r),t<i.length&&i.shift()},()=>{for(let r of i)n.next(r);n.complete()},void 0,()=>{i=null}))})}function Xu(t,e){let n=arguments.length>=2;return i=>i.pipe(t?Dt((r,o)=>t(r,o,i)):Lt,Er(1),n?ci(e):Oa(()=>new Ln))}function Ku(t,e){return de(zg(t,e,arguments.length>=2,!0))}function Ju(...t){let e=si(t);return de((n,i)=>{(e?br(t,n,e):br(t,n)).subscribe(i)})}function bt(t,e){return de((n,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();n.subscribe(ce(i,l=>{r?.unsubscribe();let c=0,u=o++;Le(t(l,u)).subscribe(r=ce(i,d=>i.next(e?e(l,d,u,c++):d),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Ee(t){return de((e,n)=>{Le(t).subscribe(ce(n,()=>n.complete(),No)),!n.closed&&e.subscribe(n)})}function ke(t,e,n){let i=Q(t)||e||n?{next:t,error:e,complete:n}:t;return i?de((r,o)=>{var s;(s=i.subscribe)===null||s===void 0||s.call(i);let a=!0;r.subscribe(ce(o,l=>{var c;(c=i.next)===null||c===void 0||c.call(i,l),o.next(l)},()=>{var l;a=!1,(l=i.complete)===null||l===void 0||l.call(i),o.complete()},l=>{var c;a=!1,(c=i.error)===null||c===void 0||c.call(i,l),o.error(l)},()=>{var l,c;a&&((l=i.unsubscribe)===null||l===void 0||l.call(i)),(c=i.finalize)===null||c===void 0||c.call(i)}))}):Lt}var km="https://g.co/ng/security#xss",F=class extends Error{code;constructor(e,n){super(Cl(e,n)),this.code=e}};function Cl(t,e){return`${`NG0${Math.abs(t)}`}${e?": "+e:""}`}var Om=Symbol("InputSignalNode#UNSET"),cD=le(x({},Lu),{transformFn:void 0,applyValueToInputSignal(t,e){aa(t,e)}});function Pm(t,e){let n=Object.create(cD);n.value=t,n.transformFn=e?.transform;function i(){if(ia(n),n.value===Om)throw new F(-950,!1);return n.value}return i[Ft]=n,i}function Xo(t){return{toString:t}.toString()}var Pa="__parameters__";function uD(t){return function(...n){if(t){let i=t(...n);for(let r in i)this[r]=i[r]}}}function Fm(t,e,n){return Xo(()=>{let i=uD(e);function r(...o){if(this instanceof r)return i.apply(this,o),this;let s=new r(...o);return a.annotation=s,a;function a(l,c,u){let d=l.hasOwnProperty(Pa)?l[Pa]:Object.defineProperty(l,Pa,{value:[]})[Pa];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}var ft=globalThis;function Ce(t){for(let e in t)if(t[e]===Ce)return e;throw Error("Could not find renamed property on target object.")}function dD(t,e){for(let n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function St(t){if(typeof t=="string")return t;if(Array.isArray(t))return"["+t.map(St).join(", ")+"]";if(t==null)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;let e=t.toString();if(e==null)return""+e;let n=e.indexOf(`
`);return n===-1?e:e.substring(0,n)}function Wg(t,e){return t==null||t===""?e===null?"":e:e==null||e===""?t:t+" "+e}var fD=Ce({__forward_ref__:Ce});function Zt(t){return t.__forward_ref__=Zt,t.toString=function(){return St(this())},t}function ht(t){return Lm(t)?t():t}function Lm(t){return typeof t=="function"&&t.hasOwnProperty(fD)&&t.__forward_ref__===Zt}function R(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function it(t){return{providers:t.providers||[],imports:t.imports||[]}}function Dl(t){return Gg(t,jm)||Gg(t,Um)}function Vm(t){return Dl(t)!==null}function Gg(t,e){return t.hasOwnProperty(e)?t[e]:null}function hD(t){let e=t&&(t[jm]||t[Um]);return e||null}function qg(t){return t&&(t.hasOwnProperty(Qg)||t.hasOwnProperty(pD))?t[Qg]:null}var jm=Ce({\u0275prov:Ce}),Qg=Ce({\u0275inj:Ce}),Um=Ce({ngInjectableDef:Ce}),pD=Ce({ngInjectorDef:Ce}),P=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,n){this._desc=e,this.\u0275prov=void 0,typeof n=="number"?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.\u0275prov=R({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Bm(t){return t&&!!t.\u0275providers}var gD=Ce({\u0275cmp:Ce}),mD=Ce({\u0275dir:Ce}),vD=Ce({\u0275pipe:Ce}),yD=Ce({\u0275mod:Ce}),Wa=Ce({\u0275fac:Ce}),jo=Ce({__NG_ELEMENT_ID__:Ce}),Yg=Ce({__NG_ENV_ID__:Ce});function Ar(t){return typeof t=="string"?t:t==null?"":String(t)}function _D(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Ar(t)}function wD(t,e){let n=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new F(-200,t)}function uf(t,e){throw new F(-201,!1)}var ne=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(ne||{}),pd;function $m(){return pd}function Et(t){let e=pd;return pd=t,e}function Hm(t,e,n){let i=Dl(t);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(n&ne.Optional)return null;if(e!==void 0)return e;uf(t,"Injector")}var CD={},Bo=CD,gd="__NG_DI_FLAG__",Ga="ngTempTokenPath",DD="ngTokenPath",bD=/\n/gm,ED="\u0275",Zg="__source",xr;function SD(){return xr}function di(t){let e=xr;return xr=t,e}function ID(t,e=ne.Default){if(xr===void 0)throw new F(-203,!1);return xr===null?Hm(t,void 0,e):xr.get(t,e&ne.Optional?null:void 0,e)}function O(t,e=ne.Default){return($m()||ID)(ht(t),e)}function b(t,e=ne.Default){return O(t,bl(e))}function bl(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function md(t){let e=[];for(let n=0;n<t.length;n++){let i=ht(t[n]);if(Array.isArray(i)){if(i.length===0)throw new F(900,!1);let r,o=ne.Default;for(let s=0;s<i.length;s++){let a=i[s],l=TD(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(O(r,o))}else e.push(O(i))}return e}function zm(t,e){return t[gd]=e,t.prototype[gd]=e,t}function TD(t){return t[gd]}function MD(t,e,n,i){let r=t[Ga];throw e[Zg]&&r.unshift(e[Zg]),t.message=xD(`
`+t.message,r,n,i),t[DD]=r,t[Ga]=null,t}function xD(t,e,n,i=null){t=t&&t.charAt(0)===`
`&&t.charAt(1)==ED?t.slice(2):t;let r=St(e);if(Array.isArray(e))r=e.map(St).join(" -> ");else if(typeof e=="object"){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):St(a)))}r=`{${o.join(", ")}}`}return`${n}${i?"("+i+")":""}[${r}]: ${t.replace(bD,`
`)}`}var Wm=zm(Fm("Optional"),8);var RD=zm(Fm("SkipSelf"),4);function Ui(t,e){let n=t.hasOwnProperty(Wa);return n?t[Wa]:null}function AD(t,e,n){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++){let r=t[i],o=e[i];if(n&&(r=n(r),o=n(o)),o!==r)return!1}return!0}function ND(t){return t.flat(Number.POSITIVE_INFINITY)}function df(t,e){t.forEach(n=>Array.isArray(n)?df(n,e):e(n))}function Gm(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function qa(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function kD(t,e){let n=[];for(let i=0;i<t;i++)n.push(e);return n}function OD(t,e,n,i){let r=t.length;if(r==e)t.push(n,i);else if(r===1)t.push(i,t[0]),t[0]=n;else{for(r--,t.push(t[r-1],t[r]);r>e;){let o=r-2;t[r]=t[o],r--}t[e]=n,t[e+1]=i}}function PD(t,e,n){let i=Ko(t,e);return i>=0?t[i|1]=n:(i=~i,OD(t,i,e,n)),i}function ed(t,e){let n=Ko(t,e);if(n>=0)return t[n|1]}function Ko(t,e){return FD(t,e,1)}function FD(t,e,n){let i=0,r=t.length>>n;for(;r!==i;){let o=i+(r-i>>1),s=t[o<<n];if(e===s)return o<<n;s>e?r=o:i=o+1}return~(r<<n)}var Nr={},qt=[],kr=new P(""),qm=new P("",-1),Qm=new P(""),Qa=class{get(e,n=Bo){if(n===Bo){let i=new Error(`NullInjectorError: No provider for ${St(e)}!`);throw i.name="NullInjectorError",i}return n}};function Ym(t,e){let n=t[yD]||null;if(!n&&e===!0)throw new Error(`Type ${St(t)} does not have '\u0275mod' property.`);return n}function Bn(t){return t[gD]||null}function Zm(t){return t[mD]||null}function Xm(t){return t[vD]||null}function Km(t){let e=Bn(t)||Zm(t)||Xm(t);return e!==null&&e.standalone}function Jo(t){return{\u0275providers:t}}function LD(...t){return{\u0275providers:Jm(!0,t),\u0275fromNgModule:!0}}function Jm(t,...e){let n=[],i=new Set,r,o=s=>{n.push(s)};return df(e,s=>{let a=s;vd(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&ev(r,o),n}function ev(t,e){for(let n=0;n<t.length;n++){let{ngModule:i,providers:r}=t[n];ff(r,o=>{e(o,i)})}}function vd(t,e,n,i){if(t=ht(t),!t)return!1;let r=null,o=qg(t),s=!o&&Bn(t);if(!o&&!s){let l=t.ngModule;if(o=qg(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=t}let a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)vd(c,e,n,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let c;try{df(o.imports,u=>{vd(u,e,n,i)&&(c||=[],c.push(u))})}finally{}c!==void 0&&ev(c,e)}if(!a){let c=Ui(r)||(()=>new r);e({provide:r,useFactory:c,deps:qt},r),e({provide:Qm,useValue:r,multi:!0},r),e({provide:kr,useValue:()=>O(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=t;ff(l,u=>{e(u,c)})}}else return!1;return r!==t&&t.providers!==void 0}function ff(t,e){for(let n of t)Bm(n)&&(n=n.\u0275providers),Array.isArray(n)?ff(n,e):e(n)}var VD=Ce({provide:String,useValue:Ce});function tv(t){return t!==null&&typeof t=="object"&&VD in t}function jD(t){return!!(t&&t.useExisting)}function UD(t){return!!(t&&t.useFactory)}function Or(t){return typeof t=="function"}function BD(t){return!!t.useClass}var El=new P(""),Ua={},$D={},td;function Sl(){return td===void 0&&(td=new Qa),td}var nt=class{},$o=class extends nt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,n,i,r){super(),this.parent=n,this.source=i,this.scopes=r,_d(e,s=>this.processProvider(s)),this.records.set(qm,Sr(void 0,this)),r.has("environment")&&this.records.set(nt,Sr(void 0,this));let o=this.records.get(El);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Qm,qt,ne.Self))}destroy(){Lo(this),this._destroyed=!0;let e=re(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of n)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),re(e)}}onDestroy(e){return Lo(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Lo(this);let n=di(this),i=Et(void 0),r;try{return e()}finally{di(n),Et(i)}}get(e,n=Bo,i=ne.Default){if(Lo(this),e.hasOwnProperty(Yg))return e[Yg](this);i=bl(i);let r,o=di(this),s=Et(void 0);try{if(!(i&ne.SkipSelf)){let l=this.records.get(e);if(l===void 0){let c=qD(e)&&Dl(e);c&&this.injectableDefInScope(c)?l=Sr(yd(e),Ua):l=null,this.records.set(e,l)}if(l!=null)return this.hydrate(e,l)}let a=i&ne.Self?Sl():this.parent;return n=i&ne.Optional&&n===Bo?null:n,a.get(e,n)}catch(a){if(a.name==="NullInjectorError"){if((a[Ga]=a[Ga]||[]).unshift(St(e)),o)throw a;return MD(a,e,"R3InjectorError",this.source)}else throw a}finally{Et(s),di(o)}}resolveInjectorInitializers(){let e=re(null),n=di(this),i=Et(void 0),r;try{let o=this.get(kr,qt,ne.Self);for(let s of o)s()}finally{di(n),Et(i),re(e)}}toString(){let e=[],n=this.records;for(let i of n.keys())e.push(St(i));return`R3Injector[${e.join(", ")}]`}processProvider(e){e=ht(e);let n=Or(e)?e:ht(e&&e.provide),i=zD(e);if(!Or(e)&&e.multi===!0){let r=this.records.get(n);r||(r=Sr(void 0,Ua,!0),r.factory=()=>md(r.multi),this.records.set(n,r)),n=e,r.multi.push(e)}this.records.set(n,i)}hydrate(e,n){let i=re(null);try{return n.value===Ua&&(n.value=$D,n.value=n.factory()),typeof n.value=="object"&&n.value&&GD(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{re(i)}}injectableDefInScope(e){if(!e.providedIn)return!1;let n=ht(e.providedIn);return typeof n=="string"?n==="any"||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(e){let n=this._onDestroyHooks.indexOf(e);n!==-1&&this._onDestroyHooks.splice(n,1)}};function yd(t){let e=Dl(t),n=e!==null?e.factory:Ui(t);if(n!==null)return n;if(t instanceof P)throw new F(204,!1);if(t instanceof Function)return HD(t);throw new F(204,!1)}function HD(t){if(t.length>0)throw new F(204,!1);let n=hD(t);return n!==null?()=>n.factory(t):()=>new t}function zD(t){if(tv(t))return Sr(void 0,t.useValue);{let e=nv(t);return Sr(e,Ua)}}function nv(t,e,n){let i;if(Or(t)){let r=ht(t);return Ui(r)||yd(r)}else if(tv(t))i=()=>ht(t.useValue);else if(UD(t))i=()=>t.useFactory(...md(t.deps||[]));else if(jD(t))i=()=>O(ht(t.useExisting));else{let r=ht(t&&(t.useClass||t.provide));if(WD(t))i=()=>new r(...md(t.deps));else return Ui(r)||yd(r)}return i}function Lo(t){if(t.destroyed)throw new F(205,!1)}function Sr(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function WD(t){return!!t.deps}function GD(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function qD(t){return typeof t=="function"||typeof t=="object"&&t instanceof P}function _d(t,e){for(let n of t)Array.isArray(n)?_d(n,e):n&&Bm(n)?_d(n.\u0275providers,e):e(n)}function It(t,e){t instanceof $o&&Lo(t);let n,i=di(t),r=Et(void 0);try{return e()}finally{di(i),Et(r)}}function iv(){return $m()!==void 0||SD()!=null}function QD(t){if(!iv())throw new F(-203,!1)}function YD(t){let e=ft.ng;if(e&&e.\u0275compilerFacade)return e.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}function ZD(t){return typeof t=="function"}var Gn=0,J=1,q=2,at=3,ln=4,Tt=5,Pr=6,Ya=7,tt=8,Ho=9,$n=10,xe=11,zo=12,Xg=13,zr=14,jt=15,Bi=16,Ir=17,Hn=18,Il=19,rv=20,fi=21,nd=22,Za=23,Vt=24,He=25,ov=1;var $i=7,Xa=8,Fr=9,st=10;function hi(t){return Array.isArray(t)&&typeof t[ov]=="object"}function qn(t){return Array.isArray(t)&&t[ov]===!0}function hf(t){return(t.flags&4)!==0}function Yi(t){return t.componentOffset>-1}function Tl(t){return(t.flags&1)===1}function zn(t){return!!t.template}function Ka(t){return(t[q]&512)!==0}function es(t){return(t[q]&256)===256}var wd=class{previousValue;currentValue;firstChange;constructor(e,n,i){this.previousValue=e,this.currentValue=n,this.firstChange=i}isFirstChange(){return this.firstChange}};function sv(t,e,n,i){e!==null?e.applyValueToInputSignal(e,i):t[n]=i}var un=(()=>{let t=()=>av;return t.ngInherit=!0,t})();function av(t){return t.type.prototype.ngOnChanges&&(t.setInput=KD),XD}function XD(){let t=cv(this),e=t?.current;if(e){let n=t.previous;if(n===Nr)t.previous=e;else for(let i in e)n[i]=e[i];t.current=null,this.ngOnChanges(e)}}function KD(t,e,n,i,r){let o=this.declaredInputs[i],s=cv(t)||JD(t,{previous:Nr,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new wd(c&&c.currentValue,n,l===Nr),sv(t,e,r,n)}var lv="__ngSimpleChanges__";function cv(t){return t[lv]||null}function JD(t,e){return t[lv]=e}var Kg=null;var Qt=function(t,e,n){Kg?.(t,e,n)},eb="svg",tb="math";function En(t){for(;Array.isArray(t);)t=t[Gn];return t}function uv(t,e){return En(e[t])}function dn(t,e){return En(e[t.index])}function pf(t,e){return t.data[e]}function gf(t,e){return t[e]}function Sn(t,e){let n=e[t];return hi(n)?n:n[Gn]}function nb(t){return(t[q]&4)===4}function mf(t){return(t[q]&128)===128}function ib(t){return qn(t[at])}function pi(t,e){return e==null?null:t[e]}function dv(t){t[Ir]=0}function vf(t){t[q]&1024||(t[q]|=1024,mf(t)&&xl(t))}function rb(t,e){for(;t>0;)e=e[zr],t--;return e}function Ml(t){return!!(t[q]&9216||t[Vt]?.dirty)}function Cd(t){t[$n].changeDetectionScheduler?.notify(9),t[q]&64&&(t[q]|=1024),Ml(t)&&xl(t)}function xl(t){t[$n].changeDetectionScheduler?.notify(0);let e=Hi(t);for(;e!==null&&!(e[q]&8192||(e[q]|=8192,!mf(e)));)e=Hi(e)}function fv(t,e){if(es(t))throw new F(911,!1);t[fi]===null&&(t[fi]=[]),t[fi].push(e)}function ob(t,e){if(t[fi]===null)return;let n=t[fi].indexOf(e);n!==-1&&t[fi].splice(n,1)}function Hi(t){let e=t[at];return qn(e)?e[at]:e}function hv(t){return t[Ya]??=[]}function pv(t){return t.cleanup??=[]}function sb(t,e,n,i){let r=hv(e);r.push(n),t.firstCreatePass&&pv(t).push(i,r.length-1)}var te={lFrame:Dv(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Dd=!1;function ab(){return te.lFrame.elementDepthCount}function lb(){te.lFrame.elementDepthCount++}function cb(){te.lFrame.elementDepthCount--}function Rl(){return te.bindingsEnabled}function gv(){return te.skipHydrationRootTNode!==null}function ub(t){return te.skipHydrationRootTNode===t}function db(){te.skipHydrationRootTNode=null}function G(){return te.lFrame.lView}function Re(){return te.lFrame.tView}function j(t){return te.lFrame.contextLView=t,t[tt]}function U(t){return te.lFrame.contextLView=null,t}function pt(){let t=mv();for(;t!==null&&t.type===64;)t=t.parent;return t}function mv(){return te.lFrame.currentTNode}function fb(){let t=te.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function Zi(t,e){let n=te.lFrame;n.currentTNode=t,n.isParent=e}function yf(){return te.lFrame.isParent}function _f(){te.lFrame.isParent=!1}function hb(){return te.lFrame.contextLView}function vv(){return Dd}function Jg(t){let e=Dd;return Dd=t,e}function Xi(){let t=te.lFrame,e=t.bindingRootIndex;return e===-1&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function pb(){return te.lFrame.bindingIndex}function gb(t){return te.lFrame.bindingIndex=t}function Wr(){return te.lFrame.bindingIndex++}function yv(t){let e=te.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function mb(){return te.lFrame.inI18n}function vb(t,e){let n=te.lFrame;n.bindingIndex=n.bindingRootIndex=t,bd(e)}function yb(){return te.lFrame.currentDirectiveIndex}function bd(t){te.lFrame.currentDirectiveIndex=t}function _b(t){let e=te.lFrame.currentDirectiveIndex;return e===-1?null:t[e]}function _v(){return te.lFrame.currentQueryIndex}function wf(t){te.lFrame.currentQueryIndex=t}function wb(t){let e=t[J];return e.type===2?e.declTNode:e.type===1?t[Tt]:null}function wv(t,e,n){if(n&ne.SkipSelf){let r=e,o=t;for(;r=r.parent,r===null&&!(n&ne.Host);)if(r=wb(o),r===null||(o=o[zr],r.type&10))break;if(r===null)return!1;e=r,t=o}let i=te.lFrame=Cv();return i.currentTNode=e,i.lView=t,!0}function Cf(t){let e=Cv(),n=t[J];te.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function Cv(){let t=te.lFrame,e=t===null?null:t.child;return e===null?Dv(t):e}function Dv(t){let e={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:t,child:null,inI18n:!1};return t!==null&&(t.child=e),e}function bv(){let t=te.lFrame;return te.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var Ev=bv;function Df(){let t=bv();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Cb(t){return(te.lFrame.contextLView=rb(t,te.lFrame.contextLView))[tt]}function Ki(){return te.lFrame.selectedIndex}function zi(t){te.lFrame.selectedIndex=t}function ts(){let t=te.lFrame;return pf(t.tView,t.selectedIndex)}function Db(){return te.lFrame.currentNamespace}var Sv=!0;function Al(){return Sv}function Nl(t){Sv=t}function bb(t,e,n){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(i){let s=av(e);(n.preOrderHooks??=[]).push(t,s),(n.preOrderCheckHooks??=[]).push(t,s)}r&&(n.preOrderHooks??=[]).push(0-t,r),o&&((n.preOrderHooks??=[]).push(t,o),(n.preOrderCheckHooks??=[]).push(t,o))}function bf(t,e){for(let n=e.directiveStart,i=e.directiveEnd;n<i;n++){let o=t.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:u}=o;s&&(t.contentHooks??=[]).push(-n,s),a&&((t.contentHooks??=[]).push(n,a),(t.contentCheckHooks??=[]).push(n,a)),l&&(t.viewHooks??=[]).push(-n,l),c&&((t.viewHooks??=[]).push(n,c),(t.viewCheckHooks??=[]).push(n,c)),u!=null&&(t.destroyHooks??=[]).push(n,u)}}function Ba(t,e,n){Iv(t,e,3,n)}function $a(t,e,n,i){(t[q]&3)===n&&Iv(t,e,n,i)}function id(t,e){let n=t[q];(n&3)===e&&(n&=16383,n+=1,t[q]=n)}function Iv(t,e,n,i){let r=i!==void 0?t[Ir]&65535:0,o=i??-1,s=e.length-1,a=0;for(let l=r;l<s;l++)if(typeof e[l+1]=="number"){if(a=e[l],i!=null&&a>=i)break}else e[l]<0&&(t[Ir]+=65536),(a<o||o==-1)&&(Eb(t,n,e,l),t[Ir]=(t[Ir]&4294901760)+l+2),l++}function em(t,e){Qt(4,t,e);let n=re(null);try{e.call(t)}finally{re(n),Qt(5,t,e)}}function Eb(t,e,n,i){let r=n[i]<0,o=n[i+1],s=r?-n[i]:n[i],a=t[s];r?t[q]>>14<t[Ir]>>16&&(t[q]&3)===e&&(t[q]+=16384,em(a,o)):em(a,o)}var Rr=-1,Wi=class{factory;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,n,i){this.factory=e,this.canSeeViewProviders=n,this.injectImpl=i}};function Sb(t){return t instanceof Wi}function Ib(t){return(t.flags&8)!==0}function Tb(t){return(t.flags&16)!==0}function Mb(t,e,n){let i=0;for(;i<n.length;){let r=n[i];if(typeof r=="number"){if(r!==0)break;i++;let o=n[i++],s=n[i++],a=n[i++];t.setAttribute(e,s,a,o)}else{let o=r,s=n[++i];xb(o)?t.setProperty(e,o,s):t.setAttribute(e,o,s),i++}}return i}function Tv(t){return t===3||t===4||t===6}function xb(t){return t.charCodeAt(0)===64}function Lr(t,e){if(!(e===null||e.length===0))if(t===null||t.length===0)t=e.slice();else{let n=-1;for(let i=0;i<e.length;i++){let r=e[i];typeof r=="number"?n=r:n===0||(n===-1||n===2?tm(t,n,r,null,e[++i]):tm(t,n,r,null,null))}}return t}function tm(t,e,n,i,r){let o=0,s=t.length;if(e===-1)s=-1;else for(;o<t.length;){let a=t[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<t.length;){let a=t[o];if(typeof a=="number")break;if(a===n){if(i===null){r!==null&&(t[o+1]=r);return}else if(i===t[o+1]){t[o+2]=r;return}}o++,i!==null&&o++,r!==null&&o++}s!==-1&&(t.splice(s,0,e),o=s+1),t.splice(o++,0,n),i!==null&&t.splice(o++,0,i),r!==null&&t.splice(o++,0,r)}var rd={},Ed=class{injector;parentInjector;constructor(e,n){this.injector=e,this.parentInjector=n}get(e,n,i){i=bl(i);let r=this.injector.get(e,rd,i);return r!==rd||n===rd?r:this.parentInjector.get(e,n,i)}};function Mv(t){return t!==Rr}function Ja(t){return t&32767}function Rb(t){return t>>16}function el(t,e){let n=Rb(t),i=e;for(;n>0;)i=i[zr],n--;return i}var Sd=!0;function tl(t){let e=Sd;return Sd=t,e}var Ab=256,xv=Ab-1,Rv=5,Nb=0,bn={};function kb(t,e,n){let i;typeof n=="string"?i=n.charCodeAt(0)||0:n.hasOwnProperty(jo)&&(i=n[jo]),i==null&&(i=n[jo]=Nb++);let r=i&xv,o=1<<r;e.data[t+(r>>Rv)]|=o}function nl(t,e){let n=Av(t,e);if(n!==-1)return n;let i=e[J];i.firstCreatePass&&(t.injectorIndex=e.length,od(i.data,t),od(e,null),od(i.blueprint,null));let r=Ef(t,e),o=t.injectorIndex;if(Mv(r)){let s=Ja(r),a=el(r,e),l=a[J].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function od(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Av(t,e){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||e[t.injectorIndex+8]===null?-1:t.injectorIndex}function Ef(t,e){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let n=0,i=null,r=e;for(;r!==null;){if(i=Fv(r),i===null)return Rr;if(n++,r=r[zr],i.injectorIndex!==-1)return i.injectorIndex|n<<16}return Rr}function Id(t,e,n){kb(t,e,n)}function Ob(t,e){if(e==="class")return t.classes;if(e==="style")return t.styles;let n=t.attrs;if(n){let i=n.length,r=0;for(;r<i;){let o=n[r];if(Tv(o))break;if(o===0)r=r+2;else if(typeof o=="number")for(r++;r<i&&typeof n[r]=="string";)r++;else{if(o===e)return n[r+1];r=r+2}}}return null}function Nv(t,e,n){if(n&ne.Optional||t!==void 0)return t;uf(e,"NodeInjector")}function kv(t,e,n,i){if(n&ne.Optional&&i===void 0&&(i=null),!(n&(ne.Self|ne.Host))){let r=t[Ho],o=Et(void 0);try{return r?r.get(e,i,n&ne.Optional):Hm(e,i,n&ne.Optional)}finally{Et(o)}}return Nv(i,e,n)}function Ov(t,e,n,i=ne.Default,r){if(t!==null){if(e[q]&2048&&!(i&ne.Self)){let s=Vb(t,e,n,i,bn);if(s!==bn)return s}let o=Pv(t,e,n,i,bn);if(o!==bn)return o}return kv(e,n,i,r)}function Pv(t,e,n,i,r){let o=Fb(n);if(typeof o=="function"){if(!wv(e,t,i))return i&ne.Host?Nv(r,n,i):kv(e,n,i,r);try{let s;if(s=o(i),s==null&&!(i&ne.Optional))uf(n);else return s}finally{Ev()}}else if(typeof o=="number"){let s=null,a=Av(t,e),l=Rr,c=i&ne.Host?e[jt][Tt]:null;for((a===-1||i&ne.SkipSelf)&&(l=a===-1?Ef(t,e):e[a+8],l===Rr||!im(i,!1)?a=-1:(s=e[J],a=Ja(l),e=el(l,e)));a!==-1;){let u=e[J];if(nm(o,a,u.data)){let d=Pb(a,e,n,s,i,c);if(d!==bn)return d}l=e[a+8],l!==Rr&&im(i,e[J].data[a+8]===c)&&nm(o,a,e)?(s=u,a=Ja(l),e=el(l,e)):a=-1}}return r}function Pb(t,e,n,i,r,o){let s=e[J],a=s.data[t+8],l=i==null?Yi(a)&&Sd:i!=s&&(a.type&3)!==0,c=r&ne.Host&&o===a,u=Ha(a,s,n,l,c);return u!==null?Wo(e,s,u,a):bn}function Ha(t,e,n,i,r){let o=t.providerIndexes,s=e.data,a=o&1048575,l=t.directiveStart,c=t.directiveEnd,u=o>>20,d=i?a:a+u,f=r?a+u:c;for(let p=d;p<f;p++){let h=s[p];if(p<l&&n===h||p>=l&&h.type===n)return p}if(r){let p=s[l];if(p&&zn(p)&&p.type===n)return l}return null}function Wo(t,e,n,i){let r=t[n],o=e.data;if(Sb(r)){let s=r;s.resolving&&wD(_D(o[n]));let a=tl(s.canSeeViewProviders);s.resolving=!0;let l,c=s.injectImpl?Et(s.injectImpl):null,u=wv(t,i,ne.Default);try{r=t[n]=s.factory(void 0,o,t,i),e.firstCreatePass&&n>=i.directiveStart&&bb(n,o[n],e)}finally{c!==null&&Et(c),tl(a),s.resolving=!1,Ev()}}return r}function Fb(t){if(typeof t=="string")return t.charCodeAt(0)||0;let e=t.hasOwnProperty(jo)?t[jo]:void 0;return typeof e=="number"?e>=0?e&xv:Lb:e}function nm(t,e,n){let i=1<<t;return!!(n[e+(t>>Rv)]&i)}function im(t,e){return!(t&ne.Self)&&!(t&ne.Host&&e)}var ji=class{_tNode;_lView;constructor(e,n){this._tNode=e,this._lView=n}get(e,n,i){return Ov(this._tNode,this._lView,e,bl(i),n)}};function Lb(){return new ji(pt(),G())}function fn(t){return Xo(()=>{let e=t.prototype.constructor,n=e[Wa]||Td(e),i=Object.prototype,r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){let o=r[Wa]||Td(r);if(o&&o!==n)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function Td(t){return Lm(t)?()=>{let e=Td(ht(t));return e&&e()}:Ui(t)}function Vb(t,e,n,i,r){let o=t,s=e;for(;o!==null&&s!==null&&s[q]&2048&&!Ka(s);){let a=Pv(o,s,n,i|ne.Self,bn);if(a!==bn)return a;let l=o.parent;if(!l){let c=s[rv];if(c){let u=c.get(n,bn,i);if(u!==bn)return u}l=Fv(s),s=s[zr]}o=l}return r}function Fv(t){let e=t[J],n=e.type;return n===2?e.declTNode:n===1?t[Tt]:null}function Sf(t){return Ob(pt(),t)}function rm(t,e=null,n=null,i){let r=Lv(t,e,n,i);return r.resolveInjectorInitializers(),r}function Lv(t,e=null,n=null,i,r=new Set){let o=[n||qt,LD(t)];return i=i||(typeof t=="object"?void 0:St(t)),new $o(o,e||Sl(),i||null,r)}var Oe=class t{static THROW_IF_NOT_FOUND=Bo;static NULL=new Qa;static create(e,n){if(Array.isArray(e))return rm({name:""},n,e,"");{let i=e.name??"";return rm({name:i},e.parent,e.providers,i)}}static \u0275prov=R({token:t,providedIn:"any",factory:()=>O(qm)});static __NG_ELEMENT_ID__=-1};var jb=new P("");jb.__NG_ELEMENT_ID__=t=>{let e=pt();if(e===null)throw new F(204,!1);if(e.type&2)return e.value;if(t&ne.Optional)return null;throw new F(204,!1)};var Vv=!1,ns=(()=>{class t{static __NG_ELEMENT_ID__=Ub;static __NG_ENV_ID__=n=>n}return t})(),Md=class extends ns{_lView;constructor(e){super(),this._lView=e}onDestroy(e){return fv(this._lView,e),()=>ob(this._lView,e)}};function Ub(){return new Md(G())}var Vr=class{},If=new P("",{providedIn:"root",factory:()=>!1});var jv=new P(""),Uv=new P(""),Qn=(()=>{class t{taskId=0;pendingTasks=new Set;get _hasPendingTasks(){return this.hasPendingTasks.value}hasPendingTasks=new ve(!1);add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static \u0275prov=R({token:t,providedIn:"root",factory:()=>new t})}return t})();var xd=class extends H{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,iv()&&(this.destroyRef=b(ns,{optional:!0})??void 0,this.pendingTasks=b(Qn,{optional:!0})??void 0)}emit(e){let n=re(null);try{super.next(e)}finally{re(n)}}subscribe(e,n,i){let r=e,o=n||(()=>null),s=i;if(e&&typeof e=="object"){let l=e;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return e instanceof Ae&&e.add(a),a}wrapInTimeout(e){return n=>{let i=this.pendingTasks?.add();setTimeout(()=>{e(n),i!==void 0&&this.pendingTasks?.remove(i)})}}},ie=xd;function il(...t){}function Bv(t){let e,n;function i(){t=il;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{t(),i()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{t(),i()})),()=>i()}function om(t){return queueMicrotask(()=>t()),()=>{t=il}}var Tf="isAngularZone",rl=Tf+"_ID",Bb=0,Te=class t{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new ie(!1);onMicrotaskEmpty=new ie(!1);onStable=new ie(!1);onError=new ie(!1);constructor(e){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=Vv}=e;if(typeof Zone>"u")throw new F(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&i,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,zb(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Tf)===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new F(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new F(909,!1)}run(e,n,i){return this._inner.run(e,n,i)}runTask(e,n,i,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,$b,il,il);try{return o.runTask(s,n,i)}finally{o.cancelTask(s)}}runGuarded(e,n,i){return this._inner.runGuarded(e,n,i)}runOutsideAngular(e){return this._outer.run(e)}},$b={};function Mf(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Hb(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function e(){Bv(()=>{t.callbackScheduled=!1,Rd(t),t.isCheckStableRunning=!0,Mf(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{e()}):t._outer.run(()=>{e()}),Rd(t)}function zb(t){let e=()=>{Hb(t)},n=Bb++;t._inner=t._inner.fork({name:"angular",properties:{[Tf]:!0,[rl]:n,[rl+n]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(Wb(l))return i.invokeTask(o,s,a,l);try{return sm(t),i.invokeTask(o,s,a,l)}finally{(t.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&e(),am(t)}},onInvoke:(i,r,o,s,a,l,c)=>{try{return sm(t),i.invoke(o,s,a,l,c)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!Gb(l)&&e(),am(t)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(t._hasPendingMicrotasks=s.microTask,Rd(t),Mf(t)):s.change=="macroTask"&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(i,r,o,s)=>(i.handleError(o,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}function Rd(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function sm(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function am(t){t._nesting--,Mf(t)}var ol=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new ie;onMicrotaskEmpty=new ie;onStable=new ie;onError=new ie;run(e,n,i){return e.apply(n,i)}runGuarded(e,n,i){return e.apply(n,i)}runOutsideAngular(e){return e()}runTask(e,n,i,r){return e.apply(n,i)}};function Wb(t){return $v(t,"__ignore_ng_zone__")}function Gb(t){return $v(t,"__scheduler_tick__")}function $v(t,e){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[e]===!0}function qb(t="zone.js",e){return t==="noop"?new ol:t==="zone.js"?new Te(e):t}var Wn=class{_console=console;handleError(e){this._console.error("ERROR",e)}},Qb=new P("",{providedIn:"root",factory:()=>{let t=b(Te),e=b(Wn);return n=>t.runOutsideAngular(()=>e.handleError(n))}});function lm(t,e){return Pm(t,e)}function Yb(t){return Pm(Om,t)}var Hv=(lm.required=Yb,lm);function Zb(){return Gr(pt(),G())}function Gr(t,e){return new ae(dn(t,e))}var ae=(()=>{class t{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=Zb}return t})();function Xb(t){return t instanceof ae?t.nativeElement:t}var cm=new Set;function vi(t){cm.has(t)||(cm.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}function Kb(t){return typeof t=="function"&&t[Ft]!==void 0}function kl(t,e){vi("NgSignals");let n=yg(t),i=n[Ft];return e?.equal&&(i.equal=e.equal),n.set=r=>aa(i,r),n.update=r=>_g(i,r),n.asReadonly=Jb.bind(n),n}function Jb(){let t=this[Ft];if(t.readonlyFn===void 0){let e=()=>this();e[Ft]=t,t.readonlyFn=e}return t.readonlyFn}function zv(t){return Kb(t)&&typeof t.set=="function"}function eE(){return this._results[Symbol.iterator]()}var Ad=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new H}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,n){return this._results.reduce(e,n)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,n){this.dirty=!1;let i=ND(e);(this._changesDetected=!AD(this._results,i,n))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=eE};function Wv(t){return(t.flags&128)===128}var Gv=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}(Gv||{}),qv=new Map,tE=0;function nE(){return tE++}function iE(t){qv.set(t[Il],t)}function Nd(t){qv.delete(t[Il])}var um="__ngContext__";function Ji(t,e){hi(e)?(t[um]=e[Il],iE(e)):t[um]=e}function Qv(t){return Zv(t[zo])}function Yv(t){return Zv(t[ln])}function Zv(t){for(;t!==null&&!qn(t);)t=t[ln];return t}var kd;function Xv(t){kd=t}function rE(){if(kd!==void 0)return kd;if(typeof document<"u")return document;throw new F(210,!1)}var xf=new P("",{providedIn:"root",factory:()=>oE}),oE="ng",Rf=new P(""),er=new P("",{providedIn:"platform",factory:()=>"unknown"});var Af=new P("",{providedIn:"root",factory:()=>rE().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var sE="h",aE="b";var Kv=!1,lE=new P("",{providedIn:"root",factory:()=>Kv});var Nf=function(t){return t[t.CHANGE_DETECTION=0]="CHANGE_DETECTION",t[t.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",t}(Nf||{}),qr=new P("");var Tr=function(t){return t[t.EarlyRead=0]="EarlyRead",t[t.Write=1]="Write",t[t.MixedReadWrite=2]="MixedReadWrite",t[t.Read=3]="Read",t}(Tr||{}),Jv=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=R({token:t,providedIn:"root",factory:()=>new t})}return t})(),cE=[Tr.EarlyRead,Tr.Write,Tr.MixedReadWrite,Tr.Read],uE=(()=>{class t{ngZone=b(Te);scheduler=b(Vr);errorHandler=b(Wn,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){b(qr,{optional:!0})}execute(){this.executing=!0;for(let n of cE)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[n]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>i.hooks[n](i.pipelinedValue),i.snapshot))}catch(r){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(r)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(8),this.deferredRegistrations.clear()}register(n){this.executing?this.deferredRegistrations.add(n):(this.sequences.add(n),this.scheduler.notify(7))}unregister(n){this.executing&&this.sequences.has(n)?(n.erroredOrDestroyed=!0,n.pipelinedValue=void 0,n.once=!0):(this.sequences.delete(n),this.deferredRegistrations.delete(n))}maybeTrace(n,i){return i?i.run(Nf.AFTER_NEXT_RENDER,n):n()}static \u0275prov=R({token:t,providedIn:"root",factory:()=>new t})}return t})(),Od=class{impl;hooks;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,n,i,r,o=null){this.impl=e,this.hooks=n,this.once=i,this.snapshot=o,this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.()}};function kf(t,e){!e?.injector&&QD(kf);let n=e?.injector??b(Oe);return vi("NgAfterNextRender"),fE(t,n,e,!0)}function dE(t,e){if(t instanceof Function){let n=[void 0,void 0,void 0,void 0];return n[e]=t,n}else return[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function fE(t,e,n,i){let r=e.get(Jv);r.impl??=e.get(uE);let o=e.get(qr,null,{optional:!0}),s=n?.phase??Tr.MixedReadWrite,a=n?.manualCleanup!==!0?e.get(ns):null,l=new Od(r.impl,dE(t,s),i,a,o?.snapshot(null));return r.impl.register(l),l}var hE=()=>null;function e0(t,e,n=!1){return hE(t,e,n)}function t0(t,e){let n=t.contentQueries;if(n!==null){let i=re(null);try{for(let r=0;r<n.length;r+=2){let o=n[r],s=n[r+1];if(s!==-1){let a=t.data[s];wf(o),a.contentQueries(2,e[s],s)}}}finally{re(i)}}}function Pd(t,e,n){wf(0);let i=re(null);try{e(t,n)}finally{re(i)}}function Of(t,e,n){if(hf(e)){let i=re(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;s<o;s++){let a=t.data[s];if(a.contentQueries){let l=n[s];a.contentQueries(1,l,s)}}}finally{re(i)}}}var In=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}(In||{});var Fa;function pE(){if(Fa===void 0&&(Fa=null,ft.trustedTypes))try{Fa=ft.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Fa}function dm(t){return pE()?.createScriptURL(t)||t}var sl=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${km})`}};function is(t){return t instanceof sl?t.changingThisBreaksApplicationSecurity:t}function Pf(t,e){let n=gE(t);if(n!=null&&n!==e){if(n==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${n} (see ${km})`)}return n===e}function gE(t){return t instanceof sl&&t.getTypeName()||null}var mE=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function n0(t){return t=String(t),t.match(mE)?t:"unsafe:"+t}var Ol=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(Ol||{});function Pl(t){let e=r0();return e?e.sanitize(Ol.URL,t)||"":Pf(t,"URL")?is(t):n0(Ar(t))}function vE(t){let e=r0();if(e)return dm(e.sanitize(Ol.RESOURCE_URL,t)||"");if(Pf(t,"ResourceURL"))return dm(is(t));throw new F(904,!1)}function yE(t,e){return e==="src"&&(t==="embed"||t==="frame"||t==="iframe"||t==="media"||t==="script")||e==="href"&&(t==="base"||t==="link")?vE:Pl}function i0(t,e,n){return yE(e,n)(t)}function r0(){let t=G();return t&&t[$n].sanitizer}var _E=/^>|^->|<!--|-->|--!>|<!-$/g,wE=/(<|>)/g,CE="\u200B$1\u200B";function DE(t){return t.replace(_E,e=>e.replace(wE,CE))}function o0(t){return t.ownerDocument}function s0(t){return t instanceof Function?t():t}function bE(t,e,n){let i=t.length;for(;;){let r=t.indexOf(e,n);if(r===-1)return r;if(r===0||t.charCodeAt(r-1)<=32){let o=e.length;if(r+o===i||t.charCodeAt(r+o)<=32)return r}n=r+1}}var a0="ng-template";function EE(t,e,n,i){let r=0;if(i){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&bE(e[r+1].toLowerCase(),n,0)!==-1)return!0}else if(Ff(t))return!1;if(r=e.indexOf(1,r),r>-1){let o;for(;++r<e.length&&typeof(o=e[r])=="string";)if(o.toLowerCase()===n)return!0}return!1}function Ff(t){return t.type===4&&t.value!==a0}function SE(t,e,n){let i=t.type===4&&!n?a0:t.value;return e===i}function IE(t,e,n){let i=4,r=t.attrs,o=r!==null?xE(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!an(i)&&!an(l))return!1;if(s&&an(l))continue;s=!1,i=l|i&1;continue}if(!s)if(i&4){if(i=2|i&1,l!==""&&!SE(t,l,n)||l===""&&e.length===1){if(an(i))return!1;s=!0}}else if(i&8){if(r===null||!EE(t,r,l,n)){if(an(i))return!1;s=!0}}else{let c=e[++a],u=TE(l,r,Ff(t),n);if(u===-1){if(an(i))return!1;s=!0;continue}if(c!==""){let d;if(u>o?d="":d=r[u+1].toLowerCase(),i&2&&c!==d){if(an(i))return!1;s=!0}}}}return an(i)||s}function an(t){return(t&1)===0}function TE(t,e,n,i){if(e===null)return-1;let r=0;if(i||!n){let o=!1;for(;r<e.length;){let s=e[r];if(s===t)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=e[++r];for(;typeof a=="string";)a=e[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return RE(e,t)}function l0(t,e,n=!1){for(let i=0;i<e.length;i++)if(IE(t,e[i],n))return!0;return!1}function ME(t){let e=t.attrs;if(e!=null){let n=e.indexOf(5);if(!(n&1))return e[n+1]}return null}function xE(t){for(let e=0;e<t.length;e++){let n=t[e];if(Tv(n))return e}return t.length}function RE(t,e){let n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){let i=t[n];if(typeof i=="number")return-1;if(i===e)return n;n++}return-1}function AE(t,e){e:for(let n=0;n<e.length;n++){let i=e[n];if(t.length===i.length){for(let r=0;r<t.length;r++)if(t[r]!==i[r])continue e;return!0}}return!1}function fm(t,e){return t?":not("+e.trim()+")":e}function NE(t){let e=t[0],n=1,i=2,r="",o=!1;for(;n<t.length;){let s=t[n];if(typeof s=="string")if(i&2){let a=t[++n];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else i&8?r+="."+s:i&4&&(r+=" "+s);else r!==""&&!an(s)&&(e+=fm(o,r),r=""),i=s,o=o||!an(i);n++}return r!==""&&(e+=fm(o,r)),e}function kE(t){return t.map(NE).join(",")}function OE(t){let e=[],n=[],i=1,r=2;for(;i<t.length;){let o=t[i];if(typeof o=="string")r===2?o!==""&&e.push(o,t[++i]):r===8&&n.push(o);else{if(!an(r))break;r=o}i++}return n.length&&e.push(1,...n),e}var Xt={};function PE(t,e){return t.createText(e)}function FE(t,e,n){t.setValue(e,n)}function LE(t,e){return t.createComment(DE(e))}function c0(t,e,n){return t.createElement(e,n)}function al(t,e,n,i,r){t.insertBefore(e,n,i,r)}function u0(t,e,n){t.appendChild(e,n)}function hm(t,e,n,i,r){i!==null?al(t,e,n,i,r):u0(t,e,n)}function VE(t,e,n){t.removeChild(null,e,n)}function jE(t,e,n){t.setAttribute(e,"style",n)}function UE(t,e,n){n===""?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n)}function d0(t,e,n){let{mergedAttrs:i,classes:r,styles:o}=n;i!==null&&Mb(t,e,i),r!==null&&UE(t,e,r),o!==null&&jE(t,e,o)}function w(t=1){f0(Re(),G(),Ki()+t,!1)}function f0(t,e,n,i){if(!i)if((e[q]&3)===3){let o=t.preOrderCheckHooks;o!==null&&Ba(e,o,n)}else{let o=t.preOrderHooks;o!==null&&$a(e,o,0,n)}zi(n)}var gi=function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t}(gi||{});function h0(t,e,n,i,r,o){let s=re(null);try{let a=null;r&gi.SignalBased&&(a=e[i][Ft]),a!==null&&a.transformFn!==void 0&&(o=a.transformFn(o)),r&gi.HasDecoratorInputTransform&&(o=t.inputTransforms[i].call(e,o)),t.setInput!==null?t.setInput(e,a,o,n,i):sv(e,a,i,o)}finally{re(s)}}function Lf(t,e,n,i,r,o,s,a,l,c,u){let d=e.blueprint.slice();return d[Gn]=r,d[q]=i|4|128|8|64|1024,(c!==null||t&&t[q]&2048)&&(d[q]|=2048),dv(d),d[at]=d[zr]=t,d[tt]=n,d[$n]=s||t&&t[$n],d[xe]=a||t&&t[xe],d[Ho]=l||t&&t[Ho]||null,d[Tt]=o,d[Il]=nE(),d[Pr]=u,d[rv]=c,d[jt]=e.type==2?t[jt]:d,d}function p0(t,e,n,i,r){let o=Ki(),s=i&2;try{zi(-1),s&&e.length>He&&f0(t,e,He,!1),Qt(s?2:0,r),n(i,r)}finally{zi(o),Qt(s?3:1,r)}}function Vf(t,e,n){Rl()&&(Ji(dn(n,e),e),g0(t,e,n))}function g0(t,e,n){QE(t,e,n),(n.flags&64)===64&&YE(t,e,n)}function jf(t,e,n=dn){let i=e.localNames;if(i!==null){let r=e.index+1;for(let o=0;o<i.length;o+=2){let s=i[o+1],a=s===-1?n(e,t):t[s];t[r++]=a}}}function BE(t){let e=t.tView;return e===null||e.incompleteFirstPass?t.tView=Uf(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts,t.id):e}function Uf(t,e,n,i,r,o,s,a,l,c,u){let d=He+i,f=d+r,p=$E(d,f),h=typeof c=="function"?c():c;return p[J]={type:t,blueprint:p,template:n,queries:null,viewQuery:a,declTNode:e,data:p.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:h,incompleteFirstPass:!1,ssrId:u}}function $E(t,e){let n=[];for(let i=0;i<e;i++)n.push(i<t?null:Xt);return n}function HE(t,e,n,i){let o=i.get(lE,Kv)||n===In.ShadowDom,s=t.selectRootElement(e,o);return zE(s),s}function zE(t){WE(t)}var WE=()=>null;function GE(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function Fl(t,e,n,i,r,o,s,a){let l=dn(e,n),c=e.inputs,u;!a&&c!=null&&(u=c[i])?(Hf(t,n,u,i,r),Yi(e)&&qE(n,e.index)):e.type&3?(i=GE(i),r=s!=null?s(r,e.value||"",i):r,o.setProperty(l,i,r)):e.type&12}function qE(t,e){let n=Sn(e,t);n[q]&16||(n[q]|=64)}function QE(t,e,n){let i=n.directiveStart,r=n.directiveEnd;Yi(n)&&XE(e,n,t.data[i+n.componentOffset]),t.firstCreatePass||nl(n,e);let o=n.initialInputs;for(let s=i;s<r;s++){let a=t.data[s],l=Wo(e,t,s,n);if(Ji(l,e),o!==null&&eS(e,s-i,l,a,n,o),zn(a)){let c=Sn(n.index,e);c[tt]=Wo(e,t,s,n)}}}function YE(t,e,n){let i=n.directiveStart,r=n.directiveEnd,o=n.index,s=yb();try{zi(o);for(let a=i;a<r;a++){let l=t.data[a],c=e[a];bd(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&ZE(l,c)}}finally{zi(-1),bd(s)}}function ZE(t,e){t.hostBindings!==null&&t.hostBindings(1,e)}function Bf(t,e){let n=t.directiveRegistry,i=null;if(n)for(let r=0;r<n.length;r++){let o=n[r];l0(e,o.selectors,!1)&&(i??=[],zn(o)?i.unshift(o):i.push(o))}return i}function m0(t){let e=16;return t.signals?e=4096:t.onPush&&(e=64),e}function XE(t,e,n){let i=dn(e,t),r=BE(n),o=t[$n].rendererFactory,s=$f(t,Lf(t,r,null,m0(n),i,e,null,o.createRenderer(i,n),null,null,null));return t[e.index]=s}function KE(t,e,n,i,r,o){let s=dn(t,e);JE(e[xe],s,o,t.value,n,i,r)}function JE(t,e,n,i,r,o,s){if(o==null)t.removeAttribute(e,r,n);else{let a=s==null?Ar(o):s(o,i||"",r);t.setAttribute(e,r,a,n)}}function eS(t,e,n,i,r,o){let s=o[e];if(s!==null)for(let a=0;a<s.length;){let l=s[a++],c=s[a++],u=s[a++],d=s[a++];h0(i,n,l,c,u,d)}}function v0(t,e,n,i){return[t,!0,0,e,null,i,null,n,null,null]}function $f(t,e){return t[zo]?t[Xg][ln]=e:t[zo]=e,t[Xg]=e,e}function y0(t,e){let n=t[Ho],i=n?n.get(Wn,null):null;i&&i.handleError(e)}function Hf(t,e,n,i,r){for(let o=0;o<n.length;){let s=n[o++],a=n[o++],l=n[o++],c=e[s],u=t.data[s];h0(u,c,i,a,l,r)}}function tS(t,e){let n=Sn(e,t),i=n[J];nS(i,n);let r=n[Gn];r!==null&&n[Pr]===null&&(n[Pr]=e0(r,n[Ho])),zf(i,n,n[tt])}function nS(t,e){for(let n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])}function zf(t,e,n){Cf(e);try{let i=t.viewQuery;i!==null&&Pd(1,i,n);let r=t.template;r!==null&&p0(t,e,r,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),e[Hn]?.finishViewCreation(t),t.staticContentQueries&&t0(t,e),t.staticViewQueries&&Pd(2,t.viewQuery,n);let o=t.components;o!==null&&iS(e,o)}catch(i){throw t.firstCreatePass&&(t.incompleteFirstPass=!0,t.firstCreatePass=!1),i}finally{e[q]&=-5,Df()}}function iS(t,e){for(let n=0;n<e.length;n++)tS(t,e[n])}var Tn=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}(Tn||{}),rS;function Wf(t,e){return rS(t,e)}function Gf(t){return(t.flags&32)===32}function Mr(t,e,n,i,r){if(i!=null){let o,s=!1;qn(i)?o=i:hi(i)&&(s=!0,i=i[Gn]);let a=En(i);t===0&&n!==null?r==null?u0(e,n,a):al(e,n,a,r||null,!0):t===1&&n!==null?al(e,n,a,r||null,!0):t===2?VE(e,a,s):t===3&&e.destroyNode(a),o!=null&&gS(e,t,o,n,r)}}function oS(t,e){_0(t,e),e[Gn]=null,e[Tt]=null}function sS(t,e,n,i,r,o){i[Gn]=r,i[Tt]=e,jl(t,i,n,1,r,o)}function _0(t,e){e[$n].changeDetectionScheduler?.notify(10),jl(t,e,e[xe],2,null,null)}function aS(t){let e=t[zo];if(!e)return sd(t[J],t);for(;e;){let n=null;if(hi(e))n=e[zo];else{let i=e[st];i&&(n=i)}if(!n){for(;e&&!e[ln]&&e!==t;)hi(e)&&sd(e[J],e),e=e[at];e===null&&(e=t),hi(e)&&sd(e[J],e),n=e&&e[ln]}e=n}}function lS(t,e,n,i){let r=st+i,o=n.length;i>0&&(n[r-1][ln]=e),i<o-st?(e[ln]=n[r],Gm(n,st+i,e)):(n.push(e),e[ln]=null),e[at]=n;let s=e[Bi];s!==null&&n!==s&&w0(s,e);let a=e[Hn];a!==null&&a.insertView(t),Cd(e),e[q]|=128}function w0(t,e){let n=t[Fr],i=e[at];if(hi(i))t[q]|=2;else{let r=i[at][jt];e[jt]!==r&&(t[q]|=2)}n===null?t[Fr]=[e]:n.push(e)}function qf(t,e){let n=t[Fr],i=n.indexOf(e);n.splice(i,1)}function Go(t,e){if(t.length<=st)return;let n=st+e,i=t[n];if(i){let r=i[Bi];r!==null&&r!==t&&qf(r,i),e>0&&(t[n-1][ln]=i[ln]);let o=qa(t,st+e);oS(i[J],i);let s=o[Hn];s!==null&&s.detachView(o[J]),i[at]=null,i[ln]=null,i[q]&=-129}return i}function Ll(t,e){if(es(e))return;let n=e[xe];n.destroyNode&&jl(t,e,n,3,null,null),aS(e)}function sd(t,e){if(es(e))return;let n=re(null);try{e[q]&=-129,e[q]|=256,e[Vt]&&Fu(e[Vt]),uS(t,e),cS(t,e),e[J].type===1&&e[xe].destroy();let i=e[Bi];if(i!==null&&qn(e[at])){i!==e[at]&&qf(i,e);let r=e[Hn];r!==null&&r.detachView(t)}Nd(e)}finally{re(n)}}function cS(t,e){let n=t.cleanup,i=e[Ya];if(n!==null)for(let s=0;s<n.length-1;s+=2)if(typeof n[s]=="string"){let a=n[s+3];a>=0?i[a]():i[-a].unsubscribe(),s+=2}else{let a=i[n[s+1]];n[s].call(a)}i!==null&&(e[Ya]=null);let r=e[fi];if(r!==null){e[fi]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=e[Za];if(o!==null){e[Za]=null;for(let s of o)s.destroy()}}function uS(t,e){let n;if(t!=null&&(n=t.destroyHooks)!=null)for(let i=0;i<n.length;i+=2){let r=e[n[i]];if(!(r instanceof Wi)){let o=n[i+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];Qt(4,a,l);try{l.call(a)}finally{Qt(5,a,l)}}else{Qt(4,r,o);try{o.call(r)}finally{Qt(5,r,o)}}}}}function C0(t,e,n){return dS(t,e.parent,n)}function dS(t,e,n){let i=e;for(;i!==null&&i.type&168;)e=i,i=e.parent;if(i===null)return n[Gn];if(Yi(i)){let{encapsulation:r}=t.data[i.directiveStart+i.componentOffset];if(r===In.None||r===In.Emulated)return null}return dn(i,n)}function D0(t,e,n){return hS(t,e,n)}function fS(t,e,n){return t.type&40?dn(t,n):null}var hS=fS,pm;function Vl(t,e,n,i){let r=C0(t,i,e),o=e[xe],s=i.parent||e[Tt],a=D0(s,i,e);if(r!=null)if(Array.isArray(n))for(let l=0;l<n.length;l++)hm(o,r,n[l],a,!1);else hm(o,r,n,a,!1);pm!==void 0&&pm(o,i,e,n,r)}function Vo(t,e){if(e!==null){let n=e.type;if(n&3)return dn(e,t);if(n&4)return Fd(-1,t[e.index]);if(n&8){let i=e.child;if(i!==null)return Vo(t,i);{let r=t[e.index];return qn(r)?Fd(-1,r):En(r)}}else{if(n&128)return Vo(t,e.next);if(n&32)return Wf(e,t)()||En(t[e.index]);{let i=b0(t,e);if(i!==null){if(Array.isArray(i))return i[0];let r=Hi(t[jt]);return Vo(r,i)}else return Vo(t,e.next)}}}return null}function b0(t,e){if(e!==null){let i=t[jt][Tt],r=e.projection;return i.projection[r]}return null}function Fd(t,e){let n=st+t+1;if(n<e.length){let i=e[n],r=i[J].firstChild;if(r!==null)return Vo(i,r)}return e[$i]}function Qf(t,e,n,i,r,o,s){for(;n!=null;){if(n.type===128){n=n.next;continue}let a=i[n.index],l=n.type;if(s&&e===0&&(a&&Ji(En(a),i),n.flags|=2),!Gf(n))if(l&8)Qf(t,e,n.child,i,r,o,!1),Mr(e,t,r,a,o);else if(l&32){let c=Wf(n,i),u;for(;u=c();)Mr(e,t,r,u,o);Mr(e,t,r,a,o)}else l&16?E0(t,e,i,n,r,o):Mr(e,t,r,a,o);n=s?n.projectionNext:n.next}}function jl(t,e,n,i,r,o){Qf(n,i,t.firstChild,e,r,o,!1)}function pS(t,e,n){let i=e[xe],r=C0(t,n,e),o=n.parent||e[Tt],s=D0(o,n,e);E0(i,0,e,n,r,s)}function E0(t,e,n,i,r,o){let s=n[jt],l=s[Tt].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let u=l[c];Mr(e,t,r,u,o)}else{let c=l,u=s[at];Wv(i)&&(c.flags|=128),Qf(t,e,c,u,r,o,!0)}}function gS(t,e,n,i,r){let o=n[$i],s=En(n);o!==s&&Mr(e,t,i,o,r);for(let a=st;a<n.length;a++){let l=n[a];jl(l[J],l,t,e,i,o)}}function mS(t,e,n,i,r){if(e)r?t.addClass(n,i):t.removeClass(n,i);else{let o=i.indexOf("-")===-1?void 0:Tn.DashCase;r==null?t.removeStyle(n,i,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=Tn.Important),t.setStyle(n,i,r,o))}}function rs(t,e,n,i){let r=re(null);try{let o=e.tView,a=t[q]&4096?4096:16,l=Lf(t,o,n,a,null,e,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null),c=t[e.index];l[Bi]=c;let u=t[Hn];return u!==null&&(l[Hn]=u.createEmbeddedView(o)),zf(o,l,n),l}finally{re(r)}}function S0(t,e){let n=st+e;if(n<t.length)return t[n]}function jr(t,e){return!e||e.firstChild===null||Wv(t)}function os(t,e,n,i=!0){let r=e[J];if(lS(r,e,t,n),i){let s=Fd(n,t),a=e[xe],l=a.parentNode(t[$i]);l!==null&&sS(r,t[Tt],a,e,l,s)}let o=e[Pr];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function I0(t,e){let n=Go(t,e);return n!==void 0&&Ll(n[J],n),n}function ll(t,e,n,i,r=!1){for(;n!==null;){if(n.type===128){n=r?n.projectionNext:n.next;continue}let o=e[n.index];o!==null&&i.push(En(o)),qn(o)&&vS(o,i);let s=n.type;if(s&8)ll(t,e,n.child,i);else if(s&32){let a=Wf(n,e),l;for(;l=a();)i.push(l)}else if(s&16){let a=b0(e,n);if(Array.isArray(a))i.push(...a);else{let l=Hi(e[jt]);ll(l[J],l,a,i,!0)}}n=r?n.projectionNext:n.next}return i}function vS(t,e){for(let n=st;n<t.length;n++){let i=t[n],r=i[J].firstChild;r!==null&&ll(i[J],i,r,e)}t[$i]!==t[Gn]&&e.push(t[$i])}var T0=[];function yS(t){return t[Vt]??_S(t)}function _S(t){let e=T0.pop()??Object.create(CS);return e.lView=t,e}function wS(t){t.lView[Vt]!==t&&(t.lView=null,T0.push(t))}var CS=le(x({},Ao),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{xl(t.lView)},consumerOnSignalRead(){this.lView[Vt]=this}});function DS(t){let e=t[Vt]??Object.create(bS);return e.lView=t,e}var bS=le(x({},Ao),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let e=Hi(t.lView);for(;e&&!M0(e[J]);)e=Hi(e);e&&vf(e)},consumerOnSignalRead(){this.lView[Vt]=this}});function M0(t){return t.type!==2}function x0(t){if(t[Za]===null)return;let e=!0;for(;e;){let n=!1;for(let i of t[Za])i.dirty&&(n=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));e=n&&!!(t[q]&8192)}}var ES=100;function R0(t,e=!0,n=0){let r=t[$n].rendererFactory,o=!1;o||r.begin?.();try{SS(t,n)}catch(s){throw e&&y0(t,s),s}finally{o||r.end?.()}}function SS(t,e){let n=vv();try{Jg(!0),Ld(t,e);let i=0;for(;Ml(t);){if(i===ES)throw new F(103,!1);i++,Ld(t,1)}}finally{Jg(n)}}function IS(t,e,n,i){if(es(e))return;let r=e[q],o=!1,s=!1;Cf(e);let a=!0,l=null,c=null;o||(M0(t)?(c=yS(e),l=ra(c)):ag()===null?(a=!1,c=DS(e),l=ra(c)):e[Vt]&&(Fu(e[Vt]),e[Vt]=null));try{dv(e),gb(t.bindingStartIndex),n!==null&&p0(t,e,n,2,i);let u=(r&3)===3;if(!o)if(u){let p=t.preOrderCheckHooks;p!==null&&Ba(e,p,null)}else{let p=t.preOrderHooks;p!==null&&$a(e,p,0,null),id(e,0)}if(s||TS(e),x0(e),A0(e,0),t.contentQueries!==null&&t0(t,e),!o)if(u){let p=t.contentCheckHooks;p!==null&&Ba(e,p)}else{let p=t.contentHooks;p!==null&&$a(e,p,1),id(e,1)}xS(t,e);let d=t.components;d!==null&&k0(e,d,0);let f=t.viewQuery;if(f!==null&&Pd(2,f,i),!o)if(u){let p=t.viewCheckHooks;p!==null&&Ba(e,p)}else{let p=t.viewHooks;p!==null&&$a(e,p,2),id(e,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),e[nd]){for(let p of e[nd])p();e[nd]=null}o||(e[q]&=-73)}catch(u){throw o||xl(e),u}finally{c!==null&&(Ou(c,l),a&&wS(c)),Df()}}function A0(t,e){for(let n=Qv(t);n!==null;n=Yv(n))for(let i=st;i<n.length;i++){let r=n[i];N0(r,e)}}function TS(t){for(let e=Qv(t);e!==null;e=Yv(e)){if(!(e[q]&2))continue;let n=e[Fr];for(let i=0;i<n.length;i++){let r=n[i];vf(r)}}}function MS(t,e,n){let i=Sn(e,t);N0(i,n)}function N0(t,e){mf(t)&&Ld(t,e)}function Ld(t,e){let i=t[J],r=t[q],o=t[Vt],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&Pu(o)),s||=!1,o&&(o.dirty=!1),t[q]&=-9217,s)IS(i,t,i.template,t[tt]);else if(r&8192){x0(t),A0(t,1);let a=i.components;a!==null&&k0(t,a,1)}}function k0(t,e,n){for(let i=0;i<e.length;i++)MS(t,e[i],n)}function xS(t,e){let n=t.hostBindingOpCodes;if(n!==null)try{for(let i=0;i<n.length;i++){let r=n[i];if(r<0)zi(~r);else{let o=r,s=n[++i],a=n[++i];vb(s,o);let l=e[o];Qt(24,l),a(2,l),Qt(25,l)}}}finally{zi(-1)}}function Yf(t,e){let n=vv()?64:1088;for(t[$n].changeDetectionScheduler?.notify(e);t;){t[q]|=n;let i=Hi(t);if(Ka(t)&&!i)return t;t=i}return null}var Gi=class{_lView;_cdRefInjectingView;notifyErrorHandler;_appRef=null;_attachedToViewContainer=!1;get rootNodes(){let e=this._lView,n=e[J];return ll(n,e,n.firstChild,[])}constructor(e,n,i=!0){this._lView=e,this._cdRefInjectingView=n,this.notifyErrorHandler=i}get context(){return this._lView[tt]}get dirty(){return!!(this._lView[q]&9280)||!!this._lView[Vt]?.dirty}set context(e){this._lView[tt]=e}get destroyed(){return es(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[at];if(qn(e)){let n=e[Xa],i=n?n.indexOf(this):-1;i>-1&&(Go(e,i),qa(n,i))}this._attachedToViewContainer=!1}Ll(this._lView[J],this._lView)}onDestroy(e){fv(this._lView,e)}markForCheck(){Yf(this._cdRefInjectingView||this._lView,4)}markForRefresh(){vf(this._cdRefInjectingView||this._lView)}detach(){this._lView[q]&=-129}reattach(){Cd(this._lView),this._lView[q]|=128}detectChanges(){this._lView[q]|=1024,R0(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new F(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Ka(this._lView),n=this._lView[Bi];n!==null&&!e&&qf(n,this._lView),_0(this._lView[J],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new F(902,!1);this._appRef=e;let n=Ka(this._lView),i=this._lView[Bi];i!==null&&!n&&w0(i,this._lView),Cd(this._lView)}},qo=(()=>{class t{static __NG_ELEMENT_ID__=NS}return t})(),RS=qo,AS=class extends RS{_declarationLView;_declarationTContainer;elementRef;constructor(e,n,i){super(),this._declarationLView=e,this._declarationTContainer=n,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,n){return this.createEmbeddedViewImpl(e,n)}createEmbeddedViewImpl(e,n,i){let r=rs(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:n,dehydratedView:i});return new Gi(r)}};function NS(){return Ul(pt(),G())}function Ul(t,e){return t.type&4?new AS(e,t,Gr(t,e)):null}function ss(t,e,n,i,r){let o=t.data[e];if(o===null)o=kS(t,e,n,i,r),mb()&&(o.flags|=32);else if(o.type&64){o.type=n,o.value=i,o.attrs=r;let s=fb();o.injectorIndex=s===null?-1:s.injectorIndex}return Zi(o,!0),o}function kS(t,e,n,i,r){let o=mv(),s=yf(),a=s?o:o&&o.parent,l=t.data[e]=PS(t,a,n,e,i,r);return OS(t,l,o,s),l}function OS(t,e,n,i){t.firstChild===null&&(t.firstChild=e),n!==null&&(i?n.child==null&&e.parent!==null&&(n.child=e):n.next===null&&(n.next=e,e.prev=n))}function PS(t,e,n,i,r,o){let s=e?e.injectorIndex:-1,a=0;return gv()&&(a|=128),{type:n,index:i,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var FV=new RegExp(`^(\\d+)*(${aE}|${sE})*(.*)`);var FS=()=>null;function Ur(t,e){return FS(t,e)}var Vd=class{},cl=class{},jd=class{resolveComponentFactory(e){throw Error(`No component factory found for ${St(e)}.`)}},Br=class{static NULL=new jd},$r=class{},lt=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>LS()}return t})();function LS(){let t=G(),e=pt(),n=Sn(e.index,t);return(hi(n)?n:t)[xe]}var VS=(()=>{class t{static \u0275prov=R({token:t,providedIn:"root",factory:()=>null})}return t})();function Ud(t,e,n){let i=n?t.styles:null,r=n?t.classes:null,o=0;if(e!==null)for(let s=0;s<e.length;s++){let a=e[s];if(typeof a=="number")o=a;else if(o==1)r=Wg(r,a);else if(o==2){let l=a,c=e[++s];i=Wg(i,l+": "+c+";")}}n?t.styles=i:t.stylesWithoutHost=i,n?t.classes=r:t.classesWithoutHost=r}function D(t,e=ne.Default){let n=G();if(n===null)return O(t,e);let i=pt();return Ov(i,n,ht(t),e)}function O0(){let t="invalid";throw new Error(t)}function P0(t,e,n,i){if(n===0)return-1;let r=e.length;for(let o=0;o<n;o++)e.push(i),t.blueprint.push(i),t.data.push(null);return r}function Zf(t,e,n,i,r){let o=i===null?null:{"":-1},s=r(t,n);if(s!==null){let[a,l]=US(t,n,s);$S(t,e,n,a,o,l)}o!==null&&i!==null&&jS(n,i,o)}function jS(t,e,n){let i=t.localNames=[];for(let r=0;r<e.length;r+=2){let o=n[e[r+1]];if(o==null)throw new F(-301,!1);i.push(e[r],o)}}function US(t,e,n){let i=[],r=null;for(let o of n)o.findHostDirectiveDefs!==null&&(r??=new Map,o.findHostDirectiveDefs(o,i,r)),zn(o)&&(i.push(o),BS(t,e,i.length-1));return Yi(e)?i.push(...n.slice(1)):i.push(...n),[i,r]}function BS(t,e,n){e.componentOffset=n,(t.components??=[]).push(e.index)}function $S(t,e,n,i,r,o){for(let c=0;c<i.length;c++)Id(nl(n,e),t,i[c].type);YS(n,t.data.length,i.length);for(let c=0;c<i.length;c++){let u=i[c];u.providersResolver&&u.providersResolver(u)}let s=!1,a=!1,l=P0(t,e,i.length,null);for(let c=0;c<i.length;c++){let u=i[c];n.mergedAttrs=Lr(n.mergedAttrs,u.hostAttrs),WS(t,n,e,l,u),QS(l,u,r),u.contentQueries!==null&&(n.flags|=4),(u.hostBindings!==null||u.hostAttrs!==null||u.hostVars!==0)&&(n.flags|=64);let d=u.type.prototype;!s&&(d.ngOnChanges||d.ngOnInit||d.ngDoCheck)&&((t.preOrderHooks??=[]).push(n.index),s=!0),!a&&(d.ngOnChanges||d.ngDoCheck)&&((t.preOrderCheckHooks??=[]).push(n.index),a=!0),l++}HS(t,n,o)}function HS(t,e,n){let i=e.directiveStart,r=e.directiveEnd,o=t.data,s=e.attrs,a=[],l=null,c=null;for(let u=i;u<r;u++){let d=o[u],f=n?n.get(d):null,p=f?f.inputs:null,h=f?f.outputs:null;l=gm(0,d.inputs,u,l,p),c=gm(1,d.outputs,u,c,h);let g=l!==null&&s!==null&&!Ff(e)?zS(l,u,s):null;a.push(g)}l!==null&&(l.hasOwnProperty("class")&&(e.flags|=8),l.hasOwnProperty("style")&&(e.flags|=16)),e.initialInputs=a,e.inputs=l,e.outputs=c}function gm(t,e,n,i,r){for(let o in e){if(!e.hasOwnProperty(o))continue;let s=e[o];if(s===void 0)continue;i??={};let a,l=gi.None;Array.isArray(s)?(a=s[0],l=s[1]):a=s;let c=o;if(r!==null){if(!r.hasOwnProperty(o))continue;c=r[o]}t===0?mm(i,n,c,a,l):mm(i,n,c,a)}return i}function mm(t,e,n,i,r){let o;t.hasOwnProperty(n)?(o=t[n]).push(e,i):o=t[n]=[e,i],r!==void 0&&o.push(r)}function zS(t,e,n){let i=null,r=0;for(;r<n.length;){let o=n[r];if(o===0){r+=4;continue}else if(o===5){r+=2;continue}if(typeof o=="number")break;if(t.hasOwnProperty(o)){i===null&&(i=[]);let s=t[o];for(let a=0;a<s.length;a+=3)if(s[a]===e){i.push(o,s[a+1],s[a+2],n[r+1]);break}}r+=2}return i}function WS(t,e,n,i,r){t.data[i]=r;let o=r.factory||(r.factory=Ui(r.type,!0)),s=new Wi(o,zn(r),D);t.blueprint[i]=s,n[i]=s,GS(t,e,i,P0(t,n,r.hostVars,Xt),r)}function GS(t,e,n,i,r){let o=r.hostBindings;if(o){let s=t.hostBindingOpCodes;s===null&&(s=t.hostBindingOpCodes=[]);let a=~e.index;qS(s)!=a&&s.push(a),s.push(n,i,o)}}function qS(t){let e=t.length;for(;e>0;){let n=t[--e];if(typeof n=="number"&&n<0)return n}return 0}function QS(t,e,n){if(n){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)n[e.exportAs[i]]=t;zn(e)&&(n[""]=t)}}function YS(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function F0(t,e,n,i,r,o,s,a){let l=e.consts,c=pi(l,s),u=ss(e,t,2,i,c);return o&&Zf(e,n,u,pi(l,a),r),u.mergedAttrs=Lr(u.mergedAttrs,u.attrs),u.attrs!==null&&Ud(u,u.attrs,!1),u.mergedAttrs!==null&&Ud(u,u.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,u),u}function L0(t,e){bf(t,e),hf(e)&&t.queries.elementEnd(e)}var ul=class extends Br{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let n=Bn(e);return new qi(n,this.ngModule)}};function vm(t,e){let n=[];for(let i in t){if(!t.hasOwnProperty(i))continue;let r=t[i];if(r===void 0)continue;let o=Array.isArray(r),s=o?r[0]:r,a=o?r[1]:gi.None;e?n.push({propName:s,templateName:i,isSignal:(a&gi.SignalBased)!==0}):n.push({propName:s,templateName:i})}return n}function ZS(t,e,n){let i=e instanceof nt?e:e?.injector;return i&&t.getStandaloneInjector!==null&&(i=t.getStandaloneInjector(i)||i),i?new Ed(n,i):n}function XS(t){let e=t.get($r,null);if(e===null)throw new F(407,!1);let n=t.get(VS,null),i=t.get(Vr,null);return{rendererFactory:e,sanitizer:n,changeDetectionScheduler:i}}function KS(t,e){let n=(t.selectors[0][0]||"div").toLowerCase();return c0(e,n,n==="svg"?eb:n==="math"?tb:null)}var qi=class extends cl{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;get inputs(){let e=this.componentDef,n=e.inputTransforms,i=vm(e.inputs,!0);if(n!==null)for(let r of i)n.hasOwnProperty(r.propName)&&(r.transform=n[r.propName]);return i}get outputs(){return vm(this.componentDef.outputs,!1)}constructor(e,n){super(),this.componentDef=e,this.ngModule=n,this.componentType=e.type,this.selector=kE(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!n}create(e,n,i,r){let o=re(null);try{let s=this.componentDef,a=i?["ng-version","19.1.6"]:OE(this.componentDef.selectors[0]),l=Uf(0,null,null,1,0,null,null,null,null,[a],null),c=ZS(s,r||this.ngModule,e),u=XS(c),d=u.rendererFactory.createRenderer(null,s),f=i?HE(d,i,s.encapsulation,c):KS(s,d),p=Lf(null,l,null,512|m0(s),null,null,u,d,c,null,e0(f,c,!0));p[He]=f,Cf(p);let h=null;try{let g=F0(He,l,p,"#host",()=>[this.componentDef],!0,0);f&&(d0(d,f,g),Ji(f,p)),g0(l,p,g),Of(l,g,p),L0(l,g),n!==void 0&&JS(g,this.ngContentSelectors,n),h=Sn(g.index,p),p[tt]=h[tt],zf(l,p,null)}catch(g){throw h!==null&&Nd(h),Nd(p),g}finally{Df()}return new Bd(this.componentType,p)}finally{re(o)}}},Bd=class extends Vd{_rootLView;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,n){super(),this._rootLView=n,this._tNode=pf(n[J],He),this.location=Gr(this._tNode,n),this.instance=Sn(this._tNode.index,n)[tt],this.hostView=this.changeDetectorRef=new Gi(n,void 0,!1),this.componentType=e}setInput(e,n){let i=this._tNode.inputs,r;if(i!==null&&(r=i[e])){if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),n))return;let o=this._rootLView;Hf(o[J],o,r,e,n),this.previousInputValues.set(e,n);let s=Sn(this._tNode.index,o);Yf(s,1)}}get injector(){return new ji(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function JS(t,e,n){let i=t.projection=[];for(let r=0;r<e.length;r++){let o=n[r];i.push(o!=null&&o.length?Array.from(o):null)}}var tr=(()=>{class t{static __NG_ELEMENT_ID__=eI}return t})();function eI(){let t=pt();return j0(t,G())}var tI=tr,V0=class extends tI{_lContainer;_hostTNode;_hostLView;constructor(e,n,i){super(),this._lContainer=e,this._hostTNode=n,this._hostLView=i}get element(){return Gr(this._hostTNode,this._hostLView)}get injector(){return new ji(this._hostTNode,this._hostLView)}get parentInjector(){let e=Ef(this._hostTNode,this._hostLView);if(Mv(e)){let n=el(e,this._hostLView),i=Ja(e),r=n[J].data[i+8];return new ji(r,n)}else return new ji(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let n=ym(this._lContainer);return n!==null&&n[e]||null}get length(){return this._lContainer.length-st}createEmbeddedView(e,n,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=Ur(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(n||{},o,s);return this.insertImpl(a,r,jr(this._hostTNode,s)),a}createComponent(e,n,i,r,o){let s=e&&!ZD(e),a;if(s)a=n;else{let h=n||{};a=h.index,i=h.injector,r=h.projectableNodes,o=h.environmentInjector||h.ngModuleRef}let l=s?e:new qi(Bn(e)),c=i||this.parentInjector;if(!o&&l.ngModule==null){let g=(s?c:this.parentInjector).get(nt,null);g&&(o=g)}let u=Bn(l.componentType??{}),d=Ur(this._lContainer,u?.id??null),f=d?.firstChild??null,p=l.create(c,r,f,o);return this.insertImpl(p.hostView,a,jr(this._hostTNode,d)),p}insert(e,n){return this.insertImpl(e,n,!0)}insertImpl(e,n,i){let r=e._lView;if(ib(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[at],c=new V0(l,l[Tt],l[at]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(n),s=this._lContainer;return os(s,r,o,i),e.attachToViewContainerRef(),Gm(ad(s),o,e),e}move(e,n){return this.insert(e,n)}indexOf(e){let n=ym(this._lContainer);return n!==null?n.indexOf(e):-1}remove(e){let n=this._adjustIndex(e,-1),i=Go(this._lContainer,n);i&&(qa(ad(this._lContainer),n),Ll(i[J],i))}detach(e){let n=this._adjustIndex(e,-1),i=Go(this._lContainer,n);return i&&qa(ad(this._lContainer),n)!=null?new Gi(i):null}_adjustIndex(e,n=0){return e??this.length+n}};function ym(t){return t[Xa]}function ad(t){return t[Xa]||(t[Xa]=[])}function j0(t,e){let n,i=e[t.index];return qn(i)?n=i:(n=v0(i,e,null,t),e[t.index]=n,$f(e,n)),iI(n,e,t,i),new V0(n,t,e)}function nI(t,e){let n=t[xe],i=n.createComment(""),r=dn(e,t),o=n.parentNode(r);return al(n,o,i,n.nextSibling(r),!1),i}var iI=sI,rI=()=>!1;function oI(t,e,n){return rI(t,e,n)}function sI(t,e,n,i){if(t[$i])return;let r;n.type&8?r=En(i):r=nI(e,n),t[$i]=r}var $d=class t{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},Hd=class t{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let n=e.queries;if(n!==null){let i=e.contentQueries!==null?e.contentQueries[0]:n.length,r=[];for(let o=0;o<i;o++){let s=n.getByIndex(o),a=this.queries[s.indexInDeclarationView];r.push(a.clone())}return new t(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let n=0;n<this.queries.length;n++)Xf(e,n).matches!==null&&this.queries[n].setDirty()}},dl=class{flags;read;predicate;constructor(e,n,i=null){this.flags=n,this.read=i,typeof e=="string"?this.predicate=pI(e):this.predicate=e}},zd=class t{queries;constructor(e=[]){this.queries=e}elementStart(e,n){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(e,n)}elementEnd(e){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(e)}embeddedTView(e){let n=null;for(let i=0;i<this.length;i++){let r=n!==null?n.length:0,o=this.getByIndex(i).embeddedTView(e,r);o&&(o.indexInDeclarationView=i,n!==null?n.push(o):n=[o])}return n!==null?new t(n):null}template(e,n){for(let i=0;i<this.queries.length;i++)this.queries[i].template(e,n)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},Wd=class t{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,n=-1){this.metadata=e,this._declarationNodeIndex=n}elementStart(e,n){this.isApplyingToNode(n)&&this.matchTNode(e,n)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,n){this.elementStart(e,n)}embeddedTView(e,n){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,n),new t(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let n=this._declarationNodeIndex,i=e.parent;for(;i!==null&&i.type&8&&i.index!==n;)i=i.parent;return n===(i!==null?i.index:-1)}return this._appliesToNextNode}matchTNode(e,n){let i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){let o=i[r];this.matchTNodeWithReadOption(e,n,aI(n,o)),this.matchTNodeWithReadOption(e,n,Ha(n,e,o,!1,!1))}else i===qo?n.type&4&&this.matchTNodeWithReadOption(e,n,-1):this.matchTNodeWithReadOption(e,n,Ha(n,e,i,!1,!1))}matchTNodeWithReadOption(e,n,i){if(i!==null){let r=this.metadata.read;if(r!==null)if(r===ae||r===tr||r===qo&&n.type&4)this.addMatch(n.index,-2);else{let o=Ha(n,e,r,!1,!1);o!==null&&this.addMatch(n.index,o)}else this.addMatch(n.index,i)}}addMatch(e,n){this.matches===null?this.matches=[e,n]:this.matches.push(e,n)}};function aI(t,e){let n=t.localNames;if(n!==null){for(let i=0;i<n.length;i+=2)if(n[i]===e)return n[i+1]}return null}function lI(t,e){return t.type&11?Gr(t,e):t.type&4?Ul(t,e):null}function cI(t,e,n,i){return n===-1?lI(e,t):n===-2?uI(t,e,i):Wo(t,t[J],n,e)}function uI(t,e,n){if(n===ae)return Gr(e,t);if(n===qo)return Ul(e,t);if(n===tr)return j0(e,t)}function U0(t,e,n,i){let r=e[Hn].queries[i];if(r.matches===null){let o=t.data,s=n.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let c=s[l];if(c<0)a.push(null);else{let u=o[c];a.push(cI(e,u,s[l+1],n.metadata.read))}}r.matches=a}return r.matches}function Gd(t,e,n,i){let r=t.queries.getByIndex(n),o=r.matches;if(o!==null){let s=U0(t,e,r,n);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)i.push(s[a/2]);else{let c=o[a+1],u=e[-l];for(let d=st;d<u.length;d++){let f=u[d];f[Bi]===f[at]&&Gd(f[J],f,c,i)}if(u[Fr]!==null){let d=u[Fr];for(let f=0;f<d.length;f++){let p=d[f];Gd(p[J],p,c,i)}}}}}return i}function dI(t,e){return t[Hn].queries[e].queryList}function B0(t,e,n){let i=new Ad((n&4)===4);return sb(t,e,i,i.destroy),(e[Hn]??=new Hd).queries.push(new $d(i))-1}function fI(t,e,n){let i=Re();return i.firstCreatePass&&($0(i,new dl(t,e,n),-1),(e&2)===2&&(i.staticViewQueries=!0)),B0(i,G(),e)}function hI(t,e,n,i){let r=Re();if(r.firstCreatePass){let o=pt();$0(r,new dl(e,n,i),o.index),gI(r,t),(n&2)===2&&(r.staticContentQueries=!0)}return B0(r,G(),n)}function pI(t){return t.split(",").map(e=>e.trim())}function $0(t,e,n){t.queries===null&&(t.queries=new zd),t.queries.track(new Wd(e,n))}function gI(t,e){let n=t.contentQueries||(t.contentQueries=[]),i=n.length?n[n.length-1]:-1;e!==i&&n.push(t.queries.length-1,e)}function Xf(t,e){return t.queries.getByIndex(e)}function mI(t,e){let n=t[J],i=Xf(n,e);return i.crossesNgTemplate?Gd(n,t,e,[]):U0(n,t,i,e)}function vI(t){let e=[],n=new Map;function i(r){let o=n.get(r);if(!o){let s=t(r);n.set(r,o=s.then(CI))}return o}return fl.forEach((r,o)=>{let s=[];r.templateUrl&&s.push(i(r.templateUrl).then(c=>{r.template=c}));let a=typeof r.styles=="string"?[r.styles]:r.styles||[];if(r.styles=a,r.styleUrl&&r.styleUrls?.length)throw new Error("@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");if(r.styleUrls?.length){let c=r.styles.length,u=r.styleUrls;r.styleUrls.forEach((d,f)=>{a.push(""),s.push(i(d).then(p=>{a[c+f]=p,u.splice(u.indexOf(d),1),u.length==0&&(r.styleUrls=void 0)}))})}else r.styleUrl&&s.push(i(r.styleUrl).then(c=>{a.push(c),r.styleUrl=void 0}));let l=Promise.all(s).then(()=>DI(o));e.push(l)}),_I(),Promise.all(e).then(()=>{})}var fl=new Map,yI=new Set;function _I(){let t=fl;return fl=new Map,t}function wI(){return fl.size===0}function CI(t){return typeof t=="string"?t:t.text()}function DI(t){yI.delete(t)}var mi=class{},Qo=class{};var hl=class extends mi{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new ul(this);constructor(e,n,i,r=!0){super(),this.ngModuleType=e,this._parent=n;let o=Ym(e);this._bootstrapComponents=s0(o.bootstrap),this._r3Injector=Lv(e,n,[{provide:mi,useValue:this},{provide:Br,useValue:this.componentFactoryResolver},...i],St(e),new Set(["environment"])),r&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},pl=class extends Qo{moduleType;constructor(e){super(),this.moduleType=e}create(e){return new hl(this.moduleType,e,[])}};function bI(t,e,n){return new hl(t,e,n,!1)}var qd=class extends mi{injector;componentFactoryResolver=new ul(this);instance=null;constructor(e){super();let n=new $o([...e.providers,{provide:mi,useValue:this},{provide:Br,useValue:this.componentFactoryResolver}],e.parent||Sl(),e.debugName,new Set(["environment"]));this.injector=n,e.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Bl(t,e,n=null){return new qd({providers:t,parent:e,debugName:n,runEnvironmentInitializers:!0}).injector}var EI=(()=>{class t{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let i=Jm(!1,n.type),r=i.length>0?Bl([i],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,r)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=R({token:t,providedIn:"environment",factory:()=>new t(O(nt))})}return t})();function oe(t){return Xo(()=>{let e=H0(t),n=le(x({},e),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Gv.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(EI).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||In.Emulated,styles:t.styles||qt,_:null,schemas:t.schemas||null,tView:null,id:""});e.standalone&&vi("NgStandalone"),z0(n);let i=t.dependencies;return n.directiveDefs=wm(i,!1),n.pipeDefs=wm(i,!0),n.id=TI(n),n})}function SI(t){return Bn(t)||Zm(t)}function II(t){return t!==null}function rt(t){return Xo(()=>({type:t.type,bootstrap:t.bootstrap||qt,declarations:t.declarations||qt,imports:t.imports||qt,exports:t.exports||qt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function _m(t,e){if(t==null)return Nr;let n={};for(let i in t)if(t.hasOwnProperty(i)){let r=t[i],o,s,a=gi.None;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o):(o=r,s=r),e?(n[o]=a!==gi.None?[i,a]:i,e[o]=s):n[o]=i}return n}function ye(t){return Xo(()=>{let e=H0(t);return z0(e),e})}function nr(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone??!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function H0(t){let e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputTransforms:null,inputConfig:t.inputs||Nr,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||qt,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:_m(t.inputs,e),outputs:_m(t.outputs),debugInfo:null}}function z0(t){t.features?.forEach(e=>e(t))}function wm(t,e){if(!t)return null;let n=e?Xm:SI;return()=>(typeof t=="function"?t():t).map(i=>n(i)).filter(II)}function TI(t){let e=0,n=typeof t.consts=="function"?"":t.consts,i=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,n,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery];for(let o of i.join("|"))e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function MI(t){return Object.getPrototypeOf(t.prototype).constructor}function ct(t){let e=MI(t.type),n=!0,i=[t];for(;e;){let r;if(zn(t))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new F(903,!1);r=e.\u0275dir}if(r){if(n){i.push(r);let s=t;s.inputs=La(t.inputs),s.inputTransforms=La(t.inputTransforms),s.declaredInputs=La(t.declaredInputs),s.outputs=La(t.outputs);let a=r.hostBindings;a&&kI(t,a);let l=r.viewQuery,c=r.contentQueries;if(l&&AI(t,l),c&&NI(t,c),xI(t,r),dD(t.outputs,r.outputs),zn(r)&&r.data.animation){let u=t.data;u.animation=(u.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(t),a===ct&&(n=!1)}}e=Object.getPrototypeOf(e)}RI(i)}function xI(t,e){for(let n in e.inputs){if(!e.inputs.hasOwnProperty(n)||t.inputs.hasOwnProperty(n))continue;let i=e.inputs[n];if(i!==void 0&&(t.inputs[n]=i,t.declaredInputs[n]=e.declaredInputs[n],e.inputTransforms!==null)){let r=Array.isArray(i)?i[0]:i;if(!e.inputTransforms.hasOwnProperty(r))continue;t.inputTransforms??={},t.inputTransforms[r]=e.inputTransforms[r]}}}function RI(t){let e=0,n=null;for(let i=t.length-1;i>=0;i--){let r=t[i];r.hostVars=e+=r.hostVars,r.hostAttrs=Lr(r.hostAttrs,n=Lr(n,r.hostAttrs))}}function La(t){return t===Nr?{}:t===qt?[]:t}function AI(t,e){let n=t.viewQuery;n?t.viewQuery=(i,r)=>{e(i,r),n(i,r)}:t.viewQuery=e}function NI(t,e){let n=t.contentQueries;n?t.contentQueries=(i,r,o)=>{e(i,r,o),n(i,r,o)}:t.contentQueries=e}function kI(t,e){let n=t.hostBindings;n?t.hostBindings=(i,r)=>{e(i,r),n(i,r)}:t.hostBindings=e}function Kf(t){let e=t.inputConfig,n={};for(let i in e)if(e.hasOwnProperty(i)){let r=e[i];Array.isArray(r)&&r[3]&&(n[i]=r[3])}t.inputTransforms=n}function W0(t){return t!==null&&(typeof t=="function"||typeof t=="object")}function as(t,e,n){return t[e]=n}function OI(t,e){return t[e]}function cn(t,e,n){let i=t[e];return Object.is(i,n)?!1:(t[e]=n,!0)}function Yo(t,e,n,i){let r=cn(t,e,n);return cn(t,e+1,i)||r}function PI(t,e,n,i,r){let o=Yo(t,e,n,i);return cn(t,e+2,r)||o}function FI(t,e,n,i,r,o){let s=Yo(t,e,n,i);return Yo(t,e+2,r,o)||s}function LI(t,e,n,i,r,o,s,a,l){let c=e.consts,u=ss(e,t,4,s||null,a||null);Rl()&&Zf(e,n,u,pi(c,l),Bf),u.mergedAttrs=Lr(u.mergedAttrs,u.attrs),bf(e,u);let d=u.tView=Uf(2,u,i,r,o,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c,null);return e.queries!==null&&(e.queries.template(e,u),d.queries=e.queries.embeddedTView(u)),u}function gl(t,e,n,i,r,o,s,a,l,c){let u=n+He,d=e.firstCreatePass?LI(u,e,t,i,r,o,s,a,l):e.data[u];Zi(d,!1);let f=VI(e,t,d,n);Al()&&Vl(e,t,f,d),Ji(f,t);let p=v0(f,t,f,d);return t[u]=p,$f(t,p),oI(p,d,t),Tl(d)&&Vf(e,t,d),l!=null&&jf(t,d,c),d}function ue(t,e,n,i,r,o,s,a){let l=G(),c=Re(),u=pi(c.consts,o);return gl(l,c,t,e,n,i,r,u,s,a),ue}var VI=jI;function jI(t,e,n,i){return Nl(!0),e[xe].createComment("")}var Jf=(()=>{class t{log(n){console.log(n)}warn(n){console.warn(n)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();var eh=new P(""),ls=new P(""),$l=(()=>{class t{_ngZone;registry;_isZoneStable=!0;_callbacks=[];taskTrackingZone=null;constructor(n,i,r){this._ngZone=n,this.registry=i,th||(UI(r),r.addToWindow(i)),this._watchAngularEvents(),n.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Te.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let n=this._callbacks.pop();clearTimeout(n.timeoutId),n.doneCb()}});else{let n=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>i.updateCb&&i.updateCb(n)?(clearTimeout(i.timeoutId),!1):!0)}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(n=>({source:n.source,creationLocation:n.creationLocation,data:n.data})):[]}addCallback(n,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),n()},i)),this._callbacks.push({doneCb:n,timeoutId:o,updateCb:r})}whenStable(n,i,r){if(r&&!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(n,i,r),this._runCallbacksIfReady()}registerApplication(n){this.registry.registerApplication(n,this)}unregisterApplication(n){this.registry.unregisterApplication(n)}findProviders(n,i,r){return[]}static \u0275fac=function(i){return new(i||t)(O(Te),O(Hl),O(ls))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Hl=(()=>{class t{_applications=new Map;registerApplication(n,i){this._applications.set(n,i)}unregisterApplication(n){this._applications.delete(n)}unregisterAllApplications(){this._applications.clear()}getTestability(n){return this._applications.get(n)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(n,i=!0){return th?.findTestabilityInTree(this,n,i)??null}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function UI(t){th=t}var th;function yi(t){return!!t&&typeof t.then=="function"}function nh(t){return!!t&&typeof t.subscribe=="function"}var cs=new P("");function G0(t){return Jo([{provide:cs,multi:!0,useValue:t}])}var q0=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,i)=>{this.resolve=n,this.reject=i});appInits=b(cs,{optional:!0})??[];injector=b(Oe);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let r of this.appInits){let o=It(this.injector,r);if(yi(o))n.push(o);else if(nh(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});n.push(s)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{i()}).catch(r=>{this.reject(r)}),n.length===0&&i(),this.initialized=!0}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),BI=(()=>{class t{static \u0275prov=R({token:t,providedIn:"root",factory:()=>new Qd})}return t})(),Qd=class{queuedEffectCount=0;queues=new Map;schedule(e){this.enqueue(e)}remove(e){let n=e.zone,i=this.queues.get(n);i.has(e)&&(i.delete(e),this.queuedEffectCount--)}enqueue(e){let n=e.zone;this.queues.has(n)||this.queues.set(n,new Set);let i=this.queues.get(n);i.has(e)||(this.queuedEffectCount++,i.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,n]of this.queues)e===null?this.flushQueue(n):e.run(()=>this.flushQueue(n))}flushQueue(e){for(let n of e)e.delete(n),this.queuedEffectCount--,n.run()}},zl=new P("");function $I(){vg(()=>{throw new F(600,!1)})}function HI(t){return t.isBoundToModule}var zI=10;function Q0(t,e){return Array.isArray(e)?e.reduce(Q0,t):x(x({},t),e)}var Yt=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=b(Qb);afterRenderManager=b(Jv);zonelessEnabled=b(If);rootEffectScheduler=b(BI);dirtyFlags=0;deferredDirtyFlags=0;tracingSnapshot=null;externalTestViews=new Set;afterTick=new H;get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];isStable=b(Qn).hasPendingTasks.pipe(W(n=>!n));constructor(){b(qr,{optional:!0})}whenStable(){let n;return new Promise(i=>{n=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{n.unsubscribe()})}_injector=b(nt);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,i){let r=n instanceof cl;if(!this._injector.get(q0).done){let f=!r&&Km(n),p=!1;throw new F(405,p)}let s;r?s=n:s=this._injector.get(Br).resolveComponentFactory(n),this.componentTypes.push(s.componentType);let a=HI(s)?void 0:this._injector.get(mi),l=i||s.selector,c=s.create(Oe.NULL,[],l,a),u=c.location.nativeElement,d=c.injector.get(eh,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),za(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick=()=>{if(this.tracingSnapshot!==null){let i=this.tracingSnapshot;this.tracingSnapshot=null,i.run(Nf.CHANGE_DETECTION,this._tick),i.dispose();return}if(this._runningTick)throw new F(101,!1);let n=re(null);try{this._runningTick=!0,this.synchronize()}catch(i){this.internalErrorHandler(i)}finally{this._runningTick=!1,re(n),this.afterTick.next()}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get($r,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let n=0;for(;this.dirtyFlags!==0&&n++<zI;)this.synchronizeOnce()}synchronizeOnce(){if(this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0,this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush()),this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:i,notifyErrorHandler:r}of this.allViews)WI(i,r,n,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}else this._rendererFactory?.begin?.(),this._rendererFactory?.end?.();this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>Ml(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let i=n;this._views.push(i),i.attachToAppRef(this)}detachView(n){let i=n;za(this._views,i),i.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n),this._injector.get(zl,[]).forEach(r=>r(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>za(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new F(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function za(t,e){let n=t.indexOf(e);n>-1&&t.splice(n,1)}function WI(t,e,n,i){if(!n&&!Ml(t))return;R0(t,e,n&&!i?0:1)}function Qr(t,e,n,i){let r=G(),o=Wr();if(cn(r,o,e)){let s=Re(),a=ts();KE(a,r,t,e,n,i)}return Qr}function Y0(t,e,n,i){return cn(t,Wr(),n)?e+Ar(n)+i:Xt}function GI(t,e,n,i,r,o){let s=pb(),a=Yo(t,s,n,r);return yv(2),a?e+Ar(n)+i+Ar(r)+o:Xt}function Va(t,e){return t<<17|e<<2}function Qi(t){return t>>17&32767}function qI(t){return(t&2)==2}function QI(t,e){return t&131071|e<<17}function Yd(t){return t|2}function Hr(t){return(t&131068)>>2}function ld(t,e){return t&-131069|e<<2}function YI(t){return(t&1)===1}function Zd(t){return t|1}function ZI(t,e,n,i,r,o){let s=o?e.classBindings:e.styleBindings,a=Qi(s),l=Hr(s);t[i]=n;let c=!1,u;if(Array.isArray(n)){let d=n;u=d[1],(u===null||Ko(d,u)>0)&&(c=!0)}else u=n;if(r)if(l!==0){let f=Qi(t[a+1]);t[i+1]=Va(f,a),f!==0&&(t[f+1]=ld(t[f+1],i)),t[a+1]=QI(t[a+1],i)}else t[i+1]=Va(a,0),a!==0&&(t[a+1]=ld(t[a+1],i)),a=i;else t[i+1]=Va(l,0),a===0?a=i:t[l+1]=ld(t[l+1],i),l=i;c&&(t[i+1]=Yd(t[i+1])),Cm(t,u,i,!0),Cm(t,u,i,!1),XI(e,u,t,i,o),s=Va(a,l),o?e.classBindings=s:e.styleBindings=s}function XI(t,e,n,i,r){let o=r?t.residualClasses:t.residualStyles;o!=null&&typeof e=="string"&&Ko(o,e)>=0&&(n[i+1]=Zd(n[i+1]))}function Cm(t,e,n,i){let r=t[n+1],o=e===null,s=i?Qi(r):Hr(r),a=!1;for(;s!==0&&(a===!1||o);){let l=t[s],c=t[s+1];KI(l,e)&&(a=!0,t[s+1]=i?Zd(c):Yd(c)),s=i?Qi(c):Hr(c)}a&&(t[n+1]=i?Yd(r):Zd(r))}function KI(t,e){return t===null||e==null||(Array.isArray(t)?t[1]:t)===e?!0:Array.isArray(t)&&typeof e=="string"?Ko(t,e)>=0:!1}function V(t,e,n){let i=G(),r=Wr();if(cn(i,r,e)){let o=Re(),s=ts();Fl(o,s,i,t,e,i[xe],n,!1)}return V}function Dm(t,e,n,i,r){let o=e.inputs,s=r?"class":"style";Hf(t,n,o[s],s,i)}function hn(t,e,n){return Z0(t,e,n,!1),hn}function ih(t,e){return Z0(t,e,null,!0),ih}function Z0(t,e,n,i){let r=G(),o=Re(),s=yv(2);if(o.firstUpdatePass&&e1(o,t,s,i),e!==Xt&&cn(r,s,e)){let a=o.data[Ki()];o1(o,a,r,r[xe],t,r[s+1]=s1(e,n),i,s)}}function JI(t,e){return e>=t.expandoStartIndex}function e1(t,e,n,i){let r=t.data;if(r[n+1]===null){let o=r[Ki()],s=JI(t,n);a1(o,i)&&e===null&&!s&&(e=!1),e=t1(r,o,e,i),ZI(r,o,e,n,s,i)}}function t1(t,e,n,i){let r=_b(t),o=i?e.residualClasses:e.residualStyles;if(r===null)(i?e.classBindings:e.styleBindings)===0&&(n=cd(null,t,e,n,i),n=Zo(n,e.attrs,i),o=null);else{let s=e.directiveStylingLast;if(s===-1||t[s]!==r)if(n=cd(r,t,e,n,i),o===null){let l=n1(t,e,i);l!==void 0&&Array.isArray(l)&&(l=cd(null,t,e,l[1],i),l=Zo(l,e.attrs,i),i1(t,e,i,l))}else o=r1(t,e,i)}return o!==void 0&&(i?e.residualClasses=o:e.residualStyles=o),n}function n1(t,e,n){let i=n?e.classBindings:e.styleBindings;if(Hr(i)!==0)return t[Qi(i)]}function i1(t,e,n,i){let r=n?e.classBindings:e.styleBindings;t[Qi(r)]=i}function r1(t,e,n){let i,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=t[o].hostAttrs;i=Zo(i,s,n)}return Zo(i,e.attrs,n)}function cd(t,e,n,i,r){let o=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(o=e[a],i=Zo(i,o.hostAttrs,r),o!==t);)a++;return t!==null&&(n.directiveStylingLast=a),i}function Zo(t,e,n){let i=n?1:2,r=-1;if(e!==null)for(let o=0;o<e.length;o++){let s=e[o];typeof s=="number"?r=s:r===i&&(Array.isArray(t)||(t=t===void 0?[]:["",t]),PD(t,s,n?!0:e[++o]))}return t===void 0?null:t}function o1(t,e,n,i,r,o,s,a){if(!(e.type&3))return;let l=t.data,c=l[a+1],u=YI(c)?bm(l,e,n,r,Hr(c),s):void 0;if(!ml(u)){ml(o)||qI(c)&&(o=bm(l,null,n,r,a,s));let d=uv(Ki(),n);mS(i,s,d,r,o)}}function bm(t,e,n,i,r,o){let s=e===null,a;for(;r>0;){let l=t[r],c=Array.isArray(l),u=c?l[1]:l,d=u===null,f=n[r+1];f===Xt&&(f=d?qt:void 0);let p=d?ed(f,i):u===i?f:void 0;if(c&&!ml(p)&&(p=ed(l,i)),ml(p)&&(a=p,s))return a;let h=t[r+1];r=s?Qi(h):Hr(h)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=ed(l,i))}return a}function ml(t){return t!==void 0}function s1(t,e){return t==null||t===""||(typeof e=="string"?t=t+e:typeof t=="object"&&(t=St(is(t)))),t}function a1(t,e){return(t.flags&(e?8:16))!==0}var Xd=class{destroy(e){}updateValue(e,n){}swap(e,n){let i=Math.min(e,n),r=Math.max(e,n),o=this.detach(r);if(r-i>1){let s=this.detach(i);this.attach(i,o),this.attach(r,s)}else this.attach(i,o)}move(e,n){this.attach(n,this.detach(e))}};function ud(t,e,n,i,r){return t===n&&Object.is(e,i)?1:Object.is(r(t,e),r(n,i))?-1:0}function l1(t,e,n){let i,r,o=0,s=t.length-1,a=void 0;if(Array.isArray(e)){let l=e.length-1;for(;o<=s&&o<=l;){let c=t.at(o),u=e[o],d=ud(o,c,o,u,n);if(d!==0){d<0&&t.updateValue(o,u),o++;continue}let f=t.at(s),p=e[l],h=ud(s,f,l,p,n);if(h!==0){h<0&&t.updateValue(s,p),s--,l--;continue}let g=n(o,c),_=n(s,f),y=n(o,u);if(Object.is(y,_)){let M=n(l,p);Object.is(M,g)?(t.swap(o,s),t.updateValue(s,p),l--,s--):t.move(s,o),t.updateValue(o,u),o++;continue}if(i??=new vl,r??=Sm(t,o,s,n),Kd(t,i,o,y))t.updateValue(o,u),o++,s++;else if(r.has(y))i.set(g,t.detach(o)),s--;else{let M=t.create(o,e[o]);t.attach(o,M),o++,s++}}for(;o<=l;)Em(t,i,n,o,e[o]),o++}else if(e!=null){let l=e[Symbol.iterator](),c=l.next();for(;!c.done&&o<=s;){let u=t.at(o),d=c.value,f=ud(o,u,o,d,n);if(f!==0)f<0&&t.updateValue(o,d),o++,c=l.next();else{i??=new vl,r??=Sm(t,o,s,n);let p=n(o,d);if(Kd(t,i,o,p))t.updateValue(o,d),o++,s++,c=l.next();else if(!r.has(p))t.attach(o,t.create(o,d)),o++,s++,c=l.next();else{let h=n(o,u);i.set(h,t.detach(o)),s--}}}for(;!c.done;)Em(t,i,n,t.length,c.value),c=l.next()}for(;o<=s;)t.destroy(t.detach(s--));i?.forEach(l=>{t.destroy(l)})}function Kd(t,e,n,i){return e!==void 0&&e.has(i)?(t.attach(n,e.get(i)),e.delete(i),!0):!1}function Em(t,e,n,i,r){if(Kd(t,e,i,n(i,r)))t.updateValue(i,r);else{let o=t.create(i,r);t.attach(i,o)}}function Sm(t,e,n,i){let r=new Set;for(let o=e;o<=n;o++)r.add(i(o,t.at(o)));return r}var vl=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let n=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(n)?(this.kvMap.set(e,this._vMap.get(n)),this._vMap.delete(n)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,n){if(this.kvMap.has(e)){let i=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(i);)i=r.get(i);r.set(i,n)}else this.kvMap.set(e,n)}forEach(e){for(let[n,i]of this.kvMap)if(e(i,n),this._vMap!==void 0){let r=this._vMap;for(;r.has(i);)i=r.get(i),e(i,n)}}};function Y(t,e){vi("NgControlFlow");let n=G(),i=Wr(),r=n[i]!==Xt?n[i]:-1,o=r!==-1?yl(n,He+r):void 0,s=0;if(cn(n,i,t)){let a=re(null);try{if(o!==void 0&&I0(o,s),t!==-1){let l=He+t,c=yl(n,l),u=nf(n[J],l),d=Ur(c,u.tView.ssrId),f=rs(n,u,e,{dehydratedView:d});os(c,f,s,jr(u,d))}}finally{re(a)}}else if(o!==void 0){let a=S0(o,s);a!==void 0&&(a[tt]=e)}}var Jd=class{lContainer;$implicit;$index;constructor(e,n,i){this.lContainer=e,this.$implicit=n,this.$index=i}get $count(){return this.lContainer.length-st}};function gt(t,e){return e}var ef=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,n,i){this.hasEmptyBlock=e,this.trackByFn=n,this.liveCollection=i}};function ze(t,e,n,i,r,o,s,a,l,c,u,d,f){vi("NgControlFlow");let p=G(),h=Re(),g=l!==void 0,_=G(),y=a?s.bind(_[jt][tt]):s,M=new ef(g,y);_[He+t]=M,gl(p,h,t+1,e,n,i,r,pi(h.consts,o)),g&&gl(p,h,t+2,l,c,u,d,pi(h.consts,f))}var tf=class extends Xd{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,n,i){super(),this.lContainer=e,this.hostLView=n,this.templateTNode=i}get length(){return this.lContainer.length-st}at(e){return this.getLView(e)[tt].$implicit}attach(e,n){let i=n[Pr];this.needsIndexUpdate||=e!==this.length,os(this.lContainer,n,e,jr(this.templateTNode,i))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,c1(this.lContainer,e)}create(e,n){let i=Ur(this.lContainer,this.templateTNode.tView.ssrId),r=rs(this.hostLView,this.templateTNode,new Jd(this.lContainer,n,e),{dehydratedView:i});return this.operationsCounter?.recordCreate(),r}destroy(e){Ll(e[J],e),this.operationsCounter?.recordDestroy()}updateValue(e,n){this.getLView(e)[tt].$implicit=n}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[tt].$index=e}getLView(e){return u1(this.lContainer,e)}};function We(t){let e=re(null),n=Ki();try{let i=G(),r=i[J],o=i[n],s=n+1,a=yl(i,s);if(o.liveCollection===void 0){let c=nf(r,s);o.liveCollection=new tf(a,i,c)}else o.liveCollection.reset();let l=o.liveCollection;if(l1(l,t,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let c=Wr(),u=l.length===0;if(cn(i,c,u)){let d=n+2,f=yl(i,d);if(u){let p=nf(r,d),h=Ur(f,p.tView.ssrId),g=rs(i,p,void 0,{dehydratedView:h});os(f,g,0,jr(p,h))}else I0(f,0)}}}finally{re(e)}}function yl(t,e){return t[e]}function c1(t,e){return Go(t,e)}function u1(t,e){return S0(t,e)}function nf(t,e){return pf(t,e)}function m(t,e,n,i){let r=G(),o=Re(),s=He+t,a=r[xe],l=o.firstCreatePass?F0(s,o,r,e,Bf,Rl(),n,i):o.data[s],c=d1(o,r,l,a,e,t);r[s]=c;let u=Tl(l);return Zi(l,!0),d0(a,c,l),!Gf(l)&&Al()&&Vl(o,r,c,l),ab()===0&&Ji(c,r),lb(),u&&(Vf(o,r,l),Of(o,l,r)),i!==null&&jf(r,l),m}function v(){let t=pt();yf()?_f():(t=t.parent,Zi(t,!1));let e=t;ub(e)&&db(),cb();let n=Re();return n.firstCreatePass&&L0(n,e),e.classesWithoutHost!=null&&Ib(e)&&Dm(n,e,G(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&Tb(e)&&Dm(n,e,G(),e.stylesWithoutHost,!1),v}function I(t,e,n,i){return m(t,e,n,i),v(),I}var d1=(t,e,n,i,r,o)=>(Nl(!0),c0(i,r,Db()));function f1(t,e,n,i,r){let o=e.consts,s=pi(o,i),a=ss(e,t,8,"ng-container",s);s!==null&&Ud(a,s,!0);let l=pi(o,r);return Rl()&&Zf(e,n,a,l,Bf),a.mergedAttrs=Lr(a.mergedAttrs,a.attrs),e.queries!==null&&e.queries.elementStart(e,a),a}function X0(t,e,n){let i=G(),r=Re(),o=t+He,s=r.firstCreatePass?f1(o,r,i,e,n):r.data[o];Zi(s,!0);let a=h1(r,i,s,t);return i[o]=a,Al()&&Vl(r,i,a,s),Ji(a,i),Tl(s)&&(Vf(r,i,s),Of(r,s,i)),n!=null&&jf(i,s),X0}function K0(){let t=pt(),e=Re();return yf()?_f():(t=t.parent,Zi(t,!1)),e.firstCreatePass&&(bf(e,t),hf(t)&&e.queries.elementEnd(t)),K0}function rh(t,e,n){return X0(t,e,n),K0(),rh}var h1=(t,e,n,i)=>(Nl(!0),LE(e[xe],""));function Me(){return G()}var Vi=void 0;function p1(t){let e=t,n=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return n===1&&i===0?1:5}var g1=["en",[["a","p"],["AM","PM"],Vi],[["AM","PM"],Vi,Vi],[["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"]],Vi,[["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"]],Vi,[["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}",Vi,"{1} 'at' {0}",Vi],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",p1],dd={};function Kt(t){let e=m1(t),n=Im(e);if(n)return n;let i=e.split("-")[0];if(n=Im(i),n)return n;if(i==="en")return g1;throw new F(701,!1)}function Im(t){return t in dd||(dd[t]=ft.ng&&ft.ng.common&&ft.ng.common.locales&&ft.ng.common.locales[t]),dd[t]}var Pe=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}(Pe||{});function m1(t){return t.toLowerCase().replace(/_/g,"-")}var _l="en-US";var v1=_l;function y1(t){typeof t=="string"&&(v1=t.toLowerCase().replace(/_/g,"-"))}var _1=(t,e,n)=>{};function k(t,e,n,i){let r=G(),o=Re(),s=pt();return J0(o,r,r[xe],s,t,e,i),k}function w1(t,e,n,i){let r=t.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===n&&r[o+1]===i){let a=e[Ya],l=r[o+2];return a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function J0(t,e,n,i,r,o,s){let a=Tl(i),c=t.firstCreatePass&&pv(t),u=e[tt],d=hv(e),f=!0;if(i.type&3||s){let g=dn(i,e),_=s?s(g):g,y=d.length,M=s?T=>s(En(T[i.index])):i.index,A=null;if(!s&&a&&(A=w1(t,e,r,i.index)),A!==null){let T=A.__ngLastListenerFn__||A;T.__ngNextListenerFn__=o,A.__ngLastListenerFn__=o,f=!1}else{o=Mm(i,e,u,o),_1(g,r,o);let T=n.listen(_,r,o);d.push(o,T),c&&c.push(r,M,y,y+1)}}else o=Mm(i,e,u,o);let p=i.outputs,h;if(f&&p!==null&&(h=p[r])){let g=h.length;if(g)for(let _=0;_<g;_+=2){let y=h[_],M=h[_+1],N=e[y][M].subscribe(o),X=d.length;d.push(o,N),c&&c.push(r,i.index,X,-(X+1))}}}function Tm(t,e,n,i){let r=re(null);try{return Qt(6,e,n),n(i)!==!1}catch(o){return y0(t,o),!1}finally{Qt(7,e,n),re(r)}}function Mm(t,e,n,i){return function r(o){if(o===Function)return i;let s=Yi(t)?Sn(t.index,e):e;Yf(s,5);let a=Tm(e,n,i,o),l=r.__ngNextListenerFn__;for(;l;)a=Tm(e,n,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function E(t=1){return Cb(t)}function C1(t,e){let n=null,i=ME(t);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){n=r;continue}if(i===null?l0(t,o,!0):AE(i,o))return r}return n}function ey(t){let e=G()[jt][Tt];if(!e.projection){let n=t?t.length:1,i=e.projection=kD(n,null),r=i.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=t?C1(o,t):0;s!==null&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o)}o=o.next}}}function ty(t,e=0,n,i,r,o){let s=G(),a=Re(),l=i?t+1:null;l!==null&&gl(s,a,l,i,r,o,null,n);let c=ss(a,He+t,16,null,n||null);c.projection===null&&(c.projection=e),_f();let d=!s[Pr]||gv();s[jt][Tt].projection[c.projection]===null&&l!==null?D1(s,a,l):d&&!Gf(c)&&pS(a,s,c)}function D1(t,e,n){let i=He+n,r=e.data[i],o=t[i],s=Ur(o,r.tView.ssrId),a=rs(t,r,void 0,{dehydratedView:s});os(o,a,0,jr(r,s))}function Wl(t,e,n){return Gl(t,"",e,"",n),Wl}function Gl(t,e,n,i,r){let o=G(),s=Y0(o,e,n,i);if(s!==Xt){let a=Re(),l=ts();Fl(a,l,o,t,s,o[xe],r,!1)}return Gl}function oh(t,e,n,i,r,o,s){let a=G(),l=GI(a,e,n,i,r,o);if(l!==Xt){let c=Re(),u=ts();Fl(c,u,a,t,l,a[xe],s,!1)}return oh}function ny(t,e,n,i){hI(t,e,n,i)}function ot(t,e,n){fI(t,e,n)}function Ge(t){let e=G(),n=Re(),i=_v();wf(i+1);let r=Xf(n,i);if(t.dirty&&nb(e)===((r.metadata.flags&2)===2)){if(r.matches===null)t.reset([]);else{let o=mI(e,i);t.reset(o,Xb),t.notifyOnChanges()}return!0}return!1}function qe(){return dI(G(),_v())}function b1(t,e,n,i){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=i}function _i(t){let e=hb();return gf(e,He+t)}function C(t,e=""){let n=G(),i=Re(),r=t+He,o=i.firstCreatePass?ss(i,r,1,e,null):i.data[r],s=E1(i,n,o,e,t);n[r]=s,Al()&&Vl(i,n,s,o),Zi(o,!1)}var E1=(t,e,n,i,r)=>(Nl(!0),PE(e[xe],i));function he(t){return _e("",t,""),he}function _e(t,e,n){let i=G(),r=Y0(i,t,e,n);return r!==Xt&&S1(i,Ki(),r),_e}function S1(t,e,n){let i=uv(e,t);FE(t[xe],i,n)}function Ut(t,e,n){zv(e)&&(e=e());let i=G(),r=Wr();if(cn(i,r,e)){let o=Re(),s=ts();Fl(o,s,i,t,e,i[xe],n,!1)}return Ut}function Jt(t,e){let n=zv(t);return n&&t.set(e),n}function Bt(t,e){let n=G(),i=Re(),r=pt();return J0(i,n,n[xe],r,t,e),Bt}function I1(t,e,n){let i=Re();if(i.firstCreatePass){let r=zn(t);rf(n,i.data,i.blueprint,r,!0),rf(e,i.data,i.blueprint,r,!1)}}function rf(t,e,n,i,r){if(t=ht(t),Array.isArray(t))for(let o=0;o<t.length;o++)rf(t[o],e,n,i,r);else{let o=Re(),s=G(),a=pt(),l=Or(t)?t:ht(t.provide),c=nv(t),u=a.providerIndexes&1048575,d=a.directiveStart,f=a.providerIndexes>>20;if(Or(t)||!t.multi){let p=new Wi(c,r,D),h=hd(l,e,r?u:u+f,d);h===-1?(Id(nl(a,s),o,l),fd(o,t,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),n.push(p),s.push(p)):(n[h]=p,s[h]=p)}else{let p=hd(l,e,u+f,d),h=hd(l,e,u,u+f),g=p>=0&&n[p],_=h>=0&&n[h];if(r&&!_||!r&&!g){Id(nl(a,s),o,l);let y=x1(r?M1:T1,n.length,r,i,c);!r&&_&&(n[h].providerFactory=y),fd(o,t,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),n.push(y),s.push(y)}else{let y=iy(n[r?h:p],c,!r&&i);fd(o,t,p>-1?p:h,y)}!r&&i&&_&&n[h].componentProviders++}}}function fd(t,e,n,i){let r=Or(e),o=BD(e);if(r||o){let l=(o?ht(e.useClass):e).prototype.ngOnDestroy;if(l){let c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&e.multi){let u=c.indexOf(n);u===-1?c.push(n,[i,l]):c[u+1].push(i,l)}else c.push(n,l)}}}function iy(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function hd(t,e,n,i){for(let r=n;r<i;r++)if(e[r]===t)return r;return-1}function T1(t,e,n,i){return of(this.multi,[])}function M1(t,e,n,i){let r=this.multi,o;if(this.providerFactory){let s=this.providerFactory.componentProviders,a=Wo(n,n[J],this.providerFactory.index,i);o=a.slice(0,s),of(r,o);for(let l=s;l<a.length;l++)o.push(a[l])}else o=[],of(r,o);return o}function of(t,e){for(let n=0;n<t.length;n++){let i=t[n];e.push(i())}return e}function x1(t,e,n,i,r){let o=new Wi(t,n,D);return o.multi=[],o.index=e,o.componentProviders=0,iy(o,r,i&&!n),o}function Yn(t,e=[]){return n=>{n.providersResolver=(i,r)=>I1(i,r?r(t):t,e)}}function ir(t,e,n){let i=Xi()+t,r=G();return r[i]===Xt?as(r,i,n?e.call(n):e()):OI(r,i)}function Mt(t,e,n,i){return sy(G(),Xi(),t,e,n,i)}function rr(t,e,n,i,r){return ay(G(),Xi(),t,e,n,i,r)}function ry(t,e,n,i,r,o){return R1(G(),Xi(),t,e,n,i,r,o)}function oy(t,e,n,i,r,o,s){return A1(G(),Xi(),t,e,n,i,r,o,s)}function ql(t,e){let n=t[e];return n===Xt?void 0:n}function sy(t,e,n,i,r,o){let s=e+n;return cn(t,s,r)?as(t,s+1,o?i.call(o,r):i(r)):ql(t,s+1)}function ay(t,e,n,i,r,o,s){let a=e+n;return Yo(t,a,r,o)?as(t,a+2,s?i.call(s,r,o):i(r,o)):ql(t,a+2)}function R1(t,e,n,i,r,o,s,a){let l=e+n;return PI(t,l,r,o,s)?as(t,l+3,a?i.call(a,r,o,s):i(r,o,s)):ql(t,l+3)}function A1(t,e,n,i,r,o,s,a,l){let c=e+n;return FI(t,c,r,o,s,a)?as(t,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):ql(t,c+4)}function xt(t,e){let n=Re(),i,r=t+He;n.firstCreatePass?(i=N1(e,n.pipeRegistry),n.data[r]=i,i.onDestroy&&(n.destroyHooks??=[]).push(r,i.onDestroy)):i=n.data[r];let o=i.factory||(i.factory=Ui(i.type,!0)),s,a=Et(D);try{let l=tl(!1),c=o();return tl(l),b1(n,G(),r,c),c}finally{Et(a)}}function N1(t,e){if(e)for(let n=e.length-1;n>=0;n--){let i=e[n];if(t===i.name)return i}}function Zn(t,e,n){let i=t+He,r=G(),o=gf(r,i);return ly(r,i)?sy(r,Xi(),e,o.transform,n,o):o.transform(n)}function Yr(t,e,n,i){let r=t+He,o=G(),s=gf(o,r);return ly(o,r)?ay(o,Xi(),e,s.transform,n,i,s):s.transform(n,i)}function ly(t,e){return t[J].data[e].pure}function cy(t,e){return Ul(t,e)}var ja=null;function k1(t){ja!==null&&(t.defaultEncapsulation!==ja.defaultEncapsulation||t.preserveWhitespaces!==ja.preserveWhitespaces)||(ja=t)}var sf=class{ngModuleFactory;componentFactories;constructor(e,n){this.ngModuleFactory=e,this.componentFactories=n}},Ql=(()=>{class t{compileModuleSync(n){return new pl(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let i=this.compileModuleSync(n),r=Ym(n),o=s0(r.declarations).reduce((s,a)=>{let l=Bn(a);return l&&s.push(new qi(l)),s},[]);return new sf(i,o)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),O1=new P("");function P1(t,e,n){let i=new pl(n);return Promise.resolve(i)}function xm(t){for(let e=t.length-1;e>=0;e--)if(t[e]!==void 0)return t[e]}var F1=(()=>{class t{zone=b(Te);changeDetectionScheduler=b(Vr);applicationRef=b(Yt);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function L1({ngZoneFactory:t,ignoreChangesOutsideZone:e,scheduleInRootZone:n}){return t??=()=>new Te(le(x({},uy()),{scheduleInRootZone:n})),[{provide:Te,useFactory:t},{provide:kr,multi:!0,useFactory:()=>{let i=b(F1,{optional:!0});return()=>i.initialize()}},{provide:kr,multi:!0,useFactory:()=>{let i=b(V1);return()=>{i.initialize()}}},e===!0?{provide:jv,useValue:!0}:[],{provide:Uv,useValue:n??Vv}]}function uy(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var V1=(()=>{class t{subscription=new Ae;initialized=!1;zone=b(Te);pendingTasks=b(Qn);initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Te.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Te.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var j1=(()=>{class t{appRef=b(Yt);taskService=b(Qn);ngZone=b(Te);zonelessEnabled=b(If);tracing=b(qr,{optional:!0});disableScheduling=b(jv,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ae;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(rl):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(b(Uv,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof ol||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;let i=!1;switch(n){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 8:{this.appRef.deferredDirtyFlags|=8;break}case 6:{this.appRef.dirtyFlags|=2,i=!0;break}case 13:{this.appRef.dirtyFlags|=16,i=!0;break}case 14:{this.appRef.dirtyFlags|=2,i=!0;break}case 12:{i=!0;break}case 10:case 9:case 7:case 11:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(i))return;let r=this.useMicrotaskScheduler?om:Bv;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(n){return!(this.disableScheduling&&!n||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(rl+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let n=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){throw this.taskService.remove(n),i}finally{this.cleanup()}this.useMicrotaskScheduler=!0,om(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function U1(){return typeof $localize<"u"&&$localize.locale||_l}var Yl=new P("",{providedIn:"root",factory:()=>b(Yl,ne.Optional|ne.SkipSelf)||U1()});var wl=new P(""),B1=new P("");function Fo(t){return!t.moduleRef}function $1(t){let e=Fo(t)?t.r3Injector:t.moduleRef.injector,n=e.get(Te);return n.run(()=>{Fo(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let i=e.get(Wn,null),r;if(n.runOutsideAngular(()=>{r=n.onError.subscribe({next:o=>{i.handleError(o)}})}),Fo(t)){let o=()=>e.destroy(),s=t.platformInjector.get(wl);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>t.moduleRef.destroy(),s=t.platformInjector.get(wl);s.add(o),t.moduleRef.onDestroy(()=>{za(t.allPlatformModules,t.moduleRef),r.unsubscribe(),s.delete(o)})}return z1(i,n,()=>{let o=e.get(q0);return o.runInitializers(),o.donePromise.then(()=>{let s=e.get(Yl,_l);if(y1(s||_l),!e.get(B1,!0))return Fo(t)?e.get(Yt):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(Fo(t)){let l=e.get(Yt);return t.rootComponent!==void 0&&l.bootstrap(t.rootComponent),l}else return H1(t.moduleRef,t.allPlatformModules),t.moduleRef})})})}function H1(t,e){let n=t.injector.get(Yt);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(i=>n.bootstrap(i));else if(t.instance.ngDoBootstrap)t.instance.ngDoBootstrap(n);else throw new F(-403,!1);e.push(t)}function z1(t,e,n){try{let i=n();return yi(i)?i.catch(r=>{throw e.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>t.handleError(i)),i}}var dy=(()=>{class t{_injector;_modules=[];_destroyListeners=[];_destroyed=!1;constructor(n){this._injector=n}bootstrapModuleFactory(n,i){let r=i?.scheduleInRootZone,o=()=>qb(i?.ngZone,le(x({},uy({eventCoalescing:i?.ngZoneEventCoalescing,runCoalescing:i?.ngZoneRunCoalescing})),{scheduleInRootZone:r})),s=i?.ignoreChangesOutsideZone,a=[L1({ngZoneFactory:o,ignoreChangesOutsideZone:s}),{provide:Vr,useExisting:j1}],l=bI(n.moduleType,this.injector,a);return $1({moduleRef:l,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(n,i=[]){let r=Q0({},i);return P1(this.injector,r,n).then(o=>this.bootstrapModuleFactory(o,r))}onDestroy(n){this._destroyListeners.push(n)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new F(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());let n=this._injector.get(wl,null);n&&(n.forEach(i=>i()),n.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static \u0275fac=function(i){return new(i||t)(O(Oe))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})(),Uo=null,fy=new P("");function W1(t){if(Uo&&!Uo.get(fy,!1))throw new F(400,!1);$I(),Uo=t;let e=t.get(dy);return Q1(t),e}function sh(t,e,n=[]){let i=`Platform: ${e}`,r=new P(i);return(o=[])=>{let s=hy();if(!s||s.injector.get(fy,!1)){let a=[...n,...o,{provide:r,useValue:!0}];t?t(a):W1(G1(a,i))}return q1(r)}}function G1(t=[],e){return Oe.create({name:e,providers:[{provide:El,useValue:"platform"},{provide:wl,useValue:new Set([()=>Uo=null])},...t]})}function q1(t){let e=hy();if(!e)throw new F(401,!1);return e}function hy(){return Uo?.get(dy)??null}function Q1(t){let e=t.get(Rf,null);It(t,()=>{e?.forEach(n=>n())})}var $t=(()=>{class t{static __NG_ELEMENT_ID__=Y1}return t})();function Y1(t){return Z1(pt(),G(),(t&16)===16)}function Z1(t,e,n){if(Yi(t)&&!n){let i=Sn(t.index,e);return new Gi(i,i)}else if(t.type&175){let i=e[jt];return new Gi(i,e)}return null}var af=class{constructor(){}supports(e){return e instanceof Map||W0(e)}create(){return new lf}},lf=class{_records=new Map;_mapHead=null;_appendAfter=null;_previousMapHead=null;_changesHead=null;_changesTail=null;_additionsHead=null;_additionsTail=null;_removalsHead=null;_removalsTail=null;get isDirty(){return this._additionsHead!==null||this._changesHead!==null||this._removalsHead!==null}forEachItem(e){let n;for(n=this._mapHead;n!==null;n=n._next)e(n)}forEachPreviousItem(e){let n;for(n=this._previousMapHead;n!==null;n=n._nextPrevious)e(n)}forEachChangedItem(e){let n;for(n=this._changesHead;n!==null;n=n._nextChanged)e(n)}forEachAddedItem(e){let n;for(n=this._additionsHead;n!==null;n=n._nextAdded)e(n)}forEachRemovedItem(e){let n;for(n=this._removalsHead;n!==null;n=n._nextRemoved)e(n)}diff(e){if(!e)e=new Map;else if(!(e instanceof Map||W0(e)))throw new F(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let n=this._mapHead;if(this._appendAfter=null,this._forEach(e,(i,r)=>{if(n&&n.key===r)this._maybeAddToChanges(n,i),this._appendAfter=n,n=n._next;else{let o=this._getOrCreateRecordForKey(r,i);n=this._insertBeforeOrAppend(n,o)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let i=n;i!==null;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,n){if(e){let i=e._prev;return n._next=e,n._prev=i,e._prev=n,i&&(i._next=n),e===this._mapHead&&(this._mapHead=n),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(e,n){if(this._records.has(e)){let r=this._records.get(e);this._maybeAddToChanges(r,n);let o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}let i=new cf(e);return this._records.set(e,i),i.currentValue=n,this._addToAdditions(i),i}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,n){Object.is(n,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=n,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,n){e instanceof Map?e.forEach(n):Object.keys(e).forEach(i=>n(e[i],i))}},cf=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(e){this.key=e}};function Rm(){return new ah([new af])}var ah=(()=>{class t{static \u0275prov=R({token:t,providedIn:"root",factory:Rm});factories;constructor(n){this.factories=n}static create(n,i){if(i){let r=i.factories.slice();n=n.concat(r)}return new t(n)}static extend(n){return{provide:t,useFactory:i=>t.create(n,i||Rm()),deps:[[t,new RD,new Wm]]}}find(n){let i=this.factories.find(r=>r.supports(n));if(i)return i;throw new F(901,!1)}}return t})();var py=sh(null,"core",[]),gy=(()=>{class t{constructor(n){}static \u0275fac=function(i){return new(i||t)(O(Yt))};static \u0275mod=rt({type:t});static \u0275inj=it({})}return t})();function or(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function Zl(t,e){vi("NgSignals");let n=pg(t);return e?.equal&&(n[Ft].equal=e.equal),n}function Mn(t){let e=re(null);try{return t()}finally{re(e)}}var Am=class{[Ft];constructor(e){this[Ft]=e}destroy(){this[Ft].destroy()}};function my(t,e){let n=Bn(t),i=e.elementInjector||Sl();return new qi(n).create(i,e.projectableNodes,e.hostElement,e.environmentInjector)}function vy(t){let e=Bn(t);if(!e)return null;let n=new qi(e);return{get selector(){return n.selector},get type(){return n.componentType},get inputs(){return n.inputs},get outputs(){return n.outputs},get ngContentSelectors(){return n.ngContentSelectors},get isStandalone(){return e.standalone},get isSignal(){return e.signals}}}var Dy=null;function xn(){return Dy}function by(t){Dy??=t}var oc=class{};var ut=new P(""),us=(()=>{class t{historyGo(n){throw new Error("")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:()=>b(X1),providedIn:"platform"})}return t})(),Ey=new P(""),X1=(()=>{class t extends us{_location;_history;_doc=b(ut);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return xn().getBaseHref(this._doc)}onPopState(n){let i=xn().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",n,!1),()=>i.removeEventListener("popstate",n)}onHashChange(n){let i=xn().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",n,!1),()=>i.removeEventListener("hashchange",n)}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(n){this._location.pathname=n}pushState(n,i,r){this._history.pushState(n,i,r)}replaceState(n,i,r){this._history.replaceState(n,i,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function mh(t,e){return t?e?t.endsWith("/")?e.startsWith("/")?t+e.slice(1):t+e:e.startsWith("/")?t+e:`${t}/${e}`:t:e}function yy(t){let e=t.match(/#|\?|$/),n=e&&e.index||t.length,i=n-(t[n-1]==="/"?1:0);return t.slice(0,i)+t.slice(n)}function Kn(t){return t&&t[0]!=="?"?"?"+t:t}var Jn=(()=>{class t{historyGo(n){throw new Error("")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:()=>b(vh),providedIn:"root"})}return t})(),Sy=new P(""),vh=(()=>{class t extends Jn{_platformLocation;_baseHref;_removeListenerFns=[];constructor(n,i){super(),this._platformLocation=n,this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??b(ut).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return mh(this._baseHref,n)}path(n=!1){let i=this._platformLocation.pathname+Kn(this._platformLocation.search),r=this._platformLocation.hash;return r&&n?`${i}${r}`:i}pushState(n,i,r,o){let s=this.prepareExternalUrl(r+Kn(o));this._platformLocation.pushState(n,i,s)}replaceState(n,i,r,o){let s=this.prepareExternalUrl(r+Kn(o));this._platformLocation.replaceState(n,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(i){return new(i||t)(O(us),O(Sy,8))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Iy=(()=>{class t extends Jn{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(n,i){super(),this._platformLocation=n,i!=null&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){let i=this._platformLocation.hash??"#";return i.length>0?i.substring(1):i}prepareExternalUrl(n){let i=mh(this._baseHref,n);return i.length>0?"#"+i:i}pushState(n,i,r,o){let s=this.prepareExternalUrl(r+Kn(o));s.length==0&&(s=this._platformLocation.pathname),this._platformLocation.pushState(n,i,s)}replaceState(n,i,r,o){let s=this.prepareExternalUrl(r+Kn(o));s.length==0&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(n,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}static \u0275fac=function(i){return new(i||t)(O(us),O(Sy,8))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Xr=(()=>{class t{_subject=new H;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(n){this._locationStrategy=n;let i=this._locationStrategy.getBaseHref();this._basePath=eT(yy(_y(i))),this._locationStrategy.onPopState(r=>{this._subject.next({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,i=""){return this.path()==this.normalize(n+Kn(i))}normalize(n){return t.stripTrailingSlash(J1(this._basePath,_y(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,i="",r=null){this._locationStrategy.pushState(r,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Kn(i)),r)}replaceState(n,i="",r=null){this._locationStrategy.replaceState(r,"",n,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Kn(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{let i=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",i){this._urlChangeListeners.forEach(r=>r(n,i))}subscribe(n,i,r){return this._subject.subscribe({next:n,error:i??void 0,complete:r??void 0})}static normalizeQueryParams=Kn;static joinWithSlash=mh;static stripTrailingSlash=yy;static \u0275fac=function(i){return new(i||t)(O(Jn))};static \u0275prov=R({token:t,factory:()=>K1(),providedIn:"root"})}return t})();function K1(){return new Xr(O(Jn))}function J1(t,e){if(!t||!e.startsWith(t))return e;let n=e.substring(t.length);return n===""||["/",";","?","#"].includes(n[0])?n:e}function _y(t){return t.replace(/\/index.html$/,"")}function eT(t){if(new RegExp("^(https?:)?//").test(t)){let[,n]=t.split(/\/\/[^\/]+/);return n}return t}var mt=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}(mt||{}),De=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}(De||{}),Ht=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}(Ht||{}),wi={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function tT(t){return Kt(t)[Pe.LocaleId]}function nT(t,e,n){let i=Kt(t),r=[i[Pe.DayPeriodsFormat],i[Pe.DayPeriodsStandalone]],o=en(r,e);return en(o,n)}function iT(t,e,n){let i=Kt(t),r=[i[Pe.DaysFormat],i[Pe.DaysStandalone]],o=en(r,e);return en(o,n)}function rT(t,e,n){let i=Kt(t),r=[i[Pe.MonthsFormat],i[Pe.MonthsStandalone]],o=en(r,e);return en(o,n)}function oT(t,e){let i=Kt(t)[Pe.Eras];return en(i,e)}function Xl(t,e){let n=Kt(t);return en(n[Pe.DateFormat],e)}function Kl(t,e){let n=Kt(t);return en(n[Pe.TimeFormat],e)}function Jl(t,e){let i=Kt(t)[Pe.DateTimeFormat];return en(i,e)}function ac(t,e){let n=Kt(t),i=n[Pe.NumberSymbols][e];if(typeof i>"u"){if(e===wi.CurrencyDecimal)return n[Pe.NumberSymbols][wi.Decimal];if(e===wi.CurrencyGroup)return n[Pe.NumberSymbols][wi.Group]}return i}function Ty(t){if(!t[Pe.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[Pe.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function sT(t){let e=Kt(t);return Ty(e),(e[Pe.ExtraData][2]||[]).map(i=>typeof i=="string"?lh(i):[lh(i[0]),lh(i[1])])}function aT(t,e,n){let i=Kt(t);Ty(i);let r=[i[Pe.ExtraData][0],i[Pe.ExtraData][1]],o=en(r,e)||[];return en(o,n)||[]}function en(t,e){for(let n=e;n>-1;n--)if(typeof t[n]<"u")return t[n];throw new Error("Locale data API: locale data undefined")}function lh(t){let[e,n]=t.split(":");return{hours:+e,minutes:+n}}var lT=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ec={},cT=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function uT(t,e,n,i){let r=_T(t);e=Xn(n,e)||e;let s=[],a;for(;e;)if(a=cT.exec(e),a){s=s.concat(a.slice(1));let u=s.pop();if(!u)break;e=u}else{s.push(e);break}let l=r.getTimezoneOffset();i&&(l=xy(i,l),r=yT(r,i,!0));let c="";return s.forEach(u=>{let d=mT(u);c+=d?d(r,n,l):u==="''"?"'":u.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function sc(t,e,n){let i=new Date(0);return i.setFullYear(t,e,n),i.setHours(0,0,0),i}function Xn(t,e){let n=tT(t);if(ec[n]??={},ec[n][e])return ec[n][e];let i="";switch(e){case"shortDate":i=Xl(t,Ht.Short);break;case"mediumDate":i=Xl(t,Ht.Medium);break;case"longDate":i=Xl(t,Ht.Long);break;case"fullDate":i=Xl(t,Ht.Full);break;case"shortTime":i=Kl(t,Ht.Short);break;case"mediumTime":i=Kl(t,Ht.Medium);break;case"longTime":i=Kl(t,Ht.Long);break;case"fullTime":i=Kl(t,Ht.Full);break;case"short":let r=Xn(t,"shortTime"),o=Xn(t,"shortDate");i=tc(Jl(t,Ht.Short),[r,o]);break;case"medium":let s=Xn(t,"mediumTime"),a=Xn(t,"mediumDate");i=tc(Jl(t,Ht.Medium),[s,a]);break;case"long":let l=Xn(t,"longTime"),c=Xn(t,"longDate");i=tc(Jl(t,Ht.Long),[l,c]);break;case"full":let u=Xn(t,"fullTime"),d=Xn(t,"fullDate");i=tc(Jl(t,Ht.Full),[u,d]);break}return i&&(ec[n][e]=i),i}function tc(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(n,i){return e!=null&&i in e?e[i]:n})),t}function pn(t,e,n="-",i,r){let o="";(t<0||r&&t<=0)&&(r?t=-t+1:(t=-t,o=n));let s=String(t);for(;s.length<e;)s="0"+s;return i&&(s=s.slice(s.length-e)),o+s}function dT(t,e){return pn(t,3).substring(0,e)}function je(t,e,n=0,i=!1,r=!1){return function(o,s){let a=fT(t,o);if((n>0||a>-n)&&(a+=n),t===3)a===0&&n===-12&&(a=12);else if(t===6)return dT(a,e);let l=ac(s,wi.MinusSign);return pn(a,e,l,i,r)}}function fT(t,e){switch(t){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate();case 3:return e.getHours();case 4:return e.getMinutes();case 5:return e.getSeconds();case 6:return e.getMilliseconds();case 7:return e.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}function Se(t,e,n=mt.Format,i=!1){return function(r,o){return hT(r,o,t,e,n,i)}}function hT(t,e,n,i,r,o){switch(n){case 2:return rT(e,r,i)[t.getMonth()];case 1:return iT(e,r,i)[t.getDay()];case 0:let s=t.getHours(),a=t.getMinutes();if(o){let c=sT(e),u=aT(e,r,i),d=c.findIndex(f=>{if(Array.isArray(f)){let[p,h]=f,g=s>=p.hours&&a>=p.minutes,_=s<h.hours||s===h.hours&&a<h.minutes;if(p.hours<h.hours){if(g&&_)return!0}else if(g||_)return!0}else if(f.hours===s&&f.minutes===a)return!0;return!1});if(d!==-1)return u[d]}return nT(e,r,i)[s<12?0:1];case 3:return oT(e,i)[t.getFullYear()<=0?0:1];default:let l=n;throw new Error(`unexpected translation type ${l}`)}}function nc(t){return function(e,n,i){let r=-1*i,o=ac(n,wi.MinusSign),s=r>0?Math.floor(r/60):Math.ceil(r/60);switch(t){case 0:return(r>=0?"+":"")+pn(s,2,o)+pn(Math.abs(r%60),2,o);case 1:return"GMT"+(r>=0?"+":"")+pn(s,1,o);case 2:return"GMT"+(r>=0?"+":"")+pn(s,2,o)+":"+pn(Math.abs(r%60),2,o);case 3:return i===0?"Z":(r>=0?"+":"")+pn(s,2,o)+":"+pn(Math.abs(r%60),2,o);default:throw new Error(`Unknown zone width "${t}"`)}}}var pT=0,rc=4;function gT(t){let e=sc(t,pT,1).getDay();return sc(t,0,1+(e<=rc?rc:rc+7)-e)}function My(t){let e=t.getDay(),n=e===0?-3:rc-e;return sc(t.getFullYear(),t.getMonth(),t.getDate()+n)}function ch(t,e=!1){return function(n,i){let r;if(e){let o=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,s=n.getDate();r=1+Math.floor((s+o)/7)}else{let o=My(n),s=gT(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return pn(r,t,ac(i,wi.MinusSign))}}function ic(t,e=!1){return function(n,i){let o=My(n).getFullYear();return pn(o,t,ac(i,wi.MinusSign),e)}}var uh={};function mT(t){if(uh[t])return uh[t];let e;switch(t){case"G":case"GG":case"GGG":e=Se(3,De.Abbreviated);break;case"GGGG":e=Se(3,De.Wide);break;case"GGGGG":e=Se(3,De.Narrow);break;case"y":e=je(0,1,0,!1,!0);break;case"yy":e=je(0,2,0,!0,!0);break;case"yyy":e=je(0,3,0,!1,!0);break;case"yyyy":e=je(0,4,0,!1,!0);break;case"Y":e=ic(1);break;case"YY":e=ic(2,!0);break;case"YYY":e=ic(3);break;case"YYYY":e=ic(4);break;case"M":case"L":e=je(1,1,1);break;case"MM":case"LL":e=je(1,2,1);break;case"MMM":e=Se(2,De.Abbreviated);break;case"MMMM":e=Se(2,De.Wide);break;case"MMMMM":e=Se(2,De.Narrow);break;case"LLL":e=Se(2,De.Abbreviated,mt.Standalone);break;case"LLLL":e=Se(2,De.Wide,mt.Standalone);break;case"LLLLL":e=Se(2,De.Narrow,mt.Standalone);break;case"w":e=ch(1);break;case"ww":e=ch(2);break;case"W":e=ch(1,!0);break;case"d":e=je(2,1);break;case"dd":e=je(2,2);break;case"c":case"cc":e=je(7,1);break;case"ccc":e=Se(1,De.Abbreviated,mt.Standalone);break;case"cccc":e=Se(1,De.Wide,mt.Standalone);break;case"ccccc":e=Se(1,De.Narrow,mt.Standalone);break;case"cccccc":e=Se(1,De.Short,mt.Standalone);break;case"E":case"EE":case"EEE":e=Se(1,De.Abbreviated);break;case"EEEE":e=Se(1,De.Wide);break;case"EEEEE":e=Se(1,De.Narrow);break;case"EEEEEE":e=Se(1,De.Short);break;case"a":case"aa":case"aaa":e=Se(0,De.Abbreviated);break;case"aaaa":e=Se(0,De.Wide);break;case"aaaaa":e=Se(0,De.Narrow);break;case"b":case"bb":case"bbb":e=Se(0,De.Abbreviated,mt.Standalone,!0);break;case"bbbb":e=Se(0,De.Wide,mt.Standalone,!0);break;case"bbbbb":e=Se(0,De.Narrow,mt.Standalone,!0);break;case"B":case"BB":case"BBB":e=Se(0,De.Abbreviated,mt.Format,!0);break;case"BBBB":e=Se(0,De.Wide,mt.Format,!0);break;case"BBBBB":e=Se(0,De.Narrow,mt.Format,!0);break;case"h":e=je(3,1,-12);break;case"hh":e=je(3,2,-12);break;case"H":e=je(3,1);break;case"HH":e=je(3,2);break;case"m":e=je(4,1);break;case"mm":e=je(4,2);break;case"s":e=je(5,1);break;case"ss":e=je(5,2);break;case"S":e=je(6,1);break;case"SS":e=je(6,2);break;case"SSS":e=je(6,3);break;case"Z":case"ZZ":case"ZZZ":e=nc(0);break;case"ZZZZZ":e=nc(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=nc(1);break;case"OOOO":case"ZZZZ":case"zzzz":e=nc(2);break;default:return null}return uh[t]=e,e}function xy(t,e){t=t.replace(/:/g,"");let n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function vT(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}function yT(t,e,n){let i=n?-1:1,r=t.getTimezoneOffset(),o=xy(e,r);return vT(t,i*(o-r))}function _T(t){if(wy(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[r,o=1,s=1]=t.split("-").map(a=>+a);return sc(r,o-1,s)}let n=parseFloat(t);if(!isNaN(t-n))return new Date(n);let i;if(i=t.match(lT))return wT(i)}let e=new Date(t);if(!wy(e))throw new Error(`Unable to convert "${t}" into a date`);return e}function wT(t){let e=new Date(0),n=0,i=0,r=t[8]?e.setUTCFullYear:e.setFullYear,o=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),i=Number(t[9]+t[11])),r.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));let s=Number(t[4]||0)-n,a=Number(t[5]||0)-i,l=Number(t[6]||0),c=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return o.call(e,s,a,l,c),e}function wy(t){return t instanceof Date&&!isNaN(t.valueOf())}function lc(t,e){e=encodeURIComponent(e);for(let n of t.split(";")){let i=n.indexOf("="),[r,o]=i==-1?[n,""]:[n.slice(0,i),n.slice(i+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var dh=/\s+/,Cy=[],Rt=(()=>{class t{_ngEl;_renderer;initialClasses=Cy;rawClass;stateMap=new Map;constructor(n,i){this._ngEl=n,this._renderer=i}set klass(n){this.initialClasses=n!=null?n.trim().split(dh):Cy}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(dh):n}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let i of n)this._updateState(i,!0);else if(n!=null)for(let i of Object.keys(n))this._updateState(i,!!n[i]);this._applyStateDiff()}_updateState(n,i){let r=this.stateMap.get(n);r!==void 0?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(n,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let i=n[0],r=n[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(n,i){n=n.trim(),n.length>0&&n.split(dh).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static \u0275fac=function(i){return new(i||t)(D(ae),D(lt))};static \u0275dir=ye({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})();var Ry=(()=>{class t{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(n,i,r){this._ngEl=n,this._differs=i,this._renderer=r}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,i){let[r,o]=n.split("."),s=r.indexOf("-")===-1?void 0:Tn.DashCase;i!=null?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(n){n.forEachRemovedItem(i=>this._setStyle(i.key,null)),n.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),n.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}static \u0275fac=function(i){return new(i||t)(D(ae),D(ah),D(lt))};static \u0275dir=ye({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return t})(),Ay=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(n){this._viewContainerRef=n}ngOnChanges(n){if(this._shouldRecreateView(n)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,i,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,r):!1,get:(n,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}static \u0275fac=function(i){return new(i||t)(D(tr))};static \u0275dir=ye({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[un]})}return t})();function Ny(t,e){return new F(2100,!1)}var fh=class{createSubscription(e,n){return Mn(()=>e.subscribe({next:n,error:i=>{throw i}}))}dispose(e){Mn(()=>e.unsubscribe())}},hh=class{createSubscription(e,n){return e.then(n,i=>{throw i})}dispose(e){}},CT=new hh,DT=new fh,ky=(()=>{class t{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;constructor(n){this._ref=n}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(n){if(!this._obj){if(n)try{this.markForCheckOnValueUpdate=!1,this._subscribe(n)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return n!==this._obj?(this._dispose(),this.transform(n)):this._latestValue}_subscribe(n){this._obj=n,this._strategy=this._selectStrategy(n),this._subscription=this._strategy.createSubscription(n,i=>this._updateLatestValue(n,i))}_selectStrategy(n){if(yi(n))return CT;if(nh(n))return DT;throw Ny(t,n)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(n,i){n===this._obj&&(this._latestValue=i,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(i){return new(i||t)(D($t,16))};static \u0275pipe=nr({name:"async",type:t,pure:!1})}return t})();var bT="mediumDate",ET=new P(""),ST=new P(""),ds=(()=>{class t{locale;defaultTimezone;defaultOptions;constructor(n,i,r){this.locale=n,this.defaultTimezone=i,this.defaultOptions=r}transform(n,i,r,o){if(n==null||n===""||n!==n)return null;try{let s=i??this.defaultOptions?.dateFormat??bT,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return uT(n,s,o||this.locale,a)}catch(s){throw Ny(t,s.message)}}static \u0275fac=function(i){return new(i||t)(D(Yl,16),D(ET,24),D(ST,24))};static \u0275pipe=nr({name:"date",type:t,pure:!0})}return t})();var Ci=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=rt({type:t});static \u0275inj=it({})}return t})(),Oy="browser",IT="server";function yh(t){return t===IT}var Py=(()=>{class t{static \u0275prov=R({token:t,providedIn:"root",factory:()=>new ph(b(ut),window)})}return t})(),ph=class{document;window;offset=()=>[0,0];constructor(e,n){this.document=e,this.window=n}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(e){this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){let n=TT(this.document,e);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(e){this.window.history.scrollRestoration=e}scrollToElement(e){let n=e.getBoundingClientRect(),i=n.left+this.window.pageXOffset,r=n.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}};function TT(t,e){let n=t.getElementById(e)||t.getElementsByName(e)[0];if(n)return n;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),r=i.currentNode;for(;r;){let o=r.shadowRoot;if(o){let s=o.getElementById(e)||o.querySelector(`[name="${e}"]`);if(s)return s}r=i.nextNode()}}return null}var Zr=class{};var hs=class{},uc=class{},sr=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
`).forEach(n=>{let i=n.indexOf(":");if(i>0){let r=n.slice(0,i),o=n.slice(i+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((n,i)=>{this.addHeaderEntry(i,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([n,i])=>{this.setHeaderEntries(n,i)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let n=this.headers.get(e.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,n){return this.clone({name:e,value:n,op:"a"})}set(e,n){return this.clone({name:e,value:n,op:"s"})}delete(e,n){return this.clone({name:e,value:n,op:"d"})}maybeSetNormalizedName(e,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(n=>{this.headers.set(n,e.headers.get(n)),this.normalizedNames.set(n,e.normalizedNames.get(n))})}clone(e){let n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n}applyUpdate(e){let n=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(e.name,n);let r=(e.op==="a"?this.headers.get(n):void 0)||[];r.push(...i),this.headers.set(n,r);break;case"d":let o=e.value;if(!o)this.headers.delete(n),this.normalizedNames.delete(n);else{let s=this.headers.get(n);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,s)}break}}addHeaderEntry(e,n){let i=e.toLowerCase();this.maybeSetNormalizedName(e,i),this.headers.has(i)?this.headers.get(i).push(n):this.headers.set(i,[n])}setHeaderEntries(e,n){let i=(Array.isArray(n)?n:[n]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>e(this.normalizedNames.get(n),this.headers.get(n)))}};var wh=class{encodeKey(e){return Fy(e)}encodeValue(e){return Fy(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function MT(t,e){let n=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=n.get(s)||[];l.push(a),n.set(s,l)}),n}var xT=/%(\d[a-f0-9])/gi,RT={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Fy(t){return encodeURIComponent(t).replace(xT,(e,n)=>RT[n]??e)}function cc(t){return`${t}`}var Di=class t{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new wh,e.fromString){if(e.fromObject)throw new F(2805,!1);this.map=MT(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(n=>{let i=e.fromObject[n],r=Array.isArray(i)?i.map(cc):[cc(i)];this.map.set(n,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let n=this.map.get(e);return n?n[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,n){return this.clone({param:e,value:n,op:"a"})}appendAll(e){let n=[];return Object.keys(e).forEach(i=>{let r=e[i];Array.isArray(r)?r.forEach(o=>{n.push({param:i,value:o,op:"a"})}):n.push({param:i,value:r,op:"a"})}),this.clone(n)}set(e,n){return this.clone({param:e,value:n,op:"s"})}delete(e,n){return this.clone({param:e,value:n,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let n=this.encoder.encodeKey(e);return this.map.get(e).map(i=>n+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(e),n}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let n=(e.op==="a"?this.map.get(e.param):void 0)||[];n.push(cc(e.value)),this.map.set(e.param,n);break;case"d":if(e.value!==void 0){let i=this.map.get(e.param)||[],r=i.indexOf(cc(e.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var Ch=class{map=new Map;set(e,n){return this.map.set(e,n),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function AT(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Ly(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function Vy(t){return typeof Blob<"u"&&t instanceof Blob}function jy(t){return typeof FormData<"u"&&t instanceof FormData}function NT(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var Uy="Content-Type",By="Accept",Wy="X-Request-URL",Gy="text/plain",qy="application/json",kT=`${qy}, ${Gy}, */*`,fs=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(e,n,i,r){this.url=n,this.method=e.toUpperCase();let o;if(AT(this.method)||r?(this.body=i!==void 0?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new sr,this.context??=new Ch,!this.params)this.params=new Di,this.urlWithParams=n;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=n;else{let a=n.indexOf("?"),l=a===-1?"?":a<n.length-1?"&":"";this.urlWithParams=n+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Ly(this.body)||Vy(this.body)||jy(this.body)||NT(this.body)?this.body:this.body instanceof Di?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||jy(this.body)?null:Vy(this.body)?this.body.type||null:Ly(this.body)?null:typeof this.body=="string"?Gy:this.body instanceof Di?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?qy:null}clone(e={}){let n=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=e.transferCache??this.transferCache,s=e.body!==void 0?e.body:this.body,a=e.withCredentials??this.withCredentials,l=e.reportProgress??this.reportProgress,c=e.headers||this.headers,u=e.params||this.params,d=e.context??this.context;return e.setHeaders!==void 0&&(c=Object.keys(e.setHeaders).reduce((f,p)=>f.set(p,e.setHeaders[p]),c)),e.setParams&&(u=Object.keys(e.setParams).reduce((f,p)=>f.set(p,e.setParams[p]),u)),new t(n,i,s,{params:u,headers:c,context:d,reportProgress:l,responseType:r,withCredentials:a,transferCache:o})}},Kr=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}(Kr||{}),ps=class{headers;status;statusText;url;ok;type;constructor(e,n=200,i="OK"){this.headers=e.headers||new sr,this.status=e.status!==void 0?e.status:n,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},Dh=class t extends ps{constructor(e={}){super(e)}type=Kr.ResponseHeader;clone(e={}){return new t({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},dc=class t extends ps{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Kr.Response;clone(e={}){return new t({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},fc=class extends ps{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},OT=200,PT=204;function _h(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}var bh=(()=>{class t{handler;constructor(n){this.handler=n}request(n,i,r={}){let o;if(n instanceof fs)o=n;else{let l;r.headers instanceof sr?l=r.headers:l=new sr(r.headers);let c;r.params&&(r.params instanceof Di?c=r.params:c=new Di({fromObject:r.params})),o=new fs(n,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache})}let s=B(o).pipe(Vn(l=>this.handler.handle(l)));if(n instanceof fs||r.observe==="events")return s;let a=s.pipe(Dt(l=>l instanceof dc));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(W(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new F(2806,!1);return l.body}));case"blob":return a.pipe(W(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new F(2807,!1);return l.body}));case"text":return a.pipe(W(l=>{if(l.body!==null&&typeof l.body!="string")throw new F(2808,!1);return l.body}));case"json":default:return a.pipe(W(l=>l.body))}case"response":return a;default:throw new F(2809,!1)}}delete(n,i={}){return this.request("DELETE",n,i)}get(n,i={}){return this.request("GET",n,i)}head(n,i={}){return this.request("HEAD",n,i)}jsonp(n,i){return this.request("JSONP",n,{params:new Di().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,i={}){return this.request("OPTIONS",n,i)}patch(n,i,r={}){return this.request("PATCH",n,_h(r,i))}post(n,i,r={}){return this.request("POST",n,_h(r,i))}put(n,i,r={}){return this.request("PUT",n,_h(r,i))}static \u0275fac=function(i){return new(i||t)(O(hs))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();var FT=new P("");function Qy(t,e){return e(t)}function LT(t,e){return(n,i)=>e.intercept(n,{handle:r=>t(r,i)})}function VT(t,e,n){return(i,r)=>It(n,()=>e(i,o=>t(o,r)))}var jT=new P(""),Eh=new P(""),UT=new P(""),Yy=new P("",{providedIn:"root",factory:()=>!0});function BT(){let t=null;return(e,n)=>{t===null&&(t=(b(jT,{optional:!0})??[]).reduceRight(LT,Qy));let i=b(Qn);if(b(Yy)){let o=i.add();return t(e,n).pipe(ui(()=>i.remove(o)))}else return t(e,n)}}var $y=(()=>{class t extends hs{backend;injector;chain=null;pendingTasks=b(Qn);contributeToStability=b(Yy);constructor(n,i){super(),this.backend=n,this.injector=i}handle(n){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(Eh),...this.injector.get(UT,[])]));this.chain=i.reduceRight((r,o)=>VT(r,o,this.injector),Qy)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(n,r=>this.backend.handle(r)).pipe(ui(()=>this.pendingTasks.remove(i)))}else return this.chain(n,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||t)(O(uc),O(nt))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();var $T=/^\)\]\}',?\n/,HT=RegExp(`^${Wy}:`,"m");function zT(t){return"responseURL"in t&&t.responseURL?t.responseURL:HT.test(t.getAllResponseHeaders())?t.getResponseHeader(Wy):null}var Hy=(()=>{class t{xhrFactory;constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new F(-2800,!1);let i=this.xhrFactory;return(i.\u0275loadImpl?be(i.\u0275loadImpl()):B(null)).pipe(bt(()=>new z(o=>{let s=i.build();if(s.open(n.method,n.urlWithParams),n.withCredentials&&(s.withCredentials=!0),n.headers.forEach((g,_)=>s.setRequestHeader(g,_.join(","))),n.headers.has(By)||s.setRequestHeader(By,kT),!n.headers.has(Uy)){let g=n.detectContentTypeHeader();g!==null&&s.setRequestHeader(Uy,g)}if(n.responseType){let g=n.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=n.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=s.statusText||"OK",_=new sr(s.getAllResponseHeaders()),y=zT(s)||n.url;return l=new Dh({headers:_,status:s.status,statusText:g,url:y}),l},u=()=>{let{headers:g,status:_,statusText:y,url:M}=c(),A=null;_!==PT&&(A=typeof s.response>"u"?s.responseText:s.response),_===0&&(_=A?OT:0);let T=_>=200&&_<300;if(n.responseType==="json"&&typeof A=="string"){let N=A;A=A.replace($T,"");try{A=A!==""?JSON.parse(A):null}catch(X){A=N,T&&(T=!1,A={error:X,text:A})}}T?(o.next(new dc({body:A,headers:g,status:_,statusText:y,url:M||void 0})),o.complete()):o.error(new fc({error:A,headers:g,status:_,statusText:y,url:M||void 0}))},d=g=>{let{url:_}=c(),y=new fc({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:_||void 0});o.error(y)},f=!1,p=g=>{f||(o.next(c()),f=!0);let _={type:Kr.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(_.total=g.total),n.responseType==="text"&&s.responseText&&(_.partialText=s.responseText),o.next(_)},h=g=>{let _={type:Kr.UploadProgress,loaded:g.loaded};g.lengthComputable&&(_.total=g.total),o.next(_)};return s.addEventListener("load",u),s.addEventListener("error",d),s.addEventListener("timeout",d),s.addEventListener("abort",d),n.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",h)),s.send(a),o.next({type:Kr.Sent}),()=>{s.removeEventListener("error",d),s.removeEventListener("abort",d),s.removeEventListener("load",u),s.removeEventListener("timeout",d),n.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",h)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||t)(O(Zr))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Zy=new P(""),WT="XSRF-TOKEN",GT=new P("",{providedIn:"root",factory:()=>WT}),qT="X-XSRF-TOKEN",QT=new P("",{providedIn:"root",factory:()=>qT}),hc=class{},YT=(()=>{class t{doc;platform;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(n,i,r){this.doc=n,this.platform=i,this.cookieName=r}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=lc(n,this.cookieName),this.lastCookieString=n),this.lastToken}static \u0275fac=function(i){return new(i||t)(O(ut),O(er),O(GT))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();function ZT(t,e){let n=t.url.toLowerCase();if(!b(Zy)||t.method==="GET"||t.method==="HEAD"||n.startsWith("http://")||n.startsWith("https://"))return e(t);let i=b(hc).getToken(),r=b(QT);return i!=null&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,i)})),e(t)}var Xy=function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t}(Xy||{});function XT(t,e){return{\u0275kind:t,\u0275providers:e}}function Ky(...t){let e=[bh,Hy,$y,{provide:hs,useExisting:$y},{provide:uc,useFactory:()=>b(FT,{optional:!0})??b(Hy)},{provide:Eh,useValue:ZT,multi:!0},{provide:Zy,useValue:!0},{provide:hc,useClass:YT}];for(let n of t)e.push(...n.\u0275providers);return Jo(e)}var zy=new P("");function Jy(){return XT(Xy.LegacyInterceptors,[{provide:zy,useFactory:BT},{provide:Eh,useExisting:zy,multi:!0}])}var Ih=class extends oc{supportsDOMEvents=!0},Th=class t extends Ih{static makeCurrent(){by(new t)}onAndCancel(e,n,i,r){return e.addEventListener(n,i,r),()=>{e.removeEventListener(n,i,r)}}dispatchEvent(e,n){e.dispatchEvent(n)}remove(e){e.remove()}createElement(e,n){return n=n||this.getDefaultDocument(),n.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,n){return n==="window"?window:n==="document"?e:n==="body"?e.body:null}getBaseHref(e){let n=JT();return n==null?null:eM(n)}resetBaseElement(){gs=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return lc(document.cookie,e)}},gs=null;function JT(){return gs=gs||document.querySelector("base"),gs?gs.getAttribute("href"):null}function eM(t){return new URL(t,document.baseURI).pathname}var Mh=class{addToWindow(e){ft.getAngularTestability=(i,r=!0)=>{let o=e.findTestabilityInTree(i,r);if(o==null)throw new F(5103,!1);return o},ft.getAllAngularTestabilities=()=>e.getAllTestabilities(),ft.getAllAngularRootElements=()=>e.getAllRootElements();let n=i=>{let r=ft.getAllAngularTestabilities(),o=r.length,s=function(){o--,o==0&&i()};r.forEach(a=>{a.whenStable(s)})};ft.frameworkStabilizers||(ft.frameworkStabilizers=[]),ft.frameworkStabilizers.push(n)}findTestabilityInTree(e,n,i){if(n==null)return null;let r=e.getTestability(n);return r??(i?xn().isShadowRoot(n)?this.findTestabilityInTree(e,n.host,!0):this.findTestabilityInTree(e,n.parentElement,!0):null)}},tM=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),xh=new P(""),o_=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,i){this._zone=i,n.forEach(r=>{r.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,i,r,o){return this._findPluginFor(i).addEventListener(n,i,r,o)}getZone(){return this._zone}_findPluginFor(n){let i=this._eventNameToPlugin.get(n);if(i)return i;if(i=this._plugins.find(o=>o.supports(n)),!i)throw new F(5101,!1);return this._eventNameToPlugin.set(n,i),i}static \u0275fac=function(i){return new(i||t)(O(xh),O(Te))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),gc=class{_doc;constructor(e){this._doc=e}manager},pc="ng-app-id";function e_(t){for(let e of t)e.remove()}function t_(t,e){let n=e.createElement("style");return n.textContent=t,n}function nM(t,e,n,i){let r=t.head?.querySelectorAll(`style[${pc}="${e}"],link[${pc}="${e}"]`);if(r)for(let o of r)o.removeAttribute(pc),o instanceof HTMLLinkElement?i.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&n.set(o.textContent,{usage:0,elements:[o]})}function Rh(t,e){let n=e.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",t),n}var s_=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(n,i,r,o={}){this.doc=n,this.appId=i,this.nonce=r,this.isServer=yh(o),nM(n,i,this.inline,this.external),this.hosts.add(n.head)}addStyles(n,i){for(let r of n)this.addUsage(r,this.inline,t_);i?.forEach(r=>this.addUsage(r,this.external,Rh))}removeStyles(n,i){for(let r of n)this.removeUsage(r,this.inline);i?.forEach(r=>this.removeUsage(r,this.external))}addUsage(n,i,r){let o=i.get(n);o?o.usage++:i.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(n,this.doc)))})}removeUsage(n,i){let r=i.get(n);r&&(r.usage--,r.usage<=0&&(e_(r.elements),i.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])e_(n);this.hosts.clear()}addHost(n){this.hosts.add(n);for(let[i,{elements:r}]of this.inline)r.push(this.addElement(n,t_(i,this.doc)));for(let[i,{elements:r}]of this.external)r.push(this.addElement(n,Rh(i,this.doc)))}removeHost(n){this.hosts.delete(n)}addElement(n,i){return this.nonce&&i.setAttribute("nonce",this.nonce),this.isServer&&i.setAttribute(pc,this.appId),n.appendChild(i)}static \u0275fac=function(i){return new(i||t)(O(ut),O(xf),O(Af,8),O(er))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Sh={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Nh=/%COMP%/g;var a_="%COMP%",iM=`_nghost-${a_}`,rM=`_ngcontent-${a_}`,oM=!0,sM=new P("",{providedIn:"root",factory:()=>oM});function aM(t){return rM.replace(Nh,t)}function lM(t){return iM.replace(Nh,t)}function l_(t,e){return e.map(n=>n.replace(Nh,t))}var n_=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(n,i,r,o,s,a,l,c=null,u=null){this.eventManager=n,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=l,this.nonce=c,this.tracingService=u,this.platformIsServer=yh(a),this.defaultRenderer=new ms(n,s,l,this.platformIsServer,this.tracingService)}createRenderer(n,i){if(!n||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===In.ShadowDom&&(i=le(x({},i),{encapsulation:In.Emulated}));let r=this.getOrCreateRenderer(n,i);return r instanceof mc?r.applyToHost(n):r instanceof vs&&r.applyStyles(),r}getOrCreateRenderer(n,i){let r=this.rendererByCompId,o=r.get(i.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,d=this.platformIsServer,f=this.tracingService;switch(i.encapsulation){case In.Emulated:o=new mc(l,c,i,this.appId,u,s,a,d,f);break;case In.ShadowDom:return new Ah(l,c,n,i,s,a,this.nonce,d,f);default:o=new vs(l,c,i,u,s,a,d,f);break}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(i){return new(i||t)(O(o_),O(s_),O(xf),O(sM),O(ut),O(er),O(Te),O(Af),O(qr,8))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),ms=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,n,i,r,o){this.eventManager=e,this.doc=n,this.ngZone=i,this.platformIsServer=r,this.tracingService=o}destroy(){}destroyNode=null;createElement(e,n){return n?this.doc.createElementNS(Sh[n]||n,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,n){(i_(e)?e.content:e).appendChild(n)}insertBefore(e,n,i){e&&(i_(e)?e.content:e).insertBefore(n,i)}removeChild(e,n){n.remove()}selectRootElement(e,n){let i=typeof e=="string"?this.doc.querySelector(e):e;if(!i)throw new F(-5104,!1);return n||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,n,i,r){if(r){n=r+":"+n;let o=Sh[r];o?e.setAttributeNS(o,n,i):e.setAttribute(n,i)}else e.setAttribute(n,i)}removeAttribute(e,n,i){if(i){let r=Sh[i];r?e.removeAttributeNS(r,n):e.removeAttribute(`${i}:${n}`)}else e.removeAttribute(n)}addClass(e,n){e.classList.add(n)}removeClass(e,n){e.classList.remove(n)}setStyle(e,n,i,r){r&(Tn.DashCase|Tn.Important)?e.style.setProperty(n,i,r&Tn.Important?"important":""):e.style[n]=i}removeStyle(e,n,i){i&Tn.DashCase?e.style.removeProperty(n):e.style[n]=""}setProperty(e,n,i){e!=null&&(e[n]=i)}setValue(e,n){e.nodeValue=n}listen(e,n,i,r){if(typeof e=="string"&&(e=xn().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${n}`);let o=this.decoratePreventDefault(i);return this.tracingService!==null&&this.tracingService.wrapEventListener&&(o=this.tracingService.wrapEventListener(e,n,o)),this.eventManager.addEventListener(e,n,o,r)}decoratePreventDefault(e){return n=>{if(n==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(n)):e(n))===!1&&n.preventDefault()}}};function i_(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var Ah=class extends ms{sharedStylesHost;hostEl;shadowRoot;constructor(e,n,i,r,o,s,a,l,c){super(e,o,s,l,c),this.sharedStylesHost=n,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=r.styles;u=l_(r.id,u);for(let f of u){let p=document.createElement("style");a&&p.setAttribute("nonce",a),p.textContent=f,this.shadowRoot.appendChild(p)}let d=r.getExternalStyles?.();if(d)for(let f of d){let p=Rh(f,o);a&&p.setAttribute("nonce",a),this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,n){return super.appendChild(this.nodeOrShadowRoot(e),n)}insertBefore(e,n,i){return super.insertBefore(this.nodeOrShadowRoot(e),n,i)}removeChild(e,n){return super.removeChild(null,n)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},vs=class extends ms{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,n,i,r,o,s,a,l,c){super(e,o,s,a,l),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=r;let u=i.styles;this.styles=c?l_(c,u):u,this.styleUrls=i.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},mc=class extends vs{contentAttr;hostAttr;constructor(e,n,i,r,o,s,a,l,c){let u=r+"-"+i.id;super(e,n,i,o,s,a,l,c,u),this.contentAttr=aM(u),this.hostAttr=lM(u)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,n){let i=super.createElement(e,n);return super.setAttribute(i,this.contentAttr,""),i}},cM=(()=>{class t extends gc{constructor(n){super(n)}supports(n){return!0}addEventListener(n,i,r,o){return n.addEventListener(i,r,o),()=>this.removeEventListener(n,i,r,o)}removeEventListener(n,i,r,o){return n.removeEventListener(i,r,o)}static \u0275fac=function(i){return new(i||t)(O(ut))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),r_=["alt","control","meta","shift"],uM={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},dM={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},fM=(()=>{class t extends gc{constructor(n){super(n)}supports(n){return t.parseEventName(n)!=null}addEventListener(n,i,r,o){let s=t.parseEventName(i),a=t.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>xn().onAndCancel(n,s.domEventName,a,o))}static parseEventName(n){let i=n.toLowerCase().split("."),r=i.shift();if(i.length===0||!(r==="keydown"||r==="keyup"))return null;let o=t._normalizeKey(i.pop()),s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),r_.forEach(c=>{let u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,i.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(n,i){let r=uM[n.key]||n.key,o="";return i.indexOf("code.")>-1&&(r=n.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),r_.forEach(s=>{if(s!==r){let a=dM[s];a(n)&&(o+=s+".")}}),o+=r,o===i)}static eventCallback(n,i,r){return o=>{t.matchEventFullKeyCode(o,n)&&r.runGuarded(()=>i(o))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(i){return new(i||t)(O(ut))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();function hM(){Th.makeCurrent()}function pM(){return new Wn}function gM(){return Xv(document),document}var mM=[{provide:er,useValue:Oy},{provide:Rf,useValue:hM,multi:!0},{provide:ut,useFactory:gM,deps:[]}],c_=sh(py,"browser",mM);var vM=[{provide:ls,useClass:Mh,deps:[]},{provide:eh,useClass:$l,deps:[Te,Hl,ls]},{provide:$l,useClass:$l,deps:[Te,Hl,ls]}],yM=[{provide:El,useValue:"root"},{provide:Wn,useFactory:pM,deps:[]},{provide:xh,useClass:cM,multi:!0,deps:[ut]},{provide:xh,useClass:fM,multi:!0,deps:[ut]},n_,s_,o_,{provide:$r,useExisting:n_},{provide:Zr,useClass:tM,deps:[]},[]],u_=(()=>{class t{constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275mod=rt({type:t});static \u0275inj=it({providers:[...yM,...vM],imports:[Ci,gy]})}return t})();var d_=(()=>{class t{_doc;constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}static \u0275fac=function(i){return new(i||t)(O(ut))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var C_=(()=>{class t{_renderer;_elementRef;onChange=n=>{};onTouched=()=>{};constructor(n,i){this._renderer=n,this._elementRef=i}setProperty(n,i){this._renderer.setProperty(this._elementRef.nativeElement,n,i)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}static \u0275fac=function(i){return new(i||t)(D(lt),D(ae))};static \u0275dir=ye({type:t})}return t})(),Lh=(()=>{class t extends C_{static \u0275fac=(()=>{let n;return function(r){return(n||(n=fn(t)))(r||t)}})();static \u0275dir=ye({type:t,features:[ct]})}return t})(),no=new P(""),_M={provide:no,useExisting:Zt(()=>Vh),multi:!0},Vh=(()=>{class t extends Lh{writeValue(n){this.setProperty("checked",n)}static \u0275fac=(()=>{let n;return function(r){return(n||(n=fn(t)))(r||t)}})();static \u0275dir=ye({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&k("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[Yn([_M]),ct]})}return t})(),wM={provide:no,useExisting:Zt(()=>Dc),multi:!0};function CM(){let t=xn()?xn().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var DM=new P(""),Dc=(()=>{class t extends C_{_compositionMode;_composing=!1;constructor(n,i,r){super(n,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!CM())}writeValue(n){let i=n??"";this.setProperty("value",i)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}static \u0275fac=function(i){return new(i||t)(D(lt),D(ae),D(DM,8))};static \u0275dir=ye({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&k("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[Yn([wM]),ct]})}return t})();function yc(t){return t==null||(typeof t=="string"||Array.isArray(t))&&t.length===0}var bs=new P(""),bM=new P("");function EM(t){return e=>{if(yc(e.value)||yc(t))return null;let n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}}function SM(t){return e=>{if(yc(e.value)||yc(t))return null;let n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}function h_(t){return null}function D_(t){return t!=null}function b_(t){return yi(t)?be(t):t}function E_(t){let e={};return t.forEach(n=>{e=n!=null?x(x({},e),n):e}),Object.keys(e).length===0?null:e}function S_(t,e){return e.map(n=>n(t))}function IM(t){return!t.validate}function I_(t){return t.map(e=>IM(e)?e:n=>e.validate(n))}function TM(t){if(!t)return null;let e=t.filter(D_);return e.length==0?null:function(n){return E_(S_(n,e))}}function T_(t){return t!=null?TM(I_(t)):null}function MM(t){if(!t)return null;let e=t.filter(D_);return e.length==0?null:function(n){let i=S_(n,e).map(b_);return Zu(i).pipe(W(E_))}}function M_(t){return t!=null?MM(I_(t)):null}function p_(t,e){return t===null?[e]:Array.isArray(t)?[...t,e]:[t,e]}function xM(t){return t._rawValidators}function RM(t){return t._rawAsyncValidators}function kh(t){return t?Array.isArray(t)?t:[t]:[]}function _c(t,e){return Array.isArray(t)?t.includes(e):t===e}function g_(t,e){let n=kh(e);return kh(t).forEach(r=>{_c(n,r)||n.push(r)}),n}function m_(t,e){return kh(e).filter(n=>!_c(t,n))}var wc=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=T_(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=M_(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,n){return this.control?this.control.hasError(e,n):!1}getError(e,n){return this.control?this.control.getError(e,n):null}},Oh=class extends wc{name;get formDirective(){return null}get path(){return null}},Ds=class extends wc{_parent=null;name=null;valueAccessor=null},Ph=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},AM={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},i5=le(x({},AM),{"[class.ng-submitted]":"isSubmitted"}),bc=(()=>{class t extends Ph{constructor(n){super(n)}static \u0275fac=function(i){return new(i||t)(D(Ds,2))};static \u0275dir=ye({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ih("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[ct]})}return t})();var ys="VALID",vc="INVALID",Jr="PENDING",_s="DISABLED",to=class{},Cc=class extends to{value;source;constructor(e,n){super(),this.value=e,this.source=n}},ws=class extends to{pristine;source;constructor(e,n){super(),this.pristine=e,this.source=n}},Cs=class extends to{touched;source;constructor(e,n){super(),this.touched=e,this.source=n}},eo=class extends to{status;source;constructor(e,n){super(),this.status=e,this.source=n}};function NM(t){return(Ec(t)?t.validators:t)||null}function kM(t){return Array.isArray(t)?T_(t):t||null}function OM(t,e){return(Ec(e)?e.asyncValidators:t)||null}function PM(t){return Array.isArray(t)?M_(t):t||null}function Ec(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}var Fh=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,n){this._assignValidators(e),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Mn(this.statusReactive)}set status(e){Mn(()=>this.statusReactive.set(e))}_status=Zl(()=>this.statusReactive());statusReactive=kl(void 0);get valid(){return this.status===ys}get invalid(){return this.status===vc}get pending(){return this.status==Jr}get disabled(){return this.status===_s}get enabled(){return this.status!==_s}errors;get pristine(){return Mn(this.pristineReactive)}set pristine(e){Mn(()=>this.pristineReactive.set(e))}_pristine=Zl(()=>this.pristineReactive());pristineReactive=kl(!0);get dirty(){return!this.pristine}get touched(){return Mn(this.touchedReactive)}set touched(e){Mn(()=>this.touchedReactive.set(e))}_touched=Zl(()=>this.touchedReactive());touchedReactive=kl(!1);get untouched(){return!this.touched}_events=new H;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(g_(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(g_(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(m_(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(m_(e,this._rawAsyncValidators))}hasValidator(e){return _c(this._rawValidators,e)}hasAsyncValidator(e){return _c(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let n=this.touched===!1;this.touched=!0;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(le(x({},e),{sourceControl:i})),n&&e.emitEvent!==!1&&this._events.next(new Cs(!0,i))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(n=>n.markAllAsTouched(e))}markAsUntouched(e={}){let n=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i),n&&e.emitEvent!==!1&&this._events.next(new Cs(!1,i))}markAsDirty(e={}){let n=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(le(x({},e),{sourceControl:i})),n&&e.emitEvent!==!1&&this._events.next(new ws(!1,i))}markAsPristine(e={}){let n=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),n&&e.emitEvent!==!1&&this._events.next(new ws(!0,i))}markAsPending(e={}){this.status=Jr;let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new eo(this.status,n)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(le(x({},e),{sourceControl:n}))}disable(e={}){let n=this._parentMarkedDirty(e.onlySelf);this.status=_s,this.errors=null,this._forEachChild(r=>{r.disable(le(x({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Cc(this.value,i)),this._events.next(new eo(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(le(x({},e),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let n=this._parentMarkedDirty(e.onlySelf);this.status=ys,this._forEachChild(i=>{i.enable(le(x({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(le(x({},e),{skipPristineCheck:n}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e,n){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},n),this._parent._updateTouched({},n))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===ys||this.status===Jr)&&this._runAsyncValidator(i,e.emitEvent)}let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Cc(this.value,n)),this._events.next(new eo(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(le(x({},e),{sourceControl:n}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?_s:ys}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,n){if(this.asyncValidator){this.status=Jr,this._hasOwnPendingAsyncValidator={emitEvent:n!==!1};let i=b_(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:n,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,n={}){this.errors=e,this._updateControlsErrors(n.emitEvent!==!1,this,n.shouldHaveEmitted)}get(e){let n=e;return n==null||(Array.isArray(n)||(n=n.split(".")),n.length===0)?null:n.reduce((i,r)=>i&&i._find(r),this)}getError(e,n){let i=n?this.get(n):this;return i&&i.errors?i.errors[e]:null}hasError(e,n){return!!this.getError(e,n)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,n,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new eo(this.status,n)),this._parent&&this._parent._updateControlsErrors(e,n,i)}_initObservables(){this.valueChanges=new ie,this.statusChanges=new ie}_calculateStatus(){return this._allControlsDisabled()?_s:this.errors?vc:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Jr)?Jr:this._anyControlsHaveStatus(vc)?vc:ys}_anyControlsHaveStatus(e){return this._anyControls(n=>n.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,n){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),r&&this._events.next(new ws(this.pristine,n))}_updateTouched(e={},n){this.touched=this._anyControlsTouched(),this._events.next(new Cs(this.touched,n)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Ec(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let n=this._parent&&this._parent.dirty;return!e&&!!n&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=kM(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=PM(this._rawAsyncValidators)}};var x_=new P("",{providedIn:"root",factory:()=>jh}),jh="always";function FM(t,e){return[...e.path,t]}function LM(t,e,n=jh){jM(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||n==="always")&&e.valueAccessor.setDisabledState?.(t.disabled),UM(t,e),$M(t,e),BM(t,e),VM(t,e)}function v_(t,e){t.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(e)})}function VM(t,e){if(e.valueAccessor.setDisabledState){let n=i=>{e.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}function jM(t,e){let n=xM(t);e.validator!==null?t.setValidators(p_(n,e.validator)):typeof n=="function"&&t.setValidators([n]);let i=RM(t);e.asyncValidator!==null?t.setAsyncValidators(p_(i,e.asyncValidator)):typeof i=="function"&&t.setAsyncValidators([i]);let r=()=>t.updateValueAndValidity();v_(e._rawValidators,r),v_(e._rawAsyncValidators,r)}function UM(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&R_(t,e)})}function BM(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&R_(t,e),t.updateOn!=="submit"&&t.markAsTouched()})}function R_(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function $M(t,e){let n=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}function HM(t,e){if(!t.hasOwnProperty("model"))return!1;let n=t.model;return n.isFirstChange()?!0:!Object.is(e,n.currentValue)}function zM(t){return Object.getPrototypeOf(t.constructor)===Lh}function WM(t,e){if(!e)return null;Array.isArray(e);let n,i,r;return e.forEach(o=>{o.constructor===Dc?n=o:zM(o)?i=o:r=o}),r||i||n||null}function y_(t,e){let n=t.indexOf(e);n>-1&&t.splice(n,1)}function __(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var GM=class extends Fh{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,n,i){super(NM(n),OM(i,n)),this._applyFormState(e),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ec(n)&&(n.nonNullable||n.initialValueIsDefault)&&(__(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,n={}){this.value=this._pendingValue=e,this._onChange.length&&n.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,n.emitViewToModelChange!==!1)),this.updateValueAndValidity(n)}patchValue(e,n={}){this.setValue(e,n)}reset(e=this.defaultValue,n={}){this._applyFormState(e),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){y_(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){y_(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){__(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var qM={provide:Ds,useExisting:Zt(()=>Es)},w_=Promise.resolve(),Es=(()=>{class t extends Ds{_changeDetectorRef;callSetDisabledState;control=new GM;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new ie;constructor(n,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=n,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=WM(this,o)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let i=n.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),HM(n,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(n){this.viewModel=n,this.update.emit(n)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){LM(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(n){w_.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let i=n.isDisabled.currentValue,r=i!==0&&or(i);w_.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?FM(n,this._parent):[n]}static \u0275fac=function(i){return new(i||t)(D(Oh,9),D(bs,10),D(bM,10),D(no,10),D($t,8),D(x_,8))};static \u0275dir=ye({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[Yn([qM]),ct,un]})}return t})();var QM={provide:no,useExisting:Zt(()=>Uh),multi:!0},Uh=(()=>{class t extends Lh{writeValue(n){let i=n??"";this.setProperty("value",i)}registerOnChange(n){this.onChange=i=>{n(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let n;return function(r){return(n||(n=fn(t)))(r||t)}})();static \u0275dir=ye({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&k("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[Yn([QM]),ct]})}return t})();function A_(t){return typeof t=="number"?t:parseFloat(t)}var N_=(()=>{class t{_validator=h_;_onChange;_enabled;ngOnChanges(n){if(this.inputName in n){let i=this.normalizeInput(n[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):h_,this._onChange&&this._onChange()}}validate(n){return this._validator(n)}registerOnValidatorChange(n){this._onChange=n}enabled(n){return n!=null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=ye({type:t,features:[un]})}return t})(),YM={provide:bs,useExisting:Zt(()=>Bh),multi:!0},Bh=(()=>{class t extends N_{max;inputName="max";normalizeInput=n=>A_(n);createValidator=n=>SM(n);static \u0275fac=(()=>{let n;return function(r){return(n||(n=fn(t)))(r||t)}})();static \u0275dir=ye({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Qr("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[Yn([YM]),ct]})}return t})(),ZM={provide:bs,useExisting:Zt(()=>$h),multi:!0},$h=(()=>{class t extends N_{min;inputName="min";normalizeInput=n=>A_(n);createValidator=n=>EM(n);static \u0275fac=(()=>{let n;return function(r){return(n||(n=fn(t)))(r||t)}})();static \u0275dir=ye({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Qr("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[Yn([ZM]),ct]})}return t})();var XM=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=rt({type:t});static \u0275inj=it({})}return t})();var k_=(()=>{class t{static withConfig(n){return{ngModule:t,providers:[{provide:x_,useValue:n.callSetDisabledState??jh}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=rt({type:t});static \u0275inj=it({imports:[XM]})}return t})();function mn(t,e){let n=e&&window.devicePixelRatio||1,i=t.clientWidth*n,r=t.clientHeight*n;n-Math.floor(n)>1e-6&&(i+=1,r+=.5),i=i|0,r=r|0,t.width!==i&&(t.width=i),t.height!==r&&(t.height=r);let o=t.getContext("2d");return o.save(),o.clearRect(0,0,t.width,t.height),o.scale(n,n),o}function io(t,e,n,i,r){t.beginPath(),t.rect(e,n,i,r),t.clip(),t.translate(e,n)}function vn(t){t.restore()}function KM(t){return Math.log(t)/Math.LN10}function Ie(t,e){return Math.log(t)/Math.log(e)}function Ss(t,e,n,i){if(e<=0)return 0;let r=t/(e+1e-10),o=Math.floor(KM(r));r/=Math.pow(10,o);let s=Math.round(r);return i===void 0?s%5&&(o?s>2&&(s=5):s=Math.floor((s+4)/5)*5):s%i&&(o?s=i:(s=Math.floor(s/i),s<1&&(s=1),s*=i)),n&&o<=0&&(o=0,s=1),s*Math.pow(10,o)}function ro(t){let e=1,n=Math.log10(t<0?-t:t);for(n<0?n=Math.floor(-n):n=0,t*=Math.pow(10,n);Math.abs(Math.round(t*e)-t*e)>1e-6;)e*=10,++n;return n}function ei(t){if(t===0)return 0;let e=Math.pow(10,ro(t));return Math.round(t*e)/e}var At=(()=>{let e=class e{};e.FontSizePx=12,e.StrokeStyle="#000";let t=e;return t})();var Xe={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};var Hh={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var F_=JM,P_={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function JM(t){var e,n=[],i=1,r;if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(t=String(t).toLowerCase(),Hh[t])n=Hh[t].slice(),r="rgb";else if(t==="transparent")i=0,r="rgb",n=[0,0,0];else if(t[0]==="#"){var o=t.slice(1),s=o.length,a=s<=4;i=1,a?(n=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],s===4&&(i=parseInt(o[3]+o[3],16)/255)):(n=[parseInt(o[0]+o[1],16),parseInt(o[2]+o[3],16),parseInt(o[4]+o[5],16)],s===8&&(i=parseInt(o[6]+o[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),r="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var l=e[1];r=l.replace(/a$/,"");var c=r==="cmyk"?4:r==="gray"?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),r==="color"&&(r=n.shift()),n=n.map(function(u,d){if(u[u.length-1]==="%")return u=parseFloat(u)/100,d===3?u:r==="rgb"?u*255:r[0]==="h"||r[0]==="l"&&!d?u*100:r==="lab"?u*125:r==="lch"?d<2?u*150:u*360:r[0]==="o"&&!d?u:r==="oklab"?u*.4:r==="oklch"?d<2?u*.4:u*360:u;if(r[d]==="h"||d===2&&r[r.length-1]==="h"){if(P_[u]!==void 0)return P_[u];if(u.endsWith("deg"))return parseFloat(u);if(u.endsWith("turn"))return parseFloat(u)*360;if(u.endsWith("grad"))return parseFloat(u)*360/400;if(u.endsWith("rad"))return parseFloat(u)*180/Math.PI}return u==="none"?0:parseFloat(u)}),i=n.length>c?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(u){return parseFloat(u)}),r=t.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:r,values:n,alpha:i}}var ex={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},bi=ex;var tx={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100,r,o,s,a,l,c=0;if(n===0)return l=i*255,[l,l,l];for(o=i<.5?i*(1+n):i+n-i*n,r=2*i-o,a=[0,0,0];c<3;)s=e+1/3*-(c-1),s<0?s++:s>1&&s--,l=6*s<1?r+(o-r)*6*s:2*s<1?o:3*s<2?r+(o-r)*(2/3-s)*6:r,a[c++]=l*255;return a}},Sc=tx;bi.hsl=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=o-r,a,l,c;return o===r?a=0:e===o?a=(n-i)/s:n===o?a=2+(i-e)/s:i===o&&(a=4+(e-n)/s),a=Math.min(a*60,360),a<0&&(a+=360),c=(r+o)/2,o===r?l=0:c<=.5?l=s/(o+r):l=s/(2-o-r),[a,l*100,c*100]};function zh(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var e,n,i,r=F_(t);if(!r.space)return[];let o=r.space[0]==="h"?Sc.min:bi.min,s=r.space[0]==="h"?Sc.max:bi.max;return e=Array(3),e[0]=Math.min(Math.max(r.values[0],o[0]),s[0]),e[1]=Math.min(Math.max(r.values[1],o[1]),s[1]),e[2]=Math.min(Math.max(r.values[2],o[2]),s[2]),r.space[0]==="h"&&(e=Sc.rgb(e)),e.push(Math.min(Math.max(r.alpha,0),1)),e}var oo={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"],whitepoint:{2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}}};oo.max=oo.whitepoint[2].D65;oo.rgb=function(t,e){e=e||oo.whitepoint[2].E;var n=t[0]/e[0],i=t[1]/e[1],r=t[2]/e[2],o,s,a;return o=n*3.240969941904521+i*-1.537383177570093+r*-.498610760293,s=n*-.96924363628087+i*1.87596750150772+r*.041555057407175,a=n*.055630079696993+i*-.20397695888897+r*1.056971514242878,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s=s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[o*255,s*255,a*255]};bi.xyz=function(t,e){var n=t[0]/255,i=t[1]/255,r=t[2]/255;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;var o=n*.41239079926595+i*.35758433938387+r*.18048078840183,s=n*.21263900587151+i*.71516867876775+r*.072192315360733,a=n*.019330818715591+i*.11919477979462+r*.95053215224966;return e=e||oo.whitepoint[2].E,[o*e[0],s*e[1],a*e[2]]};var tn=oo;var nx={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,n){var i,r,o,s,a,l,c,u,d,f,p,h,g;if(o=t[0],s=t[1],a=t[2],o===0)return[0,0,0];var _=.0011070564598794539;return e=e||"D65",n=n||2,d=tn.whitepoint[n][e][0],f=tn.whitepoint[n][e][1],p=tn.whitepoint[n][e][2],h=4*d/(d+15*f+3*p),g=9*f/(d+15*f+3*p),i=s/(13*o)+h||0,r=a/(13*o)+g||0,c=o>8?f*Math.pow((o+16)/116,3):f*o*_,l=c*9*i/(4*r)||0,u=c*(12-3*i-20*r)/(4*r)||0,[l,c,u]}},Wh=nx;tn.luv=function(t,e,n){var i,r,o,s,a,l,c,u,d,f,p,h,g,_=.008856451679035631,y=903.2962962962961;e=e||"D65",n=n||2,d=tn.whitepoint[n][e][0],f=tn.whitepoint[n][e][1],p=tn.whitepoint[n][e][2],h=4*d/(d+15*f+3*p),g=9*f/(d+15*f+3*p),l=t[0],c=t[1],u=t[2],i=4*l/(l+15*c+3*u)||0,r=9*c/(l+15*c+3*u)||0;var M=c/f;return o=M<=_?y*M:116*Math.pow(M,1/3)-16,s=13*o*(i-h),a=13*o*(r-g),[o,s,a]};Wh.lchuv=function(t){var e=t[0],n=t[1],i=t[2],r=Math.sqrt(n*n+i*i),o=Math.atan2(i,n),s=o*360/2/Math.PI;return s<0&&(s+=360),[e,r,s]};tn.lchuv=function(t){return Wh.lchuv(tn.luv(t))};function Is(t,e,n){return Math.min(Math.max(t,e),n)}var ix=[NaN,NaN,NaN,0];function L_(t){return typeof t=="string"?t:qh(t)}var rx=1024,Ts={},Gh=0;function ox(t){if(t==="none")return ix;if(Ts.hasOwnProperty(t))return Ts[t];if(Gh>=rx){let n=0;for(let i in Ts)n++&3||(delete Ts[i],--Gh)}let e=zh(t);if(e.length!==4)throw new Error('failed to parse "'+t+'" as color');for(let n of e)if(isNaN(n))throw new Error('failed to parse "'+t+'" as color');return sx(e),Ts[t]=e,++Gh,e}function V_(t){return Array.isArray(t)?t:ox(t)}function sx(t){return t[0]=Is(t[0]+.5|0,0,255),t[1]=Is(t[1]+.5|0,0,255),t[2]=Is(t[2]+.5|0,0,255),t[3]=Is(t[3],0,1),t}function qh(t){let e=t[0];e!=(e|0)&&(e=e+.5|0);let n=t[1];n!=(n|0)&&(n=n+.5|0);let i=t[2];i!=(i|0)&&(i=i+.5|0);let r=t[3]===void 0?1:Math.round(t[3]*1e3)/1e3;return"rgba("+e+","+n+","+i+","+r+")"}var Ei=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",P5=Ei.includes("firefox"),ax=Ei.includes("safari")&&!Ei.includes("chrom"),F5=ax&&(Ei.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Ei)),L5=Ei.includes("webkit")&&!Ei.includes("edge"),V5=Ei.includes("macintosh");var j_=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,U_=typeof Image<"u"&&Image.prototype.decode;var j5=function(){let t=!1;try{let e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return t}();function ar(t,e,n,i){let r;return n&&n.length?r=n.shift():j_?r=new OffscreenCanvas(t||300,e||300):r=document.createElement("canvas"),t&&(r.width=t),e&&(r.height=e),r.getContext("2d",i)}var Qh;function Yh(){return Qh||(Qh=ar(1,1)),Qh}var Ic={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};var Zh=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}},B_=Zh;function Xh(){}function $_(t){for(let e in t)delete t[e]}var Kh=class{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}};var H_=Kh;var Jh=class extends B_{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,n){if(!e||!n)return;let i=this.listeners_||(this.listeners_={}),r=i[e]||(i[e]=[]);r.includes(n)||r.push(n)}dispatchEvent(e){let n=typeof e=="string",i=n?e:e.type,r=this.listeners_&&this.listeners_[i];if(!r)return;let o=n?new H_(e):e;o.target||(o.target=this.eventTarget_||this);let s=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in s||(s[i]=0,a[i]=0),++s[i];let l;for(let c=0,u=r.length;c<u;++c)if("handleEvent"in r[c]?l=r[c].handleEvent(o):l=r[c].call(this,o),l===!1||o.propagationStopped){l=!1;break}if(--s[i]===0){let c=a[i];for(delete a[i];c--;)this.removeEventListener(i,Xh);delete s[i]}return l}disposeInternal(){this.listeners_&&$_(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(e,n){if(!this.listeners_)return;let i=this.listeners_[e];if(!i)return;let r=i.indexOf(n);r!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[r]=Xh,++this.pendingRemovals_[e]):(i.splice(r,1),i.length===0&&delete this.listeners_[e]))}},z_=Jh;function lx(t,e){return new Promise((n,i)=>{function r(){s(),n(t)}function o(){s(),i(new Error("Image load error"))}function s(){t.removeEventListener("load",r),t.removeEventListener("error",o)}t.addEventListener("load",r),t.addEventListener("error",o),e&&(t.src=e)})}function W_(t,e){return e&&(t.src=e),t.src&&U_?new Promise((n,i)=>t.decode().then(()=>n(t)).catch(r=>t.complete&&t.width?n(t):i(r))):lx(t)}var tp=class{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(let n in this.cache_){let i=this.cache_[n];!(e++&3)&&!i.hasListener()&&(delete this.cache_[n],delete this.patternCache_[n],--this.cacheSize_)}}}get(e,n,i){let r=ep(e,n,i);return r in this.cache_?this.cache_[r]:null}getPattern(e,n,i){let r=ep(e,n,i);return r in this.patternCache_?this.patternCache_[r]:null}set(e,n,i,r,o){let s=ep(e,n,i),a=s in this.cache_;this.cache_[s]=r,o&&(r.getImageState()===Xe.IDLE&&r.load(),r.getImageState()===Xe.LOADING?r.ready().then(()=>{this.patternCache_[s]=Yh().createPattern(r.getImage(1),"repeat")}):this.patternCache_[s]=Yh().createPattern(r.getImage(1),"repeat")),a||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}};function ep(t,e,n){let i=n?V_(n):"null";return e+":"+t+":"+i}var Rn=new tp;var Ms=null,np=class extends z_{constructor(e,n,i,r,o){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=i,this.canvas_={},this.color_=o,this.imageState_=r===void 0?Xe.IDLE:r,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=n,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===Xe.LOADED){Ms||(Ms=ar(1,1,void 0,{willReadFrequently:!0})),Ms.drawImage(this.image_,0,0);try{Ms.getImageData(0,0,1,1),this.tainted_=!1}catch{Ms=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(Ic.CHANGE)}handleImageError_(){this.imageState_=Xe.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Xe.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){let e=this.size_[0],n=this.size_[1],i=ar(e,n);i.fillRect(0,0,e,n),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Xe.IDLE){this.image_||this.initializeImage_(),this.imageState_=Xe.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&W_(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==Xe.LOADED)return;let n=this.image_,i=ar(Math.ceil(n.width*e),Math.ceil(n.height*e)),r=i.canvas;i.scale(e,e),i.drawImage(n,0,0),i.globalCompositeOperation="multiply",i.fillStyle=L_(this.color_),i.fillRect(0,0,r.width/e,r.height/e),i.globalCompositeOperation="destination-in",i.drawImage(n,0,0),this.canvas_[e]=r}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===Xe.LOADED||this.imageState_===Xe.ERROR)e();else{let n=()=>{(this.imageState_===Xe.LOADED||this.imageState_===Xe.ERROR)&&(this.removeEventListener(Ic.CHANGE,n),e())};this.addEventListener(Ic.CHANGE,n)}})),this.ready_}};function G_(t,e,n,i,r,o){let s=e===void 0?void 0:Rn.get(e,n,r);return s||(s=new np(t,t&&"src"in t?t.src||void 0:e,n,i,r),Rn.set(e,n,r,s,o)),o&&s&&!Rn.getPattern(e,n,r)&&Rn.set(e,n,r,s,o),s}function Tc(t){return t?Array.isArray(t)?qh(t):typeof t=="object"&&"src"in t?cx(t):t:null}function cx(t){if(!t.offset||!t.size)return Rn.getPattern(t.src,"anonymous",t.color);let e=t.src+":"+t.offset,n=Rn.getPattern(e,void 0,t.color);if(n)return n;let i=Rn.get(t.src,"anonymous",null);if(i.getImageState()!==Xe.LOADED)return null;let r=ar(t.size[0],t.size[1]);return r.drawImage(i.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),G_(r.canvas,e,void 0,Xe.LOADED,t.color,!0),Rn.getPattern(e,void 0,t.color)}var se=10;function Qe(t,e){return(e+t.hOffset)*t.hScale}function Ye(t,e){return(e+t.vOffset)*t.vScale}function q_(t,e,n,i,r=!0){let o=t.renderContext,s=e[0],a=e.length,l=(r?o.moveTo:o.lineTo).bind(o);if(n&&i){l(Qe(t,Ie(s[0],se)),Ye(t,Ie(s[1],se)));for(let c=1;c<a;++c)s=e[c],o.lineTo(Qe(t,Ie(s[0],se)),Ye(t,Ie(s[1],se)))}else if(n){l(Qe(t,Ie(s[0],se)),Ye(t,s[1]));for(let c=1;c<a;++c)s=e[c],o.lineTo(Qe(t,Ie(s[0],se)),Ye(t,s[1]))}else if(i){l(Qe(t,s[0]),Ye(t,Ie(s[1],se)));for(let c=1;c<a;++c)s=e[c],o.lineTo(Qe(t,s[0]),Ye(t,Ie(s[1],se)))}else{l(Qe(t,s[0]),Ye(t,s[1]));for(let c=1;c<a;++c)s=e[c],o.lineTo(Qe(t,s[0]),Ye(t,s[1]))}}var so=class{constructor(e,n){this.data=e,this.style=n}getBoundingBox(e,n){let i=this.data.length,r=null,o=null,s;for(let a=0;a<i;++a){let l=this.data[a],c=l[0],u=l[1];c===void 0||u===void 0||e!=null&&e>c||n!=null&&c>n||(r?(c<o[0]?o[0]=c:c>s[0]&&(s[0]=c),u<o[1]?o[1]=u:u>s[1]&&(s[1]=u)):(o=[c,u],s=[c,u],r=[o,s]))}return r}render(e){if(!this.data.length)return;let n=e.renderContext;if(!this.style||!this.style.bars)this.style&&this.style.fillStyle&&(n.beginPath(),e.xLog?n.moveTo(Qe(e,Ie(this.data[0][0],se)),Ye(e,e.rect[0][1])):n.moveTo(Qe(e,this.data[0][0]),Ye(e,e.rect[0][1])),q_(e,this.data,e.xLog,e.yLog,!1),n.lineTo(Qe(e,this.data[this.data.length-1][0]),Ye(e,e.rect[0][1])),n.closePath(),n.fillStyle=Tc(this.style.fillStyle),n.fill()),n.strokeStyle=this.style&&this.style.strokeStyle?Tc(this.style.strokeStyle):"#222",this.style?.lineDash&&n.setLineDash(this.style?.lineDash),n.beginPath(),q_(e,this.data,e.xLog,e.yLog),n.lineWidth=this.style&&this.style.lineWidth?this.style.lineWidth:1,n.stroke(),this.style?.lineDash&&n.setLineDash([]);else{let i=!1;this.style&&this.style.fillStyle&&(n.fillStyle=Tc(this.style.fillStyle),i=!0);let r=this.style.barWidth?this.style.barWidth:.48;for(let o of this.data){let s=e.xLog?Ie(o[0],se):o[0],a=e.yLog?Ie(o[1],se):o[1];n.beginPath(),n.moveTo(Qe(e,s-r),Ye(e,e.rect[0][1])),n.lineTo(Qe(e,s+r),Ye(e,e.rect[0][1])),n.lineTo(Qe(e,s+r),Ye(e,a)),n.lineTo(Qe(e,s-r),Ye(e,a)),n.closePath(),i&&n.fill()}if(!this.style||!this.style.lineWidth||this.style.lineWidth>0){n.beginPath();for(let o of this.data){let s=e.xLog?Ie(o[0],se):o[0],a=e.yLog?Ie(o[1],se):o[1];n.moveTo(Qe(e,s-r),Ye(e,e.rect[0][1])),n.lineTo(Qe(e,s-r),Ye(e,a)),n.lineTo(Qe(e,s+r),Ye(e,a)),n.lineTo(Qe(e,s+r),Ye(e,e.rect[0][1]))}n.lineWidth=this.style&&this.style.lineWidth?this.style.lineWidth:1,n.stroke()}}}};var Mc=class{constructor(){this._xInt=!1,this._xVisible=!0,this._yInt=!1,this._yVisible=!0,this._xLog=!1,this._yLog=!1,this._ySym=!1,this.xLabel="X",this._ySym=!1,this.yLabel="Y",this._xLog=!1,this._yLog=!1,this._bbox=null,this._displayRect=null}setData(e){this._data=e,this._bbox=null}setOptions(e){e&&(e.xAxis&&(this._xLog=e.xAxis.log||!1,this._xRange=e.xAxis.range,this._xInt=e.xAxis.integer,this._xVisible=e.xAxis.visible==null?!0:e.xAxis.visible,this._xTickTransform=e.xAxis.tickTransform,this._xSpacing=e.xAxis.tickSpacing),e.yAxis&&(this._yLog=e.yAxis.log||!1,this._yRange=e.yAxis.range,this._yInt=e.yAxis.integer,this._yVisible=e.yAxis.visible==null?!0:e.yAxis.visible,this._yWidth=e.yAxis.dimension,this._yTickTransform=e.yAxis.tickTransform),this._backgroundColor=e.background,this._padding=e.padding)}setAxis(e,n,i,r,o,s){this.xLabel=e,this._xRange=n,this.yLabel=i,this._yRange=r,this._xTick=o,this._yTick=s}setYAxisSymmetry(e){this._ySym=e,this._bbox=null}setTickTransform(e,n){this._xTickTransform=e,this._yTickTransform=n}setLogXAxis(e){this._xLog=e}setLogYAxis(e){this._yLog=e}setIntegerXAxis(e){this._xInt=e}setIntegerYAxis(e){this._yInt=e}render(e,n,i){let r,o=n,s=i,a=At.FontSizePx;if(o<=0||s<=0)return;e.font=a+"px Sans-Serif";let l=Math.floor(e.measureText("M").width*1.5),c=Math.floor(l*.5),u=8,d=4,f=l/2,p;this._displayRect=[[l+u+.5,c+.5],[o+.5,s-.5]],this._yVisible||(this._displayRect[0]=[.5,.5],this.yLabel&&this._yWidth==null&&(this._displayRect[0][0]+=l+u));let h=this._displayRect;this._plotRect=h;let g=h[1][0]-h[0][0],_=h[1][1]-h[0][1],y,M,A,T,N,X,$,fe,me,we,Ne,pe,S,Pt,K,Be,L,Pn,et;for(S=this._getDisplayRect(),Pt=0;Pt<2;++Pt)for(K=0;K<2;++K)S[Pt][K]=ei(S[Pt][K]);let Dn,_t,ki,xo;this._xLog?S[0][0]>0&&S[1][0]>0?(Dn=ei(Ie(S[0][0],se)),_t=ei(Ie(S[1][0],se))):Dn=_t=0:(Dn=S[0][0],_t=S[1][0]),this._yLog?S[0][1]>0&&S[1][1]>0?(ki=ei(Ie(S[0][1],se)),xo=ei(Ie(S[1][1],se))):ki=xo=0:(ki=S[0][1],xo=S[1][1]),Ne=_t-Dn,pe=xo-ki;let IC=e.measureText("-1.23E456").width,TC=Math.max(Math.floor(g/IC),2),MC=Math.max(Math.floor(_/l/3),3);this._xSpacing!=null?N=this._xSpacing:N=Ss(Ne,TC,this._xLog,this._xTick),this._xInt&&(N=Math.round(N),N<1&&(N=1)),X=Math.floor(Dn/N)*N,Math.abs(X-Dn)/N>.5&&(X+=N),$=Ss(pe,MC,this._yLog,this._yTick),this._yInt&&($=Math.round($),$<1&&($=1)),fe=Math.floor(ki/$)*$,Math.abs(fe-ki)/$>.5&&(fe+=$);let ng=Math.pow(10,ro(N)),ea=Math.pow(10,ro($));if(S[0][0]=Dn,S[1][0]=_t,S[0][1]=ki,S[1][1]=xo,Ne=S[1][0]-S[0][0],pe=S[1][1]-S[0][1],Pn=N*.01,p=!0,$>0){y=Math.floor(S[0][1]/$)*$,!this._yLog&&y<S[0][1]&&(y+=$);let Ze=0;if(this._yWidth==null){for(;y<S[1][1];)M=Math.round(y*ea)/ea,r=M,this._yLog?this._yTickTransform?(r=Math.pow(se,M),r=ei(r),et=e.measureText(this._yTickTransform(r)).width):et=e.measureText(se+"^"+r).width:Math.abs(r)<1e-10?this._yTickTransform?et=e.measureText(this._yTickTransform(0)).width:et=e.measureText("0").width:this._yTickTransform?et=e.measureText(this._yTickTransform(r)).width:et=e.measureText(r+"").width,et>Ze&&(Ze=et),y+=$;Ze>0&&(Ze+=f*2)}else Ze=Math.max(this._yWidth-h[0][0],0);this._yVisible&&(h[0][0]+=Ze,g-=Ze)}if(N>0&&this._xVisible&&(h[1][1]-=Math.floor(l+f),this.xLabel&&(h[1][1]-=l),_=h[1][1]-h[0][1]),this._padding){let Ze=Ne/g*this._padding,Fn=pe/_*this._padding;S[0][0]-=Ze,S[1][0]+=Ze,S[0][1]-=Fn,S[1][1]+=Fn,Ne=S[1][0]-S[0][0],pe=S[1][1]-S[0][1]}me=(g-1)/Ne,we=_/pe,this._backgroundColor&&(e.fillStyle=this._backgroundColor,e.fillRect(h[0][0],h[0][1],h[1][0]-h[0][0],h[1][1]-h[0][1])),e.strokeStyle="#c0c0c0";let Ru=null;try{Ru=e.getLineDash(),e.setLineDash([2])}catch{}if(N>0)for(y=Math.floor(S[0][0]/N)*N,!this._xLog&&y<S[0][0]&&(y+=N),p=!0;y<=S[1][0];){if(A=h[0][0]+Math.floor((y-S[0][0])*me),A>=h[0][0]&&(e.beginPath(),e.moveTo(A,h[0][1]),e.lineTo(A,h[1][1]),e.stroke()),this._xLog){if(e.strokeStyle="#e0e0e0",p)for(K=se-1;K>=2&&(Be=y-N+Ie(K,se),L=Math.floor((Be-S[0][0])*me),!(L<0));--K)L+=h[0][0],!(A<h[0][0])&&(e.beginPath(),e.moveTo(L,h[0][1]),e.lineTo(L,h[1][1]),e.stroke());for(K=2;K<se;++K)Be=y+Ie(K,se),L=Math.floor((Be-S[0][0])*me),!(L>o)&&(L+=h[0][0],!(A<h[0][0])&&(e.beginPath(),e.moveTo(L,h[0][1]),e.lineTo(L,h[1][1]),e.stroke()));e.strokeStyle="#c0c0c0"}p=!1,y+=N}if($>0)for(y=Math.floor(S[0][1]/$)*$,!this._yLog&&y<S[0][1]&&(y+=$),p=!0;y<=S[1][1];){if(T=h[1][1]-Math.floor((y-S[0][1])*we),T>=h[0][1]&&T<h[1][1]&&(e.beginPath(),e.moveTo(h[0][0],T),e.lineTo(h[1][0],T),e.stroke()),this._yLog&&$<=1){if(e.strokeStyle="#e0e0e0",p)for(K=se-1;K>=2&&(Be=y-$+Ie(K,se),L=Math.floor((Be-S[0][1])*we),!(L<0));--K)L=h[1][1]-L,!(L<h[0][1]||L>=h[1][1])&&(e.beginPath(),e.moveTo(h[0][0],L),e.lineTo(h[1][0],L),e.stroke());for(K=2;K<se;++K)Be=y+Ie(K,se),L=Math.floor((Be-S[0][1])*we),!(L>s)&&(L=h[1][1]-L,!(L<h[0][1]||L>=h[1][1])&&(e.beginPath(),e.moveTo(h[0][0],L),e.lineTo(h[1][0],L),e.stroke()));e.strokeStyle="#c0c0c0"}p=!1,y+=$}try{Ru&&e.setLineDash(Ru)}catch{}if(e.strokeStyle="#222",e.lineWidth=1,e.beginPath(),this._yVisible?(e.moveTo(h[0][0],h[0][1]),e.lineTo(h[0][0],h[1][1])):e.moveTo(h[0][0],h[1][1]),this._xVisible&&e.lineTo(h[1][0],h[1][1]),e.stroke(),e.textAlign="center",e.textBaseline="bottom",e.fillStyle=e.strokeStyle,this._xVisible&&e.fillText(this.xLabel,(h[0][0]+h[1][0])*.5,s),e.textBaseline="top",this._yVisible&&(e.save(),e.translate(0,(h[0][1]+h[1][1])*.5),e.rotate(-Math.PI/2),e.fillText(this.yLabel,0,0),e.restore()),!S)return;let xC=this._data?this._data.length:0,RC={renderContext:e,rect:S,hScale:me,vScale:-we,hOffset:-S[0][0],vOffset:-S[0][1],xLog:this._xLog,yLog:this._yLog};for(Pt=0;Pt<xC;++Pt){let Ze=this._data[Pt];e.save(),e.beginPath(),e.rect(h[0][0],h[0][1],h[1][0]-h[0][0],h[1][1]-h[0][1]),e.clip(),e.translate(h[0][0]+.5,h[1][1]+.5),Ze.render(RC),e.restore()}if(N>0&&this._xVisible){y=X,p=!0;let Ze=-1;for(;y<=S[1][0]+Pn;){if(A=Math.floor((y-S[0][0])*me),!this._xLog&&A<0){p=!1,y+=N;continue}if(A+=h[0][0],A<h[0][0]||A>h[1][0]){p=!1,y+=N;continue}if(e.beginPath(),e.moveTo(A,h[1][1]),e.lineTo(A,h[1][1]-d),e.stroke(),this._xLog){if(p)for(K=se-1;K>=2&&(Be=y-N+Ie(K,se),L=Math.floor((Be-S[0][0])*me),!(L<0));--K)L+=h[0][0],e.beginPath(),e.moveTo(L,h[1][1]),e.lineTo(L,h[1][1]-d*.5),e.stroke();for(K=2;K<se;++K)Be=y+Ie(K,se),L=Math.floor((Be-S[0][0])*me),!(L>o)&&(L+=h[0][0],e.beginPath(),e.moveTo(L,h[1][1]),e.lineTo(L,h[1][1]-d*.5),e.stroke())}M=Math.round(y*ng)/ng,this._xLog?(r=Math.pow(se,M),r=ei(r)):r=M;let Fn;Math.abs(r)<1e-10?this._xTickTransform?Fn=this._xTickTransform(0):Fn="0":this._xTickTransform?Fn=this._xTickTransform(r):Fn=r+"",et=e.measureText(Fn).width,A+et*.5>=h[1][0]&&(A=h[1][0]-et*.5),(Ze<0||A-et*.5>Ze)&&(e.fillText(Fn,A,h[1][1]+f),Ze=A+et),p=!1,y+=N}}if($>0&&this._yVisible)for(e.textBaseline="middle",e.textAlign="right",y=Math.floor(S[0][1]/$)*$,!this._yLog&&y<S[0][1]&&(y+=$),p=!0;y<=S[1][1];){if(this._yLog&&$<=1){if(p)for(K=se-1;K>=2&&(Be=y-$+Ie(K,se),L=Math.floor((Be-S[0][1])*we),!(L<0));--K)L=h[1][1]-L,!(L<h[0][1]||L>=h[1][1])&&(e.beginPath(),e.moveTo(h[0][0],L),e.lineTo(h[0][0]+d*.5,L),e.stroke());for(K=2;K<se;++K)Be=y+Ie(K,se),L=Math.floor((Be-S[0][1])*we),!(L>s)&&(L=h[1][1]-L,!(L<h[0][1]||L>=h[1][1])&&(e.beginPath(),e.moveTo(h[0][0],L),e.lineTo(h[0][0]+d*.5,L),e.stroke()))}T=h[1][1]-Math.floor((y-S[0][1])*we),T>=h[0][1]&&T<h[1][1]&&(e.beginPath(),e.moveTo(h[0][0],T),e.lineTo(h[0][0]+d,T),e.stroke(),e.fillStyle="#000",M=Math.round(y*ea)/ea,r=M,this._yLog?this._yTickTransform?(r=Math.pow(se,M),r=ei(r),e.fillText(this._yTickTransform(r),h[0][0]-d-f,T)):e.fillText(se+"^"+r,h[0][0]-d-f,T):Math.abs(r)<1e-10?this._yTickTransform?e.fillText(this._yTickTransform(0),h[0][0]-d-f,T):e.fillText("0",h[0][0]-d-f,T):this._yTickTransform?e.fillText(this._yTickTransform(r),h[0][0]-d-f,T):e.fillText(r+"",h[0][0]-d-f,T),p=!1),y+=$}}get plotRect(){return this._plotRect}_updateBbox(e,n){if(!this._data||!this._data.length){this._bbox=null;return}let i,r=this._data.length;for(this._bbox=null,i=0;i<r;++i){let o=this._data[i].getBoundingBox(e,n);o&&(this._bbox?(o[0][0]<this._bbox[0][0]&&(this._bbox[0][0]=o[0][0]),o[0][1]<this._bbox[0][1]&&(this._bbox[0][1]=o[0][1]),o[1][0]>this._bbox[1][0]&&(this._bbox[1][0]=o[1][0]),o[1][1]>this._bbox[1][1]&&(this._bbox[1][1]=o[1][1])):this._bbox=[[o[0][0],o[0][1]],[o[1][0],o[1][1]]])}if(this._bbox&&this._ySym){let o=Math.abs(this._bbox[0][1]);Math.abs(this._bbox[1][1])>o&&(o=Math.abs(this._bbox[1][1])),this._bbox[0][1]=-o,this._bbox[1][1]=+o}}_getDisplayRect(){let e=[[null,null],[null,null]];return this._xRange&&(this._xRange[0]!=null&&(e[0][0]=this._xRange[0]),this._xRange[1]!=null&&(e[1][0]=this._xRange[1]),e[0][0]!==null&&e[1][0]!=null&&e[0][0]>e[1][0]&&(e[0][0]=e[1][0])),this._yRange&&(this._yRange[0]!=null&&(e[0][1]=this._yRange[0]),this._yRange[1]!=null&&(e[1][1]=this._yRange[1]),e[0][1]!=null&&e[1][1]!=null&&e[0][1]>e[1][1]&&(e[0][1]=e[1][1])),(e[0][0]==null||e[0][1]==null||e[1][0]==null||e[1][1]==null)&&(this._updateBbox(e[0][0],e[1][0]),this._bbox&&(e[0][0]==null&&(e[0][0]=this._bbox[0][0]),e[0][1]==null&&(e[0][1]=this._bbox[0][1]),e[1][0]==null&&(e[1][0]=this._bbox[1][0]),e[1][1]==null&&(e[1][1]=this._bbox[1][1]))),e[0][0]==null&&(e[0][0]=0),e[0][1]==null&&(e[0][1]=0),e[1][0]==null&&(e[1][0]=1),e[1][1]==null&&(e[1][1]=1),e[0][0]>=e[1][0]&&(e[0][0]=e[1][0]-1),e[0][1]>=e[1][1]&&(e[0][1]=e[1][1]-1),e}};var ux=["canvas"],dx=["*"],Q_=(()=>{let e=class e{set data(i){this._renderer.setData(i),this.renderPlot()}set xaxis(i){this._renderer.xLabel=i}set yaxis(i){this._renderer.yLabel=i}set options(i){this._renderer.setOptions(i),this.renderPlot()}constructor(i){this._elem=i,this._renderer=new Mc}get renderer(){return this._renderer}redraw(){this.renderPlot()}renderPlot(){if(!this._canvas||this._canvas.nativeElement.clientWidth<=0||this._canvas.nativeElement.clientHeight<=0)return;let i=mn(this._canvas.nativeElement,!0);if(!i)return;let r=this._canvas.nativeElement.clientWidth,o=this._canvas.nativeElement.clientHeight;this._renderer.render(i,r,o),vn(i)}ngOnInit(){let i=this._elem.nativeElement.style;i.display="block",i.position="relative",this._resizeObserver=new ResizeObserver((r,o)=>{for(let s of r)if(s.target===this._canvas.nativeElement){this.renderPlot();break}}),this._resizeObserver.observe(this._canvas.nativeElement),this.dataChanged&&(this._dataSubscription=this.dataChanged.subscribe(r=>{this.data=r})),this.optionsChanged&&(this._optionsSubscription=this.optionsChanged.subscribe(r=>{this.options=r}))}ngOnDestroy(){this._resizeObserver&&this._resizeObserver.disconnect(),this._dataSubscription&&this._dataSubscription.unsubscribe(),this._optionsSubscription&&this._optionsSubscription.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(D(ae))},e.\u0275cmp=oe({type:e,selectors:[["plot-widget"]],viewQuery:function(r,o){if(r&1&&ot(ux,7),r&2){let s;Ge(s=qe())&&(o._canvas=s.first)}},inputs:{data:"data",xaxis:"xaxis",yaxis:"yaxis",dataChanged:"dataChanged",options:"options",optionsChanged:"optionsChanged"},standalone:!1,ngContentSelectors:dx,decls:3,vars:0,consts:[["canvas",""],[2,"display","block","position","absolute","left","0","top","0","width","100%","height","100%"]],template:function(r,o){r&1&&(ey(),I(0,"canvas",1,0),ty(2))},encapsulation:2});let t=e;return t})();var Y_=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Ci]});let t=e;return t})();var Nt=[[.001,2e-4,"%S.%3","%Y-%m-%d %H:%M"],[.005,.001,"%S.%3","%Y-%m-%d %H:%M"],[.01,.002,"%S.%2","%Y-%m-%d %H:%M"],[.05,.01,"%S.%2","%Y-%m-%d %H:%M"],[.1,.02,"%T.%1","%Y-%m-%d"],[.5,.1,"%T.%1","%Y-%m-%d"],[1,.2,"%T","%Y-%m-%d"],[2,.5,"%T","%Y-%m-%d"],[5,1,"%T","%Y-%m-%d"],[10,2,"%T","%Y-%m-%d"],[15,3,"%T","%Y-%m-%d"],[30,5,"%T","%Y-%m-%d"],[60,10,"%T","%Y-%m-%d"],[120,20,"%T","%Y-%m-%d"],[300,60,"%T","%Y-%m-%d"],[600,120,"%T","%Y-%m-%d"],[900,300,"%T","%Y-%m-%d"],[1800,300,"%T","%Y-%m-%d"],[3600,600,"%T","%Y-%m-%d"],[2*3600,1200,"%T","%Y-%m-%d"],[6*3600,3600,"%T","%Y-%m-%d"],[12*3600,2*3600,"%T","%Y-%m-%d"],[24*3600,6*3600,"%b, %d","%Y"],[2*24*3600,12*3600,"%b, %d","%Y"],[7*24*3600,24*3600,"%b, %d","%Y"],[14*24*3600,2*24*3600,"%b, %d","%Y"]],ip=class{constructor(){this.fontHeight=0,this.longTick=0,this.shortTick=0,this.drx=[0,0],this.primaryTimeFormat="",this.secondaryTimeFormat="",this.minLabelWidth=0}};function hx(t,e,n,i,r){i=i*.001,r=r*.001;let o=e/(r-i);if(o<=0)return;let s=Nt.length,a=new ip;a.drx=[Nt[s-1][0],Nt[s-1][1]],a.primaryTimeFormat=Nt[s-1][2],a.secondaryTimeFormat=Nt[s-1][3],a.fontHeight=n/4,t.font=a.fontHeight+"px sans serif",a.longTick=a.fontHeight,a.shortTick=a.longTick*.5,a.minLabelWidth=t.measureText(" XXXX-XX-XX.X ").width;let l;for(l=0;l<s;++l)if(Nt[l][0]*o>=a.minLabelWidth){a.drx[0]=Nt[l][0],a.drx[1]=Nt[l][1],a.primaryTimeFormat=Nt[l][2],a.secondaryTimeFormat=Nt[l][3];break}if(l===s&&o>0)for(a.drx[0]=Nt[s-1][0],a.drx[1]=Nt[s-1][1],a.primaryTimeFormat=Nt[s-1][2],a.secondaryTimeFormat=Nt[s-1][3];a.drx[0]*o<a.minLabelWidth;)a.drx[0]*=2,a.drx[1]*=2;return a}function px(t){let e=t<0;t=Math.abs(t);let n=Math.floor(t/1e3),i=Math.round(t-n*1e3),r="",o=Math.floor(n/86400);o&&(r&&(r+=" "),r+=o+"d",n-=o*86400);let s=Math.floor(n/3600);s&&(r&&(r+=" "),r+=s+"h",n-=s*3600);let a=Math.floor(n/60);if(a&&(r&&(r+=" "),r+=a+"m",n-=a*60),n||i){if(r&&(r+=" "),r+=n,i>0){r+=".";let l=100;for(;l>0&&i>0;){let c=i%l;i=Math.floor(i/l),l=Math.floor(l/10),r+=i.toFixed(0),i=c}}r+="s"}else if(!r)return"0";return e?"-"+r:r}function gx(t,e,n,i,r,o,s,a,l,c=!1,u){if(o<=0)return;s=s*.001,a=a*.001;let d=r/(a-s);if(d<=0)return;t.strokeStyle=At.StrokeStyle,t.fillStyle=t.strokeStyle,t.beginPath(),t.moveTo(n,i),t.lineTo(n+r,i),t.stroke(),t.textBaseline="top",t.textAlign="center";let p=s+0,h=i+e.longTick+e.shortTick,g=i+e.longTick+e.shortTick+e.fontHeight+e.shortTick,_="",y;for(let M=0;M<2;++M){if(e.drx[M]<=0)continue;let A=p-p%e.drx[M],T=M===0?e.longTick:e.shortTick,N,X,$=Math.floor((A-p)*d);for(y=$;y<r;){if(y>=0&&(t.beginPath(),t.moveTo(n+y,i),t.lineTo(n+y,i+T),t.stroke(),M===0)){let fe=A*1e3;if(l)N=px(fe),X=t.measureText(N).width*.5,y-X>=n&&y+X<=r&&t.fillText(N,n+y+.5,h);else if(N=new Date(fe).strftime(e.primaryTimeFormat,c),X=t.measureText(N).width*.5,y-X>=n&&y+X<=r&&t.fillText(N,n+y+.5,h),e.secondaryTimeFormat&&y-e.minLabelWidth*.5>=n&&y+e.minLabelWidth*.5<=r){let me;me=new Date(fe).strftime(e.secondaryTimeFormat,c),me!==_&&(t.fillText(me,n+y,g),_=me)}}A+=e.drx[M],$=Math.floor((A-p)*d),y=$}}if(u){t.save(),t.font="bold "+t.font;for(let M of u)y=(M.date.getTime()*.001-s)*d,t.fillText(M.description||M.text,n+y-.5,g);t.restore()}}var xc=class{constructor(){this.relative=!1}render(e,n,i,r,o,s,a,l,c,u,d=!1,f){e.translate(.5,.5),e.beginPath(),e.moveTo(n-.5,i),e.lineTo(n+r-.5,i),e.stroke();let p=hx(e,r,o,s,a);if(p){if(gx(e,p,n,i,r,o,s,a,this.relative,d,f),l!==void 0&&c!==void 0){e.beginPath(),e.moveTo(n+l,i),e.lineTo(n+l,i+p.longTick+p.shortTick+p.fontHeight),e.stroke(),e.beginPath(),e.moveTo(n+c,i),e.lineTo(n+c,i+p.longTick+p.shortTick+p.fontHeight),e.stroke();let h=i+p.longTick,g=p.fontHeight+p.shortTick,_=e.createLinearGradient(0,i+h,0,i+h+g);u?(_.addColorStop(0,"rgba(0, 0, 0, 0.5)"),_.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),_.addColorStop(1,"rgba(0, 0, 0, 0.5)")):l<c?(_.addColorStop(0,"rgba(0, 128, 0, 0.5)"),_.addColorStop(.5,"rgba(0, 255, 0, 0.5)"),_.addColorStop(1,"rgba(0, 128, 0, 0.5)")):(_.addColorStop(0,"rgba(128, 0, 0, 0.5)"),_.addColorStop(.5,"rgba(255, 0, 0, 0.5)"),_.addColorStop(1,"rgba(128, 0, 0, 0.5)"));let y=e.fillStyle;e.fillStyle=_,e.fillRect(n+Math.min(l,c),i+h,Math.abs(c-l),g),e.fillStyle=y}return e.translate(-.5,-.5),p}}};var ao=class{constructor(e,n){this.drx=e,this.ref=n}},Fe=class t{constructor(e,n,i){this.min=e,this.max=n,this.pps=i}static fromGeom(e,n,i){return new t(e,n,i/(n-e))}};var mx=["canvas"],Si=(()=>{let e=class e{set parent(i){this.intersect(i)}constructor(i){this._visible=!0,this._element=i.get(ae)}intersect(i){if(!("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)){this.create();return}this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=void 0),i&&(this._intersectionObserver=new IntersectionObserver(r=>{for(let o of r)if(this._visible=o.isIntersecting,this._visible){this.create(),this.visibilityChanged(this._visible);break}},{root:i}),this._intersectionObserver.observe(this._element.nativeElement))}create(){if(this.canvas)return;let i=document.createElement("canvas");this._element.nativeElement.appendChild(i),this.canvas=new ae(i),this.updateSize()}visibilityChanged(i){}resize(){console.error("Canvas resize not overriden: do that!")}updateSize(){this.canvas&&(this.canvas.nativeElement.style.width=Math.floor(this._element.nativeElement.clientWidth)+"px",this.canvas.nativeElement.style.height=Math.floor(this._element.nativeElement.clientHeight)+"px",this.resize())}ngOnInit(){this._resizeObserver=new ResizeObserver(i=>{for(let r of i)if(r.target===this._element.nativeElement){this.updateSize();break}}),this._resizeObserver.observe(this._element.nativeElement),this._element.nativeElement.style.overflow="hidden",this._intersectionObserver||this.create()}ngOnDestroy(){this._resizeObserver?.disconnect(),this._intersectionObserver?.disconnect()}};e.\u0275fac=function(r){return new(r||e)(D(Oe))},e.\u0275cmp=oe({type:e,selectors:[["canvas-container"]],viewQuery:function(r,o){if(r&1&&ot(mx,7),r&2){let s;Ge(s=qe())&&(o.canvas=s.first)}},inputs:{parent:"parent"},standalone:!1,decls:0,vars:0,template:function(r,o){},encapsulation:2});let t=e;return t})();function Z_(t,e){return e.target!==t?e.pageX-(window.pageXOffset||document.documentElement.scrollLeft)-t.getBoundingClientRect().x:e.offsetX}function lo(t,e,n){return e.targetTouches[n].pageX-(window.pageXOffset||document.documentElement.scrollLeft)-t.getBoundingClientRect().x}var Ii=(()=>{let e=class e extends Si{set relative(i){this._renderer.relative!==i&&(this._renderer.relative=i,this.renderRuler())}set range(i){this.setRange(i),this.redraw()}set range$(i){this._rangeSubscription?.unsubscribe(),i&&(this._rangeSubscription=i.subscribe(r=>{this.setRange(r),this.redraw()}))}set utc(i){this._useUTC=i,this.renderRuler()}set fixedRange(i){this._fixedRange=i,this.renderRuler()}set markers(i){this._markers=i}set selectionHandles(i){this._selectionHandles=i,this._hoverSelectionHandle=void 0,this.renderRuler()}constructor(i,r){super(i),this._ngRenderer=r,this.rangeChange=new ie,this.gridChange=new ie,this.selectionHandleChange=new ie,this._eventHandlers=[],this._range=new Fe(0,1,-1),this._fixedRange=!1,this._useUTC=!1,this._renderer=new xc}renderRuler(i,r,o){if(!this._renderer)return;let s=this.canvas.nativeElement.clientWidth,a=this.canvas.nativeElement.clientHeight;if(this._fixedRange)this._range.pps=s/(this._range.max-this._range.min);else if(this._range.pps>0)this._range.max=this._range.min+s/this._range.pps;else if(s<=0)return;let l=mn(this.canvas.nativeElement,!0);if(!l)return;let c=this._renderer.render(l,0,0,s,a,this._range.min,this._range.max,i,r,o,this._useUTC,this._markers);if(this._selectionHandles){let u="#888";l.fillStyle=u;let d=s/(this._range.max-this._range.min),f=0,p=this._selectionHandles.length;for(;f<p;++f){let g=(this._selectionHandles[f]-this._range.min)*d;g<0||g>=s||(l.beginPath(),l.moveTo(g,0),l.lineTo(g+8,a/2),l.lineTo(g-8,a/2),l.closePath(),this._hoverSelectionHandle===f&&(l.fillStyle="#000"),l.fill(),this._hoverSelectionHandle===f&&(l.fillStyle=u),l.stroke())}}return vn(l),c}resize(){this.redraw()}setRange(i){let r=this.canvas.nativeElement.clientWidth,o=this._range;return this._range=i,i.pps>0||r/(i.max-i.min)>0&&(this._range=Fe.fromGeom(this._range.min,this._range.max,r)),this._range.min!==o.min||this._range.max!==o.max||this._range.pps!==o.pps}get range(){return this._range}visibleRange(){return[this._range.min,this._range.max]}mapTime(i){return this._range.min+(this._range.max-this._range.min)*i/this.canvas.nativeElement.clientWidth}redraw(){let i=this.renderRuler();return i&&this.gridChange.emit(new ao(i.drx)),i}onContextMenu(i){return!1}onPointerDown(i){return i.button!==0&&i.button!==2?!0:(i.target.setPointerCapture(i.pointerId),i.button===0?(this._hoverSelectionHandle!=null?this._panningSelectionHandle=this._hoverSelectionHandle:(this._panning=i.offsetX,this._zoomStart&&(this._zoomStart=void 0,this.renderRuler())),!1):i.button===2?(this._panning==null&&(this._zoomStart=i.offsetX),!1):!0)}onPointerUp(i){if(i.button!==0&&i.button!==2)return!0;i.preventDefault(),i.stopPropagation(),i.target.releasePointerCapture(i.pointerId),this._panningSelectionHandle=void 0;let r=Z_(this.canvas.nativeElement,i);if(i.button===0)return this._panning=void 0,!1;if(i.button===2){if(this._zoomStart!=null){if(i.offsetY>=0&&i.offsetY<this.canvas.nativeElement.clientHeight){let s=r,a,l,c=this._range.max-this._range.min,u=this.canvas.nativeElement.clientWidth;if(a=this._range.min+this._zoomStart/u*c,l=this._range.min+s/u*c,this._zoomStart>s){let d=c/(a-l),f=d*(this._range.min-l)+this._range.min,p=d*(this._range.max-a)+this._range.max;a=f,l=p}l-a>1&&this.rangeChange.emit(Fe.fromGeom(a,l,u))}this._zoomStart=void 0,this.renderRuler()}return!1}return!0}onPointerMove(i){let r=Z_(this.canvas.nativeElement,i);if(this._panning!=null){let s=this.canvas.nativeElement.clientWidth,a=this._range.max-this._range.min,l=(this._panning-r)/s*a;return this._panning=r,this.rangeChange.emit(Fe.fromGeom(this._range.min+l,this._range.max+l,s)),!1}if(this._zoomStart!=null){let s=r,a=i.offsetY<0||i.offsetY>this.canvas.nativeElement.clientHeight;return this.renderRuler(this._zoomStart,s,a),!1}if(this._panningSelectionHandle!=null){let s=this.canvas.nativeElement.clientWidth,a=this._range.max-this._range.min,l=r*a/s+this._range.min,c={index:this._panningSelectionHandle,value:l,event:i};this.selectionHandleChange.emit(c),this._selectionHandles[this._panningSelectionHandle]=c.value,this.renderRuler()}let o=this._hoverSelectionHandle;if(this._hoverSelectionHandle=void 0,this._selectionHandles){let s=this.canvas.nativeElement.clientWidth,a=this._range.max-this._range.min,l=s/a,c=this._selectionHandles.length,u=c-1;for(;u>=0;--u){let f=(this._selectionHandles[u]-this._range.min)*l;if(!(f<0||f>=s)&&r>=f-8&&r<=f+8)return this._hoverSelectionHandle=u,this.renderRuler(),!1}if(o!==this._hoverSelectionHandle)return this.renderRuler(),!1}return!0}onTouchStart(i){if(i.targetTouches.length<1)return!1;if(i.targetTouches.length===1)this._panning=lo(this.canvas.nativeElement,i,0);else if(this._panning=void 0,this._pinchStart=lo(this.canvas.nativeElement,i,0),this._pinchEnd=lo(this.canvas.nativeElement,i,1),this._pinchStart>this._pinchEnd){let r=this._pinchStart;this._pinchStart=this._pinchEnd,this._pinchEnd=r}return!1}onTouchMove(i){if(i.targetTouches.length<1)return!1;let r=lo(this.canvas.nativeElement,i,0);if(this._panning!=null){let o=this.canvas.nativeElement.clientWidth,s=this._range.max-this._range.min,a=(this._panning-r)/o*s;this._panning=r,this.rangeChange.emit(Fe.fromGeom(this._range.min+a,this._range.max+a,o))}else if(this._pinchStart!=null){let o=lo(this.canvas.nativeElement,i,1);if(r>o){let d=r;r=o,o=d}let s,a,l=this._range.max-this._range.min,c=this.canvas.nativeElement.clientWidth;s=this._range.min+this._pinchStart/c*l,a=this._range.min+this._pinchEnd/c*l;let u=(a-s)*c/(o-r);s=s-r/c*u,a=s+u,this._pinchStart=r,this._pinchEnd=o,a-s>1&&this.rangeChange.emit(Fe.fromGeom(s,a,c))}return!1}onTouchEnd(i){return i.targetTouches.length>=2||(i.targetTouches.length<2?(this._pinchStart=this._pinchEnd=void 0,this.renderRuler()):i.targetTouches.length<1?this._panning=void 0:this._panning=lo(this.canvas.nativeElement,i,0)),!1}ngOnInit(){if(super.ngOnInit(),this.rangeChange.observers.length>0){let i=this._ngRenderer,r=this.canvas.nativeElement;this._eventHandlers.push(i.listen(r,"contextmenu",this.onContextMenu.bind(this))),this._eventHandlers.push(i.listen(r,"pointerdown",this.onPointerDown.bind(this))),this._eventHandlers.push(i.listen(r,"pointermove",this.onPointerMove.bind(this))),this._eventHandlers.push(i.listen(r,"pointerup",this.onPointerUp.bind(this))),this._eventHandlers.push(i.listen(r,"touchstart",this.onTouchStart.bind(this))),this._eventHandlers.push(i.listen(r,"touchmove",this.onTouchMove.bind(this))),this._eventHandlers.push(i.listen(r,"touchend",this.onTouchEnd.bind(this))),this._eventHandlers.push(i.listen(r,"touchcancel",this.onTouchEnd.bind(this)))}}ngOnDestroy(){super.ngOnDestroy();for(let i=0;i<this._eventHandlers.length;++i)this._eventHandlers[i]();this._rangeSubscription?.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(D(Oe),D(lt))},e.\u0275cmp=oe({type:e,selectors:[["time-scale-widget"]],inputs:{relative:"relative",range:"range",range$:"range$",utc:"utc",fixedRange:"fixedRange",markers:"markers",selectionHandles:"selectionHandles"},outputs:{rangeChange:"rangeChange",gridChange:"gridChange",selectionHandleChange:"selectionHandleChange"},standalone:!1,features:[ct],decls:2,vars:0,consts:[["canvas",""]],template:function(r,o){r&1&&I(0,"canvas",null,0)},encapsulation:2});let t=e;return t})();var An=class t{constructor(){}id(){return this.net+"."+this.sta+"."+this.loc+"."+this.cha}startTime(){return new Date(this.stime)}endTime(){return new Date(this.etime)}samplingRate(){return this.srateNum/this.srateDen}streamID(){return this.net+"."+this.sta+"."+this.loc+"."+this.cha}timingQuality(){return this.tq}setData(e){this.samples=e,this.nsamp=this.samples.length,this.etime=this.stime+this.srateDen*e.length*1e3/this.srateNum}toJSON(){return{sid:this.streamID(),startTime:this.stime,endTime:this.etime,srNum:this.srateNum,srDen:this.srateDen,samples:this.samples,tq:this.tq>=0?this.tq:void 0}}clone(){let e=new t;return e.net=this.net,e.sta=this.sta,e.loc=this.loc,e.cha=this.cha,e.stime=this.stime,e.etime=this.etime,e.nsamp=this.nsamp,e.srateNum=this.srateNum,e.srateDen=this.srateDen,e.tq=this.tq,e.samples=this.samples.slice(),e}intersects(e){return this.stime<e[1]&&this.etime>e[0]}asObservable(){return new z(e=>{e.next(this),e.complete()})}};function X_(t){return new z(e=>{let n=0;if(!t){e.complete();return}let i=t.length;for(;n<i;++n)e.next(t[n]);e.complete()})}function K_(t,e){if(!t||!t.length)return null;let n=!1,i,r=0,o=0,s=[],a,l=0,c=t.length;for(;l<c;++l){let u=t[l],d=u.samples;if(!d)continue;let f=u.stime,p=u.etime;if(e){if(!u.intersects(e))continue;if(e[0]>f){let _=Math.floor((e[0]-f)*.001*u.srateNum/u.srateDen);d=d.slice(_),f+=_*u.srateDen*1e3/u.srateNum}if(e[1]<p){let _=Math.floor((p-e[1])*.001*u.srateNum/u.srateDen);d=d.slice(0,d.length-_),p-=_*u.srateDen*1e3/u.srateNum}}if(!i)o=u.samplingRate(),a=new An,a.net=u.net,a.sta=u.sta,a.loc=u.loc,a.cha=u.cha,a.stime=f,a.srateNum=u.srateNum,a.srateDen=u.srateDen;else{if(o!==u.samplingRate())break;let _=Math.abs(f-i.etime)*.001;if(_<-.5/o){let y=-_*o+.5;if(y>=d.length)continue;d=d.slice(y,d.length)}else if(_>.5/o){if(!n)break;let y=_*o+.5;if(y>0){let M=s.length;s.length=M+y;let A=d[0],T=1/(y+1),N=T;for(let X=0;X<y;++X,++M,N+=T)s[M]=r*(1-N)+A*N}}}let h=s.length,g=d.length;s.length=h+g;for(let _=0;_<g;++_,++h)s[h]=d[_];r=d[d.length-1],i=u}return a&&s&&a.setData(s),a}function J_(t,e,n,i){if(e<0)return;let r=t[e];if(n.srateNum!==r.srateNum||n.srateDen!==r.srateDen){i.reset(),i.setSamplingFrequency(n.srateNum/n.srateDen);return}if(Math.abs(n.startTime().getTime()-r.endTime().getTime())*.001*n.srateNum>n.srateDen){i.reset();return}}function ew(t){return t.clone()}var op=class{constructor(e){this.sampleCount=0,this.firstRecord=-1,this.lastRecord=-1,this.offset=0,this.averageSamplingRate=0,e&&(this.timeMin=e.timeMin,this.timeMax=e.timeMax,this.amplMin=e.amplMin,this.amplMax=e.amplMax)}isValid(){return this.timeMin!=null&&this.timeMax!=null&&this.amplMax!=null&&this.amplMax!=null}getRange(){return this.timeMax-this.timeMin}merge(e){return e.timeMin!==void 0&&e.timeMin!==null&&(this.timeMin=e.timeMin),e.timeMax!==void 0&&e.timeMax!==null&&(this.timeMax=e.timeMax),e.amplMin!==void 0&&e.amplMin!==null&&(this.amplMin=e.amplMin),e.amplMax!==void 0&&e.amplMax!==null&&(this.amplMax=e.amplMax),this}},lr=class{constructor(e,n=!0){this.bufferSize=e,this.raw=[],this.filtered=[],this.filter=void 0,this.keepRaw=n}static getInfo(e,n,i,r){let o=new op;if(!e||!e.length)return o;n==null&&(n=e[0].stime),i==null&&(i=e[e.length-1].etime);let s=0,a,l=e.length,c=0;for(a=0;a<l;++a){let u=e[a];if(u.samples.length===0||u.etime<=n)continue;if(u.stime>=i)break;let d=(n-u.stime)*.001,f=(u.etime-i)*.001,p=0,h=u.samples.length;if(d>0){if(p=Math.floor(d*u.srateNum/u.srateDen)-1,p<0&&(p=0),p>=h)continue;h-=p}if(f>0){let _=Math.floor(f*u.srateNum/u.srateDen)-1;if(_<0&&(_=0),h-=_,h<=0)continue}o.firstRecord<0&&(o.firstRecord=a),o.lastRecord=a,(o.timeMin==null||o.timeMin>u.stime)&&(o.timeMin=u.stime),(o.timeMax==null||o.timeMax<u.etime)&&(o.timeMax=u.etime),o.amplMin==null&&(o.amplMin=u.samples[p]),o.amplMax==null&&(o.amplMax=u.samples[p]);let g=p;for(let _=0;_<h;++_,++g)u.samples[g]<o.amplMin&&(o.amplMin=u.samples[g]),u.samples[g]>o.amplMax&&(o.amplMax=u.samples[g]),s+=u.samples[g];o.sampleCount+=h,o.averageSamplingRate+=u.samplingRate(),++c}if(o.sampleCount>0&&(o.offset=s/o.sampleCount),r&&o.sampleCount>0){let u=0;for(a=0;a<l;++a){let d=e[a];if(d.samples.length===0||d.etime<=n)continue;if(d.stime>=i)break;let f=(n-d.stime)*.001,p=(d.etime-i)*.001,h=0,g=d.samples.length;if(f>0){if(h=Math.floor(f*d.srateNum/d.srateDen)-1,h<0&&(h=0),h>=g)continue;g-=h}if(p>0){let y=Math.floor(p*d.srateNum/d.srateDen)-1;if(y<0&&(y=0),g-=y,g<=0)continue}let _=h;for(let y=0;y<g;++y,++_){let M=d.samples[_]-o.offset;u+=M*M}}o.rms=Math.sqrt(u/o.sampleCount)}return c>0&&(o.averageSamplingRate/=c),o}clear(){this.raw.length=0,this.filtered.length=0,this.filter&&(this.filter=this.filter.clone()),this._recordSubject$&&this._recordSubject$.next(null)}setFilter(e){if(this.raw.length>0&&this.filter&&!this.keepRaw)return!1;if(this.filter=e,!this.filter)return!this.keepRaw&&this.raw.length>0?!1:(this.filtered.length=0,!0);this.filter=this.filter.clone(),this.filtered.length=0;let n=this.raw.length;for(let i=0;i<n;++i){let r=this.raw[i];if(i===0&&this.filter.setSamplingFrequency(r.samplingRate()),J_(this.raw,i-1,r,this.filter),this.keepRaw){let o=ew(r);this.filter.apply(o.samples),this.filtered.push(o)}else this.filter.apply(r.samples),this.raw[i]=r}return!0}feed(e){if(this.filter){let n=ew(e),i;if(this.keepRaw?(this.raw.push(e),i=this.filtered):i=this.raw,i.length===0?this.filter.setSamplingFrequency(e.srateNum/e.srateDen):J_(i,i.length-1,e,this.filter),this.filter.apply(n.samples),i.push(n),this.bufferSize>0)for(;this.filtered.length>1&&this.filtered[this.filtered.length-1].endTime().getTime()-this.filtered[0].endTime().getTime()>this.bufferSize;){let r=this.filtered.shift();r.samples.length=0}}else this.raw.push(e);if(this._recordSubject$&&this._recordSubject$.next(e),this.bufferSize>0){let n=!1;for(;this.raw.length>1&&this.raw[this.raw.length-1].endTime().getTime()-this.raw[0].endTime().getTime()>this.bufferSize;){let i=this.raw.shift();i.samples.length=0,n=!0}this._recordSubject$&&n&&this._recordSubject$.next(null)}}feedList(e){let n=e.length;for(let i=0;i<n;++i)this.feed(e[i])}getRecords(){return this.keepRaw&&this.filter?this.filtered:this.raw}getTimeWindow(){if(!(!this.raw||this.raw.length===0))return[this.raw[0].stime,this.raw[this.raw.length-1].etime]}contiguousRecord(e){let n=this.raw?this.raw:this.filtered;return!n||!n.length?null:K_(n,e)}changed(){return this._recordSubject$||(this._recordSubject$=new H,this._recordSubjectObservable=this._recordSubject$.asObservable()),this._recordSubjectObservable}asObservable(){return X_(this.getRecords())}};function vx(t,e,n,i){return(t-e)*i/(n-e)}function tw(t,e,n,i,r,o){o===void 0&&(o=5),typeof o=="number"?o={tl:o,tr:o,br:o,bl:o}:(o.tl===void 0&&(o.tl=5),o.tr===void 0&&(o.tr=5),o.br===void 0&&(o.br=5),o.bl===void 0&&(o.bl=5)),t.beginPath(),t.moveTo(e+o.tl,n),t.lineTo(e+i-o.tr,n),t.quadraticCurveTo(e+i,n,e+i,n+o.tr),t.lineTo(e+i,n+r-o.br),t.quadraticCurveTo(e+i,n+r,e+i-o.br,n+r),t.lineTo(e+o.bl,n+r),t.quadraticCurveTo(e,n+r,e,n+r-o.bl),t.lineTo(e,n+o.tl),t.quadraticCurveTo(e,n,e+o.tl,n),t.closePath()}var xs=class t{constructor(){this._info=null}setup(e,n,i){return this._info=lr.getInfo(e,n,i),this._records=e,this._info}getInfo(){return this._info}getRecords(){return this._records}renderGrid(e,n,i,r,o,s,a){if(!s)return!1;let l,c=s.length,u=n/((o-r)*.001),d=r*.001;e.strokeStyle="rgba(0,0,0,0.25)",e.setLineDash([5]),e.lineWidth=1;let f=(a||0)*.001,p=d-f,h;for(l=0;l<c;++l){if(s[l]<=0)continue;let g=p-p%s[l],_=Math.floor((g-p)*u);for(h=_;h<n;)h>=0&&(e.beginPath(),e.moveTo(h+.5,0),e.lineTo(h+.5,i),e.stroke()),g+=s[l],_=Math.floor((g-p)*u),h=_;break}return e.setLineDash([]),!0}renderMarkers(e,n,i,r,o,s,a,l){e.textBaseline="top",e.textAlign="left",e.font=At.FontSizePx+"px sans-serif";let c=function(d){return vx(d,r,o,n)},u=s.length;for(let d=0;d<u;++d){let f=s[d],p=f.style;!p&&a&&(p=a.get(f.text)),p?.visible!==!1&&(f.render?f.render(e,p,c,i,f===l):t.RenderMarker(f,e,p,c,i,f===l))}return!0}static RenderMarker(e,n,i,r,o,s){let a=0,l=1;i?(n.strokeStyle=i.color,l=i.lineWidth,a=i.align):n.strokeStyle="#f00",n.lineWidth=l,s&&(n.lineWidth*=2);let c=r(e.date.getTime())-l*.5;if(n.beginPath(),n.moveTo(c,0),n.lineTo(c,o),n.stroke(),e.description){let p=n.measureText(e.description).width+4*2,h=At.FontSizePx+4*2,g=c+4,_=0;n.fillStyle=n.strokeStyle,n.beginPath(),tw(n,g,_,p,h),n.fill(),n.strokeStyle=i&&i.labelText?i.labelText:"#fff",n.lineWidth=1,n.stroke(),n.beginPath(),n.fillStyle=n.strokeStyle,n.fillText(e.description,g+4,_+4)}else e.text&&(n.fillStyle=n.strokeStyle,a?a===1?n.fillText(e.text,c+2,(o-12)*.5):a===2&&n.fillText(e.text,c+2,o-12-2):n.fillText(e.text,c+2,0));return c}renderRecords(e,n,i,r,o,s){if(!this._records||this._records.length===0)return console.log("No records set: missing setup() call?"),!1;if(!this._info)return console.log("No info set: missing setup() call?"),!1;let a=0,l=!0,c,u,d=this._records.length,f=null,p=!1,h=100,g=h,_=0,y=n/((o-r)*.001),M,A,T=this._info.amplMin;s&&s.amplMin!=null&&(s.amplAbsolute?T=s.amplMin:T=s.amplMin+this._info.offset);let N=this._info.amplMax;s&&s.amplMax!=null&&(s.amplAbsolute?N=s.amplMax:N=s.amplMax+this._info.offset);let X=N-T;X===0?(A=i*.5+.5,M=0):(M=(i-1)/X,A=N*M+.5);let $=0,fe=0,me=0,we=0,Ne=0,pe=0;for(c=0;c<d;++c){let S=this._records[c];if(!S.nsamp||S.etime<=r)continue;if(S.stime>=o)break;let Pt;f?Pt=Math.abs(S.stime-f.etime):Pt=2e3*S.srateDen/S.srateNum;let K=(r-S.stime)*.001,Be=(S.etime-o)*.001,L=0,Pn=S.nsamp;if(K>0){if(L=Math.floor(K*S.srateNum/S.srateDen)-1,L<0&&(L=0),L>=Pn)continue;Pn-=L,K-=L*S.srateDen/S.srateNum}if(Be>0){let _t=Math.floor(Be*S.srateNum/S.srateDen)-1;if(_t<0&&(_t=0),Pn-=_t,Pn<=0)continue}let et=Math.floor(y*K),Dn=y*S.srateDen/S.srateNum;if(Pt*.001*S.srateNum>S.srateDen?(p&&(e.stroke(),p=!1),Ne=-et,pe=A-M*(S.samples[L]-a),$=pe,fe=pe,me=Ne,we=pe,e.beginPath(),e.moveTo(Ne,pe),p=!0,u=1):u=0,l)for(;u<Pn;++u)if(Ne=u*Dn-et,pe=A-M*(S.samples[L+u]-a),Math.floor(me)===Math.floor(Ne))pe<$?$=pe:pe>fe&&(fe=pe),++_;else{if(_){let _t=Ne-me;!(we<=$&&pe>=fe)&&!(we>=fe&&pe<=$)&&(we<pe?(e.lineTo(me+_t*.33333,$),e.lineTo(me+_t*.66666,fe)):(e.lineTo(me+_t*.33333,fe),e.lineTo(me+_t*.66666,$)))}e.lineTo(Ne,pe),me=Ne,we=$=fe=pe,_=0}else for(;u<Pn;++u)Ne=u*Dn-et,pe=A-M*(S.samples[L+u]-a),e.lineTo(Ne,pe),--g<=0&&(g=h,e.stroke(),e.beginPath(),e.moveTo(Ne,pe));f=S}if(p){if(l){if(_){let S=Ne-me;!(we<=$&&pe>=fe)&&!(we>=fe&&pe<=$)&&(we<pe?(e.lineTo(me+S*.33333,$),e.lineTo(me+S*.66666,fe)):(e.lineTo(me+S*.33333,fe),e.lineTo(me+S*.66666,$)))}(Ne!==me||pe!==we)&&e.lineTo(Ne,pe)}e.stroke()}return!0}renderRecordBoxes(e,n,i,r,o){if(!this._records||this._records.length===0)return console.log("No records set: missing setup() call?"),!1;if(!this._info)return console.log("No info set: missing setup() call?"),!1;let s,a=this._records.length,l=n/((o-r)*.001);e.strokeStyle="rgba(0,128,0,0.5)",e.lineWidth=1;let c;for(s=0;s<a;++s){let u=this._records[s],d=(u.stime-r)*.001,f=(u.etime-r)*.001,p=Math.floor(d*l)+.5,h=Math.floor(f*l)+.5,g=!0;c&&c===p&&(p+=1,g=!1),e.beginPath(),e.moveTo(p,0),e.lineTo(h,0),e.lineTo(h,i-.5),e.lineTo(p,i-.5),g&&e.lineTo(p,0),e.stroke(),c=h}return!0}};var co=class{constructor(){this.showRecordBorders=!1,this.highQuality=!1}},sp=class{constructor(){this.align=0}},Rc=class{constructor(){this._renderer=new xs,this._renderParams=new sp,this._renderState={w:null,tmin:null,pps:null}}setDirty(){this._renderState.w=-1}get params(){return this._renderParams}setup(e,n,i,r,o){let s=this._renderParams;s.ctx=e,s.w=n,s.h=i,s.tmin=void 0,s.tmax=void 0,s.align=o;let a,l=!1;if(s.tmin=r.min,a=r.pps,a||(s.tmax=r.max,a=s.w/(s.tmax-s.tmin)),s.tmin+=o,s.tmax!=null&&(s.tmax+=o),s.tmin!=null&&a!=null)return s.tmax===void 0&&(s.tmax=s.tmin+s.w/a),this._renderState.w===null?l=!0:(this._renderState.w!==s.w&&(l=!0),this._renderState.tmin!==s.tmin&&(l=!0),this._renderState.pps!==a&&(l=!0)),l&&(s.info=void 0),this._renderState.w=s.w,this._renderState.tmin=s.tmin,this._renderState.pps=a,l}renderGrid(e){if(e){let n=this._renderParams;this._renderer.renderGrid(n.ctx,n.w,n.h,n.tmin,n.tmax,e.drx,(e.ref!=null?e.ref:0)+n.align)}}renderMarkers(e,n,i){if(e?.length){let r=this._renderParams;this._renderer.renderMarkers(r.ctx,r.w,r.h,r.tmin,r.tmax,e,n?n.markerOptions:void 0,i)}}renderSelection(e){let n=this._renderParams,i=(e.min-n.tmin)*n.w/(n.tmax-n.tmin),r=(e.max-n.tmin)*n.w/(n.tmax-n.tmin);r<0||i>=n.w||(i<0&&(i=0),r>n.w&&(r=n.w),n.ctx.fillStyle="rgba(0,0,0,0.25)",n.ctx.fillRect(i,0,r-i,n.h))}render(e,n,i,r){let o=this._renderParams;return(!o.info||!o.info.isValid())&&(o.info=this._renderer.setup(i,o.tmin,o.tmax)),this.preRender(o),this.renderGrid(e),this.renderRecords(o,n,i),this.renderMarkers(r,n),this.postRender(o),o.info}renderCursor(e,n){let i=this._renderParams,r=(e-i.tmin)*i.w/(i.tmax-i.tmin);r<0||r>=i.w||(i.ctx.strokeStyle="rgb(0,0,0)",i.ctx.lineWidth=1,i.ctx.beginPath(),i.ctx.moveTo(r,0),i.ctx.lineTo(r,i.h),i.ctx.stroke(),n&&(i.ctx.fillStyle=i.ctx.strokeStyle,i.ctx.fillText(n,r+4,0)))}renderRecords(e,n,i){i&&i.length&&(n&&n.showRecordBorders&&this._renderer.renderRecordBoxes(e.ctx,e.w,e.h,e.tmin,e.tmax),n&&n.color?(e.ctx.strokeStyle=n.color,e.ctx.fillStyle=n.color):(e.ctx.strokeStyle="#888",e.ctx.fillStyle="#888"),this._renderer.renderRecords(e.ctx,e.w,e.h,e.tmin,e.tmax))}traceChanged(e){}updateRequest(){}dispose(){}preRender(e){}postRender(e){}};var Ac=(()=>{let e=class e extends Si{set options(i){this._opts=i,this.setDirty()}set renderer(i){if(this._renderer!==i){if(this._renderer=i,this._renderUpdateSubscription&&(this._renderUpdateSubscription.unsubscribe(),this._renderUpdateSubscription=void 0),this._renderer){let r=this._renderer.updateRequest();r&&(this._renderUpdateSubscription=r.subscribe(()=>{this.redraw()})),this._renderer.traceChanged(this._trace)}this.setDirty()}}get renderer(){return this._renderer}set trace(i){this._trace!==i&&(this._trace=i,this._renderer&&this._renderer.setDirty(),this.setDirty(),this._dataChangedSubscription&&(this._dataChangedSubscription.unsubscribe(),this._dataChangedSubscription=void 0),this._trace&&(this._dataChangedSubscription=this._trace.changed().subscribe(r=>{this.setDirty(),this._renderer&&this._renderer.setDirty()})),this._renderer&&this._renderer.traceChanged(this._trace))}get trace(){return this._trace}set range(i){this._range=i,this.setDirty()}get range(){return this._range}set align(i){this._alignment=i,this.setDirty()}get align(){return this._alignment}set filtered(i){this._showFiltered!==i&&(this._showFiltered=i,this._renderer?.setDirty(),this.setDirty())}get filtered(){return this._showFiltered}set cursor(i){if(this._range){let r=this._cursor-this._alignment;r>=this._range.min&&r<this._range.max&&this.setDirty(),i!=null&&(r=i-this._alignment,r>=this._range.min&&r<this._range.max&&this.setDirty())}this._cursor=i,this.checkRedraw()}set cursorText(i){this._cursorText=i,this.redraw()}set markers(i){this._traceMarkers=i}set gridSpacing(i){this._gridSpacing=i,this.setDirty()}set selection(i){this._selection=i,this.setDirty()}constructor(i,r){super(i),this.id="",this._alignment=0,this._opts=null,this._showFiltered=!1,this._dirty=!0,this.nativeElement=r.nativeElement}resize(){this.redraw()}redraw(i=!1){if(!this.canvas||!this._visible||(this._renderer||(this._renderer=new Rc),this._dirty=!1,i&&this._renderer.setDirty(),this.canvas.nativeElement.clientWidth<=0||this.canvas.nativeElement.clientHeight<=0))return;let r=mn(this.canvas.nativeElement,this._opts?this._opts.highQuality:!1);if(!r)return;let o=this.canvas.nativeElement.clientWidth,s=this.canvas.nativeElement.clientHeight;io(r,0,0,o,s);let a;this._trace&&(a=this._showFiltered?this._trace.filtered:this._trace.raw),this._range&&(this._renderer.setup(r,o,s,this._range,this._alignment),this._selection&&this._renderer.renderSelection(this._selection),this.traceInfo=this._renderer.render(this._gridSpacing,this._opts,a,this._traceMarkers),this._renderer.renderCursor(this._cursor,this._cursorText)),vn(r)}setDirty(){this._dirty=!0}checkRedraw(){this._dirty&&this.redraw()}visibilityChanged(i){i&&this.checkRedraw()}ngOnInit(){super.ngOnInit(),this.redraw()}ngOnDestroy(){super.ngOnDestroy(),this._optionsChanged?.unsubscribe(),this._dataChangedSubscription?.unsubscribe(),this._renderUpdateSubscription?.unsubscribe(),this._renderer?.dispose()}ngOnChanges(){this.checkRedraw()}};e.\u0275fac=function(r){return new(r||e)(D(Oe),D(ae))},e.\u0275cmp=oe({type:e,selectors:[["trace-widget"]],inputs:{options:"options",id:"id",renderer:"renderer",trace:"trace",range:"range",align:"align",filtered:"filtered",cursor:"cursor",cursorText:"cursorText",markers:"markers",gridSpacing:"gridSpacing",selection:"selection"},standalone:!1,features:[ct,un],decls:0,vars:0,template:function(r,o){},encapsulation:2,changeDetection:0});let t=e;return t})();var ap=class{constructor(e){this.id="",this.title="",this.align=0,this.id=e}},Nc=class extends ap{};var lp=class{constructor(e,n){this.min=e,this.max=n}},Rs=class{constructor(e,n){this._isVertical=!!n,this._range=new lp(0,1),this._scale=e||1}render(e,n,i){if(n<=0||i<=0)return;e.clearRect(0,0,n,i);let o=this._range.max-this._range.min,s=this._range.min,a=this._range.max,l;if(this._isVertical)l=Math.floor(Math.max(i/At.FontSizePx/3,3));else{let _=e.measureText("-1.23E456").width;l=Math.floor(Math.max(n/_,2))}let c=Ss(o,l,!1),u=At.FontSizePx,d=u/2,f=u/2,p=0,h=ro(c),g=Math.pow(10,h);if(e.strokeStyle=At.StrokeStyle,e.fillStyle=e.strokeStyle,this._isVertical){let _=n-d-.5;e.beginPath(),e.moveTo(_,.5),e.lineTo(_,i+.5),e.stroke(),e.font=At.FontSizePx+"px Sans-Serif";let y=i;if(c>0){let M=Math.floor(s/c)*c;M<s&&(M+=c),e.textBaseline="middle",e.textAlign="right",M=Math.floor(s/c)*c,M<s&&(M+=c);let A=(i-1)/o,T=Math.ceil(u*1.5/2);for(;M<=a;){let N=i-1-Math.floor((M-s)*A+.5)+.5;if(e.beginPath(),e.moveTo(_,N),e.lineTo(_-f,N),e.stroke(),N+T>=i?N-=N+T-i:N-T<0&&(N+=T-N),N+T<=y){if(Math.abs(M)<1e-10)e.fillText("0",_-f-d,N);else{let X=Math.round(M*g)/g;h>=4?e.fillText(X.toExponential()+"",_-f-d,N):e.fillText(X+"",_-f-d,N)}y=N-T}M+=c}}this._label&&(e.save(),e.textAlign="center",e.fillStyle=e.strokeStyle,e.textBaseline="top",e.translate(p,i*.5),e.rotate(-Math.PI/2),e.fillText(this._label,0,0),e.restore())}else{let _=d+.5;if(e.beginPath(),e.moveTo(.5,_),e.lineTo(n+.5,_),e.stroke(),e.font=At.FontSizePx+"px Sans-Serif",c>0){e.textBaseline="top",e.textAlign="center";let y=(Math.floor(s/c)|0)*c;y<s&&(y+=c);let M=0,A=(n-1)/o;for(;y<=a;){let T=Math.floor((y-s)*A+.5)+.5;e.beginPath(),e.moveTo(T,_),e.lineTo(T,_+f),e.stroke();let N=Math.round(y*g)/g,X=(h>=4?N.toExponential():N)+"",fe=e.measureText(X).width/2;T-fe<0?T+=fe-T:T+fe>n&&(T-=T+fe-n),T-fe>=M&&(e.fillText(X,T,_+f+d),M=T+fe),y+=c}}if(this._label){let y=n/2;e.textBaseline="top",e.textAlign="center",e.fillText(this._label,y,_+f+d+u+d)}}}setRange(e,n){if(this._range.min=e||0,this._range.max=n||1,this._range.min>this._range.max){let i=this._range.min;this._range.min=this._range.max,this._range.max=i}this._range.min*=this._scale,this._range.max*=this._scale}setLabel(e){this._label=e}setScale(e){this._scale=e}};var nw=(()=>{let e=class e extends Si{constructor(){super(...arguments),this._renderer=new Rs(1,!0),this._demean=!1}set range(i){this._info=i,this.redraw()}set label(i){this._renderer.setLabel(i)}set scale(i){i==null?this._renderer.setScale(1):this._renderer.setScale(i)}set gain(i){i!=null&&i!==0?this.scale=1/i:this.scale=1}set centered(i){this._demean=i,this.redraw()}ngOnInit(){super.ngOnInit()}ngOnDestroy(){super.ngOnDestroy()}resize(){this.redraw()}redraw(){if(!this._renderer||!this.canvas||!this._visible)return;if(this._info){let r=this._info.amplMin,o=this._info.amplMax;this._demean&&(r-=this._info.offset,o-=this._info.offset),this._renderer.setRange(r,o)}let i=mn(this.canvas.nativeElement,!0);i&&(io(i,0,0,this.canvas.nativeElement.clientWidth,this.canvas.nativeElement.clientHeight),this._renderer.render(i,this.canvas.nativeElement.clientWidth,this.canvas.nativeElement.clientHeight),vn(i))}};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=fn(e)))(o||e)}})(),e.\u0275cmp=oe({type:e,selectors:[["scale-widget"]],inputs:{range:"range",label:"label",scale:"scale",gain:"gain",centered:"centered"},standalone:!1,features:[ct],decls:0,vars:0,template:function(r,o){},encapsulation:2});let t=e;return t})();var wx=t=>({$implicit:t});function Cx(t,e){if(t&1&&(m(0,"label"),C(1),v()),t&2){let n=e.$implicit;w(),he(n.title||n.id)}}function Dx(t,e){if(t&1){let n=Me();m(0,"div",8),k("click",function(){let r=j(n).$implicit,o=E();return U(o.clickItem(r))}),I(1,"trace-widget",9,2)(3,"scale-widget",10),rh(4,11),v()}if(t&2){let n=e.$implicit,i=_i(2),r=E(),o=_i(2),s=_i(4);V("ngClass",n===r.currentItem?"active":""),w(),V("parent",s)("id",n.id)("options",r.traceOptions)("align",n.align)("markers",n.markers)("selection",n.selection),w(2),V("parent",s)("range",i.traceInfo)("label",n.label)("gain",n.gain)("centered",r.centerScale),w(),V("ngTemplateOutlet",r.labelTemplate||o)("ngTemplateOutletContext",Mt(14,wx,n))}}var iw=(()=>{let e=class e{set bufferSize(i){this._bufferSize=i;let r=this.viewItems.length;for(let o=0;o<r;++o){let s=this.viewItems[o];s.widget&&(s.widget.trace.bufferSize=i)}}set options(i){this.traceOptions=i,this.traceOptions$.next(this.traceOptions)}set range(i){i&&this.timeScaleWidget.setRange(i)&&(this.rangeChange.emit(this.range),this.syncRange())}get range(){return this.timeScaleWidget.range}set traces(i){this.clear();let r;for(r in i)this.addItem(r,i[r])}set items(i){this.clear();for(let r of i){let o=this.addItem(r.id);o&&(o.title=r.title,o.markers=r.markers,o.gain=r.gain,o.align=r.align,o.label=r.label,o.custom=r.custom,r.trace&&o.trace.feedList(r.trace.raw))}}set currentItem(i){this._currentItem&&(this.currentItem.selection=void 0),this._currentItem=i,this._selection&&this._currentItem&&(this._currentItem.selection=this._selection)}get currentItem(){return this._currentItem}set selection(i){this._selection=i,this._currentItem&&(this._currentItem.selection=this._selection)}set filtered(i){if(this._showFiltered===i)return;this._showFiltered=i;let r=this.viewItems.length;for(let o=0;o<r;++o){let s=this.viewItems[o];s.widget&&(s.widget.filtered=i)}this.updated.emit(!0),this.update()}set centeredScale(i){this.centerScale=i}get empty(){return this.viewItems.length===0}get count(){return this.viewItems.length}constructor(){this.relative=!1,this.utc=!1,this.rangeChange=new ie,this.currentItemChange=new ie,this.updated=new ie,this.viewItems=[],this.traceOptions=new co,this.traceOptions$=new ve(this.traceOptions),this.centerScale=!1,this._bufferSize=0,this._showFiltered=!1,this._timescaleUpdateRequired=!1,this._nextFrameRequest=0,this.clear()}clear(){this._items={},this.viewItems=[]}ensureVisibility(i){i.widget?.nativeElement.scrollIntoView({block:"nearest",inline:"nearest"})}_applyRangeFromTimeScale(i){this.timeScaleWidget.setRange(i),this.rangeChange.emit(this.range),this.syncRange()}_applyGridFromTimeScale(i){this._gridSpacing=i;for(let r of this.viewItems)r.widget&&(r.widget.gridSpacing=this._gridSpacing);this.update()}pushItem(i,r){let o=new Nc;return o.id=i,o.trace=new lr(this._bufferSize,!0),o.trace.setFilter(this._filter),r&&o.trace.feedList(r),this._items[o.id]=o,this.viewItems.push(o),o}syncRange(){this._timescaleUpdateRequired=!0,this.update()}addItem(i,r){return this._items.hasOwnProperty(i)?null:this.pushItem(i,r)}getItem(i){return this._items.hasOwnProperty(i)?this._items[i]:null}createOrGetItem(i,r){return this._items.hasOwnProperty(i)?this._items[i]:this.pushItem(i,r)}removeItem(i){if(!this._items.hasOwnProperty(i))return!1;delete this._items[i];let r=this.viewItems.length;for(let o=0;o<r;++o)if(this.viewItems[o].id===i){this.viewItems.splice(o,1);break}return!0}push(i,r){if(r){let o=this.createOrGetItem(i.id());if(!o)return;o.trace.feed(i),o.widget&&o.widget.setDirty()}else{let o=i.id();if(!this._items.hasOwnProperty(o))return;let s=this._items[o];s.trace.feed(i),s.widget&&s.widget.setDirty()}}feed(i,r){let o;o=i.subscribe({next:s=>{this.push(s,r)},error:s=>{o&&o.unsubscribe()},complete:()=>{o.unsubscribe()}})}setCoveredTimeRange(){let i=new Fe,r=this.viewItems.length,o;for(o=0;o<r;++o){let s=this.viewItems[o];if(!s.trace.raw||s.trace.raw.length<1)continue;let a=s.trace.raw[0].stime,l=s.trace.raw[s.trace.raw.length-1].etime;(i.min===void 0||a<i.min)&&(i.min=a),(i.max===void 0||l>i.max)&&(i.max=l)}i.min!==void 0&&i.max!==void 0&&(this.range=i)}shiftTraces(i){this.range=i}traceId(i,r){return r.id}setFilter(i){this._filter=i;for(let r of this.viewItems)r.trace.setFilter(i),this._showFiltered&&r.widget.redraw(!0);this._showFiltered&&(this.updated.emit(!0),this.update())}hasFilter(){return this._filter!=null}get filter(){return this._filter}sort(i){this.viewItems.sort(i)}clickItem(i){this.currentItemChange.emit(i)}syncView(){let i=this.viewItems.length,r=[];r.length=i;for(let o=0;o<i;++o){let s=this.viewItems[o];r[o]=s.widget,s.widget&&(s.widget=void 0)}this.widgets.forEach(o=>{if(this._items.hasOwnProperty(o.id)){let s=this._items[o.id];s.widget=o}});for(let o=0;o<i;++o){let s=this.viewItems[o];s.widget!==r[o]&&(s.widget.trace=s.trace,s.widget.filtered=this._showFiltered,this.renderFactory&&(s.widget.renderer=this.renderFactory.create(s.widget)),s.widget.range=this.range,s.widget.gridSpacing=this._gridSpacing)}this.update()}update(i=!1){if(i)for(let r of this.viewItems)r.widget?.setDirty();this._nextFrameRequest>0||(this._nextFrameRequest=setTimeout(()=>this.checkRedraw(),20))}checkRedraw(){if(this._nextFrameRequest=0,this._timescaleUpdateRequired){this._timescaleUpdateRequired=!1,this._gridSpacing=this.timeScaleWidget.redraw();for(let i of this.viewItems)i.widget&&(i.widget.range=this.range,i.widget.gridSpacing=this._gridSpacing,i.widget.checkRedraw())}else for(let i of this.viewItems)i.widget?.checkRedraw();this.updated.emit(!1)}ngAfterViewInit(){this.widgets&&this.syncView(),this._widgetsSubscription=this.widgets.changes.subscribe(i=>{this.syncView()})}ngOnDestroy(){this._nextFrameRequest>0&&clearTimeout(this._nextFrameRequest),this._optionsSubscription?.unsubscribe(),this._widgetsSubscription?.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=oe({type:e,selectors:[["trace-view"]],viewQuery:function(r,o){if(r&1&&(ot(Ii,7),ot(Ac,5)),r&2){let s;Ge(s=qe())&&(o.timeScaleWidget=s.first),Ge(s=qe())&&(o.widgets=s)}},inputs:{renderFactory:"renderFactory",bufferSize:"bufferSize",options:"options",range:"range",traces:"traces",items:"items",currentItem:"currentItem",selection:"selection",filtered:"filtered",centeredScale:"centeredScale",relative:"relative",utc:"utc",labelTemplate:"labelTemplate",markers:"markers"},outputs:{rangeChange:"rangeChange",currentItemChange:"currentItemChange",updated:"updated"},standalone:!1,decls:9,vars:3,consts:[["defaultLabel",""],["scroller",""],["traceWidget",""],[1,"traceview"],[1,"scrollarea"],[1,"content"],[1,"trace",3,"ngClass"],[3,"rangeChange","gridChange","relative","utc","markers"],[1,"trace",3,"click","ngClass"],[3,"parent","id","options","align","markers","selection"],[3,"parent","range","label","gain","centered"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(r,o){if(r&1){let s=Me();m(0,"div",3),ue(1,Cx,2,1,"ng-template",null,0,cy),m(3,"div",4,1)(5,"div",5),ze(6,Dx,5,16,"div",6,o.traceId,!0),v()(),m(8,"time-scale-widget",7),k("rangeChange",function(l){return j(s),U(o._applyRangeFromTimeScale(l))})("gridChange",function(l){return j(s),U(o._applyGridFromTimeScale(l))}),v()()}r&2&&(w(6),We(o.viewItems),w(2),V("relative",o.relative)("utc",o.utc)("markers",o.markers))},dependencies:[Rt,Ay,Ii,Ac,nw],encapsulation:2});let t=e;return t})();var rw=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Ci]});let t=e;return t})();var Sx=t=>({selected:t}),Ix=(t,e)=>({today:t,weekend:e});function Tx(t,e){if(t&1){let n=Me();m(0,"div",12),k("click",function(r){let o=j(n).$implicit,s=E(2);return U(s.setYear(r,o))}),C(1),v()}if(t&2){let n=e.$implicit,i=E(2);V("ngClass",Mt(2,Sx,n==i.mv.year)),w(),_e("",n," ")}}function Mx(t,e){if(t&1&&(m(0,"div",10)(1,"div",2),ze(2,Tx,2,4,"div",11,gt),v()()),t&2){let n=E();w(2),We(n.years)}}function xx(t,e){if(t&1&&(m(0,"div",13),C(1),v()),t&2){let n=e.$implicit;Wl("title",n.fullName),w(),he(n.firstLetter)}}function Rx(t,e){if(t&1&&(m(0,"div",14),C(1),v()),t&2){let n=e.$implicit;w(),he(n)}}function Ax(t,e){if(t&1){let n=Me();m(0,"div",16),k("click",function(r){let o=j(n).$implicit,s=E(2);return U(s.setDate(r,o))}),C(1),v()}if(t&2){let n=e.$implicit,i=E(2);V("ngClass",rr(2,Ix,i.today==i.mv.year+"-"+(i.mv.month+1)+"-"+n,(i.mv.leadingDays.length+n)%7==6||(i.mv.leadingDays.length+n)%7==0)),w(),_e(" ",n," ")}}function Nx(t,e){if(t&1&&(m(0,"div",14),C(1),v()),t&2){let n=e.$implicit;w(),he(n)}}function kx(t,e){if(t&1&&(m(0,"div",10)(1,"div",2),ze(2,xx,2,2,"div",13,gt),ze(4,Rx,2,1,"div",14,gt),ze(6,Ax,2,5,"div",15,gt),ze(8,Nx,2,1,"div",14,gt),v()()),t&2){let n=E();w(2),We(n.daysOfWeek),w(2),We(n.mv.leadingDays),w(2),We(n.mv.days),w(2),We(n.mv.trailingDays)}}function Ox(t,e){if(t&1){let n=Me();m(0,"div",10)(1,"div",2)(2,"table",17)(3,"tr"),I(4,"td"),m(5,"td")(6,"button",7),k("click",function(r){j(n);let o=E();return U(o.addHour(r,1))}),I(7,"i",18),v()(),I(8,"td"),m(9,"td")(10,"button",7),k("click",function(r){j(n);let o=E();return U(o.addMinute(r,1))}),I(11,"i",18),v()(),I(12,"td"),m(13,"td")(14,"button",7),k("click",function(r){j(n);let o=E();return U(o.addSecond(r,1))}),I(15,"i",18),v()(),I(16,"td"),v(),m(17,"tr")(18,"td")(19,"button",19),k("click",function(){j(n);let r=E();return U(r.nowTime())}),I(20,"i",20),v()(),m(21,"td")(22,"span",21),C(23),v()(),m(24,"td"),C(25,":"),v(),m(26,"td")(27,"span",21),C(28),v()(),m(29,"td"),C(30,":"),v(),m(31,"td")(32,"span",21),C(33),v()(),m(34,"td")(35,"button",22),k("click",function(){j(n);let r=E();return U(r.resetTime())}),I(36,"i",23),v()()(),m(37,"tr"),I(38,"td"),m(39,"td")(40,"button",7),k("click",function(r){j(n);let o=E();return U(o.addHour(r,-1))}),I(41,"i",24),v()(),I(42,"td"),m(43,"td")(44,"button",7),k("click",function(r){j(n);let o=E();return U(o.addMinute(r,-1))}),I(45,"i",24),v()(),I(46,"td"),m(47,"td")(48,"button",7),k("click",function(r){j(n);let o=E();return U(o.addSecond(r,-1))}),I(49,"i",24),v()(),I(50,"td"),v()()()()}if(t&2){let n=E();w(23),he(("0"+n.inputHour).slice(-2)),w(5),he(("0"+n.inputMinute).slice(-2)),w(5),he(("0"+n.inputSecond).slice(-2))}}var vt=class{constructor(e,n){this.fullName=e,this.shortName=n}},ti=class extends vt{constructor(e,n,i){super(e,n),this.firstLetter=i}},Nn=class Nn{set date(e){this.applyDate(e)}constructor(e){this.elem=e,this.years=[],this.inputHour=0,this.inputMinute=0,this.inputSecond=0,this.dateChange=new ie,this.months=Nn.Months,this.daysOfWeek=Nn.DaysOfWeek,this._firstDayOfWeek=1,this._days=[];for(let n=1;n<=31;++n)this._days.push(n);this.yv=!1,this.dateOnly=!1}onClick(e){e.preventDefault()}set withTime(e){this.dateOnly=!e}setTimePicking(e){this.dateOnly=!e}getMonthView(e,n){n>11?e++:n<0&&e--,n=(n+12)%12;let i=new Date(e,n,1),r=new Date(e,n+1,0),o=new Date(e,n,0),s=r.getDate(),a=o.getDate(),c=(i.getDay()-this._firstDayOfWeek+7)%7||7,u=this._days.slice(0,6*7-(c+s));return{year:e,month:n,days:this._days.slice(0,s),leadingDays:this._days.slice(-c-(31-a),a),trailingDays:u}}applyDate(e){!e||isNaN(e.getTime())||this._innerDate!==e&&(this._innerDate=e,this.mv=this.getMonthView(this._innerDate.getFullYear(),this._innerDate.getMonth()),this.today=this._innerDate.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate(),this.inputHour=e.getHours(),this.inputMinute=e.getMinutes(),this.inputSecond=e.getSeconds())}movePage(e,n){return this.yv?(this.mv=this.getMonthView(this.mv.year+21*n,this.mv.month),this.switchToYearView()):this.mv=this.getMonthView(this.mv.year,this.mv.month+n),!1}addHour(e,n){return this.inputHour+=n,this.inputHour>23?this.inputHour=23:this.inputHour<0&&(this.inputHour=0),!1}addMinute(e,n){return this.inputMinute+=n,this.inputMinute>60?this.inputMinute=60:this.inputMinute<0&&(this.inputMinute=0),!1}addSecond(e,n){return this.inputSecond+=n,this.inputSecond>60?this.inputSecond=60:this.inputSecond<0&&(this.inputSecond=0),!1}nowTime(){this.applyDate(new Date)}resetTime(){this.inputHour=0,this.inputMinute=0,this.inputSecond=0}switchToMonthView(){return this.yv=!1,this.mv=this.getMonthView(this.mv.year,this.mv.month),!1}switchToYearView(){this.yv=!0,this.years=[];for(let e=0;e<21;++e)this.years[e]=this.mv.year-10+e;return!1}setYear(e,n){return this.mv.year=n,this.switchToMonthView(),!1}setDate(e,n){this.dateOnly?this._innerDate=new Date(this.mv.year,this.mv.month,n):this._innerDate=new Date(this.mv.year,this.mv.month,n,this.inputHour,this.inputMinute,this.inputSecond),this.dateChange.emit(this._innerDate),e.stopPropagation()}ngOnInit(){this._innerDate||this.nowTime(),this.yv&&this.switchToYearView()}};Nn.Months=[new vt("January","Jan"),new vt("February","Feb"),new vt("March","Mar"),new vt("April","Apr"),new vt("May","May"),new vt("June","Jun"),new vt("July","Jul"),new vt("August","Aug"),new vt("September","Sep"),new vt("October","Oct"),new vt("November","Nov"),new vt("December","Dec")],Nn.DaysOfWeek=[new ti("Monday","Mon","M"),new ti("Tuesday","Tue","T"),new ti("Wednesday","Wed","W"),new ti("Thursday","Thu","T"),new ti("Friday","Fri","F"),new ti("Saturday","Sat","S"),new ti("Sunday","Sun","S")],Nn.\u0275fac=function(n){return new(n||Nn)(D(ae))},Nn.\u0275cmp=oe({type:Nn,selectors:[["datetime-picker-popup"]],hostBindings:function(n,i){n&1&&k("mousedown",function(o){return i.onClick(o)})},inputs:{date:"date",withTime:"withTime"},outputs:{dateChange:"dateChange"},standalone:!1,decls:16,vars:5,consts:[[1,"adp","widget",3,"click"],[1,"adp-month","header"],[1,"content"],["type","button",1,"adp-prev",3,"click"],[1,"fas","fa-chevron-left"],[3,"title"],[3,"click"],["type","button",3,"click"],["type","button",1,"adp-next",3,"click"],[1,"fas","fa-chevron-right"],[1,"segment"],[1,"adp-year","selectable",3,"ngClass"],[1,"adp-year","selectable",3,"click","ngClass"],[1,"adp-day-of-week",3,"title"],[1,"adp-day"],[1,"adp-day","selectable",3,"ngClass"],[1,"adp-day","selectable",3,"click","ngClass"],["cellspacing","0","cellpadding","0","border","0"],[1,"fas","fa-chevron-up"],["title","Set time to now",3,"click"],[1,"far","fa-clock"],[1,"timeValue"],["title","Set time to midnight",3,"click"],[1,"far","fa-times-circle"],[1,"fas","fa-chevron-down"]],template:function(n,i){n&1&&(m(0,"div",0),k("click",function(o){return o.stopPropagation()}),m(1,"div",1)(2,"div",2)(3,"button",3),k("click",function(o){return i.movePage(o,-1)}),I(4,"i",4),v(),m(5,"span",5)(6,"a",6),k("click",function(){return i.switchToMonthView()}),C(7),v()(),C(8,"\xA0"),m(9,"a",7),k("click",function(){return i.switchToYearView()}),C(10),v(),m(11,"button",8),k("click",function(o){return i.movePage(o,1)}),I(12,"i",9),v()()(),ue(13,Mx,4,0,"div",10)(14,kx,10,0,"div",10)(15,Ox,51,3,"div",10),v()),n&2&&(w(5),Wl("title",i.months[i.mv.month].fullName),w(2),he(i.months[i.mv.month].shortName),w(3),he(i.mv.year),w(3),Y(i.yv?13:14),w(2),Y(i.dateOnly?-1:15))},dependencies:[Rt],encapsulation:2});var kc=Nn;var cp=class{getAllStyles(e){return window.getComputedStyle(e)}getStyle(e,n){return this.getAllStyles(e)[n]}isStaticPositioned(e){return(this.getStyle(e,"position")||"static")==="static"}offsetParent(e){let n=e.offsetParent||document.documentElement;for(;n&&n!==document.documentElement&&this.isStaticPositioned(n);)n=n.offsetParent;return n||document.documentElement}position(e,n=!0){let i,r={width:0,height:0,top:0,bottom:0,left:0,right:0,x:0,y:0,toJSON:()=>{}};if(this.getStyle(e,"position")==="fixed")i=e.getBoundingClientRect(),i={top:i.top,bottom:i.bottom,left:i.left,right:i.right,height:i.height,width:i.width,x:i.x,y:i.y,toJSON:i.toJSON};else{let o=this.offsetParent(e);i=this.offset(e,!1),o!==document.documentElement&&(r=this.offset(o,!1)),r.top+=o.clientTop,r.left+=o.clientLeft}return i.top-=r.top,i.bottom-=r.top,i.left-=r.left,i.right-=r.left,n&&(i.top=Math.round(i.top),i.bottom=Math.round(i.bottom),i.left=Math.round(i.left),i.right=Math.round(i.right)),i}offset(e,n=!0){let i=e.getBoundingClientRect(),r={top:window.pageYOffset-document.documentElement.clientTop,left:window.pageXOffset-document.documentElement.clientLeft},o={height:i.height||e.offsetHeight,width:i.width||e.offsetWidth,top:i.top+r.top,bottom:i.bottom+r.top,left:i.left+r.left,right:i.right+r.left,x:i.x,y:i.y,toJSON:i.toJSON};return n&&(o.height=Math.round(o.height),o.width=Math.round(o.width),o.top=Math.round(o.top),o.bottom=Math.round(o.bottom),o.left=Math.round(o.left),o.right=Math.round(o.right)),o}positionElements(e,n,i,r){let[o="top",s="center"]=i.split("-"),a=r?this.offset(e,!1):this.position(e,!1),l=this.getAllStyles(n),c=parseFloat(l.marginTop),u=parseFloat(l.marginBottom),d=parseFloat(l.marginLeft),f=parseFloat(l.marginRight),p=0,h=0;switch(o){case"top":p=a.top-(n.offsetHeight+c+u);break;case"bottom":p=a.top+a.height;break;case"left":h=a.left-(n.offsetWidth+d+f);break;case"right":h=a.left+a.width;break}switch(s){case"top":p=a.top;break;case"bottom":p=a.top+a.height-n.offsetHeight;break;case"left":h=a.left;break;case"right":h=a.left+a.width-n.offsetWidth;break;case"center":o==="top"||o==="bottom"?h=a.left+a.width/2-n.offsetWidth/2:p=a.top+a.height/2-n.offsetHeight/2;break}n.style.transform=`translate(${h}px, ${p}px)`;let g=n.getBoundingClientRect(),_=document.documentElement,y=window.innerHeight||_.clientHeight,M=window.innerWidth||_.clientWidth;return g.left>=0&&g.top>=0&&g.right<=M&&g.bottom<=y}},Px=new cp;function ow(t,e,n,i,r){let o=Array.isArray(n)?n:[n],s=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],a=e.classList;r&&s.forEach(p=>{a.remove(`${r}-${p}`)});let l=o.findIndex(p=>p==="auto");l>=0&&s.forEach(function(p){o.find(h=>h.search("^"+p)!==-1)==null&&o.splice(l++,1,p)});let c=e.style;c.position="absolute",c.top="0",c.left="0",c.visibility="visible";let u=o[o.length-1],d=[],f;for(f of o){d=[];let[p,h]=f.split("-");if(r&&(d.push(`${r}-${p}`),h&&d.push(`${r}-${p}-${h}`),d.forEach(g=>{a.add(g)})),Px.positionElements(t,e,f,i))break;r&&f!==u&&d.forEach(g=>{a.remove(g)})}return f}var Oc=(()=>{let e=class e{constructor(i,r){this._environmentInjector=i,this._appRef=r,this._withTransitions=!1}set transitions(i){this._withTransitions=i}pick(i,r,o=!1,s,a){return this.close(),new z(c=>{if(this._observer){console.error("Orchestration error: another instance subscribed already"),c.complete();return}return this._observer=c,this._popupSubscription=this.open(i,r,o,s,a).subscribe({next:u=>{this._observer?.next(u)},error:()=>{this._popupSubscription=void 0},complete:()=>this.close()}),()=>{this._observer===c&&this.close()}})}open(i,r,o=!1,s,a){if(this._closeTimeout?.unsubscribe(),this._closeTimeout=void 0,!e._popup){e._popup=my(kc,{environmentInjector:this._environmentInjector}),this._appRef.attachView(e._popup.hostView);let c=e._popup.location.nativeElement,u=a?document.querySelector(a):null;u?u.appendChild(c):document.body.appendChild(c)}e._popup.instance.date=i,e._popup.instance.dateOnly=o;let l=e._popup.location.nativeElement;return l.style.visibility="hidden",l.style.position="absolute",this._withTransitions&&(l.classList.add("transition"),l.classList.add("fade")),requestAnimationFrame(()=>{ow(r,l,s||"bottom-left",!0),this._withTransitions&&l.classList.add("is-active")}),e._popup.instance.dateChange}close(){e._popup&&(this._withTransitions?this._closeTimeout||(e._popup.location.nativeElement.classList.remove("is-active"),this._closeTimeout=Gt(200).subscribe(()=>{this._closeTimeout=void 0,this._appRef.detachView(e._popup.hostView),e._popup.destroy(),e._popup=void 0})):(this._appRef.detachView(e._popup.hostView),e._popup.destroy(),e._popup=void 0)),this._popupSubscription&&(this._popupSubscription.unsubscribe(),this._popupSubscription=void 0),this._observer&&(this._observer.complete(),this._observer=void 0)}containsElement(i){return e._popup?e._popup.location.nativeElement.contains(i):!1}update(i){e._popup&&(e._popup.instance.date=i)}ngOnDestroy(){this._closeTimeout?.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(O(nt),O(Yt))},e.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var sw=(()=>{let e=class e{set dateOnly(i){this._cfgDateOnly=i}set localTime(i){this._cfgLocalTime=i,this.updateInnerDate(!0)}set dateFormat(i){this._cfgFormat=i}set dateTimePickerOnClick(i){i!==!0&&i!==!1?this._cfgActivateOnClick=!0:this._cfgActivateOnClick=i}set dateParentSelector(i){this._cfgSelector=i}get date(){return this._innerDate}constructor(i,r,o,s){this._elm=i,this._ngRenderer=r,this._dtp=o,this._datePipe=s,this._innerDate=new Date,this.onChange=a=>{},this.onTouched=()=>{},this._disabled=!1,this._cfgDateOnly=!1,this._cfgLocalTime=!0,this._cfgFormat="short",this._cfgActivateOnClick=!1,this.dateChange=new ie,this.datePicked=new ie}onValueChange(){let i=new Date(this._elm.nativeElement.value);this._cfgLocalTime||(i=new Date(i.getTime()-i.getTimezoneOffset()*6e4)),this.setInnerDate(i)}onValueChanged(){let i=new Date(this._elm.nativeElement.value);this._cfgLocalTime||(i=new Date(i.getTime()-i.getTimezoneOffset()*6e4)),this.setInnerDate(i)}onKeyDown(i){if(i.ctrlKey)i.key!==void 0&&i.key==="Space"?this.openPopup():i.keyIdentifier!==void 0&&i.keyIdentifier==="Space"?this.openPopup():i.keyCode!==void 0&&i.keyCode===32&&this.openPopup();else if(this._changeSubscription){let r=!1;(i.key!=null&&i.key==="Escape"||i.keyIdentifier!=null&&(i.keyIdentifier==="Escape"||i.keyIdentifier==="Esc")||i.keyCode!==void 0&&i.keyCode===27)&&(r=!0),r&&(i.stopPropagation(),this.closePopup())}}onClick(i){this._cfgActivateOnClick&&this.openPopup()}onFocus(i){this._cfgActivateOnClick||this.openPopup()}onFocusOut(i){this.closePopup()}setInnerDate(i,r=!1){return this._innerDate!==i?(this._innerDate=i,this.updateInnerDate(r),!0):!1}updateInnerDate(i=!1){let r=this._innerDate;!this._cfgLocalTime&&r&&(r=new Date(r.getTime()+r.getTimezoneOffset()*6e4)),this._changeSubscription&&this._dtp.update(r),i&&this._ngRenderer.setProperty(this._elm.nativeElement,"value",this.formattedValue()),this.onChange(this._innerDate),this.dateChange.emit(this._innerDate)}formattedValue(){return this._innerDate&&!isNaN(this._innerDate.getTime())?this._datePipe.transform(this._innerDate,this._cfgFormat,this._cfgLocalTime?void 0:"UTC"):""}openPopup(){if(this._changeSubscription)return;let i=this._innerDate;!this._cfgLocalTime&&i&&(i=new Date(i.getTime()+i.getTimezoneOffset()*6e4)),this._changeSubscription=this._dtp.pick(i,this._elm.nativeElement,this._cfgDateOnly,this.position,this._cfgSelector).subscribe({next:r=>{!this._cfgLocalTime&&r&&(r=new Date(r.getTime()-r.getTimezoneOffset()*6e4)),this.setInnerDate(r,!0),this.datePicked.next(r),this.closePopup()},error:()=>{this._changeSubscription=void 0},complete:()=>{this._changeSubscription=void 0}})}closePopup(){this._changeSubscription?.unsubscribe(),this._changeSubscription=void 0}ngOnInit(){}ngOnDestroy(){this.closePopup()}writeValue(i){this.setInnerDate(i,!0)}registerOnChange(i){this.onChange=i}registerOnTouched(i){this.onTouched=i}setDisabledState(i){this._disabled=i}validate(i){return!i.value||!isNaN(this._innerDate.getTime())?null:{datetime:"Please enter a correctly formatted date (and time)"}}};e.\u0275fac=function(r){return new(r||e)(D(ae),D(lt),D(Oc),D(ds))},e.\u0275dir=ye({type:e,selectors:[["","gDatetimePicker",""]],hostBindings:function(r,o){r&1&&k("input",function(){return o.onValueChange()})("change",function(){return o.onValueChanged()})("keydown",function(a){return o.onKeyDown(a)})("click",function(a){return o.onClick(a)})("focus",function(a){return o.onFocus(a)})("focusout",function(a){return o.onFocusOut(a)})},inputs:{dateOnly:"dateOnly",localTime:"localTime",dateFormat:"dateFormat",dateTimePickerOnClick:"dateTimePickerOnClick",dateParentSelector:"dateParentSelector",position:"position"},outputs:{dateChange:"dateChange",datePicked:"datePicked"},standalone:!1,features:[Yn([{provide:no,useExisting:Zt(()=>e),multi:!0},{provide:bs,useExisting:Zt(()=>e),multi:!0}])]});let t=e;return t})();var kn=(()=>{let e=class e{constructor(){this._localTime$=new ve(!1),this.localTime$=this._localTime$.asObservable()}toLocalString(i,r){return i.strftime(r)}toUTCString(i,r){return i.strftime(r,!0)}toString(i,r,o){return o==null?this.toDefaultString(i,r):i.strftime(r,o)}toDefaultString(i,r){return i.strftime(r,!this.localTime)}tsToLocalString(i,r){return new Date(i).strftime(r)}tsToUTCString(i,r){return new Date(i).strftime(r,!0)}tsToString(i,r,o){return o==null?this.tsToDefaultString(i,r):new Date(i).strftime(r,o)}tsToDefaultString(i,r){return new Date(i).strftime(r,!this.localTime)}get localTime(){return this._localTime$.value}get utc(){return!this._localTime$.value}set localTime(i){this._localTime$.next(i)}set utc(i){this._localTime$.next(!i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var ee="primary",Hs=Symbol("RouteTitle"),pp=class{params;constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let n=this.params[e];return Array.isArray(n)?n[0]:n}return null}getAll(e){if(this.has(e)){let n=this.params[e];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}};function mo(t){return new pp(t)}function Vx(t,e,n){let i=n.path.split("/");if(i.length>t.length||n.pathMatch==="full"&&(e.hasChildren()||i.length<t.length))return null;let r={};for(let o=0;o<i.length;o++){let s=i[o],a=t[o];if(s[0]===":")r[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,i.length),posParams:r}}function jx(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!On(t[n],e[n]))return!1;return!0}function On(t,e){let n=t?gp(t):void 0,i=e?gp(e):void 0;if(!n||!i||n.length!=i.length)return!1;let r;for(let o=0;o<n.length;o++)if(r=n[o],!mw(t[r],e[r]))return!1;return!0}function gp(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function mw(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;let n=[...t].sort(),i=[...e].sort();return n.every((r,o)=>i[o]===r)}else return t===e}function vw(t){return t.length>0?t[t.length-1]:null}function xi(t){return Yu(t)?t:yi(t)?be(Promise.resolve(t)):B(t)}var Ux={exact:_w,subset:ww},yw={exact:Bx,subset:$x,ignored:()=>!0};function aw(t,e,n){return Ux[n.paths](t.root,e.root,n.matrixParams)&&yw[n.queryParams](t.queryParams,e.queryParams)&&!(n.fragment==="exact"&&t.fragment!==e.fragment)}function Bx(t,e){return On(t,e)}function _w(t,e,n){if(!ur(t.segments,e.segments)||!Vc(t.segments,e.segments,n)||t.numberOfChildren!==e.numberOfChildren)return!1;for(let i in e.children)if(!t.children[i]||!_w(t.children[i],e.children[i],n))return!1;return!0}function $x(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>mw(t[n],e[n]))}function ww(t,e,n){return Cw(t,e,e.segments,n)}function Cw(t,e,n,i){if(t.segments.length>n.length){let r=t.segments.slice(0,n.length);return!(!ur(r,n)||e.hasChildren()||!Vc(r,n,i))}else if(t.segments.length===n.length){if(!ur(t.segments,n)||!Vc(t.segments,n,i))return!1;for(let r in e.children)if(!t.children[r]||!ww(t.children[r],e.children[r],i))return!1;return!0}else{let r=n.slice(0,t.segments.length),o=n.slice(t.segments.length);return!ur(t.segments,r)||!Vc(t.segments,r,i)||!t.children[ee]?!1:Cw(t.children[ee],e,o,i)}}function Vc(t,e,n){return e.every((i,r)=>yw[n](t[r].parameters,i.parameters))}var ii=class{root;queryParams;fragment;_queryParamMap;constructor(e=new ge([],{}),n={},i=null){this.root=e,this.queryParams=n,this.fragment=i}get queryParamMap(){return this._queryParamMap??=mo(this.queryParams),this._queryParamMap}toString(){return Wx.serialize(this)}},ge=class{segments;children;parent=null;constructor(e,n){this.segments=e,this.children=n,Object.values(n).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return jc(this)}},cr=class{path;parameters;_parameterMap;constructor(e,n){this.path=e,this.parameters=n}get parameterMap(){return this._parameterMap??=mo(this.parameters),this._parameterMap}toString(){return bw(this)}};function Hx(t,e){return ur(t,e)&&t.every((n,i)=>On(n.parameters,e[i].parameters))}function ur(t,e){return t.length!==e.length?!1:t.every((n,i)=>n.path===e[i].path)}function zx(t,e){let n=[];return Object.entries(t.children).forEach(([i,r])=>{i===ee&&(n=n.concat(e(r,i)))}),Object.entries(t.children).forEach(([i,r])=>{i!==ee&&(n=n.concat(e(r,i)))}),n}var zs=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:()=>new vo,providedIn:"root"})}return t})(),vo=class{parse(e){let n=new vp(e);return new ii(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(e){let n=`/${As(e.root,!0)}`,i=Qx(e.queryParams),r=typeof e.fragment=="string"?`#${Gx(e.fragment)}`:"";return`${n}${i}${r}`}},Wx=new vo;function jc(t){return t.segments.map(e=>bw(e)).join("/")}function As(t,e){if(!t.hasChildren())return jc(t);if(e){let n=t.children[ee]?As(t.children[ee],!1):"",i=[];return Object.entries(t.children).forEach(([r,o])=>{r!==ee&&i.push(`${r}:${As(o,!1)}`)}),i.length>0?`${n}(${i.join("//")})`:n}else{let n=zx(t,(i,r)=>r===ee?[As(t.children[ee],!1)]:[`${r}:${As(i,!1)}`]);return Object.keys(t.children).length===1&&t.children[ee]!=null?`${jc(t)}/${n[0]}`:`${jc(t)}/(${n.join("//")})`}}function Dw(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Fc(t){return Dw(t).replace(/%3B/gi,";")}function Gx(t){return encodeURI(t)}function mp(t){return Dw(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Uc(t){return decodeURIComponent(t)}function lw(t){return Uc(t.replace(/\+/g,"%20"))}function bw(t){return`${mp(t.path)}${qx(t.parameters)}`}function qx(t){return Object.entries(t).map(([e,n])=>`;${mp(e)}=${mp(n)}`).join("")}function Qx(t){let e=Object.entries(t).map(([n,i])=>Array.isArray(i)?i.map(r=>`${Fc(n)}=${Fc(r)}`).join("&"):`${Fc(n)}=${Fc(i)}`).filter(n=>n);return e.length?`?${e.join("&")}`:""}var Yx=/^[^\/()?;#]+/;function up(t){let e=t.match(Yx);return e?e[0]:""}var Zx=/^[^\/()?;=#]+/;function Xx(t){let e=t.match(Zx);return e?e[0]:""}var Kx=/^[^=?&#]+/;function Jx(t){let e=t.match(Kx);return e?e[0]:""}var eR=/^[^&#]+/;function tR(t){let e=t.match(eR);return e?e[0]:""}var vp=class{url;remaining;constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new ge([],{}):new ge([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(e.length>0||Object.keys(n).length>0)&&(i[ee]=new ge(e,n)),i}parseSegment(){let e=up(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new F(4009,!1);return this.capture(e),new cr(Uc(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let n=Xx(this.remaining);if(!n)return;this.capture(n);let i="";if(this.consumeOptional("=")){let r=up(this.remaining);r&&(i=r,this.capture(i))}e[Uc(n)]=Uc(i)}parseQueryParam(e){let n=Jx(this.remaining);if(!n)return;this.capture(n);let i="";if(this.consumeOptional("=")){let s=tR(this.remaining);s&&(i=s,this.capture(i))}let r=lw(n),o=lw(i);if(e.hasOwnProperty(r)){let s=e[r];Array.isArray(s)||(s=[s],e[r]=s),s.push(o)}else e[r]=o}parseParens(e){let n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=up(this.remaining),r=this.remaining[i.length];if(r!=="/"&&r!==")"&&r!==";")throw new F(4010,!1);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=ee);let s=this.parseChildren();n[o]=Object.keys(s).length===1?s[ee]:new ge([],s),this.consumeOptional("//")}return n}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new F(4011,!1)}};function Ew(t){return t.segments.length>0?new ge([],{[ee]:t}):t}function Sw(t){let e={};for(let[i,r]of Object.entries(t.children)){let o=Sw(r);if(i===ee&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))e[s]=a;else(o.segments.length>0||o.hasChildren())&&(e[i]=o)}let n=new ge(t.segments,e);return nR(n)}function nR(t){if(t.numberOfChildren===1&&t.children[ee]){let e=t.children[ee];return new ge(t.segments.concat(e.segments),e.children)}return t}function dr(t){return t instanceof ii}function iR(t,e,n=null,i=null){let r=Iw(t);return Tw(r,e,n,i)}function Iw(t){let e;function n(o){let s={};for(let l of o.children){let c=n(l);s[l.outlet]=c}let a=new ge(o.url,s);return o===t&&(e=a),a}let i=n(t.root),r=Ew(i);return e??r}function Tw(t,e,n,i){let r=t;for(;r.parent;)r=r.parent;if(e.length===0)return dp(r,r,r,n,i);let o=rR(e);if(o.toRoot())return dp(r,r,new ge([],{}),n,i);let s=oR(o,r,t),a=s.processChildren?ks(s.segmentGroup,s.index,o.commands):xw(s.segmentGroup,s.index,o.commands);return dp(r,s.segmentGroup,a,n,i)}function Bc(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Fs(t){return typeof t=="object"&&t!=null&&t.outlets}function dp(t,e,n,i,r){let o={};i&&Object.entries(i).forEach(([l,c])=>{o[l]=Array.isArray(c)?c.map(u=>`${u}`):`${c}`});let s;t===e?s=n:s=Mw(t,e,n);let a=Ew(Sw(s));return new ii(a,o,r)}function Mw(t,e,n){let i={};return Object.entries(t.children).forEach(([r,o])=>{o===e?i[r]=n:i[r]=Mw(o,e,n)}),new ge(t.segments,i)}var $c=class{isAbsolute;numberOfDoubleDots;commands;constructor(e,n,i){if(this.isAbsolute=e,this.numberOfDoubleDots=n,this.commands=i,e&&i.length>0&&Bc(i[0]))throw new F(4003,!1);let r=i.find(Fs);if(r&&r!==vw(i))throw new F(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function rR(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new $c(!0,0,t);let e=0,n=!1,i=t.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?n=!0:a===".."?e++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new $c(n,e,i)}var ho=class{segmentGroup;processChildren;index;constructor(e,n,i){this.segmentGroup=e,this.processChildren=n,this.index=i}};function oR(t,e,n){if(t.isAbsolute)return new ho(e,!0,0);if(!n)return new ho(e,!1,NaN);if(n.parent===null)return new ho(n,!0,0);let i=Bc(t.commands[0])?0:1,r=n.segments.length-1+i;return sR(n,r,t.numberOfDoubleDots)}function sR(t,e,n){let i=t,r=e,o=n;for(;o>r;){if(o-=r,i=i.parent,!i)throw new F(4005,!1);r=i.segments.length}return new ho(i,!1,r-o)}function aR(t){return Fs(t[0])?t[0].outlets:{[ee]:t}}function xw(t,e,n){if(t??=new ge([],{}),t.segments.length===0&&t.hasChildren())return ks(t,e,n);let i=lR(t,e,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex<t.segments.length){let o=new ge(t.segments.slice(0,i.pathIndex),{});return o.children[ee]=new ge(t.segments.slice(i.pathIndex),t.children),ks(o,0,r)}else return i.match&&r.length===0?new ge(t.segments,{}):i.match&&!t.hasChildren()?yp(t,e,n):i.match?ks(t,0,r):yp(t,e,n)}function ks(t,e,n){if(n.length===0)return new ge(t.segments,{});{let i=aR(n),r={};if(Object.keys(i).some(o=>o!==ee)&&t.children[ee]&&t.numberOfChildren===1&&t.children[ee].segments.length===0){let o=ks(t.children[ee],e,n);return new ge(t.segments,o.children)}return Object.entries(i).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=xw(t.children[o],e,s))}),Object.entries(t.children).forEach(([o,s])=>{i[o]===void 0&&(r[o]=s)}),new ge(t.segments,r)}}function lR(t,e,n){let i=0,r=e,o={match:!1,pathIndex:0,commandIndex:0};for(;r<t.segments.length;){if(i>=n.length)return o;let s=t.segments[r],a=n[i];if(Fs(a))break;let l=`${a}`,c=i<n.length-1?n[i+1]:null;if(r>0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!uw(l,c,s))return o;i+=2}else{if(!uw(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}function yp(t,e,n){let i=t.segments.slice(0,e),r=0;for(;r<n.length;){let o=n[r];if(Fs(o)){let l=cR(o.outlets);return new ge(i,l)}if(r===0&&Bc(n[0])){let l=t.segments[e];i.push(new cr(l.path,cw(n[0]))),r++;continue}let s=Fs(o)?o.outlets[ee]:`${o}`,a=r<n.length-1?n[r+1]:null;s&&a&&Bc(a)?(i.push(new cr(s,cw(a))),r+=2):(i.push(new cr(s,{})),r++)}return new ge(i,{})}function cR(t){let e={};return Object.entries(t).forEach(([n,i])=>{typeof i=="string"&&(i=[i]),i!==null&&(e[n]=yp(new ge([],{}),0,i))}),e}function cw(t){let e={};return Object.entries(t).forEach(([n,i])=>e[n]=`${i}`),e}function uw(t,e,n){return t==n.path&&On(e,n.parameters)}var Os="imperative",Ke=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(Ke||{}),nn=class{id;url;constructor(e,n){this.id=e,this.url=n}},yo=class extends nn{type=Ke.NavigationStart;navigationTrigger;restoredState;constructor(e,n,i="imperative",r=null){super(e,n),this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},_n=class extends nn{urlAfterRedirects;type=Ke.NavigationEnd;constructor(e,n,i){super(e,n),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Wt=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(Wt||{}),Hc=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(Hc||{}),ni=class extends nn{reason;code;type=Ke.NavigationCancel;constructor(e,n,i,r){super(e,n),this.reason=i,this.code=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Ti=class extends nn{reason;code;type=Ke.NavigationSkipped;constructor(e,n,i,r){super(e,n),this.reason=i,this.code=r}},Ls=class extends nn{error;target;type=Ke.NavigationError;constructor(e,n,i,r){super(e,n),this.error=i,this.target=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},zc=class extends nn{urlAfterRedirects;state;type=Ke.RoutesRecognized;constructor(e,n,i,r){super(e,n),this.urlAfterRedirects=i,this.state=r}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},_p=class extends nn{urlAfterRedirects;state;type=Ke.GuardsCheckStart;constructor(e,n,i,r){super(e,n),this.urlAfterRedirects=i,this.state=r}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},wp=class extends nn{urlAfterRedirects;state;shouldActivate;type=Ke.GuardsCheckEnd;constructor(e,n,i,r,o){super(e,n),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Cp=class extends nn{urlAfterRedirects;state;type=Ke.ResolveStart;constructor(e,n,i,r){super(e,n),this.urlAfterRedirects=i,this.state=r}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Dp=class extends nn{urlAfterRedirects;state;type=Ke.ResolveEnd;constructor(e,n,i,r){super(e,n),this.urlAfterRedirects=i,this.state=r}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},bp=class{route;type=Ke.RouteConfigLoadStart;constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Ep=class{route;type=Ke.RouteConfigLoadEnd;constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Sp=class{snapshot;type=Ke.ChildActivationStart;constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ip=class{snapshot;type=Ke.ChildActivationEnd;constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Tp=class{snapshot;type=Ke.ActivationStart;constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Mp=class{snapshot;type=Ke.ActivationEnd;constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Wc=class{routerEvent;position;anchor;type=Ke.Scroll;constructor(e,n,i){this.routerEvent=e,this.position=n,this.anchor=i}toString(){let e=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${e}')`}},Vs=class{},_o=class{url;navigationBehaviorOptions;constructor(e,n){this.url=e,this.navigationBehaviorOptions=n}};function uR(t,e){return t.providers&&!t._injector&&(t._injector=Bl(t.providers,e,`Route: ${t.path}`)),t._injector??e}function yn(t){return t.outlet||ee}function dR(t,e){let n=t.filter(i=>yn(i)===e);return n.push(...t.filter(i=>yn(i)!==e)),n}function Ws(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let e=t.parent;e;e=e.parent){let n=e.routeConfig;if(n?._loadedInjector)return n._loadedInjector;if(n?._injector)return n._injector}return null}var xp=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return Ws(this.route?.snapshot)??this.rootInjector}constructor(e){this.rootInjector=e,this.children=new Gs(this.rootInjector)}},Gs=(()=>{class t{rootInjector;contexts=new Map;constructor(n){this.rootInjector=n}onChildOutletCreated(n,i){let r=this.getOrCreateContext(n);r.outlet=i,this.contexts.set(n,r)}onChildOutletDestroyed(n){let i=this.getContext(n);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let i=this.getContext(n);return i||(i=new xp(this.rootInjector),this.contexts.set(n,i)),i}getContext(n){return this.contexts.get(n)||null}static \u0275fac=function(i){return new(i||t)(O(nt))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Gc=class{_root;constructor(e){this._root=e}get root(){return this._root.value}parent(e){let n=this.pathFromRoot(e);return n.length>1?n[n.length-2]:null}children(e){let n=Rp(e,this._root);return n?n.children.map(i=>i.value):[]}firstChild(e){let n=Rp(e,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(e){let n=Ap(e,this._root);return n.length<2?[]:n[n.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return Ap(e,this._root).map(n=>n.value)}};function Rp(t,e){if(t===e.value)return e;for(let n of e.children){let i=Rp(t,n);if(i)return i}return null}function Ap(t,e){if(t===e.value)return[e];for(let n of e.children){let i=Ap(t,n);if(i.length)return i.unshift(e),i}return[]}var zt=class{value;children;constructor(e,n){this.value=e,this.children=n}toString(){return`TreeNode(${this.value})`}};function fo(t){let e={};return t&&t.children.forEach(n=>e[n.value.outlet]=n),e}var qc=class extends Gc{snapshot;constructor(e,n){super(e),this.snapshot=n,Up(this,e)}toString(){return this.snapshot.toString()}};function Rw(t){let e=fR(t),n=new ve([new cr("",{})]),i=new ve({}),r=new ve({}),o=new ve({}),s=new ve(""),a=new fr(n,i,o,s,r,ee,t,e.root);return a.snapshot=e.root,new qc(new zt(a,[]),e)}function fR(t){let e={},n={},i={},r="",o=new po([],e,i,r,n,ee,t,null,{});return new Yc("",new zt(o,[]))}var fr=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(e,n,i,r,o,s,a,l){this.urlSubject=e,this.paramsSubject=n,this.queryParamsSubject=i,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(W(c=>c[Hs]))??B(void 0),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(W(e=>mo(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(W(e=>mo(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Qc(t,e,n="emptyOnly"){let i,{routeConfig:r}=t;return e!==null&&(n==="always"||r?.path===""||!e.component&&!e.routeConfig?.loadComponent)?i={params:x(x({},e.params),t.params),data:x(x({},e.data),t.data),resolve:x(x(x(x({},t.data),e.data),r?.data),t._resolvedData)}:i={params:x({},t.params),data:x({},t.data),resolve:x(x({},t.data),t._resolvedData??{})},r&&Nw(r)&&(i.resolve[Hs]=r.title),i}var po=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Hs]}constructor(e,n,i,r,o,s,a,l,c){this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c}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??=mo(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=mo(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(i=>i.toString()).join("/"),n=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${n}')`}},Yc=class extends Gc{url;constructor(e,n){super(n),this.url=e,Up(this,n)}toString(){return Aw(this._root)}};function Up(t,e){e.value._routerState=t,e.children.forEach(n=>Up(t,n))}function Aw(t){let e=t.children.length>0?` { ${t.children.map(Aw).join(", ")} } `:"";return`${t.value}${e}`}function fp(t){if(t.snapshot){let e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,On(e.queryParams,n.queryParams)||t.queryParamsSubject.next(n.queryParams),e.fragment!==n.fragment&&t.fragmentSubject.next(n.fragment),On(e.params,n.params)||t.paramsSubject.next(n.params),jx(e.url,n.url)||t.urlSubject.next(n.url),On(e.data,n.data)||t.dataSubject.next(n.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Np(t,e){let n=On(t.params,e.params)&&Hx(t.url,e.url),i=!t.parent!=!e.parent;return n&&!i&&(!t.parent||Np(t.parent,e.parent))}function Nw(t){return typeof t.title=="string"||t.title===null}var hR=new P(""),Bp=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=ee;activateEvents=new ie;deactivateEvents=new ie;attachEvents=new ie;detachEvents=new ie;routerOutletData=Hv(void 0);parentContexts=b(Gs);location=b(tr);changeDetector=b($t);inputBinder=b(tu,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(n){if(n.name){let{firstChange:i,previousValue:r}=n.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new F(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new F(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new F(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,i){this.activated=n,this._activatedRoute=i,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,i){if(this.isActivated)throw new F(4013,!1);this._activatedRoute=n;let r=this.location,s=n.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new kp(n,a,r.injector,this.routerOutletData);this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(i){return new(i||t)};static \u0275dir=ye({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[un]})}return t})(),kp=class t{route;childContexts;parent;outletData;__ngOutletInjector(e){return new t(this.route,this.childContexts,e,this.outletData)}constructor(e,n,i,r){this.route=e,this.childContexts=n,this.parent=i,this.outletData=r}get(e,n){return e===fr?this.route:e===Gs?this.childContexts:e===hR?this.outletData:this.parent.get(e,n)}},tu=new P(""),dw=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(n){this.unsubscribeFromRouteData(n),this.subscribeToRouteData(n)}unsubscribeFromRouteData(n){this.outletDataSubscriptions.get(n)?.unsubscribe(),this.outletDataSubscriptions.delete(n)}subscribeToRouteData(n){let{activatedRoute:i}=n,r=Oo([i.queryParams,i.params,i.data]).pipe(bt(([o,s,a],l)=>(a=x(x(x({},o),s),a),l===0?B(a):Promise.resolve(a)))).subscribe(o=>{if(!n.isActivated||!n.activatedComponentRef||n.activatedRoute!==i||i.component===null){this.unsubscribeFromRouteData(n);return}let s=vy(i.component);if(!s){this.unsubscribeFromRouteData(n);return}for(let{templateName:a}of s.inputs)n.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(n,r)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();function pR(t,e,n){let i=js(t,e._root,n?n._root:void 0);return new qc(i,e)}function js(t,e,n){if(n&&t.shouldReuseRoute(e.value,n.value.snapshot)){let i=n.value;i._futureSnapshot=e.value;let r=gR(t,e,n);return new zt(i,r)}else{if(t.shouldAttach(e.value)){let o=t.retrieve(e.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>js(t,a)),s}}let i=mR(e.value),r=e.children.map(o=>js(t,o));return new zt(i,r)}}function gR(t,e,n){return e.children.map(i=>{for(let r of n.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return js(t,i,r);return js(t,i)})}function mR(t){return new fr(new ve(t.url),new ve(t.params),new ve(t.queryParams),new ve(t.fragment),new ve(t.data),t.outlet,t.component,t)}var Us=class{redirectTo;navigationBehaviorOptions;constructor(e,n){this.redirectTo=e,this.navigationBehaviorOptions=n}},kw="ngNavigationCancelingError";function Zc(t,e){let{redirectTo:n,navigationBehaviorOptions:i}=dr(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=Ow(!1,Wt.Redirect);return r.url=n,r.navigationBehaviorOptions=i,r}function Ow(t,e){let n=new Error(`NavigationCancelingError: ${t||""}`);return n[kw]=!0,n.cancellationCode=e,n}function vR(t){return Pw(t)&&dr(t.url)}function Pw(t){return!!t&&t[kw]}var yR=(t,e,n,i)=>W(r=>(new Op(e,r.targetRouterState,r.currentRouterState,n,i).activate(t),r)),Op=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(e,n,i,r,o){this.routeReuseStrategy=e,this.futureState=n,this.currState=i,this.forwardEvent=r,this.inputBindingEnabled=o}activate(e){let n=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,i,e),fp(this.futureState.root),this.activateChildRoutes(n,i,e)}deactivateChildRoutes(e,n,i){let r=fo(n);e.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(e,n,i){let r=e.value,o=n?n.value:null;if(r===o)if(r.component){let s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(e,n,s.children)}else this.deactivateChildRoutes(e,n,i);else o&&this.deactivateRouteAndItsChildren(n,i)}deactivateRouteAndItsChildren(e,n){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,n):this.deactivateRouteAndOutlet(e,n)}detachAndStoreRouteSubtree(e,n){let i=n.getContext(e.value.outlet),r=i&&e.value.component?i.children:n,o=fo(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(i&&i.outlet){let s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,n){let i=n.getContext(e.value.outlet),r=i&&e.value.component?i.children:n,o=fo(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(e,n,i){let r=fo(n);e.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new Mp(o.value.snapshot))}),e.children.length&&this.forwardEvent(new Ip(e.value.snapshot))}activateRoutes(e,n,i){let r=e.value,o=n?n.value:null;if(fp(r),r===o)if(r.component){let s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(e,n,s.children)}else this.activateChildRoutes(e,n,i);else if(r.component){let s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),fp(a.route.value),this.activateChildRoutes(e,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(e,null,s.children)}else this.activateChildRoutes(e,null,i)}},Xc=class{path;route;constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},go=class{component;route;constructor(e,n){this.component=e,this.route=n}};function _R(t,e,n){let i=t._root,r=e?e._root:null;return Ns(i,r,n,[i.value])}function wR(t){let e=t.routeConfig?t.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:t,guards:e}}function Co(t,e){let n=Symbol(),i=e.get(t,n);return i===n?typeof t=="function"&&!Vm(t)?t:e.get(t):i}function Ns(t,e,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=fo(e);return t.children.forEach(s=>{CR(s,o[s.value.outlet],n,i.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Ps(a,n.getContext(s),r)),r}function CR(t,e,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=e?e.value:null,a=n?n.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let l=DR(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new Xc(i)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Ns(t,e,a?a.children:null,i,r):Ns(t,e,n,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new go(a.outlet.component,s))}else s&&Ps(e,a,r),r.canActivateChecks.push(new Xc(i)),o.component?Ns(t,null,a?a.children:null,i,r):Ns(t,null,n,i,r);return r}function DR(t,e,n){if(typeof n=="function")return n(t,e);switch(n){case"pathParamsChange":return!ur(t.url,e.url);case"pathParamsOrQueryParamsChange":return!ur(t.url,e.url)||!On(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Np(t,e)||!On(t.queryParams,e.queryParams);case"paramsChange":default:return!Np(t,e)}}function Ps(t,e,n){let i=fo(t),r=t.value;Object.entries(i).forEach(([o,s])=>{r.component?e?Ps(s,e.children.getContext(o),n):Ps(s,null,n):Ps(s,e,n)}),r.component?e&&e.outlet&&e.outlet.isActivated?n.canDeactivateChecks.push(new go(e.outlet.component,r)):n.canDeactivateChecks.push(new go(null,r)):n.canDeactivateChecks.push(new go(null,r))}function qs(t){return typeof t=="function"}function bR(t){return typeof t=="boolean"}function ER(t){return t&&qs(t.canLoad)}function SR(t){return t&&qs(t.canActivate)}function IR(t){return t&&qs(t.canActivateChild)}function TR(t){return t&&qs(t.canDeactivate)}function MR(t){return t&&qs(t.canMatch)}function Fw(t){return t instanceof Ln||t?.name==="EmptyError"}var Lc=Symbol("INITIAL_VALUE");function wo(){return bt(t=>Oo(t.map(e=>e.pipe(jn(1),Ju(Lc)))).pipe(W(e=>{for(let n of e)if(n!==!0){if(n===Lc)return Lc;if(n===!1||xR(n))return n}return!0}),Dt(e=>e!==Lc),jn(1)))}function xR(t){return dr(t)||t instanceof Us}function RR(t,e){return Ve(n=>{let{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=n;return s.length===0&&o.length===0?B(le(x({},n),{guardsResult:!0})):AR(s,i,r,t).pipe(Ve(a=>a&&bR(a)?NR(i,o,t,e):B(a)),W(a=>le(x({},n),{guardsResult:a})))})}function AR(t,e,n,i){return be(t).pipe(Ve(r=>LR(r.component,r.route,n,e,i)),Un(r=>r!==!0,!0))}function NR(t,e,n,i){return be(e).pipe(Vn(r=>br(OR(r.route.parent,i),kR(r.route,i),FR(t,r.path,n),PR(t,r.route,n))),Un(r=>r!==!0,!0))}function kR(t,e){return t!==null&&e&&e(new Tp(t)),B(!0)}function OR(t,e){return t!==null&&e&&e(new Sp(t)),B(!0)}function PR(t,e,n){let i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||i.length===0)return B(!0);let r=i.map(o=>ka(()=>{let s=Ws(e)??n,a=Co(o,s),l=SR(a)?a.canActivate(e,t):It(s,()=>a(e,t));return xi(l).pipe(Un())}));return B(r).pipe(wo())}function FR(t,e,n){let i=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>wR(s)).filter(s=>s!==null).map(s=>ka(()=>{let a=s.guards.map(l=>{let c=Ws(s.node)??n,u=Co(l,c),d=IR(u)?u.canActivateChild(i,t):It(c,()=>u(i,t));return xi(d).pipe(Un())});return B(a).pipe(wo())}));return B(o).pipe(wo())}function LR(t,e,n,i,r){let o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||o.length===0)return B(!0);let s=o.map(a=>{let l=Ws(e)??r,c=Co(a,l),u=TR(c)?c.canDeactivate(t,e,n,i):It(l,()=>c(t,e,n,i));return xi(u).pipe(Un())});return B(s).pipe(wo())}function VR(t,e,n,i){let r=e.canLoad;if(r===void 0||r.length===0)return B(!0);let o=r.map(s=>{let a=Co(s,t),l=ER(a)?a.canLoad(e,n):It(t,()=>a(e,n));return xi(l)});return B(o).pipe(wo(),Lw(i))}function Lw(t){return Hu(ke(e=>{if(typeof e!="boolean")throw Zc(t,e)}),W(e=>e===!0))}function jR(t,e,n,i){let r=e.canMatch;if(!r||r.length===0)return B(!0);let o=r.map(s=>{let a=Co(s,t),l=MR(a)?a.canMatch(e,n):It(t,()=>a(e,n));return xi(l)});return B(o).pipe(wo(),Lw(i))}var Bs=class{segmentGroup;constructor(e){this.segmentGroup=e||null}},$s=class extends Error{urlTree;constructor(e){super(),this.urlTree=e}};function uo(t){return Dr(new Bs(t))}function UR(t){return Dr(new F(4e3,!1))}function BR(t){return Dr(Ow(!1,Wt.GuardRejected))}var Pp=class{urlSerializer;urlTree;constructor(e,n){this.urlSerializer=e,this.urlTree=n}lineralizeSegments(e,n){let i=[],r=n.root;for(;;){if(i=i.concat(r.segments),r.numberOfChildren===0)return B(i);if(r.numberOfChildren>1||!r.children[ee])return UR(`${e.redirectTo}`);r=r.children[ee]}}applyRedirectCommands(e,n,i,r,o){if(typeof n!="string"){let a=n,{queryParams:l,fragment:c,routeConfig:u,url:d,outlet:f,params:p,data:h,title:g}=r,_=It(o,()=>a({params:p,data:h,queryParams:l,fragment:c,routeConfig:u,url:d,outlet:f,title:g}));if(_ instanceof ii)throw new $s(_);n=_}let s=this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),e,i);if(n[0]==="/")throw new $s(s);return s}applyRedirectCreateUrlTree(e,n,i,r){let o=this.createSegmentGroup(e,n.root,i,r);return new ii(o,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(e,n){let i={};return Object.entries(e).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);i[r]=n[a]}else i[r]=o}),i}createSegmentGroup(e,n,i,r){let o=this.createSegments(e,n.segments,i,r),s={};return Object.entries(n.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(e,l,i,r)}),new ge(o,s)}createSegments(e,n,i,r){return n.map(o=>o.path[0]===":"?this.findPosParam(e,o,r):this.findOrReturn(o,i))}findPosParam(e,n,i){let r=i[n.path.substring(1)];if(!r)throw new F(4001,!1);return r}findOrReturn(e,n){let i=0;for(let r of n){if(r.path===e.path)return n.splice(i),r;i++}return e}},Fp={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function $R(t,e,n,i,r){let o=Vw(t,e,n);return o.matched?(i=uR(e,i),jR(i,e,n,r).pipe(W(s=>s===!0?o:x({},Fp)))):B(o)}function Vw(t,e,n){if(e.path==="**")return HR(n);if(e.path==="")return e.pathMatch==="full"&&(t.hasChildren()||n.length>0)?x({},Fp):{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};let r=(e.matcher||Vx)(n,t,e);if(!r)return x({},Fp);let o={};Object.entries(r.posParams??{}).forEach(([a,l])=>{o[a]=l.path});let s=r.consumed.length>0?x(x({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:n.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function HR(t){return{matched:!0,parameters:t.length>0?vw(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function fw(t,e,n,i){return n.length>0&&GR(t,n,i)?{segmentGroup:new ge(e,WR(i,new ge(n,t.children))),slicedSegments:[]}:n.length===0&&qR(t,n,i)?{segmentGroup:new ge(t.segments,zR(t,n,i,t.children)),slicedSegments:n}:{segmentGroup:new ge(t.segments,t.children),slicedSegments:n}}function zR(t,e,n,i){let r={};for(let o of n)if(nu(t,e,o)&&!i[yn(o)]){let s=new ge([],{});r[yn(o)]=s}return x(x({},i),r)}function WR(t,e){let n={};n[ee]=e;for(let i of t)if(i.path===""&&yn(i)!==ee){let r=new ge([],{});n[yn(i)]=r}return n}function GR(t,e,n){return n.some(i=>nu(t,e,i)&&yn(i)!==ee)}function qR(t,e,n){return n.some(i=>nu(t,e,i))}function nu(t,e,n){return(t.hasChildren()||e.length>0)&&n.pathMatch==="full"?!1:n.path===""}function QR(t,e,n){return e.length===0&&!t.children[n]}var Lp=class{};function YR(t,e,n,i,r,o,s="emptyOnly"){return new Vp(t,e,n,i,r,s,o).recognize()}var ZR=31,Vp=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(e,n,i,r,o,s,a){this.injector=e,this.configLoader=n,this.rootComponentType=i,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Pp(this.urlSerializer,this.urlTree)}noMatchError(e){return new F(4002,`'${e.segmentGroup}'`)}recognize(){let e=fw(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(W(({children:n,rootSnapshot:i})=>{let r=new zt(i,n),o=new Yc("",r),s=iR(i,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(e){let n=new po([],Object.freeze({}),Object.freeze(x({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),ee,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,ee,n).pipe(W(i=>({children:i,rootSnapshot:n})),li(i=>{if(i instanceof $s)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof Bs?this.noMatchError(i):i}))}processSegmentGroup(e,n,i,r,o){return i.segments.length===0&&i.hasChildren()?this.processChildren(e,n,i,o):this.processSegment(e,n,i,i.segments,r,!0,o).pipe(W(s=>s instanceof zt?[s]:[]))}processChildren(e,n,i,r){let o=[];for(let s of Object.keys(i.children))s==="primary"?o.unshift(s):o.push(s);return be(o).pipe(Vn(s=>{let a=i.children[s],l=dR(n,s);return this.processSegmentGroup(e,l,a,s,r)}),Ku((s,a)=>(s.push(...a),s)),ci(null),Xu(),Ve(s=>{if(s===null)return uo(i);let a=jw(s);return XR(a),B(a)}))}processSegment(e,n,i,r,o,s,a){return be(n).pipe(Vn(l=>this.processSegmentAgainstRoute(l._injector??e,n,l,i,r,o,s,a).pipe(li(c=>{if(c instanceof Bs)return B(null);throw c}))),Un(l=>!!l),li(l=>{if(Fw(l))return QR(i,r,o)?B(new Lp):uo(i);throw l}))}processSegmentAgainstRoute(e,n,i,r,o,s,a,l){return yn(i)!==s&&(s===ee||!nu(r,o,i))?uo(r):i.redirectTo===void 0?this.matchSegmentAgainstRoute(e,r,i,o,s,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,r,n,i,o,s,l):uo(r)}expandSegmentAgainstRouteUsingRedirect(e,n,i,r,o,s,a){let{matched:l,parameters:c,consumedSegments:u,positionalParamSegments:d,remainingSegments:f}=Vw(n,r,o);if(!l)return uo(n);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>ZR&&(this.allowRedirects=!1));let p=new po(o,c,Object.freeze(x({},this.urlTree.queryParams)),this.urlTree.fragment,hw(r),yn(r),r.component??r._loadedComponent??null,r,pw(r)),h=Qc(p,a,this.paramsInheritanceStrategy);p.params=Object.freeze(h.params),p.data=Object.freeze(h.data);let g=this.applyRedirects.applyRedirectCommands(u,r.redirectTo,d,p,e);return this.applyRedirects.lineralizeSegments(r,g).pipe(Ve(_=>this.processSegment(e,i,n,_.concat(f),s,!1,a)))}matchSegmentAgainstRoute(e,n,i,r,o,s){let a=$R(n,i,r,e,this.urlSerializer);return i.path==="**"&&(n.children={}),a.pipe(bt(l=>l.matched?(e=i._injector??e,this.getChildConfig(e,i,r).pipe(bt(({routes:c})=>{let u=i._loadedInjector??e,{parameters:d,consumedSegments:f,remainingSegments:p}=l,h=new po(f,d,Object.freeze(x({},this.urlTree.queryParams)),this.urlTree.fragment,hw(i),yn(i),i.component??i._loadedComponent??null,i,pw(i)),g=Qc(h,s,this.paramsInheritanceStrategy);h.params=Object.freeze(g.params),h.data=Object.freeze(g.data);let{segmentGroup:_,slicedSegments:y}=fw(n,f,p,c);if(y.length===0&&_.hasChildren())return this.processChildren(u,c,_,h).pipe(W(A=>new zt(h,A)));if(c.length===0&&y.length===0)return B(new zt(h,[]));let M=yn(i)===o;return this.processSegment(u,c,_,y,M?ee:o,!0,h).pipe(W(A=>new zt(h,A instanceof zt?[A]:[])))}))):uo(n)))}getChildConfig(e,n,i){return n.children?B({routes:n.children,injector:e}):n.loadChildren?n._loadedRoutes!==void 0?B({routes:n._loadedRoutes,injector:n._loadedInjector}):VR(e,n,i,this.urlSerializer).pipe(Ve(r=>r?this.configLoader.loadChildren(e,n).pipe(ke(o=>{n._loadedRoutes=o.routes,n._loadedInjector=o.injector})):BR(n))):B({routes:[],injector:e})}};function XR(t){t.sort((e,n)=>e.value.outlet===ee?-1:n.value.outlet===ee?1:e.value.outlet.localeCompare(n.value.outlet))}function KR(t){let e=t.value.routeConfig;return e&&e.path===""}function jw(t){let e=[],n=new Set;for(let i of t){if(!KR(i)){e.push(i);continue}let r=e.find(o=>i.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...i.children),n.add(r)):e.push(i)}for(let i of n){let r=jw(i.children);e.push(new zt(i.value,r))}return e.filter(i=>!n.has(i))}function hw(t){return t.data||{}}function pw(t){return t.resolve||{}}function JR(t,e,n,i,r,o){return Ve(s=>YR(t,e,n,i,s.extractedUrl,r,o).pipe(W(({state:a,tree:l})=>le(x({},s),{targetSnapshot:a,urlAfterRedirects:l}))))}function eA(t,e){return Ve(n=>{let{targetSnapshot:i,guards:{canActivateChecks:r}}=n;if(!r.length)return B(n);let o=new Set(r.map(l=>l.route)),s=new Set;for(let l of o)if(!s.has(l))for(let c of Uw(l))s.add(c);let a=0;return be(s).pipe(Vn(l=>o.has(l)?tA(l,i,t,e):(l.data=Qc(l,l.parent,t).resolve,B(void 0))),ke(()=>a++),Er(1),Ve(l=>a===s.size?B(n):wt))})}function Uw(t){let e=t.children.map(n=>Uw(n)).flat();return[t,...e]}function tA(t,e,n,i){let r=t.routeConfig,o=t._resolve;return r?.title!==void 0&&!Nw(r)&&(o[Hs]=r.title),nA(o,t,e,i).pipe(W(s=>(t._resolvedData=s,t.data=Qc(t,t.parent,n).resolve,null)))}function nA(t,e,n,i){let r=gp(t);if(r.length===0)return B({});let o={};return be(r).pipe(Ve(s=>iA(t[s],e,n,i).pipe(Un(),ke(a=>{if(a instanceof Us)throw Zc(new vo,a);o[s]=a}))),Er(1),W(()=>o),li(s=>Fw(s)?wt:Dr(s)))}function iA(t,e,n,i){let r=Ws(e)??i,o=Co(t,r),s=o.resolve?o.resolve(e,n):It(r,()=>o(e,n));return xi(s)}function hp(t){return bt(e=>{let n=t(e);return n?be(n).pipe(W(()=>e)):B(e)})}var Bw=(()=>{class t{buildTitle(n){let i,r=n.root;for(;r!==void 0;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===ee);return i}getResolvedTitleForRoute(n){return n.data[Hs]}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:()=>b(rA),providedIn:"root"})}return t})(),rA=(()=>{class t extends Bw{title;constructor(n){super(),this.title=n}updateTitle(n){let i=this.buildTitle(n);i!==void 0&&this.title.setTitle(i)}static \u0275fac=function(i){return new(i||t)(O(d_))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Qs=new P("",{providedIn:"root",factory:()=>({})}),oA=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=oe({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(i,r){i&1&&I(0,"router-outlet")},dependencies:[Bp],encapsulation:2})}return t})();function $p(t){let e=t.children&&t.children.map($p),n=e?le(x({},t),{children:e}):x({},t);return!n.component&&!n.loadComponent&&(e||n.loadChildren)&&n.outlet&&n.outlet!==ee&&(n.component=oA),n}var Kc=new P(""),Hp=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=b(Ql);loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return B(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let i=xi(n.loadComponent()).pipe(W($w),ke(o=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=o}),ui(()=>{this.componentLoaders.delete(n)})),r=new wr(i,()=>new H).pipe(_r());return this.componentLoaders.set(n,r),r}loadChildren(n,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return B({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let o=sA(i,this.compiler,n,this.onLoadEndListener).pipe(ui(()=>{this.childrenLoaders.delete(i)})),s=new wr(o,()=>new H).pipe(_r());return this.childrenLoaders.set(i,s),s}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function sA(t,e,n,i){return xi(t.loadChildren()).pipe(W($w),Ve(r=>r instanceof Qo||Array.isArray(r)?B(r):be(e.compileModuleAsync(r))),W(r=>{i&&i(t);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(n).injector,s=o.get(Kc,[],{optional:!0,self:!0}).flat()),{routes:s.map($p),injector:o}}))}function aA(t){return t&&typeof t=="object"&&"default"in t}function $w(t){return aA(t)?t.default:t}var zp=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:()=>b(lA),providedIn:"root"})}return t})(),lA=(()=>{class t{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,i){return n}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Hw=new P(""),zw=new P("");function cA(t,e,n){let i=t.get(zw),r=t.get(ut);return t.get(Te).runOutsideAngular(()=>{if(!r.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(c=>setTimeout(c));let o,s=new Promise(c=>{o=c}),a=r.startViewTransition(()=>(o(),uA(t))),{onViewTransitionCreated:l}=i;return l&&It(t,()=>l({transition:a,from:e,to:n})),s})}function uA(t){return new Promise(e=>{kf({read:()=>setTimeout(e)},{injector:t})})}var Ww=new P(""),Wp=(()=>{class t{currentNavigation=null;currentTransition=null;lastSuccessfulNavigation=null;events=new H;transitionAbortSubject=new H;configLoader=b(Hp);environmentInjector=b(nt);destroyRef=b(ns);urlSerializer=b(zs);rootContexts=b(Gs);location=b(Xr);inputBindingEnabled=b(tu,{optional:!0})!==null;titleStrategy=b(Bw);options=b(Qs,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=b(zp);createViewTransition=b(Hw,{optional:!0});navigationErrorHandler=b(Ww,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>B(void 0);rootComponentType=null;destroyed=!1;constructor(){let n=r=>this.events.next(new bp(r)),i=r=>this.events.next(new Ep(r));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=n,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(n){let i=++this.navigationId;this.transitions?.next(le(x(x({},this.transitions.value),n),{id:i}))}setupNavigations(n,i,r){return this.transitions=new ve({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:Os,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Dt(o=>o.id!==0),W(o=>le(x({},o),{extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),bt(o=>{let s=!1,a=!1;return B(o).pipe(bt(l=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",Wt.SupersededByNewNavigation),wt;this.currentTransition=o,this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,targetBrowserUrl:typeof l.extras.browserUrl=="string"?this.urlSerializer.parse(l.extras.browserUrl):l.extras.browserUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?le(x({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let c=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),u=l.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!c&&u!=="reload"){let d="";return this.events.next(new Ti(l.id,this.urlSerializer.serialize(l.rawUrl),d,Hc.IgnoredSameUrlNavigation)),l.resolve(!1),wt}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return B(l).pipe(bt(d=>{let f=this.transitions?.getValue();return this.events.next(new yo(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),f!==this.transitions?.getValue()?wt:Promise.resolve(d)}),JR(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),ke(d=>{o.targetSnapshot=d.targetSnapshot,o.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation=le(x({},this.currentNavigation),{finalUrl:d.urlAfterRedirects});let f=new zc(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(f)}));if(c&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){let{id:d,extractedUrl:f,source:p,restoredState:h,extras:g}=l,_=new yo(d,this.urlSerializer.serialize(f),p,h);this.events.next(_);let y=Rw(this.rootComponentType).snapshot;return this.currentTransition=o=le(x({},l),{targetSnapshot:y,urlAfterRedirects:f,extras:le(x({},g),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=f,B(o)}else{let d="";return this.events.next(new Ti(l.id,this.urlSerializer.serialize(l.extractedUrl),d,Hc.IgnoredByUrlHandlingStrategy)),l.resolve(!1),wt}}),ke(l=>{let c=new _p(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}),W(l=>(this.currentTransition=o=le(x({},l),{guards:_R(l.targetSnapshot,l.currentSnapshot,this.rootContexts)}),o)),RR(this.environmentInjector,l=>this.events.next(l)),ke(l=>{if(o.guardsResult=l.guardsResult,l.guardsResult&&typeof l.guardsResult!="boolean")throw Zc(this.urlSerializer,l.guardsResult);let c=new wp(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(c)}),Dt(l=>l.guardsResult?!0:(this.cancelNavigationTransition(l,"",Wt.GuardRejected),!1)),hp(l=>{if(l.guards.canActivateChecks.length)return B(l).pipe(ke(c=>{let u=new Cp(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(u)}),bt(c=>{let u=!1;return B(c).pipe(eA(this.paramsInheritanceStrategy,this.environmentInjector),ke({next:()=>u=!0,complete:()=>{u||this.cancelNavigationTransition(c,"",Wt.NoDataFromResolver)}}))}),ke(c=>{let u=new Dp(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(u)}))}),hp(l=>{let c=u=>{let d=[];u.routeConfig?.loadComponent&&!u.routeConfig._loadedComponent&&d.push(this.configLoader.loadComponent(u.routeConfig).pipe(ke(f=>{u.component=f}),W(()=>{})));for(let f of u.children)d.push(...c(f));return d};return Oo(c(l.targetSnapshot.root)).pipe(ci(null),jn(1))}),hp(()=>this.afterPreactivation()),bt(()=>{let{currentSnapshot:l,targetSnapshot:c}=o,u=this.createViewTransition?.(this.environmentInjector,l.root,c.root);return u?be(u).pipe(W(()=>o)):B(o)}),W(l=>{let c=pR(n.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=o=le(x({},l),{targetRouterState:c}),this.currentNavigation.targetRouterState=c,o}),ke(()=>{this.events.next(new Vs)}),yR(this.rootContexts,n.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),jn(1),ke({next:l=>{s=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new _n(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{s=!0}}),Ee(this.transitionAbortSubject.pipe(ke(l=>{throw l}))),ui(()=>{!s&&!a&&this.cancelNavigationTransition(o,"",Wt.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),li(l=>{if(this.destroyed)return o.resolve(!1),wt;if(a=!0,Pw(l))this.events.next(new ni(o.id,this.urlSerializer.serialize(o.extractedUrl),l.message,l.cancellationCode)),vR(l)?this.events.next(new _o(l.url,l.navigationBehaviorOptions)):o.resolve(!1);else{let c=new Ls(o.id,this.urlSerializer.serialize(o.extractedUrl),l,o.targetSnapshot??void 0);try{let u=It(this.environmentInjector,()=>this.navigationErrorHandler?.(c));if(u instanceof Us){let{message:d,cancellationCode:f}=Zc(this.urlSerializer,u);this.events.next(new ni(o.id,this.urlSerializer.serialize(o.extractedUrl),d,f)),this.events.next(new _o(u.redirectTo,u.navigationBehaviorOptions))}else throw this.events.next(c),l}catch(u){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(u)}}return wt}))}))}cancelNavigationTransition(n,i,r){let o=new ni(n.id,this.urlSerializer.serialize(n.extractedUrl),i,r);this.events.next(o),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),i=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return n.toString()!==i?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function dA(t){return t!==Os}var fA=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:()=>b(hA),providedIn:"root"})}return t})(),jp=class{shouldDetach(e){return!1}store(e,n){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,n){return e.routeConfig===n.routeConfig}},hA=(()=>{class t extends jp{static \u0275fac=(()=>{let n;return function(r){return(n||(n=fn(t)))(r||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Gw=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:()=>b(pA),providedIn:"root"})}return t})(),pA=(()=>{class t extends Gw{location=b(Xr);urlSerializer=b(zs);options=b(Qs,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";urlHandlingStrategy=b(zp);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new ii;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}routerState=Rw(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(i=>{i.type==="popstate"&&n(i.url,i.state)})}handleRouterEvent(n,i){if(n instanceof yo)this.stateMemento=this.createStateMemento();else if(n instanceof Ti)this.rawUrlTree=i.initialUrl;else if(n instanceof zc){if(this.urlUpdateStrategy==="eager"&&!i.extras.skipLocationChange){let r=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(i.targetBrowserUrl??r,i)}}else n instanceof Vs?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,this.urlUpdateStrategy==="deferred"&&!i.extras.skipLocationChange&&this.setBrowserUrl(i.targetBrowserUrl??this.rawUrlTree,i)):n instanceof ni&&(n.code===Wt.GuardRejected||n.code===Wt.NoDataFromResolver)?this.restoreHistory(i):n instanceof Ls?this.restoreHistory(i,!0):n instanceof _n&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,i){let r=n instanceof ii?this.urlSerializer.serialize(n):n;if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){let o=this.browserPageId,s=x(x({},i.extras.state),this.generateNgRouterState(i.id,o));this.location.replaceState(r,"",s)}else{let o=x(x({},i.extras.state),this.generateNgRouterState(i.id,this.browserPageId+1));this.location.go(r,"",o)}}restoreHistory(n,i=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,o=this.currentPageId-r;o!==0?this.location.historyGo(o):this.currentUrlTree===n.finalUrl&&o===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,i){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:i}:{navigationId:n}}static \u0275fac=(()=>{let n;return function(r){return(n||(n=fn(t)))(r||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function qw(t,e){t.events.pipe(Dt(n=>n instanceof _n||n instanceof ni||n instanceof Ls||n instanceof Ti),W(n=>n instanceof _n||n instanceof Ti?0:(n instanceof ni?n.code===Wt.Redirect||n.code===Wt.SupersededByNewNavigation:!1)?2:1),Dt(n=>n!==2),jn(1)).subscribe(()=>{e()})}var gA={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},mA={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Mi=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=b(Jf);stateManager=b(Gw);options=b(Qs,{optional:!0})||{};pendingTasks=b(Qn);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=b(Wp);urlSerializer=b(zs);location=b(Xr);urlHandlingStrategy=b(zp);_events=new H;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=b(fA);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=b(Kc,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!b(tu,{optional:!0});constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}eventsSubscription=new Ae;subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(i=>{try{let r=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(r!==null&&o!==null){if(this.stateManager.handleRouterEvent(i,o),i instanceof ni&&i.code!==Wt.Redirect&&i.code!==Wt.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof _n)this.navigated=!0;else if(i instanceof _o){let s=i.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(i.url,r.currentRawUrl),l=x({browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||dA(r.source)},s);this.scheduleNavigation(a,Os,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}yA(i)&&this._events.next(i)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Os,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",i)},0)})}navigateToSyncWithBrowser(n,i,r){let o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){let l=x({},r);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(o.state=l)}let a=this.parseUrl(n);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map($p),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,i={}){let{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s,u=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":u=x(x({},this.currentUrlTree.queryParams),o);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}u!==null&&(u=this.removeEmptyProps(u));let d;try{let f=r?r.snapshot:this.routerState.snapshot.root;d=Iw(f)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),d=this.currentUrlTree.root}return Tw(d,n,u,c??null)}navigateByUrl(n,i={skipLocationChange:!1}){let r=dr(n)?n:this.parseUrl(n),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,Os,null,i)}navigate(n,i={skipLocationChange:!1}){return vA(n),this.navigateByUrl(this.createUrlTree(n,i),i)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,i){let r;if(i===!0?r=x({},gA):i===!1?r=x({},mA):r=i,dr(n))return aw(this.currentUrlTree,n,r);let o=this.parseUrl(n);return aw(this.currentUrlTree,o,r)}removeEmptyProps(n){return Object.entries(n).reduce((i,[r,o])=>(o!=null&&(i[r]=o),i),{})}scheduleNavigation(n,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c;s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,f)=>{a=d,l=f});let u=this.pendingTasks.add();return qw(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(u))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function vA(t){for(let e=0;e<t.length;e++)if(t[e]==null)throw new F(4008,!1)}function yA(t){return!(t instanceof Vs)&&!(t instanceof _o)}var Jc=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;href=null;target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new H;constructor(n,i,r,o,s,a){this.router=n,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a;let l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=l==="a"||l==="area",this.isAnchorElement?this.subscription=n.events.subscribe(c=>{c instanceof _n&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}routerLinkInput=null;set routerLink(n){n==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(dr(n)?this.routerLinkInput=n:this.routerLinkInput=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0"))}onClick(n,i,r,o,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(n!==0||i||r||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let l={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,l),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let n=this.urlTree;this.href=n!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(n)):null;let i=this.href===null?null:i0(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",i)}applyAttributeValue(n,i){let r=this.renderer,o=this.el.nativeElement;i!==null?r.setAttribute(o,n,i):r.removeAttribute(o,n)}get urlTree(){return this.routerLinkInput===null?null:dr(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(i){return new(i||t)(D(Mi),D(fr),Sf("tabindex"),D(lt),D(ae),D(Jn))};static \u0275dir=ye({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(i,r){i&1&&k("click",function(s){return r.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),i&2&&Qr("target",r.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",or],skipLocationChange:[2,"skipLocationChange","skipLocationChange",or],replaceUrl:[2,"replaceUrl","replaceUrl",or],routerLink:"routerLink"},features:[Kf,un]})}return t})(),Qw=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new ie;constructor(n,i,r,o,s){this.router=n,this.element=i,this.renderer=r,this.cdr=o,this.link=s,this.routerEventsSubscription=n.events.subscribe(a=>{a instanceof _n&&this.update()})}ngAfterContentInit(){B(this.links.changes,B(null)).pipe(ai()).subscribe(n=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let n=[...this.links.toArray(),this.link].filter(i=>!!i).map(i=>i.onChanges);this.linkInputChangesSubscription=be(n).pipe(ai()).subscribe(i=>{this._isActive!==this.isLinkActive(this.router)(i)&&this.update()})}set routerLinkActive(n){let i=Array.isArray(n)?n:n.split(" ");this.classes=i.filter(r=>!!r)}ngOnChanges(n){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let n=this.hasActiveLinks();this.classes.forEach(i=>{n?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),n&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==n&&(this._isActive=n,this.cdr.markForCheck(),this.isActiveChange.emit(n))})}isLinkActive(n){let i=_A(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return r=>{let o=r.urlTree;return o?n.isActive(o,i):!1}}hasActiveLinks(){let n=this.isLinkActive(this.router);return this.link&&n(this.link)||this.links.some(n)}static \u0275fac=function(i){return new(i||t)(D(Mi),D(ae),D(lt),D($t),D(Jc,8))};static \u0275dir=ye({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(i,r,o){if(i&1&&ny(o,Jc,5),i&2){let s;Ge(s=qe())&&(r.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[un]})}return t})();function _A(t){return!!t.paths}var eu=class{};var wA=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(n,i,r,o,s){this.router=n,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(Dt(n=>n instanceof _n),Vn(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(n,i){let r=[];for(let o of i){o.providers&&!o._injector&&(o._injector=Bl(o.providers,n,`Route: ${o.path}`));let s=o._injector??n,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return be(r).pipe(ai())}preloadConfig(n,i){return this.preloadingStrategy.preload(i,()=>{let r;i.loadChildren&&i.canLoad===void 0?r=this.loader.loadChildren(n,i):r=B(null);let o=r.pipe(Ve(s=>s===null?B(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??n,s.routes))));if(i.loadComponent&&!i._loadedComponent){let s=this.loader.loadComponent(i);return be([o,s]).pipe(ai())}else return o})}static \u0275fac=function(i){return new(i||t)(O(Mi),O(Ql),O(nt),O(eu),O(Hp))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Yw=new P(""),CA=(()=>{class t{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource="imperative";restoredId=0;store={};constructor(n,i,r,o,s={}){this.urlSerializer=n,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,s.scrollPositionRestoration||="disabled",s.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof yo?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=n.navigationTrigger,this.restoredId=n.restoredState?n.restoredState.navigationId:0):n instanceof _n?(this.lastId=n.id,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.urlAfterRedirects).fragment)):n instanceof Ti&&n.code===Hc.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(n,this.urlSerializer.parse(n.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(n=>{n instanceof Wc&&(n.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(n.position):n.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(n.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(n,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new Wc(n,this.lastSource==="popstate"?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(i){O0()};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();function DA(t){return t.routerState.root}function Ys(t,e){return{\u0275kind:t,\u0275providers:e}}function bA(){let t=b(Oe);return e=>{let n=t.get(Yt);if(e!==n.components[0])return;let i=t.get(Mi),r=t.get(Zw);t.get(Gp)===1&&i.initialNavigation(),t.get(Xw,null,ne.Optional)?.setUpPreloading(),t.get(Yw,null,ne.Optional)?.init(),i.resetRootComponentType(n.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var Zw=new P("",{factory:()=>new H}),Gp=new P("",{providedIn:"root",factory:()=>1});function EA(){return Ys(2,[{provide:Gp,useValue:0},{provide:cs,multi:!0,deps:[Oe],useFactory:e=>{let n=e.get(Ey,Promise.resolve());return()=>n.then(()=>new Promise(i=>{let r=e.get(Mi),o=e.get(Zw);qw(r,()=>{i(!0)}),e.get(Wp).afterPreactivation=()=>(i(!0),o.closed?B(void 0):o),r.initialNavigation()}))}}])}function SA(){return Ys(3,[{provide:cs,multi:!0,useFactory:()=>{let e=b(Mi);return()=>{e.setUpLocationChangeListener()}}},{provide:Gp,useValue:2}])}var Xw=new P("");function IA(t){return Ys(0,[{provide:Xw,useExisting:wA},{provide:eu,useExisting:t}])}function TA(){return Ys(8,[dw,{provide:tu,useExisting:dw}])}function MA(t){let e=[{provide:Hw,useValue:cA},{provide:zw,useValue:x({skipNextTransition:!!t?.skipInitialTransition},t)}];return Ys(9,e)}var xA=[Xr,{provide:zs,useClass:vo},Mi,Gs,{provide:fr,useFactory:DA,deps:[Mi]},Hp,[]],Kw=(()=>{class t{constructor(){}static forRoot(n,i){return{ngModule:t,providers:[xA,[],{provide:Kc,multi:!0,useValue:n},[],i?.errorHandler?{provide:Ww,useValue:i.errorHandler}:[],{provide:Qs,useValue:i||{}},i?.useHash?AA():NA(),RA(),i?.preloadingStrategy?IA(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?kA(i):[],i?.bindToComponentInputs?TA().\u0275providers:[],i?.enableViewTransitions?MA().\u0275providers:[],OA()]}}static forChild(n){return{ngModule:t,providers:[{provide:Kc,multi:!0,useValue:n}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=rt({type:t});static \u0275inj=it({})}return t})();function RA(){return{provide:Yw,useFactory:()=>{let t=b(Py),e=b(Te),n=b(Qs),i=b(Wp),r=b(zs);return n.scrollOffset&&t.setOffset(n.scrollOffset),new CA(r,i,t,e,n)}}}function AA(){return{provide:Jn,useClass:Iy}}function NA(){return{provide:Jn,useClass:vh}}function kA(t){return[t.initialNavigation==="disabled"?SA().\u0275providers:[],t.initialNavigation==="enabledBlocking"?EA().\u0275providers:[]]}var gw=new P("");function OA(){return[{provide:gw,useFactory:bA},{provide:zl,multi:!0,useExisting:gw}]}var rn=class{constructor(){this._running=!1,this._err=!1,this._none=!0,this._updates$=new H}setRunning(){this._running||(this._running=!0,this._err=!1,this._none=!1,this._errMsg=void 0,this._updates$.next(this))}get running(){return this._running}setError(e){this._err=!0,this._errMsg=e,this._running=!1,this._none=!1,this._updates$.next(this)}get error(){return this._err}get errorMessage(){return this._errMsg}setNone(){this._none||(this._none=!0,this._running=!1,this._err=!1,this._errMsg=void 0,this._updates$.next(this))}get none(){return this._none}get updates$(){return this._updates$}};var Do=class{static format(e){return e=e.replace("ERROR: ",""),e=e.replace("Error: ",""),e}};var qp=class{constructor(e){this.hash="",this.host="",this.hostname="",this.href="",this.origin="",this.password="",this.port="",this.protocol="",this.search="",this.searchParams=null,this.username="",this.pathname=e}toString(){this.pathname}toJSON(){return""}};function Zs(t){try{return new URL(t)}catch{return new qp(t)}}var wn=(()=>{let e=class e{constructor(i,r){this._http=i,this._location=r,this._version="-.-",this._host="localhost",this._port="",this._fdsn_post="http://localhost/fdsnws/dataselect/1/query",this._path="/",this._secure=!1,this._menuEnabled=!1,this._menuStates=new Array,this.menuActive=!1}load(){return this._http.get("assets/config.json").pipe(ke(i=>{let r=Zs(this._location.href);this._version=i.version,this._host=r.hostname,this._port=r.port,this._path=r.pathname||"/",this._secure=r.protocol==="https:",this._fdsn_post=this._host,this._port&&(this._fdsn_post+=":"+this._port),this._fdsn_post+=(i.fdsnws||this._path)+"fdsnws/dataselect/1/query",this._apps=i.apps}))}pushMenu(){this._menuStates.push(this._menuEnabled),this._menuEnabled=!0}popMenu(){let i=this._menuStates.slice(-1,1);i?this._menuEnabled=i[0]:this._menuEnabled=!1}get version(){return this._version}get hostname(){return this._host}get port(){return this._port}get host(){return this.hostname+":"+this.port}get path(){return this._path}get secure(){return this._secure}get fdsnUrl(){return this._fdsn_post}get apps(){return this._apps}get menuEnabled(){return this._menuEnabled}};e.\u0275fac=function(r){return new(r||e)(O(bh),O(us))},e.\u0275prov=R({token:e,factory:e.\u0275fac});let t=e;return t})();var Qp=class{constructor(){this.Username="",this.Password="",this.RefreshingInterval=5,this.SegmentThreshold=-1,this.RealtimeChannelViewInterval=600,this.MaxChannelViewIntervalSize=3600,this.UseLocalTime=!1,this.MaxSimultaneouslyChannelsLoaded=6,this.ShowLegend=!0,this.PlotBytes=!0,this.PlotPackages=!0,this.PlotStorageTime=!0,this.PlotConsEstablished=!0,this.PlotConsClosed=!0,this.PlotConsStanding=!0}},Je=(()=>{let e=class e{constructor(i,r){this._dateService=i,this._config=r,this._settings=new Qp,this.getString("username",o=>this._settings.Username=o),this.getString("password",o=>this._settings.Password=o),this.getInt("refreshingInterval",o=>this._settings.RefreshingInterval=o),this.getInt("segmentThreshold",o=>this._settings.SegmentThreshold=o),this.getInt("realtimeChannelViewInterval",o=>this._settings.RealtimeChannelViewInterval=o),this.getInt("maxChannelViewIntervalSize",o=>this._settings.MaxChannelViewIntervalSize=o),this.getBool("useLocalTime",o=>this._settings.UseLocalTime=o),this.getInt("maxSimultaneouslyChannelsLoaded",o=>this._settings.MaxSimultaneouslyChannelsLoaded=o),this.getBool("showLegend",o=>this._settings.ShowLegend=o),this.getBool("plotBytes",o=>this._settings.PlotBytes=o),this.getBool("plotPackages",o=>this._settings.PlotPackages=o),this.getBool("plotStorageTime",o=>this._settings.PlotStorageTime=o),this.getBool("plotConEstablished",o=>this._settings.PlotConsEstablished=o),this.getBool("plotConClosed",o=>this._settings.PlotConsClosed=o),this.getBool("plotConStanding",o=>this._settings.PlotConsStanding=o),this._dateService.localTime=this._settings.UseLocalTime}getString(i,r){let o=localStorage.getItem(i);o!=null&&r(o)}getInt(i,r){let o=localStorage.getItem(i);if(o==null)return;let s=parseInt(o);isNaN(s)||r(o)}getBool(i,r){let o=localStorage.getItem(i);o!=null&&r(o==="1")}get settings(){return this._settings}capsURL(){let i="ws"+(this._config.secure?"s":"")+"://";return this._settings.Username?i+this._settings.Username+":"+this._settings.Password+"@"+this._config.host+this._config.path:i+this._config.host+this._config.path}fdsnURL(){return"http"+(this._config.secure?"s":"")+"://"+this._config.fdsnUrl}save(){localStorage.setItem("username",this._settings.Username),localStorage.setItem("password",this._settings.Password),localStorage.setItem("refreshingInterval",this._settings.RefreshingInterval.toString()),localStorage.setItem("segmentThreshold",this._settings.SegmentThreshold.toString()),localStorage.setItem("realtimeChannelViewInterval",this._settings.RealtimeChannelViewInterval.toString()),localStorage.setItem("maxChannelViewIntervalSize",this._settings.MaxChannelViewIntervalSize.toString()),localStorage.setItem("useLocalTime",this._settings.UseLocalTime?"1":"0"),localStorage.setItem("maxSimultaneouslyChannelsLoaded",this._settings.MaxSimultaneouslyChannelsLoaded.toString()),localStorage.setItem("showLegend",this._settings.ShowLegend?"1":"0"),localStorage.setItem("plotBytes",this._settings.PlotBytes?"1":"0"),localStorage.setItem("plotPackages",this._settings.PlotPackages?"1":"0"),localStorage.setItem("plotStorageTime",this._settings.PlotStorageTime?"1":"0"),localStorage.setItem("plotConEstablished",this._settings.PlotConsEstablished?"1":"0"),localStorage.setItem("plotConClosed",this._settings.PlotConsClosed?"1":"0"),localStorage.setItem("plotConStanding",this._settings.PlotConsStanding?"1":"0"),this._dateService.localTime=this._settings.UseLocalTime}};e.\u0275fac=function(r){return new(r||e)(O(kn),O(wn))},e.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var FA=t=>({background:t});function LA(t,e){if(t&1&&(m(0,"div"),I(1,"div",5),C(2),v()),t&2){let n=e.$implicit;w(),V("ngStyle",Mt(2,FA,n[1])),w(),_e(" ",n[0]," ")}}function VA(t,e){if(t&1&&(m(0,"div",4),ze(1,LA,3,4,"div",null,gt),v()),t&2){let n=E(2);w(),We(n.data.labels)}}function jA(t,e){if(t&1&&(m(0,"plot-widget",3),ue(1,VA,3,0,"div",4),v()),t&2){let n=E();V("data",n.data.graphs)("optionsChanged",n.optionsChanged),w(),Y(n.data.labels.length?1:-1)}}var ri=class{constructor(e,n,i){this.graphs=new Array,this.labels=new Array,this._visible=!0,this.title=e,this._param=n,this.options=i}clear(){this.graphs.length=0,this.labels.length=0}toggle(){this._visible=!this._visible,this._param}set visible(e){this._visible=e}get visible(){return this._visible}get param(){return this._param}},Jw=(()=>{let e=class e{set data(i){this._d=i,this._d.param&&(this.data.visible=!!this._settings.settings[this._d.param])}get data(){return this._d}constructor(i){this._settings=i}toggle(i){i.toggle(),i.param&&(this._settings.settings[i.param]=i.visible,this._settings.save())}};e.\u0275fac=function(r){return new(r||e)(D(Je))},e.\u0275cmp=oe({type:e,selectors:[["app-plot"]],inputs:{data:"data",optionsChanged:"optionsChanged"},standalone:!1,decls:5,vars:4,consts:[[1,"vspacing",3,"click","ngClass"],[1,"hspacing"],[1,"fas",3,"ngClass"],["xaxis","","yaxis","",3,"data","optionsChanged"],[1,"absolute","small","top","bottom","attached","legend","widget",2,"top","0","left","60px","padding","0.5em"],[1,"inline",2,"width","1em","height","1em",3,"ngStyle"]],template:function(r,o){r&1&&(m(0,"div",0),k("click",function(){return o.toggle(o.data)}),m(1,"strong",1),C(2),v(),I(3,"i",2),v(),ue(4,jA,2,3,"plot-widget",3)),r&2&&(V("ngClass",o.data.visible?"is-active":"is-inactive"),w(2),he(o.data.title),w(),V("ngClass",o.data.visible?"fa-chevron-down":"fa-chevron-right"),w(),Y(o.data.visible?4:-1))},dependencies:[Rt,Ry,Q_],encapsulation:2});let t=e;return t})();var ru=class{constructor(e,n,i,r,o){this.visible=!0,this.code=e,this.start=n,this.end=i,this.parent=r,this.root=o,this.id=(r?r.id+".":"")+this.code}extend(e){e.start<this.start&&(this.start=e.start),e.end>this.end&&(this.end=e.end)}get isExpanded(){return!1}allParentsExpanded(){let e=this.parent;for(;e;){if(!e.isExpanded)return!1;e=e.parent}return!0}toExpandable(){return this}toChannel(){return this}},Cn=class t extends ru{constructor(e,n,i,r,o){super(e,n,i,r,o),this._isExpanded=!1,this.selectedChildren=[]}get isExpanded(){return this._isExpanded}toggleExpansion(){this._isExpanded=!this._isExpanded}notifyOfSelectionChange(e){if(this.selectedChildren.indexOf(e)===-1)this.selectedChildren.push(e),this.selectedChildren.length===1&&this.parent instanceof t&&this.parent.notifyOfSelectionChange(this);else{let n=this.selectedChildren.indexOf(e);this.selectedChildren.splice(n,1),this.selectedChildren.length===0&&this.parent instanceof t&&this.parent.notifyOfSelectionChange(this)}}},oi=class extends ru{constructor(e,n,i,r,o){super(e,n,i,r,o),this.isSelected=!1,this.type="channel"}select(){this.root&&(this.root.selectedChannels.includes(this)||(this.isSelected=!0,this.root.selectedChannels.push(this),this.parent?.notifyOfSelectionChange(this)))}deselect(){if(this.root&&this.root.selectedChannels.includes(this)){this.isSelected=!1;let e=this.root.selectedChannels.indexOf(this);this.root.selectedChannels.splice(e,1),this.parent?.notifyOfSelectionChange(this)}}matches(e){return!e||e.length<=3?!0:e[3].test(this.code)}flatten(e){e.push(this)}},ou=class extends Cn{constructor(e,n,i,r,o){super(e,n,i,r,o),this.channels=new Array,this.lookup=new Map,this.type="location",this.children=this.channels,this.selectAllChildren=this.selectAllChannels,this.deselectAllChildren=this.deselectAllChannels,this.fullySelected=this.allChannelsSelected}addChannel(e){this.lookup.set(e.code,e),this.channels.push(e),this.root?.register(e)}selectAllChannels(){for(let e of this.channels)e.select()}deselectAllChannels(){for(let e of this.channels)e.deselect()}allChannelsSelected(){for(let e of this.channels)if(!e.isSelected)return!1;return!0}toggleExpansion(){if(this.root)if(this._isExpanded)this._isExpanded=!1,this.channels.forEach(e=>{if(this.root){let n=this.root.expandedChannels.indexOf(e);this.root.expandedChannels.splice(n,1)}});else{this._isExpanded=!0;for(let e of this.channels)this.root&&this.root.expandedChannels.push(e)}}matches(e){return!e||e.length<=2?!0:e[2].test(this.code)}flatten(e){for(let n of this.channels)n.flatten(e)}},su=class extends Cn{constructor(e,n,i,r,o){super(e,n,i,r,o),this.locations=new Array,this.lookup=new Map,this.type="station",this.children=this.locations,this.selectAllChildren=this.selectAllLocations,this.deselectAllChildren=this.deselectAllLocations,this.fullySelected=this.allLocationsSelected}addLocation(e){this.lookup.set(e.code,e),this.locations.push(e),this.root?.register(e)}selectAllLocations(){for(let e of this.locations)e.selectAllChannels()}deselectAllLocations(){for(let e of this.locations)e.deselectAllChannels()}allLocationsSelected(){for(let e of this.locations)if(!e.fullySelected())return!1;return!0}matches(e){return!e||e.length<=1?!0:e[1].test(this.code)}flatten(e){for(let n of this.locations)n.flatten(e)}},au=class extends Cn{constructor(e,n,i,r){super(e,n,i,void 0,r),this.stations=new Array,this.lookup=new Map,this.type="network",this.children=this.stations,this.selectAllChildren=this.selectAllStations,this.deselectAllChildren=this.deselectAllStations,this.fullySelected=this.allStationsSelected}addStation(e){this.lookup.set(e.code,e),this.stations.push(e),this.root?.register(e)}selectAllStations(){for(let e of this.stations)e.selectAllLocations()}deselectAllStations(){for(let e of this.stations)e.deselectAllLocations()}allStationsSelected(){for(let e of this.stations)if(!e.fullySelected())return!1;return!0}matches(e){return e?e[0].test(this.code):!0}flatten(e){for(let n of this.stations)n.flatten(e)}},lu=class{constructor(){this.networks=new Array,this.lookup=new Map,this.channels=new Array,this.selectedChannels=new Array,this.expandedChannels=new Array,this.visibleNodes=new Array,this._nodes=new Map}addNetwork(e){this.lookup.set(e.code,e),this.networks.push(e),this.register(e)}addChannel(e){this.channels.push(e)}register(e){this._nodes.set(e.id,e)}get(e){return this._nodes.get(e)}visitTree(e){for(let n of this.networks)if(e(n)){for(let i of n.stations)if(e(i)){for(let r of i.locations)if(e(r))for(let o of r.channels)e(o)}}}stripTree(e){for(let n=0;n<this.networks.length;){let i=this.networks[n];if(!e(i)){this.networks.splice(n,1);continue}++n;for(let r=0;r<i.stations.length;){let o=i.stations[r];if(!e(o)){i.stations.splice(r,1);continue}++r;for(let s=0;s<o.locations.length;){let a=o.locations[s];if(!e(a)){o.locations.splice(s,1);continue}++s;for(let l=0;l<a.channels.length;){let c=a.channels[l];if(!e(c)){a.channels.splice(l,1);continue}++l}}}}}sort(e,n=!0){this.networks.sort(e);for(let i of this.networks){i.stations.sort(e);for(let r of i.stations){r.locations.sort(e);for(let o of r.locations)o.channels.sort(e)}}n&&this.channels.sort(e)}selectAllVisibleNodes(){this.visibleNodes.forEach(e=>{e instanceof oi&&e.select(),e instanceof Cn&&e.selectAllChildren()})}deselectAllVisibleNodes(){this.visibleNodes.forEach(e=>{e instanceof oi&&e.deselect(),e instanceof Cn&&e.deselectAllChildren()})}};var Ai=function(t){return t[t.ASCII=0]="ASCII",t[t.INT16=1]="INT16",t[t.INT32=3]="INT32",t[t.FLOAT32=4]="FLOAT32",t[t.FLOAT64=5]="FLOAT64",t[t.STEIM1=10]="STEIM1",t[t.STEIM2=11]="STEIM2",t[t.GEOSCOPE24=12]="GEOSCOPE24",t[t.GEOSCOPE163=13]="GEOSCOPE163",t[t.GEOSCOPE164=14]="GEOSCOPE164",t[t.CDSN=16]="CDSN",t[t.SRO=30]="SRO",t[t.DWWSSN=32]="DWWSSN",t}(Ai||{});function BA(t,e,n){let i=t.getInt32(e,n),r=0,o=new Int32Array(64),s=0,a,l;for(a=0;a<16;++a)switch(r=i>>30-a*2&3,r){case 0:o[s++]=t.getInt32(e+a*4,n);break;case 1:for(l=0;l<4;++l)o[s++]=t.getInt8(e+a*4+l);break;case 2:for(l=0;l<4;l+=2)o[s++]=t.getInt16(e+a*4+l,n);break;case 3:o[s++]=t.getInt32(e+a*4,n);break;default:throw Error("[Steim1] internal error: "+r)}return o.slice(0,s)}function $A(t,e,n,i){if(t.byteLength%64!==0)throw Error("[Steim1] Data length is not a multiple of 64: "+t.byteLength);let r=[],o,s=t.byteLength/64,a=0,l=0,c,u=0,d=0,f,p;for(f=0;f<s;++f)for(o=BA(t,f*64,n),u=1,f||(d=i,l=o[1],c=o[2],u=3,i||(d=l-o[3])),p=u;p<o.length&&a<e;++p)r[a]=d+o[p],d=r[a],++a;if(a!==e)throw Error("[Steim1] Sample count does not match: "+a+" != "+e);if(c&&c!==d)throw new Error("[Steim1] CRC error: "+r[e-1]+" != "+c);return r}function HA(t,e,n){let i=t.getUint32(e,n),r=0,o=0,s=new Int32Array(106),a,l=0,c=0,u=0,d=0,f;for(f=0;f<16;++f)switch(r=i>>30-f*2&3,r){case 0:e||(s[l++]=t.getInt32(e+f*4,n));break;case 1:s[l++]=t.getInt8(e+f*4),s[l++]=t.getInt8(e+f*4+1),s[l++]=t.getInt8(e+f*4+2),s[l++]=t.getInt8(e+f*4+3);break;case 2:switch(a=t.getUint32(e+f*4,n),o=a>>30&3,o){case 1:s[l++]=a<<2>>2;break;case 2:s[l++]=a<<2>>17,s[l++]=a<<17>>17;break;case 3:s[l++]=a<<2>>22,s[l++]=a<<12>>22,s[l++]=a<<22>>22;break;default:break}break;case 3:switch(a=t.getUint32(e+f*4,n),o=a>>30&3,c=0,u=0,d=0,o){case 0:d=2,c=5,u=6;break;case 1:d=2,c=6,u=5;break;case 2:d=4,c=7,u=4;break;default:break}if(c>0)for(let h=0;h<c;++h)s[l++]=a<<d+h*u>>(c-1)*u+d}let p=new Int32Array(l);for(f=0;f<l;++f)p[f]=s[f];return p}function zA(t,e,n,i){if(t.byteLength%64!==0)throw new Error("[Steim2] Data length is not a multiple of 64: "+t.byteLength);let r=[],o,s=t.byteLength/64,a=0,l=0,c,u=0,d=0,f,p;for(f=0;f<s;++f)for(o=HA(t,f*64,n),u=0,f||(d=i,l=o[1],c=o[2],u=3,i||(d=l-o[3])),p=u;p<o.length&&a<e;++p)r[a]=d+o[p],d=r[a],++a;if(a!==e)throw Error("[Steim2] Sample count does not match: "+a+" != "+e);if(c!==r[e-1])throw new Error("[Steim2] CRC error: "+r[e-1]+" != "+c);return r}function WA(t,e,n,i){let r=[];if(!n)return r;let o=0,s;switch(t){case Ai.INT16:case Ai.DWWSSN:if(e.byteLength<2*n)throw Error("[mseed] Inconsistent int16 sample count: "+n+" != "+e.byteLength/2);for(s=0;s<n;++s,o+=2)r[s]=e.getInt16(o,i);break;case Ai.INT32:if(e.byteLength<4*n)throw Error("[mseed] Inconsistent int32 sample count: "+n+" != "+e.byteLength/4);for(s=0;s<n;++s,o+=4)r[s]=e.getInt32(o,i);break;case Ai.FLOAT32:if(e.byteLength<4*n)throw Error("[mseed] Inconsistent float sample count: "+n+" != "+e.byteLength/4);for(s=0;s<n;++s,o+=4)r[s]=e.getFloat32(o,i);break;case Ai.FLOAT64:if(e.byteLength<8*n)throw Error("[mseed] Inconsistent double sample count: "+n+" != "+e.byteLength/8);for(s=0;s<n;++s,o+=8)r[s]=e.getFloat64(o,i);break;case Ai.STEIM1:r=$A(e,n,i,0);break;case Ai.STEIM2:r=zA(e,n,i,0);break;default:throw new Error("[mseed] Invalid encoding type: "+t)}return r}function eC(t){return t.year>=1960&&t.year<=2055}function Xs(t,e,n){let i="";for(let r=e;r<e+n;++r){let o=t.getUint8(r);o>31&&(i+=String.fromCharCode(o))}return i.trim()}var cu=class{constructor(e,n,i){i=!!i,this.length=10,this.year=e.getInt16(n,i),this.jday=e.getInt16(n+2,i),this.hour=e.getInt8(n+4),this.min=e.getInt8(n+5),this.sec=e.getInt8(n+6),this.usec=e.getInt16(n+8,i)*100}toDate(){return new Date(Date.UTC(this.year,0,this.jday,this.hour,this.min,this.sec,this.usec/1e3))}toDouble(){return this.toDate().getTime()+this.usec%1e3*.001}},Yp=class{constructor(e,n,i,r){this.type=e.getUint16(n,r),this.body=new DataView(e.buffer,e.byteOffset+n,i)}},uu=class extends An{constructor(){super()}read(e){this.seq=Xs(e,0,6),this.typeCode=e.getUint8(6),this.continuationCode=e.getUint8(7),this.sta=Xs(e,8,5),this.loc=Xs(e,13,2),this.cha=Xs(e,15,3),this.net=Xs(e,18,2);let n;n=new cu(e,20);let i=!eC(n);if(i&&(n=new cu(e,20,i)),!eC(n))throw new Error("[mseed] invalid start time");let r=e.getInt16(32,i),o=e.getInt16(34,i);this.nsamp=e.getInt16(30,i),this.srateNum=0,this.srateDen=1,r>0&&o>0&&(this.srateNum=r*o,this.srateDen=1),r>0&&o<0&&(this.srateNum=r,this.srateDen=-o),r<0&&o>0&&(this.srateNum=o,this.srateDen=-r),r<0&&o<0&&(this.srateNum=1,this.srateDen=r*o),this.activityFlags=e.getUint8(36),this.ioFlags=e.getUint8(37),this.dqFlags=e.getUint8(38),this.tq=-1;let s=e.getUint8(39);this.timeCorrection=e.getInt32(40,i);let a=e.getUint16(44,i),l=e.getUint16(46,i);this.recordSize=4096;for(let c=0;c<s;++c){let u=e.getUint16(l+2,i);u===0&&(u=a),u===0&&(u=l);let d=new Yp(e,l,u-l);l=u,d.type===1e3?(this.recordSize=1<<d.body.getUint8(6),this.encoding=d.body.getUint8(4),this.littleEndian=d.body.getUint8(5)===0):d.type===1001&&(n.usec+=e.getInt8(5),this.tq=e.getUint8(6))}this.stime=n.toDouble(),this.etime=this.stime+1e3*this.nsamp*this.srateDen/this.srateNum,this.raw=new DataView(e.buffer,e.byteOffset+a,this.recordSize-a),this.samples=WA(this.encoding,this.raw,this.nsamp,this.littleEndian)}saveSpace(){this.raw=void 0}};var tC=function(t){return t[t.INT8=0]="INT8",t[t.INT16=1]="INT16",t[t.INT32=2]="INT32",t[t.INT64=3]="INT64",t[t.FLOAT32=4]="FLOAT32",t[t.FLOAT64=5]="FLOAT64",t}(tC||{}),Ue=(()=>{let e=class e extends An{constructor(){super()}read(i,r=e.Format.FLOAT32){let o=i.getInt32(4,!0)<<32|i.getInt32(0,!0),s=i.getInt32(8,!0);throw console.log(o,s),Error("Boom!")}};e.Format=tC;let t=e;return t})();var du=class{},fu=class{constructor(){this.channels=new Array}},Zp=class{constructor(e,n,i){this.sid=e,this.stime=n,this.etime=i}nslc(){return this.sid.split(".")}};function Ks(t){return t<10?"0"+t:t}function nC(t){let e=new Date(t);return e.getUTCFullYear()+","+Ks(e.getUTCMonth()+1)+","+Ks(e.getUTCDate())+","+Ks(e.getUTCHours())+","+Ks(e.getUTCMinutes())+","+Ks(e.getUTCSeconds())}function rC(t){if(t.slice(0,5)!=="ws://"&&t.slice(0,6)!=="wss://"){let e=window.location.pathname,n=e.lastIndexOf("/");n!==-1?e=e.substr(0,n+1):e="/",e+=t,t=window.location.host+e,window.location.protocol==="https:"?t="wss://"+t:t="ws://"+t}return t}var hr=[];hr[Ue.Format.INT8]=1;hr[Ue.Format.INT16]=2;hr[Ue.Format.INT32]=4;hr[Ue.Format.INT64]=8;hr[Ue.Format.FLOAT32]=4;hr[Ue.Format.FLOAT64]=8;function bo(t,e,n,i=Ue.Format.FLOAT32){let r=t.getInt32(4,!0)<<32|t.getInt32(0,!0),o=t.getUint32(8,!0),s=new Ue,a=n.SID.split(".");if(a.length!=4)return;s.net=a[0],s.sta=a[1],s.loc=a[2],s.cha=a[3],s.srateNum=n.SFREQ,s.srateDen=n.SFREQDIV,s.stime=r*1e3+o/1e3;let l=hr[i],c=(e-12)/l,u=new Array(c),d=12;switch(i){case Ue.Format.INT8:for(let f=0;f<c;++f,d+=l)u[f]=t.getInt8(d);break;case Ue.Format.INT16:for(let f=0;f<c;++f,d+=l)u[f]=t.getInt16(d,!0);break;case Ue.Format.INT32:for(let f=0;f<c;++f,d+=l)u[f]=t.getInt32(d,!0);break;case Ue.Format.FLOAT32:for(let f=0;f<c;++f,d+=l)u[f]=t.getFloat32(d,!0);break;case Ue.Format.FLOAT64:for(let f=0;f<c;++f,d+=l)u[f]=t.getFloat64(d,!0);break;default:throw Error("Unpack RawRecord: unsupported element type")}return s.setData(u),s}function iC(t,e,n,i,r,o,s,a){t=rC(t);let l=Zs(t);return t=l.protocol+"//"+l.hostname,l.port&&(t+=":"+l.port),t+=l.pathname,new z(c=>{let u=!0;if(!t.length){c.error("URL must not be empty");return}let d=new Map,f=new WebSocket(t,"caps"),p=0;return f.binaryType="arraybuffer",f.onopen=function(){if(f.protocol!=="caps"){f.close(),c.error("Wrong server protocol");return}f.send("hello")},f.onmessage=function(h){if(p===0){if(++p,l.username){let T="auth ";T+=l.username,l.password&&(T+=" "+l.password),f.send(T)}let g=`begin request
`;if(r)for(let T in r)g+=T+" "+r[T]+`
`;let _=!1,y=!1,M=!1,A=!1;for(let T of e.channels){g+=n+" add "+T.selector;let N=T.startTime?T.startTime:e.startTime,X=T.endTime?T.endTime:e.endTime;(o||s)&&(g+=" bandpass ",o&&(g+=o+""),g+=":",s&&(g+=s+"")),a&&a>0&&(g+=" itaper "+a),g+=`
`,g+="time ",N&&(g+=nC(N)),g+=":",X&&(g+=nC(X)),g+=`
`,T.tolerance?(g+="tolerance ",g+=T.tolerance,g+=`
`,y=!0,_=!1):y?(e.tolerance?(g+="tolerance ",g+=e.tolerance,g+=`
`):g+=`tolerance default
`,_=!0,y=!1):_||e.tolerance&&(g+="tolerance ",g+=e.tolerance,g+=`
`,_=!0),T.resolution?(g+="resolution ",g+=T.resolution,g+=`
`,A=!0,M=!1):A?(e.resolution?(g+="resolution ",g+=e.resolution,g+=`
`):g+=`resolution default
`,M=!0,A=!1):M||e.resolution&&(g+="resolution ",g+=e.resolution,g+=`
`,M=!0)}g+="end",f.send(g)}else if(h.data instanceof ArrayBuffer){let g=new DataView(h.data),_=h.data.byteLength,y=0;for(;u&&y<_;){let M=g.getInt16(y,!0),A=g.getInt32(y+2,!0);y+=6;let T=d.get(M);if(!T){y+=A;continue}let N=new DataView(h.data,y);try{i(c,N,T,A)}catch(X){f.close(),c.error(X.toString())}y+=A}y!==_&&console.error("CAPS: Inconsistent")}else{let g=JSON.parse(h.data);g.REQUESTS&&g.REQUESTS.ID>0?g.REQUESTS.FMT==="HELI"?(g.REQUESTS.format=1,d.set(g.REQUESTS.ID,g.REQUESTS)):g.REQUESTS.FMT==="MSEED"?(g.REQUESTS.format=2,d.set(g.REQUESTS.ID,g.REQUESTS)):g.REQUESTS.FMT==="SEGMENT"?(g.REQUESTS.format=3,d.set(g.REQUESTS.ID,g.REQUESTS)):g.REQUESTS.FMT==="GAP"?(g.REQUESTS.format=4,d.set(g.REQUESTS.ID,g.REQUESTS)):g.REQUESTS.FMT.substr(0,4)==="RAW/"&&(g.REQUESTS.FMT.substr(4)==="INT8"?(g.REQUESTS.format=5,d.set(g.REQUESTS.ID,g.REQUESTS)):g.REQUESTS.FMT.substr(4)==="INT16"?(g.REQUESTS.format=6,d.set(g.REQUESTS.ID,g.REQUESTS)):g.REQUESTS.FMT.substr(4)==="INT32"?(g.REQUESTS.format=7,d.set(g.REQUESTS.ID,g.REQUESTS)):g.REQUESTS.FMT.substr(4)==="INT64"?(g.REQUESTS.format=8,d.set(g.REQUESTS.ID,g.REQUESTS)):g.REQUESTS.FMT.substr(4)==="FLOAT"?(g.REQUESTS.format=9,d.set(g.REQUESTS.ID,g.REQUESTS)):g.REQUESTS.FMT.substr(4)==="DOUBLE"?(g.REQUESTS.format=10,d.set(g.REQUESTS.ID,g.REQUESTS)):console.error("Unsupported raw type:",g.REQUESTS.FMT.substr(4))):g.STATUS&&g.STATUS.MSG==="EOD"&&(d.clear(),f.send("bye"))}},f.onerror=function(h){let g;f.readyState===3?h.reason?g="Unable to connect to requested endpoint: "+h.reason:g="Unable to connect to requested endpoint":h.reason?g=h.reason:g="Error",h.code&&(g+=" ("+h.code+")"),c.error(g)},f.onclose=function(h){h.code===1006&&c.error("Disconnected"),c.complete()},()=>{f&&f.close(),u=!1}})}var Eo=(()=>{let e=class e{requestJSONData(i,r){i=rC(i);let o=Zs(i);return i=o.protocol+"//"+o.hostname,o.port&&(i+=":"+o.port),i+=o.pathname,new z(s=>{if(!i.length){s.error("URL must not be empty");return}let a=new WebSocket(i,"caps"),l=0;return a.binaryType="arraybuffer",a.onopen=function(){if(a.protocol!=="caps"){a.close(),s.error("Wrong server protocol");return}if(o.username){let c="auth ";c+=o.username,o.password&&(c+=" "+o.password),a.send(c)}a.send(r)},a.onmessage=function(c){l===0?(++l,s.next(JSON.parse(c.data)),a.send("bye")):console.error("Unexpected result")},a.onerror=function(c){let u;a.readyState===3?c.reason?u="Unable to connect to requested endpoint: "+c.reason:u="Unable to connect to requested endpoint":c.reason?u=c.reason:u="Error",c.code&&(u+=" ("+c.code+")"),s.error(u)},a.onclose=function(c){c.code!==1e3&&(c.reason?s.error(c.reason):s.error(c.code)),s.complete()},()=>{a&&a.close()}})}requestRecordData(i,r,o,s,a,l,c){return iC(i,r,o,(u,d,f,p)=>{let h;switch(f.format){case 1:{let g=p/24;if(g<=0)return;h=new An,h.srateNum=f.SFREQ*2,h.srateDen=f.SFREQDIV;let _=0,y=h.srateDen/h.srateNum*1e3,M=y*1.5,A=d.getFloat64(_,!0)*1e3,T=f.SID.split(".");if(T.length!=4)return;h.net=T[0],h.sta=T[1],h.loc=T[2],h.cha=T[3],h.stime=A;let N=new Array(g*2),X=0;N[X]=d.getFloat64(_+8,!0),N[X+1]=d.getFloat64(_+16,!0),X+=2,_+=24;let $=A;for(let fe=1;fe<g;++fe,_+=24,X+=2){if(A=d.getFloat64(_,!0)*1e3,A-($+y)>M){N.length=X,h.setData(N),u.next(h);let we=new An;we.stime=A,we.srateNum=h.srateNum,we.srateDen=h.srateDen,we.net=h.net,we.sta=h.sta,we.loc=h.loc,we.cha=h.cha,X=0,N=new Array((g-fe)*2),h=we}$=A,N[X]=d.getFloat64(_+8,!0),N[X+1]=d.getFloat64(_+16,!0)}h.setData(N);break}case 2:{let g=new uu;g.read(d),g.saveSpace(),h=g;break}case 5:{h=bo(d,p,f,Ue.Format.INT8);break}case 6:{h=bo(d,p,f,Ue.Format.INT16);break}case 7:{h=bo(d,p,f,Ue.Format.INT32);break}case 8:{h=bo(d,p,f,Ue.Format.INT64);break}case 9:{h=bo(d,p,f,Ue.Format.FLOAT32);break}case 10:{h=bo(d,p,f,Ue.Format.FLOAT64);break}default:break}h&&u.next(h)},s,a,l,c)}requestSegmentData(i,r,o){return iC(i,r,"stream",(s,a,l,c)=>{switch(l.format){case 3:case 4:{let u=c/24;if(u<=0)return;let d=0;for(let f=0;f<u;++f,d+=24){let p=Number(a.getBigInt64(d,!0))*1e3+a.getInt32(d+8,!0)*.001,h=Number(a.getBigInt64(d+12,!0))*1e3+a.getInt32(d+20,!0)*.001;s.next(new Zp(l.SID,p,h))}break}default:break}},o)}getServerInfo(i,r){let o="info server";return r&&(o+=" modified after ",o+=r),this.requestJSONData(i,o)}getStreamInfo(i,r){let o="info streams";return r&&(o+=" "+r),this.requestJSONData(i,o)}getHeliData(i,r,o,s,a){return this.requestRecordData(i,r,"heli",void 0,o,s,a)}getChannelData(i,r){let o={};return r.realtime!=null&&(o.REALTIME=r.realtime?"ON":"OFF"),this.requestRecordData(i,r,"stream",o)}getSegments(i,r){return this.requestSegmentData(i,r,{SEGMENTS:"ON"})}getGaps(i,r){return this.requestSegmentData(i,r,{GAPS:"ON"})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function yt(t,e){if(e==null)return;let n=e.length,i=0;if(n){for(t.length>0&&t[t.length-1][0]==e[0][0]&&(i=1);i<n;++i)t.push(e[i]);t.length>1e3&&t.splice(0,t.length-1e3)}}var So=(()=>{let e=class e{constructor(i,r){this._caps=i,this._settings=r}getStreamData(){return this._streamData?B(this._streamData):this._caps.getStreamInfo(this._settings.capsURL()).pipe(W(i=>{this._streamData=new lu,this._streamData.timestamp=new Date().getTime();for(let r in i.STREAMS){if(!i.STREAMS.hasOwnProperty(r))continue;let o=i.STREAMS[r],s=r.split("."),a=o[0],l=o[1],c=this._streamData.lookup.get(s[0]);c||(c=new au(s[0],a,l,this._streamData),this._streamData.addNetwork(c));let u=c.lookup.get(s[1]);u||(u=new su(s[1],a,l,c,this._streamData),c.addStation(u));let d=u.lookup.get(s[2]);d||(d=new ou(s[2],a,l,u,this._streamData),u.addLocation(d));let f=d.lookup.get(s[3]);f||(f=new oi(s[3],a,l,d,this._streamData),d.addChannel(f),this._streamData.addChannel(f)),d.extend(f),u.extend(d),c.extend(u)}for(let r of this._streamData.networks)this._streamData.start?r.start<this._streamData.start&&(this._streamData.start=r.start):this._streamData.start=r.start,this._streamData.end?r.end>this._streamData.end&&(this._streamData.end=r.end):this._streamData.end=r.end;return this._streamData}))}invalidateStreamDataCache(){this._streamData=void 0}getStatusData(){if(this._statData){let i=this._statData.caps.stats.modified?.join(",");return this._caps.getServerInfo(this._settings.capsURL(),i).pipe(W(r=>{if(this._statData)if(this._statData.caps.version=r.caps.version,this._statData.caps.stats.timestamp=r.caps.stats.timestamp,this._statData.caps.stats.modified=r.caps.stats.modified,this._statData.caps.stats.current=r.caps.stats.current,i){yt(this._statData.caps.stats.series.duppkg,r.caps.stats.series.duppkg),yt(this._statData.caps.stats.series.failpkg,r.caps.stats.series.failpkg),yt(this._statData.caps.stats.series.notpkgt,r.caps.stats.series.notpkgt),yt(this._statData.caps.stats.series.rcvb,r.caps.stats.series.rcvb),yt(this._statData.caps.stats.series.rcvhb,r.caps.stats.series.rcvhb),yt(this._statData.caps.stats.series.rcvpkg,r.caps.stats.series.rcvpkg),yt(this._statData.caps.stats.series.savb,r.caps.stats.series.savb),yt(this._statData.caps.stats.series.savpkg,r.caps.stats.series.savpkg),yt(this._statData.caps.stats.series.savpkgt,r.caps.stats.series.savpkgt),yt(this._statData.caps.stats.series.seekpkgt,r.caps.stats.series.seekpkgt),yt(this._statData.caps.stats.series.wrtpkgt,r.caps.stats.series.wrtpkgt),yt(this._statData.caps.stats.series.q,r.caps.stats.series.q);for(let o=0;o<r.caps.stats.series.connections.length;++o)yt(this._statData.caps.stats.series.connections[o][1][0],r.caps.stats.series.connections[o][1][0]),yt(this._statData.caps.stats.series.connections[o][1][1],r.caps.stats.series.connections[o][1][1]),yt(this._statData.caps.stats.series.connections[o][1][2],r.caps.stats.series.connections[o][1][2])}else this._statData.caps.stats.series=r.caps.stats.series;else this._statData=r;return this._statData}))}else return this._caps.getServerInfo(this._settings.capsURL()).pipe(W(i=>(this._statData=i,this._statData)))}invalidateStatDataCache(){this._statData=void 0}};e.\u0275fac=function(r){return new(r||e)(O(Eo),O(Je))},e.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Io=(()=>{let e=class e{constructor(i){this._date=i}transform(i,r,o){let s;return i instanceof Date?s=this._date.toString(i,r,o):s=this._date.toString(new Date(i),r,o),o&&(s+=" UTC"),s}};e.\u0275fac=function(r){return new(r||e)(D(kn,16))},e.\u0275pipe=nr({name:"gmdate",type:e,pure:!0,standalone:!1});let t=e;return t})();var To=(()=>{let e=class e{constructor(i){this._gmdate=i}lastUpdated(i){let r=document.getElementById("_lastUpdated");r&&(r.innerHTML="| Last updated: "+this._gmdate.transform(i,"%Y-%m-%d %H:%M:%S"))}noUpdate(){let i=document.getElementById("_lastUpdated");i&&(i.innerHTML="")}};e.\u0275fac=function(r){return new(r||e)(O(Io))},e.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var hu=class{static draw(e){let n=e.length,i=Math.floor(n*Math.random());return e[i]}};var pu=(()=>{let e=class e{constructor(){this.tryagain=new ie,this.draw=()=>hu.draw(["fa-ufo-beam","fa-cat-space","fa-duck","fa-squirrel","fa-meh-rolling-eyes","fa-grin-beam-sweat","fa-surprise","fa-ghost","fa-volcano"]),this.c=this.draw()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=oe({type:e,selectors:[["app-error-message"]],inputs:{msg:"msg"},outputs:{tryagain:"tryagain"},standalone:!1,decls:11,vars:2,consts:[[1,"warning","message","box"],[1,"icon","far","fa-fw",3,"ngClass"],[1,"content"],[1,"title"],[1,"description"],[1,"icon","button",3,"click"],[1,"icon","fas","fa-fw","fa-redo"]],template:function(r,o){r&1&&(m(0,"div",0),I(1,"i",1),m(2,"div",2)(3,"div",3),C(4," Sorry, an error occurred! "),v(),m(5,"div",4)(6,"p"),C(7),v(),m(8,"a",5),k("click",function(){return o.tryagain.emit()}),I(9,"i",6),C(10," Try again "),v()()()()),r&2&&(w(),V("ngClass",o.c),w(6),_e(" ",o.msg," "))},dependencies:[Rt],encapsulation:2});let t=e;return t})();var gu=(()=>{let e=class e{transform(i,...r){let o=["B","KB","MB","GB","TB","PB"],s=Math.floor(i.toString().length/3);return(i/Math.pow(10,s*3)).toFixed(2)+" "+o[s]}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=nr({name:"capacity",type:e,pure:!0,standalone:!1});let t=e;return t})();function qA(t,e){if(t&1){let n=Me();m(0,"app-error-message",3),k("tryagain",function(){j(n);let r=E();return U(r.updateStats())}),v()}if(t&2){let n=E();V("msg",n.request.errorMessage)}}function QA(t,e){t&1&&(m(0,"span"),I(1,"i",21),v())}function YA(t,e){t&1&&(m(0,"span"),I(1,"i",21),v())}function ZA(t,e){if(t&1&&(m(0,"tr")(1,"td"),C(2),v(),m(3,"td"),C(4),v()()),t&2){let n=e.$implicit;w(2),he(n[0]),w(2),he(n[1][2])}}function XA(t,e){if(t&1&&(m(0,"div",6)(1,"table",15)(2,"thead")(3,"tr")(4,"th",16),ue(5,QA,2,0,"span"),C(6," Traffic "),v()()(),m(7,"tbody")(8,"tr")(9,"td"),C(10,"Current upload rate"),v(),m(11,"td"),C(12),xt(13,"capacity"),v()(),m(14,"tr",17)(15,"td"),C(16,"Current upload load"),v(),m(17,"td"),C(18),v()(),m(19,"tr")(20,"td"),C(21,"Received bytes from plugins"),v(),m(22,"td"),C(23),xt(24,"capacity"),v()(),m(25,"tr")(26,"td"),C(27,"Received header bytes from plugins"),v(),m(28,"td"),C(29),xt(30,"capacity"),v()(),m(31,"tr")(32,"td"),C(33,"Received packages"),v(),m(34,"td"),C(35),v()(),m(36,"tr",18)(37,"td"),C(38,"Saved Packages"),v(),m(39,"td"),C(40),v()(),m(41,"tr",19)(42,"td"),C(43,"Duplicate Packages"),v(),m(44,"td"),C(45),v()(),m(46,"tr",20)(47,"td"),C(48,"Failed Packages"),v(),m(49,"td"),C(50),v()()(),m(51,"thead")(52,"tr")(53,"th",16),ue(54,YA,2,0,"span"),C(55," Connections "),v()()(),m(56,"tbody"),ze(57,ZA,5,2,"tr",null,gt),v(),m(59,"thead")(60,"tr")(61,"th",16),C(62,"Files"),v()()(),m(63,"tbody")(64,"tr")(65,"td"),C(66,"Tracked"),v(),m(67,"td"),C(68),v()(),m(69,"tr")(70,"td"),C(71,"Open"),v(),m(72,"td"),C(73),v()(),m(74,"tr")(75,"td"),C(76,"Cached"),v(),m(77,"td"),C(78),v()(),m(79,"tr")(80,"td"),C(81,"Cache performance"),v(),m(82,"td"),C(83),v()(),m(84,"tr")(85,"td"),C(86,"Concurrency"),v(),m(87,"td"),C(88),v()()()()()),t&2){let n=E(2);w(5),Y(n.request.running||!n.data?5:-1),w(7),_e("",Zn(13,15,n.data.caps.stats.series.rcvb[n.data.caps.stats.series.rcvb.length-1][1]),"/s"),w(6),_e(" ",(n.data.caps.stats.series.savpkg[n.data.caps.stats.series.savpkg.length-1][1]*n.data.caps.stats.series.savpkgt[n.data.caps.stats.series.savpkgt.length-1][1]*1e-4/n.data.caps.stats.current.pool.concurrency).toFixed(2)," % "),w(5),he(Zn(24,17,n.data.caps.stats.current.rcvb)),w(6),he(Zn(30,19,n.data.caps.stats.current.rcvhb)),w(6),he(n.data.caps.stats.current.rcvpkg),w(5),he(n.data.caps.stats.current.savpkg),w(5),he(n.data.caps.stats.current.duppkg),w(5),he(n.data.caps.stats.current.failpkg),w(4),Y(n.request.running||!n.data?54:-1),w(3),We(n.data.caps.stats.current.connections),w(11),he(n.data.caps.stats.current.pool.ftracked),w(5),he(n.data.caps.stats.current.pool.fopen),w(5),he(n.data.caps.stats.current.pool.fcached),w(5),_e("",(n.data.caps.stats.current.pool.perfcache==null?null:n.data.caps.stats.current.pool.perfcache.toFixed(2))||"-"," %"),w(5),he(n.data.caps.stats.current.pool.concurrency.toFixed(0))}}function KA(t,e){if(t&1&&I(0,"app-plot",11),t&2){let n=e.$implicit,i=E(2);V("ngClass",n.visible?"expanding":"")("data",n)("optionsChanged",n.options?n.options:i.plotOptions$)}}function JA(t,e){if(t&1){let n=Me();m(0,"div",2)(1,"div",4)(2,"div",5),ue(3,XA,89,21,"div",6),v(),m(4,"div",7)(5,"div",8)(6,"div",9)(7,"div",10),ze(8,KA,1,3,"app-plot",11,gt),v()(),m(10,"time-scale-widget",12,0),k("rangeChange",function(r){j(n);let o=_i(11);return E().rangeChanged(r),U(o.redraw())})("gridChange",function(r){j(n);let o=E();return U(o.gridChanged(r))}),v(),m(12,"div",13)(13,"i",14),k("click",function(){j(n);let r=E();return U(r.toggleTimeScale())}),v()()()()()()}if(t&2){let n=E();w(3),Y(n.data?3:-1),w(5),We(n.plots),w(2),V("fixedRange",!0)("utc",n.dateService.utc)("range$",n.timeRange$),w(3),V("ngClass",n.manualTimeScale?"fa-lock":"fa-unlock")}}var kt=[[237,194,64],[175,216,248],[203,75,75],[77,167,77]];function eN(t){let e=["","K","M","G","T","P","E","Z"],n=t.toFixed(0).length-1;t<0&&--n;let i=Math.floor(n/3),r=t/Math.pow(10,i*3),o;return r<10?o=r.toFixed(2):r<100?o=r.toFixed(1):o=r.toFixed(0),o+" "+e[i]}function tN(t){let e=["","m","\u03BC","n","p","f"],n=Math.log10(t)-6,i=0;n<0&&(i=Math.floor((Math.ceil(-n)+2)/3),i>=e.length&&(i=e.length-1));let r=t*Math.pow(10,i*3-6),o;return r<10?o=r.toFixed(2):r<100?o=r.toFixed(1):o=r.toFixed(0),o+" "+e[i]}function Jp(t,e,n,i,r){let o=i*1.5*1e3,s=0,a=0,l=e.length;for(a=1;a<l;++a){let c=e[a][0]-(e[a-1][0]+i*1e3);Math.abs(c)>o&&(t.push(new r(e.slice(s,a),n)),s=a)}s>0?t.push(new r(e.slice(s,l),n)):t.push(new r(e,n))}function on(t,e,n,i){let r=n.join(","),o=[e,"rgb("+r+")"];t.labels.push(o),Jp(t.graphs,i,{strokeStyle:o[1],fillStyle:"rgba("+r+",0.25)",lineWidth:2},10,so)}var lC=(()=>{let e=class e{constructor(i,r,o,s){this.dateService=i,this.dataprovider=r,this._lastUpdated=o,this._settingsService=s,this.request=new rn,this._timeRange={min:new Date().getTime()-6e4,max:new Date().getTime()},this.timeRange$=new ve(this._timeRange),this._xAxis={log:!1,range:[void 0,void 0],visible:!1},this._yAxis={log:!1,range:[0,void 0],visible:!0,dimension:70,tickTransform:eN},this._yAxisUs={log:!1,range:[0,void 0],visible:!0,dimension:70,tickTransform:tN},this._plotOptions={xAxis:this._xAxis,yAxis:this._yAxis},this._plotOptionsUs={xAxis:this._xAxis,yAxis:this._yAxisUs},this.plotOptions$=new ve(this._plotOptions),this.plotOptionsUs$=new ve(this._plotOptionsUs),this.bytePlot=new ri("Bytes per second","PlotBytes"),this.packagePlot=new ri("Packages per second","PlotPackages"),this.packageTimePlot=new ri("Storage time per package in seconds","PlotStorageTime",this.plotOptionsUs$),this.conEstablished=new ri("Established connections per second","PlotConsEstablished"),this.conClosed=new ri("Closed connections per second","PlotConsClosed"),this.conStanding=new ri("Absolute standing connections","PlotConsStanding"),this.plots=[this.bytePlot,this.packagePlot,this.packageTimePlot,this.conEstablished,this.conClosed,this.conStanding],this.manualTimeScale=!1,this._ngUnsubscribe=new H}updateStats(){this.request.setRunning(),this.dataprovider.getStatusData().pipe(Ee(this._ngUnsubscribe)).subscribe({next:i=>{if(this.data=i,this.request.setNone(),this._lastUpdated.lastUpdated(i.caps.stats.timestamp),!this.data.caps.stats.series.rcvb.length)this.data=void 0;else{this.bytePlot.clear();try{this.data.caps.stats.current.pool.concurrency==null&&(this.data.caps.stats.current.pool.concurrency=1)}catch{}on(this.bytePlot,"Received bytes/s",kt[0],this.data.caps.stats.series.rcvb),on(this.bytePlot,"Written bytes/s",kt[1],this.data.caps.stats.series.savb),on(this.bytePlot,"Received header bytes/s",kt[2],this.data.caps.stats.series.rcvhb),this.packagePlot.clear(),on(this.packagePlot,"Received packages/s",kt[0],this.data.caps.stats.series.rcvpkg),on(this.packagePlot,"Written packages/s",kt[1],this.data.caps.stats.series.savpkg),on(this.packagePlot,"Failed packages/s",kt[2],this.data.caps.stats.series.failpkg),on(this.packagePlot,"Duplicate packages/s",kt[3],this.data.caps.stats.series.duppkg),this.packageTimePlot.clear(),on(this.packageTimePlot,"User",kt[0],this.data.caps.stats.series.savpkgt),on(this.packageTimePlot,"Seek",kt[2],this.data.caps.stats.series.seekpkgt),on(this.packageTimePlot,"Write",kt[1],this.data.caps.stats.series.wrtpkgt),on(this.packageTimePlot,"Notifications",kt[3],this.data.caps.stats.series.notpkgt),this.conEstablished.clear();let r=0;for(let o of this.data.caps.stats.series.connections)on(this.conEstablished,o[0],kt[r],o[1][0]),++r;this.conClosed.clear(),r=0;for(let o of this.data.caps.stats.series.connections){let s=kt[r],a=[o[0],"rgb("+s.join(",")+")"];this.conClosed.labels.push(a),Jp(this.conClosed.graphs,o[1][1],{strokeStyle:a[1],fillStyle:"rgba("+s.join(",")+",0.25)",lineWidth:2},10,so),++r}this.conStanding.clear(),r=0;for(let o of this.data.caps.stats.series.connections){let s=kt[r],a=[o[0],"rgb("+s.join(",")+")"];this.conStanding.labels.push(a),Jp(this.conStanding.graphs,o[1][2],{strokeStyle:a[1],fillStyle:"rgba("+s.join(",")+",0.25)",lineWidth:2},10,so),++r}}this.setDefaultTimeRange(),Gt(this._settingsService.settings.RefreshingInterval*1e3).pipe(Ee(this._ngUnsubscribe)).subscribe({next:()=>{this.updateStats()}})},error:i=>{this.request.setError(Do.format(i))}})}rangeChanged(i){this.manualTimeScale=!0,this.setTimeRange(i)}gridChanged(i){let r=i.drx[0]*1e3;this._plotOptions.xAxis.tickSpacing!=r&&(this._plotOptions.xAxis.tickSpacing=r,this.plotOptions$.next(this._plotOptions),this.plotOptionsUs$.next(this._plotOptionsUs))}setTimeRange(i){this._timeRange=i,this.timeRange$.next(this._timeRange),this._plotOptions.xAxis.range=[i.min,i.max],this.plotOptions$.next(this._plotOptions),this.plotOptionsUs$.next(this._plotOptionsUs)}setDefaultTimeRange(){!this.manualTimeScale&&this.data&&this.data.caps.stats.series.rcvb&&this.data.caps.stats.series.rcvb.length?this.setTimeRange(new Fe(this.data.caps.stats.series.rcvb[0][0],this.data.caps.stats.series.rcvb[this.data.caps.stats.series.rcvb.length-1][0])):this.setTimeRange(new Fe(this._timeRange.min,this._timeRange.max))}toggleTimeScale(){this.manualTimeScale=!this.manualTimeScale,this.setDefaultTimeRange()}ngOnInit(){this.updateStats(),this.setTimeRange(this._timeRange)}ngOnDestroy(){this._ngUnsubscribe.next(),this._ngUnsubscribe.complete()}};e.\u0275fac=function(r){return new(r||e)(D(kn),D(So),D(To),D(Je))},e.\u0275cmp=oe({type:e,selectors:[["app-overview"]],standalone:!1,decls:2,vars:2,consts:[["timeScale",""],[3,"msg"],[1,"left","right","attached","main","content","cover"],[3,"tryagain","msg"],[1,"horizontal","sm-vertical","guttered","nowrap","align-stretch","flex","layout","cover","scrollable"],[1,"equally","expanding"],[1,"top","bottom","attached","widget"],[1,"equally","expanding","widget","vertical","flex","layout","min-stretch-y"],[1,"expanding","content","vertical","flex","layout"],[1,"expanding","relative"],[1,"cover","scrollable","vertical","nowrap","flex","layout"],[3,"ngClass","data","optionsChanged"],[2,"margin-left","70px",3,"rangeChange","gridChange","fixedRange","utc","range$"],[1,"absolute",2,"right","0","top","0"],[1,"fas","fa-fw",3,"click","ngClass"],[1,"top","bottom","attached","striped","bordered","table"],["colspan","2"],["title","number of saved packages * storage time per package / concurrency"],[1,"success"],[1,"warning"],[1,"error"],[1,"pull-right","fas","fa-spin","fa-spinner"]],template:function(r,o){r&1&&ue(0,qA,1,1,"app-error-message",1)(1,JA,14,5,"div",2),r&2&&(Y(o.request.error?0:-1),w(),Y(o.request.error?-1:1))},dependencies:[Rt,Ii,pu,Jw,gu],encapsulation:2});let t=e;return t})();function nN(t,e){if(t&1&&(m(0,"div")(1,"div",2)(2,"div",3)(3,"div",4)(4,"h2",5),C(5),v()()(),m(6,"div",4),I(7,"img",6),v(),m(8,"div",4)(9,"p"),C(10),v(),m(11,"a",7),C(12,"Launch application"),v()()()()),t&2){let n=e.$implicit;w(5),he(n.title),w(2),oh("src","apps/",n.path,"/",n.preview,"",Pl),w(3),_e(" ",n.description," "),w(),Gl("href","apps/",n.path,"/",Pl)}}var cC=(()=>{let e=class e{constructor(i){this.config=i}};e.\u0275fac=function(r){return new(r||e)(D(wn))},e.\u0275cmp=oe({type:e,selectors:[["app-apps"]],standalone:!1,decls:4,vars:0,consts:[[1,"content","left","right","attached"],[1,"guttered","grid","w-40em"],[1,"center","widget","equally","expanding"],[1,"header"],[1,"content"],[1,"text-thin"],[1,"stretch-x",3,"src"],["target","_blank",1,"blue","button",3,"href"]],template:function(r,o){r&1&&(m(0,"div",0)(1,"div",1),ze(2,nN,13,7,"div",null,gt),v()()),r&2&&(w(2),We(o.config.apps))},encapsulation:2});let t=e;return t})();var uC=(()=>{let e=class e{constructor(i,r){this._lastUpdated=i,this._settingsService=r,this.settings=this._settingsService.settings}ngOnInit(){this._lastUpdated.noUpdate()}ngOnDestroy(){this._settingsService.save()}};e.\u0275fac=function(r){return new(r||e)(D(To),D(Je))},e.\u0275cmp=oe({type:e,selectors:[["app-settings"]],standalone:!1,decls:95,vars:9,consts:[[1,"widget"],[1,"header"],[1,"content"],[1,"table","striped","top","bottom","attached"],[1,"quarterwidth"],[3,"ngModelChange","ngModel"],["colspan","2",1,"help"],["type","password",3,"ngModelChange","ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],["type","number","min","1","max","300",3,"ngModelChange","ngModel"],["type","number","min","-1",3,"ngModelChange","ngModel"],["type","number","min","1",3,"ngModelChange","ngModel"],[1,"fas","fa-fw","fa-signal-stream"],[1,"fas","fa-fw","fa-eye"]],template:function(r,o){r&1&&(m(0,"div",0)(1,"div",1)(2,"div",2)(3,"strong"),C(4,"General"),v()()(),m(5,"table",3)(6,"tbody")(7,"tr")(8,"td",4),C(9," Username: "),v(),m(10,"td")(11,"input",5),Bt("ngModelChange",function(a){return Jt(o.settings.Username,a)||(o.settings.Username=a),a}),v()()(),m(12,"tr")(13,"td",6),C(14," An optional CAPS username. "),v()(),m(15,"tr")(16,"td"),C(17," Password: "),v(),m(18,"td")(19,"input",7),Bt("ngModelChange",function(a){return Jt(o.settings.Password,a)||(o.settings.Password=a),a}),v()()(),m(20,"tr")(21,"td",6),C(22," An optional CAPS password. This is mandatory if a username is given. "),v()(),m(23,"tr")(24,"td"),C(25," Use local time: "),v(),m(26,"td")(27,"input",8),Bt("ngModelChange",function(a){return Jt(o.settings.UseLocalTime,a)||(o.settings.UseLocalTime=a),a}),v()()()()()(),m(28,"div",0)(29,"div",1)(30,"div",2)(31,"strong"),C(32,"Overview"),v()()(),m(33,"table",3)(34,"tbody")(35,"tr")(36,"td",4),C(37," Refresh interval in seconds: "),v(),m(38,"td")(39,"input",9),Bt("ngModelChange",function(a){return Jt(o.settings.RefreshingInterval,a)||(o.settings.RefreshingInterval=a),a}),v()()()()()(),m(40,"div",0)(41,"div",1)(42,"div",2)(43,"strong"),C(44,"Channels"),v()()(),m(45,"table",3)(46,"tbody")(47,"tr")(48,"td",4),C(49," Segment continuation threshold (\xB5s): "),v(),m(50,"td")(51,"input",10),Bt("ngModelChange",function(a){return Jt(o.settings.SegmentThreshold,a)||(o.settings.SegmentThreshold=a),a}),v()()(),m(52,"tr")(53,"td",6),C(54," The maximum distance ("),m(55,"code"),C(56,"end(segment2) - start(segment1)"),v(),C(57,") of two data segments to consider them as one contiguous segment. Enter -1 to use the default (5000 \xB5s). "),v()(),m(58,"tr")(59,"td",4),C(60," Realtime data view time range in seconds: "),v(),m(61,"td")(62,"input",11),Bt("ngModelChange",function(a){return Jt(o.settings.RealtimeChannelViewInterval,a)||(o.settings.RealtimeChannelViewInterval=a),a}),v()()(),m(63,"tr")(64,"td",6),C(65," The real-time view ("),I(66,"i",12),C(67,") time span initially visualized. This is also the size of the buffer held in memory for real-time streaming. "),v()(),m(68,"tr")(69,"td"),C(70," Maximum data view time range in seconds: "),v(),m(71,"td")(72,"input",11),Bt("ngModelChange",function(a){return Jt(o.settings.MaxChannelViewIntervalSize,a)||(o.settings.MaxChannelViewIntervalSize=a),a}),v()()(),m(73,"tr")(74,"td",6),C(75," The maximum archive view ("),I(76,"i",13),C(77,") time span. This is also the maximum size of the waveform buffer held in memory. "),v()(),m(78,"tr")(79,"td"),C(80," Show legend: "),v(),m(81,"td")(82,"input",8),Bt("ngModelChange",function(a){return Jt(o.settings.ShowLegend,a)||(o.settings.ShowLegend=a),a}),v()()()()()(),m(83,"div",0)(84,"div",1)(85,"div",2)(86,"strong"),C(87,"Traceview"),v()()(),m(88,"table",3)(89,"tbody")(90,"tr")(91,"td",4),C(92," Maximum simultaneously loaded channels: "),v(),m(93,"td")(94,"input",11),Bt("ngModelChange",function(a){return Jt(o.settings.MaxSimultaneouslyChannelsLoaded,a)||(o.settings.MaxSimultaneouslyChannelsLoaded=a),a}),v()()()()()()),r&2&&(w(11),Ut("ngModel",o.settings.Username),w(8),Ut("ngModel",o.settings.Password),w(8),Ut("ngModel",o.settings.UseLocalTime),w(12),Ut("ngModel",o.settings.RefreshingInterval),w(12),Ut("ngModel",o.settings.SegmentThreshold),w(11),Ut("ngModel",o.settings.RealtimeChannelViewInterval),w(10),Ut("ngModel",o.settings.MaxChannelViewIntervalSize),w(10),Ut("ngModel",o.settings.ShowLegend),w(12),Ut("ngModel",o.settings.MaxSimultaneouslyChannelsLoaded))},dependencies:[Dc,Uh,Vh,bc,$h,Bh,Es],encapsulation:2});let t=e;return t})();var dt=class{static merge_and(e){if(e.length===0)return[];if(e.length===1)return e[0];let n=[];for(let o of e){if(o.length===0)return[];n.push(0)}let i=[];for(;;){let o,s;for(let a=0;a<e.length;++a){let c=e[a][n[a]][0];o?o[0]<c&&(o=[c,a]):o=[c,a]}for(let a=0;a<e.length;++a){let c=e[a][n[a]][1];s?s[0]>c&&(s=[c,a]):s=[c,a]}if(o&&s){if(r(e[o[1]][n[o[1]]],e[s[1]][n[s[1]]])&&i.push([o[0],s[0]]),++n[s[1]],n[s[1]]>=e[s[1]].length)return i}else return i}function r(o,s){return o[0]<s[1]&&o[1]>s[0]}}static merge_or(e){e.sort((n,i)=>n[0]<i[0]?-1:n[0]>i[0]?1:0);for(let n=1;n<e.length;n++)e[n][0]<=e[n-1][1]&&(e[n][1]>e[n-1][1]&&(e[n-1][1]=e[n][1]),e.splice(n,1),n--);return e}static abs(e){return e[1]-e[0]}static min(e,n){if(!this.ordered(e)||!this.ordered(n))return;let i=e[0],r=e[1];if(!(e[1]<n[0]||n[1]<e[0]))return e[0]<n[0]&&(i=n[0]),e[1]>n[1]&&(r=n[1]),[i,r]}static pad(e,n){return[e[0]-n,e[1]+n]}static equal(e,n){return e[0]===n[0]&&e[1]===n[1]}static contains(e,n){return e[0]<=n[0]&&n[1]<=e[1]}static ordered(e){return e[0]<=e[1]}};var Ot=class t{static regexp(e){let n="^"+e.replace(/\?/g,".").replace(/\*/g,".*")+"$";return new RegExp(n)}static search(e,n){return t.regexp(n).test(e)}static toPercent(e,n){return n==null?e*100+"%":n===0?Math.floor(e*100)+"%":(e*100).toFixed(n)+"%"}static stringReplaceAll(e,n,i){if(e===n)return i;let r=e.indexOf(n);for(;r!==-1;)e=e.replace(n,i),r=e.indexOf(n);return e}static deepCopy(e){return JSON.parse(JSON.stringify(e))}};var Js=class t{static computeAvailabilityPercent(e,n){return Ot.toPercent(t.computeAvailability(e,n),2)}static computeAvailability(e,n){if(!n)return 0;let i=[...n];for(let s=0;s<i.length;s++){let a=dt.min(e,i[s]);a?i[s]=a:(i.splice(s,1),s--)}let r=dt.merge_or(i),o=0;for(let s of r)o+=dt.abs(s);return o/dt.abs(e)}};var mu=class{constructor(e){this.batch=[],this.flatNodes=[],this.data=e}dispense(e,n){if(e<0||e>this.data.length-1){this.flatNodes=[],this.batch=[];return}e+n>this.data.length-1&&(n=this.data.length-e),this.last=[e,n],this.serve(this.data,e,n)}dispenseLikeBefore(){this.last&&this.dispense(this.last[0],this.last[1])}serve(e,n,i){this.batch=e.slice(n,n+i),this.flatNodes=[];for(let r of this.batch)r.flatten(this.flatNodes)}};var vu=class{constructor(e,n,i,r){this._updates$=new H,this._vpHeight=e,this._indivHeight=n,this._totalHeight=i*n,this._vpRef=r,this._vpRef&&(this._resizeObs=new ResizeObserver(o=>{for(let s of o)if(s.target===this._vpRef.nativeElement){let a=window.getComputedStyle(this._vpRef.nativeElement);this._vpHeight=parseInt(a.height.slice(0,-2)),this.fromLastScroll()}})),this._resizeObs.observe(this._vpRef.nativeElement)}setNumIndiv(e){this._totalHeight=e*this._indivHeight}update(e){e>1&&(e=1),e<0&&(e=0);let n=Math.ceil(this._vpHeight/this._indivHeight),i=Math.floor(e*(this._totalHeight-this._vpHeight)/this._indivHeight),r=i+n+1,o=Math.floor(i*this._indivHeight),s=Math.floor(this._totalHeight-r*this._indivHeight);o<0&&(o=0),s<0&&(s=0),this._lastV=e,this._updates$.next({from:i,by:r-i,prePad:o,postPad:s})}fromLastScroll(){if(!this._lastV)return this.update(0);this.update(this._lastV)}asObservable(){return this._updates$.asObservable()}};var yu=class{update(e){if(!e)this._searchTokens=void 0;else{let n=e.split(".");this._searchTokens=new Array;for(let i of n)this._searchTokens.push(Ot.regexp(i))}}get tokens(){return this._searchTokens}};function eg(t){let e,n=[];for(let i of t){if(!i.segments)return;e?e=dt.min(e,i.segments.range):e=i.segments.range,n.push(i.segments.data)}if(e)return{range:e,data:dt.merge_and(n)}}var _u=class{static do(e){for(let n of e.networks){for(let i of n.stations){for(let r of i.locations)r.segments=eg(r.channels);i.segments=eg(i.locations)}n.segments=eg(n.stations)}}};var wu=class{constructor(e){this._updates$=new H,this._currPersp=e}getSubject(){return this._updates$}changePerspective(e){this._currPersp=e,this._updates$.next(this._currPersp)}nextPerspective(){this._currPersp==="list"?this.changePerspective("tree"):this._currPersp==="tree"&&this.changePerspective("list")}getCurrentPerspective(){return this._currPersp}};var Cu=class{constructor(e){this.sorted$=new H,this.config=e}sortTree(e,n){switch(this.config=n,n.parameter){case"code":e.sort((i,r)=>i.code.localeCompare(r.code)*n.descending,!1),e.channels.sort((i,r)=>i.id.localeCompare(r.id)*n.descending);break;case"start":e.sort((i,r)=>(i.start-r.start)*n.descending);break;case"end":e.sort((i,r)=>(i.end-r.end)*n.descending);break;case"avail":e.sort((i,r)=>!i.availability&&!r.availability?0:i.availability?r.availability?(i.availability-r.availability)*n.descending:n.descending:-n.descending);break;default:break}this.sorted$.next()}sortLikeBefore(e){this.sortTree(e,this.config)}passParameter(e,n){this.config.parameter===n?this.config.descending=this.config.descending*-1:this.config={parameter:n,descending:1},this.sortTree(e,this.config)}};var Du=class{constructor(){this._updates=new H,this._requestState=new rn}download(e,n,i,r,o){let s=new XMLHttpRequest;s.open("POST",i),s.responseType="blob",r&&s.setRequestHeader("Authorization","Basic "+btoa(r+":"+o));let a=new Date(n[0]).toISOString()+" "+new Date(n[1]).toISOString(),l="";for(let c of e){let u=c.parent.parent.parent.code+" "+c.parent.parent.code+" "+(c.parent.code?c.parent.code:"--")+" "+c.code;l+=u+" "+a+`
`}s.responseType="blob",s.onload=()=>{if(s.response.size>0){this._requestState.setNone(),this._updates.next(void 0);let c=document.createEvent("MouseEvents"),u=document.createElement("a");u.download="data.mseed",u.href=window.URL.createObjectURL(s.response),u.dataset.downloadurl=["application/vnd.fdsn.mseed",u.download,u.href].join(":"),c.initEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),u.dispatchEvent(c)}else this._requestState.setError(),this._updates.next({error:!0,message:"No Mini-SEED data"})},s.onerror=c=>{this._requestState.setError(),this._updates.next({error:!0,message:c+""})},this._requestState.setRunning(),s.send(l)}getSubject(){return this._updates}getStatus(){return this._requestState}};var bu=class{constructor(e){this.DayInMillis=864e5,this._v=e}get(){return this._v}set(e){this._v=e}setFromGRange(e){e.min&&e.max&&(this._v=[e.min,e.max])}changeDay(e){this._v=[e.getTime(),e.getTime()+this.DayInMillis]}shiftDay(e,n){if(!this._v)return;let i=this._v[0];n&&(i-=new Date().getTimezoneOffset()*60*1e3),i-=i%this.DayInMillis,n&&(i+=new Date().getTimezoneOffset()*60*1e3),i+=e*this.DayInMillis,this._v=[i,i+this.DayInMillis]}toGRange(){return new Fe(this._v?.[0],this._v?.[1])}};var Eu=class{constructor(e){this._waiting=[],this._stats$=new H,this._total=0,this._nexted=0,this._batchSize=e}setWaiting(e){this.clear();for(let n of e)this._waiting.push(n);this._total=this._waiting.length,this._nexted=0,this.notify()}clear(){this._waiting=[]}next(){let e=this._waiting.splice(0,this._batchSize);return this._nexted+=e.length,this.notify(),e}empty(){return this._waiting.length===0}get stats$(){return this._stats$}notify(){this._stats$.next({total:this._total,nexted:this._nexted})}};var dC=(()=>{let e=class e{constructor(i,r){this._settings=i,this._dataService=r,this._requestState=new rn,this._queue=new Eu(1e3),this._data$=new H,this._unsub$=new H}encourage(i,r,o){this._timerSubscription?.unsubscribe(),this._timerSubscription=Gt(500).subscribe({next:()=>{this.stop(),this._queue.setWaiting(o),this.popQueue(i,dt.pad(i,6e4),r)}})}stop(){this._queue.clear(),this._unsub$.next()}popQueue(i,r,o){if(!this._requestState.running){if(this._queue.empty()){this._requestState.setNone();return}this._requestState.setRunning(),this.requestSegments(r,o,this._settings.settings.SegmentThreshold,this._queue.next()).pipe(Ee(this._unsub$)).subscribe({next:s=>{this._data$.next({dict:s,range:i})},complete:()=>{this._requestState.setNone(),this.popQueue(i,r,o)},error:s=>{this._requestState.setError(s)}})}}get data$(){return this._data$}get status$(){return this._requestState.updates$}get queueStatus$(){return this._queue.stats$}requestSegments(i,r,o,s){return new z(a=>{let l={},c=new fu;c.channels=[],c.tolerance=o>=0?o:5e3,c.resolution=r;for(let d of s){let f=new du;f.selector=d,f.startTime=i[0],f.endTime=i[1],c.channels.push(f),l[d]=[]}let u=this._dataService.getSegments(this._settings.capsURL(),c).subscribe({next:d=>{l[d.sid].push([d.stime,d.etime])},complete:()=>{a.next(l),a.complete()},error:d=>{a.error(d)}});return()=>{u?.unsubscribe()}})}};e.\u0275fac=function(r){return new(r||e)(O(Je),O(Eo))},e.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var fC=(()=>{let e=class e{constructor(){this.active=!1}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Mo=function(t){return t[t.NORMAL=0]="NORMAL",t[t.INFO=1]="INFO",t[t.WARNING=2]="WARNING",t[t.ERROR=3]="ERROR",t[t.SUCCESS=4]="SUCCESS",t}(Mo||{});var Su=(()=>{let e=class e{constructor(){this._active=!0,this._backlog=new Array,this._backlogSize=100,this._data$=new H,this._dataObservable$=this._data$.asObservable(),this._cfg={timeout:5e3}}renderNotification(i,r,o,s){this._container||(this._container=document.createElement("div"),this._container.classList.add("notifications"),document.body.appendChild(this._container));let a=document.createElement("div");r&&a.classList.add(r),a.classList.add("notification"),a.classList.add("box"),s===void 0&&(s=this._cfg.timeout);let l=document.createElement("a");if(l.classList.add("close"),l.innerHTML="<i class='fas fa-times'></i>",o){let d=document.createElement("i");d.classList.add("fas"),d.classList.add("fa-"+o),a.append(d)}let c=document.createElement("div");if(c.classList.add("content"),i.title){let d=document.createElement("div");d.classList.add("title");let f=document.createElement("h4");f.innerHTML=i.title,d.append(f),c.append(d)}if(i.message){let d=document.createElement("div");d.classList.add("description"),d.innerHTML=i.message,c.append(d)}a.append(c),a.append(l);let u;s>0&&(u=setTimeout(()=>{a.classList.add("remove"),u=setTimeout(()=>{a.remove()},500)},s)),a.addEventListener("click",()=>{u&&clearTimeout(u),a.remove()}),this._container.append(a)}notify(i,r,o,s,a,l){let c={title:r,message:i,type:o,timestamp:new Date};this._active&&this.renderNotification(c,s,a,l),this._backlog.length>=this._backlogSize&&this._backlog.splice(0,this._backlog.length-this._backlogSize+1),this._backlog.push(c),this._data$.next(c),(!this.maxLevel||o>this.maxLevel)&&(this.maxLevel=o)}setActive(i){this._active!==i&&(this._active=i,this._active||this._container&&(this._container.remove(),this._container=null))}normal(i,r,o){this.notify(i,r,Mo.NORMAL,"","hand-paper",o)}info(i,r,o){this.notify(i,r,Mo.INFO,"info","info-circle",o)}warning(i,r,o){this.notify(i,r,Mo.WARNING,"warning","exclamation-circle",o)}error(i,r,o){this.notify(i,r,Mo.ERROR,"error","bomb",o)}success(i,r,o){this.notify(i,r,Mo.SUCCESS,"success","check-circle",o)}backlog(){return this._backlog}clearBacklog(){this._backlog.length=0,this._data$.next(null),this.maxLevel=void 0}asObservable(){return this._dataObservable$}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var oN=["segments"],pC=(()=>{let e=class e{set displayedRange(i){this._displayRange=i,this.renderChart(),this.computeHighlighterLayout(),this._changeDect.detectChanges()}set highlightedRange(i){this.highlightRange=i,this.computeHighlighterLayout(),this._changeDect.detectChanges()}set displayedSegments(i){this._segments=i,this.renderChart(),this._changeDect.detectChanges()}set dataRange(i){this._dataRange=i,this.renderChart(),this._changeDect.detectChanges()}constructor(i,r,o){this._elRef=i,this._changeDect=r,this._renderer=o,this.offset=0,this.width=0,this.toPercent=s=>Ot.toPercent(s)}renderChart(){if(!this._displayRange||!this._dataRange)return;let i=this._displayRange[1]-this._displayRange[0],r=this._dataRange[1]-this._dataRange[0];this._rawWidth=r/i,this._rawOffset=(this._dataRange[0]-this._displayRange[0])/i;let o=this.optimizeOffsetWidth(this._rawOffset,this._rawWidth,this._dataRange,this._displayRange);this.offset=o.optimizedOffset,this.width=o.optimizedWidth,this._clippedRange=o.clippedRange,this.width>0?this._elRef.nativeElement.style.visibility="visible":this._elRef.nativeElement.style.visibility="hidden",this.renderSegments()}renderSegments(){if(!this._elSegments)return;for(;this._elSegments.nativeElement.lastChild;)this._elSegments.nativeElement.removeChild(this._elSegments.nativeElement.lastChild);if(!this._segments||!this._clippedRange||!this._displayRange)return;let i=this._clippedRange[1]-this._clippedRange[0],r=0,o=0,s=1;for(;r<this._segments.length;++r){let c=this._segments[r],u=(c[0]-this._clippedRange[0])/i,d=(c[1]-this._clippedRange[0])/i,f=this.optimizeOffsetWidth(u,d-u,c,this._clippedRange);if(f.clippedRange){o=f.optimizedOffset;break}}let a=this._segments.length-1;for(;a>=0;--a){let c=this._segments[a],u=(c[0]-this._clippedRange[0])/i,d=(c[1]-this._clippedRange[0])/i,f=this.optimizeOffsetWidth(u,d-u,c,this._clippedRange);if(f.clippedRange){s=f.optimizedOffset+f.optimizedWidth;break}}if(a-r+1>200){let c=this._renderer.createElement("span");this._renderer.addClass(c,"error"),this._renderer.setStyle(c,"width",Ot.toPercent(s-o)),this._renderer.setStyle(c,"left",Ot.toPercent(o)),this._renderer.appendChild(this._elSegments.nativeElement,c);return}for(let c=r;c<=a;++c){let u=this._segments[c],d=(u[0]-this._clippedRange[0])/i,f=(u[1]-this._clippedRange[0])/i,p=this.optimizeOffsetWidth(d,f-d,u,this._clippedRange),h="";if(u[0]<this._displayRange[0]&&u[1]>this._displayRange[1]?h="open-both":u[0]<this._displayRange[0]?h="open-left":u[1]>this._displayRange[1]&&(h="open-right"),p.optimizedWidth>0){let g=Ot.toPercent(p.optimizedWidth),_=Ot.toPercent(p.optimizedOffset),y=this._renderer.createElement("span");this._renderer.addClass(y,"fill"),this._renderer.setStyle(y,"width",g),this._renderer.setStyle(y,"left",_),this._renderer.appendChild(this._elSegments.nativeElement,y),y=this._renderer.createElement("span"),this._renderer.addClass(y,"border"),h&&this._renderer.addClass(y,h),this._renderer.setStyle(y,"width",g),this._renderer.setStyle(y,"left",_),this._renderer.appendChild(this._elSegments.nativeElement,y)}}}computeHighlighterLayout(){if(!this._clippedRange||!this.highlightRange)return;let i=this._clippedRange[1]-this._clippedRange[0],r=(this.highlightRange[0]-this._clippedRange[0])/i,o=(this.highlightRange[1]-this._clippedRange[0])/i,s=this.optimizeOffsetWidth(r,o-r,this.highlightRange,this._clippedRange);this.highlightOfs=s.optimizedOffset,this.highlightWidth=s.optimizedWidth}optimizeOffsetWidth(i,r,o,s){let a=s[1]-s[0],l=i,c=r,u=o;return i<=0&&i+r>=1?(l=0,c=1,u=s):i>0&&r<1&&i+r<1||(i<0&&i+r>0&&i+r<=1?(l=0,c=i+r,u=[s[0],o[1]]):i>0&&i<=1?(c=1-i,u=[o[0],o[0]+c*a]):(i<0&&i+r<=0||i>1)&&(c=0,l=0,u=void 0)),{optimizedWidth:c,optimizedOffset:l,clippedRange:u}}ngAfterViewInit(){this.renderChart(),this.renderSegments(),this.computeHighlighterLayout(),this._changeDect.detectChanges()}};e.\u0275fac=function(r){return new(r||e)(D(ae),D($t),D(lt))},e.\u0275cmp=oe({type:e,selectors:[["app-chart-interval-display"]],viewQuery:function(r,o){if(r&1&&ot(oN,7),r&2){let s;Ge(s=qe())&&(o._elSegments=s.first)}},inputs:{displayedRange:"displayedRange",highlightedRange:"highlightedRange",displayedSegments:"displayedSegments",dataRange:"dataRange"},standalone:!1,decls:5,vars:10,consts:[["segments",""],[1,"main"],[1,"highlighter"],[1,"segments"]],template:function(r,o){r&1&&(m(0,"span"),I(1,"span",1)(2,"span",2)(3,"span",3,0),v()),r&2&&(hn("width",o.toPercent(o.width))("margin-left",o.toPercent(o.offset)),w(2),hn("display",o.highlightRange?"":"none")("width",o.toPercent(o.highlightWidth||0))("left",o.toPercent(o.highlightOfs||0)))},encapsulation:2,changeDetection:0});let t=e;return t})();function aN(t){for(;t;){if(t instanceof HTMLAnchorElement)return!0;t=t.parentElement}return!1}var gC=(()=>{let e=class e{constructor(i){this._elementRef=i,this.clickOutside=new ie}onClick(i,r){if(!r)return;this._elementRef.nativeElement.contains(r)&&!aN(r)||this.clickOutside.emit()}};e.\u0275fac=function(r){return new(r||e)(D(ae))},e.\u0275dir=ye({type:e,selectors:[["","clickOutside",""]],hostBindings:function(r,o){r&1&&k("click",function(a){return o.onClick(a,a.target)},!1,o0)},outputs:{clickOutside:"clickOutside"},standalone:!1});let t=e;return t})();var mC=(()=>{let e=class e{set widthCopy(i){this._sourceElement!==i&&(this._resizeObserver?.disconnect(),this._sourceElement=i,this._sourceElement&&(this._resizeObserver=new ResizeObserver(r=>{for(let o of r)if(o.target===this._sourceElement){let s=window.getComputedStyle(this._sourceElement);this._elRef.nativeElement.style.width=s.width;break}}),this._resizeObserver.observe(this._sourceElement)))}constructor(i){this._elRef=i}ngOnDestroy(){this._resizeObserver?.disconnect()}};e.\u0275fac=function(r){return new(r||e)(D(ae))},e.\u0275dir=ye({type:e,selectors:[["","appWidthCopy",""]],inputs:{widthCopy:"widthCopy"},standalone:!1});let t=e;return t})();function uN(t,e){return this.id(e)}function dN(t,e){if(t&1&&I(0,"div"),t&2){let n=e.$implicit;hn("left",n,"%")}}function fN(t,e){if(t&1&&I(0,"div",2),t&2){let n=E();hn("left",n.now,"%")}}var vC=(()=>{let e=class e{set range(i){this._range=i,this.draw(),this._cd.detectChanges()}set gridspacing(i){this._gridSpacing=i,this.draw(),this._cd.detectChanges()}constructor(i){this._cd=i,this.lines=[],this.now=0,this._range=null,this._now=0,this._gridSpacing=null}id(i){return i}lineAt(i){this.lines.push(i)}clear(){this.lines=[]}draw(){if(this.clear(),!this._gridSpacing||!this._range)return;let i;if(this._gridSpacing.drx&&(i=this._gridSpacing.drx[0]*1e3,this._range.min&&this._range.max)){let r=Math.ceil(this._range.min/i),s=i*r;for(;s<this._range.max&&this.lines.length<100;)this.lineAt(Math.floor(this.normalize(s))),s+=i;this.now=this.normalize(this._now),this.now>100&&(this.now=-1)}}normalize(i){let r=this._range.max-this._range.min;return(i-this._range.min)/r*100}ngOnInit(){this._interval$=Po(1e3).subscribe({next:i=>{let r=this.now;this._range?(this._now=Math.floor(new Date().getTime()/1e3)*1e3,this.now=this.normalize(this._now),this.now>100&&(this.now=-1)):this.now=-1,r!==this.now&&this._cd.detectChanges()}})}ngOnDestroy(){this._interval$?.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(D($t))},e.\u0275cmp=oe({type:e,selectors:[["app-scale"]],inputs:{range:"range",gridspacing:"gridspacing"},standalone:!1,decls:3,vars:1,consts:[[3,"left"],[1,"now",3,"left"],[1,"now"]],template:function(r,o){r&1&&(ze(0,dN,1,2,"div",0,uN,!0),ue(2,fN,1,2,"div",1)),r&2&&(We(o.lines),w(2),Y(o.now>=0?2:-1))},encapsulation:2,changeDetection:0});let t=e;return t})();var Iu=class{constructor(e,n){this.date=e,this.text=n}};var pN=["traceView"];function gN(t,e){if(t&1&&(m(0,"span",5),I(1,"i",11),v()),t&2){let n=E();V("ngClass",n.requestState.running?"green":"red"),w(),V("ngClass",n.requestState.running?"fa-wifi":"fa-wifi-slash")}}function mN(t,e){if(t&1){let n=Me();m(0,"i",12),k("click",function(){j(n);let r=E();return U(r.mayRefetchData?r.refetchData():{})}),v()}if(t&2){let n=E();hn("opacity",n.mayRefetchData?"1.0":"0.5"),V("ngClass",n.mayRefetchData?"clickable":"")}}function vN(t,e){if(t&1){let n=Me();m(0,"i",13),k("click",function(){j(n);let r=E();return U(r.userManipulation?r.lock():r.unlock())}),v()}if(t&2){let n=E();V("ngClass",n.userManipulation?"fa-lock":"fa-unlock")}}var yC=(()=>{let e=class e{set channels(i){this._channels=i}set range(i){this.initialRange=i}constructor(i,r,o){this.settingsService=i,this._capsDataService=r,this._notifications=o,this.closeRequest=new ie,this.options=new co,this.userManipulation=!1,this.mayRefetchData=!1,this._errorPreviously=!1,this._traceViewUnsub$=new H,this.requestState=new rn}close(){this.closeRequest.emit()}setupTraces(){if(!this._traceView)return;this._traceView.clear();let i=this.settingsService.settings.RealtimeChannelViewInterval*1e3,r=this.initialRange,o=!1;if(!r){let a=new Date().getTime();r=[a-i,a],o=!0}if(!o&&r){let a=r[1]-r[0];if(a<1e3){let l=1e3-a;r=dt.pad(r,Math.ceil(l/2))}}this._traceView.bufferSize=r[1]-r[0];let s={channels:[],startTime:r[0],endTime:o?void 0:r[1],realtime:o};this._traceView.clear();for(let a of this._channels)this._traceView.addItem(a.id);this._traceView.range=new Fe(r[0],r[1]),this._traceView.timeScaleWidget.rangeChange.pipe(Ee(this._traceViewUnsub$)).subscribe({next:a=>{this.userManipulation=!0,a.min&&a.max&&(this.displayedRange=[a.min,a.max],this.mayRefetchData=this.getMayRefetchData([a.min,a.max]))}}),this.userManipulation=!1,this.mayRefetchData=!1;for(let a of this._channels)s.channels.push({selector:a.id});this.fetchData(s),Po(1e3).pipe(Ee(this._traceViewUnsub$)).subscribe({next:()=>{let l=new Date().getTime();if(!this.userManipulation&&o&&this._traceView&&this._traceView.shiftTraces({min:l-i,max:l}),this._traceView)for(let c of this._traceView.viewItems)c.markers=[new Iu(new Date(Math.floor(l/1e3)*1e3),"")],c.widget&&c.widget.setDirty();this.updateTraceWidgets()}}),Gt(100).pipe(Ee(this._traceViewUnsub$)).subscribe({next:()=>{this._traceView&&o&&this.updateTraceWidgets()}})}fetchData(i){this.requestState.setRunning(),this._capsDataService.getChannelData(this.settingsService.capsURL(),i).pipe(Ee(this._traceViewUnsub$)).subscribe({next:r=>{this._errorPreviously&&this._notifications.success("Reconnected to server","Success"),this._errorPreviously=!1,this._traceView.push(r,!0)},error:r=>{this.requestState.setError(r),this._errorPreviously=!0,this._notifications.warning(r.errorMessage+" - Retry in 5 secs","Cannot connect to server"),Gt(5e3).pipe(Ee(this._traceViewUnsub$)).subscribe({next:()=>{this.fetchData(i)}})},complete:()=>{this.requestState.setNone(),this._traceView&&!this.initialRange&&this.updateTraceWidgets()}})}unlock(){this.userManipulation=!0}lock(){this.userManipulation=!1,this.mayRefetchData=!1}getMayRefetchData(i){return this.userManipulation&&!this.requestState.running&&i[1]-i[0]<=this.settingsService.settings.MaxChannelViewIntervalSize*1e3}refetchData(){this.initialRange&&(this.initialRange=this.displayedRange),this.userManipulation=!1,this._traceViewUnsub$.next(),this.setupTraces()}updateTraceWidgets(){this._traceView&&(this._traceView.checkRedraw(),this._traceView.syncView())}ngOnInit(){this.setupTraces()}ngAfterViewInit(){this._traceView&&this._traceView.checkRedraw()}ngOnDestroy(){this._traceViewUnsub$.next(),this._traceViewUnsub$.complete()}};e.\u0275fac=function(r){return new(r||e)(D(Je),D(Eo),D(Su))},e.\u0275cmp=oe({type:e,selectors:[["app-channel-detail-view"]],viewQuery:function(r,o){if(r&1&&ot(pN,7),r&2){let s;Ge(s=qe())&&(o._traceView=s.first)}},inputs:{channels:"channels",range:"range"},outputs:{closeRequest:"closeRequest"},standalone:!1,decls:13,vars:7,consts:[["traceView",""],[1,"cover","canvas","vertical","flex","layout",2,"z-index","10"],[1,"header"],[1,"content"],[1,"absolute",2,"right","0","top","0"],[1,"hspacing","label",3,"ngClass"],["title","Re-load data of the current visible time range",1,"hspacing","fas","fa-sync",3,"ngClass","opacity"],["title","Toggle auto-scrolling",1,"hspacing","clickable","fas","fa-fw",3,"ngClass"],[1,"hspacing","clickable","fas","fa-times",3,"click"],[1,"expanding","content"],[1,"cover",3,"utc","options"],[1,"fas",3,"ngClass"],["title","Re-load data of the current visible time range",1,"hspacing","fas","fa-sync",3,"click","ngClass"],["title","Toggle auto-scrolling",1,"hspacing","clickable","fas","fa-fw",3,"click","ngClass"]],template:function(r,o){if(r&1){let s=Me();m(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),ue(4,gN,2,2,"span",5)(5,mN,1,3,"i",6)(6,vN,1,1,"i",7),m(7,"i",8),k("click",function(){return j(s),U(o.close())}),v()(),m(8,"h2"),C(9,"Traces"),v()()(),m(10,"div",9),I(11,"trace-view",10,0),v()()}r&2&&(hn("display","flex"),w(4),Y(o.requestState.running?4:-1),w(),Y(o.initialRange?5:-1),w(),Y(o.initialRange?-1:6),w(5),V("utc",!o.settingsService.settings.UseLocalTime)("options",o.options))},dependencies:[Rt,iw],encapsulation:2});let t=e;return t})();var _C=(()=>{let e=class e{set conditionWithText(i){this.cwt=i;for(let r of i)if(r[0]){this._elRef.nativeElement.title=r[1];break}}constructor(i){this._elRef=i}};e.\u0275fac=function(r){return new(r||e)(D(ae))},e.\u0275dir=ye({type:e,selectors:[["","appTooltip",""]],inputs:{conditionWithText:"conditionWithText"},standalone:!1});let t=e;return t})();var tg=class{constructor(e,n){this.position=e,this.color=n}},wN=(()=>{let e=class e{constructor(){this.colors=[],this.lowerRange=0,this.upperRange=1,this.oneOverRange=1}setRange(i,r){this.lowerRange=i,this.upperRange=r,this.upperRange>this.lowerRange?this.oneOverRange=1/(this.upperRange-this.lowerRange):this.oneOverRange=1}colorAt(i){let r=this.colors.length;if(!r)return e.NoColor;let o=(i-this.lowerRange)*(r-1)*this.oneOverRange+.5|0;return o<0?o=0:o>=this.colors.length&&(o=this.colors.length-1),this.colors[o]}};e.NoColor=[0,0,0,0];let t=e;return t})(),Tu=class t{constructor(){this._stops=[]}static generateDefault(){let e=new t;return e.setColorAt(0,[255,0,255,255]),e.setColorAt(.2,[0,0,255,255]),e.setColorAt(.4,[0,255,255,255]),e.setColorAt(.6,[0,255,0,255]),e.setColorAt(.8,[255,255,0,255]),e.setColorAt(1,[255,0,0,255]),e.finalize(),e}static generateInferno(){let e=new t;return e.setColorAt(0,[1,0,4,255]),e.setColorAt(.14285714285714285,[48,7,84,255]),e.setColorAt(.2857142857142857,[105,15,111,255]),e.setColorAt(.42857142857142855,[158,40,100,255]),e.setColorAt(.5714285714285714,[208,72,67,255]),e.setColorAt(.7142857142857142,[239,125,21,255]),e.setColorAt(.8571428571428571,[242,194,35,255]),e.setColorAt(1,[245,255,163,255]),e.finalize(),e}static generateBlackBody(){let e=new t;return e.setColorAt(0,[0,0,0,255]),e.setColorAt(.142857142857,[64,23,18,255]),e.setColorAt(.285714285714,[126,31,28,255]),e.setColorAt(.428571428571,[184,50,33,255]),e.setColorAt(.571428571429,[219,101,10,255]),e.setColorAt(.714285714286,[228,161,3,255]),e.setColorAt(.857142857143,[233,216,57,255]),e.setColorAt(1,[255,255,255,255]),e.finalize(),e}static generateKindlmann(){let e=new t;return e.setColorAt(0,[0,0,0,255]),e.setColorAt(.142857142857,[53,5,107,255]),e.setColorAt(.285714285714,[9,56,179,255]),e.setColorAt(.428571428571,[6,115,97,255]),e.setColorAt(.571428571429,[8,159,34,255]),e.setColorAt(.714285714286,[101,197,10,255]),e.setColorAt(.857142857143,[249,208,130,255]),e.setColorAt(1,[255,255,255,255]),e.finalize(),e}static generateExtendedKindlmann(){let e=new t;return e.setColorAt(0,[0,0,0,255]),e.setColorAt(.142857142857,[42,6,120,255]),e.setColorAt(.285714285714,[4,78,53,255]),e.setColorAt(.428571428571,[39,116,6,255]),e.setColorAt(.571428571429,[221,99,11,255]),e.setColorAt(.714285714286,[249,138,202,255]),e.setColorAt(.857142857143,[229,206,253,255]),e.setColorAt(1,[255,255,255,255]),e.finalize(),e}setColorAt(e,n){this._stops.push(new tg(e,n))}stopAt(e){let n=this._stops.length;for(let i=0;i<n;++i)if(this._stops[i].position===e)return this._stops[i].color;return null}colorAt(e,n=!1){let i=this._stops.length;if(!i)return null;if(i<2)return this._stops[0].color;let r=this._stops[0].position;for(let o=1;o<i;r=this._stops[o].position,++o){if(e<=r)return this._stops[o-1].color;let s=this._stops[o].position;if(e>=s)continue;if(n)return this._stops[o].color;let a=this._stops[o-1].color,l=this._stops[o].color,c=s-r,u=(e-r)/c,d=1-u;return[a[0]*d+l[0]*u+.5|0,a[1]*d+l[1]*u+.5|0,a[2]*d+l[2]*u+.5|0,a[3]*d+l[3]*u+.5|0]}return this._stops[i-1].color}finalize(){this._stops.sort((e,n)=>e.position-n.position)}compile(e){if(this.finalize(),!this._stops.length||!e)return null;let n=new wN;n.setRange(this._stops[0].position,this._stops[this._stops.length-1].position),n.colors.length=e;let i=n.upperRange-n.lowerRange;for(let r=0;r<e;++r){let o=n.lowerRange+r*i/(e-1);n.colors[r]=this.colorAt(o)}return n}};function CN(){let t=new Tu;return t.setColorAt(0,[255,0,0,255]),t.setColorAt(.5,[255,128,0,255]),t.setColorAt(1,[0,255,0,255]),t}function DN(t){return t.length>=3&&Math.round(t[0]*.299+t[1]*.587+t[2]*.114)>125?"#000":"#fff"}function bN(t){return"rgb("+t[0]+","+t[1]+","+t[2]+")"}var Ni=class Ni{set displayedValue(e){let n=Ni.colorGradient.colorAt(e);this._elem.nativeElement.textContent=Ot.toPercent(e,0),this._elem.nativeElement.style.background=bN(n),this._elem.nativeElement.style.color=DN(n)}constructor(e){this._elem=e}};Ni.colorGradient=CN(),Ni.\u0275fac=function(n){return new(n||Ni)(D(ae))},Ni.\u0275cmp=oe({type:Ni,selectors:[["app-gradient-percentage-display"]],inputs:{displayedValue:"displayedValue"},standalone:!1,decls:0,vars:0,template:function(n,i){},encapsulation:2});var Mu=Ni;var wC=(()=>{let e=class e{set scrollTo(i){i.pipe(Ee(this._unsub$)).subscribe({next:r=>{r?this._elRef.nativeElement.scrollTo({top:10,left:0}):r||this._elRef.nativeElement.scrollTo({top:this._elRef.nativeElement.scrollHeight-10,left:0})}})}scroll(){let i=this._elRef.nativeElement.scrollTop,r=this._elRef.nativeElement.scrollHeight-this._elRef.nativeElement.clientHeight;this.scrollProgress.next(i/r)}constructor(i){this._elRef=i,this._unsub$=new H,this.scrollProgress=new ie}ngOnDestroy(){this._unsub$.next()}};e.\u0275fac=function(r){return new(r||e)(D(ae))},e.\u0275dir=ye({type:e,selectors:[["","appScrollProgress",""]],hostBindings:function(r,o){r&1&&k("scroll",function(){return o.scroll()})},inputs:{scrollTo:"scrollTo"},outputs:{scrollProgress:"scrollProgress"},standalone:!1});let t=e;return t})();var IN=["tableRoot"],TN=["prePad"],MN=["postPad"],xN=["scrollParent"],RN=["timeScale"],AN=t=>[t,"Data request already running"],NN=()=>[!0,"Reload data"],xu=(t,e)=>[t,e],kN=t=>[t,"Realtime data view not available, no channels are selected."],ON=t=>[t,"Realtime data view not available, too many channels are selected."],PN=()=>[!0,"Show data in real time"],FN=(t,e,n)=>[t,e,n],LN=t=>[t,"Data view not available, no channels are selected."],VN=t=>[t,"Data view not available, too many channels are selected."],jN=t=>[t,"Maximum data view time range exceeded. Decrease the current time window or visit the settings page to increase the maximum allowed range."],UN=()=>[!0,"Show data in selected time range"],BN=(t,e,n,i)=>[t,e,n,i],$N=t=>[t,"MiniSEED data download not available, no channels are selected."],HN=()=>[!0,"Download available miniSEED data in selected time range"];function zN(t,e){if(t&1){let n=Me();m(0,"app-error-message",8),k("tryagain",function(){j(n);let r=E();return U(r.requestData())}),v()}if(t&2){let n=E();V("msg",n.dataRequestState.errorMessage)}}function WN(t,e){if(t&1){let n=Me();m(0,"span")(1,"button",21),k("click",function(){j(n);let r=E(2);return U(r.data.selectAllVisibleNodes())}),I(2,"i",22),v(),m(3,"button",23),k("click",function(){j(n);let r=E(2);return U(r.data.deselectAllVisibleNodes())}),I(4,"i",24),v()(),m(5,"span")(6,"div",25)(7,"input",26),k("input",function(r){j(n);let o=E(2);return U(o.searchTree(r))}),v(),m(8,"div",27),I(9,"i",28),v()()(),m(10,"span")(11,"button",29),k("click",function(){j(n);let r=E(2);return U(r.perspectiveManager.nextPerspective())}),I(12,"i",16),v()(),m(13,"span")(14,"button",30),k("click",function(){j(n);let r=E(2);return U(r.shiftDay(-1))}),I(15,"i",31),v(),m(16,"button",32),Bt("ngModelChange",function(r){j(n);let o=E(2);return Jt(o.date,r)||(o.date=r),U(r)}),k("datePicked",function(r){j(n);let o=E(2);return U(o.changeDay(r))}),C(17),xt(18,"gmdate"),v(),m(19,"button",33),k("click",function(){j(n);let r=E(2);return U(r.shiftDay(1))}),I(20,"i",34),v()(),m(21,"span")(22,"button",15),k("click",function(){j(n);let r=E(2);return U(r.presentDetailView(!0))}),I(23,"i",35),v(),m(24,"button",15),k("click",function(){j(n);let r=E(2);return U(r.presentDetailView(!1))}),I(25,"i",36),v(),m(26,"button",15),k("click",function(){j(n);let r=E(2);return U(r.downloadChannel())}),I(27,"i",16),v()()}if(t&2){let n=E(2);w(12),V("ngClass",n.perspectiveManager.getCurrentPerspective()==="list"?"fa-tree-alt":"fa-list"),w(4),V("localTime",n.dateService.localTime)("dateOnly",!0),Ut("ngModel",n.date),V("dateTimePickerOnClick",!0),w(),_e(" ",Yr(18,13,n.date,"%Y-%m-%d %H:%M:%S")," "),w(5),V("disabled",n.data.selectedChannels.length===0||n.data.selectedChannels.length>n.settingsService.settings.MaxSimultaneouslyChannelsLoaded)("conditionWithText",ry(21,FN,Mt(16,kN,!n.data.selectedChannels.length),Mt(18,ON,n.data.selectedChannels.length>n.settingsService.settings.MaxSimultaneouslyChannelsLoaded),ir(20,PN))),w(2),V("disabled",n.data.selectedChannels.length===0||!n.selectedChannelsEnabled||n.data.selectedChannels.length>n.settingsService.settings.MaxSimultaneouslyChannelsLoaded)("conditionWithText",oy(32,BN,Mt(25,LN,!n.data.selectedChannels.length),Mt(27,VN,n.data.selectedChannels.length>n.settingsService.settings.MaxSimultaneouslyChannelsLoaded),Mt(29,jN,!n.selectedChannelsEnabled),ir(31,UN))),w(2),V("disabled",n.userDownloadBuilder.getStatus().running||n.data.selectedChannels.length===0)("conditionWithText",rr(40,xu,Mt(37,$N,!n.data.selectedChannels.length),ir(39,HN))),w(),V("ngClass",n.userDownloadBuilder.getStatus().running?"fa-spin fa-spinner":"fa-download")}}function GN(t,e){if(t&1&&(m(0,"span"),I(1,"i",16),v()),t&2){let n=E(3);w(),V("ngClass",n.sorter.config.descending===1?"fa-caret-down":"fa-caret-up")}}function qN(t,e){if(t&1&&(m(0,"span"),I(1,"i",16),v()),t&2){let n=E(3);w(),V("ngClass",n.sorter.config.descending===1?"fa-caret-down":"fa-caret-up")}}function QN(t,e){if(t&1&&(m(0,"span"),I(1,"i",16),v()),t&2){let n=E(3);w(),V("ngClass",n.sorter.config.descending===1?"fa-caret-down":"fa-caret-up")}}function YN(t,e){if(t&1&&(m(0,"span"),I(1,"i",16),v()),t&2){let n=E(3);w(),V("ngClass",n.sorter.config.descending===1?"fa-caret-down":"fa-caret-up")}}function ZN(t,e){if(t&1&&I(0,"app-gradient-percentage-display",59),t&2){let n=E(2).$implicit;V("displayedValue",n.availability)}}function XN(t,e){if(t&1){let n=Me();m(0,"tr",52)(1,"td")(2,"span")(3,"i",54),k("click",function(){j(n);let r=E().$implicit,o=E(4);return U(o.toggleExpansion(r))}),v(),m(4,"i",55),k("click",function(){j(n);let r=E().$implicit,o=E(4);return U(o.toggleExpandableSelection(r))}),v(),C(5),v()(),m(6,"td")(7,"span"),C(8),xt(9,"gmdate"),v()(),m(10,"td")(11,"span"),C(12),xt(13,"gmdate"),v()(),m(14,"td",56)(15,"app-chart-interval-display",57),xt(16,"async"),k("click",function(){j(n);let r=E().$implicit,o=E(4);return U(o.presentExpandable(r.toExpandable()))}),v()(),m(17,"td",58),ue(18,ZN,1,1,"app-gradient-percentage-display",59),v()()}if(t&2){let n=E().$implicit,i=E(4);V("ngClass",n.type+(n.toExpandable().selectedChildren.length!==0?" hot":"")),w(3),V("ngClass",n.toExpandable().isExpanded?"fa-caret-down":"fa-caret-right"),w(),V("ngClass",n.toExpandable().fullySelected()?"fa-check-square":n.toExpandable().selectedChildren.length!==0?"fa-minus-square":"fa-square"),w(),_e(" ",n.code||"--"," "),w(3),_e(" ",Yr(9,11,n.start,"%Y-%m-%d %H:%M:%S")," "),w(4),_e(" ",Yr(13,14,n.end,"%Y-%m-%d %H:%M:%S")," "),w(3),V("displayedRange",Zn(16,17,i.displayedRangeSubject$))("highlightedRange",n.segments==null?null:n.segments.range)("displayedSegments",n.segments==null?null:n.segments.data)("dataRange",rr(19,xu,n.start,n.end)),w(3),Y(n.availability!==void 0?18:-1)}}function KN(t,e){if(t&1&&I(0,"app-gradient-percentage-display",59),t&2){let n=E(2).$implicit;V("displayedValue",n.availability)}}function JN(t,e){if(t&1){let n=Me();m(0,"tr",53)(1,"td")(2,"span")(3,"i",55),k("click",function(){j(n);let r=E().$implicit,o=E(4);return U(o.toggleChannelSelection(r))}),v(),C(4),v()(),m(5,"td")(6,"span"),C(7),xt(8,"gmdate"),v()(),m(9,"td")(10,"span"),C(11),xt(12,"gmdate"),v()(),m(13,"td",56)(14,"app-chart-interval-display",60),xt(15,"async"),k("click",function(){j(n);let r=E().$implicit,o=E(4);return U(o.presentChannel(r.toChannel()))}),v()(),m(16,"td",58),ue(17,KN,1,1,"app-gradient-percentage-display",59),v()()}if(t&2){let n=E().$implicit,i=E(4);V("ngClass",(i.perspectiveManager.getCurrentPerspective()==="list"?"standalone":"")+(n.toChannel().isSelected?" hot":"")),w(3),V("ngClass",n.toChannel().isSelected?"fa-check-square":"fa-square"),w(),_e(" ",n.toChannel().displayName||"--"," "),w(3),_e(" ",Yr(8,10,n.start,"%Y-%m-%d %H:%M:%S")," "),w(4),_e(" ",Yr(12,13,n.end,"%Y-%m-%d %H:%M:%S")," "),w(3),V("displayedRange",Zn(15,16,i.displayedRangeSubject$))("highlightedRange",n.segments==null?null:n.segments.range)("displayedSegments",n.segments==null?null:n.segments.data)("dataRange",rr(18,xu,n.start,n.end)),w(3),Y(n.availability!==void 0?17:-1)}}function ek(t,e){if(t&1&&ue(0,XN,19,22,"tr",52)(1,JN,18,21,"tr",53),t&2){let n=e.$implicit;Y(n.type==="network"||n.type==="station"||n.type==="location"?0:-1),w(),Y(n.type==="channel"?1:-1)}}function tk(t,e){if(t&1&&ze(0,ek,2,2,null,null,gt),t&2){let n=E(3);We(n.dispenser.batch)}}function nk(t,e){t&1&&(m(0,"span"),C(1,"full"),v())}function ik(t,e){if(t&1&&(m(0,"span"),C(1),v()),t&2){let n=E(4);w(),_e("",n.segmentRes," day")}}function rk(t,e){if(t&1&&(m(0,"span"),C(1),v()),t&2){let n=E(4);w(),_e("",n.segmentRes," days")}}function ok(t,e){if(t&1){let n=Me();m(0,"div",51)(1,"div",61),k("click",function(){j(n);let r=E(3);return U(r.hideLegend())}),I(2,"i",62),v(),m(3,"div",63)(4,"strong"),C(5,"Data availability"),v(),C(6," ( "),ue(7,nk,2,0,"span")(8,ik,2,1,"span")(9,rk,2,1,"span"),C(10," ) "),v(),m(11,"div",64)(12,"div",65),I(13,"span",66),m(14,"div"),C(15,"complete"),v()(),m(16,"div",67),I(17,"span",68),m(18,"div"),C(19,"partial or gap"),v()(),m(20,"div",69),I(21,"span",70),m(22,"div"),C(23,"gap"),v()(),m(24,"div",71),I(25,"span",72),m(26,"div"),C(27,"unknown"),v()(),m(28,"div",73),I(29,"span",74),m(30,"div"),C(31,"too many segments"),v()()()()}if(t&2){let n=E(3);w(7),Y(n.segmentRes?-1:7),w(),Y(n.segmentRes&&n.segmentRes===1?8:-1),w(),Y(n.segmentRes&&n.segmentRes>1?9:-1)}}function sk(t,e){if(t&1){let n=Me();m(0,"div",18),I(1,"div",37)(2,"div",38),m(3,"div",39,0),k("scrollProgress",function(r){j(n);let o=E(2);return U(o.scrollProgress(r))}),m(5,"table",40)(6,"thead")(7,"tr",41)(8,"th")(9,"div",42),k("click",function(){j(n);let r=E(2);return U(r.sorter.passParameter(r.data,"code"))}),C(10," Code "),ue(11,GN,2,1,"span"),v()(),m(12,"th")(13,"div",43),k("click",function(){j(n);let r=E(2);return U(r.sorter.passParameter(r.data,"start"))}),C(14," Start "),ue(15,qN,2,1,"span"),v()(),m(16,"th")(17,"div",44),k("click",function(){j(n);let r=E(2);return U(r.sorter.passParameter(r.data,"end"))}),C(18," End "),ue(19,QN,2,1,"span"),v()(),m(20,"th",45)(21,"div",46),C(22," Availability "),v()(),m(23,"th")(24,"div",47),k("click",function(){j(n);let r=E(2);return U(r.sorter.passParameter(r.data,"avail"))}),C(25," Complete "),ue(26,YN,2,1,"span"),v()()()(),m(27,"tbody",null,1),I(29,"tr",null,2),ue(31,tk,2,0),I(32,"tr",null,3),v(),m(34,"tfoot")(35,"tr"),I(36,"td")(37,"td")(38,"td"),m(39,"td",null,4),I(41,"app-scale",48),xt(42,"async"),xt(43,"async"),m(44,"div",49)(45,"time-scale-widget",50,5),k("rangeChange",function(r){j(n);let o=E(2);return U(o.changeTableRange(r))})("gridChange",function(r){j(n);let o=E(2);return U(o.changeTableGridSpacing(r))}),v(),ue(47,ok,32,3,"div",51),v()()()()()()()}if(t&2){let n=_i(40),i=E(2);w(11),Y(i.sorter.config.parameter==="code"?11:-1),w(4),Y(i.sorter.config.parameter==="start"?15:-1),w(4),Y(i.sorter.config.parameter==="end"?19:-1),w(7),Y(i.sorter.config.parameter==="avail"?26:-1),w(5),Y(i.dispenser?31:-1),w(10),V("widthCopy",n)("range",Zn(42,12,i.range$))("gridspacing",Zn(43,14,i.gridspacing$)),w(3),V("widthCopy",n),w(),V("utc",i.dateService.utc)("range$",i.range$),w(2),Y(i.settingsService.settings.ShowLegend?47:-1)}}function ak(t,e){if(t&1&&(m(0,"div",19)(1,"span",75),I(2,"i",76),C(3),v()()),t&2){let n=E(2);w(3),_e("\xA0 ",n.progressIndication.message," ")}}function lk(t,e){if(t&1){let n=Me();m(0,"app-channel-detail-view",77),k("closeRequest",function(){j(n);let r=E(2);return U(r.showDetailView=!1)}),v()}if(t&2){let n=E(2);V("range",n.servedRange)("channels",n.channelsToPresent)}}function ck(t,e){if(t&1){let n=Me();m(0,"div",7)(1,"div",9)(2,"div",10),k("clickOutside",function(){j(n);let r=E();return U(r.app.menuActive=!1)}),m(3,"div",11)(4,"span",12)(5,"span",13)(6,"span",14),ue(7,WN,28,43),m(8,"span")(9,"button",15),k("click",function(){j(n);let r=E();return U(r.reloadSegments())}),I(10,"i",16),v()()()()()()(),m(11,"div",17),ue(12,sk,48,16,"div",18)(13,ak,4,1,"div",19),v(),ue(14,lk,1,2,"app-channel-detail-view",20),v()()}if(t&2){let n=E();w(2),V("ngClass",n.app.menuActive?"is-active":""),w(5),Y(n.data?7:-1),w(2),V("disabled",n.dataRequestState.running)("conditionWithText",rr(11,xu,Mt(8,AN,!n.data||n.dataRequestState.running),ir(10,NN))),w(),V("ngClass",n.dataRequestState.running?"fa-spin fa-spinner":"fa-redo"),w(2),Y(n.data?12:-1),w(),Y(n.progressIndication.active?13:-1),w(),Y(n.showDetailView?14:-1)}}var CC=(()=>{let e=class e{constructor(i,r,o,s,a,l,c,u){this.app=i,this.dateService=r,this.settingsService=o,this.segments=s,this.progressIndication=a,this._dataProvider=l,this._lastUpdated=c,this._notifications=u,this.displayedRangeSubject$=new ve([0,0]),this.displayedRange=new bu,this._rangeSubject$=new ve(new Fe(0,0)),this.range$=this._rangeSubject$.asObservable(),this._gridspacingSubject$=new ve(new ao),this.gridspacing$=this._gridspacingSubject$.asObservable(),this.dataRequestState=new rn,this._ngUnsubscribe$=new H,this.channelsToPresent=[],this.showDetailView=!1,this.selectedChannelsEnabled=!1,this.search=new yu,this.perspectiveManager=new wu("list"),this.sorter=new Cu({parameter:"code",descending:1}),this.userDownloadBuilder=new Du,this.perspectiveManager.getSubject().pipe(Ee(this._ngUnsubscribe$)).subscribe({next:d=>{this.updateTree(!0),this.tryToGetSegments()}}),this.sorter.sorted$.pipe(Ee(this._ngUnsubscribe$)).subscribe({next:()=>{this.updateTree()}}),this.segments.data$.pipe(Ee(this._ngUnsubscribe$)).subscribe({next:d=>{let f=d.dict;this.data&&(this.data.visitTree(p=>(f.hasOwnProperty(p.id)&&(p.segments={range:d.range,data:f[p.id]},p.availability=Js.computeAvailability(p.segments.range,p.segments.data)),!0)),_u.do(this.data),this.data.visitTree(p=>(p.segments&&!p.availability&&(p.availability=Js.computeAvailability(p.segments.range,p.segments.data)),!0)))}}),this.segments.status$.pipe(Ee(this._ngUnsubscribe$)).subscribe({next:d=>{d.running?a.active=!0:a.active=!1,d.error&&this._notifications.warning(d.errorMessage||"","An error occured")}}),this.segments.queueStatus$.pipe(Ee(this._ngUnsubscribe$)).subscribe({next:d=>{a.message="Querying "+d.nexted+" of "+d.total+" channels"}}),this.userDownloadBuilder.getSubject().pipe(Ee(this._ngUnsubscribe$)).subscribe({next:d=>{d&&(d.error?this._notifications.error(d.message,"Downloader"):this._notifications.info(d.message,"Downloader"))}})}presentDetailView(i,r=this.data?.selectedChannels){!this.data||!r||(i?this.servedRange=void 0:this.servedRange=this.displayedRange.get(),this.channelsToPresent=r,this.showDetailView=!0)}toggleChannelSelection(i){i instanceof oi&&(i.isSelected?i.deselect():i.select())}toggleExpandableSelection(i){i instanceof Cn&&(i.fullySelected()?i.deselectAllChildren():i.selectAllChildren())}toggleExpansion(i){i instanceof Cn&&(i.toggleExpansion(),this.updateTree())}presentChannel(i){this.presentDetailView(!0,[i])}presentExpandable(i){let r=[];o(i),this.presentDetailView(!0,r);function o(s){s.children.forEach(a=>{a instanceof Cn?o(a):a instanceof oi&&r.push(a)})}}downloadChannel(){!this.data||this.data?.selectedChannels.length===0||this.userDownloadBuilder.download(this.data.selectedChannels,this.displayedRange.get(),this.settingsService.fdsnURL(),this.settingsService.settings.Username,this.settingsService.settings.Password)}requestData(i=!1){this._dataProvider.invalidateStreamDataCache(),this.data?.visitTree(r=>(r.segments=void 0,r.availability=void 0,!0)),this.dataRequestState.running,this._dataProvider.getStreamData().pipe(Ee(this._ngUnsubscribe$)).subscribe({next:r=>{r&&r.networks.length>0?(this.data&&i?(r.visitTree(o=>{let s=this.data.get(o.id);return s&&(s.start=o.start,s.end=o.end),!0}),this.data.stripTree(o=>r.get(o.id)!=null)):this.data=r,this._lastUpdated.lastUpdated(this.data.timestamp||0)):this.data=void 0,this.dataRequestState.none},complete:()=>{this.data&&!i&&this.changeTableRange(new Fe(this.data.start,this.data.end)),this.updateTree(),this.dispenser=new mu(this.data?.visibleNodes),this.virtScroll?(this.virtScroll.fromLastScroll(),this.tryToGetSegments()):(this.scrollParent&&(this.virtScroll=new vu(this.scrollParent.nativeElement.clientHeight,31.3333,this.data?.visibleNodes.length||0,this.scrollParent),this._virtualScrollSubscription=this.virtScroll.asObservable().pipe(Ee(this._ngUnsubscribe$)).subscribe({next:r=>{this.dispenser.dispense(r.from,r.by),this.prePad.nativeElement.style.height=r.prePad+"px",this.postPad.nativeElement.style.height=r.postPad+"px"}})),this.scrollProgress(0))},error:r=>{this.dataRequestState.setError(Do.format(r))}})}changeTableRange(i){i.pps=void 0,this._rangeSubject$.next(i),this.displayedRangeSubject$.next([i.min,i.max]),this.displayedRange.setFromGRange(i);let r=new Date(this.displayedRange.get()[0]);this.date=r,i.min!=null&&i.max!=null?this.selectedChannelsEnabled=i.max-i.min<=this.settingsService.settings.MaxChannelViewIntervalSize*1e3:this.selectedChannelsEnabled=!1,this.timeScale.redraw(),this.tryToGetSegments()}changeTableGridSpacing(i){this._gridspacingSubject$.next(i)}shiftDay(i){this.displayedRange.shiftDay(i,this.dateService.localTime),this.changeTableRange(this.displayedRange.toGRange())}changeDay(i){i&&(this.displayedRange.changeDay(i),this.changeTableRange(this.displayedRange.toGRange()))}searchTree(i){this.data&&(this.search.update(i.target.value),this.updateTree(!0))}hideLegend(){this.settingsService.settings.ShowLegend=!1,this.settingsService.save()}ngOnInit(){this.app.pushMenu(),this.requestData()}ngOnDestroy(){this.app.popMenu(),this._virtualScrollSubscription?.unsubscribe(),this._ngUnsubscribe$.next(),this._ngUnsubscribe$.complete(),this.progressIndication.active=!1,this.segments.stop()}scrollProgress(i){this.virtScroll&&(Number.isNaN(i)||this.virtScroll.update(i),this.tryToGetSegments())}updateTree(i=!1){if(!this.data)return;let r=this.perspectiveManager.getCurrentPerspective()==="list",o=[];if(this.data.channels.forEach(s=>{s.displayName=r?s.id:s.code}),r)for(let s of this.data.channels)s.parent?.parent?.parent?.matches(this.search.tokens)&&s.parent?.parent?.matches(this.search.tokens)&&s.parent?.matches(this.search.tokens)&&s.matches(this.search.tokens)&&o.push(s);else for(let s of this.data.networks){if(!s.matches(this.search.tokens))continue;let a=!0;for(let l of s.stations){if(!l.matches(this.search.tokens))continue;let c=!1,u=!0;for(let d of l.locations){if(!d.matches(this.search.tokens))continue;let f=!0;for(let p of d.channels)if(p.matches(this.search.tokens)){if(f){if(u)if(a&&(o.push(s),a=!1),u=!1,s.isExpanded)c=!0,o.push(l);else break;if(f=!1,c&&l.isExpanded)o.push(d);else break}if(d.isExpanded)o.push(p);else break}}}}this.data.visibleNodes=o,this.virtScroll?.setNumIndiv(o.length),this.dispenser&&(this.dispenser.data=o),this.virtScroll&&(i?(this.scrollParent.nativeElement.scroll(0,0),this.virtScroll.update(0)):this.virtScroll.fromLastScroll())}reloadSegments(){this.requestData(!!this.data)}tryToGetSegments(){if(this.data&&this.dispenser){let i=[],r=this.displayedRange.get();if(!r)return;let o=(r[1]-r[0])/864e5;o=Math.ceil(o);let s=Math.min(400,Math.ceil(o/7)-1);this.segmentRes!==s&&(this.data?.visitTree(a=>(a.segments=void 0,a.availability=void 0,!0)),this.segmentRes=s);for(let a of this.dispenser.flatNodes)a.segments&&dt.contains(a.segments.range,r)||i.push(a.id);this.segments.encourage(r,this.segmentRes,i)}}};e.\u0275fac=function(r){return new(r||e)(D(wn),D(kn),D(Je),D(dC),D(fC),D(So),D(To),D(Su))},e.\u0275cmp=oe({type:e,selectors:[["app-streams-display"]],viewQuery:function(r,o){if(r&1&&(ot(IN,5),ot(TN,5),ot(MN,5),ot(xN,5),ot(RN,5)),r&2){let s;Ge(s=qe())&&(o.tableRoot=s.first),Ge(s=qe())&&(o.prePad=s.first),Ge(s=qe())&&(o.postPad=s.first),Ge(s=qe())&&(o.scrollParent=s.first),Ge(s=qe())&&(o.timeScale=s.first)}},standalone:!1,decls:2,vars:2,consts:[["scrollParent",""],["tableRoot",""],["prePad",""],["postPad",""],["timeScaleCell",""],["timeScale",""],[3,"msg"],[1,"vertical","flex","layout","cover",2,"flex-wrap","nowrap"],[3,"tryagain","msg"],[1,"expanding","relative","vertical","flex","layout","widget"],[1,"secondary","segment","sm-overlay",3,"clickOutside","ngClass"],[1,"content"],[1,"horizontal","flex","layout",2,"flex-direction","row","justify-content","space-between"],[1,"form","horizonal","flex","layout","pull-right",2,"align-items","center"],[1,"horizontal","flex","layout","toolgroups"],["appTooltip","",1,"button",3,"click","disabled","conditionWithText"],[1,"fas","fa-fw",3,"ngClass"],[1,"relative","expanding"],[1,"sticky","header","footer","footer-timescale","table",2,"position","absolute","left","0","top","0","width","100%","height","100%"],[1,"absolute",2,"right","0"],[3,"range","channels"],["title","Select all visible channels",1,"button",3,"click"],[1,"fas","fa-fw","fa-check"],["title","Deselect all visible channels",1,"button",3,"click"],[1,"fas","fa-fw","fa-times"],[1,"input","group",2,"width","initial"],["type","text","title","Filter the overview using the four-part channel id. Use asterisks (*) to skip any amount of characters and question marks (?) to skip one character.",1,"input","control",3,"input"],[1,"inverted","addon","icon","control"],[1,"far","fa-filter"],["title","Switch perspective",1,"button",3,"click"],["title","Move one day backwards",1,"button",3,"click"],[1,"fas","fa-fw","fa-arrow-alt-left"],["gDatetimePicker","","type","text","dateFormat","yyyy-MM-dd HH:mm:ss","title","Pick a date to jump to",1,"inverted","button",3,"ngModelChange","datePicked","localTime","dateOnly","ngModel","dateTimePickerOnClick"],["title","Move one day forwards",1,"button",3,"click"],[1,"fas","fa-fw","fa-arrow-alt-right"],[1,"fas","fa-fw","fa-signal-stream"],[1,"fas","fa-fw","fa-eye"],[1,"header"],[1,"footer"],["appScrollProgress","",1,"content",3,"scrollProgress"],[1,"table"],[1,"sturdy-header"],["title","Stream code defined by network, station, location and channel identifier",1,"not-selectable","clickable","inner",3,"click"],["title","Begin the data availability extent",1,"not-selectable","clickable","inner",3,"click"],["title","End of the data availability extent",1,"not-selectable","clickable","inner",3,"click"],[2,"width","100%"],["title","Color encoded data availability. The resolution of the presented data changes with the selected time range. On network, station and location level the graph represents the common data availability of all contained channels.",1,"inner"],["title","Percentage of complete data with respect to the visual time span. The resolution of the presented data changes with the selected time range. On network, station and location level the value represents the common data availability of all contained channels.",1,"not-selectable","clickable","inner",3,"click"],["appWidthCopy","",2,"position","absolute","z-index","0","top","2em","bottom","4em",3,"widthCopy","range","gridspacing"],["appWidthCopy","",1,"inner",3,"widthCopy"],[3,"rangeChange","gridChange","utc","range$"],[1,"absolute","small","legend","widget",2,"bottom","100%","right","0","z-index","1"],[1,"node",3,"ngClass"],[1,"channel","node",3,"ngClass"],["title","Toggle expansion",1,"clickable","fas","fa-fw",3,"click","ngClass"],["title","Toggle selection",1,"clickable","far","fa-fw",3,"click","ngClass"],[2,"z-index","1","position","relative"],["title","Show data in real time",1,"expandable","clickable",3,"click","displayedRange","highlightedRange","displayedSegments","dataRange"],[2,"text-align","center"],[3,"displayedValue"],["title","Show channel data in real time",1,"clickable",3,"click","displayedRange","highlightedRange","displayedSegments","dataRange"],["title","Hide legend. Visit the settings page to re-enable.",1,"pull-right","clickable",3,"click"],[1,"fas","fa-times","fa-fw"],["title","The resolution of the presented data changes with the selected time span.",1,"content"],[1,"horizontal","content"],["title","Either available data of a channel or common data of all contained channels.",1,"item"],[1,"color-preview","data-complete"],["title","Not all contained channels have common data or not a single contained channel has data in this time span.",1,"item"],[1,"color-preview","data-complete-or-gap"],["title","A data gap of a single channel.",1,"item"],[1,"color-preview","data-gap"],["title","Time span not yet queried, no information available right now.",1,"item"],[1,"color-preview","data-unknown"],["title","Too many segments to render in this time span.",1,"item"],[1,"color-preview","data-error"],[1,"orange","overlay","label"],[1,"fas","fa-fw","fa-spin","fa-spinner"],[3,"closeRequest","range","channels"]],template:function(r,o){r&1&&ue(0,zN,1,1,"app-error-message",6)(1,ck,15,14,"div",7),r&2&&(Y(o.dataRequestState.error?0:-1),w(),Y(o.dataRequestState.error?-1:1))},dependencies:[Rt,bc,Es,Ii,sw,pC,gC,mC,vC,yC,_C,Mu,wC,pu,ky,Io],encapsulation:2});let t=e;return t})();var uk=[{path:"",component:lC},{path:"channels",component:CC},{path:"apps",component:cC},{path:"settings",component:uC},{path:"**",redirectTo:""}],DC=Kw.forRoot(uk,{useHash:!0});var dk=()=>({exact:!0});function fk(t,e){t&1&&(m(0,"a",7),I(1,"i",16),m(2,"span"),C(3,"Apps"),v()())}function hk(t,e){t&1&&(m(0,"span"),C(1," UTC "),v())}function pk(t,e){if(t&1&&(m(0,"span"),C(1),v()),t&2){let n=E();w(),_e(" Local (",n.timezoneOffset,") ")}}function gk(t,e){if(t&1){let n=Me();m(0,"span",17),k("click",function(){j(n);let r=E();return U(r.toggleMenu())}),I(1,"i",18),v()}}var bC=(()=>{let e=class e{constructor(i,r){this.settingsService=i,this.config=r,this.title="angular.2";let o=new Date().getTimezoneOffset(),s=Math.abs(o%60)*30,a=Math.floor(Math.abs(o/60)),l=Math.sign(o);l===0?this.timezoneOffset="+0000":l===1?this.timezoneOffset="-"+c(a)+c(s):l===-1&&(this.timezoneOffset="+"+c(a)+c(s));function c(u){let d=u.toString();return d.length<2&&(d="0".repeat(2-d.length)+d),d}}toggleMenu(){this.config.menuActive||setTimeout(()=>{this.config.menuActive=!this.config.menuActive},0)}};e.\u0275fac=function(r){return new(r||e)(D(Je),D(wn))},e.\u0275cmp=oe({type:e,selectors:[["app-root"]],standalone:!1,decls:31,vars:7,consts:[[1,"header","bg","medium","fg","white","horizontal","align-center","flex","layout"],["src","assets/caps.svg",2,"height","4em"],[1,"expanding","top","bottom","attached","content","menu"],["title","Server Stats","routerLink","","routerLinkActive","active",1,"item",3,"routerLinkActiveOptions"],[1,"icon","fas","fa-chart-bar"],["title","Channels","routerLink","/channels","routerLinkActive","active",1,"item"],[1,"icon","fa-fw","fas","fa-bars"],["title","Apps","routerLink","/apps","routerLinkActive","active",1,"item"],["title","Settings","routerLink","/settings","routerLinkActive","active",1,"item"],[1,"icon","fas","fa-fw","fa-cog"],[1,"content","horizonal","flex","layout","align-center","usm-hide"],[1,"sm-menu-toggle","clickable","content"],[1,"main","container"],[1,"footer","bg","light"],[1,"content","text-center","fg","grey"],["id","_lastUpdated",2,"display","inline"],[1,"icon","fas","fa-fw","fa-puzzle-piece"],[1,"sm-menu-toggle","clickable","content",3,"click"],[1,"icon","fas","fa-bars","fa-2x"]],template:function(r,o){r&1&&(m(0,"div",0),I(1,"img",1),m(2,"div",2)(3,"a",3),I(4,"i",4),m(5,"span"),C(6,"Server Stats"),v()(),m(7,"a",5),I(8,"i",6),m(9,"span"),C(10,"Channels"),v()(),ue(11,fk,4,0,"a",7),m(12,"a",8),I(13,"i",9),m(14,"span"),C(15,"Settings"),v()()(),m(16,"div",10),C(17," Time Zone: "),m(18,"strong"),ue(19,hk,2,0,"span")(20,pk,2,1,"span"),v(),C(21," | CAPS: "),m(22,"strong"),C(23),v()(),ue(24,gk,2,0,"span",11),v(),m(25,"div",12),I(26,"router-outlet"),v(),m(27,"div",13)(28,"div",14),C(29," \xA9 gempa GmbH "),I(30,"p",15),v()()),r&2&&(w(3),V("routerLinkActiveOptions",ir(6,dk)),w(8),Y((o.config.apps==null?null:o.config.apps.length)>0?11:-1),w(8),Y(o.settingsService.settings.UseLocalTime?-1:19),w(),Y(o.settingsService.settings.UseLocalTime?20:-1),w(3),he(o.config.version),w(),Y(o.config.menuEnabled?24:-1))},dependencies:[Bp,Jc,Qw],encapsulation:2});let t=e;return t})();function mk(t){return()=>t.load()}var EC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e,bootstrap:[bC]}),e.\u0275inj=it({providers:[ds,kn,Oc,So,gu,ds,Io,Je,wn,G0(()=>mk(b(wn))()),Ky(Jy())],imports:[u_,Ci,k_,Y_,rw,DC]});let t=e;return t})();var SC={production:!0};SC.production&&void 0;c_().bootstrapModule(EC).catch(t=>console.error(t));