@codeursenior/pek 0.0.0-stage → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +128 -2
- package/dist/browser/3rdpartylicenses.txt +534 -0
- package/dist/browser/client-logos/chatgpt.webp +0 -0
- package/dist/browser/client-logos/claude.png +0 -0
- package/dist/browser/client-logos/copilot.svg +26 -0
- package/dist/browser/client-logos/cursor.png +0 -0
- package/dist/browser/favicon.svg +1 -0
- package/dist/browser/index.html +12 -0
- package/dist/browser/main-73Q4GOTD.js +8 -0
- package/dist/browser/mountain-context.jpg +0 -0
- package/dist/browser/styles-2QCIL5GS.css +1 -0
- package/dist/browser/third-party-licenses.txt +643 -0
- package/dist/cli.js +87 -0
- package/dist/contracts.js +1 -0
- package/dist/http/assets.js +42 -0
- package/dist/http/errors.js +7 -0
- package/dist/http/files.js +72 -0
- package/dist/http/security.js +16 -0
- package/dist/optimization-checks.js +57 -0
- package/dist/scan/assets.js +171 -0
- package/dist/scan/collect.js +107 -0
- package/dist/scan/graph.js +71 -0
- package/dist/scan/identity.js +61 -0
- package/dist/scan/mcp.js +111 -0
- package/dist/scan/metadata.js +67 -0
- package/dist/scan/references.js +46 -0
- package/dist/scan/types.js +1 -0
- package/dist/scan/values.js +36 -0
- package/dist/scanner.js +68 -0
- package/dist/server.js +127 -0
- package/dist/token-estimator.js +159 -0
- package/docs/architecture.md +47 -0
- package/docs/token-optimizer.md +56 -0
- package/package.json +87 -4
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var Dv=Object.defineProperty,wv=Object.defineProperties;var bv=Object.getOwnPropertyDescriptors;var Md=Object.getOwnPropertySymbols;var _v=Object.prototype.hasOwnProperty,Cv=Object.prototype.propertyIsEnumerable;var Nd=(e,t,n)=>t in e?Dv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ne=(e,t)=>{for(var n in t||={})_v.call(t,n)&&Nd(e,n,t[n]);if(Md)for(var n of Md(t))Cv.call(t,n)&&Nd(e,n,t[n]);return e},De=(e,t)=>wv(e,bv(t));var Ue=null,Di=!1,Ln=1,Iv=null,Be=Symbol("SIGNAL");function F(e){let t=Ue;return Ue=e,t}function Ci(){return Ue}var Bn={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 Dn(e){if(Di)throw new Error("");if(Ue===null)return;Ue.consumerOnSignalRead(e);let t=Ue.producersTail;if(t!==void 0&&t.producer===e)return;let n,r=Ue.recomputing;if(r&&(n=t!==void 0?t.nextProducer:Ue.producers,n!==void 0&&n.producer===e)){Ue.producersTail=n,n.lastReadVersion=e.version,n.knownValidAtEpoch=Ln;return}let o=e.consumersTail;if(o!==void 0&&o.consumer===Ue&&(!r||o.knownValidAtEpoch===Ln))return;let i=br(Ue),s={producer:e,consumer:Ue,nextProducer:n,prevConsumer:void 0,knownValidAtEpoch:Ln,lastReadVersion:e.version,nextConsumer:void 0};Ue.producersTail=s,t!==void 0?t.nextProducer=s:Ue.producers=s,i&&Od(e,s)}function Ad(){Ln++}function ao(e){if(!(br(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Ln)){if(!e.producerMustRecompute(e)&&!wr(e)){_i(e);return}e.producerRecomputeValue(e),_i(e)}}function sc(e){if(e.consumers===void 0)return;let t=Di;Di=!0;try{for(let n=e.consumers;n!==void 0;n=n.nextConsumer){let r=n.consumer;r.dirty||xv(r)}}finally{Di=t}}function ac(){return Ue?.consumerAllowSignalWrites!==!1}function xv(e){e.dirty=!0,sc(e),e.consumerMarkedDirty?.(e)}function _i(e){e.dirty=!1,e.lastCleanEpoch=Ln}function wn(e){return e&&Rd(e),F(e)}function Rd(e){if(e.producersTail?.knownValidAtEpoch===Ln){let t=e.producers;for(;t!==void 0;)t.knownValidAtEpoch=null,t=t.nextProducer}e.producersTail=void 0,e.recomputing=!0}function Vn(e,t){F(t),e&&kd(e)}function kd(e){e.recomputing=!1;let t=e.producersTail,n=t!==void 0?t.nextProducer:e.producers;if(n!==void 0){if(br(e))do n=cc(n);while(n!==void 0);t!==void 0?t.nextProducer=void 0:e.producers=void 0}}function wr(e){for(let t=e.producers;t!==void 0;t=t.nextProducer){let n=t.producer,r=t.lastReadVersion;if(r!==n.version||(ao(n),r!==n.version))return!0}return!1}function bn(e){if(br(e)){let t=e.producers;for(;t!==void 0;)t=cc(t)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function Od(e,t){let n=e.consumersTail,r=br(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)Od(o.producer,o)}function cc(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,!br(t)){let i=t.producers;for(;i!==void 0;)i=cc(i)}return n}function br(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function Ii(e){Iv?.(e)}function xi(e,t){return Object.is(e,t)}function Ti(e,t){let n=Object.create(Tv);n.computation=e,t!==void 0&&(n.equal=t);let r=()=>{if(ao(n),Dn(n),n.value===jn)throw n.error;return n.value};return r[Be]=n,Ii(n),r}var wi=Symbol("UNSET"),bi=Symbol("COMPUTING"),jn=Symbol("ERRORED"),Tv=De(ne({},Bn),{value:wi,dirty:!0,error:null,equal:xi,kind:"computed",producerMustRecompute(e){return e.value===wi||e.value===bi},producerRecomputeValue(e){if(e.value===bi)throw new Error("");let t=e.value;e.value=bi;let n=wn(e),r,o=!1;try{r=e.computation(),F(null),o=t!==wi&&t!==jn&&r!==jn&&e.equal(t,r)}catch(i){r=jn,e.error=i}finally{Vn(e,n)}if(o){e.value=t;return}e.value=r,e.version++}});function Sv(){throw new Error}var Pd=Sv;function Fd(e){Pd(e)}function lc(e){Pd=e}var Mv=null;function uc(e,t){let n=Object.create(_r);n.value=e,t!==void 0&&(n.equal=t);let r=()=>Ld(n);return r[Be]=n,Ii(n),[r,s=>Hn(n,s),s=>dc(n,s)]}function Ld(e){return Dn(e),e.value}function Hn(e,t){ac()||Fd(e),e.equal(e.value,t)||(e.value=t,Nv(e))}function dc(e,t){ac()||Fd(e),Hn(e,t(e.value))}var _r=De(ne({},Bn),{equal:xi,value:void 0,kind:"signal"});function Nv(e){e.version++,Ad(),sc(e),Mv?.(e)}var fc=De(ne({},Bn),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function pc(e){if(e.dirty=!1,e.version>0&&!wr(e))return;e.version++;let t=wn(e);try{e.cleanup(),e.fn()}finally{Vn(e,t)}}var hc;function Si(){return hc}function kt(e){let t=hc;return hc=e,t}var jd=Symbol("NotFound");function Cr(e){return e===jd||e?.name==="\u0275NotFound"}function Bd(e){let t=F(null);try{return e()}finally{F(t)}}function X(e){return typeof e=="function"}function Ir(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 Mi=Ir(e=>function(n){e(this),this.message=n?`${n.length} errors occurred during unsubscription:
|
|
2
|
+
${n.map((r,o)=>`${o+1}) ${r.toString()}`).join(`
|
|
3
|
+
`)}`:"",this.name="UnsubscriptionError",this.errors=n});function co(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ze=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(X(r))try{r()}catch(i){t=i instanceof Mi?i.errors:[i]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let i of o)try{Vd(i)}catch(s){t=t??[],s instanceof Mi?t=[...t,...s.errors]:t.push(s)}}if(t)throw new Mi(t)}}add(t){var n;if(t&&t!==this)if(this.closed)Vd(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)&&co(n,t)}remove(t){let{_finalizers:n}=this;n&&co(n,t),t instanceof e&&t._removeParent(this)}};ze.EMPTY=(()=>{let e=new ze;return e.closed=!0,e})();var mc=ze.EMPTY;function Ni(e){return e instanceof ze||e&&"closed"in e&&X(e.remove)&&X(e.add)&&X(e.unsubscribe)}function Vd(e){X(e)?e():e.unsubscribe()}var yt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var xr={setTimeout(e,t,...n){let{delegate:r}=xr;return r?.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=xr;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Ai(e){xr.setTimeout(()=>{let{onUnhandledError:t}=yt;if(t)t(e);else throw e})}function gc(){}var Hd=yc("C",void 0,void 0);function $d(e){return yc("E",void 0,e)}function Ud(e){return yc("N",e,void 0)}function yc(e,t,n){return{kind:e,value:t,error:n}}var $n=null;function Tr(e){if(yt.useDeprecatedSynchronousErrorHandling){let t=!$n;if(t&&($n={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=$n;if($n=null,n)throw r}}else e()}function zd(e){yt.useDeprecatedSynchronousErrorHandling&&$n&&($n.errorThrown=!0,$n.error=e)}var Un=class extends ze{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Ni(t)&&t.add(this)):this.destination=kv}static create(t,n,r){return new _n(t,n,r)}next(t){this.isStopped?Ec(Ud(t),this):this._next(t)}error(t){this.isStopped?Ec($d(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?Ec(Hd,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()}}},Av=Function.prototype.bind;function vc(e,t){return Av.call(e,t)}var Dc=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){Ri(r)}}error(t){let{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){Ri(r)}else Ri(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){Ri(n)}}},_n=class extends Un{constructor(t,n,r){super();let o;if(X(t)||!t)o={next:t??void 0,error:n??void 0,complete:r??void 0};else{let i;this&&yt.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),o={next:t.next&&vc(t.next,i),error:t.error&&vc(t.error,i),complete:t.complete&&vc(t.complete,i)}):o=t}this.destination=new Dc(o)}};function Ri(e){yt.useDeprecatedSynchronousErrorHandling?zd(e):Ai(e)}function Rv(e){throw e}function Ec(e,t){let{onStoppedNotification:n}=yt;n&&xr.setTimeout(()=>n(e,t))}var kv={closed:!0,next:gc,error:Rv,complete:gc};var Sr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Gd(e){return e}function Wd(e){return e.length===0?Gd:e.length===1?e[0]:function(n){return e.reduce((r,o)=>o(r),n)}}var fe=class e{constructor(t){t&&(this._subscribe=t)}lift(t){let n=new e;return n.source=this,n.operator=t,n}subscribe(t,n,r){let o=Pv(t)?t:new _n(t,n,r);return Tr(()=>{let{operator:i,source:s}=this;o.add(i?i.call(o,s):s?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return n=qd(n),new n((r,o)=>{let i=new _n({next:s=>{try{t(s)}catch(a){o(a),i.unsubscribe()}},error:o,complete:r});this.subscribe(i)})}_subscribe(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)}[Sr](){return this}pipe(...t){return Wd(t)(this)}toPromise(t){return t=qd(t),new t((n,r)=>{let o;this.subscribe(i=>o=i,i=>r(i),()=>n(o))})}};fe.create=e=>new fe(e);function qd(e){var t;return(t=e??yt.Promise)!==null&&t!==void 0?t:Promise}function Ov(e){return e&&X(e.next)&&X(e.error)&&X(e.complete)}function Pv(e){return e&&e instanceof Un||Ov(e)&&Ni(e)}function Fv(e){return X(e?.lift)}function at(e){return t=>{if(Fv(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 rn(e,t,n,r,o){return new wc(e,t,n,r,o)}var wc=class extends Un{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))}}};var Yd=Ir(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var vt=class extends fe{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new ki(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new Yd}next(t){Tr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){Tr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:n}=this;for(;n.length;)n.shift().error(t)}})}complete(){Tr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){let{hasError:n,isStopped:r,observers:o}=this;return n||r?mc:(this.currentObservers=null,o.push(t),new ze(()=>{this.currentObservers=null,co(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new fe;return t.source=this,t}};vt.create=(e,t)=>new ki(e,t);var ki=class extends vt{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:mc}};var lo=class extends vt{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)}};function Zd(e){return e&&X(e.schedule)}function Lv(e){return e[e.length-1]}function Xd(e){return Zd(Lv(e))?e.pop():void 0}function Qd(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 Kd(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 zn(e){return this instanceof zn?(this.v=e,this):new zn(e)}function Jd(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(f){return function(m){return Promise.resolve(m).then(f,d)}}function a(f,m){r[f]&&(o[f]=function(v){return new Promise(function(g,y){i.push([f,v,g,y])>1||c(f,v)})},m&&(o[f]=m(o[f])))}function c(f,m){try{l(r[f](m))}catch(v){p(i[0][3],v)}}function l(f){f.value instanceof zn?Promise.resolve(f.value.v).then(u,d):p(i[0][2],f)}function u(f){c("next",f)}function d(f){c("throw",f)}function p(f,m){f(m),i.shift(),i.length&&c(i[0][0],i[0][1])}}function ef(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 Kd=="function"?Kd(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 Oi=(e=>e&&typeof e.length=="number"&&typeof e!="function");function Pi(e){return X(e?.then)}function Fi(e){return X(e[Sr])}function Li(e){return Symbol.asyncIterator&&X(e?.[Symbol.asyncIterator])}function ji(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 jv(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Bi=jv();function Vi(e){return X(e?.[Bi])}function Hi(e){return Jd(this,arguments,function*(){let n=e.getReader();try{for(;;){let{value:r,done:o}=yield zn(n.read());if(o)return yield zn(void 0);yield yield zn(r)}}finally{n.releaseLock()}})}function $i(e){return X(e?.getReader)}function Ot(e){if(e instanceof fe)return e;if(e!=null){if(Fi(e))return Bv(e);if(Oi(e))return Vv(e);if(Pi(e))return Hv(e);if(Li(e))return tf(e);if(Vi(e))return $v(e);if($i(e))return Uv(e)}throw ji(e)}function Bv(e){return new fe(t=>{let n=e[Sr]();if(X(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Vv(e){return new fe(t=>{for(let n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function Hv(e){return new fe(t=>{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,Ai)})}function $v(e){return new fe(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function tf(e){return new fe(t=>{zv(e,t).catch(n=>t.error(n))})}function Uv(e){return tf(Hi(e))}function zv(e,t){var n,r,o,i;return Qd(this,void 0,void 0,function*(){try{for(n=ef(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 ct(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 Ui(e,t=0){return at((n,r)=>{n.subscribe(rn(r,o=>ct(r,e,()=>r.next(o),t),()=>ct(r,e,()=>r.complete(),t),o=>ct(r,e,()=>r.error(o),t)))})}function zi(e,t=0){return at((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function nf(e,t){return Ot(e).pipe(zi(t),Ui(t))}function rf(e,t){return Ot(e).pipe(zi(t),Ui(t))}function of(e,t){return new fe(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function sf(e,t){return new fe(n=>{let r;return ct(n,t,()=>{r=e[Bi](),ct(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)}),()=>X(r?.return)&&r.return()})}function Gi(e,t){if(!e)throw new Error("Iterable cannot be null");return new fe(n=>{ct(n,t,()=>{let r=e[Symbol.asyncIterator]();ct(n,t,()=>{r.next().then(o=>{o.done?n.complete():n.next(o.value)})},0,!0)})})}function af(e,t){return Gi(Hi(e),t)}function cf(e,t){if(e!=null){if(Fi(e))return nf(e,t);if(Oi(e))return of(e,t);if(Pi(e))return rf(e,t);if(Li(e))return Gi(e,t);if(Vi(e))return sf(e,t);if($i(e))return af(e,t)}throw ji(e)}function lf(e,t){return t?cf(e,t):Ot(e)}function bc(...e){let t=Xd(e);return lf(e,t)}var uf=Ir(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function _c(e,t){let n=typeof t=="object";return new Promise((r,o)=>{let i=new _n({next:s=>{r(s),i.unsubscribe()},error:o,complete:()=>{n?r(t.defaultValue):o(new uf)}});e.subscribe(i)})}function Pt(e,t){return at((n,r)=>{let o=0;n.subscribe(rn(r,i=>{r.next(e.call(t,i,o++))}))})}function df(e,t,n,r,o,i,s,a){let c=[],l=0,u=0,d=!1,p=()=>{d&&!c.length&&!l&&t.complete()},f=v=>l<r?m(v):c.push(v),m=v=>{i&&t.next(v),l++;let g=!1;Ot(n(v,u++)).subscribe(rn(t,y=>{o?.(y),i?f(y):t.next(y)},()=>{g=!0},void 0,()=>{if(g)try{for(l--;c.length&&l<r;){let y=c.shift();s?ct(t,s,()=>m(y)):m(y)}p()}catch(y){t.error(y)}}))};return e.subscribe(rn(t,f,()=>{d=!0,p()})),()=>{a?.()}}function Wi(e,t,n=1/0){return X(t)?Wi((r,o)=>Pt((i,s)=>t(r,i,o,s))(Ot(e(r,o))),n):(typeof t=="number"&&(n=t),at((r,o)=>df(r,o,e,n)))}function Cc(e,t){return at((n,r)=>{let o=0;n.subscribe(rn(r,i=>e.call(t,i,o++)&&r.next(i)))})}function Ic(e,t){return X(t)?Wi(e,t,1):Wi(e,1)}function xc(e){return at((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}var es="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",O=class extends Error{code;constructor(t,n){super(Zn(t,n)),this.code=t}};function Gv(e){return`NG0${Math.abs(e)}`}function Zn(e,t){return`${Gv(e)}${t?": "+t:""}`}function re(e){for(let t in e)if(e[t]===re)return t;throw Error("")}function ts(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(ts).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(`
|
|
4
|
+
`);return r>=0?n.slice(0,r):n}function ns(e,t){return e?t?`${e} ${t}`:e:t||""}var Wv=re({__forward_ref__:re});function rs(e){return e.__forward_ref__=rs,e}function nt(e){return gf(e)?e():e}function gf(e){return typeof e=="function"&&Object.hasOwn(e,Wv)&&e.__forward_ref__===rs}function ee(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function os(e){return qv(e,is)}function qv(e,t){return Object.hasOwn(e,t)&&e[t]||null}function Yv(e){let t=e?.[is]??null;return t||null}function Sc(e){return e&&Object.hasOwn(e,Yi)?e[Yi]:null}var is=re({\u0275prov:re}),Yi=re({\u0275inj:re}),H=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=ee({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Hc(e){return e&&!!e.\u0275providers}var $c=re({\u0275cmp:re}),Uc=re({\u0275dir:re}),zc=re({\u0275pipe:re});var Mc=re({\u0275fac:re}),Xn=re({__NG_ELEMENT_ID__:re}),ff=re({__NG_ENV_ID__:re});function mo(e){return Gc(e,"@Component"),e[$c]||null}function ss(e){return Gc(e,"@Directive"),e[Uc]||null}function yf(e){return Gc(e,"@Pipe"),e[zc]||null}function Gc(e,t){if(e==null)throw new O(-919,!1)}function Ar(e){return typeof e=="string"?e:e==null?"":String(e)}var vf=re({ngErrorCode:re}),Zv=re({ngErrorMessage:re}),Xv=re({ngTokenPath:re});function Wc(e,t){return Ef("",-200,t)}function as(e,t){throw new O(-201,!1)}function Ef(e,t,n){let r=new O(t,e);return r[vf]=t,r[Zv]=e,n&&(r[Xv]=n),r}function Kv(e){return e[vf]}var Nc;function Df(){return Nc}function Ge(e){let t=Nc;return Nc=e,t}function qc(e,t,n){let r=os(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;as(e,"")}var Kn=globalThis;var Qv={},Gn=Qv,Jv="__NG_DI_FLAG__",Ac=class{injector;constructor(t){this.injector=t}retrieve(t,n){let r=Wn(n)||0;try{return this.injector.get(t,r&8?null:Gn,r)}catch(o){if(Cr(o))return o;throw o}}};function e0(e,t=0){let n=Si();if(n===void 0)throw new O(-203,!1);if(n===null)return qc(e,void 0,t);{let r=t0(t),o=n.retrieve(e,r);if(Cr(o)){if(r.optional)return null;throw o}return o}}function Y(e,t=0){return(Df()||e0)(nt(e),t)}function T(e,t){return Y(e,Wn(t))}function Wn(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function t0(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function Rc(e){let t=[];for(let n=0;n<e.length;n++){let r=nt(e[n]);if(Array.isArray(r)){if(r.length===0)throw new O(900,!1);let o,i=0;for(let s=0;s<r.length;s++){let a=r[s],c=n0(a);typeof c=="number"?c===-1?o=a.token:i|=c:o=a}t.push(Y(o,i))}else t.push(Y(r))}return t}function n0(e){return e[Jv]}function qn(e,t){let n=Object.hasOwn(e,Mc);return n?e[Mc]:null}function cs(e,t){e.forEach(n=>Array.isArray(n)?cs(n,t):t(n))}function wf(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Yc(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function bf(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 ls(e,t,n){let r=Rr(e,t);return r>=0?e[r|1]=n:(r=~r,bf(e,r,t,n)),r}function us(e,t){let n=Rr(e,t);if(n>=0)return e[n|1]}function Rr(e,t){return r0(e,t,1)}function r0(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 ds={},Ft=[],kr=new H(""),go=new H("",-1),Zc=new H(""),Nr=class{get(t,n=Gn){if(n===Gn){let o=Ef("",-201);throw o.name="\u0275NotFound",o}return n}};function Qn(e){return{\u0275providers:e}}function _f(e){return Qn([{provide:kr,multi:!0,useValue:e}])}function Cf(...e){return{\u0275providers:Xc(!0,e),\u0275fromNgModule:!0}}function Xc(e,...t){let n=[],r=new Set,o,i=s=>{n.push(s)};return cs(t,s=>{let a=s;Zi(a,i,[],r)&&(o||=[],o.push(a))}),o!==void 0&&If(o,i),n}function If(e,t){for(let n=0;n<e.length;n++){let{ngModule:r,providers:o}=e[n];Kc(o,i=>{t(i,r)})}}function Zi(e,t,n,r){if(e=nt(e),!e)return!1;let o=null,i=Sc(e),s=!i&&mo(e);if(!i&&!s){let c=e.ngModule;if(i=Sc(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)Zi(l,t,n,r)}}else if(i){if(i.imports!=null&&!a){r.add(o);let l;cs(i.imports,u=>{Zi(u,t,n,r)&&(l||=[],l.push(u))}),l!==void 0&&If(l,t)}if(!a){let l=qn(o)||(()=>new o);t({provide:o,useFactory:l,deps:Ft},o),t({provide:Zc,useValue:o,multi:!0},o),t({provide:kr,useValue:()=>Y(o),multi:!0},o)}let c=i.providers;if(c!=null&&!a){let l=e;Kc(c,u=>{t(u,l)})}}else return!1;return o!==e&&e.providers!==void 0}function Kc(e,t){for(let n of e)Hc(n)&&(n=n.\u0275providers),Array.isArray(n)?Kc(n,t):t(n)}var o0=re({provide:String,useValue:re});function xf(e){return e!==null&&typeof e=="object"&&o0 in e}function i0(e){return!!(e&&e.useExisting)}function s0(e){return!!(e&&e.useFactory)}function Xi(e){return typeof e=="function"}var yo=new H(""),qi={},pf={},Tc;function vo(){return Tc===void 0&&(Tc=new Nr),Tc}var Qe=class{},Yn=class extends Qe{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,Oc(t,s=>this.processProvider(s)),this.records.set(go,Mr(void 0,this)),o.has("environment")&&this.records.set(Qe,Mr(void 0,this));let i=this.records.get(yo);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Zc,Ft,{self:!0}))}retrieve(t,n){let r=Wn(n)||0;try{return this.get(t,Gn,r)}catch(o){if(Cr(o))return o;throw o}}destroy(){uo(this),this._destroyed=!0;let t=F(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(),F(t)}}onDestroy(t){return uo(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){uo(this);let n=kt(this),r=Ge(void 0),o;try{return t()}finally{kt(n),Ge(r)}}get(t,n=Gn,r){if(uo(this),Object.hasOwn(t,ff))return t[ff](this);let o=Wn(r),i,s=kt(this),a=Ge(void 0);try{if(!(o&4)){let l=this.records.get(t);if(l===void 0){let u=d0(t)&&os(t);u&&this.injectableDefInScope(u)?l=Mr(kc(t),qi):l=null,this.records.set(t,l)}if(l!=null)return this.hydrate(t,l,o)}let c=o&2?vo():this.parent;return n=o&8&&n===Gn?null:n,c.get(t,n)}catch(c){let l=Kv(c);throw l===-200||l===-201?new O(l,null):c}finally{Ge(a),kt(s)}}resolveInjectorInitializers(){let t=F(null),n=kt(this),r=Ge(void 0),o;try{let i=this.get(kr,Ft,{self:!0});for(let s of i)s()}finally{kt(n),Ge(r),F(t)}}toString(){return"R3Injector[...]"}processProvider(t){t=nt(t);let n=Xi(t)?t:nt(t&&t.provide),r=c0(t);if(!Xi(t)&&t.multi===!0){let o=this.records.get(n);o||(o=Mr(void 0,qi,!0),o.factory=()=>Rc(o.multi),this.records.set(n,o)),n=t,o.multi.push(t)}this.records.set(n,r)}hydrate(t,n,r){let o=F(null);try{if(n.value===pf)throw Wc("");return n.value===qi&&(n.value=pf,n.value=n.factory(void 0,r)),typeof n.value=="object"&&n.value&&u0(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{F(o)}}injectableDefInScope(t){if(!t.providedIn)return!1;let n=nt(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 kc(e){let t=os(e),n=t!==null?t.factory:qn(e);if(n!==null)return n;if(e instanceof H)throw new O(-204,!1);if(e instanceof Function)return a0(e);throw new O(-204,!1)}function a0(e){if(e.length>0)throw new O(-204,!1);let n=Yv(e);return n!==null?()=>n.factory(e):()=>new e}function c0(e){if(xf(e))return Mr(void 0,e.useValue);{let t=Tf(e);return Mr(t,qi)}}function Tf(e,t,n){let r;if(Xi(e)){let o=nt(e);return qn(o)||kc(o)}else if(xf(e))r=()=>nt(e.useValue);else if(s0(e))r=()=>e.useFactory(...Rc(e.deps||[]));else if(i0(e))r=(o,i)=>Y(nt(e.useExisting),i!==void 0&&i&8?8:void 0);else{let o=nt(e&&(e.useClass||e.provide));if(l0(e))r=()=>new o(...Rc(e.deps));else return qn(o)||kc(o)}return r}function uo(e){if(e.destroyed)throw new O(-205,!1)}function Mr(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function l0(e){return!!e.deps}function u0(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function d0(e){return typeof e=="function"||typeof e=="object"&&e.ngMetadataName==="InjectionToken"}function Oc(e,t){for(let n of e)Array.isArray(n)?Oc(n,t):n&&Hc(n)?Oc(n.\u0275providers,t):t(n)}function Or(e,t){let n;e instanceof Yn?(uo(e),n=e):n=new Ac(e);let r,o=kt(n),i=Ge(void 0);try{return t()}finally{kt(o),Ge(i)}}function Sf(){return Df()!==void 0||Si()!=null}var Dt=0,L=1,B=2,Pe=3,ut=4,dt=5,Pr=6,Fr=7,ge=8,jt=9,wt=10,ye=11,Lr=12,Qc=13,Cn=14,rt=15,Jn=16,er=17,tr=18,Bt=19,Jc=20,sn=21,fs=22,an=23,ot=24,nr=25,bt=26,el=27,we=28,Mf=1,tl=6,Eo=7,Nf=8,Do=9,pe=10;function In(e){return Array.isArray(e)&&typeof e[Mf]=="object"}function Je(e){return Array.isArray(e)&&e[Mf]===!0}function nl(e){return(e.flags&4)!==0}function xn(e){return e.componentOffset>-1}function ps(e){return(e.flags&1)===1}function rr(e){return!!e.template}function jr(e){return(e[B]&512)!==0}function or(e){return(e[B]&256)===256}var hs=(function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e[e.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",e})(hs||{});var rl="svg",Af="math";function He(e){for(;Array.isArray(e);)e=e[Dt];return e}function ol(e,t){return He(t[e])}function Vt(e,t){return He(t[e.index])}function ms(e,t){return e.data[t]}function gs(e,t){return e[t]}function il(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function Ht(e,t){let n=t[e];return In(n)?n:n[Dt]}function ys(e){return(e[B]&128)===128}function $t(e,t){return t==null?null:e[t]}function sl(e){e[er]=0}function al(e){e[B]&1024||(e[B]|=1024,ys(e)&&ir(e))}function Rf(e,t){for(;e>0;)t=t[Cn],e--;return t}function wo(e){return!!(e[B]&9216||e[ot]?.dirty)}function vs(e){e[wt].changeDetectionScheduler?.notify(8),e[B]&64&&(e[B]|=1024),wo(e)&&ir(e)}function ir(e){e[wt].changeDetectionScheduler?.notify(0);let t=cn(e);for(;t!==null&&!(t[B]&8192||(t[B]|=8192,!ys(t)));)t=cn(t)}function Es(e,t){if(or(e))throw new O(911,!1);e[sn]===null&&(e[sn]=[]),e[sn].push(t)}function kf(e,t){if(e[sn]===null)return;let n=e[sn].indexOf(t);n!==-1&&e[sn].splice(n,1)}function cn(e){let t=e[Pe];return Je(t)?t[Pe]:t}function Of(e){return e[Fr]??=[]}function Pf(e){return e.cleanup??=[]}var z={lFrame:Xf(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Pc=!1;function Ff(){return z.lFrame.elementDepthCount}function Lf(){z.lFrame.elementDepthCount++}function cl(){z.lFrame.elementDepthCount--}function jf(){return z.bindingsEnabled}function Bf(){return z.skipHydrationRootTNode!==null}function ll(e){return z.skipHydrationRootTNode===e}function ul(){z.skipHydrationRootTNode=null}function K(){return z.lFrame.lView}function We(){return z.lFrame.tView}function oe(e){return z.lFrame.contextLView=e,e[ge]}function ie(e){return z.lFrame.contextLView=null,e}function Ut(){let e=dl();for(;e!==null&&e.type===64;)e=e.parent;return e}function dl(){return z.lFrame.currentTNode}function Vf(){let e=z.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function Br(e,t){let n=z.lFrame;n.currentTNode=e,n.isParent=t}function fl(){return z.lFrame.isParent}function Hf(){z.lFrame.isParent=!1}function $f(){return z.lFrame.contextLView}function pl(){return Pc}function fo(e){let t=Pc;return Pc=e,t}function Ds(){let e=z.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function Uf(){return z.lFrame.bindingIndex}function zf(e){return z.lFrame.bindingIndex=e}function sr(){return z.lFrame.bindingIndex++}function ws(e){let t=z.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function Gf(){return z.lFrame.inI18n}function Wf(e,t){let n=z.lFrame;n.bindingIndex=n.bindingRootIndex=e,bs(t)}function qf(){return z.lFrame.currentDirectiveIndex}function bs(e){z.lFrame.currentDirectiveIndex=e}function Yf(e){let t=z.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function hl(e){z.lFrame.currentQueryIndex=e}function f0(e){let t=e[L];return t.type===2?t.declTNode:t.type===1?e[dt]:null}function ml(e,t,n){if(n&4){let o=t,i=e;for(;o=o.parent,o===null&&!(n&1);)if(o=f0(i),o===null||(i=i[Cn],o.type&10))break;if(o===null)return!1;t=o,e=i}let r=z.lFrame=Zf();return r.currentTNode=t,r.lView=e,!0}function _s(e){let t=Zf(),n=e[L];z.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function Zf(){let e=z.lFrame,t=e===null?null:e.child;return t===null?Xf(e):t}function Xf(e){let t={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:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function Kf(){let e=z.lFrame;return z.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var gl=Kf;function Cs(){let e=Kf();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Qf(e){return(z.lFrame.contextLView=Rf(e,z.lFrame.contextLView))[ge]}function zt(){return z.lFrame.selectedIndex}function Tn(e){z.lFrame.selectedIndex=e}function Is(){let e=z.lFrame;return ms(e.tView,e.selectedIndex)}function xs(){z.lFrame.currentNamespace=rl}function Ts(){p0()}function p0(){z.lFrame.currentNamespace=null}function yl(){return z.lFrame.currentNamespace}var Jf=!0;function Ss(){return Jf}function Ms(e){Jf=e}function Fc(e,t=null,n=null,r){let o=ep(e,t,n,r);return o.resolveInjectorInitializers(),o}function ep(e,t=null,n=null,r,o=new Set){let i=[n||Ft,Cf(e)],s;return new Yn(i,t||vo(),s||null,o)}var Et=class e{static THROW_IF_NOT_FOUND=Gn;static NULL=new Nr;static create(t,n){if(Array.isArray(t))return Fc({name:""},n,t,"");{let r=t.name??"";return Fc({name:r},t.parent,t.providers,r)}}static \u0275prov=ee({token:e,providedIn:"any",factory:()=>Y(go)});static __NG_ELEMENT_ID__=-1},Fe=new H(""),Ie=class{static __NG_ELEMENT_ID__=h0;static __NG_ENV_ID__=t=>t},Ki=class extends Ie{_lView;constructor(t){super(),this._lView=t}get destroyed(){return or(this._lView)}onDestroy(t){let n=this._lView;return Es(n,t),()=>kf(n,t)}};function h0(){return new Ki(K())}var tp=!1,np=new H(""),ar=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new lo(!1);debugTaskTracker=T(np,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new fe(n=>{n.next(!1),n.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),this.debugTaskTracker?.add(n),n}has(n){return this.pendingTasks.has(n)}remove(n){this.pendingTasks.delete(n),this.debugTaskTracker?.remove(n),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=ee({token:e,providedIn:"root",factory:()=>new e})}return e})(),Lc=class extends vt{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,Sf()&&(this.destroyRef=T(Ie,{optional:!0})??void 0,this.pendingTasks=T(ar,{optional:!0})??void 0)}emit(t){let n=F(null);try{super.next(t)}finally{F(n)}}subscribe(t,n,r){let o=t,i=n||(()=>null),s=r;if(t&&typeof t=="object"){let c=t;o=c.next?.bind(c),i=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(i=this.wrapInTimeout(i),o&&(o=this.wrapInTimeout(o)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:o,error:i,complete:s});return t instanceof ze&&t.add(a),a}wrapInTimeout(t){return n=>{let r=this.pendingTasks?.add();setTimeout(()=>{try{t(n)}finally{r!==void 0&&this.pendingTasks?.remove(r)}})}}},on=Lc;function Qi(...e){}function vl(e){let t,n;function r(){e=Qi;try{n!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(()=>{e(),r()})),()=>r()}function rp(e){return queueMicrotask(()=>e()),()=>{e=Qi}}var El="isAngularZone",po=El+"_ID",m0=0,Ve=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new on(!1);onMicrotaskEmpty=new on(!1);onStable=new on(!1);onError=new on(!1);constructor(t){let{enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:i=tp}=t;if(typeof Zone>"u")throw new O(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=!o&&r,s.shouldCoalesceRunChangeDetection=o,s.callbackScheduled=!1,s.scheduleInRootZone=i,v0(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(El)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new O(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new O(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,o){let i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+o,t,g0,Qi,Qi);try{return i.runTask(s,n,r)}finally{i.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},g0={};function Dl(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function y0(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function t(){vl(()=>{e.callbackScheduled=!1,jc(e),e.isCheckStableRunning=!0,Dl(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{t()}):e._outer.run(()=>{t()}),jc(e)}function v0(e){let t=()=>{y0(e)},n=m0++;e._inner=e._inner.fork({name:"angular",properties:{[El]:!0,[po]:n,[po+n]:!0},onInvokeTask:(r,o,i,s,a,c)=>{if(E0(c))return r.invokeTask(i,s,a,c);try{return hf(e),r.invokeTask(i,s,a,c)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),mf(e)}},onInvoke:(r,o,i,s,a,c,l)=>{try{return hf(e),r.invoke(i,s,a,c,l)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!D0(c)&&t(),mf(e)}},onHasTask:(r,o,i,s)=>{r.hasTask(i,s),o===i&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,jc(e),Dl(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,o,i,s)=>(r.handleError(i,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function jc(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function hf(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function mf(e){e._nesting--,Dl(e)}var ho=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new on;onMicrotaskEmpty=new on;onStable=new on;onError=new on;run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,o){return t.apply(n,r)}};function E0(e){return op(e,"__ignore_ng_zone__")}function D0(e){return op(e,"__scheduler_tick__")}function op(e,t){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[t]===!0}var lt=class{_console=console;handleError(t){this._console.error("ERROR",t)}};function ip(e){return sp(e)?e:new Bc(e)}function sp(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.message=="string"}var Bc=class extends Error{constructor(t){super(String(t),{cause:t}),this.name="ErrorBoundaryWrappedError"}},ln=new H("",{factory:()=>{let e=T(Ve),t=T(Qe),n;return r=>{e.runOutsideAngular(()=>{t.destroyed&&!n?setTimeout(()=>{throw r}):(n??=t.get(lt),n.handleError(r))})}}}),ap={provide:kr,useValue:()=>{let e=T(lt,{optional:!0})},multi:!0},w0=new H("",{factory:()=>{let e=T(Fe).defaultView;if(!e)return;let t=T(ln),n=i=>{t(i.reason),i.preventDefault()},r=i=>{i.error?t(i.error):t(new Error(i.message,{cause:i})),i.preventDefault()},o=()=>{e.addEventListener("unhandledrejection",n),e.addEventListener("error",r)};typeof Zone<"u"?Zone.root.run(o):o(),T(Ie).onDestroy(()=>{e.removeEventListener("error",r),e.removeEventListener("unhandledrejection",n)})}});function wl(){return Qn([_f(()=>{T(w0)})])}function q(e,t){let[n,r,o]=uc(e,t?.equal),i=n,s=i[Be];return i.set=r,i.update=o,i.asReadonly=bl.bind(i),i}function bl(){let e=this[Be];if(e.readonlyFn===void 0){let t=()=>this();t[Be]=e,e.readonlyFn=t}return e.readonlyFn}var bo=new H("",{factory:()=>b0}),b0="ng";var Ns=new H(""),_o=new H("",{providedIn:"platform",factory:()=>"unknown"});var Co=new H("",{factory:()=>T(Fe).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var Io=(()=>{class e{view;node;constructor(n,r){this.view=n,this.node=r}static __NG_ELEMENT_ID__=_0}return e})();function _0(){return new Io(K(),Ut())}var Lt=class{},xo=new H("",{factory:()=>!0});var _l=new H(""),As=(()=>{class e{static \u0275prov=ee({token:e,providedIn:"root",factory:()=>new Vc})}return e})(),Vc=class{dirtyEffectCount=0;queues=new Map;add(t){this.enqueue(t),this.schedule(t)}schedule(t){t.dirty&&this.dirtyEffectCount++}remove(t){let n=t.zone,r=this.queues.get(n);r.has(t)&&(r.delete(t),t.dirty&&this.dirtyEffectCount--)}enqueue(t){let n=t.zone;this.queues.has(n)||this.queues.set(n,new Set);let r=this.queues.get(n);r.has(t)||r.add(t)}flush(){for(;this.dirtyEffectCount>0;){let t=!1;for(let[n,r]of this.queues)n===null?t||=this.flushQueue(r):t||=n.run(()=>this.flushQueue(r));t||(this.dirtyEffectCount=0)}}flushQueue(t){let n=!1;for(let r of t)r.dirty&&(this.dirtyEffectCount--,n=!0,r.run());return n}},Ji=class{[Be];constructor(t){this[Be]=t}destroy(){this[Be].destroy()}};function Sn(e,t){let n=t?.injector??T(Et),r=t?.manualCleanup!==!0?n.get(Ie):null,o,i=n.get(Io,null,{optional:!0}),s=n.get(Lt);return i!==null?(o=lp(i.view,s,e),r instanceof Ki&&r._lView===i.view&&(r=null)):o=x0(e,n.get(As),s),o.injector=n,r!==null&&(o.onDestroyFns=[r.onDestroy(()=>o.destroy())]),new Ji(o)}var cp=De(ne({},fc),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=fo(!1);try{pc(this)}finally{fo(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=F(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],F(e)}}}),C0=De(ne({},cp),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(bn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}}),I0=De(ne({},cp),{consumerMarkedDirty(){this.view[B]|=8192,ir(this.view),this.notifier.notify(13)},destroy(){if(bn(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[an]?.delete(this)}});function lp(e,t,n){let r=Object.create(I0);return r.view=e,r.zone=typeof Zone<"u"?Zone.current:null,r.notifier=t,r.userFn=n,r.fn=up(r,n),e[an]??=new Set,e[an].add(r),r.consumerMarkedDirty(r),r}function x0(e,t,n){let r=Object.create(C0);return r.userFn=e,r.fn=up(r,e),r.scheduler=t,r.notifier=n,r.zone=typeof Zone<"u"?Zone.current:null,r.scheduler.add(r),r.notifier.notify(12),r}function up(e,t){return()=>{t(n=>(e.cleanupFns??=[]).push(n))}}var To=(()=>{class e{internalPendingTasks=T(ar);scheduler=T(Lt);errorHandler=T(ln);add(){let n=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(n)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(n))}}run(n){let r=this.add();try{n().catch(this.errorHandler).finally(r)}catch(o){this.errorHandler(o),r()}}static \u0275prov=ee({token:e,providedIn:"root",factory:()=>new e})}return e})();var Jl=Symbol("InputSignalNode#UNSET"),jp=De(ne({},_r),{transformFn:void 0,applyValueToInputSignal(e,t){Hn(e,t)}});function Bp(e){return{toString:e}.toString()}var Q=(function(e){return e[e.TemplateCreateStart=0]="TemplateCreateStart",e[e.TemplateCreateEnd=1]="TemplateCreateEnd",e[e.TemplateUpdateStart=2]="TemplateUpdateStart",e[e.TemplateUpdateEnd=3]="TemplateUpdateEnd",e[e.LifecycleHookStart=4]="LifecycleHookStart",e[e.LifecycleHookEnd=5]="LifecycleHookEnd",e[e.OutputStart=6]="OutputStart",e[e.OutputEnd=7]="OutputEnd",e[e.BootstrapApplicationStart=8]="BootstrapApplicationStart",e[e.BootstrapApplicationEnd=9]="BootstrapApplicationEnd",e[e.BootstrapComponentStart=10]="BootstrapComponentStart",e[e.BootstrapComponentEnd=11]="BootstrapComponentEnd",e[e.ChangeDetectionStart=12]="ChangeDetectionStart",e[e.ChangeDetectionEnd=13]="ChangeDetectionEnd",e[e.ChangeDetectionSyncStart=14]="ChangeDetectionSyncStart",e[e.ChangeDetectionSyncEnd=15]="ChangeDetectionSyncEnd",e[e.AfterRenderHooksStart=16]="AfterRenderHooksStart",e[e.AfterRenderHooksEnd=17]="AfterRenderHooksEnd",e[e.ComponentStart=18]="ComponentStart",e[e.ComponentEnd=19]="ComponentEnd",e[e.DeferBlockStateStart=20]="DeferBlockStateStart",e[e.DeferBlockStateEnd=21]="DeferBlockStateEnd",e[e.DynamicComponentStart=22]="DynamicComponentStart",e[e.DynamicComponentEnd=23]="DynamicComponentEnd",e[e.HostBindingsUpdateStart=24]="HostBindingsUpdateStart",e[e.HostBindingsUpdateEnd=25]="HostBindingsUpdateEnd",e})(Q||{});function B0(e,t,n,r){t!==null?t.applyValueToInputSignal(t,r):e[n]=r}var V0=null;function H0(){return V0}var dp=[];var te=function(e,t=null,n){for(let r=0;r<dp.length;r++){let o=dp[r];o(e,t,n)}};function $0(e,t,n){let{ngOnChanges:r,ngOnInit:o,ngDoCheck:i}=t.type.prototype;if(r){let s=H0()(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}o&&(n.preOrderHooks??=[]).push(0-e,o),i&&((n.preOrderHooks??=[]).push(e,i),(n.preOrderCheckHooks??=[]).push(e,i))}function U0(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){let i=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:c,ngAfterViewChecked:l,ngOnDestroy:u}=i;s&&(e.contentHooks??=[]).push(-n,s),a&&((e.contentHooks??=[]).push(n,a),(e.contentCheckHooks??=[]).push(n,a)),c&&(e.viewHooks??=[]).push(-n,c),l&&((e.viewHooks??=[]).push(n,l),(e.viewCheckHooks??=[]).push(n,l)),u!=null&&(e.destroyHooks??=[]).push(n,u)}}function ks(e,t,n){Vp(e,t,3,n)}function Os(e,t,n,r){(e[B]&3)===n&&Vp(e,t,n,r)}function Cl(e,t){let n=e[B];(n&3)===t&&(n&=16383,n+=1,e[B]=n)}function Vp(e,t,n,r){let o=r!==void 0?e[er]&65535:0,i=r??-1,s=t.length-1,a=0;for(let c=o;c<s;c++)if(typeof t[c+1]=="number"){if(a=t[c],r!=null&&a>=r)break}else t[c]<0&&(e[er]+=65536),(a<i||i==-1)&&(z0(e,n,t,c),e[er]=(e[er]&4294901760)+c+2),c++}function fp(e,t){te(Q.LifecycleHookStart,e,t);let n=F(null);try{t.call(e)}finally{F(n),te(Q.LifecycleHookEnd,e,t)}}function z0(e,t,n,r){let o=n[r]<0,i=n[r+1],s=o?-n[r]:n[r],a=e[s];o?e[B]>>14<e[er]>>16&&(e[B]&3)===t&&(e[B]+=16384,fp(a,i)):fp(a,i)}var $r=-1,Ao=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,n,r,o){this.factory=t,this.name=o,this.canSeeViewProviders=n,this.injectImpl=r}};function G0(e){return(e.flags&8)!==0}function W0(e){return(e.flags&16)!==0}function q0(e,t,n){let r=0;for(;r<n.length;){let o=n[r];if(typeof o=="number"){if(o!==0)break;r++;let i=n[r++],s=n[r++],a=n[r++];e.setAttribute(t,s,a,i)}else{let i=o,s=n[++r];Z0(i)?e.setProperty(t,i,s):e.setAttribute(t,i,s),r++}}return r}function Y0(e){return e===3||e===4||e===6}function Z0(e){return e.charCodeAt(0)===64}function Xs(e,t){if(!(t===null||t.length===0))if(e===null||e.length===0)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){let o=t[r];typeof o=="number"?n=o:n===0||(n===-1||n===2?pp(e,n,o,null,t[++r]):pp(e,n,o,null,null))}}return e}function pp(e,t,n,r,o){let i=0,s=e.length;if(t===-1)s=-1;else for(;i<e.length;){let a=e[i++];if(typeof a=="number"){if(a===t){s=-1;break}else if(a>t){s=i-1;break}}}for(;i<e.length;){let a=e[i];if(typeof a=="number")break;if(a===n){o!==null&&(e[i+1]=o);return}i++,o!==null&&i++}s!==-1&&(e.splice(s,0,t),i=s+1),e.splice(i++,0,n),o!==null&&e.splice(i++,0,o)}function X0(e){return e!==$r}function Al(e){return e&32767}function K0(e){return e>>16}function Rl(e,t){let n=K0(e),r=t;for(;n>0;)r=r[Cn],n--;return r}var kl=!0;function Ls(e){let t=kl;return kl=e,t}var Q0=256,Hp=Q0-1,$p=5,J0=0,Gt={};function eE(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:Object.hasOwn(n,Xn)&&(r=n[Xn]),r==null&&(r=n[Xn]=J0++);let o=r&Hp,i=1<<o;t.data[e+(o>>$p)]|=i}function Up(e,t){let n=zp(e,t);if(n!==-1)return n;let r=t[L];r.firstCreatePass&&(e.injectorIndex=t.length,Il(r.data,e),Il(t,null),Il(r.blueprint,null));let o=Gp(e,t),i=e.injectorIndex;if(X0(o)){let s=Al(o),a=Rl(o,t),c=a[L].data;for(let l=0;l<8;l++)t[i+l]=a[s+l]|c[s+l]}return t[i+8]=o,i}function Il(e,t){e.push(0,0,0,0,0,0,0,0,t)}function zp(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Gp(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,o=t;for(;o!==null;){if(r=Xp(o),r===null)return $r;if(n++,o=o[Cn],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return $r}function tE(e,t,n){eE(e,t,n)}function Wp(e,t,n){if(n&8||e!==void 0)return e;as(t,"NodeInjector")}function qp(e,t,n,r){if(n&8&&r===void 0&&(r=null),(n&3)===0){let o=e[jt],i=Ge(void 0);try{return o?o.get(t,r,n&8):qc(t,r,n&8)}finally{Ge(i)}}return Wp(r,t,n)}function Yp(e,t,n,r=0,o){if(e!==null){if(t[B]&2048&&!(r&2)){let s=sE(e,t,n,r,Gt);if(s!==Gt)return s}let i=Zp(e,t,n,r,Gt);if(i!==Gt)return i}return qp(t,n,r,o)}function Zp(e,t,n,r,o){let i=oE(n);if(typeof i=="function"){if(!ml(t,e,r))return r&1?Wp(o,n,r):qp(t,n,r,o);try{let s;if(s=i(r),s==null&&!(r&8))as(n);else return s}finally{gl()}}else if(typeof i=="number"){let s=null,a=zp(e,t),c=$r,l=r&1?t[rt][dt]:null;for((a===-1||r&4)&&(c=a===-1?Gp(e,t):t[a+8],c===$r||!mp(r,!1)?a=-1:(s=t[L],a=Al(c),t=Rl(c,t)));a!==-1;){let u=t[L];if(hp(i,a,u.data)){let d=nE(a,t,n,s,r,l);if(d!==Gt)return d}c=t[a+8],c!==$r&&mp(r,t[L].data[a+8]===l)&&hp(i,a,t)?(s=u,a=Al(c),t=Rl(c,t)):a=-1}}return o}function nE(e,t,n,r,o,i){let s=t[L],a=s.data[e+8],c=r==null?xn(a)&&kl:r!=s&&(a.type&3)!==0,l=o&1&&i===a,u=rE(a,s,n,c,l);return u!==null?Ol(t,s,u,a,o):Gt}function rE(e,t,n,r,o){let i=e.providerIndexes,s=t.data,a=i&1048575,c=e.directiveStart,l=e.directiveEnd,u=i>>20,d=r?a:a+u,p=o?a+u:l;for(let f=d;f<p;f++){let m=s[f];if(f<c&&n===m||f>=c&&m.type===n)return f}if(o){let f=s[c];if(f&&rr(f)&&f.type===n)return c}return null}function Ol(e,t,n,r,o){let i=e[n],s=t.data;if(i instanceof Ao){let a=i;if(a.resolving)throw Wc("");let c=Ls(a.canSeeViewProviders);a.resolving=!0;let l=s[n].type||s[n],u,d=a.injectImpl?Ge(a.injectImpl):null,p=ml(e,r,0);try{i=e[n]=a.factory(void 0,o,s,e,r),t.firstCreatePass&&n>=r.directiveStart&&$0(n,s[n],t)}finally{d!==null&&Ge(d),Ls(c),a.resolving=!1,gl()}}return i}function oE(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=Object.hasOwn(e,Xn)?e[Xn]:void 0;return typeof t=="number"?t>=0?t&Hp:iE:t}function hp(e,t,n){let r=1<<e;return!!(n[t+(e>>$p)]&r)}function mp(e,t){return!(e&2)&&!(e&1&&t)}var Ro=class{_tNode;_lView;constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return Yp(this._tNode,this._lView,t,Wn(r),n)}};function iE(){return new Ro(Ut(),K())}function sE(e,t,n,r,o){let i=e,s=t;for(;i!==null&&s!==null&&s[B]&2048&&!jr(s);){let a=Zp(i,s,n,r|2,Gt);if(a!==Gt)return a;r&=-5;let c=i.parent;if(!c){let l=s[Jc];if(l){let u=l.get(n,Gt,r);if(u!==Gt)return u}c=Xp(s),s=s[Cn]}i=c}return o}function Xp(e){let t=e[L],n=t.type;return n===2?t.declTNode:n===1?e[dt]:null}function Nn(e){return{token:e.token,providedIn:e.autoProvided===!1?null:"root",factory:e.factory,value:void 0}}function aE(){return Kp(Ut(),K())}function Kp(e,t){return new ur(Vt(e,t))}var ur=(()=>{class e{nativeElement;constructor(n){this.nativeElement=n}static __NG_ELEMENT_ID__=aE}return e})();function Qp(e){return(e.flags&128)===128}var eu=(function(e){return e[e.OnPush=0]="OnPush",e[e.Eager=1]="Eager",e[e.Default=1]="Default",e})(eu||{}),Jp=new Map,cE=0;function lE(){return cE++}function uE(e){Jp.set(e[Bt],e)}function Pl(e){Jp.delete(e[Bt])}var gp="__ngContext__";function zr(e,t){In(t)?(e[gp]=t[Bt],uE(t)):e[gp]=t}function eh(e){return nh(e[Lr])}function th(e){return nh(e[ut])}function nh(e){for(;e!==null&&!Je(e);)e=e[ut];return e}var Fl;function tu(e){Fl=e}function rh(){if(Fl!==void 0)return Fl;if(typeof document<"u")return document;throw new O(210,!1)}var oh="r";var ih="di";var sh=!1,ah=new H("",{factory:()=>sh});var yp=new WeakMap;function dE(e,t){if(e==null||typeof e!="object")return;let n=yp.get(e);n||(n=new WeakSet,yp.set(e,n)),n.add(t)}var fE=(e,t,n,r)=>{};function pE(e,t,n,r){fE(e,t,n,r)}function nu(e){return(e.flags&32)===32}var hE=()=>null;function ch(e,t,n=!1){return hE(e,t,n)}function lh(e,t){let n=e.contentQueries;if(n!==null){let r=F(null);try{for(let o=0;o<n.length;o+=2){let i=n[o],s=n[o+1];if(s!==-1){let a=e.data[s];hl(i),a.contentQueries(2,t[s],s)}}}finally{F(r)}}}function Ll(e,t,n){hl(0);let r=F(null);try{t(e,n)}finally{F(r)}}function uh(e,t,n){if(nl(t)){let r=F(null);try{let o=t.directiveStart,i=t.directiveEnd;for(let s=o;s<i;s++){let a=e.data[s];if(a.contentQueries){let c=n[s];a.contentQueries(1,c,s)}}}finally{F(r)}}}var It=(function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e[e.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",e})(It||{});var js=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${es})`}};function ko(e){return e instanceof js?e.changingThisBreaksApplicationSecurity:e}function dh(e,t){let n=fh(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${n} (see ${es})`)}return n===t}function fh(e){return e instanceof js&&e.getTypeName()||null}var mE=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function ph(e){return e=String(e),e.match(mE)?e:"unsafe:"+e}function gE(e,t){return e.createText(t)}function yE(e,t,n){e.setValue(t,n)}function hh(e,t,n){return e.createElement(t,n)}function Ur(e,t,n,r,o){e.insertBefore(t,n,r,o)}function mh(e,t,n){e.appendChild(t,n)}function vp(e,t,n,r,o){r!==null?Ur(e,t,n,r,o):mh(e,t,n)}function gh(e,t,n,r){e.removeChild(null,t,n,r)}function vE(e,t,n){e.setAttribute(t,"style",n)}function EE(e,t,n){n===""?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function yh(e,t,n){let{mergedAttrs:r,classes:o,styles:i}=n;r!==null&&q0(e,t,r),o!==null&&EE(e,t,o),i!==null&&vE(e,t,i)}function un(e){let t=DE();return t?t.sanitize(hs.URL,e)||"":dh(e,"URL")?ko(e):ph(Ar(e))}function DE(){let e=K();return e&&e[wt].sanitizer}function ru(e){return e.ownerDocument}function wE(e,t,n){let r=e.length;for(;;){let o=e.indexOf(t,n);if(o===-1)return o;if(o===0||e.charCodeAt(o-1)<=32){let i=t.length;if(o+i===r||e.charCodeAt(o+i)<=32)return o}n=o+1}}var vh="ng-template";function bE(e,t,n,r){let o=0;if(r){for(;o<t.length&&typeof t[o]=="string";o+=2)if(t[o]==="class"&&wE(t[o+1].toLowerCase(),n,0)!==-1)return!0}else if(ou(e))return!1;if(o=t.indexOf(1,o),o>-1){let i;for(;++o<t.length&&typeof(i=t[o])=="string";)if(i.toLowerCase()===n)return!0}return!1}function ou(e){return e.type===4&&e.value!==vh}function _E(e,t,n){let r=e.type===4&&!n?vh:e.value;return t===r}function CE(e,t,n){let r=4,o=e.attrs,i=o!==null?TE(o):0,s=!1;for(let a=0;a<t.length;a++){let c=t[a];if(typeof c=="number"){if(!s&&!_t(r)&&!_t(c))return!1;if(s&&_t(c))continue;s=!1,r=c|r&1;continue}if(!s)if(r&4){if(r=2|r&1,c!==""&&!_E(e,c,n)||c===""&&t.length===1){if(_t(r))return!1;s=!0}}else if(r&8){if(o===null||!bE(e,o,c,n)){if(_t(r))return!1;s=!0}}else{let l=t[++a],u=IE(c,o,ou(e),n);if(u===-1){if(_t(r))return!1;s=!0;continue}if(l!==""){let d;if(u>i?d="":d=o[u+1].toLowerCase(),r&2&&l!==d){if(_t(r))return!1;s=!0}}}}return _t(r)||s}function _t(e){return(e&1)===0}function IE(e,t,n,r){if(t===null)return-1;let o=0;if(r||!n){let i=!1;for(;o<t.length;){let s=t[o];if(s===e)return o;if(s===3||s===6)i=!0;else if(s===1||s===2){let a=t[++o];for(;typeof a=="string";)a=t[++o];continue}else{if(s===4)break;if(s===0){o+=4;continue}}o+=i?1:2}return-1}else return SE(t,e)}function xE(e,t,n=!1){for(let r=0;r<t.length;r++)if(CE(e,t[r],n))return!0;return!1}function TE(e){for(let t=0;t<e.length;t++){let n=e[t];if(Y0(n))return t}return e.length}function SE(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){let r=e[n];if(typeof r=="number")return-1;if(r===t)return n;n++}return-1}function Ep(e,t){return e?":not("+t.trim()+")":t}function ME(e){let t=e[0],n=1,r=2,o="",i=!1;for(;n<e.length;){let s=e[n];if(typeof s=="string")if(r&2){let a=e[++n];o+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else r&8?o+="."+s:r&4&&(o+=" "+s);else o!==""&&!_t(s)&&(t+=Ep(i,o),o=""),r=s,i=i||!_t(r);n++}return o!==""&&(t+=Ep(i,o)),t}function NE(e){return e.map(ME).join(",")}function AE(e){let t=[],n=[],r=1,o=2;for(;r<e.length;){let i=e[r];if(typeof i=="string")o===2?i!==""&&t.push(i,e[++r]):o===8&&n.push(i);else{if(!_t(o))break;o=i}r++}return n.length&&t.push(1,...n),t}var qe={},Wt=(function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e})(Wt||{}),RE;function iu(e,t){return RE(e,t)}var Mn=new Set;var p1=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var jl=new WeakMap;function Eh(e){return e?e[Cn]??e:null}var Vr=new WeakSet;function kE(e,t,n){let r=jl.get(e);if(!r||r.length===0)return;let o=t.parentNode,i=t.previousSibling,s=Eh(n);for(let a=r.length-1;a>=0;a--){let{el:c,declarationView:l}=r[a],u=c.parentNode;c===t?(r.splice(a,1),Vr.add(c),c.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))):i&&c===i?(r.splice(a,1),c.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),c.parentNode?.removeChild(c)):u&&o&&u!==o&&(s===null||l===null||s===l)&&(r.splice(a,1),c.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),c.parentNode?.removeChild(c))}}function OE(e,t,n){let r=Eh(n),o=jl.get(e);o?o.some(i=>i.el===t)||o.push({el:t,declarationView:r}):jl.set(e,[{el:t,declarationView:r}])}var Ks=(function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e})(Ks||{}),qt=new H(""),Dp=new Set;function Wr(e){Dp.has(e)||(Dp.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var su=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=ee({token:e,providedIn:"root",factory:()=>new e})}return e})(),au=[0,1,2,3],Dh=(()=>{class e{ngZone=T(Ve);scheduler=T(Lt);errorHandler=T(lt,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){T(qt,{optional:!0})}execute(){let n=this.sequences.size>0;n&&te(Q.AfterRenderHooksStart),this.executing=!0;for(let r of au)for(let o of this.sequences)if(!(o.erroredOrDestroyed||!o.hooks[r]))try{o.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let i=o.hooks[r];return i(o.pipelinedValue)},o.snapshot))}catch(i){o.erroredOrDestroyed=!0,this.errorHandler?.handleError(i)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),n&&te(Q.AfterRenderHooksEnd)}register(n){let{view:r}=n;r!==void 0?((r[nr]??=[]).push(n),ir(r),r[B]|=8192):this.executing?this.deferredRegistrations.add(n):this.addSequence(n)}addSequence(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,r){return r?r.run(Ks.AFTER_NEXT_RENDER,n):n()}static \u0275prov=ee({token:e,providedIn:"root",factory:()=>new e})}return e})(),Bs=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,n,r,o,i,s=null){this.impl=t,this.hooks=n,this.view=r,this.once=o,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let t=this.view?.[nr];t&&(this.view[nr]=t.filter(n=>n!==this))}};var cu=new H("",{factory:()=>{let e=T(Qe),t=new Set;return e.onDestroy(()=>t.clear()),{queue:t,isScheduled:!1,scheduler:null,injector:e}}});function wh(e,t,n){let r=e.get(cu);if(Array.isArray(t))for(let o of t)r.queue.add(o),n?.detachedLeaveAnimationFns?.push(o);else r.queue.add(t),n?.detachedLeaveAnimationFns?.push(t);r.scheduler&&r.scheduler(e)}function PE(e,t){let n=e.get(cu);if(Array.isArray(t))for(let r of t)n.queue.delete(r);else n.queue.delete(t)}function FE(e,t){let n=e.get(cu);if(t.detachedLeaveAnimationFns){for(let r of t.detachedLeaveAnimationFns)n.queue.delete(r);t.detachedLeaveAnimationFns=void 0}}function LE(e,t){for(let[n,r]of t)wh(e,r.animateFns)}function wp(e,t,n,r){let o=e?.[bt]?.enter;t!==null&&o&&o.has(n.index)&&LE(r,o)}function bp(e,t,n,r){try{n.get(go)}catch{return r(!1)}let o=e?e[bt]??={}:void 0;o?.enter?.has(t.index)&&PE(n,o.enter.get(t.index).animateFns);let i=jE(e,t,o);if(i.size===0&&!(e?lu(e,t):!1))return r(!1);e&&Mn.add(e[Bt]),wh(n,()=>BE(e,t,o,i,r),o)}function jE(e,t,n){let r=new Map,o=n?.leave;if(o&&o.has(t.index)&&r.set(t.index,o.get(t.index)),e&&o)for(let[i,s]of o){if(r.has(i))continue;let c=e[L].data[i].parent;for(;c;){if(c===t){r.set(i,s);break}c=c.parent}}return r}function BE(e,t,n,r,o){let i=[];if(n&&n.leave)for(let[s]of r){if(!n.leave.has(s))continue;let a=n.leave.get(s);for(let c of a.animateFns){let{promise:l}=c();i.push(l)}n.detachedLeaveAnimationFns=void 0}if(e&&uu(e,t,i),i.length>0){let s=n||e?.[bt];if(s){let a=s.running;a&&i.push(a),s.running=Promise.allSettled(i),$E(e,s.running,o)}else Promise.allSettled(i).then(()=>{e&&Mn.delete(e[Bt]),o(!0)})}else e&&Mn.delete(e[Bt]),o(!1)}function lu(e,t){if(t.type&12){let r=e[t.index];if(Je(r))for(let o=pe;o<r.length;o++){let i=r[o];if(i[L].type===2&&VE(i))return!0}}let n=t.child;for(;n;){if(lu(e,n))return!0;n=n.next}return!1}function VE(e){let t=e[bt];if(t?.leave&&t.leave.size>0)return!0;let n=e[L].firstChild;for(;n;){if(lu(e,n))return!0;n=n.next}return!1}function uu(e,t,n){if(t.type&12){let o=e[t.index];if(Je(o))for(let i=pe;i<o.length;i++){let s=o[i];s[L].type===2&&HE(s,n)}}let r=t.child;for(;r;)uu(e,r,n),r=r.next}function HE(e,t){let n=e[bt];if(n&&n.leave)for(let o of n.leave.values())for(let i of o.animateFns){let{promise:s}=i();t.push(s)}let r=e[L].firstChild;for(;r;)uu(e,r,t),r=r.next}function $E(e,t,n){t.then(()=>{e[bt]?.running===t&&(e[bt].running=void 0,Mn.delete(e[Bt])),n(!0)})}function bh(e){let t=e[bt]??={};t.detachedLeaveAnimationFns=[];let n=e[L].firstChild;for(;n;)_h(e,n),n=n.next}function _h(e,t){if(t.type&12){let r=e[t.index];if(Je(r))for(let o=pe;o<r.length;o++){let i=r[o];i[L].type===2&&bh(i)}}let n=t.child;for(;n;)_h(e,n),n=n.next}function Ch(e){let t=e[bt];if(t&&t.detachedLeaveAnimationFns&&t.detachedLeaveAnimationFns.length>0){let r=e[jt];FE(r,t),Mn.delete(e[Bt]),t.detachedLeaveAnimationFns=void 0}else t&&(t.detachedLeaveAnimationFns=void 0);let n=e[L].firstChild;for(;n;)Ih(e,n),n=n.next}function Ih(e,t){if(t.type&12){let r=e[t.index];if(Je(r))for(let o=pe;o<r.length;o++){let i=r[o];i[L].type===2&&Ch(i)}}let n=t.child;for(;n;)Ih(e,n),n=n.next}function Hr(e,t,n,r,o,i,s,a){if(o!=null){let c,l=!1;Je(o)?c=o:In(o)&&(l=!0,o=o[Dt]);let u=He(o);e===0&&r!==null?(wp(a,r,i,n),s==null?mh(t,r,u):Ur(t,r,u,s||null,!0)):e===1&&r!==null?(Ur(t,r,u,s||null,!0),kE(i,u,a),Vr.has(u)||wp(a,r,i,n)):e===2?(a?.[bt]?.leave?.has(i.index)&&OE(i,u,a),Vr.delete(u),bp(a,i,n,d=>{if(Vr.has(u)){Vr.delete(u);return}gh(t,u,l,d)})):e===3&&(Vr.delete(u),bp(a,i,n,()=>{t.destroyNode(u)})),c!=null&&tD(t,e,n,c,i,r,s)}}function UE(e,t){xh(e,t),t[Dt]=null,t[dt]=null}function zE(e,t,n,r,o,i){r[Dt]=o,r[dt]=t,Qs(e,r,n,1,o,i)}function xh(e,t){t[wt].changeDetectionScheduler?.notify(9),Qs(e,t,t[ye],2,null,null)}function GE(e){let t=e[Lr];if(!t)return xl(e[L],e);for(;t;){let n=null;if(In(t))n=t[Lr];else{let r=t[pe];r&&(n=r)}if(!n){for(;t&&!t[ut]&&t!==e;)In(t)&&xl(t[L],t),t=t[Pe];t===null&&(t=e),In(t)&&xl(t[L],t),n=t&&t[ut]}t=n}}function du(e,t){let n=e[Do],r=n.indexOf(t);n.splice(r,1)}function fu(e,t){if(or(t))return;let n=t[ye];n.destroyNode&&Qs(e,t,n,3,null,null),GE(t)}function xl(e,t){if(or(t))return;let n=F(null);try{t[B]&=-129,t[B]|=256,t[ot]&&bn(t[ot]),qE(e,t),WE(e,t),t[L].type===1&&t[ye].destroy();let r=t[Jn];if(r!==null&&Je(t[Pe])){r!==t[Pe]&&du(r,t);let o=t[tr];o!==null&&o.detachView(e)}Pl(t)}finally{F(n)}}function WE(e,t){let n=e.cleanup,r=t[Fr];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?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[n[s+1]];n[s].call(a)}r!==null&&(t[Fr]=null);let o=t[sn];if(o!==null){t[sn]=null;for(let s=0;s<o.length;s++){let a=o[s];a()}}let i=t[an];if(i!==null){t[an]=null;for(let s of i)s.destroy()}}function qE(e,t){let n;if(e!=null&&(n=e.destroyHooks)!=null)for(let r=0;r<n.length;r+=2){let o=t[n[r]];if(!(o instanceof Ao)){let i=n[r+1];if(Array.isArray(i))for(let s=0;s<i.length;s+=2){let a=o[i[s]],c=i[s+1];te(Q.LifecycleHookStart,a,c);try{c.call(a)}finally{te(Q.LifecycleHookEnd,a,c)}}else{te(Q.LifecycleHookStart,o,i);try{i.call(o)}finally{te(Q.LifecycleHookEnd,o,i)}}}}}function YE(e,t,n){if(t===null)throw new O(510,!1);return ZE(e,t.parent,n)}function ZE(e,t,n){let r=t;for(;r!==null&&r.type&168;)t=r,r=t.parent;if(r===null)return n[Dt];if(xn(r)){let{encapsulation:o}=e.data[r.directiveStart+r.componentOffset];if(o===It.None||o===It.Emulated)return null}return Vt(r,n)}function XE(e,t,n){return QE(e,t,n)}function KE(e,t,n){return e.type&40?Vt(e,n):null}var QE=KE,_p;function pu(e,t,n,r){let o=YE(e,r,t),i=t[ye],s=r.parent||t[dt],a=XE(s,r,t);if(o!=null)if(Array.isArray(n))for(let c=0;c<n.length;c++)vp(i,o,n[c],a,!1);else vp(i,o,n,a,!1);_p!==void 0&&_p(i,r,t,n,o)}function Mo(e,t){if(t!==null){let n=t.type;if(n&3)return Vt(t,e);if(n&4)return Bl(-1,e[t.index]);if(n&8){let r=t.child;if(r!==null)return Mo(e,r);{let o=e[t.index];return Je(o)?Bl(-1,o):He(o)}}else{if(n&128)return Mo(e,t.next);if(n&32)return iu(t,e)()||He(e[t.index]);{let r=Th(e,t);if(r!==null){if(Array.isArray(r))return r[0];let o=cn(e[rt]);return Mo(o,r)}else return Mo(e,t.next)}}}return null}function Th(e,t){if(t!==null){let r=e[rt][dt],o=t.projection;return r.projection[o]}return null}function Bl(e,t){let n=pe+e+1;if(n<t.length){let r=t[n],o=r[L].firstChild;if(o!==null)return Mo(r,o)}return t[Eo]}function hu(e,t,n,r,o,i,s){for(;n!=null;){let a=r[jt];if(n.type===128){n=n.next;continue}let c=r[n.index],l=n.type;if(s&&t===0&&(c&&zr(He(c),r),n.flags|=2),!nu(n))if(l&8)hu(e,t,n.child,r,o,i,!1),Hr(t,e,a,o,c,n,i,r);else if(l&32){let u=iu(n,r),d;for(;d=u();)Hr(t,e,a,o,d,n,i,r);Hr(t,e,a,o,c,n,i,r)}else l&16?eD(e,t,r,n,o,i):Hr(t,e,a,o,c,n,i,r);n=s?n.projectionNext:n.next}}function Qs(e,t,n,r,o,i){e.type===3?JE(n,r,t,o,i):hu(n,r,e.firstChild,t,o,i,!1)}function JE(e,t,n,r,o){let s=n[L].firstChild,a=s.next,c=He(n[s.index]),l=He(n[a.index]),u=a.index+1,d=n[u];if(t===1||t===0)r!==null&&(d&&d.hasChildNodes()?Ur(e,r,d,o,!0):(Ur(e,r,c,o,!0),Ur(e,r,l,o,!0)));else if(t===2){if(d||(d=document.createDocumentFragment(),n[u]=d),c&&c.parentNode===d)return;let p=c;for(;p!==null;){let f=p.nextSibling;if(d.appendChild(p),p===l)break;p=f}}}function eD(e,t,n,r,o,i){let s=n[rt],c=s[dt].projection[r.projection];if(Array.isArray(c))for(let l=0;l<c.length;l++){let u=c[l];Hr(t,e,n[jt],o,u,r,i,n)}else{let l=c,u=s[Pe];Qp(r)&&(l.flags|=128),hu(e,t,l,u,o,i,!0)}}function tD(e,t,n,r,o,i,s){let a=r[Eo],c=He(r);if(a!==c&&Hr(t,e,n,i,a,o,s),(r[B]&4)===0)for(let l=pe;l<r.length;l++){let u=r[l];Qs(u[L],u,e,t,i,a)}}function nD(e,t,n,r,o){if(t)o?e.addClass(n,r):e.removeClass(n,r);else{let i=r.indexOf("-")===-1?void 0:Wt.DashCase;o==null?e.removeStyle(n,r,i):(typeof o=="string"&&o.endsWith("!important")&&(o=o.slice(0,-10),i|=Wt.Important),e.setStyle(n,r,o,i))}}function mu(e,t,n,r,o,i,s,a,c,l,u){let d=we+r,p=d+o,f=rD(d,p),m=typeof l=="function"?l():l;return f[L]={type:e,blueprint:f,template:n,queries:null,viewQuery:a,declTNode:t,data:f.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:p,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 i=="function"?i():i,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:c,consts:m,incompleteFirstPass:!1,ssrId:u}}function rD(e,t){let n=[];for(let r=0;r<t;r++)n.push(r<e?null:qe);return n}function oD(e){let t=e.tView;return t===null||t.incompleteFirstPass?e.tView=mu(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function gu(e,t,n,r,o,i,s,a,c,l,u){let d=t.blueprint.slice();return d[Dt]=o,d[B]=r|4|128|8|64|1024,(l!==null||e&&e[B]&2048)&&(d[B]|=2048),sl(d),d[Pe]=d[Cn]=e,d[ge]=n,d[wt]=s||e&&e[wt],d[ye]=a||e&&e[ye],d[jt]=c||e&&e[jt]||null,d[dt]=i,d[Bt]=lE(),d[Pr]=u,d[Jc]=l,d[rt]=t.type==2?e[rt]:d,d}function iD(e,t,n){let r=Vt(t,e),o=oD(n),i=e[wt].rendererFactory,s=Nh(e,gu(e,o,null,Sh(n),r,t,null,i.createRenderer(r,n),null,null,null));return e[t.index]=s}function Sh(e){let t=16;return e.signals?t=4096:e.onPush&&(t=64),t}function Mh(e,t,n,r){if(n===0)return-1;let o=t.length;for(let i=0;i<n;i++)t.push(r),e.blueprint.push(r),e.data.push(null);return o}function Nh(e,t){return e[Lr]?e[Qc][ut]=t:e[Lr]=t,e[Qc]=t,t}function D(e=1){Ah(We(),K(),zt()+e,!1)}function Ah(e,t,n,r){if(!r)if((t[B]&3)===3){let i=e.preOrderCheckHooks;i!==null&&ks(t,i,n)}else{let i=e.preOrderHooks;i!==null&&Os(t,i,0,n)}Tn(n)}var Js=(function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e})(Js||{});function Vl(e,t,n,r){let o=F(null);try{let[i,s,a]=e.inputs[n],c=null;(s&Js.SignalBased)!==0&&(c=t[i][Be]),c!==null&&c.transformFn!==void 0?r=c.transformFn(r):a!==null&&(r=a.call(t,r)),e.setInput!==null?e.setInput(t,c,r,n,i):B0(t,c,i,r)}finally{F(o)}}function Rh(e,t,n,r,o){let i=zt(),s=r&2;try{Tn(-1),s&&t.length>we&&Ah(e,t,we,!1);let a=s?Q.TemplateUpdateStart:Q.TemplateCreateStart;te(a,o,n),n(r,o)}finally{Tn(i);let a=s?Q.TemplateUpdateEnd:Q.TemplateCreateEnd;te(a,o,n)}}function kh(e,t,n){fD(e,t,n),(n.flags&64)===64&&pD(e,t,n)}function yu(e,t,n=Vt){let r=t.localNames;if(r!==null){let o=t.index+1;for(let i=0;i<r.length;i+=2){let s=r[i+1],a=s===-1?n(t,e):e[s];e[o++]=a}}}function sD(e,t,n,r){let i=r.get(ah,sh)||n===It.ShadowDom||n===It.ExperimentalIsolatedShadowDom,s=e.selectRootElement(t,i);return aD(s),s}function aD(e){cD(e)}var cD=()=>null;function lD(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function uD(e,t,n,r,o,i){let s=t[L];if(vu(e,s,t,n,r)){xn(e)&&dD(t,e.index);return}e.type&3&&(n=lD(n)),Oh(e,t,n,r,o,i)}function Oh(e,t,n,r,o,i){if(e.type&3){let s=Vt(e,t);r=i!=null?i(r,e.value||"",n):r,o.setProperty(s,n,r)}else e.type&12}function dD(e,t){let n=Ht(t,e);n[B]&16||(n[B]|=64)}function fD(e,t,n){let r=n.directiveStart,o=n.directiveEnd;xn(n)&&iD(t,n,e.data[r+n.componentOffset]),e.firstCreatePass||Up(n,t);let i=n.initialInputs;for(let s=r;s<o;s++){let a=e.data[s],c=Ol(t,e,s,n);if(zr(c,t),i!==null&&vD(t,s-r,c,a,n,i),rr(a)){let l=Ht(n.index,t);l[ge]=Ol(t,e,s,n)}}}function pD(e,t,n){let r=n.directiveStart,o=n.directiveEnd,i=n.index,s=qf();try{Tn(i);for(let a=r;a<o;a++){let c=e.data[a],l=t[a];bs(a),(c.hostBindings!==null||c.hostVars!==0||c.hostAttrs!==null)&&hD(c,l)}}finally{Tn(-1),bs(s)}}function hD(e,t){e.hostBindings!==null&&e.hostBindings(1,t)}function mD(e,t){let n=e.directiveRegistry,r=null;if(n)for(let o=0;o<n.length;o++){let i=n[o];xE(t,i.selectors,!1)&&(r??=[],rr(i)?r.unshift(i):r.push(i))}return r}function gD(e,t,n,r,o,i){let s=Vt(e,t);yD(t[ye],s,i,e.value,n,r,o)}function yD(e,t,n,r,o,i,s){if(i==null)s?.(i,r||"",o),e.removeAttribute(t,o,n);else{let a=s==null?Ar(i):s(i,r||"",o);e.setAttribute(t,o,a,n)}}function vD(e,t,n,r,o,i){let s=i[t];if(s!==null)for(let a=0;a<s.length;a+=2){let c=s[a],l=s[a+1];Vl(r,n,c,l)}}function Ph(e,t,n,r,o){let i=we+n,s=t[L],a=o(s,t,e,r,n);t[i]=a,Br(e,!0);let c=e.type===2;return c?(yh(t[ye],a,e),(Ff()===0||ps(e))&&zr(a,t),Lf()):zr(a,t),Ss()&&(!c||!nu(e))&&pu(s,t,a,e),e}function Fh(e){let t=e;return fl()?Hf():(t=t.parent,Br(t,!1)),t}function ED(e,t){let n=e[jt];if(!n)return;let r;try{r=n.get(ln,null)}catch{r=null}r?.(t)}function vu(e,t,n,r,o){let i=e.inputs?.[r],s=e.hostDirectiveInputs?.[r],a=!1;if(s)for(let c=0;c<s.length;c+=2){let l=s[c],u=s[c+1],d=t.data[l];Vl(d,n[l],u,o),a=!0}if(i)for(let c of i){let l=n[c],u=t.data[c];Vl(u,l,r,o),a=!0}return a}function DD(e,t){let n=Ht(t,e),r=n[L];wD(r,n);let o=n[Dt];o!==null&&n[Pr]===null&&(n[Pr]=ch(o,n[jt])),te(Q.ComponentStart);try{Eu(r,n,n[ge])}finally{te(Q.ComponentEnd,n[ge])}}function wD(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}function Eu(e,t,n){_s(t);try{let r=e.viewQuery;r!==null&&Ll(1,r,n);let o=e.template;o!==null&&Rh(e,t,o,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[tr]?.finishViewCreation(e),e.staticContentQueries&&lh(e,t),e.staticViewQueries&&Ll(2,e.viewQuery,n);let i=e.components;i!==null&&bD(t,i)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[B]&=-5,Cs()}}function bD(e,t){for(let n=0;n<t.length;n++)DD(e,t[n])}function Du(e,t,n,r){let o=F(null);try{let i=t.tView,a=e[B]&4096?4096:16,c=gu(e,i,n,a,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null),l=e[t.index];c[Jn]=l;let u=e[tr];return u!==null&&(c[tr]=u.createEmbeddedView(i)),Eu(i,c,n),c}finally{F(o)}}function wu(e,t){return!t||t.firstChild===null||Qp(e)}function Oo(e,t,n,r,o=!1){if(e.type===3){let i=e.firstChild,s=i.next,a=He(t[i.index]),c=He(t[s.index]),l=a;for(;l!==null&&(r.push(l),l!==c);)l=l.nextSibling;return r}for(;n!==null;){if(n.type===128){n=o?n.projectionNext:n.next;continue}let i=t[n.index];if(i!==null)if(Je(i)){let a=i[Eo];a!==i[Dt]&&r.push(He(i)),i[B]&4||Lh(i,r),r.push(a)}else r.push(He(i));let s=n.type;if(s&8)Oo(e,t,n.child,r);else if(s&32){let a=iu(n,t),c;for(;c=a();)r.push(c)}else if(s&16){let a=Th(t,n);if(Array.isArray(a))r.push(...a);else{let c=cn(t[rt]);Oo(c[L],c,a,r,!0)}}n=o?n.projectionNext:n.next}return r}function Lh(e,t){for(let n=pe;n<e.length;n++){let r=e[n],o=r[L].firstChild;o!==null&&Oo(r[L],r,o,t)}}function jh(e){if(e[nr]!==null){for(let t of e[nr])t.impl.addSequence(t);e[nr].length=0}}var Bh=[];function _D(e){return e[ot]??CD(e)}function CD(e){let t=Bh.pop()??Object.create(xD);return t.lView=e,t}function ID(e){e.lView[ot]!==e&&(e.lView=null,Bh.push(e))}var xD=De(ne({},Bn),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{ir(e.lView)},consumerOnSignalRead(){this.lView[ot]=this}});function TD(e){let t=e[ot]??Object.create(SD);return t.lView=e,t}var SD=De(ne({},Bn),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let t=cn(e.lView);for(;t&&!Vh(t[L]);)t=cn(t);t&&al(t)},consumerOnSignalRead(){this.lView[ot]=this}});function Vh(e){return e.type!==2}function Hh(e){if(e[an]===null)return;let t=!0;for(;t;){let n=!1;for(let r of e[an])if(r.dirty&&(n=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()),e[an]===null))return;t=n&&!!(e[B]&8192)}}var MD=100;function $h(e,t=0){let r=e[wt].rendererFactory,o=!1;o||r.begin?.();try{ND(e,t)}finally{o||r.end?.()}}function ND(e,t){let n=pl();try{fo(!0),Hl(e,t);let r=0;for(;wo(e);){if(r===MD)throw new O(103,!1);r++,Hl(e,1)}}finally{fo(n)}}function AD(e,t,n,r){if(or(t))return;let o=t[B],i=!1,s=!1;_s(t);let a=!0,c=null,l=null;i||(Vh(e)?(l=_D(t),c=wn(l)):Ci()===null?(a=!1,l=TD(t),c=wn(l)):t[ot]&&(bn(t[ot]),t[ot]=null));try{sl(t),zf(e.bindingStartIndex),n!==null&&Rh(e,t,n,2,r);let u=(o&3)===3;if(!i)if(u){let f=e.preOrderCheckHooks;f!==null&&ks(t,f,null)}else{let f=e.preOrderHooks;f!==null&&Os(t,f,0,null),Cl(t,0)}if(s||RD(t),Hh(t),Uh(t,0),e.contentQueries!==null&&lh(e,t),!i)if(u){let f=e.contentCheckHooks;f!==null&&ks(t,f)}else{let f=e.contentHooks;f!==null&&Os(t,f,1),Cl(t,1)}OD(e,t);let d=e.components;d!==null&&Gh(t,d,0);let p=e.viewQuery;if(p!==null&&Ll(2,p,r),!i)if(u){let f=e.viewCheckHooks;f!==null&&ks(t,f)}else{let f=e.viewHooks;f!==null&&Os(t,f,2),Cl(t,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),t[fs]){for(let f of t[fs])f();t[fs]=null}i||(jh(t),t[B]&=-73)}catch(u){let d=!1,p=u,f=t;for(;f!==null;){if(Je(f)){f=f[Pe];continue}let m=f[el];if(m)try{let v=t[rt][ge],g=v?.constructor,y={declarationInstance:v,declarationType:g,caughtBy:m};m(ip(p),y),d=!0;break}catch(v){p=v}f=f[Pe]}if(!d)throw i||ir(t),p}finally{l!==null&&(Vn(l,c),a&&ID(l)),Cs()}}function Uh(e,t){for(let n=eh(e);n!==null;n=th(n))for(let r=pe;r<n.length;r++){let o=n[r];zh(o,t)}}function RD(e){for(let t=eh(e);t!==null;t=th(t)){if(!(t[B]&2))continue;let n=t[Do];for(let r=0;r<n.length;r++){let o=n[r];al(o)}}}function kD(e,t,n){te(Q.ComponentStart);let r=Ht(t,e);try{zh(r,n)}finally{te(Q.ComponentEnd,r[ge])}}function zh(e,t){ys(e)&&Hl(e,t)}function Hl(e,t){let r=e[L],o=e[B],i=e[ot],s=!!(t===0&&o&16);if(s||=!!(o&64&&t===0),s||=!!(o&1024),s||=!!(i?.dirty&&wr(i)),s||=!1,i&&(i.dirty=!1),e[B]&=-9217,s)AD(r,e,r.template,e[ge]);else if(o&8192){let a=F(null);try{Hh(e),Uh(e,1);let c=r.components;c!==null&&Gh(e,c,1),jh(e)}finally{F(a)}}}function Gh(e,t,n){for(let r=0;r<t.length;r++)kD(e,t[r],n)}function OD(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;r<n.length;r++){let o=n[r];if(o<0)Tn(~o);else{let i=o,s=n[++r],a=n[++r];Wf(s,i);let c=t[i];te(Q.HostBindingsUpdateStart,c);try{a(2,c)}finally{te(Q.HostBindingsUpdateEnd,c)}}}}finally{Tn(-1)}}function bu(e,t){let n=pl()?64:1088;for(e[wt].changeDetectionScheduler?.notify(t);e;){e[B]|=n;let r=cn(e);if(jr(e)&&!r)return e;e=r}return null}function PD(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function Wh(e,t){let n=pe+t;if(n<e.length)return e[n]}function _u(e,t,n,r=!0){let o=t[L];if(FD(o,t,e,n),r){let s=Bl(n,e),a=t[ye],c=a.parentNode(e[Eo]);c!==null&&zE(o,e[dt],a,t,c,s)}let i=t[Pr];i!==null&&i.firstChild!==null&&(i.firstChild=null)}function qh(e,t){let n=Cu(e,t);return n!==void 0&&fu(n[L],n),n}function Cu(e,t){if(e.length<=pe)return;let n=pe+t,r=e[n];if(r){let o=r[Jn];o!==null&&o!==e&&du(o,r),t>0&&(e[n-1][ut]=r[ut]);let i=Yc(e,pe+t);UE(r[L],r);let s=i[tr];s!==null&&s.detachView(i[L]),r[Pe]=null,r[ut]=null,r[B]&=-129}return r}function FD(e,t,n,r){let o=pe+r,i=n.length;r>0&&(n[o-1][ut]=t),r<i-pe?(t[ut]=n[o],wf(n,pe+r,t)):(n.push(t),t[ut]=null),t[Pe]=n;let s=t[Jn];s!==null&&n!==s&&Yh(s,t);let a=t[tr];a!==null&&a.insertView(e),vs(t),t[B]|=128}function Yh(e,t){let n=e[Do],r=t[Pe];if(In(r))e[B]|=2;else{let o=r[Pe][rt];t[rt]!==o&&(e[B]|=2)}n===null?e[Do]=[t]:n.push(t)}var Vs=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,n=t[L];return Oo(n,t,n.firstChild,[])}constructor(t,n){this._lView=t,this._cdRefInjectingView=n}get context(){return this._lView[ge]}set context(t){this._lView[ge]=t}get destroyed(){return or(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[Pe];if(Je(t)){let n=t[Nf],r=n?n.indexOf(this):-1;r>-1&&(Cu(t,r),Yc(n,r))}this._attachedToViewContainer=!1}fu(this._lView[L],this._lView)}onDestroy(t){Es(this._lView,t)}markForCheck(){bu(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[B]&=-129}reattach(){vs(this._lView),this._lView[B]|=128}detectChanges(){this._lView[B]|=1024,$h(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new O(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=jr(this._lView),n=this._lView[Jn];n!==null&&!t&&du(n,this._lView),xh(this._lView[L],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new O(902,!1);this._appRef=t;let n=jr(this._lView),r=this._lView[Jn];r!==null&&!n&&Yh(r,this._lView),vs(this._lView)}};function ea(e,t,n,r,o){let i=e.data[t];if(i===null)i=LD(e,t,n,r,o),Gf()&&(i.flags|=32);else if(i.type&64){i.type=n,i.value=r,i.attrs=o;let s=Vf();i.injectorIndex=s===null?-1:s.injectorIndex}return Br(i,!0),i}function LD(e,t,n,r,o){let i=dl(),s=fl(),a=s?i:i&&i.parent,c=e.data[t]=BD(e,a,n,t,r,o);return jD(e,c,i,s),c}function jD(e,t,n,r){e.firstChild===null&&(e.firstChild=t),n!==null&&(r?n.child==null&&t.parent!==null&&(n.child=t):n.next===null&&(n.next=t,t.prev=n))}function BD(e,t,n,r,o,i){let s=t?t.injectorIndex:-1,a=0;return Bf()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:o,namespace:yl(),attrs:i,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function VD(e){let t=e[tl]??[],r=e[Pe][ye],o=[];for(let i of t)i.data[ih]!==void 0?o.push(i):HD(i,r);e[tl]=o}function HD(e,t){let n=0,r=e.firstChild;if(r){let o=e.data[oh];for(;n<o;){let i=r.nextSibling;gh(t,r,!1),r=i,n++}}}var $D=()=>null,UD=()=>null;function zD(e,t){return $D(e,t)}function Zh(e,t,n){return UD(e,t,n)}var Xh=class{},cr=class{};var Kh=(()=>{class e{static \u0275prov=ee({token:e,providedIn:"root",factory:()=>null})}return e})();function Qh(e){return e.debugInfo?.className||e.type.name||null}var Ps={},Hs=class{injector;parentInjector;constructor(t,n){this.injector=t,this.parentInjector=n}get(t,n,r){let o=this.injector.get(t,Ps,r);return o!==Ps||n===Ps?o:this.parentInjector.get(t,n,r)}};function Iu(e,t,n){return e[t]=n}function GD(e,t){return e[t]}function xt(e,t,n){if(n===qe)return!1;let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function Jh(e,t,n,r){let o=xt(e,t,n);return xt(e,t+1,r)||o}function Fs(e,t,n){return function r(o){let i=r.__ngNativeEl__;i!==void 0&&dE(o,i);let s=xn(e)?Ht(e.index,t):t;bu(s,5);let a=t[ge],c=Cp(t,a,n,o),l=r.__ngNextListenerFn__;for(;l;)c=Cp(t,a,l,o)&&c,l=l.__ngNextListenerFn__;return c}}function Cp(e,t,n,r){let o=F(null);try{return te(Q.OutputStart,t,n),n(r)!==!1}catch(i){return ED(e,i),!1}finally{te(Q.OutputEnd,t,n),F(o)}}function em(e,t,n,r,o,i,s,a){let c=ps(e),l=!1,u=null;if(!r&&c&&(u=qD(t,n,i,e.index)),u!==null){let d=u.__ngLastListenerFn__||u;d.__ngNextListenerFn__=s,u.__ngLastListenerFn__=s,l=!0}else{let d=Vt(e,n),p=r?r(d):d;pE(n,p,i,a),r||(a.__ngNativeEl__=d);let f=o.listen(p,i,a);if(!WD(i)){let m=r?v=>r(He(v[e.index])):e.index;tm(m,t,n,i,a,f,!1)}}return l}function WD(e){return e.startsWith("animation")||e.startsWith("transition")}function qD(e,t,n,r){let o=e.cleanup;if(o!=null)for(let i=0;i<o.length-1;i+=2){let s=o[i];if(s===n&&o[i+1]===r){let a=t[Fr],c=o[i+2];return a&&a.length>c?a[c]:null}typeof s=="string"&&(i+=2)}return null}function tm(e,t,n,r,o,i,s){let a=t.firstCreatePass?Pf(t):null,c=Of(n),l=c.length;c.push(o,i),a&&a.push(r,e,l,(l+1)*(s?-1:1))}function Ip(e,t,n,r,o,i){let s=t[n],a=t[L],l=a.data[n].outputs[r],d=s[l].subscribe(i);tm(e.index,a,t,o,i,d,!0)}var $l=Symbol("BINDING");var dr=new H("");function $s(e,t,n){let r=n?e.styles:null,o=n?e.classes:null,i=0;if(t!==null)for(let s=0;s<t.length;s++){let a=t[s];if(typeof a=="number")i=a;else if(i==1)o=ns(o,a);else if(i==2){let c=a,l=t[++s];r=ns(r,c+": "+l+";")}}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=o:e.classesWithoutHost=o}function jo(e,t=0){let n=K();if(n===null)return Y(e,t);let r=Ut();return Yp(r,n,nt(e),t)}function YD(e,t,n,r,o){let i=r===null?null:{"":-1},s=o(e,n);if(s!==null){let a=s,c=null,l=null;for(let u of s)if(u.resolveHostDirectives!==null){[a,c,l]=u.resolveHostDirectives(s);break}KD(e,t,n,a,i,c,l)}i!==null&&r!==null&&ZD(n,r,i)}function ZD(e,t,n){let r=e.localNames=[];for(let o=0;o<t.length;o+=2){let i=n[t[o+1]];if(i==null)throw new O(-301,!1);r.push(t[o],i)}}function XD(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function KD(e,t,n,r,o,i,s){let a=r.length,c=null;for(let p=0;p<a;p++){let f=r[p];c===null&&rr(f)&&(c=f,XD(e,n,p)),tE(Up(n,t),e,f.type)}rw(n,e.data.length,a),c?.viewProvidersResolver&&c.viewProvidersResolver(c);for(let p=0;p<a;p++){let f=r[p];f.providersResolver&&f.providersResolver(f)}let l=!1,u=!1,d=Mh(e,t,a,null);a>0&&(n.directiveToIndex=new Map);for(let p=0;p<a;p++){let f=r[p];if(n.mergedAttrs=Xs(n.mergedAttrs,f.hostAttrs),JD(e,n,t,d,f),nw(d,f,o),s!==null&&s.has(f)){let[v,g]=s.get(f);n.directiveToIndex.set(f.type,[d,v+n.directiveStart,g+n.directiveStart])}else(i===null||!i.has(f))&&n.directiveToIndex.set(f.type,d);f.contentQueries!==null&&(n.flags|=4),(f.hostBindings!==null||f.hostAttrs!==null||f.hostVars!==0)&&(n.flags|=64);let m=f.type.prototype;!l&&(m.ngOnChanges||m.ngOnInit||m.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),l=!0),!u&&(m.ngOnChanges||m.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),u=!0),d++}QD(e,n,i)}function QD(e,t,n){for(let r=t.directiveStart;r<t.directiveEnd;r++){let o=e.data[r];if(n===null||!n.has(o))xp(0,t,o,r),xp(1,t,o,r),Sp(t,r,!1);else{let i=n.get(o);Tp(0,t,i,r),Tp(1,t,i,r),Sp(t,r,!0)}}}function xp(e,t,n,r){let o=e===0?n.inputs:n.outputs;for(let i in o)if(Object.hasOwn(o,i)){let s;e===0?s=t.inputs??={}:s=t.outputs??={},s[i]??=[],s[i].push(r),nm(t,i)}}function Tp(e,t,n,r){let o=e===0?n.inputs:n.outputs;for(let i in o)if(Object.hasOwn(o,i)){let s=o[i],a;e===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(r,i),nm(t,s)}}function nm(e,t){t==="class"?e.flags|=8:t==="style"&&(e.flags|=16)}function Sp(e,t,n){let{attrs:r,inputs:o,hostDirectiveInputs:i}=e;if(r===null||!n&&o===null||n&&i===null||ou(e)){e.initialInputs??=[],e.initialInputs.push(null);return}let s=null,a=0;for(;a<r.length;){let c=r[a];if(c===0){a+=4;continue}else if(c===5){a+=2;continue}else if(typeof c=="number")break;if(!n&&Object.hasOwn(o,c)){let l=o[c];for(let u of l)if(u===t){s??=[],s.push(c,r[a+1]);break}}else if(n&&Object.hasOwn(i,c)){let l=i[c];for(let u=0;u<l.length;u+=2)if(l[u]===t){s??=[],s.push(l[u+1],r[a+1]);break}}a+=2}e.initialInputs??=[],e.initialInputs.push(s)}function JD(e,t,n,r,o){e.data[r]=o;let i=o.factory||(o.factory=qn(o.type,!0)),s=new Ao(i,rr(o),jo,null);e.blueprint[r]=s,n[r]=s,ew(e,t,r,Mh(e,n,o.hostVars,qe),o)}function ew(e,t,n,r,o){let i=o.hostBindings;if(i){let s=e.hostBindingOpCodes;s===null&&(s=e.hostBindingOpCodes=[]);let a=~t.index;tw(s)!=a&&s.push(a),s.push(n,r,i)}}function tw(e){let t=e.length;for(;t>0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function nw(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;rr(t)&&(n[""]=e)}}function rw(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function rm(e,t,n,r,o,i,s,a){let c=t[L],l=c.consts,u=$t(l,s),d=ea(c,e,n,r,u);return i&&YD(c,t,d,$t(l,a),o),d.mergedAttrs=Xs(d.mergedAttrs,d.attrs),d.attrs!==null&&$s(d,d.attrs,!1),d.mergedAttrs!==null&&$s(d,d.mergedAttrs,!0),c.queries!==null&&c.queries.elementStart(c,d),d}function om(e,t){U0(e,t),nl(t)&&e.queries.elementEnd(t)}function ow(e,t,n,r,o,i){let s=t.consts,a=$t(s,o),c=ea(t,e,n,r,a);if(c.mergedAttrs=Xs(c.mergedAttrs,c.attrs),i!=null){let l=$t(s,i);c.localNames=[];for(let u=0;u<l.length;u+=2)c.localNames.push(l[u],-1)}return c.attrs!==null&&$s(c,c.attrs,!1),c.mergedAttrs!==null&&$s(c,c.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,c),c}var im=typeof ShadowRoot<"u",iw=typeof Document<"u";function sw(e){return Object.keys(e).map(t=>{let[n,r,o]=e[t],i={propName:n,templateName:t,isSignal:(r&Js.SignalBased)!==0};return o&&(i.transform=o),i})}function aw(e){return Object.keys(e).map(t=>({propName:e[t],templateName:t}))}function cw(e,t,n){let r=t instanceof Qe?t:t?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new Hs(n,r):n}function lw(e){let t=e.get(cr,null);if(t===null)throw new O(407,!1);let n=e.get(Kh,null),r=e.get(Lt,null),o=e.get(qt,null,{optional:!0});return{rendererFactory:t,sanitizer:n,changeDetectionScheduler:r,ngReflect:!1,tracingService:o}}function uw(e,t,n){let r=sm(e);return hh(t,r,r==="svg"?rl:r==="math"?Af:n)}function dw(e){if((e&&"localName"in e&&typeof e.localName=="string"?e.localName:e?.tagName)?.toLowerCase()==="script")throw new O(905,!1)}function sm(e){return(e.selectors[0][0]||"div").toLowerCase()}var Us=class{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=sw(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=aw(this.componentDef.outputs),this.cachedOutputs}constructor(t,n){this.componentDef=t,this.ngModule=n,this.componentType=t.type,this.selector=NE(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!n}create(t,n,r,o,i,s,a,c){te(Q.DynamicComponentStart);let l=F(null);try{let u=this.componentDef,d=cw(u,o||this.ngModule,t),p=lw(d),f=p.tracingService;return f&&f.componentCreate?f.componentCreate(Qh(u),()=>this.createComponentRef(p,d,n,r,i,s,a,c)):this.createComponentRef(p,d,n,r,i,s,a,c)}finally{F(l)}}createComponentRef(t,n,r,o,i,s,a,c){let l=this.componentDef,u=fw(o,l,s,i,c),d=t.rendererFactory.createRenderer(null,l),p=o?sD(d,o,l.encapsulation,n):uw(l,d,a??null);dw(p);let f=n.get(dr,null),m=pw(p,()=>n.get(Fe,null)??rh());f&&f.addHost(m);let v=s?.some(Mp)||i?.some(h=>typeof h!="function"&&h.bindings.some(Mp)),g=gu(null,u,null,512|Sh(l),null,null,t,d,n,null,ch(p,n,!0));f&&im&&m instanceof ShadowRoot&&Es(g,()=>{f.removeHost(m)}),g[we]=p,_s(g);let y=null;try{let h=rm(we,g,2,"#host",()=>u.directiveRegistry,!0,0);yh(d,p,h),zr(p,g),kh(u,g,h),uh(u,h,g),om(u,h),r!==void 0&&mw(h,this.ngContentSelectors,r),y=Ht(h.index,g),g[ge]=y[ge],Eu(u,g,null)}catch(h){throw y!==null&&Pl(y),Pl(g),h}finally{te(Q.DynamicComponentEnd),Cs()}return new zs(this.componentType,g,!!v)}};function fw(e,t,n,r,o){let i=e?["ng-version","22.2.0"]:AE(t.selectors[0]),s=null,a=null,c=0;if(n)for(let d of n)c+=d[$l].requiredVars,d.create&&(d.targetIdx=0,(s??=[]).push(d)),d.update&&(d.targetIdx=0,(a??=[]).push(d));if(r)for(let d=0;d<r.length;d++){let p=r[d];if(typeof p!="function")for(let f of p.bindings){c+=f[$l].requiredVars;let m=d+1;f.create&&(f.targetIdx=m,(s??=[]).push(f)),f.update&&(f.targetIdx=m,(a??=[]).push(f))}}let l=[t];if(r)for(let d of r){let p=typeof d=="function"?d:d.type,f=ss(p);l.push(f)}return mu(0,null,hw(s,a),1,c,l,null,null,null,[i],null)}function pw(e,t){let n=e.getRootNode?.();return iw&&n instanceof Document?n.head:n&&im&&n instanceof ShadowRoot?n:t().head}function hw(e,t){return!e&&!t?null:n=>{if(n&1&&e)for(let r of e)r.create();if(n&2&&t)for(let r of t)r.update()}}function Mp(e){let t=e[$l].kind;return t==="input"||t==="twoWay"}var zs=class extends Xh{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,n,r){super(),this._rootLView=n,this._hasInputBindings=r,this._tNode=ms(n[L],we),this.location=Kp(this._tNode,n),this.instance=Ht(this._tNode.index,n)[ge],this.hostView=this.changeDetectorRef=new Vs(n,void 0),this.componentType=t}setInput(t,n){this._hasInputBindings;let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),n))return;let o=this._rootLView,i=vu(r,o[L],o,t,n);this.previousInputValues.set(t,n);let s=Ht(r.index,o);bu(s,1)}get injector(){return new Ro(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function mw(e,t,n){let r=e.projection=[];for(let o=0;o<t.length;o++){let i=n[o];r.push(i!=null&&i.length?Array.from(i):null)}}var gw=()=>!1;function yw(e,t,n){return gw(e,t,n)}function ta(e){return!!e&&typeof e.then=="function"}function xu(e){return!!e&&typeof e.subscribe=="function"}var Po=class{};var Fo=class extends Po{injector;instance=null;constructor(t){super();let n=new Yn([...t.providers,{provide:Po,useValue:this}],t.parent||vo(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function am(e,t,n=null){return new Fo({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var vw=(()=>{class e{_injector;cachedInjectors=new Map;constructor(n){this._injector=n}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=Xc(!1,n.type),o=r.length>0?am([r],this._injector,""):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ee({token:e,providedIn:"environment",factory:()=>new e(Y(Qe))})}return e})();function be(e){return Bp(()=>{let t=bw(e),n=De(ne({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection!==eu.Eager,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:t.standalone?o=>o.get(vw).getOrCreateStandaloneInjector(n):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||It.Emulated,styles:e.styles||Ft,_:null,schemas:e.schemas||null,tView:null,id:""});t.standalone&&Wr("NgStandalone"),_w(n);let r=e.dependencies;return n.directiveDefs=Np(r,Ew),n.pipeDefs=Np(r,yf),n.id=Cw(n),n})}function Ew(e){return mo(e)||ss(e)}function Dw(e,t){if(e==null)return ds;let n={};for(let r in e)if(Object.hasOwn(e,r)){let o=e[r],i,s,a,c;Array.isArray(o)?(a=o[0],i=o[1],s=o[2]??i,c=o[3]||null):(i=o,s=o,a=Js.None,c=null),n[i]=[r,a,c],t[i]=s}return n}function ww(e){if(e==null)return ds;let t={};for(let n in e)Object.hasOwn(e,n)&&(t[e[n]]=n);return t}function Tu(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function bw(e){let t={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputConfig:e.inputs||ds,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Ft,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,signalFormsInputPresence:null,inputs:Dw(e.inputs,t),outputs:ww(e.outputs),debugInfo:null}}function _w(e){e.features?.forEach(t=>t(e))}function Np(e,t){return e?()=>{let n=typeof e=="function"?e():e,r=[];for(let o of n){let i=t(o);i!==null&&r.push(i)}return r}:null}function Cw(e){let t=0,n=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,n,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483648,"c"+t}var cm=new H("");var Su=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r});appInits=T(cm,{optional:!0})??[];injector=T(Et);constructor(){}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let i=Or(this.injector,o);if(ta(i))n.push(i);else if(xu(i)){let s=new Promise((a,c)=>{i.subscribe({complete:a,error:c})});n.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),n.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Nn({token:e,factory:e.\u0275fac})}return e})();function Iw(e,t,n,r,o,i,s,a){if(n.firstCreatePass){e.mergedAttrs=Xs(e.mergedAttrs,e.attrs);let u=e.tView=mu(2,e,o,i,s,n.directiveRegistry,n.pipeRegistry,null,n.schemas,n.consts,null);n.queries!==null&&(n.queries.template(n,e),u.queries=n.queries.embeddedTView(e))}a&&(e.flags|=a),Br(e,!1);let c=xw(n,t,e,r);Ss()&&pu(n,t,c,e),zr(c,t);let l=PD(c,t,c,e);t[r+we]=l,Nh(t,l),yw(l,e,t)}function Gs(e,t,n,r,o,i,s,a,c,l,u){let d=n+we,p;if(t.firstCreatePass){if(p=ea(t,d,4,s||null,a||null),l!=null){let f=$t(t.consts,l);p.localNames=[];for(let m=0;m<f.length;m+=2)p.localNames.push(f[m],-1)}}else p=t.data[d];return Iw(p,e,t,n,r,o,i,c),l!=null&&yu(e,p,u),p}var xw=Tw;function Tw(e,t,n,r){return Ms(!0),t[ye].createComment("")}var Mu=new H("");var lm=new H("");function um(){lc(()=>{let e="";throw new O(-600,e)})}var Sw=10;var na=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=T(ln);afterRenderManager=T(su);zonelessEnabled=T(xo);rootEffectScheduler=T(As);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new vt;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=T(ar);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Pt(n=>!n))}constructor(){T(qt,{optional:!0})}whenStable(){let n;return new Promise(r=>{n=this.isStable.subscribe({next:o=>{o&&r()}})}).finally(()=>{n.unsubscribe()})}_injector=T(Qe);_rendererFactory=null;get injector(){return this._injector}bootstrap(n,r){return this.bootstrapImpl(n,r)}bootstrapImpl(n,r,o=Et.NULL){return this._injector.get(Ve).run(()=>{if(te(Q.BootstrapComponentStart),!this._injector.get(Su).done){let y="";throw new O(405,y)}let a=mo(n),c=this._injector.get(Po),l=new Us(a,c);this.componentTypes.push(n);let{hostElement:u,directives:d,bindings:p}=Mw(r),f=u||l.selector,m=l.create(o,[],f,c.injector,d,p),v=m.location.nativeElement,g=m.injector.get(Mu,null);return g?.registerApplication(v),m.onDestroy(()=>{this.detachView(m.hostView),No(this.components,m),g?.unregisterApplication(v)}),this._loadComponent(m),te(Q.BootstrapComponentEnd,m),m})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){te(Q.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(Ks.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw te(Q.ChangeDetectionEnd),new O(101,!1);let n=F(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,F(n),this.afterTick.next(),te(Q.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(cr,null,{optional:!0}));let n=0;for(;this.dirtyFlags!==0&&n++<Sw;){te(Q.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{te(Q.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let n=!1;if(this.dirtyFlags&7){let r=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:o}of this.allViews){if(!r&&!wo(o))continue;let i=r&&!this.zonelessEnabled?0:1;$h(o,i),n=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}n||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:n})=>wo(n))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;No(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView);try{this.tick()}catch(o){this.internalErrorHandler(o)}this.components.push(n),this._injector.get(lm,[]).forEach(o=>o(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),()=>No(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new O(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Nn({token:e,factory:e.\u0275fac})}return e})();function Mw(e){return e===void 0||typeof e=="string"||e instanceof Element?{hostElement:e}:e}function No(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function Le(e,t,n,r){let o=K(),i=sr();if(xt(o,i,t)){let s=We(),a=Is();gD(a,o,e,t,n,r)}return Le}var Ul=class{destroy(t){}updateValue(t,n){}swap(t,n){let r=Math.min(t,n),o=Math.max(t,n),i=this.detach(o);if(o-r>1){let s=this.detach(r);this.attach(r,i),this.attach(o,s)}else this.attach(r,i)}move(t,n){this.attach(n,this.detach(t))}};function Tl(e,t,n,r,o){return e===n&&Object.is(t,r)?1:Object.is(o(e,t),o(n,r))?-1:0}function Nw(e,t,n,r){let o,i,s=0,a=e.length-1,c=void 0;if(Array.isArray(t)){F(r);let l=t.length-1;for(F(null);s<=a&&s<=l;){let u=e.at(s),d=t[s],p=Tl(s,u,s,d,n);if(p!==0){p<0&&e.updateValue(s,d),s++;continue}let f=e.at(a),m=t[l],v=Tl(a,f,l,m,n);if(v!==0){v<0&&e.updateValue(a,m),a--,l--;continue}let g=n(s,u),y=n(a,f),h=n(s,d);if(Object.is(h,y)){let I=n(l,m);Object.is(I,g)?(e.swap(s,a),e.updateValue(a,m),l--,a--):e.move(a,s),e.updateValue(s,d),s++;continue}if(o??=new Ws,i??=Rp(e,s,a,n),zl(e,o,s,h))e.updateValue(s,d),s++,a++;else if(i.has(h))o.set(g,e.detach(s)),a--;else{let I=e.create(s,t[s]);e.attach(s,I),s++,a++}}for(;s<=l;)Ap(e,o,n,s,t[s]),s++}else if(t!=null){F(r);let l=t[Symbol.iterator]();F(null);let u=l.next();for(;!u.done&&s<=a;){let d=e.at(s),p=u.value,f=Tl(s,d,s,p,n);if(f!==0)f<0&&e.updateValue(s,p),s++,u=l.next();else{o??=new Ws,i??=Rp(e,s,a,n);let m=n(s,p);if(zl(e,o,s,m))e.updateValue(s,p),s++,a++,u=l.next();else if(!i.has(m))e.attach(s,e.create(s,p)),s++,a++,u=l.next();else{let v=n(s,d);o.set(v,e.detach(s)),a--}}}for(;!u.done;)Ap(e,o,n,e.length,u.value),u=l.next()}for(;s<=a;)e.destroy(e.detach(a--));o?.forEach(l=>{e.destroy(l)})}function zl(e,t,n,r){return t!==void 0&&t.has(r)?(e.attach(n,t.get(r)),t.delete(r),!0):!1}function Ap(e,t,n,r,o){if(zl(e,t,r,n(r,o)))e.updateValue(r,o);else{let i=e.create(r,o);e.attach(r,i)}}function Rp(e,t,n,r){let o=new Set;for(let i=t;i<=n;i++)o.add(r(i,e.at(i)));return o}var Ws=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let n=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(n)?(this.kvMap.set(t,this._vMap.get(n)),this._vMap.delete(n)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,n){if(this.kvMap.has(t)){let r=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(r);)r=o.get(r);o.set(r,n)}else this.kvMap.set(t,n)}forEach(t){for(let[n,r]of this.kvMap)if(t(r,n),this._vMap!==void 0){let o=this._vMap;for(;o.has(r);)r=o.get(r),t(r,n)}}};function se(e,t,n,r,o,i,s,a){Wr("NgControlFlow");let c=K(),l=We(),u=$t(l.consts,i);return Gs(c,l,e,t,n,r,o,u,256,s,a),Nu}function Nu(e,t,n,r,o,i,s,a){return Wr("NgControlFlow"),Aw(e,t,n,r,o,i,s,a),Nu}function Aw(e,t,n,r,o,i,s,a){let c=K(),l=We(),u=$t(l.consts,i);Gs(c,l,e,t,n,r,o,u,512,s,a)}function ae(e,t){Wr("NgControlFlow");let n=K(),r=sr(),o=n[r]!==qe?n[r]:-1,i=o!==-1?qs(n,we+o):void 0,s=0;if(xt(n,r,e)){let a=F(null);try{if(i!==void 0&&qh(i,s),e!==-1){let c=we+e,l=qs(n,c),u=Yl(n[L],c),d=Zh(l,u,n),p=Du(n,u,t,{dehydratedView:d});_u(l,p,s,wu(u,d))}}finally{F(a)}}else if(i!==void 0){let a=Wh(i,s);a!==void 0&&(a[ge]=t)}}var Gl=class{lContainer;$implicit;$index;constructor(t,n,r){this.lContainer=t,this.$implicit=n,this.$index=r}get $count(){return this.lContainer.length-pe}};function Yt(e,t){return t}var Wl=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,n,r){this.hasEmptyBlock=t,this.trackByFn=n,this.liveCollection=r}};function xe(e,t,n,r,o,i,s,a,c,l,u,d,p){Wr("NgControlFlow");let f=K(),m=We(),v=c!==void 0,g=K(),y=a?s.bind(g[rt][ge]):s,h=new Wl(v,y);g[we+e]=h,Gs(f,m,e+1,t,n,r,o,$t(m.consts,i),256),v&&Gs(f,m,e+2,c,l,u,d,$t(m.consts,p),512)}var ql=class extends Ul{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,n,r){super(),this.lContainer=t,this.hostLView=n,this.templateTNode=r}get length(){return this.lContainer.length-pe}at(t){return this.getLView(t)[ge].$implicit}attach(t,n){let r=n[Pr];this.needsIndexUpdate||=t!==this.length,_u(this.lContainer,n,t,wu(this.templateTNode,r)),Rw(this.lContainer,t)}detach(t){return this.needsIndexUpdate||=t!==this.length-1,kw(this.lContainer,t),Ow(this.lContainer,t)}create(t,n){let r=zD(this.lContainer,this.templateTNode.tView.ssrId);return Du(this.hostLView,this.templateTNode,new Gl(this.lContainer,n,t),{dehydratedView:r})}destroy(t){fu(t[L],t)}updateValue(t,n){this.getLView(t)[ge].$implicit=n}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[ge].$index=t}getLView(t){return Pw(this.lContainer,t)}};function Te(e){let t=F(null),n=zt();try{let r=K(),o=r[L],i=r[n],s=n+1,a=qs(r,s);if(i.liveCollection===void 0){let l=Yl(o,s);i.liveCollection=new ql(a,r,l)}else i.liveCollection.reset();let c=i.liveCollection;if(Nw(c,e,i.trackByFn,t),c.updateIndexes(),i.hasEmptyBlock){let l=sr(),u=c.length===0;if(xt(r,l,u)){let d=n+2,p=qs(r,d);if(u){let f=Yl(o,d),m=Zh(p,f,r),v=Du(r,f,void 0,{dehydratedView:m});_u(p,v,0,wu(f,m))}else o.firstUpdatePass&&VD(p),qh(p,0)}}}finally{F(t)}}function qs(e,t){return e[t]}function Rw(e,t){if(e.length<=pe)return;let n=pe+t,r=e[n];r&&Ch(r)}function kw(e,t){if(e.length<=pe)return;let n=pe+t,r=e[n];r&&bh(r)}function Ow(e,t){return Cu(e,t)}function Pw(e,t){return Wh(e,t)}function Yl(e,t){return ms(e,t)}function ce(e,t,n){let r=K(),o=sr();if(xt(r,o,t)){let i=We(),s=Is();uD(s,r,e,t,r[ye],n)}return ce}function Zl(e,t,n,r,o){vu(t,e,n,o?"class":"style",r)}function S(e,t,n,r){let o=K(),i=o[L],s=e+we,a=i.firstCreatePass?rm(s,o,2,t,mD,jf(),n,r):i.data[s];if(xn(a)){let c=o[wt].tracingService;if(c&&c.componentCreate){let l=i.data[a.directiveStart+a.componentOffset];return c.componentCreate(Qh(l),()=>(kp(e,t,o,a,r),S))}}return kp(e,t,o,a,r),S}function kp(e,t,n,r,o){if(Ph(r,n,e,t,dm),ps(r)){let i=n[L];kh(i,n,r),uh(i,r,n)}o!=null&&yu(n,r)}function M(){let e=We(),t=Ut(),n=Fh(t);return e.firstCreatePass&&om(e,n),ll(n)&&ul(),cl(),n.classesWithoutHost!=null&&G0(n)&&Zl(e,n,K(),n.classesWithoutHost,!0),n.stylesWithoutHost!=null&&W0(n)&&Zl(e,n,K(),n.stylesWithoutHost,!1),M}function Ye(e,t,n,r){return S(e,t,n,r),M(),Ye}function _(e,t,n,r){let o=K(),i=o[L],s=e+we,a=i.firstCreatePass?ow(s,i,2,t,n,r):i.data[s];return Ph(a,o,e,t,dm),r!=null&&yu(o,a),_}function C(){let e=Ut(),t=Fh(e);return ll(t)&&ul(),cl(),C}function Se(e,t,n,r){return _(e,t,n,r),C(),Se}var dm=(e,t,n,r,o)=>(Ms(!0),hh(t[ye],r,yl()));function Me(){return K()}function ue(e,t,n){let r=K(),o=sr();if(xt(r,o,t)){let i=We(),s=Is();Oh(s,r,e,t,r[ye],n)}return ue}var So=void 0;function Fw(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&n===0?1:5}var Lw=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["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"]],So,[["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"]],So,[["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\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",So,So,So],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",Fw],Sl=Object.create(null);function ra(e){let t=jw(e),n=Op(t);if(n)return n;let r=t.split("-")[0];if(n=Op(r),n)return n;if(r==="en")return Lw;throw new O(701,!1)}function Op(e){if(!(e in Sl)){let t=Kn.ng&&Kn.ng.common&&Kn.ng.common.locales&&Kn.ng.common.locales[e];return t!==void 0&&(Sl[e]=t),t}return Sl[e]}var qr={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};function jw(e){return e.toLowerCase().replace(/_/g,"-")}var Bo="en-US";var Bw=Bo;function fm(e){typeof e=="string"&&(Bw=e.toLowerCase().replace(/_/g,"-"))}function _e(e,t,n){let r=K(),o=We(),i=Ut();return Vw(o,r,r[ye],i,e,t,n),_e}function me(e,t,n){let r=K(),o=We(),i=Ut();return(i.type&3||n)&&em(i,o,r,n,r[ye],e,t,Fs(i,r,t)),me}function Vw(e,t,n,r,o,i,s){let a=!0,c=null;if((r.type&3||s)&&(c??=Fs(r,t,i),em(r,e,t,s,n,o,i,c)&&(a=!1)),a){let l=r.outputs?.[o],u=r.hostDirectiveOutputs?.[o];if(u&&u.length)for(let d=0;d<u.length;d+=2){let p=u[d],f=u[d+1];c??=Fs(r,t,i),Ip(r,t,p,f,o,c)}if(l&&l.length)for(let d of l)c??=Fs(r,t,i),Ip(r,t,d,o,o,c)}}function R(e=1){return Qf(e)}function Zt(e){let t=$f();return gs(t,we+e)}function Rs(e,t){return e<<17|t<<2}function lr(e){return e>>17&32767}function Hw(e){return(e&2)==2}function $w(e,t){return e&131071|t<<17}function Xl(e){return e|2}function Gr(e){return(e&131068)>>2}function Ml(e,t){return e&-131069|t<<2}function Uw(e){return(e&1)===1}function Kl(e){return e|1}function zw(e,t,n,r,o,i){let s=i?t.classBindings:t.styleBindings,a=lr(s),c=Gr(s);e[r]=n;let l=!1,u;if(Array.isArray(n)){let d=n;u=d[1],(u===null||Rr(d,u)>0)&&(l=!0)}else u=n;if(o)if(c!==0){let p=lr(e[a+1]);e[r+1]=Rs(p,a),p!==0&&(e[p+1]=Ml(e[p+1],r)),e[a+1]=$w(e[a+1],r)}else e[r+1]=Rs(a,0),a!==0&&(e[a+1]=Ml(e[a+1],r)),a=r;else e[r+1]=Rs(c,0),a===0?a=r:e[c+1]=Ml(e[c+1],r),c=r;l&&(e[r+1]=Xl(e[r+1])),Pp(e,u,r,!0),Pp(e,u,r,!1),Gw(t,u,e,r,i),s=Rs(a,c),i?t.classBindings=s:t.styleBindings=s}function Gw(e,t,n,r,o){let i=o?e.residualClasses:e.residualStyles;i!=null&&typeof t=="string"&&Rr(i,t)>=0&&(n[r+1]=Kl(n[r+1]))}function Pp(e,t,n,r){let o=e[n+1],i=t===null,s=r?lr(o):Gr(o),a=!1;for(;s!==0&&(a===!1||i);){let c=e[s],l=e[s+1];Ww(c,t)&&(a=!0,e[s+1]=r?Kl(l):Xl(l)),s=r?lr(l):Gr(l)}a&&(e[n+1]=r?Xl(o):Kl(o))}function Ww(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Rr(e,t)>=0:!1}var Ct={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function qw(e){return e.substring(Ct.key,Ct.keyEnd)}function Yw(e){return Zw(e),pm(e,hm(e,0,Ct.textEnd))}function pm(e,t){let n=Ct.textEnd;return n===t?-1:(t=Ct.keyEnd=Xw(e,Ct.key=t,n),hm(e,t,n))}function Zw(e){Ct.key=0,Ct.keyEnd=0,Ct.value=0,Ct.valueEnd=0,Ct.textEnd=e.length}function hm(e,t,n){for(;t<n&&e.charCodeAt(t)<=32;)t++;return t}function Xw(e,t,n){for(;t<n&&e.charCodeAt(t)>32;)t++;return t}function it(e,t){return Qw(e,t,null,!0),it}function Vo(e){Jw(ib,Kw,e,!0)}function Kw(e,t){for(let n=Yw(t);n>=0;n=pm(t,n))ls(e,qw(t),!0)}function Qw(e,t,n,r){let o=K(),i=We(),s=ws(2);if(i.firstUpdatePass&&gm(i,e,s,r),t!==qe&&xt(o,s,t)){let a=i.data[zt()];ym(i,a,o,o[ye],e,o[s+1]=ab(t,n),r,s)}}function Jw(e,t,n,r){let o=We(),i=ws(2);o.firstUpdatePass&&gm(o,null,i,r);let s=K();if(n!==qe&&xt(s,i,n)){let a=o.data[zt()];if(vm(a,r)&&!mm(o,i)){let c=r?a.classesWithoutHost:a.stylesWithoutHost;c!==null&&(n=ns(c,n||"")),Zl(o,a,s,n,r)}else sb(o,a,s,s[ye],s[i+1],s[i+1]=ob(e,t,n),r,i)}}function mm(e,t){return t>=e.expandoStartIndex}function gm(e,t,n,r){let o=e.data;if(o[n+1]===null){let i=o[zt()],s=mm(e,n);vm(i,r)&&t===null&&!s&&(t=!1),t=eb(o,i,t,r),zw(o,i,t,n,s,r)}}function eb(e,t,n,r){let o=Yf(e),i=r?t.residualClasses:t.residualStyles;if(o===null)(r?t.classBindings:t.styleBindings)===0&&(n=Nl(null,e,t,n,r),n=Lo(n,t.attrs,r),i=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==o)if(n=Nl(o,e,t,n,r),i===null){let c=tb(e,t,r);c!==void 0&&Array.isArray(c)&&(c=Nl(null,e,t,c[1],r),c=Lo(c,t.attrs,r),nb(e,t,r,c))}else i=rb(e,t,r)}return i!==void 0&&(r?t.residualClasses=i:t.residualStyles=i),n}function tb(e,t,n){let r=n?t.classBindings:t.styleBindings;if(Gr(r)!==0)return e[lr(r)]}function nb(e,t,n,r){let o=n?t.classBindings:t.styleBindings;e[lr(o)]=r}function rb(e,t,n){let r,o=t.directiveEnd;for(let i=1+t.directiveStylingLast;i<o;i++){let s=e[i].hostAttrs;r=Lo(r,s,n)}return Lo(r,t.attrs,n)}function Nl(e,t,n,r,o){let i=null,s=n.directiveEnd,a=n.directiveStylingLast;for(a===-1?a=n.directiveStart:a++;a<s&&(i=t[a],r=Lo(r,i.hostAttrs,o),i!==e);)a++;return e!==null&&(n.directiveStylingLast=a),r}function Lo(e,t,n){let r=n?1:2,o=-1;if(t!==null)for(let i=0;i<t.length;i++){let s=t[i];typeof s=="number"?o=s:o===r&&(Array.isArray(e)||(e=e===void 0?[]:["",e]),ls(e,s,n?!0:t[++i]))}return e===void 0?null:e}function ob(e,t,n){if(n==null||n==="")return Ft;let r=[],o=ko(n);if(Array.isArray(o))for(let i=0;i<o.length;i++)e(r,o[i],!0);else if(o instanceof Set)for(let i of o)e(r,i,!0);else if(typeof o=="object")for(let i in o)Object.hasOwn(o,i)&&e(r,i,o[i]);else typeof o=="string"&&t(r,o);return r}function ib(e,t,n){let r=String(t);r!==""&&!r.includes(" ")&&ls(e,r,n)}function sb(e,t,n,r,o,i,s,a){o===qe&&(o=Ft);let c=0,l=0,u=0<o.length?o[0]:null,d=0<i.length?i[0]:null;for(;u!==null||d!==null;){let p=c<o.length?o[c+1]:void 0,f=l<i.length?i[l+1]:void 0,m=null,v;u===d?(c+=2,l+=2,p!==f&&(m=d,v=f)):d===null||u!==null&&u<d?(c+=2,m=u):(l+=2,m=d,v=f),m!==null&&ym(e,t,n,r,m,v,s,a),u=c<o.length?o[c]:null,d=l<i.length?i[l]:null}}function ym(e,t,n,r,o,i,s,a){if(!(t.type&3))return;let c=e.data,l=c[a+1],u=Uw(l)?Fp(c,t,n,o,Gr(l),s):void 0;if(!Ys(u)){Ys(i)||Hw(l)&&(i=Fp(c,null,n,o,a,s));let d=ol(zt(),n);nD(r,s,d,o,i)}}function Fp(e,t,n,r,o,i){let s=t===null,a;for(;o>0;){let c=e[o],l=Array.isArray(c),u=l?c[1]:c,d=u===null,p=n[o+1];p===qe&&(p=d?Ft:void 0);let f=d?us(p,r):u===r?p:void 0;if(l&&!Ys(f)&&(f=us(c,r)),Ys(f)&&(a=f,s))return a;let m=e[o+1];o=s?lr(m):Gr(m)}if(t!==null){let c=i?t.residualClasses:t.residualStyles;c!=null&&(a=us(c,r))}return a}function Ys(e){return e!==void 0}function ab(e,t){return e==null||e===""||(typeof t=="string"?e=ko(e)+t:typeof e=="object"&&(e=ts(ko(e)))),e}function vm(e,t){return(e.flags&(t?8:16))!==0}function E(e,t=""){let n=K(),r=We(),o=e+we,i=r.firstCreatePass?ea(r,o,1,t,null):r.data[o],s=cb(r,n,i,t);n[o]=s,Ss()&&pu(r,n,s,i),Br(i,!1)}var cb=(e,t,n,r)=>(Ms(!0),gE(t[ye],r));function lb(e,t,n,r=""){return xt(e,sr(),n)?t+Ar(n)+r:qe}function ub(e,t,n,r,o,i=""){let s=Uf(),a=Jh(e,s,n,o);return ws(2),a?t+Ar(n)+r+Ar(o)+i:qe}function j(e){return he("",e),j}function he(e,t,n){let r=K(),o=lb(r,e,t,n);return o!==qe&&Em(r,zt(),o),he}function Xt(e,t,n,r,o){let i=K(),s=ub(i,e,t,n,r,o);return s!==qe&&Em(i,zt(),s),Xt}function Em(e,t,n){let r=ol(t,e);yE(e[ye],r,n)}function Ho(e,t){let n=Ds()+e,r=K();return r[n]===qe?Iu(r,n,t()):GD(r,n)}function Dm(e,t){let n=e[t];return n===qe?void 0:n}function db(e,t,n,r,o,i){let s=t+n;return xt(e,s,o)?Iu(e,s+1,i?r.call(i,o):r(o)):Dm(e,s+1)}function fb(e,t,n,r,o,i,s){let a=t+n;return Jh(e,a,o,i)?Iu(e,a+2,s?r.call(s,o,i):r(o,i)):Dm(e,a+2)}function st(e,t){let n=We(),r,o=e+we;n.firstCreatePass?(r=pb(t,n.pipeRegistry),n.data[o]=r,r.onDestroy&&(n.destroyHooks??=[]).push(o,r.onDestroy)):r=n.data[o];let i=r.factory||(r.factory=qn(r.type,!0)),s,a=Ge(jo);try{let c=Ls(!1),l=i();return Ls(c),il(n,K(),o,l),l}finally{Ge(a)}}function pb(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function Kt(e,t,n){let r=e+we,o=K(),i=gs(o,r);return wm(o,r)?db(o,Ds(),t,i.transform,n,i):i.transform(n)}function $o(e,t,n,r){let o=e+we,i=K(),s=gs(i,o);return wm(i,o)?fb(i,Ds(),t,s.transform,n,r,s):s.transform(n,r)}function wm(e,t){return e[L].data[t].pure}var bm=(()=>{class e{applicationErrorHandler=T(ln);appRef=T(na);taskService=T(ar);ngZone=T(Ve);zonelessEnabled=T(xo);tracing=T(qt,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new ze;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(po):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(T(_l,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let n=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(n);return}this.switchToMicrotaskScheduler(),this.taskService.remove(n)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let n=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(n)})})}notify(n){if(!this.zonelessEnabled&&n===5)return;switch(n){case 0:case 2:{this.appRef.dirtyFlags|=2;break}case 3:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;break}case 12:{this.appRef.dirtyFlags|=16;break}case 13:{this.appRef.dirtyFlags|=2;break}case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?rp:vl;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(po+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(r){this.applicationErrorHandler(r)}finally{this.taskService.remove(n),this.cleanup()}}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(r){return new(r||e)};static \u0275prov=Nn({token:e,factory:e.\u0275fac})}return e})();function _m(){return[{provide:Lt,useExisting:bm},{provide:Ve,useClass:ho},{provide:xo,useValue:!0}]}function hb(){return typeof $localize<"u"&&$localize.locale||Bo}var Uo=new H("",{factory:()=>T(Uo,{optional:!0,skipSelf:!0})||hb()});var oa=class{destroyed=!1;listeners=null;errorHandler=T(lt,{optional:!0});isEmitting=!1;hasNullListeners=!1;destroyRef=T(Ie);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(t){if(this.destroyed)throw new O(953,!1);return(this.listeners??=[]).push(t),{unsubscribe:()=>{let n=this.listeners?this.listeners.indexOf(t):-1;n>-1&&(this.isEmitting?(this.hasNullListeners=!0,this.listeners[n]=null):this.listeners.splice(n,1))}}}emit(t){if(this.destroyed){console.warn(Zn(953,!1));return}if(this.listeners===null)return;this.isEmitting=!0;let n=F(null);try{for(let r of this.listeners)try{r!==null&&r(t)}catch(o){this.errorHandler?.handleError(o)}}finally{this.hasNullListeners&&(this.hasNullListeners=!1,this.listeners&&mb(this.listeners)),F(n),this.isEmitting=!1}}};function mb(e){let t=e.length-1;for(;t>-1;)e[t]===null&&e.splice(t,1),t--}function et(e,t){return Ti(e,t?.equal)}function fr(e){return Bd(e)}var Cm=class e extends Error{_brand;constructor(t){super(t)}static IDLE=new e("IDLE");static LOADING=new e("LOADING")};function xm(e,t){let n=Object.create(jp);n.value=e,n.transformFn=t?.transform;function r(){if(Dn(n),n.value===Jl){let o=null;throw new O(-950,o)}return n.value}return r[Be]=n,r}function sa(e){return new oa}function Im(e,t){return xm(e,t)}function Rb(e){return xm(Jl,e)}var Tt=(Im.required=Rb,Im);var kb=1e4;var h2=kb-1e3;var Ru=new H(""),Ob=new H("");function zo(e){return!e.moduleRef}function Pb(e){let t=zo(e)?e.r3Injector:e.moduleRef.injector,n=t.get(Ve);return n.run(()=>{zo(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=t.get(ln),o;if(n.runOutsideAngular(()=>{o=n.onError.subscribe({next:r})}),zo(e)){let i=()=>t.destroy(),s=e.platformInjector.get(Ru);s.add(i),t.onDestroy(()=>{o.unsubscribe(),s.delete(i)})}else{let i=()=>e.moduleRef.destroy(),s=e.platformInjector.get(Ru);s.add(i),e.moduleRef.onDestroy(()=>{No(e.allPlatformModules,e.moduleRef),o.unsubscribe(),s.delete(i)})}return Lb(r,n,()=>{let i=t.get(ar),s=i.add(),a=t.get(Su);return a.runInitializers(),a.donePromise.then(()=>{let c=t.get(Uo,Bo);if(fm(c||Bo),!t.get(Ob,!0))return zo(e)?t.get(na):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(zo(e)){let u=t.get(na);return e.rootComponent!==void 0&&u.bootstrap(e.rootComponent),u}else return Fb?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>{i.remove(s)})})})}var Fb;function Lb(e,t,n){try{let r=n();return ta(r)?r.catch(o=>{throw t.runOutsideAngular(()=>e(o)),o}):r}catch(r){throw t.runOutsideAngular(()=>e(r)),r}}var ia=null;function jb(e=[],t){return Et.create({name:t,providers:[{provide:yo,useValue:"platform"},{provide:Ru,useValue:new Set([()=>ia=null])},...e]})}function Bb(e=[]){if(ia)return ia;let t=jb(e);return ia=t,um(),Vb(t),t}function Vb(e){let t=e.get(Ns,null);Or(e,()=>{t?.forEach(n=>n())})}function Tm(e){let{rootComponent:t,appProviders:n,platformProviders:r,platformRef:o}=e;te(Q.BootstrapApplicationStart);try{let i=o?.injector??Bb(r),s=[_m(),ap,...n||[]],a=new Fo({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return Pb({r3Injector:a.injector,platformInjector:i,rootComponent:t})}catch(i){return Promise.reject(i)}finally{te(Q.BootstrapApplicationEnd)}}var Au=Symbol("NOT_SET"),Sm=new Set,Hb=De(ne({},_r),{kind:"afterRenderEffectPhase",consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Au,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase<this.phase)return;this.sequence.erroredOrDestroyed=!0}this.sequence.scheduler.notify(7)},phaseFn(e){if(this.sequence.lastPhase=this.phase,!this.dirty)return this.signal;if(this.dirty=!1,this.value!==Au&&!wr(this))return this.signal;try{for(let o of this.cleanup??Sm)o()}finally{this.cleanup?.clear()}let t=[];e!==void 0&&t.push(e),t.push(this.registerCleanupFn);let n=wn(this),r;try{r=this.userFn.apply(null,t)}finally{Vn(this,n)}return(this.value===Au||!this.equal(this.value,r))&&(this.value=r,this.version++),this.signal}}),ku=class extends Bs{scheduler;lastPhase=null;nodes=[void 0,void 0,void 0,void 0];onDestroyFns=null;constructor(t,n,r,o,i,s=null){super(t,[void 0,void 0,void 0,void 0],r,!1,i.get(Ie),s),this.scheduler=o;for(let a of au){let c=n[a];if(c===void 0)continue;let l=Object.create(Hb);l.sequence=this,l.phase=a,l.userFn=c,l.dirty=!0,l.signal=()=>(Dn(l),l.value),l.signal[Be]=l,l.registerCleanupFn=u=>(l.cleanup??=new Set).add(u),this.nodes[a]=l,this.hooks[a]=u=>l.phaseFn(u)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let t of this.onDestroyFns)t();super.destroy();for(let t of this.nodes)if(t)try{for(let n of t.cleanup??Sm)n()}finally{bn(t)}}};function Mm(e,t){let n=t?.injector??T(Et),r=n.get(Lt),o=n.get(su),i=n.get(qt,null,{optional:!0});o.impl??=n.get(Dh);let s=e;typeof s=="function"&&(s={mixedReadWrite:e});let a=n.get(Io,null,{optional:!0}),c=new ku(o.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,r,n,i?.snapshot(null));return o.impl.register(c),c}function Wo(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[o,i]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(o.trim()!==t)continue;let s=i;try{s=decodeURIComponent(i)}catch{}return s.length>1&&s[0]==='"'&&s[s.length-1]==='"'&&(s=s.slice(1,-1)),s}return null}var Nm=null;function An(){return Nm}function Pu(e){Nm??=e}var qo=class{},aa=(()=>{class e{historyGo(n){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ee({token:e,factory:()=>T(Am),providedIn:"platform"})}return e})();var Am=(()=>{class e extends aa{_location;_history;_doc=T(Fe);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return An().getBaseHref(this._doc)}onPopState(n){let r=An().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=An().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.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,r,o){this._history.pushState(n,r,o)}replaceState(n,r,o){this._history.replaceState(n,r,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||e)};static \u0275prov=ee({token:e,factory:()=>new e,providedIn:"platform"})}return e})();var hn=class e{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
|
|
5
|
+
`).forEach(n=>{let r=n.indexOf(":");if(r>0){let o=n.slice(0,r),i=n.slice(r+1).trim();this.addHeaderEntry(o,i)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((n,r)=>{this.addHeaderEntry(r,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([n,r])=>{this.setHeaderEntries(n,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let n=this.headers.get(t.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,n){return this.clone({name:t,value:n,op:"a"})}set(t,n){return this.clone({name:t,value:n,op:"s"})}delete(t,n){return this.clone({name:t,value:n,op:"d"})}maybeSetNormalizedName(t,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,t)}init(){this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init();for(let[n,r]of t.headers.entries())this.headers.set(n,r),this.normalizedNames.set(n,t.normalizedNames.get(n))}clone(t){let n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}applyUpdate(t){let n=t.name.toLowerCase();switch(t.op){case"a":case"s":let r=t.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,n);let o=t.op==="a"?(this.headers.get(n)||[]).slice():[];o.push(...r),this.headers.set(n,o);break;case"d":let i=t.value;if(i===void 0)this.headers.delete(n),this.normalizedNames.delete(n);else{let s=Array.isArray(i)?i:[i],a=this.headers.get(n);if(!a)return;a=a.filter(c=>s.indexOf(c)===-1),a.length===0?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,a)}break}}addHeaderEntry(t,n){let r=t.toLowerCase();this.maybeSetNormalizedName(t,r),this.headers.has(r)?this.headers.get(r).push(n):this.headers.set(r,[n])}setHeaderEntries(t,n){let r=(Array.isArray(n)?n:[n]).map(i=>i.toString()),o=t.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}};var la=class{map=new Map;set(t,n){return this.map.set(t,n),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}},ua=class{encodeKey(t){return Rm(t)}encodeValue(t){return Rm(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function Ub(e,t){let n=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(o=>{let i=o.indexOf("="),[s,a]=i==-1?[t.decodeKey(o),""]:[t.decodeKey(o.slice(0,i)),t.decodeValue(o.slice(i+1))],c=n.get(s)||[];c.push(a),n.set(s,c)}),n}var zb=/%(\d[a-f0-9])/gi,Gb={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Rm(e){return encodeURIComponent(e).replace(zb,(t,n)=>Gb[n]??t)}function ca(e){return`${e}`}var pn=class e{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new ua,t.fromString){if(t.fromObject)throw new O(2805,!1);this.map=Ub(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(n=>{let r=t.fromObject[n],o=Array.isArray(r)?r.map(ca):[ca(r)];this.map.set(n,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let n=this.map.get(t);return n?n[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,n){return this.clone({param:t,value:n,op:"a"})}appendAll(t){let n=[];return Object.keys(t).forEach(r=>{let o=t[r];Array.isArray(o)?o.forEach(i=>{n.push({param:r,value:i,op:"a"})}):n.push({param:r,value:o,op:"a"})}),this.clone(n)}set(t,n){return this.clone({param:t,value:n,op:"s"})}delete(t,n){return this.clone({param:t,value:n,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let n=this.encoder.encodeKey(t);return this.map.get(t).map(r=>n+"="+this.encoder.encodeValue(r)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(t),n}init(){if(this.map===null&&(this.map=new Map),this.cloneFrom!==null){this.cloneFrom.init();for(let[t,n]of this.cloneFrom.map.entries())this.map.set(t,n);this.updates.forEach(t=>{switch(t.op){case"a":case"s":let n=t.op==="a"?(this.map.get(t.param)||[]).slice():[];n.push(ca(t.value)),this.map.set(t.param,n);break;case"d":if(t.value!==void 0){let r=(this.map.get(t.param)||[]).slice(),o=r.indexOf(ca(t.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null}}};function Wb(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function km(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function Om(e){return typeof Blob<"u"&&e instanceof Blob}function Pm(e){return typeof FormData<"u"&&e instanceof FormData}function qb(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}var Fu="Content-Type",Fm="Accept",Bm="text/plain",Vm="application/json",Yb=`${Vm}, ${Bm}, */*`,Yr=class e{url;body=null;headers;context;reportProgress=!1;reportUploadProgress=!1;reportDownloadProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(t,n,r,o){this.url=n,this.method=t.toUpperCase();let i;if(Wb(this.method)||o?(this.body=r!==void 0?r:null,i=o):i=r,i){if(this.reportProgress=!!i.reportProgress,this.reportUploadProgress=!!i.reportUploadProgress,this.reportDownloadProgress=!!i.reportDownloadProgress,this.withCredentials=!!i.withCredentials,this.keepalive=!!i.keepalive,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params),i.priority&&(this.priority=i.priority),i.cache&&(this.cache=i.cache),i.credentials&&(this.credentials=i.credentials),typeof i.timeout=="number"){if(i.timeout<1||!Number.isInteger(i.timeout))throw new O(2822,"");this.timeout=i.timeout}i.mode&&(this.mode=i.mode),i.redirect&&(this.redirect=i.redirect),i.integrity&&(this.integrity=i.integrity),i.referrer!==void 0&&(this.referrer=i.referrer),i.referrerPolicy&&(this.referrerPolicy=i.referrerPolicy),this.transferCache=i.transferCache}if(this.headers??=new hn,this.context??=new la,!this.params)this.params=new pn,this.urlWithParams=n;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=n;else{let a=n,c="",l=n.indexOf("#");l!==-1&&(c=n.substring(l),a=n.substring(0,l));let u=a.indexOf("?"),d=u===-1?"?":u<a.length-1?"&":"";this.urlWithParams=a+d+s+c}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||km(this.body)||Om(this.body)||Pm(this.body)||qb(this.body)?this.body:this.body instanceof pn?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||Pm(this.body)?null:Om(this.body)?this.body.type||null:km(this.body)?null:typeof this.body=="string"?Bm:this.body instanceof pn?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Vm:null}clone(t={}){let n=t.method||this.method,r=t.url||this.url,o=t.responseType||this.responseType,i=t.keepalive??this.keepalive,s=t.priority||this.priority,a=t.cache||this.cache,c=t.mode||this.mode,l=t.redirect||this.redirect,u=t.credentials||this.credentials,d=t.referrer??this.referrer,p=t.integrity||this.integrity,f=t.referrerPolicy||this.referrerPolicy,m=t.transferCache??this.transferCache,v=t.timeout??this.timeout,g=t.body!==void 0?t.body:this.body,y=t.withCredentials??this.withCredentials,h=t.reportProgress??this.reportProgress,I=t.reportUploadProgress??this.reportUploadProgress,w=t.reportDownloadProgress??this.reportDownloadProgress,N=t.headers||this.headers,P=t.params||this.params,V=t.context??this.context;return t.setHeaders!==void 0&&(N=Object.keys(t.setHeaders).reduce(($,Z)=>$.set(Z,t.setHeaders[Z]),N)),t.setParams&&(P=Object.keys(t.setParams).reduce(($,Z)=>$.set(Z,t.setParams[Z]),P)),new e(n,r,g,{params:P,headers:N,context:V,reportProgress:h,reportUploadProgress:I,reportDownloadProgress:w,responseType:o,withCredentials:y,transferCache:m,keepalive:i,cache:a,priority:s,timeout:v,mode:c,redirect:l,credentials:u,referrer:d,integrity:p,referrerPolicy:f})}},pr=(function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e})(pr||{}),Zr=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(t,n=200,r="OK"){this.headers=t.headers||new hn,this.status=t.status!==void 0?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.redirected=t.redirected,this.responseType=t.responseType,this.ok=this.status>=200&&this.status<300}},da=class e extends Zr{constructor(t={}){super(t)}type=pr.ResponseHeader;clone(t={}){return new e({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},Yo=class e extends Zr{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=pr.Response;clone(t={}){return new e({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0,redirected:t.redirected??this.redirected,responseType:t.responseType??this.responseType})}},fn=class extends Zr{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},Zb=200;var Xb=/^\)\]\}',?\n/,O2=1024*1024,Hm=new H("",{factory:()=>null}),fa=(()=>{class e{fetchImpl=T(ju,{optional:!0})?.fetch??((...n)=>globalThis.fetch(...n));ngZone=T(Ve);destroyRef=T(Ie);maxResponseSize=T(Hm);handle(n){return new fe(r=>{let o=new AbortController,i=!1,s={next:c=>{c.type===pr.Response&&(i=!0),r.next(c)},error:c=>{i=!0,r.error(c)},complete:()=>{i=!0,r.complete()}};this.doRequest(n,o.signal,s).then(Bu,c=>s.error(new fn({error:c})));let a;return n.timeout&&(a=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},n.timeout))),()=>{a!==void 0&&clearTimeout(a),!i&&!o.signal.aborted&&o.abort()}})}async doRequest(n,r,o){let i=this.createRequestInit(n),s;try{let g=this.ngZone.runOutsideAngular(()=>this.fetchImpl(n.urlWithParams,ne({signal:r},i)));Kb(g),o.next({type:pr.Sent}),s=await g}catch(g){o.error(new fn({error:g,status:g.status??0,statusText:g.statusText,url:n.urlWithParams,headers:g.headers}));return}let a=new hn(s.headers),c=s.statusText,l=s.url||n.urlWithParams,u=s.status,d=null,p=n.reportProgress||n.reportDownloadProgress;if(p&&o.next(new da({headers:a,status:u,statusText:c,url:l})),s.body){let g=s.headers.get(Fu)??"",y=s.headers.get("content-length"),h=y!==null?Number(y):NaN;this.maxResponseSize!==null&&Number.isFinite(h)&&h>this.maxResponseSize&&(await s.body.cancel(),Lm(this.maxResponseSize));let I=[],w=s.body.getReader(),N=0,P,V,$=typeof Zone<"u"&&Zone.current,Z=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyRef.destroyed){await w.cancel(),Z=!0;break}let{done:de,value:Re}=await w.read();if(de)break;if(I.push(Re),N+=Re.length,this.maxResponseSize!==null&&N>this.maxResponseSize&&(await w.cancel(),Lm(this.maxResponseSize)),p){V=n.responseType==="text"?(V??"")+(P??=jm(g)).decode(Re,{stream:!0}):void 0;let ke=()=>o.next({type:pr.DownloadProgress,total:Number.isFinite(h)?h:void 0,loaded:N,partialText:V});$?$.run(ke):ke()}}}),Z){o.complete();return}let J=this.concatChunks(I,N);try{d=this.parseBody(n,J,g,u)}catch(de){o.error(new fn({error:de,headers:new hn(s.headers),status:s.status,statusText:s.statusText,url:s.url||n.urlWithParams}));return}}u===0&&(u=d?Zb:0);let f=u>=200&&u<300,m=s.redirected,v=s.type;f?(o.next(new Yo({body:d,headers:a,status:u,statusText:c,url:l,redirected:m,responseType:v})),o.complete()):o.error(new fn({error:d,headers:a,status:u,statusText:c,url:l,redirected:m,responseType:v}))}parseBody(n,r,o,i){switch(n.responseType){case"json":let s=new TextDecoder().decode(r).replace(Xb,"");if(s==="")return null;try{return JSON.parse(s)}catch(a){if(i<200||i>=300)return s;throw a}case"text":return jm(o).decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(n){if(n.reportUploadProgress)throw new O(2824,!1);let r={},o;if(o=n.credentials,n.withCredentials&&(o="include"),n.headers.forEach((i,s)=>r[i]=s.join(",")),n.headers.has(Fm)||(r[Fm]=Yb),!n.headers.has(Fu)){let i=n.detectContentTypeHeader();i!==null&&(r[Fu]=i)}return{body:n.serializeBody(),method:n.method,headers:r,credentials:o,keepalive:n.keepalive,cache:n.cache,priority:n.priority,mode:n.mode,redirect:n.redirect,referrer:n.referrer,integrity:n.integrity,referrerPolicy:n.referrerPolicy}}concatChunks(n,r){let o=new Uint8Array(r),i=0;for(let s of n)o.set(s,i),i+=s.length;return o}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Nn({token:e,factory:e.\u0275fac})}return e})(),ju=class{};function Bu(){}function Kb(e){e.then(Bu,Bu)}function Lm(e){throw new O(-2825,!1)}var Qb=/charset=\s*["']?([^;"'\s]+)["']?/i;function jm(e){let t=e.match(Qb);if(t!==null)try{return new TextDecoder(t[1])}catch{}return new TextDecoder}var Jb=new H("",{factory:()=>!0}),e_="XSRF-TOKEN",t_=new H("",{factory:()=>e_}),n_="X-XSRF-TOKEN",r_=new H("",{factory:()=>n_}),o_=(()=>{class e{cookieName=T(t_);doc=T(Fe);lastCookieString="";lastToken=null;parseCount=0;getToken(){let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=Wo(n,this.cookieName),this.lastCookieString=n),this.lastToken}static \u0275fac=function(r){return new(r||e)};static \u0275prov=Nn({token:e,factory:e.\u0275fac})}return e})(),$m=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=ee({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=Y(o_),o},providedIn:"root"})}return e})();function Um(e,t){if(!T(Jb)||e.method==="GET"||e.method==="HEAD")return t(e);try{let o=T(aa).href,{origin:i}=new URL(o),{origin:s}=new URL(e.url,i);if(i!==s)return t(e)}catch{return t(e)}let n=T($m).getToken(),r=T(r_);return n!=null&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,n)})),t(e)}function i_(e,t){return t(e)}function s_(e,t,n){return(r,o)=>Or(n,()=>t(r,i=>e(i,o)))}var zm=new H("",{factory:()=>[Um]}),Gm=new H(""),Wm=new H("",{factory:()=>!0});var Vu=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=ee({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=Y(fa),o},providedIn:"root"})}return e})();var pa=(()=>{class e{backend;injector;chain=null;pendingTasks=T(To);contributeToStability=T(Wm);constructor(n,r){this.backend=n,this.injector=r}handle(n){if(this.chain===null){let o=this.injector.get(ha,null,{skipSelf:!0}),i=o!==null&&this.backend===o,s=this.injector.get(Gm,[],i?{self:!0}:void 0),a=Array.from(new Set([...this.injector.get(zm),...s]));this.chain=a.reduceRight((c,l)=>s_(c,l,this.injector),i_)}let r=this.chain;if(this.contributeToStability){let o=this.pendingTasks.add();return fr(()=>r(n,i=>this.backend.handle(i))).pipe(xc(o))}else return fr(()=>r(n,o=>this.backend.handle(o)))}static \u0275fac=function(r){return new(r||e)(Y(Vu),Y(Qe))};static \u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ha=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=ee({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=Y(pa),o},providedIn:"root"})}return e})();function Lu(e,t){return ne({body:t},e)}var ma=(()=>{class e{handler;constructor(n){this.handler=n}request(n,r,o={}){let i;if(n instanceof Yr)i=n;else{let c;o.headers instanceof hn?c=o.headers:c=new hn(o.headers);let l;o.params&&(o.params instanceof pn?l=o.params:l=new pn({fromObject:o.params})),i=new Yr(n,r,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:l,reportProgress:o.reportProgress,reportUploadProgress:o.reportUploadProgress,reportDownloadProgress:o.reportDownloadProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,referrerPolicy:o.referrerPolicy,integrity:o.integrity,timeout:o.timeout})}let s=bc(i).pipe(Ic(c=>this.handler.handle(c)));if(n instanceof Yr||o.observe==="events")return s;let a=s.pipe(Cc(c=>c instanceof Yo));switch(o.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return a.pipe(Pt(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new O(2806,!1);return c.body}));case"blob":return a.pipe(Pt(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new O(2807,!1);return c.body}));case"text":return a.pipe(Pt(c=>{if(c.body!==null&&typeof c.body!="string")throw new O(2808,!1);return c.body}));default:return a.pipe(Pt(c=>c.body))}case"response":return a;default:throw new O(2809,!1)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:new pn().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,o={}){return this.request("PATCH",n,Lu(o,r))}post(n,r,o={}){return this.request("POST",n,Lu(o,r))}put(n,r,o={}){return this.request("PUT",n,Lu(o,r))}static \u0275fac=function(r){return new(r||e)(Y(ha))};static \u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Hu(...e){let t=[ma,fa,pa,{provide:ha,useExisting:pa},{provide:Vu,useFactory:()=>T(fa)},{provide:zm,useValue:Um,multi:!0}];for(let n of e)t.push(...n.\u0275providers);return Qn(t)}var zu=(function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e})(zu||{});var St={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 Xr(e,t){let n=ra(e),r=n[qr.NumberSymbols][t];if(typeof r>"u"){if(t===St.CurrencyDecimal)return n[qr.NumberSymbols][St.Decimal];if(t===St.CurrencyGroup)return n[qr.NumberSymbols][St.Group]}return r}function Ym(e,t){return ra(e)[qr.NumberFormats][t]}var a_=/^(\d+)?\.((\d+)(-(\d+))?)?$/,qm=22,ga=".",Zo="0",c_=";",l_=",",$u="#";function u_(e,t,n,r,o,i,s=!1){let a="",c=!1;if(!isFinite(e))a=Xr(n,Number.isNaN(e)?St.NaN:St.Infinity);else{let l=p_(e);s&&(l=f_(l));let u=t.minInt,d=t.minFrac,p=t.maxFrac;if(i){let h=i.match(a_);if(h===null)throw new O(2306,!1);let I=h[1],w=h[3],N=h[5];I!=null&&(u=Uu(I)),w!=null&&(d=Uu(w)),N!=null?p=Uu(N):w!=null&&d>p&&(p=d);let P=100;if(u>P||d>P||p>P)throw new O(2306,!1)}h_(l,d,p);let f=l.digits,m=l.integerLen,v=l.exponent,g=[];for(c=f.every(h=>!h);m<u;m++)f.unshift(0);for(;m<0;m++)f.unshift(0);m>0?g=f.splice(m,f.length):(g=f,f=[0]);let y=[];for(f.length>=t.lgSize&&y.unshift(f.splice(-t.lgSize,f.length).join(""));f.length>t.gSize;)y.unshift(f.splice(-t.gSize,f.length).join(""));f.length&&y.unshift(f.join("")),a=y.join(Xr(n,r)),g.length&&(a+=Xr(n,o)+g.join("")),v&&(a+=Xr(n,St.Exponential)+"+"+v)}return e<0&&!c?a=t.negPre+a+t.negSuf:a=t.posPre+a+t.posSuf,a}function Zm(e,t,n){let r=Ym(t,zu.Decimal),o=d_(r,Xr(t,St.MinusSign));return u_(e,o,t,St.Group,St.Decimal,n)}function d_(e,t="-"){let n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},r=e.split(c_),o=r[0],i=r[1],s=o.indexOf(ga)!==-1?o.split(ga):[o.substring(0,o.lastIndexOf(Zo)+1),o.substring(o.lastIndexOf(Zo)+1)],a=s[0],c=s[1]||"";n.posPre=a.substring(0,a.indexOf($u));for(let u=0;u<c.length;u++){let d=c.charAt(u);d===Zo?n.minFrac=n.maxFrac=u+1:d===$u?n.maxFrac=u+1:n.posSuf+=d}let l=a.split(l_);if(n.gSize=l[1]?l[1].length:0,n.lgSize=l[2]||l[1]?(l[2]||l[1]).length:0,i){let u=o.length-n.posPre.length-n.posSuf.length,d=i.indexOf($u);n.negPre=i.substring(0,d).replace(/'/g,""),n.negSuf=i.slice(d+u).replace(/'/g,"")}else n.negPre=t+n.posPre,n.negSuf=n.posSuf;return n}function f_(e){if(e.digits[0]===0)return e;let t=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(t===0?e.digits.push(0,0):t===1&&e.digits.push(0),e.integerLen+=2),e}function p_(e){let t=Math.abs(e)+"",n=0,r,o,i,s,a;for((o=t.indexOf(ga))>-1&&(t=t.replace(ga,"")),(i=t.search(/e/i))>0?(o<0&&(o=i),o+=+t.slice(i+1),t=t.substring(0,i)):o<0&&(o=t.length),i=0;t.charAt(i)===Zo;i++);if(i===(a=t.length))r=[0],o=1;else{for(a--;t.charAt(a)===Zo;)a--;for(o-=i,r=[],s=0;i<=a;i++,s++)r[s]=Number(t.charAt(i))}return o>qm&&(r=r.splice(0,qm-1),n=o-1,o=1),{digits:r,exponent:n,integerLen:o}}function h_(e,t,n){if(t>n)throw new O(2307,!1);let r=e.digits,o=r.length-e.integerLen,i=Math.min(Math.max(t,o),n),s=i+e.integerLen,a=r[s];if(s>0){r.splice(Math.max(e.integerLen,s));for(let d=s;d<r.length;d++)r[d]=0}else{o=Math.max(0,o),e.integerLen=1,r.length=Math.max(1,s=i+1),r[0]=0;for(let d=1;d<s;d++)r[d]=0}if(a>=5)if(s-1<0){for(let d=0;d>s;d--)r.unshift(0),e.integerLen++;r.unshift(1),e.integerLen++}else r[s-1]++;for(;o<Math.max(0,i);o++)r.push(0);let c=i!==0,l=t+e.integerLen,u=r.reduceRight(function(d,p,f,m){return p=p+d,m[f]=p<10?p:p-10,c&&(m[f]===0&&f>=l?m.pop():c=!1),p>=10?1:0},0);u&&(r.unshift(u),e.integerLen++)}function Uu(e){let t=parseInt(e);if(isNaN(t))throw new O(2305,!1);return t}function m_(e,t){return new O(2100,!1)}var Gu=(()=>{class e{_locale;constructor(n){this._locale=n}transform(n,r,o){if(!g_(n))return null;o||=this._locale;try{let i=y_(n);return Zm(i,o,r)}catch(i){throw m_(e,i.message)}}static \u0275fac=function(r){return new(r||e)(jo(Uo,16))};static \u0275pipe=Tu({name:"number",type:e,pure:!0})}return e})();function g_(e){return!(e==null||e===""||e!==e)}function y_(e){if(typeof e=="string"&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if(typeof e!="number")throw new O(2309,!1);return e}var Xm="browser";var Xo=class{_doc;constructor(t){this._doc=t}manager},ya=(()=>{class e extends Xo{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o,i){return n.addEventListener(r,o,i),()=>this.removeEventListener(n,r,o,i)}removeEventListener(n,r,o,i){return n.removeEventListener(r,o,i)}static \u0275fac=function(r){return new(r||e)(Y(Fe))};static \u0275prov=ee({token:e,factory:e.\u0275fac})}return e})(),Da=new H(""),Zu=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(n,r){this._zone=r,n.forEach(s=>{s.manager=this});let o=n.filter(s=>!(s instanceof ya));this._plugins=o.slice().reverse();let i=n.find(s=>s instanceof ya);i&&this._plugins.push(i)}addEventListener(n,r,o,i){return this._findPluginFor(r).addEventListener(n,r,o,i)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(i=>i.supports(n)),!r)throw new O(-5101,!1);return this._eventNameToPlugin.set(n,r),r}static \u0275fac=function(r){return new(r||e)(Y(Da),Y(Ve))};static \u0275prov=ee({token:e,factory:e.\u0275fac})}return e})(),Wu="ng-app-id";function Km(e){for(let t of e)t.remove()}function Qm(e,t){let n=t.createElement("style");return n.textContent=e,n}function D_(e,t,n,r){let o=e.head?.querySelectorAll(`style[${Wu}="${t}"],link[${Wu}="${t}"]`);if(!o||o.length===0)return!1;for(let i of o)i.removeAttribute(Wu),i instanceof HTMLLinkElement?r.set(i.href.slice(i.href.lastIndexOf("/")+1),{usage:0,elements:[i]}):i.textContent&&n.set(i.textContent,{usage:0,elements:[i]});return!0}function Yu(e,t){let n=t.createElement("link");return n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n}var Xu=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(n,r,o,i={}){this.doc=n,this.appId=r,this.nonce=o,D_(n,r,this.inline,this.external)&&this.hosts.add(n.head)}addStyles(n,r){for(let o of n)this.addUsage(o,this.inline,Qm);r?.forEach(o=>this.addUsage(o,this.external,Yu))}removeStyles(n,r){for(let o of n)this.removeUsage(o,this.inline);r?.forEach(o=>this.removeUsage(o,this.external))}addUsage(n,r,o){let i=r.get(n);i?i.usage++:r.set(n,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,o(n,this.doc)))})}removeUsage(n,r){let o=r.get(n);o&&(o.usage--,o.usage<=0&&(Km(o.elements),r.delete(n)))}ngOnDestroy(){for(let[,{elements:n}]of[...this.inline,...this.external])Km(n);this.hosts.clear()}addHost(n){if(!this.hosts.has(n)){this.hosts.add(n);for(let[r,{elements:o}]of this.inline)o.push(this.addElement(n,Qm(r,this.doc)));for(let[r,{elements:o}]of this.external)o.push(this.addElement(n,Yu(r,this.doc)))}}removeHost(n){this.hosts.delete(n);for(let r of[...this.inline.values(),...this.external.values()]){let o=[];for(let i of r.elements)i.parentNode===n?i.remove():o.push(i);r.elements=o}}addElement(n,r){return this.nonce&&r.setAttribute("nonce",this.nonce),n.appendChild(r)}static \u0275fac=function(r){return new(r||e)(Y(Fe),Y(bo),Y(Co,8),Y(_o))};static \u0275prov=ee({token:e,factory:e.\u0275fac})}return e})(),qu={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"},Ku=/%COMP%/g;var eg="%COMP%",w_=`_nghost-${eg}`,b_=`_ngcontent-${eg}`,__=!0,C_=new H("",{factory:()=>__}),I_=new H("");function x_(e){return b_.replace(Ku,e)}function T_(e){return w_.replace(Ku,e)}function tg(e,t){return t.map(n=>n.replace(Ku,e))}var Qu=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;cssVarNamespace;constructor(n,r,o,i,s,a,c=null,l=null,u=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=i,this.doc=s,this.ngZone=a,this.nonce=c,this.tracingService=l,this.cssVarNamespace=u??"",this.defaultRenderer=new Ko(n,s,a,this.tracingService,this.cssVarNamespace)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;let o=this.getOrCreateRenderer(n,r);return o instanceof Ea?o.applyToHost(n):o instanceof Qo&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,i=o.get(r.id);if(!i){let s=this.doc,a=this.ngZone,c=this.eventManager,l=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,d=this.tracingService;switch(r.encapsulation){case It.Emulated:i=new Ea(c,l,r,this.appId,u,s,a,d,this.cssVarNamespace);break;case It.ShadowDom:return new va(c,n,r,s,a,this.nonce,d,this.cssVarNamespace,l);case It.ExperimentalIsolatedShadowDom:return new va(c,n,r,s,a,this.nonce,d,this.cssVarNamespace);default:i=new Qo(c,l,r,u,s,a,d,this.cssVarNamespace);break}o.set(r.id,i)}return i}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(n){this.rendererByCompId.delete(n)}static \u0275fac=function(r){return new(r||e)(Y(Zu),Y(dr),Y(bo),Y(C_),Y(Fe),Y(Ve),Y(Co),Y(qt,8),Y(I_,8))};static \u0275prov=ee({token:e,factory:e.\u0275fac})}return e})(),Ko=class{eventManager;doc;ngZone;tracingService;cssVarNamespace;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,n,r,o,i=""){this.eventManager=t,this.doc=n,this.ngZone=r,this.tracingService=o,this.cssVarNamespace=i}destroy(){}destroyNode=null;createElement(t,n){return n?this.doc.createElementNS(qu[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(Jm(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){if(t){let o=Jm(t)?t.content:t;if(r!=null&&r.parentNode!==o)throw new O(-5106,!1);o.insertBefore(n,r)}}removeChild(t,n){n.remove()}selectRootElement(t,n){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new O(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,o){if(o){n=o+":"+n;let i=qu[o];i?t.setAttributeNS(i,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let o=qu[r];o?t.removeAttributeNS(o,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,o){let i=n.startsWith("--");i&&(n=n.replace("%NS%",this.cssVarNamespace)),i||o&(Wt.DashCase|Wt.Important)?t.style.setProperty(n,r,o&Wt.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){let o=n.startsWith("--");o&&(n=n.replace("%NS%",this.cssVarNamespace)),o||r&Wt.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){t!=null&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r,o){if(typeof t=="string"&&(t=An().getGlobalEventTarget(this.doc,t),!t))throw new O(-5102,!1);let i=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(t,n,i)),this.eventManager.addEventListener(t,n,i,o)}decoratePreventDefault(t){return n=>{if(n==="__ngUnwrap__")return t;t(n)===!1&&n.preventDefault()}}};function Jm(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var va=class extends Ko{hostEl;sharedStylesHost;shadowRoot;constructor(t,n,r,o,i,s,a,c,l){super(t,o,i,a,c),this.hostEl=n,this.sharedStylesHost=l,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let u=r.styles;u=tg(r.id,u).map(p=>p.replace(/%NS%/g,c));for(let p of u){let f=document.createElement("style");s&&f.setAttribute("nonce",s),f.textContent=p,this.shadowRoot.appendChild(f)}let d=r.getExternalStyles?.();if(d)for(let p of d){let f=Yu(p,o);s&&f.setAttribute("nonce",s),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(null,n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},Qo=class extends Ko{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,n,r,o,i,s,a,c,l){super(t,i,s,a,c),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=o;let u=r.styles,d=l?tg(l,u):u;this.styles=d.map(p=>p.replace(/%NS%/g,c)),this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Mn.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Ea=class extends Qo{contentAttr;hostAttr;constructor(t,n,r,o,i,s,a,c,l){let u=o+"-"+r.id;super(t,n,r,i,s,a,c,l,u),this.contentAttr=x_(u),this.hostAttr=T_(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){let r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}};var wa=class e extends qo{supportsDOMEvents=!0;static makeCurrent(){Pu(new e)}onAndCancel(t,n,r,o){return t.addEventListener(n,r,o),()=>{t.removeEventListener(n,r,o)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.remove()}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=S_();return n==null?null:M_(n)}resetBaseElement(){Jo=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Wo(document.cookie,t)}},Jo=null;function S_(){return Jo=Jo||document.head.querySelector("base"),Jo?Jo.getAttribute("href"):null}function M_(e){return new URL(e,document.baseURI).pathname}var ng=["alt","control","meta","shift"],N_={"\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"},A_={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},rg=(()=>{class e extends Xo{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o,i){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>An().onAndCancel(n,s.domEventName,a,i))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let i=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),ng.forEach(l=>{let u=r.indexOf(l);u>-1&&(r.splice(u,1),s+=l+".")}),s+=i,r.length!=0||i.length===0)return null;let c={};return c.domEventName=o,c.fullKey=s,c}static matchEventFullKeyCode(n,r){let o=N_[n.key]||n.key,i="";return r.indexOf("code.")>-1&&(o=n.code,i="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ng.forEach(s=>{if(s!==o){let a=A_[s];a(n)&&(i+=s+".")}}),i+=o,i===r)}static eventCallback(n,r,o){return i=>{e.matchEventFullKeyCode(i,n)&&o.runGuarded(()=>r(i))}}static _normalizeKey(n){return n==="esc"?"escape":n}static \u0275fac=function(r){return new(r||e)(Y(Fe))};static \u0275prov=ee({token:e,factory:e.\u0275fac})}return e})();async function Ju(e,t,n){let r=ne({rootComponent:e},R_(t,n));return Tm(r)}function R_(e,t){return{platformRef:t?.platformRef,appProviders:[...L_,...e?.providers??[]],platformProviders:F_}}function k_(){wa.makeCurrent()}function O_(){return new lt}function P_(){return tu(document),document}var F_=[{provide:_o,useValue:Xm},{provide:Ns,useValue:k_,multi:!0},{provide:Fe,useFactory:P_}];var L_=[{provide:yo,useValue:"root"},{provide:lt,useFactory:O_},{provide:Da,useClass:ya,multi:!0},{provide:Da,useClass:rg,multi:!0},Qu,{provide:dr,useClass:Xu},{provide:Xu,useExisting:dr},Zu,{provide:cr,useExisting:Qu},[]];var mn={cursor:"Cursor",claude:"Claude Code",codex:"Codex",copilot:"GitHub Copilot"},Kr=["cursor","claude","codex","copilot"],og={cursor:"/client-logos/cursor.png",claude:"/client-logos/claude.png",codex:"/client-logos/chatgpt.webp",copilot:"/client-logos/copilot.svg"},ig={optimizer:["Your context iceberg.","Estimate local context and the input cost of loading it once."],checklist:["Optimize your workflow.","Check local tools and follow recommended installation steps."],context:["See what your agent can find.","Explore the files each coding agent can reach from its context."],rules:["Rules in your workspace.","Browse the rule files discovered for Cursor, Claude Code, and GitHub Copilot."],skills:["Skills your agent can use.","Find each workflow and see which clients discover it."],mcp:["Configured MCP servers.","See where each server is configured and which clients can find it."]},ba=e=>"paths"in e?e.paths:"aliases"in e?e.aliases:[e.path],ei=e=>"description"in e?e.description:"",_a=(e,t)=>"invocation"in e?e.invocation[t]??"":"";function sg(e){return e.legacy?"Legacy .cursorrules":[e.alwaysApply?"Cursor alwaysApply":"",e.globs.length?`Cursor globs: ${e.globs.join(", ")}`:"",e.pathsCondition.length?`Claude paths: ${e.pathsCondition.join(", ")}`:"",e.applyTo.length?`Copilot applyTo: ${e.applyTo.join(", ")}`:""].filter(Boolean).join(" \xB7 ")||"No path condition"}function ed(e,t,n,r){let o=r.toLowerCase();return e.filter(i=>(t==="all"||i.scope===t)&&(n==="all"||i.clients.includes(n))&&(!o||`${i.name} ${"path"in i?i.path:i.paths.join(" ")} ${ei(i)} ${"globs"in i?i.globs.join(" "):""} ${"pathsCondition"in i?i.pathsCondition.join(" "):""} ${"applyTo"in i?i.applyTo.join(" "):""}`.toLowerCase().includes(o)))}var Qt=e=>e instanceof Error?e.message:"Unable to read the workspace.";var Qr=class e{assetScope=Tt.required();static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["","appScope",""]],hostVars:2,hostBindings:function(n,r){n&2&&Vo("badge "+r.assetScope())},inputs:{assetScope:[1,"assetScope"]},decls:2,vars:3,template:function(n,r){n&1&&(Se(0,"i"),E(1)),n&2&&(Vo("dot "+r.assetScope()),D(),j(r.assetScope()==="user"?"User":"Project"))},encapsulation:2})},Jr=class e{client=Tt.required();active=Tt.required();hint=Tt("");icons=og;text(){return`${mn[this.client()]}: ${this.active()?"discovered":"not discovered"}${this.hint()?" \xB7 "+this.hint():""}`}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["","appClient",""]],hostAttrs:["role","img"],hostVars:4,hostBindings:function(n,r){n&2&&(ue("title",r.text()),Le("aria-label",r.text()),Vo("client-icon client-icon--"+r.client()+(r.active()?"":" off")))},inputs:{client:[1,"client"],active:[1,"active"],hint:[1,"hint"]},decls:1,vars:1,consts:[["alt","","aria-hidden","true",3,"src"]],template:function(n,r){n&1&&Se(0,"img",0),n&2&&ue("src",r.icons[r.client()],un)},encapsulation:2})};var j_=(e,t)=>t.id;function B_(e,t){if(e&1&&(S(0,"th",1),E(1),M()),e&2){let n=t.$implicit;D(),j(n)}}function V_(e,t){if(e&1&&(S(0,"td"),E(1),M()),e&2){let n=R().$implicit,r=R();D(),j(r.conditions(n))}}function H_(e,t){if(e&1&&(S(0,"td")(1,"span",8),E(2),M()()),e&2){let n=R().$implicit;D(2),j(n.mode)}}function $_(e,t){if(e&1&&(S(0,"td")(1,"span",9),E(2),M()(),S(3,"td"),E(4),M()),e&2){let n=R().$implicit;D(),it("neutral",n.status==="Disabled")("warn",n.status!=="Disabled"),D(),he("\u25CB ",n.status),D(2),j(n.transport)}}function U_(e,t){if(e&1&&(S(0,"td"),E(1),M(),S(2,"td",10),E(3),M()),e&2){let n=R().$implicit;D(),j(n.kind),D(2),j(n.lines.toLocaleString())}}function z_(e,t){if(e&1&&Ye(0,"span",7),e&2){let n=t.$implicit,r=R().$implicit,o=R();ce("client",n)("active",r.clients.includes(n))("hint",o.invocation(r,n))}}function G_(e,t){if(e&1){let n=Me();S(0,"tr")(1,"td",2)(2,"button",3),_e("click",function(){let o=oe(n).$implicit,i=R();return ie(i.selected.emit(o))}),E(3),M(),S(4,"p",4),E(5),M()(),se(6,V_,2,1,"td"),se(7,H_,3,1,"td"),se(8,$_,5,6),se(9,U_,4,2),S(10,"td"),Ye(11,"span",5),M(),S(12,"td")(13,"div",6),xe(14,z_,1,3,"span",7,Yt),M()()()}if(e&2){let n=t.$implicit,r=R();D(2),Le("data-detail",n.id),D(),he(" ",n.name," "),D(),ce("title","path"in n?n.path:n.paths.join(`
|
|
6
|
+
`)),D(),he(" ",r.description(n)||r.paths(n)[0]," "),D(),ae("globs"in n?6:-1),D(),ae("mode"in n?7:-1),D(),ae("status"in n?8:-1),D(),ae("kind"in n?9:-1),D(2),ce("assetScope",n.scope),D(3),Te(r.clients)}}var Ca=class e{rows=Tt.required();tab=Tt.required();selected=sa();paths=ba;description=ei;conditions=sg;invocation=_a;clients=Kr;headers={context:["File","Type","Lines","Scope","Clients"],rules:["Rule","Conditions","Scope","Clients"],skills:["Skill","Invocation","Scope","Clients"],mcp:["Server","Connection","Transport","Scope","Clients"]};help={context:"Client icons show entry points and linked documents that each agent can discover. They do not confirm a file loaded in a session. Unlinked knowledge has no client entry point.",rules:"Dedicated Cursor, Claude Code, and GitHub Copilot instruction files. File metadata describes conditions; it does not prove a rule loaded in a session. General instructions remain in Context.",skills:"Client icons: Cursor \xB7 Claude Code \xB7 Codex \xB7 GitHub Copilot. Active means a discovery path was found, not a running session. Hover for invocation details. Identical copies are grouped.",mcp:"Client icons: Cursor \xB7 Claude Code \xB7 Codex \xB7 GitHub Copilot. Configuration does not prove a live connection. The viewer never launches a server or sends credentials."};static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["div","appAssetTable",""]],inputs:{rows:[1,"rows"],tab:[1,"tab"]},outputs:{selected:"selected"},decls:10,vars:1,consts:[[1,"table-help"],["scope","col"],[1,"name"],[3,"click"],[3,"title"],["appScope","",3,"assetScope"],[1,"client-icons"],["appClient","",3,"client","active","hint"],[1,"badge","neutral"],[1,"badge"],[1,"line-count"]],template:function(n,r){n&1&&(S(0,"div",0),E(1),M(),S(2,"table")(3,"thead")(4,"tr"),xe(5,B_,2,1,"th",1,Yt),M()(),S(7,"tbody"),xe(8,G_,16,9,"tr",null,j_),M()()),n&2&&(D(),j(r.help[r.tab()]),D(4),Te(r.headers[r.tab()]),D(3),Te(r.rows()))},dependencies:[Qr,Jr],encapsulation:2})};var Jt=class e{http=T(ma);token=new URLSearchParams(location.hash.slice(1)).get("token")||sessionStorage.getItem("boyscout-token")||"";constructor(){this.token&&sessionStorage.setItem("boyscout-token",this.token),history.replaceState(null,"",location.pathname)}async request(t,n,r){try{return await _c(this.http.request(t,n,{body:r,headers:{Authorization:`Bearer ${this.token}`}}))}catch(o){if(o instanceof fn){let i=o.error;if(i&&typeof i=="object"&&"error"in i&&typeof i.error=="string")throw new Error(i.error)}throw new Error("Unable to read the workspace.")}}scan(t=!1){return this.request("GET",`/api/scan${t?"?refresh=1":""}`)}estimate(t,n){return this.request("GET",`/api/token-estimate?client=${t}&model=${encodeURIComponent(n)}`)}optimizationChecks(){return this.request("GET","/api/optimization-checks")}content(t){return this.request("GET",`/api/content?id=${encodeURIComponent(t)}`)}file(t){return this.request("GET",`/api/file?id=${encodeURIComponent(t)}`)}save(t,n){return this.request("PUT",`/api/file?id=${encodeURIComponent(t)}`,n)}delete(t,n){return this.request("DELETE",`/api/file?id=${encodeURIComponent(t)}`,{revision:n})}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"})};var ft=class e{api=T(Jt);data=q(null);tab=q("context");assetTab=et(()=>{let t=this.tab();return t==="optimizer"||t==="checklist"?"context":t});scope=q("all");client=q("all");search=q("");view=q("graph");loading=q(!1);error=q("");selection=q(null);theme=q(localStorage.getItem("boyscout-theme")==="dark"?"dark":"light");rows=et(()=>{let t=this.data(),n=this.tab();if(n==="optimizer"||n==="checklist")return[];let r=t?n==="context"?t.nodes:t[n]:[];return ed(r,this.scope(),this.client(),this.search())});nodes=et(()=>ed(this.data()?.nodes??[],this.scope(),this.client(),this.search()));summary=et(()=>{if(this.error())return"Session unavailable";if(!this.data())return"Reading local assets";if(this.tab()==="checklist")return"Local installation checks";if(this.tab()==="optimizer")return"Static local estimates \xB7 One selected agent";let t=this.rows(),n=t.filter(o=>o.scope==="project").length,r=this.tab()==="context"?"files":this.tab()==="mcp"?"servers":this.tab();return`${t.length} ${r} \xB7 ${n} project \xB7 ${t.length-n} user`});constructor(){document.documentElement.dataset.theme=this.theme()}async load(t=!1){this.loading.set(!0);try{let n=await this.api.scan(t);this.data.set(n),this.error.set(""),document.title=`${n.project.name} \xB7 Agent Visualizer`}catch(n){this.error.set(Qt(n))}finally{this.loading.set(!1)}}selectTab(t){this.tab.set(t),this.client.set("all"),this.search.set(""),this.selection.set(null)}toggleTheme(){let t=this.theme()==="dark"?"light":"dark";this.theme.set(t),localStorage.setItem("boyscout-theme",t),document.documentElement.dataset.theme=t}static \u0275fac=function(n){return new(n||e)};static \u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"})};var W_=(e,t)=>t.id;function q_(e,t){if(e&1&&(S(0,"p",6),E(1),M()),e&2){let n=t.$implicit;D(),j(n)}}function Y_(e,t){if(e&1&&xe(0,q_,2,1,"p",6,Yt),e&2){let n=R(),r=R();Te(r.paths(n))}}function Z_(e,t){if(e&1&&(S(0,"p",6),E(1),M()),e&2){let n=t.$implicit;D(),j(n)}}function X_(e,t){if(e&1&&(S(0,"p"),E(1),M(),S(2,"h3"),E(3),M(),xe(4,Z_,2,1,"p",6,Yt)),e&2){let n=R(),r=R();D(),j(r.description(n)),D(2),he("Source ",r.paths(n).length>1?"paths":"path"),D(),Te(r.paths(n))}}function K_(e,t){if(e&1&&(S(0,"div",5),Ye(1,"span",7),E(2),M()),e&2){let n=t.$implicit,r=R(),o=R();D(),ce("client",n)("active",r.clients.includes(n)),D(),Xt("",o.labels[n]," \xB7 ",o.invocation(r,n)||(r.clients.includes(n)?o.state.selection()?.tab==="context"?"Entry point or linked":"Configured":"Not discovered")," ")}}function Q_(e,t){e&1&&(S(0,"p"),E(1," Includes a legacy .codex/skills discovery path. Client behavior can depend on its installed version. "),M())}function J_(e,t){if(e&1&&(S(0,"h3"),E(1,"Declared conditions"),M(),S(2,"p"),E(3),M(),S(4,"p"),E(5," File discovery does not confirm whether this rule loaded in an agent session. "),M()),e&2){let n=R(),r=R();D(3),j(r.ruleConditions(n))}}function eC(e,t){if(e&1&&(S(0,"h3"),E(1,"Connection status"),M(),S(2,"p"),E(3),M(),S(4,"p"),E(5),M(),S(6,"p"),E(7," Commands, arguments, server URLs, headers, and credentials are intentionally omitted. "),M()),e&2){let n=R();D(3),Xt(" ",n.status,". ",n.status==="Disabled"?"Disabled in this file.":"Check the client\u2019s MCP panel to confirm its live connection."," "),D(2),j(n.origin)}}function tC(e,t){if(e&1&&(S(0,"option",20),E(1),M()),e&2){let n=t.$implicit;ce("value",n.id),D(),j(n.path)}}function nC(e,t){if(e&1){let n=Me();S(0,"label",9),E(1,"Source file"),S(2,"select",19,1),_e("change",function(){oe(n);let o=Zt(3),i=R(4);return ie(i.source(o.value))}),xe(4,tC,2,2,"option",20,W_),M()()}if(e&2){let n=R(4);D(2),ce("value",n.targetId())("disabled",n.mode()!=="preview"),D(2),Te(n.targets())}}function rC(e,t){if(e&1){let n=Me();se(0,nC,6,2,"label",9),S(1,"button",10),_e("click",function(){oe(n);let o=R(3);return ie(o.edit())}),E(2," Edit file "),M(),S(3,"button",11),_e("click",function(){oe(n);let o=R(3);return ie(o.confirmDelete())}),E(4," Delete file "),M(),S(5,"div",12)(6,"p"),E(7),M(),S(8,"button",13),_e("click",function(){oe(n);let o=R(3);return ie(o.remove())}),E(9," Delete permanently"),M(),S(10,"button",13),_e("click",function(){oe(n);let o=R(3);return ie(o.cancel())}),E(11," Cancel "),M()(),S(12,"form",14),_e("submit",function(o){oe(n);let i=R(3);return ie(i.save(o))}),S(13,"textarea",15,0),_e("input",function(){oe(n);let o=Zt(14),i=R(3);return ie(i.draft.set(o.value))}),M(),S(15,"div",16)(16,"button",17),E(17,"Save"),M(),S(18,"button",13),_e("click",function(){oe(n);let o=R(3);return ie(o.cancel())}),E(19," Cancel "),M()()(),S(20,"p",18),E(21),M()}if(e&2){let n=R(2),r=R();ae(r.targets().length>1?0:-1),D(),ce("disabled",!r.file())("hidden",r.mode()!=="preview"),D(2),ce("disabled",!r.file())("hidden",r.mode()!=="preview"||!r.target()?.deletable),D(2),ce("hidden",r.mode()!=="delete"),D(2),he("Delete ",r.target()?.path," permanently?"),D(),ce("disabled",r.busy()),D(2),ce("disabled",r.busy()),D(2),ce("hidden",r.mode()!=="edit"),D(),ce("value",r.draft()),Le("aria-label","Edit "+n.name),D(3),ce("disabled",r.busy()),D(2),ce("disabled",r.busy()),D(3),j(r.status())}}function oC(e,t){if(e&1&&(S(0,"h3"),E(1,"File preview"),M(),S(2,"pre",8),E(3),M(),se(4,rC,22,15)),e&2){let n=R(2);D(2),ce("hidden",n.mode()==="edit"),D(),j(n.preview()),D(),ae(n.targets().length?4:-1)}}function iC(e,t){if(e&1&&(Ye(0,"span",4),S(1,"h2"),E(2),M(),se(3,Y_,2,0)(4,X_,6,2),S(5,"h3"),E(6,"Client discovery"),M(),xe(7,K_,3,4,"div",5,Yt),se(9,Q_,2,0,"p"),se(10,J_,6,1),se(11,eC,8,3)(12,oC,5,3)),e&2){let n=t,r=R();ce("assetScope",n.scope),D(2),j(n.name),D(),ae(r.state.selection()?.tab==="context"?3:4),D(4),Te(r.clients),D(2),ae("legacy"in n&&n.legacy&&r.state.selection()?.tab==="skills"?9:-1),D(),ae(r.state.selection()?.tab==="rules"?10:-1),D(),ae("status"in n?11:12)}}var Ia=class e{state=T(ft);api=T(Jt);element=T(ur);paths=ba;clients=Kr;labels=mn;invocation=_a;row=et(()=>this.state.selection()?.row??null);targets=et(()=>{let t=this.row();return t&&"editTargets"in t?t.editTargets:[]});targetId=q("");target=et(()=>this.targets().find(t=>t.id===this.targetId())??this.targets()[0]);preview=q("Loading\u2026");file=q(null);mode=q("preview");draft=q("");status=q("");busy=q(!1);sequence=0;lastFocus=null;focusTimer;constructor(){Sn(()=>{let t=this.state.selection();fr(()=>this.show(t))}),T(Ie).onDestroy(()=>{this.sequence++,clearTimeout(this.focusTimer)})}description(t){return ei(t)||("kind"in t?t.path:"MCP server configuration")}ruleConditions(t){return"globs"in t?t.legacy?"Legacy .cursorrules":[t.alwaysApply?"Cursor alwaysApply: true":"",t.globs.length?`Cursor globs: ${t.globs.join(", ")}`:"",t.pathsCondition.length?`Claude paths: ${t.pathsCondition.join(", ")}`:"",t.applyTo.length?`Copilot applyTo: ${t.applyTo.join(", ")}`:""].filter(Boolean).join(" \xB7 ")||"No path condition declared":""}focus(t){clearTimeout(this.focusTimer),this.focusTimer=setTimeout(()=>this.element.nativeElement.querySelector(t)?.focus())}show(t){if(this.sequence++,clearTimeout(this.focusTimer),!t){this.lastFocus?.isConnected&&this.lastFocus.focus(),this.lastFocus=null;return}this.lastFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.mode.set("preview"),this.status.set(""),this.busy.set(!1),this.file.set(null),this.preview.set("Loading\u2026"),this.targetId.set(this.targets()[0]?.id??""),this.focus("#close-detail"),t.tab!=="mcp"&&this.loadPreview()}async loadPreview(){let t=++this.sequence;this.preview.set("Loading\u2026"),this.file.set(null),this.status.set(""),this.mode.set("preview");let n=this.row();if(!n)return;let r=this.target();try{if(r){let o=await this.api.file(r.id);if(t!==this.sequence)return;this.file.set(o),this.preview.set(o.text)}else{let o=await this.api.content(n.id);t===this.sequence&&this.preview.set(o.text)}}catch(o){t===this.sequence&&this.preview.set(Qt(o))}}source(t){this.targetId.set(t),this.loadPreview()}edit(){let t=this.file();t&&(this.draft.set(t.text),this.mode.set("edit"),this.status.set(""),this.focus("textarea"))}confirmDelete(){this.mode.set("delete"),this.status.set(""),this.focus(".delete-confirm button")}cancel(){let t=this.mode();this.mode.set("preview"),this.focus(t==="edit"?".edit-button":".delete-button")}close(){this.state.selection.set(null)}async save(t){t.preventDefault();let n=this.target(),r=this.file();if(!n||!r||this.busy())return;let o=this.sequence,i=this.draft();this.busy.set(!0),this.status.set("Saving\u2026");try{let s=await this.api.save(n.id,{text:i,revision:r.revision});if(o!==this.sequence)return;this.file.set({text:i,revision:s.revision}),this.preview.set(i),this.mode.set("preview"),this.status.set("Saved. Workspace rescanned."),await this.state.load(!0)}catch(s){o===this.sequence&&this.status.set(Qt(s))}finally{o===this.sequence&&this.busy.set(!1)}}async remove(){let t=this.target(),n=this.file();if(!t||!n||this.busy())return;let r=this.sequence;this.busy.set(!0),this.status.set("Deleting\u2026");try{if(await this.api.delete(t.id,n.revision),r!==this.sequence)return;this.close(),await this.state.load(!0)}catch(o){r===this.sequence&&this.status.set(Qt(o))}finally{r===this.sequence&&this.busy.set(!1)}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["aside","appDetail",""]],decls:4,vars:1,consts:[["text",""],["sourceFile",""],["id","close-detail","aria-label","Close details",1,"close-button",3,"click"],["id","detail-body"],["appScope","",3,"assetScope"],[1,"client-line"],[1,"mono","source-path"],["appClient","",3,"client","active"],[3,"hidden"],[1,"edit-source"],[1,"edit-button",3,"click","disabled","hidden"],[1,"delete-button",3,"click","disabled","hidden"],[1,"delete-confirm",3,"hidden"],["type","button",3,"click","disabled"],[1,"edit-form",3,"submit","hidden"],["spellcheck","false",3,"input","value"],[1,"edit-actions"],["type","submit",3,"disabled"],["role","status",1,"edit-status"],[3,"change","value","disabled"],[3,"value"]],template:function(n,r){if(n&1&&(S(0,"button",2),_e("click",function(){return r.close()}),E(1,` \xD7
|
|
7
|
+
`),M(),S(2,"div",3),se(3,iC,13,6),M()),n&2){let o;D(3),ae((o=r.row())?3:-1,o)}},dependencies:[Qr,Jr],encapsulation:2})};var xa=class e{state=T(ft);query=q("");timeout;constructor(){Sn(()=>{this.state.tab(),clearTimeout(this.timeout),this.query.set("")}),T(Ie).onDestroy(()=>clearTimeout(this.timeout))}search(t){this.query.set(t),clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.state.search.set(t),130)}client(t){this.state.client.set(Kr.find(n=>n===t)??"all")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["div","appFilters",""]],decls:28,vars:12,consts:[["clientFilter",""],["searchInput",""],["role","group","aria-label","Asset scope",1,"scope-tabs"],["data-scope","all",3,"click"],["data-scope","project",3,"click"],[1,"dot","project"],["data-scope","user",3,"click"],[1,"dot","user"],[1,"filters"],["id","client-filter","aria-label","Filter by client",3,"change","value"],["value","all"],["value","cursor"],["value","claude"],["value","codex"],["value","copilot"],[1,"search"],["id","search","aria-label","Search assets",3,"input","value","placeholder"]],template:function(n,r){if(n&1){let o=Me();_(0,"div",2)(1,"button",3),me("click",function(){return r.state.scope.set("all")}),E(2," All assets "),C(),_(3,"button",4),me("click",function(){return r.state.scope.set("project")}),Se(4,"i",5),E(5,"Project (shared with your team) "),C(),_(6,"button",6),me("click",function(){return r.state.scope.set("user")}),Se(7,"i",7),E(8,"On Your Machine (not shared with your team) "),C()(),_(9,"div",8)(10,"select",9,0),me("change",function(){oe(o);let s=Zt(11);return ie(r.client(s.value))}),_(12,"option",10),E(13,"All clients"),C(),_(14,"option",11),E(15,"Cursor"),C(),_(16,"option",12),E(17,"Claude Code"),C(),_(18,"option",13),E(19,"Codex"),C(),_(20,"option",14),E(21,"GitHub Copilot"),C()(),_(22,"label",15),E(23,"\u2315"),_(24,"input",16,1),me("input",function(){oe(o);let s=Zt(25);return ie(r.search(s.value))}),C(),_(26,"kbd"),E(27,"/"),C()()()}n&2&&(D(),it("selected",r.state.scope()==="all"),Le("aria-pressed",r.state.scope()==="all"),D(2),it("selected",r.state.scope()==="project"),Le("aria-pressed",r.state.scope()==="project"),D(3),it("selected",r.state.scope()==="user"),Le("aria-pressed",r.state.scope()==="user"),D(4),ue("value",r.state.client()),D(14),ue("value",r.query())("placeholder",r.state.tab()==="context"?"Find a file\u2026":r.state.tab()==="rules"?"Find a rule\u2026":r.state.tab()==="skills"?"Find a skill\u2026":"Find a server\u2026"))},encapsulation:2})};var sC={value:()=>{}};function cg(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ta(n)}function Ta(e){this._=e}function aC(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ta.prototype=cg.prototype={constructor:Ta,on:function(e,t){var n=this._,r=aC(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=cC(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=ag(n[o],e.name,t);else if(t==null)for(o in n)n[o]=ag(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ta(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function cC(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function ag(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=sC,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var gn=cg;var Sa="http://www.w3.org/1999/xhtml",td={svg:"http://www.w3.org/2000/svg",xhtml:Sa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function yn(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),td.hasOwnProperty(t)?{space:td[t],local:e}:e}function lC(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Sa&&t.documentElement.namespaceURI===Sa?t.createElement(e):t.createElementNS(n,e)}}function uC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ma(e){var t=yn(e);return(t.local?uC:lC)(t)}function dC(){}function hr(e){return e==null?dC:function(){return this.querySelector(e)}}function lg(e){typeof e!="function"&&(e=hr(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=new Array(s),c,l,u=0;u<s;++u)(c=i[u])&&(l=e.call(c,c.__data__,u,i))&&("__data__"in c&&(l.__data__=c.__data__),a[u]=l);return new ve(r,this._parents)}function nd(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function fC(){return[]}function ti(e){return e==null?fC:function(){return this.querySelectorAll(e)}}function pC(e){return function(){return nd(e.apply(this,arguments))}}function ug(e){typeof e=="function"?e=pC(e):e=ti(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],a=s.length,c,l=0;l<a;++l)(c=s[l])&&(r.push(e.call(c,c.__data__,l,s)),o.push(c));return new ve(r,o)}function ni(e){return function(){return this.matches(e)}}function Na(e){return function(t){return t.matches(e)}}var hC=Array.prototype.find;function mC(e){return function(){return hC.call(this.children,e)}}function gC(){return this.firstElementChild}function dg(e){return this.select(e==null?gC:mC(typeof e=="function"?e:Na(e)))}var yC=Array.prototype.filter;function vC(){return Array.from(this.children)}function EC(e){return function(){return yC.call(this.children,e)}}function fg(e){return this.selectAll(e==null?vC:EC(typeof e=="function"?e:Na(e)))}function pg(e){typeof e!="function"&&(e=ni(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],c,l=0;l<s;++l)(c=i[l])&&e.call(c,c.__data__,l,i)&&a.push(c);return new ve(r,this._parents)}function Aa(e){return new Array(e.length)}function hg(){return new ve(this._enter||this._groups.map(Aa),this._parents)}function ri(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ri.prototype={constructor:ri,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function mg(e){return function(){return e}}function DC(e,t,n,r,o,i){for(var s=0,a,c=t.length,l=i.length;s<l;++s)(a=t[s])?(a.__data__=i[s],r[s]=a):n[s]=new ri(e,i[s]);for(;s<c;++s)(a=t[s])&&(o[s]=a)}function wC(e,t,n,r,o,i,s){var a,c,l=new Map,u=t.length,d=i.length,p=new Array(u),f;for(a=0;a<u;++a)(c=t[a])&&(p[a]=f=s.call(c,c.__data__,a,t)+"",l.has(f)?o[a]=c:l.set(f,c));for(a=0;a<d;++a)f=s.call(e,i[a],a,i)+"",(c=l.get(f))?(r[a]=c,c.__data__=i[a],l.delete(f)):n[a]=new ri(e,i[a]);for(a=0;a<u;++a)(c=t[a])&&l.get(p[a])===c&&(o[a]=c)}function bC(e){return e.__data__}function gg(e,t){if(!arguments.length)return Array.from(this,bC);var n=t?wC:DC,r=this._parents,o=this._groups;typeof e!="function"&&(e=mg(e));for(var i=o.length,s=new Array(i),a=new Array(i),c=new Array(i),l=0;l<i;++l){var u=r[l],d=o[l],p=d.length,f=_C(e.call(u,u&&u.__data__,l,r)),m=f.length,v=a[l]=new Array(m),g=s[l]=new Array(m),y=c[l]=new Array(p);n(u,d,v,g,y,f,t);for(var h=0,I=0,w,N;h<m;++h)if(w=v[h]){for(h>=I&&(I=h+1);!(N=g[I])&&++I<m;);w._next=N||null}}return s=new ve(s,r),s._enter=a,s._exit=c,s}function _C(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function yg(){return new ve(this._exit||this._groups.map(Aa),this._parents)}function vg(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function Eg(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),c=0;c<s;++c)for(var l=n[c],u=r[c],d=l.length,p=a[c]=new Array(d),f,m=0;m<d;++m)(f=l[m]||u[m])&&(p[m]=f);for(;c<o;++c)a[c]=n[c];return new ve(a,this._parents)}function Dg(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function wg(e){e||(e=CC);function t(d,p){return d&&p?e(d.__data__,p.__data__):!d-!p}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],a=s.length,c=o[i]=new Array(a),l,u=0;u<a;++u)(l=s[u])&&(c[u]=l);c.sort(t)}return new ve(o,this._parents).order()}function CC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function bg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function _g(){return Array.from(this)}function Cg(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function Ig(){let e=0;for(let t of this)++e;return e}function xg(){return!this.node()}function Tg(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,a;i<s;++i)(a=o[i])&&e.call(a,a.__data__,i,o);return this}function IC(e){return function(){this.removeAttribute(e)}}function xC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function TC(e,t){return function(){this.setAttribute(e,t)}}function SC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function MC(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function NC(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Sg(e,t){var n=yn(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?xC:IC:typeof t=="function"?n.local?NC:MC:n.local?SC:TC)(n,t))}function Ra(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function AC(e){return function(){this.style.removeProperty(e)}}function RC(e,t,n){return function(){this.style.setProperty(e,t,n)}}function kC(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Mg(e,t,n){return arguments.length>1?this.each((t==null?AC:typeof t=="function"?kC:RC)(e,t,n??"")):Rn(this.node(),e)}function Rn(e,t){return e.style.getPropertyValue(t)||Ra(e).getComputedStyle(e,null).getPropertyValue(t)}function OC(e){return function(){delete this[e]}}function PC(e,t){return function(){this[e]=t}}function FC(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ng(e,t){return arguments.length>1?this.each((t==null?OC:typeof t=="function"?FC:PC)(e,t)):this.node()[e]}function Ag(e){return e.trim().split(/^|\s+/)}function rd(e){return e.classList||new Rg(e)}function Rg(e){this._node=e,this._names=Ag(e.getAttribute("class")||"")}Rg.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function kg(e,t){for(var n=rd(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Og(e,t){for(var n=rd(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function LC(e){return function(){kg(this,e)}}function jC(e){return function(){Og(this,e)}}function BC(e,t){return function(){(t.apply(this,arguments)?kg:Og)(this,e)}}function Pg(e,t){var n=Ag(e+"");if(arguments.length<2){for(var r=rd(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?BC:t?LC:jC)(n,t))}function VC(){this.textContent=""}function HC(e){return function(){this.textContent=e}}function $C(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Fg(e){return arguments.length?this.each(e==null?VC:(typeof e=="function"?$C:HC)(e)):this.node().textContent}function UC(){this.innerHTML=""}function zC(e){return function(){this.innerHTML=e}}function GC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Lg(e){return arguments.length?this.each(e==null?UC:(typeof e=="function"?GC:zC)(e)):this.node().innerHTML}function WC(){this.nextSibling&&this.parentNode.appendChild(this)}function jg(){return this.each(WC)}function qC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Bg(){return this.each(qC)}function Vg(e){var t=typeof e=="function"?e:Ma(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function YC(){return null}function Hg(e,t){var n=typeof e=="function"?e:Ma(e),r=t==null?YC:typeof t=="function"?t:hr(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function ZC(){var e=this.parentNode;e&&e.removeChild(this)}function $g(){return this.each(ZC)}function XC(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function KC(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ug(e){return this.select(e?KC:XC)}function zg(e){return arguments.length?this.property("__data__",e):this.node().__data__}function QC(e){return function(t){e.call(this,t,this.__data__)}}function JC(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function eI(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function tI(e,t,n){return function(){var r=this.__on,o,i=QC(t);if(r){for(var s=0,a=r.length;s<a;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function Gg(e,t,n){var r=JC(e+""),o,i=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,l=a.length,u;c<l;++c)for(o=0,u=a[c];o<i;++o)if((s=r[o]).type===u.type&&s.name===u.name)return u.value}return}for(a=t?tI:eI,o=0;o<i;++o)this.each(a(r[o],t,n));return this}function Wg(e,t,n){var r=Ra(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function nI(e,t){return function(){return Wg(this,e,t)}}function rI(e,t){return function(){return Wg(this,e,t.apply(this,arguments))}}function qg(e,t){return this.each((typeof t=="function"?rI:nI)(e,t))}function*Yg(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var od=[null];function ve(e,t){this._groups=e,this._parents=t}function Zg(){return new ve([[document.documentElement]],od)}function oI(){return this}ve.prototype=Zg.prototype={constructor:ve,select:lg,selectAll:ug,selectChild:dg,selectChildren:fg,filter:pg,data:gg,enter:hg,exit:yg,join:vg,merge:Eg,selection:oI,order:Dg,sort:wg,call:bg,nodes:_g,node:Cg,size:Ig,empty:xg,each:Tg,attr:Sg,style:Mg,property:Ng,classed:Pg,text:Fg,html:Lg,raise:jg,lower:Bg,append:Vg,insert:Hg,remove:$g,clone:Ug,datum:zg,on:Gg,dispatch:qg,[Symbol.iterator]:Yg};var vn=Zg;function Ze(e){return typeof e=="string"?new ve([[document.querySelector(e)]],[document.documentElement]):new ve([[e]],od)}function Xg(e){let t;for(;t=e.sourceEvent;)e=t;return e}function pt(e,t){if(e=Xg(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}var Kg={passive:!1},mr={capture:!0,passive:!1};function ka(e){e.stopImmediatePropagation()}function kn(e){e.preventDefault(),e.stopImmediatePropagation()}function oi(e){var t=e.document.documentElement,n=Ze(e).on("dragstart.drag",kn,mr);"onselectstart"in t?n.on("selectstart.drag",kn,mr):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ii(e,t){var n=e.document.documentElement,r=Ze(e).on("dragstart.drag",null);t&&(r.on("click.drag",kn,mr),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var si=e=>()=>e;function ai(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:a,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}ai.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function iI(e){return!e.ctrlKey&&!e.button}function sI(){return this.parentNode}function aI(e,t){return t??{x:e.x,y:e.y}}function cI(){return navigator.maxTouchPoints||"ontouchstart"in this}function id(){var e=iI,t=sI,n=aI,r=cI,o={},i=gn("start","drag","end"),s=0,a,c,l,u,d=0;function p(w){w.on("mousedown.drag",f).filter(r).on("touchstart.drag",g).on("touchmove.drag",y,Kg).on("touchend.drag touchcancel.drag",h).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(w,N){if(!(u||!e.call(this,w,N))){var P=I(this,t.call(this,w,N),w,N,"mouse");P&&(Ze(w.view).on("mousemove.drag",m,mr).on("mouseup.drag",v,mr),oi(w.view),ka(w),l=!1,a=w.clientX,c=w.clientY,P("start",w))}}function m(w){if(kn(w),!l){var N=w.clientX-a,P=w.clientY-c;l=N*N+P*P>d}o.mouse("drag",w)}function v(w){Ze(w.view).on("mousemove.drag mouseup.drag",null),ii(w.view,l),kn(w),o.mouse("end",w)}function g(w,N){if(e.call(this,w,N)){var P=w.changedTouches,V=t.call(this,w,N),$=P.length,Z,J;for(Z=0;Z<$;++Z)(J=I(this,V,w,N,P[Z].identifier,P[Z]))&&(ka(w),J("start",w,P[Z]))}}function y(w){var N=w.changedTouches,P=N.length,V,$;for(V=0;V<P;++V)($=o[N[V].identifier])&&(kn(w),$("drag",w,N[V]))}function h(w){var N=w.changedTouches,P=N.length,V,$;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),V=0;V<P;++V)($=o[N[V].identifier])&&(ka(w),$("end",w,N[V]))}function I(w,N,P,V,$,Z){var J=i.copy(),de=pt(Z||P,N),Re,ke,b;if((b=n.call(w,new ai("beforestart",{sourceEvent:P,target:p,identifier:$,active:s,x:de[0],y:de[1],dx:0,dy:0,dispatch:J}),V))!=null)return Re=b.x-de[0]||0,ke=b.y-de[1]||0,function A(x,k,U){var G=de,W;switch(x){case"start":o[$]=A,W=s++;break;case"end":delete o[$],--s;case"drag":de=pt(U||k,N),W=s;break}J.call(x,w,new ai(x,{sourceEvent:k,subject:b,target:p,identifier:$,active:W,x:de[0]+Re,y:de[1]+ke,dx:de[0]-G[0],dy:de[1]-G[1],dispatch:J}),V)}}return p.filter=function(w){return arguments.length?(e=typeof w=="function"?w:si(!!w),p):e},p.container=function(w){return arguments.length?(t=typeof w=="function"?w:si(w),p):t},p.subject=function(w){return arguments.length?(n=typeof w=="function"?w:si(w),p):n},p.touchable=function(w){return arguments.length?(r=typeof w=="function"?w:si(!!w),p):r},p.on=function(){var w=i.on.apply(i,arguments);return w===i?p:w},p.clickDistance=function(w){return arguments.length?(d=(w=+w)*w,p):Math.sqrt(d)},p}function Oa(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function sd(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ui(){}var ci=.7,La=1/ci,eo="\\s*([+-]?\\d+)\\s*",li="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",en="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lI=/^#([0-9a-f]{3,8})$/,uI=new RegExp(`^rgb\\(${eo},${eo},${eo}\\)$`),dI=new RegExp(`^rgb\\(${en},${en},${en}\\)$`),fI=new RegExp(`^rgba\\(${eo},${eo},${eo},${li}\\)$`),pI=new RegExp(`^rgba\\(${en},${en},${en},${li}\\)$`),hI=new RegExp(`^hsl\\(${li},${en},${en}\\)$`),mI=new RegExp(`^hsla\\(${li},${en},${en},${li}\\)$`),Qg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Oa(ui,On,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Jg,formatHex:Jg,formatHex8:gI,formatHsl:yI,formatRgb:ey,toString:ey});function Jg(){return this.rgb().formatHex()}function gI(){return this.rgb().formatHex8()}function yI(){return sy(this).formatHsl()}function ey(){return this.rgb().formatRgb()}function On(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=lI.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ty(t):n===3?new tt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Pa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Pa(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=uI.exec(e))?new tt(t[1],t[2],t[3],1):(t=dI.exec(e))?new tt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fI.exec(e))?Pa(t[1],t[2],t[3],t[4]):(t=pI.exec(e))?Pa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hI.exec(e))?oy(t[1],t[2]/100,t[3]/100,1):(t=mI.exec(e))?oy(t[1],t[2]/100,t[3]/100,t[4]):Qg.hasOwnProperty(e)?ty(Qg[e]):e==="transparent"?new tt(NaN,NaN,NaN,0):null}function ty(e){return new tt(e>>16&255,e>>8&255,e&255,1)}function Pa(e,t,n,r){return r<=0&&(e=t=n=NaN),new tt(e,t,n,r)}function vI(e){return e instanceof ui||(e=On(e)),e?(e=e.rgb(),new tt(e.r,e.g,e.b,e.opacity)):new tt}function to(e,t,n,r){return arguments.length===1?vI(e):new tt(e,t,n,r??1)}function tt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Oa(tt,to,sd(ui,{brighter(e){return e=e==null?La:Math.pow(La,e),new tt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ci:Math.pow(ci,e),new tt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tt(yr(this.r),yr(this.g),yr(this.b),ja(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ny,formatHex:ny,formatHex8:EI,formatRgb:ry,toString:ry}));function ny(){return`#${gr(this.r)}${gr(this.g)}${gr(this.b)}`}function EI(){return`#${gr(this.r)}${gr(this.g)}${gr(this.b)}${gr((isNaN(this.opacity)?1:this.opacity)*255)}`}function ry(){let e=ja(this.opacity);return`${e===1?"rgb(":"rgba("}${yr(this.r)}, ${yr(this.g)}, ${yr(this.b)}${e===1?")":`, ${e})`}`}function ja(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function yr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function gr(e){return e=yr(e),(e<16?"0":"")+e.toString(16)}function oy(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mt(e,t,n,r)}function sy(e){if(e instanceof Mt)return new Mt(e.h,e.s,e.l,e.opacity);if(e instanceof ui||(e=On(e)),!e)return new Mt;if(e instanceof Mt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,c=(i+o)/2;return a?(t===i?s=(n-r)/a+(n<r)*6:n===i?s=(r-t)/a+2:s=(t-n)/a+4,a/=c<.5?i+o:2-i-o,s*=60):a=c>0&&c<1?0:s,new Mt(s,a,c,e.opacity)}function ay(e,t,n,r){return arguments.length===1?sy(e):new Mt(e,t,n,r??1)}function Mt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Oa(Mt,ay,sd(ui,{brighter(e){return e=e==null?La:Math.pow(La,e),new Mt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ci:Math.pow(ci,e),new Mt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new tt(ad(e>=240?e-240:e+120,o,r),ad(e,o,r),ad(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Mt(iy(this.h),Fa(this.s),Fa(this.l),ja(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=ja(this.opacity);return`${e===1?"hsl(":"hsla("}${iy(this.h)}, ${Fa(this.s)*100}%, ${Fa(this.l)*100}%${e===1?")":`, ${e})`}`}}));function iy(e){return e=(e||0)%360,e<0?e+360:e}function Fa(e){return Math.max(0,Math.min(1,e||0))}function ad(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function cd(e,t,n,r,o){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*o)/6}function cy(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],s=r>0?e[r-1]:2*o-i,a=r<t-1?e[r+2]:2*i-o;return cd((n-r/t)*t,s,o,i,a)}}function ly(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],s=e[(r+1)%t],a=e[(r+2)%t];return cd((n-r/t)*t,o,i,s,a)}}var ld=e=>()=>e;function DI(e,t){return function(n){return e+n*t}}function wI(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function uy(e){return(e=+e)==1?Ba:function(t,n){return n-t?wI(t,n,e):ld(isNaN(t)?n:t)}}function Ba(e,t){var n=t-e;return n?DI(e,n):ld(isNaN(e)?t:e)}var Va=(function e(t){var n=uy(t);function r(o,i){var s=n((o=to(o)).r,(i=to(i)).r),a=n(o.g,i.g),c=n(o.b,i.b),l=Ba(o.opacity,i.opacity);return function(u){return o.r=s(u),o.g=a(u),o.b=c(u),o.opacity=l(u),o+""}}return r.gamma=e,r})(1);function dy(e){return function(t){var n=t.length,r=new Array(n),o=new Array(n),i=new Array(n),s,a;for(s=0;s<n;++s)a=to(t[s]),r[s]=a.r||0,o[s]=a.g||0,i[s]=a.b||0;return r=e(r),o=e(o),i=e(i),a.opacity=1,function(c){return a.r=r(c),a.g=o(c),a.b=i(c),a+""}}}var bI=dy(cy),_I=dy(ly);function ht(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var dd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ud=new RegExp(dd.source,"g");function CI(e){return function(){return e}}function II(e){return function(t){return e(t)+""}}function fd(e,t){var n=dd.lastIndex=ud.lastIndex=0,r,o,i,s=-1,a=[],c=[];for(e=e+"",t=t+"";(r=dd.exec(e))&&(o=ud.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(r=r[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,c.push({i:s,x:ht(r,o)})),n=ud.lastIndex;return n<t.length&&(i=t.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?c[0]?II(c[0].x):CI(t):(t=c.length,function(l){for(var u=0,d;u<t;++u)a[(d=c[u]).i]=d.x(l);return a.join("")})}var fy=180/Math.PI,Ha={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pd(e,t,n,r,o,i){var s,a,c;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,c/=a),e*r<t*n&&(e=-e,t=-t,c=-c,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*fy,skewX:Math.atan(c)*fy,scaleX:s,scaleY:a}}var $a;function py(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ha:pd(t.a,t.b,t.c,t.d,t.e,t.f)}function hy(e){return e==null?Ha:($a||($a=document.createElementNS("http://www.w3.org/2000/svg","g")),$a.setAttribute("transform",e),(e=$a.transform.baseVal.consolidate())?(e=e.matrix,pd(e.a,e.b,e.c,e.d,e.e,e.f)):Ha)}function my(e,t,n,r){function o(l){return l.length?l.pop()+" ":""}function i(l,u,d,p,f,m){if(l!==d||u!==p){var v=f.push("translate(",null,t,null,n);m.push({i:v-4,x:ht(l,d)},{i:v-2,x:ht(u,p)})}else(d||p)&&f.push("translate("+d+t+p+n)}function s(l,u,d,p){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),p.push({i:d.push(o(d)+"rotate(",null,r)-2,x:ht(l,u)})):u&&d.push(o(d)+"rotate("+u+r)}function a(l,u,d,p){l!==u?p.push({i:d.push(o(d)+"skewX(",null,r)-2,x:ht(l,u)}):u&&d.push(o(d)+"skewX("+u+r)}function c(l,u,d,p,f,m){if(l!==d||u!==p){var v=f.push(o(f)+"scale(",null,",",null,")");m.push({i:v-4,x:ht(l,d)},{i:v-2,x:ht(u,p)})}else(d!==1||p!==1)&&f.push(o(f)+"scale("+d+","+p+")")}return function(l,u){var d=[],p=[];return l=e(l),u=e(u),i(l.translateX,l.translateY,u.translateX,u.translateY,d,p),s(l.rotate,u.rotate,d,p),a(l.skewX,u.skewX,d,p),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,d,p),l=u=null,function(f){for(var m=-1,v=p.length,g;++m<v;)d[(g=p[m]).i]=g.x(f);return d.join("")}}}var hd=my(py,"px, ","px)","deg)"),md=my(hy,", ",")",")");var xI=1e-12;function gy(e){return((e=Math.exp(e))+1/e)/2}function TI(e){return((e=Math.exp(e))-1/e)/2}function SI(e){return((e=Math.exp(2*e))-1)/(e+1)}var gd=(function e(t,n,r){function o(i,s){var a=i[0],c=i[1],l=i[2],u=s[0],d=s[1],p=s[2],f=u-a,m=d-c,v=f*f+m*m,g,y;if(v<xI)y=Math.log(p/l)/t,g=function(V){return[a+V*f,c+V*m,l*Math.exp(t*V*y)]};else{var h=Math.sqrt(v),I=(p*p-l*l+r*v)/(2*l*n*h),w=(p*p-l*l-r*v)/(2*p*n*h),N=Math.log(Math.sqrt(I*I+1)-I),P=Math.log(Math.sqrt(w*w+1)-w);y=(P-N)/t,g=function(V){var $=V*y,Z=gy(N),J=l/(n*h)*(Z*SI(t*$+N)-TI(N));return[a+J*f,c+J*m,l*Z/gy(t*$+N)]}}return g.duration=y*1e3*t/Math.SQRT2,g}return o.rho=function(i){var s=Math.max(.001,+i),a=s*s,c=a*a;return e(s,a,c)},o})(Math.SQRT2,2,4);var no=0,fi=0,di=0,vy=1e3,Ua,pi,za=0,vr=0,Ga=0,hi=typeof performance=="object"&&performance.now?performance:Date,Ey=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function gi(){return vr||(Ey(MI),vr=hi.now()+Ga)}function MI(){vr=0}function mi(){this._call=this._time=this._next=null}mi.prototype=ro.prototype={constructor:mi,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?gi():+n)+(t==null?0:+t),!this._next&&pi!==this&&(pi?pi._next=this:Ua=this,pi=this),this._call=e,this._time=n,yd()},stop:function(){this._call&&(this._call=null,this._time=1/0,yd())}};function ro(e,t,n){var r=new mi;return r.restart(e,t,n),r}function Dy(){gi(),++no;for(var e=Ua,t;e;)(t=vr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--no}function yy(){vr=(za=hi.now())+Ga,no=fi=0;try{Dy()}finally{no=0,AI(),vr=0}}function NI(){var e=hi.now(),t=e-za;t>vy&&(Ga-=t,za=e)}function AI(){for(var e,t=Ua,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ua=n);pi=e,yd(r)}function yd(e){if(!no){fi&&(fi=clearTimeout(fi));var t=e-vr;t>24?(e<1/0&&(fi=setTimeout(yy,e-hi.now()-Ga)),di&&(di=clearInterval(di))):(di||(za=hi.now(),di=setInterval(NI,vy)),no=1,Ey(yy))}}function Wa(e,t,n){var r=new mi;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var RI=gn("start","end","cancel","interrupt"),kI=[],_y=0,wy=1,Ya=2,qa=3,by=4,Za=5,yi=6;function Pn(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;OI(e,n,{name:t,index:r,group:o,on:RI,tween:kI,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:_y})}function vi(e,t){var n=Ne(e,t);if(n.state>_y)throw new Error("too late; already scheduled");return n}function je(e,t){var n=Ne(e,t);if(n.state>qa)throw new Error("too late; already running");return n}function Ne(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function OI(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=ro(i,0,n.time);function i(l){n.state=wy,n.timer.restart(s,n.delay,n.time),n.delay<=l&&s(l-n.delay)}function s(l){var u,d,p,f;if(n.state!==wy)return c();for(u in r)if(f=r[u],f.name===n.name){if(f.state===qa)return Wa(s);f.state===by?(f.state=yi,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=yi,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(Wa(function(){n.state===qa&&(n.state=by,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=Ya,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ya){for(n.state=qa,o=new Array(p=n.tween.length),u=0,d=-1;u<p;++u)(f=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=f);o.length=d+1}}function a(l){for(var u=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=Za,1),d=-1,p=o.length;++d<p;)o[d].call(e,u);n.state===Za&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=yi,n.timer.stop(),delete r[t];for(var l in r)return;delete e.__transition}}function Fn(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>Ya&&r.state<Za,r.state=yi,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function Cy(e){return this.each(function(){Fn(this,e)})}function PI(e,t){var n,r;return function(){var o=je(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,a=r.length;s<a;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function FI(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=je(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var a={name:t,value:n},c=0,l=o.length;c<l;++c)if(o[c].name===t){o[c]=a;break}c===l&&o.push(a)}i.tween=o}}function Iy(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Ne(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?PI:FI)(n,e,t))}function oo(e,t,n){var r=e._id;return e.each(function(){var o=je(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Ne(o,r).value[t]}}function Xa(e,t){var n;return(typeof t=="number"?ht:t instanceof On?Va:(n=On(t))?(t=n,Va):fd)(e,t)}function LI(e){return function(){this.removeAttribute(e)}}function jI(e){return function(){this.removeAttributeNS(e.space,e.local)}}function BI(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function VI(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function HI(e,t,n){var r,o,i;return function(){var s,a=n(this),c;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=a+"",s===c?null:s===r&&c===o?i:(o=c,i=t(r=s,a)))}}function $I(e,t,n){var r,o,i;return function(){var s,a=n(this),c;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=a+"",s===c?null:s===r&&c===o?i:(o=c,i=t(r=s,a)))}}function xy(e,t){var n=yn(e),r=n==="transform"?md:Xa;return this.attrTween(e,typeof t=="function"?(n.local?$I:HI)(n,r,oo(this,"attr."+e,t)):t==null?(n.local?jI:LI)(n):(n.local?VI:BI)(n,r,t))}function UI(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function zI(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function GI(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&zI(e,i)),n}return o._value=t,o}function WI(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&UI(e,i)),n}return o._value=t,o}function Ty(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=yn(e);return this.tween(n,(r.local?GI:WI)(r,t))}function qI(e,t){return function(){vi(this,e).delay=+t.apply(this,arguments)}}function YI(e,t){return t=+t,function(){vi(this,e).delay=t}}function Sy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?qI:YI)(t,e)):Ne(this.node(),t).delay}function ZI(e,t){return function(){je(this,e).duration=+t.apply(this,arguments)}}function XI(e,t){return t=+t,function(){je(this,e).duration=t}}function My(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ZI:XI)(t,e)):Ne(this.node(),t).duration}function KI(e,t){if(typeof t!="function")throw new Error;return function(){je(this,e).ease=t}}function Ny(e){var t=this._id;return arguments.length?this.each(KI(t,e)):Ne(this.node(),t).ease}function QI(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;je(this,e).ease=n}}function Ay(e){if(typeof e!="function")throw new Error;return this.each(QI(this._id,e))}function Ry(e){typeof e!="function"&&(e=ni(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],c,l=0;l<s;++l)(c=i[l])&&e.call(c,c.__data__,l,i)&&a.push(c);return new Xe(r,this._parents,this._name,this._id)}function ky(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),a=0;a<i;++a)for(var c=t[a],l=n[a],u=c.length,d=s[a]=new Array(u),p,f=0;f<u;++f)(p=c[f]||l[f])&&(d[f]=p);for(;a<r;++a)s[a]=t[a];return new Xe(s,this._parents,this._name,this._id)}function JI(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function ex(e,t,n){var r,o,i=JI(t)?vi:je;return function(){var s=i(this,e),a=s.on;a!==r&&(o=(r=a).copy()).on(t,n),s.on=o}}function Oy(e,t){var n=this._id;return arguments.length<2?Ne(this.node(),n).on.on(e):this.each(ex(n,e,t))}function tx(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Py(){return this.on("end.remove",tx(this._id))}function Fy(e){var t=this._name,n=this._id;typeof e!="function"&&(e=hr(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var a=r[s],c=a.length,l=i[s]=new Array(c),u,d,p=0;p<c;++p)(u=a[p])&&(d=e.call(u,u.__data__,p,a))&&("__data__"in u&&(d.__data__=u.__data__),l[p]=d,Pn(l[p],t,n,p,l,Ne(u,n)));return new Xe(i,this._parents,t,n)}function Ly(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ti(e));for(var r=this._groups,o=r.length,i=[],s=[],a=0;a<o;++a)for(var c=r[a],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var p=e.call(u,u.__data__,d,c),f,m=Ne(u,n),v=0,g=p.length;v<g;++v)(f=p[v])&&Pn(f,t,n,v,p,m);i.push(p),s.push(u)}return new Xe(i,s,t,n)}var nx=vn.prototype.constructor;function jy(){return new nx(this._groups,this._parents)}function rx(e,t){var n,r,o;return function(){var i=Rn(this,e),s=(this.style.removeProperty(e),Rn(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function By(e){return function(){this.style.removeProperty(e)}}function ox(e,t,n){var r,o=n+"",i;return function(){var s=Rn(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function ix(e,t,n){var r,o,i;return function(){var s=Rn(this,e),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(e),Rn(this,e))),s===c?null:s===r&&c===o?i:(o=c,i=t(r=s,a))}}function sx(e,t){var n,r,o,i="style."+t,s="end."+i,a;return function(){var c=je(this,e),l=c.on,u=c.value[i]==null?a||(a=By(t)):void 0;(l!==n||o!==u)&&(r=(n=l).copy()).on(s,o=u),c.on=r}}function Vy(e,t,n){var r=(e+="")=="transform"?hd:Xa;return t==null?this.styleTween(e,rx(e,r)).on("end.style."+e,By(e)):typeof t=="function"?this.styleTween(e,ix(e,r,oo(this,"style."+e,t))).each(sx(this._id,e)):this.styleTween(e,ox(e,r,t),n).on("end.style."+e,null)}function ax(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function cx(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&ax(e,s,n)),r}return i._value=t,i}function Hy(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,cx(e,t,n??""))}function lx(e){return function(){this.textContent=e}}function ux(e){return function(){var t=e(this);this.textContent=t??""}}function $y(e){return this.tween("text",typeof e=="function"?ux(oo(this,"text",e)):lx(e==null?"":e+""))}function dx(e){return function(t){this.textContent=e.call(this,t)}}function fx(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&dx(o)),t}return r._value=e,r}function Uy(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,fx(e))}function zy(){for(var e=this._name,t=this._id,n=Ka(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,c,l=0;l<a;++l)if(c=s[l]){var u=Ne(c,t);Pn(c,e,n,l,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Xe(r,this._parents,e,n)}function Gy(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var a={value:s},c={value:function(){--o===0&&i()}};n.each(function(){var l=je(this,r),u=l.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(c)),l.on=t}),o===0&&i()})}var px=0;function Xe(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Wy(e){return vn().transition(e)}function Ka(){return++px}var En=vn.prototype;Xe.prototype=Wy.prototype={constructor:Xe,select:Fy,selectAll:Ly,selectChild:En.selectChild,selectChildren:En.selectChildren,filter:Ry,merge:ky,selection:jy,transition:zy,call:En.call,nodes:En.nodes,node:En.node,size:En.size,empty:En.empty,each:En.each,on:Oy,attr:xy,attrTween:Ty,style:Vy,styleTween:Hy,text:$y,textTween:Uy,remove:Py,tween:Iy,delay:Sy,duration:My,ease:Ny,easeVarying:Ay,end:Gy,[Symbol.iterator]:En[Symbol.iterator]};function Qa(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var hx={time:null,delay:0,duration:250,ease:Qa};function mx(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function qy(e){var t,n;e instanceof Xe?(t=e._id,e=e._name):(t=Ka(),(n=hx).time=gi(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,c,l=0;l<a;++l)(c=s[l])&&Pn(c,e,t,l,s,n||mx(c,t));return new Xe(r,this._parents,e,t)}vn.prototype.interrupt=Cy;vn.prototype.transition=qy;var{abs:tz,max:nz,min:rz}=Math;function Yy(e){return[+e[0],+e[1]]}function gx(e){return[Yy(e[0]),Yy(e[1])]}var oz={name:"x",handles:["w","e"].map(vd),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},iz={name:"y",handles:["n","s"].map(vd),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},sz={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(vd),input:function(e){return e==null?null:gx(e)},output:function(e){return e}};function vd(e){return{type:e}}function Zy(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return Xy(this.cover(t,n),t,n,e)}function Xy(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var o,i=e._root,s={data:r},a=e._x0,c=e._y0,l=e._x1,u=e._y1,d,p,f,m,v,g,y,h;if(!i)return e._root=s,e;for(;i.length;)if((v=t>=(d=(a+l)/2))?a=d:l=d,(g=n>=(p=(c+u)/2))?c=p:u=p,o=i,!(i=i[y=g<<1|v]))return o[y]=s,e;if(f=+e._x.call(null,i.data),m=+e._y.call(null,i.data),t===f&&n===m)return s.next=i,o?o[y]=s:e._root=s,e;do o=o?o[y]=new Array(4):e._root=new Array(4),(v=t>=(d=(a+l)/2))?a=d:l=d,(g=n>=(p=(c+u)/2))?c=p:u=p;while((y=g<<1|v)===(h=(m>=p)<<1|f>=d));return o[h]=i,o[y]=s,e}function Ky(e){var t,n,r=e.length,o,i,s=new Array(r),a=new Array(r),c=1/0,l=1/0,u=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(o=+this._x.call(null,t=e[n]))||isNaN(i=+this._y.call(null,t))||(s[n]=o,a[n]=i,o<c&&(c=o),o>u&&(u=o),i<l&&(l=i),i>d&&(d=i));if(c>u||l>d)return this;for(this.cover(c,l).cover(u,d),n=0;n<r;++n)Xy(this,s[n],a[n],e[n]);return this}function Qy(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(e))+1,i=(r=Math.floor(t))+1;else{for(var s=o-n||1,a=this._root,c,l;n>e||e>=o||r>t||t>=i;)switch(l=(t<r)<<1|e<n,c=new Array(4),c[l]=a,a=c,s*=2,l){case 0:o=n+s,i=r+s;break;case 1:n=o-s,i=r+s;break;case 2:o=n+s,r=i-s;break;case 3:n=o-s,r=i-s;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this}function Jy(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function ev(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ae(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function tv(e,t,n){var r,o=this._x0,i=this._y0,s,a,c,l,u=this._x1,d=this._y1,p=[],f=this._root,m,v;for(f&&p.push(new Ae(f,o,i,u,d)),n==null?n=1/0:(o=e-n,i=t-n,u=e+n,d=t+n,n*=n);m=p.pop();)if(!(!(f=m.node)||(s=m.x0)>u||(a=m.y0)>d||(c=m.x1)<o||(l=m.y1)<i))if(f.length){var g=(s+c)/2,y=(a+l)/2;p.push(new Ae(f[3],g,y,c,l),new Ae(f[2],s,y,g,l),new Ae(f[1],g,a,c,y),new Ae(f[0],s,a,g,y)),(v=(t>=y)<<1|e>=g)&&(m=p[p.length-1],p[p.length-1]=p[p.length-1-v],p[p.length-1-v]=m)}else{var h=e-+this._x.call(null,f.data),I=t-+this._y.call(null,f.data),w=h*h+I*I;if(w<n){var N=Math.sqrt(n=w);o=e-N,i=t-N,u=e+N,d=t+N,r=f.data}}return r}function nv(e){if(isNaN(u=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,o,i,s=this._x0,a=this._y0,c=this._x1,l=this._y1,u,d,p,f,m,v,g,y;if(!n)return this;if(n.length)for(;;){if((m=u>=(p=(s+c)/2))?s=p:c=p,(v=d>=(f=(a+l)/2))?a=f:l=f,t=n,!(n=n[g=v<<1|m]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,y=g)}for(;n.data!==e;)if(o=n,!(n=n.next))return this;return(i=n.next)&&delete n.next,o?(i?o.next=i:delete o.next,this):t?(i?t[g]=i:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=i,this)}function rv(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function ov(){return this._root}function iv(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function sv(e){var t=[],n,r=this._root,o,i,s,a,c;for(r&&t.push(new Ae(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,i=n.x0,s=n.y0,a=n.x1,c=n.y1)&&r.length){var l=(i+a)/2,u=(s+c)/2;(o=r[3])&&t.push(new Ae(o,l,u,a,c)),(o=r[2])&&t.push(new Ae(o,i,u,l,c)),(o=r[1])&&t.push(new Ae(o,l,s,a,u)),(o=r[0])&&t.push(new Ae(o,i,s,l,u))}return this}function av(e){var t=[],n=[],r;for(this._root&&t.push(new Ae(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var o=r.node;if(o.length){var i,s=r.x0,a=r.y0,c=r.x1,l=r.y1,u=(s+c)/2,d=(a+l)/2;(i=o[0])&&t.push(new Ae(i,s,a,u,d)),(i=o[1])&&t.push(new Ae(i,u,a,c,d)),(i=o[2])&&t.push(new Ae(i,s,d,u,l)),(i=o[3])&&t.push(new Ae(i,u,d,c,l))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function cv(e){return e[0]}function lv(e){return arguments.length?(this._x=e,this):this._x}function uv(e){return e[1]}function dv(e){return arguments.length?(this._y=e,this):this._y}function Er(e,t,n){var r=new Ed(t??cv,n??uv,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Ed(e,t,n,r,o,i){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function fv(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Ke=Er.prototype=Ed.prototype;Ke.copy=function(){var e=new Ed(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=fv(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var o=0;o<4;++o)(r=t.source[o])&&(r.length?n.push({source:r,target:t.target[o]=new Array(4)}):t.target[o]=fv(r));return e};Ke.add=Zy;Ke.addAll=Ky;Ke.cover=Qy;Ke.data=Jy;Ke.extent=ev;Ke.find=tv;Ke.remove=nv;Ke.removeAll=rv;Ke.root=ov;Ke.size=iv;Ke.visit=sv;Ke.visitAfter=av;Ke.x=lv;Ke.y=dv;function Ce(e){return function(){return e}}function Nt(e){return(e()-.5)*1e-6}function yx(e){return e.x+e.vx}function vx(e){return e.y+e.vy}function Dd(e){var t,n,r,o=1,i=1;typeof e!="function"&&(e=Ce(e==null?1:+e));function s(){for(var l,u=t.length,d,p,f,m,v,g,y=0;y<i;++y)for(d=Er(t,yx,vx).visitAfter(a),l=0;l<u;++l)p=t[l],v=n[p.index],g=v*v,f=p.x+p.vx,m=p.y+p.vy,d.visit(h);function h(I,w,N,P,V){var $=I.data,Z=I.r,J=v+Z;if($){if($.index>p.index){var de=f-$.x-$.vx,Re=m-$.y-$.vy,ke=de*de+Re*Re;ke<J*J&&(de===0&&(de=Nt(r),ke+=de*de),Re===0&&(Re=Nt(r),ke+=Re*Re),ke=(J-(ke=Math.sqrt(ke)))/ke*o,p.vx+=(de*=ke)*(J=(Z*=Z)/(g+Z)),p.vy+=(Re*=ke)*J,$.vx-=de*(J=1-J),$.vy-=Re*J)}return}return w>f+J||P<f-J||N>m+J||V<m-J}}function a(l){if(l.data)return l.r=n[l.data.index];for(var u=l.r=0;u<4;++u)l[u]&&l[u].r>l.r&&(l.r=l[u].r)}function c(){if(t){var l,u=t.length,d;for(n=new Array(u),l=0;l<u;++l)d=t[l],n[d.index]=+e(d,l,t)}}return s.initialize=function(l,u){t=l,r=u,c()},s.iterations=function(l){return arguments.length?(i=+l,s):i},s.strength=function(l){return arguments.length?(o=+l,s):o},s.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Ce(+l),c(),s):e},s}function Ex(e){return e.index}function pv(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function wd(e){var t=Ex,n=d,r,o=Ce(30),i,s,a,c,l,u=1;e==null&&(e=[]);function d(g){return 1/Math.min(a[g.source.index],a[g.target.index])}function p(g){for(var y=0,h=e.length;y<u;++y)for(var I=0,w,N,P,V,$,Z,J;I<h;++I)w=e[I],N=w.source,P=w.target,V=P.x+P.vx-N.x-N.vx||Nt(l),$=P.y+P.vy-N.y-N.vy||Nt(l),Z=Math.sqrt(V*V+$*$),Z=(Z-i[I])/Z*g*r[I],V*=Z,$*=Z,P.vx-=V*(J=c[I]),P.vy-=$*J,N.vx+=V*(J=1-J),N.vy+=$*J}function f(){if(s){var g,y=s.length,h=e.length,I=new Map(s.map((N,P)=>[t(N,P,s),N])),w;for(g=0,a=new Array(y);g<h;++g)w=e[g],w.index=g,typeof w.source!="object"&&(w.source=pv(I,w.source)),typeof w.target!="object"&&(w.target=pv(I,w.target)),a[w.source.index]=(a[w.source.index]||0)+1,a[w.target.index]=(a[w.target.index]||0)+1;for(g=0,c=new Array(h);g<h;++g)w=e[g],c[g]=a[w.source.index]/(a[w.source.index]+a[w.target.index]);r=new Array(h),m(),i=new Array(h),v()}}function m(){if(s)for(var g=0,y=e.length;g<y;++g)r[g]=+n(e[g],g,e)}function v(){if(s)for(var g=0,y=e.length;g<y;++g)i[g]=+o(e[g],g,e)}return p.initialize=function(g,y){s=g,l=y,f()},p.links=function(g){return arguments.length?(e=g,f(),p):e},p.id=function(g){return arguments.length?(t=g,p):t},p.iterations=function(g){return arguments.length?(u=+g,p):u},p.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Ce(+g),m(),p):n},p.distance=function(g){return arguments.length?(o=typeof g=="function"?g:Ce(+g),v(),p):o},p}function hv(){let e=1;return()=>(e=(1664525*e+1013904223)%4294967296)/4294967296}function mv(e){return e.x}function gv(e){return e.y}var Dx=10,wx=Math.PI*(3-Math.sqrt(5));function bd(e){var t,n=1,r=.001,o=1-Math.pow(r,1/300),i=0,s=.6,a=new Map,c=ro(d),l=gn("tick","end"),u=hv();e==null&&(e=[]);function d(){p(),l.call("tick",t),n<r&&(c.stop(),l.call("end",t))}function p(v){var g,y=e.length,h;v===void 0&&(v=1);for(var I=0;I<v;++I)for(n+=(i-n)*o,a.forEach(function(w){w(n)}),g=0;g<y;++g)h=e[g],h.fx==null?h.x+=h.vx*=s:(h.x=h.fx,h.vx=0),h.fy==null?h.y+=h.vy*=s:(h.y=h.fy,h.vy=0);return t}function f(){for(var v=0,g=e.length,y;v<g;++v){if(y=e[v],y.index=v,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var h=Dx*Math.sqrt(.5+v),I=v*wx;y.x=h*Math.cos(I),y.y=h*Math.sin(I)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function m(v){return v.initialize&&v.initialize(e,u),v}return f(),t={tick:p,restart:function(){return c.restart(d),t},stop:function(){return c.stop(),t},nodes:function(v){return arguments.length?(e=v,f(),a.forEach(m),t):e},alpha:function(v){return arguments.length?(n=+v,t):n},alphaMin:function(v){return arguments.length?(r=+v,t):r},alphaDecay:function(v){return arguments.length?(o=+v,t):+o},alphaTarget:function(v){return arguments.length?(i=+v,t):i},velocityDecay:function(v){return arguments.length?(s=1-v,t):1-s},randomSource:function(v){return arguments.length?(u=v,a.forEach(m),t):u},force:function(v,g){return arguments.length>1?(g==null?a.delete(v):a.set(v,m(g)),t):a.get(v)},find:function(v,g,y){var h=0,I=e.length,w,N,P,V,$;for(y==null?y=1/0:y*=y,h=0;h<I;++h)V=e[h],w=v-V.x,N=g-V.y,P=w*w+N*N,P<y&&($=V,y=P);return $},on:function(v,g){return arguments.length>1?(l.on(v,g),t):l.on(v)}}}function _d(){var e,t,n,r,o=Ce(-30),i,s=1,a=1/0,c=.81;function l(f){var m,v=e.length,g=Er(e,mv,gv).visitAfter(d);for(r=f,m=0;m<v;++m)t=e[m],g.visit(p)}function u(){if(e){var f,m=e.length,v;for(i=new Array(m),f=0;f<m;++f)v=e[f],i[v.index]=+o(v,f,e)}}function d(f){var m=0,v,g,y=0,h,I,w;if(f.length){for(h=I=w=0;w<4;++w)(v=f[w])&&(g=Math.abs(v.value))&&(m+=v.value,y+=g,h+=g*v.x,I+=g*v.y);f.x=h/y,f.y=I/y}else{v=f,v.x=v.data.x,v.y=v.data.y;do m+=i[v.data.index];while(v=v.next)}f.value=m}function p(f,m,v,g){if(!f.value)return!0;var y=f.x-t.x,h=f.y-t.y,I=g-m,w=y*y+h*h;if(I*I/c<w)return w<a&&(y===0&&(y=Nt(n),w+=y*y),h===0&&(h=Nt(n),w+=h*h),w<s&&(w=Math.sqrt(s*w)),t.vx+=y*f.value*r/w,t.vy+=h*f.value*r/w),!0;if(f.length||w>=a)return;(f.data!==t||f.next)&&(y===0&&(y=Nt(n),w+=y*y),h===0&&(h=Nt(n),w+=h*h),w<s&&(w=Math.sqrt(s*w)));do f.data!==t&&(I=i[f.data.index]*r/w,t.vx+=y*I,t.vy+=h*I);while(f=f.next)}return l.initialize=function(f,m){e=f,n=m,u()},l.strength=function(f){return arguments.length?(o=typeof f=="function"?f:Ce(+f),u(),l):o},l.distanceMin=function(f){return arguments.length?(s=f*f,l):Math.sqrt(s)},l.distanceMax=function(f){return arguments.length?(a=f*f,l):Math.sqrt(a)},l.theta=function(f){return arguments.length?(c=f*f,l):Math.sqrt(c)},l}function Cd(e){var t=Ce(.1),n,r,o;typeof e!="function"&&(e=Ce(e==null?0:+e));function i(a){for(var c=0,l=n.length,u;c<l;++c)u=n[c],u.vx+=(o[c]-u.x)*r[c]*a}function s(){if(n){var a,c=n.length;for(r=new Array(c),o=new Array(c),a=0;a<c;++a)r[a]=isNaN(o[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return i.initialize=function(a){n=a,s()},i.strength=function(a){return arguments.length?(t=typeof a=="function"?a:Ce(+a),s(),i):t},i.x=function(a){return arguments.length?(e=typeof a=="function"?a:Ce(+a),s(),i):e},i}function Id(e){var t=Ce(.1),n,r,o;typeof e!="function"&&(e=Ce(e==null?0:+e));function i(a){for(var c=0,l=n.length,u;c<l;++c)u=n[c],u.vy+=(o[c]-u.y)*r[c]*a}function s(){if(n){var a,c=n.length;for(r=new Array(c),o=new Array(c),a=0;a<c;++a)r[a]=isNaN(o[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return i.initialize=function(a){n=a,s()},i.strength=function(a){return arguments.length?(t=typeof a=="function"?a:Ce(+a),s(),i):t},i.y=function(a){return arguments.length?(e=typeof a=="function"?a:Ce(+a),s(),i):e},i}var Ei=e=>()=>e;function xd(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function At(e,t,n){this.k=e,this.x=t,this.y=n}At.prototype={constructor:At,scale:function(e){return e===1?this:new At(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new At(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Dr=new At(1,0,0);Td.prototype=At.prototype;function Td(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Dr;return e.__zoom}function Ja(e){e.stopImmediatePropagation()}function io(e){e.preventDefault(),e.stopImmediatePropagation()}function bx(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function _x(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function yv(){return this.__zoom||Dr}function Cx(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ix(){return navigator.maxTouchPoints||"ontouchstart"in this}function xx(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function Sd(){var e=bx,t=_x,n=xx,r=Cx,o=Ix,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,c=gd,l=gn("start","zoom","end"),u,d,p,f=500,m=150,v=0,g=10;function y(b){b.property("__zoom",yv).on("wheel.zoom",$,{passive:!1}).on("mousedown.zoom",Z).on("dblclick.zoom",J).filter(o).on("touchstart.zoom",de).on("touchmove.zoom",Re).on("touchend.zoom touchcancel.zoom",ke).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(b,A,x,k){var U=b.selection?b.selection():b;U.property("__zoom",yv),b!==U?N(b,A,x,k):U.interrupt().each(function(){P(this,arguments).event(k).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},y.scaleBy=function(b,A,x,k){y.scaleTo(b,function(){var U=this.__zoom.k,G=typeof A=="function"?A.apply(this,arguments):A;return U*G},x,k)},y.scaleTo=function(b,A,x,k){y.transform(b,function(){var U=t.apply(this,arguments),G=this.__zoom,W=x==null?w(U):typeof x=="function"?x.apply(this,arguments):x,le=G.invert(W),Ee=typeof A=="function"?A.apply(this,arguments):A;return n(I(h(G,Ee),W,le),U,s)},x,k)},y.translateBy=function(b,A,x,k){y.transform(b,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof x=="function"?x.apply(this,arguments):x),t.apply(this,arguments),s)},null,k)},y.translateTo=function(b,A,x,k,U){y.transform(b,function(){var G=t.apply(this,arguments),W=this.__zoom,le=k==null?w(G):typeof k=="function"?k.apply(this,arguments):k;return n(Dr.translate(le[0],le[1]).scale(W.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof x=="function"?-x.apply(this,arguments):-x),G,s)},k,U)};function h(b,A){return A=Math.max(i[0],Math.min(i[1],A)),A===b.k?b:new At(A,b.x,b.y)}function I(b,A,x){var k=A[0]-x[0]*b.k,U=A[1]-x[1]*b.k;return k===b.x&&U===b.y?b:new At(b.k,k,U)}function w(b){return[(+b[0][0]+ +b[1][0])/2,(+b[0][1]+ +b[1][1])/2]}function N(b,A,x,k){b.on("start.zoom",function(){P(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){P(this,arguments).event(k).end()}).tween("zoom",function(){var U=this,G=arguments,W=P(U,G).event(k),le=t.apply(U,G),Ee=x==null?w(le):typeof x=="function"?x.apply(U,G):x,Rt=Math.max(le[1][0]-le[0][0],le[1][1]-le[0][1]),Oe=U.__zoom,mt=typeof A=="function"?A.apply(U,G):A,tn=c(Oe.invert(Ee).concat(Rt/Oe.k),mt.invert(Ee).concat(Rt/mt.k));return function(gt){if(gt===1)gt=mt;else{var nn=tn(gt),ic=Rt/nn[2];gt=new At(ic,Ee[0]-nn[0]*ic,Ee[1]-nn[1]*ic)}W.zoom(null,gt)}})}function P(b,A,x){return!x&&b.__zooming||new V(b,A)}function V(b,A){this.that=b,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(b,A),this.taps=0}V.prototype={event:function(b){return b&&(this.sourceEvent=b),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(b,A){return this.mouse&&b!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&b!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&b!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(b){var A=Ze(this.that).datum();l.call(b,this.that,new xd(b,{sourceEvent:this.sourceEvent,target:y,type:b,transform:this.that.__zoom,dispatch:l}),A)}};function $(b,...A){if(!e.apply(this,arguments))return;var x=P(this,A).event(b),k=this.__zoom,U=Math.max(i[0],Math.min(i[1],k.k*Math.pow(2,r.apply(this,arguments)))),G=pt(b);if(x.wheel)(x.mouse[0][0]!==G[0]||x.mouse[0][1]!==G[1])&&(x.mouse[1]=k.invert(x.mouse[0]=G)),clearTimeout(x.wheel);else{if(k.k===U)return;x.mouse=[G,k.invert(G)],Fn(this),x.start()}io(b),x.wheel=setTimeout(W,m),x.zoom("mouse",n(I(h(k,U),x.mouse[0],x.mouse[1]),x.extent,s));function W(){x.wheel=null,x.end()}}function Z(b,...A){if(p||!e.apply(this,arguments))return;var x=b.currentTarget,k=P(this,A,!0).event(b),U=Ze(b.view).on("mousemove.zoom",Ee,!0).on("mouseup.zoom",Rt,!0),G=pt(b,x),W=b.clientX,le=b.clientY;oi(b.view),Ja(b),k.mouse=[G,this.__zoom.invert(G)],Fn(this),k.start();function Ee(Oe){if(io(Oe),!k.moved){var mt=Oe.clientX-W,tn=Oe.clientY-le;k.moved=mt*mt+tn*tn>v}k.event(Oe).zoom("mouse",n(I(k.that.__zoom,k.mouse[0]=pt(Oe,x),k.mouse[1]),k.extent,s))}function Rt(Oe){U.on("mousemove.zoom mouseup.zoom",null),ii(Oe.view,k.moved),io(Oe),k.event(Oe).end()}}function J(b,...A){if(e.apply(this,arguments)){var x=this.__zoom,k=pt(b.changedTouches?b.changedTouches[0]:b,this),U=x.invert(k),G=x.k*(b.shiftKey?.5:2),W=n(I(h(x,G),k,U),t.apply(this,A),s);io(b),a>0?Ze(this).transition().duration(a).call(N,W,k,b):Ze(this).call(y.transform,W,k,b)}}function de(b,...A){if(e.apply(this,arguments)){var x=b.touches,k=x.length,U=P(this,A,b.changedTouches.length===k).event(b),G,W,le,Ee;for(Ja(b),W=0;W<k;++W)le=x[W],Ee=pt(le,this),Ee=[Ee,this.__zoom.invert(Ee),le.identifier],U.touch0?!U.touch1&&U.touch0[2]!==Ee[2]&&(U.touch1=Ee,U.taps=0):(U.touch0=Ee,G=!0,U.taps=1+!!u);u&&(u=clearTimeout(u)),G&&(U.taps<2&&(d=Ee[0],u=setTimeout(function(){u=null},f)),Fn(this),U.start())}}function Re(b,...A){if(this.__zooming){var x=P(this,A).event(b),k=b.changedTouches,U=k.length,G,W,le,Ee;for(io(b),G=0;G<U;++G)W=k[G],le=pt(W,this),x.touch0&&x.touch0[2]===W.identifier?x.touch0[0]=le:x.touch1&&x.touch1[2]===W.identifier&&(x.touch1[0]=le);if(W=x.that.__zoom,x.touch1){var Rt=x.touch0[0],Oe=x.touch0[1],mt=x.touch1[0],tn=x.touch1[1],gt=(gt=mt[0]-Rt[0])*gt+(gt=mt[1]-Rt[1])*gt,nn=(nn=tn[0]-Oe[0])*nn+(nn=tn[1]-Oe[1])*nn;W=h(W,Math.sqrt(gt/nn)),le=[(Rt[0]+mt[0])/2,(Rt[1]+mt[1])/2],Ee=[(Oe[0]+tn[0])/2,(Oe[1]+tn[1])/2]}else if(x.touch0)le=x.touch0[0],Ee=x.touch0[1];else return;x.zoom("touch",n(I(W,le,Ee),x.extent,s))}}function ke(b,...A){if(this.__zooming){var x=P(this,A).event(b),k=b.changedTouches,U=k.length,G,W;for(Ja(b),p&&clearTimeout(p),p=setTimeout(function(){p=null},f),G=0;G<U;++G)W=k[G],x.touch0&&x.touch0[2]===W.identifier?delete x.touch0:x.touch1&&x.touch1[2]===W.identifier&&delete x.touch1;if(x.touch1&&!x.touch0&&(x.touch0=x.touch1,delete x.touch1),x.touch0)x.touch0[1]=this.__zoom.invert(x.touch0[0]);else if(x.end(),x.taps===2&&(W=pt(W,this),Math.hypot(d[0]-W[0],d[1]-W[1])<g)){var le=Ze(this).on("dblclick.zoom");le&&le.apply(this,arguments)}}}return y.wheelDelta=function(b){return arguments.length?(r=typeof b=="function"?b:Ei(+b),y):r},y.filter=function(b){return arguments.length?(e=typeof b=="function"?b:Ei(!!b),y):e},y.touchable=function(b){return arguments.length?(o=typeof b=="function"?b:Ei(!!b),y):o},y.extent=function(b){return arguments.length?(t=typeof b=="function"?b:Ei([[+b[0][0],+b[0][1]],[+b[1][0],+b[1][1]]]),y):t},y.scaleExtent=function(b){return arguments.length?(i[0]=+b[0],i[1]=+b[1],y):[i[0],i[1]]},y.translateExtent=function(b){return arguments.length?(s[0][0]=+b[0][0],s[1][0]=+b[1][0],s[0][1]=+b[0][1],s[1][1]=+b[1][1],y):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},y.constrain=function(b){return arguments.length?(n=b,y):n},y.duration=function(b){return arguments.length?(a=+b,y):a},y.interpolate=function(b){return arguments.length?(c=b,y):c},y.on=function(){var b=l.on.apply(l,arguments);return b===l?y:b},y.clickDistance=function(b){return arguments.length?(v=(b=+b)*b,y):Math.sqrt(v)},y.tapDistance=function(b){return arguments.length?(g=+b,y):g},y}function so(e){if(typeof e=="string")throw new Error("Graph link has not been initialized");return e}function vv(e,t,n,r){let o=e.clientWidth,i=e.clientHeight,s=t.find(h=>h.scope==="project"&&h.aliases.some(I=>/^AGENTS(?:\.override)?\.md$/i.test(I)))||t.find(h=>h.scope==="project"&&h.kind==="instruction"),a=t.map((h,I)=>De(ne({},h),{radius:h.id===s?.id?30:h.kind==="instruction"?18:h.kind==="rule"?11:8,x:o/2+Math.cos(I*2.39996)*90,y:i/2+Math.sin(I*2.39996)*90})),c=new Set(a.map(h=>h.id)),l=n.filter(h=>c.has(h.source)&&c.has(h.target)).map(h=>ne({},h)),u=Ze(e).append("svg").attr("class","graph").attr("role","img").attr("aria-label",`Context graph with ${a.length} files. Use the Files view for a table.`),d=u.append("g"),p=d.append("g").selectAll("line").data(l).join("line").attr("stroke",h=>h.kind==="scope"?"#b6c3ac":"#c6d3bc").attr("stroke-width",1).attr("stroke-dasharray",h=>h.kind==="scope"?"4 5":null),f=d.append("g").selectAll("g").data(a).join("g").attr("class",h=>`graph-node ${h.scope} ${h.kind} ${h.id===s?.id?"root":""}`).attr("role","button").attr("tabindex",0).attr("aria-label",h=>`${h.name}, ${h.scope}, ${h.path}, ${h.clients.map(I=>mn[I]).join(", ")||"no client entry point"}`).on("click",(h,I)=>r(I)).on("keydown",(h,I)=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),r(I))});f.append("circle").attr("r",h=>h.radius).attr("fill",h=>h.id===s?.id?"#d6e6c7":h.scope==="user"?"#eee6f6":h.kind==="instruction"?"#e3edda":"#eaf0e1").attr("stroke",h=>h.scope==="user"?"#b7a1c9":"#a9c08e"),f.filter(h=>h.kind==="instruction").append("text").attr("class","node-icon").attr("dy",5).text(h=>h.id===s?.id?"\u2733":"\u25C7"),f.append("text").attr("class",h=>`node-label ${h.id===s?.id?"root-label":""}`).attr("y",h=>h.radius+17).text(h=>h.name.length>30?h.name.slice(0,27)+"\u2026":h.name),f.append("title").text(h=>`${h.path}
|
|
8
|
+
${h.clients.map(I=>mn[I]).join(", ")||"No client entry point"}`);let m=Sd().scaleExtent([.06,4]).on("zoom",h=>d.attr("transform",h.transform));u.call(m).on("dblclick.zoom",null);function v(){let h=d.node()?.getBBox();if(!h)return;let I=Math.min(1.4,(o-100)/Math.max(h.width,1),(i-105)/Math.max(h.height,1));u.call(m.transform,Dr.translate(o/2-(h.x+h.width/2)*I,i/2-(h.y+h.height/2)*I).scale(I))}let g=bd(a).force("link",wd(l).id(h=>h.id).distance(h=>so(h.source).id===s?.id||so(h.target).id===s?.id?140:95).strength(.35)).force("charge",_d().strength(-150)).force("collide",Dd().radius(h=>h.radius+35)).force("x",Cd(h=>h.scope==="user"?o*.77:o*.43).strength(.035)).force("y",Id(i/2).strength(.055)).stop();if(s){let h=a.find(I=>I.id===s.id);h&&(h.fx=o*.45),h&&(h.fy=i/2)}let y=()=>{p.attr("x1",h=>so(h.source).x??0).attr("y1",h=>so(h.source).y??0).attr("x2",h=>so(h.target).x??0).attr("y2",h=>so(h.target).y??0),f.attr("transform",h=>`translate(${h.x},${h.y})`)};return g.tick(Math.min(180,a.length>700?60:180)),y(),v(),g.on("tick",y),f.call(id().on("start",(h,I)=>{h.active||g.alphaTarget(.2).restart(),I.fx=I.x,I.fy=I.y}).on("drag",(h,I)=>{I.fx=h.x,I.fy=h.y}).on("end",(h,I)=>{h.active||g.alphaTarget(0),I.fx=null,I.fy=null})),{fit:v,zoomIn:()=>{u.call(m.scaleBy,1.3)},zoomOut:()=>{u.call(m.scaleBy,1/1.3)},destroy:()=>{g.stop(),g.on("tick",null),f.on(".drag",null).on("click",null).on("keydown",null),u.on(".zoom",null),u.remove()}}}var ec=class e{nodes=Tt.required();edges=Tt.required();selected=sa();element=T(ur);size=q(0);handle;constructor(){Mm(r=>{this.size();let o=vv(this.element.nativeElement,this.nodes(),this.edges(),i=>this.selected.emit(i));this.handle=o,r(()=>o.destroy())});let t,n=()=>{clearTimeout(t),t=setTimeout(()=>this.size.update(r=>r+1),150)};window.addEventListener("resize",n),T(Ie).onDestroy(()=>{clearTimeout(t),window.removeEventListener("resize",n)})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["section","appGraph",""]],inputs:{nodes:[1,"nodes"],edges:[1,"edges"]},outputs:{selected:"selected"},decls:22,vars:0,consts:[[1,"graph-key"],[1,"dot","project"],[1,"dot","user"],[1,"key-line"],[1,"key-line","dashed"],[1,"graph-controls"],["id","zoom-in","aria-label","Zoom in",3,"click"],["id","zoom-out","aria-label","Zoom out",3,"click"],["id","fit","aria-label","Fit graph",3,"click"],[1,"graph-hint"]],template:function(n,r){n&1&&(_(0,"div",0)(1,"span"),Se(2,"i",1),E(3,"Project context"),C(),_(4,"span"),Se(5,"i",2),E(6,"User context"),C(),_(7,"span"),Se(8,"i",3),E(9,"Reference"),C(),_(10,"span"),Se(11,"i",4),E(12,"Folder scope"),C()(),_(13,"div",5)(14,"button",6),me("click",function(){return r.handle?.zoomIn()}),E(15,"+"),C(),_(16,"button",7),me("click",function(){return r.handle?.zoomOut()}),E(17," \u2212"),C(),_(18,"button",8),me("click",function(){return r.handle?.fit()}),E(19,"Fit"),C()(),_(20,"div",9),E(21,"Scroll to zoom \xB7 Drag to explore \xB7 Click a file"),C())},encapsulation:2})};var Tx=(e,t)=>t.id,Sx=(e,t)=>t.label;function Mx(e,t){e&1&&(_(0,"p",2),E(1,"Checking installation\u2026"),C())}function Nx(e,t){if(e&1){let n=Me();_(0,"p",4),E(1),C(),_(2,"button",5),me("click",function(){oe(n);let o=R();return ie(o.checkAgain())}),E(3," Check again "),C()}if(e&2){let n=R();D(),j(n.checkError()),D(),ue("disabled",n.checking())}}function Ax(e,t){if(e&1&&(_(0,"p"),E(1),C(),_(2,"code"),E(3),C()),e&2){let n=t.$implicit;D(),j(n.label),D(2),j(n.command)}}function Rx(e,t){if(e&1){let n=Me();_(0,"details")(1,"summary"),E(2,"Installation instructions"),C(),xe(3,Ax,4,2,null,null,Sx),_(5,"p")(6,"a",7),E(7,"Official installation guide"),C()()(),_(8,"button",5),me("click",function(){oe(n);let o=R(2);return ie(o.checkAgain())}),E(9," Check again "),C()}if(e&2){let n=R().$implicit,r=R();D(3),Te(n.instructions),D(3),ue("href",n.guide,un),D(2),ue("disabled",r.checking())}}function kx(e,t){if(e&1&&(_(0,"article",3)(1,"label"),Se(2,"input",6),E(3),C(),_(4,"p"),E(5),C(),se(6,Rx,10,2),C()),e&2){let n=t.$implicit;D(2),ue("checked",n.detected),D(),he(" ",n.label),D(2),j(n.detail),D(),ae(n.detected?-1:6)}}var tc=class e{api=T(Jt);checks=q([]);checking=q(!1);checkError=q("");constructor(){this.checkAgain()}async checkAgain(){if(!this.checking()){this.checking.set(!0),this.checkError.set("");try{this.checks.set((await this.api.optimizationChecks()).checks)}catch(t){this.checkError.set(Qt(t))}finally{this.checking.set(!1)}}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["app-optimization-checklist"]],decls:9,vars:2,consts:[["aria-labelledby","checklist-title",1,"checklist"],["id","checklist-title"],["role","status"],[1,"check-item"],["role","alert"],[1,"small-button","check-again",3,"click","disabled"],["type","checkbox","disabled","",3,"checked"],["target","_blank","rel","noreferrer",3,"href"]],template:function(n,r){n&1&&(_(0,"section",0)(1,"h2",1),E(2,"Optimization checklist"),C(),_(3,"p"),E(4," Installation checks are detected locally. RTK does not reduce these static file estimates. "),C(),se(5,Mx,2,0,"p",2),se(6,Nx,4,2),xe(7,kx,7,4,"article",3,Tx),C()),n&2&&(D(5),ae(r.checking()?5:-1),D(),ae(r.checkError()?6:-1),D(),Te(r.checks()))},styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{margin:8px 0;font-size:19px;letter-spacing:-.4px}p[_ngcontent-%COMP%]{line-height:1.6;font-size:13px}summary[_ngcontent-%COMP%]{cursor:pointer;font-size:13px;padding:8px 0}.checklist[_ngcontent-%COMP%]{padding:24px 40px 32px}.check-item[_ngcontent-%COMP%]{padding:18px;border:1px solid var(--%NS%line);border-radius:10px}.check-item[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:600}.check-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{accent-color:var(--%NS%green)}.check-again[_ngcontent-%COMP%]{margin-top:14px}code[_ngcontent-%COMP%]{display:block;padding:10px;background:#7c918515;border-radius:6px;overflow-wrap:anywhere}a[_ngcontent-%COMP%]{color:inherit}@media(max-width:750px){.checklist[_ngcontent-%COMP%]{padding:20px}}"]})};var Ox=()=>[],Ev=(e,t)=>t.id;function Px(e,t){if(e&1&&(_(0,"option",6),E(1),C()),e&2){let n=t.$implicit,r=R();ue("value",n),D(),j(r.labels[n])}}function Fx(e,t){if(e&1&&(_(0,"option",6),E(1),C()),e&2){let n=t.$implicit;ue("value",n.id),D(),j(n.name)}}function Lx(e,t){e&1&&(_(0,"p",9),E(1,"Estimating context\u2026"),C())}function jx(e,t){if(e&1&&(_(0,"p",10),E(1),C()),e&2){let n=R();D(),j(n.error())}}function Bx(e,t){e&1&&(_(0,"p",11),E(1," User context is excluded because this server was started with user discovery disabled. "),C())}function Vx(e,t){if(e&1&&(_(0,"tr")(1,"th",32)(2,"strong"),E(3),C(),_(4,"small"),E(5),C(),_(6,"small"),E(7),C()(),_(8,"td"),E(9,"Startup"),C(),_(10,"td"),E(11),st(12,"number"),C(),_(13,"td"),E(14),st(15,"number"),C(),_(16,"td"),E(17),st(18,"number"),C()()),e&2){let n=t.$implicit;D(3),j(n.name),D(2),j(n.path),D(2),Xt("",n.scope," \xB7 ",n.kind),D(4),j(Kt(12,7,n.tokens)),D(3),j(Kt(15,9,n.words)),D(3),he("$",$o(18,11,n.inputCost,"1.6-6"))}}function Hx(e,t){if(e&1&&(_(0,"tr")(1,"td",33),E(2),C()()),e&2){let n=R(),r=R();D(2),he(" No startup context discovered for ",r.labels[n.client],". ")}}function $x(e,t){if(e&1&&(se(0,Bx,2,0,"p",11),_(1,"div",12)(2,"div",13),xs(),_(3,"svg",14)(4,"title",15),E(5," Context iceberg: startup above water, on-demand below. "),C(),Se(6,"path",16)(7,"path",17)(8,"path",18)(9,"path",19)(10,"path",20),C()(),Ts(),_(11,"div",21)(12,"article",22)(13,"span",23),E(14,"Above water"),C(),_(15,"h2"),E(16,"Estimated startup context"),C(),_(17,"p"),E(18,"Applicable instructions and skill catalog entries."),C(),_(19,"strong",24),E(20),st(21,"number"),_(22,"span"),E(23,"estimated tokens"),C()(),_(24,"p"),E(25),st(26,"number"),st(27,"number"),C(),_(28,"strong",25),E(29),st(30,"number"),_(31,"span"),E(32,"one-load input cost"),C()()(),_(33,"article",26)(34,"span",23),E(35,"Below water"),C(),_(36,"h2"),E(37,"On-demand context"),C(),_(38,"p"),E(39,"Linked documents, skill bodies and scoped instructions."),C(),_(40,"strong",24),E(41),st(42,"number"),_(43,"span"),E(44,"estimated tokens"),C()(),_(45,"p"),E(46),st(47,"number"),st(48,"number"),C(),_(49,"strong",25),E(50),st(51,"number"),_(52,"span"),E(53,"hypothetical one-load input cost"),C()()()()(),_(54,"details",27)(55,"summary"),E(56,"Estimation method and pricing"),C(),_(57,"p"),E(58),C(),_(59,"p"),E(60," References count as text in their containing file. Their targets are counted separately on demand. Skill catalog estimates use names and descriptions; body estimates exclude frontmatter. Client-generated prompts and remote content are excluded. "),C(),_(61,"p"),E(62),_(63,"a",28),E(64,"Official pricing"),C(),E(65),C()(),_(66,"h2",29),E(67,"Context breakdown"),C(),_(68,"div",30)(69,"table")(70,"caption"),E(71," Startup context only. Largest estimates first. "),C(),_(72,"thead")(73,"tr")(74,"th",31),E(75,"File or skill"),C(),_(76,"th",31),E(77,"Context"),C(),_(78,"th",31),E(79,"Tokens \u2248"),C(),_(80,"th",31),E(81,"Words"),C(),_(82,"th",31),E(83,"Input cost (USD)"),C()()(),_(84,"tbody"),xe(85,Vx,19,14,"tr",null,Ev,!1,Hx,3,1,"tr"),C()()()),e&2){let n=t,r=R();ae(n.includeUser?-1:0),D(20),he("",Kt(21,15,n.startup.tokens)," "),D(5),Xt(" ",Kt(26,17,n.startup.words)," words \xB7 ",Kt(27,19,n.startup.bytes)," bytes "),D(4),he("$",$o(30,21,n.startup.inputCost,"1.6-6")," "),D(12),he("",Kt(42,24,n.onDemand.tokens)," "),D(5),Xt(" ",Kt(47,26,n.onDemand.words)," words \xB7 ",Kt(48,28,n.onDemand.bytes)," bytes "),D(4),he("$",$o(51,30,n.onDemand.inputCost,"1.6-6")," "),D(8),j(n.method),D(4),Xt(" ",n.model.name,": $",n.model.inputPerMillion," / million input tokens. "),D(),ue("href",n.model.source,un),D(2),he(", verified ",n.model.verifiedAt,". Presets are maintained by the application and do not assert availability in every client. "),D(20),Te(r.startupEntries())}}var nc=class e{api=T(Jt);state=T(ft);clients=["codex","claude","cursor","copilot"];labels=mn;client=q("codex");model=q("gpt-5.3-codex");estimate=q(null);startupEntries=et(()=>(this.estimate()?.entries??[]).filter(t=>t.portion==="startup"));loading=q(!1);error=q("");constructor(){Sn(t=>{this.state.data();let n=this.client(),r=this.model(),o=!0;t(()=>{o=!1}),this.loading.set(!0),this.error.set(""),this.api.estimate(n,r).then(i=>{o&&this.estimate.set(i)}).catch(i=>{o&&this.error.set(Qt(i))}).finally(()=>{o&&this.loading.set(!1)})})}selectClient(t){let n=this.clients.find(r=>r===t);n&&this.client.set(n)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["app-token-optimizer"]],decls:17,vars:4,consts:[["agentSelect",""],["modelSelect",""],["aria-label","Token Optimizer",1,"optimizer"],[1,"optimizer-controls"],["for","optimizer-agent"],["id","optimizer-agent",3,"change","value"],[3,"value"],["for","optimizer-model"],["id","optimizer-model",3,"change","value"],["role","status"],["role","alert"],[1,"notice"],[1,"iceberg-panel"],[1,"iceberg-art"],["viewBox","0 0 320 330","role","img","aria-labelledby","iceberg-title"],["id","iceberg-title"],["d","M75 110 132 30 162 58 188 18 249 110Z",1,"ice-tip"],["d","M132 30 145 110 75 110Z M188 18 183 110 249 110Z",1,"ice-face"],["d","M52 118 270 118 247 223 189 310 136 275 88 211Z",1,"ice-base"],["d","M52 118 183 118 189 310 136 275Z",1,"ice-facet"],["d","M10 114H310",1,"waterline"],["aria-live","polite",1,"portions"],[1,"portion","startup"],[1,"eyebrow"],[1,"token-total"],[1,"cost"],[1,"portion","on-demand"],[1,"method"],["target","_blank","rel","noreferrer",3,"href"],[1,"section-title"],[1,"breakdown"],["scope","col"],["scope","row"],["colspan","5"]],template:function(n,r){if(n&1){let o=Me();_(0,"section",2)(1,"div",3)(2,"label",4),E(3,"Agent "),_(4,"select",5,0),me("change",function(){oe(o);let s=Zt(5);return ie(r.selectClient(s.value))}),xe(6,Px,2,2,"option",6,Yt),C()(),_(8,"label",7),E(9,"Model for price estimate "),_(10,"select",8,1),me("change",function(){oe(o);let s=Zt(11);return ie(r.model.set(s.value))}),xe(12,Fx,2,2,"option",6,Ev),C()()(),se(14,Lx,2,0,"p",9)(15,jx,2,1,"p",10)(16,$x,88,33),C()}if(n&2){let o;D(4),ue("value",r.client()),D(2),Te(r.clients),D(4),ue("value",r.model()),D(2),Te(r.estimate()?.models??Ho(3,Ox)),D(2),ae(r.loading()?14:r.error()?15:(o=r.estimate())?16:-1,o)}},dependencies:[Gu],styles:["[_nghost-%COMP%]{display:block}.optimizer[_ngcontent-%COMP%]{padding:24px 40px 32px}.optimizer-controls[_ngcontent-%COMP%]{display:flex;gap:20px;flex-wrap:wrap}.optimizer-controls[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:grid;gap:8px;font-size:13px;font-weight:600}select[_ngcontent-%COMP%]{width:100%;min-width:220px;padding:10px 36px 10px 12px;border:1px solid var(--%NS%line);border-radius:8px;background:transparent;color:inherit}p[_ngcontent-%COMP%]{line-height:1.6;font-size:13px}.method[_ngcontent-%COMP%]{color:var(--%NS%muted);max-width:900px}.iceberg-panel[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(200px,1fr) 2fr;border:1px solid var(--%NS%line);border-radius:14px;overflow:hidden;margin:24px 0 16px;background:linear-gradient(to bottom,#72afb909 0 44%,#368caa12 44% 100%)}.iceberg-art[_ngcontent-%COMP%]{display:grid;align-content:center;padding:24px;text-align:center}svg[_ngcontent-%COMP%]{width:100%;max-height:390px}.ice-tip[_ngcontent-%COMP%]{fill:#d2e8e8}.ice-face[_ngcontent-%COMP%]{fill:#a8d1d7}.ice-base[_ngcontent-%COMP%]{fill:#81b9ca}.ice-facet[_ngcontent-%COMP%]{fill:#619daf}.waterline[_ngcontent-%COMP%]{stroke:#619daf;stroke-width:2;stroke-dasharray:5 5}small[_ngcontent-%COMP%]{font-size:11px;color:var(--%NS%muted)}.portion[_ngcontent-%COMP%]{padding:24px}.startup[_ngcontent-%COMP%]{border-bottom:1px solid var(--%NS%line)}h2[_ngcontent-%COMP%]{margin:8px 0;font-size:19px;letter-spacing:-.4px}.portion[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:8px 0}.token-total[_ngcontent-%COMP%]{font-size:clamp(24px,3vw,38px);font-weight:600}.token-total[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .cost[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;font-weight:400}.cost[_ngcontent-%COMP%]{font-size:18px;font-variant-numeric:tabular-nums}summary[_ngcontent-%COMP%]{cursor:pointer;font-size:13px;padding:8px 0}.section-title[_ngcontent-%COMP%]{margin:32px 0 14px}.breakdown[_ngcontent-%COMP%]{overflow-x:auto;border:1px solid var(--%NS%line);border-radius:10px}table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:12px}caption[_ngcontent-%COMP%]{text-align:left;padding:14px;color:var(--%NS%muted)}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:12px 14px;border-bottom:1px solid var(--%NS%line);text-align:left}thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;color:var(--%NS%muted);white-space:nowrap}tbody[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:400;min-width:190px;max-width:340px;overflow-wrap:anywhere}tbody[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:block;margin-top:4px}td[_ngcontent-%COMP%]{white-space:nowrap;font-variant-numeric:tabular-nums}a[_ngcontent-%COMP%]{color:inherit}@media(max-width:750px){.optimizer[_ngcontent-%COMP%]{padding:20px}.iceberg-panel[_ngcontent-%COMP%]{grid-template-columns:1fr}.iceberg-art[_ngcontent-%COMP%]{display:none}.optimizer-controls[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:100%}}"]})};var Ux=(e,t)=>t.id;function zx(e,t){if(e&1){let n=Me();_(0,"img",15),me("error",function(){let o=oe(n),i=R();return ie(i.failedAvatar.set(o))}),C()}e&2&&ue("src",t,un)}function Gx(e,t){e&1&&Se(0,"img",2)}function Wx(e,t){if(e&1){let n=Me();_(0,"button",16),me("click",function(){let o=oe(n).$implicit,i=R();return ie(i.state.selectTab(o.id))}),_(1,"span",17),E(2),C(),E(3),_(4,"span",18),E(5),C()()}if(e&2){let n=t.$implicit,r=R();it("active",r.state.tab()===n.id),Le("data-tab",n.id)("aria-current",r.state.tab()===n.id?"page":"false"),D(2),j(n.icon),D(),j(n.label),D(),ue("hidden",n.id==="optimizer"||n.id==="checklist")("id","count-"+n.id),D(),j(r.count(n.id))}}var rc=class e{state=T(ft);failedAvatar=q(void 0);avatar=et(()=>{let t=this.state.data()?.agent?.avatar;return t!==this.failedAvatar()?t:void 0});tabs=[{id:"context",label:"Context",icon:"\u2318"},{id:"rules",label:"Rules",icon:"\u25A4"},{id:"skills",label:"Skills",icon:"\u2727"},{id:"mcp",label:"MCP servers",icon:"\u2387"},{id:"optimizer",label:"Token Optimizer",icon:"\u2248"},{id:"checklist",label:"Optimization checklist",icon:"\u2637"}];count(t){if(t==="optimizer"||t==="checklist")return 0;let n=this.state.data();return n?(t==="context"?n.nodes:n[t]).length:0}refresh(){this.state.selection.set(null),this.state.load(!0)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["aside","appSidebar",""]],decls:25,vars:11,consts:[["href","#",1,"brand"],["alt","","width","198","height","198",1,"agent-avatar",3,"src"],["src","/favicon.svg","alt","","width","198","height","198"],[1,"brand-text"],[1,"agent-name",3,"title"],[1,"brand-sub"],[1,"workspace"],[1,"eyebrow"],["id","project-name"],["id","project-path",1,"mono",3,"title"],["aria-label","Views"],[1,"nav-item",3,"active"],[1,"sidebar-rescan"],["id","refresh",1,"small-button",3,"click","disabled"],["id","theme-toggle","type","button",1,"small-button",3,"click","title"],["alt","","width","198","height","198",1,"agent-avatar",3,"error","src"],[1,"nav-item",3,"click"],["aria-hidden","true",1,"nav-icon"],[1,"count",3,"hidden","id"]],template:function(n,r){if(n&1&&(_(0,"a",0),se(1,zx,1,1,"img",1)(2,Gx,1,0,"img",2),_(3,"span",3)(4,"span",4),E(5),C(),_(6,"span",5),E(7,"Agent Visualizer"),C()()(),_(8,"div",6)(9,"span",7),E(10,"Workspace"),C(),_(11,"strong",8),E(12),C(),_(13,"span",9),E(14),C()(),_(15,"nav",10),xe(16,Wx,6,9,"button",11,Ux),C(),_(18,"div",12)(19,"button",13),me("click",function(){return r.refresh()}),E(20," \u21BB "),_(21,"span"),E(22,"Rescan"),C()(),_(23,"button",14),me("click",function(){return r.state.toggleTheme()}),E(24),C()()),n&2){let o;D(),ae((o=r.avatar())?1:2,o),D(3),ue("title",r.state.data()?.agent?.name??"boyscout"),D(),j(r.state.data()?.agent?.name??"boyscout"),D(7),j(r.state.data()?.project?.name??"Loading workspace"),D(),ue("title",r.state.data()?.project?.path??""),D(),j(r.state.data()?.project?.path),D(2),Te(r.tabs),D(3),ue("disabled",r.state.loading()),D(4),ue("title",r.state.theme()==="dark"?"Light mode":"Dark mode"),Le("aria-label",r.state.theme()==="dark"?"Switch to light mode":"Switch to dark mode")("aria-pressed",r.state.theme()==="dark"),D(),he(" ",r.state.theme()==="dark"?"\u2600":"\u263E"," ")}},encapsulation:2})};var qx=()=>[];function Yx(e,t){e&1&&Ye(0,"div",10)}function Zx(e,t){e&1&&Ye(0,"app-token-optimizer")}function Xx(e,t){e&1&&Ye(0,"app-optimization-checklist")}function Kx(e,t){if(e&1){let n=Me();S(0,"section",18),_e("selected",function(o){oe(n);let i=R();return ie(i.select(o))}),M()}if(e&2){let n=R();ce("nodes",n.state.nodes())("edges",n.state.data()?.edges??Ho(2,qx))}}function Qx(e,t){if(e&1&&(S(0,"div",19)(1,"span",22),E(2,"\u2301"),M(),S(3,"strong"),E(4,"Couldn\u2019t load this workspace"),M(),S(5,"p"),E(6),M()()),e&2){let n=R(2);D(6),j(n.state.error())}}function Jx(e,t){e&1&&(S(0,"div",20),E(1,"Mapping your agent\u2019s world\u2026"),M())}function eT(e,t){if(e&1&&(S(0,"div",19)(1,"span",22),E(2,"\u2733"),M(),S(3,"strong"),E(4),M(),S(5,"p"),E(6),M()()),e&2){let n=R(2);D(4),j(n.state.search()||n.state.scope()!=="all"||n.state.client()!=="all"?"No matching assets":"A blank canvas, for now"),D(2),j(n.empty())}}function tT(e,t){if(e&1){let n=Me();S(0,"div",23),_e("selected",function(o){oe(n);let i=R(2);return ie(i.select(o))}),M()}if(e&2){let n=R(2);ce("rows",n.state.rows())("tab",n.state.assetTab())}}function nT(e,t){if(e&1&&(S(0,"section",13),se(1,Qx,7,1,"div",19)(2,Jx,2,0,"div",20)(3,eT,7,2,"div",19)(4,tT,1,2,"div",21),M()),e&2){let n=R();Le("aria-label",n.state.tab()==="context"?"Context graph":n.state.tab()==="mcp"?"MCP servers list":n.state.tab()==="rules"?"Rules list":"Skills list"),D(),ae(n.state.error()?1:n.state.data()?n.state.rows().length?4:3:2)}}var oc=class e{state=T(ft);titles=ig;constructor(){this.state.load()}select(t){this.state.selection.set({tab:this.state.assetTab(),row:t})}key(t){t.key==="Escape"&&this.state.selection.set(null),t.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName??"")&&(t.preventDefault(),document.getElementById("search")?.focus())}updated(){let t=this.state.data();return t?"Scanned "+new Date(t.scannedAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}empty(){if(this.state.search()||this.state.scope()!=="all"||this.state.client()!=="all")return"Try another scope, client, or search.";switch(this.state.tab()){case"checklist":return"No optimization checks available.";case"optimizer":return"No local context discovered for this agent.";case"context":return"Context appears here when your folder contains AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, or linked knowledge files.";case"rules":return"Add .cursor/rules, .claude/rules, .github/instructions, or a legacy .cursorrules file to see rules here. General instructions stay in Context.";case"skills":return"Add a SKILL.md in an agent skills folder to see it here.";case"mcp":return"No MCP servers found in the supported configuration files."}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=be({type:e,selectors:[["app-root"]],hostBindings:function(n,r){n&1&&_e("keydown",function(i){return r.key(i)},ru)},decls:28,vars:14,consts:[[1,"app"],["appSidebar","",1,"sidebar"],[1,"page-heading"],["src","/mountain-context.jpg","alt","","aria-hidden","true",1,"page-heading-image"],[1,"page-heading-copy"],["id","page-title"],["id","page-description"],["id","view-switch",1,"view-switch",3,"hidden"],["id","graph-view",3,"click"],["id","list-view",3,"click"],["appFilters","",1,"toolbar"],["id","notice",1,"notice",3,"hidden"],["appGraph","","id","canvas","aria-label","Context graph",1,"graph-canvas",3,"nodes","edges"],["id","canvas"],[1,"main-footer"],["id","summary","aria-live","polite"],["id","updated"],["appDetail","","id","detail","aria-label","Asset details",1,"detail",3,"hidden"],["appGraph","","id","canvas","aria-label","Context graph",1,"graph-canvas",3,"selected","nodes","edges"],[1,"empty"],[1,"loading"],["appAssetTable","",1,"table-wrap",3,"rows","tab"],[1,"empty-mark"],["appAssetTable","",1,"table-wrap",3,"selected","rows","tab"]],template:function(n,r){n&1&&(S(0,"div",0),Ye(1,"aside",1),S(2,"main")(3,"section",2),Ye(4,"img",3),S(5,"div",4)(6,"h1",5),E(7),M(),S(8,"p",6),E(9),M()(),S(10,"div",7)(11,"button",8),_e("click",function(){return r.state.view.set("graph")}),E(12," \u2318 Graph"),M(),S(13,"button",9),_e("click",function(){return r.state.view.set("list")}),E(14," \u2637 Files "),M()()(),se(15,Yx,1,0,"div",10),S(16,"div",11),E(17),M(),se(18,Zx,1,0,"app-token-optimizer")(19,Xx,1,0,"app-optimization-checklist")(20,Kx,1,3,"section",12)(21,nT,5,2,"section",13),S(22,"footer",14)(23,"span",15),E(24),M(),S(25,"span",16),E(26),M()()(),Ye(27,"aside",17),M()),n&2&&(D(7),j(r.titles[r.state.tab()][0]),D(2),j(r.titles[r.state.tab()][1]),D(),ce("hidden",r.state.tab()!=="context"),D(),it("selected",r.state.view()==="graph"),D(2),it("selected",r.state.view()==="list"),D(2),ae(r.state.tab()!=="optimizer"&&r.state.tab()!=="checklist"?15:-1),D(),ce("hidden",!r.state.data()?.warnings?.length),D(),he(" ",r.state.data()?.warnings?.join(" ")," "),D(),ae(r.state.tab()==="optimizer"?18:r.state.tab()==="checklist"?19:!r.state.error()&&r.state.data()&&r.state.rows().length&&r.state.tab()==="context"&&r.state.view()==="graph"?20:21),D(6),j(r.state.summary()),D(2),j(r.updated()),D(),ce("hidden",!r.state.selection()))},dependencies:[rc,xa,Ca,Ia,ec,nc,tc],encapsulation:2})};Ju(oc,{providers:[wl(),Hu()]}).catch(console.error);
|