UNPKG

@mxtommy/kip

Version:

An advanced and versatile marine instrumentation package to display Signal K data.

4 lines 396 kB
var f_=Object.create;var _c=Object.defineProperty,p_=Object.defineProperties,h_=Object.getOwnPropertyDescriptor,m_=Object.getOwnPropertyDescriptors,g_=Object.getOwnPropertyNames,Ri=Object.getOwnPropertySymbols,y_=Object.getPrototypeOf,Dc=Object.prototype.hasOwnProperty,ip=Object.prototype.propertyIsEnumerable;var op=(e,t,n)=>t in e?_c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t||={})Dc.call(t,n)&&op(e,n,t[n]);if(Ri)for(var n of Ri(t))ip.call(t,n)&&op(e,n,t[n]);return e},Z=(e,t)=>p_(e,m_(t));var v_=(e,t)=>{var n={};for(var r in e)Dc.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ri)for(var r of Ri(e))t.indexOf(r)<0&&ip.call(e,r)&&(n[r]=e[r]);return n};var FS=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var b_=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of g_(t))!Dc.call(e,o)&&o!==n&&_c(e,o,{get:()=>t[o],enumerable:!(r=h_(t,o))||r.enumerable});return e};var PS=(e,t,n)=>(n=e!=null?f_(y_(e)):{},b_(t||!e||!e.__esModule?_c(n,"default",{value:e,enumerable:!0}):n,e));var ir=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{a(n.next(c))}catch(l){o(l)}},s=c=>{try{a(n.throw(c))}catch(l){o(l)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,s);a((n=n.apply(e,t)).next())});function T(e){return typeof e=="function"}function qt(e){let n=e(r=>{Error.call(r),r.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Ai=qt(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription: ${n.map((r,o)=>`${o+1}) ${r.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=n});function Dn(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var P=class e{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let i of n)i.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(T(r))try{r()}catch(i){t=i instanceof Ai?i.errors:[i]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let i of o)try{sp(i)}catch(s){t=t??[],s instanceof Ai?t=[...t,...s.errors]:t.push(s)}}if(t)throw new Ai(t)}}add(t){var n;if(t&&t!==this)if(this.closed)sp(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&Dn(n,t)}remove(t){let{_finalizers:n}=this;n&&Dn(n,t),t instanceof e&&t._removeParent(this)}};P.EMPTY=(()=>{let e=new P;return e.closed=!0,e})();var Ec=P.EMPTY;function Oi(e){return e instanceof P||e&&"closed"in e&&T(e.remove)&&T(e.add)&&T(e.unsubscribe)}function sp(e){T(e)?e():e.unsubscribe()}var tt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var sr={setTimeout(e,t,...n){let{delegate:r}=sr;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=sr;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function ki(e){sr.setTimeout(()=>{let{onUnhandledError:t}=tt;if(t)t(e);else throw e})}function Le(){}var ap=wc("C",void 0,void 0);function cp(e){return wc("E",void 0,e)}function lp(e){return wc("N",e,void 0)}function wc(e,t,n){return{kind:e,value:t,error:n}}var En=null;function ar(e){if(tt.useDeprecatedSynchronousErrorHandling){let t=!En;if(t&&(En={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=En;if(En=null,n)throw r}}else e()}function up(e){tt.useDeprecatedSynchronousErrorHandling&&En&&(En.errorThrown=!0,En.error=e)}var wn=class extends P{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Oi(t)&&t.add(this)):this.destination=E_}static create(t,n,r){return new nt(t,n,r)}next(t){this.isStopped?Cc(lp(t),this):this._next(t)}error(t){this.isStopped?Cc(cp(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Cc(ap,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},__=Function.prototype.bind;function Ic(e,t){return __.call(e,t)}var Tc=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){Fi(r)}}error(t){let{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){Fi(r)}else Fi(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){Fi(n)}}},nt=class extends wn{constructor(t,n,r){super();let o;if(T(t)||!t)o={next:t??void 0,error:n??void 0,complete:r??void 0};else{let i;this&&tt.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),o={next:t.next&&Ic(t.next,i),error:t.error&&Ic(t.error,i),complete:t.complete&&Ic(t.complete,i)}):o=t}this.destination=new Tc(o)}};function Fi(e){tt.useDeprecatedSynchronousErrorHandling?up(e):ki(e)}function D_(e){throw e}function Cc(e,t){let{onStoppedNotification:n}=tt;n&&sr.setTimeout(()=>n(e,t))}var E_={closed:!0,next:Le,error:D_,complete:Le};var cr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function ge(e){return e}function w_(...e){return xc(e)}function xc(e){return e.length===0?ge:e.length===1?e[0]:function(n){return e.reduce((r,o)=>o(r),n)}}var M=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,o){let i=C_(n)?n:new nt(n,r,o);return ar(()=>{let{operator:s,source:a}=this;i.add(s?s.call(i,a):a?this._subscribe(i):this._trySubscribe(i))}),i}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=dp(r),new r((o,i)=>{let s=new nt({next:a=>{try{n(a)}catch(c){i(c),s.unsubscribe()}},error:i,complete:o});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[cr](){return this}pipe(...n){return xc(n)(this)}toPromise(n){return n=dp(n),new n((r,o)=>{let i;this.subscribe(s=>i=s,s=>o(s),()=>r(i))})}}return e.create=t=>new e(t),e})();function dp(e){var t;return(t=e??tt.Promise)!==null&&t!==void 0?t:Promise}function I_(e){return e&&T(e.next)&&T(e.error)&&T(e.complete)}function C_(e){return e&&e instanceof wn||I_(e)&&Oi(e)}var fp=qt(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var k=(()=>{class e extends M{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new Pi(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new fp}next(n){ar(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){ar(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){ar(()=>{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:r,isStopped:o,observers:i}=this;return r||o?Ec:(this.currentObservers=null,i.push(n),new P(()=>{this.currentObservers=null,Dn(i,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:o,isStopped:i}=this;r?n.error(o):i&&n.complete()}asObservable(){let n=new M;return n.source=this,n}}return e.create=(t,n)=>new Pi(t,n),e})(),Pi=class extends k{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,t)}error(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.call(n,t)}complete(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)}_subscribe(t){var n,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&r!==void 0?r:Ec}};function Sc(e){return T(e?.lift)}function w(e){return t=>{if(Sc(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function D(e,t,n,r,o){return new Mc(e,t,n,r,o)}var Mc=class extends wn{constructor(t,n,r,o,i,s){super(t),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(c){t.error(c)}}:super._next,this._error=o?function(a){try{o(a)}catch(c){t.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};function ee(e,t){return w((n,r)=>{let o=0;n.subscribe(D(r,i=>{r.next(e.call(t,i,o++))}))})}var Li=class extends P{constructor(t,n){super()}schedule(t,n=0){return this}};var co={setInterval(e,t,...n){let{delegate:r}=co;return r?.setInterval?r.setInterval(e,t,...n):setInterval(e,t,...n)},clearInterval(e){let{delegate:t}=co;return(t?.clearInterval||clearInterval)(e)},delegate:void 0};var lr=class extends Li{constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){var r;if(this.closed)return this;this.state=t;let o=this.id,i=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(i,o,n)),this.pending=!0,this.delay=n,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(i,this.id,n),this}requestAsyncId(t,n,r=0){return co.setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,n,r=0){if(r!=null&&this.delay===r&&this.pending===!1)return n;n!=null&&co.clearInterval(n)}execute(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let r=this._execute(t,n);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let r=!1,o;try{this.work(t)}catch(i){r=!0,o=i||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),o}unsubscribe(){if(!this.closed){let{id:t,scheduler:n}=this,{actions:r}=n;this.work=this.state=this.scheduler=null,this.pending=!1,Dn(r,this),t!=null&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,super.unsubscribe()}}};var lo={now(){return(lo.delegate||Date).now()},delegate:void 0};var ur=class e{constructor(t,n=e.now){this.schedulerActionCtor=t,this.now=n}schedule(t,n=0,r){return new this.schedulerActionCtor(this,t).schedule(r,n)}};ur.now=lo.now;var dr=class extends ur{constructor(t,n=ur.now){super(t,n),this.actions=[],this._active=!1}flush(t){let{actions:n}=this;if(this._active){n.push(t);return}let r;this._active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}};var xe=new dr(lr),pp=xe;function Yt(e,t=xe){return w((n,r)=>{let o=null,i=null,s=null,a=()=>{if(o){o.unsubscribe(),o=null;let l=i;i=null,r.next(l)}};function c(){let l=s+e,u=t.now();if(u<l){o=this.schedule(void 0,l-u),r.add(o);return}a()}n.subscribe(D(r,l=>{i=l,s=t.now(),o||(o=t.schedule(c,e),r.add(o))},()=>{a(),r.complete()},void 0,()=>{i=o=null}))})}function mp(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{l(r.next(u))}catch(d){s(d)}}function c(u){try{l(r.throw(u))}catch(d){s(d)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((r=r.apply(e,t||[])).next())})}function hp(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function In(e){return this instanceof In?(this.v=e,this):new In(e)}function gp(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(p){return function(m){return Promise.resolve(m).then(p,d)}}function a(p,m){r[p]&&(o[p]=function(g){return new Promise(function(b,v){i.push([p,g,b,v])>1||c(p,g)})},m&&(o[p]=m(o[p])))}function c(p,m){try{l(r[p](m))}catch(g){h(i[0][3],g)}}function l(p){p.value instanceof In?Promise.resolve(p.value.v).then(u,d):h(i[0][2],p)}function u(p){c("next",p)}function d(p){c("throw",p)}function h(p,m){p(m),i.shift(),i.length&&c(i[0][0],i[0][1])}}function yp(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof hp=="function"?hp(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}var fr=e=>e&&typeof e.length=="number"&&typeof e!="function";function ji(e){return T(e?.then)}function Bi(e){return T(e[cr])}function Vi(e){return Symbol.asyncIterator&&T(e?.[Symbol.asyncIterator])}function Hi(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function T_(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ui=T_();function $i(e){return T(e?.[Ui])}function zi(e){return gp(this,arguments,function*(){let n=e.getReader();try{for(;;){let{value:r,done:o}=yield In(n.read());if(o)return yield In(void 0);yield yield In(r)}}finally{n.releaseLock()}})}function Wi(e){return T(e?.getReader)}function A(e){if(e instanceof M)return e;if(e!=null){if(Bi(e))return x_(e);if(fr(e))return S_(e);if(ji(e))return M_(e);if(Vi(e))return vp(e);if($i(e))return N_(e);if(Wi(e))return R_(e)}throw Hi(e)}function x_(e){return new M(t=>{let n=e[cr]();if(T(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function S_(e){return new M(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function M_(e){return new M(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,ki)})}function N_(e){return new M(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function vp(e){return new M(t=>{A_(e,t).catch(n=>t.error(n))})}function R_(e){return vp(zi(e))}function A_(e,t){var n,r,o,i;return mp(this,void 0,void 0,function*(){try{for(n=yp(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){o={error:s}}finally{try{r&&!r.done&&(i=n.return)&&(yield i.call(n))}finally{if(o)throw o.error}}t.complete()})}function bp(e,t){return w((n,r)=>{let{leading:o=!0,trailing:i=!1}=t??{},s=!1,a=null,c=null,l=!1,u=()=>{c?.unsubscribe(),c=null,i&&(p(),l&&r.complete())},d=()=>{c=null,l&&r.complete()},h=m=>c=A(e(m)).subscribe(D(r,u,d)),p=()=>{if(s){s=!1;let m=a;a=null,r.next(m),!l&&h(m)}};n.subscribe(D(r,m=>{s=!0,a=m,!(c&&!c.closed)&&(o?p():h(m))},()=>{l=!0,!(i&&s&&c&&!c.closed)&&r.complete()}))})}function Gi(e){return e&&T(e.schedule)}function qi(e){return e instanceof Date&&!isNaN(e)}function Rt(e=0,t,n=pp){let r=-1;return t!=null&&(Gi(t)?n=t:r=t),new M(o=>{let i=qi(e)?+e-n.now():e;i<0&&(i=0);let s=0;return n.schedule(function(){o.closed||(o.next(s++),0<=r?this.schedule(void 0,r):o.complete())},i)})}function O_(e,t=xe,n){let r=Rt(e,t);return bp(()=>r,n)}function Nc(){return w((e,t)=>{let n=null;e._refCount++;let r=D(t,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount){n=null;return}let o=e._connection,i=n;n=null,o&&(!i||o===i)&&o.unsubscribe(),t.unsubscribe()});e.subscribe(r),r.closed||(n=e.connect())})}var uo=class extends M{constructor(t,n){super(),this.source=t,this.subjectFactory=n,this._subject=null,this._refCount=0,this._connection=null,Sc(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new P;let n=this.getSubject();t.add(this.source.subscribe(D(n,void 0,()=>{this._teardown(),n.complete()},r=>{this._teardown(),n.error(r)},()=>this._teardown()))),t.closed&&(this._connection=null,t=P.EMPTY)}return t}refCount(){return Nc()(this)}};var pr={schedule(e){let t=requestAnimationFrame,n=cancelAnimationFrame,{delegate:r}=pr;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);let o=t(i=>{n=void 0,e(i)});return new P(()=>n?.(o))},requestAnimationFrame(...e){let{delegate:t}=pr;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=pr;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0};var Cn=class extends k{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){let{hasError:t,thrownError:n,_value:r}=this;if(t)throw n;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}};var hr=class extends k{constructor(t=1/0,n=1/0,r=lo){super(),this._bufferSize=t,this._windowTime=n,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=n===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,n)}next(t){let{isStopped:n,_buffer:r,_infiniteTimeWindow:o,_timestampProvider:i,_windowTime:s}=this;n||(r.push(t),!o&&r.push(i.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let n=this._innerSubscribe(t),{_infiniteTimeWindow:r,_buffer:o}=this,i=o.slice();for(let s=0;s<i.length&&!t.closed;s+=r?1:2)t.next(i[s]);return this._checkFinalizedStatuses(t),n}_trimBuffer(){let{_bufferSize:t,_timestampProvider:n,_buffer:r,_infiniteTimeWindow:o}=this,i=(o?1:2)*t;if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!o){let s=n.now(),a=0;for(let c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+1)}}};var Yi=class extends lr{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}requestAsyncId(t,n,r=0){return r!==null&&r>0?super.requestAsyncId(t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=pr.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,n,r=0){var o;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(t,n,r);let{actions:i}=t;n!=null&&n===t._scheduled&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==n&&(pr.cancelAnimationFrame(n),t._scheduled=void 0)}};var Zi=class extends dr{flush(t){this._active=!0;let n;t?n=t.id:(n=this._scheduled,this._scheduled=void 0);let{actions:r}=this,o;t=t||r.shift();do if(o=t.execute(t.state,t.delay))break;while((t=r[0])&&t.id===n&&r.shift());if(this._active=!1,o){for(;(t=r[0])&&t.id===n&&r.shift();)t.unsubscribe();throw o}}};var _p=new Zi(Yi);var Tn=new M(e=>e.complete());function Rc(e){return e[e.length-1]}function mr(e){return T(Rc(e))?e.pop():void 0}function yt(e){return Gi(Rc(e))?e.pop():void 0}function Dp(e,t){return typeof Rc(e)=="number"?e.pop():t}function _e(e,t,n,r=0,o=!1){let i=t.schedule(function(){n(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}function Ki(e,t=0){return w((n,r)=>{n.subscribe(D(r,o=>_e(r,e,()=>r.next(o),t),()=>_e(r,e,()=>r.complete(),t),o=>_e(r,e,()=>r.error(o),t)))})}function Xi(e,t=0){return w((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function Ep(e,t){return A(e).pipe(Xi(t),Ki(t))}function wp(e,t){return A(e).pipe(Xi(t),Ki(t))}function Ip(e,t){return new M(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Cp(e,t){return new M(n=>{let r;return _e(n,t,()=>{r=e[Ui](),_e(n,t,()=>{let o,i;try{({value:o,done:i}=r.next())}catch(s){n.error(s);return}i?n.complete():n.next(o)},0,!0)}),()=>T(r?.return)&&r.return()})}function Qi(e,t){if(!e)throw new Error("Iterable cannot be null");return new M(n=>{_e(n,t,()=>{let r=e[Symbol.asyncIterator]();_e(n,t,()=>{r.next().then(o=>{o.done?n.complete():n.next(o.value)})},0,!0)})})}function Tp(e,t){return Qi(zi(e),t)}function xp(e,t){if(e!=null){if(Bi(e))return Ep(e,t);if(fr(e))return Ip(e,t);if(ji(e))return wp(e,t);if(Vi(e))return Qi(e,t);if($i(e))return Cp(e,t);if(Wi(e))return Tp(e,t)}throw Hi(e)}function vt(e,t){return t?xp(e,t):A(e)}function Zt(...e){let t=yt(e);return vt(e,t)}function k_(e,t){let n=T(e)?e:()=>e,r=o=>o.error(n());return new M(t?o=>t.schedule(r,0,o):r)}function Sp(e){return!!e&&(e instanceof M||T(e.lift)&&T(e.subscribe))}var rt=qt(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function F_(e,t){let n=typeof t=="object";return new Promise((r,o)=>{let i=!1,s;e.subscribe({next:a=>{s=a,i=!0},error:o,complete:()=>{i?r(s):n?r(t.defaultValue):o(new rt)}})})}function P_(e,t){let n=typeof t=="object";return new Promise((r,o)=>{let i=new nt({next:s=>{r(s),i.unsubscribe()},error:o,complete:()=>{n?r(t.defaultValue):o(new rt)}});e.subscribe(i)})}var L_=qt(e=>function(n=null){e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n});function j_(e,t){let{first:n,each:r,with:o=B_,scheduler:i=t??xe,meta:s=null}=qi(e)?{first:e}:typeof e=="number"?{each:e}:e;if(n==null&&r==null)throw new TypeError("No timeout provided.");return w((a,c)=>{let l,u,d=null,h=0,p=m=>{u=_e(c,i,()=>{try{l.unsubscribe(),A(o({meta:s,lastValue:d,seen:h})).subscribe(c)}catch(g){c.error(g)}},m)};l=a.subscribe(D(c,m=>{u?.unsubscribe(),h++,c.next(d=m),r>0&&p(r)},void 0,void 0,()=>{u?.closed||u?.unsubscribe(),d=null})),!h&&p(n!=null?typeof n=="number"?n:+n-i.now():r)})}function B_(e){throw new L_(e)}var{isArray:V_}=Array;function H_(e,t){return V_(t)?e(...t):e(t)}function gr(e){return ee(t=>H_(e,t))}var{isArray:U_}=Array,{getPrototypeOf:$_,prototype:z_,keys:W_}=Object;function Ji(e){if(e.length===1){let t=e[0];if(U_(t))return{args:t,keys:null};if(G_(t)){let n=W_(t);return{args:n.map(r=>t[r]),keys:n}}}return{args:e,keys:null}}function G_(e){return e&&typeof e=="object"&&$_(e)===z_}function es(e,t){return e.reduce((n,r,o)=>(n[r]=t[o],n),{})}function Ac(...e){let t=yt(e),n=mr(e),{args:r,keys:o}=Ji(e);if(r.length===0)return vt([],t);let i=new M(q_(r,t,o?s=>es(o,s):ge));return n?i.pipe(gr(n)):i}function q_(e,t,n=ge){return r=>{Mp(t,()=>{let{length:o}=e,i=new Array(o),s=o,a=o;for(let c=0;c<o;c++)Mp(t,()=>{let l=vt(e[c],t),u=!1;l.subscribe(D(r,d=>{i[c]=d,u||(u=!0,a--),a||r.next(n(i.slice()))},()=>{--s||r.complete()}))},r)},r)}}function Mp(e,t,n){e?_e(n,e,t):t()}function Np(e,t,n,r,o,i,s,a){let c=[],l=0,u=0,d=!1,h=()=>{d&&!c.length&&!l&&t.complete()},p=g=>l<r?m(g):c.push(g),m=g=>{i&&t.next(g),l++;let b=!1;A(n(g,u++)).subscribe(D(t,v=>{o?.(v),i?p(v):t.next(v)},()=>{b=!0},void 0,()=>{if(b)try{for(l--;c.length&&l<r;){let v=c.shift();s?_e(t,s,()=>m(v)):m(v)}h()}catch(v){t.error(v)}}))};return e.subscribe(D(t,p,()=>{d=!0,h()})),()=>{a?.()}}function ot(e,t,n=1/0){return T(t)?ot((r,o)=>ee((i,s)=>t(r,i,o,s))(A(e(r,o))),n):(typeof t=="number"&&(n=t),w((r,o)=>Np(r,o,e,n)))}function fo(e=1/0){return ot(ge,e)}function Rp(){return fo(1)}function Kt(...e){return Rp()(vt(e,yt(e)))}function Y_(e){return new M(t=>{A(e()).subscribe(t)})}function Z_(...e){let t=mr(e),{args:n,keys:r}=Ji(e),o=new M(i=>{let{length:s}=n;if(!s){i.complete();return}let a=new Array(s),c=s,l=s;for(let u=0;u<s;u++){let d=!1;A(n[u]).subscribe(D(i,h=>{d||(d=!0,l--),a[u]=h},()=>c--,void 0,()=>{(!c||!d)&&(l||i.next(r?es(r,a):a),i.complete())}))}});return t?o.pipe(gr(t)):o}var K_=["addListener","removeListener"],X_=["addEventListener","removeEventListener"],Q_=["on","off"];function Oc(e,t,n,r){if(T(n)&&(r=n,n=void 0),r)return Oc(e,t,n).pipe(gr(r));let[o,i]=tD(e)?X_.map(s=>a=>e[s](t,a,n)):J_(e)?K_.map(Ap(e,t)):eD(e)?Q_.map(Ap(e,t)):[];if(!o&&fr(e))return ot(s=>Oc(s,t,n))(A(e));if(!o)throw new TypeError("Invalid event target");return new M(s=>{let a=(...c)=>s.next(1<c.length?c:c[0]);return o(a),()=>i(a)})}function Ap(e,t){return n=>r=>e[n](t,r)}function J_(e){return T(e.addListener)&&T(e.removeListener)}function eD(e){return T(e.on)&&T(e.off)}function tD(e){return T(e.addEventListener)&&T(e.removeEventListener)}function kc(e=0,t=xe){return e<0&&(e=0),Rt(e,e,t)}function nD(...e){let t=yt(e),n=Dp(e,1/0),r=e;return r.length?r.length===1?A(r[0]):fo(n)(vt(r,t)):Tn}function ye(e,t){return w((n,r)=>{let o=0;n.subscribe(D(r,i=>e.call(t,i,o++)&&r.next(i)))})}function Op(e){return w((t,n)=>{let r=!1,o=null,i=null,s=!1,a=()=>{if(i?.unsubscribe(),i=null,r){r=!1;let l=o;o=null,n.next(l)}s&&n.complete()},c=()=>{i=null,s&&n.complete()};t.subscribe(D(n,l=>{r=!0,o=l,i||A(e(l)).subscribe(i=D(n,a,c))},()=>{s=!0,(!r||!i||i.closed)&&n.complete()}))})}function ts(e,t=xe){return Op(()=>Rt(e,t))}function Fc(e){return w((t,n)=>{let r=null,o=!1,i;r=t.subscribe(D(n,void 0,void 0,s=>{i=A(e(s,Fc(e)(t))),r?(r.unsubscribe(),r=null,i.subscribe(n)):o=!0})),o&&(r.unsubscribe(),r=null,i.subscribe(n))})}function kp(e,t,n,r,o){return(i,s)=>{let a=n,c=t,l=0;i.subscribe(D(s,u=>{let d=l++;c=a?e(c,u,d):(a=!0,u),r&&s.next(c)},o&&(()=>{a&&s.next(c),s.complete()})))}}function ns(e,t){return T(t)?ot(e,t,1):ot(e,1)}function rD(e){return w((t,n)=>{let r=!1,o=null,i=null,s=()=>{if(i?.unsubscribe(),i=null,r){r=!1;let a=o;o=null,n.next(a)}};t.subscribe(D(n,a=>{i?.unsubscribe(),r=!0,o=a,i=D(n,s,Le),A(e(a)).subscribe(i)},()=>{s(),n.complete()},void 0,()=>{o=i=null}))})}function po(e){return w((t,n)=>{let r=!1;t.subscribe(D(n,o=>{r=!0,n.next(o)},()=>{r||n.next(e),n.complete()}))})}function Xt(e){return e<=0?()=>Tn:w((t,n)=>{let r=0;t.subscribe(D(n,o=>{++r<=e&&(n.next(o),e<=r&&n.complete())}))})}function Fp(){return w((e,t)=>{e.subscribe(D(t,Le))})}function Pc(e){return ee(()=>e)}function rs(e,t){return t?n=>Kt(t.pipe(Xt(1),Fp()),n.pipe(rs(e))):ot((n,r)=>A(e(n,r)).pipe(Xt(1),Pc(n)))}function oD(e,t=xe){let n=Rt(e,t);return rs(()=>n)}function os(e,t=ge){return e=e??iD,w((n,r)=>{let o,i=!0;n.subscribe(D(r,s=>{let a=t(s);(i||!e(o,a))&&(i=!1,o=a,r.next(s))}))})}function iD(e,t){return e===t}function is(e=sD){return w((t,n)=>{let r=!1;t.subscribe(D(n,o=>{r=!0,n.next(o)},()=>r?n.complete():n.error(e())))})}function sD(){return new rt}function ho(e){return w((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function aD(e,t){let n=arguments.length>=2;return r=>r.pipe(e?ye((o,i)=>e(o,i,r)):ge,Xt(1),n?po(t):is(()=>new rt))}function Lc(e){return e<=0?()=>Tn:w((t,n)=>{let r=[];t.subscribe(D(n,o=>{r.push(o),e<r.length&&r.shift()},()=>{for(let o of r)n.next(o);n.complete()},void 0,()=>{r=null}))})}function cD(e,t){let n=arguments.length>=2;return r=>r.pipe(e?ye((o,i)=>e(o,i,r)):ge,Lc(1),n?po(t):is(()=>new rt))}function Pp(){return w((e,t)=>{let n,r=!1;e.subscribe(D(t,o=>{let i=n;n=o,r&&t.next([i,o]),r=!0}))})}function lD(e){return w((t,n)=>{let r,o=!1,i,s=()=>{r=t.subscribe(D(n,void 0,void 0,a=>{i||(i=new k,A(e(i)).subscribe(D(n,()=>r?s():o=!0))),i&&i.next(a)})),o&&(r.unsubscribe(),r=null,o=!1,s())};s()})}function Lp(e){return w((t,n)=>{let r=!1,o=null;t.subscribe(D(n,i=>{r=!0,o=i})),A(e).subscribe(D(n,()=>{if(r){r=!1;let i=o;o=null,n.next(i)}},Le))})}function uD(e,t=xe){return Lp(kc(e,t))}function dD(e,t){return w(kp(e,t,arguments.length>=2,!0))}function Bc(e={}){let{connector:t=()=>new k,resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:o=!0}=e;return i=>{let s,a,c,l=0,u=!1,d=!1,h=()=>{a?.unsubscribe(),a=void 0},p=()=>{h(),s=c=void 0,u=d=!1},m=()=>{let g=s;p(),g?.unsubscribe()};return w((g,b)=>{l++,!d&&!u&&h();let v=c=c??t();b.add(()=>{l--,l===0&&!d&&!u&&(a=jc(m,o))}),v.subscribe(b),!s&&l>0&&(s=new nt({next:q=>v.next(q),error:q=>{d=!0,h(),a=jc(p,n,q),v.error(q)},complete:()=>{u=!0,h(),a=jc(p,r),v.complete()}}),A(g).subscribe(s))})(i)}}function jc(e,t,...n){if(t===!0){e();return}if(t===!1)return;let r=new nt({next:()=>{r.unsubscribe(),e()}});return A(t(...n)).subscribe(r)}function jp(e,t,n){let r,o=!1;return e&&typeof e=="object"?{bufferSize:r=1/0,windowTime:t=1/0,refCount:o=!1,scheduler:n}=e:r=e??1/0,Bc({connector:()=>new hr(r,t,n),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function yr(e){return ye((t,n)=>e<=n)}function mo(...e){let t=yt(e);return w((n,r)=>{(t?Kt(e,n,t):Kt(e,n)).subscribe(r)})}function ss(e,t){return w((n,r)=>{let o=null,i=0,s=!1,a=()=>s&&!o&&r.complete();n.subscribe(D(r,c=>{o?.unsubscribe();let l=0,u=i++;A(e(c,u)).subscribe(o=D(r,d=>r.next(t?t(c,d,u,l++):d),()=>{o=null,a()}))},()=>{s=!0,a()}))})}function Qt(e){return w((t,n)=>{A(e).subscribe(D(n,()=>n.complete(),Le)),!n.closed&&t.subscribe(n)})}function Vc(e,t=!1){return w((n,r)=>{let o=0;n.subscribe(D(r,i=>{let s=e(i,o++);(s||t)&&r.next(i),!s&&r.complete()}))})}function as(e,t,n){let r=T(e)||t||n?{next:e,error:t,complete:n}:e;return r?w((o,i)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;o.subscribe(D(i,c=>{var l;(l=r.next)===null||l===void 0||l.call(r,c),i.next(c)},()=>{var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),i.complete()},c=>{var l;a=!1,(l=r.error)===null||l===void 0||l.call(r,c),i.error(c)},()=>{var c,l;a&&((c=r.unsubscribe)===null||c===void 0||c.call(r)),(l=r.finalize)===null||l===void 0||l.call(r)}))}):ge}function fD(...e){let t=mr(e);return w((n,r)=>{let o=e.length,i=new Array(o),s=e.map(()=>!1),a=!1;for(let c=0;c<o;c++)A(e[c]).subscribe(D(r,l=>{i[c]=l,!a&&!s[c]&&(s[c]=!0,(a=s.every(ge))&&(s=null))},Le));n.subscribe(D(r,c=>{if(a){let l=[c,...i];r.next(t?t(...l):l)}}))})}var Hc;function cs(){return Hc}function bt(e){let t=Hc;return Hc=e,t}var Bp=Symbol("NotFound");function vr(e){return e===Bp||e?.name==="\u0275NotFound"}function go(e,t){return Object.is(e,t)}var De=null,ls=!1,Uc=1,pD=null,te=Symbol("SIGNAL");function x(e){let t=De;return De=e,t}function us(){return De}var Ot={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function kt(e){if(ls)throw new Error("");if(De===null)return;De.consumerOnSignalRead(e);let t=De.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=De.recomputing;if(r&&(n=t!==void 0?t.nextProducer:De.producers,n!==void 0&&n.producer===e)){De.producersTail=n,n.lastReadVersion=e.version;return}let o=e.consumersTail;if(o!==void 0&&o.consumer===De&&(!r||mD(o,De)))return;let i=Dr(De),s={producer:e,consumer:De,nextProducer:n,prevConsumer:o,lastReadVersion:e.version,nextConsumer:void 0};De.producersTail=s,t!==void 0?t.nextProducer=s:De.producers=s,i&&Hp(e,s)}function Vp(){Uc++}function Sn(e){if(!(Dr(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Uc)){if(!e.producerMustRecompute(e)&&!Mn(e)){br(e);return}e.producerRecomputeValue(e),br(e)}}function $c(e){if(e.consumers===void 0)return;let t=ls;ls=!0;try{for(let n=e.consumers;n!==void 0;n=n.nextConsumer){let r=n.consumer;r.dirty||hD(r)}}finally{ls=t}}function zc(){return De?.consumerAllowSignalWrites!==!1}function hD(e){e.dirty=!0,$c(e),e.consumerMarkedDirty?.(e)}function br(e){e.dirty=!1,e.lastCleanEpoch=Uc}function _t(e){return e&&(e.producersTail=void 0,e.recomputing=!0),x(e)}function Ft(e,t){if(x(t),!e)return;e.recomputing=!1;let n=e.producersTail,r=n!==void 0?n.nextProducer:e.producers;if(r!==void 0){if(Dr(e))do r=Wc(r);while(r!==void 0);n!==void 0?n.nextProducer=void 0:e.producers=void 0}}function Mn(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let n=t.producer,r=t.lastReadVersion;if(r!==n.version||(Sn(n),r!==n.version))return!0}return!1}function _r(e){if(Dr(e)){let t=e.producers;for(;t!==void 0;)t=Wc(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function Hp(e,t){let n=e.consumersTail,r=Dr(e);if(n!==void 0?(t.nextConsumer=n.nextConsumer,n.nextConsumer=t):(t.nextConsumer=void 0,e.consumers=t),t.prevConsumer=n,e.consumersTail=t,!r)for(let o=e.producers;o!==void 0;o=o.nextProducer)Hp(o.producer,o)}function Wc(e){let t=e.producer,n=e.nextProducer,r=e.nextConsumer,o=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r!==void 0?r.prevConsumer=o:t.consumersTail=o,o!==void 0)o.nextConsumer=r;else if(t.consumers=r,!Dr(t)){let i=t.producers;for(;i!==void 0;)i=Wc(i)}return n}function Dr(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function yo(e){pD?.(e)}function mD(e,t){let n=t.producersTail;if(n!==void 0){let r=t.producers;do{if(r===e)return!0;if(r===n)break;r=r.nextProducer}while(r!==void 0)}return!1}function vo(e,t){let n=Object.create(gD);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(Sn(n),kt(n),n.value===At)throw n.error;return n.value};return r[te]=n,yo(n),r}var Jt=Symbol("UNSET"),xn=Symbol("COMPUTING"),At=Symbol("ERRORED"),gD=Z(R({},Ot),{value:Jt,dirty:!0,error:null,equal:go,kind:"computed",producerMustRecompute(e){return e.value===Jt||e.value===xn},producerRecomputeValue(e){if(e.value===xn)throw new Error("");let t=e.value;e.value=xn;let n=_t(e),r,o=!1;try{r=e.computation(),x(null),o=t!==Jt&&t!==At&&r!==At&&e.equal(t,r)}catch(i){r=At,e.error=i}finally{Ft(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function yD(){throw new Error}var Up=yD;function $p(e){Up(e)}function Gc(e){Up=e}var vD=null;function qc(e,t){let n=Object.create(bo);n.value=e,t!==void 0&&(n.equal=t);let r=()=>zp(n);return r[te]=n,yo(n),[r,s=>en(n,s),s=>ds(n,s)]}function zp(e){return kt(e),e.value}function en(e,t){zc()||$p(e),e.equal(e.value,t)||(e.value=t,bD(e))}function ds(e,t){zc()||$p(e),en(e,t(e.value))}var bo=Z(R({},Ot),{equal:go,value:void 0,kind:"signal"});function bD(e){e.version++,Vp(),$c(e),vD?.(e)}function Yc(e,t,n){let r=Object.create(_D);r.source=e,r.computation=t,n!=null&&(r.equal=n);let i=()=>{if(Sn(r),kt(r),r.value===At)throw r.error;return r.value};return i[te]=r,yo(r),i}function Wp(e,t){Sn(e),en(e,t),br(e)}function Gp(e,t){Sn(e),ds(e,t),br(e)}var _D=Z(R({},Ot),{value:Jt,dirty:!0,error:null,equal:go,kind:"linkedSignal",producerMustRecompute(e){return e.value===Jt||e.value===xn},producerRecomputeValue(e){if(e.value===xn)throw new Error("");let t=e.value;e.value=xn;let n=_t(e),r;try{let o=e.source(),i=t===Jt||t===At?void 0:{source:e.sourceValue,value:t};r=e.computation(o,i),e.sourceValue=o}catch(o){r=At,e.error=o}finally{Ft(e,n)}if(t!==Jt&&r!==At&&e.equal(t,r)){e.value=t;return}e.value=r,e.version++}});function qp(e){let t=x(null);try{return e()}finally{x(t)}}var gs="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",E=class extends Error{code;constructor(t,n){super(Et(t,n)),this.code=t}};function DD(e){return`NG0${Math.abs(e)}`}function Et(e,t){return`${DD(e)}${t?": "+t:""}`}var wt=globalThis;function j(e){for(let t in e)if(e[t]===j)return t;throw Error("")}function Kp(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function Lt(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(Lt).join(", ")}]`;if(e==null)return""+e;let t=e.overriddenName||e.name;if(t)return`${t}`;let n=e.toString();if(n==null)return""+n;let r=n.indexOf(` `);return r>=0?n.slice(0,r):n}function ys(e,t){return e?t?`${e} ${t}`:e:t||""}var ED=j({__forward_ref__:j});function Co(e){return e.__forward_ref__=Co,e.toString=function(){return Lt(this())},e}function ue(e){return sl(e)?e():e}function sl(e){return typeof e=="function"&&e.hasOwnProperty(ED)&&e.__forward_ref__===Co}function Xp(e,t){e==null&&al(t,e,null,"!=")}function al(e,t,n,r){throw new Error(`ASSERTION ERROR: ${e}`+(r==null?"":` [Expected=> ${n} ${r} ${t} <=Actual]`))}function y(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Y(e){return{providers:e.providers||[],imports:e.imports||[]}}function To(e){return ID(e,vs)}function wD(e){return To(e)!==null}function ID(e,t){return e.hasOwnProperty(t)&&e[t]||null}function CD(e){let t=e?.[vs]??null;return t||null}function Kc(e){return e&&e.hasOwnProperty(ps)?e[ps]:null}var vs=j({\u0275prov:j}),ps=j({\u0275inj:j}),_=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(t,n){this._desc=t,this.\u0275prov=void 0,typeof n=="number"?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.\u0275prov=y({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function cl(e){return e&&!!e.\u0275providers}var ll=j({\u0275cmp:j}),ul=j({\u0275dir:j}),dl=j({\u0275pipe:j}),fl=j({\u0275mod:j}),Eo=j({\u0275fac:j}),kn=j({__NG_ELEMENT_ID__:j}),Yp=j({__NG_ENV_ID__:j});function $e(e){return typeof e=="string"?e:e==null?"":String(e)}function hs(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():$e(e)}var pl=j({ngErrorCode:j}),Qp=j({ngErrorMessage:j}),Do=j({ngTokenPath:j});function hl(e,t){return Jp("",-200,t)}function bs(e,t){throw new E(-201,!1)}function TD(e,t){e[Do]??=[];let n=e[Do],r;typeof t=="object"&&"multi"in t&&t?.multi===!0?(Xp(t.provide,"Token with multi: true should have a provide property"),r=hs(t.provide)):r=hs(t),n[0]!==r&&e[Do].unshift(r)}function xD(e,t){let n=e[Do],r=e[pl],o=e[Qp]||e.message;return e.message=MD(o,r,n,t),e}function Jp(e,t,n){let r=new E(t,e);return r[pl]=t,r[Qp]=e,n&&(r[Do]=n),r}function SD(e){return e[pl]}function MD(e,t,n=[],r=null){let o="";n&&n.length>1&&(o=` Path: ${n.join(" -> ")}.`);let i=r?` Source: ${r}.`:"";return Et(t,`${e}${i}${o}`)}var Xc;function eh(){return Xc}function Se(e){let t=Xc;return Xc=e,t}function ml(e,t,n){let r=To(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&8)return null;if(t!==void 0)return t;bs(e,"Injector")}var ND={},Nn=ND,Qc="__NG_DI_FLAG__",Jc=class{injector;constructor(t){this.injector=t}retrieve(t,n){let r=Rn(n)||0;try{return this.injector.get(t,r&8?null:Nn,r)}catch(o){if(vr(o))return o;throw o}}};function RD(e,t=0){let n=cs();if(n===void 0)throw new E(-203,!1);if(n===null)return ml(e,void 0,t);{let r=AD(t),o=n.retrieve(e,r);if(vr(o)){if(r.optional)return null;throw o}return o}}function B(e,t=0){return(eh()||RD)(ue(e),t)}function f(e,t){return B(e,Rn(t))}function Rn(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function AD(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function el(e){let t=[];for(let n=0;n<e.length;n++){let r=ue(e[n]);if(Array.isArray(r)){if(r.length===0)throw new E(900,!1);let o,i=0;for(let s=0;s<r.length;s++){let a=r[s],c=OD(a);typeof c=="number"?c===-1?o=a.token:i|=c:o=a}t.push(B(o,i))}else t.push(B(r))}return t}function gl(e,t){return e[Qc]=t,e.prototype[Qc]=t,e}function OD(e){return e[Qc]}function tn(e,t){let n=e.hasOwnProperty(Eo);return n?e[Eo]:null}function th(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let o=e[r],i=t[r];if(n&&(o=n(o),i=n(i)),i!==o)return!1}return!0}function nh(e){return e.flat(Number.POSITIVE_INFINITY)}function _s(e,t){e.forEach(n=>Array.isArray(n)?_s(n,t):t(n))}function yl(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function xo(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function rh(e,t){let n=[];for(let r=0;r<e;r++)n.push(t);return n}function oh(e,t,n,r){let o=e.length;if(o==t)e.push(n,r);else if(o===1)e.push(r,e[0]),e[0]=n;else{for(o--,e.push(e[o-1],e[o]);o>t;){let i=o-2;e[o]=e[i],o--}e[t]=n,e[t+1]=r}}function So(e,t,n){let r=wr(e,t);return r>=0?e[r|1]=n:(r=~r,oh(e,r,t,n)),r}function Ds(e,t){let n=wr(e,t);if(n>=0)return e[n|1]}function wr(e,t){return kD(e,t,1)}function kD(e,t,n){let r=0,o=e.length>>n;for(;o!==r;){let i=r+(o-r>>1),s=e[i<<n];if(t===s)return i<<n;s>t?o=i:r=i+1}return~(o<<n)}var it={},Ee=[],Fn=new _(""),vl=new _("",-1),bl=new _(""),wo=class{get(t,n=Nn){if(n===Nn){let o=Jp("",-201);throw o.name="\u0275NotFound",o}return n}};function _l(e){return e[fl]||null}function It(e){return e[ll]||null}function Es(e){return e[ul]||null}function ih(e){return e[dl]||null}function Mo(e){return{\u0275providers:e}}function sh(...e){return{\u0275providers:Dl(!0,e),\u0275fromNgModule:!0}}function Dl(e,...t){let n=[],r=new Set,o,i=s=>{n.push(s)};return _s(t,s=>{let a=s;ms(a,i,[],r)&&(o||=[],o.push(a))}),o!==void 0&&ah(o,i),n}function ah(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:o}=e[n];El(o,i=>{t(i,r)})}}function ms(e,t,n,r){if(e=ue(e),!e)return!1;let o=null,i=Kc(e),s=!i&&It(e);if(!i&&!s){let c=e.ngModule;if(i=Kc(c),i)o=c;else return!1}else{if(s&&!s.standalone)return!1;o=e}let a=r.has(o);if(s){if(a)return!1;if(r.add(o),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)ms(l,t,n,r)}}else if(i){if(i.imports!=null&&!a){r.add(o);let l;try{_s(i.imports,u=>{ms(u,t,n,r)&&(l||=[],l.push(u))})}finally{}l!==void 0&&ah(l,t)}if(!a){let l=tn(o)||(()=>new o);t({provide:o,useFactory:l,deps:Ee},o),t({provide:bl,useValue:o,multi:!0},o),t({provide:Fn,useValue:()=>B(o),multi:!0},o)}let c=i.providers;if(c!=null&&!a){let l=e;El(c,u=>{t(u,l)})}}else return!1;return o!==e&&e.providers!==void 0}function El(e,t){for(let n of e)cl(n)&&(n=n.\u0275providers),Array.isArray(n)?El(n,t):t(n)}var FD=j({provide:String,useValue:j});function ch(e){return e!==null&&typeof e=="object"&&FD in e}function PD(e){return!!(e&&e.useExisting)}function LD(e){return!!(e&&e.useFactory)}function An(e){return typeof e=="function"}function lh(e){return!!e.useClass}var wl=new _(""),fs={},Zp={},Zc;function Ir(){return Zc===void 0&&(Zc=new wo),Zc}var ae=class{},On=class extends ae{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,n,r,o){super(),this.parent=n,this.source=r,this.scopes=o,nl(t,s=>this.processProvider(s)),this.records.set(vl,Er(void 0,this)),o.has("environment")&&this.records.set(ae,Er(void 0,this));let i=this.records.get(wl);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(bl,Ee,{self:!0}))}retrieve(t,n){let r=Rn(n)||0;try{return this.get(t,Nn,r)}catch(o){if(vr(o))return o;throw o}}destroy(){_o(this),this._destroyed=!0;let t=x(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let n=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),x(t)}}onDestroy(t){return _o(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){_o(this);let n=bt(this),r=Se(void 0),o;try{return t()}finally{bt(n),Se(r)}}get(t,n=Nn,r){if(_o(this),t.hasOwnProperty(Yp))return t[Yp](this);let o=Rn(r),i,s=bt(this),a=Se(void 0);try{if(!(o&4)){let l=this.records.get(t);if(l===void 0){let u=UD(t)&&To(t);u&&this.injectableDefInScope(u)?l=Er(tl(t),fs):l=null,this.records.set(t,l)}if(l!=null)return this.hydrate(t,l,o)}let c=o&2?Ir():this.parent;return n=o&8&&n===Nn?null:n,c.get(t,n)}catch(c){let l=SD(c);throw l===-200||l===-201?new E(l,null):c}finally{Se(a),bt(s)}}resolveInjectorInitializers(){let t=x(null),n=bt(this),r=Se(void 0),o;try{let i=this.get(Fn,Ee,{self:!0});for(let s of i)s()}finally{bt(n),Se(r),x(t)}}toString(){let t=[],n=this.records;for(let r of n.keys())t.push(Lt(r));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=ue(t);let n=An(t)?t:ue(t&&t.provide),r=BD(t);if(!An(t)&&t.multi===!0){let o=this.records.get(n);o||(o=Er(void 0,fs,!0),o.factory=()=>el(o.multi),this.records.set(n,o)),n=t,o.multi.push(t)}this.records.set(n,r)}hydrate(t,n,r){let o=x(null);try{if(n.value===Zp)throw hl(Lt(t));return n.value===fs&&(n.value=Zp,n.value=n.factory(void 0,r)),typeof n.value=="object"&&n.value&&HD(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{x(o)}}injectableDefInScope(t){if(!t.providedIn)return!1;let n=ue(t.providedIn);return typeof n=="string"?n==="any"||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){let n=this._onDestroyHooks.indexOf(t);n!==-1&&this._onDestroyHooks.splice(n,1)}};function tl(e){let t=To(e),n=t!==null?t.factory:tn(e);if(n!==null)return n;if(e instanceof _)throw new E(204,!1);if(e instanceof Function)return jD(e);throw new E(204,!1)}function jD(e){if(e.length>0)throw new E(204,!1);let n=CD(e);return n!==null?()=>n.factory(e):()=>new e}function BD(e){if(ch(e))return Er(void 0,e.useValue);{let t=Il(e);return Er(t,fs)}}function Il(e,t,n){let r;if(An(e)){let o=ue(e);return tn(o)||tl(o)}else if(ch(e))r=()=>ue(e.useValue);else if(LD(e))r=()=>e.useFactory(...el(e.deps||[]));else if(PD(e))r=(o,i)=>B(ue(e.useExisting),i!==void 0&&i&8?8:void 0);else{let o=ue(e&&(e.useClass||e.provide));if(VD(e))r=()=>new o(...el(e.deps));else return tn(o)||tl(o)}return r}function _o(e){if(e.destroyed)throw new E(205,!1)}function Er(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function VD(e){return!!e.deps}function HD(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function UD(e){return typeof e=="function"||typeof e=="object"&&e.ngMetadataName==="InjectionToken"}function nl(e,t){for(let n of e)Array.isArray(n)?nl(n,t):n&&cl(n)?nl(n.\u0275providers,t):t(n)}function Cr(e,t){let n;e instanceof On?(_o(e),n=e):n=new Jc(e);let r,o=bt(n),i=Se(void 0);try{return t()}finally{bt(o),Se(i)}}function Cl(){return eh()!==void 0||cs()!=null}var st=0,C=1,S=2,de=3,ze=4,Me=5,Pn=6,Tr=7,re=8,Ln=9,Ct=10,H=11,xr=12,Tl=13,jn=14,Ne=15,rn=16,Bn=17,Tt=18,No=19,xl=20,Pt=21,ws=22,jt=23,je=24,Vn=25,U=26,uh=1,Sl=6,on=7,Ro=8,Hn=9,he=10;function xt(e){return Array.isArray(e)&&typeof e[uh]=="object"}function at(e){return Array.isArray(e)&&e[uh]===!0}function Ml(e){return(e.flags&4)!==0}function sn(e){return e.componentOffset>-1}function Sr(e){return(e.flags&1)===1}function ct(e){return!!e.template}function Mr(e){return(e[S]&512)!==0}function Un(e){return(e[S]&256)===256}var Nl="svg",dh="math";function We(e){for(;Array.isArray(e);)e=e[st];return e}function Rl(e,t){return We(t[e])}function lt(e,t){return We(t[e.index])}function Ao(e,t){return e.data[t]}function Nr(e,t){return e[t]}function Oo(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Ge(e,t){let n=t[e];return xt(n)?n:n[st]}function fh(e){return(e[S]&4)===4}function Is(e){return(e[S]&128)===128}function ph(e){return at(e[de])}function Be(e,t){return t==null?null:e[t]}function Al(e){e[Bn]=0}function Ol(e){e[S]&1024||(e[S]|=1024,Is(e)&&an(e))}function hh(e,t){for(;e>0;)t=t[jn],e--;return t}function ko(e){return!!(e[S]&9216||e[je]?.dirty)}function Cs(e){e[Ct].changeDetectionScheduler?.notify(8),e[S]&64&&(e[S]|=1024),ko(e)&&an(e)}function an(e){e[Ct].changeDetectionScheduler?.notify(0);let t=nn(e);for(;t!==null&&!(t[S]&8192||(t[S]|=8192,!Is(t)));)t=nn(t)}function kl(e,t){if(Un(e))throw new E(911,!1);e[Pt]===null&&(e[Pt]=[]),e[Pt].push(t)}function mh(e,t){if(e[Pt]===null)return;let n=e[Pt].indexOf(t);n!==-1&&e[Pt].splice(n,1)}function nn(e){let t=e[de];return at(t)?t[de]:t}function Fl(e){return e[Tr]??=[]}function Pl(e){return e.cleanup??=[]}function gh(e,t,n,r){let o=Fl(t);o.push(n),e.firstCreatePass&&Pl(e).push(r,o.length-1)}var O={lFrame:Sh(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Fo=function(e){return e[e.Off=0]="Off",e[e.Exhaustive=1]="Exhaustive",e[e.OnlyDirtyViews=2]="OnlyDirtyViews",e}(Fo||{}),$D=0,rl=!1;function yh(){return O.lFrame.elementDepthCount}function vh(){O.lFrame.elementDepthCount++}function Ll(){O.lFrame.elementDepthCount--}function Ts(){return O.bindingsEnabled}function jl(){return O.skipHydrationRootTNode!==null}function Bl(e){return O.skipHydrationRootTNode===e}function Vl(){O.skipHydrationRootTNode=null}function I(){return O.lFrame.lView}function $(){return O.lFrame.tView}function bh(e){return O.lFrame.contextLView=e,e[re]}function _h(e){return O.lFrame.contextLView=null,e}function ce(){let e=Hl();for(;e!==null&&e.type===64;)e=e.parent;return e}function Hl(){return O.lFrame.currentTNode}function Dh(){let e=O.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function $n(e,t){let n=O.lFrame;n.currentTNode=e,n.isParent=t}function Ul(){return O.lFrame.isParent}function $l(){O.lFrame.isParent=!1}function zl(){return O.lFrame.contextLView}function Wl(e){al("Must never be called in production mode"),$D=e}function Gl(){return rl}function Rr(e){let t=rl;return rl=e,t}function zn(){let e=O.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function ql(){return O.lFrame.bindingIndex}function Eh(e){return O.lFrame.bindingIndex=e}function Bt(){return O.lFrame.bindingIndex++}function Po(e){let t=O.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function wh(){return O.lFrame.inI18n}function Ih(e,t){let n=O.lFrame;n.bindingIndex=n.bindingRootIndex=e,xs(t)}function Ch(){return O.lFrame.currentDirectiveIndex}function xs(e){O.lFrame.currentDirectiveIndex=e}function Th(e){let t=O.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function Ss(){return O.lFrame.currentQueryIndex}function Lo(e){O.lFrame.currentQueryIndex=e}function zD(e){let t=e[C];return t.type===2?t.declTNode:t.type===1?e[Me]:null}function Yl(e,t,n){if(n&4){let o=t,