diff --git a/src/server/package/src/model_explorer/web_app/index.html b/src/server/package/src/model_explorer/web_app/index.html index a85b97aa..5025de24 100644 --- a/src/server/package/src/model_explorer/web_app/index.html +++ b/src/server/package/src/model_explorer/web_app/index.html @@ -31,5 +31,5 @@ - + diff --git a/src/server/package/src/model_explorer/web_app/main-KZEBCV2Z.js b/src/server/package/src/model_explorer/web_app/main-BG4WAIEB.js similarity index 85% rename from src/server/package/src/model_explorer/web_app/main-KZEBCV2Z.js rename to src/server/package/src/model_explorer/web_app/main-BG4WAIEB.js index 59bc462e..b4dd220c 100644 --- a/src/server/package/src/model_explorer/web_app/main-KZEBCV2Z.js +++ b/src/server/package/src/model_explorer/web_app/main-BG4WAIEB.js @@ -1,16 +1,16 @@ -var vR=Object.defineProperty,U5=Object.defineProperties;var H5=Object.getOwnPropertyDescriptors;var ov=Object.getOwnPropertySymbols;var bR=Object.prototype.hasOwnProperty,yR=Object.prototype.propertyIsEnumerable;var _R=(i,e,t)=>e in i?vR(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Z=(i,e)=>{for(var t in e||={})bR.call(e,t)&&_R(i,t,e[t]);if(ov)for(var t of ov(e))yR.call(e,t)&&_R(i,t,e[t]);return i},wt=(i,e)=>U5(i,H5(e));var sS=(i,e)=>{var t={};for(var n in i)bR.call(i,n)&&e.indexOf(n)<0&&(t[n]=i[n]);if(i!=null&&ov)for(var n of ov(i))e.indexOf(n)<0&&yR.call(i,n)&&(t[n]=i[n]);return t};var aS=(i,e)=>{for(var t in e)vR(i,t,{get:e[t],enumerable:!0})};var At=(i,e,t)=>new Promise((n,r)=>{var o=l=>{try{a(t.next(l))}catch(c){r(c)}},s=l=>{try{a(t.throw(l))}catch(c){r(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,s);a((t=t.apply(i,e)).next())});function xR(i,e){return Object.is(i,e)}var Ri=null,_f=!1,sv=1,Eo=Symbol("SIGNAL");function sn(i){let e=Ri;return Ri=i,e}function wR(){return Ri}function G5(){return _f}var Su={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function uS(i){if(_f)throw new Error("");if(Ri===null)return;Ri.consumerOnSignalRead(i);let e=Ri.nextProducerIndex++;if(hv(Ri),ei.nextProducerIndex;)i.producerNode.pop(),i.producerLastReadVersion.pop(),i.producerIndexOfThis.pop()}}function cv(i){hv(i);for(let e=0;e0}function hv(i){i.producerNode??=[],i.producerIndexOfThis??=[],i.producerLastReadVersion??=[]}function TR(i){i.liveConsumerNode??=[],i.liveConsumerIndexOfThis??=[]}function DR(i){return i.producerNode!==void 0}function hS(i){let e=Object.create(W5);e.computation=i;let t=()=>{if(CR(e),uS(e),e.value===av)throw e.error;return e.value};return t[Eo]=e,t}var lS=Symbol("UNSET"),cS=Symbol("COMPUTING"),av=Symbol("ERRORED"),W5=wt(Z({},Su),{value:lS,dirty:!0,error:null,equal:xR,producerMustRecompute(i){return i.value===lS||i.value===cS},producerRecomputeValue(i){if(i.value===cS)throw new Error("Detected cycle in computations.");let e=i.value;i.value=cS;let t=bf(i),n;try{n=i.computation()}catch(r){n=av,i.error=r}finally{lv(i,t)}if(e!==lS&&e!==av&&n!==av&&i.equal(e,n)){i.value=e;return}i.value=n,i.version++}});function $5(){throw new Error}var PR=$5;function OR(){PR()}function RR(i){PR=i}var q5=null;function AR(i){let e=Object.create(kR);e.value=i;let t=()=>(uS(e),e.value);return t[Eo]=e,t}function pS(i,e){MR()||OR(),i.equal(i.value,e)||(i.value=e,Y5(i))}function NR(i,e){MR()||OR(),pS(i,e(i.value))}var kR=wt(Z({},Su),{equal:xR,value:void 0});function Y5(i){i.version++,j5(),SR(i),q5?.()}function LR(i,e,t){let n=Object.create(X5);t&&(n.consumerAllowSignalWrites=!0),n.fn=i,n.schedule=e;let r=l=>{n.cleanupFn=l};function o(l){return l.fn===null&&l.schedule===null}function s(l){o(l)||(dv(l),l.cleanupFn(),l.fn=null,l.schedule=null,l.cleanupFn=dS)}let a=()=>{if(n.fn===null)return;if(G5())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(n.dirty=!1,n.hasRun&&!cv(n))return;n.hasRun=!0;let l=bf(n);try{n.cleanupFn(),n.cleanupFn=dS,n.fn(r)}finally{lv(n,l)}};return n.ref={notify:()=>ER(n),run:a,cleanup:()=>n.cleanupFn(),destroy:()=>s(n),[Eo]:n},n.ref}var dS=()=>{},X5=wt(Z({},Su),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:i=>{i.schedule!==null&&i.schedule(i.ref)},hasRun:!1,cleanupFn:dS});function St(i){return typeof i=="function"}function Mu(i){let t=i(n=>{Error.call(n),n.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var pv=Mu(i=>function(t){i(this),this.message=t?`${t.length} errors occurred during unsubscription: +var _R=Object.defineProperty,U5=Object.defineProperties;var H5=Object.getOwnPropertyDescriptors;var sv=Object.getOwnPropertySymbols;var vR=Object.prototype.hasOwnProperty,bR=Object.prototype.propertyIsEnumerable;var gR=(i,e,t)=>e in i?_R(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Z=(i,e)=>{for(var t in e||={})vR.call(e,t)&&gR(i,t,e[t]);if(sv)for(var t of sv(e))bR.call(e,t)&&gR(i,t,e[t]);return i},wt=(i,e)=>U5(i,H5(e));var sS=(i,e)=>{var t={};for(var n in i)vR.call(i,n)&&e.indexOf(n)<0&&(t[n]=i[n]);if(i!=null&&sv)for(var n of sv(i))e.indexOf(n)<0&&bR.call(i,n)&&(t[n]=i[n]);return t};var aS=(i,e)=>{for(var t in e)_R(i,t,{get:e[t],enumerable:!0})};var At=(i,e,t)=>new Promise((n,r)=>{var o=l=>{try{a(t.next(l))}catch(c){r(c)}},s=l=>{try{a(t.throw(l))}catch(c){r(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,s);a((t=t.apply(i,e)).next())});function yR(i,e){return Object.is(i,e)}var Ri=null,_f=!1,av=1,Eo=Symbol("SIGNAL");function sn(i){let e=Ri;return Ri=i,e}function xR(){return Ri}function G5(){return _f}var Su={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function uS(i){if(_f)throw new Error("");if(Ri===null)return;Ri.consumerOnSignalRead(i);let e=Ri.nextProducerIndex++;if(pv(Ri),ei.nextProducerIndex;)i.producerNode.pop(),i.producerLastReadVersion.pop(),i.producerIndexOfThis.pop()}}function dv(i){pv(i);for(let e=0;e0}function pv(i){i.producerNode??=[],i.producerIndexOfThis??=[],i.producerLastReadVersion??=[]}function IR(i){i.liveConsumerNode??=[],i.liveConsumerIndexOfThis??=[]}function TR(i){return i.producerNode!==void 0}function hS(i){let e=Object.create(W5);e.computation=i;let t=()=>{if(wR(e),uS(e),e.value===lv)throw e.error;return e.value};return t[Eo]=e,t}var lS=Symbol("UNSET"),cS=Symbol("COMPUTING"),lv=Symbol("ERRORED"),W5=wt(Z({},Su),{value:lS,dirty:!0,error:null,equal:yR,producerMustRecompute(i){return i.value===lS||i.value===cS},producerRecomputeValue(i){if(i.value===cS)throw new Error("Detected cycle in computations.");let e=i.value;i.value=cS;let t=bf(i),n;try{n=i.computation()}catch(r){n=lv,i.error=r}finally{cv(i,t)}if(e!==lS&&e!==lv&&n!==lv&&i.equal(e,n)){i.value=e;return}i.value=n,i.version++}});function $5(){throw new Error}var DR=$5;function PR(){DR()}function OR(i){DR=i}var q5=null;function RR(i){let e=Object.create(NR);e.value=i;let t=()=>(uS(e),e.value);return t[Eo]=e,t}function pS(i,e){SR()||PR(),i.equal(i.value,e)||(i.value=e,Y5(i))}function AR(i,e){SR()||PR(),pS(i,e(i.value))}var NR=wt(Z({},Su),{equal:yR,value:void 0});function Y5(i){i.version++,j5(),CR(i),q5?.()}function kR(i,e,t){let n=Object.create(X5);t&&(n.consumerAllowSignalWrites=!0),n.fn=i,n.schedule=e;let r=l=>{n.cleanupFn=l};function o(l){return l.fn===null&&l.schedule===null}function s(l){o(l)||(uv(l),l.cleanupFn(),l.fn=null,l.schedule=null,l.cleanupFn=dS)}let a=()=>{if(n.fn===null)return;if(G5())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(n.dirty=!1,n.hasRun&&!dv(n))return;n.hasRun=!0;let l=bf(n);try{n.cleanupFn(),n.cleanupFn=dS,n.fn(r)}finally{cv(n,l)}};return n.ref={notify:()=>MR(n),run:a,cleanup:()=>n.cleanupFn(),destroy:()=>s(n),[Eo]:n},n.ref}var dS=()=>{},X5=wt(Z({},Su),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:i=>{i.schedule!==null&&i.schedule(i.ref)},hasRun:!1,cleanupFn:dS});function St(i){return typeof i=="function"}function Mu(i){let t=i(n=>{Error.call(n),n.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var fv=Mu(i=>function(t){i(this),this.message=t?`${t.length} errors occurred during unsubscription: ${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(` - `)}`:"",this.name="UnsubscriptionError",this.errors=t});function Tc(i,e){if(i){let t=i.indexOf(e);0<=t&&i.splice(t,1)}}var Ct=class i{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(let o of t)o.remove(this);else t.remove(this);let{initialTeardown:n}=this;if(St(n))try{n()}catch(o){e=o instanceof pv?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{FR(o)}catch(s){e=e??[],s instanceof pv?e=[...e,...s.errors]:e.push(s)}}if(e)throw new pv(e)}}add(e){var t;if(e&&e!==this)if(this.closed)FR(e);else{if(e instanceof i){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}}_hasParent(e){let{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){let{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&Tc(t,e)}remove(e){let{_finalizers:t}=this;t&&Tc(t,e),e instanceof i&&e._removeParent(this)}};Ct.EMPTY=(()=>{let i=new Ct;return i.closed=!0,i})();var fS=Ct.EMPTY;function fv(i){return i instanceof Ct||i&&"closed"in i&&St(i.remove)&&St(i.add)&&St(i.unsubscribe)}function FR(i){St(i)?i():i.unsubscribe()}var ss={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Eu={setTimeout(i,e,...t){let{delegate:n}=Eu;return n?.setTimeout?n.setTimeout(i,e,...t):setTimeout(i,e,...t)},clearTimeout(i){let{delegate:e}=Eu;return(e?.clearTimeout||clearTimeout)(i)},delegate:void 0};function mv(i){Eu.setTimeout(()=>{let{onUnhandledError:e}=ss;if(e)e(i);else throw i})}function Dc(){}var BR=mS("C",void 0,void 0);function VR(i){return mS("E",void 0,i)}function zR(i){return mS("N",i,void 0)}function mS(i,e,t){return{kind:i,value:e,error:t}}var Pc=null;function Iu(i){if(ss.useDeprecatedSynchronousErrorHandling){let e=!Pc;if(e&&(Pc={errorThrown:!1,error:null}),i(),e){let{errorThrown:t,error:n}=Pc;if(Pc=null,t)throw n}}else i()}function UR(i){ss.useDeprecatedSynchronousErrorHandling&&Pc&&(Pc.errorThrown=!0,Pc.error=i)}var Oc=class extends Ct{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,fv(e)&&e.add(this)):this.destination=K5}static create(e,t,n){return new fa(e,t,n)}next(e){this.isStopped?_S(zR(e),this):this._next(e)}error(e){this.isStopped?_S(VR(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?_S(BR,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},Z5=Function.prototype.bind;function gS(i,e){return Z5.call(i,e)}var vS=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){gv(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){gv(n)}else gv(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){gv(t)}}},fa=class extends Oc{constructor(e,t,n){super();let r;if(St(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let o;this&&ss.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&gS(e.next,o),error:e.error&&gS(e.error,o),complete:e.complete&&gS(e.complete,o)}):r=e}this.destination=new vS(r)}};function gv(i){ss.useDeprecatedSynchronousErrorHandling?UR(i):mv(i)}function Q5(i){throw i}function _S(i,e){let{onStoppedNotification:t}=ss;t&&Eu.setTimeout(()=>t(i,e))}var K5={closed:!0,next:Dc,error:Q5,complete:Dc};var Tu=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Er(i){return i}function bS(...i){return yS(i)}function yS(i){return i.length===0?Er:i.length===1?i[0]:function(t){return i.reduce((n,r)=>r(n),t)}}var Mt=(()=>{class i{constructor(t){t&&(this._subscribe=t)}lift(t){let n=new i;return n.source=this,n.operator=t,n}subscribe(t,n,r){let o=e8(t)?t:new fa(t,n,r);return Iu(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return n=HR(n),new n((r,o)=>{let s=new fa({next:a=>{try{t(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)}[Tu](){return this}pipe(...t){return yS(t)(this)}toPromise(t){return t=HR(t),new t((n,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>n(o))})}}return i.create=e=>new i(e),i})();function HR(i){var e;return(e=i??ss.Promise)!==null&&e!==void 0?e:Promise}function J5(i){return i&&St(i.next)&&St(i.error)&&St(i.complete)}function e8(i){return i&&i instanceof Oc||J5(i)&&fv(i)}function xS(i){return St(i?.lift)}function Lt(i){return e=>{if(xS(e))return e.lift(function(t){try{return i(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Nt(i,e,t,n,r){return new wS(i,e,t,n,r)}var wS=class extends Oc{constructor(e,t,n,r,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=t?function(a){try{t(a)}catch(l){e.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function Du(){return Lt((i,e)=>{let t=null;i._refCount++;let n=Nt(e,void 0,void 0,void 0,()=>{if(!i||i._refCount<=0||0<--i._refCount){t=null;return}let r=i._connection,o=t;t=null,r&&(!o||r===o)&&r.unsubscribe(),e.unsubscribe()});i.subscribe(n),n.closed||(t=i.connect())})}var hl=class extends Mt{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,xS(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new Ct;let t=this.getSubject();e.add(this.source.subscribe(Nt(t,void 0,()=>{this._teardown(),t.complete()},n=>{this._teardown(),t.error(n)},()=>this._teardown()))),e.closed&&(this._connection=null,e=Ct.EMPTY)}return e}refCount(){return Du()(this)}};var Pu={schedule(i){let e=requestAnimationFrame,t=cancelAnimationFrame,{delegate:n}=Pu;n&&(e=n.requestAnimationFrame,t=n.cancelAnimationFrame);let r=e(o=>{t=void 0,i(o)});return new Ct(()=>t?.(r))},requestAnimationFrame(...i){let{delegate:e}=Pu;return(e?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){let{delegate:e}=Pu;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0};var GR=Mu(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var me=(()=>{class i extends Mt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new _v(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new GR}next(t){Iu(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){Iu(()=>{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(){Iu(()=>{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?fS:(this.currentObservers=null,o.push(t),new Ct(()=>{this.currentObservers=null,Tc(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new Mt;return t.source=this,t}}return i.create=(e,t)=>new _v(e,t),i})(),_v=class extends me{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:fS}};var Dn=class extends me{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};var yf={now(){return(yf.delegate||Date).now()},delegate:void 0};var ma=class extends me{constructor(e=1/0,t=1/0,n=yf){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){let{isStopped:t,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;t||(n.push(e),!r&&n.push(o.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:r}=this,o=r.slice();for(let s=0;sjR(e)&&i()),e},clearImmediate(i){jR(i)}};var{setImmediate:n8,clearImmediate:i8}=WR,wf={setImmediate(...i){let{delegate:e}=wf;return(e?.setImmediate||n8)(...i)},clearImmediate(i){let{delegate:e}=wf;return(e?.clearImmediate||i8)(i)},delegate:void 0};var bv=class extends pl{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return n!==null&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e._scheduled||(e._scheduled=wf.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,t,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,t,n);let{actions:o}=e;t!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==t&&(wf.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))}};var Ou=class i{constructor(e,t=i.now){this.schedulerActionCtor=e,this.now=t}schedule(e,t=0,n){return new this.schedulerActionCtor(this,e).schedule(n,t)}};Ou.now=yf.now;var fl=class extends Ou{constructor(e,t=Ou.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}};var yv=class extends fl{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}}};var Cf=new yv(bv);var ga=new fl(pl),$R=ga;var xv=class extends pl{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return n!==null&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e._scheduled||(e._scheduled=Pu.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,t,n);let{actions:o}=e;t!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==t&&(Pu.cancelAnimationFrame(t),e._scheduled=void 0)}};var wv=class extends fl{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}}};var Cv=new wv(xv);var Ir=new Mt(i=>i.complete());function Sv(i){return i&&St(i.schedule)}function MS(i){return i[i.length-1]}function Mv(i){return St(MS(i))?i.pop():void 0}function Is(i){return Sv(MS(i))?i.pop():void 0}function qR(i,e){return typeof MS(i)=="number"?i.pop():e}function XR(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})}function YR(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],n=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&n>=i.length&&(i=void 0),{value:i&&i[n++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Rc(i){return this instanceof Rc?(this.v=i,this):new Rc(i)}function ZR(i,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(i,e||[]),r,o=[];return r={},a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(p){return function(f){return Promise.resolve(f).then(p,u)}}function a(p,f){n[p]&&(r[p]=function(m){return new Promise(function(b,g){o.push([p,m,b,g])>1||l(p,m)})},f&&(r[p]=f(r[p])))}function l(p,f){try{c(n[p](f))}catch(m){h(o[0][3],m)}}function c(p){p.value instanceof Rc?Promise.resolve(p.value.v).then(d,u):h(o[0][2],p)}function d(p){l("next",p)}function u(p){l("throw",p)}function h(p,f){p(f),o.shift(),o.length&&l(o[0][0],o[0][1])}}function QR(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof YR=="function"?YR(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var Ru=i=>i&&typeof i.length=="number"&&typeof i!="function";function Ev(i){return St(i?.then)}function Iv(i){return St(i[Tu])}function Tv(i){return Symbol.asyncIterator&&St(i?.[Symbol.asyncIterator])}function Dv(i){return new TypeError(`You provided ${i!==null&&typeof i=="object"?"an invalid object":`'${i}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function r8(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Pv=r8();function Ov(i){return St(i?.[Pv])}function Rv(i){return ZR(this,arguments,function*(){let t=i.getReader();try{for(;;){let{value:n,done:r}=yield Rc(t.read());if(r)return yield Rc(void 0);yield yield Rc(n)}}finally{t.releaseLock()}})}function Av(i){return St(i?.getReader)}function wn(i){if(i instanceof Mt)return i;if(i!=null){if(Iv(i))return o8(i);if(Ru(i))return s8(i);if(Ev(i))return a8(i);if(Tv(i))return KR(i);if(Ov(i))return l8(i);if(Av(i))return c8(i)}throw Dv(i)}function o8(i){return new Mt(e=>{let t=i[Tu]();if(St(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function s8(i){return new Mt(e=>{for(let t=0;t{i.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,mv)})}function l8(i){return new Mt(e=>{for(let t of i)if(e.next(t),e.closed)return;e.complete()})}function KR(i){return new Mt(e=>{d8(i,e).catch(t=>e.error(t))})}function c8(i){return KR(Rv(i))}function d8(i,e){var t,n,r,o;return XR(this,void 0,void 0,function*(){try{for(t=QR(i);n=yield t.next(),!n.done;){let s=n.value;if(e.next(s),e.closed)return}}catch(s){r={error:s}}finally{try{n&&!n.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}e.complete()})}function $r(i,e,t,n=0,r=!1){let o=e.schedule(function(){t(),r?i.add(this.schedule(null,n)):this.unsubscribe()},n);if(i.add(o),!r)return o}function Nv(i,e=0){return Lt((t,n)=>{t.subscribe(Nt(n,r=>$r(n,i,()=>n.next(r),e),()=>$r(n,i,()=>n.complete(),e),r=>$r(n,i,()=>n.error(r),e)))})}function kv(i,e=0){return Lt((t,n)=>{n.add(i.schedule(()=>t.subscribe(n),e))})}function JR(i,e){return wn(i).pipe(kv(e),Nv(e))}function eA(i,e){return wn(i).pipe(kv(e),Nv(e))}function tA(i,e){return new Mt(t=>{let n=0;return e.schedule(function(){n===i.length?t.complete():(t.next(i[n++]),t.closed||this.schedule())})})}function nA(i,e){return new Mt(t=>{let n;return $r(t,e,()=>{n=i[Pv](),$r(t,e,()=>{let r,o;try{({value:r,done:o}=n.next())}catch(s){t.error(s);return}o?t.complete():t.next(r)},0,!0)}),()=>St(n?.return)&&n.return()})}function Lv(i,e){if(!i)throw new Error("Iterable cannot be null");return new Mt(t=>{$r(t,e,()=>{let n=i[Symbol.asyncIterator]();$r(t,e,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function iA(i,e){return Lv(Rv(i),e)}function rA(i,e){if(i!=null){if(Iv(i))return JR(i,e);if(Ru(i))return tA(i,e);if(Ev(i))return eA(i,e);if(Tv(i))return Lv(i,e);if(Ov(i))return nA(i,e);if(Av(i))return iA(i,e)}throw Dv(i)}function Kn(i,e){return e?rA(i,e):wn(i)}function Ke(...i){let e=Is(i);return Kn(i,e)}function ml(i,e){let t=St(i)?i:()=>i,n=r=>r.error(t());return new Mt(e?r=>e.schedule(n,0,r):n)}function Ac(i){return!!i&&(i instanceof Mt||St(i.lift)&&St(i.subscribe))}var _a=Mu(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"});function oA(i){return i instanceof Date&&!isNaN(i)}function Je(i,e){return Lt((t,n)=>{let r=0;t.subscribe(Nt(n,o=>{n.next(i.call(e,o,r++))}))})}var{isArray:u8}=Array;function h8(i,e){return u8(e)?i(...e):i(e)}function Au(i){return Je(e=>h8(i,e))}var{isArray:p8}=Array,{getPrototypeOf:f8,prototype:m8,keys:g8}=Object;function Fv(i){if(i.length===1){let e=i[0];if(p8(e))return{args:e,keys:null};if(_8(e)){let t=g8(e);return{args:t.map(n=>e[n]),keys:t}}}return{args:i,keys:null}}function _8(i){return i&&typeof i=="object"&&f8(i)===m8}function Bv(i,e){return i.reduce((t,n,r)=>(t[n]=e[r],t),{})}function qr(...i){let e=Is(i),t=Mv(i),{args:n,keys:r}=Fv(i);if(n.length===0)return Kn([],e);let o=new Mt(v8(n,e,r?s=>Bv(r,s):Er));return t?o.pipe(Au(t)):o}function v8(i,e,t=Er){return n=>{sA(e,()=>{let{length:r}=i,o=new Array(r),s=r,a=r;for(let l=0;l{let c=Kn(i[l],e),d=!1;c.subscribe(Nt(n,u=>{o[l]=u,d||(d=!0,a--),a||n.next(t(o.slice()))},()=>{--s||n.complete()}))},n)},n)}}function sA(i,e,t){i?$r(t,i,e):e()}function aA(i,e,t,n,r,o,s,a){let l=[],c=0,d=0,u=!1,h=()=>{u&&!l.length&&!c&&e.complete()},p=m=>c{o&&e.next(m),c++;let b=!1;wn(t(m,d++)).subscribe(Nt(e,g=>{r?.(g),o?p(g):e.next(g)},()=>{b=!0},void 0,()=>{if(b)try{for(c--;l.length&&cf(g)):f(g)}h()}catch(g){e.error(g)}}))};return i.subscribe(Nt(e,p,()=>{u=!0,h()})),()=>{a?.()}}function ei(i,e,t=1/0){return St(e)?ei((n,r)=>Je((o,s)=>e(n,o,r,s))(wn(i(n,r))),t):(typeof e=="number"&&(t=e),Lt((n,r)=>aA(n,r,i,t)))}function Sf(i=1/0){return ei(Er,i)}function lA(){return Sf(1)}function Ts(...i){return lA()(Kn(i,Is(i)))}function Io(i){return new Mt(e=>{wn(i()).subscribe(e)})}function Mf(...i){let e=Mv(i),{args:t,keys:n}=Fv(i),r=new Mt(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let d=0;d{u||(u=!0,c--),a[d]=h},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(n?Bv(n,a):a),o.complete())}))}});return e?r.pipe(Au(e)):r}var b8=["addListener","removeListener"],y8=["addEventListener","removeEventListener"],x8=["on","off"];function yn(i,e,t,n){if(St(t)&&(n=t,t=void 0),n)return yn(i,e,t).pipe(Au(n));let[r,o]=S8(i)?y8.map(s=>a=>i[s](e,a,t)):w8(i)?b8.map(cA(i,e)):C8(i)?x8.map(cA(i,e)):[];if(!r&&Ru(i))return ei(s=>yn(s,e,t))(wn(i));if(!r)throw new TypeError("Invalid event target");return new Mt(s=>{let a=(...l)=>s.next(1o(a)})}function cA(i,e){return t=>n=>i[t](e,n)}function w8(i){return St(i.addListener)&&St(i.removeListener)}function C8(i){return St(i.on)&&St(i.off)}function S8(i){return St(i.addEventListener)&&St(i.removeEventListener)}function Nu(i=0,e,t=$R){let n=-1;return e!=null&&(Sv(e)?t=e:n=e),new Mt(r=>{let o=oA(i)?+i-t.now():i;o<0&&(o=0);let s=0;return t.schedule(function(){r.closed||(r.next(s++),0<=n?this.schedule(void 0,n):r.complete())},o)})}function ES(i=0,e=ga){return i<0&&(i=0),Nu(i,i,e)}function Yn(...i){let e=Is(i),t=qR(i,1/0),n=i;return n.length?n.length===1?wn(n[0]):Sf(t)(Kn(n,e)):Ir}function Gt(i,e){return Lt((t,n)=>{let r=0;t.subscribe(Nt(n,o=>i.call(e,o,r++)&&n.next(o)))})}function Ef(i){return Lt((e,t)=>{let n=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,n){n=!1;let c=r;r=null,t.next(c)}s&&t.complete()},l=()=>{o=null,s&&t.complete()};e.subscribe(Nt(t,c=>{n=!0,r=c,o||wn(i(c)).subscribe(o=Nt(t,a,l))},()=>{s=!0,(!n||!o||o.closed)&&t.complete()}))})}function Vv(i,e=ga){return Ef(()=>Nu(i,e))}function Ds(i){return Lt((e,t)=>{let n=null,r=!1,o;n=e.subscribe(Nt(t,void 0,void 0,s=>{o=wn(i(s,Ds(i)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(t))})}function dA(i,e,t,n,r){return(o,s)=>{let a=t,l=e,c=0;o.subscribe(Nt(s,d=>{let u=c++;l=a?i(l,d,u):(a=!0,d),n&&s.next(l)},r&&(()=>{a&&s.next(l),s.complete()})))}}function gl(i,e){return St(e)?ei(i,e,1):ei(i,1)}function To(i,e=ga){return Lt((t,n)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let c=o;o=null,n.next(c)}};function l(){let c=s+i,d=e.now();if(d{o=c,s=e.now(),r||(r=e.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{o=r=null}))})}function _l(i){return Lt((e,t)=>{let n=!1;e.subscribe(Nt(t,r=>{n=!0,t.next(r)},()=>{n||t.next(i),t.complete()}))})}function _n(i){return i<=0?()=>Ir:Lt((e,t)=>{let n=0;e.subscribe(Nt(t,r=>{++n<=i&&(t.next(r),i<=n&&t.complete())}))})}function uA(){return Lt((i,e)=>{i.subscribe(Nt(e,Dc))})}function If(i){return Je(()=>i)}function IS(i,e){return e?t=>Ts(e.pipe(_n(1),uA()),t.pipe(IS(i))):ei((t,n)=>wn(i(t,n)).pipe(_n(1),If(t)))}function ku(i,e=ga){let t=Nu(i,e);return IS(()=>t)}function vl(i,e=Er){return i=i??M8,Lt((t,n)=>{let r,o=!0;t.subscribe(Nt(n,s=>{let a=e(s);(o||!i(r,a))&&(o=!1,r=a,n.next(s))}))})}function M8(i,e){return i===e}function zv(i=E8){return Lt((e,t)=>{let n=!1;e.subscribe(Nt(t,r=>{n=!0,t.next(r)},()=>n?t.complete():t.error(i())))})}function E8(){return new _a}function bl(i){return Lt((e,t)=>{try{e.subscribe(t)}finally{t.add(i)}})}function Ps(i,e){let t=arguments.length>=2;return n=>n.pipe(i?Gt((r,o)=>i(r,o,n)):Er,_n(1),t?_l(e):zv(()=>new _a))}function Lu(i){return i<=0?()=>Ir:Lt((e,t)=>{let n=[];e.subscribe(Nt(t,r=>{n.push(r),i{for(let r of n)t.next(r);t.complete()},void 0,()=>{n=null}))})}function TS(i,e){let t=arguments.length>=2;return n=>n.pipe(i?Gt((r,o)=>i(r,o,n)):Er,Lu(1),t?_l(e):zv(()=>new _a))}function DS(i,e){return Lt(dA(i,e,arguments.length>=2,!0))}function Tf(i={}){let{connector:e=()=>new me,resetOnError:t=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return o=>{let s,a,l,c=0,d=!1,u=!1,h=()=>{a?.unsubscribe(),a=void 0},p=()=>{h(),s=l=void 0,d=u=!1},f=()=>{let m=s;p(),m?.unsubscribe()};return Lt((m,b)=>{c++,!u&&!d&&h();let g=l=l??e();b.add(()=>{c--,c===0&&!u&&!d&&(a=PS(f,r))}),g.subscribe(b),!s&&c>0&&(s=new fa({next:_=>g.next(_),error:_=>{u=!0,h(),a=PS(p,t,_),g.error(_)},complete:()=>{d=!0,h(),a=PS(p,n),g.complete()}}),wn(m).subscribe(s))})(o)}}function PS(i,e,...t){if(e===!0){i();return}if(e===!1)return;let n=new fa({next:()=>{n.unsubscribe(),i()}});return wn(e(...t)).subscribe(n)}function Uv(i,e,t){let n,r=!1;return i&&typeof i=="object"?{bufferSize:n=1/0,windowTime:e=1/0,refCount:r=!1,scheduler:t}=i:n=i??1/0,Tf({connector:()=>new ma(n,e,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function Df(i){return Gt((e,t)=>i<=t)}function pi(...i){let e=Is(i);return Lt((t,n)=>{(e?Ts(i,t,e):Ts(i,t)).subscribe(n)})}function Xn(i,e){return Lt((t,n)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&n.complete();t.subscribe(Nt(n,l=>{r?.unsubscribe();let c=0,d=o++;wn(i(l,d)).subscribe(r=Nt(n,u=>n.next(e?e(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Xe(i){return Lt((e,t)=>{wn(i).subscribe(Nt(t,()=>t.complete(),Dc)),!t.closed&&e.subscribe(t)})}function OS(i,e=!1){return Lt((t,n)=>{let r=0;t.subscribe(Nt(n,o=>{let s=i(o,r++);(s||e)&&n.next(o),!s&&n.complete()}))})}function Sn(i,e,t){let n=St(i)||e||t?{next:i,error:e,complete:t}:i;return n?Lt((r,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;r.subscribe(Nt(o,l=>{var c;(c=n.next)===null||c===void 0||c.call(n,l),o.next(l)},()=>{var l;a=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},l=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,l),o.error(l)},()=>{var l,c;a&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):Er}var tN="https://g.co/ng/security#xss",Oe=class extends Error{constructor(e,t){super(nE(e,t)),this.code=e}};function nE(i,e){return`${`NG0${Math.abs(i)}`}${e?": "+e:""}`}function zf(i){return{toString:i}.toString()}var Hv="__parameters__";function I8(i){return function(...t){if(i){let n=i(...t);for(let r in n)this[r]=n[r]}}}function nN(i,e,t){return zf(()=>{let n=I8(e);function r(...o){if(this instanceof r)return n.apply(this,o),this;let s=new r(...o);return a.annotation=s,a;function a(l,c,d){let u=l.hasOwnProperty(Hv)?l[Hv]:Object.defineProperty(l,Hv,{value:[]})[Hv];for(;u.length<=d;)u.push(null);return(u[d]=u[d]||[]).push(s),l}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}var Of=globalThis;function zn(i){for(let e in i)if(i[e]===zn)return e;throw Error("Could not find renamed property on target object.")}function T8(i,e){for(let t in e)e.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&(i[t]=e[t])}function Pr(i){if(typeof i=="string")return i;if(Array.isArray(i))return"["+i.map(Pr).join(", ")+"]";if(i==null)return""+i;if(i.overriddenName)return`${i.overriddenName}`;if(i.name)return`${i.name}`;let e=i.toString();if(e==null)return""+e;let t=e.indexOf(` -`);return t===-1?e:e.substring(0,t)}function $S(i,e){return i==null||i===""?e===null?"":e:e==null||e===""?i:i+" "+e}var D8=zn({__forward_ref__:zn});function Yr(i){return i.__forward_ref__=Yr,i.toString=function(){return Pr(this())},i}function $i(i){return iN(i)?i():i}function iN(i){return typeof i=="function"&&i.hasOwnProperty(D8)&&i.__forward_ref__===Yr}function ee(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function rt(i){return{providers:i.providers||[],imports:i.imports||[]}}function C0(i){return hA(i,oN)||hA(i,sN)}function rN(i){return C0(i)!==null}function hA(i,e){return i.hasOwnProperty(e)?i[e]:null}function P8(i){let e=i&&(i[oN]||i[sN]);return e||null}function pA(i){return i&&(i.hasOwnProperty(fA)||i.hasOwnProperty(O8))?i[fA]:null}var oN=zn({\u0275prov:zn}),fA=zn({\u0275inj:zn}),sN=zn({ngInjectableDef:zn}),O8=zn({ngInjectorDef:zn}),ge=class{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=ee({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function aN(i){return i&&!!i.\u0275providers}var R8=zn({\u0275cmp:zn}),A8=zn({\u0275dir:zn}),N8=zn({\u0275pipe:zn}),k8=zn({\u0275mod:zn}),e0=zn({\u0275fac:zn}),Pf=zn({__NG_ELEMENT_ID__:zn}),mA=zn({__NG_ENV_ID__:zn});function va(i){return typeof i=="string"?i:i==null?"":String(i)}function L8(i){return typeof i=="function"?i.name||i.toString():typeof i=="object"&&i!=null&&typeof i.type=="function"?i.type.name||i.type.toString():va(i)}function F8(i,e){let t=e?`. Dependency path: ${e.join(" > ")} > ${i}`:"";throw new Oe(-200,i)}function iE(i,e){throw new Oe(-201,!1)}var en=function(i){return i[i.Default=0]="Default",i[i.Host=1]="Host",i[i.Self=2]="Self",i[i.SkipSelf=4]="SkipSelf",i[i.Optional=8]="Optional",i}(en||{}),qS;function lN(){return qS}function Do(i){let e=qS;return qS=i,e}function cN(i,e,t){let n=C0(i);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(t&en.Optional)return null;if(e!==void 0)return e;iE(i,"Injector")}var B8={},Rf=B8,YS="__NG_DI_FLAG__",t0="ngTempTokenPath",V8="ngTokenPath",z8=/\n/gm,U8="\u0275",gA="__source",zu;function H8(){return zu}function yl(i){let e=zu;return zu=i,e}function G8(i,e=en.Default){if(zu===void 0)throw new Oe(-203,!1);return zu===null?cN(i,void 0,e):zu.get(i,e&en.Optional?null:void 0,e)}function X(i,e=en.Default){return(lN()||G8)($i(i),e)}function te(i,e=en.Default){return X(i,S0(e))}function S0(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function XS(i){let e=[];for(let t=0;t{let i=new Ct;return i.closed=!0,i})();var fS=Ct.EMPTY;function mv(i){return i instanceof Ct||i&&"closed"in i&&St(i.remove)&&St(i.add)&&St(i.unsubscribe)}function LR(i){St(i)?i():i.unsubscribe()}var ss={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Eu={setTimeout(i,e,...t){let{delegate:n}=Eu;return n?.setTimeout?n.setTimeout(i,e,...t):setTimeout(i,e,...t)},clearTimeout(i){let{delegate:e}=Eu;return(e?.clearTimeout||clearTimeout)(i)},delegate:void 0};function gv(i){Eu.setTimeout(()=>{let{onUnhandledError:e}=ss;if(e)e(i);else throw i})}function Dc(){}var FR=mS("C",void 0,void 0);function BR(i){return mS("E",void 0,i)}function VR(i){return mS("N",i,void 0)}function mS(i,e,t){return{kind:i,value:e,error:t}}var Pc=null;function Iu(i){if(ss.useDeprecatedSynchronousErrorHandling){let e=!Pc;if(e&&(Pc={errorThrown:!1,error:null}),i(),e){let{errorThrown:t,error:n}=Pc;if(Pc=null,t)throw n}}else i()}function zR(i){ss.useDeprecatedSynchronousErrorHandling&&Pc&&(Pc.errorThrown=!0,Pc.error=i)}var Oc=class extends Ct{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,mv(e)&&e.add(this)):this.destination=K5}static create(e,t,n){return new fa(e,t,n)}next(e){this.isStopped?_S(VR(e),this):this._next(e)}error(e){this.isStopped?_S(BR(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?_S(FR,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},Z5=Function.prototype.bind;function gS(i,e){return Z5.call(i,e)}var vS=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){_v(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){_v(n)}else _v(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){_v(t)}}},fa=class extends Oc{constructor(e,t,n){super();let r;if(St(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let o;this&&ss.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&gS(e.next,o),error:e.error&&gS(e.error,o),complete:e.complete&&gS(e.complete,o)}):r=e}this.destination=new vS(r)}};function _v(i){ss.useDeprecatedSynchronousErrorHandling?zR(i):gv(i)}function Q5(i){throw i}function _S(i,e){let{onStoppedNotification:t}=ss;t&&Eu.setTimeout(()=>t(i,e))}var K5={closed:!0,next:Dc,error:Q5,complete:Dc};var Tu=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Er(i){return i}function bS(...i){return yS(i)}function yS(i){return i.length===0?Er:i.length===1?i[0]:function(t){return i.reduce((n,r)=>r(n),t)}}var Mt=(()=>{class i{constructor(t){t&&(this._subscribe=t)}lift(t){let n=new i;return n.source=this,n.operator=t,n}subscribe(t,n,r){let o=e8(t)?t:new fa(t,n,r);return Iu(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return n=UR(n),new n((r,o)=>{let s=new fa({next:a=>{try{t(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)}[Tu](){return this}pipe(...t){return yS(t)(this)}toPromise(t){return t=UR(t),new t((n,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>n(o))})}}return i.create=e=>new i(e),i})();function UR(i){var e;return(e=i??ss.Promise)!==null&&e!==void 0?e:Promise}function J5(i){return i&&St(i.next)&&St(i.error)&&St(i.complete)}function e8(i){return i&&i instanceof Oc||J5(i)&&mv(i)}function xS(i){return St(i?.lift)}function Lt(i){return e=>{if(xS(e))return e.lift(function(t){try{return i(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Nt(i,e,t,n,r){return new wS(i,e,t,n,r)}var wS=class extends Oc{constructor(e,t,n,r,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=t?function(a){try{t(a)}catch(l){e.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function Du(){return Lt((i,e)=>{let t=null;i._refCount++;let n=Nt(e,void 0,void 0,void 0,()=>{if(!i||i._refCount<=0||0<--i._refCount){t=null;return}let r=i._connection,o=t;t=null,r&&(!o||r===o)&&r.unsubscribe(),e.unsubscribe()});i.subscribe(n),n.closed||(t=i.connect())})}var hl=class extends Mt{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,xS(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new Ct;let t=this.getSubject();e.add(this.source.subscribe(Nt(t,void 0,()=>{this._teardown(),t.complete()},n=>{this._teardown(),t.error(n)},()=>this._teardown()))),e.closed&&(this._connection=null,e=Ct.EMPTY)}return e}refCount(){return Du()(this)}};var Pu={schedule(i){let e=requestAnimationFrame,t=cancelAnimationFrame,{delegate:n}=Pu;n&&(e=n.requestAnimationFrame,t=n.cancelAnimationFrame);let r=e(o=>{t=void 0,i(o)});return new Ct(()=>t?.(r))},requestAnimationFrame(...i){let{delegate:e}=Pu;return(e?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){let{delegate:e}=Pu;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0};var HR=Mu(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var me=(()=>{class i extends Mt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new vv(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new HR}next(t){Iu(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){Iu(()=>{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(){Iu(()=>{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?fS:(this.currentObservers=null,o.push(t),new Ct(()=>{this.currentObservers=null,Tc(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new Mt;return t.source=this,t}}return i.create=(e,t)=>new vv(e,t),i})(),vv=class extends me{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:fS}};var Dn=class extends me{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};var yf={now(){return(yf.delegate||Date).now()},delegate:void 0};var ma=class extends me{constructor(e=1/0,t=1/0,n=yf){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){let{isStopped:t,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;t||(n.push(e),!r&&n.push(o.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:r}=this,o=r.slice();for(let s=0;sGR(e)&&i()),e},clearImmediate(i){GR(i)}};var{setImmediate:n8,clearImmediate:i8}=jR,wf={setImmediate(...i){let{delegate:e}=wf;return(e?.setImmediate||n8)(...i)},clearImmediate(i){let{delegate:e}=wf;return(e?.clearImmediate||i8)(i)},delegate:void 0};var yv=class extends pl{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return n!==null&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e._scheduled||(e._scheduled=wf.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,t,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,t,n);let{actions:o}=e;t!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==t&&(wf.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))}};var Ou=class i{constructor(e,t=i.now){this.schedulerActionCtor=e,this.now=t}schedule(e,t=0,n){return new this.schedulerActionCtor(this,e).schedule(n,t)}};Ou.now=yf.now;var fl=class extends Ou{constructor(e,t=Ou.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}};var xv=class extends fl{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}}};var Cf=new xv(yv);var ga=new fl(pl),WR=ga;var wv=class extends pl{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return n!==null&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e._scheduled||(e._scheduled=Pu.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,t,n);let{actions:o}=e;t!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==t&&(Pu.cancelAnimationFrame(t),e._scheduled=void 0)}};var Cv=class extends fl{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}}};var Sv=new Cv(wv);var Ir=new Mt(i=>i.complete());function Mv(i){return i&&St(i.schedule)}function MS(i){return i[i.length-1]}function Ev(i){return St(MS(i))?i.pop():void 0}function Is(i){return Mv(MS(i))?i.pop():void 0}function $R(i,e){return typeof MS(i)=="number"?i.pop():e}function YR(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})}function qR(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],n=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&n>=i.length&&(i=void 0),{value:i&&i[n++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Rc(i){return this instanceof Rc?(this.v=i,this):new Rc(i)}function XR(i,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(i,e||[]),r,o=[];return r={},a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(p){return function(f){return Promise.resolve(f).then(p,u)}}function a(p,f){n[p]&&(r[p]=function(m){return new Promise(function(b,g){o.push([p,m,b,g])>1||l(p,m)})},f&&(r[p]=f(r[p])))}function l(p,f){try{c(n[p](f))}catch(m){h(o[0][3],m)}}function c(p){p.value instanceof Rc?Promise.resolve(p.value.v).then(d,u):h(o[0][2],p)}function d(p){l("next",p)}function u(p){l("throw",p)}function h(p,f){p(f),o.shift(),o.length&&l(o[0][0],o[0][1])}}function ZR(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof qR=="function"?qR(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var Ru=i=>i&&typeof i.length=="number"&&typeof i!="function";function Iv(i){return St(i?.then)}function Tv(i){return St(i[Tu])}function Dv(i){return Symbol.asyncIterator&&St(i?.[Symbol.asyncIterator])}function Pv(i){return new TypeError(`You provided ${i!==null&&typeof i=="object"?"an invalid object":`'${i}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function r8(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ov=r8();function Rv(i){return St(i?.[Ov])}function Av(i){return XR(this,arguments,function*(){let t=i.getReader();try{for(;;){let{value:n,done:r}=yield Rc(t.read());if(r)return yield Rc(void 0);yield yield Rc(n)}}finally{t.releaseLock()}})}function Nv(i){return St(i?.getReader)}function wn(i){if(i instanceof Mt)return i;if(i!=null){if(Tv(i))return o8(i);if(Ru(i))return s8(i);if(Iv(i))return a8(i);if(Dv(i))return QR(i);if(Rv(i))return l8(i);if(Nv(i))return c8(i)}throw Pv(i)}function o8(i){return new Mt(e=>{let t=i[Tu]();if(St(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function s8(i){return new Mt(e=>{for(let t=0;t{i.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,gv)})}function l8(i){return new Mt(e=>{for(let t of i)if(e.next(t),e.closed)return;e.complete()})}function QR(i){return new Mt(e=>{d8(i,e).catch(t=>e.error(t))})}function c8(i){return QR(Av(i))}function d8(i,e){var t,n,r,o;return YR(this,void 0,void 0,function*(){try{for(t=ZR(i);n=yield t.next(),!n.done;){let s=n.value;if(e.next(s),e.closed)return}}catch(s){r={error:s}}finally{try{n&&!n.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}e.complete()})}function $r(i,e,t,n=0,r=!1){let o=e.schedule(function(){t(),r?i.add(this.schedule(null,n)):this.unsubscribe()},n);if(i.add(o),!r)return o}function kv(i,e=0){return Lt((t,n)=>{t.subscribe(Nt(n,r=>$r(n,i,()=>n.next(r),e),()=>$r(n,i,()=>n.complete(),e),r=>$r(n,i,()=>n.error(r),e)))})}function Lv(i,e=0){return Lt((t,n)=>{n.add(i.schedule(()=>t.subscribe(n),e))})}function KR(i,e){return wn(i).pipe(Lv(e),kv(e))}function JR(i,e){return wn(i).pipe(Lv(e),kv(e))}function eA(i,e){return new Mt(t=>{let n=0;return e.schedule(function(){n===i.length?t.complete():(t.next(i[n++]),t.closed||this.schedule())})})}function tA(i,e){return new Mt(t=>{let n;return $r(t,e,()=>{n=i[Ov](),$r(t,e,()=>{let r,o;try{({value:r,done:o}=n.next())}catch(s){t.error(s);return}o?t.complete():t.next(r)},0,!0)}),()=>St(n?.return)&&n.return()})}function Fv(i,e){if(!i)throw new Error("Iterable cannot be null");return new Mt(t=>{$r(t,e,()=>{let n=i[Symbol.asyncIterator]();$r(t,e,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function nA(i,e){return Fv(Av(i),e)}function iA(i,e){if(i!=null){if(Tv(i))return KR(i,e);if(Ru(i))return eA(i,e);if(Iv(i))return JR(i,e);if(Dv(i))return Fv(i,e);if(Rv(i))return tA(i,e);if(Nv(i))return nA(i,e)}throw Pv(i)}function Kn(i,e){return e?iA(i,e):wn(i)}function Ke(...i){let e=Is(i);return Kn(i,e)}function ml(i,e){let t=St(i)?i:()=>i,n=r=>r.error(t());return new Mt(e?r=>e.schedule(n,0,r):n)}function Ac(i){return!!i&&(i instanceof Mt||St(i.lift)&&St(i.subscribe))}var _a=Mu(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"});function rA(i){return i instanceof Date&&!isNaN(i)}function Je(i,e){return Lt((t,n)=>{let r=0;t.subscribe(Nt(n,o=>{n.next(i.call(e,o,r++))}))})}var{isArray:u8}=Array;function h8(i,e){return u8(e)?i(...e):i(e)}function Au(i){return Je(e=>h8(i,e))}var{isArray:p8}=Array,{getPrototypeOf:f8,prototype:m8,keys:g8}=Object;function Bv(i){if(i.length===1){let e=i[0];if(p8(e))return{args:e,keys:null};if(_8(e)){let t=g8(e);return{args:t.map(n=>e[n]),keys:t}}}return{args:i,keys:null}}function _8(i){return i&&typeof i=="object"&&f8(i)===m8}function Vv(i,e){return i.reduce((t,n,r)=>(t[n]=e[r],t),{})}function qr(...i){let e=Is(i),t=Ev(i),{args:n,keys:r}=Bv(i);if(n.length===0)return Kn([],e);let o=new Mt(v8(n,e,r?s=>Vv(r,s):Er));return t?o.pipe(Au(t)):o}function v8(i,e,t=Er){return n=>{oA(e,()=>{let{length:r}=i,o=new Array(r),s=r,a=r;for(let l=0;l{let c=Kn(i[l],e),d=!1;c.subscribe(Nt(n,u=>{o[l]=u,d||(d=!0,a--),a||n.next(t(o.slice()))},()=>{--s||n.complete()}))},n)},n)}}function oA(i,e,t){i?$r(t,i,e):e()}function sA(i,e,t,n,r,o,s,a){let l=[],c=0,d=0,u=!1,h=()=>{u&&!l.length&&!c&&e.complete()},p=m=>c{o&&e.next(m),c++;let b=!1;wn(t(m,d++)).subscribe(Nt(e,g=>{r?.(g),o?p(g):e.next(g)},()=>{b=!0},void 0,()=>{if(b)try{for(c--;l.length&&cf(g)):f(g)}h()}catch(g){e.error(g)}}))};return i.subscribe(Nt(e,p,()=>{u=!0,h()})),()=>{a?.()}}function ei(i,e,t=1/0){return St(e)?ei((n,r)=>Je((o,s)=>e(n,o,r,s))(wn(i(n,r))),t):(typeof e=="number"&&(t=e),Lt((n,r)=>sA(n,r,i,t)))}function Sf(i=1/0){return ei(Er,i)}function aA(){return Sf(1)}function Ts(...i){return aA()(Kn(i,Is(i)))}function Io(i){return new Mt(e=>{wn(i()).subscribe(e)})}function Mf(...i){let e=Ev(i),{args:t,keys:n}=Bv(i),r=new Mt(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let d=0;d{u||(u=!0,c--),a[d]=h},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(n?Vv(n,a):a),o.complete())}))}});return e?r.pipe(Au(e)):r}var b8=["addListener","removeListener"],y8=["addEventListener","removeEventListener"],x8=["on","off"];function yn(i,e,t,n){if(St(t)&&(n=t,t=void 0),n)return yn(i,e,t).pipe(Au(n));let[r,o]=S8(i)?y8.map(s=>a=>i[s](e,a,t)):w8(i)?b8.map(lA(i,e)):C8(i)?x8.map(lA(i,e)):[];if(!r&&Ru(i))return ei(s=>yn(s,e,t))(wn(i));if(!r)throw new TypeError("Invalid event target");return new Mt(s=>{let a=(...l)=>s.next(1o(a)})}function lA(i,e){return t=>n=>i[t](e,n)}function w8(i){return St(i.addListener)&&St(i.removeListener)}function C8(i){return St(i.on)&&St(i.off)}function S8(i){return St(i.addEventListener)&&St(i.removeEventListener)}function Nu(i=0,e,t=WR){let n=-1;return e!=null&&(Mv(e)?t=e:n=e),new Mt(r=>{let o=rA(i)?+i-t.now():i;o<0&&(o=0);let s=0;return t.schedule(function(){r.closed||(r.next(s++),0<=n?this.schedule(void 0,n):r.complete())},o)})}function ES(i=0,e=ga){return i<0&&(i=0),Nu(i,i,e)}function Yn(...i){let e=Is(i),t=$R(i,1/0),n=i;return n.length?n.length===1?wn(n[0]):Sf(t)(Kn(n,e)):Ir}function Gt(i,e){return Lt((t,n)=>{let r=0;t.subscribe(Nt(n,o=>i.call(e,o,r++)&&n.next(o)))})}function Ef(i){return Lt((e,t)=>{let n=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,n){n=!1;let c=r;r=null,t.next(c)}s&&t.complete()},l=()=>{o=null,s&&t.complete()};e.subscribe(Nt(t,c=>{n=!0,r=c,o||wn(i(c)).subscribe(o=Nt(t,a,l))},()=>{s=!0,(!n||!o||o.closed)&&t.complete()}))})}function zv(i,e=ga){return Ef(()=>Nu(i,e))}function Ds(i){return Lt((e,t)=>{let n=null,r=!1,o;n=e.subscribe(Nt(t,void 0,void 0,s=>{o=wn(i(s,Ds(i)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(t))})}function cA(i,e,t,n,r){return(o,s)=>{let a=t,l=e,c=0;o.subscribe(Nt(s,d=>{let u=c++;l=a?i(l,d,u):(a=!0,d),n&&s.next(l)},r&&(()=>{a&&s.next(l),s.complete()})))}}function gl(i,e){return St(e)?ei(i,e,1):ei(i,1)}function To(i,e=ga){return Lt((t,n)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let c=o;o=null,n.next(c)}};function l(){let c=s+i,d=e.now();if(d{o=c,s=e.now(),r||(r=e.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{o=r=null}))})}function _l(i){return Lt((e,t)=>{let n=!1;e.subscribe(Nt(t,r=>{n=!0,t.next(r)},()=>{n||t.next(i),t.complete()}))})}function _n(i){return i<=0?()=>Ir:Lt((e,t)=>{let n=0;e.subscribe(Nt(t,r=>{++n<=i&&(t.next(r),i<=n&&t.complete())}))})}function dA(){return Lt((i,e)=>{i.subscribe(Nt(e,Dc))})}function If(i){return Je(()=>i)}function IS(i,e){return e?t=>Ts(e.pipe(_n(1),dA()),t.pipe(IS(i))):ei((t,n)=>wn(i(t,n)).pipe(_n(1),If(t)))}function ku(i,e=ga){let t=Nu(i,e);return IS(()=>t)}function vl(i,e=Er){return i=i??M8,Lt((t,n)=>{let r,o=!0;t.subscribe(Nt(n,s=>{let a=e(s);(o||!i(r,a))&&(o=!1,r=a,n.next(s))}))})}function M8(i,e){return i===e}function Uv(i=E8){return Lt((e,t)=>{let n=!1;e.subscribe(Nt(t,r=>{n=!0,t.next(r)},()=>n?t.complete():t.error(i())))})}function E8(){return new _a}function bl(i){return Lt((e,t)=>{try{e.subscribe(t)}finally{t.add(i)}})}function Ps(i,e){let t=arguments.length>=2;return n=>n.pipe(i?Gt((r,o)=>i(r,o,n)):Er,_n(1),t?_l(e):Uv(()=>new _a))}function Lu(i){return i<=0?()=>Ir:Lt((e,t)=>{let n=[];e.subscribe(Nt(t,r=>{n.push(r),i{for(let r of n)t.next(r);t.complete()},void 0,()=>{n=null}))})}function TS(i,e){let t=arguments.length>=2;return n=>n.pipe(i?Gt((r,o)=>i(r,o,n)):Er,Lu(1),t?_l(e):Uv(()=>new _a))}function DS(i,e){return Lt(cA(i,e,arguments.length>=2,!0))}function Tf(i={}){let{connector:e=()=>new me,resetOnError:t=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return o=>{let s,a,l,c=0,d=!1,u=!1,h=()=>{a?.unsubscribe(),a=void 0},p=()=>{h(),s=l=void 0,d=u=!1},f=()=>{let m=s;p(),m?.unsubscribe()};return Lt((m,b)=>{c++,!u&&!d&&h();let g=l=l??e();b.add(()=>{c--,c===0&&!u&&!d&&(a=PS(f,r))}),g.subscribe(b),!s&&c>0&&(s=new fa({next:_=>g.next(_),error:_=>{u=!0,h(),a=PS(p,t,_),g.error(_)},complete:()=>{d=!0,h(),a=PS(p,n),g.complete()}}),wn(m).subscribe(s))})(o)}}function PS(i,e,...t){if(e===!0){i();return}if(e===!1)return;let n=new fa({next:()=>{n.unsubscribe(),i()}});return wn(e(...t)).subscribe(n)}function Hv(i,e,t){let n,r=!1;return i&&typeof i=="object"?{bufferSize:n=1/0,windowTime:e=1/0,refCount:r=!1,scheduler:t}=i:n=i??1/0,Tf({connector:()=>new ma(n,e,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function Df(i){return Gt((e,t)=>i<=t)}function pi(...i){let e=Is(i);return Lt((t,n)=>{(e?Ts(i,t,e):Ts(i,t)).subscribe(n)})}function Xn(i,e){return Lt((t,n)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&n.complete();t.subscribe(Nt(n,l=>{r?.unsubscribe();let c=0,d=o++;wn(i(l,d)).subscribe(r=Nt(n,u=>n.next(e?e(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Xe(i){return Lt((e,t)=>{wn(i).subscribe(Nt(t,()=>t.complete(),Dc)),!t.closed&&e.subscribe(t)})}function OS(i,e=!1){return Lt((t,n)=>{let r=0;t.subscribe(Nt(n,o=>{let s=i(o,r++);(s||e)&&n.next(o),!s&&n.complete()}))})}function Sn(i,e,t){let n=St(i)||e||t?{next:i,error:e,complete:t}:i;return n?Lt((r,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;r.subscribe(Nt(o,l=>{var c;(c=n.next)===null||c===void 0||c.call(n,l),o.next(l)},()=>{var l;a=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},l=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,l),o.error(l)},()=>{var l,c;a&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):Er}var eN="https://g.co/ng/security#xss",Oe=class extends Error{constructor(e,t){super(nE(e,t)),this.code=e}};function nE(i,e){return`${`NG0${Math.abs(i)}`}${e?": "+e:""}`}function zf(i){return{toString:i}.toString()}var Gv="__parameters__";function I8(i){return function(...t){if(i){let n=i(...t);for(let r in n)this[r]=n[r]}}}function tN(i,e,t){return zf(()=>{let n=I8(e);function r(...o){if(this instanceof r)return n.apply(this,o),this;let s=new r(...o);return a.annotation=s,a;function a(l,c,d){let u=l.hasOwnProperty(Gv)?l[Gv]:Object.defineProperty(l,Gv,{value:[]})[Gv];for(;u.length<=d;)u.push(null);return(u[d]=u[d]||[]).push(s),l}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}var Of=globalThis;function zn(i){for(let e in i)if(i[e]===zn)return e;throw Error("Could not find renamed property on target object.")}function T8(i,e){for(let t in e)e.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&(i[t]=e[t])}function Pr(i){if(typeof i=="string")return i;if(Array.isArray(i))return"["+i.map(Pr).join(", ")+"]";if(i==null)return""+i;if(i.overriddenName)return`${i.overriddenName}`;if(i.name)return`${i.name}`;let e=i.toString();if(e==null)return""+e;let t=e.indexOf(` +`);return t===-1?e:e.substring(0,t)}function $S(i,e){return i==null||i===""?e===null?"":e:e==null||e===""?i:i+" "+e}var D8=zn({__forward_ref__:zn});function Yr(i){return i.__forward_ref__=Yr,i.toString=function(){return Pr(this())},i}function $i(i){return nN(i)?i():i}function nN(i){return typeof i=="function"&&i.hasOwnProperty(D8)&&i.__forward_ref__===Yr}function ee(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function rt(i){return{providers:i.providers||[],imports:i.imports||[]}}function S0(i){return uA(i,rN)||uA(i,oN)}function iN(i){return S0(i)!==null}function uA(i,e){return i.hasOwnProperty(e)?i[e]:null}function P8(i){let e=i&&(i[rN]||i[oN]);return e||null}function hA(i){return i&&(i.hasOwnProperty(pA)||i.hasOwnProperty(O8))?i[pA]:null}var rN=zn({\u0275prov:zn}),pA=zn({\u0275inj:zn}),oN=zn({ngInjectableDef:zn}),O8=zn({ngInjectorDef:zn}),ge=class{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=ee({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function sN(i){return i&&!!i.\u0275providers}var R8=zn({\u0275cmp:zn}),A8=zn({\u0275dir:zn}),N8=zn({\u0275pipe:zn}),k8=zn({\u0275mod:zn}),t0=zn({\u0275fac:zn}),Pf=zn({__NG_ELEMENT_ID__:zn}),fA=zn({__NG_ENV_ID__:zn});function va(i){return typeof i=="string"?i:i==null?"":String(i)}function L8(i){return typeof i=="function"?i.name||i.toString():typeof i=="object"&&i!=null&&typeof i.type=="function"?i.type.name||i.type.toString():va(i)}function F8(i,e){let t=e?`. Dependency path: ${e.join(" > ")} > ${i}`:"";throw new Oe(-200,i)}function iE(i,e){throw new Oe(-201,!1)}var en=function(i){return i[i.Default=0]="Default",i[i.Host=1]="Host",i[i.Self=2]="Self",i[i.SkipSelf=4]="SkipSelf",i[i.Optional=8]="Optional",i}(en||{}),qS;function aN(){return qS}function Do(i){let e=qS;return qS=i,e}function lN(i,e,t){let n=S0(i);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(t&en.Optional)return null;if(e!==void 0)return e;iE(i,"Injector")}var B8={},Rf=B8,YS="__NG_DI_FLAG__",n0="ngTempTokenPath",V8="ngTokenPath",z8=/\n/gm,U8="\u0275",mA="__source",zu;function H8(){return zu}function yl(i){let e=zu;return zu=i,e}function G8(i,e=en.Default){if(zu===void 0)throw new Oe(-203,!1);return zu===null?lN(i,void 0,e):zu.get(i,e&en.Optional?null:void 0,e)}function X(i,e=en.Default){return(aN()||G8)($i(i),e)}function te(i,e=en.Default){return X(i,M0(e))}function M0(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function XS(i){let e=[];for(let t=0;t ");else if(typeof e=="object"){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):Pr(a)))}r=`{${o.join(", ")}}`}return`${t}${n?"("+n+")":""}[${r}]: ${i.replace(z8,` - `)}`}var M0=dN(nN("Optional"),8);var rE=dN(nN("SkipSelf"),4);function Hu(i,e){let t=i.hasOwnProperty(e0);return t?i[e0]:null}function q8(i,e,t){if(i.length!==e.length)return!1;for(let n=0;nArray.isArray(t)?oE(t,e):e(t))}function uN(i,e,t){e>=i.length?i.push(t):i.splice(e,0,t)}function n0(i,e){return e>=i.length-1?i.pop():i.splice(e,1)[0]}function X8(i,e){let t=[];for(let n=0;ne;){let o=r-2;i[r]=i[o],r--}i[e]=t,i[e+1]=n}}function E0(i,e,t){let n=Uf(i,e);return n>=0?i[n|1]=t:(n=~n,Z8(i,n,e,t)),n}function RS(i,e){let t=Uf(i,e);if(t>=0)return i[t|1]}function Uf(i,e){return Q8(i,e,1)}function Q8(i,e,t){let n=0,r=i.length>>t;for(;r!==n;){let o=n+(r-n>>1),s=i[o<e?r=o:n=o+1}return~(r<e){s=o-1;break}}}for(;o-1){let o;for(;++ro?u="":u=r[d+1].toLowerCase(),n&2&&c!==u){if(as(n))return!1;s=!0}}}}return as(n)||s}function as(i){return(i&1)===0}function iW(i,e,t,n){if(e===null)return-1;let r=0;if(n||!t){let o=!1;for(;r-1)for(t++;t0?'="'+a+'"':"")+"]"}else n&8?r+="."+s:n&4&&(r+=" "+s);else r!==""&&!as(s)&&(e+=vA(o,r),r=""),n=s,o=o||!as(n);t++}return r!==""&&(e+=vA(o,r)),e}function cW(i){return i.map(lW).join(",")}function dW(i){let e=[],t=[],n=1,r=2;for(;n{let e=xN(i),t=wt(Z({},e),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===fN.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&i.dependencies||null,getStandaloneInjector:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||As.Emulated,styles:i.styles||Tr,_:null,schemas:i.schemas||null,tView:null,id:""});wN(t);let n=i.dependencies;return t.directiveDefs=yA(n,!1),t.pipeDefs=yA(n,!0),t.id=pW(t),t})}function uW(i){return Sl(i)||aE(i)}function hW(i){return i!==null}function ot(i){return zf(()=>({type:i.type,bootstrap:i.bootstrap||Tr,declarations:i.declarations||Tr,imports:i.imports||Tr,exports:i.exports||Tr,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function bA(i,e){if(i==null)return ba;let t={};for(let n in i)if(i.hasOwnProperty(n)){let r=i[n],o,s,a=Cl.None;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o):(o=r,s=r),e?(t[o]=a!==Cl.None?[n,a]:n,e[o]=s):t[o]=n}return t}function ze(i){return zf(()=>{let e=xN(i);return wN(e),e})}function Sl(i){return i[R8]||null}function aE(i){return i[A8]||null}function vN(i){return i[N8]||null}function bN(i){let e=Sl(i)||aE(i)||vN(i);return e!==null?e.standalone:!1}function yN(i,e){let t=i[k8]||null;if(!t&&e===!0)throw new Error(`Type ${Pr(i)} does not have '\u0275mod' property.`);return t}function xN(i){let e={};return{type:i.type,providersResolver:null,factory:null,hostBindings:i.hostBindings||null,hostVars:i.hostVars||0,hostAttrs:i.hostAttrs||null,contentQueries:i.contentQueries||null,declaredInputs:e,inputTransforms:null,inputConfig:i.inputs||ba,exportAs:i.exportAs||null,standalone:i.standalone===!0,signals:i.signals===!0,selectors:i.selectors||Tr,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:bA(i.inputs,e),outputs:bA(i.outputs),debugInfo:null}}function wN(i){i.features?.forEach(e=>e(i))}function yA(i,e){if(!i)return null;let t=e?vN:uW;return()=>(typeof i=="function"?i():i).map(n=>t(n)).filter(hW)}function pW(i){let e=0,t=[i.selectors,i.ngContentSelectors,i.hostVars,i.hostAttrs,i.consts,i.vars,i.decls,i.encapsulation,i.standalone,i.signals,i.exportAs,JSON.stringify(i.inputs),JSON.stringify(i.outputs),Object.getOwnPropertyNames(i.type.prototype),!!i.contentQueries,!!i.viewQuery].join("|");for(let r of t)e=Math.imul(31,e)+r.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function I0(i){return{\u0275providers:i}}function fW(...i){return{\u0275providers:CN(!0,i),\u0275fromNgModule:!0}}function CN(i,...e){let t=[],n=new Set,r,o=s=>{t.push(s)};return oE(e,s=>{let a=s;QS(a,o,[],n)&&(r||=[],r.push(a))}),r!==void 0&&SN(r,o),t}function SN(i,e){for(let t=0;t{e(o,n)})}}function QS(i,e,t,n){if(i=$i(i),!i)return!1;let r=null,o=pA(i),s=!o&&Sl(i);if(!o&&!s){let l=i.ngModule;if(o=pA(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=i}let a=n.has(r);if(s){if(a)return!1;if(n.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)QS(c,e,t,n)}}else if(o){if(o.imports!=null&&!a){n.add(r);let c;try{oE(o.imports,d=>{QS(d,e,t,n)&&(c||=[],c.push(d))})}finally{}c!==void 0&&SN(c,e)}if(!a){let c=Hu(r)||(()=>new r);e({provide:r,useFactory:c,deps:Tr},r),e({provide:pN,useValue:r,multi:!0},r),e({provide:Gu,useValue:()=>X(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=i;lE(l,d=>{e(d,c)})}}else return!1;return r!==i&&i.providers!==void 0}function lE(i,e){for(let t of i)aN(t)&&(t=t.\u0275providers),Array.isArray(t)?lE(t,e):e(t)}var mW=zn({provide:String,useValue:zn});function MN(i){return i!==null&&typeof i=="object"&&mW in i}function gW(i){return!!(i&&i.useExisting)}function _W(i){return!!(i&&i.useFactory)}function ju(i){return typeof i=="function"}function vW(i){return!!i.useClass}var T0=new ge(""),qv={},bW={},AS;function D0(){return AS===void 0&&(AS=new i0),AS}var qi=class{},Nf=class extends qi{get destroyed(){return this._destroyed}constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,JS(e,s=>this.processProvider(s)),this.records.set(hN,Fu(void 0,this)),r.has("environment")&&this.records.set(qi,Fu(void 0,this));let o=this.records.get(T0);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(pN,Tr,en.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;let e=sn(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),sn(e)}}onDestroy(e){return this.assertNotDestroyed(),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){this.assertNotDestroyed();let t=yl(this),n=Do(void 0),r;try{return e()}finally{yl(t),Do(n)}}get(e,t=Rf,n=en.Default){if(this.assertNotDestroyed(),e.hasOwnProperty(mA))return e[mA](this);n=S0(n);let r,o=yl(this),s=Do(void 0);try{if(!(n&en.SkipSelf)){let l=this.records.get(e);if(l===void 0){let c=SW(e)&&C0(e);c&&this.injectableDefInScope(c)?l=Fu(KS(e),qv):l=null,this.records.set(e,l)}if(l!=null)return this.hydrate(e,l)}let a=n&en.Self?D0():this.parent;return t=n&en.Optional&&t===Rf?null:t,a.get(e,t)}catch(a){if(a.name==="NullInjectorError"){if((a[t0]=a[t0]||[]).unshift(Pr(e)),o)throw a;return W8(a,e,"R3InjectorError",this.source)}else throw a}finally{Do(s),yl(o)}}resolveInjectorInitializers(){let e=sn(null),t=yl(this),n=Do(void 0),r;try{let o=this.get(Gu,Tr,en.Self);for(let s of o)s()}finally{yl(t),Do(n),sn(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(Pr(n));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Oe(205,!1)}processProvider(e){e=$i(e);let t=ju(e)?e:$i(e&&e.provide),n=xW(e);if(!ju(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Fu(void 0,qv,!0),r.factory=()=>XS(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=sn(null);try{return t.value===qv&&(t.value=bW,t.value=t.factory()),typeof t.value=="object"&&t.value&&CW(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{sn(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=$i(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function KS(i){let e=C0(i),t=e!==null?e.factory:Hu(i);if(t!==null)return t;if(i instanceof ge)throw new Oe(204,!1);if(i instanceof Function)return yW(i);throw new Oe(204,!1)}function yW(i){if(i.length>0)throw new Oe(204,!1);let t=P8(i);return t!==null?()=>t.factory(i):()=>new i}function xW(i){if(MN(i))return Fu(void 0,i.useValue);{let e=EN(i);return Fu(e,qv)}}function EN(i,e,t){let n;if(ju(i)){let r=$i(i);return Hu(r)||KS(r)}else if(MN(i))n=()=>$i(i.useValue);else if(_W(i))n=()=>i.useFactory(...XS(i.deps||[]));else if(gW(i))n=()=>X($i(i.useExisting));else{let r=$i(i&&(i.useClass||i.provide));if(wW(i))n=()=>new r(...XS(i.deps));else return Hu(r)||KS(r)}return n}function Fu(i,e,t=!1){return{factory:i,value:e,multi:t?[]:void 0}}function wW(i){return!!i.deps}function CW(i){return i!==null&&typeof i=="object"&&typeof i.ngOnDestroy=="function"}function SW(i){return typeof i=="function"||typeof i=="object"&&i instanceof ge}function JS(i,e){for(let t of i)Array.isArray(t)?JS(t,e):t&&aN(t)?JS(t.\u0275providers,e):e(t)}function ks(i,e){i instanceof Nf&&i.assertNotDestroyed();let t,n=yl(i),r=Do(void 0);try{return e()}finally{yl(n),Do(r)}}function IN(){return lN()!==void 0||H8()!=null}function Ju(i){if(!IN())throw new Oe(-203,!1)}function MW(i){return typeof i=="function"}var Ls=0,Ut=1,Pt=2,pr=3,cs=4,Xr=5,Wu=6,r0=7,ur=8,$u=9,ya=10,ri=11,kf=12,xA=13,eh=14,no=15,Lc=16,Bu=17,xa=18,P0=19,TN=20,xl=21,Yv=22,Po=23,Or=25,cE=1;var Fc=7,o0=8,qu=9,hr=10,s0=function(i){return i[i.None=0]="None",i[i.HasTransplantedViews=2]="HasTransplantedViews",i}(s0||{});function wl(i){return Array.isArray(i)&&typeof i[cE]=="object"}function Ma(i){return Array.isArray(i)&&i[cE]===!0}function dE(i){return(i.flags&4)!==0}function O0(i){return i.componentOffset>-1}function R0(i){return(i.flags&1)===1}function wa(i){return!!i.template}function eM(i){return(i[Pt]&512)!==0}var tM=class{constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function DN(i,e,t,n){e!==null?e.applyValueToInputSignal(e,n):i[t]=n}function dn(){return PN}function PN(i){return i.type.prototype.ngOnChanges&&(i.setInput=IW),EW}dn.ngInherit=!0;function EW(){let i=RN(this),e=i?.current;if(e){let t=i.previous;if(t===ba)i.previous=e;else for(let n in e)t[n]=e[n];i.current=null,this.ngOnChanges(e)}}function IW(i,e,t,n,r){let o=this.declaredInputs[n],s=RN(i)||TW(i,{previous:ba,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new tM(c&&c.currentValue,t,l===ba),DN(i,e,r,t)}var ON="__ngSimpleChanges__";function RN(i){return i[ON]||null}function TW(i,e){return i[ON]=e}var wA=null;var Os=function(i,e,t){wA?.(i,e,t)},AN="svg",DW="math";function Ns(i){for(;Array.isArray(i);)i=i[Ls];return i}function PW(i){for(;Array.isArray(i);){if(typeof i[cE]=="object")return i;i=i[Ls]}return null}function NN(i,e){return Ns(e[i])}function Ro(i,e){return Ns(e[i.index])}function uE(i,e){return i.data[e]}function OW(i,e){return i[e]}function Dl(i,e){let t=e[i];return wl(t)?t:t[Ls]}function RW(i){return(i[Pt]&4)===4}function hE(i){return(i[Pt]&128)===128}function AW(i){return Ma(i[pr])}function Ml(i,e){return e==null?null:i[e]}function kN(i){i[Bu]=0}function LN(i){i[Pt]&1024||(i[Pt]|=1024,hE(i)&&A0(i))}function NW(i,e){for(;i>0;)e=e[eh],i--;return e}function Lf(i){return!!(i[Pt]&9216||i[Po]?.dirty)}function nM(i){i[ya].changeDetectionScheduler?.notify(7),i[Pt]&64&&(i[Pt]|=1024),Lf(i)&&A0(i)}function A0(i){i[ya].changeDetectionScheduler?.notify(0);let e=Bc(i);for(;e!==null&&!(e[Pt]&8192||(e[Pt]|=8192,!hE(e)));)e=Bc(e)}function FN(i,e){if((i[Pt]&256)===256)throw new Oe(911,!1);i[xl]===null&&(i[xl]=[]),i[xl].push(e)}function kW(i,e){if(i[xl]===null)return;let t=i[xl].indexOf(e);t!==-1&&i[xl].splice(t,1)}function Bc(i){let e=i[pr];return Ma(e)?e[pr]:e}var Wt={lFrame:qN(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var BN=!1;function LW(){return Wt.lFrame.elementDepthCount}function FW(){Wt.lFrame.elementDepthCount++}function BW(){Wt.lFrame.elementDepthCount--}function VN(){return Wt.bindingsEnabled}function zN(){return Wt.skipHydrationRootTNode!==null}function VW(i){return Wt.skipHydrationRootTNode===i}function zW(){Wt.skipHydrationRootTNode=null}function jt(){return Wt.lFrame.lView}function oi(){return Wt.lFrame.tView}function V(i){return Wt.lFrame.contextLView=i,i[ur]}function z(i){return Wt.lFrame.contextLView=null,i}function Xi(){let i=UN();for(;i!==null&&i.type===64;)i=i.parent;return i}function UN(){return Wt.lFrame.currentTNode}function UW(){let i=Wt.lFrame,e=i.currentTNode;return i.isParent?e:e.parent}function jc(i,e){let t=Wt.lFrame;t.currentTNode=i,t.isParent=e}function pE(){return Wt.lFrame.isParent}function fE(){Wt.lFrame.isParent=!1}function HW(){return Wt.lFrame.contextLView}function HN(){return BN}function CA(i){BN=i}function GN(){let i=Wt.lFrame,e=i.bindingRootIndex;return e===-1&&(e=i.bindingRootIndex=i.tView.bindingStartIndex),e}function jN(){return Wt.lFrame.bindingIndex}function GW(i){return Wt.lFrame.bindingIndex=i}function Wc(){return Wt.lFrame.bindingIndex++}function N0(i){let e=Wt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+i,t}function jW(){return Wt.lFrame.inI18n}function WW(i,e){let t=Wt.lFrame;t.bindingIndex=t.bindingRootIndex=i,iM(e)}function $W(){return Wt.lFrame.currentDirectiveIndex}function iM(i){Wt.lFrame.currentDirectiveIndex=i}function mE(i){let e=Wt.lFrame.currentDirectiveIndex;return e===-1?null:i[e]}function gE(){return Wt.lFrame.currentQueryIndex}function k0(i){Wt.lFrame.currentQueryIndex=i}function qW(i){let e=i[Ut];return e.type===2?e.declTNode:e.type===1?i[Xr]:null}function WN(i,e,t){if(t&en.SkipSelf){let r=e,o=i;for(;r=r.parent,r===null&&!(t&en.Host);)if(r=qW(o),r===null||(o=o[eh],r.type&10))break;if(r===null)return!1;e=r,i=o}let n=Wt.lFrame=$N();return n.currentTNode=e,n.lView=i,!0}function _E(i){let e=$N(),t=i[Ut];Wt.lFrame=e,e.currentTNode=t.firstChild,e.lView=i,e.tView=t,e.contextLView=i,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function $N(){let i=Wt.lFrame,e=i===null?null:i.child;return e===null?qN(i):e}function qN(i){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:i,child:null,inI18n:!1};return i!==null&&(i.child=e),e}function YN(){let i=Wt.lFrame;return Wt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var XN=YN;function vE(){let i=YN();i.isParent=!0,i.tView=null,i.selectedIndex=-1,i.contextLView=null,i.elementDepthCount=0,i.currentDirectiveIndex=-1,i.currentNamespace=null,i.bindingRootIndex=-1,i.bindingIndex=-1,i.currentQueryIndex=0}function YW(i){return(Wt.lFrame.contextLView=NW(i,Wt.lFrame.contextLView))[ur]}function Fs(){return Wt.lFrame.selectedIndex}function Vc(i){Wt.lFrame.selectedIndex=i}function L0(){let i=Wt.lFrame;return uE(i.tView,i.selectedIndex)}function io(){Wt.lFrame.currentNamespace=AN}function F0(){XW()}function XW(){Wt.lFrame.currentNamespace=null}function ZW(){return Wt.lFrame.currentNamespace}var ZN=!0;function B0(){return ZN}function V0(i){ZN=i}function QW(i,e,t){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(n){let s=PN(e);(t.preOrderHooks??=[]).push(i,s),(t.preOrderCheckHooks??=[]).push(i,s)}r&&(t.preOrderHooks??=[]).push(0-i,r),o&&((t.preOrderHooks??=[]).push(i,o),(t.preOrderCheckHooks??=[]).push(i,o))}function z0(i,e){for(let t=e.directiveStart,n=e.directiveEnd;t=n)break}else e[l]<0&&(i[Bu]+=65536),(a>14>16&&(i[Pt]&3)===e&&(i[Pt]+=16384,SA(a,o)):SA(a,o)}var Uu=-1,zc=class{constructor(e,t,n){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=n}};function JW(i){return i instanceof zc}function e6(i){return(i.flags&8)!==0}function t6(i){return(i.flags&16)!==0}var kS={},rM=class{constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=S0(n);let r=this.injector.get(e,kS,n);return r!==kS||t===kS?r:this.parentInjector.get(e,t,n)}};function KN(i){return i!==Uu}function a0(i){return i&32767}function n6(i){return i>>16}function l0(i,e){let t=n6(i),n=e;for(;t>0;)n=n[eh],t--;return n}var oM=!0;function MA(i){let e=oM;return oM=i,e}var i6=256,JN=i6-1,ek=5,r6=0,Rs={};function o6(i,e,t){let n;typeof t=="string"?n=t.charCodeAt(0)||0:t.hasOwnProperty(Pf)&&(n=t[Pf]),n==null&&(n=t[Pf]=r6++);let r=n&JN,o=1<>ek)]|=o}function c0(i,e){let t=tk(i,e);if(t!==-1)return t;let n=e[Ut];n.firstCreatePass&&(i.injectorIndex=e.length,LS(n.data,i),LS(e,null),LS(n.blueprint,null));let r=bE(i,e),o=i.injectorIndex;if(KN(r)){let s=a0(r),a=l0(r,e),l=a[Ut].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function LS(i,e){i.push(0,0,0,0,0,0,0,0,e)}function tk(i,e){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||e[i.injectorIndex+8]===null?-1:i.injectorIndex}function bE(i,e){if(i.parent&&i.parent.injectorIndex!==-1)return i.parent.injectorIndex;let t=0,n=null,r=e;for(;r!==null;){if(n=sk(r),n===null)return Uu;if(t++,r=r[eh],n.injectorIndex!==-1)return n.injectorIndex|t<<16}return Uu}function sM(i,e,t){o6(i,e,t)}function s6(i,e){if(e==="class")return i.classes;if(e==="style")return i.styles;let t=i.attrs;if(t){let n=t.length,r=0;for(;r>20,u=n?a:a+d,h=r?a+d:c;for(let p=u;p=l&&f.type===t)return p}if(r){let p=s[l];if(p&&wa(p)&&p.type===t)return l}return null}function Uc(i,e,t,n){let r=i[t],o=e.data;if(JW(r)){let s=r;s.resolving&&F8(L8(o[t]));let a=MA(s.canSeeViewProviders);s.resolving=!0;let l,c=s.injectImpl?Do(s.injectImpl):null,d=WN(i,n,en.Default);try{r=i[t]=s.factory(void 0,o,i,n),e.firstCreatePass&&t>=n.directiveStart&&QW(t,o[t],e)}finally{c!==null&&Do(c),MA(a),s.resolving=!1,XN()}}return r}function l6(i){if(typeof i=="string")return i.charCodeAt(0)||0;let e=i.hasOwnProperty(Pf)?i[Pf]:void 0;return typeof e=="number"?e>=0?e&JN:c6:e}function EA(i,e,t){let n=1<>ek)]&n)}function IA(i,e){return!(i&en.Self)&&!(i&en.Host&&e)}var kc=class{constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return rk(this._tNode,this._lView,e,S0(n),t)}};function c6(){return new kc(Xi(),jt())}function Ai(i){return zf(()=>{let e=i.prototype.constructor,t=e[e0]||aM(e),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let o=r[e0]||aM(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function aM(i){return iN(i)?()=>{let e=aM($i(i));return e&&e()}:Hu(i)}function d6(i,e,t,n,r){let o=i,s=e;for(;o!==null&&s!==null&&s[Pt]&2048&&!(s[Pt]&512);){let a=ok(o,s,t,n|en.Self,Rs);if(a!==Rs)return a;let l=o.parent;if(!l){let c=s[TN];if(c){let d=c.get(t,Rs,n);if(d!==Rs)return d}l=sk(s),s=s[eh]}o=l}return r}function sk(i){let e=i[Ut],t=e.type;return t===2?e.declTNode:t===1?i[Xr]:null}function ro(i){return s6(Xi(),i)}function TA(i,e=null,t=null,n){let r=ak(i,e,t,n);return r.resolveInjectorInitializers(),r}function ak(i,e=null,t=null,n,r=new Set){let o=[t||Tr,fW(i)];return n=n||(typeof i=="object"?void 0:Pr(i)),new Nf(o,e||D0(),n||null,r)}var Nc=class Nc{static create(e,t){if(Array.isArray(e))return TA({name:""},t,e,"");{let n=e.name??"";return TA({name:n},e.parent,e.providers,n)}}};Nc.THROW_IF_NOT_FOUND=Rf,Nc.NULL=new i0,Nc.\u0275prov=ee({token:Nc,providedIn:"any",factory:()=>X(hN)}),Nc.__NG_ELEMENT_ID__=-1;var bt=Nc;var u6=new ge("");u6.__NG_ELEMENT_ID__=i=>{let e=Xi();if(e===null)throw new Oe(204,!1);if(e.type&2)return e.value;if(i&en.Optional)return null;throw new Oe(204,!1)};var h6="ngOriginalError";function FS(i){return i[h6]}var Rr=class{constructor(){this._console=console}handleError(e){let t=this._findOriginalError(e);this._console.error("ERROR",e),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&FS(e);for(;t&&FS(t);)t=FS(t);return t||null}},lk=new ge("",{providedIn:"root",factory:()=>te(Rr).handleError.bind(void 0)}),Ni=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=p6,e.__NG_ENV_ID__=n=>n;let i=e;return i})(),lM=class extends Ni{constructor(e){super(),this._lView=e}onDestroy(e){return FN(this._lView,e),()=>kW(this._lView,e)}};function p6(){return new lM(jt())}function f6(){return th(Xi(),jt())}function th(i,e){return new Re(Ro(i,e))}var Re=(()=>{let e=class e{constructor(n){this.nativeElement=n}};e.__NG_ELEMENT_ID__=f6;let i=e;return i})();function ck(i){return i instanceof Re?i.nativeElement:i}var $c=(()=>{let e=class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Dn(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}};e.\u0275prov=ee({token:e,providedIn:"root",factory:()=>new e});let i=e;return i})();var cM=class extends me{constructor(e=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=e,IN()&&(this.destroyRef=te(Ni,{optional:!0})??void 0,this.pendingTasks=te($c,{optional:!0})??void 0)}emit(e){let t=sn(null);try{super.next(e)}finally{sn(t)}}subscribe(e,t,n){let r=e,o=t||(()=>null),s=n;if(e&&typeof e=="object"){let l=e;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return e instanceof Ct&&e.add(a),a}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},Pe=cM;function m6(){return this._results[Symbol.iterator]()}var Yi=class i{get changes(){return this._changes??=new Pe}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;let t=i.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=m6)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=Y8(e);(this._changesDetected=!q8(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}};function dk(i){return(i.flags&128)===128}var uk=new Map,g6=0;function _6(){return g6++}function v6(i){uk.set(i[P0],i)}function b6(i){uk.delete(i[P0])}var DA="__ngContext__";function El(i,e){wl(e)?(i[DA]=e[P0],v6(e)):i[DA]=e}function hk(i){return fk(i[kf])}function pk(i){return fk(i[cs])}function fk(i){for(;i!==null&&!Ma(i);)i=i[cs];return i}var dM;function mk(i){dM=i}function y6(){if(dM!==void 0)return dM;if(typeof document<"u")return document;throw new Oe(210,!1)}var Hf=new ge("",{providedIn:"root",factory:()=>x6}),x6="ng",yE=new ge(""),Ea=new ge("",{providedIn:"platform",factory:()=>"unknown"});var Zn=new ge(""),Gf=new ge("",{providedIn:"root",factory:()=>y6().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var w6="h",C6="b";var S6=()=>null;function xE(i,e,t=!1){return S6(i,e,t)}var gk=!1,M6=new ge("",{providedIn:"root",factory:()=>gk});var Gv;function E6(){if(Gv===void 0&&(Gv=null,Of.trustedTypes))try{Gv=Of.trustedTypes.createPolicy("angular",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Gv}function U0(i){return E6()?.createHTML(i)||i}var Ca=class{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${tN})`}},uM=class extends Ca{getTypeName(){return"HTML"}},hM=class extends Ca{getTypeName(){return"Style"}},pM=class extends Ca{getTypeName(){return"Script"}},fM=class extends Ca{getTypeName(){return"URL"}},mM=class extends Ca{getTypeName(){return"ResourceURL"}};function Ia(i){return i instanceof Ca?i.changingThisBreaksApplicationSecurity:i}function nh(i,e){let t=I6(i);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${tN})`)}return t===e}function I6(i){return i instanceof Ca&&i.getTypeName()||null}function _k(i){return new uM(i)}function vk(i){return new hM(i)}function bk(i){return new pM(i)}function yk(i){return new fM(i)}function xk(i){return new mM(i)}function T6(i){let e=new _M(i);return D6()?new gM(e):e}var gM=class{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{let t=new window.DOMParser().parseFromString(U0(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch{return null}}},_M=class{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=U0(e),t}};function D6(){try{return!!new window.DOMParser().parseFromString(U0(""),"text/html")}catch{return!1}}var P6=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function wE(i){return i=String(i),i.match(P6)?i:"unsafe:"+i}function Ta(i){let e={};for(let t of i.split(","))e[t]=!0;return e}function jf(...i){let e={};for(let t of i)for(let n in t)t.hasOwnProperty(n)&&(e[n]=!0);return e}var wk=Ta("area,br,col,hr,img,wbr"),Ck=Ta("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Sk=Ta("rp,rt"),O6=jf(Sk,Ck),R6=jf(Ck,Ta("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),A6=jf(Sk,Ta("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),PA=jf(wk,R6,A6,O6),Mk=Ta("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),N6=Ta("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),k6=Ta("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),L6=jf(Mk,N6,k6),F6=Ta("script,style,template"),vM=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=z6(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=V6(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=OA(e).toLowerCase();if(!PA.hasOwnProperty(t))return this.sanitizedSomething=!0,!F6.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r"),!0}endElement(e){let t=OA(e).toLowerCase();PA.hasOwnProperty(t)&&!wk.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(RA(e))}};function B6(i,e){return(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function V6(i){let e=i.nextSibling;if(e&&i!==e.previousSibling)throw Ek(e);return e}function z6(i){let e=i.firstChild;if(e&&B6(i,e))throw Ek(e);return e}function OA(i){let e=i.nodeName;return typeof e=="string"?e:"FORM"}function Ek(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var U6=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,H6=/([^\#-~ |!])/g;function RA(i){return i.replace(/&/g,"&").replace(U6,function(e){let t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((t-55296)*1024+(n-56320)+65536)+";"}).replace(H6,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}var jv;function Ik(i,e){let t=null;try{jv=jv||T6(i);let n=e?String(e):"";t=jv.getInertBodyElement(n);let r=5,o=n;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,n=o,o=t.innerHTML,t=jv.getInertBodyElement(n)}while(n!==o);let a=new vM().sanitizeChildren(AA(t)||t);return U0(a)}finally{if(t){let n=AA(t)||t;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function AA(i){return"content"in i&&G6(i)?i.content:null}function G6(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var Zr=function(i){return i[i.NONE=0]="NONE",i[i.HTML=1]="HTML",i[i.STYLE=2]="STYLE",i[i.SCRIPT=3]="SCRIPT",i[i.URL=4]="URL",i[i.RESOURCE_URL=5]="RESOURCE_URL",i}(Zr||{});var j6=/^>|^->||--!>|)/g,$6="\u200B$1\u200B";function q6(i){return i.replace(j6,e=>e.replace(W6,$6))}function Tk(i){return i.ownerDocument.defaultView}function H0(i){return i.ownerDocument}function Dk(i){return i instanceof Function?i():i}function Pk(i){return(i??te(bt)).get(Ea)==="browser"}var Sa=function(i){return i[i.Important=1]="Important",i[i.DashCase=2]="DashCase",i}(Sa||{}),Y6;function CE(i,e){return Y6(i,e)}function Vu(i,e,t,n,r){if(n!=null){let o,s=!1;Ma(n)?o=n:wl(n)&&(s=!0,n=n[Ls]);let a=Ns(n);i===0&&t!==null?r==null?kk(e,t,a):d0(e,t,a,r||null,!0):i===1&&t!==null?d0(e,t,a,r||null,!0):i===2?c$(e,a,s):i===3&&e.destroyNode(a),o!=null&&u$(e,i,o,t,r)}}function X6(i,e){return i.createText(e)}function Z6(i,e,t){i.setValue(e,t)}function Q6(i,e){return i.createComment(q6(e))}function Ok(i,e,t){return i.createElement(e,t)}function K6(i,e){Rk(i,e),e[Ls]=null,e[Xr]=null}function J6(i,e,t,n,r,o){n[Ls]=r,n[Xr]=e,W0(i,n,t,1,r,o)}function Rk(i,e){e[ya].changeDetectionScheduler?.notify(8),W0(i,e,e[ri],2,null,null)}function e$(i){let e=i[kf];if(!e)return BS(i[Ut],i);for(;e;){let t=null;if(wl(e))t=e[kf];else{let n=e[hr];n&&(t=n)}if(!t){for(;e&&!e[cs]&&e!==i;)wl(e)&&BS(e[Ut],e),e=e[pr];e===null&&(e=i),wl(e)&&BS(e[Ut],e),t=e&&e[cs]}e=t}}function t$(i,e,t,n){let r=hr+n,o=t.length;n>0&&(t[r-1][cs]=e),n0&&(i[t-1][cs]=n[cs]);let o=n0(i,hr+e);K6(n[Ut],n);let s=o[xa];s!==null&&s.detachView(o[Ut]),n[pr]=null,n[cs]=null,n[Pt]&=-129}return n}function G0(i,e){if(!(e[Pt]&256)){let t=e[ri];t.destroyNode&&W0(i,e,t,3,null,null),e$(e)}}function BS(i,e){if(e[Pt]&256)return;let t=sn(null);try{e[Pt]&=-129,e[Pt]|=256,e[Po]&&dv(e[Po]),i$(i,e),n$(i,e),e[Ut].type===1&&e[ri].destroy();let n=e[Lc];if(n!==null&&Ma(e[pr])){n!==e[pr]&&SE(n,e);let r=e[xa];r!==null&&r.detachView(i)}b6(e)}finally{sn(t)}}function n$(i,e){let t=i.cleanup,n=e[r0];if(t!==null)for(let o=0;o=0?n[s]():n[-s].unsubscribe(),o+=2}else{let s=n[t[o+1]];t[o].call(s)}n!==null&&(e[r0]=null);let r=e[xl];if(r!==null){e[xl]=null;for(let o=0;o-1){let{encapsulation:o}=i.data[n.directiveStart+r];if(o===As.None||o===As.Emulated)return null}return Ro(n,t)}}function d0(i,e,t,n,r){i.insertBefore(e,t,n,r)}function kk(i,e,t){i.appendChild(e,t)}function NA(i,e,t,n,r){n!==null?d0(i,e,t,n,r):kk(i,e,t)}function o$(i,e,t,n){i.removeChild(e,t,n)}function ME(i,e){return i.parentNode(e)}function s$(i,e){return i.nextSibling(e)}function Lk(i,e,t){return l$(i,e,t)}function a$(i,e,t){return i.type&40?Ro(i,t):null}var l$=a$,kA;function j0(i,e,t,n){let r=Nk(i,n,e),o=e[ri],s=n.parent||e[Xr],a=Lk(s,n,e);if(r!=null)if(Array.isArray(t))for(let l=0;lOr&&Uk(i,e,Or,!1),Os(s?2:0,r),t(n,r)}finally{Vc(o),Os(s?3:1,r)}}function TE(i,e,t){if(dE(e)){let n=sn(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;snull;function y$(i,e,t,n){let r=Zk(e);r.push(t),i.firstCreatePass&&Qk(i).push(n,r.length-1)}function x$(i,e,t,n,r,o){let s=e?e.injectorIndex:-1,a=0;return zN()&&(a|=128),{type:t,index:n,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function LA(i,e,t,n,r){for(let o in e){if(!e.hasOwnProperty(o))continue;let s=e[o];if(s===void 0)continue;n??={};let a,l=Cl.None;Array.isArray(s)?(a=s[0],l=s[1]):a=s;let c=o;if(r!==null){if(!r.hasOwnProperty(o))continue;c=r[o]}i===0?FA(n,t,c,a,l):FA(n,t,c,a)}return n}function FA(i,e,t,n,r){let o;i.hasOwnProperty(t)?(o=i[t]).push(e,n):o=i[t]=[e,n],r!==void 0&&o.push(r)}function w$(i,e,t){let n=e.directiveStart,r=e.directiveEnd,o=i.data,s=e.attrs,a=[],l=null,c=null;for(let d=n;d0;){let t=i[--e];if(typeof t=="number"&&t<0)return t}return 0}function I$(i,e,t,n){let r=t.directiveStart,o=t.directiveEnd;O0(t)&&N$(e,t,i.data[r+t.componentOffset]),i.firstCreatePass||c0(t,e),El(n,e);let s=t.initialInputs;for(let a=r;a{A0(i.lView)},consumerOnSignalRead(){this.lView[Po]=this}});function q$(i){let e=i[Po]??Object.create(Y$);return e.lView=i,e}var Y$=wt(Z({},Su),{consumerIsAlwaysLive:!0,consumerMarkedDirty:i=>{let e=Bc(i.lView);for(;e&&!i2(e[Ut]);)e=Bc(e);e&&LN(e)},consumerOnSignalRead(){this.lView[Po]=this}});function i2(i){return i.type!==2}var X$=100;function r2(i,e=!0,t=0){let n=i[ya],r=n.rendererFactory,o=!1;o||r.begin?.();try{Z$(i,t)}catch(s){throw e&&Jk(i,s),s}finally{o||(r.end?.(),n.inlineEffectRunner?.flush())}}function Z$(i,e){let t=HN();try{CA(!0),wM(i,e);let n=0;for(;Lf(i);){if(n===X$)throw new Oe(103,!1);n++,wM(i,1)}}finally{CA(t)}}function Q$(i,e,t,n){let r=e[Pt];if((r&256)===256)return;let o=!1,s=!1;!o&&e[ya].inlineEffectRunner?.flush(),_E(e);let a=!0,l=null,c=null;o||(i2(i)?(c=G$(e),l=bf(c)):wR()===null?(a=!1,c=q$(e),l=bf(c)):e[Po]&&(dv(e[Po]),e[Po]=null));try{kN(e),GW(i.bindingStartIndex),t!==null&&jk(i,e,t,2,n);let d=(r&3)===3;if(!o)if(d){let p=i.preOrderCheckHooks;p!==null&&Xv(e,p,null)}else{let p=i.preOrderHooks;p!==null&&Zv(e,p,0,null),NS(e,0)}if(s||K$(e),o2(e,0),i.contentQueries!==null&&Xk(i,e),!o)if(d){let p=i.contentCheckHooks;p!==null&&Xv(e,p)}else{let p=i.contentHooks;p!==null&&Zv(e,p,1),NS(e,1)}f$(i,e);let u=i.components;u!==null&&a2(e,u,0);let h=i.viewQuery;if(h!==null&&xM(2,h,n),!o)if(d){let p=i.viewCheckHooks;p!==null&&Xv(e,p)}else{let p=i.viewHooks;p!==null&&Zv(e,p,2),NS(e,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),e[Yv]){for(let p of e[Yv])p();e[Yv]=null}o||(e[Pt]&=-73)}catch(d){throw o||A0(e),d}finally{c!==null&&(lv(c,l),a&&W$(c)),vE()}}function o2(i,e){for(let t=hk(i);t!==null;t=pk(t))for(let n=hr;n-1&&(Ff(e,n),n0(t,n))}this._attachedToViewContainer=!1}G0(this._lView[Ut],this._lView)}onDestroy(e){FN(this._lView,e)}markForCheck(){FE(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Pt]&=-129}reattach(){nM(this._lView),this._lView[Pt]|=128}detectChanges(){this._lView[Pt]|=1024,r2(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Oe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=eM(this._lView),t=this._lView[Lc];t!==null&&!e&&SE(t,this._lView),Rk(this._lView[Ut],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Oe(902,!1);this._appRef=e;let t=eM(this._lView),n=this._lView[Lc];n!==null&&!t&&Ak(n,this._lView),nM(this._lView)}},Hn=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=n9;let i=e;return i})(),e9=Hn,t9=class extends e9{constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=Wf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new Hc(r)}};function n9(){return Y0(Xi(),jt())}function Y0(i,e){return i.type&4?new t9(e,i,th(i,e)):null}var lEe=new RegExp(`^(\\d+)*(${C6}|${w6})*(.*)`);var i9=()=>null;function Xu(i,e){return i9(i,e)}var Zu=class{},BE=new ge("",{providedIn:"root",factory:()=>!1});var l2=new ge(""),CM=class{},h0=class{};function r9(i){let e=Error(`No component factory found for ${Pr(i)}.`);return e[o9]=i,e}var o9="ngComponent";var SM=class{resolveComponentFactory(e){throw r9(e)}},XE=class XE{};XE.NULL=new SM;var ds=XE,Il=class{},qc=(()=>{let e=class e{constructor(){this.destroyNode=null}};e.__NG_ELEMENT_ID__=()=>s9();let i=e;return i})();function s9(){let i=jt(),e=Xi(),t=Dl(e.index,i);return(wl(t)?t:i)[ri]}var a9=(()=>{let e=class e{};e.\u0275prov=ee({token:e,providedIn:"root",factory:()=>null});let i=e;return i})();var BA=new Set;function Ao(i){BA.has(i)||(BA.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}function c2(i){let e=!0;return setTimeout(()=>{e&&(e=!1,i())}),typeof Of.requestAnimationFrame=="function"&&Of.requestAnimationFrame(()=>{e&&(e=!1,i())}),()=>{e=!1}}function VA(i){let e=!0;return queueMicrotask(()=>{e&&i()}),()=>{e=!1}}function zA(...i){}var Le=class i{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Pe(!1),this.onMicrotaskEmpty=new Pe(!1),this.onStable=new Pe(!1),this.onError=new Pe(!1),typeof Zone>"u")throw new Oe(908,!1);Zone.assertZonePatched();let r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&t,r.shouldCoalesceRunChangeDetection=n,r.callbackScheduled=!1,d9(r)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get("isAngularZone")===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new Oe(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new Oe(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,l9,zA,zA);try{return o.runTask(s,t,n)}finally{o.cancelTask(s)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},l9={};function VE(i){if(i._nesting==0&&!i.hasPendingMicrotasks&&!i.isStable)try{i._nesting++,i.onMicrotaskEmpty.emit(null)}finally{if(i._nesting--,!i.hasPendingMicrotasks)try{i.runOutsideAngular(()=>i.onStable.emit(null))}finally{i.isStable=!0}}}function c9(i){i.isCheckStableRunning||i.callbackScheduled||(i.callbackScheduled=!0,Zone.root.run(()=>{c2(()=>{i.callbackScheduled=!1,MM(i),i.isCheckStableRunning=!0,VE(i),i.isCheckStableRunning=!1})}),MM(i))}function d9(i){let e=()=>{c9(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,n,r,o,s,a)=>{if(u9(a))return t.invokeTask(r,o,s,a);try{return UA(i),t.invokeTask(r,o,s,a)}finally{(i.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&e(),HA(i)}},onInvoke:(t,n,r,o,s,a,l)=>{try{return UA(i),t.invoke(r,o,s,a,l)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!h9(a)&&e(),HA(i)}},onHasTask:(t,n,r,o)=>{t.hasTask(r,o),n===r&&(o.change=="microTask"?(i._hasPendingMicrotasks=o.microTask,MM(i),VE(i)):o.change=="macroTask"&&(i.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,n,r,o)=>(t.handleError(r,o),i.runOutsideAngular(()=>i.onError.emit(o)),!1)})}function MM(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function UA(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function HA(i){i._nesting--,VE(i)}var EM=class{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Pe,this.onMicrotaskEmpty=new Pe,this.onStable=new Pe,this.onError=new Pe}run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function u9(i){return d2(i,"__ignore_ng_zone__")}function h9(i){return d2(i,"__scheduler_tick__")}function d2(i,e){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[e]===!0}var Dr=function(i){return i[i.EarlyRead=0]="EarlyRead",i[i.Write=1]="Write",i[i.MixedReadWrite=2]="MixedReadWrite",i[i.Read=3]="Read",i}(Dr||{}),u2={destroy(){}};function qf(i,e){!e&&Ju(qf);let t=e?.injector??te(bt);return Pk(t)?(Ao("NgAfterRender"),h2(i,t,!1,e?.phase??Dr.MixedReadWrite)):u2}function fr(i,e){!e&&Ju(fr);let t=e?.injector??te(bt);return Pk(t)?(Ao("NgAfterNextRender"),h2(i,t,!0,e?.phase??Dr.MixedReadWrite)):u2}function p9(i,e){if(i instanceof Function)switch(e){case Dr.EarlyRead:return{earlyRead:i};case Dr.Write:return{write:i};case Dr.MixedReadWrite:return{mixedReadWrite:i};case Dr.Read:return{read:i}}return i}function h2(i,e,t,n){let r=p9(i,n),o=e.get(zE),s=o.handler??=new TM,a=[],l=[],c=()=>{for(let p of l)s.unregister(p);d()},d=e.get(Ni).onDestroy(c),u=0,h=(p,f)=>{if(!f)return;let m=t?(...g)=>(u--,u<1&&c(),f(...g)):f,b=ks(e,()=>new IM(p,a,m));s.register(b),l.push(b),u++};return h(Dr.EarlyRead,r.earlyRead),h(Dr.Write,r.write),h(Dr.MixedReadWrite,r.mixedReadWrite),h(Dr.Read,r.read),{destroy:c}}var IM=class{constructor(e,t,n){this.phase=e,this.pipelinedArgs=t,this.callbackFn=n,this.zone=te(Le),this.errorHandler=te(Rr,{optional:!0}),te(Zu,{optional:!0})?.notify(6)}invoke(){try{let e=this.zone.runOutsideAngular(()=>this.callbackFn.apply(null,this.pipelinedArgs));this.pipelinedArgs.splice(0,this.pipelinedArgs.length,e)}catch(e){this.errorHandler?.handleError(e)}}},TM=class{constructor(){this.executingCallbacks=!1,this.buckets={[Dr.EarlyRead]:new Set,[Dr.Write]:new Set,[Dr.MixedReadWrite]:new Set,[Dr.Read]:new Set},this.deferredCallbacks=new Set}register(e){(this.executingCallbacks?this.deferredCallbacks:this.buckets[e.phase]).add(e)}unregister(e){this.buckets[e.phase].delete(e),this.deferredCallbacks.delete(e)}execute(){this.executingCallbacks=!0;for(let e of Object.values(this.buckets))for(let t of e)t.invoke();this.executingCallbacks=!1;for(let e of this.deferredCallbacks)this.buckets[e.phase].add(e);this.deferredCallbacks.clear()}destroy(){for(let e of Object.values(this.buckets))e.clear();this.deferredCallbacks.clear()}},zE=(()=>{let e=class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){let n=[...this.internalCallbacks];this.internalCallbacks.length=0;for(let r of n)r()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}};e.\u0275prov=ee({token:e,providedIn:"root",factory:()=>new e});let i=e;return i})();function p0(i,e,t){let n=t?i.styles:null,r=t?i.classes:null,o=0;if(e!==null)for(let s=0;s0&&Vk(i,t,o.join(" "))}}function y9(i,e,t){let n=i.projection=[];for(let r=0;r{let e=class e{};e.__NG_ELEMENT_ID__=w9;let i=e;return i})();function w9(){let i=Xi();return f2(i,jt())}var C9=Yt,p2=class extends C9{constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return th(this._hostTNode,this._hostLView)}get injector(){return new kc(this._hostTNode,this._hostLView)}get parentInjector(){let e=bE(this._hostTNode,this._hostLView);if(KN(e)){let t=l0(e,this._hostLView),n=a0(e),r=t[Ut].data[n+8];return new kc(r,t)}else return new kc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=jA(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-hr}createEmbeddedView(e,t,n){let r,o;typeof n=="number"?r=n:n!=null&&(r=n.index,o=n.injector);let s=Xu(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,Yu(this._hostTNode,s)),a}createComponent(e,t,n,r,o){let s=e&&!MW(e),a;if(s)a=t;else{let f=t||{};a=f.index,n=f.injector,r=f.projectableNodes,o=f.environmentInjector||f.ngModuleRef}let l=s?e:new Qu(Sl(e)),c=n||this.parentInjector;if(!o&&l.ngModule==null){let m=(s?c:this.parentInjector).get(qi,null);m&&(o=m)}let d=Sl(l.componentType??{}),u=Xu(this._lContainer,d?.id??null),h=u?.firstChild??null,p=l.create(c,r,h,o);return this.insertImpl(p.hostView,a,Yu(this._hostTNode,u)),p}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(AW(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[pr],c=new p2(l,l[Xr],l[pr]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return $f(s,r,o,n),e.attachToViewContainerRef(),uN(VS(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=jA(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=Ff(this._lContainer,t);n&&(n0(VS(this._lContainer),t),G0(n[Ut],n))}detach(e){let t=this._adjustIndex(e,-1),n=Ff(this._lContainer,t);return n&&n0(VS(this._lContainer),t)!=null?new Hc(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function jA(i){return i[o0]}function VS(i){return i[o0]||(i[o0]=[])}function f2(i,e){let t,n=e[i.index];return Ma(n)?t=n:(t=Yk(n,e,null,i),e[i.index]=t,q0(e,t)),M9(t,e,i,n),new p2(t,i,e)}function S9(i,e){let t=i[ri],n=t.createComment(""),r=Ro(e,i),o=ME(t,r);return d0(t,o,n,s$(t,r),!1),n}var M9=T9,E9=()=>!1;function I9(i,e,t){return E9(i,e,t)}function T9(i,e,t,n){if(i[Fc])return;let r;t.type&8?r=Ns(n):r=S9(e,t),i[Fc]=r}var PM=class i{constructor(e){this.queryList=e,this.matches=null}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},OM=class i{constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let n=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let o=0;o0)n.push(s[a/2]);else{let c=o[a+1],d=e[-l];for(let u=hr;ue.trim())}function v2(i,e,t){i.queries===null&&(i.queries=new RM),i.queries.track(new AM(e,t))}function k9(i,e){let t=i.contentQueries||(i.contentQueries=[]),n=t.length?t[t.length-1]:-1;e!==n&&t.push(i.queries.length-1,e)}function HE(i,e){return i.queries.getByIndex(e)}function b2(i,e){let t=i[Ut],n=HE(t,e);return n.crossesNgTemplate?NM(t,i,e,[]):m2(t,i,n,e)}function GE(i){return typeof i=="function"&&i[Eo]!==void 0}function yt(i,e){Ao("NgSignals");let t=AR(i),n=t[Eo];return e?.equal&&(n.equal=e.equal),t.set=r=>pS(n,r),t.update=r=>NR(n,r),t.asReadonly=L9.bind(t),t}function L9(){let i=this[Eo];if(i.readonlyFn===void 0){let e=()=>this();e[Eo]=i,i.readonlyFn=e}return i.readonlyFn}function y2(i,e){let t,n=hS(()=>{t._dirtyCounter();let r=z9(t,i);if(e&&r===void 0)throw new Oe(-951,!1);return r});return t=n[Eo],t._dirtyCounter=yt(0),t._flatValue=void 0,n}function F9(){return y2(!0,!1)}function B9(){return y2(!0,!0)}function V9(i,e){let t=i[Eo];t._lView=jt(),t._queryIndex=e,t._queryList=UE(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(n=>n+1))}function z9(i,e){let t=i._lView,n=i._queryIndex;if(t===void 0||n===void 0||t[Pt]&4)return e?void 0:Tr;let r=UE(t,n),o=b2(t,n);return r.reset(o,ck),e?r.first:r._changesDetected||i._flatValue===void 0?i._flatValue=r.toArray():i._flatValue}function WA(i,e){return F9()}function U9(i,e){return B9()}var x2=(WA.required=U9,WA);function H9(i){return Object.getPrototypeOf(i.prototype).constructor}function nn(i){let e=H9(i.type),t=!0,n=[i];for(;e;){let r;if(wa(i))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Oe(903,!1);r=e.\u0275dir}if(r){if(t){n.push(r);let s=i;s.inputs=Wv(i.inputs),s.inputTransforms=Wv(i.inputTransforms),s.declaredInputs=Wv(i.declaredInputs),s.outputs=Wv(i.outputs);let a=r.hostBindings;a&&q9(i,a);let l=r.viewQuery,c=r.contentQueries;if(l&&W9(i,l),c&&$9(i,c),G9(i,r),T8(i.outputs,r.outputs),wa(r)&&r.data.animation){let d=i.data;d.animation=(d.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s=0;n--){let r=i[n];r.hostVars=e+=r.hostVars,r.hostAttrs=Af(r.hostAttrs,t=Af(t,r.hostAttrs))}}function Wv(i){return i===ba?{}:i===Tr?[]:i}function W9(i,e){let t=i.viewQuery;t?i.viewQuery=(n,r)=>{e(n,r),t(n,r)}:i.viewQuery=e}function $9(i,e){let t=i.contentQueries;t?i.contentQueries=(n,r,o)=>{e(n,r,o),t(n,r,o)}:i.contentQueries=e}function q9(i,e){let t=i.hostBindings;t?i.hostBindings=(n,r)=>{e(n,r),t(n,r)}:i.hostBindings=e}function w2(i){let e=t=>{let n=(Array.isArray(i)?i:i()).map(r=>typeof r=="function"?{directive:$i(r),inputs:ba,outputs:ba}:{directive:$i(r.directive),inputs:$A(r.inputs),outputs:$A(r.outputs)});t.hostDirectives===null?(t.findHostDirectiveDefs=C2,t.hostDirectives=n):t.hostDirectives.unshift(...n)};return e.ngInherit=!0,e}function C2(i,e,t){if(i.hostDirectives!==null)for(let n of i.hostDirectives){let r=aE(n.directive);Y9(r.declaredInputs,n.inputs),C2(r,e,t),t.set(r,n),e.push(r)}}function $A(i){if(i===void 0||i.length===0)return ba;let e={};for(let t=0;tt()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},LM=class extends Bf{constructor(e){super(),this.moduleType=e}create(e){return new kM(this.moduleType,e,[])}};var g0=class extends Tl{constructor(e){super(),this.componentFactoryResolver=new f0(this),this.instance=null;let t=new Nf([...e.providers,{provide:Tl,useValue:this},{provide:ds,useValue:this.componentFactoryResolver}],e.parent||D0(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function jE(i,e,t=null){return new g0({providers:i,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}function S2(i){return Z9(i)?Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i:!1}function X9(i,e){if(Array.isArray(i))for(let t=0;t>17&32767}function o7(i){return(i&2)==2}function s7(i,e){return i&131071|e<<17}function BM(i){return i|2}function Ku(i){return(i&131068)>>2}function zS(i,e){return i&-131069|e<<2}function a7(i){return(i&1)===1}function VM(i){return i|1}function l7(i,e,t,n,r,o){let s=o?e.classBindings:e.styleBindings,a=Gc(s),l=Ku(s);i[n]=t;let c=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||Uf(u,d)>0)&&(c=!0)}else d=t;if(r)if(l!==0){let h=Gc(i[a+1]);i[n+1]=$v(h,a),h!==0&&(i[h+1]=zS(i[h+1],n)),i[a+1]=s7(i[a+1],n)}else i[n+1]=$v(a,0),a!==0&&(i[a+1]=zS(i[a+1],n)),a=n;else i[n+1]=$v(l,0),a===0?a=n:i[l+1]=zS(i[l+1],n),l=n;c&&(i[n+1]=BM(i[n+1])),qA(i,d,n,!0),qA(i,d,n,!1),c7(e,d,i,n,o),s=$v(a,l),o?e.classBindings=s:e.styleBindings=s}function c7(i,e,t,n,r){let o=r?i.residualClasses:i.residualStyles;o!=null&&typeof e=="string"&&Uf(o,e)>=0&&(t[n+1]=VM(t[n+1]))}function qA(i,e,t,n){let r=i[t+1],o=e===null,s=n?Gc(r):Ku(r),a=!1;for(;s!==0&&(a===!1||o);){let l=i[s],c=i[s+1];d7(l,e)&&(a=!0,i[s+1]=n?VM(c):BM(c)),s=n?Gc(c):Ku(c)}a&&(i[t+1]=n?BM(r):VM(r))}function d7(i,e){return i===null||e==null||(Array.isArray(i)?i[1]:i)===e?!0:Array.isArray(i)&&typeof e=="string"?Uf(i,e)>=0:!1}var ls={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function u7(i){return i.substring(ls.key,ls.keyEnd)}function h7(i){return p7(i),I2(i,T2(i,0,ls.textEnd))}function I2(i,e){let t=ls.textEnd;return t===e?-1:(e=ls.keyEnd=f7(i,ls.key=e,t),T2(i,e,t))}function p7(i){ls.key=0,ls.keyEnd=0,ls.value=0,ls.valueEnd=0,ls.textEnd=i.length}function T2(i,e,t){for(;e32;)e++;return e}function N(i,e,t){let n=jt(),r=Wc();if(Oo(n,r,e)){let o=oi(),s=L0();RE(o,s,n,i,e,n[ri],t,!1)}return N}function zM(i,e,t,n,r){let o=e.inputs,s=r?"class":"style";NE(i,t,o[s],s,n)}function tn(i,e,t){return P2(i,e,t,!1),tn}function se(i,e){return P2(i,e,null,!0),se}function Nr(i){O2(y7,D2,i,!0)}function D2(i,e){for(let t=h7(e);t>=0;t=I2(e,t))E0(i,u7(e),!0)}function P2(i,e,t,n){let r=jt(),o=oi(),s=N0(2);if(o.firstUpdatePass&&A2(o,i,s,n),e!==Ar&&Oo(r,s,e)){let a=o.data[Fs()];N2(o,a,r,r[ri],i,r[s+1]=w7(e,t),n,s)}}function O2(i,e,t,n){let r=oi(),o=N0(2);r.firstUpdatePass&&A2(r,null,o,n);let s=jt();if(t!==Ar&&Oo(s,o,t)){let a=r.data[Fs()];if(k2(a,n)&&!R2(r,o)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=$S(l,t||"")),zM(r,a,s,t,n)}else x7(r,a,s,s[ri],s[o+1],s[o+1]=b7(i,e,t),n,o)}}function R2(i,e){return e>=i.expandoStartIndex}function A2(i,e,t,n){let r=i.data;if(r[t+1]===null){let o=r[Fs()],s=R2(i,t);k2(o,n)&&e===null&&!s&&(e=!1),e=m7(r,o,e,n),l7(r,o,e,t,s,n)}}function m7(i,e,t,n){let r=mE(i),o=n?e.residualClasses:e.residualStyles;if(r===null)(n?e.classBindings:e.styleBindings)===0&&(t=US(null,i,e,t,n),t=Vf(t,e.attrs,n),o=null);else{let s=e.directiveStylingLast;if(s===-1||i[s]!==r)if(t=US(r,i,e,t,n),o===null){let l=g7(i,e,n);l!==void 0&&Array.isArray(l)&&(l=US(null,i,e,l[1],n),l=Vf(l,e.attrs,n),_7(i,e,n,l))}else o=v7(i,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),t}function g7(i,e,t){let n=t?e.classBindings:e.styleBindings;if(Ku(n)!==0)return i[Gc(n)]}function _7(i,e,t,n){let r=t?e.classBindings:e.styleBindings;i[Gc(r)]=n}function v7(i,e,t){let n,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0;){let l=i[r],c=Array.isArray(l),d=c?l[1]:l,u=d===null,h=t[r+1];h===Ar&&(h=u?Tr:void 0);let p=u?RS(h,n):d===n?h:void 0;if(c&&!v0(p)&&(p=RS(l,n)),v0(p)&&(a=p,s))return a;let f=i[r+1];r=s?Gc(f):Ku(f)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=RS(l,n))}return a}function v0(i){return i!==void 0}function w7(i,e){return i==null||i===""||(typeof e=="string"?i=i+e:typeof i=="object"&&(i=Pr(Ia(i)))),i}function k2(i,e){return(i.flags&(e?8:16))!==0}function L2(i,e,t){let n=jt(),r=E2(n,i,e,t);O2(E0,D2,r,!0)}var UM=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),o=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,o),this.attach(r,s)}else this.attach(n,o)}move(e,t){this.attach(t,this.detach(e))}};function HS(i,e,t,n,r){return i===t&&Object.is(e,n)?1:Object.is(r(i,e),r(t,n))?-1:0}function C7(i,e,t){let n,r,o=0,s=i.length-1,a=void 0;if(Array.isArray(e)){let l=e.length-1;for(;o<=s&&o<=l;){let c=i.at(o),d=e[o],u=HS(o,c,o,d,t);if(u!==0){u<0&&i.updateValue(o,d),o++;continue}let h=i.at(s),p=e[l],f=HS(s,h,l,p,t);if(f!==0){f<0&&i.updateValue(s,p),s--,l--;continue}let m=t(o,c),b=t(s,h),g=t(o,d);if(Object.is(g,b)){let _=t(l,p);Object.is(_,m)?(i.swap(o,s),i.updateValue(s,p),l--,s--):i.move(s,o),i.updateValue(o,d),o++;continue}if(n??=new b0,r??=ZA(i,o,s,t),HM(i,n,o,g))i.updateValue(o,d),o++,s++;else if(r.has(g))n.set(m,i.detach(o)),s--;else{let _=i.create(o,e[o]);i.attach(o,_),o++,s++}}for(;o<=l;)XA(i,n,t,o,e[o]),o++}else if(e!=null){let l=e[Symbol.iterator](),c=l.next();for(;!c.done&&o<=s;){let d=i.at(o),u=c.value,h=HS(o,d,o,u,t);if(h!==0)h<0&&i.updateValue(o,u),o++,c=l.next();else{n??=new b0,r??=ZA(i,o,s,t);let p=t(o,u);if(HM(i,n,o,p))i.updateValue(o,u),o++,s++,c=l.next();else if(!r.has(p))i.attach(o,i.create(o,u)),o++,s++,c=l.next();else{let f=t(o,d);n.set(f,i.detach(o)),s--}}}for(;!c.done;)XA(i,n,t,i.length,c.value),c=l.next()}for(;o<=s;)i.destroy(i.detach(s--));n?.forEach(l=>{i.destroy(l)})}function HM(i,e,t,n){return e!==void 0&&e.has(n)?(i.attach(t,e.get(n)),e.delete(n),!0):!1}function XA(i,e,t,n,r){if(HM(i,e,n,t(n,r)))i.updateValue(n,r);else{let o=i.create(n,r);i.attach(n,o)}}function ZA(i,e,t,n){let r=new Set;for(let o=e;o<=t;o++)r.add(n(o,i.at(o)));return r}var b0=class{constructor(){this.kvMap=new Map,this._vMap=void 0}has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function ae(i,e){Ao("NgControlFlow");let t=jt(),n=Wc(),r=t[n]!==Ar?t[n]:-1,o=r!==-1?y0(t,Or+r):void 0,s=0;if(Oo(t,n,i)){let a=sn(null);try{if(o!==void 0&&t2(o,s),i!==-1){let l=Or+i,c=y0(t,l),d=$M(t[Ut],l),u=Xu(c,d.tView.ssrId),h=Wf(t,d,e,{dehydratedView:u});$f(c,h,s,Yu(d,u))}}finally{sn(a)}}else if(o!==void 0){let a=e2(o,s);a!==void 0&&(a[ur]=e)}}var GM=class{constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-hr}};function X0(i){return i}function Qr(i,e){return e}var jM=class{constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function ln(i,e,t,n,r,o,s,a,l,c,d,u,h){Ao("NgControlFlow");let p=jt(),f=oi(),m=l!==void 0,b=jt(),g=a?s.bind(b[no][ur]):s,_=new jM(m,g);b[Or+i]=_,_0(p,f,i+1,e,t,n,r,Ml(f.consts,o)),m&&_0(p,f,i+2,l,c,d,u,Ml(f.consts,h))}var WM=class extends UM{constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n,this.operationsCounter=void 0,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-hr}at(e){return this.getLView(e)[ur].$implicit}attach(e,t){let n=t[Wu];this.needsIndexUpdate||=e!==this.length,$f(this.lContainer,t,e,Yu(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,S7(this.lContainer,e)}create(e,t){let n=Xu(this.lContainer,this.templateTNode.tView.ssrId),r=Wf(this.hostLView,this.templateTNode,new GM(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){G0(e[Ut],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[ur].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e(V0(!0),Ok(n,r,ZW()));function T7(i,e,t,n,r){let o=e.consts,s=Ml(o,n),a=ih(e,i,8,"ng-container",s);s!==null&&p0(a,s,!0);let l=Ml(o,r);return AE(e,t,a,l),e.queries!==null&&e.queries.elementStart(e,a),a}function oo(i,e,t){let n=jt(),r=oi(),o=i+Or,s=r.firstCreatePass?T7(o,r,n,e,t):r.data[o];jc(s,!0);let a=D7(r,n,s,i);return n[o]=a,B0()&&j0(r,n,a,s),El(a,n),R0(s)&&(DE(r,n,s),TE(r,s,n)),t!=null&&PE(n,s),oo}function so(){let i=Xi(),e=oi();return pE()?fE():(i=i.parent,jc(i,!1)),e.firstCreatePass&&(z0(e,i),dE(i)&&e.queries.elementEnd(i)),so}function Zi(i,e,t){return oo(i,e,t),so(),Zi}var D7=(i,e,t,n)=>(V0(!0),Q6(e[ri],""));function ie(){return jt()}function No(i,e,t){let n=jt(),r=Wc();if(Oo(n,r,e)){let o=oi(),s=L0();RE(o,s,n,i,e,n[ri],t,!0)}return No}function Yf(i,e,t){let n=jt(),r=Wc();if(Oo(n,r,e)){let o=oi(),s=L0(),a=mE(o.data),l=Kk(a,s,n);RE(o,s,n,i,e,l,t,!0)}return Yf}var x0="en-US";var P7=x0;function O7(i){typeof i=="string"&&(P7=i.toLowerCase().replace(/_/g,"-"))}var R7=(i,e,t)=>{};function H(i,e,t,n){let r=jt(),o=oi(),s=Xi();return F2(o,r,r[ri],s,i,e,n),H}function WE(i,e){let t=Xi(),n=jt(),r=oi(),o=mE(r.data),s=Kk(o,t,n);return F2(r,n,s,t,i,e),WE}function A7(i,e,t,n){let r=i.cleanup;if(r!=null)for(let o=0;ol?a[l]:null}typeof s=="string"&&(o+=2)}return null}function F2(i,e,t,n,r,o,s){let a=R0(n),c=i.firstCreatePass&&Qk(i),d=e[ur],u=Zk(e),h=!0;if(n.type&3||s){let m=Ro(n,e),b=s?s(m):m,g=u.length,_=s?C=>s(Ns(C[n.index])):n.index,x=null;if(!s&&a&&(x=A7(i,e,r,n.index)),x!==null){let C=x.__ngLastListenerFn__||x;C.__ngNextListenerFn__=o,x.__ngLastListenerFn__=o,h=!1}else{o=KA(n,e,d,o),R7(m,r,o);let C=t.listen(b,r,o);u.push(o,C),c&&c.push(r,_,g,g+1)}}else o=KA(n,e,d,o);let p=n.outputs,f;if(h&&p!==null&&(f=p[r])){let m=f.length;if(m)for(let b=0;b-1?Dl(i.index,e):e;FE(s,5);let a=QA(e,t,n,o),l=r.__ngNextListenerFn__;for(;l;)a=QA(e,t,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function I(i=1){return YW(i)}function N7(i,e){let t=null,n=rW(i);for(let r=0;r(V0(!0),X6(e[ri],n));function nt(i){return Me("",i,""),nt}function Me(i,e,t){let n=jt(),r=E2(n,i,e,t);return r!==Ar&&kE(n,Fs(),r),Me}function $E(i,e,t,n,r){let o=jt(),s=i7(o,i,e,t,n,r);return s!==Ar&&kE(o,Fs(),s),$E}function Yc(i,e,t,n,r,o,s,a,l){let c=jt(),d=r7(c,i,e,t,n,r,o,s,a,l);return d!==Ar&&kE(c,Fs(),d),Yc}function F7(i,e,t){let n=oi();if(n.firstCreatePass){let r=wa(i);qM(t,n.data,n.blueprint,r,!0),qM(e,n.data,n.blueprint,r,!1)}}function qM(i,e,t,n,r){if(i=$i(i),Array.isArray(i))for(let o=0;o>20;if(ju(i)||!i.multi){let p=new zc(c,r,M),f=jS(l,e,r?d:d+h,u);f===-1?(sM(c0(a,s),o,l),GS(o,i,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(p),s.push(p)):(t[f]=p,s[f]=p)}else{let p=jS(l,e,d+h,u),f=jS(l,e,d,d+h),m=p>=0&&t[p],b=f>=0&&t[f];if(r&&!b||!r&&!m){sM(c0(a,s),o,l);let g=z7(r?V7:B7,t.length,r,n,c);!r&&b&&(t[f].providerFactory=g),GS(o,i,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(g),s.push(g)}else{let g=z2(t[r?f:p],c,!r&&n);GS(o,i,p>-1?p:f,g)}!r&&n&&b&&t[f].componentProviders++}}}function GS(i,e,t,n){let r=ju(e),o=vW(e);if(r||o){let l=(o?$i(e.useClass):e).prototype.ngOnDestroy;if(l){let c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&e.multi){let d=c.indexOf(t);d===-1?c.push(t,[n,l]):c[d+1].push(n,l)}else c.push(t,l)}}}function z2(i,e,t){return t&&i.componentProviders++,i.multi.push(e)-1}function jS(i,e,t,n){for(let r=t;r{t.providersResolver=(n,r)=>F7(n,r?r(i):i,e)}}var U7=(()=>{let e=class e{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=CN(!1,n.type),o=r.length>0?jE([r],this._injector,`Standalone[${n.type.name}]`):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()}}};e.\u0275prov=ee({token:e,providedIn:"environment",factory:()=>new e(X(qi))});let i=e;return i})();function ce(i){Ao("NgStandalone"),i.getStandaloneInjector=e=>e.get(U7).getOrCreateStandaloneInjector(i)}function U2(i,e,t){let n=GN()+i,r=jt();return r[n]===Ar?M2(r,n,t?e.call(t):e()):Q9(r,n)}function Pl(i,e,t,n){return G7(jt(),GN(),i,e,t,n)}function H7(i,e){let t=i[e];return t===Ar?void 0:t}function G7(i,e,t,n,r,o){let s=e+t;return Oo(i,s,r)?M2(i,s+1,o?n.call(o,r):n(r)):H7(i,s+1)}function kt(i,e){return Y0(i,e)}var Z0=(()=>{let e=class e{log(n){console.log(n)}warn(n){console.warn(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"platform"});let i=e;return i})();var H2=new ge("");function Xc(i){return!!i&&typeof i.then=="function"}function G2(i){return!!i&&typeof i.subscribe=="function"}var j2=new ge(""),W2=(()=>{let e=class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r}),this.appInits=te(j2,{optional:!0})??[]}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let s=o();if(Xc(s))n.push(s);else if(G2(s)){let a=new Promise((l,c)=>{s.subscribe({complete:l,error:c})});n.push(a)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),n.length===0&&r(),this.initialized=!0}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),qE=new ge("");function j7(){RR(()=>{throw new Oe(600,!1)})}function W7(i){return i.isBoundToModule}var $7=10;function q7(i,e,t){try{let n=t();return Xc(n)?n.catch(r=>{throw e.runOutsideAngular(()=>i.handleError(r)),r}):n}catch(n){throw e.runOutsideAngular(()=>i.handleError(n)),n}}var us=(()=>{let e=class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=te(lk),this.afterRenderEffectManager=te(zE),this.zonelessEnabled=te(BE),this.externalTestViews=new Set,this.beforeRender=new me,this.afterTick=new me,this.componentTypes=[],this.components=[],this.isStable=te($c).hasPendingTasks.pipe(Je(n=>!n)),this._injector=te(qi)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,r){let o=n instanceof h0;if(!this._injector.get(W2).done){let p=!o&&bN(n),f=!1;throw new Oe(405,f)}let a;o?a=n:a=this._injector.get(ds).resolveComponentFactory(n),this.componentTypes.push(a.componentType);let l=W7(a)?void 0:this._injector.get(Tl),c=r||a.selector,d=a.create(bt.NULL,[],c,l),u=d.location.nativeElement,h=d.injector.get(H2,null);return h?.registerApplication(u),d.onDestroy(()=>{this.detachView(d.hostView),WS(this.components,d),h?.unregisterApplication(u)}),this._loadComponent(d),d}tick(){this._tick(!0)}_tick(n){if(this._runningTick)throw new Oe(101,!1);let r=sn(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(n)}catch(o){this.internalErrorHandler(o)}finally{this._runningTick=!1,sn(r),this.afterTick.next()}}detectChangesInAttachedViews(n){let r=null;this._injector.destroyed||(r=this._injector.get(Il,null,{optional:!0}));let o=0,s=this.afterRenderEffectManager;for(;o<$7;){let a=o===0;if(n||!a){this.beforeRender.next(a);for(let{_lView:l,notifyErrorHandler:c}of this._views)Y7(l,c,a,this.zonelessEnabled)}else r?.begin?.(),r?.end?.();if(o++,s.executeInternalCallbacks(),!this.allViews.some(({_lView:l})=>Lf(l))&&(s.execute(),!this.allViews.some(({_lView:l})=>Lf(l))))break}}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;WS(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);let r=this._injector.get(qE,[]);[...this._bootstrapListeners,...r].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._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>WS(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Oe(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function WS(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function Y7(i,e,t,n){if(!t&&!Lf(i))return;r2(i,e,t&&!n?0:1)}var XM=class{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}},YE=(()=>{let e=class e{compileModuleSync(n){return new LM(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let r=this.compileModuleSync(n),o=yN(n),s=Dk(o.declarations).reduce((a,l)=>{let c=Sl(l);return c&&a.push(new Qu(c)),a},[]);return new XM(r,s)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var X7=(()=>{let e=class e{constructor(){this.zone=te(Le),this.changeDetectionScheduler=te(Zu),this.applicationRef=te(us)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),Z7=new ge("",{factory:()=>!1});function $2({ngZoneFactory:i,ignoreChangesOutsideZone:e}){return i??=()=>new Le(Y2()),[{provide:Le,useFactory:i},{provide:Gu,multi:!0,useFactory:()=>{let t=te(X7,{optional:!0});return()=>t.initialize()}},{provide:Gu,multi:!0,useFactory:()=>{let t=te(K7);return()=>{t.initialize()}}},{provide:lk,useFactory:Q7},e===!0?{provide:l2,useValue:!0}:[]]}function Q7(){let i=te(Le),e=te(Rr);return t=>i.runOutsideAngular(()=>e.handleError(t))}function q2(i){let e=i?.ignoreChangesOutsideZone,t=$2({ngZoneFactory:()=>{let n=Y2(i);return n.shouldCoalesceEventChangeDetection&&Ao("NgZone_CoalesceEvent"),new Le(n)},ignoreChangesOutsideZone:e});return I0([{provide:Z7,useValue:!0},{provide:BE,useValue:!1},t])}function Y2(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:i?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:i?.runCoalescing??!1}}var K7=(()=>{let e=class e{constructor(){this.subscription=new Ct,this.initialized=!1,this.zone=te(Le),this.pendingTasks=te($c)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Le.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Le.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var J7=(()=>{let e=class e{constructor(){this.appRef=te(us),this.taskService=te($c),this.ngZone=te(Le),this.zonelessEnabled=te(BE),this.disableScheduling=te(l2,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new Ct,this.cancelScheduledCallback=null,this.shouldRefreshViews=!1,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof EM||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;switch(n){case 3:case 2:case 0:case 4:case 5:case 1:{this.shouldRefreshViews=!0;break}case 8:case 7:case 6:case 9:default:}if(!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?VA:c2;this.pendingRenderTaskId=this.taskService.add(),this.zoneIsDefined?Zone.root.run(()=>{this.cancelScheduledCallback=r(()=>{this.tick(this.shouldRefreshViews)})}):this.cancelScheduledCallback=r(()=>{this.tick(this.shouldRefreshViews)})}shouldScheduleTick(){return!(this.disableScheduling||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Le.isInAngularZone())}tick(n){if(this.runningTick||this.appRef.destroyed)return;let r=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick(n)},void 0,this.schedulerTickApplyArgs)}catch(o){throw this.taskService.remove(r),o}finally{this.cleanup()}this.useMicrotaskScheduler=!0,VA(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(r)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.shouldRefreshViews=!1,this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function eq(){return typeof $localize<"u"&&$localize.locale||x0}var Q0=new ge("",{providedIn:"root",factory:()=>te(Q0,en.Optional|en.SkipSelf)||eq()});var X2=new ge("");var Jv=null;function tq(i=[],e){return bt.create({name:e,providers:[{provide:T0,useValue:"platform"},{provide:X2,useValue:new Set([()=>Jv=null])},...i]})}function nq(i=[]){if(Jv)return Jv;let e=tq(i);return Jv=e,j7(),iq(e),e}function iq(i){i.get(yE,null)?.forEach(t=>t())}var Fe=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=rq;let i=e;return i})();function rq(i){return oq(Xi(),jt(),(i&16)===16)}function oq(i,e,t){if(O0(i)&&!t){let n=Dl(i.index,e);return new Hc(n,n)}else if(i.type&175){let n=e[no];return new Hc(n,e)}return null}var ZM=class{constructor(){}supports(e){return S2(e)}create(e){return new QM(e)}},sq=(i,e)=>e,QM=class{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||sq}forEachItem(e){let t;for(t=this._itHead;t!==null;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,n=this._removalsHead,r=0,o=null;for(;t||n;){let s=!n||t&&t.currentIndex{s=this._trackByFn(r,a),t===null||!Object.is(t.trackById,s)?(t=this._mismatch(t,a,s,r),n=!0):(n&&(t=this._verifyReinsertion(t,a,s,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,n,r){let o;return e===null?o=this._itTail:(o=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,r)):(e=this._linkedRecords===null?null:this._linkedRecords.get(n,r),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,r)):e=this._addAfter(new KM(t,n),o,r)),e}_verifyReinsertion(e,t,n,r){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return o!==null?e=this._reinsertAfter(o,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;e!==null;){let t=e._next;this._addToRemovals(this._unlink(e)),e=t}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let r=e._prevRemoved,o=e._nextRemoved;return r===null?this._removalsHead=o:r._nextRemoved=o,o===null?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e}_moveAfter(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e}_addAfter(e,t,n){return this._insertAfter(e,t,n),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,t,n){let r=t===null?this._itHead:t._next;return e._next=r,e._prev=t,r===null?this._itTail=e:r._prev=e,t===null?this._itHead=e:t._next=e,this._linkedRecords===null&&(this._linkedRecords=new w0),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let t=e._prev,n=e._next;return t===null?this._itHead=n:t._next=n,n===null?this._itTail=t:n._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new w0),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},KM=class{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},JM=class{constructor(){this._head=null,this._tail=null}add(e){this._head===null?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let n;for(n=this._head;n!==null;n=n._nextDup)if((t===null||t<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}remove(e){let t=e._prevDup,n=e._nextDup;return t===null?this._head=n:t._nextDup=n,n===null?this._tail=t:n._prevDup=t,this._head===null}},w0=class{constructor(){this.map=new Map}put(e){let t=e.trackById,n=this.map.get(t);n||(n=new JM,this.map.set(t,n)),n.add(e)}get(e,t){let n=e,r=this.map.get(n);return r?r.get(e,t):null}remove(e){let t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function JA(i,e,t){let n=i.previousIndex;if(n===null)return n;let r=0;return t&&n{let e=class e{constructor(n){this.factories=n}static create(n,r){if(r!=null){let o=r.factories.slice();n=n.concat(o)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||eN()),deps:[[e,new rE,new M0]]}}find(n){let r=this.factories.find(o=>o.supports(n));if(r!=null)return r;throw new Oe(901,!1)}};e.\u0275prov=ee({token:e,providedIn:"root",factory:eN});let i=e;return i})();function Z2(i){try{let{rootComponent:e,appProviders:t,platformProviders:n}=i,r=nq(n),o=[$2({}),{provide:Zu,useExisting:J7},...t||[]],a=new g0({providers:o,parent:r,debugName:"",runEnvironmentInitializers:!1}).injector,l=a.get(Le);return l.run(()=>{a.resolveInjectorInitializers();let c=a.get(Rr,null),d;l.runOutsideAngular(()=>{d=l.onError.subscribe({next:p=>{c.handleError(p)}})});let u=()=>a.destroy(),h=r.get(X2);return h.add(u),a.onDestroy(()=>{d.unsubscribe(),h.delete(u)}),q7(c,l,()=>{let p=a.get(W2);return p.runInitializers(),p.donePromise.then(()=>{let f=a.get(Q0,x0);O7(f||x0);let m=a.get(us);return e!==void 0&&m.bootstrap(e),m})})})}catch(e){return Promise.reject(e)}}var Q2=new ge("");function at(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function wi(i,e=NaN){return!isNaN(parseFloat(i))&&!isNaN(Number(i))?Number(i):e}function Xt(i,e){Ao("NgSignals");let t=hS(i);return e?.equal&&(t[Eo].equal=e.equal),t}function kr(i){let e=sn(null);try{return i()}finally{sn(e)}}var aq=new ge("",{providedIn:"root",factory:()=>te(lq)}),lq=(()=>{let e=class e{};e.\u0275prov=ee({token:e,providedIn:"root",factory:()=>new eE});let i=e;return i})(),eE=class{constructor(){this.queuedEffectCount=0,this.queues=new Map,this.pendingTasks=te($c),this.taskId=null}scheduleEffect(e){if(this.enqueue(e),this.taskId===null){let t=this.taskId=this.pendingTasks.add();queueMicrotask(()=>{this.flush(),this.pendingTasks.remove(t),this.taskId=null})}}enqueue(e){let t=e.creationZone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}},tE=class{constructor(e,t,n,r,o,s){this.scheduler=e,this.effectFn=t,this.creationZone=n,this.injector=o,this.watcher=LR(a=>this.runEffect(a),()=>this.schedule(),s),this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}runEffect(e){try{this.effectFn(e)}catch(t){this.injector.get(Rr,null,{optional:!0})?.handleError(t)}}run(){this.watcher.run()}schedule(){this.scheduler.scheduleEffect(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}};function mt(i,e){Ao("NgSignals"),!e?.injector&&Ju(mt);let t=e?.injector??te(bt),n=e?.manualCleanup!==!0?t.get(Ni):null,r=new tE(t.get(aq),i,typeof Zone>"u"?null:Zone.current,n,t,e?.allowSignalWrites??!1),o=t.get(Fe,null,{optional:!0});return!o||!(o._lView[Pt]&8)?r.watcher.notify():(o._lView[Yv]??=[]).push(r.watcher.notify),r}function K2(i,e){let t=Sl(i),n=e.elementInjector||D0();return new Qu(t).create(n,e.projectableNodes,e.hostElement,e.environmentInjector)}var rL=null;function Da(){return rL}function oL(i){rL??=i}var K0=class{};var Ye=new ge(""),sL=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(cq),providedIn:"platform"});let i=e;return i})();var cq=(()=>{let e=class e extends sL{constructor(){super(),this._doc=te(Ye),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Da().getBaseHref(this._doc)}onPopState(n){let r=Da().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Da().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}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>new e,providedIn:"platform"});let i=e;return i})();function aL(i,e){if(i.length==0)return e;if(e.length==0)return i;let t=0;return i.endsWith("/")&&t++,e.startsWith("/")&&t++,t==2?i+e.substring(1):t==1?i+e:i+"/"+e}function J2(i){let e=i.match(/#|\?|$/),t=e&&e.index||i.length,n=t-(i[t-1]==="/"?1:0);return i.slice(0,n)+i.slice(t)}function Qc(i){return i&&i[0]!=="?"?"?"+i:i}var tb=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(lL),providedIn:"root"});let i=e;return i})(),dq=new ge(""),lL=(()=>{let e=class e extends tb{constructor(n,r){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??te(Ye).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return aL(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+Qc(this._platformLocation.search),o=this._platformLocation.hash;return o&&n?`${r}${o}`:r}pushState(n,r,o,s){let a=this.prepareExternalUrl(o+Qc(s));this._platformLocation.pushState(n,r,a)}replaceState(n,r,o,s){let a=this.prepareExternalUrl(o+Qc(s));this._platformLocation.replaceState(n,r,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(r){return new(r||e)(X(sL),X(dq,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Pa=(()=>{let e=class e{constructor(n){this._subject=new Pe,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=pq(J2(eL(r))),this._locationStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+Qc(r))}normalize(n){return e.stripTrailingSlash(hq(this._basePath,eL(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",o=null){this._locationStrategy.pushState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Qc(r)),o)}replaceState(n,r="",o=null){this._locationStrategy.replaceState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Qc(r)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(o=>o(n,r))}subscribe(n,r,o){return this._subject.subscribe({next:n,error:r,complete:o})}};e.normalizeQueryParams=Qc,e.joinWithSlash=aL,e.stripTrailingSlash=J2,e.\u0275fac=function(r){return new(r||e)(X(tb))},e.\u0275prov=ee({token:e,factory:()=>uq(),providedIn:"root"});let i=e;return i})();function uq(){return new Pa(X(tb))}function hq(i,e){if(!i||!e.startsWith(i))return e;let t=e.substring(i.length);return t===""||["/",";","?","#"].includes(t[0])?t:e}function eL(i){return i.replace(/\/index.html$/,"")}function pq(i){if(new RegExp("^(https?:)?//").test(i)){let[,t]=i.split(/\/\/[^\/]+/);return t}return i}function cL(i,e){e=encodeURIComponent(e);for(let t of i.split(";")){let n=t.indexOf("="),[r,o]=n==-1?[t,""]:[t.slice(0,n),t.slice(n+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var ZE=/\s+/,tL=[],nb=(()=>{let e=class e{constructor(n,r){this._ngEl=n,this._renderer=r,this.initialClasses=tL,this.stateMap=new Map}set klass(n){this.initialClasses=n!=null?n.trim().split(ZE):tL}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(ZE):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let o=this.stateMap.get(n);o!==void 0?(o.enabled!==r&&(o.changed=!0,o.enabled=r),o.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],o=n[1];o.changed?(this._toggleClass(r,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),o.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(ZE).forEach(o=>{r?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(qc))},e.\u0275dir=ze({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0});let i=e;return i})();var QE=class{constructor(e,t,n,r){this.$implicit=e,this.ngForOf=t,this.index=n,this.count=r}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Ci=(()=>{let e=class e{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,r,o){this._viewContainer=n,this._template=r,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let n=this._ngForOf;if(!this._differ&&n)if(0)try{}catch{}else this._differ=this._differs.find(n).create(this.ngForTrackBy)}if(this._differ){let n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){let r=this._viewContainer;n.forEachOperation((o,s,a)=>{if(o.previousIndex==null)r.createEmbeddedView(this._template,new QE(o.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)r.remove(s===null?void 0:s);else if(s!==null){let l=r.get(s);r.move(l,a),nL(l,o)}});for(let o=0,s=r.length;o{let s=r.get(o.currentIndex);nL(s,o)})}static ngTemplateContextGuard(n,r){return!0}};e.\u0275fac=function(r){return new(r||e)(M(Yt),M(Hn),M(Zc))},e.\u0275dir=ze({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let i=e;return i})();function nL(i,e){i.context.$implicit=e.item}var Mn=(()=>{let e=class e{constructor(n,r){this._viewContainer=n,this._context=new KE,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){iL("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){iL("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,r){return!0}};e.\u0275fac=function(r){return new(r||e)(M(Yt),M(Hn))},e.\u0275dir=ze({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let i=e;return i})(),KE=class{constructor(){this.$implicit=null,this.ngIf=null}};function iL(i,e){if(!!!(!e||e.createEmbeddedView))throw new Error(`${i} must be a TemplateRef, but received '${Pr(e)}'.`)}var JE=class{constructor(e,t){this._viewContainerRef=e,this._templateRef=t,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}},e1=(()=>{let e=class e{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(n){this._ngSwitch=n,this._caseCount===0&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(n){this._defaultViews.push(n)}_matchCase(n){let r=n===this._ngSwitch;return this._lastCasesMatched||=r,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),r}_updateDefaultCases(n){if(this._defaultViews.length>0&&n!==this._defaultUsed){this._defaultUsed=n;for(let r of this._defaultViews)r.enforceState(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});let i=e;return i})(),dL=(()=>{let e=class e{constructor(n,r,o){this.ngSwitch=o,o._addCase(),this._view=new JE(n,r)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}};e.\u0275fac=function(r){return new(r||e)(M(Yt),M(Hn),M(e1,9))},e.\u0275dir=ze({type:e,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});let i=e;return i})();var Bs=(()=>{let e=class e{constructor(n){this._viewContainerRef=n,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,o):!1,get:(n,r,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,o)}})}};e.\u0275fac=function(r){return new(r||e)(M(Yt))},e.\u0275dir=ze({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[dn]});let i=e;return i})();var Ae=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})(),t1="browser",fq="server";function uL(i){return i===t1}function n1(i){return i===fq}var J0=class{};var r1=class{};var rh=class i{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(` -`).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=r.toLowerCase(),s=t.slice(n+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.setHeaderEntries(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new i;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...n),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var o1=class{encodeKey(e){return hL(e)}encodeValue(e){return hL(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function mq(i,e){let t=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}var gq=/%(\d[a-f0-9])/gi,_q={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function hL(i){return encodeURIComponent(i).replace(gq,(e,t)=>_q[t]??e)}function ib(i){return`${i}`}var Ol=class i{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new o1,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=mq(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],r=Array.isArray(n)?n.map(ib):[ib(n)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(n=>{let r=e[n];Array.isArray(r)?r.forEach(o=>{t.push({param:n,value:o,op:"a"})}):t.push({param:n,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new i({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(ib(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(ib(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var s1=class{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function vq(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function pL(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function fL(i){return typeof Blob<"u"&&i instanceof Blob}function mL(i){return typeof FormData<"u"&&i instanceof FormData}function bq(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var Xf=class i{constructor(e,t,n,r){this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let o;if(vq(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new rh,this.context??=new s1,!this.params)this.params=new Ol,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":ah.set(p,e.setHeaders[p]),c)),e.setParams&&(d=Object.keys(e.setParams).reduce((h,p)=>h.set(p,e.setParams[p]),d)),new i(t,n,s,{params:d,headers:c,context:u,reportProgress:l,responseType:r,withCredentials:a,transferCache:o})}},gL=function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i}(gL||{}),a1=class{constructor(e,t=200,n="OK"){this.headers=e.headers||new rh,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}};var l1=class i extends a1{constructor(e={}){super(e),this.type=gL.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new i({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}};function i1(i,e){return{body:e,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,transferCache:i.transferCache}}var _L=(()=>{let e=class e{constructor(n){this.handler=n}request(n,r,o={}){let s;if(n instanceof Xf)s=n;else{let c;o.headers instanceof rh?c=o.headers:c=new rh(o.headers);let d;o.params&&(o.params instanceof Ol?d=o.params:d=new Ol({fromObject:o.params})),s=new Xf(n,r,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:d,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let a=Ke(s).pipe(gl(c=>this.handler.handle(c)));if(n instanceof Xf||o.observe==="events")return a;let l=a.pipe(Gt(c=>c instanceof l1));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return l.pipe(Je(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return c.body}));case"blob":return l.pipe(Je(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new Error("Response is not a Blob.");return c.body}));case"text":return l.pipe(Je(c=>{if(c.body!==null&&typeof c.body!="string")throw new Error("Response is not a string.");return c.body}));case"json":default:return l.pipe(Je(c=>c.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}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 Ol().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,i1(o,r))}post(n,r,o={}){return this.request("POST",n,i1(o,r))}put(n,r,o={}){return this.request("PUT",n,i1(o,r))}};e.\u0275fac=function(r){return new(r||e)(X(r1))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})();var u1=class extends K0{constructor(){super(...arguments),this.supportsDOMEvents=!0}},h1=class i extends u1{static makeCurrent(){oL(new i)}onAndCancel(e,t,n){return e.addEventListener(t,n),()=>{e.removeEventListener(t,n)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return t=t||this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t==="window"?window:t==="document"?e:t==="body"?e.body:null}getBaseHref(e){let t=xq();return t==null?null:wq(t)}resetBaseElement(){Zf=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return cL(document.cookie,e)}},Zf=null;function xq(){return Zf=Zf||document.querySelector("base"),Zf?Zf.getAttribute("href"):null}function wq(i){return new URL(i,document.baseURI).pathname}var Cq=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),rb=new ge(""),yL=(()=>{let e=class e{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,o){return this._findPluginFor(r).addEventListener(n,r,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(s=>s.supports(n)),!r)throw new Oe(5101,!1);return this._eventNameToPlugin.set(n,r),r}};e.\u0275fac=function(r){return new(r||e)(X(rb),X(Le))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),Qf=class{constructor(e){this._doc=e}},c1="ng-app-id",xL=(()=>{let e=class e{constructor(n,r,o,s={}){this.doc=n,this.appId=r,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=n1(s),this.resetHostNodes()}addStyles(n){for(let r of n)this.changeUsageCount(r,1)===1&&this.onStyleAdded(r)}removeStyles(n){for(let r of n)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(r=>r.remove()),n.clear());for(let r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){let r=this.styleRef;r.get(n)?.elements?.forEach(o=>o.remove()),r.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${c1}="${this.appId}"]`);if(n?.length){let r=new Map;return n.forEach(o=>{o.textContent!=null&&r.set(o.textContent,o)}),r}return null}changeUsageCount(n,r){let o=this.styleRef;if(o.has(n)){let s=o.get(n);return s.usage+=r,s.usage}return o.set(n,{usage:r,elements:[]}),r}getStyleElement(n,r){let o=this.styleNodesInDOM,s=o?.get(r);if(s?.parentNode===n)return o.delete(r),s.removeAttribute(c1),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=r,this.platformIsServer&&a.setAttribute(c1,this.appId),n.appendChild(a),a}}addStyleToHost(n,r){let o=this.getStyleElement(n,r),s=this.styleRef,a=s.get(r)?.elements;a?a.push(o):s.set(r,{elements:[o],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(Hf),X(Gf,8),X(Ea))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),d1={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"},f1=/%COMP%/g,wL="%COMP%",Sq=`_nghost-${wL}`,Mq=`_ngcontent-${wL}`,Eq=!0,Iq=new ge("",{providedIn:"root",factory:()=>Eq});function Tq(i){return Mq.replace(f1,i)}function Dq(i){return Sq.replace(f1,i)}function CL(i,e){return e.map(t=>t.replace(f1,i))}var ob=(()=>{let e=class e{constructor(n,r,o,s,a,l,c,d=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=l,this.ngZone=c,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=n1(l),this.defaultRenderer=new Kf(n,a,c,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===As.ShadowDom&&(r=wt(Z({},r),{encapsulation:As.Emulated}));let o=this.getOrCreateRenderer(n,r);return o instanceof sb?o.applyToHost(n):o instanceof Jf&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,s=o.get(r.id);if(!s){let a=this.doc,l=this.ngZone,c=this.eventManager,d=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,h=this.platformIsServer;switch(r.encapsulation){case As.Emulated:s=new sb(c,d,r,this.appId,u,a,l,h);break;case As.ShadowDom:return new p1(c,d,n,r,a,l,this.nonce,h);default:s=new Jf(c,d,r,u,a,l,h);break}o.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(r){return new(r||e)(X(yL),X(xL),X(Hf),X(Iq),X(Ye),X(Ea),X(Le),X(Gf))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),Kf=class{constructor(e,t,n,r){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,t){return t?this.doc.createElementNS(d1[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(vL(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(vL(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new Oe(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let o=d1[r];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=d1[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Sa.DashCase|Sa.Important)?e.style.setProperty(t,n,r&Sa.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Sa.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n){if(typeof e=="string"&&(e=Da().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);return this.eventManager.addEventListener(e,t,this.decoratePreventDefault(n))}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function vL(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var p1=class extends Kf{constructor(e,t,n,r,o,s,a,l){super(e,o,s,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=CL(r.id,r.styles);for(let d of c){let u=document.createElement("style");a&&u.setAttribute("nonce",a),u.textContent=d,this.shadowRoot.appendChild(u)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(this.nodeOrShadowRoot(e),t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Jf=class extends Kf{constructor(e,t,n,r,o,s,a,l){super(e,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r,this.styles=l?CL(l,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},sb=class extends Jf{constructor(e,t,n,r,o,s,a,l){let c=r+"-"+n.id;super(e,t,n,o,s,a,l,c),this.contentAttr=Tq(c),this.hostAttr=Dq(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}},Pq=(()=>{let e=class e extends Qf{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o){return n.addEventListener(r,o,!1),()=>this.removeEventListener(n,r,o)}removeEventListener(n,r,o){return n.removeEventListener(r,o)}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),Oq=(()=>{let e=class e extends Qf{constructor(n){super(n),this.delegate=te(Q2,{optional:!0})}supports(n){return this.delegate?this.delegate.supports(n):!1}addEventListener(n,r,o){return this.delegate.addEventListener(n,r,o)}removeEventListener(n,r,o){return this.delegate.removeEventListener(n,r,o)}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),bL=["alt","control","meta","shift"],Rq={"\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"},Aq={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},Nq=(()=>{let e=class e extends Qf{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Da().onAndCancel(n,s.domEventName,a))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let s=e._normalizeKey(r.pop()),a="",l=r.indexOf("code");if(l>-1&&(r.splice(l,1),a="code."),bL.forEach(d=>{let u=r.indexOf(d);u>-1&&(r.splice(u,1),a+=d+".")}),a+=s,r.length!=0||s.length===0)return null;let c={};return c.domEventName=o,c.fullKey=a,c}static matchEventFullKeyCode(n,r){let o=Rq[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(o=n.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),bL.forEach(a=>{if(a!==o){let l=Aq[a];l(n)&&(s+=a+".")}}),s+=o,s===r)}static eventCallback(n,r,o){return s=>{e.matchEventFullKeyCode(s,n)&&o.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})();function SL(i,e){return Z2(Z({rootComponent:i},kq(e)))}function kq(i){return{appProviders:[...zq,...i?.providers??[]],platformProviders:Vq}}function Lq(){h1.makeCurrent()}function Fq(){return new Rr}function Bq(){return mk(document),document}var Vq=[{provide:Ea,useValue:t1},{provide:yE,useValue:Lq,multi:!0},{provide:Ye,useFactory:Bq,deps:[]}];var zq=[{provide:T0,useValue:"root"},{provide:Rr,useFactory:Fq,deps:[]},{provide:rb,useClass:Pq,multi:!0,deps:[Ye,Le,Ea]},{provide:rb,useClass:Nq,multi:!0,deps:[Ye]},{provide:rb,useClass:Oq,multi:!0},ob,xL,yL,{provide:Il,useExisting:ob},{provide:J0,useClass:Cq,deps:[]},[]];var ML=(()=>{let e=class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var m1=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=X(Uq),o},providedIn:"root"});let i=e;return i})(),Uq=(()=>{let e=class e extends m1{constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case Zr.NONE:return r;case Zr.HTML:return nh(r,"HTML")?Ia(r):Ik(this._doc,String(r)).toString();case Zr.STYLE:return nh(r,"Style")?Ia(r):r;case Zr.SCRIPT:if(nh(r,"Script"))return Ia(r);throw new Oe(5200,!1);case Zr.URL:return nh(r,"URL")?Ia(r):wE(String(r));case Zr.RESOURCE_URL:if(nh(r,"ResourceURL"))return Ia(r);throw new Oe(5201,!1);default:throw new Oe(5202,!1)}}bypassSecurityTrustHtml(n){return _k(n)}bypassSecurityTrustStyle(n){return vk(n)}bypassSecurityTrustScript(n){return bk(n)}bypassSecurityTrustUrl(n){return yk(n)}bypassSecurityTrustResourceUrl(n){return xk(n)}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Zt="primary",gm=Symbol("RouteTitle"),y1=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}};function dh(i){return new y1(i)}function Hq(i,e,t){let n=t.path.split("/");if(n.length>i.length||t.pathMatch==="full"&&(e.hasChildren()||n.lengthn[o]===r)}else return i===e}function kL(i){return i.length>0?i[i.length-1]:null}function Al(i){return Ac(i)?i:Xc(i)?Kn(Promise.resolve(i)):Ke(i)}var jq={exact:FL,subset:BL},LL={exact:Wq,subset:$q,ignored:()=>!0};function IL(i,e,t){return jq[t.paths](i.root,e.root,t.matrixParams)&&LL[t.queryParams](i.queryParams,e.queryParams)&&!(t.fragment==="exact"&&i.fragment!==e.fragment)}function Wq(i,e){return Vs(i,e)}function FL(i,e,t){if(!Jc(i.segments,e.segments)||!cb(i.segments,e.segments,t)||i.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!i.children[n]||!FL(i.children[n],e.children[n],t))return!1;return!0}function $q(i,e){return Object.keys(e).length<=Object.keys(i).length&&Object.keys(e).every(t=>NL(i[t],e[t]))}function BL(i,e,t){return VL(i,e,e.segments,t)}function VL(i,e,t,n){if(i.segments.length>t.length){let r=i.segments.slice(0,t.length);return!(!Jc(r,t)||e.hasChildren()||!cb(r,t,n))}else if(i.segments.length===t.length){if(!Jc(i.segments,t)||!cb(i.segments,t,n))return!1;for(let r in e.children)if(!i.children[r]||!BL(i.children[r],e.children[r],n))return!1;return!0}else{let r=t.slice(0,i.segments.length),o=t.slice(i.segments.length);return!Jc(i.segments,r)||!cb(i.segments,r,n)||!i.children[Zt]?!1:VL(i.children[Zt],e,o,n)}}function cb(i,e,t){return e.every((n,r)=>LL[t](i[r].parameters,n.parameters))}var Ra=class{constructor(e=new En([],{}),t={},n=null){this.root=e,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap??=dh(this.queryParams),this._queryParamMap}toString(){return Xq.serialize(this)}},En=class{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Object.values(t).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return db(this)}},Kc=class{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap??=dh(this.parameters),this._parameterMap}toString(){return UL(this)}};function qq(i,e){return Jc(i,e)&&i.every((t,n)=>Vs(t.parameters,e[n].parameters))}function Jc(i,e){return i.length!==e.length?!1:i.every((t,n)=>t.path===e[n].path)}function Yq(i,e){let t=[];return Object.entries(i.children).forEach(([n,r])=>{n===Zt&&(t=t.concat(e(r,n)))}),Object.entries(i.children).forEach(([n,r])=>{n!==Zt&&(t=t.concat(e(r,n)))}),t}var q1=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>new sm,providedIn:"root"});let i=e;return i})(),sm=class{parse(e){let t=new C1(e);return new Ra(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){let t=`/${em(e.root,!0)}`,n=Kq(e.queryParams),r=typeof e.fragment=="string"?`#${Zq(e.fragment)}`:"";return`${t}${n}${r}`}},Xq=new sm;function db(i){return i.segments.map(e=>UL(e)).join("/")}function em(i,e){if(!i.hasChildren())return db(i);if(e){let t=i.children[Zt]?em(i.children[Zt],!1):"",n=[];return Object.entries(i.children).forEach(([r,o])=>{r!==Zt&&n.push(`${r}:${em(o,!1)}`)}),n.length>0?`${t}(${n.join("//")})`:t}else{let t=Yq(i,(n,r)=>r===Zt?[em(i.children[Zt],!1)]:[`${r}:${em(n,!1)}`]);return Object.keys(i.children).length===1&&i.children[Zt]!=null?`${db(i)}/${t[0]}`:`${db(i)}/(${t.join("//")})`}}function zL(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function ab(i){return zL(i).replace(/%3B/gi,";")}function Zq(i){return encodeURI(i)}function w1(i){return zL(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ub(i){return decodeURIComponent(i)}function TL(i){return ub(i.replace(/\+/g,"%20"))}function UL(i){return`${w1(i.path)}${Qq(i.parameters)}`}function Qq(i){return Object.entries(i).map(([e,t])=>`;${w1(e)}=${w1(t)}`).join("")}function Kq(i){let e=Object.entries(i).map(([t,n])=>Array.isArray(n)?n.map(r=>`${ab(t)}=${ab(r)}`).join("&"):`${ab(t)}=${ab(n)}`).filter(t=>t);return e.length?`?${e.join("&")}`:""}var Jq=/^[^\/()?;#]+/;function g1(i){let e=i.match(Jq);return e?e[0]:""}var eY=/^[^\/()?;=#]+/;function tY(i){let e=i.match(eY);return e?e[0]:""}var nY=/^[^=?&#]+/;function iY(i){let e=i.match(nY);return e?e[0]:""}var rY=/^[^&#]+/;function oY(i){let e=i.match(rY);return e?e[0]:""}var C1=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new En([],{}):new En([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n[Zt]=new En(e,t)),n}parseSegment(){let e=g1(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new Oe(4009,!1);return this.capture(e),new Kc(ub(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let t=tY(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let r=g1(this.remaining);r&&(n=r,this.capture(n))}e[ub(t)]=ub(n)}parseQueryParam(e){let t=iY(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let s=oY(this.remaining);s&&(n=s,this.capture(n))}let r=TL(t),o=TL(n);if(e.hasOwnProperty(r)){let s=e[r];Array.isArray(s)||(s=[s],e[r]=s),s.push(o)}else e[r]=o}parseParens(e){let t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=g1(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new Oe(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=Zt);let s=this.parseChildren();t[o]=Object.keys(s).length===1?s[Zt]:new En([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new Oe(4011,!1)}};function HL(i){return i.segments.length>0?new En([],{[Zt]:i}):i}function GL(i){let e={};for(let[n,r]of Object.entries(i.children)){let o=GL(r);if(n===Zt&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))e[s]=a;else(o.segments.length>0||o.hasChildren())&&(e[n]=o)}let t=new En(i.segments,e);return sY(t)}function sY(i){if(i.numberOfChildren===1&&i.children[Zt]){let e=i.children[Zt];return new En(i.segments.concat(e.segments),e.children)}return i}function am(i){return i instanceof Ra}function aY(i,e,t=null,n=null){let r=jL(i);return WL(r,e,t,n)}function jL(i){let e;function t(o){let s={};for(let l of o.children){let c=t(l);s[l.outlet]=c}let a=new En(o.url,s);return o===i&&(e=a),a}let n=t(i.root),r=HL(n);return e??r}function WL(i,e,t,n){let r=i;for(;r.parent;)r=r.parent;if(e.length===0)return _1(r,r,r,t,n);let o=lY(e);if(o.toRoot())return _1(r,r,new En([],{}),t,n);let s=cY(o,r,i),a=s.processChildren?im(s.segmentGroup,s.index,o.commands):qL(s.segmentGroup,s.index,o.commands);return _1(r,s.segmentGroup,a,t,n)}function hb(i){return typeof i=="object"&&i!=null&&!i.outlets&&!i.segmentPath}function lm(i){return typeof i=="object"&&i!=null&&i.outlets}function _1(i,e,t,n,r){let o={};n&&Object.entries(n).forEach(([l,c])=>{o[l]=Array.isArray(c)?c.map(d=>`${d}`):`${c}`});let s;i===e?s=t:s=$L(i,e,t);let a=HL(GL(s));return new Ra(a,o,r)}function $L(i,e,t){let n={};return Object.entries(i.children).forEach(([r,o])=>{o===e?n[r]=t:n[r]=$L(o,e,t)}),new En(i.segments,n)}var pb=class{constructor(e,t,n){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=n,e&&n.length>0&&hb(n[0]))throw new Oe(4003,!1);let r=n.find(lm);if(r&&r!==kL(n))throw new Oe(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function lY(i){if(typeof i[0]=="string"&&i.length===1&&i[0]==="/")return new pb(!0,0,i);let e=0,t=!1,n=i.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?t=!0:a===".."?e++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new pb(t,e,n)}var ah=class{constructor(e,t,n){this.segmentGroup=e,this.processChildren=t,this.index=n}};function cY(i,e,t){if(i.isAbsolute)return new ah(e,!0,0);if(!t)return new ah(e,!1,NaN);if(t.parent===null)return new ah(t,!0,0);let n=hb(i.commands[0])?0:1,r=t.segments.length-1+n;return dY(t,r,i.numberOfDoubleDots)}function dY(i,e,t){let n=i,r=e,o=t;for(;o>r;){if(o-=r,n=n.parent,!n)throw new Oe(4005,!1);r=n.segments.length}return new ah(n,!1,r-o)}function uY(i){return lm(i[0])?i[0].outlets:{[Zt]:i}}function qL(i,e,t){if(i??=new En([],{}),i.segments.length===0&&i.hasChildren())return im(i,e,t);let n=hY(i,e,t),r=t.slice(n.commandIndex);if(n.match&&n.pathIndexo!==Zt)&&i.children[Zt]&&i.numberOfChildren===1&&i.children[Zt].segments.length===0){let o=im(i.children[Zt],e,t);return new En(i.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=qL(i.children[o],e,s))}),Object.entries(i.children).forEach(([o,s])=>{n[o]===void 0&&(r[o]=s)}),new En(i.segments,r)}}function hY(i,e,t){let n=0,r=e,o={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return o;let s=i.segments[r],a=t[n];if(lm(a))break;let l=`${a}`,c=n0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!PL(l,c,s))return o;n+=2}else{if(!PL(l,{},s))return o;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function S1(i,e,t){let n=i.segments.slice(0,e),r=0;for(;r{typeof n=="string"&&(n=[n]),n!==null&&(e[t]=S1(new En([],{}),0,n))}),e}function DL(i){let e={};return Object.entries(i).forEach(([t,n])=>e[t]=`${n}`),e}function PL(i,e,t){return i==t.path&&Vs(e,t.parameters)}var rm="imperative",Qi=function(i){return i[i.NavigationStart=0]="NavigationStart",i[i.NavigationEnd=1]="NavigationEnd",i[i.NavigationCancel=2]="NavigationCancel",i[i.NavigationError=3]="NavigationError",i[i.RoutesRecognized=4]="RoutesRecognized",i[i.ResolveStart=5]="ResolveStart",i[i.ResolveEnd=6]="ResolveEnd",i[i.GuardsCheckStart=7]="GuardsCheckStart",i[i.GuardsCheckEnd=8]="GuardsCheckEnd",i[i.RouteConfigLoadStart=9]="RouteConfigLoadStart",i[i.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",i[i.ChildActivationStart=11]="ChildActivationStart",i[i.ChildActivationEnd=12]="ChildActivationEnd",i[i.ActivationStart=13]="ActivationStart",i[i.ActivationEnd=14]="ActivationEnd",i[i.Scroll=15]="Scroll",i[i.NavigationSkipped=16]="NavigationSkipped",i}(Qi||{}),ko=class{constructor(e,t){this.id=e,this.url=t}},cm=class extends ko{constructor(e,t,n="imperative",r=null){super(e,t),this.type=Qi.NavigationStart,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},ed=class extends ko{constructor(e,t,n){super(e,t),this.urlAfterRedirects=n,this.type=Qi.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},lo=function(i){return i[i.Redirect=0]="Redirect",i[i.SupersededByNewNavigation=1]="SupersededByNewNavigation",i[i.NoDataFromResolver=2]="NoDataFromResolver",i[i.GuardRejected=3]="GuardRejected",i}(lo||{}),M1=function(i){return i[i.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",i[i.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",i}(M1||{}),Oa=class extends ko{constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r,this.type=Qi.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},td=class extends ko{constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r,this.type=Qi.NavigationSkipped}},dm=class extends ko{constructor(e,t,n,r){super(e,t),this.error=n,this.target=r,this.type=Qi.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},fb=class extends ko{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Qi.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},E1=class extends ko{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Qi.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},I1=class extends ko{constructor(e,t,n,r,o){super(e,t),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=o,this.type=Qi.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},T1=class extends ko{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Qi.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},D1=class extends ko{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Qi.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},P1=class{constructor(e){this.route=e,this.type=Qi.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},O1=class{constructor(e){this.route=e,this.type=Qi.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},R1=class{constructor(e){this.snapshot=e,this.type=Qi.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},A1=class{constructor(e){this.snapshot=e,this.type=Qi.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},N1=class{constructor(e){this.snapshot=e,this.type=Qi.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},k1=class{constructor(e){this.snapshot=e,this.type=Qi.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var um=class{},uh=class{constructor(e,t){this.url=e,this.navigationBehaviorOptions=t}};function fY(i,e){return i.providers&&!i._injector&&(i._injector=jE(i.providers,e,`Route: ${i.path}`)),i._injector??e}function hs(i){return i.outlet||Zt}function mY(i,e){let t=i.filter(n=>hs(n)===e);return t.push(...i.filter(n=>hs(n)!==e)),t}function _m(i){if(!i)return null;if(i.routeConfig?._injector)return i.routeConfig._injector;for(let e=i.parent;e;e=e.parent){let t=e.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}var L1=class{get injector(){return _m(this.route?.snapshot)??this.rootInjector}set injector(e){}constructor(e){this.rootInjector=e,this.outlet=null,this.route=null,this.children=new xb(this.rootInjector),this.attachRef=null}},xb=(()=>{let e=class e{constructor(n){this.rootInjector=n,this.contexts=new Map}onChildOutletCreated(n,r){let o=this.getOrCreateContext(n);o.outlet=r,this.contexts.set(n,o)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new L1(this.rootInjector),this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}};e.\u0275fac=function(r){return new(r||e)(X(qi))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),mb=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){let t=F1(e,this._root);return t?t.children.map(n=>n.value):[]}firstChild(e){let t=F1(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){let t=B1(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return B1(e,this._root).map(t=>t.value)}};function F1(i,e){if(i===e.value)return e;for(let t of e.children){let n=F1(i,t);if(n)return n}return null}function B1(i,e){if(i===e.value)return[e];for(let t of e.children){let n=B1(i,t);if(n.length)return n.unshift(e),n}return[]}var ao=class{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}};function sh(i){let e={};return i&&i.children.forEach(t=>e[t.value.outlet]=t),e}var gb=class extends mb{constructor(e,t){super(e),this.snapshot=t,Y1(this,e)}toString(){return this.snapshot.toString()}};function YL(i){let e=gY(i),t=new Dn([new Kc("",{})]),n=new Dn({}),r=new Dn({}),o=new Dn({}),s=new Dn(""),a=new Rl(t,n,o,s,r,Zt,i,e.root);return a.snapshot=e.root,new gb(new ao(a,[]),e)}function gY(i){let e={},t={},n={},r="",o=new lh([],e,n,r,t,Zt,i,null,{});return new vb("",new ao(o,[]))}var Rl=class{constructor(e,t,n,r,o,s,a,l){this.urlSubject=e,this.paramsSubject=t,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(Je(c=>c[gm]))??Ke(void 0),this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Je(e=>dh(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Je(e=>dh(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function _b(i,e,t="emptyOnly"){let n,{routeConfig:r}=i;return e!==null&&(t==="always"||r?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:Z(Z({},e.params),i.params),data:Z(Z({},e.data),i.data),resolve:Z(Z(Z(Z({},i.data),e.data),r?.data),i._resolvedData)}:n={params:Z({},i.params),data:Z({},i.data),resolve:Z(Z({},i.data),i._resolvedData??{})},r&&ZL(r)&&(n.resolve[gm]=r.title),n}var lh=class{get title(){return this.data?.[gm]}constructor(e,t,n,r,o,s,a,l,c){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=dh(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=dh(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),t=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${t}')`}},vb=class extends mb{constructor(e,t){super(t),this.url=e,Y1(this,t)}toString(){return XL(this._root)}};function Y1(i,e){e.value._routerState=i,e.children.forEach(t=>Y1(i,t))}function XL(i){let e=i.children.length>0?` { ${i.children.map(XL).join(", ")} } `:"";return`${i.value}${e}`}function v1(i){if(i.snapshot){let e=i.snapshot,t=i._futureSnapshot;i.snapshot=t,Vs(e.queryParams,t.queryParams)||i.queryParamsSubject.next(t.queryParams),e.fragment!==t.fragment&&i.fragmentSubject.next(t.fragment),Vs(e.params,t.params)||i.paramsSubject.next(t.params),Gq(e.url,t.url)||i.urlSubject.next(t.url),Vs(e.data,t.data)||i.dataSubject.next(t.data)}else i.snapshot=i._futureSnapshot,i.dataSubject.next(i._futureSnapshot.data)}function V1(i,e){let t=Vs(i.params,e.params)&&qq(i.url,e.url),n=!i.parent!=!e.parent;return t&&!n&&(!i.parent||V1(i.parent,e.parent))}function ZL(i){return typeof i.title=="string"||i.title===null}var X1=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=Zt,this.activateEvents=new Pe,this.deactivateEvents=new Pe,this.attachEvents=new Pe,this.detachEvents=new Pe,this.parentContexts=te(xb),this.location=te(Yt),this.changeDetector=te(Fe),this.inputBinder=te(Z1,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:o}=n.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Oe(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Oe(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Oe(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new Oe(4013,!1);this._activatedRoute=n;let o=this.location,a=n.snapshot.component,l=this.parentContexts.getOrCreateContext(this.name).children,c=new z1(n,l,o.injector);this.activated=o.createComponent(a,{index:o.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[dn]});let i=e;return i})(),z1=class i{__ngOutletInjector(e){return new i(this.route,this.childContexts,e)}constructor(e,t,n){this.route=e,this.childContexts=t,this.parent=n}get(e,t){return e===Rl?this.route:e===xb?this.childContexts:this.parent.get(e,t)}},Z1=new ge("");function _Y(i,e,t){let n=hm(i,e._root,t?t._root:void 0);return new gb(n,e)}function hm(i,e,t){if(t&&i.shouldReuseRoute(e.value,t.value.snapshot)){let n=t.value;n._futureSnapshot=e.value;let r=vY(i,e,t);return new ao(n,r)}else{if(i.shouldAttach(e.value)){let o=i.retrieve(e.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>hm(i,a)),s}}let n=bY(e.value),r=e.children.map(o=>hm(i,o));return new ao(n,r)}}function vY(i,e,t){return e.children.map(n=>{for(let r of t.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return hm(i,n,r);return hm(i,n)})}function bY(i){return new Rl(new Dn(i.url),new Dn(i.params),new Dn(i.queryParams),new Dn(i.fragment),new Dn(i.data),i.outlet,i.component,i)}var pm=class{constructor(e,t){this.redirectTo=e,this.navigationBehaviorOptions=t}},QL="ngNavigationCancelingError";function bb(i,e){let{redirectTo:t,navigationBehaviorOptions:n}=am(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=KL(!1,lo.Redirect);return r.url=t,r.navigationBehaviorOptions=n,r}function KL(i,e){let t=new Error(`NavigationCancelingError: ${i||""}`);return t[QL]=!0,t.cancellationCode=e,t}function yY(i){return JL(i)&&am(i.url)}function JL(i){return!!i&&i[QL]}var xY=(i,e,t,n)=>Je(r=>(new U1(e,r.targetRouterState,r.currentRouterState,t,n).activate(i),r)),U1=class{constructor(e,t,n,r,o){this.routeReuseStrategy=e,this.futureState=t,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=o}activate(e){let t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),v1(this.futureState.root),this.activateChildRoutes(t,n,e)}deactivateChildRoutes(e,t,n){let r=sh(t);e.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],n),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(e,t,n){let r=e.value,o=t?t.value:null;if(r===o)if(r.component){let s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,n);else o&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,o=sh(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,o=sh(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,t,n){let r=sh(t);e.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],n),this.forwardEvent(new k1(o.value.snapshot))}),e.children.length&&this.forwardEvent(new A1(e.value.snapshot))}activateRoutes(e,t,n){let r=e.value,o=t?t.value:null;if(v1(r),r===o)if(r.component){let s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,n);else if(r.component){let s=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),v1(a.route.value),this.activateChildRoutes(e,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(e,null,s.children)}else this.activateChildRoutes(e,null,n)}},yb=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},ch=class{constructor(e,t){this.component=e,this.route=t}};function wY(i,e,t){let n=i._root,r=e?e._root:null;return tm(n,r,t,[n.value])}function CY(i){let e=i.routeConfig?i.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:i,guards:e}}function ph(i,e){let t=Symbol(),n=e.get(i,t);return n===t?typeof i=="function"&&!rN(i)?i:e.get(i):n}function tm(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=sh(e);return i.children.forEach(s=>{SY(s,o[s.value.outlet],t,n.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>om(a,t.getContext(s),r)),r}function SY(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=i.value,s=e?e.value:null,a=t?t.getContext(i.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let l=MY(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new yb(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?tm(i,e,a?a.children:null,n,r):tm(i,e,t,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new ch(a.outlet.component,s))}else s&&om(e,a,r),r.canActivateChecks.push(new yb(n)),o.component?tm(i,null,a?a.children:null,n,r):tm(i,null,t,n,r);return r}function MY(i,e,t){if(typeof t=="function")return t(i,e);switch(t){case"pathParamsChange":return!Jc(i.url,e.url);case"pathParamsOrQueryParamsChange":return!Jc(i.url,e.url)||!Vs(i.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!V1(i,e)||!Vs(i.queryParams,e.queryParams);case"paramsChange":default:return!V1(i,e)}}function om(i,e,t){let n=sh(i),r=i.value;Object.entries(n).forEach(([o,s])=>{r.component?e?om(s,e.children.getContext(o),t):om(s,null,t):om(s,e,t)}),r.component?e&&e.outlet&&e.outlet.isActivated?t.canDeactivateChecks.push(new ch(e.outlet.component,r)):t.canDeactivateChecks.push(new ch(null,r)):t.canDeactivateChecks.push(new ch(null,r))}function vm(i){return typeof i=="function"}function EY(i){return typeof i=="boolean"}function IY(i){return i&&vm(i.canLoad)}function TY(i){return i&&vm(i.canActivate)}function DY(i){return i&&vm(i.canActivateChild)}function PY(i){return i&&vm(i.canDeactivate)}function OY(i){return i&&vm(i.canMatch)}function eF(i){return i instanceof _a||i?.name==="EmptyError"}var lb=Symbol("INITIAL_VALUE");function hh(){return Xn(i=>qr(i.map(e=>e.pipe(_n(1),pi(lb)))).pipe(Je(e=>{for(let t of e)if(t!==!0){if(t===lb)return lb;if(t===!1||RY(t))return t}return!0}),Gt(e=>e!==lb),_n(1)))}function RY(i){return am(i)||i instanceof pm}function AY(i,e){return ei(t=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return s.length===0&&o.length===0?Ke(wt(Z({},t),{guardsResult:!0})):NY(s,n,r,i).pipe(ei(a=>a&&EY(a)?kY(n,o,i,e):Ke(a)),Je(a=>wt(Z({},t),{guardsResult:a})))})}function NY(i,e,t,n){return Kn(i).pipe(ei(r=>zY(r.component,r.route,t,e,n)),Ps(r=>r!==!0,!0))}function kY(i,e,t,n){return Kn(e).pipe(gl(r=>Ts(FY(r.route.parent,n),LY(r.route,n),VY(i,r.path,t),BY(i,r.route,t))),Ps(r=>r!==!0,!0))}function LY(i,e){return i!==null&&e&&e(new N1(i)),Ke(!0)}function FY(i,e){return i!==null&&e&&e(new R1(i)),Ke(!0)}function BY(i,e,t){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return Ke(!0);let r=n.map(o=>Io(()=>{let s=_m(e)??t,a=ph(o,s),l=TY(a)?a.canActivate(e,i):ks(s,()=>a(e,i));return Al(l).pipe(Ps())}));return Ke(r).pipe(hh())}function VY(i,e,t){let n=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>CY(s)).filter(s=>s!==null).map(s=>Io(()=>{let a=s.guards.map(l=>{let c=_m(s.node)??t,d=ph(l,c),u=DY(d)?d.canActivateChild(n,i):ks(c,()=>d(n,i));return Al(u).pipe(Ps())});return Ke(a).pipe(hh())}));return Ke(o).pipe(hh())}function zY(i,e,t,n,r){let o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||o.length===0)return Ke(!0);let s=o.map(a=>{let l=_m(e)??r,c=ph(a,l),d=PY(c)?c.canDeactivate(i,e,t,n):ks(l,()=>c(i,e,t,n));return Al(d).pipe(Ps())});return Ke(s).pipe(hh())}function UY(i,e,t,n){let r=e.canLoad;if(r===void 0||r.length===0)return Ke(!0);let o=r.map(s=>{let a=ph(s,i),l=IY(a)?a.canLoad(e,t):ks(i,()=>a(e,t));return Al(l)});return Ke(o).pipe(hh(),tF(n))}function tF(i){return bS(Sn(e=>{if(typeof e!="boolean")throw bb(i,e)}),Je(e=>e===!0))}function HY(i,e,t,n){let r=e.canMatch;if(!r||r.length===0)return Ke(!0);let o=r.map(s=>{let a=ph(s,i),l=OY(a)?a.canMatch(e,t):ks(i,()=>a(e,t));return Al(l)});return Ke(o).pipe(hh(),tF(n))}var fm=class{constructor(e){this.segmentGroup=e||null}},mm=class extends Error{constructor(e){super(),this.urlTree=e}};function oh(i){return ml(new fm(i))}function GY(i){return ml(new Oe(4e3,!1))}function jY(i){return ml(KL(!1,lo.GuardRejected))}var H1=class{constructor(e,t){this.urlSerializer=e,this.urlTree=t}lineralizeSegments(e,t){let n=[],r=t.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return Ke(n);if(r.numberOfChildren>1||!r.children[Zt])return GY(`${e.redirectTo}`);r=r.children[Zt]}}applyRedirectCommands(e,t,n,r,o){if(typeof t!="string"){let a=t,{queryParams:l,fragment:c,routeConfig:d,url:u,outlet:h,params:p,data:f,title:m}=r,b=ks(o,()=>a({params:p,data:f,queryParams:l,fragment:c,routeConfig:d,url:u,outlet:h,title:m}));if(b instanceof Ra)throw new mm(b);t=b}let s=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),e,n);if(t[0]==="/")throw new mm(s);return s}applyRedirectCreateUrlTree(e,t,n,r){let o=this.createSegmentGroup(e,t.root,n,r);return new Ra(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){let n={};return Object.entries(e).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);n[r]=t[a]}else n[r]=o}),n}createSegmentGroup(e,t,n,r){let o=this.createSegments(e,t.segments,n,r),s={};return Object.entries(t.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(e,l,n,r)}),new En(o,s)}createSegments(e,t,n,r){return t.map(o=>o.path[0]===":"?this.findPosParam(e,o,r):this.findOrReturn(o,n))}findPosParam(e,t,n){let r=n[t.path.substring(1)];if(!r)throw new Oe(4001,!1);return r}findOrReturn(e,t){let n=0;for(let r of t){if(r.path===e.path)return t.splice(n),r;n++}return e}},G1={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function WY(i,e,t,n,r){let o=Q1(i,e,t);return o.matched?(n=fY(e,n),HY(n,e,t,r).pipe(Je(s=>s===!0?o:Z({},G1)))):Ke(o)}function Q1(i,e,t){if(e.path==="**")return $Y(t);if(e.path==="")return e.pathMatch==="full"&&(i.hasChildren()||t.length>0)?Z({},G1):{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};let r=(e.matcher||Hq)(t,i,e);if(!r)return Z({},G1);let o={};Object.entries(r.posParams??{}).forEach(([a,l])=>{o[a]=l.path});let s=r.consumed.length>0?Z(Z({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function $Y(i){return{matched:!0,parameters:i.length>0?kL(i).parameters:{},consumedSegments:i,remainingSegments:[],positionalParamSegments:{}}}function OL(i,e,t,n){return t.length>0&&XY(i,t,n)?{segmentGroup:new En(e,YY(n,new En(t,i.children))),slicedSegments:[]}:t.length===0&&ZY(i,t,n)?{segmentGroup:new En(i.segments,qY(i,t,n,i.children)),slicedSegments:t}:{segmentGroup:new En(i.segments,i.children),slicedSegments:t}}function qY(i,e,t,n){let r={};for(let o of t)if(wb(i,e,o)&&!n[hs(o)]){let s=new En([],{});r[hs(o)]=s}return Z(Z({},n),r)}function YY(i,e){let t={};t[Zt]=e;for(let n of i)if(n.path===""&&hs(n)!==Zt){let r=new En([],{});t[hs(n)]=r}return t}function XY(i,e,t){return t.some(n=>wb(i,e,n)&&hs(n)!==Zt)}function ZY(i,e,t){return t.some(n=>wb(i,e,n))}function wb(i,e,t){return(i.hasChildren()||e.length>0)&&t.pathMatch==="full"?!1:t.path===""}function QY(i,e,t,n){return hs(i)!==n&&(n===Zt||!wb(e,t,i))?!1:Q1(e,i,t).matched}function KY(i,e,t){return e.length===0&&!i.children[t]}var j1=class{};function JY(i,e,t,n,r,o,s="emptyOnly"){return new W1(i,e,t,n,r,s,o).recognize()}var eX=31,W1=class{constructor(e,t,n,r,o,s,a){this.injector=e,this.configLoader=t,this.rootComponentType=n,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new H1(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new Oe(4002,`'${e.segmentGroup}'`)}recognize(){let e=OL(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(Je(({children:t,rootSnapshot:n})=>{let r=new ao(n,t),o=new vb("",r),s=aY(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(e){let t=new lh([],Object.freeze({}),Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Zt,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,Zt,t).pipe(Je(n=>({children:n,rootSnapshot:t})),Ds(n=>{if(n instanceof mm)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof fm?this.noMatchError(n):n}))}processSegmentGroup(e,t,n,r,o){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,t,n,o):this.processSegment(e,t,n,n.segments,r,!0,o).pipe(Je(s=>s instanceof ao?[s]:[]))}processChildren(e,t,n,r){let o=[];for(let s of Object.keys(n.children))s==="primary"?o.unshift(s):o.push(s);return Kn(o).pipe(gl(s=>{let a=n.children[s],l=mY(t,s);return this.processSegmentGroup(e,l,a,s,r)}),DS((s,a)=>(s.push(...a),s)),_l(null),TS(),ei(s=>{if(s===null)return oh(n);let a=nF(s);return tX(a),Ke(a)}))}processSegment(e,t,n,r,o,s,a){return Kn(t).pipe(gl(l=>this.processSegmentAgainstRoute(l._injector??e,t,l,n,r,o,s,a).pipe(Ds(c=>{if(c instanceof fm)return Ke(null);throw c}))),Ps(l=>!!l),Ds(l=>{if(eF(l))return KY(n,r,o)?Ke(new j1):oh(n);throw l}))}processSegmentAgainstRoute(e,t,n,r,o,s,a,l){return QY(n,r,o,s)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,r,n,o,s,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,r,t,n,o,s,l):oh(r):oh(r)}expandSegmentAgainstRouteUsingRedirect(e,t,n,r,o,s,a){let{matched:l,parameters:c,consumedSegments:d,positionalParamSegments:u,remainingSegments:h}=Q1(t,r,o);if(!l)return oh(t);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>eX&&(this.allowRedirects=!1));let p=new lh(o,c,Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,RL(r),hs(r),r.component??r._loadedComponent??null,r,AL(r)),f=_b(p,a,this.paramsInheritanceStrategy);p.params=Object.freeze(f.params),p.data=Object.freeze(f.data);let m=this.applyRedirects.applyRedirectCommands(d,r.redirectTo,u,p,e);return this.applyRedirects.lineralizeSegments(r,m).pipe(ei(b=>this.processSegment(e,n,t,b.concat(h),s,!1,a)))}matchSegmentAgainstRoute(e,t,n,r,o,s){let a=WY(t,n,r,e,this.urlSerializer);return n.path==="**"&&(t.children={}),a.pipe(Xn(l=>l.matched?(e=n._injector??e,this.getChildConfig(e,n,r).pipe(Xn(({routes:c})=>{let d=n._loadedInjector??e,{parameters:u,consumedSegments:h,remainingSegments:p}=l,f=new lh(h,u,Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,RL(n),hs(n),n.component??n._loadedComponent??null,n,AL(n)),m=_b(f,s,this.paramsInheritanceStrategy);f.params=Object.freeze(m.params),f.data=Object.freeze(m.data);let{segmentGroup:b,slicedSegments:g}=OL(t,h,p,c);if(g.length===0&&b.hasChildren())return this.processChildren(d,c,b,f).pipe(Je(x=>new ao(f,x)));if(c.length===0&&g.length===0)return Ke(new ao(f,[]));let _=hs(n)===o;return this.processSegment(d,c,b,g,_?Zt:o,!0,f).pipe(Je(x=>new ao(f,x instanceof ao?[x]:[])))}))):oh(t)))}getChildConfig(e,t,n){return t.children?Ke({routes:t.children,injector:e}):t.loadChildren?t._loadedRoutes!==void 0?Ke({routes:t._loadedRoutes,injector:t._loadedInjector}):UY(e,t,n,this.urlSerializer).pipe(ei(r=>r?this.configLoader.loadChildren(e,t).pipe(Sn(o=>{t._loadedRoutes=o.routes,t._loadedInjector=o.injector})):jY(t))):Ke({routes:[],injector:e})}};function tX(i){i.sort((e,t)=>e.value.outlet===Zt?-1:t.value.outlet===Zt?1:e.value.outlet.localeCompare(t.value.outlet))}function nX(i){let e=i.value.routeConfig;return e&&e.path===""}function nF(i){let e=[],t=new Set;for(let n of i){if(!nX(n)){e.push(n);continue}let r=e.find(o=>n.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...n.children),t.add(r)):e.push(n)}for(let n of t){let r=nF(n.children);e.push(new ao(n.value,r))}return e.filter(n=>!t.has(n))}function RL(i){return i.data||{}}function AL(i){return i.resolve||{}}function iX(i,e,t,n,r,o){return ei(s=>JY(i,e,t,n,s.extractedUrl,r,o).pipe(Je(({state:a,tree:l})=>wt(Z({},s),{targetSnapshot:a,urlAfterRedirects:l}))))}function rX(i,e){return ei(t=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return Ke(t);let o=new Set(r.map(l=>l.route)),s=new Set;for(let l of o)if(!s.has(l))for(let c of iF(l))s.add(c);let a=0;return Kn(s).pipe(gl(l=>o.has(l)?oX(l,n,i,e):(l.data=_b(l,l.parent,i).resolve,Ke(void 0))),Sn(()=>a++),Lu(1),ei(l=>a===s.size?Ke(t):Ir))})}function iF(i){let e=i.children.map(t=>iF(t)).flat();return[i,...e]}function oX(i,e,t,n){let r=i.routeConfig,o=i._resolve;return r?.title!==void 0&&!ZL(r)&&(o[gm]=r.title),sX(o,i,e,n).pipe(Je(s=>(i._resolvedData=s,i.data=_b(i,i.parent,t).resolve,null)))}function sX(i,e,t,n){let r=x1(i);if(r.length===0)return Ke({});let o={};return Kn(r).pipe(ei(s=>aX(i[s],e,t,n).pipe(Ps(),Sn(a=>{if(a instanceof pm)throw bb(new sm,a);o[s]=a}))),Lu(1),If(o),Ds(s=>eF(s)?Ir:ml(s)))}function aX(i,e,t,n){let r=_m(e)??n,o=ph(i,r),s=o.resolve?o.resolve(e,t):ks(r,()=>o(e,t));return Al(s)}function b1(i){return Xn(e=>{let t=i(e);return t?Kn(t).pipe(Je(()=>e)):Ke(e)})}var rF=(()=>{let e=class e{buildTitle(n){let r,o=n.root;for(;o!==void 0;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(s=>s.outlet===Zt);return r}getResolvedTitleForRoute(n){return n.data[gm]}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(lX),providedIn:"root"});let i=e;return i})(),lX=(()=>{let e=class e extends rF{constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}};e.\u0275fac=function(r){return new(r||e)(X(ML))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),K1=new ge("",{providedIn:"root",factory:()=>({})}),cX=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=le({type:e,selectors:[["ng-component"]],standalone:!0,features:[ce],decls:1,vars:0,template:function(r,o){r&1&&J(0,"router-outlet")},dependencies:[X1],encapsulation:2});let i=e;return i})();function J1(i){let e=i.children&&i.children.map(J1),t=e?wt(Z({},i),{children:e}):Z({},i);return!t.component&&!t.loadComponent&&(e||t.loadChildren)&&t.outlet&&t.outlet!==Zt&&(t.component=cX),t}var eI=new ge(""),dX=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=te(YE)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Ke(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=Al(n.loadComponent()).pipe(Je(oF),Sn(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),bl(()=>{this.componentLoaders.delete(n)})),o=new hl(r,()=>new me).pipe(Du());return this.componentLoaders.set(n,o),o}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Ke({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let s=uX(r,this.compiler,n,this.onLoadEndListener).pipe(bl(()=>{this.childrenLoaders.delete(r)})),a=new hl(s,()=>new me).pipe(Du());return this.childrenLoaders.set(r,a),a}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function uX(i,e,t,n){return Al(i.loadChildren()).pipe(Je(oF),ei(r=>r instanceof Bf||Array.isArray(r)?Ke(r):Kn(e.compileModuleAsync(r))),Je(r=>{n&&n(i);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(t).injector,s=o.get(eI,[],{optional:!0,self:!0}).flat()),{routes:s.map(J1),injector:o}}))}function hX(i){return i&&typeof i=="object"&&"default"in i}function oF(i){return hX(i)?i.default:i}var tI=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(pX),providedIn:"root"});let i=e;return i})(),pX=(()=>{let e=class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),fX=new ge("");var mX=new ge(""),gX=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new me,this.transitionAbortSubject=new me,this.configLoader=te(dX),this.environmentInjector=te(qi),this.urlSerializer=te(q1),this.rootContexts=te(xb),this.location=te(Pa),this.inputBindingEnabled=te(Z1,{optional:!0})!==null,this.titleStrategy=te(rF),this.options=te(K1,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=te(tI),this.createViewTransition=te(fX,{optional:!0}),this.navigationErrorHandler=te(mX,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>Ke(void 0),this.rootComponentType=null;let n=o=>this.events.next(new P1(o)),r=o=>this.events.next(new O1(o));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;this.transitions?.next(wt(Z(Z({},this.transitions.value),n),{id:r}))}setupNavigations(n,r,o){return this.transitions=new Dn({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:rm,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Gt(s=>s.id!==0),Je(s=>wt(Z({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Xn(s=>{let a=!1,l=!1;return Ke(s).pipe(Xn(c=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",lo.SupersededByNewNavigation),Ir;this.currentTransition=s,this.currentNavigation={id:c.id,initialUrl:c.rawUrl,extractedUrl:c.extractedUrl,targetBrowserUrl:typeof c.extras.browserUrl=="string"?this.urlSerializer.parse(c.extras.browserUrl):c.extras.browserUrl,trigger:c.source,extras:c.extras,previousNavigation:this.lastSuccessfulNavigation?wt(Z({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let d=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),u=c.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!d&&u!=="reload"){let h="";return this.events.next(new td(c.id,this.urlSerializer.serialize(c.rawUrl),h,M1.IgnoredSameUrlNavigation)),c.resolve(!1),Ir}if(this.urlHandlingStrategy.shouldProcessUrl(c.rawUrl))return Ke(c).pipe(Xn(h=>{let p=this.transitions?.getValue();return this.events.next(new cm(h.id,this.urlSerializer.serialize(h.extractedUrl),h.source,h.restoredState)),p!==this.transitions?.getValue()?Ir:Promise.resolve(h)}),iX(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),Sn(h=>{s.targetSnapshot=h.targetSnapshot,s.urlAfterRedirects=h.urlAfterRedirects,this.currentNavigation=wt(Z({},this.currentNavigation),{finalUrl:h.urlAfterRedirects});let p=new fb(h.id,this.urlSerializer.serialize(h.extractedUrl),this.urlSerializer.serialize(h.urlAfterRedirects),h.targetSnapshot);this.events.next(p)}));if(d&&this.urlHandlingStrategy.shouldProcessUrl(c.currentRawUrl)){let{id:h,extractedUrl:p,source:f,restoredState:m,extras:b}=c,g=new cm(h,this.urlSerializer.serialize(p),f,m);this.events.next(g);let _=YL(this.rootComponentType).snapshot;return this.currentTransition=s=wt(Z({},c),{targetSnapshot:_,urlAfterRedirects:p,extras:wt(Z({},b),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=p,Ke(s)}else{let h="";return this.events.next(new td(c.id,this.urlSerializer.serialize(c.extractedUrl),h,M1.IgnoredByUrlHandlingStrategy)),c.resolve(!1),Ir}}),Sn(c=>{let d=new E1(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(d)}),Je(c=>(this.currentTransition=s=wt(Z({},c),{guards:wY(c.targetSnapshot,c.currentSnapshot,this.rootContexts)}),s)),AY(this.environmentInjector,c=>this.events.next(c)),Sn(c=>{if(s.guardsResult=c.guardsResult,c.guardsResult&&typeof c.guardsResult!="boolean")throw bb(this.urlSerializer,c.guardsResult);let d=new I1(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot,!!c.guardsResult);this.events.next(d)}),Gt(c=>c.guardsResult?!0:(this.cancelNavigationTransition(c,"",lo.GuardRejected),!1)),b1(c=>{if(c.guards.canActivateChecks.length)return Ke(c).pipe(Sn(d=>{let u=new T1(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(u)}),Xn(d=>{let u=!1;return Ke(d).pipe(rX(this.paramsInheritanceStrategy,this.environmentInjector),Sn({next:()=>u=!0,complete:()=>{u||this.cancelNavigationTransition(d,"",lo.NoDataFromResolver)}}))}),Sn(d=>{let u=new D1(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(u)}))}),b1(c=>{let d=u=>{let h=[];u.routeConfig?.loadComponent&&!u.routeConfig._loadedComponent&&h.push(this.configLoader.loadComponent(u.routeConfig).pipe(Sn(p=>{u.component=p}),Je(()=>{})));for(let p of u.children)h.push(...d(p));return h};return qr(d(c.targetSnapshot.root)).pipe(_l(null),_n(1))}),b1(()=>this.afterPreactivation()),Xn(()=>{let{currentSnapshot:c,targetSnapshot:d}=s,u=this.createViewTransition?.(this.environmentInjector,c.root,d.root);return u?Kn(u).pipe(Je(()=>s)):Ke(s)}),Je(c=>{let d=_Y(n.routeReuseStrategy,c.targetSnapshot,c.currentRouterState);return this.currentTransition=s=wt(Z({},c),{targetRouterState:d}),this.currentNavigation.targetRouterState=d,s}),Sn(()=>{this.events.next(new um)}),xY(this.rootContexts,n.routeReuseStrategy,c=>this.events.next(c),this.inputBindingEnabled),_n(1),Sn({next:c=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new ed(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects))),this.titleStrategy?.updateTitle(c.targetRouterState.snapshot),c.resolve(!0)},complete:()=>{a=!0}}),Xe(this.transitionAbortSubject.pipe(Sn(c=>{throw c}))),bl(()=>{!a&&!l&&this.cancelNavigationTransition(s,"",lo.SupersededByNewNavigation),this.currentTransition?.id===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),Ds(c=>{if(l=!0,JL(c))this.events.next(new Oa(s.id,this.urlSerializer.serialize(s.extractedUrl),c.message,c.cancellationCode)),yY(c)?this.events.next(new uh(c.url,c.navigationBehaviorOptions)):s.resolve(!1);else{let d=new dm(s.id,this.urlSerializer.serialize(s.extractedUrl),c,s.targetSnapshot??void 0);try{let u=ks(this.environmentInjector,()=>this.navigationErrorHandler?.(d));if(u instanceof pm){let{message:h,cancellationCode:p}=bb(this.urlSerializer,u);this.events.next(new Oa(s.id,this.urlSerializer.serialize(s.extractedUrl),h,p)),this.events.next(new uh(u.redirectTo,u.navigationBehaviorOptions))}else{this.events.next(d);let h=n.errorHandler(c);s.resolve(!!h)}}catch(u){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(u)}}return Ir}))}))}cancelNavigationTransition(n,r,o){let s=new Oa(n.id,this.urlSerializer.serialize(n.extractedUrl),r,o);this.events.next(s),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return n.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function _X(i){return i!==rm}var vX=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(bX),providedIn:"root"});let i=e;return i})(),$1=class{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}},bX=(()=>{let e=class e extends $1{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),sF=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(yX),providedIn:"root"});let i=e;return i})(),yX=(()=>{let e=class e extends sF{constructor(){super(...arguments),this.location=te(Pa),this.urlSerializer=te(q1),this.options=te(K1,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=te(tI),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Ra,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=YL(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{r.type==="popstate"&&n(r.url,r.state)})}handleRouterEvent(n,r){if(n instanceof cm)this.stateMemento=this.createStateMemento();else if(n instanceof td)this.rawUrlTree=r.initialUrl;else if(n instanceof fb){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(r.targetBrowserUrl??o,r)}}else n instanceof um?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(r.targetBrowserUrl??this.rawUrlTree,r)):n instanceof Oa&&(n.code===lo.GuardRejected||n.code===lo.NoDataFromResolver)?this.restoreHistory(r):n instanceof dm?this.restoreHistory(r,!0):n instanceof ed&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let o=n instanceof Ra?this.urlSerializer.serialize(n):n;if(this.location.isCurrentPathEqualTo(o)||r.extras.replaceUrl){let s=this.browserPageId,a=Z(Z({},r.extras.state),this.generateNgRouterState(r.id,s));this.location.replaceState(o,"",a)}else{let s=Z(Z({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(o,"",s)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,s=this.currentPageId-o;s!==0?this.location.historyGo(s):this.currentUrlTree===n.finalUrl&&s===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),nm=function(i){return i[i.COMPLETE=0]="COMPLETE",i[i.FAILED=1]="FAILED",i[i.REDIRECTING=2]="REDIRECTING",i}(nm||{});function xX(i,e){i.events.pipe(Gt(t=>t instanceof ed||t instanceof Oa||t instanceof dm||t instanceof td),Je(t=>t instanceof ed||t instanceof td?nm.COMPLETE:(t instanceof Oa?t.code===lo.Redirect||t.code===lo.SupersededByNewNavigation:!1)?nm.REDIRECTING:nm.FAILED),Gt(t=>t!==nm.REDIRECTING),_n(1)).subscribe(()=>{e()})}function wX(i){throw i}var CX={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},SX={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},fh=(()=>{let e=class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=te(Z0),this.stateManager=te(sF),this.options=te(K1,{optional:!0})||{},this.pendingTasks=te($c),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=te(gX),this.urlSerializer=te(q1),this.location=te(Pa),this.urlHandlingStrategy=te(tI),this._events=new me,this.errorHandler=this.options.errorHandler||wX,this.navigated=!1,this.routeReuseStrategy=te(vX),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=te(eI,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!te(Z1,{optional:!0}),this.eventsSubscription=new Ct,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let o=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(o!==null&&s!==null){if(this.stateManager.handleRouterEvent(r,s),r instanceof Oa&&r.code!==lo.Redirect&&r.code!==lo.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof ed)this.navigated=!0;else if(r instanceof uh){let a=r.navigationBehaviorOptions,l=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),c=Z({browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||_X(o.source)},a);this.scheduleNavigation(l,rm,null,c,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}EX(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),rm,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",r)},0)})}navigateToSyncWithBrowser(n,r,o){let s={replaceUrl:!0},a=o?.navigationId?o:null;if(o){let c=Z({},o);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(s.state=c)}let l=this.parseUrl(n);this.scheduleNavigation(l,r,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(J1),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){let{relativeTo:o,queryParams:s,fragment:a,queryParamsHandling:l,preserveFragment:c}=r,d=c?this.currentUrlTree.fragment:a,u=null;switch(l){case"merge":u=Z(Z({},this.currentUrlTree.queryParams),s);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=s||null}u!==null&&(u=this.removeEmptyProps(u));let h;try{let p=o?o.snapshot:this.routerState.snapshot.root;h=jL(p)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),h=this.currentUrlTree.root}return WL(h,n,u,d??null)}navigateByUrl(n,r={skipLocationChange:!1}){let o=am(n)?n:this.parseUrl(n),s=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(s,rm,null,r)}navigate(n,r={skipLocationChange:!1}){return MX(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,r){let o;if(r===!0?o=Z({},CX):r===!1?o=Z({},SX):o=r,am(n))return IL(this.currentUrlTree,n,o);let s=this.parseUrl(n);return IL(this.currentUrlTree,s,o)}removeEmptyProps(n){return Object.entries(n).reduce((r,[o,s])=>(s!=null&&(r[o]=s),r),{})}scheduleNavigation(n,r,o,s,a){if(this.disposed)return Promise.resolve(!1);let l,c,d;a?(l=a.resolve,c=a.reject,d=a.promise):d=new Promise((h,p)=>{l=h,c=p});let u=this.pendingTasks.add();return xX(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(u))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:s,resolve:l,reject:c,promise:d,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),d.catch(h=>Promise.reject(h))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function MX(i){for(let e=0;et.\u0275providers)])}function TX(i){return i.routerState.root}function DX(){let i=te(bt);return e=>{let t=i.get(us);if(e!==t.components[0])return;let n=i.get(fh),r=i.get(PX);i.get(OX)===1&&n.initialNavigation(),i.get(RX,null,en.Optional)?.setUpPreloading(),i.get(IX,null,en.Optional)?.init(),n.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var PX=new ge("",{factory:()=>new me}),OX=new ge("",{providedIn:"root",factory:()=>1});var RX=new ge("");var cF=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["app-root"]],standalone:!0,features:[ce],decls:1,vars:0,template:function(n,r){n&1&&J(0,"router-outlet")},dependencies:[Ae,X1]})}return i})();var Vt=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(Vt||{}),zs="*";function si(i,e){return{type:Vt.Trigger,name:i,definitions:e,options:{}}}function Pn(i,e=null){return{type:Vt.Animate,styles:e,timings:i}}function dF(i,e=null){return{type:Vt.Group,steps:i,options:e}}function uF(i,e=null){return{type:Vt.Sequence,steps:i,options:e}}function Qt(i){return{type:Vt.Style,styles:i,offset:null}}function fi(i,e,t){return{type:Vt.State,name:i,styles:e,options:t}}function On(i,e,t=null){return{type:Vt.Transition,expr:i,animation:e,options:t}}function hF(i=null){return{type:Vt.AnimateChild,options:i}}function pF(i,e,t=null){return{type:Vt.Query,selector:i,animation:e,options:t}}var Nl=class{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},bm=class{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,n=0,r=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++t==o&&this._onFinish()}),s.onDestroy(()=>{++n==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let t=e*this.totalTime;this.players.forEach(n=>{let r=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(r)})}getPosition(){let e=this.players.reduce((t,n)=>t===null||n.totalTime>t.totalTime?n:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Cb="!";function fF(i){return new Oe(3e3,!1)}function AX(){return new Oe(3100,!1)}function NX(){return new Oe(3101,!1)}function kX(i){return new Oe(3001,!1)}function LX(i){return new Oe(3003,!1)}function FX(i){return new Oe(3004,!1)}function BX(i,e){return new Oe(3005,!1)}function VX(){return new Oe(3006,!1)}function zX(){return new Oe(3007,!1)}function UX(i,e){return new Oe(3008,!1)}function HX(i){return new Oe(3002,!1)}function GX(i,e,t,n,r){return new Oe(3010,!1)}function jX(){return new Oe(3011,!1)}function WX(){return new Oe(3012,!1)}function $X(){return new Oe(3200,!1)}function qX(){return new Oe(3202,!1)}function YX(){return new Oe(3013,!1)}function XX(i){return new Oe(3014,!1)}function ZX(i){return new Oe(3015,!1)}function QX(i){return new Oe(3016,!1)}function KX(i,e){return new Oe(3404,!1)}function JX(i){return new Oe(3502,!1)}function eZ(i){return new Oe(3503,!1)}function tZ(){return new Oe(3300,!1)}function nZ(i){return new Oe(3504,!1)}function iZ(i){return new Oe(3301,!1)}function rZ(i,e){return new Oe(3302,!1)}function oZ(i){return new Oe(3303,!1)}function sZ(i,e){return new Oe(3400,!1)}function aZ(i){return new Oe(3401,!1)}function lZ(i){return new Oe(3402,!1)}function cZ(i,e){return new Oe(3505,!1)}function kl(i){switch(i.length){case 0:return new Nl;case 1:return i[0];default:return new bm(i)}}function TF(i,e,t=new Map,n=new Map){let r=[],o=[],s=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),d=c==s,u=d&&a||new Map;l.forEach((h,p)=>{let f=p,m=h;if(p!=="offset")switch(f=i.normalizePropertyName(f,r),m){case Cb:m=t.get(p);break;case zs:m=n.get(p);break;default:m=i.normalizeStyleValue(p,f,m,r);break}u.set(f,m)}),d||o.push(u),a=u,s=c}),r.length)throw JX(r);return o}function SI(i,e,t,n){switch(e){case"start":i.onStart(()=>n(t&&nI(t,"start",i)));break;case"done":i.onDone(()=>n(t&&nI(t,"done",i)));break;case"destroy":i.onDestroy(()=>n(t&&nI(t,"destroy",i)));break}}function nI(i,e,t){let n=t.totalTime,r=!!t.disabled,o=MI(i.element,i.triggerName,i.fromState,i.toState,e||i.phaseName,n??i.totalTime,r),s=i._data;return s!=null&&(o._data=s),o}function MI(i,e,t,n,r="",o=0,s){return{element:i,triggerName:e,fromState:t,toState:n,phaseName:r,totalTime:o,disabled:!!s}}function uo(i,e,t){let n=i.get(e);return n||i.set(e,n=t),n}function mF(i){let e=i.indexOf(":"),t=i.substring(1,e),n=i.slice(e+1);return[t,n]}var dZ=typeof document>"u"?null:document.documentElement;function EI(i){let e=i.parentNode||i.host||null;return e===dZ?null:e}function uZ(i){return i.substring(1,6)=="ebkit"}var nd=null,gF=!1;function hZ(i){nd||(nd=pZ()||{},gF=nd.style?"WebkitAppearance"in nd.style:!1);let e=!0;return nd.style&&!uZ(i)&&(e=i in nd.style,!e&&gF&&(e="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in nd.style)),e}function pZ(){return typeof document<"u"?document.body:null}function DF(i,e){for(;e;){if(e===i)return!0;e=EI(e)}return!1}function PF(i,e,t){if(t)return Array.from(i.querySelectorAll(e));let n=i.querySelector(e);return n?[n]:[]}var II=(()=>{let e=class e{validateStyleProperty(n){return hZ(n)}containsElement(n,r){return DF(n,r)}getParentElement(n){return EI(n)}query(n,r,o){return PF(n,r,o)}computeStyle(n,r,o){return o||""}animate(n,r,o,s,a,l=[],c){return new Nl(o,s)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),OI=class OI{};OI.NOOP=new II;var od=OI,sd=class{};var fZ=1e3,OF="{{",mZ="}}",RF="ng-enter",lI="ng-leave",Sb="ng-trigger",Db=".ng-trigger",_F="ng-animating",cI=".ng-animating";function Aa(i){if(typeof i=="number")return i;let e=i.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:dI(parseFloat(e[1]),e[2])}function dI(i,e){switch(e){case"s":return i*fZ;default:return i}}function Pb(i,e,t){return i.hasOwnProperty("duration")?i:gZ(i,e,t)}function gZ(i,e,t){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,r,o=0,s="";if(typeof i=="string"){let a=i.match(n);if(a===null)return e.push(fF(i)),{duration:0,delay:0,easing:""};r=dI(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(o=dI(parseFloat(l),a[4]));let c=a[5];c&&(s=c)}else r=i;if(!t){let a=!1,l=e.length;r<0&&(e.push(AX()),a=!0),o<0&&(e.push(NX()),a=!0),a&&e.splice(l,0,fF(i))}return{duration:r,delay:o,easing:s}}function _Z(i){return i.length?i[0]instanceof Map?i:i.map(e=>new Map(Object.entries(e))):[]}function Us(i,e,t){e.forEach((n,r)=>{let o=TI(r);t&&!t.has(r)&&t.set(r,i.style[o]),i.style[o]=n})}function rd(i,e){e.forEach((t,n)=>{let r=TI(n);i.style[r]=""})}function ym(i){return Array.isArray(i)?i.length==1?i[0]:uF(i):i}function vZ(i,e,t){let n=e.params||{},r=AF(i);r.length&&r.forEach(o=>{n.hasOwnProperty(o)||t.push(kX(o))})}var uI=new RegExp(`${OF}\\s*(.+?)\\s*${mZ}`,"g");function AF(i){let e=[];if(typeof i=="string"){let t;for(;t=uI.exec(i);)e.push(t[1]);uI.lastIndex=0}return e}function wm(i,e,t){let n=`${i}`,r=n.replace(uI,(o,s)=>{let a=e[s];return a==null&&(t.push(LX(s)),a=""),a.toString()});return r==n?i:r}var bZ=/-+([a-z0-9])/g;function TI(i){return i.replace(bZ,(...e)=>e[1].toUpperCase())}function yZ(i,e){return i===0||e===0}function xZ(i,e,t){if(t.size&&e.length){let n=e[0],r=[];if(t.forEach((o,s)=>{n.has(s)||r.push(s),n.set(s,o)}),r.length)for(let o=1;os.set(a,DI(i,a)))}}return e}function co(i,e,t){switch(e.type){case Vt.Trigger:return i.visitTrigger(e,t);case Vt.State:return i.visitState(e,t);case Vt.Transition:return i.visitTransition(e,t);case Vt.Sequence:return i.visitSequence(e,t);case Vt.Group:return i.visitGroup(e,t);case Vt.Animate:return i.visitAnimate(e,t);case Vt.Keyframes:return i.visitKeyframes(e,t);case Vt.Style:return i.visitStyle(e,t);case Vt.Reference:return i.visitReference(e,t);case Vt.AnimateChild:return i.visitAnimateChild(e,t);case Vt.AnimateRef:return i.visitAnimateRef(e,t);case Vt.Query:return i.visitQuery(e,t);case Vt.Stagger:return i.visitStagger(e,t);default:throw FX(e.type)}}function DI(i,e){return window.getComputedStyle(i)[e]}var wZ=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Ob=class extends sd{normalizePropertyName(e,t){return TI(e)}normalizeStyleValue(e,t,n,r){let o="",s=n.toString().trim();if(wZ.has(t)&&n!==0&&n!=="0")if(typeof n=="number")o="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&r.push(BX(e,n))}return s+o}};var Rb="*";function CZ(i,e){let t=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(n=>SZ(n,t,e)):t.push(i),t}function SZ(i,e,t){if(i[0]==":"){let l=MZ(i,t);if(typeof l=="function"){e.push(l);return}i=l}let n=i.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return t.push(ZX(i)),e;let r=n[1],o=n[2],s=n[3];e.push(vF(r,s));let a=r==Rb&&s==Rb;o[0]=="<"&&!a&&e.push(vF(s,r))}function MZ(i,e){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}var Mb=new Set(["true","1"]),Eb=new Set(["false","0"]);function vF(i,e){let t=Mb.has(i)||Eb.has(i),n=Mb.has(e)||Eb.has(e);return(r,o)=>{let s=i==Rb||i==r,a=e==Rb||e==o;return!s&&t&&typeof r=="boolean"&&(s=r?Mb.has(i):Eb.has(i)),!a&&n&&typeof o=="boolean"&&(a=o?Mb.has(e):Eb.has(e)),s&&a}}var NF=":self",EZ=new RegExp(`s*${NF}s*,?`,"g");function kF(i,e,t,n){return new hI(i).build(e,t,n)}var bF="",hI=class{constructor(e){this._driver=e}build(e,t,n){let r=new pI(t);return this._resetContextStyleTimingState(r),co(this,ym(e),r)}_resetContextStyleTimingState(e){e.currentQuerySelector=bF,e.collectedStyles=new Map,e.collectedStyles.set(bF,new Map),e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,r=t.depCount=0,o=[],s=[];return e.name.charAt(0)=="@"&&t.errors.push(VX()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==Vt.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,o.push(this.visitState(l,t))}),l.name=c}else if(a.type==Vt.Transition){let l=this.visitTransition(a,t);n+=l.queryCount,r+=l.depCount,s.push(l)}else t.errors.push(zX())}),{type:Vt.Trigger,name:e.name,states:o,transitions:s,queryCount:n,depCount:r,options:null}}visitState(e,t){let n=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(n.containsDynamicStyles){let o=new Set,s=r||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{AF(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&t.errors.push(UX(e.name,[...o.values()]))}return{type:Vt.State,name:e.name,style:n,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let n=co(this,ym(e.animation),t),r=CZ(e.expr,t.errors);return{type:Vt.Transition,matchers:r,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:id(e.options)}}visitSequence(e,t){return{type:Vt.Sequence,steps:e.steps.map(n=>co(this,n,t)),options:id(e.options)}}visitGroup(e,t){let n=t.currentTime,r=0,o=e.steps.map(s=>{t.currentTime=n;let a=co(this,s,t);return r=Math.max(r,t.currentTime),a});return t.currentTime=r,{type:Vt.Group,steps:o,options:id(e.options)}}visitAnimate(e,t){let n=PZ(e.timings,t.errors);t.currentAnimateTimings=n;let r,o=e.styles?e.styles:Qt({});if(o.type==Vt.Keyframes)r=this.visitKeyframes(o,t);else{let s=e.styles,a=!1;if(!s){a=!0;let c={};n.easing&&(c.easing=n.easing),s=Qt(c)}t.currentTime+=n.duration+n.delay;let l=this.visitStyle(s,t);l.isEmptyStep=a,r=l}return t.currentAnimateTimings=null,{type:Vt.Animate,timings:n,style:r,options:null}}visitStyle(e,t){let n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){let n=[],r=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of r)typeof a=="string"?a===zs?n.push(a):t.errors.push(HX(a)):n.push(new Map(Object.entries(a)));let o=!1,s=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let l of a.values())if(l.toString().indexOf(OF)>=0){o=!0;break}}}),{type:Vt.Style,styles:n,easing:s,offset:e.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(e,t){let n=t.currentAnimateTimings,r=t.currentTime,o=t.currentTime;n&&o>0&&(o-=n.duration+n.delay),e.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),d=c.get(l),u=!0;d&&(o!=r&&o>=d.startTime&&r<=d.endTime&&(t.errors.push(GX(l,d.startTime,d.endTime,o,r)),u=!1),o=d.startTime),u&&c.set(l,{startTime:o,endTime:r}),t.options&&vZ(a,t.options,t.errors)})})}visitKeyframes(e,t){let n={type:Vt.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(jX()),n;let r=1,o=0,s=[],a=!1,l=!1,c=0,d=e.steps.map(g=>{let _=this._makeStyleAst(g,t),x=_.offset!=null?_.offset:DZ(_.styles),C=0;return x!=null&&(o++,C=_.offset=x),l=l||C<0||C>1,a=a||C0&&o{let x=h>0?_==p?1:h*_:s[_],C=x*b;t.currentTime=f+m.delay+C,m.duration=C,this._validateStyleAst(g,t),g.offset=x,n.styles.push(g)}),n}visitReference(e,t){return{type:Vt.Reference,animation:co(this,ym(e.animation),t),options:id(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:Vt.AnimateChild,options:id(e.options)}}visitAnimateRef(e,t){return{type:Vt.AnimateRef,animation:this.visitReference(e.animation,t),options:id(e.options)}}visitQuery(e,t){let n=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;let[o,s]=IZ(e.selector);t.currentQuerySelector=n.length?n+" "+o:o,uo(t.collectedStyles,t.currentQuerySelector,new Map);let a=co(this,ym(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:Vt.Query,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:e.selector,options:id(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(YX());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:Pb(e.timings,t.errors,!0);return{type:Vt.Stagger,animation:co(this,ym(e.animation),t),timings:n,options:null}}};function IZ(i){let e=!!i.split(/\s*,\s*/).find(t=>t==NF);return e&&(i=i.replace(EZ,"")),i=i.replace(/@\*/g,Db).replace(/@\w+/g,t=>Db+"-"+t.slice(1)).replace(/:animating/g,cI),[i,e]}function TZ(i){return i?Z({},i):null}var pI=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function DZ(i){if(typeof i=="string")return null;let e=null;if(Array.isArray(i))i.forEach(t=>{if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let t=i;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function PZ(i,e){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let o=Pb(i,e).duration;return iI(o,0,"")}let t=i;if(t.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=iI(0,0,"");return o.dynamic=!0,o.strValue=t,o}let r=Pb(t,e);return iI(r.duration,r.delay,r.easing)}function id(i){return i?(i=Z({},i),i.params&&(i.params=TZ(i.params))):i={},i}function iI(i,e,t){return{duration:i,delay:e,easing:t}}function PI(i,e,t,n,r,o,s=null,a=!1){return{type:1,element:i,keyframes:e,preStyleProps:t,postStyleProps:n,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}var Cm=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},OZ=1,RZ=":enter",AZ=new RegExp(RZ,"g"),NZ=":leave",kZ=new RegExp(NZ,"g");function LF(i,e,t,n,r,o=new Map,s=new Map,a,l,c=[]){return new fI().buildKeyframes(i,e,t,n,r,o,s,a,l,c)}var fI=class{buildKeyframes(e,t,n,r,o,s,a,l,c,d=[]){c=c||new Cm;let u=new mI(e,t,c,r,o,d,[]);u.options=l;let h=l.delay?Aa(l.delay):0;u.currentTimeline.delayNextStep(h),u.currentTimeline.setStyles([s],null,u.errors,l),co(this,n,u);let p=u.timelines.filter(f=>f.containsAnimation());if(p.length&&a.size){let f;for(let m=p.length-1;m>=0;m--){let b=p[m];if(b.element===t){f=b;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,u.errors,l)}return p.length?p.map(f=>f.buildKeyframes()):[PI(t,[],[],[],0,h,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let n=t.subInstructions.get(t.element);if(n){let r=t.createSubContext(e.options),o=t.currentTimeline.currentTime,s=this._visitSubInstructions(n,r,r.options);o!=s&&t.transformIntoNewTimeline(s)}t.previousNode=e}visitAnimateRef(e,t){let n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,n),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,n){for(let r of e){let o=r?.delay;if(o){let s=typeof o=="number"?o:Aa(wm(o,r?.params??{},t.errors));n.delayNextStep(s)}}}_visitSubInstructions(e,t,n){let o=t.currentTimeline.currentTime,s=n.duration!=null?Aa(n.duration):null,a=n.delay!=null?Aa(n.delay):null;return s!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(e,t){t.updateOptions(e.options,!0),co(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let n=t.subContextCount,r=t,o=e.options;if(o&&(o.params||o.delay)&&(r=t.createSubContext(o),r.transformIntoNewTimeline(),o.delay!=null)){r.previousNode.type==Vt.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Ab);let s=Aa(o.delay);r.delayNextStep(s)}e.steps.length&&(e.steps.forEach(s=>co(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let n=[],r=t.currentTimeline.currentTime,o=e.options&&e.options.delay?Aa(e.options.delay):0;e.steps.forEach(s=>{let a=t.createSubContext(e.options);o&&a.delayNextStep(o),co(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(s=>t.currentTimeline.mergeTimelineCollectedStyles(s)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let n=e.strValue,r=t.params?wm(n,t.params,t.errors):n;return Pb(r,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let n=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());let o=e.style;o.type==Vt.Keyframes?this.visitKeyframes(o,t):(t.incrementTime(n.duration),this.visitStyle(o,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.hasCurrentStyleProperties()&&n.forwardFrame();let o=r&&r.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(o):n.setStyles(e.styles,o,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let n=t.currentAnimateTimings,r=t.currentTimeline.duration,o=n.duration,a=t.createSubContext().currentTimeline;a.easing=n.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*o),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(r+o),t.previousNode=e}visitQuery(e,t){let n=t.currentTimeline.currentTime,r=e.options||{},o=r.delay?Aa(r.delay):0;o&&(t.previousNode.type===Vt.Style||n==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Ab);let s=n,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,d)=>{t.currentQueryIndex=d;let u=t.createSubContext(e.options,c);o&&u.delayNextStep(o),c===t.element&&(l=u.currentTimeline),co(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let h=u.currentTimeline.currentTime;s=Math.max(s,h)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let n=t.parentContext,r=t.currentTimeline,o=e.timings,s=Math.abs(o.duration),a=s*(t.currentQueryTotal-1),l=s*t.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=n.currentStaggerTime;break}let d=t.currentTimeline;l&&d.delayNextStep(l);let u=d.currentTime;co(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-u+(r.startTime-n.currentTimeline.startTime)}},Ab={},mI=class i{constructor(e,t,n,r,o,s,a,l){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Ab,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Nb(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let n=e,r=this.options;n.duration!=null&&(r.duration=Aa(n.duration)),n.delay!=null&&(r.delay=Aa(n.delay));let o=n.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!t||!s.hasOwnProperty(a))&&(s[a]=wm(o[a],s,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let n=e.params={};Object.keys(t).forEach(r=>{n[r]=t[r]})}}return e}createSubContext(e=null,t,n){let r=t||this.element,o=new i(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(e){return this.previousNode=Ab,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){let r={duration:t??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},o=new gI(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,n,r,o,s){let a=[];if(r&&a.push(this.element),e.length>0){e=e.replace(AZ,"."+this._enterClassName),e=e.replace(kZ,"."+this._leaveClassName);let l=n!=1,c=this._driver.query(this.element,e,l);n!==0&&(c=n<0?c.slice(c.length+n,c.length):c.slice(0,n)),a.push(...c)}return!o&&a.length==0&&s.push(XX(t)),a}},Nb=class i{constructor(e,t,n,r){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new i(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=OZ,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||zs),this._currentKeyframe.set(t,zs);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,r){t&&this._previousKeyframe.set("easing",t);let o=r&&r.params||{},s=LZ(e,this._globalTimelineStyles);for(let[a,l]of s){let c=wm(l,o,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??zs),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,n)=>{let r=this._styleSummary.get(n);(!r||t.time>r.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,n=this._keyframes.size===1&&this.duration===0,r=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((d,u)=>{d===Cb?e.add(u):d===zs&&t.add(u)}),n||c.set("offset",l/this.duration),r.push(c)});let o=[...e.values()],s=[...t.values()];if(n){let a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return PI(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}},gI=class extends Nb{constructor(e,t,n,r,o,s,a=!1){super(e,t,s.delay),this.keyframes=n,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){let o=[],s=n+t,a=t/s,l=new Map(e[0]);l.set("offset",0),o.push(l);let c=new Map(e[0]);c.set("offset",yF(a)),o.push(c);let d=e.length-1;for(let u=1;u<=d;u++){let h=new Map(e[u]),p=h.get("offset"),f=t+p*n;h.set("offset",yF(f/s)),o.push(h)}n=s,t=0,r="",e=o}return PI(this.element,e,this.preStyleProps,this.postStyleProps,n,t,r,!0)}};function yF(i,e=3){let t=Math.pow(10,e-1);return Math.round(i*t)/t}function LZ(i,e){let t=new Map,n;return i.forEach(r=>{if(r==="*"){n??=e.keys();for(let o of n)t.set(o,zs)}else for(let[o,s]of r)t.set(o,s)}),t}function xF(i,e,t,n,r,o,s,a,l,c,d,u,h){return{type:0,element:i,triggerName:e,isRemovalTransition:r,fromState:t,fromStyles:o,toState:n,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:u,errors:h}}var rI={},kb=class{constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,r){return FZ(this.ast.matchers,e,t,n,r)}buildStyles(e,t,n){let r=this._stateStyles.get("*");return e!==void 0&&(r=this._stateStyles.get(e?.toString())||r),r?r.buildStyles(t,n):new Map}build(e,t,n,r,o,s,a,l,c,d){let u=[],h=this.ast.options&&this.ast.options.params||rI,p=a&&a.params||rI,f=this.buildStyles(n,p,u),m=l&&l.params||rI,b=this.buildStyles(r,m,u),g=new Set,_=new Map,x=new Map,C=r==="void",T={params:FF(m,h),delay:this.ast.options?.delay},D=d?[]:LF(e,t,this.ast.animation,o,s,f,b,T,c,u),E=0;return D.forEach(P=>{E=Math.max(P.duration+P.delay,E)}),u.length?xF(t,this._triggerName,n,r,C,f,b,[],[],_,x,E,u):(D.forEach(P=>{let Y=P.element,$=uo(_,Y,new Set);P.preStyleProps.forEach(O=>$.add(O));let U=uo(x,Y,new Set);P.postStyleProps.forEach(O=>U.add(O)),Y!==t&&g.add(Y)}),xF(t,this._triggerName,n,r,C,f,b,D,[...g.values()],_,x,E))}};function FZ(i,e,t,n,r){return i.some(o=>o(e,t,n,r))}function FF(i,e){let t=Z({},e);return Object.entries(i).forEach(([n,r])=>{r!=null&&(t[n]=r)}),t}var _I=class{constructor(e,t,n){this.styles=e,this.defaultParams=t,this.normalizer=n}buildStyles(e,t){let n=new Map,r=FF(e,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=wm(s,r,t));let l=this.normalizer.normalizePropertyName(a,t);s=this.normalizer.normalizeStyleValue(a,l,s,t),n.set(a,s)})}),n}};function BZ(i,e,t){return new vI(i,e,t)}var vI=class{constructor(e,t,n){this.name=e,this.ast=t,this._normalizer=n,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{let o=r.options&&r.options.params||{};this.states.set(r.name,new _I(r.style,o,n))}),wF(this.states,"true","1"),wF(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new kb(e,r,this.states))}),this.fallbackTransition=VZ(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,r){return this.transitionFactories.find(s=>s.match(e,t,n,r))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}};function VZ(i,e,t){let n=[(s,a)=>!0],r={type:Vt.Sequence,steps:[],options:null},o={type:Vt.Transition,animation:r,matchers:n,options:null,queryCount:0,depCount:0};return new kb(i,o,e)}function wF(i,e,t){i.has(e)?i.has(t)||i.set(t,i.get(e)):i.has(t)&&i.set(e,i.get(t))}var zZ=new Cm,bI=class{constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){let n=[],r=[],o=kF(this._driver,t,n,r);if(n.length)throw eZ(n);r.length&&void 0,this._animations.set(e,o)}_buildPlayer(e,t,n){let r=e.element,o=TF(this._normalizer,e.keyframes,t,n);return this._driver.animate(r,o,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){let r=[],o=this._animations.get(e),s,a=new Map;if(o?(s=LF(this._driver,t,o,RF,lI,new Map,new Map,n,zZ,r),s.forEach(d=>{let u=uo(a,d.element,new Map);d.postStyleProps.forEach(h=>u.set(h,null))})):(r.push(tZ()),s=[]),r.length)throw nZ(r);a.forEach((d,u)=>{d.forEach((h,p)=>{d.set(p,this._driver.computeStyle(u,p,zs))})});let l=s.map(d=>{let u=a.get(d.element);return this._buildPlayer(d,new Map,u)}),c=kl(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw iZ(e);return t}listen(e,t,n,r){let o=MI(t,"","","");return SI(this._getPlayer(e),n,o,r),()=>{}}command(e,t,n,r){if(n=="register"){this.register(e,r[0]);return}if(n=="create"){let s=r[0]||{};this.create(e,t,s);return}let o=this._getPlayer(e);switch(n){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e);break}}},CF="ng-animate-queued",UZ=".ng-animate-queued",oI="ng-animate-disabled",HZ=".ng-animate-disabled",GZ="ng-star-inserted",jZ=".ng-star-inserted",WZ=[],BF={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},$Z={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},ps="__ng_removed",Sm=class{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let n=e&&e.hasOwnProperty("value"),r=n?e.value:e;if(this.value=YZ(r),n){let o=e,{value:s}=o,a=sS(o,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let n=this.options.params;Object.keys(t).forEach(r=>{n[r]==null&&(n[r]=t[r])})}}},xm="void",sI=new Sm(xm),yI=class{constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Lo(t,this._hostClassName)}listen(e,t,n,r){if(!this._triggers.has(t))throw rZ(n,t);if(n==null||n.length==0)throw oZ(t);if(!XZ(n))throw sZ(n,t);let o=uo(this._elementListeners,e,[]),s={name:t,phase:n,callback:r};o.push(s);let a=uo(this._engine.statesByElement,e,new Map);return a.has(t)||(Lo(e,Sb),Lo(e,Sb+"-"+t),a.set(t,sI)),()=>{this._engine.afterFlush(()=>{let l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw aZ(e);return t}trigger(e,t,n,r=!0){let o=this._getTrigger(t),s=new Mm(this.id,t,e),a=this._engine.statesByElement.get(e);a||(Lo(e,Sb),Lo(e,Sb+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new Sm(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=sI),!(c.value===xm)&&l.value===c.value){if(!KZ(l.params,c.params)){let m=[],b=o.matchStyles(l.value,l.params,m),g=o.matchStyles(c.value,c.params,m);m.length?this._engine.reportError(m):this._engine.afterFlush(()=>{rd(e,b),Us(e,g)})}return}let h=uo(this._engine.playersByElement,e,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==t&&m.queued&&m.destroy()});let p=o.matchTransition(l.value,c.value,e,c.params),f=!1;if(!p){if(!r)return;p=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:p,fromState:l,toState:c,player:s,isFallbackTransition:f}),f||(Lo(e,CF),s.onStart(()=>{mh(e,CF)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);let b=this._engine.playersByElement.get(e);if(b){let g=b.indexOf(s);g>=0&&b.splice(g,1)}}),this.players.push(s),h.push(s),s}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let n=this._engine.driver.query(e,Db,!0);n.forEach(r=>{if(r[ps])return;let o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,t,n,r){let o=this._engine.statesByElement.get(e),s=new Map;if(o){let a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){let d=this.trigger(e,c,xm,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,s),n&&kl(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(t&&n){let r=new Set;t.forEach(o=>{let s=o.name;if(r.has(s))return;r.add(s);let l=this._triggers.get(s).fallbackTransition,c=n.get(s)||sI,d=new Sm(xm),u=new Mm(this.id,s,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:s,transition:l,fromState:c,toState:d,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(n.totalAnimations){let o=n.players.length?n.playersByQueriedElement.get(e):[];if(o&&o.length)r=!0;else{let s=e;for(;s=s.parentNode;)if(n.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)n.markElementAsRemoved(this.id,e,!1,t);else{let o=e[ps];(!o||o===BF)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){Lo(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(n=>{let r=n.player;if(r.destroyed)return;let o=n.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==n.triggerName){let l=MI(o,n.triggerName,n.fromState.value,n.toState.value);l._data=e,SI(n.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(n)}),this._queue=[],t.sort((n,r)=>{let o=n.transition.ast.depCount,s=r.transition.ast.depCount;return o==0||s==0?o-s:this._engine.driver.containsElement(n.element,r.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},xI=class{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,t){let n=new yI(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){let n=this._namespaceList,r=this.namespacesByHostElement;if(n.length-1>=0){let s=!1,a=this.driver.getParentElement(t);for(;a;){let l=r.get(a);if(l){let c=n.indexOf(l);n.splice(c+1,0,e),s=!0;break}a=this.driver.getParentElement(a)}s||n.unshift(e)}else n.push(e);return r.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let r=this._namespaceLookup[e];r&&r.register(t,n)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let r=this._namespaceList.indexOf(n);r>=0&&this._namespaceList.splice(r,1),n.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,n=this.statesByElement.get(e);if(n){for(let r of n.values())if(r.namespaceId){let o=this._fetchNamespace(r.namespaceId);o&&t.add(o)}}return t}trigger(e,t,n,r){if(Ib(t)){let o=this._fetchNamespace(e);if(o)return o.trigger(t,n,r),!0}return!1}insertNode(e,t,n,r){if(!Ib(t))return;let o=t[ps];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(t);s>=0&&this.collectedLeaveElements.splice(s,1)}if(e){let s=this._fetchNamespace(e);s&&s.insertNode(t,n)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Lo(e,oI)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),mh(e,oI))}removeNode(e,t,n){if(Ib(t)){let r=e?this._fetchNamespace(e):null;r?r.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n);let o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(e,t,n,r,o){this.collectedLeaveElements.push(t),t[ps]={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:o}}listen(e,t,n,r,o){return Ib(t)?this._fetchNamespace(e).listen(t,n,r,o):()=>{}}_buildInstruction(e,t,n,r,o){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t,o)}destroyInnerAnimations(e){let t=this.driver.query(e,Db,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,cI,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return kl(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[ps];if(t&&t.setForRemoval){if(e[ps]=BF,t.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(oI)&&this.markElementAsDisabled(e,!1),this.driver.query(e,HZ,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,r)=>this._balanceNamespaceList(n,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],t.length?kl(t).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(e){throw lZ(e)}_flushAnimations(e,t){let n=new Cm,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(k=>{d.add(k);let G=this.driver.query(k,UZ,!0);for(let K=0;K{let K=RF+m++;f.set(G,K),k.forEach(de=>Lo(de,K))});let b=[],g=new Set,_=new Set;for(let k=0;kg.add(de)):_.add(G))}let x=new Map,C=EF(h,Array.from(g));C.forEach((k,G)=>{let K=lI+m++;x.set(G,K),k.forEach(de=>Lo(de,K))}),e.push(()=>{p.forEach((k,G)=>{let K=f.get(G);k.forEach(de=>mh(de,K))}),C.forEach((k,G)=>{let K=x.get(G);k.forEach(de=>mh(de,K))}),b.forEach(k=>{this.processLeaveNode(k)})});let T=[],D=[];for(let k=this._namespaceList.length-1;k>=0;k--)this._namespaceList[k].drainQueuedTransitions(t).forEach(K=>{let de=K.player,Te=K.element;if(T.push(de),this.collectedEnterElements.length){let Ge=Te[ps];if(Ge&&Ge.setForMove){if(Ge.previousTriggersValues&&Ge.previousTriggersValues.has(K.triggerName)){let ut=Ge.previousTriggersValues.get(K.triggerName),Ve=this.statesByElement.get(K.element);if(Ve&&Ve.has(K.triggerName)){let Qe=Ve.get(K.triggerName);Qe.value=ut,Ve.set(K.triggerName,Qe)}}de.destroy();return}}let Ee=!u||!this.driver.containsElement(u,Te),He=x.get(Te),he=f.get(Te),re=this._buildInstruction(K,n,he,He,Ee);if(re.errors&&re.errors.length){D.push(re);return}if(Ee){de.onStart(()=>rd(Te,re.fromStyles)),de.onDestroy(()=>Us(Te,re.toStyles)),r.push(de);return}if(K.isFallbackTransition){de.onStart(()=>rd(Te,re.fromStyles)),de.onDestroy(()=>Us(Te,re.toStyles)),r.push(de);return}let qe=[];re.timelines.forEach(Ge=>{Ge.stretchStartingKeyframe=!0,this.disabledNodes.has(Ge.element)||qe.push(Ge)}),re.timelines=qe,n.append(Te,re.timelines);let ue={instruction:re,player:de,element:Te};s.push(ue),re.queriedElements.forEach(Ge=>uo(a,Ge,[]).push(de)),re.preStyleProps.forEach((Ge,ut)=>{if(Ge.size){let Ve=l.get(ut);Ve||l.set(ut,Ve=new Set),Ge.forEach((Qe,Dt)=>Ve.add(Dt))}}),re.postStyleProps.forEach((Ge,ut)=>{let Ve=c.get(ut);Ve||c.set(ut,Ve=new Set),Ge.forEach((Qe,Dt)=>Ve.add(Dt))})});if(D.length){let k=[];D.forEach(G=>{k.push(cZ(G.triggerName,G.errors))}),T.forEach(G=>G.destroy()),this.reportError(k)}let E=new Map,P=new Map;s.forEach(k=>{let G=k.element;n.has(G)&&(P.set(G,G),this._beforeAnimationBuild(k.player.namespaceId,k.instruction,E))}),r.forEach(k=>{let G=k.element;this._getPreviousPlayers(G,!1,k.namespaceId,k.triggerName,null).forEach(de=>{uo(E,G,[]).push(de),de.destroy()})});let Y=b.filter(k=>IF(k,l,c)),$=new Map;MF($,this.driver,_,c,zs).forEach(k=>{IF(k,l,c)&&Y.push(k)});let O=new Map;p.forEach((k,G)=>{MF(O,this.driver,new Set(k),l,Cb)}),Y.forEach(k=>{let G=$.get(k),K=O.get(k);$.set(k,new Map([...G?.entries()??[],...K?.entries()??[]]))});let B=[],j=[],q={};s.forEach(k=>{let{element:G,player:K,instruction:de}=k;if(n.has(G)){if(d.has(G)){K.onDestroy(()=>Us(G,de.toStyles)),K.disabled=!0,K.overrideTotalTime(de.totalTime),r.push(K);return}let Te=q;if(P.size>1){let He=G,he=[];for(;He=He.parentNode;){let re=P.get(He);if(re){Te=re;break}he.push(He)}he.forEach(re=>P.set(re,Te))}let Ee=this._buildAnimation(K.namespaceId,de,E,o,O,$);if(K.setRealPlayer(Ee),Te===q)B.push(K);else{let He=this.playersByElement.get(Te);He&&He.length&&(K.parentPlayer=kl(He)),r.push(K)}}else rd(G,de.fromStyles),K.onDestroy(()=>Us(G,de.toStyles)),j.push(K),d.has(G)&&r.push(K)}),j.forEach(k=>{let G=o.get(k.element);if(G&&G.length){let K=kl(G);k.setRealPlayer(K)}}),r.forEach(k=>{k.parentPlayer?k.syncPlayerEvents(k.parentPlayer):k.destroy()});for(let k=0;k!Ee.destroyed);Te.length?ZZ(this,G,Te):this.processLeaveNode(G)}return b.length=0,B.forEach(k=>{this.players.push(k),k.onDone(()=>{k.destroy();let G=this.players.indexOf(k);this.players.splice(G,1)}),k.play()}),B}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,r,o){let s=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(s=a)}else{let a=this.playersByElement.get(e);if(a){let l=!o||o==xm;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(n||r)&&(s=s.filter(a=>!(n&&n!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(e,t,n){let r=t.triggerName,o=t.element,s=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:r;for(let l of t.timelines){let c=l.element,d=c!==o,u=uo(n,c,[]);this._getPreviousPlayers(c,d,s,a,t.toState).forEach(p=>{let f=p.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),p.destroy(),u.push(p)})}rd(o,t.fromStyles)}_buildAnimation(e,t,n,r,o,s){let a=t.triggerName,l=t.element,c=[],d=new Set,u=new Set,h=t.timelines.map(f=>{let m=f.element;d.add(m);let b=m[ps];if(b&&b.removedBeforeQueried)return new Nl(f.duration,f.delay);let g=m!==l,_=QZ((n.get(m)||WZ).map(E=>E.getRealPlayer())).filter(E=>{let P=E;return P.element?P.element===m:!1}),x=o.get(m),C=s.get(m),T=TF(this._normalizer,f.keyframes,x,C),D=this._buildPlayer(f,T,_);if(f.subTimeline&&r&&u.add(m),g){let E=new Mm(e,a,m);E.setRealPlayer(D),c.push(E)}return D});c.forEach(f=>{uo(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>qZ(this.playersByQueriedElement,f.element,f))}),d.forEach(f=>Lo(f,_F));let p=kl(h);return p.onDestroy(()=>{d.forEach(f=>mh(f,_F)),Us(l,t.toStyles)}),u.forEach(f=>{uo(r,f,[]).push(p)}),p}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new Nl(e.duration,e.delay)}},Mm=class{constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n,this._player=new Nl,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,n)=>{t.forEach(r=>SI(e,n,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){uo(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function qZ(i,e,t){let n=i.get(e);if(n){if(n.length){let r=n.indexOf(t);n.splice(r,1)}n.length==0&&i.delete(e)}return n}function YZ(i){return i??null}function Ib(i){return i&&i.nodeType===1}function XZ(i){return i=="start"||i=="done"}function SF(i,e){let t=i.style.display;return i.style.display=e??"none",t}function MF(i,e,t,n,r){let o=[];t.forEach(l=>o.push(SF(l)));let s=[];n.forEach((l,c)=>{let d=new Map;l.forEach(u=>{let h=e.computeStyle(c,u,r);d.set(u,h),(!h||h.length==0)&&(c[ps]=$Z,s.push(c))}),i.set(c,d)});let a=0;return t.forEach(l=>SF(l,o[a++])),s}function EF(i,e){let t=new Map;if(i.forEach(a=>t.set(a,[])),e.length==0)return t;let n=1,r=new Set(e),o=new Map;function s(a){if(!a)return n;let l=o.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:r.has(c)?l=n:l=s(c),o.set(a,l),l}return e.forEach(a=>{let l=s(a);l!==n&&t.get(l).push(a)}),t}function Lo(i,e){i.classList?.add(e)}function mh(i,e){i.classList?.remove(e)}function ZZ(i,e,t){kl(t).onDone(()=>i.processLeaveNode(e))}function QZ(i){let e=[];return VF(i,e),e}function VF(i,e){for(let t=0;tr.add(o)):e.set(i,n),t.delete(i),!0}var _h=class{constructor(e,t,n){this._driver=t,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new xI(e.body,t,n),this._timelineEngine=new bI(e.body,t,n),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(e,t,n,r,o){let s=e+"-"+r,a=this._triggerCache[s];if(!a){let l=[],c=[],d=kF(this._driver,o,l,c);if(l.length)throw KX(r,l);c.length&&void 0,a=BZ(r,d,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(t,r,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,n,r){this._transitionEngine.insertNode(e,t,n,r)}onRemove(e,t,n){this._transitionEngine.removeNode(e,t,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,r){if(n.charAt(0)=="@"){let[o,s]=mF(n),a=r;this._timelineEngine.command(o,t,s,a)}else this._transitionEngine.trigger(e,t,n,r)}listen(e,t,n,r,o){if(n.charAt(0)=="@"){let[s,a]=mF(n);return this._timelineEngine.listen(s,t,a,o)}return this._transitionEngine.listen(e,t,n,r,o)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function JZ(i,e){let t=null,n=null;return Array.isArray(e)&&e.length?(t=aI(e[0]),e.length>1&&(n=aI(e[e.length-1]))):e instanceof Map&&(t=aI(e)),t||n?new wI(i,t,n):null}var gh=class gh{constructor(e,t,n){this._element=e,this._startStyles=t,this._endStyles=n,this._state=0;let r=gh.initialStylesByElement.get(e);r||gh.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Us(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Us(this._element,this._initialStyles),this._endStyles&&(Us(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(gh.initialStylesByElement.delete(this._element),this._startStyles&&(rd(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(rd(this._element,this._endStyles),this._endStyles=null),Us(this._element,this._initialStyles),this._state=3)}};gh.initialStylesByElement=new WeakMap;var wI=gh;function aI(i){let e=null;return i.forEach((t,n)=>{eQ(n)&&(e=e||new Map,e.set(n,t))}),e}function eQ(i){return i==="display"||i==="position"}var Lb=class{constructor(e,t,n,r){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(e,t,n){return e.animate(this._convertKeyframesToObject(t),n)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,r)=>{r!=="offset"&&e.set(r,this._finished?n:DI(this.element,r))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Fb=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return DF(e,t)}getParentElement(e){return EI(e)}query(e,t,n){return PF(e,t,n)}computeStyle(e,t,n){return DI(e,t)}animate(e,t,n,r,o,s=[]){let a=r==0?"both":"forwards",l={duration:n,delay:r,fill:a};o&&(l.easing=o);let c=new Map,d=s.filter(p=>p instanceof Lb);yZ(n,r)&&d.forEach(p=>{p.currentSnapshot.forEach((f,m)=>c.set(m,f))});let u=_Z(t).map(p=>new Map(p));u=xZ(e,u,c);let h=JZ(e,u);return new Lb(e,u,l,h)}};var Tb="@",zF="@.disabled",Bb=class{constructor(e,t,n,r){this.namespaceId=e,this.delegate=t,this.engine=n,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,n,r=!0){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,r)}removeChild(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,n,r){this.delegate.setAttribute(e,t,n,r)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,r){this.delegate.setStyle(e,t,n,r)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){t.charAt(0)==Tb&&t==zF?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n){return this.delegate.listen(e,t,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},CI=class extends Bb{constructor(e,t,n,r,o){super(t,n,r,o),this.factory=e,this.namespaceId=t}setProperty(e,t,n){t.charAt(0)==Tb?t.charAt(1)=="."&&t==zF?(n=n===void 0?!0:!!n,this.disableAnimations(e,n)):this.engine.process(this.namespaceId,e,t.slice(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n){if(t.charAt(0)==Tb){let r=tQ(e),o=t.slice(1),s="";return o.charAt(0)!=Tb&&([o,s]=nQ(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{let l=a._data||-1;this.factory.scheduleListenerCallback(l,n,a)})}return this.delegate.listen(e,t,n)}};function tQ(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function nQ(i){let e=i.indexOf("."),t=i.substring(0,e),n=i.slice(e+1);return[t,n]}var Vb=class{constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(r,o)=>{let s=o?.parentNode(r);s&&o.removeChild(s,r)}}createRenderer(e,t){let n="",r=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,d=c.get(r);if(!d){let u=()=>c.delete(r);d=new Bb(n,r,this.engine,u),c.set(r,d)}return d}let o=t.id,s=t.id+"-"+this._currentId;this._currentId++,this.engine.register(s,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(o,s,e,c.name,c)};return t.data.animation.forEach(a),new CI(this,s,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){if(e>=0&&et(n));return}let r=this._animationCallbacksBuffer;r.length==0&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),r.push([t,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var rQ=(()=>{let e=class e extends _h{constructor(n,r,o){super(n,r,o)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(od),X(sd))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})();function oQ(){return new Ob}function sQ(i,e,t){return new Vb(i,e,t)}var UF=[{provide:sd,useFactory:oQ},{provide:_h,useClass:rQ},{provide:Il,useFactory:sQ,deps:[ob,_h,Le]}],aQ=[{provide:od,useFactory:()=>new Fb},{provide:Zn,useValue:"BrowserAnimations"},...UF],z1e=[{provide:od,useClass:II},{provide:Zn,useValue:"NoopAnimations"},...UF];function HF(){return Ao("NgEagerAnimations"),[...aQ]}var Ll=function(i){return i[i.MAIN_PANEL=0]="MAIN_PANEL",i[i.POPUP=1]="POPUP",i[i.GRAPH_PANEL=2]="GRAPH_PANEL",i}(Ll||{}),RI=function(i){return i[i.WEBGL=0]="WEBGL",i}(RI||{}),vt=function(i){return i.NODE_LABEL="title",i.INPUT_METADATA="input",i.OUTPUT_METADATA="output",i.ATTRIBUTE="list",i}(vt||{}),Rn=function(i){return i.OP_NODE_ID="Op node id",i.OP_ATTRS="Op node attributes",i.OP_INPUTS="Op node inputs",i.OP_OUTPUTS="Op node outputs",i.LAYER_NODE_CHILDREN_COUNT="Layer node children count",i.LAYER_NODE_DESCENDANTS_COUNT="Layer node descendants count",i.LAYER_NODE_ATTRS="Layer node attributes",i}(Rn||{}),Fl=function(i){return i.TENSOR_SHAPE="Tensor shape",i}(Fl||{}),mn=function(i){return i[i.REGULAR=0]="REGULAR",i[i.MEDIUM=1]="MEDIUM",i[i.BOLD=2]="BOLD",i[i.MONOSPACE_MEDIUM=3]="MONOSPACE_MEDIUM",i[i.ICONS=4]="ICONS",i}(mn||{}),Bl=function(i){return i.OP_NODE_ID="id",i.NUMBER_OF_CHILDREN="#children",i.NUMBER_OF_DESCENDANTS="#descendants",i}(Bl||{}),Hs=function(i){return i.NODE_BG_COLOR="node_bg_color",i.NODE_TEXT_COLOR="node_text_color",i.NODE_BORDER_COLOR="node_border_color",i}(Hs||{}),zb=function(i){return i.V2="v2",i}(zb||{}),Ln=function(i){return i.REGEX="regex",i.ATTR_VALUE_RANGE="attr_value_range",i.NODE_TYPE="node_type",i}(Ln||{}),mr=function(i){return i.OP_NODES="op_nodes",i.LAYER_NODES="layer_nodes",i.OP_AND_LAYER_NODES="op_and_layer_nodes",i}(mr||{});function Vi(i){i||(Ju(Vi),i=te(Ni));let e=new Mt(t=>i.onDestroy(t.next.bind(t)));return t=>t.pipe(Xe(e))}function Ub(i,e){!e?.injector&&Ju(Ub);let t=e?.injector??te(bt),n=new ma(1),r=mt(()=>{let o;try{o=i()}catch(s){kr(()=>n.error(s));return}kr(()=>n.next(o))},{injector:t,manualCleanup:!0});return t.get(Ni).onDestroy(()=>{r.destroy(),n.complete()}),n.asObservable()}var Fo=11,Hb=4;var AI=16,NI=200,Em=12,Im=1e3;var Kt=.001,kI=25,LI=5,Gb="me_test",GF=.1,jb="model_explorer_show_on_node_item_types_v2",Wb="model_explorer_show_on_edge_item_types_v2",Na="Node data provider: ",Vl=10,$b=7.5,ka="__value",Bo="__tensor_tag",FI=20,qb={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var jF="model-explorer-export-to-resource",vh=14;var Gs=function(i){return i[i.OP_NODE=0]="OP_NODE",i[i.GROUP_NODE=1]="GROUP_NODE",i}(Gs||{});var nIe=new OffscreenCanvas(300,300);var Tm=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function Et(i){return i?.nodeType===Gs.OP_NODE}function xt(i){return i?.nodeType===Gs.GROUP_NODE}function BI(i){let e=[];for(let[t,n]of Object.entries(i))switch(t){case Rn.OP_NODE_ID:n.selected&&e.push(Bl.OP_NODE_ID);break;default:break}return e}function VI(i){let e=[];for(let[t,n]of Object.entries(i))switch(t){case Rn.LAYER_NODE_CHILDREN_COUNT:n.selected&&e.push(Bl.NUMBER_OF_CHILDREN);break;case Rn.LAYER_NODE_DESCENDANTS_COUNT:n.selected&&e.push(Bl.NUMBER_OF_DESCENDANTS);break;default:break}return e}function Yb(i,e){if(Et(i))switch(e.toLowerCase()){case Bl.OP_NODE_ID:return i.id;case"namespace":return ad(i);default:break}else if(xt(i))switch(e.toLowerCase()){case"namespace":return ad(i);case Bl.NUMBER_OF_CHILDREN:return String((i.nsChildrenIds||[]).length);case Bl.NUMBER_OF_DESCENDANTS:return String((i.descendantsNodeIds||[]).length);default:break}return""}function ad(i){return i.savedNamespace||i.namespace||""}function Lr(){return Math.random().toString(36).slice(-6)}function zI(i,e,t){let n=[];i==null?n=e.rootNodes.map(r=>r.id):n=i.nsChildrenIds||[];for(let r of n){let o=e.nodesById[r];o&&xt(o)&&o.expanded&&((o.nsChildrenIds||[]).filter(a=>xt(e.nodesById[a])).every(a=>!e.nodesById[a].expanded)&&t.push(o.id),zI(o,e,t))}}function bh(i,e,t,n){let r=[];if(i.length===2)r=i;else if(i.length===3&&i[0].x===i[1].x&&i[1].x===i[2].x)r=i;else{let o=!0,s=0;for(let l=0;lc?1:-1;if(s!==0&&s!==u){o=!1;break}s=u}let a=n.Vector3;if(o){let c=e().x(h=>h.x).y(h=>h.y).curve(t)(i).split(/M|C/).filter(h=>h!=="").map(h=>h.split(",").map(p=>Number(p))),d=new a(c[0][0],c[0][1],0),u=new n.CurvePath;for(let h=1;hnew a(d.x,d.y,0));r=new n.CatmullRomCurve3(l,!1,"catmullrom",GF).getPoints(kI)}}return r}function Xb(){let i=WF();return i?i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.contentEditable==="true":!1}function WF(i=document){let e=i.activeElement;return e?e.shadowRoot?WF(e.shadowRoot):e:null}function lQ(i,e,t){let n=t[Bo];return n?`Input${i}:${n} (${e.label})`:`Input${i} (${e.label})`}function cQ(i,e,t){let n=`Output${i}`;if(t.label==="GraphInputs"){let r=e.tensor_name;r!=null&&(n=`${n} (${r})`)}else{let r=e[Bo];r&&(n=`Output${i}:${r}`)}return n}function $F(i){let e=((i||{}).shape||"").replace(/ /g,"").replace(/×/g,"x");return e===""&&(e="?"),e}function UI(i,e=""){let t=i.attrs||{},n=[],r=new RegExp(e,"i");for(let o of Object.keys(t)){let s=o,a=t[o],l=[`${s}:${a}`,`${s}=${a}`];if(e.trim()===""||l.some(c=>r.test(c))){let c=a;s===ka?c=a.replace(/\s/gm,""):c=a.replace(/(\r\n|\n|\r)/gm," "),n.push({key:s,value:c})}}return n}function HI(i,e,t=""){let n=e.groupNodeAttributes?.[i.id.replace("___group___","")]||{},r=[],o=new RegExp(t,"i");for(let s of Object.keys(n)){let a=s,l=n[s],c=[`${a}:${l}`,`${a}=${l}`];if(t.trim()===""||c.some(d=>o.test(d))){let d=l.replace(/(\r\n|\n|\r)/gm," ");r.push({key:a,value:d})}}return r}function GI(i,e){let t=i.incomingEdges||[],n=[];for(let r=0;rVl){let r=t.length-Vl;n.push({key:`(${r} more input${r===1?"":"s"} omitted)`,value:"..."})}return n}function jI(i){let e=[],t=i.outputsMetadata||{},n=Object.values(t);for(let r=0;rVl){let r=n.length-Vl;e.push({key:`(${r} more output${r===1?"":"s"} omitted)`,value:"..."})}return e}function WI(i,e,t,n){let r=[],o=Object.keys(t).filter(a=>t[a].selected).filter(a=>a.startsWith(Na)).map(a=>a.replace(Na,"")),s=Object.values(n).filter(a=>o.includes(a.runName));for(let a of s){let l=(a.results||{})?.[e][i.id]?.strValue||"-";r.push({key:a.runName,value:l})}return r}function $I(i,e){let t=i.split("/"),n=e.split("/"),r="";for(let o=Math.min(t.length,n.length);o>0;o--){let s=t.slice(0,o).join("/"),a=n.slice(0,o).join("/");if(s===a){r=a;break}}return r}function qF(i){return new RegExp(/Only `SavedModel`s with \d+ MetaGraph are supported. Instead, it has \d+/).test(i)?`${i}. Try using the "TF adapter (direct)" adapter.`:i}function qI(i,e,t,n){let r=[],o=new Set;if(i.has(vt.NODE_LABEL)&&e.test(t.label)&&(r.push({type:vt.NODE_LABEL}),o.add(vt.NODE_LABEL)),i.has(vt.ATTRIBUTE)){let s=YF(t,n);for(let a of Object.keys(s)){let l=s[a],c=`${a}:${l}`,d=`${a}=${l}`;(e.test(c)||e.test(d))&&(r.push({type:vt.ATTRIBUTE,matchedAttrId:a}),o.add(vt.ATTRIBUTE))}}if(i.has(vt.INPUT_METADATA)&&Et(t))for(let s of t.incomingEdges||[]){let a=n.nodesById[s.sourceNodeId];e.test(a.label)&&(r.push({type:vt.INPUT_METADATA,matchedText:a.label}),o.add(vt.INPUT_METADATA));let l=t.inputsMetadata||{},c=(l[s.targetNodeInputId]||{})[Bo];c&&e.test(c)&&(r.push({type:vt.INPUT_METADATA,matchedText:c}),o.add(vt.INPUT_METADATA));let d=(a.outputsMetadata||{})[s.sourceNodeOutputId]||{};for(let h of Object.keys(d)){if(h.startsWith("__"))continue;let p=d[h],f=`${h}:${p}`,m=`${h}=${p}`;(e.test(p)||e.test(f)||e.test(m))&&(r.push({type:vt.INPUT_METADATA,matchedText:p}),o.add(vt.INPUT_METADATA))}let u=l[s.targetNodeInputId]||{};for(let h of Object.keys(u)){if(h.startsWith("__"))continue;let p=u[h],f=`${h}:${p}`,m=`${h}=${p}`;(e.test(p)||e.test(f)||e.test(m))&&(r.push({type:vt.INPUT_METADATA,matchedText:p}),o.add(vt.INPUT_METADATA))}}if(i.has(vt.OUTPUT_METADATA)&&Et(t)){let s=t.outputsMetadata||{};for(let a of t.outgoingEdges||[]){let l=n.nodesById[a.targetNodeId];e.test(l.label)&&(r.push({type:vt.OUTPUT_METADATA,matchedText:l.label}),o.add(vt.OUTPUT_METADATA));let c=(s[a.sourceNodeOutputId]||{})[Bo];c&&e.test(c)&&(r.push({type:vt.OUTPUT_METADATA,matchedText:c}),o.add(vt.OUTPUT_METADATA))}for(let a of Object.values(s))for(let l of Object.keys(a)){if(l.startsWith("__"))continue;let c=a[l],d=`${l}:${c}`,u=`${l}=${c}`;(e.test(c)||e.test(d)||e.test(u))&&(r.push({type:vt.OUTPUT_METADATA,matchedText:c}),o.add(vt.OUTPUT_METADATA))}}return{matches:r,matchTypes:o}}function YF(i,e){let t={};if(Et(i))t=Z({},i.attrs||{}),t.id=i.id;else if(xt(i)){t={"#descendants":`${(i.descendantsNodeIds||[]).length}`,"#children":`${(i.nsChildrenIds||[]).length}`};let n=e.groupNodeAttributes?.[i.id.replace("___group___","")]||{};t=Z(Z({},t),n)}return t}function dQ(i,e,t,n,r){let o=[],a=YF(n,r)[i];if(a!=null){let l=Number(a);!isNaN(l)&&l>=e&&l<=t&&o.push({type:vt.ATTRIBUTE,matchedAttrId:i})}return o}function yh(i){for(let e of i.filter(t=>t.type!==Ln.NODE_TYPE))switch(e.type){case Ln.REGEX:if(e.queryRegex!=="")return!0;break;case Ln.ATTR_VALUE_RANGE:if(e.attrName!=="")return!0;break;default:break}return!1}function Zb(i){return i.map(e=>({queries:e.queries.map(n=>{switch(n.type){case Ln.REGEX:{let r=new RegExp("","i");try{r=new RegExp(n.queryRegex,"i")}catch(s){console.warn("Failed to create regex",s)}return{type:Ln.REGEX,queryRegex:r,matchTypes:new Set(n.matchTypes)}}case Ln.NODE_TYPE:case Ln.ATTR_VALUE_RANGE:return n;default:return}}),nodeType:e.nodeType,styles:e.styles}))}function Dm(i,e,t){let n=!0;for(let r of e)if(r.type===Ln.NODE_TYPE){let o=!0;if((Et(i)&&r.nodeType===mr.LAYER_NODES||xt(i)&&r.nodeType===mr.OP_NODES)&&(o=!1),!o){n=!1;break}}else if(r.type===Ln.REGEX){if(qI(r.matchTypes,r.queryRegex,i,t).matches.length===0){n=!1;break}}else if(r.type===Ln.ATTR_VALUE_RANGE){if(r.attrName!==""&&dQ(r.attrName,r.min??Number.NEGATIVE_INFINITY,r.max??Number.POSITIVE_INFINITY,i,t).length===0){n=!1;break}}else n=!1;return n}function Qb(i,e){window.parent.postMessage({cmd:jF,name:i,resource:e},"*")}function ld(){return window.devicePixelRatio===1?1.5:window.devicePixelRatio}function cd(i,e){let t=i.styles[e];return t?typeof t=="string"?t:t.value:""}function dd(i){return i.split(` -`).map(e=>e.trim()).filter(e=>e!=="")}function YI(i){return(dd(i).length-1)*vh}var Ji=function(i){return i[i.PROCESS_GRAPH_REQ=0]="PROCESS_GRAPH_REQ",i[i.PROCESS_GRAPH_RESP=1]="PROCESS_GRAPH_RESP",i[i.EXPAND_OR_COLLAPSE_GROUP_NODE_REQ=2]="EXPAND_OR_COLLAPSE_GROUP_NODE_REQ",i[i.EXPAND_OR_COLLAPSE_GROUP_NODE_RESP=3]="EXPAND_OR_COLLAPSE_GROUP_NODE_RESP",i[i.RELAYOUT_GRAPH_REQ=4]="RELAYOUT_GRAPH_REQ",i[i.RELAYOUT_GRAPH_RESP=5]="RELAYOUT_GRAPH_RESP",i[i.LOCATE_NODE_REQ=6]="LOCATE_NODE_REQ",i[i.LOCATE_NODE_RESP=7]="LOCATE_NODE_RESP",i[i.UPDATE_PROCESSING_PROGRESS=8]="UPDATE_PROCESSING_PROGRESS",i[i.PREPARE_POPUP_REQ=9]="PREPARE_POPUP_REQ",i[i.PREPARE_POPUP_RESP=10]="PREPARE_POPUP_RESP",i[i.CLEANUP=11]="CLEANUP",i}(Ji||{}),ud=function(i){return i.PROCESSING_NODES_AND_EDGES="Processing nodes and edges",i.PROCESSING_LAYER_NAMESPACES="Processing layer namespaces",i.PROCESSING_LAYOUT_DATA="Processing layout data",i.SPLITTING_LARGE_LAYERS="Splitting large layers (if any)",i.LAYING_OUT_ROOT_LAYER="Laying out root layer",i.FINDING_IDENTICAL_LAYERS="Finding identical layers",i}(ud||{}),XF=[ud.PROCESSING_NODES_AND_EDGES,ud.PROCESSING_LAYER_NAMESPACES,ud.PROCESSING_LAYOUT_DATA,ud.SPLITTING_LARGE_LAYERS,ud.LAYING_OUT_ROOT_LAYER,ud.FINDING_IDENTICAL_LAYERS];var Vo=(()=>{class i{getItem(t){return window.localStorage.getItem(t)}setItem(t,n){window.localStorage.setItem(t,n)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var zl=(()=>{class i{curUiState=yt({paneStates:[this.createInitialPaneState()]});setDeepestExpandedGroupNodeIds(t,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.deepestExpandedGroupNodeIds=t,Z({},r)):r})}setSelectedNodeId(t,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.selectedNodeId=t,Z({},r)):r})}setSelectedGraphId(t,n,r){this.curUiState.update(o=>{let s=o.paneStates[r];return s?(s.selectedGraphId=t,s.selectedCollectionLabel=n,Z({},o)):o})}setFlattenLayers(t,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.flattenLayers=t,Z({},r)):r})}addPane(){this.curUiState.update(t=>{t.paneStates.length>1&&(t.paneStates=[t.paneStates[0]]),t.paneStates.push(this.createInitialPaneState());for(let n of t.paneStates)n.widthFraction=.5;return Z({},t)})}removePane(t){this.curUiState.update(n=>(n.paneStates.splice(t,1),n.paneStates.length===1&&(n.paneStates[0].widthFraction=1),Z({},n)))}resizePane(t){this.curUiState.update(n=>(n.paneStates.length===2&&(n.paneStates[0].widthFraction=t,n.paneStates[1].widthFraction=1-t),Z({},n)))}swapPane(){this.curUiState.update(t=>(t.paneStates.length===2&&(t.paneStates=[t.paneStates[1],t.paneStates[0]]),Z({},t)))}selectPane(t){this.curUiState.update(n=>{for(let r=0;r{class i{worker;constructor(){this.worker=new Worker(new URL("worker-GU535CTX.js",import.meta.url),{type:"classic"})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var st=(()=>{class i{localStorageService;uiStateService;workerService;curGraphCollections=yt([]);curToLocateNodeInfo=yt(void 0);curSelectedRenderer=yt(void 0);spaceKeyToZoomFitClicked=new me;searchKeyClicked=new me;addSnapshotClicked=new me;curSnapshotToRestore=new me;expandOrCollapseAllGraphLayersClicked=new me;downloadAsPngClicked=new me;config=yt(void 0);curInitialUiState=yt(void 0);panes=yt([{id:Lr(),widthFraction:1}]);selectedPaneId=yt(this.panes()[0].id);modelGraphProcessed$=new me;remoteNodeDataPaths=yt([]);testMode=!1;groupNodeChildrenCountThresholdFromUrl=null;paneIdToGraph={};paneIdToCurModelGraphs={};constructor(t,n,r){this.localStorageService=t,this.uiStateService=n,this.workerService=r,this.listenToWorker(),this.init()}addGraphCollections(t){this.curGraphCollections.update(n=>{let r=[...n],o={};for(let s of t){let a={},l={};for(let h of s.graphs){(h.id==null||h.id==="")&&(h.id="unnamed_graph");let p=h.id,f=o[p];f==null?(o[p]=0,f=0):(h.id=`${h.id} (${f+1})`,l[p]=h.id),o[p]=f+1,a[h.id]=h,h.collectionLabel=s.label}for(let h of s.graphs)for(let p of h.nodes)if(p.subgraphIds!=null&&p.subgraphIds.length>0){p.subgraphIds=p.subgraphIds.map(f=>l[f]||f),h.subGraphIds==null&&(h.subGraphIds=[]),h.subGraphIds.push(...p.subgraphIds);for(let f of p.subgraphIds)a[f].parentGraphId=h.id}let c=s.graphs.filter(h=>h.parentGraphId==null),d=[],u=(h,p=0)=>{let f=[];h==null?f=c:f=(h.subGraphIds||[]).map(m=>a[m]),f.sort((m,b)=>b.nodes.length-m.nodes.length);for(let m of f)m.level=p,d.push(m),u(m,p+1)};u(),s.graphs=d}return r.push(...t),r})}selectGraphInPane(t,n,r=!1,o){if(n===1&&this.panes().length===1){this.openGraphInSplitPane(t);return}if((this.panes()[n].modelGraph?.id||"")===t.id)return;let a=this.panes()[n];a.searchResults=void 0,a.selectedNodeDataProviderRunId=void 0;let l=a.id;if(this.paneIdToGraph[l]=t,this.uiStateService.setSelectedGraphId(t.id,t.collectionLabel||"",this.getPaneIndexById(l)),a.subgraphBreadcrumbs!=null&&a.subgraphBreadcrumbs.length>0){let c=[...a.subgraphBreadcrumbs];c[c.length-1].graphId=t.id,a.subgraphBreadcrumbs=c}this.processGraph(l,r,o)}selectGraphInCurrentPane(t,n=!1,r){this.selectGraphInPane(t,this.getPaneIndexById(this.selectedPaneId()),n,r)}openGraphInSplitPane(t,n=!1){let r=Lr();this.paneIdToGraph[r]=t,this.panes.update(a=>{let l=a[0];return l.widthFraction=.5,a.push({id:r,widthFraction:.5,flattenLayers:n,showOnNodeItemTypes:{[r]:this.getSavedShowOnNodeItemTypes()},showOnEdgeItemTypes:{[r]:this.getSavedShowOnEdgeItemTypes()}}),[...a]}),this.curSelectedRenderer.set({id:r,ownerType:Ll.GRAPH_PANEL});let o=this.getPaneIndexById(r);this.uiStateService.addPane(),this.selectPane(r),this.uiStateService.setSelectedGraphId(t.id,t.collectionLabel||"",o),this.uiStateService.setFlattenLayers(n,o);let s={eventType:Ji.PROCESS_GRAPH_REQ,graph:t,showOnNodeItemTypes:this.getShowOnNodeItemTypes(r,r),nodeDataProviderRuns:{},config:this.config?this.config():void 0,paneId:r,groupNodeChildrenCountThreshold:this.getGroupNodeChildrenCountThreshold(),flattenLayers:n,keepLayersWithASingleChild:this.config()?.keepLayersWithASingleChild};this.workerService.worker.postMessage(s)}processGraph(t,n=!1,r){if(r!=null){let s=this.getPaneById(t);s&&(s.snapshotToRestore=r)}this.setPaneLoading(t);let o={eventType:Ji.PROCESS_GRAPH_REQ,graph:this.paneIdToGraph[t],showOnNodeItemTypes:this.getShowOnNodeItemTypes(t,t),nodeDataProviderRuns:{},config:this.config?this.config():void 0,paneId:t,groupNodeChildrenCountThreshold:this.getGroupNodeChildrenCountThreshold(),flattenLayers:n,keepLayersWithASingleChild:this.config()?.keepLayersWithASingleChild};this.workerService.worker.postMessage(o)}setFlattenLayersInCurrentPane(t){let n=this.getSelectedPane();if(!n)return;this.panes.update(o=>(n.flattenLayers=t,n.searchResults=void 0,[...o]));let r=this.getPaneIndexById(n.id);this.uiStateService.setFlattenLayers(t,r),this.uiStateService.setDeepestExpandedGroupNodeIds([],r)}toggleFlattenLayers(t){let n=this.getPaneById(t);if(!n)return;let r=n.flattenLayers===!0;this.panes.update(s=>(n.flattenLayers=!r,n.searchResults=void 0,[...s]));let o=this.getPaneIndexById(t);this.uiStateService.setFlattenLayers(!r,o),this.uiStateService.setDeepestExpandedGroupNodeIds([],o)}getFlattenLayers(t){return this.getPaneById(t)?.flattenLayers===!0}selectPane(t){this.selectedPaneId.set(t),this.uiStateService.selectPane(this.getPaneIndexById(t))}selectPaneByIndex(t){let n=this.panes()[t];n&&this.selectPane(n.id)}selectNode(t,n){this.panes.update(o=>{let s=this.getPaneById(t);return s?(s.selectedNodeInfo=n,[...o]):o}),this.uiStateService.setSelectedNodeId(n?.nodeId||"",this.getPaneIndexById(t));let r=this.getPaneById(t)?.modelGraph;if(r){let o=n?.nodeId||"",s=r.nodesById[o];if(s&&Et(s)&&window.parent){let a=s.outputsMetadata||{},l=[];for(let c of Object.keys(a)){let u=a[c].tensor_name;u&&l.push(u)}window.parent.postMessage({cmd:"model-explorer-node-selected",nodeId:o,outputTensorNames:l},"*")}}}getModelGraphFromSelectedPane(){return this.getPaneById(this.selectedPaneId())?.modelGraph}getModelGraphFromPane(t){return this.getPaneById(t)?.modelGraph}getModelGraphFromPaneIndex(t){return this.panes()[t]?.modelGraph}getSelectedNodeInfoFromSelectedPane(){return this.getPaneById(this.selectedPaneId())?.selectedNodeInfo}getSelectedPane(){return this.getPaneById(this.selectedPaneId())}setPaneWidthFraction(t){this.panes.update(n=>n.length!==2?n:(n[0].widthFraction=t,n[1].widthFraction=1-t,[...n])),this.uiStateService.resizePane(t)}setSelectedNodeDataProviderRunId(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.selectedNodeDataProviderRunId=n,[...r]):r})}getSelectedNodeDataProviderRunId(t){return this.getPaneById(t)?.selectedNodeDataProviderRunId}setPaneHasArtificialLayers(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.hasArtificialLayers=n,[...r]):r})}setNodeToReveal(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.nodeIdToReveal=n,[...r]):r})}closePane(t){delete this.paneIdToGraph[t],delete this.paneIdToCurModelGraphs[t],this.panes.update(n=>{let r=n.findIndex(o=>o.id===t);return r>=0&&(n.splice(r,1),this.uiStateService.removePane(r)),n[0].widthFraction=1,[...n]}),this.selectPane(this.panes()[0].id)}swapPane(){this.panes.update(t=>t.length!==2?t:[t[1],t[0]]),this.uiStateService.swapPane()}getPaneById(t){return this.panes().find(n=>n.id===t)}getPaneIndexById(t){return this.panes().findIndex(n=>n.id===t)}addSnapshot(t,n,r){this.panes.update(o=>{let s=this.getPaneById(r);return s&&(s.snapshots==null&&(s.snapshots={}),s.snapshots[n]==null&&(s.snapshots[n]=[]),s.snapshots[n].push(t)),[...o]})}deleteSnapshot(t,n,r){this.panes.update(o=>{let s=this.getPaneById(r);return s&&s.snapshots&&s.snapshots[n]&&s.snapshots[n].splice(t,1),[...o]})}getGraphById(t){for(let n of this.curGraphCollections())for(let r of n.graphs)if(r.id===t)return r}addSubgraphBreadcrumbItem(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);if(!a)return s;let l=[...a.subgraphBreadcrumbs||[]];return l.length===0?l.push({graphId:n,snapshot:o}):l[l.length-1]={graphId:n,snapshot:o},l.push({graphId:r}),a.subgraphBreadcrumbs=l,[...s]})}setCurrentSubgraphBreadcrumb(t,n){this.panes.update(r=>{let o=this.getPaneById(t);if(!o)return r;let s=[...o.subgraphBreadcrumbs||[]];return s.splice(n+1),s.length===1&&(s=[]),o.subgraphBreadcrumbs=s,[...r]})}setSearchResults(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.searchResults=n,[...r]):r})}clearSearchResults(t){this.panes.update(n=>{let r=this.getPaneById(t);return r?(r.searchResults={results:{}},[...n]):n})}toggleShowOnNode(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);if(!a)return s;a.showOnNodeItemTypes||(a.showOnNodeItemTypes={}),a.showOnNodeItemTypes[n]==null&&(a.showOnNodeItemTypes[n]={}),a.showOnNodeItemTypes[n][r]==null&&(a.showOnNodeItemTypes[n][r]={selected:!1});let l=a.showOnNodeItemTypes[n][r].selected;return a.showOnNodeItemTypes[n]=Z({},a.showOnNodeItemTypes[n]),a.showOnNodeItemTypes[n][r].selected=o??!l,a.showOnNodeItemTypes=Z({},a.showOnNodeItemTypes),[...s]})}toggleShowOnEdge(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);if(!a)return s;a.showOnEdgeItemTypes||(a.showOnEdgeItemTypes={}),a.showOnEdgeItemTypes[n]==null&&(a.showOnEdgeItemTypes[n]={}),a.showOnEdgeItemTypes[n][r]==null&&(a.showOnEdgeItemTypes[n][r]={selected:!1});let l=a.showOnEdgeItemTypes[n][r].selected;return a.showOnEdgeItemTypes[n]=Z({},a.showOnEdgeItemTypes[n]),a.showOnEdgeItemTypes[n][r].selected=o??!l,a.showOnEdgeItemTypes=Z({},a.showOnEdgeItemTypes),[...s]})}setShowOnNodeFilter(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);return a?(a.showOnNodeItemTypes||(a.showOnNodeItemTypes={}),a.showOnNodeItemTypes[n]==null&&(a.showOnNodeItemTypes[n]={}),a.showOnNodeItemTypes[n][r]==null&&(a.showOnNodeItemTypes[n][r]={selected:!1}),a.showOnNodeItemTypes[n][r].filterRegex=o,a.showOnNodeItemTypes=Z({},a.showOnNodeItemTypes),[...s]):s})}setShowOnNode(t,n,r){this.panes.update(o=>{let s=this.getPaneById(t);return s?(s.showOnNodeItemTypes||(s.showOnNodeItemTypes={}),s.showOnNodeItemTypes=Z({},s.showOnNodeItemTypes),s.showOnNodeItemTypes[n]=r,[...o]):o})}setShowOnEdge(t,n,r){this.panes.update(o=>{let s=this.getPaneById(t);return s?(s.showOnEdgeItemTypes||(s.showOnEdgeItemTypes={}),s.showOnEdgeItemTypes=Z({},s.showOnEdgeItemTypes),s.showOnEdgeItemTypes[n]=r,[...o]):o})}deleteShowOnNodeItemType(t){this.panes.update(n=>{for(let r of n){r.showOnNodeItemTypes=Z({},r.showOnNodeItemTypes);for(let o of Object.keys(r.showOnNodeItemTypes))for(let s of t){let a=r.showOnNodeItemTypes[o][s];a&&(a.selected=!1)}}return[...n]})}getShowOnNodeItemTypes(t,n){let r=this.getPaneById(t);return r?JSON.parse(JSON.stringify((r.showOnNodeItemTypes||{})[n]||{})):{}}getSavedShowOnNodeItemTypes(){let t={};if(!this.testMode){let n=this.localStorageService.getItem(jb);n&&(t=JSON.parse(n))}return t}getSavedShowOnEdgeItemTypes(){let t={};if(!this.testMode){let n=this.localStorageService.getItem(Wb);n&&(t=JSON.parse(n))}return t}getShowOnEdgeItemTypes(t,n){let r=this.getPaneById(t);return r?JSON.parse(JSON.stringify((r.showOnEdgeItemTypes||{})[n]||{})):{}}getGraphByPaneId(t){return this.paneIdToGraph[t]}updateCurrentModelGraph(t,n){this.paneIdToCurModelGraphs[t]=n}getCurrentModelGraphFromPane(t){return this.paneIdToCurModelGraphs[t]}reset(){this.workerService.worker.postMessage({eventType:Ji.CLEANUP}),this.curGraphCollections.set([]),this.curToLocateNodeInfo.set(void 0),this.curSelectedRenderer.set(void 0),this.config.set(void 0),this.curInitialUiState.set(void 0),this.panes.set([{id:Lr(),widthFraction:1}]),this.selectedPaneId.set(this.panes()[0].id),this.remoteNodeDataPaths.set([]),this.groupNodeChildrenCountThresholdFromUrl=null,this.paneIdToGraph={},this.paneIdToCurModelGraphs={},this.init()}listenToWorker(){this.workerService.worker.addEventListener("message",t=>{let n=t.data;switch(n.eventType){case Ji.PROCESS_GRAPH_RESP:this.handleGraphProcessed(n.modelGraph,n.paneId);break;default:break}})}init(){this.curSelectedRenderer.set({id:this.panes()[0].id,ownerType:Ll.GRAPH_PANEL});let t=new URLSearchParams(document.location.search);this.testMode=t.get("test_mode")==="1",this.groupNodeChildrenCountThresholdFromUrl=t.get("groupNodeChildrenCountThreshold");let n=this.panes()[0];n.showOnNodeItemTypes={[n.id]:this.getSavedShowOnNodeItemTypes()},n.showOnEdgeItemTypes={[n.id]:this.getSavedShowOnEdgeItemTypes()}}handleGraphProcessed(t,n){this.panes.update(r=>{for(let o of r)if(o.id===n){o.modelGraph=t;break}return[...r]}),this.modelGraphProcessed$.next({paneIndex:this.getPaneIndexById(n),modelGraph:t})}setPaneLoading(t){this.panes.update(n=>{for(let r of n)if(r.id===t){r.modelGraph=void 0;break}return[...n]})}getGroupNodeChildrenCountThreshold(){let t=Im;return this.config&&(t=this.config()?.artificialLayerNodeCountThreshold||Im),this.groupNodeChildrenCountThresholdFromUrl!=null&&(t=Number(this.groupNodeChildrenCountThresholdFromUrl)),t}static \u0275fac=function(n){return new(n||i)(X(Vo),X(zl),X(Ul))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var t3=(()=>{let e=class e{constructor(n,r){this._renderer=n,this._elementRef=r,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}};e.\u0275fac=function(r){return new(r||e)(M(qc),M(Re))},e.\u0275dir=ze({type:e});let i=e;return i})(),n3=(()=>{let e=class e extends t3{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,features:[nn]});let i=e;return i})(),La=new ge(""),uQ={provide:La,useExisting:Yr(()=>km),multi:!0},km=(()=>{let e=class e extends n3{writeValue(n){this.setProperty("checked",n)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,o){r&1&&H("change",function(a){return o.onChange(a.target.checked)})("blur",function(){return o.onTouched()})},features:[Bt([uQ]),nn]});let i=e;return i})(),hQ={provide:La,useExisting:Yr(()=>js),multi:!0};function pQ(){let i=Da()?Da().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var fQ=new ge(""),js=(()=>{let e=class e extends t3{constructor(n,r,o){super(n,r),this._compositionMode=o,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!pQ())}writeValue(n){let r=n??"";this.setProperty("value",r)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}};e.\u0275fac=function(r){return new(r||e)(M(qc),M(Re),M(fQ,8))},e.\u0275dir=ze({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){r&1&&H("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},features:[Bt([hQ]),nn]});let i=e;return i})();function Hl(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function i3(i){return i!=null&&typeof i.length=="number"}var pd=new ge(""),tT=new ge(""),mQ=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Jb=class{static min(e){return gQ(e)}static max(e){return _Q(e)}static required(e){return vQ(e)}static requiredTrue(e){return bQ(e)}static email(e){return yQ(e)}static minLength(e){return xQ(e)}static maxLength(e){return wQ(e)}static pattern(e){return CQ(e)}static nullValidator(e){return r3(e)}static compose(e){return d3(e)}static composeAsync(e){return u3(e)}};function gQ(i){return e=>{if(Hl(e.value)||Hl(i))return null;let t=parseFloat(e.value);return!isNaN(t)&&t{if(Hl(e.value)||Hl(i))return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function vQ(i){return Hl(i.value)?{required:!0}:null}function bQ(i){return i.value===!0?null:{required:!0}}function yQ(i){return Hl(i.value)||mQ.test(i.value)?null:{email:!0}}function xQ(i){return e=>Hl(e.value)||!i3(e.value)?null:e.value.lengthi3(e.value)&&e.value.length>i?{maxlength:{requiredLength:i,actualLength:e.value.length}}:null}function CQ(i){if(!i)return r3;let e,t;return typeof i=="string"?(t="",i.charAt(0)!=="^"&&(t+="^"),t+=i,i.charAt(i.length-1)!=="$"&&(t+="$"),e=new RegExp(t)):(t=i.toString(),e=i),n=>{if(Hl(n.value))return null;let r=n.value;return e.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}function r3(i){return null}function o3(i){return i!=null}function s3(i){return Xc(i)?Kn(i):i}function a3(i){let e={};return i.forEach(t=>{e=t!=null?Z(Z({},e),t):e}),Object.keys(e).length===0?null:e}function l3(i,e){return e.map(t=>t(i))}function SQ(i){return!i.validate}function c3(i){return i.map(e=>SQ(e)?e:t=>e.validate(t))}function d3(i){if(!i)return null;let e=i.filter(o3);return e.length==0?null:function(t){return a3(l3(t,e))}}function nT(i){return i!=null?d3(c3(i)):null}function u3(i){if(!i)return null;let e=i.filter(o3);return e.length==0?null:function(t){let n=l3(t,e).map(s3);return Mf(n).pipe(Je(a3))}}function iT(i){return i!=null?u3(c3(i)):null}function ZF(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function h3(i){return i._rawValidators}function p3(i){return i._rawAsyncValidators}function QI(i){return i?Array.isArray(i)?i:[i]:[]}function ey(i,e){return Array.isArray(i)?i.includes(e):i===e}function QF(i,e){let t=QI(e);return QI(i).forEach(r=>{ey(t,r)||t.push(r)}),t}function KF(i,e){return QI(e).filter(t=>!ey(i,t))}var ty=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=nT(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=iT(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},Sh=class extends ty{get formDirective(){return null}get path(){return null}},hd=class extends ty{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},KI=class{constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},MQ={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},RIe=wt(Z({},MQ),{"[class.ng-submitted]":"isSubmitted"}),zo=(()=>{let e=class e extends KI{constructor(n){super(n)}};e.\u0275fac=function(r){return new(r||e)(M(hd,2))},e.\u0275dir=ze({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&se("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},features:[nn]});let i=e;return i})();var Pm="VALID",Kb="INVALID",wh="PENDING",Om="DISABLED",Gl=class{},ny=class extends Gl{constructor(e,t){super(),this.value=e,this.source=t}},Am=class extends Gl{constructor(e,t){super(),this.pristine=e,this.source=t}},Nm=class extends Gl{constructor(e,t){super(),this.touched=e,this.source=t}},Ch=class extends Gl{constructor(e,t){super(),this.status=e,this.source=t}},JI=class extends Gl{constructor(e){super(),this.source=e}},eT=class extends Gl{constructor(e){super(),this.source=e}};function f3(i){return(cy(i)?i.validators:i)||null}function EQ(i){return Array.isArray(i)?nT(i):i||null}function m3(i,e){return(cy(e)?e.asyncValidators:i)||null}function IQ(i){return Array.isArray(i)?iT(i):i||null}function cy(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function TQ(i,e,t){let n=i.controls;if(!(e?Object.keys(n):n).length)throw new Oe(1e3,"");if(!n[t])throw new Oe(1001,"")}function DQ(i,e,t){i._forEachChild((n,r)=>{if(t[r]===void 0)throw new Oe(1002,"")})}var iy=class{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=Xt(()=>this.statusReactive()),this.statusReactive=yt(void 0),this._pristine=Xt(()=>this.pristineReactive()),this.pristineReactive=yt(!0),this._touched=Xt(()=>this.touchedReactive()),this.touchedReactive=yt(!1),this._events=new me,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return kr(this.statusReactive)}set status(e){kr(()=>this.statusReactive.set(e))}get valid(){return this.status===Pm}get invalid(){return this.status===Kb}get pending(){return this.status==wh}get disabled(){return this.status===Om}get enabled(){return this.status!==Om}get pristine(){return kr(this.pristineReactive)}set pristine(e){kr(()=>this.pristineReactive.set(e))}get dirty(){return!this.pristine}get touched(){return kr(this.touchedReactive)}set touched(e){kr(()=>this.touchedReactive.set(e))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(QF(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(QF(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(KF(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(KF(e,this._rawAsyncValidators))}hasValidator(e){return ey(this._rawValidators,e)}hasAsyncValidator(e){return ey(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(wt(Z({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Nm(!0,n))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new Nm(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(wt(Z({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Am(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new Am(!0,n))}markAsPending(e={}){this.status=wh;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Ch(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(wt(Z({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Om,this.errors=null,this._forEachChild(r=>{r.disable(wt(Z({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new ny(this.value,n)),this._events.next(new Ch(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(wt(Z({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Pm,this._forEachChild(n=>{n.enable(wt(Z({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(wt(Z({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Pm||this.status===wh)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new ny(this.value,t)),this._events.next(new Ch(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(wt(Z({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Om:Pm}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=wh,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1};let n=s3(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(e,t){let n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Ch(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new Pe,this.statusChanges=new Pe}_calculateStatus(){return this._allControlsDisabled()?Om:this.errors?Kb:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(wh)?wh:this._anyControlsHaveStatus(Kb)?Kb:Pm}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),r&&this._events.next(new Am(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new Nm(this.touched,t)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){cy(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let t=this._parent&&this._parent.dirty;return!e&&!!t&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=EQ(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=IQ(this._rawAsyncValidators)}},ry=class extends iy{constructor(e,t,n){super(f3(t),m3(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,n={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){DQ(this,!0,e),Object.keys(e).forEach(n=>{TQ(this,!0,n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e!=null&&(Object.keys(e).forEach(n=>{let r=this.controls[n];r&&r.patchValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((n,r)=>{n.reset(e?e[r]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,n)=>(e[n]=t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,n)=>n._syncPendingControls()?!0:t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{let n=this.controls[t];n&&e(n,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[t,n]of Object.entries(this.controls))if(this.contains(t)&&e(n))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(t,n,r)=>((n.enabled||this.disabled)&&(t[r]=n.value),t))}_reduceChildren(e,t){let n=e;return this._forEachChild((r,o)=>{n=t(n,r,o)}),n}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var dy=new ge("CallSetDisabledState",{providedIn:"root",factory:()=>rT}),rT="always";function oy(i,e,t=rT){oT(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),OQ(i,e),AQ(i,e),RQ(i,e),PQ(i,e)}function sy(i,e,t=!0){let n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),ly(i,e),i&&(e._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function ay(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function PQ(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function oT(i,e){let t=h3(i);e.validator!==null?i.setValidators(ZF(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=p3(i);e.asyncValidator!==null?i.setAsyncValidators(ZF(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();ay(e._rawValidators,r),ay(e._rawAsyncValidators,r)}function ly(i,e){let t=!1;if(i!==null){if(e.validator!==null){let r=h3(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==e.validator);o.length!==r.length&&(t=!0,i.setValidators(o))}}if(e.asyncValidator!==null){let r=p3(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==e.asyncValidator);o.length!==r.length&&(t=!0,i.setAsyncValidators(o))}}}let n=()=>{};return ay(e._rawValidators,n),ay(e._rawAsyncValidators,n),t}function OQ(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&g3(i,e)})}function RQ(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&g3(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function g3(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function AQ(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function _3(i,e){i==null,oT(i,e)}function NQ(i,e){return ly(i,e)}function kQ(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function LQ(i){return Object.getPrototypeOf(i.constructor)===n3}function v3(i,e){i._syncPendingControls(),e.forEach(t=>{let n=t.control;n.updateOn==="submit"&&n._pendingChange&&(t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function FQ(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===js?t=o:LQ(o)?n=o:r=o}),r||n||t||null}function BQ(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}var VQ={provide:Sh,useExisting:Yr(()=>sT)},Rm=Promise.resolve(),sT=(()=>{let e=class e extends Sh{get submitted(){return kr(this.submittedReactive)}constructor(n,r,o){super(),this.callSetDisabledState=o,this._submitted=Xt(()=>this.submittedReactive()),this.submittedReactive=yt(!1),this._directives=new Set,this.ngSubmit=new Pe,this.form=new ry({},nT(n),iT(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(n){Rm.then(()=>{let r=this._findContainer(n.path);n.control=r.registerControl(n.name,n.control),oy(n.control,n,this.callSetDisabledState),n.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(n)})}getControl(n){return this.form.get(n.path)}removeControl(n){Rm.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name),this._directives.delete(n)})}addFormGroup(n){Rm.then(()=>{let r=this._findContainer(n.path),o=new ry({});_3(o,n),r.registerControl(n.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(n){Rm.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name)})}getFormGroup(n){return this.form.get(n.path)}updateModel(n,r){Rm.then(()=>{this.form.get(n.path).setValue(r)})}setValue(n){this.control.setValue(n)}onSubmit(n){return this.submittedReactive.set(!0),v3(this.form,this._directives),this.ngSubmit.emit(n),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(n){return n.pop(),n.length?this.form.get(n):this.form}};e.\u0275fac=function(r){return new(r||e)(M(pd,10),M(tT,10),M(dy,8))},e.\u0275dir=ze({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,o){r&1&&H("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Bt([VQ]),nn]});let i=e;return i})();function JF(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function e3(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var gr=class extends iy{constructor(e=null,t,n){super(f3(t),m3(n,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),cy(t)&&(t.nonNullable||t.initialValueIsDefault)&&(e3(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){JF(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){JF(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){e3(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var zQ=i=>i instanceof gr;var b3=new ge(""),UQ={provide:hd,useExisting:Yr(()=>ho)},ho=(()=>{let e=class e extends hd{set isDisabled(n){}constructor(n,r,o,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this.update=new Pe,this._ngModelWarningSent=!1,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=FQ(this,o)}ngOnChanges(n){if(this._isControlChanged(n)){let r=n.form.previousValue;r&&sy(r,this,!1),oy(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}kQ(n,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&sy(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_isControlChanged(n){return n.hasOwnProperty("form")}};e._ngModelWarningSentOnce=!1,e.\u0275fac=function(r){return new(r||e)(M(pd,10),M(tT,10),M(La,10),M(b3,8),M(dy,8))},e.\u0275dir=ze({type:e,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Bt([UQ]),nn,dn]});let i=e;return i})(),HQ={provide:Sh,useExisting:Yr(()=>aT)},aT=(()=>{let e=class e extends Sh{get submitted(){return kr(this._submittedReactive)}set submitted(n){this._submittedReactive.set(n)}constructor(n,r,o){super(),this.callSetDisabledState=o,this._submitted=Xt(()=>this._submittedReactive()),this._submittedReactive=yt(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Pe,this._setValidators(n),this._setAsyncValidators(r)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(ly(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(n){let r=this.form.get(n.path);return oy(r,n,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),r}getControl(n){return this.form.get(n.path)}removeControl(n){sy(n.control||null,n,!1),BQ(this.directives,n)}addFormGroup(n){this._setUpFormContainer(n)}removeFormGroup(n){this._cleanUpFormContainer(n)}getFormGroup(n){return this.form.get(n.path)}addFormArray(n){this._setUpFormContainer(n)}removeFormArray(n){this._cleanUpFormContainer(n)}getFormArray(n){return this.form.get(n.path)}updateModel(n,r){this.form.get(n.path).setValue(r)}onSubmit(n){return this._submittedReactive.set(!0),v3(this.form,this.directives),this.ngSubmit.emit(n),this.form._events.next(new JI(this.control)),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this._submittedReactive.set(!1),this.form._events.next(new eT(this.form))}_updateDomValue(){this.directives.forEach(n=>{let r=n.control,o=this.form.get(n.path);r!==o&&(sy(r||null,n),zQ(o)&&(oy(o,n,this.callSetDisabledState),n.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let r=this.form.get(n.path);_3(r,n),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let r=this.form.get(n.path);r&&NQ(r,n)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){oT(this.form,this),this._oldForm&&ly(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(r){return new(r||e)(M(pd,10),M(tT,10),M(dy,8))},e.\u0275dir=ze({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&H("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Bt([HQ]),nn,dn]});let i=e;return i})();var GQ=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})();var _r=(()=>{let e=class e{static withConfig(n){return{ngModule:e,providers:[{provide:b3,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:dy,useValue:n.callSetDisabledState??rT}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[GQ]});let i=e;return i})();var cT;try{cT=typeof Intl<"u"&&Intl.v8BreakIterator}catch{cT=!1}var gn=(()=>{let e=class e{constructor(n){this._platformId=n,this.isBrowser=this._platformId?uL(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||cT)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}};e.\u0275fac=function(r){return new(r||e)(X(Ea))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Lm;function jQ(){if(Lm==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Lm=!0}))}finally{Lm=Lm||!1}return Lm}function Fr(i){return jQ()?i:!!i.capture}var fs=function(i){return i[i.NORMAL=0]="NORMAL",i[i.NEGATED=1]="NEGATED",i[i.INVERTED=2]="INVERTED",i}(fs||{}),uy,md;function hy(){if(md==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return md=!1,md;if("scrollBehavior"in document.documentElement.style)md=!0;else{let i=Element.prototype.scrollTo;i?md=!/\{\s*\[native code\]\s*\}/.test(i.toString()):md=!1}}return md}function Mh(){if(typeof document!="object"||!document)return fs.NORMAL;if(uy==null){let i=document.createElement("div"),e=i.style;i.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";let t=document.createElement("div"),n=t.style;n.width="2px",n.height="1px",i.appendChild(t),document.body.appendChild(i),uy=fs.NORMAL,i.scrollLeft===0&&(i.scrollLeft=1,uy=i.scrollLeft===0?fs.NEGATED:fs.INVERTED),i.remove()}return uy}var lT;function WQ(){if(lT==null){let i=typeof document<"u"?document.head:null;lT=!!(i&&(i.createShadowRoot||i.attachShadow))}return lT}function Eh(i){if(WQ()){let e=i.getRootNode?i.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function Fm(){let i=typeof document<"u"&&document?document.activeElement:null;for(;i&&i.shadowRoot;){let e=i.shadowRoot.activeElement;if(e===i)break;i=e}return i}function Si(i){return i.composedPath?i.composedPath()[0]:i.target}function Bm(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function mi(i,...e){return e.length?e.some(t=>i[t]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}function Ih(i){return i!=null&&`${i}`!="false"}function $s(i,e=0){return $Q(i)?Number(i):e}function $Q(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}function gd(i){return Array.isArray(i)?i:[i]}function gi(i){return i==null?"":typeof i=="string"?i:`${i}px`}function er(i){return i instanceof Re?i.nativeElement:i}var qQ=(()=>{let e=class e{create(n){return typeof MutationObserver>"u"?null:new MutationObserver(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var py=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[qQ]});let i=e;return i})();var y3=new Set,_d,YQ=(()=>{let e=class e{constructor(n,r){this._platform=n,this._nonce=r,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):ZQ}matchMedia(n){return(this._platform.WEBKIT||this._platform.BLINK)&&XQ(n,this._nonce),this._matchMedia(n)}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Gf,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function XQ(i,e){if(!y3.has(i))try{_d||(_d=document.createElement("style"),e&&_d.setAttribute("nonce",e),_d.setAttribute("type","text/css"),document.head.appendChild(_d)),_d.sheet&&(_d.sheet.insertRule(`@media ${i} {body{ }}`,0),y3.add(i))}catch(t){console.error(t)}}function ZQ(i){return{matches:i==="all"||i==="",media:i,addListener:()=>{},removeListener:()=>{}}}var Th=(()=>{let e=class e{constructor(n,r){this._mediaMatcher=n,this._zone=r,this._queries=new Map,this._destroySubject=new me}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(n){return x3(gd(n)).some(o=>this._registerQuery(o).mql.matches)}observe(n){let o=x3(gd(n)).map(a=>this._registerQuery(a).observable),s=qr(o);return s=Ts(s.pipe(_n(1)),s.pipe(Df(1),To(0))),s.pipe(Je(a=>{let l={matches:!1,breakpoints:{}};return a.forEach(({matches:c,query:d})=>{l.matches=l.matches||c,l.breakpoints[d]=c}),l}))}_registerQuery(n){if(this._queries.has(n))return this._queries.get(n);let r=this._mediaMatcher.matchMedia(n),s={observable:new Mt(a=>{let l=c=>this._zone.run(()=>a.next(c));return r.addListener(l),()=>{r.removeListener(l)}}).pipe(pi(r),Je(({matches:a})=>({query:n,matches:a})),Xe(this._destroySubject)),mql:r};return this._queries.set(n,s),s}};e.\u0275fac=function(r){return new(r||e)(X(YQ),X(Le))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function x3(i){return i.map(e=>e.split(",")).reduce((e,t)=>e.concat(t)).map(e=>e.trim())}var fy={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var E3=" ";function Ah(i,e,t){let n=vy(i,e);t=t.trim(),!n.some(r=>r.trim()===t)&&(n.push(t),i.setAttribute(e,n.join(E3)))}function Wl(i,e,t){let n=vy(i,e);t=t.trim();let r=n.filter(o=>o!==t);r.length?i.setAttribute(e,r.join(E3)):i.removeAttribute(e)}function vy(i,e){return i.getAttribute(e)?.match(/\S+/g)??[]}var I3="cdk-describedby-message",my="cdk-describedby-host",hT=0,T3=(()=>{let e=class e{constructor(n,r){this._platform=r,this._messageRegistry=new Map,this._messagesContainer=null,this._id=`${hT++}`,this._document=n,this._id=te(Hf)+"-"+hT++}describe(n,r,o){if(!this._canBeDescribed(n,r))return;let s=dT(r,o);typeof r!="string"?(w3(r,this._id),this._messageRegistry.set(s,{messageElement:r,referenceCount:0})):this._messageRegistry.has(s)||this._createMessageElement(r,o),this._isElementDescribedByMessage(n,s)||this._addMessageReference(n,s)}removeDescription(n,r,o){if(!r||!this._isElementNode(n))return;let s=dT(r,o);if(this._isElementDescribedByMessage(n,s)&&this._removeMessageReference(n,s),typeof r=="string"){let a=this._messageRegistry.get(s);a&&a.referenceCount===0&&this._deleteMessageElement(s)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let n=this._document.querySelectorAll(`[${my}="${this._id}"]`);for(let r=0;ro.indexOf(I3)!=0);n.setAttribute("aria-describedby",r.join(" "))}_addMessageReference(n,r){let o=this._messageRegistry.get(r);Ah(n,"aria-describedby",o.messageElement.id),n.setAttribute(my,this._id),o.referenceCount++}_removeMessageReference(n,r){let o=this._messageRegistry.get(r);o.referenceCount--,Wl(n,"aria-describedby",o.messageElement.id),n.removeAttribute(my)}_isElementDescribedByMessage(n,r){let o=vy(n,"aria-describedby"),s=this._messageRegistry.get(r),a=s&&s.messageElement.id;return!!a&&o.indexOf(a)!=-1}_canBeDescribed(n,r){if(!this._isElementNode(n))return!1;if(r&&typeof r=="object")return!0;let o=r==null?"":`${r}`.trim(),s=n.getAttribute("aria-label");return o?!s||s.trim()!==o:!1}_isElementNode(n){return n.nodeType===this._document.ELEMENT_NODE}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(gn))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function dT(i,e){return typeof i=="string"?`${e||""}/${i}`:i}function w3(i,e){i.id||(i.id=`${I3}-${e}-${hT++}`)}var by=class{constructor(e,t){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new me,this._typeaheadSubscription=Ct.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=n=>n.disabled,this._pressedLetters=[],this.tabOut=new me,this.change=new me,e instanceof Yi?this._itemChangesSubscription=e.changes.subscribe(n=>this._itemsChanged(n.toArray())):GE(e)&&(this._effectRef=mt(()=>this._itemsChanged(e()),{injector:t}))}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Sn(t=>this._pressedLetters.push(t)),To(e),Gt(()=>this._pressedLetters.length>0),Je(()=>this._pressedLetters.join(""))).subscribe(t=>{let n=this._getItemsArray();for(let r=1;r!e[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(t){case 9:this.tabOut.next();return;case 40:if(this._vertical&&r){this.setNextItemActive();break}else return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&r){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&r){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t)));return}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){let t=this._getItemsArray(),n=typeof e=="number"?e:t.indexOf(e),r=t[n];this._activeItem=r??null,this._activeItemIndex=n}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){let t=this._getItemsArray();for(let n=1;n<=t.length;n++){let r=(this._activeItemIndex+e*n+t.length)%t.length,o=t[r];if(!this._skipPredicateFn(o)){this.setActiveItem(r);return}}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,t){let n=this._getItemsArray();if(n[e]){for(;this._skipPredicateFn(n[e]);)if(e+=t,!n[e])return;this.setActiveItem(e)}}_getItemsArray(){return GE(this._items)?this._items():this._items instanceof Yi?this._items.toArray():this._items}_itemsChanged(e){if(this._activeItem){let t=e.indexOf(this._activeItem);t>-1&&t!==this._activeItemIndex&&(this._activeItemIndex=t)}}},Ph=class extends by{setActiveItem(e){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(e),this.activeItem&&this.activeItem.setActiveStyles()}},yy=class extends by{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}};var Nh=(()=>{let e=class e{constructor(n){this._platform=n}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return uK(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=dK(bK(n));if(r&&(C3(r)===-1||!this.isVisible(r)))return!1;let o=n.nodeName.toLowerCase(),s=C3(n);return n.hasAttribute("contenteditable")?s!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!_K(n)?!1:o==="audio"?n.hasAttribute("controls")?s!==-1:!1:o==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return vK(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}};e.\u0275fac=function(r){return new(r||e)(X(gn))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function dK(i){try{return i.frameElement}catch{return null}}function uK(i){return!!(i.offsetWidth||i.offsetHeight||typeof i.getClientRects=="function"&&i.getClientRects().length)}function hK(i){let e=i.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function pK(i){return mK(i)&&i.type=="hidden"}function fK(i){return gK(i)&&i.hasAttribute("href")}function mK(i){return i.nodeName.toLowerCase()=="input"}function gK(i){return i.nodeName.toLowerCase()=="a"}function D3(i){if(!i.hasAttribute("tabindex")||i.tabIndex===void 0)return!1;let e=i.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function C3(i){if(!D3(i))return null;let e=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function _K(i){let e=i.nodeName.toLowerCase(),t=e==="input"&&i.type;return t==="text"||t==="password"||e==="select"||e==="textarea"}function vK(i){return pK(i)?!1:hK(i)||fK(i)||i.hasAttribute("contenteditable")||D3(i)}function bK(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}var xy=class{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}constructor(e,t,n,r,o=!1,s){this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._injector=s,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){let e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let t=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let n=this._getFirstTabbableElement(t);return n?.focus(e),!!n}return t.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let t=this._getRegionBoundary("start");return t&&t.focus(e),!!t}focusLastTabbableElement(e){let t=this._getRegionBoundary("end");return t&&t.focus(e),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=0;n=0;n--){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?fr(e,{injector:this._injector}):setTimeout(e)}},wy=(()=>{let e=class e{constructor(n,r,o){this._checker=n,this._ngZone=r,this._injector=te(bt),this._document=o}create(n,r=!1){return new xy(n,this._checker,this._ngZone,this._document,r,this._injector)}};e.\u0275fac=function(r){return new(r||e)(X(Nh),X(Le),X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var pT=class extends xy{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._enabled?this._focusTrapManager.register(this):this._focusTrapManager.deregister(this)}constructor(e,t,n,r,o,s,a,l){super(e,t,n,r,a.defer,l),this._focusTrapManager=o,this._inertStrategy=s,this._focusTrapManager.register(this)}destroy(){this._focusTrapManager.deregister(this),super.destroy()}_enable(){this._inertStrategy.preventFocus(this),this.toggleAnchors(!0)}_disable(){this._inertStrategy.allowFocus(this),this.toggleAnchors(!1)}},fT=class{constructor(){this._listener=null}preventFocus(e){this._listener&&e._document.removeEventListener("focus",this._listener,!0),this._listener=t=>this._trapFocus(e,t),e._ngZone.runOutsideAngular(()=>{e._document.addEventListener("focus",this._listener,!0)})}allowFocus(e){this._listener&&(e._document.removeEventListener("focus",this._listener,!0),this._listener=null)}_trapFocus(e,t){let n=t.target,r=e._element;n&&!r.contains(n)&&!n.closest?.("div.cdk-overlay-pane")&&setTimeout(()=>{e.enabled&&!r.contains(e._document.activeElement)&&e.focusFirstTabbableElement()})}},yK=new ge("FOCUS_TRAP_INERT_STRATEGY"),xK=(()=>{let e=class e{constructor(){this._focusTrapStack=[]}register(n){this._focusTrapStack=this._focusTrapStack.filter(o=>o!==n);let r=this._focusTrapStack;r.length&&r[r.length-1]._disable(),r.push(n),n._enable()}deregister(n){n._disable();let r=this._focusTrapStack,o=r.indexOf(n);o!==-1&&(r.splice(o,1),r.length&&r[r.length-1]._enable())}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),kh=(()=>{let e=class e{constructor(n,r,o,s,a){this._checker=n,this._ngZone=r,this._focusTrapManager=o,this._injector=te(bt),this._document=s,this._inertStrategy=a||new fT}create(n,r={defer:!1}){let o;return typeof r=="boolean"?o={defer:r}:o=r,new pT(n,this._checker,this._ngZone,this._document,this._focusTrapManager,this._inertStrategy,o,this._injector)}};e.\u0275fac=function(r){return new(r||e)(X(Nh),X(Le),X(xK),X(Ye),X(yK,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function bd(i){return i.buttons===0||i.detail===0}function yd(i){let e=i.touches&&i.touches[0]||i.changedTouches&&i.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}var wK=new ge("cdk-input-modality-detector-options"),CK={ignoreKeys:[18,17,224,91,16]},P3=650,Dh=Fr({passive:!0,capture:!0}),SK=(()=>{let e=class e{get mostRecentModality(){return this._modality.value}constructor(n,r,o,s){this._platform=n,this._mostRecentTarget=null,this._modality=new Dn(null),this._lastTouchMs=0,this._onKeydown=a=>{this._options?.ignoreKeys?.some(l=>l===a.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Si(a))},this._onMousedown=a=>{Date.now()-this._lastTouchMs{if(yd(a)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Si(a)},this._options=Z(Z({},CK),s),this.modalityDetected=this._modality.pipe(Df(1)),this.modalityChanged=this.modalityDetected.pipe(vl()),n.isBrowser&&r.runOutsideAngular(()=>{o.addEventListener("keydown",this._onKeydown,Dh),o.addEventListener("mousedown",this._onMousedown,Dh),o.addEventListener("touchstart",this._onTouchstart,Dh)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Dh),document.removeEventListener("mousedown",this._onMousedown,Dh),document.removeEventListener("touchstart",this._onTouchstart,Dh))}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Le),X(Ye),X(wK,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),MK=new ge("liveAnnouncerElement",{providedIn:"root",factory:EK});function EK(){return null}var IK=new ge("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),TK=0,Cy=(()=>{let e=class e{constructor(n,r,o,s){this._ngZone=r,this._defaultOptions=s,this._document=o,this._liveElement=n||this._createLiveElement()}announce(n,...r){let o=this._defaultOptions,s,a;return r.length===1&&typeof r[0]=="number"?a=r[0]:[s,a]=r,this.clear(),clearTimeout(this._previousTimeout),s||(s=o&&o.politeness?o.politeness:"polite"),a==null&&o&&(a=o.duration),this._liveElement.setAttribute("aria-live",s),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(l=>this._currentResolve=l)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=n,typeof a=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),a)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let n="cdk-live-announcer-element",r=this._document.getElementsByClassName(n),o=this._document.createElement("div");for(let s=0;s .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{let e=class e{constructor(n,r,o,s,a){this._ngZone=n,this._platform=r,this._inputModalityDetector=o,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new me,this._rootNodeFocusAndBlurListener=l=>{let c=Si(l);for(let d=c;d;d=d.parentElement)l.type==="focus"?this._onFocus(l,d):this._onBlur(l,d)},this._document=s,this._detectionMode=a?.detectionMode||_y.IMMEDIATE}monitor(n,r=!1){let o=er(n);if(!this._platform.isBrowser||o.nodeType!==1)return Ke();let s=Eh(o)||this._getDocument(),a=this._elementInfo.get(o);if(a)return r&&(a.checkChildren=!0),a.subject;let l={checkChildren:r,subject:new me,rootNode:s};return this._elementInfo.set(o,l),this._registerGlobalListeners(l),l.subject}stopMonitoring(n){let r=er(n),o=this._elementInfo.get(r);o&&(o.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(o))}focusVia(n,r,o){let s=er(n),a=this._getDocument().activeElement;s===a?this._getClosestElementsInfo(s).forEach(([l,c])=>this._originChanged(l,r,c)):(this._setOrigin(r),typeof s.focus=="function"&&s.focus(o))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===_y.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===_y.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?P3:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(n,r){let o=this._elementInfo.get(r),s=Si(n);!o||!o.checkChildren&&r!==s||this._originChanged(r,this._getFocusOrigin(s),o)}_onBlur(n,r){let o=this._elementInfo.get(r);!o||o.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(o,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,o=this._rootNodeFocusListenerCount.get(r)||0;o||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,gy),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,gy)}),this._rootNodeFocusListenerCount.set(r,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Xe(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let o=this._rootNodeFocusListenerCount.get(r);o>1?this._rootNodeFocusListenerCount.set(r,o-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,gy),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,gy),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,o){this._setClasses(n,r),this._emitOrigin(o,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((o,s)=>{(s===n||o.checkChildren&&s.contains(n))&&r.push([s,o])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let s=n.labels;if(s){for(let a=0;a{let e=class e{constructor(n,r){this._platform=n,this._document=r,this._breakpointSubscription=te(Th).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return vd.NONE;let n=this._document.createElement("div");n.style.backgroundColor="rgb(1,2,3)",n.style.position="absolute",this._document.body.appendChild(n);let r=this._document.defaultView||window,o=r&&r.getComputedStyle?r.getComputedStyle(n):null,s=(o&&o.backgroundColor||"").replace(/ /g,"");switch(n.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return vd.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return vd.BLACK_ON_WHITE}return vd.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let n=this._document.body.classList;n.remove(uT,S3,M3),this._hasCheckedHighContrastMode=!0;let r=this.getHighContrastMode();r===vd.BLACK_ON_WHITE?n.add(uT,S3):r===vd.WHITE_ON_BLACK&&n.add(uT,M3)}}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),Sy=(()=>{let e=class e{constructor(n){n._applyBodyHighContrastModeCssClasses()}};e.\u0275fac=function(r){return new(r||e)(X(_T))},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[py]});let i=e;return i})();var PK=new ge("cdk-dir-doc",{providedIn:"root",factory:OK});function OK(){return te(Ye)}var RK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function AK(i){let e=i?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?RK.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var ai=(()=>{let e=class e{constructor(n){if(this.value="ltr",this.change=new Pe,n){let r=n.body?n.body.dir:null,o=n.documentElement?n.documentElement.dir:null;this.value=AK(r||o||"ltr")}}ngOnDestroy(){this.change.complete()}};e.\u0275fac=function(r){return new(r||e)(X(PK,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var $l=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})();var NK=["*",[["mat-option"],["ng-container"]]],kK=["*","mat-option, ng-container"],LK=["text"],FK=[[["mat-icon"]],"*"],BK=["mat-icon","*"];function VK(i,e){if(i&1&&J(0,"mat-pseudo-checkbox",1),i&2){let t=I();N("disabled",t.disabled)("state",t.selected?"checked":"unchecked")}}function zK(i,e){if(i&1&&J(0,"mat-pseudo-checkbox",3),i&2){let t=I();N("disabled",t.disabled)}}function UK(i,e){if(i&1&&(v(0,"span",4),S(1),y()),i&2){let t=I();w(),Me("(",t.group.label,")")}}var HK=["mat-internal-form-field",""],GK=["*"];var CT=(()=>{let e=class e{};e.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",e.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",e.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",e.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)";let i=e;return i})();function jK(){return!0}var WK=new ge("mat-sanity-checks",{providedIn:"root",factory:jK}),qt=(()=>{let e=class e{constructor(n,r,o){this._sanityChecks=r,this._document=o,this._hasDoneGlobalChecks=!1,n._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(n){return Bm()?!1:typeof this._sanityChecks=="boolean"?this._sanityChecks:!!this._sanityChecks[n]}};e.\u0275fac=function(r){return new(r||e)(X(_T),X(WK,8),X(Ye))},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[$l,$l]});let i=e;return i})();var Ey=class{constructor(e,t,n,r,o){this._defaultMatcher=e,this.ngControl=t,this._parentFormGroup=n,this._parentForm=r,this._stateChanges=o,this.errorState=!1}updateErrorState(){let e=this.errorState,t=this._parentFormGroup||this._parentForm,n=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,o=n?.isErrorState(r,t)??!1;o!==e&&(this.errorState=o,this._stateChanges.next())}};var V3=(()=>{let e=class e{isErrorState(n,r){return!!(n&&n.invalid&&(n.touched||r&&r.submitted))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Uo=function(i){return i[i.FADING_IN=0]="FADING_IN",i[i.VISIBLE=1]="VISIBLE",i[i.FADING_OUT=2]="FADING_OUT",i[i.HIDDEN=3]="HIDDEN",i}(Uo||{}),yT=class{constructor(e,t,n,r=!1){this._renderer=e,this.element=t,this.config=n,this._animationForciblyDisabledThroughCss=r,this.state=Uo.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}},O3=Fr({passive:!0,capture:!0}),xT=class{constructor(){this._events=new Map,this._delegateEventHandler=e=>{let t=Si(e);t&&this._events.get(e.type)?.forEach((n,r)=>{(r===t||r.contains(t))&&n.forEach(o=>o.handleEvent(e))})}}addHandler(e,t,n,r){let o=this._events.get(t);if(o){let s=o.get(n);s?s.add(r):o.set(n,new Set([r]))}else this._events.set(t,new Map([[n,new Set([r])]])),e.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,O3)})}removeHandler(e,t,n){let r=this._events.get(e);if(!r)return;let o=r.get(t);o&&(o.delete(n),o.size===0&&r.delete(t),r.size===0&&(this._events.delete(e),document.removeEventListener(e,this._delegateEventHandler,O3)))}},R3={enterDuration:225,exitDuration:150},$K=800,A3=Fr({passive:!0,capture:!0}),N3=["mousedown","touchstart"],k3=["mouseup","mouseleave","touchend","touchcancel"],Vm=class Vm{constructor(e,t,n,r){this._target=e,this._ngZone=t,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=er(n))}fadeInRipple(e,t,n={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=Z(Z({},R3),n.animation);n.centered&&(e=r.left+r.width/2,t=r.top+r.height/2);let s=n.radius||qK(e,t,r),a=e-r.left,l=t-r.top,c=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=`${a-s}px`,d.style.top=`${l-s}px`,d.style.height=`${s*2}px`,d.style.width=`${s*2}px`,n.color!=null&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);let u=window.getComputedStyle(d),h=u.transitionProperty,p=u.transitionDuration,f=h==="none"||p==="0s"||p==="0s, 0s"||r.width===0&&r.height===0,m=new yT(this,d,n,f);d.style.transform="scale3d(1, 1, 1)",m.state=Uo.FADING_IN,n.persistent||(this._mostRecentTransientRipple=m);let b=null;return!f&&(c||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let g=()=>{b&&(b.fallbackTimer=null),clearTimeout(x),this._finishRippleTransition(m)},_=()=>this._destroyRipple(m),x=setTimeout(_,c+100);d.addEventListener("transitionend",g),d.addEventListener("transitioncancel",_),b={onTransitionEnd:g,onTransitionCancel:_,fallbackTimer:x}}),this._activeRipples.set(m,b),(f||!c)&&this._finishRippleTransition(m),m}fadeOutRipple(e){if(e.state===Uo.FADING_OUT||e.state===Uo.HIDDEN)return;let t=e.element,n=Z(Z({},R3),e.config.animation);t.style.transitionDuration=`${n.exitDuration}ms`,t.style.opacity="0",e.state=Uo.FADING_OUT,(e._animationForciblyDisabledThroughCss||!n.exitDuration)&&this._finishRippleTransition(e)}fadeOutAll(){this._getActiveRipples().forEach(e=>e.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(e=>{e.config.persistent||e.fadeOut()})}setupTriggerEvents(e){let t=er(e);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,N3.forEach(n=>{Vm._eventManager.addHandler(this._ngZone,n,t,this)}))}handleEvent(e){e.type==="mousedown"?this._onMousedown(e):e.type==="touchstart"?this._onTouchStart(e):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{k3.forEach(t=>{this._triggerElement.addEventListener(t,this,A3)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(e){e.state===Uo.FADING_IN?this._startFadeOutTransition(e):e.state===Uo.FADING_OUT&&this._destroyRipple(e)}_startFadeOutTransition(e){let t=e===this._mostRecentTransientRipple,{persistent:n}=e.config;e.state=Uo.VISIBLE,!n&&(!t||!this._isPointerDown)&&e.fadeOut()}_destroyRipple(e){let t=this._activeRipples.get(e)??null;this._activeRipples.delete(e),this._activeRipples.size||(this._containerRect=null),e===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),e.state=Uo.HIDDEN,t!==null&&(e.element.removeEventListener("transitionend",t.onTransitionEnd),e.element.removeEventListener("transitioncancel",t.onTransitionCancel),t.fallbackTimer!==null&&clearTimeout(t.fallbackTimer)),e.element.remove()}_onMousedown(e){let t=bd(e),n=this._lastTouchStartEvent&&Date.now(){let t=e.state===Uo.VISIBLE||e.config.terminateOnPointerUp&&e.state===Uo.FADING_IN;!e.config.persistent&&t&&e.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let e=this._triggerElement;e&&(N3.forEach(t=>Vm._eventManager.removeHandler(t,e,this)),this._pointerUpEventsRegistered&&(k3.forEach(t=>e.removeEventListener(t,this,A3)),this._pointerUpEventsRegistered=!1))}};Vm._eventManager=new xT;var wT=Vm;function qK(i,e,t){let n=Math.max(Math.abs(i-t.left),Math.abs(i-t.right)),r=Math.max(Math.abs(e-t.top),Math.abs(e-t.bottom));return Math.sqrt(n*n+r*r)}var z3=new ge("mat-ripple-global-options"),za=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(n){n&&this.fadeOutAllNonPersistent(),this._disabled=n,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(n){this._trigger=n,this._setupTriggerEventsIfEnabled()}constructor(n,r,o,s,a){this._elementRef=n,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new wT(this,r,n,o)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Z(Z(Z({},this._globalOptions.animation),this._animationMode==="NoopAnimations"?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(n,r=0,o){return typeof n=="number"?this._rippleRenderer.fadeInRipple(n,r,Z(Z({},this.rippleConfig),o)):this._rippleRenderer.fadeInRipple(0,0,Z(Z({},this.rippleConfig),n))}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Le),M(gn),M(z3,8),M(Zn,8))},e.\u0275dir=ze({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(r,o){r&2&&se("mat-ripple-unbounded",o.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0});let i=e;return i})(),Um=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[qt,qt]});let i=e;return i})(),YK=(()=>{let e=class e{constructor(n){this._animationMode=n,this.state="unchecked",this.disabled=!1,this.appearance="full"}};e.\u0275fac=function(r){return new(r||e)(M(Zn,8))},e.\u0275cmp=le({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(r,o){r&2&&se("mat-pseudo-checkbox-indeterminate",o.state==="indeterminate")("mat-pseudo-checkbox-checked",o.state==="checked")("mat-pseudo-checkbox-disabled",o.disabled)("mat-pseudo-checkbox-minimal",o.appearance==="minimal")("mat-pseudo-checkbox-full",o.appearance==="full")("_mat-animation-noopable",o._animationMode==="NoopAnimations")},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},standalone:!0,features:[ce],decls:0,vars:0,template:function(r,o){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color);border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color);border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0});let i=e;return i})(),XK=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[qt]});let i=e;return i})(),Lh=new ge("MAT_OPTION_PARENT_COMPONENT"),ZK=0,Fh=new ge("MatOptgroup"),U3=(()=>{let e=class e{constructor(n){this.disabled=!1,this._labelId=`mat-optgroup-label-${ZK++}`,this._inert=n?.inertGroups??!1}};e.\u0275fac=function(r){return new(r||e)(M(Lh,8))},e.\u0275cmp=le({type:e,selectors:[["mat-optgroup"]],hostAttrs:[1,"mat-mdc-optgroup"],hostVars:3,hostBindings:function(r,o){r&2&&Ze("role",o._inert?null:"group")("aria-disabled",o._inert?null:o.disabled.toString())("aria-labelledby",o._inert?null:o._labelId)},inputs:{label:"label",disabled:[2,"disabled","disabled",at]},exportAs:["matOptgroup"],standalone:!0,features:[Bt([{provide:Fh,useExisting:e}]),an,ce],ngContentSelectors:kK,decls:5,vars:4,consts:[["role","presentation",1,"mat-mdc-optgroup-label",3,"id"],[1,"mdc-list-item__primary-text"]],template:function(r,o){r&1&&(kn(NK),v(0,"span",0)(1,"span",1),S(2),$t(3),y()(),$t(4,1)),r&2&&(se("mdc-list-item--disabled",o.disabled),N("id",o._labelId),w(2),Me("",o.label," "))},styles:[".mat-mdc-optgroup{color:var(--mat-optgroup-label-text-color);font-family:var(--mat-optgroup-label-text-font);line-height:var(--mat-optgroup-label-text-line-height);font-size:var(--mat-optgroup-label-text-size);letter-spacing:var(--mat-optgroup-label-text-tracking);font-weight:var(--mat-optgroup-label-text-weight)}.mat-mdc-optgroup-label{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;outline:none}.mat-mdc-optgroup-label.mdc-list-item--disabled{opacity:.38}.mat-mdc-optgroup-label .mdc-list-item__primary-text{font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;white-space:normal}"],encapsulation:2,changeDetection:0});let i=e;return i})(),QK=0,zm=class{constructor(e,t=!1){this.source=e,this.isUserInput=t}},ql=(()=>{let e=class e{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(n){this._disabled=n}get disableRipple(){return!!(this._parent&&this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}constructor(n,r,o,s){this._element=n,this._changeDetectorRef=r,this._parent=o,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id=`mat-option-${QK++}`,this.onSelectionChange=new Pe,this._stateChanges=new me}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(n=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),n&&this._emitSelectionChangeEvent())}deselect(n=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),n&&this._emitSelectionChangeEvent())}focus(n,r){let o=this._getHostElement();typeof o.focus=="function"&&o.focus(r)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(n){(n.keyCode===13||n.keyCode===32)&&!mi(n)&&(this._selectViaInteraction(),n.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let n=this.viewValue;n!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=n)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(n=!1){this.onSelectionChange.emit(new zm(this,n))}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Fe),M(Lh,8),M(Fh,8))},e.\u0275cmp=le({type:e,selectors:[["mat-option"]],viewQuery:function(r,o){if(r&1&&Ie(LK,7),r&2){let s;be(s=ye())&&(o._text=s.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(r,o){r&1&&H("click",function(){return o._selectViaInteraction()})("keydown",function(a){return o._handleKeydown(a)}),r&2&&(No("id",o.id),Ze("aria-selected",o.selected)("aria-disabled",o.disabled.toString()),se("mdc-list-item--selected",o.selected)("mat-mdc-option-multiple",o.multiple)("mat-mdc-option-active",o.active)("mdc-list-item--disabled",o.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",at]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],standalone:!0,features:[an,ce],ngContentSelectors:BK,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(r,o){r&1&&(kn(FK),W(0,VK,1,2,"mat-pseudo-checkbox",1),$t(1),v(2,"span",2,0),$t(4,1),y(),W(5,zK,1,1,"mat-pseudo-checkbox",3)(6,UK,2,1,"span",4),J(7,"div",5)),r&2&&(ae(o.multiple?0:-1),w(5),ae(!o.multiple&&o.selected&&!o.hideSingleSelectionIndicator?5:-1),w(),ae(o.group&&o.group._inert?6:-1),w(),N("matRippleTrigger",o._getHostElement())("matRippleDisabled",o.disabled||o.disableRipple))},dependencies:[YK,za],styles:['.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color);font-family:var(--mat-option-label-text-font);line-height:var(--mat-option-label-text-line-height);font-size:var(--mat-option-label-text-size);letter-spacing:var(--mat-option-label-text-tracking);font-weight:var(--mat-option-label-text-weight)}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color)}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color);outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color)}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color)}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let i=e;return i})();function Iy(i,e,t){if(t.length){let n=e.toArray(),r=t.toArray(),o=0;for(let s=0;st+n?Math.max(0,i-n+e):t}var Bh=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[Um,qt,XK]});let i=e;return i})(),L3={capture:!0},F3=["focus","mousedown","mouseenter","touchstart"],vT="mat-ripple-loader-uninitialized",bT="mat-ripple-loader-class-name",B3="mat-ripple-loader-centered",My="mat-ripple-loader-disabled",H3=(()=>{let e=class e{constructor(){this._document=te(Ye,{optional:!0}),this._animationMode=te(Zn,{optional:!0}),this._globalRippleOptions=te(z3,{optional:!0}),this._platform=te(gn),this._ngZone=te(Le),this._hosts=new Map,this._onInteraction=n=>{let r=Si(n);if(r instanceof HTMLElement){let o=r.closest(`[${vT}="${this._globalRippleOptions?.namespace??""}"]`);o&&this._createRipple(o)}},this._ngZone.runOutsideAngular(()=>{for(let n of F3)this._document?.addEventListener(n,this._onInteraction,L3)})}ngOnDestroy(){let n=this._hosts.keys();for(let r of n)this.destroyRipple(r);for(let r of F3)this._document?.removeEventListener(r,this._onInteraction,L3)}configureRipple(n,r){n.setAttribute(vT,this._globalRippleOptions?.namespace??""),(r.className||!n.hasAttribute(bT))&&n.setAttribute(bT,r.className||""),r.centered&&n.setAttribute(B3,""),r.disabled&&n.setAttribute(My,"")}getRipple(n){return this._hosts.get(n)||this._createRipple(n)}setDisabled(n,r){let o=this._hosts.get(n);if(o){o.disabled=r;return}r?n.setAttribute(My,""):n.removeAttribute(My)}_createRipple(n){if(!this._document)return;let r=this._hosts.get(n);if(r)return r;n.querySelector(".mat-ripple")?.remove();let o=this._document.createElement("span");o.classList.add("mat-ripple",n.getAttribute(bT)),n.append(o);let s=new za(new Re(o),this._ngZone,this._platform,this._globalRippleOptions?this._globalRippleOptions:void 0,this._animationMode?this._animationMode:void 0);return s._isInitialized=!0,s.trigger=n,s.centered=n.hasAttribute(B3),s.disabled=n.hasAttribute(My),this.attachRipple(n,s),s}attachRipple(n,r){n.removeAttribute(vT),this._hosts.set(n,r)}destroyRipple(n){let r=this._hosts.get(n);r&&(r.ngOnDestroy(),this._hosts.delete(n))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),Dy=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=le({type:e,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(r,o){r&2&&se("mdc-form-field--align-end",o.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},standalone:!0,features:[ce],attrs:HK,ngContentSelectors:GK,decls:1,vars:0,template:function(r,o){r&1&&(kn(),$t(0))},styles:[".mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}"],encapsulation:2,changeDetection:0});let i=e;return i})();var KK=["mat-button",""],JK=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],eJ=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var tJ=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}";var nJ=["mat-icon-button",""],iJ=["*"];var rJ=new ge("MAT_BUTTON_CONFIG");var oJ=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],G3=(()=>{let e=class e{get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(n){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,n)}get disableRipple(){return this._disableRipple}set disableRipple(n){this._disableRipple=n,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(n){this._disabled=n,this._updateRippleDisabled()}constructor(n,r,o,s){this._elementRef=n,this._platform=r,this._ngZone=o,this._animationMode=s,this._focusMonitor=te(po),this._rippleLoader=te(H3),this._isFab=!1,this._disableRipple=!1,this._disabled=!1;let a=te(rJ,{optional:!0}),l=n.nativeElement,c=l.classList;this.disabledInteractive=a?.disabledInteractive??!1,this.color=a?.color??null,this._rippleLoader?.configureRipple(l,{className:"mat-mdc-button-ripple"});for(let{attribute:d,mdcClasses:u}of oJ)l.hasAttribute(d)&&c.add(...u)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(n="program",r){n?this._focusMonitor.focusVia(this._elementRef.nativeElement,n,r):this._elementRef.nativeElement.focus(r)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}};e.\u0275fac=function(r){IE()},e.\u0275dir=ze({type:e,inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",at],disabled:[2,"disabled","disabled",at],ariaDisabled:[2,"aria-disabled","ariaDisabled",at],disabledInteractive:[2,"disabledInteractive","disabledInteractive",at]},features:[an]});let i=e;return i})();var zi=(()=>{let e=class e extends G3{constructor(n,r,o,s){super(n,r,o,s)}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(gn),M(Le),M(Zn,8))},e.\u0275cmp=le({type:e,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(r,o){r&2&&(Ze("disabled",o._getDisabledAttribute())("aria-disabled",o._getAriaDisabled()),Nr(o.color?"mat-"+o.color:""),se("mat-mdc-button-disabled",o.disabled)("mat-mdc-button-disabled-interactive",o.disabledInteractive)("_mat-animation-noopable",o._animationMode==="NoopAnimations")("mat-unthemed",!o.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[nn,ce],attrs:KK,ngContentSelectors:eJ,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,o){r&1&&(kn(JK),J(0,"span",0),$t(1),v(2,"span",1),$t(3,1),y(),$t(4,2),J(5,"span",2)(6,"span",3)),r&2&&se("mdc-button__ripple",!o._isFab)("mdc-fab__ripple",o._isFab)},styles:['.mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 8px);height:var(--mdc-text-button-container-height);font-family:var(--mdc-text-button-label-text-font);font-size:var(--mdc-text-button-label-text-size);letter-spacing:var(--mdc-text-button-label-text-tracking);text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight)}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color)}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity)}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity)}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity)}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color)}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-filled-button-horizontal-padding, 16px);height:var(--mdc-filled-button-container-height);font-family:var(--mdc-filled-button-label-text-font);font-size:var(--mdc-filled-button-label-text-size);letter-spacing:var(--mdc-filled-button-label-text-tracking);text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color)}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity)}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity)}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity)}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color);background-color:var(--mdc-filled-button-container-color)}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow);height:var(--mdc-protected-button-container-height);font-family:var(--mdc-protected-button-label-text-font);font-size:var(--mdc-protected-button-label-text-size);letter-spacing:var(--mdc-protected-button-label-text-tracking);text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color)}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity)}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity)}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity)}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color);background-color:var(--mdc-protected-button-container-color)}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape)}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow)}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow)}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow)}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow)}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-outlined-button-horizontal-padding, 15px);height:var(--mdc-outlined-button-container-height);font-family:var(--mdc-outlined-button-label-text-font);font-size:var(--mdc-outlined-button-label-text-size);letter-spacing:var(--mdc-outlined-button-label-text-tracking);text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight);border-radius:var(--mdc-outlined-button-container-shape);border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color)}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity)}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity)}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity)}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color);border-color:var(--mdc-outlined-button-outline-color)}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0});let i=e;return i})();var Ho=(()=>{let e=class e extends G3{constructor(n,r,o,s){super(n,r,o,s),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(gn),M(Le),M(Zn,8))},e.\u0275cmp=le({type:e,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(r,o){r&2&&(Ze("disabled",o._getDisabledAttribute())("aria-disabled",o._getAriaDisabled()),Nr(o.color?"mat-"+o.color:""),se("mat-mdc-button-disabled",o.disabled)("mat-mdc-button-disabled-interactive",o.disabledInteractive)("_mat-animation-noopable",o._animationMode==="NoopAnimations")("mat-unthemed",!o.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[nn,ce],attrs:nJ,ngContentSelectors:iJ,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,o){r&1&&(kn(),J(0,"span",0),$t(1),J(2,"span",1)(3,"span",2))},styles:['.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 48px);height:var(--mdc-icon-button-state-layer-size, 48px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 48px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size);color:var(--mdc-icon-button-icon-color);-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mdc-icon-button-icon-size);height:var(--mdc-icon-button-icon-size);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color)}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color)}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color)}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity)}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity)}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity)}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',tJ],encapsulation:2,changeDetection:0});let i=e;return i})();var In=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[qt,Um,qt]});let i=e;return i})();function qs(i,e){return ie?1:i>=e?0:NaN}function Py(i){return i.length===1&&(i=sJ(i)),{left:function(e,t,n,r){for(n==null&&(n=0),r==null&&(r=e.length);n>>1;i(e[o],t)<0?n=o+1:r=o}return n},right:function(e,t,n,r){for(n==null&&(n=0),r==null&&(r=e.length);n>>1;i(e[o],t)>0?r=o:n=o+1}return n}}}function sJ(i){return function(e,t){return qs(i(e),t)}}var j3=Py(qs),aJ=j3.right,lJ=j3.left;var W3=Array.prototype,dJ=W3.slice,uJ=W3.map;var CDe=Math.sqrt(50),SDe=Math.sqrt(10),MDe=Math.sqrt(2);var _J=Array.prototype.slice;var vJ={value:function(){}};function Z3(){for(var i=0,e=arguments.length,t={},n;i=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}Ry.prototype=Z3.prototype={constructor:Ry,on:function(i,e){var t=this._,n=bJ(i+"",t),r,o=-1,s=n.length;if(arguments.length<2){for(;++o0)for(var t=new Array(r),n=0,r,o;n=0&&(e=i.slice(0,t))!=="xmlns"&&(i=i.slice(t+1)),ET.hasOwnProperty(e)?{space:ET[e],local:i}:i}function xJ(i){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===Ay&&e.documentElement.namespaceURI===Ay?e.createElement(i):e.createElementNS(t,i)}}function wJ(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function Ny(i){var e=Ua(i);return(e.local?wJ:xJ)(e)}function CJ(){}function wd(i){return i==null?CJ:function(){return this.querySelector(i)}}function Q3(i){typeof i!="function"&&(i=wd(i));for(var e=this._groups,t=e.length,n=new Array(t),r=0;r=x&&(x=_+1);!(T=b[x])&&++x=0;)(s=n[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function lB(i){i||(i=IJ);function e(u,h){return u&&h?i(u.__data__,h.__data__):!u-!h}for(var t=this._groups,n=t.length,r=new Array(n),o=0;oe?1:i>=e?0:NaN}function cB(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function dB(){var i=new Array(this.size()),e=-1;return this.each(function(){i[++e]=this}),i}function uB(){for(var i=this._groups,e=0,t=i.length;e1?this.each((e==null?NJ:typeof e=="function"?LJ:kJ)(i,e,t??"")):Yl(this.node(),i)}function Yl(i,e){return i.style.getPropertyValue(e)||Ly(i).getComputedStyle(i,null).getPropertyValue(e)}function FJ(i){return function(){delete this[i]}}function BJ(i,e){return function(){this[i]=e}}function VJ(i,e){return function(){var t=e.apply(this,arguments);t==null?delete this[i]:this[i]=t}}function _B(i,e){return arguments.length>1?this.each((e==null?FJ:typeof e=="function"?VJ:BJ)(i,e)):this.node()[i]}function vB(i){return i.trim().split(/^|\s+/)}function IT(i){return i.classList||new bB(i)}function bB(i){this._node=i,this._names=vB(i.getAttribute("class")||"")}bB.prototype={add:function(i){var e=this._names.indexOf(i);e<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var e=this._names.indexOf(i);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function yB(i,e){for(var t=IT(i),n=-1,r=e.length;++n=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function iee(i){return function(){var e=this.__on;if(e){for(var t=0,n=-1,r=e.length,o;t>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?Hy(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?Hy(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=lee.exec(i))?new mo(e[1],e[2],e[3],1):(e=cee.exec(i))?new mo(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=dee.exec(i))?Hy(e[1],e[2],e[3],e[4]):(e=uee.exec(i))?Hy(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=hee.exec(i))?WB(e[1],e[2]/100,e[3]/100,1):(e=pee.exec(i))?WB(e[1],e[2]/100,e[3]/100,e[4]):VB.hasOwnProperty(i)?HB(VB[i]):i==="transparent"?new mo(NaN,NaN,NaN,0):null}function HB(i){return new mo(i>>16&255,i>>8&255,i&255,1)}function Hy(i,e,t,n){return n<=0&&(i=e=t=NaN),new mo(i,e,t,n)}function mee(i){return i instanceof Zm||(i=gs(i)),i?(i=i.rgb(),new mo(i.r,i.g,i.b,i.opacity)):new mo}function Hh(i,e,t,n){return arguments.length===1?mee(i):new mo(i,e,t,n??1)}function mo(i,e,t,n){this.r=+i,this.g=+e,this.b=+t,this.opacity=+n}Uy(mo,Hh,RT(Zm,{brighter:function(i){return i=i==null?Gy:Math.pow(Gy,i),new mo(this.r*i,this.g*i,this.b*i,this.opacity)},darker:function(i){return i=i==null?Ym:Math.pow(Ym,i),new mo(this.r*i,this.g*i,this.b*i,this.opacity)},rgb:function(){return this},displayable:function(){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:GB,formatHex:GB,formatRgb:jB,toString:jB}));function GB(){return"#"+AT(this.r)+AT(this.g)+AT(this.b)}function jB(){var i=this.opacity;return i=isNaN(i)?1:Math.max(0,Math.min(1,i)),(i===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(i===1?")":", "+i+")")}function AT(i){return i=Math.max(0,Math.min(255,Math.round(i)||0)),(i<16?"0":"")+i.toString(16)}function WB(i,e,t,n){return n<=0?i=e=t=NaN:t<=0||t>=1?i=e=NaN:e<=0&&(i=NaN),new Ys(i,e,t,n)}function $B(i){if(i instanceof Ys)return new Ys(i.h,i.s,i.l,i.opacity);if(i instanceof Zm||(i=gs(i)),!i)return new Ys;if(i instanceof Ys)return i;i=i.rgb();var e=i.r/255,t=i.g/255,n=i.b/255,r=Math.min(e,t,n),o=Math.max(e,t,n),s=NaN,a=o-r,l=(o+r)/2;return a?(e===o?s=(t-n)/a+(t0&&l<1?0:s,new Ys(s,a,l,i.opacity)}function qB(i,e,t,n){return arguments.length===1?$B(i):new Ys(i,e,t,n??1)}function Ys(i,e,t,n){this.h=+i,this.s=+e,this.l=+t,this.opacity=+n}Uy(Ys,qB,RT(Zm,{brighter:function(i){return i=i==null?Gy:Math.pow(Gy,i),new Ys(this.h,this.s,this.l*i,this.opacity)},darker:function(i){return i=i==null?Ym:Math.pow(Ym,i),new Ys(this.h,this.s,this.l*i,this.opacity)},rgb:function(){var i=this.h%360+(this.h<0)*360,e=isNaN(i)||isNaN(this.s)?0:this.s,t=this.l,n=t+(t<.5?t:1-t)*e,r=2*t-n;return new mo(NT(i>=240?i-240:i+120,r,n),NT(i,r,n),NT(i<120?i+240:i-120,r,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var i=this.opacity;return i=isNaN(i)?1:Math.max(0,Math.min(1,i)),(i===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(i===1?")":", "+i+")")}}));function NT(i,e,t){return(i<60?e+(t-e)*i/60:i<180?t:i<240?e+(t-e)*(240-i)/60:e)*255}function kT(i,e,t,n,r){var o=i*i,s=o*i;return((1-3*i+3*o-s)*e+(4-6*o+3*s)*t+(1+3*i+3*o-3*s)*n+s*r)/6}function YB(i){var e=i.length-1;return function(t){var n=t<=0?t=0:t>=1?(t=1,e-1):Math.floor(t*e),r=i[n],o=i[n+1],s=n>0?i[n-1]:2*r-o,a=nt&&(o=e.slice(t,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Br(n,r)})),t=LT.lastIndex;return t180?d+=360:d-c>180&&(c+=360),h.push({i:u.push(r(u)+"rotate(",null,n)-2,x:Br(c,d)})):d&&u.push(r(u)+"rotate("+d+n)}function a(c,d,u,h){c!==d?h.push({i:u.push(r(u)+"skewX(",null,n)-2,x:Br(c,d)}):d&&u.push(r(u)+"skewX("+d+n)}function l(c,d,u,h,p,f){if(c!==u||d!==h){var m=p.push(r(p)+"scale(",null,",",null,")");f.push({i:m-4,x:Br(c,u)},{i:m-2,x:Br(d,h)})}else(u!==1||h!==1)&&p.push(r(p)+"scale("+u+","+h+")")}return function(c,d){var u=[],h=[];return c=i(c),d=i(d),o(c.translateX,c.translateY,d.translateX,d.translateY,u,h),s(c.rotate,d.rotate,u,h),a(c.skewX,d.skewX,u,h),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,u,h),c=d=null,function(p){for(var f=-1,m=h.length,b;++f=0&&i._call.call(null,e),i=i._next;--Gh}function dV(){Md=(Yy=rg.now())+Xy,Gh=ng=0;try{pV()}finally{Gh=0,Iee(),Md=0}}function Eee(){var i=rg.now(),e=i-Yy;e>uV&&(Xy-=e,Yy=i)}function Iee(){for(var i,e=qy,t,n=1/0;e;)e._call?(n>e._time&&(n=e._time),i=e,e=e._next):(t=e._next,e._next=null,e=i?i._next=t:qy=t);ig=i,jT(n)}function jT(i){if(!Gh){ng&&(ng=clearTimeout(ng));var e=i-Md;e>24?(i<1/0&&(ng=setTimeout(dV,i-rg.now()-Xy)),tg&&(tg=clearInterval(tg))):(tg||(Yy=rg.now(),tg=setInterval(Eee,uV)),Gh=1,hV(dV))}}function Qy(i,e,t){var n=new og;return e=e==null?0:+e,n.restart(function(r){n.stop(),i(r+e)},e,t),n}var Tee=jm("start","end","cancel","interrupt"),Dee=[],mV=0,WT=1,Jy=2,Ky=3,fV=4,ex=5,sg=6;function Xl(i,e,t,n,r,o){var s=i.__transition;if(!s)i.__transition={};else if(t in s)return;Pee(i,t,{name:e,index:n,group:r,on:Tee,tween:Dee,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:mV})}function ag(i,e){var t=Li(i,e);if(t.state>mV)throw new Error("too late; already scheduled");return t}function Vr(i,e){var t=Li(i,e);if(t.state>Ky)throw new Error("too late; already running");return t}function Li(i,e){var t=i.__transition;if(!t||!(t=t[e]))throw new Error("transition not found");return t}function Pee(i,e,t){var n=i.__transition,r;n[e]=t,t.timer=Zy(o,0,t.time);function o(c){t.state=WT,t.timer.restart(s,t.delay,t.time),t.delay<=c&&s(c-t.delay)}function s(c){var d,u,h,p;if(t.state!==WT)return l();for(d in n)if(p=n[d],p.name===t.name){if(p.state===Ky)return Qy(s);p.state===fV?(p.state=sg,p.timer.stop(),p.on.call("interrupt",i,i.__data__,p.index,p.group),delete n[d]):+dJy&&n.state=0&&(e=e.slice(0,t)),!e||e==="start"})}function Xee(i,e,t){var n,r,o=Yee(e)?ag:Vr;return function(){var s=o(this,i),a=s.on;a!==n&&(r=(n=a).copy()).on(e,t),s.on=r}}function MV(i,e){var t=this._id;return arguments.length<2?Li(this.node(),t).on.on(i):this.each(Xee(t,i,e))}function Zee(i){return function(){var e=this.parentNode;for(var t in this.__transition)if(+t!==i)return;e&&e.removeChild(this)}}function EV(){return this.on("end.remove",Zee(this._id))}function IV(i){var e=this._name,t=this._id;typeof i!="function"&&(i=wd(i));for(var n=this._groups,r=n.length,o=new Array(r),s=0;sEd)if(!(Math.abs(d*a-l*c)>Ed)||!r)this._+="L"+(this._x1=i)+","+(this._y1=e);else{var h=t-o,p=n-s,f=a*a+l*l,m=h*h+p*p,b=Math.sqrt(f),g=Math.sqrt(u),_=r*Math.tan((ZT-Math.acos((f+u-m)/(2*b*g)))/2),x=_/g,C=_/b;Math.abs(x-1)>Ed&&(this._+="L"+(i+x*c)+","+(e+x*d)),this._+="A"+r+","+r+",0,0,"+ +(d*h>c*p)+","+(this._x1=i+C*a)+","+(this._y1=e+C*l)}},arc:function(i,e,t,n,r,o){i=+i,e=+e,t=+t,o=!!o;var s=t*Math.cos(n),a=t*Math.sin(n),l=i+s,c=e+a,d=1^o,u=o?n-r:r-n;if(t<0)throw new Error("negative radius: "+t);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Ed||Math.abs(this._y1-c)>Ed)&&(this._+="L"+l+","+c),t&&(u<0&&(u=u%QT+QT),u>mte?this._+="A"+t+","+t+",0,1,"+d+","+(i-s)+","+(e-a)+"A"+t+","+t+",0,1,"+d+","+(this._x1=l)+","+(this._y1=c):u>Ed&&(this._+="A"+t+","+t+",0,"+ +(u>=ZT)+","+d+","+(this._x1=i+t*Math.cos(r))+","+(this._y1=e+t*Math.sin(r))))},rect:function(i,e,t,n){this._+="M"+(this._x0=this._x1=+i)+","+(this._y0=this._y1=+e)+"h"+ +t+"v"+ +n+"h"+-t+"Z"},toString:function(){return this._}};var JT=UV;var go="$";function rx(){}rx.prototype=HV.prototype={constructor:rx,has:function(i){return go+i in this},get:function(i){return this[go+i]},set:function(i,e){return this[go+i]=e,this},remove:function(i){var e=go+i;return e in this&&delete this[e]},clear:function(){for(var i in this)i[0]===go&&delete this[i]},keys:function(){var i=[];for(var e in this)e[0]===go&&i.push(e.slice(1));return i},values:function(){var i=[];for(var e in this)e[0]===go&&i.push(this[e]);return i},entries:function(){var i=[];for(var e in this)e[0]===go&&i.push({key:e.slice(1),value:this[e]});return i},size:function(){var i=0;for(var e in this)e[0]===go&&++i;return i},empty:function(){for(var i in this)if(i[0]===go)return!1;return!0},each:function(i){for(var e in this)e[0]===go&&i(this[e],e.slice(1),this)}};function HV(i,e){var t=new rx;if(i instanceof rx)i.each(function(a,l){t.set(l,a)});else if(Array.isArray(i)){var n=-1,r=i.length,o;if(e==null)for(;++n1);return n+r*a*Math.sqrt(-2*Math.log(s)/s)}}return t.source=i,t}(jo);var xte=function i(e){function t(){var n=eD.source(e).apply(this,arguments);return function(){return Math.exp(n())}}return t.source=i,t}(jo);var tD=function i(e){function t(n){return function(){for(var r=0,o=0;o0)){if(m/=p,p<0){if(m0){if(m>h)return;m>u&&(u=m)}if(m=n-a,!(!p&&m<0)){if(m/=p,p<0){if(m>h)return;m>u&&(u=m)}else if(p>0){if(m0)){if(m/=f,f<0){if(m0){if(m>h)return;m>u&&(u=m)}if(m=r-l,!(!f&&m<0)){if(m/=f,f<0){if(m>h)return;m>u&&(u=m)}else if(f>0){if(m0)&&!(h<1)||(u>0&&(i[0]=[a+u*p,l+u*f]),h<1&&(i[1]=[a+h*p,l+h*f])),!0}}}}}function Lte(i,e,t,n,r){var o=i[1];if(o)return!0;var s=i[0],a=i.left,l=i.right,c=a[0],d=a[1],u=l[0],h=l[1],p=(c+u)/2,f=(d+h)/2,m,b;if(h===d){if(p=n)return;if(c>u){if(!s)s=[p,t];else if(s[1]>=r)return;o=[p,r]}else{if(!s)s=[p,r];else if(s[1]1)if(c>u){if(!s)s=[(t-b)/m,t];else if(s[1]>=r)return;o=[(r-b)/m,r]}else{if(!s)s=[(r-b)/m,r];else if(s[1]=n)return;o=[n,m*n+b]}else{if(!s)s=[n,m*n+b];else if(s[0]Bn||Math.abs(o[0][1]-o[1][1])>Bn))&&delete Ui[r]}function oz(i){return zr[i.index]={site:i,halfedges:[]}}function Fte(i,e){var t=i.site,n=e.left,r=e.right;return t===r&&(r=n,n=t),r?Math.atan2(r[1]-n[1],r[0]-n[0]):(t===n?(n=e[1],r=e[0]):(n=e[0],r=e[1]),Math.atan2(n[0]-r[0],r[1]-n[1]))}function lD(i,e){return e[+(e.left!==i.site)]}function Bte(i,e){return e[+(e.left===i.site)]}function sz(){for(var i=0,e=zr.length,t,n,r,o;iBn||Math.abs(b-p)>Bn)&&(c.splice(l,0,Ui.push(Qh(a,f,Math.abs(m-i)Bn?[i,Math.abs(h-i)Bn?[Math.abs(p-n)Bn?[t,Math.abs(h-t)Bn?[Math.abs(p-e)=-cz)){var p=l*l+c*c,f=d*d+u*u,m=(u*p-c*f)/h,b=(l*f-d*p)/h,g=lz.pop()||new Vte;g.arc=i,g.site=r,g.x=m+s,g.y=(g.cy=b+a)+Math.sqrt(m*m+b*b),i.circle=g;for(var _=null,x=Kh._;x;)if(g.yBn)a=a.L;else if(s=e-Ute(a,t),s>Bn){if(!a.R){n=a;break}a=a.R}else{o>-Bn?(n=a.P,r=a):s>-Bn?(n=a,r=a.N):n=r=a;break}oz(i);var l=dz(i);if(Od.insert(n,l),!(!n&&!r)){if(n===r){Pd(n),r=dz(n.site),Od.insert(l,r),l.edge=r.edge=Zh(n.site,l.site),Dd(n),Dd(r);return}if(!r){l.edge=Zh(n.site,l.site);return}Pd(n),Pd(r);var c=n.site,d=c[0],u=c[1],h=i[0]-d,p=i[1]-u,f=r.site,m=f[0]-d,b=f[1]-u,g=2*(h*b-p*m),_=h*h+p*p,x=m*m+b*b,C=[(b*_-p*x)/g+d,(h*x-m*_)/g+u];mg(r.edge,c,f,C),l.edge=Zh(c,i,null,C),r.edge=Zh(i,f,null,C),Dd(n),Dd(r)}}function fz(i,e){var t=i.site,n=t[0],r=t[1],o=r-e;if(!o)return n;var s=i.P;if(!s)return-1/0;t=s.site;var a=t[0],l=t[1],c=l-e;if(!c)return a;var d=a-n,u=1/o-1/c,h=d/c;return u?(-h+Math.sqrt(h*h-2*u*(d*d/(-2*c)-l+c/2+r-o/2)))/u+n:(n+a)/2}function Ute(i,e){var t=i.N;if(t)return fz(t,e);var n=i.site;return n[1]===e?n[0]:1/0}var Bn=1e-6,cz=1e-12,Od,zr,Kh,Ui;function Hte(i,e,t){return(i[0]-t[0])*(e[1]-i[1])-(i[0]-e[0])*(t[1]-i[1])}function Gte(i,e){return e[1]-i[1]||e[0]-i[0]}function lx(i,e){var t=i.sort(Gte).pop(),n,r,o;for(Ui=[],zr=new Array(i.length),Od=new aD,Kh=new aD;;)if(o=ax,t&&(!o||t[1]=s)return null;var l=i-a.site[0],c=e-a.site[1],d=l*l+c*c;do a=n.cells[r=o],o=null,a.halfedges.forEach(function(u){var h=n.edges[u],p=h.left;if(!((p===a.site||!p)&&!(p=h.right))){var f=i-p[0],m=e-p[1],b=f*f+m*m;bn?(n+r)/2:Math.min(0,n)||Math.max(0,r),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function hD(){var i=jte,e=Wte,t=Yte,n=$te,r=qte,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=GT,c=jm("start","zoom","end"),d,u,h=500,p=150,f=0;function m(O){O.property("__zoom",mz).on("wheel.zoom",D).on("mousedown.zoom",E).on("dblclick.zoom",P).filter(r).on("touchstart.zoom",Y).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",U).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(O,B,j){var q=O.selection?O.selection():O;q.property("__zoom",mz),O!==q?x(O,B,j):q.interrupt().each(function(){C(this,arguments).start().zoom(null,typeof B=="function"?B.apply(this,arguments):B).end()})},m.scaleBy=function(O,B,j){m.scaleTo(O,function(){var q=this.__zoom.k,k=typeof B=="function"?B.apply(this,arguments):B;return q*k},j)},m.scaleTo=function(O,B,j){m.transform(O,function(){var q=e.apply(this,arguments),k=this.__zoom,G=j==null?_(q):typeof j=="function"?j.apply(this,arguments):j,K=k.invert(G),de=typeof B=="function"?B.apply(this,arguments):B;return t(g(b(k,de),G,K),q,s)},j)},m.translateBy=function(O,B,j){m.transform(O,function(){return t(this.__zoom.translate(typeof B=="function"?B.apply(this,arguments):B,typeof j=="function"?j.apply(this,arguments):j),e.apply(this,arguments),s)})},m.translateTo=function(O,B,j,q){m.transform(O,function(){var k=e.apply(this,arguments),G=this.__zoom,K=q==null?_(k):typeof q=="function"?q.apply(this,arguments):q;return t(Rd.translate(K[0],K[1]).scale(G.k).translate(typeof B=="function"?-B.apply(this,arguments):-B,typeof j=="function"?-j.apply(this,arguments):-j),k,s)},q)};function b(O,B){return B=Math.max(o[0],Math.min(o[1],B)),B===O.k?O:new Qs(B,O.x,O.y)}function g(O,B,j){var q=B[0]-j[0]*O.k,k=B[1]-j[1]*O.k;return q===O.x&&k===O.y?O:new Qs(O.k,q,k)}function _(O){return[(+O[0][0]+ +O[1][0])/2,(+O[0][1]+ +O[1][1])/2]}function x(O,B,j){O.on("start.zoom",function(){C(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).end()}).tween("zoom",function(){var q=this,k=arguments,G=C(q,k),K=e.apply(q,k),de=j==null?_(K):typeof j=="function"?j.apply(q,k):j,Te=Math.max(K[1][0]-K[0][0],K[1][1]-K[0][1]),Ee=q.__zoom,He=typeof B=="function"?B.apply(q,k):B,he=l(Ee.invert(de).concat(Te/Ee.k),He.invert(de).concat(Te/He.k));return function(re){if(re===1)re=He;else{var qe=he(re),ue=Te/qe[2];re=new Qs(ue,de[0]-qe[0]*ue,de[1]-qe[1]*ue)}G.zoom(null,re)}})}function C(O,B,j){return!j&&O.__zooming||new T(O,B)}function T(O,B){this.that=O,this.args=B,this.active=0,this.extent=e.apply(O,B),this.taps=0}T.prototype={start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(O,B){return this.mouse&&O!=="mouse"&&(this.mouse[1]=B.invert(this.mouse[0])),this.touch0&&O!=="touch"&&(this.touch0[1]=B.invert(this.touch0[0])),this.touch1&&O!=="touch"&&(this.touch1[1]=B.invert(this.touch1[0])),this.that.__zoom=B,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(O){TT(new dD(m,O,this.that.__zoom),c.apply,c,[O,this.that,this.args])}};function D(){if(!i.apply(this,arguments))return;var O=C(this,arguments),B=this.__zoom,j=Math.max(o[0],Math.min(o[1],B.k*Math.pow(2,n.apply(this,arguments)))),q=zh(this);if(O.wheel)(O.mouse[0][0]!==q[0]||O.mouse[0][1]!==q[1])&&(O.mouse[1]=B.invert(O.mouse[0]=q)),clearTimeout(O.wheel);else{if(B.k===j)return;O.mouse=[q,B.invert(q)],Zl(this),O.start()}Jh(),O.wheel=setTimeout(k,p),O.zoom("mouse",t(g(b(B,j),O.mouse[0],O.mouse[1]),O.extent,s));function k(){O.wheel=null,O.end()}}function E(){if(u||!i.apply(this,arguments))return;var O=C(this,arguments,!0),B=Go(dt.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",K,!0),j=zh(this),q=dt.clientX,k=dt.clientY;PT(dt.view),cx(),O.mouse=[j,this.__zoom.invert(j)],Zl(this),O.start();function G(){if(Jh(),!O.moved){var de=dt.clientX-q,Te=dt.clientY-k;O.moved=de*de+Te*Te>f}O.zoom("mouse",t(g(O.that.__zoom,O.mouse[0]=zh(O.that),O.mouse[1]),O.extent,s))}function K(){B.on("mousemove.zoom mouseup.zoom",null),OT(dt.view,O.moved),Jh(),O.end()}}function P(){if(i.apply(this,arguments)){var O=this.__zoom,B=zh(this),j=O.invert(B),q=O.k*(dt.shiftKey?.5:2),k=t(g(b(O,q),B,j),e.apply(this,arguments),s);Jh(),a>0?Go(this).transition().duration(a).call(x,k,B):Go(this).call(m.transform,k)}}function Y(){if(i.apply(this,arguments)){var O=dt.touches,B=O.length,j=C(this,arguments,dt.changedTouches.length===B),q,k,G,K;for(cx(),k=0;kp4,AddEquation:()=>Ud,AddOperation:()=>c4,AdditiveAnimationBlendMode:()=>qP,AdditiveBlending:()=>ZD,AlphaFormat:()=>x4,AlwaysDepth:()=>n4,AlwaysStencilFunc:()=>mH,AmbientLight:()=>O_,AmbientLightProbe:()=>Aw,AnimationClip:()=>au,AnimationLoader:()=>vP,AnimationMixer:()=>Bw,AnimationObjectGroup:()=>Fw,AnimationUtils:()=>Qn,ArcCurve:()=>t_,ArrayCamera:()=>Wg,ArrowHelper:()=>BP,Audio:()=>k_,AudioAnalyser:()=>kw,AudioContext:()=>nO,AudioListener:()=>wP,AudioLoader:()=>Ow,AxesHelper:()=>$w,AxisHelper:()=>Ale,BackSide:()=>bi,BasicDepthPacking:()=>hH,BasicShadowMap:()=>Kte,BinaryTextureLoader:()=>Ble,Bone:()=>Up,BooleanKeyframeTrack:()=>ol,BoundingBoxHelper:()=>Nle,Box2:()=>mc,Box3:()=>Ur,Box3Helper:()=>LP,BoxBufferGeometry:()=>lc,BoxGeometry:()=>lc,BoxHelper:()=>Ww,BufferAttribute:()=>un,BufferGeometry:()=>It,BufferGeometryLoader:()=>Dw,ByteType:()=>m4,Cache:()=>lu,Camera:()=>Qd,CameraHelper:()=>kP,CanvasRenderer:()=>zle,CanvasTexture:()=>mw,CatmullRomCurve3:()=>n_,CineonToneMapping:()=>h4,CircleBufferGeometry:()=>Qg,CircleGeometry:()=>Qg,ClampToEdgeWrapping:()=>ir,Clock:()=>Nw,Color:()=>je,ColorKeyframeTrack:()=>S_,CompressedTexture:()=>Zg,CompressedTextureLoader:()=>bP,ConeBufferGeometry:()=>Kg,ConeGeometry:()=>Kg,CubeCamera:()=>Op,CubeReflectionMapping:()=>uu,CubeRefractionMapping:()=>hu,CubeTexture:()=>cc,CubeTextureLoader:()=>ww,CubeUVReflectionMapping:()=>Qp,CubeUVRefractionMapping:()=>F_,CubicBezierCurve:()=>Hp,CubicBezierCurve3:()=>i_,CubicInterpolant:()=>bw,CullFaceBack:()=>XD,CullFaceFront:()=>UU,CullFaceFrontBack:()=>Qte,CullFaceNone:()=>zU,Curve:()=>Gr,CurvePath:()=>vw,CustomBlending:()=>GU,CustomToneMapping:()=>f4,CylinderBufferGeometry:()=>tu,CylinderGeometry:()=>tu,Cylindrical:()=>DP,DataTexture:()=>Qa,DataTexture2DArray:()=>Np,DataTexture3D:()=>jg,DataTextureLoader:()=>Cw,DataUtils:()=>zP,DecrementStencilOp:()=>cne,DecrementWrapStencilOp:()=>une,DefaultLoadingManager:()=>LH,DepthFormat:()=>$d,DepthStencilFormat:()=>Mp,DepthTexture:()=>gw,DirectionalLight:()=>P_,DirectionalLightHelper:()=>NP,DiscreteInterpolant:()=>yw,DodecahedronBufferGeometry:()=>Jg,DodecahedronGeometry:()=>Jg,DoubleSide:()=>Xd,DstAlphaFactor:()=>ZU,DstColorFactor:()=>KU,DynamicBufferAttribute:()=>Cle,DynamicCopyUsage:()=>Mne,DynamicDrawUsage:()=>Ip,DynamicReadUsage:()=>wne,EdgesGeometry:()=>e_,EdgesHelper:()=>kle,EllipseCurve:()=>nu,EqualDepth:()=>r4,EqualStencilFunc:()=>mne,EquirectangularReflectionMapping:()=>Ag,EquirectangularRefractionMapping:()=>Ng,Euler:()=>Zd,EventDispatcher:()=>ta,ExtrudeBufferGeometry:()=>rl,ExtrudeGeometry:()=>rl,FaceColors:()=>hle,FileLoader:()=>Yo,FlatShading:()=>GP,Float16BufferAttribute:()=>lw,Float32Attribute:()=>Ole,Float32BufferAttribute:()=>tt,Float64Attribute:()=>Rle,Float64BufferAttribute:()=>cw,FloatType:()=>Js,Fog:()=>qg,FogExp2:()=>$g,Font:()=>qle,FontLoader:()=>$le,FrontSide:()=>Yd,Frustum:()=>Kd,GLBufferAttribute:()=>Uw,GLSL1:()=>Ine,GLSL3:()=>uP,GammaEncoding:()=>Xw,GreaterDepth:()=>s4,GreaterEqualDepth:()=>o4,GreaterEqualStencilFunc:()=>bne,GreaterStencilFunc:()=>_ne,GridHelper:()=>jw,Group:()=>Xa,HalfFloatType:()=>jd,HemisphereLight:()=>E_,HemisphereLightHelper:()=>RP,HemisphereLightProbe:()=>Rw,IcosahedronBufferGeometry:()=>a_,IcosahedronGeometry:()=>a_,ImageBitmapLoader:()=>Pw,ImageLoader:()=>cu,ImageUtils:()=>Ja,ImmediateRenderObject:()=>Yle,IncrementStencilOp:()=>lne,IncrementWrapStencilOp:()=>dne,InstancedBufferAttribute:()=>tl,InstancedBufferGeometry:()=>N_,InstancedInterleavedBuffer:()=>zw,InstancedMesh:()=>Yg,Int16Attribute:()=>Ile,Int16BufferAttribute:()=>sw,Int32Attribute:()=>Dle,Int32BufferAttribute:()=>aw,Int8Attribute:()=>Sle,Int8BufferAttribute:()=>iw,IntType:()=>_4,InterleavedBuffer:()=>el,InterleavedBufferAttribute:()=>hc,Interpolant:()=>Ss,InterpolateDiscrete:()=>Bg,InterpolateLinear:()=>Vg,InterpolateSmooth:()=>Qx,InvertStencilOp:()=>hne,JSONLoader:()=>Ule,KeepStencilOp:()=>Kx,KeyframeTrack:()=>xo,LOD:()=>hw,LatheBufferGeometry:()=>l_,LatheGeometry:()=>l_,Layers:()=>Gg,LensFlare:()=>Gle,LessDepth:()=>i4,LessEqualDepth:()=>Jx,LessEqualStencilFunc:()=>gne,LessStencilFunc:()=>fne,Light:()=>wo,LightProbe:()=>du,Line:()=>Cs,Line3:()=>Hw,LineBasicMaterial:()=>Ti,LineCurve:()=>iu,LineCurve3:()=>_w,LineDashedMaterial:()=>w_,LineLoop:()=>Xg,LinePieces:()=>dle,LineSegments:()=>xr,LineStrip:()=>cle,LinearEncoding:()=>sr,LinearFilter:()=>Fi,LinearInterpolant:()=>C_,LinearMipMapLinearFilter:()=>ine,LinearMipMapNearestFilter:()=>nne,LinearMipmapLinearFilter:()=>pu,LinearMipmapNearestFilter:()=>$P,LinearToneMapping:()=>d4,Loader:()=>ar,LoaderUtils:()=>Zp,LoadingManager:()=>M_,LogLuvEncoding:()=>uH,LoopOnce:()=>aH,LoopPingPong:()=>cH,LoopRepeat:()=>lH,LuminanceAlphaFormat:()=>C4,LuminanceFormat:()=>w4,MOUSE:()=>Xte,Material:()=>Ii,MaterialLoader:()=>Tw,Math:()=>Hne,MathUtils:()=>Hne,Matrix3:()=>yi,Matrix4:()=>lt,MaxEquation:()=>eP,Mesh:()=>di,MeshBasicMaterial:()=>xs,MeshDepthMaterial:()=>kp,MeshDistanceMaterial:()=>Lp,MeshFaceMaterial:()=>fle,MeshLambertMaterial:()=>y_,MeshMatcapMaterial:()=>x_,MeshNormalMaterial:()=>b_,MeshPhongMaterial:()=>__,MeshPhysicalMaterial:()=>g_,MeshStandardMaterial:()=>Xp,MeshToonMaterial:()=>v_,MinEquation:()=>JD,MirroredRepeatWrapping:()=>Lg,MixOperation:()=>l4,MultiMaterial:()=>mle,MultiplyBlending:()=>KD,MultiplyOperation:()=>L_,NearestFilter:()=>Ei,NearestMipMapLinearFilter:()=>tne,NearestMipMapNearestFilter:()=>ene,NearestMipmapLinearFilter:()=>tw,NearestMipmapNearestFilter:()=>ew,NeverDepth:()=>t4,NeverStencilFunc:()=>pne,NoBlending:()=>Za,NoColors:()=>ule,NoToneMapping:()=>oc,NormalAnimationBlendMode:()=>Yw,NormalBlending:()=>wp,NotEqualDepth:()=>a4,NotEqualStencilFunc:()=>vne,NumberKeyframeTrack:()=>ou,Object3D:()=>hn,ObjectLoader:()=>yP,ObjectSpaceNormalMap:()=>fH,OctahedronBufferGeometry:()=>$p,OctahedronGeometry:()=>$p,OneFactor:()=>qU,OneMinusDstAlphaFactor:()=>QU,OneMinusDstColorFactor:()=>JU,OneMinusSrcAlphaFactor:()=>WP,OneMinusSrcColorFactor:()=>XU,OrthographicCamera:()=>Jd,PCFShadowMap:()=>HP,PCFSoftShadowMap:()=>HU,PMREMGenerator:()=>dw,ParametricGeometry:()=>jle,Particle:()=>_le,ParticleBasicMaterial:()=>yle,ParticleSystem:()=>vle,ParticleSystemMaterial:()=>xle,Path:()=>ru,PerspectiveCamera:()=>Mi,Plane:()=>$o,PlaneBufferGeometry:()=>Ap,PlaneGeometry:()=>Ap,PlaneHelper:()=>FP,PointCloud:()=>gle,PointCloudMaterial:()=>ble,PointLight:()=>D_,PointLightHelper:()=>OP,Points:()=>eu,PointsMaterial:()=>nl,PolarGridHelper:()=>AP,PolyhedronBufferGeometry:()=>il,PolyhedronGeometry:()=>il,PositionalAudio:()=>CP,PropertyBinding:()=>jn,PropertyMixer:()=>Lw,QuadraticBezierCurve:()=>Gp,QuadraticBezierCurve3:()=>jp,Quaternion:()=>Bi,QuaternionKeyframeTrack:()=>fc,QuaternionLinearInterpolant:()=>xw,REVISION:()=>UP,RGBADepthPacking:()=>pH,RGBAFormat:()=>rr,RGBAIntegerFormat:()=>P4,RGBA_ASTC_10x10_Format:()=>G4,RGBA_ASTC_10x5_Format:()=>z4,RGBA_ASTC_10x6_Format:()=>U4,RGBA_ASTC_10x8_Format:()=>H4,RGBA_ASTC_12x10_Format:()=>j4,RGBA_ASTC_12x12_Format:()=>W4,RGBA_ASTC_4x4_Format:()=>R4,RGBA_ASTC_5x4_Format:()=>A4,RGBA_ASTC_5x5_Format:()=>N4,RGBA_ASTC_6x5_Format:()=>k4,RGBA_ASTC_6x6_Format:()=>L4,RGBA_ASTC_8x5_Format:()=>F4,RGBA_ASTC_8x6_Format:()=>B4,RGBA_ASTC_8x8_Format:()=>V4,RGBA_BPTC_Format:()=>$4,RGBA_ETC2_EAC_Format:()=>dP,RGBA_PVRTC_2BPPV1_Format:()=>lP,RGBA_PVRTC_4BPPV1_Format:()=>aP,RGBA_S3TC_DXT1_Format:()=>nP,RGBA_S3TC_DXT3_Format:()=>iP,RGBA_S3TC_DXT5_Format:()=>rP,RGBDEncoding:()=>ZP,RGBEEncoding:()=>Zw,RGBEFormat:()=>S4,RGBFormat:()=>Wd,RGBIntegerFormat:()=>D4,RGBM16Encoding:()=>XP,RGBM7Encoding:()=>YP,RGB_ETC1_Format:()=>O4,RGB_ETC2_Format:()=>cP,RGB_PVRTC_2BPPV1_Format:()=>sP,RGB_PVRTC_4BPPV1_Format:()=>oP,RGB_S3TC_DXT1_Format:()=>tP,RGFormat:()=>I4,RGIntegerFormat:()=>T4,RawShaderMaterial:()=>dc,Ray:()=>ia,Raycaster:()=>EP,RectAreaLight:()=>R_,RedFormat:()=>M4,RedIntegerFormat:()=>E4,ReinhardToneMapping:()=>u4,RepeatWrapping:()=>kg,ReplaceStencilOp:()=>ane,ReverseSubtractEquation:()=>WU,RingBufferGeometry:()=>c_,RingGeometry:()=>c_,SRGB8_ALPHA8_ASTC_10x10_Format:()=>rH,SRGB8_ALPHA8_ASTC_10x5_Format:()=>tH,SRGB8_ALPHA8_ASTC_10x6_Format:()=>nH,SRGB8_ALPHA8_ASTC_10x8_Format:()=>iH,SRGB8_ALPHA8_ASTC_12x10_Format:()=>oH,SRGB8_ALPHA8_ASTC_12x12_Format:()=>sH,SRGB8_ALPHA8_ASTC_4x4_Format:()=>q4,SRGB8_ALPHA8_ASTC_5x4_Format:()=>Y4,SRGB8_ALPHA8_ASTC_5x5_Format:()=>X4,SRGB8_ALPHA8_ASTC_6x5_Format:()=>Z4,SRGB8_ALPHA8_ASTC_6x6_Format:()=>Q4,SRGB8_ALPHA8_ASTC_8x5_Format:()=>K4,SRGB8_ALPHA8_ASTC_8x6_Format:()=>J4,SRGB8_ALPHA8_ASTC_8x8_Format:()=>eH,Scene:()=>Fp,SceneUtils:()=>Hle,ShaderChunk:()=>rn,ShaderLib:()=>ys,ShaderMaterial:()=>ws,ShadowMaterial:()=>m_,Shape:()=>qo,ShapeBufferGeometry:()=>qp,ShapeGeometry:()=>qp,ShapePath:()=>VP,ShapeUtils:()=>ea,ShortType:()=>g4,Skeleton:()=>pw,SkeletonHelper:()=>Gw,SkinnedMesh:()=>zp,SmoothShading:()=>Jte,Sphere:()=>na,SphereBufferGeometry:()=>Yp,SphereGeometry:()=>Yp,Spherical:()=>TP,SphericalHarmonics3:()=>A_,SplineCurve:()=>Wp,SpotLight:()=>T_,SpotLightHelper:()=>PP,Sprite:()=>Vp,SpriteMaterial:()=>Bp,SrcAlphaFactor:()=>jP,SrcAlphaSaturateFactor:()=>e4,SrcColorFactor:()=>YU,StaticCopyUsage:()=>Sne,StaticDrawUsage:()=>Ep,StaticReadUsage:()=>xne,StereoCamera:()=>xP,StreamCopyUsage:()=>Ene,StreamDrawUsage:()=>yne,StreamReadUsage:()=>Cne,StringKeyframeTrack:()=>sl,SubtractEquation:()=>jU,SubtractiveBlending:()=>QD,TOUCH:()=>Zte,TangentSpaceNormalMap:()=>fu,TetrahedronBufferGeometry:()=>d_,TetrahedronGeometry:()=>d_,TextGeometry:()=>Wle,Texture:()=>Gi,TextureLoader:()=>Sw,TorusBufferGeometry:()=>u_,TorusGeometry:()=>u_,TorusKnotBufferGeometry:()=>h_,TorusKnotGeometry:()=>h_,Triangle:()=>or,TriangleFanDrawMode:()=>one,TriangleStripDrawMode:()=>rne,TrianglesDrawMode:()=>dH,TubeBufferGeometry:()=>p_,TubeGeometry:()=>p_,UVMapping:()=>qw,Uint16Attribute:()=>Tle,Uint16BufferAttribute:()=>Tp,Uint32Attribute:()=>Ple,Uint32BufferAttribute:()=>Dp,Uint8Attribute:()=>Mle,Uint8BufferAttribute:()=>rw,Uint8ClampedAttribute:()=>Ele,Uint8ClampedBufferAttribute:()=>ow,Uniform:()=>Vw,UniformsLib:()=>Ue,UniformsUtils:()=>bH,UnsignedByteType:()=>Ka,UnsignedInt248Type:()=>Cp,UnsignedIntType:()=>Tg,UnsignedShort4444Type:()=>v4,UnsignedShort5551Type:()=>b4,UnsignedShort565Type:()=>y4,UnsignedShortType:()=>Fg,VSMShadowMap:()=>bp,Vector2:()=>xe,Vector3:()=>R,Vector4:()=>Cn,VectorKeyframeTrack:()=>su,Vertex:()=>wle,VertexColors:()=>ple,VideoTexture:()=>fw,WebGL1Renderer:()=>uw,WebGLCubeRenderTarget:()=>Rp,WebGLMultipleRenderTargets:()=>nw,WebGLMultisampleRenderTarget:()=>Hg,WebGLRenderTarget:()=>yo,WebGLRenderTargetCube:()=>Vle,WebGLRenderer:()=>An,WebGLUtils:()=>OH,WireframeGeometry:()=>f_,WireframeHelper:()=>Lle,WrapAroundEnding:()=>zg,XHRLoader:()=>Fle,ZeroCurvatureEnding:()=>Hd,ZeroFactor:()=>$U,ZeroSlopeEnding:()=>Gd,ZeroStencilOp:()=>sne,sRGBEncoding:()=>gc});var UP="134",Xte={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Zte={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},zU=0,XD=1,UU=2,Qte=3,Kte=0,HP=1,HU=2,bp=3,Yd=0,bi=1,Xd=2,GP=1,Jte=2,Za=0,wp=1,ZD=2,QD=3,KD=4,GU=5,Ud=100,jU=101,WU=102,JD=103,eP=104,$U=200,qU=201,YU=202,XU=203,jP=204,WP=205,ZU=206,QU=207,KU=208,JU=209,e4=210,t4=0,n4=1,i4=2,Jx=3,r4=4,o4=5,s4=6,a4=7,L_=0,l4=1,c4=2,oc=0,d4=1,u4=2,h4=3,p4=4,f4=5,qw=300,uu=301,hu=302,Ag=303,Ng=304,Qp=306,F_=307,kg=1e3,ir=1001,Lg=1002,Ei=1003,ew=1004,ene=1004,tw=1005,tne=1005,Fi=1006,$P=1007,nne=1007,pu=1008,ine=1008,Ka=1009,m4=1010,g4=1011,Fg=1012,_4=1013,Tg=1014,Js=1015,jd=1016,v4=1017,b4=1018,y4=1019,Cp=1020,x4=1021,Wd=1022,rr=1023,w4=1024,C4=1025,S4=rr,$d=1026,Mp=1027,M4=1028,E4=1029,I4=1030,T4=1031,D4=1032,P4=1033,tP=33776,nP=33777,iP=33778,rP=33779,oP=35840,sP=35841,aP=35842,lP=35843,O4=36196,cP=37492,dP=37496,R4=37808,A4=37809,N4=37810,k4=37811,L4=37812,F4=37813,B4=37814,V4=37815,z4=37816,U4=37817,H4=37818,G4=37819,j4=37820,W4=37821,$4=36492,q4=37840,Y4=37841,X4=37842,Z4=37843,Q4=37844,K4=37845,J4=37846,eH=37847,tH=37848,nH=37849,iH=37850,rH=37851,oH=37852,sH=37853,aH=2200,lH=2201,cH=2202,Bg=2300,Vg=2301,Qx=2302,Hd=2400,Gd=2401,zg=2402,Yw=2500,qP=2501,dH=0,rne=1,one=2,sr=3e3,gc=3001,Xw=3007,Zw=3002,uH=3003,YP=3004,XP=3005,ZP=3006,hH=3200,pH=3201,fu=0,fH=1,sne=0,Kx=7680,ane=7681,lne=7682,cne=7683,dne=34055,une=34056,hne=5386,pne=512,fne=513,mne=514,gne=515,_ne=516,vne=517,bne=518,mH=519,Ep=35044,Ip=35048,yne=35040,xne=35045,wne=35049,Cne=35041,Sne=35046,Mne=35050,Ene=35042,Ine="100",uP="300 es",ta=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let r=this._listeners[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let n=this._listeners[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,s=r.length;o>8&255]+tr[i>>16&255]+tr[i>>24&255]+"-"+tr[e&255]+tr[e>>8&255]+"-"+tr[e>>16&15|64]+tr[e>>24&255]+"-"+tr[t&63|128]+tr[t>>8&255]+"-"+tr[t>>16&255]+tr[t>>24&255]+tr[n&255]+tr[n>>8&255]+tr[n>>16&255]+tr[n>>24&255]).toUpperCase()}function nr(i,e,t){return Math.max(e,Math.min(t,i))}function QP(i,e){return(i%e+e)%e}function Dne(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function Pne(i,e,t){return i!==e?(t-i)/(e-i):0}function Dg(i,e,t){return(1-t)*i+t*e}function One(i,e,t,n){return Dg(i,e,1-Math.exp(-t*n))}function Rne(i,e=1){return e-Math.abs(QP(i,e*2)-e)}function Ane(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function Nne(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function kne(i,e){return i+Math.floor(Math.random()*(e-i+1))}function Lne(i,e){return i+Math.random()*(e-i)}function Fne(i){return i*(.5-Math.random())}function Bne(i){return i!==void 0&&(dx=i%2147483647),dx=dx*16807%2147483647,(dx-1)/2147483646}function Vne(i){return i*qd}function zne(i){return i*Ug}function hP(i){return(i&i-1)===0&&i!==0}function gH(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function _H(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function Une(i,e,t,n,r){let o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),c=o((e+n)/2),d=s((e+n)/2),u=o((e-n)/2),h=s((e-n)/2),p=o((n-e)/2),f=s((n-e)/2);switch(r){case"XYX":i.set(a*d,l*u,l*h,a*c);break;case"YZY":i.set(l*h,a*d,l*u,a*c);break;case"ZXZ":i.set(l*u,l*h,a*d,a*c);break;case"XZX":i.set(a*d,l*f,l*p,a*c);break;case"YXY":i.set(l*p,a*d,l*f,a*c);break;case"ZYZ":i.set(l*f,l*p,a*d,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}var Hne=Object.freeze({__proto__:null,DEG2RAD:qd,RAD2DEG:Ug,generateUUID:bo,clamp:nr,euclideanModulo:QP,mapLinear:Dne,inverseLerp:Pne,lerp:Dg,damp:One,pingpong:Rne,smoothstep:Ane,smootherstep:Nne,randInt:kne,randFloat:Lne,randFloatSpread:Fne,seededRandom:Bne,degToRad:Vne,radToDeg:zne,isPowerOfTwo:hP,ceilPowerOfTwo:gH,floorPowerOfTwo:_H,setQuaternionFromProperEuler:Une}),xe=class{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*n-s*r+e.x,this.y=o*r+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};xe.prototype.isVector2=!0;var yi=class{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,o,s,a,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=o,d[5]=l,d[6]=n,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[3],l=n[6],c=n[1],d=n[4],u=n[7],h=n[2],p=n[5],f=n[8],m=r[0],b=r[3],g=r[6],_=r[1],x=r[4],C=r[7],T=r[2],D=r[5],E=r[8];return o[0]=s*m+a*_+l*T,o[3]=s*b+a*x+l*D,o[6]=s*g+a*C+l*E,o[1]=c*m+d*_+u*T,o[4]=c*b+d*x+u*D,o[7]=c*g+d*C+u*E,o[2]=h*m+p*_+f*T,o[5]=h*b+p*x+f*D,o[8]=h*g+p*C+f*E,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*s*d-t*a*c-n*o*d+n*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=d*s-a*c,h=a*l-d*o,p=c*o-s*l,f=t*u+n*h+r*p;if(f===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/f;return e[0]=u*m,e[1]=(r*c-d*n)*m,e[2]=(a*n-r*s)*m,e[3]=h*m,e[4]=(d*t-r*l)*m,e[5]=(r*o-a*t)*m,e[6]=p*m,e[7]=(n*l-c*t)*m,e[8]=(s*t-n*o)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*s+c*a)+s+e,-r*c,r*l,-r*(-c*s+l*a)+a+t,0,0,1),this}scale(e,t){let n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){let t=Math.cos(e),n=Math.sin(e),r=this.elements,o=r[0],s=r[3],a=r[6],l=r[1],c=r[4],d=r[7];return r[0]=t*o+n*l,r[3]=t*s+n*c,r[6]=t*a+n*d,r[1]=-n*o+t*l,r[4]=-n*s+t*c,r[7]=-n*a+t*d,this}translate(e,t){let n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}};yi.prototype.isMatrix3=!0;function vH(i){if(i.length===0)return-1/0;let e=i[0];for(let t=1,n=i.length;te&&(e=i[t]);return e}var Gne={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function yp(i,e){return new Gne[i](e)}function Qw(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function gz(i,e=0){let t=3735928559^e,n=1103547991^e;for(let r=0,o;r>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&n)+(t>>>0)}var ep,Ja=class{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{ep===void 0&&(ep=Qw("canvas")),ep.width=e.width,ep.height=e.height;let n=ep.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=ep}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}},jne=0,Gi=class i extends ta{constructor(e=i.DEFAULT_IMAGE,t=i.DEFAULT_MAPPING,n=ir,r=ir,o=Fi,s=pu,a=rr,l=Ka,c=1,d=sr){super(),Object.defineProperty(this,"id",{value:jne++}),this.uuid=bo(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=o,this.minFilter=s,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new yi,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=d,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(this.image!==void 0){let r=this.image;if(r.uuid===void 0&&(r.uuid=bo()),!t&&e.images[r.uuid]===void 0){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s1)switch(this.wrapS){case kg:e.x=e.x-Math.floor(e.x);break;case ir:e.x=e.x<0?0:1;break;case Lg:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case kg:e.y=e.y-Math.floor(e.y);break;case ir:e.y=e.y<0?0:1;break;case Lg:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&this.version++}};Gi.DEFAULT_IMAGE=void 0;Gi.DEFAULT_MAPPING=qw;Gi.prototype.isTexture=!0;function fD(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?Ja.getDataURL(i):i.data?{data:Array.prototype.slice.call(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var Cn=class{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*n+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*n+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*n+s[11]*r+s[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],h=l[1],p=l[5],f=l[9],m=l[2],b=l[6],g=l[10];if(Math.abs(d-h)<.01&&Math.abs(u-m)<.01&&Math.abs(f-b)<.01){if(Math.abs(d+h)<.1&&Math.abs(u+m)<.1&&Math.abs(f+b)<.1&&Math.abs(c+p+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let x=(c+1)/2,C=(p+1)/2,T=(g+1)/2,D=(d+h)/4,E=(u+m)/4,P=(f+b)/4;return x>C&&x>T?x<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(x),r=D/n,o=E/n):C>T?C<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(C),n=D/r,o=P/r):T<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(T),n=E/o,r=P/o),this.set(n,r,o,t),this}let _=Math.sqrt((b-f)*(b-f)+(u-m)*(u-m)+(h-d)*(h-d));return Math.abs(_)<.001&&(_=1),this.x=(b-f)/_,this.y=(u-m)/_,this.z=(h-d)/_,this.w=Math.acos((c+p+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};Cn.prototype.isVector4=!0;var yo=class extends ta{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new Cn(0,0,e,t),this.scissorTest=!1,this.viewport=new Cn(0,0,e,t),this.texture=new Gi(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:e,height:t,depth:1},this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Fi,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,t,n=1){(this.width!==e||this.height!==t||this.depth!==n)&&(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image=Z({},this.texture.image),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}};yo.prototype.isWebGLRenderTarget=!0;var nw=class extends yo{constructor(e,t,n){super(e,t);let r=this.texture;this.texture=[];for(let o=0;o=0?1:-1,x=1-g*g;if(x>Number.EPSILON){let T=Math.sqrt(x),D=Math.atan2(T,g*_);b=Math.sin(b*D)/T,a=Math.sin(a*D)/T}let C=a*_;if(l=l*b+h*C,c=c*b+p*C,d=d*b+f*C,u=u*b+m*C,b===1-a){let T=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=T,c*=T,d*=T,u*=T}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,o,s){let a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],u=o[s],h=o[s+1],p=o[s+2],f=o[s+3];return e[t]=a*f+d*u+l*p-c*h,e[t+1]=l*f+d*h+c*u-a*p,e[t+2]=c*f+d*p+a*h-l*u,e[t+3]=d*f-a*u-l*h-c*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!(e&&e.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let n=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(r/2),u=a(o/2),h=l(n/2),p=l(r/2),f=l(o/2);switch(s){case"XYZ":this._x=h*d*u+c*p*f,this._y=c*p*u-h*d*f,this._z=c*d*f+h*p*u,this._w=c*d*u-h*p*f;break;case"YXZ":this._x=h*d*u+c*p*f,this._y=c*p*u-h*d*f,this._z=c*d*f-h*p*u,this._w=c*d*u+h*p*f;break;case"ZXY":this._x=h*d*u-c*p*f,this._y=c*p*u+h*d*f,this._z=c*d*f+h*p*u,this._w=c*d*u-h*p*f;break;case"ZYX":this._x=h*d*u-c*p*f,this._y=c*p*u+h*d*f,this._z=c*d*f-h*p*u,this._w=c*d*u+h*p*f;break;case"YZX":this._x=h*d*u+c*p*f,this._y=c*p*u+h*d*f,this._z=c*d*f-h*p*u,this._w=c*d*u-h*p*f;break;case"XZY":this._x=h*d*u-c*p*f,this._y=c*p*u-h*d*f,this._z=c*d*f+h*p*u,this._w=c*d*u+h*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],d=t[6],u=t[10],h=n+a+u;if(h>0){let p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(d-l)*p,this._y=(o-c)*p,this._z=(s-r)*p}else if(n>a&&n>u){let p=2*Math.sqrt(1+n-a-u);this._w=(d-l)/p,this._x=.25*p,this._y=(r+s)/p,this._z=(o+c)/p}else if(a>u){let p=2*Math.sqrt(1+a-n-u);this._w=(o-c)/p,this._x=(r+s)/p,this._y=.25*p,this._z=(l+d)/p}else{let p=2*Math.sqrt(1+u-n-a);this._w=(s-r)/p,this._x=(o+c)/p,this._y=(l+d)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(nr(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return t!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-n*c,this._z=o*d+s*c+n*l-r*a,this._w=s*d-n*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let n=this._x,r=this._y,o=this._z,s=this._w,a=s*e._w+n*e._x+r*e._y+o*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=n,this._y=r,this._z=o,this;let l=1-a*a;if(l<=Number.EPSILON){let p=1-t;return this._w=p*s+t*this._w,this._x=p*n+t*this._x,this._y=p*r+t*this._y,this._z=p*o+t*this._z,this.normalize(),this._onChangeCallback(),this}let c=Math.sqrt(l),d=Math.atan2(c,a),u=Math.sin((1-t)*d)/c,h=Math.sin(t*d)/c;return this._w=s*u+this._w*h,this._x=n*u+this._x*h,this._y=r*u+this._y*h,this._z=o*u+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,n){this.copy(e).slerp(t,n)}random(){let e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(o),n*Math.cos(o),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};Bi.prototype.isQuaternion=!0;var R=class{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(_z.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(_z.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*r,this.y=o[1]*t+o[4]*n+o[7]*r,this.z=o[2]*t+o[5]*n+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*n+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*n+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=l*t+s*r-a*n,d=l*n+a*t-o*r,u=l*r+o*n-s*t,h=-o*t-s*n-a*r;return this.x=c*l+h*-o+d*-a-u*-s,this.y=d*l+h*-s+u*-o-c*-a,this.z=u*l+h*-a+c*-s-d*-o,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r,this.y=o[1]*t+o[5]*n+o[9]*r,this.z=o[2]*t+o[6]*n+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return t!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=r*l-o*a,this.y=o*s-n*l,this.z=n*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return mD.copy(this).projectOnVector(e),this.sub(mD)}reflect(e){return this.sub(mD.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(nr(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};R.prototype.isVector3=!0;var mD=new R,_z=new Bi,Ur=class{constructor(e=new R(1/0,1/0,1/0),t=new R(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,c=e.length;lo&&(o=d),u>s&&(s=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(o,s,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,c=e.count;lo&&(o=d),u>s&&(s=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(o,s,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,_g),_g.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(vg),ux.subVectors(this.max,vg),tp.subVectors(e.a,vg),np.subVectors(e.b,vg),ip.subVectors(e.c,vg),Ql.subVectors(np,tp),Kl.subVectors(ip,np),Ad.subVectors(tp,ip);let t=[0,-Ql.z,Ql.y,0,-Kl.z,Kl.y,0,-Ad.z,Ad.y,Ql.z,0,-Ql.x,Kl.z,0,-Kl.x,Ad.z,0,-Ad.x,-Ql.y,Ql.x,0,-Kl.y,Kl.x,0,-Ad.y,Ad.x,0];return!_D(t,tp,np,ip,ux)||(t=[1,0,0,0,1,0,0,0,1],!_D(t,tp,np,ip,ux))?!1:(hx.crossVectors(Ql,Kl),t=[hx.x,hx.y,hx.z],_D(t,tp,np,ip,ux))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return _g.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=this.getSize(_g).length()*.5,e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Ga[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ga[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ga[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ga[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ga[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ga[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ga[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ga[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ga),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};Ur.prototype.isBox3=!0;var Ga=[new R,new R,new R,new R,new R,new R,new R,new R],_g=new R,gD=new Ur,tp=new R,np=new R,ip=new R,Ql=new R,Kl=new R,Ad=new R,vg=new R,ux=new R,hx=new R,Nd=new R;function _D(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){Nd.fromArray(i,o);let a=r.x*Math.abs(Nd.x)+r.y*Math.abs(Nd.y)+r.z*Math.abs(Nd.z),l=e.dot(Nd),c=t.dot(Nd),d=n.dot(Nd);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var Wne=new Ur,vz=new R,vD=new R,bD=new R,na=class{constructor(e=new R,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t!==void 0?n.copy(t):Wne.setFromPoints(e).getCenter(n);let r=0;for(let o=0,s=e.length;othis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){bD.subVectors(e,this.center);let t=bD.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.add(bD.multiplyScalar(r/n)),this.radius+=r}return this}union(e){return vD.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(vz.copy(e.center).add(vD)),this.expandByPoint(vz.copy(e.center).sub(vD)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}},ja=new R,yD=new R,px=new R,Jl=new R,xD=new R,fx=new R,wD=new R,ia=class{constructor(e=new R,t=new R(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ja)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=ja.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ja.copy(this.direction).multiplyScalar(t).add(this.origin),ja.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){yD.copy(e).add(t).multiplyScalar(.5),px.copy(t).sub(e).normalize(),Jl.copy(this.origin).sub(yD);let o=e.distanceTo(t)*.5,s=-this.direction.dot(px),a=Jl.dot(this.direction),l=-Jl.dot(px),c=Jl.lengthSq(),d=Math.abs(1-s*s),u,h,p,f;if(d>0)if(u=s*l-a,h=s*a-l,f=o*d,u>=0)if(h>=-f)if(h<=f){let m=1/d;u*=m,h*=m,p=u*(u+s*h+2*a)+h*(s*u+h+2*l)+c}else h=o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*l)+c;else h=-o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*l)+c;else h<=-f?(u=Math.max(0,-(-s*o+a)),h=u>0?-o:Math.min(Math.max(-o,-l),o),p=-u*u+h*(h+2*l)+c):h<=f?(u=0,h=Math.min(Math.max(-o,-l),o),p=h*(h+2*l)+c):(u=Math.max(0,-(s*o+a)),h=u>0?o:Math.min(Math.max(-o,-l),o),p=-u*u+h*(h+2*l)+c);else h=s>0?-o:o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*l)+c;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(px).multiplyScalar(h).add(yD),p}intersectSphere(e,t){ja.subVectors(e.center,this.origin);let n=ja.dot(this.direction),r=ja.dot(ja)-n*n,o=e.radius*e.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=n-s,l=n+s;return a<0&&l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,o,s,a,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,h=this.origin;return c>=0?(n=(e.min.x-h.x)*c,r=(e.max.x-h.x)*c):(n=(e.max.x-h.x)*c,r=(e.min.x-h.x)*c),d>=0?(o=(e.min.y-h.y)*d,s=(e.max.y-h.y)*d):(o=(e.max.y-h.y)*d,s=(e.min.y-h.y)*d),n>s||o>r||((o>n||n!==n)&&(n=o),(s=0?(a=(e.min.z-h.z)*u,l=(e.max.z-h.z)*u):(a=(e.max.z-h.z)*u,l=(e.min.z-h.z)*u),n>l||a>r)||((a>n||n!==n)&&(n=a),(l=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,ja)!==null}intersectTriangle(e,t,n,r,o){xD.subVectors(t,e),fx.subVectors(n,e),wD.crossVectors(xD,fx);let s=this.direction.dot(wD),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;Jl.subVectors(this.origin,e);let l=a*this.direction.dot(fx.crossVectors(Jl,fx));if(l<0)return null;let c=a*this.direction.dot(xD.cross(Jl));if(c<0||l+c>s)return null;let d=-a*Jl.dot(wD);return d<0?null:this.at(d/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},lt=class i{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,o,s,a,l,c,d,u,h,p,f,m,b){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=o,g[5]=s,g[9]=a,g[13]=l,g[2]=c,g[6]=d,g[10]=u,g[14]=h,g[3]=p,g[7]=f,g[11]=m,g[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new i().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,n=e.elements,r=1/rp.setFromMatrixColumn(e,0).length(),o=1/rp.setFromMatrixColumn(e,1).length(),s=1/rp.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let t=this.elements,n=e.x,r=e.y,o=e.z,s=Math.cos(n),a=Math.sin(n),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(e.order==="XYZ"){let h=s*d,p=s*u,f=a*d,m=a*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=p+f*c,t[5]=h-m*c,t[9]=-a*l,t[2]=m-h*c,t[6]=f+p*c,t[10]=s*l}else if(e.order==="YXZ"){let h=l*d,p=l*u,f=c*d,m=c*u;t[0]=h+m*a,t[4]=f*a-p,t[8]=s*c,t[1]=s*u,t[5]=s*d,t[9]=-a,t[2]=p*a-f,t[6]=m+h*a,t[10]=s*l}else if(e.order==="ZXY"){let h=l*d,p=l*u,f=c*d,m=c*u;t[0]=h-m*a,t[4]=-s*u,t[8]=f+p*a,t[1]=p+f*a,t[5]=s*d,t[9]=m-h*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let h=s*d,p=s*u,f=a*d,m=a*u;t[0]=l*d,t[4]=f*c-p,t[8]=h*c+m,t[1]=l*u,t[5]=m*c+h,t[9]=p*c-f,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let h=s*l,p=s*c,f=a*l,m=a*c;t[0]=l*d,t[4]=m-h*u,t[8]=f*u+p,t[1]=u,t[5]=s*d,t[9]=-a*d,t[2]=-c*d,t[6]=p*u+f,t[10]=h-m*u}else if(e.order==="XZY"){let h=s*l,p=s*c,f=a*l,m=a*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=h*u+m,t[5]=s*d,t[9]=p*u-f,t[2]=f*u-p,t[6]=a*d,t[10]=m*u+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose($ne,e,qne)}lookAt(e,t,n){let r=this.elements;return _o.subVectors(e,t),_o.lengthSq()===0&&(_o.z=1),_o.normalize(),ec.crossVectors(n,_o),ec.lengthSq()===0&&(Math.abs(n.z)===1?_o.x+=1e-4:_o.z+=1e-4,_o.normalize(),ec.crossVectors(n,_o)),ec.normalize(),mx.crossVectors(_o,ec),r[0]=ec.x,r[4]=mx.x,r[8]=_o.x,r[1]=ec.y,r[5]=mx.y,r[9]=_o.y,r[2]=ec.z,r[6]=mx.z,r[10]=_o.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[4],l=n[8],c=n[12],d=n[1],u=n[5],h=n[9],p=n[13],f=n[2],m=n[6],b=n[10],g=n[14],_=n[3],x=n[7],C=n[11],T=n[15],D=r[0],E=r[4],P=r[8],Y=r[12],$=r[1],U=r[5],O=r[9],B=r[13],j=r[2],q=r[6],k=r[10],G=r[14],K=r[3],de=r[7],Te=r[11],Ee=r[15];return o[0]=s*D+a*$+l*j+c*K,o[4]=s*E+a*U+l*q+c*de,o[8]=s*P+a*O+l*k+c*Te,o[12]=s*Y+a*B+l*G+c*Ee,o[1]=d*D+u*$+h*j+p*K,o[5]=d*E+u*U+h*q+p*de,o[9]=d*P+u*O+h*k+p*Te,o[13]=d*Y+u*B+h*G+p*Ee,o[2]=f*D+m*$+b*j+g*K,o[6]=f*E+m*U+b*q+g*de,o[10]=f*P+m*O+b*k+g*Te,o[14]=f*Y+m*B+b*G+g*Ee,o[3]=_*D+x*$+C*j+T*K,o[7]=_*E+x*U+C*q+T*de,o[11]=_*P+x*O+C*k+T*Te,o[15]=_*Y+x*B+C*G+T*Ee,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],d=e[2],u=e[6],h=e[10],p=e[14],f=e[3],m=e[7],b=e[11],g=e[15];return f*(+o*l*u-r*c*u-o*a*h+n*c*h+r*a*p-n*l*p)+m*(+t*l*p-t*c*h+o*s*h-r*s*p+r*c*d-o*l*d)+b*(+t*c*u-t*a*p-o*s*u+n*s*p+o*a*d-n*c*d)+g*(-r*a*d-t*l*u+t*a*h+r*s*u-n*s*h+n*l*d)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],h=e[10],p=e[11],f=e[12],m=e[13],b=e[14],g=e[15],_=u*b*c-m*h*c+m*l*p-a*b*p-u*l*g+a*h*g,x=f*h*c-d*b*c-f*l*p+s*b*p+d*l*g-s*h*g,C=d*m*c-f*u*c+f*a*p-s*m*p-d*a*g+s*u*g,T=f*u*l-d*m*l-f*a*h+s*m*h+d*a*b-s*u*b,D=t*_+n*x+r*C+o*T;if(D===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let E=1/D;return e[0]=_*E,e[1]=(m*h*o-u*b*o-m*r*p+n*b*p+u*r*g-n*h*g)*E,e[2]=(a*b*o-m*l*o+m*r*c-n*b*c-a*r*g+n*l*g)*E,e[3]=(u*l*o-a*h*o-u*r*c+n*h*c+a*r*p-n*l*p)*E,e[4]=x*E,e[5]=(d*b*o-f*h*o+f*r*p-t*b*p-d*r*g+t*h*g)*E,e[6]=(f*l*o-s*b*o-f*r*c+t*b*c+s*r*g-t*l*g)*E,e[7]=(s*h*o-d*l*o+d*r*c-t*h*c-s*r*p+t*l*p)*E,e[8]=C*E,e[9]=(f*u*o-d*m*o-f*n*p+t*m*p+d*n*g-t*u*g)*E,e[10]=(s*m*o-f*a*o+f*n*c-t*m*c-s*n*g+t*a*g)*E,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*p-t*a*p)*E,e[12]=T*E,e[13]=(d*m*r-f*u*r+f*n*h-t*m*h-d*n*b+t*u*b)*E,e[14]=(f*a*r-s*m*r-f*n*l+t*m*l+s*n*b-t*a*b)*E,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*h+t*a*h)*E,this}scale(e){let t=this.elements,n=e.x,r=e.y,o=e.z;return t[0]*=n,t[4]*=r,t[8]*=o,t[1]*=n,t[5]*=r,t[9]*=o,t[2]*=n,t[6]*=r,t[10]*=o,t[3]*=n,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),o=1-n,s=e.x,a=e.y,l=e.z,c=o*s,d=o*a;return this.set(c*s+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,o,s){return this.set(1,n,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,d=s+s,u=a+a,h=o*c,p=o*d,f=o*u,m=s*d,b=s*u,g=a*u,_=l*c,x=l*d,C=l*u,T=n.x,D=n.y,E=n.z;return r[0]=(1-(m+g))*T,r[1]=(p+C)*T,r[2]=(f-x)*T,r[3]=0,r[4]=(p-C)*D,r[5]=(1-(h+g))*D,r[6]=(b+_)*D,r[7]=0,r[8]=(f+x)*E,r[9]=(b-_)*E,r[10]=(1-(h+m))*E,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements,o=rp.set(r[0],r[1],r[2]).length(),s=rp.set(r[4],r[5],r[6]).length(),a=rp.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),e.x=r[12],e.y=r[13],e.z=r[14],_s.copy(this);let c=1/o,d=1/s,u=1/a;return _s.elements[0]*=c,_s.elements[1]*=c,_s.elements[2]*=c,_s.elements[4]*=d,_s.elements[5]*=d,_s.elements[6]*=d,_s.elements[8]*=u,_s.elements[9]*=u,_s.elements[10]*=u,t.setFromRotationMatrix(_s),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let a=this.elements,l=2*o/(t-e),c=2*o/(n-r),d=(t+e)/(t-e),u=(n+r)/(n-r),h=-(s+o)/(s-o),p=-2*s*o/(s-o);return a[0]=l,a[4]=0,a[8]=d,a[12]=0,a[1]=0,a[5]=c,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,o,s){let a=this.elements,l=1/(t-e),c=1/(n-r),d=1/(s-o),u=(t+e)*l,h=(n+r)*c,p=(s+o)*d;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*d,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}};lt.prototype.isMatrix4=!0;var rp=new R,_s=new lt,$ne=new R(0,0,0),qne=new R(1,1,1),ec=new R,mx=new R,_o=new R,bz=new lt,yz=new Bi,Zd=class i{constructor(e=0,t=0,n=0,r=i.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){let r=e.elements,o=r[0],s=r[4],a=r[8],l=r[1],c=r[5],d=r[9],u=r[2],h=r[6],p=r[10];switch(t){case"XYZ":this._y=Math.asin(nr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,p),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-nr(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,o),this._z=0);break;case"ZXY":this._x=Math.asin(nr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,p),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-nr(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(nr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-u,o)):(this._x=0,this._y=Math.atan2(a,p));break;case"XZY":this._z=Math.asin(-nr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-d,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return bz.makeRotationFromQuaternion(e),this.setFromRotationMatrix(bz,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return yz.setFromEuler(this),this.setFromQuaternion(yz,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new R(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};Zd.prototype.isEuler=!0;Zd.DefaultOrder="XYZ";Zd.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var Gg=class{constructor(){this.mask=1}set(e){this.mask=1<1){for(let t=0;t1){for(let n=0;n0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),d.length>0&&(n.images=d),u.length>0&&(n.shapes=u),h.length>0&&(n.skeletons=h),p.length>0&&(n.animations=p)}return n.object=r,n;function s(a){let l=[];for(let c in a){let d=a[c];delete d.metadata,l.push(d)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){vs.subVectors(r,t),$a.subVectors(n,t),CD.subVectors(e,t);let s=vs.dot(vs),a=vs.dot($a),l=vs.dot(CD),c=$a.dot($a),d=$a.dot(CD),u=s*c-a*a;if(u===0)return o.set(-2,-1,-1);let h=1/u,p=(c*l-a*d)*h,f=(s*d-a*l)*h;return o.set(1-p-f,f,p)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,qa),qa.x>=0&&qa.y>=0&&qa.x+qa.y<=1}static getUV(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,qa),l.set(0,0),l.addScaledVector(o,qa.x),l.addScaledVector(s,qa.y),l.addScaledVector(a,qa.z),l}static isFrontFacing(e,t,n,r){return vs.subVectors(n,t),$a.subVectors(e,t),vs.cross($a).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return vs.subVectors(this.c,this.b),$a.subVectors(this.a,this.b),vs.cross($a).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return i.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,o){return i.getUV(e,this.a,this.b,this.c,t,n,r,o)}containsPoint(e){return i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,o=this.c,s,a;sp.subVectors(r,n),ap.subVectors(o,n),SD.subVectors(e,n);let l=sp.dot(SD),c=ap.dot(SD);if(l<=0&&c<=0)return t.copy(n);MD.subVectors(e,r);let d=sp.dot(MD),u=ap.dot(MD);if(d>=0&&u<=d)return t.copy(r);let h=l*u-d*c;if(h<=0&&l>=0&&d<=0)return s=l/(l-d),t.copy(n).addScaledVector(sp,s);ED.subVectors(e,o);let p=sp.dot(ED),f=ap.dot(ED);if(f>=0&&p<=f)return t.copy(o);let m=p*c-l*f;if(m<=0&&c>=0&&f<=0)return a=c/(c-f),t.copy(n).addScaledVector(ap,a);let b=d*f-p*u;if(b<=0&&u-d>=0&&p-f>=0)return Ez.subVectors(o,r),a=(u-d)/(u-d+(p-f)),t.copy(r).addScaledVector(Ez,a);let g=1/(b+m+h);return s=m*g,a=h*g,t.copy(n).addScaledVector(sp,s).addScaledVector(ap,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},Kne=0,Ii=class extends ta{constructor(){super(),Object.defineProperty(this,"id",{value:Kne++}),this.uuid=bo(),this.name="",this.type="Material",this.fog=!0,this.blending=wp,this.side=Yd,this.vertexColors=!1,this.opacity=1,this.format=rr,this.transparent=!1,this.blendSrc=jP,this.blendDst=WP,this.blendEquation=Ud,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Jx,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=mH,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Kx,this.stencilZFail=Kx,this.stencilZPass=Kx,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if(t==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===GP;continue}let r=this[t];if(r===void 0){console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.");continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==wp&&(n.blending=this.blending),this.side!==Yd&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.format!==rr&&(n.format=this.format),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData);function r(o){let s=[];for(let a in o){let l=o[a];delete l.metadata,s.push(l)}return s}if(t){let o=r(e.textures),s=r(e.images);o.length>0&&(n.textures=o),s.length>0&&(n.images=s)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.format=e.format,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let r=t.length;n=new Array(r);for(let o=0;o!==r;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}};Ii.prototype.isMaterial=!0;var Iz={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},bs={h:0,s:0,l:0},_x={h:0,s:0,l:0};function ID(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}function TD(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function DD(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var je=(()=>{class i{constructor(t,n,r){return n===void 0&&r===void 0?this.set(t):this.setRGB(t,n,r)}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this}setRGB(t,n,r){return this.r=t,this.g=n,this.b=r,this}setHSL(t,n,r){if(t=QP(t,1),n=nr(n,0,1),r=nr(r,0,1),n===0)this.r=this.g=this.b=r;else{let o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=ID(s,o,t+1/3),this.g=ID(s,o,t),this.b=ID(s,o,t-1/3)}return this}setStyle(t){function n(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let o,s=r[1],a=r[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(o[1],10))/255,this.g=Math.min(255,parseInt(o[2],10))/255,this.b=Math.min(255,parseInt(o[3],10))/255,n(o[4]),this;if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(o[1],10))/100,this.g=Math.min(100,parseInt(o[2],10))/100,this.b=Math.min(100,parseInt(o[3],10))/100,n(o[4]),this;break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){let l=parseFloat(o[1])/360,c=parseInt(o[2],10)/100,d=parseInt(o[3],10)/100;return n(o[4]),this.setHSL(l,c,d)}break}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){let o=r[1],s=o.length;if(s===3)return this.r=parseInt(o.charAt(0)+o.charAt(0),16)/255,this.g=parseInt(o.charAt(1)+o.charAt(1),16)/255,this.b=parseInt(o.charAt(2)+o.charAt(2),16)/255,this;if(s===6)return this.r=parseInt(o.charAt(0)+o.charAt(1),16)/255,this.g=parseInt(o.charAt(2)+o.charAt(3),16)/255,this.b=parseInt(o.charAt(4)+o.charAt(5),16)/255,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){let n=Iz[t.toLowerCase()];return n!==void 0?this.setHex(n):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copyGammaToLinear(t,n=2){return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this}copyLinearToGamma(t,n=2){let r=n>0?1/n:1;return this.r=Math.pow(t.r,r),this.g=Math.pow(t.g,r),this.b=Math.pow(t.b,r),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.r=TD(t.r),this.g=TD(t.g),this.b=TD(t.b),this}copyLinearToSRGB(t){return this.r=DD(t.r),this.g=DD(t.g),this.b=DD(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(t){let n=this.r,r=this.g,o=this.b,s=Math.max(n,r,o),a=Math.min(n,r,o),l,c,d=(a+s)/2;if(a===s)l=0,c=0;else{let u=s-a;switch(c=d<=.5?u/(s+a):u/(2-s-a),s){case n:l=(r-o)/u+(r65535?Dp:Tp)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new yi().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return Wo.makeRotationFromQuaternion(e),this.applyMatrix4(Wo),this}rotateX(e){return Wo.makeRotationX(e),this.applyMatrix4(Wo),this}rotateY(e){return Wo.makeRotationY(e),this.applyMatrix4(Wo),this}rotateZ(e){return Wo.makeRotationZ(e),this.applyMatrix4(Wo),this}translate(e,t,n){return Wo.makeTranslation(e,t,n),this.applyMatrix4(Wo),this}scale(e,t,n){return Wo.makeScale(e,t,n),this.applyMatrix4(Wo),this}lookAt(e){return PD.lookAt(e),PD.updateMatrix(),this.applyMatrix4(PD.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(lp).negate(),this.translate(lp.x,lp.y,lp.z),this}setFromPoints(e){let t=[];for(let n=0,r=e.length;n0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let l in n){let c=n[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,h=c.length;u0&&(r[l]=d,o=!0)}o&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone(t));let r=e.attributes;for(let c in r){let d=r[c];this.setAttribute(c,d.clone(t))}let o=e.morphAttributes;for(let c in o){let d=[],u=o[c];for(let h=0,p=u.length;h0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;if(r===void 0||(n.boundingSphere===null&&n.computeBoundingSphere(),OD.copy(n.boundingSphere),OD.applyMatrix4(o),e.ray.intersectsSphere(OD)===!1)||(Tz.copy(o).invert(),cp.copy(e.ray).applyMatrix4(Tz),n.boundingBox!==null&&cp.intersectsBox(n.boundingBox)===!1))return;let s;if(n.isBufferGeometry){let a=n.index,l=n.attributes.position,c=n.morphAttributes.position,d=n.morphTargetsRelative,u=n.attributes.uv,h=n.attributes.uv2,p=n.groups,f=n.drawRange;if(a!==null)if(Array.isArray(r))for(let m=0,b=p.length;mt.far?null:{distance:c,point:Mx.clone(),object:i}}function Ex(i,e,t,n,r,o,s,a,l,c,d,u){tc.fromBufferAttribute(r,c),nc.fromBufferAttribute(r,d),ic.fromBufferAttribute(r,u);let h=i.morphTargetInfluences;if(o&&h){bx.set(0,0,0),yx.set(0,0,0),xx.set(0,0,0);for(let f=0,m=o.length;f0?1:-1,d.push(de.x,de.y,de.z),u.push(He/E),u.push(1-Te/P),G+=1}}for(let Te=0;TeArray.isArray(t)?oE(t,e):e(t))}function dN(i,e,t){e>=i.length?i.push(t):i.splice(e,0,t)}function i0(i,e){return e>=i.length-1?i.pop():i.splice(e,1)[0]}function X8(i,e){let t=[];for(let n=0;ne;){let o=r-2;i[r]=i[o],r--}i[e]=t,i[e+1]=n}}function I0(i,e,t){let n=Uf(i,e);return n>=0?i[n|1]=t:(n=~n,Z8(i,n,e,t)),n}function RS(i,e){let t=Uf(i,e);if(t>=0)return i[t|1]}function Uf(i,e){return Q8(i,e,1)}function Q8(i,e,t){let n=0,r=i.length>>t;for(;r!==n;){let o=n+(r-n>>1),s=i[o<e?r=o:n=o+1}return~(r<e){s=o-1;break}}}for(;o-1){let o;for(;++ro?u="":u=r[d+1].toLowerCase(),n&2&&c!==u){if(as(n))return!1;s=!0}}}}return as(n)||s}function as(i){return(i&1)===0}function iW(i,e,t,n){if(e===null)return-1;let r=0;if(n||!t){let o=!1;for(;r-1)for(t++;t0?'="'+a+'"':"")+"]"}else n&8?r+="."+s:n&4&&(r+=" "+s);else r!==""&&!as(s)&&(e+=_A(o,r),r=""),n=s,o=o||!as(n);t++}return r!==""&&(e+=_A(o,r)),e}function cW(i){return i.map(lW).join(",")}function dW(i){let e=[],t=[],n=1,r=2;for(;n{let e=yN(i),t=wt(Z({},e),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===pN.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&i.dependencies||null,getStandaloneInjector:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||As.Emulated,styles:i.styles||Tr,_:null,schemas:i.schemas||null,tView:null,id:""});xN(t);let n=i.dependencies;return t.directiveDefs=bA(n,!1),t.pipeDefs=bA(n,!0),t.id=pW(t),t})}function uW(i){return Sl(i)||aE(i)}function hW(i){return i!==null}function ot(i){return zf(()=>({type:i.type,bootstrap:i.bootstrap||Tr,declarations:i.declarations||Tr,imports:i.imports||Tr,exports:i.exports||Tr,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function vA(i,e){if(i==null)return ba;let t={};for(let n in i)if(i.hasOwnProperty(n)){let r=i[n],o,s,a=Cl.None;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o):(o=r,s=r),e?(t[o]=a!==Cl.None?[n,a]:n,e[o]=s):t[o]=n}return t}function ze(i){return zf(()=>{let e=yN(i);return xN(e),e})}function Sl(i){return i[R8]||null}function aE(i){return i[A8]||null}function _N(i){return i[N8]||null}function vN(i){let e=Sl(i)||aE(i)||_N(i);return e!==null?e.standalone:!1}function bN(i,e){let t=i[k8]||null;if(!t&&e===!0)throw new Error(`Type ${Pr(i)} does not have '\u0275mod' property.`);return t}function yN(i){let e={};return{type:i.type,providersResolver:null,factory:null,hostBindings:i.hostBindings||null,hostVars:i.hostVars||0,hostAttrs:i.hostAttrs||null,contentQueries:i.contentQueries||null,declaredInputs:e,inputTransforms:null,inputConfig:i.inputs||ba,exportAs:i.exportAs||null,standalone:i.standalone===!0,signals:i.signals===!0,selectors:i.selectors||Tr,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:vA(i.inputs,e),outputs:vA(i.outputs),debugInfo:null}}function xN(i){i.features?.forEach(e=>e(i))}function bA(i,e){if(!i)return null;let t=e?_N:uW;return()=>(typeof i=="function"?i():i).map(n=>t(n)).filter(hW)}function pW(i){let e=0,t=[i.selectors,i.ngContentSelectors,i.hostVars,i.hostAttrs,i.consts,i.vars,i.decls,i.encapsulation,i.standalone,i.signals,i.exportAs,JSON.stringify(i.inputs),JSON.stringify(i.outputs),Object.getOwnPropertyNames(i.type.prototype),!!i.contentQueries,!!i.viewQuery].join("|");for(let r of t)e=Math.imul(31,e)+r.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function T0(i){return{\u0275providers:i}}function fW(...i){return{\u0275providers:wN(!0,i),\u0275fromNgModule:!0}}function wN(i,...e){let t=[],n=new Set,r,o=s=>{t.push(s)};return oE(e,s=>{let a=s;QS(a,o,[],n)&&(r||=[],r.push(a))}),r!==void 0&&CN(r,o),t}function CN(i,e){for(let t=0;t{e(o,n)})}}function QS(i,e,t,n){if(i=$i(i),!i)return!1;let r=null,o=hA(i),s=!o&&Sl(i);if(!o&&!s){let l=i.ngModule;if(o=hA(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=i}let a=n.has(r);if(s){if(a)return!1;if(n.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)QS(c,e,t,n)}}else if(o){if(o.imports!=null&&!a){n.add(r);let c;try{oE(o.imports,d=>{QS(d,e,t,n)&&(c||=[],c.push(d))})}finally{}c!==void 0&&CN(c,e)}if(!a){let c=Hu(r)||(()=>new r);e({provide:r,useFactory:c,deps:Tr},r),e({provide:hN,useValue:r,multi:!0},r),e({provide:Gu,useValue:()=>X(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=i;lE(l,d=>{e(d,c)})}}else return!1;return r!==i&&i.providers!==void 0}function lE(i,e){for(let t of i)sN(t)&&(t=t.\u0275providers),Array.isArray(t)?lE(t,e):e(t)}var mW=zn({provide:String,useValue:zn});function SN(i){return i!==null&&typeof i=="object"&&mW in i}function gW(i){return!!(i&&i.useExisting)}function _W(i){return!!(i&&i.useFactory)}function ju(i){return typeof i=="function"}function vW(i){return!!i.useClass}var D0=new ge(""),Yv={},bW={},AS;function P0(){return AS===void 0&&(AS=new r0),AS}var qi=class{},Nf=class extends qi{get destroyed(){return this._destroyed}constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,JS(e,s=>this.processProvider(s)),this.records.set(uN,Fu(void 0,this)),r.has("environment")&&this.records.set(qi,Fu(void 0,this));let o=this.records.get(D0);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(hN,Tr,en.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;let e=sn(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),sn(e)}}onDestroy(e){return this.assertNotDestroyed(),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){this.assertNotDestroyed();let t=yl(this),n=Do(void 0),r;try{return e()}finally{yl(t),Do(n)}}get(e,t=Rf,n=en.Default){if(this.assertNotDestroyed(),e.hasOwnProperty(fA))return e[fA](this);n=M0(n);let r,o=yl(this),s=Do(void 0);try{if(!(n&en.SkipSelf)){let l=this.records.get(e);if(l===void 0){let c=SW(e)&&S0(e);c&&this.injectableDefInScope(c)?l=Fu(KS(e),Yv):l=null,this.records.set(e,l)}if(l!=null)return this.hydrate(e,l)}let a=n&en.Self?P0():this.parent;return t=n&en.Optional&&t===Rf?null:t,a.get(e,t)}catch(a){if(a.name==="NullInjectorError"){if((a[n0]=a[n0]||[]).unshift(Pr(e)),o)throw a;return W8(a,e,"R3InjectorError",this.source)}else throw a}finally{Do(s),yl(o)}}resolveInjectorInitializers(){let e=sn(null),t=yl(this),n=Do(void 0),r;try{let o=this.get(Gu,Tr,en.Self);for(let s of o)s()}finally{yl(t),Do(n),sn(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(Pr(n));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Oe(205,!1)}processProvider(e){e=$i(e);let t=ju(e)?e:$i(e&&e.provide),n=xW(e);if(!ju(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Fu(void 0,Yv,!0),r.factory=()=>XS(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=sn(null);try{return t.value===Yv&&(t.value=bW,t.value=t.factory()),typeof t.value=="object"&&t.value&&CW(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{sn(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=$i(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function KS(i){let e=S0(i),t=e!==null?e.factory:Hu(i);if(t!==null)return t;if(i instanceof ge)throw new Oe(204,!1);if(i instanceof Function)return yW(i);throw new Oe(204,!1)}function yW(i){if(i.length>0)throw new Oe(204,!1);let t=P8(i);return t!==null?()=>t.factory(i):()=>new i}function xW(i){if(SN(i))return Fu(void 0,i.useValue);{let e=MN(i);return Fu(e,Yv)}}function MN(i,e,t){let n;if(ju(i)){let r=$i(i);return Hu(r)||KS(r)}else if(SN(i))n=()=>$i(i.useValue);else if(_W(i))n=()=>i.useFactory(...XS(i.deps||[]));else if(gW(i))n=()=>X($i(i.useExisting));else{let r=$i(i&&(i.useClass||i.provide));if(wW(i))n=()=>new r(...XS(i.deps));else return Hu(r)||KS(r)}return n}function Fu(i,e,t=!1){return{factory:i,value:e,multi:t?[]:void 0}}function wW(i){return!!i.deps}function CW(i){return i!==null&&typeof i=="object"&&typeof i.ngOnDestroy=="function"}function SW(i){return typeof i=="function"||typeof i=="object"&&i instanceof ge}function JS(i,e){for(let t of i)Array.isArray(t)?JS(t,e):t&&sN(t)?JS(t.\u0275providers,e):e(t)}function ks(i,e){i instanceof Nf&&i.assertNotDestroyed();let t,n=yl(i),r=Do(void 0);try{return e()}finally{yl(n),Do(r)}}function EN(){return aN()!==void 0||H8()!=null}function Ju(i){if(!EN())throw new Oe(-203,!1)}function MW(i){return typeof i=="function"}var Ls=0,Ut=1,Pt=2,pr=3,cs=4,Xr=5,Wu=6,o0=7,ur=8,$u=9,ya=10,ri=11,kf=12,yA=13,eh=14,no=15,Lc=16,Bu=17,xa=18,O0=19,IN=20,xl=21,Xv=22,Po=23,Or=25,cE=1;var Fc=7,s0=8,qu=9,hr=10,a0=function(i){return i[i.None=0]="None",i[i.HasTransplantedViews=2]="HasTransplantedViews",i}(a0||{});function wl(i){return Array.isArray(i)&&typeof i[cE]=="object"}function Ma(i){return Array.isArray(i)&&i[cE]===!0}function dE(i){return(i.flags&4)!==0}function R0(i){return i.componentOffset>-1}function A0(i){return(i.flags&1)===1}function wa(i){return!!i.template}function eM(i){return(i[Pt]&512)!==0}var tM=class{constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function TN(i,e,t,n){e!==null?e.applyValueToInputSignal(e,n):i[t]=n}function dn(){return DN}function DN(i){return i.type.prototype.ngOnChanges&&(i.setInput=IW),EW}dn.ngInherit=!0;function EW(){let i=ON(this),e=i?.current;if(e){let t=i.previous;if(t===ba)i.previous=e;else for(let n in e)t[n]=e[n];i.current=null,this.ngOnChanges(e)}}function IW(i,e,t,n,r){let o=this.declaredInputs[n],s=ON(i)||TW(i,{previous:ba,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new tM(c&&c.currentValue,t,l===ba),TN(i,e,r,t)}var PN="__ngSimpleChanges__";function ON(i){return i[PN]||null}function TW(i,e){return i[PN]=e}var xA=null;var Os=function(i,e,t){xA?.(i,e,t)},RN="svg",DW="math";function Ns(i){for(;Array.isArray(i);)i=i[Ls];return i}function PW(i){for(;Array.isArray(i);){if(typeof i[cE]=="object")return i;i=i[Ls]}return null}function AN(i,e){return Ns(e[i])}function Ro(i,e){return Ns(e[i.index])}function uE(i,e){return i.data[e]}function OW(i,e){return i[e]}function Dl(i,e){let t=e[i];return wl(t)?t:t[Ls]}function RW(i){return(i[Pt]&4)===4}function hE(i){return(i[Pt]&128)===128}function AW(i){return Ma(i[pr])}function Ml(i,e){return e==null?null:i[e]}function NN(i){i[Bu]=0}function kN(i){i[Pt]&1024||(i[Pt]|=1024,hE(i)&&N0(i))}function NW(i,e){for(;i>0;)e=e[eh],i--;return e}function Lf(i){return!!(i[Pt]&9216||i[Po]?.dirty)}function nM(i){i[ya].changeDetectionScheduler?.notify(7),i[Pt]&64&&(i[Pt]|=1024),Lf(i)&&N0(i)}function N0(i){i[ya].changeDetectionScheduler?.notify(0);let e=Bc(i);for(;e!==null&&!(e[Pt]&8192||(e[Pt]|=8192,!hE(e)));)e=Bc(e)}function LN(i,e){if((i[Pt]&256)===256)throw new Oe(911,!1);i[xl]===null&&(i[xl]=[]),i[xl].push(e)}function kW(i,e){if(i[xl]===null)return;let t=i[xl].indexOf(e);t!==-1&&i[xl].splice(t,1)}function Bc(i){let e=i[pr];return Ma(e)?e[pr]:e}var Wt={lFrame:$N(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var FN=!1;function LW(){return Wt.lFrame.elementDepthCount}function FW(){Wt.lFrame.elementDepthCount++}function BW(){Wt.lFrame.elementDepthCount--}function BN(){return Wt.bindingsEnabled}function VN(){return Wt.skipHydrationRootTNode!==null}function VW(i){return Wt.skipHydrationRootTNode===i}function zW(){Wt.skipHydrationRootTNode=null}function jt(){return Wt.lFrame.lView}function oi(){return Wt.lFrame.tView}function V(i){return Wt.lFrame.contextLView=i,i[ur]}function z(i){return Wt.lFrame.contextLView=null,i}function Xi(){let i=zN();for(;i!==null&&i.type===64;)i=i.parent;return i}function zN(){return Wt.lFrame.currentTNode}function UW(){let i=Wt.lFrame,e=i.currentTNode;return i.isParent?e:e.parent}function jc(i,e){let t=Wt.lFrame;t.currentTNode=i,t.isParent=e}function pE(){return Wt.lFrame.isParent}function fE(){Wt.lFrame.isParent=!1}function HW(){return Wt.lFrame.contextLView}function UN(){return FN}function wA(i){FN=i}function HN(){let i=Wt.lFrame,e=i.bindingRootIndex;return e===-1&&(e=i.bindingRootIndex=i.tView.bindingStartIndex),e}function GN(){return Wt.lFrame.bindingIndex}function GW(i){return Wt.lFrame.bindingIndex=i}function Wc(){return Wt.lFrame.bindingIndex++}function k0(i){let e=Wt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+i,t}function jW(){return Wt.lFrame.inI18n}function WW(i,e){let t=Wt.lFrame;t.bindingIndex=t.bindingRootIndex=i,iM(e)}function $W(){return Wt.lFrame.currentDirectiveIndex}function iM(i){Wt.lFrame.currentDirectiveIndex=i}function mE(i){let e=Wt.lFrame.currentDirectiveIndex;return e===-1?null:i[e]}function gE(){return Wt.lFrame.currentQueryIndex}function L0(i){Wt.lFrame.currentQueryIndex=i}function qW(i){let e=i[Ut];return e.type===2?e.declTNode:e.type===1?i[Xr]:null}function jN(i,e,t){if(t&en.SkipSelf){let r=e,o=i;for(;r=r.parent,r===null&&!(t&en.Host);)if(r=qW(o),r===null||(o=o[eh],r.type&10))break;if(r===null)return!1;e=r,i=o}let n=Wt.lFrame=WN();return n.currentTNode=e,n.lView=i,!0}function _E(i){let e=WN(),t=i[Ut];Wt.lFrame=e,e.currentTNode=t.firstChild,e.lView=i,e.tView=t,e.contextLView=i,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function WN(){let i=Wt.lFrame,e=i===null?null:i.child;return e===null?$N(i):e}function $N(i){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:i,child:null,inI18n:!1};return i!==null&&(i.child=e),e}function qN(){let i=Wt.lFrame;return Wt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var YN=qN;function vE(){let i=qN();i.isParent=!0,i.tView=null,i.selectedIndex=-1,i.contextLView=null,i.elementDepthCount=0,i.currentDirectiveIndex=-1,i.currentNamespace=null,i.bindingRootIndex=-1,i.bindingIndex=-1,i.currentQueryIndex=0}function YW(i){return(Wt.lFrame.contextLView=NW(i,Wt.lFrame.contextLView))[ur]}function Fs(){return Wt.lFrame.selectedIndex}function Vc(i){Wt.lFrame.selectedIndex=i}function F0(){let i=Wt.lFrame;return uE(i.tView,i.selectedIndex)}function io(){Wt.lFrame.currentNamespace=RN}function B0(){XW()}function XW(){Wt.lFrame.currentNamespace=null}function ZW(){return Wt.lFrame.currentNamespace}var XN=!0;function V0(){return XN}function z0(i){XN=i}function QW(i,e,t){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(n){let s=DN(e);(t.preOrderHooks??=[]).push(i,s),(t.preOrderCheckHooks??=[]).push(i,s)}r&&(t.preOrderHooks??=[]).push(0-i,r),o&&((t.preOrderHooks??=[]).push(i,o),(t.preOrderCheckHooks??=[]).push(i,o))}function U0(i,e){for(let t=e.directiveStart,n=e.directiveEnd;t=n)break}else e[l]<0&&(i[Bu]+=65536),(a>14>16&&(i[Pt]&3)===e&&(i[Pt]+=16384,CA(a,o)):CA(a,o)}var Uu=-1,zc=class{constructor(e,t,n){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=n}};function JW(i){return i instanceof zc}function e6(i){return(i.flags&8)!==0}function t6(i){return(i.flags&16)!==0}var kS={},rM=class{constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=M0(n);let r=this.injector.get(e,kS,n);return r!==kS||t===kS?r:this.parentInjector.get(e,t,n)}};function QN(i){return i!==Uu}function l0(i){return i&32767}function n6(i){return i>>16}function c0(i,e){let t=n6(i),n=e;for(;t>0;)n=n[eh],t--;return n}var oM=!0;function SA(i){let e=oM;return oM=i,e}var i6=256,KN=i6-1,JN=5,r6=0,Rs={};function o6(i,e,t){let n;typeof t=="string"?n=t.charCodeAt(0)||0:t.hasOwnProperty(Pf)&&(n=t[Pf]),n==null&&(n=t[Pf]=r6++);let r=n&KN,o=1<>JN)]|=o}function d0(i,e){let t=ek(i,e);if(t!==-1)return t;let n=e[Ut];n.firstCreatePass&&(i.injectorIndex=e.length,LS(n.data,i),LS(e,null),LS(n.blueprint,null));let r=bE(i,e),o=i.injectorIndex;if(QN(r)){let s=l0(r),a=c0(r,e),l=a[Ut].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function LS(i,e){i.push(0,0,0,0,0,0,0,0,e)}function ek(i,e){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||e[i.injectorIndex+8]===null?-1:i.injectorIndex}function bE(i,e){if(i.parent&&i.parent.injectorIndex!==-1)return i.parent.injectorIndex;let t=0,n=null,r=e;for(;r!==null;){if(n=ok(r),n===null)return Uu;if(t++,r=r[eh],n.injectorIndex!==-1)return n.injectorIndex|t<<16}return Uu}function sM(i,e,t){o6(i,e,t)}function s6(i,e){if(e==="class")return i.classes;if(e==="style")return i.styles;let t=i.attrs;if(t){let n=t.length,r=0;for(;r>20,u=n?a:a+d,h=r?a+d:c;for(let p=u;p=l&&f.type===t)return p}if(r){let p=s[l];if(p&&wa(p)&&p.type===t)return l}return null}function Uc(i,e,t,n){let r=i[t],o=e.data;if(JW(r)){let s=r;s.resolving&&F8(L8(o[t]));let a=SA(s.canSeeViewProviders);s.resolving=!0;let l,c=s.injectImpl?Do(s.injectImpl):null,d=jN(i,n,en.Default);try{r=i[t]=s.factory(void 0,o,i,n),e.firstCreatePass&&t>=n.directiveStart&&QW(t,o[t],e)}finally{c!==null&&Do(c),SA(a),s.resolving=!1,YN()}}return r}function l6(i){if(typeof i=="string")return i.charCodeAt(0)||0;let e=i.hasOwnProperty(Pf)?i[Pf]:void 0;return typeof e=="number"?e>=0?e&KN:c6:e}function MA(i,e,t){let n=1<>JN)]&n)}function EA(i,e){return!(i&en.Self)&&!(i&en.Host&&e)}var kc=class{constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return ik(this._tNode,this._lView,e,M0(n),t)}};function c6(){return new kc(Xi(),jt())}function Ai(i){return zf(()=>{let e=i.prototype.constructor,t=e[t0]||aM(e),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let o=r[t0]||aM(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function aM(i){return nN(i)?()=>{let e=aM($i(i));return e&&e()}:Hu(i)}function d6(i,e,t,n,r){let o=i,s=e;for(;o!==null&&s!==null&&s[Pt]&2048&&!(s[Pt]&512);){let a=rk(o,s,t,n|en.Self,Rs);if(a!==Rs)return a;let l=o.parent;if(!l){let c=s[IN];if(c){let d=c.get(t,Rs,n);if(d!==Rs)return d}l=ok(s),s=s[eh]}o=l}return r}function ok(i){let e=i[Ut],t=e.type;return t===2?e.declTNode:t===1?i[Xr]:null}function ro(i){return s6(Xi(),i)}function IA(i,e=null,t=null,n){let r=sk(i,e,t,n);return r.resolveInjectorInitializers(),r}function sk(i,e=null,t=null,n,r=new Set){let o=[t||Tr,fW(i)];return n=n||(typeof i=="object"?void 0:Pr(i)),new Nf(o,e||P0(),n||null,r)}var Nc=class Nc{static create(e,t){if(Array.isArray(e))return IA({name:""},t,e,"");{let n=e.name??"";return IA({name:n},e.parent,e.providers,n)}}};Nc.THROW_IF_NOT_FOUND=Rf,Nc.NULL=new r0,Nc.\u0275prov=ee({token:Nc,providedIn:"any",factory:()=>X(uN)}),Nc.__NG_ELEMENT_ID__=-1;var yt=Nc;var u6=new ge("");u6.__NG_ELEMENT_ID__=i=>{let e=Xi();if(e===null)throw new Oe(204,!1);if(e.type&2)return e.value;if(i&en.Optional)return null;throw new Oe(204,!1)};var h6="ngOriginalError";function FS(i){return i[h6]}var Rr=class{constructor(){this._console=console}handleError(e){let t=this._findOriginalError(e);this._console.error("ERROR",e),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&FS(e);for(;t&&FS(t);)t=FS(t);return t||null}},ak=new ge("",{providedIn:"root",factory:()=>te(Rr).handleError.bind(void 0)}),Ni=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=p6,e.__NG_ENV_ID__=n=>n;let i=e;return i})(),lM=class extends Ni{constructor(e){super(),this._lView=e}onDestroy(e){return LN(this._lView,e),()=>kW(this._lView,e)}};function p6(){return new lM(jt())}function f6(){return th(Xi(),jt())}function th(i,e){return new Re(Ro(i,e))}var Re=(()=>{let e=class e{constructor(n){this.nativeElement=n}};e.__NG_ELEMENT_ID__=f6;let i=e;return i})();function lk(i){return i instanceof Re?i.nativeElement:i}var $c=(()=>{let e=class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Dn(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}};e.\u0275prov=ee({token:e,providedIn:"root",factory:()=>new e});let i=e;return i})();var cM=class extends me{constructor(e=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=e,EN()&&(this.destroyRef=te(Ni,{optional:!0})??void 0,this.pendingTasks=te($c,{optional:!0})??void 0)}emit(e){let t=sn(null);try{super.next(e)}finally{sn(t)}}subscribe(e,t,n){let r=e,o=t||(()=>null),s=n;if(e&&typeof e=="object"){let l=e;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return e instanceof Ct&&e.add(a),a}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},Pe=cM;function m6(){return this._results[Symbol.iterator]()}var Yi=class i{get changes(){return this._changes??=new Pe}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;let t=i.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=m6)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=Y8(e);(this._changesDetected=!q8(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}};function ck(i){return(i.flags&128)===128}var dk=new Map,g6=0;function _6(){return g6++}function v6(i){dk.set(i[O0],i)}function b6(i){dk.delete(i[O0])}var TA="__ngContext__";function El(i,e){wl(e)?(i[TA]=e[O0],v6(e)):i[TA]=e}function uk(i){return pk(i[kf])}function hk(i){return pk(i[cs])}function pk(i){for(;i!==null&&!Ma(i);)i=i[cs];return i}var dM;function fk(i){dM=i}function y6(){if(dM!==void 0)return dM;if(typeof document<"u")return document;throw new Oe(210,!1)}var Hf=new ge("",{providedIn:"root",factory:()=>x6}),x6="ng",yE=new ge(""),Ea=new ge("",{providedIn:"platform",factory:()=>"unknown"});var Zn=new ge(""),Gf=new ge("",{providedIn:"root",factory:()=>y6().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var w6="h",C6="b";var S6=()=>null;function xE(i,e,t=!1){return S6(i,e,t)}var mk=!1,M6=new ge("",{providedIn:"root",factory:()=>mk});var jv;function E6(){if(jv===void 0&&(jv=null,Of.trustedTypes))try{jv=Of.trustedTypes.createPolicy("angular",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return jv}function H0(i){return E6()?.createHTML(i)||i}var Ca=class{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${eN})`}},uM=class extends Ca{getTypeName(){return"HTML"}},hM=class extends Ca{getTypeName(){return"Style"}},pM=class extends Ca{getTypeName(){return"Script"}},fM=class extends Ca{getTypeName(){return"URL"}},mM=class extends Ca{getTypeName(){return"ResourceURL"}};function Ia(i){return i instanceof Ca?i.changingThisBreaksApplicationSecurity:i}function nh(i,e){let t=I6(i);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${eN})`)}return t===e}function I6(i){return i instanceof Ca&&i.getTypeName()||null}function gk(i){return new uM(i)}function _k(i){return new hM(i)}function vk(i){return new pM(i)}function bk(i){return new fM(i)}function yk(i){return new mM(i)}function T6(i){let e=new _M(i);return D6()?new gM(e):e}var gM=class{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{let t=new window.DOMParser().parseFromString(H0(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch{return null}}},_M=class{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=H0(e),t}};function D6(){try{return!!new window.DOMParser().parseFromString(H0(""),"text/html")}catch{return!1}}var P6=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function wE(i){return i=String(i),i.match(P6)?i:"unsafe:"+i}function Ta(i){let e={};for(let t of i.split(","))e[t]=!0;return e}function jf(...i){let e={};for(let t of i)for(let n in t)t.hasOwnProperty(n)&&(e[n]=!0);return e}var xk=Ta("area,br,col,hr,img,wbr"),wk=Ta("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Ck=Ta("rp,rt"),O6=jf(Ck,wk),R6=jf(wk,Ta("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),A6=jf(Ck,Ta("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),DA=jf(xk,R6,A6,O6),Sk=Ta("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),N6=Ta("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),k6=Ta("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),L6=jf(Sk,N6,k6),F6=Ta("script,style,template"),vM=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=z6(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=V6(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=PA(e).toLowerCase();if(!DA.hasOwnProperty(t))return this.sanitizedSomething=!0,!F6.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r"),!0}endElement(e){let t=PA(e).toLowerCase();DA.hasOwnProperty(t)&&!xk.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(OA(e))}};function B6(i,e){return(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function V6(i){let e=i.nextSibling;if(e&&i!==e.previousSibling)throw Mk(e);return e}function z6(i){let e=i.firstChild;if(e&&B6(i,e))throw Mk(e);return e}function PA(i){let e=i.nodeName;return typeof e=="string"?e:"FORM"}function Mk(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var U6=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,H6=/([^\#-~ |!])/g;function OA(i){return i.replace(/&/g,"&").replace(U6,function(e){let t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((t-55296)*1024+(n-56320)+65536)+";"}).replace(H6,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}var Wv;function Ek(i,e){let t=null;try{Wv=Wv||T6(i);let n=e?String(e):"";t=Wv.getInertBodyElement(n);let r=5,o=n;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,n=o,o=t.innerHTML,t=Wv.getInertBodyElement(n)}while(n!==o);let a=new vM().sanitizeChildren(RA(t)||t);return H0(a)}finally{if(t){let n=RA(t)||t;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function RA(i){return"content"in i&&G6(i)?i.content:null}function G6(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var Zr=function(i){return i[i.NONE=0]="NONE",i[i.HTML=1]="HTML",i[i.STYLE=2]="STYLE",i[i.SCRIPT=3]="SCRIPT",i[i.URL=4]="URL",i[i.RESOURCE_URL=5]="RESOURCE_URL",i}(Zr||{});var j6=/^>|^->||--!>|)/g,$6="\u200B$1\u200B";function q6(i){return i.replace(j6,e=>e.replace(W6,$6))}function Ik(i){return i.ownerDocument.defaultView}function G0(i){return i.ownerDocument}function Tk(i){return i instanceof Function?i():i}function Dk(i){return(i??te(yt)).get(Ea)==="browser"}var Sa=function(i){return i[i.Important=1]="Important",i[i.DashCase=2]="DashCase",i}(Sa||{}),Y6;function CE(i,e){return Y6(i,e)}function Vu(i,e,t,n,r){if(n!=null){let o,s=!1;Ma(n)?o=n:wl(n)&&(s=!0,n=n[Ls]);let a=Ns(n);i===0&&t!==null?r==null?Nk(e,t,a):u0(e,t,a,r||null,!0):i===1&&t!==null?u0(e,t,a,r||null,!0):i===2?c$(e,a,s):i===3&&e.destroyNode(a),o!=null&&u$(e,i,o,t,r)}}function X6(i,e){return i.createText(e)}function Z6(i,e,t){i.setValue(e,t)}function Q6(i,e){return i.createComment(q6(e))}function Pk(i,e,t){return i.createElement(e,t)}function K6(i,e){Ok(i,e),e[Ls]=null,e[Xr]=null}function J6(i,e,t,n,r,o){n[Ls]=r,n[Xr]=e,$0(i,n,t,1,r,o)}function Ok(i,e){e[ya].changeDetectionScheduler?.notify(8),$0(i,e,e[ri],2,null,null)}function e$(i){let e=i[kf];if(!e)return BS(i[Ut],i);for(;e;){let t=null;if(wl(e))t=e[kf];else{let n=e[hr];n&&(t=n)}if(!t){for(;e&&!e[cs]&&e!==i;)wl(e)&&BS(e[Ut],e),e=e[pr];e===null&&(e=i),wl(e)&&BS(e[Ut],e),t=e&&e[cs]}e=t}}function t$(i,e,t,n){let r=hr+n,o=t.length;n>0&&(t[r-1][cs]=e),n0&&(i[t-1][cs]=n[cs]);let o=i0(i,hr+e);K6(n[Ut],n);let s=o[xa];s!==null&&s.detachView(o[Ut]),n[pr]=null,n[cs]=null,n[Pt]&=-129}return n}function j0(i,e){if(!(e[Pt]&256)){let t=e[ri];t.destroyNode&&$0(i,e,t,3,null,null),e$(e)}}function BS(i,e){if(e[Pt]&256)return;let t=sn(null);try{e[Pt]&=-129,e[Pt]|=256,e[Po]&&uv(e[Po]),i$(i,e),n$(i,e),e[Ut].type===1&&e[ri].destroy();let n=e[Lc];if(n!==null&&Ma(e[pr])){n!==e[pr]&&SE(n,e);let r=e[xa];r!==null&&r.detachView(i)}b6(e)}finally{sn(t)}}function n$(i,e){let t=i.cleanup,n=e[o0];if(t!==null)for(let o=0;o=0?n[s]():n[-s].unsubscribe(),o+=2}else{let s=n[t[o+1]];t[o].call(s)}n!==null&&(e[o0]=null);let r=e[xl];if(r!==null){e[xl]=null;for(let o=0;o-1){let{encapsulation:o}=i.data[n.directiveStart+r];if(o===As.None||o===As.Emulated)return null}return Ro(n,t)}}function u0(i,e,t,n,r){i.insertBefore(e,t,n,r)}function Nk(i,e,t){i.appendChild(e,t)}function AA(i,e,t,n,r){n!==null?u0(i,e,t,n,r):Nk(i,e,t)}function o$(i,e,t,n){i.removeChild(e,t,n)}function ME(i,e){return i.parentNode(e)}function s$(i,e){return i.nextSibling(e)}function kk(i,e,t){return l$(i,e,t)}function a$(i,e,t){return i.type&40?Ro(i,t):null}var l$=a$,NA;function W0(i,e,t,n){let r=Ak(i,n,e),o=e[ri],s=n.parent||e[Xr],a=kk(s,n,e);if(r!=null)if(Array.isArray(t))for(let l=0;lOr&&zk(i,e,Or,!1),Os(s?2:0,r),t(n,r)}finally{Vc(o),Os(s?3:1,r)}}function TE(i,e,t){if(dE(e)){let n=sn(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;snull;function y$(i,e,t,n){let r=Xk(e);r.push(t),i.firstCreatePass&&Zk(i).push(n,r.length-1)}function x$(i,e,t,n,r,o){let s=e?e.injectorIndex:-1,a=0;return VN()&&(a|=128),{type:t,index:n,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function kA(i,e,t,n,r){for(let o in e){if(!e.hasOwnProperty(o))continue;let s=e[o];if(s===void 0)continue;n??={};let a,l=Cl.None;Array.isArray(s)?(a=s[0],l=s[1]):a=s;let c=o;if(r!==null){if(!r.hasOwnProperty(o))continue;c=r[o]}i===0?LA(n,t,c,a,l):LA(n,t,c,a)}return n}function LA(i,e,t,n,r){let o;i.hasOwnProperty(t)?(o=i[t]).push(e,n):o=i[t]=[e,n],r!==void 0&&o.push(r)}function w$(i,e,t){let n=e.directiveStart,r=e.directiveEnd,o=i.data,s=e.attrs,a=[],l=null,c=null;for(let d=n;d0;){let t=i[--e];if(typeof t=="number"&&t<0)return t}return 0}function I$(i,e,t,n){let r=t.directiveStart,o=t.directiveEnd;R0(t)&&N$(e,t,i.data[r+t.componentOffset]),i.firstCreatePass||d0(t,e),El(n,e);let s=t.initialInputs;for(let a=r;a{N0(i.lView)},consumerOnSignalRead(){this.lView[Po]=this}});function q$(i){let e=i[Po]??Object.create(Y$);return e.lView=i,e}var Y$=wt(Z({},Su),{consumerIsAlwaysLive:!0,consumerMarkedDirty:i=>{let e=Bc(i.lView);for(;e&&!n2(e[Ut]);)e=Bc(e);e&&kN(e)},consumerOnSignalRead(){this.lView[Po]=this}});function n2(i){return i.type!==2}var X$=100;function i2(i,e=!0,t=0){let n=i[ya],r=n.rendererFactory,o=!1;o||r.begin?.();try{Z$(i,t)}catch(s){throw e&&Kk(i,s),s}finally{o||(r.end?.(),n.inlineEffectRunner?.flush())}}function Z$(i,e){let t=UN();try{wA(!0),wM(i,e);let n=0;for(;Lf(i);){if(n===X$)throw new Oe(103,!1);n++,wM(i,1)}}finally{wA(t)}}function Q$(i,e,t,n){let r=e[Pt];if((r&256)===256)return;let o=!1,s=!1;!o&&e[ya].inlineEffectRunner?.flush(),_E(e);let a=!0,l=null,c=null;o||(n2(i)?(c=G$(e),l=bf(c)):xR()===null?(a=!1,c=q$(e),l=bf(c)):e[Po]&&(uv(e[Po]),e[Po]=null));try{NN(e),GW(i.bindingStartIndex),t!==null&&Gk(i,e,t,2,n);let d=(r&3)===3;if(!o)if(d){let p=i.preOrderCheckHooks;p!==null&&Zv(e,p,null)}else{let p=i.preOrderHooks;p!==null&&Qv(e,p,0,null),NS(e,0)}if(s||K$(e),r2(e,0),i.contentQueries!==null&&Yk(i,e),!o)if(d){let p=i.contentCheckHooks;p!==null&&Zv(e,p)}else{let p=i.contentHooks;p!==null&&Qv(e,p,1),NS(e,1)}f$(i,e);let u=i.components;u!==null&&s2(e,u,0);let h=i.viewQuery;if(h!==null&&xM(2,h,n),!o)if(d){let p=i.viewCheckHooks;p!==null&&Zv(e,p)}else{let p=i.viewHooks;p!==null&&Qv(e,p,2),NS(e,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),e[Xv]){for(let p of e[Xv])p();e[Xv]=null}o||(e[Pt]&=-73)}catch(d){throw o||N0(e),d}finally{c!==null&&(cv(c,l),a&&W$(c)),vE()}}function r2(i,e){for(let t=uk(i);t!==null;t=hk(t))for(let n=hr;n-1&&(Ff(e,n),i0(t,n))}this._attachedToViewContainer=!1}j0(this._lView[Ut],this._lView)}onDestroy(e){LN(this._lView,e)}markForCheck(){FE(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Pt]&=-129}reattach(){nM(this._lView),this._lView[Pt]|=128}detectChanges(){this._lView[Pt]|=1024,i2(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Oe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=eM(this._lView),t=this._lView[Lc];t!==null&&!e&&SE(t,this._lView),Ok(this._lView[Ut],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Oe(902,!1);this._appRef=e;let t=eM(this._lView),n=this._lView[Lc];n!==null&&!t&&Rk(n,this._lView),nM(this._lView)}},Hn=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=n9;let i=e;return i})(),e9=Hn,t9=class extends e9{constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=Wf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new Hc(r)}};function n9(){return X0(Xi(),jt())}function X0(i,e){return i.type&4?new t9(e,i,th(i,e)):null}var lEe=new RegExp(`^(\\d+)*(${C6}|${w6})*(.*)`);var i9=()=>null;function Xu(i,e){return i9(i,e)}var Zu=class{},BE=new ge("",{providedIn:"root",factory:()=>!1});var a2=new ge(""),CM=class{},p0=class{};function r9(i){let e=Error(`No component factory found for ${Pr(i)}.`);return e[o9]=i,e}var o9="ngComponent";var SM=class{resolveComponentFactory(e){throw r9(e)}},XE=class XE{};XE.NULL=new SM;var ds=XE,Il=class{},qc=(()=>{let e=class e{constructor(){this.destroyNode=null}};e.__NG_ELEMENT_ID__=()=>s9();let i=e;return i})();function s9(){let i=jt(),e=Xi(),t=Dl(e.index,i);return(wl(t)?t:i)[ri]}var a9=(()=>{let e=class e{};e.\u0275prov=ee({token:e,providedIn:"root",factory:()=>null});let i=e;return i})();var FA=new Set;function Ao(i){FA.has(i)||(FA.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}function l2(i){let e=!0;return setTimeout(()=>{e&&(e=!1,i())}),typeof Of.requestAnimationFrame=="function"&&Of.requestAnimationFrame(()=>{e&&(e=!1,i())}),()=>{e=!1}}function BA(i){let e=!0;return queueMicrotask(()=>{e&&i()}),()=>{e=!1}}function VA(...i){}var Le=class i{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Pe(!1),this.onMicrotaskEmpty=new Pe(!1),this.onStable=new Pe(!1),this.onError=new Pe(!1),typeof Zone>"u")throw new Oe(908,!1);Zone.assertZonePatched();let r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&t,r.shouldCoalesceRunChangeDetection=n,r.callbackScheduled=!1,d9(r)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get("isAngularZone")===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new Oe(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new Oe(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,l9,VA,VA);try{return o.runTask(s,t,n)}finally{o.cancelTask(s)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},l9={};function VE(i){if(i._nesting==0&&!i.hasPendingMicrotasks&&!i.isStable)try{i._nesting++,i.onMicrotaskEmpty.emit(null)}finally{if(i._nesting--,!i.hasPendingMicrotasks)try{i.runOutsideAngular(()=>i.onStable.emit(null))}finally{i.isStable=!0}}}function c9(i){i.isCheckStableRunning||i.callbackScheduled||(i.callbackScheduled=!0,Zone.root.run(()=>{l2(()=>{i.callbackScheduled=!1,MM(i),i.isCheckStableRunning=!0,VE(i),i.isCheckStableRunning=!1})}),MM(i))}function d9(i){let e=()=>{c9(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,n,r,o,s,a)=>{if(u9(a))return t.invokeTask(r,o,s,a);try{return zA(i),t.invokeTask(r,o,s,a)}finally{(i.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&e(),UA(i)}},onInvoke:(t,n,r,o,s,a,l)=>{try{return zA(i),t.invoke(r,o,s,a,l)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!h9(a)&&e(),UA(i)}},onHasTask:(t,n,r,o)=>{t.hasTask(r,o),n===r&&(o.change=="microTask"?(i._hasPendingMicrotasks=o.microTask,MM(i),VE(i)):o.change=="macroTask"&&(i.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,n,r,o)=>(t.handleError(r,o),i.runOutsideAngular(()=>i.onError.emit(o)),!1)})}function MM(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function zA(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function UA(i){i._nesting--,VE(i)}var EM=class{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Pe,this.onMicrotaskEmpty=new Pe,this.onStable=new Pe,this.onError=new Pe}run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function u9(i){return c2(i,"__ignore_ng_zone__")}function h9(i){return c2(i,"__scheduler_tick__")}function c2(i,e){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[e]===!0}var Dr=function(i){return i[i.EarlyRead=0]="EarlyRead",i[i.Write=1]="Write",i[i.MixedReadWrite=2]="MixedReadWrite",i[i.Read=3]="Read",i}(Dr||{}),d2={destroy(){}};function qf(i,e){!e&&Ju(qf);let t=e?.injector??te(yt);return Dk(t)?(Ao("NgAfterRender"),u2(i,t,!1,e?.phase??Dr.MixedReadWrite)):d2}function fr(i,e){!e&&Ju(fr);let t=e?.injector??te(yt);return Dk(t)?(Ao("NgAfterNextRender"),u2(i,t,!0,e?.phase??Dr.MixedReadWrite)):d2}function p9(i,e){if(i instanceof Function)switch(e){case Dr.EarlyRead:return{earlyRead:i};case Dr.Write:return{write:i};case Dr.MixedReadWrite:return{mixedReadWrite:i};case Dr.Read:return{read:i}}return i}function u2(i,e,t,n){let r=p9(i,n),o=e.get(zE),s=o.handler??=new TM,a=[],l=[],c=()=>{for(let p of l)s.unregister(p);d()},d=e.get(Ni).onDestroy(c),u=0,h=(p,f)=>{if(!f)return;let m=t?(...g)=>(u--,u<1&&c(),f(...g)):f,b=ks(e,()=>new IM(p,a,m));s.register(b),l.push(b),u++};return h(Dr.EarlyRead,r.earlyRead),h(Dr.Write,r.write),h(Dr.MixedReadWrite,r.mixedReadWrite),h(Dr.Read,r.read),{destroy:c}}var IM=class{constructor(e,t,n){this.phase=e,this.pipelinedArgs=t,this.callbackFn=n,this.zone=te(Le),this.errorHandler=te(Rr,{optional:!0}),te(Zu,{optional:!0})?.notify(6)}invoke(){try{let e=this.zone.runOutsideAngular(()=>this.callbackFn.apply(null,this.pipelinedArgs));this.pipelinedArgs.splice(0,this.pipelinedArgs.length,e)}catch(e){this.errorHandler?.handleError(e)}}},TM=class{constructor(){this.executingCallbacks=!1,this.buckets={[Dr.EarlyRead]:new Set,[Dr.Write]:new Set,[Dr.MixedReadWrite]:new Set,[Dr.Read]:new Set},this.deferredCallbacks=new Set}register(e){(this.executingCallbacks?this.deferredCallbacks:this.buckets[e.phase]).add(e)}unregister(e){this.buckets[e.phase].delete(e),this.deferredCallbacks.delete(e)}execute(){this.executingCallbacks=!0;for(let e of Object.values(this.buckets))for(let t of e)t.invoke();this.executingCallbacks=!1;for(let e of this.deferredCallbacks)this.buckets[e.phase].add(e);this.deferredCallbacks.clear()}destroy(){for(let e of Object.values(this.buckets))e.clear();this.deferredCallbacks.clear()}},zE=(()=>{let e=class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){let n=[...this.internalCallbacks];this.internalCallbacks.length=0;for(let r of n)r()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}};e.\u0275prov=ee({token:e,providedIn:"root",factory:()=>new e});let i=e;return i})();function f0(i,e,t){let n=t?i.styles:null,r=t?i.classes:null,o=0;if(e!==null)for(let s=0;s0&&Bk(i,t,o.join(" "))}}function y9(i,e,t){let n=i.projection=[];for(let r=0;r{let e=class e{};e.__NG_ELEMENT_ID__=w9;let i=e;return i})();function w9(){let i=Xi();return p2(i,jt())}var C9=Yt,h2=class extends C9{constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return th(this._hostTNode,this._hostLView)}get injector(){return new kc(this._hostTNode,this._hostLView)}get parentInjector(){let e=bE(this._hostTNode,this._hostLView);if(QN(e)){let t=c0(e,this._hostLView),n=l0(e),r=t[Ut].data[n+8];return new kc(r,t)}else return new kc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=GA(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-hr}createEmbeddedView(e,t,n){let r,o;typeof n=="number"?r=n:n!=null&&(r=n.index,o=n.injector);let s=Xu(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,Yu(this._hostTNode,s)),a}createComponent(e,t,n,r,o){let s=e&&!MW(e),a;if(s)a=t;else{let f=t||{};a=f.index,n=f.injector,r=f.projectableNodes,o=f.environmentInjector||f.ngModuleRef}let l=s?e:new Qu(Sl(e)),c=n||this.parentInjector;if(!o&&l.ngModule==null){let m=(s?c:this.parentInjector).get(qi,null);m&&(o=m)}let d=Sl(l.componentType??{}),u=Xu(this._lContainer,d?.id??null),h=u?.firstChild??null,p=l.create(c,r,h,o);return this.insertImpl(p.hostView,a,Yu(this._hostTNode,u)),p}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(AW(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[pr],c=new h2(l,l[Xr],l[pr]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return $f(s,r,o,n),e.attachToViewContainerRef(),dN(VS(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=GA(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=Ff(this._lContainer,t);n&&(i0(VS(this._lContainer),t),j0(n[Ut],n))}detach(e){let t=this._adjustIndex(e,-1),n=Ff(this._lContainer,t);return n&&i0(VS(this._lContainer),t)!=null?new Hc(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function GA(i){return i[s0]}function VS(i){return i[s0]||(i[s0]=[])}function p2(i,e){let t,n=e[i.index];return Ma(n)?t=n:(t=qk(n,e,null,i),e[i.index]=t,Y0(e,t)),M9(t,e,i,n),new h2(t,i,e)}function S9(i,e){let t=i[ri],n=t.createComment(""),r=Ro(e,i),o=ME(t,r);return u0(t,o,n,s$(t,r),!1),n}var M9=T9,E9=()=>!1;function I9(i,e,t){return E9(i,e,t)}function T9(i,e,t,n){if(i[Fc])return;let r;t.type&8?r=Ns(n):r=S9(e,t),i[Fc]=r}var PM=class i{constructor(e){this.queryList=e,this.matches=null}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},OM=class i{constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let n=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let o=0;o0)n.push(s[a/2]);else{let c=o[a+1],d=e[-l];for(let u=hr;ue.trim())}function _2(i,e,t){i.queries===null&&(i.queries=new RM),i.queries.track(new AM(e,t))}function k9(i,e){let t=i.contentQueries||(i.contentQueries=[]),n=t.length?t[t.length-1]:-1;e!==n&&t.push(i.queries.length-1,e)}function HE(i,e){return i.queries.getByIndex(e)}function v2(i,e){let t=i[Ut],n=HE(t,e);return n.crossesNgTemplate?NM(t,i,e,[]):f2(t,i,n,e)}function GE(i){return typeof i=="function"&&i[Eo]!==void 0}function xt(i,e){Ao("NgSignals");let t=RR(i),n=t[Eo];return e?.equal&&(n.equal=e.equal),t.set=r=>pS(n,r),t.update=r=>AR(n,r),t.asReadonly=L9.bind(t),t}function L9(){let i=this[Eo];if(i.readonlyFn===void 0){let e=()=>this();e[Eo]=i,i.readonlyFn=e}return i.readonlyFn}function b2(i,e){let t,n=hS(()=>{t._dirtyCounter();let r=z9(t,i);if(e&&r===void 0)throw new Oe(-951,!1);return r});return t=n[Eo],t._dirtyCounter=xt(0),t._flatValue=void 0,n}function F9(){return b2(!0,!1)}function B9(){return b2(!0,!0)}function V9(i,e){let t=i[Eo];t._lView=jt(),t._queryIndex=e,t._queryList=UE(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(n=>n+1))}function z9(i,e){let t=i._lView,n=i._queryIndex;if(t===void 0||n===void 0||t[Pt]&4)return e?void 0:Tr;let r=UE(t,n),o=v2(t,n);return r.reset(o,lk),e?r.first:r._changesDetected||i._flatValue===void 0?i._flatValue=r.toArray():i._flatValue}function jA(i,e){return F9()}function U9(i,e){return B9()}var y2=(jA.required=U9,jA);function H9(i){return Object.getPrototypeOf(i.prototype).constructor}function nn(i){let e=H9(i.type),t=!0,n=[i];for(;e;){let r;if(wa(i))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Oe(903,!1);r=e.\u0275dir}if(r){if(t){n.push(r);let s=i;s.inputs=$v(i.inputs),s.inputTransforms=$v(i.inputTransforms),s.declaredInputs=$v(i.declaredInputs),s.outputs=$v(i.outputs);let a=r.hostBindings;a&&q9(i,a);let l=r.viewQuery,c=r.contentQueries;if(l&&W9(i,l),c&&$9(i,c),G9(i,r),T8(i.outputs,r.outputs),wa(r)&&r.data.animation){let d=i.data;d.animation=(d.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s=0;n--){let r=i[n];r.hostVars=e+=r.hostVars,r.hostAttrs=Af(r.hostAttrs,t=Af(t,r.hostAttrs))}}function $v(i){return i===ba?{}:i===Tr?[]:i}function W9(i,e){let t=i.viewQuery;t?i.viewQuery=(n,r)=>{e(n,r),t(n,r)}:i.viewQuery=e}function $9(i,e){let t=i.contentQueries;t?i.contentQueries=(n,r,o)=>{e(n,r,o),t(n,r,o)}:i.contentQueries=e}function q9(i,e){let t=i.hostBindings;t?i.hostBindings=(n,r)=>{e(n,r),t(n,r)}:i.hostBindings=e}function x2(i){let e=t=>{let n=(Array.isArray(i)?i:i()).map(r=>typeof r=="function"?{directive:$i(r),inputs:ba,outputs:ba}:{directive:$i(r.directive),inputs:WA(r.inputs),outputs:WA(r.outputs)});t.hostDirectives===null?(t.findHostDirectiveDefs=w2,t.hostDirectives=n):t.hostDirectives.unshift(...n)};return e.ngInherit=!0,e}function w2(i,e,t){if(i.hostDirectives!==null)for(let n of i.hostDirectives){let r=aE(n.directive);Y9(r.declaredInputs,n.inputs),w2(r,e,t),t.set(r,n),e.push(r)}}function WA(i){if(i===void 0||i.length===0)return ba;let e={};for(let t=0;tt()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},LM=class extends Bf{constructor(e){super(),this.moduleType=e}create(e){return new kM(this.moduleType,e,[])}};var _0=class extends Tl{constructor(e){super(),this.componentFactoryResolver=new m0(this),this.instance=null;let t=new Nf([...e.providers,{provide:Tl,useValue:this},{provide:ds,useValue:this.componentFactoryResolver}],e.parent||P0(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function jE(i,e,t=null){return new _0({providers:i,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}function C2(i){return Z9(i)?Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i:!1}function X9(i,e){if(Array.isArray(i))for(let t=0;t>17&32767}function o7(i){return(i&2)==2}function s7(i,e){return i&131071|e<<17}function BM(i){return i|2}function Ku(i){return(i&131068)>>2}function zS(i,e){return i&-131069|e<<2}function a7(i){return(i&1)===1}function VM(i){return i|1}function l7(i,e,t,n,r,o){let s=o?e.classBindings:e.styleBindings,a=Gc(s),l=Ku(s);i[n]=t;let c=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||Uf(u,d)>0)&&(c=!0)}else d=t;if(r)if(l!==0){let h=Gc(i[a+1]);i[n+1]=qv(h,a),h!==0&&(i[h+1]=zS(i[h+1],n)),i[a+1]=s7(i[a+1],n)}else i[n+1]=qv(a,0),a!==0&&(i[a+1]=zS(i[a+1],n)),a=n;else i[n+1]=qv(l,0),a===0?a=n:i[l+1]=zS(i[l+1],n),l=n;c&&(i[n+1]=BM(i[n+1])),$A(i,d,n,!0),$A(i,d,n,!1),c7(e,d,i,n,o),s=qv(a,l),o?e.classBindings=s:e.styleBindings=s}function c7(i,e,t,n,r){let o=r?i.residualClasses:i.residualStyles;o!=null&&typeof e=="string"&&Uf(o,e)>=0&&(t[n+1]=VM(t[n+1]))}function $A(i,e,t,n){let r=i[t+1],o=e===null,s=n?Gc(r):Ku(r),a=!1;for(;s!==0&&(a===!1||o);){let l=i[s],c=i[s+1];d7(l,e)&&(a=!0,i[s+1]=n?VM(c):BM(c)),s=n?Gc(c):Ku(c)}a&&(i[t+1]=n?BM(r):VM(r))}function d7(i,e){return i===null||e==null||(Array.isArray(i)?i[1]:i)===e?!0:Array.isArray(i)&&typeof e=="string"?Uf(i,e)>=0:!1}var ls={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function u7(i){return i.substring(ls.key,ls.keyEnd)}function h7(i){return p7(i),E2(i,I2(i,0,ls.textEnd))}function E2(i,e){let t=ls.textEnd;return t===e?-1:(e=ls.keyEnd=f7(i,ls.key=e,t),I2(i,e,t))}function p7(i){ls.key=0,ls.keyEnd=0,ls.value=0,ls.valueEnd=0,ls.textEnd=i.length}function I2(i,e,t){for(;e32;)e++;return e}function N(i,e,t){let n=jt(),r=Wc();if(Oo(n,r,e)){let o=oi(),s=F0();RE(o,s,n,i,e,n[ri],t,!1)}return N}function zM(i,e,t,n,r){let o=e.inputs,s=r?"class":"style";NE(i,t,o[s],s,n)}function tn(i,e,t){return D2(i,e,t,!1),tn}function se(i,e){return D2(i,e,null,!0),se}function Nr(i){P2(y7,T2,i,!0)}function T2(i,e){for(let t=h7(e);t>=0;t=E2(e,t))I0(i,u7(e),!0)}function D2(i,e,t,n){let r=jt(),o=oi(),s=k0(2);if(o.firstUpdatePass&&R2(o,i,s,n),e!==Ar&&Oo(r,s,e)){let a=o.data[Fs()];A2(o,a,r,r[ri],i,r[s+1]=w7(e,t),n,s)}}function P2(i,e,t,n){let r=oi(),o=k0(2);r.firstUpdatePass&&R2(r,null,o,n);let s=jt();if(t!==Ar&&Oo(s,o,t)){let a=r.data[Fs()];if(N2(a,n)&&!O2(r,o)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=$S(l,t||"")),zM(r,a,s,t,n)}else x7(r,a,s,s[ri],s[o+1],s[o+1]=b7(i,e,t),n,o)}}function O2(i,e){return e>=i.expandoStartIndex}function R2(i,e,t,n){let r=i.data;if(r[t+1]===null){let o=r[Fs()],s=O2(i,t);N2(o,n)&&e===null&&!s&&(e=!1),e=m7(r,o,e,n),l7(r,o,e,t,s,n)}}function m7(i,e,t,n){let r=mE(i),o=n?e.residualClasses:e.residualStyles;if(r===null)(n?e.classBindings:e.styleBindings)===0&&(t=US(null,i,e,t,n),t=Vf(t,e.attrs,n),o=null);else{let s=e.directiveStylingLast;if(s===-1||i[s]!==r)if(t=US(r,i,e,t,n),o===null){let l=g7(i,e,n);l!==void 0&&Array.isArray(l)&&(l=US(null,i,e,l[1],n),l=Vf(l,e.attrs,n),_7(i,e,n,l))}else o=v7(i,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),t}function g7(i,e,t){let n=t?e.classBindings:e.styleBindings;if(Ku(n)!==0)return i[Gc(n)]}function _7(i,e,t,n){let r=t?e.classBindings:e.styleBindings;i[Gc(r)]=n}function v7(i,e,t){let n,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0;){let l=i[r],c=Array.isArray(l),d=c?l[1]:l,u=d===null,h=t[r+1];h===Ar&&(h=u?Tr:void 0);let p=u?RS(h,n):d===n?h:void 0;if(c&&!b0(p)&&(p=RS(l,n)),b0(p)&&(a=p,s))return a;let f=i[r+1];r=s?Gc(f):Ku(f)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=RS(l,n))}return a}function b0(i){return i!==void 0}function w7(i,e){return i==null||i===""||(typeof e=="string"?i=i+e:typeof i=="object"&&(i=Pr(Ia(i)))),i}function N2(i,e){return(i.flags&(e?8:16))!==0}function k2(i,e,t){let n=jt(),r=M2(n,i,e,t);P2(I0,T2,r,!0)}var UM=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),o=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,o),this.attach(r,s)}else this.attach(n,o)}move(e,t){this.attach(t,this.detach(e))}};function HS(i,e,t,n,r){return i===t&&Object.is(e,n)?1:Object.is(r(i,e),r(t,n))?-1:0}function C7(i,e,t){let n,r,o=0,s=i.length-1,a=void 0;if(Array.isArray(e)){let l=e.length-1;for(;o<=s&&o<=l;){let c=i.at(o),d=e[o],u=HS(o,c,o,d,t);if(u!==0){u<0&&i.updateValue(o,d),o++;continue}let h=i.at(s),p=e[l],f=HS(s,h,l,p,t);if(f!==0){f<0&&i.updateValue(s,p),s--,l--;continue}let m=t(o,c),b=t(s,h),g=t(o,d);if(Object.is(g,b)){let _=t(l,p);Object.is(_,m)?(i.swap(o,s),i.updateValue(s,p),l--,s--):i.move(s,o),i.updateValue(o,d),o++;continue}if(n??=new y0,r??=XA(i,o,s,t),HM(i,n,o,g))i.updateValue(o,d),o++,s++;else if(r.has(g))n.set(m,i.detach(o)),s--;else{let _=i.create(o,e[o]);i.attach(o,_),o++,s++}}for(;o<=l;)YA(i,n,t,o,e[o]),o++}else if(e!=null){let l=e[Symbol.iterator](),c=l.next();for(;!c.done&&o<=s;){let d=i.at(o),u=c.value,h=HS(o,d,o,u,t);if(h!==0)h<0&&i.updateValue(o,u),o++,c=l.next();else{n??=new y0,r??=XA(i,o,s,t);let p=t(o,u);if(HM(i,n,o,p))i.updateValue(o,u),o++,s++,c=l.next();else if(!r.has(p))i.attach(o,i.create(o,u)),o++,s++,c=l.next();else{let f=t(o,d);n.set(f,i.detach(o)),s--}}}for(;!c.done;)YA(i,n,t,i.length,c.value),c=l.next()}for(;o<=s;)i.destroy(i.detach(s--));n?.forEach(l=>{i.destroy(l)})}function HM(i,e,t,n){return e!==void 0&&e.has(n)?(i.attach(t,e.get(n)),e.delete(n),!0):!1}function YA(i,e,t,n,r){if(HM(i,e,n,t(n,r)))i.updateValue(n,r);else{let o=i.create(n,r);i.attach(n,o)}}function XA(i,e,t,n){let r=new Set;for(let o=e;o<=t;o++)r.add(n(o,i.at(o)));return r}var y0=class{constructor(){this.kvMap=new Map,this._vMap=void 0}has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function ae(i,e){Ao("NgControlFlow");let t=jt(),n=Wc(),r=t[n]!==Ar?t[n]:-1,o=r!==-1?x0(t,Or+r):void 0,s=0;if(Oo(t,n,i)){let a=sn(null);try{if(o!==void 0&&e2(o,s),i!==-1){let l=Or+i,c=x0(t,l),d=$M(t[Ut],l),u=Xu(c,d.tView.ssrId),h=Wf(t,d,e,{dehydratedView:u});$f(c,h,s,Yu(d,u))}}finally{sn(a)}}else if(o!==void 0){let a=Jk(o,s);a!==void 0&&(a[ur]=e)}}var GM=class{constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-hr}};function Z0(i){return i}function Qr(i,e){return e}var jM=class{constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function ln(i,e,t,n,r,o,s,a,l,c,d,u,h){Ao("NgControlFlow");let p=jt(),f=oi(),m=l!==void 0,b=jt(),g=a?s.bind(b[no][ur]):s,_=new jM(m,g);b[Or+i]=_,v0(p,f,i+1,e,t,n,r,Ml(f.consts,o)),m&&v0(p,f,i+2,l,c,d,u,Ml(f.consts,h))}var WM=class extends UM{constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n,this.operationsCounter=void 0,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-hr}at(e){return this.getLView(e)[ur].$implicit}attach(e,t){let n=t[Wu];this.needsIndexUpdate||=e!==this.length,$f(this.lContainer,t,e,Yu(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,S7(this.lContainer,e)}create(e,t){let n=Xu(this.lContainer,this.templateTNode.tView.ssrId),r=Wf(this.hostLView,this.templateTNode,new GM(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){j0(e[Ut],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[ur].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e(z0(!0),Pk(n,r,ZW()));function T7(i,e,t,n,r){let o=e.consts,s=Ml(o,n),a=ih(e,i,8,"ng-container",s);s!==null&&f0(a,s,!0);let l=Ml(o,r);return AE(e,t,a,l),e.queries!==null&&e.queries.elementStart(e,a),a}function oo(i,e,t){let n=jt(),r=oi(),o=i+Or,s=r.firstCreatePass?T7(o,r,n,e,t):r.data[o];jc(s,!0);let a=D7(r,n,s,i);return n[o]=a,V0()&&W0(r,n,a,s),El(a,n),A0(s)&&(DE(r,n,s),TE(r,s,n)),t!=null&&PE(n,s),oo}function so(){let i=Xi(),e=oi();return pE()?fE():(i=i.parent,jc(i,!1)),e.firstCreatePass&&(U0(e,i),dE(i)&&e.queries.elementEnd(i)),so}function Zi(i,e,t){return oo(i,e,t),so(),Zi}var D7=(i,e,t,n)=>(z0(!0),Q6(e[ri],""));function ie(){return jt()}function No(i,e,t){let n=jt(),r=Wc();if(Oo(n,r,e)){let o=oi(),s=F0();RE(o,s,n,i,e,n[ri],t,!0)}return No}function Yf(i,e,t){let n=jt(),r=Wc();if(Oo(n,r,e)){let o=oi(),s=F0(),a=mE(o.data),l=Qk(a,s,n);RE(o,s,n,i,e,l,t,!0)}return Yf}var w0="en-US";var P7=w0;function O7(i){typeof i=="string"&&(P7=i.toLowerCase().replace(/_/g,"-"))}var R7=(i,e,t)=>{};function H(i,e,t,n){let r=jt(),o=oi(),s=Xi();return L2(o,r,r[ri],s,i,e,n),H}function WE(i,e){let t=Xi(),n=jt(),r=oi(),o=mE(r.data),s=Qk(o,t,n);return L2(r,n,s,t,i,e),WE}function A7(i,e,t,n){let r=i.cleanup;if(r!=null)for(let o=0;ol?a[l]:null}typeof s=="string"&&(o+=2)}return null}function L2(i,e,t,n,r,o,s){let a=A0(n),c=i.firstCreatePass&&Zk(i),d=e[ur],u=Xk(e),h=!0;if(n.type&3||s){let m=Ro(n,e),b=s?s(m):m,g=u.length,_=s?C=>s(Ns(C[n.index])):n.index,x=null;if(!s&&a&&(x=A7(i,e,r,n.index)),x!==null){let C=x.__ngLastListenerFn__||x;C.__ngNextListenerFn__=o,x.__ngLastListenerFn__=o,h=!1}else{o=QA(n,e,d,o),R7(m,r,o);let C=t.listen(b,r,o);u.push(o,C),c&&c.push(r,_,g,g+1)}}else o=QA(n,e,d,o);let p=n.outputs,f;if(h&&p!==null&&(f=p[r])){let m=f.length;if(m)for(let b=0;b-1?Dl(i.index,e):e;FE(s,5);let a=ZA(e,t,n,o),l=r.__ngNextListenerFn__;for(;l;)a=ZA(e,t,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function I(i=1){return YW(i)}function N7(i,e){let t=null,n=rW(i);for(let r=0;r(z0(!0),X6(e[ri],n));function nt(i){return Me("",i,""),nt}function Me(i,e,t){let n=jt(),r=M2(n,i,e,t);return r!==Ar&&kE(n,Fs(),r),Me}function $E(i,e,t,n,r){let o=jt(),s=i7(o,i,e,t,n,r);return s!==Ar&&kE(o,Fs(),s),$E}function Yc(i,e,t,n,r,o,s,a,l){let c=jt(),d=r7(c,i,e,t,n,r,o,s,a,l);return d!==Ar&&kE(c,Fs(),d),Yc}function F7(i,e,t){let n=oi();if(n.firstCreatePass){let r=wa(i);qM(t,n.data,n.blueprint,r,!0),qM(e,n.data,n.blueprint,r,!1)}}function qM(i,e,t,n,r){if(i=$i(i),Array.isArray(i))for(let o=0;o>20;if(ju(i)||!i.multi){let p=new zc(c,r,M),f=jS(l,e,r?d:d+h,u);f===-1?(sM(d0(a,s),o,l),GS(o,i,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(p),s.push(p)):(t[f]=p,s[f]=p)}else{let p=jS(l,e,d+h,u),f=jS(l,e,d,d+h),m=p>=0&&t[p],b=f>=0&&t[f];if(r&&!b||!r&&!m){sM(d0(a,s),o,l);let g=z7(r?V7:B7,t.length,r,n,c);!r&&b&&(t[f].providerFactory=g),GS(o,i,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(g),s.push(g)}else{let g=V2(t[r?f:p],c,!r&&n);GS(o,i,p>-1?p:f,g)}!r&&n&&b&&t[f].componentProviders++}}}function GS(i,e,t,n){let r=ju(e),o=vW(e);if(r||o){let l=(o?$i(e.useClass):e).prototype.ngOnDestroy;if(l){let c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&e.multi){let d=c.indexOf(t);d===-1?c.push(t,[n,l]):c[d+1].push(n,l)}else c.push(t,l)}}}function V2(i,e,t){return t&&i.componentProviders++,i.multi.push(e)-1}function jS(i,e,t,n){for(let r=t;r{t.providersResolver=(n,r)=>F7(n,r?r(i):i,e)}}var U7=(()=>{let e=class e{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=wN(!1,n.type),o=r.length>0?jE([r],this._injector,`Standalone[${n.type.name}]`):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()}}};e.\u0275prov=ee({token:e,providedIn:"environment",factory:()=>new e(X(qi))});let i=e;return i})();function ce(i){Ao("NgStandalone"),i.getStandaloneInjector=e=>e.get(U7).getOrCreateStandaloneInjector(i)}function z2(i,e,t){let n=HN()+i,r=jt();return r[n]===Ar?S2(r,n,t?e.call(t):e()):Q9(r,n)}function Pl(i,e,t,n){return G7(jt(),HN(),i,e,t,n)}function H7(i,e){let t=i[e];return t===Ar?void 0:t}function G7(i,e,t,n,r,o){let s=e+t;return Oo(i,s,r)?S2(i,s+1,o?n.call(o,r):n(r)):H7(i,s+1)}function kt(i,e){return X0(i,e)}var Q0=(()=>{let e=class e{log(n){console.log(n)}warn(n){console.warn(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"platform"});let i=e;return i})();var U2=new ge("");function Xc(i){return!!i&&typeof i.then=="function"}function H2(i){return!!i&&typeof i.subscribe=="function"}var G2=new ge(""),j2=(()=>{let e=class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r}),this.appInits=te(G2,{optional:!0})??[]}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let s=o();if(Xc(s))n.push(s);else if(H2(s)){let a=new Promise((l,c)=>{s.subscribe({complete:l,error:c})});n.push(a)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),n.length===0&&r(),this.initialized=!0}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),qE=new ge("");function j7(){OR(()=>{throw new Oe(600,!1)})}function W7(i){return i.isBoundToModule}var $7=10;function q7(i,e,t){try{let n=t();return Xc(n)?n.catch(r=>{throw e.runOutsideAngular(()=>i.handleError(r)),r}):n}catch(n){throw e.runOutsideAngular(()=>i.handleError(n)),n}}var us=(()=>{let e=class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=te(ak),this.afterRenderEffectManager=te(zE),this.zonelessEnabled=te(BE),this.externalTestViews=new Set,this.beforeRender=new me,this.afterTick=new me,this.componentTypes=[],this.components=[],this.isStable=te($c).hasPendingTasks.pipe(Je(n=>!n)),this._injector=te(qi)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,r){let o=n instanceof p0;if(!this._injector.get(j2).done){let p=!o&&vN(n),f=!1;throw new Oe(405,f)}let a;o?a=n:a=this._injector.get(ds).resolveComponentFactory(n),this.componentTypes.push(a.componentType);let l=W7(a)?void 0:this._injector.get(Tl),c=r||a.selector,d=a.create(yt.NULL,[],c,l),u=d.location.nativeElement,h=d.injector.get(U2,null);return h?.registerApplication(u),d.onDestroy(()=>{this.detachView(d.hostView),WS(this.components,d),h?.unregisterApplication(u)}),this._loadComponent(d),d}tick(){this._tick(!0)}_tick(n){if(this._runningTick)throw new Oe(101,!1);let r=sn(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(n)}catch(o){this.internalErrorHandler(o)}finally{this._runningTick=!1,sn(r),this.afterTick.next()}}detectChangesInAttachedViews(n){let r=null;this._injector.destroyed||(r=this._injector.get(Il,null,{optional:!0}));let o=0,s=this.afterRenderEffectManager;for(;o<$7;){let a=o===0;if(n||!a){this.beforeRender.next(a);for(let{_lView:l,notifyErrorHandler:c}of this._views)Y7(l,c,a,this.zonelessEnabled)}else r?.begin?.(),r?.end?.();if(o++,s.executeInternalCallbacks(),!this.allViews.some(({_lView:l})=>Lf(l))&&(s.execute(),!this.allViews.some(({_lView:l})=>Lf(l))))break}}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;WS(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);let r=this._injector.get(qE,[]);[...this._bootstrapListeners,...r].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._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>WS(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Oe(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function WS(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function Y7(i,e,t,n){if(!t&&!Lf(i))return;i2(i,e,t&&!n?0:1)}var XM=class{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}},YE=(()=>{let e=class e{compileModuleSync(n){return new LM(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let r=this.compileModuleSync(n),o=bN(n),s=Tk(o.declarations).reduce((a,l)=>{let c=Sl(l);return c&&a.push(new Qu(c)),a},[]);return new XM(r,s)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var X7=(()=>{let e=class e{constructor(){this.zone=te(Le),this.changeDetectionScheduler=te(Zu),this.applicationRef=te(us)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),Z7=new ge("",{factory:()=>!1});function W2({ngZoneFactory:i,ignoreChangesOutsideZone:e}){return i??=()=>new Le(q2()),[{provide:Le,useFactory:i},{provide:Gu,multi:!0,useFactory:()=>{let t=te(X7,{optional:!0});return()=>t.initialize()}},{provide:Gu,multi:!0,useFactory:()=>{let t=te(K7);return()=>{t.initialize()}}},{provide:ak,useFactory:Q7},e===!0?{provide:a2,useValue:!0}:[]]}function Q7(){let i=te(Le),e=te(Rr);return t=>i.runOutsideAngular(()=>e.handleError(t))}function $2(i){let e=i?.ignoreChangesOutsideZone,t=W2({ngZoneFactory:()=>{let n=q2(i);return n.shouldCoalesceEventChangeDetection&&Ao("NgZone_CoalesceEvent"),new Le(n)},ignoreChangesOutsideZone:e});return T0([{provide:Z7,useValue:!0},{provide:BE,useValue:!1},t])}function q2(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:i?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:i?.runCoalescing??!1}}var K7=(()=>{let e=class e{constructor(){this.subscription=new Ct,this.initialized=!1,this.zone=te(Le),this.pendingTasks=te($c)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Le.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Le.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var J7=(()=>{let e=class e{constructor(){this.appRef=te(us),this.taskService=te($c),this.ngZone=te(Le),this.zonelessEnabled=te(BE),this.disableScheduling=te(a2,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new Ct,this.cancelScheduledCallback=null,this.shouldRefreshViews=!1,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof EM||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;switch(n){case 3:case 2:case 0:case 4:case 5:case 1:{this.shouldRefreshViews=!0;break}case 8:case 7:case 6:case 9:default:}if(!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?BA:l2;this.pendingRenderTaskId=this.taskService.add(),this.zoneIsDefined?Zone.root.run(()=>{this.cancelScheduledCallback=r(()=>{this.tick(this.shouldRefreshViews)})}):this.cancelScheduledCallback=r(()=>{this.tick(this.shouldRefreshViews)})}shouldScheduleTick(){return!(this.disableScheduling||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Le.isInAngularZone())}tick(n){if(this.runningTick||this.appRef.destroyed)return;let r=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick(n)},void 0,this.schedulerTickApplyArgs)}catch(o){throw this.taskService.remove(r),o}finally{this.cleanup()}this.useMicrotaskScheduler=!0,BA(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(r)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.shouldRefreshViews=!1,this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function eq(){return typeof $localize<"u"&&$localize.locale||w0}var K0=new ge("",{providedIn:"root",factory:()=>te(K0,en.Optional|en.SkipSelf)||eq()});var Y2=new ge("");var e0=null;function tq(i=[],e){return yt.create({name:e,providers:[{provide:D0,useValue:"platform"},{provide:Y2,useValue:new Set([()=>e0=null])},...i]})}function nq(i=[]){if(e0)return e0;let e=tq(i);return e0=e,j7(),iq(e),e}function iq(i){i.get(yE,null)?.forEach(t=>t())}var Fe=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=rq;let i=e;return i})();function rq(i){return oq(Xi(),jt(),(i&16)===16)}function oq(i,e,t){if(R0(i)&&!t){let n=Dl(i.index,e);return new Hc(n,n)}else if(i.type&175){let n=e[no];return new Hc(n,e)}return null}var ZM=class{constructor(){}supports(e){return C2(e)}create(e){return new QM(e)}},sq=(i,e)=>e,QM=class{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||sq}forEachItem(e){let t;for(t=this._itHead;t!==null;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,n=this._removalsHead,r=0,o=null;for(;t||n;){let s=!n||t&&t.currentIndex{s=this._trackByFn(r,a),t===null||!Object.is(t.trackById,s)?(t=this._mismatch(t,a,s,r),n=!0):(n&&(t=this._verifyReinsertion(t,a,s,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,n,r){let o;return e===null?o=this._itTail:(o=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,r)):(e=this._linkedRecords===null?null:this._linkedRecords.get(n,r),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,r)):e=this._addAfter(new KM(t,n),o,r)),e}_verifyReinsertion(e,t,n,r){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return o!==null?e=this._reinsertAfter(o,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;e!==null;){let t=e._next;this._addToRemovals(this._unlink(e)),e=t}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let r=e._prevRemoved,o=e._nextRemoved;return r===null?this._removalsHead=o:r._nextRemoved=o,o===null?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e}_moveAfter(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e}_addAfter(e,t,n){return this._insertAfter(e,t,n),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,t,n){let r=t===null?this._itHead:t._next;return e._next=r,e._prev=t,r===null?this._itTail=e:r._prev=e,t===null?this._itHead=e:t._next=e,this._linkedRecords===null&&(this._linkedRecords=new C0),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let t=e._prev,n=e._next;return t===null?this._itHead=n:t._next=n,n===null?this._itTail=t:n._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new C0),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},KM=class{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},JM=class{constructor(){this._head=null,this._tail=null}add(e){this._head===null?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let n;for(n=this._head;n!==null;n=n._nextDup)if((t===null||t<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}remove(e){let t=e._prevDup,n=e._nextDup;return t===null?this._head=n:t._nextDup=n,n===null?this._tail=t:n._prevDup=t,this._head===null}},C0=class{constructor(){this.map=new Map}put(e){let t=e.trackById,n=this.map.get(t);n||(n=new JM,this.map.set(t,n)),n.add(e)}get(e,t){let n=e,r=this.map.get(n);return r?r.get(e,t):null}remove(e){let t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function KA(i,e,t){let n=i.previousIndex;if(n===null)return n;let r=0;return t&&n{let e=class e{constructor(n){this.factories=n}static create(n,r){if(r!=null){let o=r.factories.slice();n=n.concat(o)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||JA()),deps:[[e,new rE,new E0]]}}find(n){let r=this.factories.find(o=>o.supports(n));if(r!=null)return r;throw new Oe(901,!1)}};e.\u0275prov=ee({token:e,providedIn:"root",factory:JA});let i=e;return i})();function X2(i){try{let{rootComponent:e,appProviders:t,platformProviders:n}=i,r=nq(n),o=[W2({}),{provide:Zu,useExisting:J7},...t||[]],a=new _0({providers:o,parent:r,debugName:"",runEnvironmentInitializers:!1}).injector,l=a.get(Le);return l.run(()=>{a.resolveInjectorInitializers();let c=a.get(Rr,null),d;l.runOutsideAngular(()=>{d=l.onError.subscribe({next:p=>{c.handleError(p)}})});let u=()=>a.destroy(),h=r.get(Y2);return h.add(u),a.onDestroy(()=>{d.unsubscribe(),h.delete(u)}),q7(c,l,()=>{let p=a.get(j2);return p.runInitializers(),p.donePromise.then(()=>{let f=a.get(K0,w0);O7(f||w0);let m=a.get(us);return e!==void 0&&m.bootstrap(e),m})})})}catch(e){return Promise.reject(e)}}var Z2=new ge("");function at(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function wi(i,e=NaN){return!isNaN(parseFloat(i))&&!isNaN(Number(i))?Number(i):e}function Xt(i,e){Ao("NgSignals");let t=hS(i);return e?.equal&&(t[Eo].equal=e.equal),t}function kr(i){let e=sn(null);try{return i()}finally{sn(e)}}var aq=new ge("",{providedIn:"root",factory:()=>te(lq)}),lq=(()=>{let e=class e{};e.\u0275prov=ee({token:e,providedIn:"root",factory:()=>new eE});let i=e;return i})(),eE=class{constructor(){this.queuedEffectCount=0,this.queues=new Map,this.pendingTasks=te($c),this.taskId=null}scheduleEffect(e){if(this.enqueue(e),this.taskId===null){let t=this.taskId=this.pendingTasks.add();queueMicrotask(()=>{this.flush(),this.pendingTasks.remove(t),this.taskId=null})}}enqueue(e){let t=e.creationZone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}},tE=class{constructor(e,t,n,r,o,s){this.scheduler=e,this.effectFn=t,this.creationZone=n,this.injector=o,this.watcher=kR(a=>this.runEffect(a),()=>this.schedule(),s),this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}runEffect(e){try{this.effectFn(e)}catch(t){this.injector.get(Rr,null,{optional:!0})?.handleError(t)}}run(){this.watcher.run()}schedule(){this.scheduler.scheduleEffect(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}};function mt(i,e){Ao("NgSignals"),!e?.injector&&Ju(mt);let t=e?.injector??te(yt),n=e?.manualCleanup!==!0?t.get(Ni):null,r=new tE(t.get(aq),i,typeof Zone>"u"?null:Zone.current,n,t,e?.allowSignalWrites??!1),o=t.get(Fe,null,{optional:!0});return!o||!(o._lView[Pt]&8)?r.watcher.notify():(o._lView[Xv]??=[]).push(r.watcher.notify),r}function Q2(i,e){let t=Sl(i),n=e.elementInjector||P0();return new Qu(t).create(n,e.projectableNodes,e.hostElement,e.environmentInjector)}var iL=null;function Da(){return iL}function rL(i){iL??=i}var J0=class{};var Ye=new ge(""),oL=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(cq),providedIn:"platform"});let i=e;return i})();var cq=(()=>{let e=class e extends oL{constructor(){super(),this._doc=te(Ye),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Da().getBaseHref(this._doc)}onPopState(n){let r=Da().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Da().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}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>new e,providedIn:"platform"});let i=e;return i})();function sL(i,e){if(i.length==0)return e;if(e.length==0)return i;let t=0;return i.endsWith("/")&&t++,e.startsWith("/")&&t++,t==2?i+e.substring(1):t==1?i+e:i+"/"+e}function K2(i){let e=i.match(/#|\?|$/),t=e&&e.index||i.length,n=t-(i[t-1]==="/"?1:0);return i.slice(0,n)+i.slice(t)}function Qc(i){return i&&i[0]!=="?"?"?"+i:i}var nb=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(aL),providedIn:"root"});let i=e;return i})(),dq=new ge(""),aL=(()=>{let e=class e extends nb{constructor(n,r){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??te(Ye).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return sL(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+Qc(this._platformLocation.search),o=this._platformLocation.hash;return o&&n?`${r}${o}`:r}pushState(n,r,o,s){let a=this.prepareExternalUrl(o+Qc(s));this._platformLocation.pushState(n,r,a)}replaceState(n,r,o,s){let a=this.prepareExternalUrl(o+Qc(s));this._platformLocation.replaceState(n,r,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(r){return new(r||e)(X(oL),X(dq,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Pa=(()=>{let e=class e{constructor(n){this._subject=new Pe,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=pq(K2(J2(r))),this._locationStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+Qc(r))}normalize(n){return e.stripTrailingSlash(hq(this._basePath,J2(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",o=null){this._locationStrategy.pushState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Qc(r)),o)}replaceState(n,r="",o=null){this._locationStrategy.replaceState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+Qc(r)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(o=>o(n,r))}subscribe(n,r,o){return this._subject.subscribe({next:n,error:r,complete:o})}};e.normalizeQueryParams=Qc,e.joinWithSlash=sL,e.stripTrailingSlash=K2,e.\u0275fac=function(r){return new(r||e)(X(nb))},e.\u0275prov=ee({token:e,factory:()=>uq(),providedIn:"root"});let i=e;return i})();function uq(){return new Pa(X(nb))}function hq(i,e){if(!i||!e.startsWith(i))return e;let t=e.substring(i.length);return t===""||["/",";","?","#"].includes(t[0])?t:e}function J2(i){return i.replace(/\/index.html$/,"")}function pq(i){if(new RegExp("^(https?:)?//").test(i)){let[,t]=i.split(/\/\/[^\/]+/);return t}return i}function lL(i,e){e=encodeURIComponent(e);for(let t of i.split(";")){let n=t.indexOf("="),[r,o]=n==-1?[t,""]:[t.slice(0,n),t.slice(n+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var ZE=/\s+/,eL=[],ib=(()=>{let e=class e{constructor(n,r){this._ngEl=n,this._renderer=r,this.initialClasses=eL,this.stateMap=new Map}set klass(n){this.initialClasses=n!=null?n.trim().split(ZE):eL}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(ZE):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let o=this.stateMap.get(n);o!==void 0?(o.enabled!==r&&(o.changed=!0,o.enabled=r),o.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],o=n[1];o.changed?(this._toggleClass(r,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),o.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(ZE).forEach(o=>{r?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(qc))},e.\u0275dir=ze({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0});let i=e;return i})();var QE=class{constructor(e,t,n,r){this.$implicit=e,this.ngForOf=t,this.index=n,this.count=r}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Ci=(()=>{let e=class e{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,r,o){this._viewContainer=n,this._template=r,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let n=this._ngForOf;if(!this._differ&&n)if(0)try{}catch{}else this._differ=this._differs.find(n).create(this.ngForTrackBy)}if(this._differ){let n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){let r=this._viewContainer;n.forEachOperation((o,s,a)=>{if(o.previousIndex==null)r.createEmbeddedView(this._template,new QE(o.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)r.remove(s===null?void 0:s);else if(s!==null){let l=r.get(s);r.move(l,a),tL(l,o)}});for(let o=0,s=r.length;o{let s=r.get(o.currentIndex);tL(s,o)})}static ngTemplateContextGuard(n,r){return!0}};e.\u0275fac=function(r){return new(r||e)(M(Yt),M(Hn),M(Zc))},e.\u0275dir=ze({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let i=e;return i})();function tL(i,e){i.context.$implicit=e.item}var Mn=(()=>{let e=class e{constructor(n,r){this._viewContainer=n,this._context=new KE,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){nL("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){nL("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,r){return!0}};e.\u0275fac=function(r){return new(r||e)(M(Yt),M(Hn))},e.\u0275dir=ze({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let i=e;return i})(),KE=class{constructor(){this.$implicit=null,this.ngIf=null}};function nL(i,e){if(!!!(!e||e.createEmbeddedView))throw new Error(`${i} must be a TemplateRef, but received '${Pr(e)}'.`)}var JE=class{constructor(e,t){this._viewContainerRef=e,this._templateRef=t,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}},e1=(()=>{let e=class e{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(n){this._ngSwitch=n,this._caseCount===0&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(n){this._defaultViews.push(n)}_matchCase(n){let r=n===this._ngSwitch;return this._lastCasesMatched||=r,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),r}_updateDefaultCases(n){if(this._defaultViews.length>0&&n!==this._defaultUsed){this._defaultUsed=n;for(let r of this._defaultViews)r.enforceState(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});let i=e;return i})(),cL=(()=>{let e=class e{constructor(n,r,o){this.ngSwitch=o,o._addCase(),this._view=new JE(n,r)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}};e.\u0275fac=function(r){return new(r||e)(M(Yt),M(Hn),M(e1,9))},e.\u0275dir=ze({type:e,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});let i=e;return i})();var Bs=(()=>{let e=class e{constructor(n){this._viewContainerRef=n,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,o):!1,get:(n,r,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,o)}})}};e.\u0275fac=function(r){return new(r||e)(M(Yt))},e.\u0275dir=ze({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[dn]});let i=e;return i})();var Ae=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})(),t1="browser",fq="server";function dL(i){return i===t1}function n1(i){return i===fq}var eb=class{};var r1=class{};var rh=class i{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(` +`).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=r.toLowerCase(),s=t.slice(n+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.setHeaderEntries(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new i;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...n),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var o1=class{encodeKey(e){return uL(e)}encodeValue(e){return uL(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function mq(i,e){let t=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}var gq=/%(\d[a-f0-9])/gi,_q={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function uL(i){return encodeURIComponent(i).replace(gq,(e,t)=>_q[t]??e)}function rb(i){return`${i}`}var Ol=class i{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new o1,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=mq(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],r=Array.isArray(n)?n.map(rb):[rb(n)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(n=>{let r=e[n];Array.isArray(r)?r.forEach(o=>{t.push({param:n,value:o,op:"a"})}):t.push({param:n,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new i({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(rb(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(rb(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var s1=class{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function vq(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function hL(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function pL(i){return typeof Blob<"u"&&i instanceof Blob}function fL(i){return typeof FormData<"u"&&i instanceof FormData}function bq(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var Xf=class i{constructor(e,t,n,r){this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let o;if(vq(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new rh,this.context??=new s1,!this.params)this.params=new Ol,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":ah.set(p,e.setHeaders[p]),c)),e.setParams&&(d=Object.keys(e.setParams).reduce((h,p)=>h.set(p,e.setParams[p]),d)),new i(t,n,s,{params:d,headers:c,context:u,reportProgress:l,responseType:r,withCredentials:a,transferCache:o})}},mL=function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i}(mL||{}),a1=class{constructor(e,t=200,n="OK"){this.headers=e.headers||new rh,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}};var l1=class i extends a1{constructor(e={}){super(e),this.type=mL.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new i({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}};function i1(i,e){return{body:e,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,transferCache:i.transferCache}}var gL=(()=>{let e=class e{constructor(n){this.handler=n}request(n,r,o={}){let s;if(n instanceof Xf)s=n;else{let c;o.headers instanceof rh?c=o.headers:c=new rh(o.headers);let d;o.params&&(o.params instanceof Ol?d=o.params:d=new Ol({fromObject:o.params})),s=new Xf(n,r,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:d,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let a=Ke(s).pipe(gl(c=>this.handler.handle(c)));if(n instanceof Xf||o.observe==="events")return a;let l=a.pipe(Gt(c=>c instanceof l1));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return l.pipe(Je(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return c.body}));case"blob":return l.pipe(Je(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new Error("Response is not a Blob.");return c.body}));case"text":return l.pipe(Je(c=>{if(c.body!==null&&typeof c.body!="string")throw new Error("Response is not a string.");return c.body}));case"json":default:return l.pipe(Je(c=>c.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}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 Ol().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,i1(o,r))}post(n,r,o={}){return this.request("POST",n,i1(o,r))}put(n,r,o={}){return this.request("PUT",n,i1(o,r))}};e.\u0275fac=function(r){return new(r||e)(X(r1))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})();var u1=class extends J0{constructor(){super(...arguments),this.supportsDOMEvents=!0}},h1=class i extends u1{static makeCurrent(){rL(new i)}onAndCancel(e,t,n){return e.addEventListener(t,n),()=>{e.removeEventListener(t,n)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return t=t||this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t==="window"?window:t==="document"?e:t==="body"?e.body:null}getBaseHref(e){let t=xq();return t==null?null:wq(t)}resetBaseElement(){Zf=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return lL(document.cookie,e)}},Zf=null;function xq(){return Zf=Zf||document.querySelector("base"),Zf?Zf.getAttribute("href"):null}function wq(i){return new URL(i,document.baseURI).pathname}var Cq=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),ob=new ge(""),bL=(()=>{let e=class e{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,o){return this._findPluginFor(r).addEventListener(n,r,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(s=>s.supports(n)),!r)throw new Oe(5101,!1);return this._eventNameToPlugin.set(n,r),r}};e.\u0275fac=function(r){return new(r||e)(X(ob),X(Le))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),Qf=class{constructor(e){this._doc=e}},c1="ng-app-id",yL=(()=>{let e=class e{constructor(n,r,o,s={}){this.doc=n,this.appId=r,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=n1(s),this.resetHostNodes()}addStyles(n){for(let r of n)this.changeUsageCount(r,1)===1&&this.onStyleAdded(r)}removeStyles(n){for(let r of n)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(r=>r.remove()),n.clear());for(let r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){let r=this.styleRef;r.get(n)?.elements?.forEach(o=>o.remove()),r.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${c1}="${this.appId}"]`);if(n?.length){let r=new Map;return n.forEach(o=>{o.textContent!=null&&r.set(o.textContent,o)}),r}return null}changeUsageCount(n,r){let o=this.styleRef;if(o.has(n)){let s=o.get(n);return s.usage+=r,s.usage}return o.set(n,{usage:r,elements:[]}),r}getStyleElement(n,r){let o=this.styleNodesInDOM,s=o?.get(r);if(s?.parentNode===n)return o.delete(r),s.removeAttribute(c1),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=r,this.platformIsServer&&a.setAttribute(c1,this.appId),n.appendChild(a),a}}addStyleToHost(n,r){let o=this.getStyleElement(n,r),s=this.styleRef,a=s.get(r)?.elements;a?a.push(o):s.set(r,{elements:[o],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(Hf),X(Gf,8),X(Ea))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),d1={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"},f1=/%COMP%/g,xL="%COMP%",Sq=`_nghost-${xL}`,Mq=`_ngcontent-${xL}`,Eq=!0,Iq=new ge("",{providedIn:"root",factory:()=>Eq});function Tq(i){return Mq.replace(f1,i)}function Dq(i){return Sq.replace(f1,i)}function wL(i,e){return e.map(t=>t.replace(f1,i))}var sb=(()=>{let e=class e{constructor(n,r,o,s,a,l,c,d=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=l,this.ngZone=c,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=n1(l),this.defaultRenderer=new Kf(n,a,c,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===As.ShadowDom&&(r=wt(Z({},r),{encapsulation:As.Emulated}));let o=this.getOrCreateRenderer(n,r);return o instanceof ab?o.applyToHost(n):o instanceof Jf&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,s=o.get(r.id);if(!s){let a=this.doc,l=this.ngZone,c=this.eventManager,d=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,h=this.platformIsServer;switch(r.encapsulation){case As.Emulated:s=new ab(c,d,r,this.appId,u,a,l,h);break;case As.ShadowDom:return new p1(c,d,n,r,a,l,this.nonce,h);default:s=new Jf(c,d,r,u,a,l,h);break}o.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(r){return new(r||e)(X(bL),X(yL),X(Hf),X(Iq),X(Ye),X(Ea),X(Le),X(Gf))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),Kf=class{constructor(e,t,n,r){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,t){return t?this.doc.createElementNS(d1[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(_L(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(_L(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new Oe(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let o=d1[r];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=d1[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Sa.DashCase|Sa.Important)?e.style.setProperty(t,n,r&Sa.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Sa.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n){if(typeof e=="string"&&(e=Da().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);return this.eventManager.addEventListener(e,t,this.decoratePreventDefault(n))}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function _L(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var p1=class extends Kf{constructor(e,t,n,r,o,s,a,l){super(e,o,s,l),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=wL(r.id,r.styles);for(let d of c){let u=document.createElement("style");a&&u.setAttribute("nonce",a),u.textContent=d,this.shadowRoot.appendChild(u)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(this.nodeOrShadowRoot(e),t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Jf=class extends Kf{constructor(e,t,n,r,o,s,a,l){super(e,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r,this.styles=l?wL(l,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},ab=class extends Jf{constructor(e,t,n,r,o,s,a,l){let c=r+"-"+n.id;super(e,t,n,o,s,a,l,c),this.contentAttr=Tq(c),this.hostAttr=Dq(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}},Pq=(()=>{let e=class e extends Qf{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o){return n.addEventListener(r,o,!1),()=>this.removeEventListener(n,r,o)}removeEventListener(n,r,o){return n.removeEventListener(r,o)}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),Oq=(()=>{let e=class e extends Qf{constructor(n){super(n),this.delegate=te(Z2,{optional:!0})}supports(n){return this.delegate?this.delegate.supports(n):!1}addEventListener(n,r,o){return this.delegate.addEventListener(n,r,o)}removeEventListener(n,r,o){return this.delegate.removeEventListener(n,r,o)}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),vL=["alt","control","meta","shift"],Rq={"\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"},Aq={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},Nq=(()=>{let e=class e extends Qf{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Da().onAndCancel(n,s.domEventName,a))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let s=e._normalizeKey(r.pop()),a="",l=r.indexOf("code");if(l>-1&&(r.splice(l,1),a="code."),vL.forEach(d=>{let u=r.indexOf(d);u>-1&&(r.splice(u,1),a+=d+".")}),a+=s,r.length!=0||s.length===0)return null;let c={};return c.domEventName=o,c.fullKey=a,c}static matchEventFullKeyCode(n,r){let o=Rq[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(o=n.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),vL.forEach(a=>{if(a!==o){let l=Aq[a];l(n)&&(s+=a+".")}}),s+=o,s===r)}static eventCallback(n,r,o){return s=>{e.matchEventFullKeyCode(s,n)&&o.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})();function CL(i,e){return X2(Z({rootComponent:i},kq(e)))}function kq(i){return{appProviders:[...zq,...i?.providers??[]],platformProviders:Vq}}function Lq(){h1.makeCurrent()}function Fq(){return new Rr}function Bq(){return fk(document),document}var Vq=[{provide:Ea,useValue:t1},{provide:yE,useValue:Lq,multi:!0},{provide:Ye,useFactory:Bq,deps:[]}];var zq=[{provide:D0,useValue:"root"},{provide:Rr,useFactory:Fq,deps:[]},{provide:ob,useClass:Pq,multi:!0,deps:[Ye,Le,Ea]},{provide:ob,useClass:Nq,multi:!0,deps:[Ye]},{provide:ob,useClass:Oq,multi:!0},sb,yL,bL,{provide:Il,useExisting:sb},{provide:eb,useClass:Cq,deps:[]},[]];var SL=(()=>{let e=class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var m1=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=X(Uq),o},providedIn:"root"});let i=e;return i})(),Uq=(()=>{let e=class e extends m1{constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case Zr.NONE:return r;case Zr.HTML:return nh(r,"HTML")?Ia(r):Ek(this._doc,String(r)).toString();case Zr.STYLE:return nh(r,"Style")?Ia(r):r;case Zr.SCRIPT:if(nh(r,"Script"))return Ia(r);throw new Oe(5200,!1);case Zr.URL:return nh(r,"URL")?Ia(r):wE(String(r));case Zr.RESOURCE_URL:if(nh(r,"ResourceURL"))return Ia(r);throw new Oe(5201,!1);default:throw new Oe(5202,!1)}}bypassSecurityTrustHtml(n){return gk(n)}bypassSecurityTrustStyle(n){return _k(n)}bypassSecurityTrustScript(n){return vk(n)}bypassSecurityTrustUrl(n){return bk(n)}bypassSecurityTrustResourceUrl(n){return yk(n)}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Zt="primary",gm=Symbol("RouteTitle"),y1=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}};function dh(i){return new y1(i)}function Hq(i,e,t){let n=t.path.split("/");if(n.length>i.length||t.pathMatch==="full"&&(e.hasChildren()||n.lengthn[o]===r)}else return i===e}function NL(i){return i.length>0?i[i.length-1]:null}function Al(i){return Ac(i)?i:Xc(i)?Kn(Promise.resolve(i)):Ke(i)}var jq={exact:LL,subset:FL},kL={exact:Wq,subset:$q,ignored:()=>!0};function EL(i,e,t){return jq[t.paths](i.root,e.root,t.matrixParams)&&kL[t.queryParams](i.queryParams,e.queryParams)&&!(t.fragment==="exact"&&i.fragment!==e.fragment)}function Wq(i,e){return Vs(i,e)}function LL(i,e,t){if(!Jc(i.segments,e.segments)||!db(i.segments,e.segments,t)||i.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!i.children[n]||!LL(i.children[n],e.children[n],t))return!1;return!0}function $q(i,e){return Object.keys(e).length<=Object.keys(i).length&&Object.keys(e).every(t=>AL(i[t],e[t]))}function FL(i,e,t){return BL(i,e,e.segments,t)}function BL(i,e,t,n){if(i.segments.length>t.length){let r=i.segments.slice(0,t.length);return!(!Jc(r,t)||e.hasChildren()||!db(r,t,n))}else if(i.segments.length===t.length){if(!Jc(i.segments,t)||!db(i.segments,t,n))return!1;for(let r in e.children)if(!i.children[r]||!FL(i.children[r],e.children[r],n))return!1;return!0}else{let r=t.slice(0,i.segments.length),o=t.slice(i.segments.length);return!Jc(i.segments,r)||!db(i.segments,r,n)||!i.children[Zt]?!1:BL(i.children[Zt],e,o,n)}}function db(i,e,t){return e.every((n,r)=>kL[t](i[r].parameters,n.parameters))}var Ra=class{constructor(e=new En([],{}),t={},n=null){this.root=e,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap??=dh(this.queryParams),this._queryParamMap}toString(){return Xq.serialize(this)}},En=class{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Object.values(t).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return ub(this)}},Kc=class{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap??=dh(this.parameters),this._parameterMap}toString(){return zL(this)}};function qq(i,e){return Jc(i,e)&&i.every((t,n)=>Vs(t.parameters,e[n].parameters))}function Jc(i,e){return i.length!==e.length?!1:i.every((t,n)=>t.path===e[n].path)}function Yq(i,e){let t=[];return Object.entries(i.children).forEach(([n,r])=>{n===Zt&&(t=t.concat(e(r,n)))}),Object.entries(i.children).forEach(([n,r])=>{n!==Zt&&(t=t.concat(e(r,n)))}),t}var q1=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>new sm,providedIn:"root"});let i=e;return i})(),sm=class{parse(e){let t=new C1(e);return new Ra(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){let t=`/${em(e.root,!0)}`,n=Kq(e.queryParams),r=typeof e.fragment=="string"?`#${Zq(e.fragment)}`:"";return`${t}${n}${r}`}},Xq=new sm;function ub(i){return i.segments.map(e=>zL(e)).join("/")}function em(i,e){if(!i.hasChildren())return ub(i);if(e){let t=i.children[Zt]?em(i.children[Zt],!1):"",n=[];return Object.entries(i.children).forEach(([r,o])=>{r!==Zt&&n.push(`${r}:${em(o,!1)}`)}),n.length>0?`${t}(${n.join("//")})`:t}else{let t=Yq(i,(n,r)=>r===Zt?[em(i.children[Zt],!1)]:[`${r}:${em(n,!1)}`]);return Object.keys(i.children).length===1&&i.children[Zt]!=null?`${ub(i)}/${t[0]}`:`${ub(i)}/(${t.join("//")})`}}function VL(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function lb(i){return VL(i).replace(/%3B/gi,";")}function Zq(i){return encodeURI(i)}function w1(i){return VL(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function hb(i){return decodeURIComponent(i)}function IL(i){return hb(i.replace(/\+/g,"%20"))}function zL(i){return`${w1(i.path)}${Qq(i.parameters)}`}function Qq(i){return Object.entries(i).map(([e,t])=>`;${w1(e)}=${w1(t)}`).join("")}function Kq(i){let e=Object.entries(i).map(([t,n])=>Array.isArray(n)?n.map(r=>`${lb(t)}=${lb(r)}`).join("&"):`${lb(t)}=${lb(n)}`).filter(t=>t);return e.length?`?${e.join("&")}`:""}var Jq=/^[^\/()?;#]+/;function g1(i){let e=i.match(Jq);return e?e[0]:""}var eY=/^[^\/()?;=#]+/;function tY(i){let e=i.match(eY);return e?e[0]:""}var nY=/^[^=?&#]+/;function iY(i){let e=i.match(nY);return e?e[0]:""}var rY=/^[^&#]+/;function oY(i){let e=i.match(rY);return e?e[0]:""}var C1=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new En([],{}):new En([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n[Zt]=new En(e,t)),n}parseSegment(){let e=g1(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new Oe(4009,!1);return this.capture(e),new Kc(hb(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let t=tY(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let r=g1(this.remaining);r&&(n=r,this.capture(n))}e[hb(t)]=hb(n)}parseQueryParam(e){let t=iY(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let s=oY(this.remaining);s&&(n=s,this.capture(n))}let r=IL(t),o=IL(n);if(e.hasOwnProperty(r)){let s=e[r];Array.isArray(s)||(s=[s],e[r]=s),s.push(o)}else e[r]=o}parseParens(e){let t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=g1(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new Oe(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=Zt);let s=this.parseChildren();t[o]=Object.keys(s).length===1?s[Zt]:new En([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new Oe(4011,!1)}};function UL(i){return i.segments.length>0?new En([],{[Zt]:i}):i}function HL(i){let e={};for(let[n,r]of Object.entries(i.children)){let o=HL(r);if(n===Zt&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))e[s]=a;else(o.segments.length>0||o.hasChildren())&&(e[n]=o)}let t=new En(i.segments,e);return sY(t)}function sY(i){if(i.numberOfChildren===1&&i.children[Zt]){let e=i.children[Zt];return new En(i.segments.concat(e.segments),e.children)}return i}function am(i){return i instanceof Ra}function aY(i,e,t=null,n=null){let r=GL(i);return jL(r,e,t,n)}function GL(i){let e;function t(o){let s={};for(let l of o.children){let c=t(l);s[l.outlet]=c}let a=new En(o.url,s);return o===i&&(e=a),a}let n=t(i.root),r=UL(n);return e??r}function jL(i,e,t,n){let r=i;for(;r.parent;)r=r.parent;if(e.length===0)return _1(r,r,r,t,n);let o=lY(e);if(o.toRoot())return _1(r,r,new En([],{}),t,n);let s=cY(o,r,i),a=s.processChildren?im(s.segmentGroup,s.index,o.commands):$L(s.segmentGroup,s.index,o.commands);return _1(r,s.segmentGroup,a,t,n)}function pb(i){return typeof i=="object"&&i!=null&&!i.outlets&&!i.segmentPath}function lm(i){return typeof i=="object"&&i!=null&&i.outlets}function _1(i,e,t,n,r){let o={};n&&Object.entries(n).forEach(([l,c])=>{o[l]=Array.isArray(c)?c.map(d=>`${d}`):`${c}`});let s;i===e?s=t:s=WL(i,e,t);let a=UL(HL(s));return new Ra(a,o,r)}function WL(i,e,t){let n={};return Object.entries(i.children).forEach(([r,o])=>{o===e?n[r]=t:n[r]=WL(o,e,t)}),new En(i.segments,n)}var fb=class{constructor(e,t,n){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=n,e&&n.length>0&&pb(n[0]))throw new Oe(4003,!1);let r=n.find(lm);if(r&&r!==NL(n))throw new Oe(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function lY(i){if(typeof i[0]=="string"&&i.length===1&&i[0]==="/")return new fb(!0,0,i);let e=0,t=!1,n=i.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?t=!0:a===".."?e++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new fb(t,e,n)}var ah=class{constructor(e,t,n){this.segmentGroup=e,this.processChildren=t,this.index=n}};function cY(i,e,t){if(i.isAbsolute)return new ah(e,!0,0);if(!t)return new ah(e,!1,NaN);if(t.parent===null)return new ah(t,!0,0);let n=pb(i.commands[0])?0:1,r=t.segments.length-1+n;return dY(t,r,i.numberOfDoubleDots)}function dY(i,e,t){let n=i,r=e,o=t;for(;o>r;){if(o-=r,n=n.parent,!n)throw new Oe(4005,!1);r=n.segments.length}return new ah(n,!1,r-o)}function uY(i){return lm(i[0])?i[0].outlets:{[Zt]:i}}function $L(i,e,t){if(i??=new En([],{}),i.segments.length===0&&i.hasChildren())return im(i,e,t);let n=hY(i,e,t),r=t.slice(n.commandIndex);if(n.match&&n.pathIndexo!==Zt)&&i.children[Zt]&&i.numberOfChildren===1&&i.children[Zt].segments.length===0){let o=im(i.children[Zt],e,t);return new En(i.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=$L(i.children[o],e,s))}),Object.entries(i.children).forEach(([o,s])=>{n[o]===void 0&&(r[o]=s)}),new En(i.segments,r)}}function hY(i,e,t){let n=0,r=e,o={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return o;let s=i.segments[r],a=t[n];if(lm(a))break;let l=`${a}`,c=n0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!DL(l,c,s))return o;n+=2}else{if(!DL(l,{},s))return o;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function S1(i,e,t){let n=i.segments.slice(0,e),r=0;for(;r{typeof n=="string"&&(n=[n]),n!==null&&(e[t]=S1(new En([],{}),0,n))}),e}function TL(i){let e={};return Object.entries(i).forEach(([t,n])=>e[t]=`${n}`),e}function DL(i,e,t){return i==t.path&&Vs(e,t.parameters)}var rm="imperative",Qi=function(i){return i[i.NavigationStart=0]="NavigationStart",i[i.NavigationEnd=1]="NavigationEnd",i[i.NavigationCancel=2]="NavigationCancel",i[i.NavigationError=3]="NavigationError",i[i.RoutesRecognized=4]="RoutesRecognized",i[i.ResolveStart=5]="ResolveStart",i[i.ResolveEnd=6]="ResolveEnd",i[i.GuardsCheckStart=7]="GuardsCheckStart",i[i.GuardsCheckEnd=8]="GuardsCheckEnd",i[i.RouteConfigLoadStart=9]="RouteConfigLoadStart",i[i.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",i[i.ChildActivationStart=11]="ChildActivationStart",i[i.ChildActivationEnd=12]="ChildActivationEnd",i[i.ActivationStart=13]="ActivationStart",i[i.ActivationEnd=14]="ActivationEnd",i[i.Scroll=15]="Scroll",i[i.NavigationSkipped=16]="NavigationSkipped",i}(Qi||{}),ko=class{constructor(e,t){this.id=e,this.url=t}},cm=class extends ko{constructor(e,t,n="imperative",r=null){super(e,t),this.type=Qi.NavigationStart,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},ed=class extends ko{constructor(e,t,n){super(e,t),this.urlAfterRedirects=n,this.type=Qi.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},lo=function(i){return i[i.Redirect=0]="Redirect",i[i.SupersededByNewNavigation=1]="SupersededByNewNavigation",i[i.NoDataFromResolver=2]="NoDataFromResolver",i[i.GuardRejected=3]="GuardRejected",i}(lo||{}),M1=function(i){return i[i.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",i[i.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",i}(M1||{}),Oa=class extends ko{constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r,this.type=Qi.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},td=class extends ko{constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r,this.type=Qi.NavigationSkipped}},dm=class extends ko{constructor(e,t,n,r){super(e,t),this.error=n,this.target=r,this.type=Qi.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},mb=class extends ko{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Qi.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},E1=class extends ko{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Qi.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},I1=class extends ko{constructor(e,t,n,r,o){super(e,t),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=o,this.type=Qi.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},T1=class extends ko{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Qi.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},D1=class extends ko{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Qi.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},P1=class{constructor(e){this.route=e,this.type=Qi.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},O1=class{constructor(e){this.route=e,this.type=Qi.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},R1=class{constructor(e){this.snapshot=e,this.type=Qi.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},A1=class{constructor(e){this.snapshot=e,this.type=Qi.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},N1=class{constructor(e){this.snapshot=e,this.type=Qi.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},k1=class{constructor(e){this.snapshot=e,this.type=Qi.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var um=class{},uh=class{constructor(e,t){this.url=e,this.navigationBehaviorOptions=t}};function fY(i,e){return i.providers&&!i._injector&&(i._injector=jE(i.providers,e,`Route: ${i.path}`)),i._injector??e}function hs(i){return i.outlet||Zt}function mY(i,e){let t=i.filter(n=>hs(n)===e);return t.push(...i.filter(n=>hs(n)!==e)),t}function _m(i){if(!i)return null;if(i.routeConfig?._injector)return i.routeConfig._injector;for(let e=i.parent;e;e=e.parent){let t=e.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}var L1=class{get injector(){return _m(this.route?.snapshot)??this.rootInjector}set injector(e){}constructor(e){this.rootInjector=e,this.outlet=null,this.route=null,this.children=new wb(this.rootInjector),this.attachRef=null}},wb=(()=>{let e=class e{constructor(n){this.rootInjector=n,this.contexts=new Map}onChildOutletCreated(n,r){let o=this.getOrCreateContext(n);o.outlet=r,this.contexts.set(n,o)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new L1(this.rootInjector),this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}};e.\u0275fac=function(r){return new(r||e)(X(qi))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),gb=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){let t=F1(e,this._root);return t?t.children.map(n=>n.value):[]}firstChild(e){let t=F1(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){let t=B1(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return B1(e,this._root).map(t=>t.value)}};function F1(i,e){if(i===e.value)return e;for(let t of e.children){let n=F1(i,t);if(n)return n}return null}function B1(i,e){if(i===e.value)return[e];for(let t of e.children){let n=B1(i,t);if(n.length)return n.unshift(e),n}return[]}var ao=class{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}};function sh(i){let e={};return i&&i.children.forEach(t=>e[t.value.outlet]=t),e}var _b=class extends gb{constructor(e,t){super(e),this.snapshot=t,Y1(this,e)}toString(){return this.snapshot.toString()}};function qL(i){let e=gY(i),t=new Dn([new Kc("",{})]),n=new Dn({}),r=new Dn({}),o=new Dn({}),s=new Dn(""),a=new Rl(t,n,o,s,r,Zt,i,e.root);return a.snapshot=e.root,new _b(new ao(a,[]),e)}function gY(i){let e={},t={},n={},r="",o=new lh([],e,n,r,t,Zt,i,null,{});return new bb("",new ao(o,[]))}var Rl=class{constructor(e,t,n,r,o,s,a,l){this.urlSubject=e,this.paramsSubject=t,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(Je(c=>c[gm]))??Ke(void 0),this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Je(e=>dh(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Je(e=>dh(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function vb(i,e,t="emptyOnly"){let n,{routeConfig:r}=i;return e!==null&&(t==="always"||r?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:Z(Z({},e.params),i.params),data:Z(Z({},e.data),i.data),resolve:Z(Z(Z(Z({},i.data),e.data),r?.data),i._resolvedData)}:n={params:Z({},i.params),data:Z({},i.data),resolve:Z(Z({},i.data),i._resolvedData??{})},r&&XL(r)&&(n.resolve[gm]=r.title),n}var lh=class{get title(){return this.data?.[gm]}constructor(e,t,n,r,o,s,a,l,c){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=dh(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=dh(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),t=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${t}')`}},bb=class extends gb{constructor(e,t){super(t),this.url=e,Y1(this,t)}toString(){return YL(this._root)}};function Y1(i,e){e.value._routerState=i,e.children.forEach(t=>Y1(i,t))}function YL(i){let e=i.children.length>0?` { ${i.children.map(YL).join(", ")} } `:"";return`${i.value}${e}`}function v1(i){if(i.snapshot){let e=i.snapshot,t=i._futureSnapshot;i.snapshot=t,Vs(e.queryParams,t.queryParams)||i.queryParamsSubject.next(t.queryParams),e.fragment!==t.fragment&&i.fragmentSubject.next(t.fragment),Vs(e.params,t.params)||i.paramsSubject.next(t.params),Gq(e.url,t.url)||i.urlSubject.next(t.url),Vs(e.data,t.data)||i.dataSubject.next(t.data)}else i.snapshot=i._futureSnapshot,i.dataSubject.next(i._futureSnapshot.data)}function V1(i,e){let t=Vs(i.params,e.params)&&qq(i.url,e.url),n=!i.parent!=!e.parent;return t&&!n&&(!i.parent||V1(i.parent,e.parent))}function XL(i){return typeof i.title=="string"||i.title===null}var X1=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=Zt,this.activateEvents=new Pe,this.deactivateEvents=new Pe,this.attachEvents=new Pe,this.detachEvents=new Pe,this.parentContexts=te(wb),this.location=te(Yt),this.changeDetector=te(Fe),this.inputBinder=te(Z1,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:o}=n.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Oe(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Oe(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Oe(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new Oe(4013,!1);this._activatedRoute=n;let o=this.location,a=n.snapshot.component,l=this.parentContexts.getOrCreateContext(this.name).children,c=new z1(n,l,o.injector);this.activated=o.createComponent(a,{index:o.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[dn]});let i=e;return i})(),z1=class i{__ngOutletInjector(e){return new i(this.route,this.childContexts,e)}constructor(e,t,n){this.route=e,this.childContexts=t,this.parent=n}get(e,t){return e===Rl?this.route:e===wb?this.childContexts:this.parent.get(e,t)}},Z1=new ge("");function _Y(i,e,t){let n=hm(i,e._root,t?t._root:void 0);return new _b(n,e)}function hm(i,e,t){if(t&&i.shouldReuseRoute(e.value,t.value.snapshot)){let n=t.value;n._futureSnapshot=e.value;let r=vY(i,e,t);return new ao(n,r)}else{if(i.shouldAttach(e.value)){let o=i.retrieve(e.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>hm(i,a)),s}}let n=bY(e.value),r=e.children.map(o=>hm(i,o));return new ao(n,r)}}function vY(i,e,t){return e.children.map(n=>{for(let r of t.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return hm(i,n,r);return hm(i,n)})}function bY(i){return new Rl(new Dn(i.url),new Dn(i.params),new Dn(i.queryParams),new Dn(i.fragment),new Dn(i.data),i.outlet,i.component,i)}var pm=class{constructor(e,t){this.redirectTo=e,this.navigationBehaviorOptions=t}},ZL="ngNavigationCancelingError";function yb(i,e){let{redirectTo:t,navigationBehaviorOptions:n}=am(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=QL(!1,lo.Redirect);return r.url=t,r.navigationBehaviorOptions=n,r}function QL(i,e){let t=new Error(`NavigationCancelingError: ${i||""}`);return t[ZL]=!0,t.cancellationCode=e,t}function yY(i){return KL(i)&&am(i.url)}function KL(i){return!!i&&i[ZL]}var xY=(i,e,t,n)=>Je(r=>(new U1(e,r.targetRouterState,r.currentRouterState,t,n).activate(i),r)),U1=class{constructor(e,t,n,r,o){this.routeReuseStrategy=e,this.futureState=t,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=o}activate(e){let t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),v1(this.futureState.root),this.activateChildRoutes(t,n,e)}deactivateChildRoutes(e,t,n){let r=sh(t);e.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],n),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(e,t,n){let r=e.value,o=t?t.value:null;if(r===o)if(r.component){let s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,n);else o&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,o=sh(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,o=sh(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,t,n){let r=sh(t);e.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],n),this.forwardEvent(new k1(o.value.snapshot))}),e.children.length&&this.forwardEvent(new A1(e.value.snapshot))}activateRoutes(e,t,n){let r=e.value,o=t?t.value:null;if(v1(r),r===o)if(r.component){let s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,n);else if(r.component){let s=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),v1(a.route.value),this.activateChildRoutes(e,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(e,null,s.children)}else this.activateChildRoutes(e,null,n)}},xb=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},ch=class{constructor(e,t){this.component=e,this.route=t}};function wY(i,e,t){let n=i._root,r=e?e._root:null;return tm(n,r,t,[n.value])}function CY(i){let e=i.routeConfig?i.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:i,guards:e}}function ph(i,e){let t=Symbol(),n=e.get(i,t);return n===t?typeof i=="function"&&!iN(i)?i:e.get(i):n}function tm(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=sh(e);return i.children.forEach(s=>{SY(s,o[s.value.outlet],t,n.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>om(a,t.getContext(s),r)),r}function SY(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=i.value,s=e?e.value:null,a=t?t.getContext(i.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let l=MY(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new xb(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?tm(i,e,a?a.children:null,n,r):tm(i,e,t,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new ch(a.outlet.component,s))}else s&&om(e,a,r),r.canActivateChecks.push(new xb(n)),o.component?tm(i,null,a?a.children:null,n,r):tm(i,null,t,n,r);return r}function MY(i,e,t){if(typeof t=="function")return t(i,e);switch(t){case"pathParamsChange":return!Jc(i.url,e.url);case"pathParamsOrQueryParamsChange":return!Jc(i.url,e.url)||!Vs(i.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!V1(i,e)||!Vs(i.queryParams,e.queryParams);case"paramsChange":default:return!V1(i,e)}}function om(i,e,t){let n=sh(i),r=i.value;Object.entries(n).forEach(([o,s])=>{r.component?e?om(s,e.children.getContext(o),t):om(s,null,t):om(s,e,t)}),r.component?e&&e.outlet&&e.outlet.isActivated?t.canDeactivateChecks.push(new ch(e.outlet.component,r)):t.canDeactivateChecks.push(new ch(null,r)):t.canDeactivateChecks.push(new ch(null,r))}function vm(i){return typeof i=="function"}function EY(i){return typeof i=="boolean"}function IY(i){return i&&vm(i.canLoad)}function TY(i){return i&&vm(i.canActivate)}function DY(i){return i&&vm(i.canActivateChild)}function PY(i){return i&&vm(i.canDeactivate)}function OY(i){return i&&vm(i.canMatch)}function JL(i){return i instanceof _a||i?.name==="EmptyError"}var cb=Symbol("INITIAL_VALUE");function hh(){return Xn(i=>qr(i.map(e=>e.pipe(_n(1),pi(cb)))).pipe(Je(e=>{for(let t of e)if(t!==!0){if(t===cb)return cb;if(t===!1||RY(t))return t}return!0}),Gt(e=>e!==cb),_n(1)))}function RY(i){return am(i)||i instanceof pm}function AY(i,e){return ei(t=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return s.length===0&&o.length===0?Ke(wt(Z({},t),{guardsResult:!0})):NY(s,n,r,i).pipe(ei(a=>a&&EY(a)?kY(n,o,i,e):Ke(a)),Je(a=>wt(Z({},t),{guardsResult:a})))})}function NY(i,e,t,n){return Kn(i).pipe(ei(r=>zY(r.component,r.route,t,e,n)),Ps(r=>r!==!0,!0))}function kY(i,e,t,n){return Kn(e).pipe(gl(r=>Ts(FY(r.route.parent,n),LY(r.route,n),VY(i,r.path,t),BY(i,r.route,t))),Ps(r=>r!==!0,!0))}function LY(i,e){return i!==null&&e&&e(new N1(i)),Ke(!0)}function FY(i,e){return i!==null&&e&&e(new R1(i)),Ke(!0)}function BY(i,e,t){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return Ke(!0);let r=n.map(o=>Io(()=>{let s=_m(e)??t,a=ph(o,s),l=TY(a)?a.canActivate(e,i):ks(s,()=>a(e,i));return Al(l).pipe(Ps())}));return Ke(r).pipe(hh())}function VY(i,e,t){let n=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>CY(s)).filter(s=>s!==null).map(s=>Io(()=>{let a=s.guards.map(l=>{let c=_m(s.node)??t,d=ph(l,c),u=DY(d)?d.canActivateChild(n,i):ks(c,()=>d(n,i));return Al(u).pipe(Ps())});return Ke(a).pipe(hh())}));return Ke(o).pipe(hh())}function zY(i,e,t,n,r){let o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||o.length===0)return Ke(!0);let s=o.map(a=>{let l=_m(e)??r,c=ph(a,l),d=PY(c)?c.canDeactivate(i,e,t,n):ks(l,()=>c(i,e,t,n));return Al(d).pipe(Ps())});return Ke(s).pipe(hh())}function UY(i,e,t,n){let r=e.canLoad;if(r===void 0||r.length===0)return Ke(!0);let o=r.map(s=>{let a=ph(s,i),l=IY(a)?a.canLoad(e,t):ks(i,()=>a(e,t));return Al(l)});return Ke(o).pipe(hh(),eF(n))}function eF(i){return bS(Sn(e=>{if(typeof e!="boolean")throw yb(i,e)}),Je(e=>e===!0))}function HY(i,e,t,n){let r=e.canMatch;if(!r||r.length===0)return Ke(!0);let o=r.map(s=>{let a=ph(s,i),l=OY(a)?a.canMatch(e,t):ks(i,()=>a(e,t));return Al(l)});return Ke(o).pipe(hh(),eF(n))}var fm=class{constructor(e){this.segmentGroup=e||null}},mm=class extends Error{constructor(e){super(),this.urlTree=e}};function oh(i){return ml(new fm(i))}function GY(i){return ml(new Oe(4e3,!1))}function jY(i){return ml(QL(!1,lo.GuardRejected))}var H1=class{constructor(e,t){this.urlSerializer=e,this.urlTree=t}lineralizeSegments(e,t){let n=[],r=t.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return Ke(n);if(r.numberOfChildren>1||!r.children[Zt])return GY(`${e.redirectTo}`);r=r.children[Zt]}}applyRedirectCommands(e,t,n,r,o){if(typeof t!="string"){let a=t,{queryParams:l,fragment:c,routeConfig:d,url:u,outlet:h,params:p,data:f,title:m}=r,b=ks(o,()=>a({params:p,data:f,queryParams:l,fragment:c,routeConfig:d,url:u,outlet:h,title:m}));if(b instanceof Ra)throw new mm(b);t=b}let s=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),e,n);if(t[0]==="/")throw new mm(s);return s}applyRedirectCreateUrlTree(e,t,n,r){let o=this.createSegmentGroup(e,t.root,n,r);return new Ra(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){let n={};return Object.entries(e).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);n[r]=t[a]}else n[r]=o}),n}createSegmentGroup(e,t,n,r){let o=this.createSegments(e,t.segments,n,r),s={};return Object.entries(t.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(e,l,n,r)}),new En(o,s)}createSegments(e,t,n,r){return t.map(o=>o.path[0]===":"?this.findPosParam(e,o,r):this.findOrReturn(o,n))}findPosParam(e,t,n){let r=n[t.path.substring(1)];if(!r)throw new Oe(4001,!1);return r}findOrReturn(e,t){let n=0;for(let r of t){if(r.path===e.path)return t.splice(n),r;n++}return e}},G1={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function WY(i,e,t,n,r){let o=Q1(i,e,t);return o.matched?(n=fY(e,n),HY(n,e,t,r).pipe(Je(s=>s===!0?o:Z({},G1)))):Ke(o)}function Q1(i,e,t){if(e.path==="**")return $Y(t);if(e.path==="")return e.pathMatch==="full"&&(i.hasChildren()||t.length>0)?Z({},G1):{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};let r=(e.matcher||Hq)(t,i,e);if(!r)return Z({},G1);let o={};Object.entries(r.posParams??{}).forEach(([a,l])=>{o[a]=l.path});let s=r.consumed.length>0?Z(Z({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function $Y(i){return{matched:!0,parameters:i.length>0?NL(i).parameters:{},consumedSegments:i,remainingSegments:[],positionalParamSegments:{}}}function PL(i,e,t,n){return t.length>0&&XY(i,t,n)?{segmentGroup:new En(e,YY(n,new En(t,i.children))),slicedSegments:[]}:t.length===0&&ZY(i,t,n)?{segmentGroup:new En(i.segments,qY(i,t,n,i.children)),slicedSegments:t}:{segmentGroup:new En(i.segments,i.children),slicedSegments:t}}function qY(i,e,t,n){let r={};for(let o of t)if(Cb(i,e,o)&&!n[hs(o)]){let s=new En([],{});r[hs(o)]=s}return Z(Z({},n),r)}function YY(i,e){let t={};t[Zt]=e;for(let n of i)if(n.path===""&&hs(n)!==Zt){let r=new En([],{});t[hs(n)]=r}return t}function XY(i,e,t){return t.some(n=>Cb(i,e,n)&&hs(n)!==Zt)}function ZY(i,e,t){return t.some(n=>Cb(i,e,n))}function Cb(i,e,t){return(i.hasChildren()||e.length>0)&&t.pathMatch==="full"?!1:t.path===""}function QY(i,e,t,n){return hs(i)!==n&&(n===Zt||!Cb(e,t,i))?!1:Q1(e,i,t).matched}function KY(i,e,t){return e.length===0&&!i.children[t]}var j1=class{};function JY(i,e,t,n,r,o,s="emptyOnly"){return new W1(i,e,t,n,r,s,o).recognize()}var eX=31,W1=class{constructor(e,t,n,r,o,s,a){this.injector=e,this.configLoader=t,this.rootComponentType=n,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new H1(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new Oe(4002,`'${e.segmentGroup}'`)}recognize(){let e=PL(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(Je(({children:t,rootSnapshot:n})=>{let r=new ao(n,t),o=new bb("",r),s=aY(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(e){let t=new lh([],Object.freeze({}),Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Zt,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,Zt,t).pipe(Je(n=>({children:n,rootSnapshot:t})),Ds(n=>{if(n instanceof mm)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof fm?this.noMatchError(n):n}))}processSegmentGroup(e,t,n,r,o){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,t,n,o):this.processSegment(e,t,n,n.segments,r,!0,o).pipe(Je(s=>s instanceof ao?[s]:[]))}processChildren(e,t,n,r){let o=[];for(let s of Object.keys(n.children))s==="primary"?o.unshift(s):o.push(s);return Kn(o).pipe(gl(s=>{let a=n.children[s],l=mY(t,s);return this.processSegmentGroup(e,l,a,s,r)}),DS((s,a)=>(s.push(...a),s)),_l(null),TS(),ei(s=>{if(s===null)return oh(n);let a=tF(s);return tX(a),Ke(a)}))}processSegment(e,t,n,r,o,s,a){return Kn(t).pipe(gl(l=>this.processSegmentAgainstRoute(l._injector??e,t,l,n,r,o,s,a).pipe(Ds(c=>{if(c instanceof fm)return Ke(null);throw c}))),Ps(l=>!!l),Ds(l=>{if(JL(l))return KY(n,r,o)?Ke(new j1):oh(n);throw l}))}processSegmentAgainstRoute(e,t,n,r,o,s,a,l){return QY(n,r,o,s)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,r,n,o,s,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,r,t,n,o,s,l):oh(r):oh(r)}expandSegmentAgainstRouteUsingRedirect(e,t,n,r,o,s,a){let{matched:l,parameters:c,consumedSegments:d,positionalParamSegments:u,remainingSegments:h}=Q1(t,r,o);if(!l)return oh(t);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>eX&&(this.allowRedirects=!1));let p=new lh(o,c,Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,OL(r),hs(r),r.component??r._loadedComponent??null,r,RL(r)),f=vb(p,a,this.paramsInheritanceStrategy);p.params=Object.freeze(f.params),p.data=Object.freeze(f.data);let m=this.applyRedirects.applyRedirectCommands(d,r.redirectTo,u,p,e);return this.applyRedirects.lineralizeSegments(r,m).pipe(ei(b=>this.processSegment(e,n,t,b.concat(h),s,!1,a)))}matchSegmentAgainstRoute(e,t,n,r,o,s){let a=WY(t,n,r,e,this.urlSerializer);return n.path==="**"&&(t.children={}),a.pipe(Xn(l=>l.matched?(e=n._injector??e,this.getChildConfig(e,n,r).pipe(Xn(({routes:c})=>{let d=n._loadedInjector??e,{parameters:u,consumedSegments:h,remainingSegments:p}=l,f=new lh(h,u,Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,OL(n),hs(n),n.component??n._loadedComponent??null,n,RL(n)),m=vb(f,s,this.paramsInheritanceStrategy);f.params=Object.freeze(m.params),f.data=Object.freeze(m.data);let{segmentGroup:b,slicedSegments:g}=PL(t,h,p,c);if(g.length===0&&b.hasChildren())return this.processChildren(d,c,b,f).pipe(Je(x=>new ao(f,x)));if(c.length===0&&g.length===0)return Ke(new ao(f,[]));let _=hs(n)===o;return this.processSegment(d,c,b,g,_?Zt:o,!0,f).pipe(Je(x=>new ao(f,x instanceof ao?[x]:[])))}))):oh(t)))}getChildConfig(e,t,n){return t.children?Ke({routes:t.children,injector:e}):t.loadChildren?t._loadedRoutes!==void 0?Ke({routes:t._loadedRoutes,injector:t._loadedInjector}):UY(e,t,n,this.urlSerializer).pipe(ei(r=>r?this.configLoader.loadChildren(e,t).pipe(Sn(o=>{t._loadedRoutes=o.routes,t._loadedInjector=o.injector})):jY(t))):Ke({routes:[],injector:e})}};function tX(i){i.sort((e,t)=>e.value.outlet===Zt?-1:t.value.outlet===Zt?1:e.value.outlet.localeCompare(t.value.outlet))}function nX(i){let e=i.value.routeConfig;return e&&e.path===""}function tF(i){let e=[],t=new Set;for(let n of i){if(!nX(n)){e.push(n);continue}let r=e.find(o=>n.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...n.children),t.add(r)):e.push(n)}for(let n of t){let r=tF(n.children);e.push(new ao(n.value,r))}return e.filter(n=>!t.has(n))}function OL(i){return i.data||{}}function RL(i){return i.resolve||{}}function iX(i,e,t,n,r,o){return ei(s=>JY(i,e,t,n,s.extractedUrl,r,o).pipe(Je(({state:a,tree:l})=>wt(Z({},s),{targetSnapshot:a,urlAfterRedirects:l}))))}function rX(i,e){return ei(t=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return Ke(t);let o=new Set(r.map(l=>l.route)),s=new Set;for(let l of o)if(!s.has(l))for(let c of nF(l))s.add(c);let a=0;return Kn(s).pipe(gl(l=>o.has(l)?oX(l,n,i,e):(l.data=vb(l,l.parent,i).resolve,Ke(void 0))),Sn(()=>a++),Lu(1),ei(l=>a===s.size?Ke(t):Ir))})}function nF(i){let e=i.children.map(t=>nF(t)).flat();return[i,...e]}function oX(i,e,t,n){let r=i.routeConfig,o=i._resolve;return r?.title!==void 0&&!XL(r)&&(o[gm]=r.title),sX(o,i,e,n).pipe(Je(s=>(i._resolvedData=s,i.data=vb(i,i.parent,t).resolve,null)))}function sX(i,e,t,n){let r=x1(i);if(r.length===0)return Ke({});let o={};return Kn(r).pipe(ei(s=>aX(i[s],e,t,n).pipe(Ps(),Sn(a=>{if(a instanceof pm)throw yb(new sm,a);o[s]=a}))),Lu(1),If(o),Ds(s=>JL(s)?Ir:ml(s)))}function aX(i,e,t,n){let r=_m(e)??n,o=ph(i,r),s=o.resolve?o.resolve(e,t):ks(r,()=>o(e,t));return Al(s)}function b1(i){return Xn(e=>{let t=i(e);return t?Kn(t).pipe(Je(()=>e)):Ke(e)})}var iF=(()=>{let e=class e{buildTitle(n){let r,o=n.root;for(;o!==void 0;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(s=>s.outlet===Zt);return r}getResolvedTitleForRoute(n){return n.data[gm]}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(lX),providedIn:"root"});let i=e;return i})(),lX=(()=>{let e=class e extends iF{constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}};e.\u0275fac=function(r){return new(r||e)(X(SL))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),K1=new ge("",{providedIn:"root",factory:()=>({})}),cX=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=le({type:e,selectors:[["ng-component"]],standalone:!0,features:[ce],decls:1,vars:0,template:function(r,o){r&1&&J(0,"router-outlet")},dependencies:[X1],encapsulation:2});let i=e;return i})();function J1(i){let e=i.children&&i.children.map(J1),t=e?wt(Z({},i),{children:e}):Z({},i);return!t.component&&!t.loadComponent&&(e||t.loadChildren)&&t.outlet&&t.outlet!==Zt&&(t.component=cX),t}var eI=new ge(""),dX=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=te(YE)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Ke(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=Al(n.loadComponent()).pipe(Je(rF),Sn(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),bl(()=>{this.componentLoaders.delete(n)})),o=new hl(r,()=>new me).pipe(Du());return this.componentLoaders.set(n,o),o}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Ke({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let s=uX(r,this.compiler,n,this.onLoadEndListener).pipe(bl(()=>{this.childrenLoaders.delete(r)})),a=new hl(s,()=>new me).pipe(Du());return this.childrenLoaders.set(r,a),a}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function uX(i,e,t,n){return Al(i.loadChildren()).pipe(Je(rF),ei(r=>r instanceof Bf||Array.isArray(r)?Ke(r):Kn(e.compileModuleAsync(r))),Je(r=>{n&&n(i);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(t).injector,s=o.get(eI,[],{optional:!0,self:!0}).flat()),{routes:s.map(J1),injector:o}}))}function hX(i){return i&&typeof i=="object"&&"default"in i}function rF(i){return hX(i)?i.default:i}var tI=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(pX),providedIn:"root"});let i=e;return i})(),pX=(()=>{let e=class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),fX=new ge("");var mX=new ge(""),gX=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new me,this.transitionAbortSubject=new me,this.configLoader=te(dX),this.environmentInjector=te(qi),this.urlSerializer=te(q1),this.rootContexts=te(wb),this.location=te(Pa),this.inputBindingEnabled=te(Z1,{optional:!0})!==null,this.titleStrategy=te(iF),this.options=te(K1,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=te(tI),this.createViewTransition=te(fX,{optional:!0}),this.navigationErrorHandler=te(mX,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>Ke(void 0),this.rootComponentType=null;let n=o=>this.events.next(new P1(o)),r=o=>this.events.next(new O1(o));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;this.transitions?.next(wt(Z(Z({},this.transitions.value),n),{id:r}))}setupNavigations(n,r,o){return this.transitions=new Dn({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:rm,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(Gt(s=>s.id!==0),Je(s=>wt(Z({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Xn(s=>{let a=!1,l=!1;return Ke(s).pipe(Xn(c=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",lo.SupersededByNewNavigation),Ir;this.currentTransition=s,this.currentNavigation={id:c.id,initialUrl:c.rawUrl,extractedUrl:c.extractedUrl,targetBrowserUrl:typeof c.extras.browserUrl=="string"?this.urlSerializer.parse(c.extras.browserUrl):c.extras.browserUrl,trigger:c.source,extras:c.extras,previousNavigation:this.lastSuccessfulNavigation?wt(Z({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let d=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),u=c.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!d&&u!=="reload"){let h="";return this.events.next(new td(c.id,this.urlSerializer.serialize(c.rawUrl),h,M1.IgnoredSameUrlNavigation)),c.resolve(!1),Ir}if(this.urlHandlingStrategy.shouldProcessUrl(c.rawUrl))return Ke(c).pipe(Xn(h=>{let p=this.transitions?.getValue();return this.events.next(new cm(h.id,this.urlSerializer.serialize(h.extractedUrl),h.source,h.restoredState)),p!==this.transitions?.getValue()?Ir:Promise.resolve(h)}),iX(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),Sn(h=>{s.targetSnapshot=h.targetSnapshot,s.urlAfterRedirects=h.urlAfterRedirects,this.currentNavigation=wt(Z({},this.currentNavigation),{finalUrl:h.urlAfterRedirects});let p=new mb(h.id,this.urlSerializer.serialize(h.extractedUrl),this.urlSerializer.serialize(h.urlAfterRedirects),h.targetSnapshot);this.events.next(p)}));if(d&&this.urlHandlingStrategy.shouldProcessUrl(c.currentRawUrl)){let{id:h,extractedUrl:p,source:f,restoredState:m,extras:b}=c,g=new cm(h,this.urlSerializer.serialize(p),f,m);this.events.next(g);let _=qL(this.rootComponentType).snapshot;return this.currentTransition=s=wt(Z({},c),{targetSnapshot:_,urlAfterRedirects:p,extras:wt(Z({},b),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=p,Ke(s)}else{let h="";return this.events.next(new td(c.id,this.urlSerializer.serialize(c.extractedUrl),h,M1.IgnoredByUrlHandlingStrategy)),c.resolve(!1),Ir}}),Sn(c=>{let d=new E1(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(d)}),Je(c=>(this.currentTransition=s=wt(Z({},c),{guards:wY(c.targetSnapshot,c.currentSnapshot,this.rootContexts)}),s)),AY(this.environmentInjector,c=>this.events.next(c)),Sn(c=>{if(s.guardsResult=c.guardsResult,c.guardsResult&&typeof c.guardsResult!="boolean")throw yb(this.urlSerializer,c.guardsResult);let d=new I1(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot,!!c.guardsResult);this.events.next(d)}),Gt(c=>c.guardsResult?!0:(this.cancelNavigationTransition(c,"",lo.GuardRejected),!1)),b1(c=>{if(c.guards.canActivateChecks.length)return Ke(c).pipe(Sn(d=>{let u=new T1(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(u)}),Xn(d=>{let u=!1;return Ke(d).pipe(rX(this.paramsInheritanceStrategy,this.environmentInjector),Sn({next:()=>u=!0,complete:()=>{u||this.cancelNavigationTransition(d,"",lo.NoDataFromResolver)}}))}),Sn(d=>{let u=new D1(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(u)}))}),b1(c=>{let d=u=>{let h=[];u.routeConfig?.loadComponent&&!u.routeConfig._loadedComponent&&h.push(this.configLoader.loadComponent(u.routeConfig).pipe(Sn(p=>{u.component=p}),Je(()=>{})));for(let p of u.children)h.push(...d(p));return h};return qr(d(c.targetSnapshot.root)).pipe(_l(null),_n(1))}),b1(()=>this.afterPreactivation()),Xn(()=>{let{currentSnapshot:c,targetSnapshot:d}=s,u=this.createViewTransition?.(this.environmentInjector,c.root,d.root);return u?Kn(u).pipe(Je(()=>s)):Ke(s)}),Je(c=>{let d=_Y(n.routeReuseStrategy,c.targetSnapshot,c.currentRouterState);return this.currentTransition=s=wt(Z({},c),{targetRouterState:d}),this.currentNavigation.targetRouterState=d,s}),Sn(()=>{this.events.next(new um)}),xY(this.rootContexts,n.routeReuseStrategy,c=>this.events.next(c),this.inputBindingEnabled),_n(1),Sn({next:c=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new ed(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects))),this.titleStrategy?.updateTitle(c.targetRouterState.snapshot),c.resolve(!0)},complete:()=>{a=!0}}),Xe(this.transitionAbortSubject.pipe(Sn(c=>{throw c}))),bl(()=>{!a&&!l&&this.cancelNavigationTransition(s,"",lo.SupersededByNewNavigation),this.currentTransition?.id===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),Ds(c=>{if(l=!0,KL(c))this.events.next(new Oa(s.id,this.urlSerializer.serialize(s.extractedUrl),c.message,c.cancellationCode)),yY(c)?this.events.next(new uh(c.url,c.navigationBehaviorOptions)):s.resolve(!1);else{let d=new dm(s.id,this.urlSerializer.serialize(s.extractedUrl),c,s.targetSnapshot??void 0);try{let u=ks(this.environmentInjector,()=>this.navigationErrorHandler?.(d));if(u instanceof pm){let{message:h,cancellationCode:p}=yb(this.urlSerializer,u);this.events.next(new Oa(s.id,this.urlSerializer.serialize(s.extractedUrl),h,p)),this.events.next(new uh(u.redirectTo,u.navigationBehaviorOptions))}else{this.events.next(d);let h=n.errorHandler(c);s.resolve(!!h)}}catch(u){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(u)}}return Ir}))}))}cancelNavigationTransition(n,r,o){let s=new Oa(n.id,this.urlSerializer.serialize(n.extractedUrl),r,o);this.events.next(s),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return n.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function _X(i){return i!==rm}var vX=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(bX),providedIn:"root"});let i=e;return i})(),$1=class{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}},bX=(()=>{let e=class e extends $1{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),oF=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:()=>te(yX),providedIn:"root"});let i=e;return i})(),yX=(()=>{let e=class e extends oF{constructor(){super(...arguments),this.location=te(Pa),this.urlSerializer=te(q1),this.options=te(K1,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=te(tI),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Ra,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=qL(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{r.type==="popstate"&&n(r.url,r.state)})}handleRouterEvent(n,r){if(n instanceof cm)this.stateMemento=this.createStateMemento();else if(n instanceof td)this.rawUrlTree=r.initialUrl;else if(n instanceof mb){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(r.targetBrowserUrl??o,r)}}else n instanceof um?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(r.targetBrowserUrl??this.rawUrlTree,r)):n instanceof Oa&&(n.code===lo.GuardRejected||n.code===lo.NoDataFromResolver)?this.restoreHistory(r):n instanceof dm?this.restoreHistory(r,!0):n instanceof ed&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let o=n instanceof Ra?this.urlSerializer.serialize(n):n;if(this.location.isCurrentPathEqualTo(o)||r.extras.replaceUrl){let s=this.browserPageId,a=Z(Z({},r.extras.state),this.generateNgRouterState(r.id,s));this.location.replaceState(o,"",a)}else{let s=Z(Z({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(o,"",s)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,s=this.currentPageId-o;s!==0?this.location.historyGo(s):this.currentUrlTree===n.finalUrl&&s===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),nm=function(i){return i[i.COMPLETE=0]="COMPLETE",i[i.FAILED=1]="FAILED",i[i.REDIRECTING=2]="REDIRECTING",i}(nm||{});function xX(i,e){i.events.pipe(Gt(t=>t instanceof ed||t instanceof Oa||t instanceof dm||t instanceof td),Je(t=>t instanceof ed||t instanceof td?nm.COMPLETE:(t instanceof Oa?t.code===lo.Redirect||t.code===lo.SupersededByNewNavigation:!1)?nm.REDIRECTING:nm.FAILED),Gt(t=>t!==nm.REDIRECTING),_n(1)).subscribe(()=>{e()})}function wX(i){throw i}var CX={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},SX={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},fh=(()=>{let e=class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=te(Q0),this.stateManager=te(oF),this.options=te(K1,{optional:!0})||{},this.pendingTasks=te($c),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=te(gX),this.urlSerializer=te(q1),this.location=te(Pa),this.urlHandlingStrategy=te(tI),this._events=new me,this.errorHandler=this.options.errorHandler||wX,this.navigated=!1,this.routeReuseStrategy=te(vX),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=te(eI,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!te(Z1,{optional:!0}),this.eventsSubscription=new Ct,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let o=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(o!==null&&s!==null){if(this.stateManager.handleRouterEvent(r,s),r instanceof Oa&&r.code!==lo.Redirect&&r.code!==lo.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof ed)this.navigated=!0;else if(r instanceof uh){let a=r.navigationBehaviorOptions,l=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),c=Z({browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||_X(o.source)},a);this.scheduleNavigation(l,rm,null,c,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}EX(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),rm,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",r)},0)})}navigateToSyncWithBrowser(n,r,o){let s={replaceUrl:!0},a=o?.navigationId?o:null;if(o){let c=Z({},o);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(s.state=c)}let l=this.parseUrl(n);this.scheduleNavigation(l,r,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(J1),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){let{relativeTo:o,queryParams:s,fragment:a,queryParamsHandling:l,preserveFragment:c}=r,d=c?this.currentUrlTree.fragment:a,u=null;switch(l){case"merge":u=Z(Z({},this.currentUrlTree.queryParams),s);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=s||null}u!==null&&(u=this.removeEmptyProps(u));let h;try{let p=o?o.snapshot:this.routerState.snapshot.root;h=GL(p)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),h=this.currentUrlTree.root}return jL(h,n,u,d??null)}navigateByUrl(n,r={skipLocationChange:!1}){let o=am(n)?n:this.parseUrl(n),s=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(s,rm,null,r)}navigate(n,r={skipLocationChange:!1}){return MX(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,r){let o;if(r===!0?o=Z({},CX):r===!1?o=Z({},SX):o=r,am(n))return EL(this.currentUrlTree,n,o);let s=this.parseUrl(n);return EL(this.currentUrlTree,s,o)}removeEmptyProps(n){return Object.entries(n).reduce((r,[o,s])=>(s!=null&&(r[o]=s),r),{})}scheduleNavigation(n,r,o,s,a){if(this.disposed)return Promise.resolve(!1);let l,c,d;a?(l=a.resolve,c=a.reject,d=a.promise):d=new Promise((h,p)=>{l=h,c=p});let u=this.pendingTasks.add();return xX(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(u))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:s,resolve:l,reject:c,promise:d,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),d.catch(h=>Promise.reject(h))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function MX(i){for(let e=0;et.\u0275providers)])}function TX(i){return i.routerState.root}function DX(){let i=te(yt);return e=>{let t=i.get(us);if(e!==t.components[0])return;let n=i.get(fh),r=i.get(PX);i.get(OX)===1&&n.initialNavigation(),i.get(RX,null,en.Optional)?.setUpPreloading(),i.get(IX,null,en.Optional)?.init(),n.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var PX=new ge("",{factory:()=>new me}),OX=new ge("",{providedIn:"root",factory:()=>1});var RX=new ge("");var lF=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["app-root"]],standalone:!0,features:[ce],decls:1,vars:0,template:function(n,r){n&1&&J(0,"router-outlet")},dependencies:[Ae,X1]})}return i})();var Vt=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(Vt||{}),zs="*";function si(i,e){return{type:Vt.Trigger,name:i,definitions:e,options:{}}}function Pn(i,e=null){return{type:Vt.Animate,styles:e,timings:i}}function cF(i,e=null){return{type:Vt.Group,steps:i,options:e}}function dF(i,e=null){return{type:Vt.Sequence,steps:i,options:e}}function Qt(i){return{type:Vt.Style,styles:i,offset:null}}function fi(i,e,t){return{type:Vt.State,name:i,styles:e,options:t}}function On(i,e,t=null){return{type:Vt.Transition,expr:i,animation:e,options:t}}function uF(i=null){return{type:Vt.AnimateChild,options:i}}function hF(i,e,t=null){return{type:Vt.Query,selector:i,animation:e,options:t}}var Nl=class{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},bm=class{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,n=0,r=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++t==o&&this._onFinish()}),s.onDestroy(()=>{++n==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let t=e*this.totalTime;this.players.forEach(n=>{let r=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(r)})}getPosition(){let e=this.players.reduce((t,n)=>t===null||n.totalTime>t.totalTime?n:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Sb="!";function pF(i){return new Oe(3e3,!1)}function AX(){return new Oe(3100,!1)}function NX(){return new Oe(3101,!1)}function kX(i){return new Oe(3001,!1)}function LX(i){return new Oe(3003,!1)}function FX(i){return new Oe(3004,!1)}function BX(i,e){return new Oe(3005,!1)}function VX(){return new Oe(3006,!1)}function zX(){return new Oe(3007,!1)}function UX(i,e){return new Oe(3008,!1)}function HX(i){return new Oe(3002,!1)}function GX(i,e,t,n,r){return new Oe(3010,!1)}function jX(){return new Oe(3011,!1)}function WX(){return new Oe(3012,!1)}function $X(){return new Oe(3200,!1)}function qX(){return new Oe(3202,!1)}function YX(){return new Oe(3013,!1)}function XX(i){return new Oe(3014,!1)}function ZX(i){return new Oe(3015,!1)}function QX(i){return new Oe(3016,!1)}function KX(i,e){return new Oe(3404,!1)}function JX(i){return new Oe(3502,!1)}function eZ(i){return new Oe(3503,!1)}function tZ(){return new Oe(3300,!1)}function nZ(i){return new Oe(3504,!1)}function iZ(i){return new Oe(3301,!1)}function rZ(i,e){return new Oe(3302,!1)}function oZ(i){return new Oe(3303,!1)}function sZ(i,e){return new Oe(3400,!1)}function aZ(i){return new Oe(3401,!1)}function lZ(i){return new Oe(3402,!1)}function cZ(i,e){return new Oe(3505,!1)}function kl(i){switch(i.length){case 0:return new Nl;case 1:return i[0];default:return new bm(i)}}function IF(i,e,t=new Map,n=new Map){let r=[],o=[],s=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),d=c==s,u=d&&a||new Map;l.forEach((h,p)=>{let f=p,m=h;if(p!=="offset")switch(f=i.normalizePropertyName(f,r),m){case Sb:m=t.get(p);break;case zs:m=n.get(p);break;default:m=i.normalizeStyleValue(p,f,m,r);break}u.set(f,m)}),d||o.push(u),a=u,s=c}),r.length)throw JX(r);return o}function SI(i,e,t,n){switch(e){case"start":i.onStart(()=>n(t&&nI(t,"start",i)));break;case"done":i.onDone(()=>n(t&&nI(t,"done",i)));break;case"destroy":i.onDestroy(()=>n(t&&nI(t,"destroy",i)));break}}function nI(i,e,t){let n=t.totalTime,r=!!t.disabled,o=MI(i.element,i.triggerName,i.fromState,i.toState,e||i.phaseName,n??i.totalTime,r),s=i._data;return s!=null&&(o._data=s),o}function MI(i,e,t,n,r="",o=0,s){return{element:i,triggerName:e,fromState:t,toState:n,phaseName:r,totalTime:o,disabled:!!s}}function uo(i,e,t){let n=i.get(e);return n||i.set(e,n=t),n}function fF(i){let e=i.indexOf(":"),t=i.substring(1,e),n=i.slice(e+1);return[t,n]}var dZ=typeof document>"u"?null:document.documentElement;function EI(i){let e=i.parentNode||i.host||null;return e===dZ?null:e}function uZ(i){return i.substring(1,6)=="ebkit"}var nd=null,mF=!1;function hZ(i){nd||(nd=pZ()||{},mF=nd.style?"WebkitAppearance"in nd.style:!1);let e=!0;return nd.style&&!uZ(i)&&(e=i in nd.style,!e&&mF&&(e="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in nd.style)),e}function pZ(){return typeof document<"u"?document.body:null}function TF(i,e){for(;e;){if(e===i)return!0;e=EI(e)}return!1}function DF(i,e,t){if(t)return Array.from(i.querySelectorAll(e));let n=i.querySelector(e);return n?[n]:[]}var II=(()=>{let e=class e{validateStyleProperty(n){return hZ(n)}containsElement(n,r){return TF(n,r)}getParentElement(n){return EI(n)}query(n,r,o){return DF(n,r,o)}computeStyle(n,r,o){return o||""}animate(n,r,o,s,a,l=[],c){return new Nl(o,s)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})(),OI=class OI{};OI.NOOP=new II;var od=OI,sd=class{};var fZ=1e3,PF="{{",mZ="}}",OF="ng-enter",lI="ng-leave",Mb="ng-trigger",Pb=".ng-trigger",gF="ng-animating",cI=".ng-animating";function Aa(i){if(typeof i=="number")return i;let e=i.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:dI(parseFloat(e[1]),e[2])}function dI(i,e){switch(e){case"s":return i*fZ;default:return i}}function Ob(i,e,t){return i.hasOwnProperty("duration")?i:gZ(i,e,t)}function gZ(i,e,t){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,r,o=0,s="";if(typeof i=="string"){let a=i.match(n);if(a===null)return e.push(pF(i)),{duration:0,delay:0,easing:""};r=dI(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(o=dI(parseFloat(l),a[4]));let c=a[5];c&&(s=c)}else r=i;if(!t){let a=!1,l=e.length;r<0&&(e.push(AX()),a=!0),o<0&&(e.push(NX()),a=!0),a&&e.splice(l,0,pF(i))}return{duration:r,delay:o,easing:s}}function _Z(i){return i.length?i[0]instanceof Map?i:i.map(e=>new Map(Object.entries(e))):[]}function Us(i,e,t){e.forEach((n,r)=>{let o=TI(r);t&&!t.has(r)&&t.set(r,i.style[o]),i.style[o]=n})}function rd(i,e){e.forEach((t,n)=>{let r=TI(n);i.style[r]=""})}function ym(i){return Array.isArray(i)?i.length==1?i[0]:dF(i):i}function vZ(i,e,t){let n=e.params||{},r=RF(i);r.length&&r.forEach(o=>{n.hasOwnProperty(o)||t.push(kX(o))})}var uI=new RegExp(`${PF}\\s*(.+?)\\s*${mZ}`,"g");function RF(i){let e=[];if(typeof i=="string"){let t;for(;t=uI.exec(i);)e.push(t[1]);uI.lastIndex=0}return e}function wm(i,e,t){let n=`${i}`,r=n.replace(uI,(o,s)=>{let a=e[s];return a==null&&(t.push(LX(s)),a=""),a.toString()});return r==n?i:r}var bZ=/-+([a-z0-9])/g;function TI(i){return i.replace(bZ,(...e)=>e[1].toUpperCase())}function yZ(i,e){return i===0||e===0}function xZ(i,e,t){if(t.size&&e.length){let n=e[0],r=[];if(t.forEach((o,s)=>{n.has(s)||r.push(s),n.set(s,o)}),r.length)for(let o=1;os.set(a,DI(i,a)))}}return e}function co(i,e,t){switch(e.type){case Vt.Trigger:return i.visitTrigger(e,t);case Vt.State:return i.visitState(e,t);case Vt.Transition:return i.visitTransition(e,t);case Vt.Sequence:return i.visitSequence(e,t);case Vt.Group:return i.visitGroup(e,t);case Vt.Animate:return i.visitAnimate(e,t);case Vt.Keyframes:return i.visitKeyframes(e,t);case Vt.Style:return i.visitStyle(e,t);case Vt.Reference:return i.visitReference(e,t);case Vt.AnimateChild:return i.visitAnimateChild(e,t);case Vt.AnimateRef:return i.visitAnimateRef(e,t);case Vt.Query:return i.visitQuery(e,t);case Vt.Stagger:return i.visitStagger(e,t);default:throw FX(e.type)}}function DI(i,e){return window.getComputedStyle(i)[e]}var wZ=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Rb=class extends sd{normalizePropertyName(e,t){return TI(e)}normalizeStyleValue(e,t,n,r){let o="",s=n.toString().trim();if(wZ.has(t)&&n!==0&&n!=="0")if(typeof n=="number")o="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&r.push(BX(e,n))}return s+o}};var Ab="*";function CZ(i,e){let t=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(n=>SZ(n,t,e)):t.push(i),t}function SZ(i,e,t){if(i[0]==":"){let l=MZ(i,t);if(typeof l=="function"){e.push(l);return}i=l}let n=i.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return t.push(ZX(i)),e;let r=n[1],o=n[2],s=n[3];e.push(_F(r,s));let a=r==Ab&&s==Ab;o[0]=="<"&&!a&&e.push(_F(s,r))}function MZ(i,e){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}var Eb=new Set(["true","1"]),Ib=new Set(["false","0"]);function _F(i,e){let t=Eb.has(i)||Ib.has(i),n=Eb.has(e)||Ib.has(e);return(r,o)=>{let s=i==Ab||i==r,a=e==Ab||e==o;return!s&&t&&typeof r=="boolean"&&(s=r?Eb.has(i):Ib.has(i)),!a&&n&&typeof o=="boolean"&&(a=o?Eb.has(e):Ib.has(e)),s&&a}}var AF=":self",EZ=new RegExp(`s*${AF}s*,?`,"g");function NF(i,e,t,n){return new hI(i).build(e,t,n)}var vF="",hI=class{constructor(e){this._driver=e}build(e,t,n){let r=new pI(t);return this._resetContextStyleTimingState(r),co(this,ym(e),r)}_resetContextStyleTimingState(e){e.currentQuerySelector=vF,e.collectedStyles=new Map,e.collectedStyles.set(vF,new Map),e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,r=t.depCount=0,o=[],s=[];return e.name.charAt(0)=="@"&&t.errors.push(VX()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==Vt.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,o.push(this.visitState(l,t))}),l.name=c}else if(a.type==Vt.Transition){let l=this.visitTransition(a,t);n+=l.queryCount,r+=l.depCount,s.push(l)}else t.errors.push(zX())}),{type:Vt.Trigger,name:e.name,states:o,transitions:s,queryCount:n,depCount:r,options:null}}visitState(e,t){let n=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(n.containsDynamicStyles){let o=new Set,s=r||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{RF(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&t.errors.push(UX(e.name,[...o.values()]))}return{type:Vt.State,name:e.name,style:n,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let n=co(this,ym(e.animation),t),r=CZ(e.expr,t.errors);return{type:Vt.Transition,matchers:r,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:id(e.options)}}visitSequence(e,t){return{type:Vt.Sequence,steps:e.steps.map(n=>co(this,n,t)),options:id(e.options)}}visitGroup(e,t){let n=t.currentTime,r=0,o=e.steps.map(s=>{t.currentTime=n;let a=co(this,s,t);return r=Math.max(r,t.currentTime),a});return t.currentTime=r,{type:Vt.Group,steps:o,options:id(e.options)}}visitAnimate(e,t){let n=PZ(e.timings,t.errors);t.currentAnimateTimings=n;let r,o=e.styles?e.styles:Qt({});if(o.type==Vt.Keyframes)r=this.visitKeyframes(o,t);else{let s=e.styles,a=!1;if(!s){a=!0;let c={};n.easing&&(c.easing=n.easing),s=Qt(c)}t.currentTime+=n.duration+n.delay;let l=this.visitStyle(s,t);l.isEmptyStep=a,r=l}return t.currentAnimateTimings=null,{type:Vt.Animate,timings:n,style:r,options:null}}visitStyle(e,t){let n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){let n=[],r=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of r)typeof a=="string"?a===zs?n.push(a):t.errors.push(HX(a)):n.push(new Map(Object.entries(a)));let o=!1,s=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let l of a.values())if(l.toString().indexOf(PF)>=0){o=!0;break}}}),{type:Vt.Style,styles:n,easing:s,offset:e.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(e,t){let n=t.currentAnimateTimings,r=t.currentTime,o=t.currentTime;n&&o>0&&(o-=n.duration+n.delay),e.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),d=c.get(l),u=!0;d&&(o!=r&&o>=d.startTime&&r<=d.endTime&&(t.errors.push(GX(l,d.startTime,d.endTime,o,r)),u=!1),o=d.startTime),u&&c.set(l,{startTime:o,endTime:r}),t.options&&vZ(a,t.options,t.errors)})})}visitKeyframes(e,t){let n={type:Vt.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(jX()),n;let r=1,o=0,s=[],a=!1,l=!1,c=0,d=e.steps.map(g=>{let _=this._makeStyleAst(g,t),x=_.offset!=null?_.offset:DZ(_.styles),C=0;return x!=null&&(o++,C=_.offset=x),l=l||C<0||C>1,a=a||C0&&o{let x=h>0?_==p?1:h*_:s[_],C=x*b;t.currentTime=f+m.delay+C,m.duration=C,this._validateStyleAst(g,t),g.offset=x,n.styles.push(g)}),n}visitReference(e,t){return{type:Vt.Reference,animation:co(this,ym(e.animation),t),options:id(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:Vt.AnimateChild,options:id(e.options)}}visitAnimateRef(e,t){return{type:Vt.AnimateRef,animation:this.visitReference(e.animation,t),options:id(e.options)}}visitQuery(e,t){let n=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;let[o,s]=IZ(e.selector);t.currentQuerySelector=n.length?n+" "+o:o,uo(t.collectedStyles,t.currentQuerySelector,new Map);let a=co(this,ym(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:Vt.Query,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:e.selector,options:id(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(YX());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:Ob(e.timings,t.errors,!0);return{type:Vt.Stagger,animation:co(this,ym(e.animation),t),timings:n,options:null}}};function IZ(i){let e=!!i.split(/\s*,\s*/).find(t=>t==AF);return e&&(i=i.replace(EZ,"")),i=i.replace(/@\*/g,Pb).replace(/@\w+/g,t=>Pb+"-"+t.slice(1)).replace(/:animating/g,cI),[i,e]}function TZ(i){return i?Z({},i):null}var pI=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function DZ(i){if(typeof i=="string")return null;let e=null;if(Array.isArray(i))i.forEach(t=>{if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let t=i;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function PZ(i,e){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let o=Ob(i,e).duration;return iI(o,0,"")}let t=i;if(t.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=iI(0,0,"");return o.dynamic=!0,o.strValue=t,o}let r=Ob(t,e);return iI(r.duration,r.delay,r.easing)}function id(i){return i?(i=Z({},i),i.params&&(i.params=TZ(i.params))):i={},i}function iI(i,e,t){return{duration:i,delay:e,easing:t}}function PI(i,e,t,n,r,o,s=null,a=!1){return{type:1,element:i,keyframes:e,preStyleProps:t,postStyleProps:n,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}var Cm=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},OZ=1,RZ=":enter",AZ=new RegExp(RZ,"g"),NZ=":leave",kZ=new RegExp(NZ,"g");function kF(i,e,t,n,r,o=new Map,s=new Map,a,l,c=[]){return new fI().buildKeyframes(i,e,t,n,r,o,s,a,l,c)}var fI=class{buildKeyframes(e,t,n,r,o,s,a,l,c,d=[]){c=c||new Cm;let u=new mI(e,t,c,r,o,d,[]);u.options=l;let h=l.delay?Aa(l.delay):0;u.currentTimeline.delayNextStep(h),u.currentTimeline.setStyles([s],null,u.errors,l),co(this,n,u);let p=u.timelines.filter(f=>f.containsAnimation());if(p.length&&a.size){let f;for(let m=p.length-1;m>=0;m--){let b=p[m];if(b.element===t){f=b;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,u.errors,l)}return p.length?p.map(f=>f.buildKeyframes()):[PI(t,[],[],[],0,h,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let n=t.subInstructions.get(t.element);if(n){let r=t.createSubContext(e.options),o=t.currentTimeline.currentTime,s=this._visitSubInstructions(n,r,r.options);o!=s&&t.transformIntoNewTimeline(s)}t.previousNode=e}visitAnimateRef(e,t){let n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,n),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,n){for(let r of e){let o=r?.delay;if(o){let s=typeof o=="number"?o:Aa(wm(o,r?.params??{},t.errors));n.delayNextStep(s)}}}_visitSubInstructions(e,t,n){let o=t.currentTimeline.currentTime,s=n.duration!=null?Aa(n.duration):null,a=n.delay!=null?Aa(n.delay):null;return s!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(e,t){t.updateOptions(e.options,!0),co(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let n=t.subContextCount,r=t,o=e.options;if(o&&(o.params||o.delay)&&(r=t.createSubContext(o),r.transformIntoNewTimeline(),o.delay!=null)){r.previousNode.type==Vt.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Nb);let s=Aa(o.delay);r.delayNextStep(s)}e.steps.length&&(e.steps.forEach(s=>co(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let n=[],r=t.currentTimeline.currentTime,o=e.options&&e.options.delay?Aa(e.options.delay):0;e.steps.forEach(s=>{let a=t.createSubContext(e.options);o&&a.delayNextStep(o),co(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(s=>t.currentTimeline.mergeTimelineCollectedStyles(s)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let n=e.strValue,r=t.params?wm(n,t.params,t.errors):n;return Ob(r,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let n=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());let o=e.style;o.type==Vt.Keyframes?this.visitKeyframes(o,t):(t.incrementTime(n.duration),this.visitStyle(o,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.hasCurrentStyleProperties()&&n.forwardFrame();let o=r&&r.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(o):n.setStyles(e.styles,o,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let n=t.currentAnimateTimings,r=t.currentTimeline.duration,o=n.duration,a=t.createSubContext().currentTimeline;a.easing=n.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*o),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(r+o),t.previousNode=e}visitQuery(e,t){let n=t.currentTimeline.currentTime,r=e.options||{},o=r.delay?Aa(r.delay):0;o&&(t.previousNode.type===Vt.Style||n==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Nb);let s=n,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,d)=>{t.currentQueryIndex=d;let u=t.createSubContext(e.options,c);o&&u.delayNextStep(o),c===t.element&&(l=u.currentTimeline),co(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let h=u.currentTimeline.currentTime;s=Math.max(s,h)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let n=t.parentContext,r=t.currentTimeline,o=e.timings,s=Math.abs(o.duration),a=s*(t.currentQueryTotal-1),l=s*t.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=n.currentStaggerTime;break}let d=t.currentTimeline;l&&d.delayNextStep(l);let u=d.currentTime;co(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-u+(r.startTime-n.currentTimeline.startTime)}},Nb={},mI=class i{constructor(e,t,n,r,o,s,a,l){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Nb,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new kb(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let n=e,r=this.options;n.duration!=null&&(r.duration=Aa(n.duration)),n.delay!=null&&(r.delay=Aa(n.delay));let o=n.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!t||!s.hasOwnProperty(a))&&(s[a]=wm(o[a],s,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let n=e.params={};Object.keys(t).forEach(r=>{n[r]=t[r]})}}return e}createSubContext(e=null,t,n){let r=t||this.element,o=new i(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(e){return this.previousNode=Nb,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){let r={duration:t??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},o=new gI(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,n,r,o,s){let a=[];if(r&&a.push(this.element),e.length>0){e=e.replace(AZ,"."+this._enterClassName),e=e.replace(kZ,"."+this._leaveClassName);let l=n!=1,c=this._driver.query(this.element,e,l);n!==0&&(c=n<0?c.slice(c.length+n,c.length):c.slice(0,n)),a.push(...c)}return!o&&a.length==0&&s.push(XX(t)),a}},kb=class i{constructor(e,t,n,r){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new i(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=OZ,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||zs),this._currentKeyframe.set(t,zs);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,r){t&&this._previousKeyframe.set("easing",t);let o=r&&r.params||{},s=LZ(e,this._globalTimelineStyles);for(let[a,l]of s){let c=wm(l,o,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??zs),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,n)=>{let r=this._styleSummary.get(n);(!r||t.time>r.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,n=this._keyframes.size===1&&this.duration===0,r=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((d,u)=>{d===Sb?e.add(u):d===zs&&t.add(u)}),n||c.set("offset",l/this.duration),r.push(c)});let o=[...e.values()],s=[...t.values()];if(n){let a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return PI(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}},gI=class extends kb{constructor(e,t,n,r,o,s,a=!1){super(e,t,s.delay),this.keyframes=n,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){let o=[],s=n+t,a=t/s,l=new Map(e[0]);l.set("offset",0),o.push(l);let c=new Map(e[0]);c.set("offset",bF(a)),o.push(c);let d=e.length-1;for(let u=1;u<=d;u++){let h=new Map(e[u]),p=h.get("offset"),f=t+p*n;h.set("offset",bF(f/s)),o.push(h)}n=s,t=0,r="",e=o}return PI(this.element,e,this.preStyleProps,this.postStyleProps,n,t,r,!0)}};function bF(i,e=3){let t=Math.pow(10,e-1);return Math.round(i*t)/t}function LZ(i,e){let t=new Map,n;return i.forEach(r=>{if(r==="*"){n??=e.keys();for(let o of n)t.set(o,zs)}else for(let[o,s]of r)t.set(o,s)}),t}function yF(i,e,t,n,r,o,s,a,l,c,d,u,h){return{type:0,element:i,triggerName:e,isRemovalTransition:r,fromState:t,fromStyles:o,toState:n,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:u,errors:h}}var rI={},Lb=class{constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,r){return FZ(this.ast.matchers,e,t,n,r)}buildStyles(e,t,n){let r=this._stateStyles.get("*");return e!==void 0&&(r=this._stateStyles.get(e?.toString())||r),r?r.buildStyles(t,n):new Map}build(e,t,n,r,o,s,a,l,c,d){let u=[],h=this.ast.options&&this.ast.options.params||rI,p=a&&a.params||rI,f=this.buildStyles(n,p,u),m=l&&l.params||rI,b=this.buildStyles(r,m,u),g=new Set,_=new Map,x=new Map,C=r==="void",T={params:LF(m,h),delay:this.ast.options?.delay},D=d?[]:kF(e,t,this.ast.animation,o,s,f,b,T,c,u),E=0;return D.forEach(P=>{E=Math.max(P.duration+P.delay,E)}),u.length?yF(t,this._triggerName,n,r,C,f,b,[],[],_,x,E,u):(D.forEach(P=>{let Y=P.element,$=uo(_,Y,new Set);P.preStyleProps.forEach(O=>$.add(O));let U=uo(x,Y,new Set);P.postStyleProps.forEach(O=>U.add(O)),Y!==t&&g.add(Y)}),yF(t,this._triggerName,n,r,C,f,b,D,[...g.values()],_,x,E))}};function FZ(i,e,t,n,r){return i.some(o=>o(e,t,n,r))}function LF(i,e){let t=Z({},e);return Object.entries(i).forEach(([n,r])=>{r!=null&&(t[n]=r)}),t}var _I=class{constructor(e,t,n){this.styles=e,this.defaultParams=t,this.normalizer=n}buildStyles(e,t){let n=new Map,r=LF(e,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=wm(s,r,t));let l=this.normalizer.normalizePropertyName(a,t);s=this.normalizer.normalizeStyleValue(a,l,s,t),n.set(a,s)})}),n}};function BZ(i,e,t){return new vI(i,e,t)}var vI=class{constructor(e,t,n){this.name=e,this.ast=t,this._normalizer=n,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{let o=r.options&&r.options.params||{};this.states.set(r.name,new _I(r.style,o,n))}),xF(this.states,"true","1"),xF(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new Lb(e,r,this.states))}),this.fallbackTransition=VZ(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,r){return this.transitionFactories.find(s=>s.match(e,t,n,r))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}};function VZ(i,e,t){let n=[(s,a)=>!0],r={type:Vt.Sequence,steps:[],options:null},o={type:Vt.Transition,animation:r,matchers:n,options:null,queryCount:0,depCount:0};return new Lb(i,o,e)}function xF(i,e,t){i.has(e)?i.has(t)||i.set(t,i.get(e)):i.has(t)&&i.set(e,i.get(t))}var zZ=new Cm,bI=class{constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){let n=[],r=[],o=NF(this._driver,t,n,r);if(n.length)throw eZ(n);r.length&&void 0,this._animations.set(e,o)}_buildPlayer(e,t,n){let r=e.element,o=IF(this._normalizer,e.keyframes,t,n);return this._driver.animate(r,o,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){let r=[],o=this._animations.get(e),s,a=new Map;if(o?(s=kF(this._driver,t,o,OF,lI,new Map,new Map,n,zZ,r),s.forEach(d=>{let u=uo(a,d.element,new Map);d.postStyleProps.forEach(h=>u.set(h,null))})):(r.push(tZ()),s=[]),r.length)throw nZ(r);a.forEach((d,u)=>{d.forEach((h,p)=>{d.set(p,this._driver.computeStyle(u,p,zs))})});let l=s.map(d=>{let u=a.get(d.element);return this._buildPlayer(d,new Map,u)}),c=kl(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw iZ(e);return t}listen(e,t,n,r){let o=MI(t,"","","");return SI(this._getPlayer(e),n,o,r),()=>{}}command(e,t,n,r){if(n=="register"){this.register(e,r[0]);return}if(n=="create"){let s=r[0]||{};this.create(e,t,s);return}let o=this._getPlayer(e);switch(n){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e);break}}},wF="ng-animate-queued",UZ=".ng-animate-queued",oI="ng-animate-disabled",HZ=".ng-animate-disabled",GZ="ng-star-inserted",jZ=".ng-star-inserted",WZ=[],FF={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},$Z={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},ps="__ng_removed",Sm=class{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let n=e&&e.hasOwnProperty("value"),r=n?e.value:e;if(this.value=YZ(r),n){let o=e,{value:s}=o,a=sS(o,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let n=this.options.params;Object.keys(t).forEach(r=>{n[r]==null&&(n[r]=t[r])})}}},xm="void",sI=new Sm(xm),yI=class{constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Lo(t,this._hostClassName)}listen(e,t,n,r){if(!this._triggers.has(t))throw rZ(n,t);if(n==null||n.length==0)throw oZ(t);if(!XZ(n))throw sZ(n,t);let o=uo(this._elementListeners,e,[]),s={name:t,phase:n,callback:r};o.push(s);let a=uo(this._engine.statesByElement,e,new Map);return a.has(t)||(Lo(e,Mb),Lo(e,Mb+"-"+t),a.set(t,sI)),()=>{this._engine.afterFlush(()=>{let l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw aZ(e);return t}trigger(e,t,n,r=!0){let o=this._getTrigger(t),s=new Mm(this.id,t,e),a=this._engine.statesByElement.get(e);a||(Lo(e,Mb),Lo(e,Mb+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new Sm(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=sI),!(c.value===xm)&&l.value===c.value){if(!KZ(l.params,c.params)){let m=[],b=o.matchStyles(l.value,l.params,m),g=o.matchStyles(c.value,c.params,m);m.length?this._engine.reportError(m):this._engine.afterFlush(()=>{rd(e,b),Us(e,g)})}return}let h=uo(this._engine.playersByElement,e,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==t&&m.queued&&m.destroy()});let p=o.matchTransition(l.value,c.value,e,c.params),f=!1;if(!p){if(!r)return;p=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:p,fromState:l,toState:c,player:s,isFallbackTransition:f}),f||(Lo(e,wF),s.onStart(()=>{mh(e,wF)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);let b=this._engine.playersByElement.get(e);if(b){let g=b.indexOf(s);g>=0&&b.splice(g,1)}}),this.players.push(s),h.push(s),s}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let n=this._engine.driver.query(e,Pb,!0);n.forEach(r=>{if(r[ps])return;let o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,t,n,r){let o=this._engine.statesByElement.get(e),s=new Map;if(o){let a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){let d=this.trigger(e,c,xm,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,s),n&&kl(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(t&&n){let r=new Set;t.forEach(o=>{let s=o.name;if(r.has(s))return;r.add(s);let l=this._triggers.get(s).fallbackTransition,c=n.get(s)||sI,d=new Sm(xm),u=new Mm(this.id,s,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:s,transition:l,fromState:c,toState:d,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(n.totalAnimations){let o=n.players.length?n.playersByQueriedElement.get(e):[];if(o&&o.length)r=!0;else{let s=e;for(;s=s.parentNode;)if(n.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)n.markElementAsRemoved(this.id,e,!1,t);else{let o=e[ps];(!o||o===FF)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){Lo(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(n=>{let r=n.player;if(r.destroyed)return;let o=n.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==n.triggerName){let l=MI(o,n.triggerName,n.fromState.value,n.toState.value);l._data=e,SI(n.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(n)}),this._queue=[],t.sort((n,r)=>{let o=n.transition.ast.depCount,s=r.transition.ast.depCount;return o==0||s==0?o-s:this._engine.driver.containsElement(n.element,r.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},xI=class{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,t){let n=new yI(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){let n=this._namespaceList,r=this.namespacesByHostElement;if(n.length-1>=0){let s=!1,a=this.driver.getParentElement(t);for(;a;){let l=r.get(a);if(l){let c=n.indexOf(l);n.splice(c+1,0,e),s=!0;break}a=this.driver.getParentElement(a)}s||n.unshift(e)}else n.push(e);return r.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let r=this._namespaceLookup[e];r&&r.register(t,n)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let r=this._namespaceList.indexOf(n);r>=0&&this._namespaceList.splice(r,1),n.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,n=this.statesByElement.get(e);if(n){for(let r of n.values())if(r.namespaceId){let o=this._fetchNamespace(r.namespaceId);o&&t.add(o)}}return t}trigger(e,t,n,r){if(Tb(t)){let o=this._fetchNamespace(e);if(o)return o.trigger(t,n,r),!0}return!1}insertNode(e,t,n,r){if(!Tb(t))return;let o=t[ps];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(t);s>=0&&this.collectedLeaveElements.splice(s,1)}if(e){let s=this._fetchNamespace(e);s&&s.insertNode(t,n)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Lo(e,oI)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),mh(e,oI))}removeNode(e,t,n){if(Tb(t)){let r=e?this._fetchNamespace(e):null;r?r.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n);let o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(e,t,n,r,o){this.collectedLeaveElements.push(t),t[ps]={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:o}}listen(e,t,n,r,o){return Tb(t)?this._fetchNamespace(e).listen(t,n,r,o):()=>{}}_buildInstruction(e,t,n,r,o){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t,o)}destroyInnerAnimations(e){let t=this.driver.query(e,Pb,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,cI,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return kl(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[ps];if(t&&t.setForRemoval){if(e[ps]=FF,t.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(oI)&&this.markElementAsDisabled(e,!1),this.driver.query(e,HZ,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,r)=>this._balanceNamespaceList(n,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],t.length?kl(t).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(e){throw lZ(e)}_flushAnimations(e,t){let n=new Cm,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(k=>{d.add(k);let G=this.driver.query(k,UZ,!0);for(let K=0;K{let K=OF+m++;f.set(G,K),k.forEach(de=>Lo(de,K))});let b=[],g=new Set,_=new Set;for(let k=0;kg.add(de)):_.add(G))}let x=new Map,C=MF(h,Array.from(g));C.forEach((k,G)=>{let K=lI+m++;x.set(G,K),k.forEach(de=>Lo(de,K))}),e.push(()=>{p.forEach((k,G)=>{let K=f.get(G);k.forEach(de=>mh(de,K))}),C.forEach((k,G)=>{let K=x.get(G);k.forEach(de=>mh(de,K))}),b.forEach(k=>{this.processLeaveNode(k)})});let T=[],D=[];for(let k=this._namespaceList.length-1;k>=0;k--)this._namespaceList[k].drainQueuedTransitions(t).forEach(K=>{let de=K.player,Te=K.element;if(T.push(de),this.collectedEnterElements.length){let Ge=Te[ps];if(Ge&&Ge.setForMove){if(Ge.previousTriggersValues&&Ge.previousTriggersValues.has(K.triggerName)){let ut=Ge.previousTriggersValues.get(K.triggerName),Ve=this.statesByElement.get(K.element);if(Ve&&Ve.has(K.triggerName)){let Qe=Ve.get(K.triggerName);Qe.value=ut,Ve.set(K.triggerName,Qe)}}de.destroy();return}}let Ee=!u||!this.driver.containsElement(u,Te),He=x.get(Te),he=f.get(Te),re=this._buildInstruction(K,n,he,He,Ee);if(re.errors&&re.errors.length){D.push(re);return}if(Ee){de.onStart(()=>rd(Te,re.fromStyles)),de.onDestroy(()=>Us(Te,re.toStyles)),r.push(de);return}if(K.isFallbackTransition){de.onStart(()=>rd(Te,re.fromStyles)),de.onDestroy(()=>Us(Te,re.toStyles)),r.push(de);return}let qe=[];re.timelines.forEach(Ge=>{Ge.stretchStartingKeyframe=!0,this.disabledNodes.has(Ge.element)||qe.push(Ge)}),re.timelines=qe,n.append(Te,re.timelines);let ue={instruction:re,player:de,element:Te};s.push(ue),re.queriedElements.forEach(Ge=>uo(a,Ge,[]).push(de)),re.preStyleProps.forEach((Ge,ut)=>{if(Ge.size){let Ve=l.get(ut);Ve||l.set(ut,Ve=new Set),Ge.forEach((Qe,Dt)=>Ve.add(Dt))}}),re.postStyleProps.forEach((Ge,ut)=>{let Ve=c.get(ut);Ve||c.set(ut,Ve=new Set),Ge.forEach((Qe,Dt)=>Ve.add(Dt))})});if(D.length){let k=[];D.forEach(G=>{k.push(cZ(G.triggerName,G.errors))}),T.forEach(G=>G.destroy()),this.reportError(k)}let E=new Map,P=new Map;s.forEach(k=>{let G=k.element;n.has(G)&&(P.set(G,G),this._beforeAnimationBuild(k.player.namespaceId,k.instruction,E))}),r.forEach(k=>{let G=k.element;this._getPreviousPlayers(G,!1,k.namespaceId,k.triggerName,null).forEach(de=>{uo(E,G,[]).push(de),de.destroy()})});let Y=b.filter(k=>EF(k,l,c)),$=new Map;SF($,this.driver,_,c,zs).forEach(k=>{EF(k,l,c)&&Y.push(k)});let O=new Map;p.forEach((k,G)=>{SF(O,this.driver,new Set(k),l,Sb)}),Y.forEach(k=>{let G=$.get(k),K=O.get(k);$.set(k,new Map([...G?.entries()??[],...K?.entries()??[]]))});let B=[],j=[],q={};s.forEach(k=>{let{element:G,player:K,instruction:de}=k;if(n.has(G)){if(d.has(G)){K.onDestroy(()=>Us(G,de.toStyles)),K.disabled=!0,K.overrideTotalTime(de.totalTime),r.push(K);return}let Te=q;if(P.size>1){let He=G,he=[];for(;He=He.parentNode;){let re=P.get(He);if(re){Te=re;break}he.push(He)}he.forEach(re=>P.set(re,Te))}let Ee=this._buildAnimation(K.namespaceId,de,E,o,O,$);if(K.setRealPlayer(Ee),Te===q)B.push(K);else{let He=this.playersByElement.get(Te);He&&He.length&&(K.parentPlayer=kl(He)),r.push(K)}}else rd(G,de.fromStyles),K.onDestroy(()=>Us(G,de.toStyles)),j.push(K),d.has(G)&&r.push(K)}),j.forEach(k=>{let G=o.get(k.element);if(G&&G.length){let K=kl(G);k.setRealPlayer(K)}}),r.forEach(k=>{k.parentPlayer?k.syncPlayerEvents(k.parentPlayer):k.destroy()});for(let k=0;k!Ee.destroyed);Te.length?ZZ(this,G,Te):this.processLeaveNode(G)}return b.length=0,B.forEach(k=>{this.players.push(k),k.onDone(()=>{k.destroy();let G=this.players.indexOf(k);this.players.splice(G,1)}),k.play()}),B}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,r,o){let s=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(s=a)}else{let a=this.playersByElement.get(e);if(a){let l=!o||o==xm;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(n||r)&&(s=s.filter(a=>!(n&&n!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(e,t,n){let r=t.triggerName,o=t.element,s=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:r;for(let l of t.timelines){let c=l.element,d=c!==o,u=uo(n,c,[]);this._getPreviousPlayers(c,d,s,a,t.toState).forEach(p=>{let f=p.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),p.destroy(),u.push(p)})}rd(o,t.fromStyles)}_buildAnimation(e,t,n,r,o,s){let a=t.triggerName,l=t.element,c=[],d=new Set,u=new Set,h=t.timelines.map(f=>{let m=f.element;d.add(m);let b=m[ps];if(b&&b.removedBeforeQueried)return new Nl(f.duration,f.delay);let g=m!==l,_=QZ((n.get(m)||WZ).map(E=>E.getRealPlayer())).filter(E=>{let P=E;return P.element?P.element===m:!1}),x=o.get(m),C=s.get(m),T=IF(this._normalizer,f.keyframes,x,C),D=this._buildPlayer(f,T,_);if(f.subTimeline&&r&&u.add(m),g){let E=new Mm(e,a,m);E.setRealPlayer(D),c.push(E)}return D});c.forEach(f=>{uo(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>qZ(this.playersByQueriedElement,f.element,f))}),d.forEach(f=>Lo(f,gF));let p=kl(h);return p.onDestroy(()=>{d.forEach(f=>mh(f,gF)),Us(l,t.toStyles)}),u.forEach(f=>{uo(r,f,[]).push(p)}),p}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new Nl(e.duration,e.delay)}},Mm=class{constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n,this._player=new Nl,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,n)=>{t.forEach(r=>SI(e,n,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){uo(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function qZ(i,e,t){let n=i.get(e);if(n){if(n.length){let r=n.indexOf(t);n.splice(r,1)}n.length==0&&i.delete(e)}return n}function YZ(i){return i??null}function Tb(i){return i&&i.nodeType===1}function XZ(i){return i=="start"||i=="done"}function CF(i,e){let t=i.style.display;return i.style.display=e??"none",t}function SF(i,e,t,n,r){let o=[];t.forEach(l=>o.push(CF(l)));let s=[];n.forEach((l,c)=>{let d=new Map;l.forEach(u=>{let h=e.computeStyle(c,u,r);d.set(u,h),(!h||h.length==0)&&(c[ps]=$Z,s.push(c))}),i.set(c,d)});let a=0;return t.forEach(l=>CF(l,o[a++])),s}function MF(i,e){let t=new Map;if(i.forEach(a=>t.set(a,[])),e.length==0)return t;let n=1,r=new Set(e),o=new Map;function s(a){if(!a)return n;let l=o.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:r.has(c)?l=n:l=s(c),o.set(a,l),l}return e.forEach(a=>{let l=s(a);l!==n&&t.get(l).push(a)}),t}function Lo(i,e){i.classList?.add(e)}function mh(i,e){i.classList?.remove(e)}function ZZ(i,e,t){kl(t).onDone(()=>i.processLeaveNode(e))}function QZ(i){let e=[];return BF(i,e),e}function BF(i,e){for(let t=0;tr.add(o)):e.set(i,n),t.delete(i),!0}var _h=class{constructor(e,t,n){this._driver=t,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new xI(e.body,t,n),this._timelineEngine=new bI(e.body,t,n),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(e,t,n,r,o){let s=e+"-"+r,a=this._triggerCache[s];if(!a){let l=[],c=[],d=NF(this._driver,o,l,c);if(l.length)throw KX(r,l);c.length&&void 0,a=BZ(r,d,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(t,r,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,n,r){this._transitionEngine.insertNode(e,t,n,r)}onRemove(e,t,n){this._transitionEngine.removeNode(e,t,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,r){if(n.charAt(0)=="@"){let[o,s]=fF(n),a=r;this._timelineEngine.command(o,t,s,a)}else this._transitionEngine.trigger(e,t,n,r)}listen(e,t,n,r,o){if(n.charAt(0)=="@"){let[s,a]=fF(n);return this._timelineEngine.listen(s,t,a,o)}return this._transitionEngine.listen(e,t,n,r,o)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function JZ(i,e){let t=null,n=null;return Array.isArray(e)&&e.length?(t=aI(e[0]),e.length>1&&(n=aI(e[e.length-1]))):e instanceof Map&&(t=aI(e)),t||n?new wI(i,t,n):null}var gh=class gh{constructor(e,t,n){this._element=e,this._startStyles=t,this._endStyles=n,this._state=0;let r=gh.initialStylesByElement.get(e);r||gh.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Us(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Us(this._element,this._initialStyles),this._endStyles&&(Us(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(gh.initialStylesByElement.delete(this._element),this._startStyles&&(rd(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(rd(this._element,this._endStyles),this._endStyles=null),Us(this._element,this._initialStyles),this._state=3)}};gh.initialStylesByElement=new WeakMap;var wI=gh;function aI(i){let e=null;return i.forEach((t,n)=>{eQ(n)&&(e=e||new Map,e.set(n,t))}),e}function eQ(i){return i==="display"||i==="position"}var Fb=class{constructor(e,t,n,r){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(e,t,n){return e.animate(this._convertKeyframesToObject(t),n)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,r)=>{r!=="offset"&&e.set(r,this._finished?n:DI(this.element,r))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Bb=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return TF(e,t)}getParentElement(e){return EI(e)}query(e,t,n){return DF(e,t,n)}computeStyle(e,t,n){return DI(e,t)}animate(e,t,n,r,o,s=[]){let a=r==0?"both":"forwards",l={duration:n,delay:r,fill:a};o&&(l.easing=o);let c=new Map,d=s.filter(p=>p instanceof Fb);yZ(n,r)&&d.forEach(p=>{p.currentSnapshot.forEach((f,m)=>c.set(m,f))});let u=_Z(t).map(p=>new Map(p));u=xZ(e,u,c);let h=JZ(e,u);return new Fb(e,u,l,h)}};var Db="@",VF="@.disabled",Vb=class{constructor(e,t,n,r){this.namespaceId=e,this.delegate=t,this.engine=n,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,n,r=!0){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,r)}removeChild(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,n,r){this.delegate.setAttribute(e,t,n,r)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,r){this.delegate.setStyle(e,t,n,r)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){t.charAt(0)==Db&&t==VF?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n){return this.delegate.listen(e,t,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},CI=class extends Vb{constructor(e,t,n,r,o){super(t,n,r,o),this.factory=e,this.namespaceId=t}setProperty(e,t,n){t.charAt(0)==Db?t.charAt(1)=="."&&t==VF?(n=n===void 0?!0:!!n,this.disableAnimations(e,n)):this.engine.process(this.namespaceId,e,t.slice(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n){if(t.charAt(0)==Db){let r=tQ(e),o=t.slice(1),s="";return o.charAt(0)!=Db&&([o,s]=nQ(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{let l=a._data||-1;this.factory.scheduleListenerCallback(l,n,a)})}return this.delegate.listen(e,t,n)}};function tQ(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function nQ(i){let e=i.indexOf("."),t=i.substring(0,e),n=i.slice(e+1);return[t,n]}var zb=class{constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(r,o)=>{let s=o?.parentNode(r);s&&o.removeChild(s,r)}}createRenderer(e,t){let n="",r=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,d=c.get(r);if(!d){let u=()=>c.delete(r);d=new Vb(n,r,this.engine,u),c.set(r,d)}return d}let o=t.id,s=t.id+"-"+this._currentId;this._currentId++,this.engine.register(s,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(o,s,e,c.name,c)};return t.data.animation.forEach(a),new CI(this,s,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){if(e>=0&&et(n));return}let r=this._animationCallbacksBuffer;r.length==0&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),r.push([t,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var rQ=(()=>{let e=class e extends _h{constructor(n,r,o){super(n,r,o)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(od),X(sd))},e.\u0275prov=ee({token:e,factory:e.\u0275fac});let i=e;return i})();function oQ(){return new Rb}function sQ(i,e,t){return new zb(i,e,t)}var zF=[{provide:sd,useFactory:oQ},{provide:_h,useClass:rQ},{provide:Il,useFactory:sQ,deps:[sb,_h,Le]}],aQ=[{provide:od,useFactory:()=>new Bb},{provide:Zn,useValue:"BrowserAnimations"},...zF],z1e=[{provide:od,useClass:II},{provide:Zn,useValue:"NoopAnimations"},...zF];function UF(){return Ao("NgEagerAnimations"),[...aQ]}var Ll=function(i){return i[i.MAIN_PANEL=0]="MAIN_PANEL",i[i.POPUP=1]="POPUP",i[i.GRAPH_PANEL=2]="GRAPH_PANEL",i}(Ll||{}),RI=function(i){return i[i.WEBGL=0]="WEBGL",i}(RI||{}),vt=function(i){return i.NODE_LABEL="title",i.INPUT_METADATA="input",i.OUTPUT_METADATA="output",i.ATTRIBUTE="list",i}(vt||{}),Rn=function(i){return i.OP_NODE_ID="Op node id",i.OP_ATTRS="Op node attributes",i.OP_INPUTS="Op node inputs",i.OP_OUTPUTS="Op node outputs",i.LAYER_NODE_CHILDREN_COUNT="Layer node children count",i.LAYER_NODE_DESCENDANTS_COUNT="Layer node descendants count",i.LAYER_NODE_ATTRS="Layer node attributes",i}(Rn||{}),Fl=function(i){return i.TENSOR_SHAPE="Tensor shape",i}(Fl||{}),mn=function(i){return i[i.REGULAR=0]="REGULAR",i[i.MEDIUM=1]="MEDIUM",i[i.BOLD=2]="BOLD",i[i.MONOSPACE_MEDIUM=3]="MONOSPACE_MEDIUM",i[i.ICONS=4]="ICONS",i}(mn||{}),Bl=function(i){return i.OP_NODE_ID="id",i.NUMBER_OF_CHILDREN="#children",i.NUMBER_OF_DESCENDANTS="#descendants",i}(Bl||{}),Hs=function(i){return i.NODE_BG_COLOR="node_bg_color",i.NODE_TEXT_COLOR="node_text_color",i.NODE_BORDER_COLOR="node_border_color",i}(Hs||{}),Ub=function(i){return i.V2="v2",i}(Ub||{}),Ln=function(i){return i.REGEX="regex",i.ATTR_VALUE_RANGE="attr_value_range",i.NODE_TYPE="node_type",i}(Ln||{}),mr=function(i){return i.OP_NODES="op_nodes",i.LAYER_NODES="layer_nodes",i.OP_AND_LAYER_NODES="op_and_layer_nodes",i}(mr||{});function Vi(i){i||(Ju(Vi),i=te(Ni));let e=new Mt(t=>i.onDestroy(t.next.bind(t)));return t=>t.pipe(Xe(e))}function Hb(i,e){!e?.injector&&Ju(Hb);let t=e?.injector??te(yt),n=new ma(1),r=mt(()=>{let o;try{o=i()}catch(s){kr(()=>n.error(s));return}kr(()=>n.next(o))},{injector:t,manualCleanup:!0});return t.get(Ni).onDestroy(()=>{r.destroy(),n.complete()}),n.asObservable()}var Fo=11,Gb=4;var AI=16,NI=200,Em=12,Im=1e3;var Kt=.001,kI=25,LI=5,jb="me_test",HF=.1,Wb="model_explorer_show_on_node_item_types_v2",$b="model_explorer_show_on_edge_item_types_v2",Na="Node data provider: ",Vl=10,qb=7.5,ka="__value",Bo="__tensor_tag",FI=20,Yb={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var GF="model-explorer-export-to-resource",vh=14;var Gs=function(i){return i[i.OP_NODE=0]="OP_NODE",i[i.GROUP_NODE=1]="GROUP_NODE",i}(Gs||{});var nIe=new OffscreenCanvas(300,300);var Tm=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function Et(i){return i?.nodeType===Gs.OP_NODE}function bt(i){return i?.nodeType===Gs.GROUP_NODE}function BI(i){let e=[];for(let[t,n]of Object.entries(i))switch(t){case Rn.OP_NODE_ID:n.selected&&e.push(Bl.OP_NODE_ID);break;default:break}return e}function VI(i){let e=[];for(let[t,n]of Object.entries(i))switch(t){case Rn.LAYER_NODE_CHILDREN_COUNT:n.selected&&e.push(Bl.NUMBER_OF_CHILDREN);break;case Rn.LAYER_NODE_DESCENDANTS_COUNT:n.selected&&e.push(Bl.NUMBER_OF_DESCENDANTS);break;default:break}return e}function Xb(i,e){if(Et(i))switch(e.toLowerCase()){case Bl.OP_NODE_ID:return i.id;case"namespace":return ad(i);default:break}else if(bt(i))switch(e.toLowerCase()){case"namespace":return ad(i);case Bl.NUMBER_OF_CHILDREN:return String((i.nsChildrenIds||[]).length);case Bl.NUMBER_OF_DESCENDANTS:return String((i.descendantsNodeIds||[]).length);default:break}return""}function ad(i){return i.savedNamespace||i.namespace||""}function Lr(){return Math.random().toString(36).slice(-6)}function Dm(i,e,t,n=!1){let r=[];i==null?r=e.rootNodes.map(o=>o.id):r=i.nsChildrenIds||[];for(let o of r){let s=e.nodesById[o];if(s&&bt(s)&&(n||!n&&s.expanded)){let a=s.nsChildrenIds||[];(n?a.filter(c=>bt(e.nodesById[c])).length===0:a.filter(c=>bt(e.nodesById[c])).every(c=>!e.nodesById[c].expanded))&&t.push(s.id),Dm(s,e,t,n)}}}function bh(i,e,t,n){let r=[];if(i.length===2)r=i;else if(i.length===3&&i[0].x===i[1].x&&i[1].x===i[2].x)r=i;else{let o=!0,s=0;for(let l=0;lc?1:-1;if(s!==0&&s!==u){o=!1;break}s=u}let a=n.Vector3;if(o){let c=e().x(h=>h.x).y(h=>h.y).curve(t)(i).split(/M|C/).filter(h=>h!=="").map(h=>h.split(",").map(p=>Number(p))),d=new a(c[0][0],c[0][1],0),u=new n.CurvePath;for(let h=1;hnew a(d.x,d.y,0));r=new n.CatmullRomCurve3(l,!1,"catmullrom",HF).getPoints(kI)}}return r}function Zb(){let i=jF();return i?i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.contentEditable==="true":!1}function jF(i=document){let e=i.activeElement;return e?e.shadowRoot?jF(e.shadowRoot):e:null}function lQ(i,e,t){let n=t[Bo];return n?`Input${i}:${n} (${e.label})`:`Input${i} (${e.label})`}function cQ(i,e,t){let n=`Output${i}`;if(t.label==="GraphInputs"){let r=e.tensor_name;r!=null&&(n=`${n} (${r})`)}else{let r=e[Bo];r&&(n=`Output${i}:${r}`)}return n}function WF(i){let e=((i||{}).shape||"").replace(/ /g,"").replace(/×/g,"x");return e===""&&(e="?"),e}function zI(i,e=""){let t=i.attrs||{},n=[],r=new RegExp(e,"i");for(let o of Object.keys(t)){let s=o,a=t[o],l=[`${s}:${a}`,`${s}=${a}`];if(e.trim()===""||l.some(c=>r.test(c))){let c=a;s===ka?c=a.replace(/\s/gm,""):c=a.replace(/(\r\n|\n|\r)/gm," "),n.push({key:s,value:c})}}return n}function UI(i,e,t=""){let n=e.groupNodeAttributes?.[i.id.replace("___group___","")]||{},r=[],o=new RegExp(t,"i");for(let s of Object.keys(n)){let a=s,l=n[s],c=[`${a}:${l}`,`${a}=${l}`];if(t.trim()===""||c.some(d=>o.test(d))){let d=l.replace(/(\r\n|\n|\r)/gm," ");r.push({key:a,value:d})}}return r}function HI(i,e){let t=i.incomingEdges||[],n=[];for(let r=0;rVl){let r=t.length-Vl;n.push({key:`(${r} more input${r===1?"":"s"} omitted)`,value:"..."})}return n}function GI(i){let e=[],t=i.outputsMetadata||{},n=Object.values(t);for(let r=0;rVl){let r=n.length-Vl;e.push({key:`(${r} more output${r===1?"":"s"} omitted)`,value:"..."})}return e}function jI(i,e,t,n){let r=[],o=Object.keys(t).filter(a=>t[a].selected).filter(a=>a.startsWith(Na)).map(a=>a.replace(Na,"")),s=Object.values(n).filter(a=>o.includes(a.runName));for(let a of s){let l=(a.results||{})?.[e][i.id]?.strValue||"-";r.push({key:a.runName,value:l})}return r}function WI(i,e){let t=i.split("/"),n=e.split("/"),r="";for(let o=Math.min(t.length,n.length);o>0;o--){let s=t.slice(0,o).join("/"),a=n.slice(0,o).join("/");if(s===a){r=a;break}}return r}function $F(i){return new RegExp(/Only `SavedModel`s with \d+ MetaGraph are supported. Instead, it has \d+/).test(i)?`${i}. Try using the "TF adapter (direct)" adapter.`:i}function $I(i,e,t,n){let r=[],o=new Set;if(i.has(vt.NODE_LABEL)&&e.test(t.label)&&(r.push({type:vt.NODE_LABEL}),o.add(vt.NODE_LABEL)),i.has(vt.ATTRIBUTE)){let s=qF(t,n);for(let a of Object.keys(s)){let l=s[a],c=`${a}:${l}`,d=`${a}=${l}`;(e.test(c)||e.test(d))&&(r.push({type:vt.ATTRIBUTE,matchedAttrId:a}),o.add(vt.ATTRIBUTE))}}if(i.has(vt.INPUT_METADATA)&&Et(t))for(let s of t.incomingEdges||[]){let a=n.nodesById[s.sourceNodeId];e.test(a.label)&&(r.push({type:vt.INPUT_METADATA,matchedText:a.label}),o.add(vt.INPUT_METADATA));let l=t.inputsMetadata||{},c=(l[s.targetNodeInputId]||{})[Bo];c&&e.test(c)&&(r.push({type:vt.INPUT_METADATA,matchedText:c}),o.add(vt.INPUT_METADATA));let d=(a.outputsMetadata||{})[s.sourceNodeOutputId]||{};for(let h of Object.keys(d)){if(h.startsWith("__"))continue;let p=d[h],f=`${h}:${p}`,m=`${h}=${p}`;(e.test(p)||e.test(f)||e.test(m))&&(r.push({type:vt.INPUT_METADATA,matchedText:p}),o.add(vt.INPUT_METADATA))}let u=l[s.targetNodeInputId]||{};for(let h of Object.keys(u)){if(h.startsWith("__"))continue;let p=u[h],f=`${h}:${p}`,m=`${h}=${p}`;(e.test(p)||e.test(f)||e.test(m))&&(r.push({type:vt.INPUT_METADATA,matchedText:p}),o.add(vt.INPUT_METADATA))}}if(i.has(vt.OUTPUT_METADATA)&&Et(t)){let s=t.outputsMetadata||{};for(let a of t.outgoingEdges||[]){let l=n.nodesById[a.targetNodeId];e.test(l.label)&&(r.push({type:vt.OUTPUT_METADATA,matchedText:l.label}),o.add(vt.OUTPUT_METADATA));let c=(s[a.sourceNodeOutputId]||{})[Bo];c&&e.test(c)&&(r.push({type:vt.OUTPUT_METADATA,matchedText:c}),o.add(vt.OUTPUT_METADATA))}for(let a of Object.values(s))for(let l of Object.keys(a)){if(l.startsWith("__"))continue;let c=a[l],d=`${l}:${c}`,u=`${l}=${c}`;(e.test(c)||e.test(d)||e.test(u))&&(r.push({type:vt.OUTPUT_METADATA,matchedText:c}),o.add(vt.OUTPUT_METADATA))}}return{matches:r,matchTypes:o}}function qF(i,e){let t={};if(Et(i))t=Z({},i.attrs||{}),t.id=i.id;else if(bt(i)){t={"#descendants":`${(i.descendantsNodeIds||[]).length}`,"#children":`${(i.nsChildrenIds||[]).length}`};let n=e.groupNodeAttributes?.[i.id.replace("___group___","")]||{};t=Z(Z({},t),n)}return t}function dQ(i,e,t,n,r){let o=[],a=qF(n,r)[i];if(a!=null){let l=Number(a);!isNaN(l)&&l>=e&&l<=t&&o.push({type:vt.ATTRIBUTE,matchedAttrId:i})}return o}function yh(i){for(let e of i.filter(t=>t.type!==Ln.NODE_TYPE))switch(e.type){case Ln.REGEX:if(e.queryRegex!=="")return!0;break;case Ln.ATTR_VALUE_RANGE:if(e.attrName!=="")return!0;break;default:break}return!1}function Qb(i){return i.map(e=>({queries:e.queries.map(n=>{switch(n.type){case Ln.REGEX:{let r=new RegExp("","i");try{r=new RegExp(n.queryRegex,"i")}catch(s){console.warn("Failed to create regex",s)}return{type:Ln.REGEX,queryRegex:r,matchTypes:new Set(n.matchTypes)}}case Ln.NODE_TYPE:case Ln.ATTR_VALUE_RANGE:return n;default:return}}),nodeType:e.nodeType,styles:e.styles}))}function Pm(i,e,t){let n=!0;for(let r of e)if(r.type===Ln.NODE_TYPE){let o=!0;if((Et(i)&&r.nodeType===mr.LAYER_NODES||bt(i)&&r.nodeType===mr.OP_NODES)&&(o=!1),!o){n=!1;break}}else if(r.type===Ln.REGEX){if($I(r.matchTypes,r.queryRegex,i,t).matches.length===0){n=!1;break}}else if(r.type===Ln.ATTR_VALUE_RANGE){if(r.attrName!==""&&dQ(r.attrName,r.min??Number.NEGATIVE_INFINITY,r.max??Number.POSITIVE_INFINITY,i,t).length===0){n=!1;break}}else n=!1;return n}function Kb(i,e){window.parent.postMessage({cmd:GF,name:i,resource:e},"*")}function ld(){return window.devicePixelRatio===1?1.5:window.devicePixelRatio}function cd(i,e){let t=i.styles[e];return t?typeof t=="string"?t:t.value:""}function dd(i){return i.split(` +`).map(e=>e.trim()).filter(e=>e!=="")}function qI(i){return(dd(i).length-1)*vh}var Ji=function(i){return i[i.PROCESS_GRAPH_REQ=0]="PROCESS_GRAPH_REQ",i[i.PROCESS_GRAPH_RESP=1]="PROCESS_GRAPH_RESP",i[i.EXPAND_OR_COLLAPSE_GROUP_NODE_REQ=2]="EXPAND_OR_COLLAPSE_GROUP_NODE_REQ",i[i.EXPAND_OR_COLLAPSE_GROUP_NODE_RESP=3]="EXPAND_OR_COLLAPSE_GROUP_NODE_RESP",i[i.RELAYOUT_GRAPH_REQ=4]="RELAYOUT_GRAPH_REQ",i[i.RELAYOUT_GRAPH_RESP=5]="RELAYOUT_GRAPH_RESP",i[i.LOCATE_NODE_REQ=6]="LOCATE_NODE_REQ",i[i.LOCATE_NODE_RESP=7]="LOCATE_NODE_RESP",i[i.UPDATE_PROCESSING_PROGRESS=8]="UPDATE_PROCESSING_PROGRESS",i[i.PREPARE_POPUP_REQ=9]="PREPARE_POPUP_REQ",i[i.PREPARE_POPUP_RESP=10]="PREPARE_POPUP_RESP",i[i.CLEANUP=11]="CLEANUP",i}(Ji||{}),ud=function(i){return i.PROCESSING_NODES_AND_EDGES="Processing nodes and edges",i.PROCESSING_LAYER_NAMESPACES="Processing layer namespaces",i.PROCESSING_LAYOUT_DATA="Processing layout data",i.SPLITTING_LARGE_LAYERS="Splitting large layers (if any)",i.LAYING_OUT_ROOT_LAYER="Laying out root layer",i.FINDING_IDENTICAL_LAYERS="Finding identical layers",i}(ud||{}),YF=[ud.PROCESSING_NODES_AND_EDGES,ud.PROCESSING_LAYER_NAMESPACES,ud.PROCESSING_LAYOUT_DATA,ud.SPLITTING_LARGE_LAYERS,ud.LAYING_OUT_ROOT_LAYER,ud.FINDING_IDENTICAL_LAYERS];var Vo=(()=>{class i{getItem(t){return window.localStorage.getItem(t)}setItem(t,n){window.localStorage.setItem(t,n)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var zl=(()=>{class i{curUiState=xt({paneStates:[this.createInitialPaneState()]});setDeepestExpandedGroupNodeIds(t,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.deepestExpandedGroupNodeIds=t,Z({},r)):r})}setSelectedNodeId(t,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.selectedNodeId=t,Z({},r)):r})}setSelectedGraphId(t,n,r){this.curUiState.update(o=>{let s=o.paneStates[r];return s?(s.selectedGraphId=t,s.selectedCollectionLabel=n,Z({},o)):o})}setFlattenLayers(t,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.flattenLayers=t,Z({},r)):r})}addPane(){this.curUiState.update(t=>{t.paneStates.length>1&&(t.paneStates=[t.paneStates[0]]),t.paneStates.push(this.createInitialPaneState());for(let n of t.paneStates)n.widthFraction=.5;return Z({},t)})}removePane(t){this.curUiState.update(n=>(n.paneStates.splice(t,1),n.paneStates.length===1&&(n.paneStates[0].widthFraction=1),Z({},n)))}resizePane(t){this.curUiState.update(n=>(n.paneStates.length===2&&(n.paneStates[0].widthFraction=t,n.paneStates[1].widthFraction=1-t),Z({},n)))}swapPane(){this.curUiState.update(t=>(t.paneStates.length===2&&(t.paneStates=[t.paneStates[1],t.paneStates[0]]),Z({},t)))}selectPane(t){this.curUiState.update(n=>{for(let r=0;r{class i{worker;constructor(){this.worker=new Worker(new URL("worker-OXAJQWPP.js",import.meta.url),{type:"classic"})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var st=(()=>{class i{localStorageService;uiStateService;workerService;curGraphCollections=xt([]);curToLocateNodeInfo=xt(void 0);curSelectedRenderer=xt(void 0);spaceKeyToZoomFitClicked=new me;searchKeyClicked=new me;addSnapshotClicked=new me;curSnapshotToRestore=new me;expandOrCollapseAllGraphLayersClicked=new me;downloadAsPngClicked=new me;config=xt(void 0);curInitialUiState=xt(void 0);panes=xt([{id:Lr(),widthFraction:1}]);selectedPaneId=xt(this.panes()[0].id);modelGraphProcessed$=new me;remoteNodeDataPaths=xt([]);testMode=!1;groupNodeChildrenCountThresholdFromUrl=null;paneIdToGraph={};paneIdToCurModelGraphs={};constructor(t,n,r){this.localStorageService=t,this.uiStateService=n,this.workerService=r,this.listenToWorker(),this.init()}addGraphCollections(t){this.curGraphCollections.update(n=>{let r=[...n],o={};for(let s of t){let a={},l={};for(let h of s.graphs){(h.id==null||h.id==="")&&(h.id="unnamed_graph");let p=h.id,f=o[p];f==null?(o[p]=0,f=0):(h.id=`${h.id} (${f+1})`,l[p]=h.id),o[p]=f+1,a[h.id]=h,h.collectionLabel=s.label}for(let h of s.graphs)for(let p of h.nodes)if(p.subgraphIds!=null&&p.subgraphIds.length>0){p.subgraphIds=p.subgraphIds.map(f=>l[f]||f),h.subGraphIds==null&&(h.subGraphIds=[]),h.subGraphIds.push(...p.subgraphIds);for(let f of p.subgraphIds)a[f].parentGraphId=h.id}let c=s.graphs.filter(h=>h.parentGraphId==null),d=[],u=(h,p=0)=>{let f=[];h==null?f=c:f=(h.subGraphIds||[]).map(m=>a[m]),f.sort((m,b)=>b.nodes.length-m.nodes.length);for(let m of f)m.level=p,d.push(m),u(m,p+1)};u(),s.graphs=d}return r.push(...t),r})}selectGraphInPane(t,n,r=!1,o){if(n===1&&this.panes().length===1){this.openGraphInSplitPane(t);return}if((this.panes()[n].modelGraph?.id||"")===t.id)return;let a=this.panes()[n];a.searchResults=void 0,a.selectedNodeDataProviderRunId=void 0;let l=a.id;if(this.paneIdToGraph[l]=t,this.uiStateService.setSelectedGraphId(t.id,t.collectionLabel||"",this.getPaneIndexById(l)),a.subgraphBreadcrumbs!=null&&a.subgraphBreadcrumbs.length>0){let c=[...a.subgraphBreadcrumbs];c[c.length-1].graphId=t.id,a.subgraphBreadcrumbs=c}this.processGraph(l,r,o)}selectGraphInCurrentPane(t,n=!1,r){this.selectGraphInPane(t,this.getPaneIndexById(this.selectedPaneId()),n,r)}openGraphInSplitPane(t,n=!1){let r=Lr();this.paneIdToGraph[r]=t,this.panes.update(a=>{let l=a[0];return l.widthFraction=.5,a.push({id:r,widthFraction:.5,flattenLayers:n,showOnNodeItemTypes:{[r]:this.getSavedShowOnNodeItemTypes()},showOnEdgeItemTypes:{[r]:this.getSavedShowOnEdgeItemTypes()}}),[...a]}),this.curSelectedRenderer.set({id:r,ownerType:Ll.GRAPH_PANEL});let o=this.getPaneIndexById(r);this.uiStateService.addPane(),this.selectPane(r),this.uiStateService.setSelectedGraphId(t.id,t.collectionLabel||"",o),this.uiStateService.setFlattenLayers(n,o);let s={eventType:Ji.PROCESS_GRAPH_REQ,graph:t,showOnNodeItemTypes:this.getShowOnNodeItemTypes(r,r),nodeDataProviderRuns:{},config:this.config?this.config():void 0,paneId:r,groupNodeChildrenCountThreshold:this.getGroupNodeChildrenCountThreshold(),flattenLayers:n,keepLayersWithASingleChild:this.config()?.keepLayersWithASingleChild};this.workerService.worker.postMessage(s)}processGraph(t,n=!1,r){if(r!=null){let s=this.getPaneById(t);s&&(s.snapshotToRestore=r)}this.setPaneLoading(t);let o={eventType:Ji.PROCESS_GRAPH_REQ,graph:this.paneIdToGraph[t],showOnNodeItemTypes:this.getShowOnNodeItemTypes(t,t),nodeDataProviderRuns:{},config:this.config?this.config():void 0,paneId:t,groupNodeChildrenCountThreshold:this.getGroupNodeChildrenCountThreshold(),flattenLayers:n,keepLayersWithASingleChild:this.config()?.keepLayersWithASingleChild};this.workerService.worker.postMessage(o)}setFlattenLayersInCurrentPane(t){let n=this.getSelectedPane();if(!n)return;this.panes.update(o=>(n.flattenLayers=t,n.searchResults=void 0,[...o]));let r=this.getPaneIndexById(n.id);this.uiStateService.setFlattenLayers(t,r),this.uiStateService.setDeepestExpandedGroupNodeIds([],r)}toggleFlattenLayers(t){let n=this.getPaneById(t);if(!n)return;let r=n.flattenLayers===!0;this.panes.update(s=>(n.flattenLayers=!r,n.searchResults=void 0,[...s]));let o=this.getPaneIndexById(t);this.uiStateService.setFlattenLayers(!r,o),this.uiStateService.setDeepestExpandedGroupNodeIds([],o)}getFlattenLayers(t){return this.getPaneById(t)?.flattenLayers===!0}selectPane(t){this.selectedPaneId.set(t),this.uiStateService.selectPane(this.getPaneIndexById(t))}selectPaneByIndex(t){let n=this.panes()[t];n&&this.selectPane(n.id)}selectNode(t,n){this.panes.update(o=>{let s=this.getPaneById(t);return s?(s.selectedNodeInfo=n,[...o]):o}),this.uiStateService.setSelectedNodeId(n?.nodeId||"",this.getPaneIndexById(t));let r=this.getPaneById(t)?.modelGraph;if(r){let o=n?.nodeId||"",s=r.nodesById[o];if(s&&Et(s)&&window.parent){let a=s.outputsMetadata||{},l=[];for(let c of Object.keys(a)){let u=a[c].tensor_name;u&&l.push(u)}window.parent.postMessage({cmd:"model-explorer-node-selected",nodeId:o,outputTensorNames:l},"*")}}}getModelGraphFromSelectedPane(){return this.getPaneById(this.selectedPaneId())?.modelGraph}getModelGraphFromPane(t){return this.getPaneById(t)?.modelGraph}getModelGraphFromPaneIndex(t){return this.panes()[t]?.modelGraph}getSelectedNodeInfoFromSelectedPane(){return this.getPaneById(this.selectedPaneId())?.selectedNodeInfo}getSelectedPane(){return this.getPaneById(this.selectedPaneId())}setPaneWidthFraction(t){this.panes.update(n=>n.length!==2?n:(n[0].widthFraction=t,n[1].widthFraction=1-t,[...n])),this.uiStateService.resizePane(t)}setSelectedNodeDataProviderRunId(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.selectedNodeDataProviderRunId=n,[...r]):r})}getSelectedNodeDataProviderRunId(t){return this.getPaneById(t)?.selectedNodeDataProviderRunId}setPaneHasArtificialLayers(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.hasArtificialLayers=n,[...r]):r})}setNodeToReveal(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.nodeIdToReveal=n,[...r]):r})}closePane(t){delete this.paneIdToGraph[t],delete this.paneIdToCurModelGraphs[t],this.panes.update(n=>{let r=n.findIndex(o=>o.id===t);return r>=0&&(n.splice(r,1),this.uiStateService.removePane(r)),n[0].widthFraction=1,[...n]}),this.selectPane(this.panes()[0].id)}swapPane(){this.panes.update(t=>t.length!==2?t:[t[1],t[0]]),this.uiStateService.swapPane()}getPaneById(t){return this.panes().find(n=>n.id===t)}getPaneIndexById(t){return this.panes().findIndex(n=>n.id===t)}addSnapshot(t,n,r){this.panes.update(o=>{let s=this.getPaneById(r);return s&&(s.snapshots==null&&(s.snapshots={}),s.snapshots[n]==null&&(s.snapshots[n]=[]),s.snapshots[n].push(t)),[...o]})}deleteSnapshot(t,n,r){this.panes.update(o=>{let s=this.getPaneById(r);return s&&s.snapshots&&s.snapshots[n]&&s.snapshots[n].splice(t,1),[...o]})}getGraphById(t){for(let n of this.curGraphCollections())for(let r of n.graphs)if(r.id===t)return r}addSubgraphBreadcrumbItem(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);if(!a)return s;let l=[...a.subgraphBreadcrumbs||[]];return l.length===0?l.push({graphId:n,snapshot:o}):l[l.length-1]={graphId:n,snapshot:o},l.push({graphId:r}),a.subgraphBreadcrumbs=l,[...s]})}setCurrentSubgraphBreadcrumb(t,n){this.panes.update(r=>{let o=this.getPaneById(t);if(!o)return r;let s=[...o.subgraphBreadcrumbs||[]];return s.splice(n+1),s.length===1&&(s=[]),o.subgraphBreadcrumbs=s,[...r]})}setSearchResults(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.searchResults=n,[...r]):r})}clearSearchResults(t){this.panes.update(n=>{let r=this.getPaneById(t);return r?(r.searchResults={results:{}},[...n]):n})}toggleShowOnNode(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);if(!a)return s;a.showOnNodeItemTypes||(a.showOnNodeItemTypes={}),a.showOnNodeItemTypes[n]==null&&(a.showOnNodeItemTypes[n]={}),a.showOnNodeItemTypes[n][r]==null&&(a.showOnNodeItemTypes[n][r]={selected:!1});let l=a.showOnNodeItemTypes[n][r].selected;return a.showOnNodeItemTypes[n]=Z({},a.showOnNodeItemTypes[n]),a.showOnNodeItemTypes[n][r].selected=o??!l,a.showOnNodeItemTypes=Z({},a.showOnNodeItemTypes),[...s]})}toggleShowOnEdge(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);if(!a)return s;a.showOnEdgeItemTypes||(a.showOnEdgeItemTypes={}),a.showOnEdgeItemTypes[n]==null&&(a.showOnEdgeItemTypes[n]={}),a.showOnEdgeItemTypes[n][r]==null&&(a.showOnEdgeItemTypes[n][r]={selected:!1});let l=a.showOnEdgeItemTypes[n][r].selected;return a.showOnEdgeItemTypes[n]=Z({},a.showOnEdgeItemTypes[n]),a.showOnEdgeItemTypes[n][r].selected=o??!l,a.showOnEdgeItemTypes=Z({},a.showOnEdgeItemTypes),[...s]})}setShowOnNodeFilter(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);return a?(a.showOnNodeItemTypes||(a.showOnNodeItemTypes={}),a.showOnNodeItemTypes[n]==null&&(a.showOnNodeItemTypes[n]={}),a.showOnNodeItemTypes[n][r]==null&&(a.showOnNodeItemTypes[n][r]={selected:!1}),a.showOnNodeItemTypes[n][r].filterRegex=o,a.showOnNodeItemTypes=Z({},a.showOnNodeItemTypes),[...s]):s})}setShowOnNode(t,n,r){this.panes.update(o=>{let s=this.getPaneById(t);return s?(s.showOnNodeItemTypes||(s.showOnNodeItemTypes={}),s.showOnNodeItemTypes=Z({},s.showOnNodeItemTypes),s.showOnNodeItemTypes[n]=r,[...o]):o})}setShowOnEdge(t,n,r){this.panes.update(o=>{let s=this.getPaneById(t);return s?(s.showOnEdgeItemTypes||(s.showOnEdgeItemTypes={}),s.showOnEdgeItemTypes=Z({},s.showOnEdgeItemTypes),s.showOnEdgeItemTypes[n]=r,[...o]):o})}deleteShowOnNodeItemType(t){this.panes.update(n=>{for(let r of n){r.showOnNodeItemTypes=Z({},r.showOnNodeItemTypes);for(let o of Object.keys(r.showOnNodeItemTypes))for(let s of t){let a=r.showOnNodeItemTypes[o][s];a&&(a.selected=!1)}}return[...n]})}getShowOnNodeItemTypes(t,n){let r=this.getPaneById(t);return r?JSON.parse(JSON.stringify((r.showOnNodeItemTypes||{})[n]||{})):{}}getSavedShowOnNodeItemTypes(){let t={};if(!this.testMode){let n=this.localStorageService.getItem(Wb);n&&(t=JSON.parse(n))}return t}getSavedShowOnEdgeItemTypes(){let t={};if(!this.testMode){let n=this.localStorageService.getItem($b);n&&(t=JSON.parse(n))}return t}getShowOnEdgeItemTypes(t,n){let r=this.getPaneById(t);return r?JSON.parse(JSON.stringify((r.showOnEdgeItemTypes||{})[n]||{})):{}}getGraphByPaneId(t){return this.paneIdToGraph[t]}updateCurrentModelGraph(t,n){this.paneIdToCurModelGraphs[t]=n}getCurrentModelGraphFromPane(t){return this.paneIdToCurModelGraphs[t]}reset(){this.workerService.worker.postMessage({eventType:Ji.CLEANUP}),this.curGraphCollections.set([]),this.curToLocateNodeInfo.set(void 0),this.curSelectedRenderer.set(void 0),this.config.set(void 0),this.curInitialUiState.set(void 0),this.panes.set([{id:Lr(),widthFraction:1}]),this.selectedPaneId.set(this.panes()[0].id),this.remoteNodeDataPaths.set([]),this.groupNodeChildrenCountThresholdFromUrl=null,this.paneIdToGraph={},this.paneIdToCurModelGraphs={},this.init()}listenToWorker(){this.workerService.worker.addEventListener("message",t=>{let n=t.data;switch(n.eventType){case Ji.PROCESS_GRAPH_RESP:this.handleGraphProcessed(n.modelGraph,n.paneId);break;default:break}})}init(){this.curSelectedRenderer.set({id:this.panes()[0].id,ownerType:Ll.GRAPH_PANEL});let t=new URLSearchParams(document.location.search);this.testMode=t.get("test_mode")==="1",this.groupNodeChildrenCountThresholdFromUrl=t.get("groupNodeChildrenCountThreshold");let n=this.panes()[0];n.showOnNodeItemTypes={[n.id]:this.getSavedShowOnNodeItemTypes()},n.showOnEdgeItemTypes={[n.id]:this.getSavedShowOnEdgeItemTypes()}}handleGraphProcessed(t,n){this.panes.update(r=>{for(let o of r)if(o.id===n){o.modelGraph=t;break}return[...r]}),this.modelGraphProcessed$.next({paneIndex:this.getPaneIndexById(n),modelGraph:t})}setPaneLoading(t){this.panes.update(n=>{for(let r of n)if(r.id===t){r.modelGraph=void 0;break}return[...n]})}getGroupNodeChildrenCountThreshold(){let t=Im;return this.config&&(t=this.config()?.artificialLayerNodeCountThreshold||Im),this.groupNodeChildrenCountThresholdFromUrl!=null&&(t=Number(this.groupNodeChildrenCountThresholdFromUrl)),t}static \u0275fac=function(n){return new(n||i)(X(Vo),X(zl),X(Ul))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var e3=(()=>{let e=class e{constructor(n,r){this._renderer=n,this._elementRef=r,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}};e.\u0275fac=function(r){return new(r||e)(M(qc),M(Re))},e.\u0275dir=ze({type:e});let i=e;return i})(),t3=(()=>{let e=class e extends e3{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,features:[nn]});let i=e;return i})(),La=new ge(""),uQ={provide:La,useExisting:Yr(()=>Lm),multi:!0},Lm=(()=>{let e=class e extends t3{writeValue(n){this.setProperty("checked",n)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,o){r&1&&H("change",function(a){return o.onChange(a.target.checked)})("blur",function(){return o.onTouched()})},features:[Bt([uQ]),nn]});let i=e;return i})(),hQ={provide:La,useExisting:Yr(()=>js),multi:!0};function pQ(){let i=Da()?Da().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var fQ=new ge(""),js=(()=>{let e=class e extends e3{constructor(n,r,o){super(n,r),this._compositionMode=o,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!pQ())}writeValue(n){let r=n??"";this.setProperty("value",r)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}};e.\u0275fac=function(r){return new(r||e)(M(qc),M(Re),M(fQ,8))},e.\u0275dir=ze({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){r&1&&H("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},features:[Bt([hQ]),nn]});let i=e;return i})();function Hl(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function n3(i){return i!=null&&typeof i.length=="number"}var pd=new ge(""),eT=new ge(""),mQ=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ey=class{static min(e){return gQ(e)}static max(e){return _Q(e)}static required(e){return vQ(e)}static requiredTrue(e){return bQ(e)}static email(e){return yQ(e)}static minLength(e){return xQ(e)}static maxLength(e){return wQ(e)}static pattern(e){return CQ(e)}static nullValidator(e){return i3(e)}static compose(e){return c3(e)}static composeAsync(e){return d3(e)}};function gQ(i){return e=>{if(Hl(e.value)||Hl(i))return null;let t=parseFloat(e.value);return!isNaN(t)&&t{if(Hl(e.value)||Hl(i))return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function vQ(i){return Hl(i.value)?{required:!0}:null}function bQ(i){return i.value===!0?null:{required:!0}}function yQ(i){return Hl(i.value)||mQ.test(i.value)?null:{email:!0}}function xQ(i){return e=>Hl(e.value)||!n3(e.value)?null:e.value.lengthn3(e.value)&&e.value.length>i?{maxlength:{requiredLength:i,actualLength:e.value.length}}:null}function CQ(i){if(!i)return i3;let e,t;return typeof i=="string"?(t="",i.charAt(0)!=="^"&&(t+="^"),t+=i,i.charAt(i.length-1)!=="$"&&(t+="$"),e=new RegExp(t)):(t=i.toString(),e=i),n=>{if(Hl(n.value))return null;let r=n.value;return e.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}function i3(i){return null}function r3(i){return i!=null}function o3(i){return Xc(i)?Kn(i):i}function s3(i){let e={};return i.forEach(t=>{e=t!=null?Z(Z({},e),t):e}),Object.keys(e).length===0?null:e}function a3(i,e){return e.map(t=>t(i))}function SQ(i){return!i.validate}function l3(i){return i.map(e=>SQ(e)?e:t=>e.validate(t))}function c3(i){if(!i)return null;let e=i.filter(r3);return e.length==0?null:function(t){return s3(a3(t,e))}}function tT(i){return i!=null?c3(l3(i)):null}function d3(i){if(!i)return null;let e=i.filter(r3);return e.length==0?null:function(t){let n=a3(t,e).map(o3);return Mf(n).pipe(Je(s3))}}function nT(i){return i!=null?d3(l3(i)):null}function XF(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function u3(i){return i._rawValidators}function h3(i){return i._rawAsyncValidators}function ZI(i){return i?Array.isArray(i)?i:[i]:[]}function ty(i,e){return Array.isArray(i)?i.includes(e):i===e}function ZF(i,e){let t=ZI(e);return ZI(i).forEach(r=>{ty(t,r)||t.push(r)}),t}function QF(i,e){return ZI(e).filter(t=>!ty(i,t))}var ny=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=tT(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=nT(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},Sh=class extends ny{get formDirective(){return null}get path(){return null}},hd=class extends ny{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},QI=class{constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},MQ={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},RIe=wt(Z({},MQ),{"[class.ng-submitted]":"isSubmitted"}),zo=(()=>{let e=class e extends QI{constructor(n){super(n)}};e.\u0275fac=function(r){return new(r||e)(M(hd,2))},e.\u0275dir=ze({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&se("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},features:[nn]});let i=e;return i})();var Om="VALID",Jb="INVALID",wh="PENDING",Rm="DISABLED",Gl=class{},iy=class extends Gl{constructor(e,t){super(),this.value=e,this.source=t}},Nm=class extends Gl{constructor(e,t){super(),this.pristine=e,this.source=t}},km=class extends Gl{constructor(e,t){super(),this.touched=e,this.source=t}},Ch=class extends Gl{constructor(e,t){super(),this.status=e,this.source=t}},KI=class extends Gl{constructor(e){super(),this.source=e}},JI=class extends Gl{constructor(e){super(),this.source=e}};function p3(i){return(dy(i)?i.validators:i)||null}function EQ(i){return Array.isArray(i)?tT(i):i||null}function f3(i,e){return(dy(e)?e.asyncValidators:i)||null}function IQ(i){return Array.isArray(i)?nT(i):i||null}function dy(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function TQ(i,e,t){let n=i.controls;if(!(e?Object.keys(n):n).length)throw new Oe(1e3,"");if(!n[t])throw new Oe(1001,"")}function DQ(i,e,t){i._forEachChild((n,r)=>{if(t[r]===void 0)throw new Oe(1002,"")})}var ry=class{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=Xt(()=>this.statusReactive()),this.statusReactive=xt(void 0),this._pristine=Xt(()=>this.pristineReactive()),this.pristineReactive=xt(!0),this._touched=Xt(()=>this.touchedReactive()),this.touchedReactive=xt(!1),this._events=new me,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return kr(this.statusReactive)}set status(e){kr(()=>this.statusReactive.set(e))}get valid(){return this.status===Om}get invalid(){return this.status===Jb}get pending(){return this.status==wh}get disabled(){return this.status===Rm}get enabled(){return this.status!==Rm}get pristine(){return kr(this.pristineReactive)}set pristine(e){kr(()=>this.pristineReactive.set(e))}get dirty(){return!this.pristine}get touched(){return kr(this.touchedReactive)}set touched(e){kr(()=>this.touchedReactive.set(e))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(ZF(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(ZF(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(QF(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(QF(e,this._rawAsyncValidators))}hasValidator(e){return ty(this._rawValidators,e)}hasAsyncValidator(e){return ty(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(wt(Z({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new km(!0,n))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new km(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(wt(Z({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Nm(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new Nm(!0,n))}markAsPending(e={}){this.status=wh;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Ch(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(wt(Z({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Rm,this.errors=null,this._forEachChild(r=>{r.disable(wt(Z({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new iy(this.value,n)),this._events.next(new Ch(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(wt(Z({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Om,this._forEachChild(n=>{n.enable(wt(Z({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(wt(Z({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Om||this.status===wh)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new iy(this.value,t)),this._events.next(new Ch(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(wt(Z({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Rm:Om}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=wh,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1};let n=o3(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(e,t){let n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Ch(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new Pe,this.statusChanges=new Pe}_calculateStatus(){return this._allControlsDisabled()?Rm:this.errors?Jb:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(wh)?wh:this._anyControlsHaveStatus(Jb)?Jb:Om}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),r&&this._events.next(new Nm(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new km(this.touched,t)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){dy(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let t=this._parent&&this._parent.dirty;return!e&&!!t&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=EQ(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=IQ(this._rawAsyncValidators)}},oy=class extends ry{constructor(e,t,n){super(p3(t),f3(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,n={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){DQ(this,!0,e),Object.keys(e).forEach(n=>{TQ(this,!0,n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e!=null&&(Object.keys(e).forEach(n=>{let r=this.controls[n];r&&r.patchValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((n,r)=>{n.reset(e?e[r]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,n)=>(e[n]=t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,n)=>n._syncPendingControls()?!0:t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{let n=this.controls[t];n&&e(n,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[t,n]of Object.entries(this.controls))if(this.contains(t)&&e(n))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(t,n,r)=>((n.enabled||this.disabled)&&(t[r]=n.value),t))}_reduceChildren(e,t){let n=e;return this._forEachChild((r,o)=>{n=t(n,r,o)}),n}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var uy=new ge("CallSetDisabledState",{providedIn:"root",factory:()=>iT}),iT="always";function sy(i,e,t=iT){rT(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),OQ(i,e),AQ(i,e),RQ(i,e),PQ(i,e)}function ay(i,e,t=!0){let n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),cy(i,e),i&&(e._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function ly(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function PQ(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function rT(i,e){let t=u3(i);e.validator!==null?i.setValidators(XF(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=h3(i);e.asyncValidator!==null?i.setAsyncValidators(XF(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();ly(e._rawValidators,r),ly(e._rawAsyncValidators,r)}function cy(i,e){let t=!1;if(i!==null){if(e.validator!==null){let r=u3(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==e.validator);o.length!==r.length&&(t=!0,i.setValidators(o))}}if(e.asyncValidator!==null){let r=h3(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==e.asyncValidator);o.length!==r.length&&(t=!0,i.setAsyncValidators(o))}}}let n=()=>{};return ly(e._rawValidators,n),ly(e._rawAsyncValidators,n),t}function OQ(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&m3(i,e)})}function RQ(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&m3(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function m3(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function AQ(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function g3(i,e){i==null,rT(i,e)}function NQ(i,e){return cy(i,e)}function kQ(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function LQ(i){return Object.getPrototypeOf(i.constructor)===t3}function _3(i,e){i._syncPendingControls(),e.forEach(t=>{let n=t.control;n.updateOn==="submit"&&n._pendingChange&&(t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function FQ(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===js?t=o:LQ(o)?n=o:r=o}),r||n||t||null}function BQ(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}var VQ={provide:Sh,useExisting:Yr(()=>oT)},Am=Promise.resolve(),oT=(()=>{let e=class e extends Sh{get submitted(){return kr(this.submittedReactive)}constructor(n,r,o){super(),this.callSetDisabledState=o,this._submitted=Xt(()=>this.submittedReactive()),this.submittedReactive=xt(!1),this._directives=new Set,this.ngSubmit=new Pe,this.form=new oy({},tT(n),nT(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(n){Am.then(()=>{let r=this._findContainer(n.path);n.control=r.registerControl(n.name,n.control),sy(n.control,n,this.callSetDisabledState),n.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(n)})}getControl(n){return this.form.get(n.path)}removeControl(n){Am.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name),this._directives.delete(n)})}addFormGroup(n){Am.then(()=>{let r=this._findContainer(n.path),o=new oy({});g3(o,n),r.registerControl(n.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(n){Am.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name)})}getFormGroup(n){return this.form.get(n.path)}updateModel(n,r){Am.then(()=>{this.form.get(n.path).setValue(r)})}setValue(n){this.control.setValue(n)}onSubmit(n){return this.submittedReactive.set(!0),_3(this.form,this._directives),this.ngSubmit.emit(n),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(n){return n.pop(),n.length?this.form.get(n):this.form}};e.\u0275fac=function(r){return new(r||e)(M(pd,10),M(eT,10),M(uy,8))},e.\u0275dir=ze({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,o){r&1&&H("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Bt([VQ]),nn]});let i=e;return i})();function KF(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function JF(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var gr=class extends ry{constructor(e=null,t,n){super(p3(t),f3(n,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),dy(t)&&(t.nonNullable||t.initialValueIsDefault)&&(JF(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){KF(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){KF(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){JF(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var zQ=i=>i instanceof gr;var v3=new ge(""),UQ={provide:hd,useExisting:Yr(()=>ho)},ho=(()=>{let e=class e extends hd{set isDisabled(n){}constructor(n,r,o,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this.update=new Pe,this._ngModelWarningSent=!1,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=FQ(this,o)}ngOnChanges(n){if(this._isControlChanged(n)){let r=n.form.previousValue;r&&ay(r,this,!1),sy(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}kQ(n,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ay(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_isControlChanged(n){return n.hasOwnProperty("form")}};e._ngModelWarningSentOnce=!1,e.\u0275fac=function(r){return new(r||e)(M(pd,10),M(eT,10),M(La,10),M(v3,8),M(uy,8))},e.\u0275dir=ze({type:e,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Bt([UQ]),nn,dn]});let i=e;return i})(),HQ={provide:Sh,useExisting:Yr(()=>sT)},sT=(()=>{let e=class e extends Sh{get submitted(){return kr(this._submittedReactive)}set submitted(n){this._submittedReactive.set(n)}constructor(n,r,o){super(),this.callSetDisabledState=o,this._submitted=Xt(()=>this._submittedReactive()),this._submittedReactive=xt(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Pe,this._setValidators(n),this._setAsyncValidators(r)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(cy(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(n){let r=this.form.get(n.path);return sy(r,n,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),r}getControl(n){return this.form.get(n.path)}removeControl(n){ay(n.control||null,n,!1),BQ(this.directives,n)}addFormGroup(n){this._setUpFormContainer(n)}removeFormGroup(n){this._cleanUpFormContainer(n)}getFormGroup(n){return this.form.get(n.path)}addFormArray(n){this._setUpFormContainer(n)}removeFormArray(n){this._cleanUpFormContainer(n)}getFormArray(n){return this.form.get(n.path)}updateModel(n,r){this.form.get(n.path).setValue(r)}onSubmit(n){return this._submittedReactive.set(!0),_3(this.form,this.directives),this.ngSubmit.emit(n),this.form._events.next(new KI(this.control)),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this._submittedReactive.set(!1),this.form._events.next(new JI(this.form))}_updateDomValue(){this.directives.forEach(n=>{let r=n.control,o=this.form.get(n.path);r!==o&&(ay(r||null,n),zQ(o)&&(sy(o,n,this.callSetDisabledState),n.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let r=this.form.get(n.path);g3(r,n),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let r=this.form.get(n.path);r&&NQ(r,n)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){rT(this.form,this),this._oldForm&&cy(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(r){return new(r||e)(M(pd,10),M(eT,10),M(uy,8))},e.\u0275dir=ze({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&H("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Bt([HQ]),nn,dn]});let i=e;return i})();var GQ=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})();var _r=(()=>{let e=class e{static withConfig(n){return{ngModule:e,providers:[{provide:v3,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:uy,useValue:n.callSetDisabledState??iT}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[GQ]});let i=e;return i})();var lT;try{lT=typeof Intl<"u"&&Intl.v8BreakIterator}catch{lT=!1}var gn=(()=>{let e=class e{constructor(n){this._platformId=n,this.isBrowser=this._platformId?dL(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||lT)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}};e.\u0275fac=function(r){return new(r||e)(X(Ea))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Fm;function jQ(){if(Fm==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Fm=!0}))}finally{Fm=Fm||!1}return Fm}function Fr(i){return jQ()?i:!!i.capture}var fs=function(i){return i[i.NORMAL=0]="NORMAL",i[i.NEGATED=1]="NEGATED",i[i.INVERTED=2]="INVERTED",i}(fs||{}),hy,md;function py(){if(md==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return md=!1,md;if("scrollBehavior"in document.documentElement.style)md=!0;else{let i=Element.prototype.scrollTo;i?md=!/\{\s*\[native code\]\s*\}/.test(i.toString()):md=!1}}return md}function Mh(){if(typeof document!="object"||!document)return fs.NORMAL;if(hy==null){let i=document.createElement("div"),e=i.style;i.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";let t=document.createElement("div"),n=t.style;n.width="2px",n.height="1px",i.appendChild(t),document.body.appendChild(i),hy=fs.NORMAL,i.scrollLeft===0&&(i.scrollLeft=1,hy=i.scrollLeft===0?fs.NEGATED:fs.INVERTED),i.remove()}return hy}var aT;function WQ(){if(aT==null){let i=typeof document<"u"?document.head:null;aT=!!(i&&(i.createShadowRoot||i.attachShadow))}return aT}function Eh(i){if(WQ()){let e=i.getRootNode?i.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function Bm(){let i=typeof document<"u"&&document?document.activeElement:null;for(;i&&i.shadowRoot;){let e=i.shadowRoot.activeElement;if(e===i)break;i=e}return i}function Si(i){return i.composedPath?i.composedPath()[0]:i.target}function Vm(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function mi(i,...e){return e.length?e.some(t=>i[t]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}function Ih(i){return i!=null&&`${i}`!="false"}function $s(i,e=0){return $Q(i)?Number(i):e}function $Q(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}function gd(i){return Array.isArray(i)?i:[i]}function gi(i){return i==null?"":typeof i=="string"?i:`${i}px`}function er(i){return i instanceof Re?i.nativeElement:i}var qQ=(()=>{let e=class e{create(n){return typeof MutationObserver>"u"?null:new MutationObserver(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var fy=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[qQ]});let i=e;return i})();var b3=new Set,_d,YQ=(()=>{let e=class e{constructor(n,r){this._platform=n,this._nonce=r,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):ZQ}matchMedia(n){return(this._platform.WEBKIT||this._platform.BLINK)&&XQ(n,this._nonce),this._matchMedia(n)}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Gf,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function XQ(i,e){if(!b3.has(i))try{_d||(_d=document.createElement("style"),e&&_d.setAttribute("nonce",e),_d.setAttribute("type","text/css"),document.head.appendChild(_d)),_d.sheet&&(_d.sheet.insertRule(`@media ${i} {body{ }}`,0),b3.add(i))}catch(t){console.error(t)}}function ZQ(i){return{matches:i==="all"||i==="",media:i,addListener:()=>{},removeListener:()=>{}}}var Th=(()=>{let e=class e{constructor(n,r){this._mediaMatcher=n,this._zone=r,this._queries=new Map,this._destroySubject=new me}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(n){return y3(gd(n)).some(o=>this._registerQuery(o).mql.matches)}observe(n){let o=y3(gd(n)).map(a=>this._registerQuery(a).observable),s=qr(o);return s=Ts(s.pipe(_n(1)),s.pipe(Df(1),To(0))),s.pipe(Je(a=>{let l={matches:!1,breakpoints:{}};return a.forEach(({matches:c,query:d})=>{l.matches=l.matches||c,l.breakpoints[d]=c}),l}))}_registerQuery(n){if(this._queries.has(n))return this._queries.get(n);let r=this._mediaMatcher.matchMedia(n),s={observable:new Mt(a=>{let l=c=>this._zone.run(()=>a.next(c));return r.addListener(l),()=>{r.removeListener(l)}}).pipe(pi(r),Je(({matches:a})=>({query:n,matches:a})),Xe(this._destroySubject)),mql:r};return this._queries.set(n,s),s}};e.\u0275fac=function(r){return new(r||e)(X(YQ),X(Le))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function y3(i){return i.map(e=>e.split(",")).reduce((e,t)=>e.concat(t)).map(e=>e.trim())}var my={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var M3=" ";function Ah(i,e,t){let n=by(i,e);t=t.trim(),!n.some(r=>r.trim()===t)&&(n.push(t),i.setAttribute(e,n.join(M3)))}function Wl(i,e,t){let n=by(i,e);t=t.trim();let r=n.filter(o=>o!==t);r.length?i.setAttribute(e,r.join(M3)):i.removeAttribute(e)}function by(i,e){return i.getAttribute(e)?.match(/\S+/g)??[]}var E3="cdk-describedby-message",gy="cdk-describedby-host",uT=0,I3=(()=>{let e=class e{constructor(n,r){this._platform=r,this._messageRegistry=new Map,this._messagesContainer=null,this._id=`${uT++}`,this._document=n,this._id=te(Hf)+"-"+uT++}describe(n,r,o){if(!this._canBeDescribed(n,r))return;let s=cT(r,o);typeof r!="string"?(x3(r,this._id),this._messageRegistry.set(s,{messageElement:r,referenceCount:0})):this._messageRegistry.has(s)||this._createMessageElement(r,o),this._isElementDescribedByMessage(n,s)||this._addMessageReference(n,s)}removeDescription(n,r,o){if(!r||!this._isElementNode(n))return;let s=cT(r,o);if(this._isElementDescribedByMessage(n,s)&&this._removeMessageReference(n,s),typeof r=="string"){let a=this._messageRegistry.get(s);a&&a.referenceCount===0&&this._deleteMessageElement(s)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let n=this._document.querySelectorAll(`[${gy}="${this._id}"]`);for(let r=0;ro.indexOf(E3)!=0);n.setAttribute("aria-describedby",r.join(" "))}_addMessageReference(n,r){let o=this._messageRegistry.get(r);Ah(n,"aria-describedby",o.messageElement.id),n.setAttribute(gy,this._id),o.referenceCount++}_removeMessageReference(n,r){let o=this._messageRegistry.get(r);o.referenceCount--,Wl(n,"aria-describedby",o.messageElement.id),n.removeAttribute(gy)}_isElementDescribedByMessage(n,r){let o=by(n,"aria-describedby"),s=this._messageRegistry.get(r),a=s&&s.messageElement.id;return!!a&&o.indexOf(a)!=-1}_canBeDescribed(n,r){if(!this._isElementNode(n))return!1;if(r&&typeof r=="object")return!0;let o=r==null?"":`${r}`.trim(),s=n.getAttribute("aria-label");return o?!s||s.trim()!==o:!1}_isElementNode(n){return n.nodeType===this._document.ELEMENT_NODE}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(gn))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function cT(i,e){return typeof i=="string"?`${e||""}/${i}`:i}function x3(i,e){i.id||(i.id=`${E3}-${e}-${uT++}`)}var yy=class{constructor(e,t){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new me,this._typeaheadSubscription=Ct.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=n=>n.disabled,this._pressedLetters=[],this.tabOut=new me,this.change=new me,e instanceof Yi?this._itemChangesSubscription=e.changes.subscribe(n=>this._itemsChanged(n.toArray())):GE(e)&&(this._effectRef=mt(()=>this._itemsChanged(e()),{injector:t}))}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Sn(t=>this._pressedLetters.push(t)),To(e),Gt(()=>this._pressedLetters.length>0),Je(()=>this._pressedLetters.join(""))).subscribe(t=>{let n=this._getItemsArray();for(let r=1;r!e[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(t){case 9:this.tabOut.next();return;case 40:if(this._vertical&&r){this.setNextItemActive();break}else return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&r){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&r){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t)));return}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){let t=this._getItemsArray(),n=typeof e=="number"?e:t.indexOf(e),r=t[n];this._activeItem=r??null,this._activeItemIndex=n}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){let t=this._getItemsArray();for(let n=1;n<=t.length;n++){let r=(this._activeItemIndex+e*n+t.length)%t.length,o=t[r];if(!this._skipPredicateFn(o)){this.setActiveItem(r);return}}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,t){let n=this._getItemsArray();if(n[e]){for(;this._skipPredicateFn(n[e]);)if(e+=t,!n[e])return;this.setActiveItem(e)}}_getItemsArray(){return GE(this._items)?this._items():this._items instanceof Yi?this._items.toArray():this._items}_itemsChanged(e){if(this._activeItem){let t=e.indexOf(this._activeItem);t>-1&&t!==this._activeItemIndex&&(this._activeItemIndex=t)}}},Ph=class extends yy{setActiveItem(e){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(e),this.activeItem&&this.activeItem.setActiveStyles()}},xy=class extends yy{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}};var Nh=(()=>{let e=class e{constructor(n){this._platform=n}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return uK(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=dK(bK(n));if(r&&(w3(r)===-1||!this.isVisible(r)))return!1;let o=n.nodeName.toLowerCase(),s=w3(n);return n.hasAttribute("contenteditable")?s!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!_K(n)?!1:o==="audio"?n.hasAttribute("controls")?s!==-1:!1:o==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return vK(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}};e.\u0275fac=function(r){return new(r||e)(X(gn))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function dK(i){try{return i.frameElement}catch{return null}}function uK(i){return!!(i.offsetWidth||i.offsetHeight||typeof i.getClientRects=="function"&&i.getClientRects().length)}function hK(i){let e=i.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function pK(i){return mK(i)&&i.type=="hidden"}function fK(i){return gK(i)&&i.hasAttribute("href")}function mK(i){return i.nodeName.toLowerCase()=="input"}function gK(i){return i.nodeName.toLowerCase()=="a"}function T3(i){if(!i.hasAttribute("tabindex")||i.tabIndex===void 0)return!1;let e=i.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function w3(i){if(!T3(i))return null;let e=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function _K(i){let e=i.nodeName.toLowerCase(),t=e==="input"&&i.type;return t==="text"||t==="password"||e==="select"||e==="textarea"}function vK(i){return pK(i)?!1:hK(i)||fK(i)||i.hasAttribute("contenteditable")||T3(i)}function bK(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}var wy=class{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}constructor(e,t,n,r,o=!1,s){this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._injector=s,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){let e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let t=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let n=this._getFirstTabbableElement(t);return n?.focus(e),!!n}return t.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let t=this._getRegionBoundary("start");return t&&t.focus(e),!!t}focusLastTabbableElement(e){let t=this._getRegionBoundary("end");return t&&t.focus(e),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=0;n=0;n--){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?fr(e,{injector:this._injector}):setTimeout(e)}},Cy=(()=>{let e=class e{constructor(n,r,o){this._checker=n,this._ngZone=r,this._injector=te(yt),this._document=o}create(n,r=!1){return new wy(n,this._checker,this._ngZone,this._document,r,this._injector)}};e.\u0275fac=function(r){return new(r||e)(X(Nh),X(Le),X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var hT=class extends wy{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._enabled?this._focusTrapManager.register(this):this._focusTrapManager.deregister(this)}constructor(e,t,n,r,o,s,a,l){super(e,t,n,r,a.defer,l),this._focusTrapManager=o,this._inertStrategy=s,this._focusTrapManager.register(this)}destroy(){this._focusTrapManager.deregister(this),super.destroy()}_enable(){this._inertStrategy.preventFocus(this),this.toggleAnchors(!0)}_disable(){this._inertStrategy.allowFocus(this),this.toggleAnchors(!1)}},pT=class{constructor(){this._listener=null}preventFocus(e){this._listener&&e._document.removeEventListener("focus",this._listener,!0),this._listener=t=>this._trapFocus(e,t),e._ngZone.runOutsideAngular(()=>{e._document.addEventListener("focus",this._listener,!0)})}allowFocus(e){this._listener&&(e._document.removeEventListener("focus",this._listener,!0),this._listener=null)}_trapFocus(e,t){let n=t.target,r=e._element;n&&!r.contains(n)&&!n.closest?.("div.cdk-overlay-pane")&&setTimeout(()=>{e.enabled&&!r.contains(e._document.activeElement)&&e.focusFirstTabbableElement()})}},yK=new ge("FOCUS_TRAP_INERT_STRATEGY"),xK=(()=>{let e=class e{constructor(){this._focusTrapStack=[]}register(n){this._focusTrapStack=this._focusTrapStack.filter(o=>o!==n);let r=this._focusTrapStack;r.length&&r[r.length-1]._disable(),r.push(n),n._enable()}deregister(n){n._disable();let r=this._focusTrapStack,o=r.indexOf(n);o!==-1&&(r.splice(o,1),r.length&&r[r.length-1]._enable())}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),kh=(()=>{let e=class e{constructor(n,r,o,s,a){this._checker=n,this._ngZone=r,this._focusTrapManager=o,this._injector=te(yt),this._document=s,this._inertStrategy=a||new pT}create(n,r={defer:!1}){let o;return typeof r=="boolean"?o={defer:r}:o=r,new hT(n,this._checker,this._ngZone,this._document,this._focusTrapManager,this._inertStrategy,o,this._injector)}};e.\u0275fac=function(r){return new(r||e)(X(Nh),X(Le),X(xK),X(Ye),X(yK,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function bd(i){return i.buttons===0||i.detail===0}function yd(i){let e=i.touches&&i.touches[0]||i.changedTouches&&i.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}var wK=new ge("cdk-input-modality-detector-options"),CK={ignoreKeys:[18,17,224,91,16]},D3=650,Dh=Fr({passive:!0,capture:!0}),SK=(()=>{let e=class e{get mostRecentModality(){return this._modality.value}constructor(n,r,o,s){this._platform=n,this._mostRecentTarget=null,this._modality=new Dn(null),this._lastTouchMs=0,this._onKeydown=a=>{this._options?.ignoreKeys?.some(l=>l===a.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Si(a))},this._onMousedown=a=>{Date.now()-this._lastTouchMs{if(yd(a)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Si(a)},this._options=Z(Z({},CK),s),this.modalityDetected=this._modality.pipe(Df(1)),this.modalityChanged=this.modalityDetected.pipe(vl()),n.isBrowser&&r.runOutsideAngular(()=>{o.addEventListener("keydown",this._onKeydown,Dh),o.addEventListener("mousedown",this._onMousedown,Dh),o.addEventListener("touchstart",this._onTouchstart,Dh)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Dh),document.removeEventListener("mousedown",this._onMousedown,Dh),document.removeEventListener("touchstart",this._onTouchstart,Dh))}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Le),X(Ye),X(wK,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),MK=new ge("liveAnnouncerElement",{providedIn:"root",factory:EK});function EK(){return null}var IK=new ge("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),TK=0,Sy=(()=>{let e=class e{constructor(n,r,o,s){this._ngZone=r,this._defaultOptions=s,this._document=o,this._liveElement=n||this._createLiveElement()}announce(n,...r){let o=this._defaultOptions,s,a;return r.length===1&&typeof r[0]=="number"?a=r[0]:[s,a]=r,this.clear(),clearTimeout(this._previousTimeout),s||(s=o&&o.politeness?o.politeness:"polite"),a==null&&o&&(a=o.duration),this._liveElement.setAttribute("aria-live",s),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(l=>this._currentResolve=l)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=n,typeof a=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),a)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let n="cdk-live-announcer-element",r=this._document.getElementsByClassName(n),o=this._document.createElement("div");for(let s=0;s .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{let e=class e{constructor(n,r,o,s,a){this._ngZone=n,this._platform=r,this._inputModalityDetector=o,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new me,this._rootNodeFocusAndBlurListener=l=>{let c=Si(l);for(let d=c;d;d=d.parentElement)l.type==="focus"?this._onFocus(l,d):this._onBlur(l,d)},this._document=s,this._detectionMode=a?.detectionMode||vy.IMMEDIATE}monitor(n,r=!1){let o=er(n);if(!this._platform.isBrowser||o.nodeType!==1)return Ke();let s=Eh(o)||this._getDocument(),a=this._elementInfo.get(o);if(a)return r&&(a.checkChildren=!0),a.subject;let l={checkChildren:r,subject:new me,rootNode:s};return this._elementInfo.set(o,l),this._registerGlobalListeners(l),l.subject}stopMonitoring(n){let r=er(n),o=this._elementInfo.get(r);o&&(o.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(o))}focusVia(n,r,o){let s=er(n),a=this._getDocument().activeElement;s===a?this._getClosestElementsInfo(s).forEach(([l,c])=>this._originChanged(l,r,c)):(this._setOrigin(r),typeof s.focus=="function"&&s.focus(o))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===vy.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===vy.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?D3:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(n,r){let o=this._elementInfo.get(r),s=Si(n);!o||!o.checkChildren&&r!==s||this._originChanged(r,this._getFocusOrigin(s),o)}_onBlur(n,r){let o=this._elementInfo.get(r);!o||o.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(o,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,o=this._rootNodeFocusListenerCount.get(r)||0;o||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,_y),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,_y)}),this._rootNodeFocusListenerCount.set(r,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Xe(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let o=this._rootNodeFocusListenerCount.get(r);o>1?this._rootNodeFocusListenerCount.set(r,o-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,_y),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,_y),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,o){this._setClasses(n,r),this._emitOrigin(o,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((o,s)=>{(s===n||o.checkChildren&&s.contains(n))&&r.push([s,o])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let s=n.labels;if(s){for(let a=0;a{let e=class e{constructor(n,r){this._platform=n,this._document=r,this._breakpointSubscription=te(Th).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return vd.NONE;let n=this._document.createElement("div");n.style.backgroundColor="rgb(1,2,3)",n.style.position="absolute",this._document.body.appendChild(n);let r=this._document.defaultView||window,o=r&&r.getComputedStyle?r.getComputedStyle(n):null,s=(o&&o.backgroundColor||"").replace(/ /g,"");switch(n.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return vd.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return vd.BLACK_ON_WHITE}return vd.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let n=this._document.body.classList;n.remove(dT,C3,S3),this._hasCheckedHighContrastMode=!0;let r=this.getHighContrastMode();r===vd.BLACK_ON_WHITE?n.add(dT,C3):r===vd.WHITE_ON_BLACK&&n.add(dT,S3)}}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),My=(()=>{let e=class e{constructor(n){n._applyBodyHighContrastModeCssClasses()}};e.\u0275fac=function(r){return new(r||e)(X(gT))},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[fy]});let i=e;return i})();var PK=new ge("cdk-dir-doc",{providedIn:"root",factory:OK});function OK(){return te(Ye)}var RK=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function AK(i){let e=i?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?RK.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var ai=(()=>{let e=class e{constructor(n){if(this.value="ltr",this.change=new Pe,n){let r=n.body?n.body.dir:null,o=n.documentElement?n.documentElement.dir:null;this.value=AK(r||o||"ltr")}}ngOnDestroy(){this.change.complete()}};e.\u0275fac=function(r){return new(r||e)(X(PK,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var $l=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})();var NK=["*",[["mat-option"],["ng-container"]]],kK=["*","mat-option, ng-container"],LK=["text"],FK=[[["mat-icon"]],"*"],BK=["mat-icon","*"];function VK(i,e){if(i&1&&J(0,"mat-pseudo-checkbox",1),i&2){let t=I();N("disabled",t.disabled)("state",t.selected?"checked":"unchecked")}}function zK(i,e){if(i&1&&J(0,"mat-pseudo-checkbox",3),i&2){let t=I();N("disabled",t.disabled)}}function UK(i,e){if(i&1&&(v(0,"span",4),S(1),y()),i&2){let t=I();w(),Me("(",t.group.label,")")}}var HK=["mat-internal-form-field",""],GK=["*"];var wT=(()=>{let e=class e{};e.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",e.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",e.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",e.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)";let i=e;return i})();function jK(){return!0}var WK=new ge("mat-sanity-checks",{providedIn:"root",factory:jK}),qt=(()=>{let e=class e{constructor(n,r,o){this._sanityChecks=r,this._document=o,this._hasDoneGlobalChecks=!1,n._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(n){return Vm()?!1:typeof this._sanityChecks=="boolean"?this._sanityChecks:!!this._sanityChecks[n]}};e.\u0275fac=function(r){return new(r||e)(X(gT),X(WK,8),X(Ye))},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[$l,$l]});let i=e;return i})();var Iy=class{constructor(e,t,n,r,o){this._defaultMatcher=e,this.ngControl=t,this._parentFormGroup=n,this._parentForm=r,this._stateChanges=o,this.errorState=!1}updateErrorState(){let e=this.errorState,t=this._parentFormGroup||this._parentForm,n=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,o=n?.isErrorState(r,t)??!1;o!==e&&(this.errorState=o,this._stateChanges.next())}};var B3=(()=>{let e=class e{isErrorState(n,r){return!!(n&&n.invalid&&(n.touched||r&&r.submitted))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Uo=function(i){return i[i.FADING_IN=0]="FADING_IN",i[i.VISIBLE=1]="VISIBLE",i[i.FADING_OUT=2]="FADING_OUT",i[i.HIDDEN=3]="HIDDEN",i}(Uo||{}),bT=class{constructor(e,t,n,r=!1){this._renderer=e,this.element=t,this.config=n,this._animationForciblyDisabledThroughCss=r,this.state=Uo.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}},P3=Fr({passive:!0,capture:!0}),yT=class{constructor(){this._events=new Map,this._delegateEventHandler=e=>{let t=Si(e);t&&this._events.get(e.type)?.forEach((n,r)=>{(r===t||r.contains(t))&&n.forEach(o=>o.handleEvent(e))})}}addHandler(e,t,n,r){let o=this._events.get(t);if(o){let s=o.get(n);s?s.add(r):o.set(n,new Set([r]))}else this._events.set(t,new Map([[n,new Set([r])]])),e.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,P3)})}removeHandler(e,t,n){let r=this._events.get(e);if(!r)return;let o=r.get(t);o&&(o.delete(n),o.size===0&&r.delete(t),r.size===0&&(this._events.delete(e),document.removeEventListener(e,this._delegateEventHandler,P3)))}},O3={enterDuration:225,exitDuration:150},$K=800,R3=Fr({passive:!0,capture:!0}),A3=["mousedown","touchstart"],N3=["mouseup","mouseleave","touchend","touchcancel"],zm=class zm{constructor(e,t,n,r){this._target=e,this._ngZone=t,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=er(n))}fadeInRipple(e,t,n={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=Z(Z({},O3),n.animation);n.centered&&(e=r.left+r.width/2,t=r.top+r.height/2);let s=n.radius||qK(e,t,r),a=e-r.left,l=t-r.top,c=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=`${a-s}px`,d.style.top=`${l-s}px`,d.style.height=`${s*2}px`,d.style.width=`${s*2}px`,n.color!=null&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);let u=window.getComputedStyle(d),h=u.transitionProperty,p=u.transitionDuration,f=h==="none"||p==="0s"||p==="0s, 0s"||r.width===0&&r.height===0,m=new bT(this,d,n,f);d.style.transform="scale3d(1, 1, 1)",m.state=Uo.FADING_IN,n.persistent||(this._mostRecentTransientRipple=m);let b=null;return!f&&(c||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let g=()=>{b&&(b.fallbackTimer=null),clearTimeout(x),this._finishRippleTransition(m)},_=()=>this._destroyRipple(m),x=setTimeout(_,c+100);d.addEventListener("transitionend",g),d.addEventListener("transitioncancel",_),b={onTransitionEnd:g,onTransitionCancel:_,fallbackTimer:x}}),this._activeRipples.set(m,b),(f||!c)&&this._finishRippleTransition(m),m}fadeOutRipple(e){if(e.state===Uo.FADING_OUT||e.state===Uo.HIDDEN)return;let t=e.element,n=Z(Z({},O3),e.config.animation);t.style.transitionDuration=`${n.exitDuration}ms`,t.style.opacity="0",e.state=Uo.FADING_OUT,(e._animationForciblyDisabledThroughCss||!n.exitDuration)&&this._finishRippleTransition(e)}fadeOutAll(){this._getActiveRipples().forEach(e=>e.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(e=>{e.config.persistent||e.fadeOut()})}setupTriggerEvents(e){let t=er(e);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,A3.forEach(n=>{zm._eventManager.addHandler(this._ngZone,n,t,this)}))}handleEvent(e){e.type==="mousedown"?this._onMousedown(e):e.type==="touchstart"?this._onTouchStart(e):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{N3.forEach(t=>{this._triggerElement.addEventListener(t,this,R3)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(e){e.state===Uo.FADING_IN?this._startFadeOutTransition(e):e.state===Uo.FADING_OUT&&this._destroyRipple(e)}_startFadeOutTransition(e){let t=e===this._mostRecentTransientRipple,{persistent:n}=e.config;e.state=Uo.VISIBLE,!n&&(!t||!this._isPointerDown)&&e.fadeOut()}_destroyRipple(e){let t=this._activeRipples.get(e)??null;this._activeRipples.delete(e),this._activeRipples.size||(this._containerRect=null),e===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),e.state=Uo.HIDDEN,t!==null&&(e.element.removeEventListener("transitionend",t.onTransitionEnd),e.element.removeEventListener("transitioncancel",t.onTransitionCancel),t.fallbackTimer!==null&&clearTimeout(t.fallbackTimer)),e.element.remove()}_onMousedown(e){let t=bd(e),n=this._lastTouchStartEvent&&Date.now(){let t=e.state===Uo.VISIBLE||e.config.terminateOnPointerUp&&e.state===Uo.FADING_IN;!e.config.persistent&&t&&e.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let e=this._triggerElement;e&&(A3.forEach(t=>zm._eventManager.removeHandler(t,e,this)),this._pointerUpEventsRegistered&&(N3.forEach(t=>e.removeEventListener(t,this,R3)),this._pointerUpEventsRegistered=!1))}};zm._eventManager=new yT;var xT=zm;function qK(i,e,t){let n=Math.max(Math.abs(i-t.left),Math.abs(i-t.right)),r=Math.max(Math.abs(e-t.top),Math.abs(e-t.bottom));return Math.sqrt(n*n+r*r)}var V3=new ge("mat-ripple-global-options"),za=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(n){n&&this.fadeOutAllNonPersistent(),this._disabled=n,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(n){this._trigger=n,this._setupTriggerEventsIfEnabled()}constructor(n,r,o,s,a){this._elementRef=n,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new xT(this,r,n,o)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Z(Z(Z({},this._globalOptions.animation),this._animationMode==="NoopAnimations"?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(n,r=0,o){return typeof n=="number"?this._rippleRenderer.fadeInRipple(n,r,Z(Z({},this.rippleConfig),o)):this._rippleRenderer.fadeInRipple(0,0,Z(Z({},this.rippleConfig),n))}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Le),M(gn),M(V3,8),M(Zn,8))},e.\u0275dir=ze({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(r,o){r&2&&se("mat-ripple-unbounded",o.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0});let i=e;return i})(),Hm=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[qt,qt]});let i=e;return i})(),YK=(()=>{let e=class e{constructor(n){this._animationMode=n,this.state="unchecked",this.disabled=!1,this.appearance="full"}};e.\u0275fac=function(r){return new(r||e)(M(Zn,8))},e.\u0275cmp=le({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(r,o){r&2&&se("mat-pseudo-checkbox-indeterminate",o.state==="indeterminate")("mat-pseudo-checkbox-checked",o.state==="checked")("mat-pseudo-checkbox-disabled",o.disabled)("mat-pseudo-checkbox-minimal",o.appearance==="minimal")("mat-pseudo-checkbox-full",o.appearance==="full")("_mat-animation-noopable",o._animationMode==="NoopAnimations")},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},standalone:!0,features:[ce],decls:0,vars:0,template:function(r,o){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color);border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color);border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0});let i=e;return i})(),XK=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[qt]});let i=e;return i})(),Lh=new ge("MAT_OPTION_PARENT_COMPONENT"),ZK=0,Fh=new ge("MatOptgroup"),z3=(()=>{let e=class e{constructor(n){this.disabled=!1,this._labelId=`mat-optgroup-label-${ZK++}`,this._inert=n?.inertGroups??!1}};e.\u0275fac=function(r){return new(r||e)(M(Lh,8))},e.\u0275cmp=le({type:e,selectors:[["mat-optgroup"]],hostAttrs:[1,"mat-mdc-optgroup"],hostVars:3,hostBindings:function(r,o){r&2&&Ze("role",o._inert?null:"group")("aria-disabled",o._inert?null:o.disabled.toString())("aria-labelledby",o._inert?null:o._labelId)},inputs:{label:"label",disabled:[2,"disabled","disabled",at]},exportAs:["matOptgroup"],standalone:!0,features:[Bt([{provide:Fh,useExisting:e}]),an,ce],ngContentSelectors:kK,decls:5,vars:4,consts:[["role","presentation",1,"mat-mdc-optgroup-label",3,"id"],[1,"mdc-list-item__primary-text"]],template:function(r,o){r&1&&(kn(NK),v(0,"span",0)(1,"span",1),S(2),$t(3),y()(),$t(4,1)),r&2&&(se("mdc-list-item--disabled",o.disabled),N("id",o._labelId),w(2),Me("",o.label," "))},styles:[".mat-mdc-optgroup{color:var(--mat-optgroup-label-text-color);font-family:var(--mat-optgroup-label-text-font);line-height:var(--mat-optgroup-label-text-line-height);font-size:var(--mat-optgroup-label-text-size);letter-spacing:var(--mat-optgroup-label-text-tracking);font-weight:var(--mat-optgroup-label-text-weight)}.mat-mdc-optgroup-label{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;outline:none}.mat-mdc-optgroup-label.mdc-list-item--disabled{opacity:.38}.mat-mdc-optgroup-label .mdc-list-item__primary-text{font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;white-space:normal}"],encapsulation:2,changeDetection:0});let i=e;return i})(),QK=0,Um=class{constructor(e,t=!1){this.source=e,this.isUserInput=t}},ql=(()=>{let e=class e{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(n){this._disabled=n}get disableRipple(){return!!(this._parent&&this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}constructor(n,r,o,s){this._element=n,this._changeDetectorRef=r,this._parent=o,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id=`mat-option-${QK++}`,this.onSelectionChange=new Pe,this._stateChanges=new me}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(n=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),n&&this._emitSelectionChangeEvent())}deselect(n=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),n&&this._emitSelectionChangeEvent())}focus(n,r){let o=this._getHostElement();typeof o.focus=="function"&&o.focus(r)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(n){(n.keyCode===13||n.keyCode===32)&&!mi(n)&&(this._selectViaInteraction(),n.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let n=this.viewValue;n!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=n)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(n=!1){this.onSelectionChange.emit(new Um(this,n))}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Fe),M(Lh,8),M(Fh,8))},e.\u0275cmp=le({type:e,selectors:[["mat-option"]],viewQuery:function(r,o){if(r&1&&Ie(LK,7),r&2){let s;be(s=ye())&&(o._text=s.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(r,o){r&1&&H("click",function(){return o._selectViaInteraction()})("keydown",function(a){return o._handleKeydown(a)}),r&2&&(No("id",o.id),Ze("aria-selected",o.selected)("aria-disabled",o.disabled.toString()),se("mdc-list-item--selected",o.selected)("mat-mdc-option-multiple",o.multiple)("mat-mdc-option-active",o.active)("mdc-list-item--disabled",o.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",at]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],standalone:!0,features:[an,ce],ngContentSelectors:BK,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(r,o){r&1&&(kn(FK),W(0,VK,1,2,"mat-pseudo-checkbox",1),$t(1),v(2,"span",2,0),$t(4,1),y(),W(5,zK,1,1,"mat-pseudo-checkbox",3)(6,UK,2,1,"span",4),J(7,"div",5)),r&2&&(ae(o.multiple?0:-1),w(5),ae(!o.multiple&&o.selected&&!o.hideSingleSelectionIndicator?5:-1),w(),ae(o.group&&o.group._inert?6:-1),w(),N("matRippleTrigger",o._getHostElement())("matRippleDisabled",o.disabled||o.disableRipple))},dependencies:[YK,za],styles:['.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color);font-family:var(--mat-option-label-text-font);line-height:var(--mat-option-label-text-line-height);font-size:var(--mat-option-label-text-size);letter-spacing:var(--mat-option-label-text-tracking);font-weight:var(--mat-option-label-text-weight)}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color)}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color);outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color)}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color)}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let i=e;return i})();function Ty(i,e,t){if(t.length){let n=e.toArray(),r=t.toArray(),o=0;for(let s=0;st+n?Math.max(0,i-n+e):t}var Bh=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[Hm,qt,XK]});let i=e;return i})(),k3={capture:!0},L3=["focus","mousedown","mouseenter","touchstart"],_T="mat-ripple-loader-uninitialized",vT="mat-ripple-loader-class-name",F3="mat-ripple-loader-centered",Ey="mat-ripple-loader-disabled",U3=(()=>{let e=class e{constructor(){this._document=te(Ye,{optional:!0}),this._animationMode=te(Zn,{optional:!0}),this._globalRippleOptions=te(V3,{optional:!0}),this._platform=te(gn),this._ngZone=te(Le),this._hosts=new Map,this._onInteraction=n=>{let r=Si(n);if(r instanceof HTMLElement){let o=r.closest(`[${_T}="${this._globalRippleOptions?.namespace??""}"]`);o&&this._createRipple(o)}},this._ngZone.runOutsideAngular(()=>{for(let n of L3)this._document?.addEventListener(n,this._onInteraction,k3)})}ngOnDestroy(){let n=this._hosts.keys();for(let r of n)this.destroyRipple(r);for(let r of L3)this._document?.removeEventListener(r,this._onInteraction,k3)}configureRipple(n,r){n.setAttribute(_T,this._globalRippleOptions?.namespace??""),(r.className||!n.hasAttribute(vT))&&n.setAttribute(vT,r.className||""),r.centered&&n.setAttribute(F3,""),r.disabled&&n.setAttribute(Ey,"")}getRipple(n){return this._hosts.get(n)||this._createRipple(n)}setDisabled(n,r){let o=this._hosts.get(n);if(o){o.disabled=r;return}r?n.setAttribute(Ey,""):n.removeAttribute(Ey)}_createRipple(n){if(!this._document)return;let r=this._hosts.get(n);if(r)return r;n.querySelector(".mat-ripple")?.remove();let o=this._document.createElement("span");o.classList.add("mat-ripple",n.getAttribute(vT)),n.append(o);let s=new za(new Re(o),this._ngZone,this._platform,this._globalRippleOptions?this._globalRippleOptions:void 0,this._animationMode?this._animationMode:void 0);return s._isInitialized=!0,s.trigger=n,s.centered=n.hasAttribute(F3),s.disabled=n.hasAttribute(Ey),this.attachRipple(n,s),s}attachRipple(n,r){n.removeAttribute(_T),this._hosts.set(n,r)}destroyRipple(n){let r=this._hosts.get(n);r&&(r.ngOnDestroy(),this._hosts.delete(n))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),Py=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=le({type:e,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(r,o){r&2&&se("mdc-form-field--align-end",o.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},standalone:!0,features:[ce],attrs:HK,ngContentSelectors:GK,decls:1,vars:0,template:function(r,o){r&1&&(kn(),$t(0))},styles:[".mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}"],encapsulation:2,changeDetection:0});let i=e;return i})();var KK=["mat-button",""],JK=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],eJ=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var tJ=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}";var nJ=["mat-icon-button",""],iJ=["*"];var rJ=new ge("MAT_BUTTON_CONFIG");var oJ=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],H3=(()=>{let e=class e{get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(n){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,n)}get disableRipple(){return this._disableRipple}set disableRipple(n){this._disableRipple=n,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(n){this._disabled=n,this._updateRippleDisabled()}constructor(n,r,o,s){this._elementRef=n,this._platform=r,this._ngZone=o,this._animationMode=s,this._focusMonitor=te(po),this._rippleLoader=te(U3),this._isFab=!1,this._disableRipple=!1,this._disabled=!1;let a=te(rJ,{optional:!0}),l=n.nativeElement,c=l.classList;this.disabledInteractive=a?.disabledInteractive??!1,this.color=a?.color??null,this._rippleLoader?.configureRipple(l,{className:"mat-mdc-button-ripple"});for(let{attribute:d,mdcClasses:u}of oJ)l.hasAttribute(d)&&c.add(...u)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(n="program",r){n?this._focusMonitor.focusVia(this._elementRef.nativeElement,n,r):this._elementRef.nativeElement.focus(r)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}};e.\u0275fac=function(r){IE()},e.\u0275dir=ze({type:e,inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",at],disabled:[2,"disabled","disabled",at],ariaDisabled:[2,"aria-disabled","ariaDisabled",at],disabledInteractive:[2,"disabledInteractive","disabledInteractive",at]},features:[an]});let i=e;return i})();var zi=(()=>{let e=class e extends H3{constructor(n,r,o,s){super(n,r,o,s)}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(gn),M(Le),M(Zn,8))},e.\u0275cmp=le({type:e,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(r,o){r&2&&(Ze("disabled",o._getDisabledAttribute())("aria-disabled",o._getAriaDisabled()),Nr(o.color?"mat-"+o.color:""),se("mat-mdc-button-disabled",o.disabled)("mat-mdc-button-disabled-interactive",o.disabledInteractive)("_mat-animation-noopable",o._animationMode==="NoopAnimations")("mat-unthemed",!o.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[nn,ce],attrs:KK,ngContentSelectors:eJ,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,o){r&1&&(kn(JK),J(0,"span",0),$t(1),v(2,"span",1),$t(3,1),y(),$t(4,2),J(5,"span",2)(6,"span",3)),r&2&&se("mdc-button__ripple",!o._isFab)("mdc-fab__ripple",o._isFab)},styles:['.mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 8px);height:var(--mdc-text-button-container-height);font-family:var(--mdc-text-button-label-text-font);font-size:var(--mdc-text-button-label-text-size);letter-spacing:var(--mdc-text-button-label-text-tracking);text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight)}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color)}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity)}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity)}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity)}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color)}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-filled-button-horizontal-padding, 16px);height:var(--mdc-filled-button-container-height);font-family:var(--mdc-filled-button-label-text-font);font-size:var(--mdc-filled-button-label-text-size);letter-spacing:var(--mdc-filled-button-label-text-tracking);text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color)}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity)}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity)}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity)}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color);background-color:var(--mdc-filled-button-container-color)}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow);height:var(--mdc-protected-button-container-height);font-family:var(--mdc-protected-button-label-text-font);font-size:var(--mdc-protected-button-label-text-size);letter-spacing:var(--mdc-protected-button-label-text-tracking);text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color)}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity)}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity)}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity)}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color);background-color:var(--mdc-protected-button-container-color)}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape)}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow)}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow)}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow)}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow)}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-outlined-button-horizontal-padding, 15px);height:var(--mdc-outlined-button-container-height);font-family:var(--mdc-outlined-button-label-text-font);font-size:var(--mdc-outlined-button-label-text-size);letter-spacing:var(--mdc-outlined-button-label-text-tracking);text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight);border-radius:var(--mdc-outlined-button-container-shape);border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color)}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity)}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity)}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity)}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color);border-color:var(--mdc-outlined-button-outline-color)}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0});let i=e;return i})();var Ho=(()=>{let e=class e extends H3{constructor(n,r,o,s){super(n,r,o,s),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(gn),M(Le),M(Zn,8))},e.\u0275cmp=le({type:e,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(r,o){r&2&&(Ze("disabled",o._getDisabledAttribute())("aria-disabled",o._getAriaDisabled()),Nr(o.color?"mat-"+o.color:""),se("mat-mdc-button-disabled",o.disabled)("mat-mdc-button-disabled-interactive",o.disabledInteractive)("_mat-animation-noopable",o._animationMode==="NoopAnimations")("mat-unthemed",!o.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[nn,ce],attrs:nJ,ngContentSelectors:iJ,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,o){r&1&&(kn(),J(0,"span",0),$t(1),J(2,"span",1)(3,"span",2))},styles:['.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 48px);height:var(--mdc-icon-button-state-layer-size, 48px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 48px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size);color:var(--mdc-icon-button-icon-color);-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mdc-icon-button-icon-size);height:var(--mdc-icon-button-icon-size);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color)}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color)}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color)}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity)}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity)}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity)}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',tJ],encapsulation:2,changeDetection:0});let i=e;return i})();var In=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[qt,Hm,qt]});let i=e;return i})();function qs(i,e){return ie?1:i>=e?0:NaN}function Oy(i){return i.length===1&&(i=sJ(i)),{left:function(e,t,n,r){for(n==null&&(n=0),r==null&&(r=e.length);n>>1;i(e[o],t)<0?n=o+1:r=o}return n},right:function(e,t,n,r){for(n==null&&(n=0),r==null&&(r=e.length);n>>1;i(e[o],t)>0?r=o:n=o+1}return n}}}function sJ(i){return function(e,t){return qs(i(e),t)}}var G3=Oy(qs),aJ=G3.right,lJ=G3.left;var j3=Array.prototype,dJ=j3.slice,uJ=j3.map;var CDe=Math.sqrt(50),SDe=Math.sqrt(10),MDe=Math.sqrt(2);var _J=Array.prototype.slice;var vJ={value:function(){}};function X3(){for(var i=0,e=arguments.length,t={},n;i=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}Ay.prototype=X3.prototype={constructor:Ay,on:function(i,e){var t=this._,n=bJ(i+"",t),r,o=-1,s=n.length;if(arguments.length<2){for(;++o0)for(var t=new Array(r),n=0,r,o;n=0&&(e=i.slice(0,t))!=="xmlns"&&(i=i.slice(t+1)),MT.hasOwnProperty(e)?{space:MT[e],local:i}:i}function xJ(i){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===Ny&&e.documentElement.namespaceURI===Ny?e.createElement(i):e.createElementNS(t,i)}}function wJ(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function ky(i){var e=Ua(i);return(e.local?wJ:xJ)(e)}function CJ(){}function wd(i){return i==null?CJ:function(){return this.querySelector(i)}}function Z3(i){typeof i!="function"&&(i=wd(i));for(var e=this._groups,t=e.length,n=new Array(t),r=0;r=x&&(x=_+1);!(T=b[x])&&++x=0;)(s=n[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function aB(i){i||(i=IJ);function e(u,h){return u&&h?i(u.__data__,h.__data__):!u-!h}for(var t=this._groups,n=t.length,r=new Array(n),o=0;oe?1:i>=e?0:NaN}function lB(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function cB(){var i=new Array(this.size()),e=-1;return this.each(function(){i[++e]=this}),i}function dB(){for(var i=this._groups,e=0,t=i.length;e1?this.each((e==null?NJ:typeof e=="function"?LJ:kJ)(i,e,t??"")):Yl(this.node(),i)}function Yl(i,e){return i.style.getPropertyValue(e)||Fy(i).getComputedStyle(i,null).getPropertyValue(e)}function FJ(i){return function(){delete this[i]}}function BJ(i,e){return function(){this[i]=e}}function VJ(i,e){return function(){var t=e.apply(this,arguments);t==null?delete this[i]:this[i]=t}}function gB(i,e){return arguments.length>1?this.each((e==null?FJ:typeof e=="function"?VJ:BJ)(i,e)):this.node()[i]}function _B(i){return i.trim().split(/^|\s+/)}function ET(i){return i.classList||new vB(i)}function vB(i){this._node=i,this._names=_B(i.getAttribute("class")||"")}vB.prototype={add:function(i){var e=this._names.indexOf(i);e<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var e=this._names.indexOf(i);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function bB(i,e){for(var t=ET(i),n=-1,r=e.length;++n=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function iee(i){return function(){var e=this.__on;if(e){for(var t=0,n=-1,r=e.length,o;t>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?Gy(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?Gy(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=lee.exec(i))?new mo(e[1],e[2],e[3],1):(e=cee.exec(i))?new mo(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=dee.exec(i))?Gy(e[1],e[2],e[3],e[4]):(e=uee.exec(i))?Gy(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=hee.exec(i))?jB(e[1],e[2]/100,e[3]/100,1):(e=pee.exec(i))?jB(e[1],e[2]/100,e[3]/100,e[4]):BB.hasOwnProperty(i)?UB(BB[i]):i==="transparent"?new mo(NaN,NaN,NaN,0):null}function UB(i){return new mo(i>>16&255,i>>8&255,i&255,1)}function Gy(i,e,t,n){return n<=0&&(i=e=t=NaN),new mo(i,e,t,n)}function mee(i){return i instanceof Qm||(i=gs(i)),i?(i=i.rgb(),new mo(i.r,i.g,i.b,i.opacity)):new mo}function Hh(i,e,t,n){return arguments.length===1?mee(i):new mo(i,e,t,n??1)}function mo(i,e,t,n){this.r=+i,this.g=+e,this.b=+t,this.opacity=+n}Hy(mo,Hh,OT(Qm,{brighter:function(i){return i=i==null?jy:Math.pow(jy,i),new mo(this.r*i,this.g*i,this.b*i,this.opacity)},darker:function(i){return i=i==null?Xm:Math.pow(Xm,i),new mo(this.r*i,this.g*i,this.b*i,this.opacity)},rgb:function(){return this},displayable:function(){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:HB,formatHex:HB,formatRgb:GB,toString:GB}));function HB(){return"#"+RT(this.r)+RT(this.g)+RT(this.b)}function GB(){var i=this.opacity;return i=isNaN(i)?1:Math.max(0,Math.min(1,i)),(i===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(i===1?")":", "+i+")")}function RT(i){return i=Math.max(0,Math.min(255,Math.round(i)||0)),(i<16?"0":"")+i.toString(16)}function jB(i,e,t,n){return n<=0?i=e=t=NaN:t<=0||t>=1?i=e=NaN:e<=0&&(i=NaN),new Ys(i,e,t,n)}function WB(i){if(i instanceof Ys)return new Ys(i.h,i.s,i.l,i.opacity);if(i instanceof Qm||(i=gs(i)),!i)return new Ys;if(i instanceof Ys)return i;i=i.rgb();var e=i.r/255,t=i.g/255,n=i.b/255,r=Math.min(e,t,n),o=Math.max(e,t,n),s=NaN,a=o-r,l=(o+r)/2;return a?(e===o?s=(t-n)/a+(t0&&l<1?0:s,new Ys(s,a,l,i.opacity)}function $B(i,e,t,n){return arguments.length===1?WB(i):new Ys(i,e,t,n??1)}function Ys(i,e,t,n){this.h=+i,this.s=+e,this.l=+t,this.opacity=+n}Hy(Ys,$B,OT(Qm,{brighter:function(i){return i=i==null?jy:Math.pow(jy,i),new Ys(this.h,this.s,this.l*i,this.opacity)},darker:function(i){return i=i==null?Xm:Math.pow(Xm,i),new Ys(this.h,this.s,this.l*i,this.opacity)},rgb:function(){var i=this.h%360+(this.h<0)*360,e=isNaN(i)||isNaN(this.s)?0:this.s,t=this.l,n=t+(t<.5?t:1-t)*e,r=2*t-n;return new mo(AT(i>=240?i-240:i+120,r,n),AT(i,r,n),AT(i<120?i+240:i-120,r,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var i=this.opacity;return i=isNaN(i)?1:Math.max(0,Math.min(1,i)),(i===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(i===1?")":", "+i+")")}}));function AT(i,e,t){return(i<60?e+(t-e)*i/60:i<180?t:i<240?e+(t-e)*(240-i)/60:e)*255}function NT(i,e,t,n,r){var o=i*i,s=o*i;return((1-3*i+3*o-s)*e+(4-6*o+3*s)*t+(1+3*i+3*o-3*s)*n+s*r)/6}function qB(i){var e=i.length-1;return function(t){var n=t<=0?t=0:t>=1?(t=1,e-1):Math.floor(t*e),r=i[n],o=i[n+1],s=n>0?i[n-1]:2*r-o,a=nt&&(o=e.slice(t,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Br(n,r)})),t=kT.lastIndex;return t180?d+=360:d-c>180&&(c+=360),h.push({i:u.push(r(u)+"rotate(",null,n)-2,x:Br(c,d)})):d&&u.push(r(u)+"rotate("+d+n)}function a(c,d,u,h){c!==d?h.push({i:u.push(r(u)+"skewX(",null,n)-2,x:Br(c,d)}):d&&u.push(r(u)+"skewX("+d+n)}function l(c,d,u,h,p,f){if(c!==u||d!==h){var m=p.push(r(p)+"scale(",null,",",null,")");f.push({i:m-4,x:Br(c,u)},{i:m-2,x:Br(d,h)})}else(u!==1||h!==1)&&p.push(r(p)+"scale("+u+","+h+")")}return function(c,d){var u=[],h=[];return c=i(c),d=i(d),o(c.translateX,c.translateY,d.translateX,d.translateY,u,h),s(c.rotate,d.rotate,u,h),a(c.skewX,d.skewX,u,h),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,u,h),c=d=null,function(p){for(var f=-1,m=h.length,b;++f=0&&i._call.call(null,e),i=i._next;--Gh}function cV(){Md=(Xy=og.now())+Zy,Gh=ig=0;try{hV()}finally{Gh=0,Iee(),Md=0}}function Eee(){var i=og.now(),e=i-Xy;e>dV&&(Zy-=e,Xy=i)}function Iee(){for(var i,e=Yy,t,n=1/0;e;)e._call?(n>e._time&&(n=e._time),i=e,e=e._next):(t=e._next,e._next=null,e=i?i._next=t:Yy=t);rg=i,GT(n)}function GT(i){if(!Gh){ig&&(ig=clearTimeout(ig));var e=i-Md;e>24?(i<1/0&&(ig=setTimeout(cV,i-og.now()-Zy)),ng&&(ng=clearInterval(ng))):(ng||(Xy=og.now(),ng=setInterval(Eee,dV)),Gh=1,uV(cV))}}function Ky(i,e,t){var n=new sg;return e=e==null?0:+e,n.restart(function(r){n.stop(),i(r+e)},e,t),n}var Tee=Wm("start","end","cancel","interrupt"),Dee=[],fV=0,jT=1,ex=2,Jy=3,pV=4,tx=5,ag=6;function Xl(i,e,t,n,r,o){var s=i.__transition;if(!s)i.__transition={};else if(t in s)return;Pee(i,t,{name:e,index:n,group:r,on:Tee,tween:Dee,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:fV})}function lg(i,e){var t=Li(i,e);if(t.state>fV)throw new Error("too late; already scheduled");return t}function Vr(i,e){var t=Li(i,e);if(t.state>Jy)throw new Error("too late; already running");return t}function Li(i,e){var t=i.__transition;if(!t||!(t=t[e]))throw new Error("transition not found");return t}function Pee(i,e,t){var n=i.__transition,r;n[e]=t,t.timer=Qy(o,0,t.time);function o(c){t.state=jT,t.timer.restart(s,t.delay,t.time),t.delay<=c&&s(c-t.delay)}function s(c){var d,u,h,p;if(t.state!==jT)return l();for(d in n)if(p=n[d],p.name===t.name){if(p.state===Jy)return Ky(s);p.state===pV?(p.state=ag,p.timer.stop(),p.on.call("interrupt",i,i.__data__,p.index,p.group),delete n[d]):+dex&&n.state=0&&(e=e.slice(0,t)),!e||e==="start"})}function Xee(i,e,t){var n,r,o=Yee(e)?lg:Vr;return function(){var s=o(this,i),a=s.on;a!==n&&(r=(n=a).copy()).on(e,t),s.on=r}}function SV(i,e){var t=this._id;return arguments.length<2?Li(this.node(),t).on.on(i):this.each(Xee(t,i,e))}function Zee(i){return function(){var e=this.parentNode;for(var t in this.__transition)if(+t!==i)return;e&&e.removeChild(this)}}function MV(){return this.on("end.remove",Zee(this._id))}function EV(i){var e=this._name,t=this._id;typeof i!="function"&&(i=wd(i));for(var n=this._groups,r=n.length,o=new Array(r),s=0;sEd)if(!(Math.abs(d*a-l*c)>Ed)||!r)this._+="L"+(this._x1=i)+","+(this._y1=e);else{var h=t-o,p=n-s,f=a*a+l*l,m=h*h+p*p,b=Math.sqrt(f),g=Math.sqrt(u),_=r*Math.tan((XT-Math.acos((f+u-m)/(2*b*g)))/2),x=_/g,C=_/b;Math.abs(x-1)>Ed&&(this._+="L"+(i+x*c)+","+(e+x*d)),this._+="A"+r+","+r+",0,0,"+ +(d*h>c*p)+","+(this._x1=i+C*a)+","+(this._y1=e+C*l)}},arc:function(i,e,t,n,r,o){i=+i,e=+e,t=+t,o=!!o;var s=t*Math.cos(n),a=t*Math.sin(n),l=i+s,c=e+a,d=1^o,u=o?n-r:r-n;if(t<0)throw new Error("negative radius: "+t);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Ed||Math.abs(this._y1-c)>Ed)&&(this._+="L"+l+","+c),t&&(u<0&&(u=u%ZT+ZT),u>mte?this._+="A"+t+","+t+",0,1,"+d+","+(i-s)+","+(e-a)+"A"+t+","+t+",0,1,"+d+","+(this._x1=l)+","+(this._y1=c):u>Ed&&(this._+="A"+t+","+t+",0,"+ +(u>=XT)+","+d+","+(this._x1=i+t*Math.cos(r))+","+(this._y1=e+t*Math.sin(r))))},rect:function(i,e,t,n){this._+="M"+(this._x0=this._x1=+i)+","+(this._y0=this._y1=+e)+"h"+ +t+"v"+ +n+"h"+-t+"Z"},toString:function(){return this._}};var KT=zV;var go="$";function ox(){}ox.prototype=UV.prototype={constructor:ox,has:function(i){return go+i in this},get:function(i){return this[go+i]},set:function(i,e){return this[go+i]=e,this},remove:function(i){var e=go+i;return e in this&&delete this[e]},clear:function(){for(var i in this)i[0]===go&&delete this[i]},keys:function(){var i=[];for(var e in this)e[0]===go&&i.push(e.slice(1));return i},values:function(){var i=[];for(var e in this)e[0]===go&&i.push(this[e]);return i},entries:function(){var i=[];for(var e in this)e[0]===go&&i.push({key:e.slice(1),value:this[e]});return i},size:function(){var i=0;for(var e in this)e[0]===go&&++i;return i},empty:function(){for(var i in this)if(i[0]===go)return!1;return!0},each:function(i){for(var e in this)e[0]===go&&i(this[e],e.slice(1),this)}};function UV(i,e){var t=new ox;if(i instanceof ox)i.each(function(a,l){t.set(l,a)});else if(Array.isArray(i)){var n=-1,r=i.length,o;if(e==null)for(;++n1);return n+r*a*Math.sqrt(-2*Math.log(s)/s)}}return t.source=i,t}(jo);var xte=function i(e){function t(){var n=JT.source(e).apply(this,arguments);return function(){return Math.exp(n())}}return t.source=i,t}(jo);var eD=function i(e){function t(n){return function(){for(var r=0,o=0;o0)){if(m/=p,p<0){if(m0){if(m>h)return;m>u&&(u=m)}if(m=n-a,!(!p&&m<0)){if(m/=p,p<0){if(m>h)return;m>u&&(u=m)}else if(p>0){if(m0)){if(m/=f,f<0){if(m0){if(m>h)return;m>u&&(u=m)}if(m=r-l,!(!f&&m<0)){if(m/=f,f<0){if(m>h)return;m>u&&(u=m)}else if(f>0){if(m0)&&!(h<1)||(u>0&&(i[0]=[a+u*p,l+u*f]),h<1&&(i[1]=[a+h*p,l+h*f])),!0}}}}}function Lte(i,e,t,n,r){var o=i[1];if(o)return!0;var s=i[0],a=i.left,l=i.right,c=a[0],d=a[1],u=l[0],h=l[1],p=(c+u)/2,f=(d+h)/2,m,b;if(h===d){if(p=n)return;if(c>u){if(!s)s=[p,t];else if(s[1]>=r)return;o=[p,r]}else{if(!s)s=[p,r];else if(s[1]1)if(c>u){if(!s)s=[(t-b)/m,t];else if(s[1]>=r)return;o=[(r-b)/m,r]}else{if(!s)s=[(r-b)/m,r];else if(s[1]=n)return;o=[n,m*n+b]}else{if(!s)s=[n,m*n+b];else if(s[0]Bn||Math.abs(o[0][1]-o[1][1])>Bn))&&delete Ui[r]}function rz(i){return zr[i.index]={site:i,halfedges:[]}}function Fte(i,e){var t=i.site,n=e.left,r=e.right;return t===r&&(r=n,n=t),r?Math.atan2(r[1]-n[1],r[0]-n[0]):(t===n?(n=e[1],r=e[0]):(n=e[0],r=e[1]),Math.atan2(n[0]-r[0],r[1]-n[1]))}function aD(i,e){return e[+(e.left!==i.site)]}function Bte(i,e){return e[+(e.left===i.site)]}function oz(){for(var i=0,e=zr.length,t,n,r,o;iBn||Math.abs(b-p)>Bn)&&(c.splice(l,0,Ui.push(Qh(a,f,Math.abs(m-i)Bn?[i,Math.abs(h-i)Bn?[Math.abs(p-n)Bn?[t,Math.abs(h-t)Bn?[Math.abs(p-e)=-lz)){var p=l*l+c*c,f=d*d+u*u,m=(u*p-c*f)/h,b=(l*f-d*p)/h,g=az.pop()||new Vte;g.arc=i,g.site=r,g.x=m+s,g.y=(g.cy=b+a)+Math.sqrt(m*m+b*b),i.circle=g;for(var _=null,x=Kh._;x;)if(g.yBn)a=a.L;else if(s=e-Ute(a,t),s>Bn){if(!a.R){n=a;break}a=a.R}else{o>-Bn?(n=a.P,r=a):s>-Bn?(n=a,r=a.N):n=r=a;break}rz(i);var l=cz(i);if(Od.insert(n,l),!(!n&&!r)){if(n===r){Pd(n),r=cz(n.site),Od.insert(l,r),l.edge=r.edge=Zh(n.site,l.site),Dd(n),Dd(r);return}if(!r){l.edge=Zh(n.site,l.site);return}Pd(n),Pd(r);var c=n.site,d=c[0],u=c[1],h=i[0]-d,p=i[1]-u,f=r.site,m=f[0]-d,b=f[1]-u,g=2*(h*b-p*m),_=h*h+p*p,x=m*m+b*b,C=[(b*_-p*x)/g+d,(h*x-m*_)/g+u];gg(r.edge,c,f,C),l.edge=Zh(c,i,null,C),r.edge=Zh(i,f,null,C),Dd(n),Dd(r)}}function pz(i,e){var t=i.site,n=t[0],r=t[1],o=r-e;if(!o)return n;var s=i.P;if(!s)return-1/0;t=s.site;var a=t[0],l=t[1],c=l-e;if(!c)return a;var d=a-n,u=1/o-1/c,h=d/c;return u?(-h+Math.sqrt(h*h-2*u*(d*d/(-2*c)-l+c/2+r-o/2)))/u+n:(n+a)/2}function Ute(i,e){var t=i.N;if(t)return pz(t,e);var n=i.site;return n[1]===e?n[0]:1/0}var Bn=1e-6,lz=1e-12,Od,zr,Kh,Ui;function Hte(i,e,t){return(i[0]-t[0])*(e[1]-i[1])-(i[0]-e[0])*(t[1]-i[1])}function Gte(i,e){return e[1]-i[1]||e[0]-i[0]}function cx(i,e){var t=i.sort(Gte).pop(),n,r,o;for(Ui=[],zr=new Array(i.length),Od=new sD,Kh=new sD;;)if(o=lx,t&&(!o||t[1]=s)return null;var l=i-a.site[0],c=e-a.site[1],d=l*l+c*c;do a=n.cells[r=o],o=null,a.halfedges.forEach(function(u){var h=n.edges[u],p=h.left;if(!((p===a.site||!p)&&!(p=h.right))){var f=i-p[0],m=e-p[1],b=f*f+m*m;bn?(n+r)/2:Math.min(0,n)||Math.max(0,r),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function uD(){var i=jte,e=Wte,t=Yte,n=$te,r=qte,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=HT,c=Wm("start","zoom","end"),d,u,h=500,p=150,f=0;function m(O){O.property("__zoom",fz).on("wheel.zoom",D).on("mousedown.zoom",E).on("dblclick.zoom",P).filter(r).on("touchstart.zoom",Y).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",U).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(O,B,j){var q=O.selection?O.selection():O;q.property("__zoom",fz),O!==q?x(O,B,j):q.interrupt().each(function(){C(this,arguments).start().zoom(null,typeof B=="function"?B.apply(this,arguments):B).end()})},m.scaleBy=function(O,B,j){m.scaleTo(O,function(){var q=this.__zoom.k,k=typeof B=="function"?B.apply(this,arguments):B;return q*k},j)},m.scaleTo=function(O,B,j){m.transform(O,function(){var q=e.apply(this,arguments),k=this.__zoom,G=j==null?_(q):typeof j=="function"?j.apply(this,arguments):j,K=k.invert(G),de=typeof B=="function"?B.apply(this,arguments):B;return t(g(b(k,de),G,K),q,s)},j)},m.translateBy=function(O,B,j){m.transform(O,function(){return t(this.__zoom.translate(typeof B=="function"?B.apply(this,arguments):B,typeof j=="function"?j.apply(this,arguments):j),e.apply(this,arguments),s)})},m.translateTo=function(O,B,j,q){m.transform(O,function(){var k=e.apply(this,arguments),G=this.__zoom,K=q==null?_(k):typeof q=="function"?q.apply(this,arguments):q;return t(Rd.translate(K[0],K[1]).scale(G.k).translate(typeof B=="function"?-B.apply(this,arguments):-B,typeof j=="function"?-j.apply(this,arguments):-j),k,s)},q)};function b(O,B){return B=Math.max(o[0],Math.min(o[1],B)),B===O.k?O:new Qs(B,O.x,O.y)}function g(O,B,j){var q=B[0]-j[0]*O.k,k=B[1]-j[1]*O.k;return q===O.x&&k===O.y?O:new Qs(O.k,q,k)}function _(O){return[(+O[0][0]+ +O[1][0])/2,(+O[0][1]+ +O[1][1])/2]}function x(O,B,j){O.on("start.zoom",function(){C(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).end()}).tween("zoom",function(){var q=this,k=arguments,G=C(q,k),K=e.apply(q,k),de=j==null?_(K):typeof j=="function"?j.apply(q,k):j,Te=Math.max(K[1][0]-K[0][0],K[1][1]-K[0][1]),Ee=q.__zoom,He=typeof B=="function"?B.apply(q,k):B,he=l(Ee.invert(de).concat(Te/Ee.k),He.invert(de).concat(Te/He.k));return function(re){if(re===1)re=He;else{var qe=he(re),ue=Te/qe[2];re=new Qs(ue,de[0]-qe[0]*ue,de[1]-qe[1]*ue)}G.zoom(null,re)}})}function C(O,B,j){return!j&&O.__zooming||new T(O,B)}function T(O,B){this.that=O,this.args=B,this.active=0,this.extent=e.apply(O,B),this.taps=0}T.prototype={start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(O,B){return this.mouse&&O!=="mouse"&&(this.mouse[1]=B.invert(this.mouse[0])),this.touch0&&O!=="touch"&&(this.touch0[1]=B.invert(this.touch0[0])),this.touch1&&O!=="touch"&&(this.touch1[1]=B.invert(this.touch1[0])),this.that.__zoom=B,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(O){IT(new cD(m,O,this.that.__zoom),c.apply,c,[O,this.that,this.args])}};function D(){if(!i.apply(this,arguments))return;var O=C(this,arguments),B=this.__zoom,j=Math.max(o[0],Math.min(o[1],B.k*Math.pow(2,n.apply(this,arguments)))),q=zh(this);if(O.wheel)(O.mouse[0][0]!==q[0]||O.mouse[0][1]!==q[1])&&(O.mouse[1]=B.invert(O.mouse[0]=q)),clearTimeout(O.wheel);else{if(B.k===j)return;O.mouse=[q,B.invert(q)],Zl(this),O.start()}Jh(),O.wheel=setTimeout(k,p),O.zoom("mouse",t(g(b(B,j),O.mouse[0],O.mouse[1]),O.extent,s));function k(){O.wheel=null,O.end()}}function E(){if(u||!i.apply(this,arguments))return;var O=C(this,arguments,!0),B=Go(dt.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",K,!0),j=zh(this),q=dt.clientX,k=dt.clientY;DT(dt.view),dx(),O.mouse=[j,this.__zoom.invert(j)],Zl(this),O.start();function G(){if(Jh(),!O.moved){var de=dt.clientX-q,Te=dt.clientY-k;O.moved=de*de+Te*Te>f}O.zoom("mouse",t(g(O.that.__zoom,O.mouse[0]=zh(O.that),O.mouse[1]),O.extent,s))}function K(){B.on("mousemove.zoom mouseup.zoom",null),PT(dt.view,O.moved),Jh(),O.end()}}function P(){if(i.apply(this,arguments)){var O=this.__zoom,B=zh(this),j=O.invert(B),q=O.k*(dt.shiftKey?.5:2),k=t(g(b(O,q),B,j),e.apply(this,arguments),s);Jh(),a>0?Go(this).transition().duration(a).call(x,k,B):Go(this).call(m.transform,k)}}function Y(){if(i.apply(this,arguments)){var O=dt.touches,B=O.length,j=C(this,arguments,dt.changedTouches.length===B),q,k,G,K;for(dx(),k=0;kh4,AddEquation:()=>Ud,AddOperation:()=>l4,AdditiveAnimationBlendMode:()=>$P,AdditiveBlending:()=>XD,AlphaFormat:()=>y4,AlwaysDepth:()=>t4,AlwaysStencilFunc:()=>fH,AmbientLight:()=>R_,AmbientLightProbe:()=>Nw,AnimationClip:()=>au,AnimationLoader:()=>_P,AnimationMixer:()=>Vw,AnimationObjectGroup:()=>Bw,AnimationUtils:()=>Qn,ArcCurve:()=>n_,ArrayCamera:()=>$g,ArrowHelper:()=>FP,Audio:()=>L_,AudioAnalyser:()=>Lw,AudioContext:()=>tO,AudioListener:()=>xP,AudioLoader:()=>Rw,AxesHelper:()=>qw,AxisHelper:()=>Ale,BackSide:()=>bi,BasicDepthPacking:()=>uH,BasicShadowMap:()=>Kte,BinaryTextureLoader:()=>Ble,Bone:()=>Up,BooleanKeyframeTrack:()=>ol,BoundingBoxHelper:()=>Nle,Box2:()=>mc,Box3:()=>Ur,Box3Helper:()=>kP,BoxBufferGeometry:()=>lc,BoxGeometry:()=>lc,BoxHelper:()=>$w,BufferAttribute:()=>un,BufferGeometry:()=>It,BufferGeometryLoader:()=>Pw,ByteType:()=>f4,Cache:()=>lu,Camera:()=>Qd,CameraHelper:()=>NP,CanvasRenderer:()=>zle,CanvasTexture:()=>gw,CatmullRomCurve3:()=>i_,CineonToneMapping:()=>u4,CircleBufferGeometry:()=>Kg,CircleGeometry:()=>Kg,ClampToEdgeWrapping:()=>ir,Clock:()=>kw,Color:()=>je,ColorKeyframeTrack:()=>M_,CompressedTexture:()=>Qg,CompressedTextureLoader:()=>vP,ConeBufferGeometry:()=>Jg,ConeGeometry:()=>Jg,CubeCamera:()=>Op,CubeReflectionMapping:()=>uu,CubeRefractionMapping:()=>hu,CubeTexture:()=>cc,CubeTextureLoader:()=>Cw,CubeUVReflectionMapping:()=>Qp,CubeUVRefractionMapping:()=>B_,CubicBezierCurve:()=>Hp,CubicBezierCurve3:()=>r_,CubicInterpolant:()=>yw,CullFaceBack:()=>YD,CullFaceFront:()=>zU,CullFaceFrontBack:()=>Qte,CullFaceNone:()=>VU,Curve:()=>Gr,CurvePath:()=>bw,CustomBlending:()=>HU,CustomToneMapping:()=>p4,CylinderBufferGeometry:()=>tu,CylinderGeometry:()=>tu,Cylindrical:()=>TP,DataTexture:()=>Qa,DataTexture2DArray:()=>Np,DataTexture3D:()=>Wg,DataTextureLoader:()=>Sw,DataUtils:()=>VP,DecrementStencilOp:()=>cne,DecrementWrapStencilOp:()=>une,DefaultLoadingManager:()=>kH,DepthFormat:()=>$d,DepthStencilFormat:()=>Mp,DepthTexture:()=>_w,DirectionalLight:()=>O_,DirectionalLightHelper:()=>AP,DiscreteInterpolant:()=>xw,DodecahedronBufferGeometry:()=>e_,DodecahedronGeometry:()=>e_,DoubleSide:()=>Xd,DstAlphaFactor:()=>XU,DstColorFactor:()=>QU,DynamicBufferAttribute:()=>Cle,DynamicCopyUsage:()=>Mne,DynamicDrawUsage:()=>Ip,DynamicReadUsage:()=>wne,EdgesGeometry:()=>t_,EdgesHelper:()=>kle,EllipseCurve:()=>nu,EqualDepth:()=>i4,EqualStencilFunc:()=>mne,EquirectangularReflectionMapping:()=>Ng,EquirectangularRefractionMapping:()=>kg,Euler:()=>Zd,EventDispatcher:()=>ta,ExtrudeBufferGeometry:()=>rl,ExtrudeGeometry:()=>rl,FaceColors:()=>hle,FileLoader:()=>Yo,FlatShading:()=>HP,Float16BufferAttribute:()=>cw,Float32Attribute:()=>Ole,Float32BufferAttribute:()=>tt,Float64Attribute:()=>Rle,Float64BufferAttribute:()=>dw,FloatType:()=>Js,Fog:()=>Yg,FogExp2:()=>qg,Font:()=>qle,FontLoader:()=>$le,FrontSide:()=>Yd,Frustum:()=>Kd,GLBufferAttribute:()=>Hw,GLSL1:()=>Ine,GLSL3:()=>dP,GammaEncoding:()=>Zw,GreaterDepth:()=>o4,GreaterEqualDepth:()=>r4,GreaterEqualStencilFunc:()=>bne,GreaterStencilFunc:()=>_ne,GridHelper:()=>Ww,Group:()=>Xa,HalfFloatType:()=>jd,HemisphereLight:()=>I_,HemisphereLightHelper:()=>OP,HemisphereLightProbe:()=>Aw,IcosahedronBufferGeometry:()=>l_,IcosahedronGeometry:()=>l_,ImageBitmapLoader:()=>Ow,ImageLoader:()=>cu,ImageUtils:()=>Ja,ImmediateRenderObject:()=>Yle,IncrementStencilOp:()=>lne,IncrementWrapStencilOp:()=>dne,InstancedBufferAttribute:()=>tl,InstancedBufferGeometry:()=>k_,InstancedInterleavedBuffer:()=>Uw,InstancedMesh:()=>Xg,Int16Attribute:()=>Ile,Int16BufferAttribute:()=>aw,Int32Attribute:()=>Dle,Int32BufferAttribute:()=>lw,Int8Attribute:()=>Sle,Int8BufferAttribute:()=>rw,IntType:()=>g4,InterleavedBuffer:()=>el,InterleavedBufferAttribute:()=>hc,Interpolant:()=>Ss,InterpolateDiscrete:()=>Vg,InterpolateLinear:()=>zg,InterpolateSmooth:()=>Kx,InvertStencilOp:()=>hne,JSONLoader:()=>Ule,KeepStencilOp:()=>Jx,KeyframeTrack:()=>xo,LOD:()=>pw,LatheBufferGeometry:()=>c_,LatheGeometry:()=>c_,Layers:()=>jg,LensFlare:()=>Gle,LessDepth:()=>n4,LessEqualDepth:()=>ew,LessEqualStencilFunc:()=>gne,LessStencilFunc:()=>fne,Light:()=>wo,LightProbe:()=>du,Line:()=>Cs,Line3:()=>Gw,LineBasicMaterial:()=>Ti,LineCurve:()=>iu,LineCurve3:()=>vw,LineDashedMaterial:()=>C_,LineLoop:()=>Zg,LinePieces:()=>dle,LineSegments:()=>xr,LineStrip:()=>cle,LinearEncoding:()=>sr,LinearFilter:()=>Fi,LinearInterpolant:()=>S_,LinearMipMapLinearFilter:()=>ine,LinearMipMapNearestFilter:()=>nne,LinearMipmapLinearFilter:()=>pu,LinearMipmapNearestFilter:()=>WP,LinearToneMapping:()=>c4,Loader:()=>ar,LoaderUtils:()=>Zp,LoadingManager:()=>E_,LogLuvEncoding:()=>dH,LoopOnce:()=>sH,LoopPingPong:()=>lH,LoopRepeat:()=>aH,LuminanceAlphaFormat:()=>w4,LuminanceFormat:()=>x4,MOUSE:()=>Xte,Material:()=>Ii,MaterialLoader:()=>Dw,Math:()=>Hne,MathUtils:()=>Hne,Matrix3:()=>yi,Matrix4:()=>lt,MaxEquation:()=>JD,Mesh:()=>di,MeshBasicMaterial:()=>xs,MeshDepthMaterial:()=>kp,MeshDistanceMaterial:()=>Lp,MeshFaceMaterial:()=>fle,MeshLambertMaterial:()=>x_,MeshMatcapMaterial:()=>w_,MeshNormalMaterial:()=>y_,MeshPhongMaterial:()=>v_,MeshPhysicalMaterial:()=>__,MeshStandardMaterial:()=>Xp,MeshToonMaterial:()=>b_,MinEquation:()=>KD,MirroredRepeatWrapping:()=>Fg,MixOperation:()=>a4,MultiMaterial:()=>mle,MultiplyBlending:()=>QD,MultiplyOperation:()=>F_,NearestFilter:()=>Ei,NearestMipMapLinearFilter:()=>tne,NearestMipMapNearestFilter:()=>ene,NearestMipmapLinearFilter:()=>nw,NearestMipmapNearestFilter:()=>tw,NeverDepth:()=>e4,NeverStencilFunc:()=>pne,NoBlending:()=>Za,NoColors:()=>ule,NoToneMapping:()=>oc,NormalAnimationBlendMode:()=>Xw,NormalBlending:()=>wp,NotEqualDepth:()=>s4,NotEqualStencilFunc:()=>vne,NumberKeyframeTrack:()=>ou,Object3D:()=>hn,ObjectLoader:()=>bP,ObjectSpaceNormalMap:()=>pH,OctahedronBufferGeometry:()=>$p,OctahedronGeometry:()=>$p,OneFactor:()=>$U,OneMinusDstAlphaFactor:()=>ZU,OneMinusDstColorFactor:()=>KU,OneMinusSrcAlphaFactor:()=>jP,OneMinusSrcColorFactor:()=>YU,OrthographicCamera:()=>Jd,PCFShadowMap:()=>UP,PCFSoftShadowMap:()=>UU,PMREMGenerator:()=>uw,ParametricGeometry:()=>jle,Particle:()=>_le,ParticleBasicMaterial:()=>yle,ParticleSystem:()=>vle,ParticleSystemMaterial:()=>xle,Path:()=>ru,PerspectiveCamera:()=>Mi,Plane:()=>$o,PlaneBufferGeometry:()=>Ap,PlaneGeometry:()=>Ap,PlaneHelper:()=>LP,PointCloud:()=>gle,PointCloudMaterial:()=>ble,PointLight:()=>P_,PointLightHelper:()=>PP,Points:()=>eu,PointsMaterial:()=>nl,PolarGridHelper:()=>RP,PolyhedronBufferGeometry:()=>il,PolyhedronGeometry:()=>il,PositionalAudio:()=>wP,PropertyBinding:()=>jn,PropertyMixer:()=>Fw,QuadraticBezierCurve:()=>Gp,QuadraticBezierCurve3:()=>jp,Quaternion:()=>Bi,QuaternionKeyframeTrack:()=>fc,QuaternionLinearInterpolant:()=>ww,REVISION:()=>zP,RGBADepthPacking:()=>hH,RGBAFormat:()=>rr,RGBAIntegerFormat:()=>D4,RGBA_ASTC_10x10_Format:()=>H4,RGBA_ASTC_10x5_Format:()=>V4,RGBA_ASTC_10x6_Format:()=>z4,RGBA_ASTC_10x8_Format:()=>U4,RGBA_ASTC_12x10_Format:()=>G4,RGBA_ASTC_12x12_Format:()=>j4,RGBA_ASTC_4x4_Format:()=>O4,RGBA_ASTC_5x4_Format:()=>R4,RGBA_ASTC_5x5_Format:()=>A4,RGBA_ASTC_6x5_Format:()=>N4,RGBA_ASTC_6x6_Format:()=>k4,RGBA_ASTC_8x5_Format:()=>L4,RGBA_ASTC_8x6_Format:()=>F4,RGBA_ASTC_8x8_Format:()=>B4,RGBA_BPTC_Format:()=>W4,RGBA_ETC2_EAC_Format:()=>cP,RGBA_PVRTC_2BPPV1_Format:()=>aP,RGBA_PVRTC_4BPPV1_Format:()=>sP,RGBA_S3TC_DXT1_Format:()=>tP,RGBA_S3TC_DXT3_Format:()=>nP,RGBA_S3TC_DXT5_Format:()=>iP,RGBDEncoding:()=>XP,RGBEEncoding:()=>Qw,RGBEFormat:()=>C4,RGBFormat:()=>Wd,RGBIntegerFormat:()=>T4,RGBM16Encoding:()=>YP,RGBM7Encoding:()=>qP,RGB_ETC1_Format:()=>P4,RGB_ETC2_Format:()=>lP,RGB_PVRTC_2BPPV1_Format:()=>oP,RGB_PVRTC_4BPPV1_Format:()=>rP,RGB_S3TC_DXT1_Format:()=>eP,RGFormat:()=>E4,RGIntegerFormat:()=>I4,RawShaderMaterial:()=>dc,Ray:()=>ia,Raycaster:()=>MP,RectAreaLight:()=>A_,RedFormat:()=>S4,RedIntegerFormat:()=>M4,ReinhardToneMapping:()=>d4,RepeatWrapping:()=>Lg,ReplaceStencilOp:()=>ane,ReverseSubtractEquation:()=>jU,RingBufferGeometry:()=>d_,RingGeometry:()=>d_,SRGB8_ALPHA8_ASTC_10x10_Format:()=>iH,SRGB8_ALPHA8_ASTC_10x5_Format:()=>eH,SRGB8_ALPHA8_ASTC_10x6_Format:()=>tH,SRGB8_ALPHA8_ASTC_10x8_Format:()=>nH,SRGB8_ALPHA8_ASTC_12x10_Format:()=>rH,SRGB8_ALPHA8_ASTC_12x12_Format:()=>oH,SRGB8_ALPHA8_ASTC_4x4_Format:()=>$4,SRGB8_ALPHA8_ASTC_5x4_Format:()=>q4,SRGB8_ALPHA8_ASTC_5x5_Format:()=>Y4,SRGB8_ALPHA8_ASTC_6x5_Format:()=>X4,SRGB8_ALPHA8_ASTC_6x6_Format:()=>Z4,SRGB8_ALPHA8_ASTC_8x5_Format:()=>Q4,SRGB8_ALPHA8_ASTC_8x6_Format:()=>K4,SRGB8_ALPHA8_ASTC_8x8_Format:()=>J4,Scene:()=>Fp,SceneUtils:()=>Hle,ShaderChunk:()=>rn,ShaderLib:()=>ys,ShaderMaterial:()=>ws,ShadowMaterial:()=>g_,Shape:()=>qo,ShapeBufferGeometry:()=>qp,ShapeGeometry:()=>qp,ShapePath:()=>BP,ShapeUtils:()=>ea,ShortType:()=>m4,Skeleton:()=>fw,SkeletonHelper:()=>jw,SkinnedMesh:()=>zp,SmoothShading:()=>Jte,Sphere:()=>na,SphereBufferGeometry:()=>Yp,SphereGeometry:()=>Yp,Spherical:()=>IP,SphericalHarmonics3:()=>N_,SplineCurve:()=>Wp,SpotLight:()=>D_,SpotLightHelper:()=>DP,Sprite:()=>Vp,SpriteMaterial:()=>Bp,SrcAlphaFactor:()=>GP,SrcAlphaSaturateFactor:()=>JU,SrcColorFactor:()=>qU,StaticCopyUsage:()=>Sne,StaticDrawUsage:()=>Ep,StaticReadUsage:()=>xne,StereoCamera:()=>yP,StreamCopyUsage:()=>Ene,StreamDrawUsage:()=>yne,StreamReadUsage:()=>Cne,StringKeyframeTrack:()=>sl,SubtractEquation:()=>GU,SubtractiveBlending:()=>ZD,TOUCH:()=>Zte,TangentSpaceNormalMap:()=>fu,TetrahedronBufferGeometry:()=>u_,TetrahedronGeometry:()=>u_,TextGeometry:()=>Wle,Texture:()=>Gi,TextureLoader:()=>Mw,TorusBufferGeometry:()=>h_,TorusGeometry:()=>h_,TorusKnotBufferGeometry:()=>p_,TorusKnotGeometry:()=>p_,Triangle:()=>or,TriangleFanDrawMode:()=>one,TriangleStripDrawMode:()=>rne,TrianglesDrawMode:()=>cH,TubeBufferGeometry:()=>f_,TubeGeometry:()=>f_,UVMapping:()=>Yw,Uint16Attribute:()=>Tle,Uint16BufferAttribute:()=>Tp,Uint32Attribute:()=>Ple,Uint32BufferAttribute:()=>Dp,Uint8Attribute:()=>Mle,Uint8BufferAttribute:()=>ow,Uint8ClampedAttribute:()=>Ele,Uint8ClampedBufferAttribute:()=>sw,Uniform:()=>zw,UniformsLib:()=>Ue,UniformsUtils:()=>vH,UnsignedByteType:()=>Ka,UnsignedInt248Type:()=>Cp,UnsignedIntType:()=>Dg,UnsignedShort4444Type:()=>_4,UnsignedShort5551Type:()=>v4,UnsignedShort565Type:()=>b4,UnsignedShortType:()=>Bg,VSMShadowMap:()=>bp,Vector2:()=>xe,Vector3:()=>R,Vector4:()=>Cn,VectorKeyframeTrack:()=>su,Vertex:()=>wle,VertexColors:()=>ple,VideoTexture:()=>mw,WebGL1Renderer:()=>hw,WebGLCubeRenderTarget:()=>Rp,WebGLMultipleRenderTargets:()=>iw,WebGLMultisampleRenderTarget:()=>Gg,WebGLRenderTarget:()=>yo,WebGLRenderTargetCube:()=>Vle,WebGLRenderer:()=>An,WebGLUtils:()=>PH,WireframeGeometry:()=>m_,WireframeHelper:()=>Lle,WrapAroundEnding:()=>Ug,XHRLoader:()=>Fle,ZeroCurvatureEnding:()=>Hd,ZeroFactor:()=>WU,ZeroSlopeEnding:()=>Gd,ZeroStencilOp:()=>sne,sRGBEncoding:()=>gc});var zP="134",Xte={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Zte={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},VU=0,YD=1,zU=2,Qte=3,Kte=0,UP=1,UU=2,bp=3,Yd=0,bi=1,Xd=2,HP=1,Jte=2,Za=0,wp=1,XD=2,ZD=3,QD=4,HU=5,Ud=100,GU=101,jU=102,KD=103,JD=104,WU=200,$U=201,qU=202,YU=203,GP=204,jP=205,XU=206,ZU=207,QU=208,KU=209,JU=210,e4=0,t4=1,n4=2,ew=3,i4=4,r4=5,o4=6,s4=7,F_=0,a4=1,l4=2,oc=0,c4=1,d4=2,u4=3,h4=4,p4=5,Yw=300,uu=301,hu=302,Ng=303,kg=304,Qp=306,B_=307,Lg=1e3,ir=1001,Fg=1002,Ei=1003,tw=1004,ene=1004,nw=1005,tne=1005,Fi=1006,WP=1007,nne=1007,pu=1008,ine=1008,Ka=1009,f4=1010,m4=1011,Bg=1012,g4=1013,Dg=1014,Js=1015,jd=1016,_4=1017,v4=1018,b4=1019,Cp=1020,y4=1021,Wd=1022,rr=1023,x4=1024,w4=1025,C4=rr,$d=1026,Mp=1027,S4=1028,M4=1029,E4=1030,I4=1031,T4=1032,D4=1033,eP=33776,tP=33777,nP=33778,iP=33779,rP=35840,oP=35841,sP=35842,aP=35843,P4=36196,lP=37492,cP=37496,O4=37808,R4=37809,A4=37810,N4=37811,k4=37812,L4=37813,F4=37814,B4=37815,V4=37816,z4=37817,U4=37818,H4=37819,G4=37820,j4=37821,W4=36492,$4=37840,q4=37841,Y4=37842,X4=37843,Z4=37844,Q4=37845,K4=37846,J4=37847,eH=37848,tH=37849,nH=37850,iH=37851,rH=37852,oH=37853,sH=2200,aH=2201,lH=2202,Vg=2300,zg=2301,Kx=2302,Hd=2400,Gd=2401,Ug=2402,Xw=2500,$P=2501,cH=0,rne=1,one=2,sr=3e3,gc=3001,Zw=3007,Qw=3002,dH=3003,qP=3004,YP=3005,XP=3006,uH=3200,hH=3201,fu=0,pH=1,sne=0,Jx=7680,ane=7681,lne=7682,cne=7683,dne=34055,une=34056,hne=5386,pne=512,fne=513,mne=514,gne=515,_ne=516,vne=517,bne=518,fH=519,Ep=35044,Ip=35048,yne=35040,xne=35045,wne=35049,Cne=35041,Sne=35046,Mne=35050,Ene=35042,Ine="100",dP="300 es",ta=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let r=this._listeners[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let n=this._listeners[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,s=r.length;o>8&255]+tr[i>>16&255]+tr[i>>24&255]+"-"+tr[e&255]+tr[e>>8&255]+"-"+tr[e>>16&15|64]+tr[e>>24&255]+"-"+tr[t&63|128]+tr[t>>8&255]+"-"+tr[t>>16&255]+tr[t>>24&255]+tr[n&255]+tr[n>>8&255]+tr[n>>16&255]+tr[n>>24&255]).toUpperCase()}function nr(i,e,t){return Math.max(e,Math.min(t,i))}function ZP(i,e){return(i%e+e)%e}function Dne(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function Pne(i,e,t){return i!==e?(t-i)/(e-i):0}function Pg(i,e,t){return(1-t)*i+t*e}function One(i,e,t,n){return Pg(i,e,1-Math.exp(-t*n))}function Rne(i,e=1){return e-Math.abs(ZP(i,e*2)-e)}function Ane(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function Nne(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function kne(i,e){return i+Math.floor(Math.random()*(e-i+1))}function Lne(i,e){return i+Math.random()*(e-i)}function Fne(i){return i*(.5-Math.random())}function Bne(i){return i!==void 0&&(ux=i%2147483647),ux=ux*16807%2147483647,(ux-1)/2147483646}function Vne(i){return i*qd}function zne(i){return i*Hg}function uP(i){return(i&i-1)===0&&i!==0}function mH(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function gH(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function Une(i,e,t,n,r){let o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),c=o((e+n)/2),d=s((e+n)/2),u=o((e-n)/2),h=s((e-n)/2),p=o((n-e)/2),f=s((n-e)/2);switch(r){case"XYX":i.set(a*d,l*u,l*h,a*c);break;case"YZY":i.set(l*h,a*d,l*u,a*c);break;case"ZXZ":i.set(l*u,l*h,a*d,a*c);break;case"XZX":i.set(a*d,l*f,l*p,a*c);break;case"YXY":i.set(l*p,a*d,l*f,a*c);break;case"ZYZ":i.set(l*f,l*p,a*d,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}var Hne=Object.freeze({__proto__:null,DEG2RAD:qd,RAD2DEG:Hg,generateUUID:bo,clamp:nr,euclideanModulo:ZP,mapLinear:Dne,inverseLerp:Pne,lerp:Pg,damp:One,pingpong:Rne,smoothstep:Ane,smootherstep:Nne,randInt:kne,randFloat:Lne,randFloatSpread:Fne,seededRandom:Bne,degToRad:Vne,radToDeg:zne,isPowerOfTwo:uP,ceilPowerOfTwo:mH,floorPowerOfTwo:gH,setQuaternionFromProperEuler:Une}),xe=class{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*n-s*r+e.x,this.y=o*r+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};xe.prototype.isVector2=!0;var yi=class{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,o,s,a,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=o,d[5]=l,d[6]=n,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[3],l=n[6],c=n[1],d=n[4],u=n[7],h=n[2],p=n[5],f=n[8],m=r[0],b=r[3],g=r[6],_=r[1],x=r[4],C=r[7],T=r[2],D=r[5],E=r[8];return o[0]=s*m+a*_+l*T,o[3]=s*b+a*x+l*D,o[6]=s*g+a*C+l*E,o[1]=c*m+d*_+u*T,o[4]=c*b+d*x+u*D,o[7]=c*g+d*C+u*E,o[2]=h*m+p*_+f*T,o[5]=h*b+p*x+f*D,o[8]=h*g+p*C+f*E,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*s*d-t*a*c-n*o*d+n*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=d*s-a*c,h=a*l-d*o,p=c*o-s*l,f=t*u+n*h+r*p;if(f===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/f;return e[0]=u*m,e[1]=(r*c-d*n)*m,e[2]=(a*n-r*s)*m,e[3]=h*m,e[4]=(d*t-r*l)*m,e[5]=(r*o-a*t)*m,e[6]=p*m,e[7]=(n*l-c*t)*m,e[8]=(s*t-n*o)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*s+c*a)+s+e,-r*c,r*l,-r*(-c*s+l*a)+a+t,0,0,1),this}scale(e,t){let n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){let t=Math.cos(e),n=Math.sin(e),r=this.elements,o=r[0],s=r[3],a=r[6],l=r[1],c=r[4],d=r[7];return r[0]=t*o+n*l,r[3]=t*s+n*c,r[6]=t*a+n*d,r[1]=-n*o+t*l,r[4]=-n*s+t*c,r[7]=-n*a+t*d,this}translate(e,t){let n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}};yi.prototype.isMatrix3=!0;function _H(i){if(i.length===0)return-1/0;let e=i[0];for(let t=1,n=i.length;te&&(e=i[t]);return e}var Gne={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function yp(i,e){return new Gne[i](e)}function Kw(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function mz(i,e=0){let t=3735928559^e,n=1103547991^e;for(let r=0,o;r>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&n)+(t>>>0)}var ep,Ja=class{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{ep===void 0&&(ep=Kw("canvas")),ep.width=e.width,ep.height=e.height;let n=ep.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=ep}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}},jne=0,Gi=class i extends ta{constructor(e=i.DEFAULT_IMAGE,t=i.DEFAULT_MAPPING,n=ir,r=ir,o=Fi,s=pu,a=rr,l=Ka,c=1,d=sr){super(),Object.defineProperty(this,"id",{value:jne++}),this.uuid=bo(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=o,this.minFilter=s,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new yi,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=d,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(this.image!==void 0){let r=this.image;if(r.uuid===void 0&&(r.uuid=bo()),!t&&e.images[r.uuid]===void 0){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s1)switch(this.wrapS){case Lg:e.x=e.x-Math.floor(e.x);break;case ir:e.x=e.x<0?0:1;break;case Fg:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Lg:e.y=e.y-Math.floor(e.y);break;case ir:e.y=e.y<0?0:1;break;case Fg:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&this.version++}};Gi.DEFAULT_IMAGE=void 0;Gi.DEFAULT_MAPPING=Yw;Gi.prototype.isTexture=!0;function pD(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?Ja.getDataURL(i):i.data?{data:Array.prototype.slice.call(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var Cn=class{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*n+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*n+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*n+s[11]*r+s[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],h=l[1],p=l[5],f=l[9],m=l[2],b=l[6],g=l[10];if(Math.abs(d-h)<.01&&Math.abs(u-m)<.01&&Math.abs(f-b)<.01){if(Math.abs(d+h)<.1&&Math.abs(u+m)<.1&&Math.abs(f+b)<.1&&Math.abs(c+p+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let x=(c+1)/2,C=(p+1)/2,T=(g+1)/2,D=(d+h)/4,E=(u+m)/4,P=(f+b)/4;return x>C&&x>T?x<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(x),r=D/n,o=E/n):C>T?C<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(C),n=D/r,o=P/r):T<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(T),n=E/o,r=P/o),this.set(n,r,o,t),this}let _=Math.sqrt((b-f)*(b-f)+(u-m)*(u-m)+(h-d)*(h-d));return Math.abs(_)<.001&&(_=1),this.x=(b-f)/_,this.y=(u-m)/_,this.z=(h-d)/_,this.w=Math.acos((c+p+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};Cn.prototype.isVector4=!0;var yo=class extends ta{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new Cn(0,0,e,t),this.scissorTest=!1,this.viewport=new Cn(0,0,e,t),this.texture=new Gi(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:e,height:t,depth:1},this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Fi,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,t,n=1){(this.width!==e||this.height!==t||this.depth!==n)&&(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image=Z({},this.texture.image),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}};yo.prototype.isWebGLRenderTarget=!0;var iw=class extends yo{constructor(e,t,n){super(e,t);let r=this.texture;this.texture=[];for(let o=0;o=0?1:-1,x=1-g*g;if(x>Number.EPSILON){let T=Math.sqrt(x),D=Math.atan2(T,g*_);b=Math.sin(b*D)/T,a=Math.sin(a*D)/T}let C=a*_;if(l=l*b+h*C,c=c*b+p*C,d=d*b+f*C,u=u*b+m*C,b===1-a){let T=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=T,c*=T,d*=T,u*=T}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,o,s){let a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],u=o[s],h=o[s+1],p=o[s+2],f=o[s+3];return e[t]=a*f+d*u+l*p-c*h,e[t+1]=l*f+d*h+c*u-a*p,e[t+2]=c*f+d*p+a*h-l*u,e[t+3]=d*f-a*u-l*h-c*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!(e&&e.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let n=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(r/2),u=a(o/2),h=l(n/2),p=l(r/2),f=l(o/2);switch(s){case"XYZ":this._x=h*d*u+c*p*f,this._y=c*p*u-h*d*f,this._z=c*d*f+h*p*u,this._w=c*d*u-h*p*f;break;case"YXZ":this._x=h*d*u+c*p*f,this._y=c*p*u-h*d*f,this._z=c*d*f-h*p*u,this._w=c*d*u+h*p*f;break;case"ZXY":this._x=h*d*u-c*p*f,this._y=c*p*u+h*d*f,this._z=c*d*f+h*p*u,this._w=c*d*u-h*p*f;break;case"ZYX":this._x=h*d*u-c*p*f,this._y=c*p*u+h*d*f,this._z=c*d*f-h*p*u,this._w=c*d*u+h*p*f;break;case"YZX":this._x=h*d*u+c*p*f,this._y=c*p*u+h*d*f,this._z=c*d*f-h*p*u,this._w=c*d*u-h*p*f;break;case"XZY":this._x=h*d*u-c*p*f,this._y=c*p*u-h*d*f,this._z=c*d*f+h*p*u,this._w=c*d*u+h*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],d=t[6],u=t[10],h=n+a+u;if(h>0){let p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(d-l)*p,this._y=(o-c)*p,this._z=(s-r)*p}else if(n>a&&n>u){let p=2*Math.sqrt(1+n-a-u);this._w=(d-l)/p,this._x=.25*p,this._y=(r+s)/p,this._z=(o+c)/p}else if(a>u){let p=2*Math.sqrt(1+a-n-u);this._w=(o-c)/p,this._x=(r+s)/p,this._y=.25*p,this._z=(l+d)/p}else{let p=2*Math.sqrt(1+u-n-a);this._w=(s-r)/p,this._x=(o+c)/p,this._y=(l+d)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(nr(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return t!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-n*c,this._z=o*d+s*c+n*l-r*a,this._w=s*d-n*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let n=this._x,r=this._y,o=this._z,s=this._w,a=s*e._w+n*e._x+r*e._y+o*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=n,this._y=r,this._z=o,this;let l=1-a*a;if(l<=Number.EPSILON){let p=1-t;return this._w=p*s+t*this._w,this._x=p*n+t*this._x,this._y=p*r+t*this._y,this._z=p*o+t*this._z,this.normalize(),this._onChangeCallback(),this}let c=Math.sqrt(l),d=Math.atan2(c,a),u=Math.sin((1-t)*d)/c,h=Math.sin(t*d)/c;return this._w=s*u+this._w*h,this._x=n*u+this._x*h,this._y=r*u+this._y*h,this._z=o*u+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,n){this.copy(e).slerp(t,n)}random(){let e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(o),n*Math.cos(o),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};Bi.prototype.isQuaternion=!0;var R=class{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(gz.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(gz.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*r,this.y=o[1]*t+o[4]*n+o[7]*r,this.z=o[2]*t+o[5]*n+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*n+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*n+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=l*t+s*r-a*n,d=l*n+a*t-o*r,u=l*r+o*n-s*t,h=-o*t-s*n-a*r;return this.x=c*l+h*-o+d*-a-u*-s,this.y=d*l+h*-s+u*-o-c*-a,this.z=u*l+h*-a+c*-s-d*-o,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r,this.y=o[1]*t+o[5]*n+o[9]*r,this.z=o[2]*t+o[6]*n+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return t!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=r*l-o*a,this.y=o*s-n*l,this.z=n*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return fD.copy(this).projectOnVector(e),this.sub(fD)}reflect(e){return this.sub(fD.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(nr(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};R.prototype.isVector3=!0;var fD=new R,gz=new Bi,Ur=class{constructor(e=new R(1/0,1/0,1/0),t=new R(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,c=e.length;lo&&(o=d),u>s&&(s=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(o,s,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,c=e.count;lo&&(o=d),u>s&&(s=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(o,s,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,vg),vg.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(bg),hx.subVectors(this.max,bg),tp.subVectors(e.a,bg),np.subVectors(e.b,bg),ip.subVectors(e.c,bg),Ql.subVectors(np,tp),Kl.subVectors(ip,np),Ad.subVectors(tp,ip);let t=[0,-Ql.z,Ql.y,0,-Kl.z,Kl.y,0,-Ad.z,Ad.y,Ql.z,0,-Ql.x,Kl.z,0,-Kl.x,Ad.z,0,-Ad.x,-Ql.y,Ql.x,0,-Kl.y,Kl.x,0,-Ad.y,Ad.x,0];return!gD(t,tp,np,ip,hx)||(t=[1,0,0,0,1,0,0,0,1],!gD(t,tp,np,ip,hx))?!1:(px.crossVectors(Ql,Kl),t=[px.x,px.y,px.z],gD(t,tp,np,ip,hx))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return vg.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=this.getSize(vg).length()*.5,e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Ga[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ga[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ga[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ga[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ga[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ga[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ga[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ga[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ga),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};Ur.prototype.isBox3=!0;var Ga=[new R,new R,new R,new R,new R,new R,new R,new R],vg=new R,mD=new Ur,tp=new R,np=new R,ip=new R,Ql=new R,Kl=new R,Ad=new R,bg=new R,hx=new R,px=new R,Nd=new R;function gD(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){Nd.fromArray(i,o);let a=r.x*Math.abs(Nd.x)+r.y*Math.abs(Nd.y)+r.z*Math.abs(Nd.z),l=e.dot(Nd),c=t.dot(Nd),d=n.dot(Nd);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var Wne=new Ur,_z=new R,_D=new R,vD=new R,na=class{constructor(e=new R,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t!==void 0?n.copy(t):Wne.setFromPoints(e).getCenter(n);let r=0;for(let o=0,s=e.length;othis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){vD.subVectors(e,this.center);let t=vD.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.add(vD.multiplyScalar(r/n)),this.radius+=r}return this}union(e){return _D.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(_z.copy(e.center).add(_D)),this.expandByPoint(_z.copy(e.center).sub(_D)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}},ja=new R,bD=new R,fx=new R,Jl=new R,yD=new R,mx=new R,xD=new R,ia=class{constructor(e=new R,t=new R(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ja)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=ja.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ja.copy(this.direction).multiplyScalar(t).add(this.origin),ja.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){bD.copy(e).add(t).multiplyScalar(.5),fx.copy(t).sub(e).normalize(),Jl.copy(this.origin).sub(bD);let o=e.distanceTo(t)*.5,s=-this.direction.dot(fx),a=Jl.dot(this.direction),l=-Jl.dot(fx),c=Jl.lengthSq(),d=Math.abs(1-s*s),u,h,p,f;if(d>0)if(u=s*l-a,h=s*a-l,f=o*d,u>=0)if(h>=-f)if(h<=f){let m=1/d;u*=m,h*=m,p=u*(u+s*h+2*a)+h*(s*u+h+2*l)+c}else h=o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*l)+c;else h=-o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*l)+c;else h<=-f?(u=Math.max(0,-(-s*o+a)),h=u>0?-o:Math.min(Math.max(-o,-l),o),p=-u*u+h*(h+2*l)+c):h<=f?(u=0,h=Math.min(Math.max(-o,-l),o),p=h*(h+2*l)+c):(u=Math.max(0,-(s*o+a)),h=u>0?o:Math.min(Math.max(-o,-l),o),p=-u*u+h*(h+2*l)+c);else h=s>0?-o:o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*l)+c;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(fx).multiplyScalar(h).add(bD),p}intersectSphere(e,t){ja.subVectors(e.center,this.origin);let n=ja.dot(this.direction),r=ja.dot(ja)-n*n,o=e.radius*e.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=n-s,l=n+s;return a<0&&l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,o,s,a,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,h=this.origin;return c>=0?(n=(e.min.x-h.x)*c,r=(e.max.x-h.x)*c):(n=(e.max.x-h.x)*c,r=(e.min.x-h.x)*c),d>=0?(o=(e.min.y-h.y)*d,s=(e.max.y-h.y)*d):(o=(e.max.y-h.y)*d,s=(e.min.y-h.y)*d),n>s||o>r||((o>n||n!==n)&&(n=o),(s=0?(a=(e.min.z-h.z)*u,l=(e.max.z-h.z)*u):(a=(e.max.z-h.z)*u,l=(e.min.z-h.z)*u),n>l||a>r)||((a>n||n!==n)&&(n=a),(l=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,ja)!==null}intersectTriangle(e,t,n,r,o){yD.subVectors(t,e),mx.subVectors(n,e),xD.crossVectors(yD,mx);let s=this.direction.dot(xD),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;Jl.subVectors(this.origin,e);let l=a*this.direction.dot(mx.crossVectors(Jl,mx));if(l<0)return null;let c=a*this.direction.dot(yD.cross(Jl));if(c<0||l+c>s)return null;let d=-a*Jl.dot(xD);return d<0?null:this.at(d/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},lt=class i{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,o,s,a,l,c,d,u,h,p,f,m,b){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=o,g[5]=s,g[9]=a,g[13]=l,g[2]=c,g[6]=d,g[10]=u,g[14]=h,g[3]=p,g[7]=f,g[11]=m,g[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new i().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,n=e.elements,r=1/rp.setFromMatrixColumn(e,0).length(),o=1/rp.setFromMatrixColumn(e,1).length(),s=1/rp.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let t=this.elements,n=e.x,r=e.y,o=e.z,s=Math.cos(n),a=Math.sin(n),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(e.order==="XYZ"){let h=s*d,p=s*u,f=a*d,m=a*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=p+f*c,t[5]=h-m*c,t[9]=-a*l,t[2]=m-h*c,t[6]=f+p*c,t[10]=s*l}else if(e.order==="YXZ"){let h=l*d,p=l*u,f=c*d,m=c*u;t[0]=h+m*a,t[4]=f*a-p,t[8]=s*c,t[1]=s*u,t[5]=s*d,t[9]=-a,t[2]=p*a-f,t[6]=m+h*a,t[10]=s*l}else if(e.order==="ZXY"){let h=l*d,p=l*u,f=c*d,m=c*u;t[0]=h-m*a,t[4]=-s*u,t[8]=f+p*a,t[1]=p+f*a,t[5]=s*d,t[9]=m-h*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let h=s*d,p=s*u,f=a*d,m=a*u;t[0]=l*d,t[4]=f*c-p,t[8]=h*c+m,t[1]=l*u,t[5]=m*c+h,t[9]=p*c-f,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let h=s*l,p=s*c,f=a*l,m=a*c;t[0]=l*d,t[4]=m-h*u,t[8]=f*u+p,t[1]=u,t[5]=s*d,t[9]=-a*d,t[2]=-c*d,t[6]=p*u+f,t[10]=h-m*u}else if(e.order==="XZY"){let h=s*l,p=s*c,f=a*l,m=a*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=h*u+m,t[5]=s*d,t[9]=p*u-f,t[2]=f*u-p,t[6]=a*d,t[10]=m*u+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose($ne,e,qne)}lookAt(e,t,n){let r=this.elements;return _o.subVectors(e,t),_o.lengthSq()===0&&(_o.z=1),_o.normalize(),ec.crossVectors(n,_o),ec.lengthSq()===0&&(Math.abs(n.z)===1?_o.x+=1e-4:_o.z+=1e-4,_o.normalize(),ec.crossVectors(n,_o)),ec.normalize(),gx.crossVectors(_o,ec),r[0]=ec.x,r[4]=gx.x,r[8]=_o.x,r[1]=ec.y,r[5]=gx.y,r[9]=_o.y,r[2]=ec.z,r[6]=gx.z,r[10]=_o.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[4],l=n[8],c=n[12],d=n[1],u=n[5],h=n[9],p=n[13],f=n[2],m=n[6],b=n[10],g=n[14],_=n[3],x=n[7],C=n[11],T=n[15],D=r[0],E=r[4],P=r[8],Y=r[12],$=r[1],U=r[5],O=r[9],B=r[13],j=r[2],q=r[6],k=r[10],G=r[14],K=r[3],de=r[7],Te=r[11],Ee=r[15];return o[0]=s*D+a*$+l*j+c*K,o[4]=s*E+a*U+l*q+c*de,o[8]=s*P+a*O+l*k+c*Te,o[12]=s*Y+a*B+l*G+c*Ee,o[1]=d*D+u*$+h*j+p*K,o[5]=d*E+u*U+h*q+p*de,o[9]=d*P+u*O+h*k+p*Te,o[13]=d*Y+u*B+h*G+p*Ee,o[2]=f*D+m*$+b*j+g*K,o[6]=f*E+m*U+b*q+g*de,o[10]=f*P+m*O+b*k+g*Te,o[14]=f*Y+m*B+b*G+g*Ee,o[3]=_*D+x*$+C*j+T*K,o[7]=_*E+x*U+C*q+T*de,o[11]=_*P+x*O+C*k+T*Te,o[15]=_*Y+x*B+C*G+T*Ee,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],d=e[2],u=e[6],h=e[10],p=e[14],f=e[3],m=e[7],b=e[11],g=e[15];return f*(+o*l*u-r*c*u-o*a*h+n*c*h+r*a*p-n*l*p)+m*(+t*l*p-t*c*h+o*s*h-r*s*p+r*c*d-o*l*d)+b*(+t*c*u-t*a*p-o*s*u+n*s*p+o*a*d-n*c*d)+g*(-r*a*d-t*l*u+t*a*h+r*s*u-n*s*h+n*l*d)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],h=e[10],p=e[11],f=e[12],m=e[13],b=e[14],g=e[15],_=u*b*c-m*h*c+m*l*p-a*b*p-u*l*g+a*h*g,x=f*h*c-d*b*c-f*l*p+s*b*p+d*l*g-s*h*g,C=d*m*c-f*u*c+f*a*p-s*m*p-d*a*g+s*u*g,T=f*u*l-d*m*l-f*a*h+s*m*h+d*a*b-s*u*b,D=t*_+n*x+r*C+o*T;if(D===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let E=1/D;return e[0]=_*E,e[1]=(m*h*o-u*b*o-m*r*p+n*b*p+u*r*g-n*h*g)*E,e[2]=(a*b*o-m*l*o+m*r*c-n*b*c-a*r*g+n*l*g)*E,e[3]=(u*l*o-a*h*o-u*r*c+n*h*c+a*r*p-n*l*p)*E,e[4]=x*E,e[5]=(d*b*o-f*h*o+f*r*p-t*b*p-d*r*g+t*h*g)*E,e[6]=(f*l*o-s*b*o-f*r*c+t*b*c+s*r*g-t*l*g)*E,e[7]=(s*h*o-d*l*o+d*r*c-t*h*c-s*r*p+t*l*p)*E,e[8]=C*E,e[9]=(f*u*o-d*m*o-f*n*p+t*m*p+d*n*g-t*u*g)*E,e[10]=(s*m*o-f*a*o+f*n*c-t*m*c-s*n*g+t*a*g)*E,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*p-t*a*p)*E,e[12]=T*E,e[13]=(d*m*r-f*u*r+f*n*h-t*m*h-d*n*b+t*u*b)*E,e[14]=(f*a*r-s*m*r-f*n*l+t*m*l+s*n*b-t*a*b)*E,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*h+t*a*h)*E,this}scale(e){let t=this.elements,n=e.x,r=e.y,o=e.z;return t[0]*=n,t[4]*=r,t[8]*=o,t[1]*=n,t[5]*=r,t[9]*=o,t[2]*=n,t[6]*=r,t[10]*=o,t[3]*=n,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),o=1-n,s=e.x,a=e.y,l=e.z,c=o*s,d=o*a;return this.set(c*s+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,o,s){return this.set(1,n,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,d=s+s,u=a+a,h=o*c,p=o*d,f=o*u,m=s*d,b=s*u,g=a*u,_=l*c,x=l*d,C=l*u,T=n.x,D=n.y,E=n.z;return r[0]=(1-(m+g))*T,r[1]=(p+C)*T,r[2]=(f-x)*T,r[3]=0,r[4]=(p-C)*D,r[5]=(1-(h+g))*D,r[6]=(b+_)*D,r[7]=0,r[8]=(f+x)*E,r[9]=(b-_)*E,r[10]=(1-(h+m))*E,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements,o=rp.set(r[0],r[1],r[2]).length(),s=rp.set(r[4],r[5],r[6]).length(),a=rp.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),e.x=r[12],e.y=r[13],e.z=r[14],_s.copy(this);let c=1/o,d=1/s,u=1/a;return _s.elements[0]*=c,_s.elements[1]*=c,_s.elements[2]*=c,_s.elements[4]*=d,_s.elements[5]*=d,_s.elements[6]*=d,_s.elements[8]*=u,_s.elements[9]*=u,_s.elements[10]*=u,t.setFromRotationMatrix(_s),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let a=this.elements,l=2*o/(t-e),c=2*o/(n-r),d=(t+e)/(t-e),u=(n+r)/(n-r),h=-(s+o)/(s-o),p=-2*s*o/(s-o);return a[0]=l,a[4]=0,a[8]=d,a[12]=0,a[1]=0,a[5]=c,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,o,s){let a=this.elements,l=1/(t-e),c=1/(n-r),d=1/(s-o),u=(t+e)*l,h=(n+r)*c,p=(s+o)*d;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*d,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}};lt.prototype.isMatrix4=!0;var rp=new R,_s=new lt,$ne=new R(0,0,0),qne=new R(1,1,1),ec=new R,gx=new R,_o=new R,vz=new lt,bz=new Bi,Zd=class i{constructor(e=0,t=0,n=0,r=i.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){let r=e.elements,o=r[0],s=r[4],a=r[8],l=r[1],c=r[5],d=r[9],u=r[2],h=r[6],p=r[10];switch(t){case"XYZ":this._y=Math.asin(nr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,p),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-nr(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,o),this._z=0);break;case"ZXY":this._x=Math.asin(nr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,p),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-nr(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(nr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-u,o)):(this._x=0,this._y=Math.atan2(a,p));break;case"XZY":this._z=Math.asin(-nr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-d,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return vz.makeRotationFromQuaternion(e),this.setFromRotationMatrix(vz,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return bz.setFromEuler(this),this.setFromQuaternion(bz,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new R(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};Zd.prototype.isEuler=!0;Zd.DefaultOrder="XYZ";Zd.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var jg=class{constructor(){this.mask=1}set(e){this.mask=1<1){for(let t=0;t1){for(let n=0;n0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),d.length>0&&(n.images=d),u.length>0&&(n.shapes=u),h.length>0&&(n.skeletons=h),p.length>0&&(n.animations=p)}return n.object=r,n;function s(a){let l=[];for(let c in a){let d=a[c];delete d.metadata,l.push(d)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){vs.subVectors(r,t),$a.subVectors(n,t),wD.subVectors(e,t);let s=vs.dot(vs),a=vs.dot($a),l=vs.dot(wD),c=$a.dot($a),d=$a.dot(wD),u=s*c-a*a;if(u===0)return o.set(-2,-1,-1);let h=1/u,p=(c*l-a*d)*h,f=(s*d-a*l)*h;return o.set(1-p-f,f,p)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,qa),qa.x>=0&&qa.y>=0&&qa.x+qa.y<=1}static getUV(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,qa),l.set(0,0),l.addScaledVector(o,qa.x),l.addScaledVector(s,qa.y),l.addScaledVector(a,qa.z),l}static isFrontFacing(e,t,n,r){return vs.subVectors(n,t),$a.subVectors(e,t),vs.cross($a).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return vs.subVectors(this.c,this.b),$a.subVectors(this.a,this.b),vs.cross($a).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return i.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,o){return i.getUV(e,this.a,this.b,this.c,t,n,r,o)}containsPoint(e){return i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,o=this.c,s,a;sp.subVectors(r,n),ap.subVectors(o,n),CD.subVectors(e,n);let l=sp.dot(CD),c=ap.dot(CD);if(l<=0&&c<=0)return t.copy(n);SD.subVectors(e,r);let d=sp.dot(SD),u=ap.dot(SD);if(d>=0&&u<=d)return t.copy(r);let h=l*u-d*c;if(h<=0&&l>=0&&d<=0)return s=l/(l-d),t.copy(n).addScaledVector(sp,s);MD.subVectors(e,o);let p=sp.dot(MD),f=ap.dot(MD);if(f>=0&&p<=f)return t.copy(o);let m=p*c-l*f;if(m<=0&&c>=0&&f<=0)return a=c/(c-f),t.copy(n).addScaledVector(ap,a);let b=d*f-p*u;if(b<=0&&u-d>=0&&p-f>=0)return Mz.subVectors(o,r),a=(u-d)/(u-d+(p-f)),t.copy(r).addScaledVector(Mz,a);let g=1/(b+m+h);return s=m*g,a=h*g,t.copy(n).addScaledVector(sp,s).addScaledVector(ap,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},Kne=0,Ii=class extends ta{constructor(){super(),Object.defineProperty(this,"id",{value:Kne++}),this.uuid=bo(),this.name="",this.type="Material",this.fog=!0,this.blending=wp,this.side=Yd,this.vertexColors=!1,this.opacity=1,this.format=rr,this.transparent=!1,this.blendSrc=GP,this.blendDst=jP,this.blendEquation=Ud,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=ew,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=fH,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Jx,this.stencilZFail=Jx,this.stencilZPass=Jx,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if(t==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===HP;continue}let r=this[t];if(r===void 0){console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.");continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==wp&&(n.blending=this.blending),this.side!==Yd&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.format!==rr&&(n.format=this.format),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData);function r(o){let s=[];for(let a in o){let l=o[a];delete l.metadata,s.push(l)}return s}if(t){let o=r(e.textures),s=r(e.images);o.length>0&&(n.textures=o),s.length>0&&(n.images=s)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.format=e.format,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let r=t.length;n=new Array(r);for(let o=0;o!==r;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}};Ii.prototype.isMaterial=!0;var Ez={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},bs={h:0,s:0,l:0},vx={h:0,s:0,l:0};function ED(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}function ID(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function TD(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var je=(()=>{class i{constructor(t,n,r){return n===void 0&&r===void 0?this.set(t):this.setRGB(t,n,r)}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this}setRGB(t,n,r){return this.r=t,this.g=n,this.b=r,this}setHSL(t,n,r){if(t=ZP(t,1),n=nr(n,0,1),r=nr(r,0,1),n===0)this.r=this.g=this.b=r;else{let o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=ED(s,o,t+1/3),this.g=ED(s,o,t),this.b=ED(s,o,t-1/3)}return this}setStyle(t){function n(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let o,s=r[1],a=r[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(o[1],10))/255,this.g=Math.min(255,parseInt(o[2],10))/255,this.b=Math.min(255,parseInt(o[3],10))/255,n(o[4]),this;if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(o[1],10))/100,this.g=Math.min(100,parseInt(o[2],10))/100,this.b=Math.min(100,parseInt(o[3],10))/100,n(o[4]),this;break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){let l=parseFloat(o[1])/360,c=parseInt(o[2],10)/100,d=parseInt(o[3],10)/100;return n(o[4]),this.setHSL(l,c,d)}break}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){let o=r[1],s=o.length;if(s===3)return this.r=parseInt(o.charAt(0)+o.charAt(0),16)/255,this.g=parseInt(o.charAt(1)+o.charAt(1),16)/255,this.b=parseInt(o.charAt(2)+o.charAt(2),16)/255,this;if(s===6)return this.r=parseInt(o.charAt(0)+o.charAt(1),16)/255,this.g=parseInt(o.charAt(2)+o.charAt(3),16)/255,this.b=parseInt(o.charAt(4)+o.charAt(5),16)/255,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){let n=Ez[t.toLowerCase()];return n!==void 0?this.setHex(n):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copyGammaToLinear(t,n=2){return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this}copyLinearToGamma(t,n=2){let r=n>0?1/n:1;return this.r=Math.pow(t.r,r),this.g=Math.pow(t.g,r),this.b=Math.pow(t.b,r),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.r=ID(t.r),this.g=ID(t.g),this.b=ID(t.b),this}copyLinearToSRGB(t){return this.r=TD(t.r),this.g=TD(t.g),this.b=TD(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(t){let n=this.r,r=this.g,o=this.b,s=Math.max(n,r,o),a=Math.min(n,r,o),l,c,d=(a+s)/2;if(a===s)l=0,c=0;else{let u=s-a;switch(c=d<=.5?u/(s+a):u/(2-s-a),s){case n:l=(r-o)/u+(r65535?Dp:Tp)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new yi().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return Wo.makeRotationFromQuaternion(e),this.applyMatrix4(Wo),this}rotateX(e){return Wo.makeRotationX(e),this.applyMatrix4(Wo),this}rotateY(e){return Wo.makeRotationY(e),this.applyMatrix4(Wo),this}rotateZ(e){return Wo.makeRotationZ(e),this.applyMatrix4(Wo),this}translate(e,t,n){return Wo.makeTranslation(e,t,n),this.applyMatrix4(Wo),this}scale(e,t,n){return Wo.makeScale(e,t,n),this.applyMatrix4(Wo),this}lookAt(e){return DD.lookAt(e),DD.updateMatrix(),this.applyMatrix4(DD.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(lp).negate(),this.translate(lp.x,lp.y,lp.z),this}setFromPoints(e){let t=[];for(let n=0,r=e.length;n0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let l in n){let c=n[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,h=c.length;u0&&(r[l]=d,o=!0)}o&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone(t));let r=e.attributes;for(let c in r){let d=r[c];this.setAttribute(c,d.clone(t))}let o=e.morphAttributes;for(let c in o){let d=[],u=o[c];for(let h=0,p=u.length;h0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;if(r===void 0||(n.boundingSphere===null&&n.computeBoundingSphere(),PD.copy(n.boundingSphere),PD.applyMatrix4(o),e.ray.intersectsSphere(PD)===!1)||(Iz.copy(o).invert(),cp.copy(e.ray).applyMatrix4(Iz),n.boundingBox!==null&&cp.intersectsBox(n.boundingBox)===!1))return;let s;if(n.isBufferGeometry){let a=n.index,l=n.attributes.position,c=n.morphAttributes.position,d=n.morphTargetsRelative,u=n.attributes.uv,h=n.attributes.uv2,p=n.groups,f=n.drawRange;if(a!==null)if(Array.isArray(r))for(let m=0,b=p.length;mt.far?null:{distance:c,point:Ex.clone(),object:i}}function Ix(i,e,t,n,r,o,s,a,l,c,d,u){tc.fromBufferAttribute(r,c),nc.fromBufferAttribute(r,d),ic.fromBufferAttribute(r,u);let h=i.morphTargetInfluences;if(o&&h){yx.set(0,0,0),xx.set(0,0,0),wx.set(0,0,0);for(let f=0,m=o.length;f0?1:-1,d.push(de.x,de.y,de.z),u.push(He/E),u.push(1-Te/P),G+=1}}for(let Te=0;Te0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;let n={};for(let r in this.extensions)this.extensions[r]===!0&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}};ws.prototype.isShaderMaterial=!0;var Qd=class extends hn{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new lt,this.projectionMatrix=new lt,this.projectionMatrixInverse=new lt}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};Qd.prototype.isCamera=!0;var Mi=class extends Qd{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=Ug*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(qd*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ug*2*Math.atan(Math.tan(qd*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,o,s){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(qd*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,o=-.5*r,s=this.view;if(this.view!==null&&this.view.enabled){let l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*r/l,t-=s.offsetY*n/c,r*=s.width/l,n*=s.height/c}let a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}};Mi.prototype.isPerspectiveCamera=!0;var dp=90,up=1,Op=class extends hn{constructor(e,t,n){if(super(),this.type="CubeCamera",n.isWebGLCubeRenderTarget!==!0){console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");return}this.renderTarget=n;let r=new Mi(dp,up,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new R(1,0,0)),this.add(r);let o=new Mi(dp,up,e,t);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new R(-1,0,0)),this.add(o);let s=new Mi(dp,up,e,t);s.layers=this.layers,s.up.set(0,0,1),s.lookAt(new R(0,1,0)),this.add(s);let a=new Mi(dp,up,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new R(0,-1,0)),this.add(a);let l=new Mi(dp,up,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new R(0,0,1)),this.add(l);let c=new Mi(dp,up,e,t);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new R(0,0,-1)),this.add(c)}update(e,t){this.parent===null&&this.updateMatrixWorld();let n=this.renderTarget,[r,o,s,a,l,c]=this.children,d=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;let h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,o),e.setRenderTarget(n,2),e.render(t,s),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,l),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,c),e.setRenderTarget(u),e.xr.enabled=d}},cc=class extends Gi{constructor(e,t,n,r,o,s,a,l,c,d){e=e!==void 0?e:[],t=t!==void 0?t:uu,super(e,t,n,r,o,s,a,l,c,d),this.flipY=!1}get images(){return this.image}set images(e){this.image=e}};cc.prototype.isCubeTexture=!0;var Rp=class extends yo{constructor(e,t,n){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=n),super(e,e,t),t=t||{},this.texture=new cc(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:Fi,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=rr,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:` +}`,ws=class extends Ii{constructor(e){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=tie,this.fragmentShader=nie,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&(e.attributes!==void 0&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Pp(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){let t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(let r in this.uniforms){let s=this.uniforms[r].value;s&&s.isTexture?t.uniforms[r]={type:"t",value:s.toJSON(e).uuid}:s&&s.isColor?t.uniforms[r]={type:"c",value:s.getHex()}:s&&s.isVector2?t.uniforms[r]={type:"v2",value:s.toArray()}:s&&s.isVector3?t.uniforms[r]={type:"v3",value:s.toArray()}:s&&s.isVector4?t.uniforms[r]={type:"v4",value:s.toArray()}:s&&s.isMatrix3?t.uniforms[r]={type:"m3",value:s.toArray()}:s&&s.isMatrix4?t.uniforms[r]={type:"m4",value:s.toArray()}:t.uniforms[r]={value:s}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;let n={};for(let r in this.extensions)this.extensions[r]===!0&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}};ws.prototype.isShaderMaterial=!0;var Qd=class extends hn{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new lt,this.projectionMatrix=new lt,this.projectionMatrixInverse=new lt}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};Qd.prototype.isCamera=!0;var Mi=class extends Qd{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=Hg*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(qd*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Hg*2*Math.atan(Math.tan(qd*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,o,s){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(qd*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,o=-.5*r,s=this.view;if(this.view!==null&&this.view.enabled){let l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*r/l,t-=s.offsetY*n/c,r*=s.width/l,n*=s.height/c}let a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}};Mi.prototype.isPerspectiveCamera=!0;var dp=90,up=1,Op=class extends hn{constructor(e,t,n){if(super(),this.type="CubeCamera",n.isWebGLCubeRenderTarget!==!0){console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");return}this.renderTarget=n;let r=new Mi(dp,up,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new R(1,0,0)),this.add(r);let o=new Mi(dp,up,e,t);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new R(-1,0,0)),this.add(o);let s=new Mi(dp,up,e,t);s.layers=this.layers,s.up.set(0,0,1),s.lookAt(new R(0,1,0)),this.add(s);let a=new Mi(dp,up,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new R(0,-1,0)),this.add(a);let l=new Mi(dp,up,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new R(0,0,1)),this.add(l);let c=new Mi(dp,up,e,t);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new R(0,0,-1)),this.add(c)}update(e,t){this.parent===null&&this.updateMatrixWorld();let n=this.renderTarget,[r,o,s,a,l,c]=this.children,d=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;let h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,o),e.setRenderTarget(n,2),e.render(t,s),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,l),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,c),e.setRenderTarget(u),e.xr.enabled=d}},cc=class extends Gi{constructor(e,t,n,r,o,s,a,l,c,d){e=e!==void 0?e:[],t=t!==void 0?t:uu,super(e,t,n,r,o,s,a,l,c,d),this.flipY=!1}get images(){return this.image}set images(e){this.image=e}};cc.prototype.isCubeTexture=!0;var Rp=class extends yo{constructor(e,t,n){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=n),super(e,e,t),t=t||{},this.texture=new cc(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:Fi,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=rr,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -45,7 +45,7 @@ ${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(` gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},r=new lc(5,5,5),o=new ws({name:"CubemapFromEquirect",uniforms:Pp(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:bi,blending:Za});o.uniforms.tEquirect.value=t;let s=new di(r,o),a=t.minFilter;return t.minFilter===pu&&(t.minFilter=Fi),new Op(1,10,this).update(e,s),t.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,n,r){let o=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(t,n,r);e.setRenderTarget(o)}};Rp.prototype.isWebGLCubeRenderTarget=!0;var LD=new R,iie=new R,rie=new yi,$o=class{constructor(e=new R(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){let r=LD.subVectors(n,t).cross(iie.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){let n=e.delta(LD),r=this.normal.dot(n);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let o=-(e.start.dot(this.normal)+this.constant)/r;return o<0||o>1?null:t.copy(n).multiplyScalar(o).add(e.start)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||rie.getNormalMatrix(e),r=this.coplanarPoint(LD).applyMatrix4(e),o=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};$o.prototype.isPlane=!0;var hp=new na,Ix=new R,Kd=class{constructor(e=new $o,t=new $o,n=new $o,r=new $o,o=new $o,s=new $o){this.planes=[e,t,n,r,o,s]}set(e,t,n,r,o,s){let a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(o),a[5].copy(s),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){let t=this.planes,n=e.elements,r=n[0],o=n[1],s=n[2],a=n[3],l=n[4],c=n[5],d=n[6],u=n[7],h=n[8],p=n[9],f=n[10],m=n[11],b=n[12],g=n[13],_=n[14],x=n[15];return t[0].setComponents(a-r,u-l,m-h,x-b).normalize(),t[1].setComponents(a+r,u+l,m+h,x+b).normalize(),t[2].setComponents(a+o,u+c,m+p,x+g).normalize(),t[3].setComponents(a-o,u-c,m-p,x-g).normalize(),t[4].setComponents(a-s,u-d,m-f,x-_).normalize(),t[5].setComponents(a+s,u+d,m+f,x+_).normalize(),this}intersectsObject(e){let t=e.geometry;return t.boundingSphere===null&&t.computeBoundingSphere(),hp.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(hp)}intersectsSprite(e){return hp.center.set(0,0,0),hp.radius=.7071067811865476,hp.applyMatrix4(e.matrixWorld),this.intersectsSphere(hp)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let o=0;o<6;o++)if(t[o].distanceToPoint(n)0?e.max.x:e.min.x,Ix.y=r.normal.y>0?e.max.y:e.min.y,Ix.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Ix)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function yH(){let i=null,e=!1,t=null,n=null;function r(o,s){t(o,s),n=i.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(n=i.requestAnimationFrame(r),e=!0)},stop:function(){i.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(o){t=o},setContext:function(o){i=o}}}function oie(i,e){let t=e.isWebGL2,n=new WeakMap;function r(c,d){let u=c.array,h=c.usage,p=i.createBuffer();i.bindBuffer(d,p),i.bufferData(d,u,h),c.onUploadCallback();let f=5126;return u instanceof Float32Array?f=5126:u instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):u instanceof Uint16Array?c.isFloat16BufferAttribute?t?f=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):f=5123:u instanceof Int16Array?f=5122:u instanceof Uint32Array?f=5125:u instanceof Int32Array?f=5124:u instanceof Int8Array?f=5120:(u instanceof Uint8Array||u instanceof Uint8ClampedArray)&&(f=5121),{buffer:p,type:f,bytesPerElement:u.BYTES_PER_ELEMENT,version:c.version}}function o(c,d,u){let h=d.array,p=d.updateRange;i.bindBuffer(u,c),p.count===-1?i.bufferSubData(u,0,h):(t?i.bufferSubData(u,p.offset*h.BYTES_PER_ELEMENT,h,p.offset,p.count):i.bufferSubData(u,p.offset*h.BYTES_PER_ELEMENT,h.subarray(p.offset,p.offset+p.count)),p.count=-1)}function s(c){return c.isInterleavedBufferAttribute&&(c=c.data),n.get(c)}function a(c){c.isInterleavedBufferAttribute&&(c=c.data);let d=n.get(c);d&&(i.deleteBuffer(d.buffer),n.delete(c))}function l(c,d){if(c.isGLBufferAttribute){let h=n.get(c);(!h||h.version1?null:t.copy(n).multiplyScalar(o).add(e.start)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||rie.getNormalMatrix(e),r=this.coplanarPoint(kD).applyMatrix4(e),o=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};$o.prototype.isPlane=!0;var hp=new na,Tx=new R,Kd=class{constructor(e=new $o,t=new $o,n=new $o,r=new $o,o=new $o,s=new $o){this.planes=[e,t,n,r,o,s]}set(e,t,n,r,o,s){let a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(o),a[5].copy(s),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){let t=this.planes,n=e.elements,r=n[0],o=n[1],s=n[2],a=n[3],l=n[4],c=n[5],d=n[6],u=n[7],h=n[8],p=n[9],f=n[10],m=n[11],b=n[12],g=n[13],_=n[14],x=n[15];return t[0].setComponents(a-r,u-l,m-h,x-b).normalize(),t[1].setComponents(a+r,u+l,m+h,x+b).normalize(),t[2].setComponents(a+o,u+c,m+p,x+g).normalize(),t[3].setComponents(a-o,u-c,m-p,x-g).normalize(),t[4].setComponents(a-s,u-d,m-f,x-_).normalize(),t[5].setComponents(a+s,u+d,m+f,x+_).normalize(),this}intersectsObject(e){let t=e.geometry;return t.boundingSphere===null&&t.computeBoundingSphere(),hp.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(hp)}intersectsSprite(e){return hp.center.set(0,0,0),hp.radius=.7071067811865476,hp.applyMatrix4(e.matrixWorld),this.intersectsSphere(hp)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let o=0;o<6;o++)if(t[o].distanceToPoint(n)0?e.max.x:e.min.x,Tx.y=r.normal.y>0?e.max.y:e.min.y,Tx.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Tx)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function bH(){let i=null,e=!1,t=null,n=null;function r(o,s){t(o,s),n=i.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(n=i.requestAnimationFrame(r),e=!0)},stop:function(){i.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(o){t=o},setContext:function(o){i=o}}}function oie(i,e){let t=e.isWebGL2,n=new WeakMap;function r(c,d){let u=c.array,h=c.usage,p=i.createBuffer();i.bindBuffer(d,p),i.bufferData(d,u,h),c.onUploadCallback();let f=5126;return u instanceof Float32Array?f=5126:u instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):u instanceof Uint16Array?c.isFloat16BufferAttribute?t?f=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):f=5123:u instanceof Int16Array?f=5122:u instanceof Uint32Array?f=5125:u instanceof Int32Array?f=5124:u instanceof Int8Array?f=5120:(u instanceof Uint8Array||u instanceof Uint8ClampedArray)&&(f=5121),{buffer:p,type:f,bytesPerElement:u.BYTES_PER_ELEMENT,version:c.version}}function o(c,d,u){let h=d.array,p=d.updateRange;i.bindBuffer(u,c),p.count===-1?i.bufferSubData(u,0,h):(t?i.bufferSubData(u,p.offset*h.BYTES_PER_ELEMENT,h,p.offset,p.count):i.bufferSubData(u,p.offset*h.BYTES_PER_ELEMENT,h.subarray(p.offset,p.offset+p.count)),p.count=-1)}function s(c){return c.isInterleavedBufferAttribute&&(c=c.data),n.get(c)}function a(c){c.isInterleavedBufferAttribute&&(c=c.data);let d=n.get(c);d&&(i.deleteBuffer(d.buffer),n.delete(c))}function l(c,d){if(c.isGLBufferAttribute){let h=n.get(c);(!h||h.version #include #include -}`,rn={alphamap_fragment:sie,alphamap_pars_fragment:aie,alphatest_fragment:lie,alphatest_pars_fragment:cie,aomap_fragment:die,aomap_pars_fragment:uie,begin_vertex:hie,beginnormal_vertex:pie,bsdfs:fie,bumpmap_pars_fragment:mie,clipping_planes_fragment:gie,clipping_planes_pars_fragment:_ie,clipping_planes_pars_vertex:vie,clipping_planes_vertex:bie,color_fragment:yie,color_pars_fragment:xie,color_pars_vertex:wie,color_vertex:Cie,common:Sie,cube_uv_reflection_fragment:Mie,defaultnormal_vertex:Eie,displacementmap_pars_vertex:Iie,displacementmap_vertex:Tie,emissivemap_fragment:Die,emissivemap_pars_fragment:Pie,encodings_fragment:Oie,encodings_pars_fragment:Rie,envmap_fragment:Aie,envmap_common_pars_fragment:Nie,envmap_pars_fragment:kie,envmap_pars_vertex:Lie,envmap_physical_pars_fragment:qie,envmap_vertex:Fie,fog_vertex:Bie,fog_pars_vertex:Vie,fog_fragment:zie,fog_pars_fragment:Uie,gradientmap_pars_fragment:Hie,lightmap_fragment:Gie,lightmap_pars_fragment:jie,lights_lambert_vertex:Wie,lights_pars_begin:$ie,lights_toon_fragment:Yie,lights_toon_pars_fragment:Xie,lights_phong_fragment:Zie,lights_phong_pars_fragment:Qie,lights_physical_fragment:Kie,lights_physical_pars_fragment:Jie,lights_fragment_begin:ere,lights_fragment_maps:tre,lights_fragment_end:nre,logdepthbuf_fragment:ire,logdepthbuf_pars_fragment:rre,logdepthbuf_pars_vertex:ore,logdepthbuf_vertex:sre,map_fragment:are,map_pars_fragment:lre,map_particle_fragment:cre,map_particle_pars_fragment:dre,metalnessmap_fragment:ure,metalnessmap_pars_fragment:hre,morphnormal_vertex:pre,morphtarget_pars_vertex:fre,morphtarget_vertex:mre,normal_fragment_begin:gre,normal_fragment_maps:_re,normal_pars_fragment:vre,normal_pars_vertex:bre,normal_vertex:yre,normalmap_pars_fragment:xre,clearcoat_normal_fragment_begin:wre,clearcoat_normal_fragment_maps:Cre,clearcoat_pars_fragment:Sre,output_fragment:Mre,packing:Ere,premultiplied_alpha_fragment:Ire,project_vertex:Tre,dithering_fragment:Dre,dithering_pars_fragment:Pre,roughnessmap_fragment:Ore,roughnessmap_pars_fragment:Rre,shadowmap_pars_fragment:Are,shadowmap_pars_vertex:Nre,shadowmap_vertex:kre,shadowmask_pars_fragment:Lre,skinbase_vertex:Fre,skinning_pars_vertex:Bre,skinning_vertex:Vre,skinnormal_vertex:zre,specularmap_fragment:Ure,specularmap_pars_fragment:Hre,tonemapping_fragment:Gre,tonemapping_pars_fragment:jre,transmission_fragment:Wre,transmission_pars_fragment:$re,uv_pars_fragment:qre,uv_pars_vertex:Yre,uv_vertex:Xre,uv2_pars_fragment:Zre,uv2_pars_vertex:Qre,uv2_vertex:Kre,worldpos_vertex:Jre,background_vert:eoe,background_frag:toe,cube_vert:noe,cube_frag:ioe,depth_vert:roe,depth_frag:ooe,distanceRGBA_vert:soe,distanceRGBA_frag:aoe,equirect_vert:loe,equirect_frag:coe,linedashed_vert:doe,linedashed_frag:uoe,meshbasic_vert:hoe,meshbasic_frag:poe,meshlambert_vert:foe,meshlambert_frag:moe,meshmatcap_vert:goe,meshmatcap_frag:_oe,meshnormal_vert:voe,meshnormal_frag:boe,meshphong_vert:yoe,meshphong_frag:xoe,meshphysical_vert:woe,meshphysical_frag:Coe,meshtoon_vert:Soe,meshtoon_frag:Moe,points_vert:Eoe,points_frag:Ioe,shadow_vert:Toe,shadow_frag:Doe,sprite_vert:Poe,sprite_frag:Ooe},Ue={common:{diffuse:{value:new je(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new yi},uv2Transform:{value:new yi},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new je(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new je(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new yi}},sprite:{diffuse:{value:new je(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new yi}}},ys={basic:{uniforms:br([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.fog]),vertexShader:rn.meshbasic_vert,fragmentShader:rn.meshbasic_frag},lambert:{uniforms:br([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.fog,Ue.lights,{emissive:{value:new je(0)}}]),vertexShader:rn.meshlambert_vert,fragmentShader:rn.meshlambert_frag},phong:{uniforms:br([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,Ue.lights,{emissive:{value:new je(0)},specular:{value:new je(1118481)},shininess:{value:30}}]),vertexShader:rn.meshphong_vert,fragmentShader:rn.meshphong_frag},standard:{uniforms:br([Ue.common,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.roughnessmap,Ue.metalnessmap,Ue.fog,Ue.lights,{emissive:{value:new je(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:rn.meshphysical_vert,fragmentShader:rn.meshphysical_frag},toon:{uniforms:br([Ue.common,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.gradientmap,Ue.fog,Ue.lights,{emissive:{value:new je(0)}}]),vertexShader:rn.meshtoon_vert,fragmentShader:rn.meshtoon_frag},matcap:{uniforms:br([Ue.common,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,{matcap:{value:null}}]),vertexShader:rn.meshmatcap_vert,fragmentShader:rn.meshmatcap_frag},points:{uniforms:br([Ue.points,Ue.fog]),vertexShader:rn.points_vert,fragmentShader:rn.points_frag},dashed:{uniforms:br([Ue.common,Ue.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:rn.linedashed_vert,fragmentShader:rn.linedashed_frag},depth:{uniforms:br([Ue.common,Ue.displacementmap]),vertexShader:rn.depth_vert,fragmentShader:rn.depth_frag},normal:{uniforms:br([Ue.common,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,{opacity:{value:1}}]),vertexShader:rn.meshnormal_vert,fragmentShader:rn.meshnormal_frag},sprite:{uniforms:br([Ue.sprite,Ue.fog]),vertexShader:rn.sprite_vert,fragmentShader:rn.sprite_frag},background:{uniforms:{uvTransform:{value:new yi},t2D:{value:null}},vertexShader:rn.background_vert,fragmentShader:rn.background_frag},cube:{uniforms:br([Ue.envmap,{opacity:{value:1}}]),vertexShader:rn.cube_vert,fragmentShader:rn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:rn.equirect_vert,fragmentShader:rn.equirect_frag},distanceRGBA:{uniforms:br([Ue.common,Ue.displacementmap,{referencePosition:{value:new R},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:rn.distanceRGBA_vert,fragmentShader:rn.distanceRGBA_frag},shadow:{uniforms:br([Ue.lights,Ue.fog,{color:{value:new je(0)},opacity:{value:1}}]),vertexShader:rn.shadow_vert,fragmentShader:rn.shadow_frag}};ys.physical={uniforms:br([ys.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new xe(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new je(0)},sheenColorMap:{value:null},sheenRoughness:{value:0},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new je(0)},specularIntensity:{value:0},specularIntensityMap:{value:null},specularColor:{value:new je(1,1,1)},specularColorMap:{value:null}}]),vertexShader:rn.meshphysical_vert,fragmentShader:rn.meshphysical_frag};function Roe(i,e,t,n,r){let o=new je(0),s=0,a,l,c=null,d=0,u=null;function h(f,m){let b=!1,g=m.isScene===!0?m.background:null;g&&g.isTexture&&(g=e.get(g));let _=i.xr,x=_.getSession&&_.getSession();x&&x.environmentBlendMode==="additive"&&(g=null),g===null?p(o,s):g&&g.isColor&&(p(g,1),b=!0),(i.autoClear||b)&&i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil),g&&(g.isCubeTexture||g.mapping===Qp)?(l===void 0&&(l=new di(new lc(1,1,1),new ws({name:"BackgroundCubeMaterial",uniforms:Pp(ys.cube.uniforms),vertexShader:ys.cube.vertexShader,fragmentShader:ys.cube.fragmentShader,side:bi,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(C,T,D){this.matrixWorld.copyPosition(D.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(l)),l.material.uniforms.envMap.value=g,l.material.uniforms.flipEnvMap.value=g.isCubeTexture&&g.isRenderTargetTexture===!1?-1:1,(c!==g||d!==g.version||u!==i.toneMapping)&&(l.material.needsUpdate=!0,c=g,d=g.version,u=i.toneMapping),f.unshift(l,l.geometry,l.material,0,0,null)):g&&g.isTexture&&(a===void 0&&(a=new di(new Ap(2,2),new ws({name:"BackgroundMaterial",uniforms:Pp(ys.background.uniforms),vertexShader:ys.background.vertexShader,fragmentShader:ys.background.fragmentShader,side:Yd,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(a)),a.material.uniforms.t2D.value=g,g.matrixAutoUpdate===!0&&g.updateMatrix(),a.material.uniforms.uvTransform.value.copy(g.matrix),(c!==g||d!==g.version||u!==i.toneMapping)&&(a.material.needsUpdate=!0,c=g,d=g.version,u=i.toneMapping),f.unshift(a,a.geometry,a.material,0,0,null))}function p(f,m){t.buffers.color.setClear(f.r,f.g,f.b,m,r)}return{getClearColor:function(){return o},setClearColor:function(f,m=1){o.set(f),s=m,p(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(f){s=f,p(o,s)},render:h}}function Aoe(i,e,t,n){let r=i.getParameter(34921),o=n.isWebGL2?null:e.get("OES_vertex_array_object"),s=n.isWebGL2||o!==null,a={},l=m(null),c=l;function d(B,j,q,k,G){let K=!1;if(s){let de=f(k,q,j);c!==de&&(c=de,h(c.object)),K=b(k,G),K&&g(k,G)}else{let de=j.wireframe===!0;(c.geometry!==k.id||c.program!==q.id||c.wireframe!==de)&&(c.geometry=k.id,c.program=q.id,c.wireframe=de,K=!0)}B.isInstancedMesh===!0&&(K=!0),G!==null&&t.update(G,34963),K&&(E(B,j,q,k),G!==null&&i.bindBuffer(34963,t.get(G).buffer))}function u(){return n.isWebGL2?i.createVertexArray():o.createVertexArrayOES()}function h(B){return n.isWebGL2?i.bindVertexArray(B):o.bindVertexArrayOES(B)}function p(B){return n.isWebGL2?i.deleteVertexArray(B):o.deleteVertexArrayOES(B)}function f(B,j,q){let k=q.wireframe===!0,G=a[B.id];G===void 0&&(G={},a[B.id]=G);let K=G[j.id];K===void 0&&(K={},G[j.id]=K);let de=K[k];return de===void 0&&(de=m(u()),K[k]=de),de}function m(B){let j=[],q=[],k=[];for(let G=0;G=0){let He=G[Te];if(He===void 0&&(Te==="instanceMatrix"&&B.instanceMatrix&&(He=B.instanceMatrix),Te==="instanceColor"&&B.instanceColor&&(He=B.instanceColor)),He!==void 0){let he=He.normalized,re=He.itemSize,qe=t.get(He);if(qe===void 0)continue;let ue=qe.buffer,Ge=qe.type,ut=qe.bytesPerElement;if(He.isInterleavedBufferAttribute){let Ve=He.data,Qe=Ve.stride,Dt=He.offset;if(Ve&&Ve.isInstancedInterleavedBuffer){for(let _e=0;_e0&&i.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";E="mediump"}return E==="mediump"&&i.getShaderPrecisionFormat(35633,36337).precision>0&&i.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let s=typeof WebGL2RenderingContext<"u"&&i instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext<"u"&&i instanceof WebGL2ComputeRenderingContext,a=t.precision!==void 0?t.precision:"highp",l=o(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);let c=s||e.has("WEBGL_draw_buffers"),d=t.logarithmicDepthBuffer===!0,u=i.getParameter(34930),h=i.getParameter(35660),p=i.getParameter(3379),f=i.getParameter(34076),m=i.getParameter(34921),b=i.getParameter(36347),g=i.getParameter(36348),_=i.getParameter(36349),x=h>0,C=s||e.has("OES_texture_float"),T=x&&C,D=s?i.getParameter(36183):0;return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:r,getMaxPrecision:o,precision:a,logarithmicDepthBuffer:d,maxTextures:u,maxVertexTextures:h,maxTextureSize:p,maxCubemapSize:f,maxAttributes:m,maxVertexUniforms:b,maxVaryings:g,maxFragmentUniforms:_,vertexTextures:x,floatFragmentTextures:C,floatVertexTextures:T,maxSamples:D}}function Loe(i){let e=this,t=null,n=0,r=!1,o=!1,s=new $o,a=new yi,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(u,h,p){let f=u.length!==0||h||n!==0||r;return r=h,t=d(u,p,0),n=u.length,f},this.beginShadows=function(){o=!0,d(null)},this.endShadows=function(){o=!1,c()},this.setState=function(u,h,p){let f=u.clippingPlanes,m=u.clipIntersection,b=u.clipShadows,g=i.get(u);if(!r||f===null||f.length===0||o&&!b)o?d(null):c();else{let _=o?0:n,x=_*4,C=g.clippingState||null;l.value=C,C=d(f,h,x,p);for(let T=0;T!==x;++T)C[T]=t[T];g.clippingState=C,this.numIntersection=m?this.numPlanes:0,this.numPlanes+=_}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(u,h,p,f){let m=u!==null?u.length:0,b=null;if(m!==0){if(b=l.value,f!==!0||b===null){let g=p+m*4,_=h.matrixWorldInverse;a.getNormalMatrix(_),(b===null||b.length0){let c=i.getRenderTarget(),d=new Rp(l.height/2);return d.fromEquirectangularTexture(i,s),e.set(s,d),i.setRenderTarget(c),s.addEventListener("dispose",r),t(d.texture,s.mapping)}else return null}}return s}function r(s){let a=s.target;a.removeEventListener("dispose",r);let l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:n,dispose:o}}var Jd=class extends Qd{constructor(e=-1,t=1,n=1,r=-1,o=.1,s=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,o=n-e,s=n+e,a=r+t,l=r-t;if(this.view!==null&&this.view.enabled){let c=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}};Jd.prototype.isOrthographicCamera=!0;var dc=class extends ws{constructor(e){super(e),this.type="RawShaderMaterial"}};dc.prototype.isRawShaderMaterial=!0;var Sp=4,sc=8,Ks=Math.pow(2,sc),xH=[.125,.215,.35,.446,.526,.582],wH=sc-Sp+1+xH.length,pp=20,uc={[sr]:0,[gc]:1,[Zw]:2,[YP]:3,[XP]:4,[ZP]:5,[Xw]:6},FD=new Jd,{_lodPlanes:xg,_sizeLods:Dz,_sigmas:Tx}=Voe(),Pz=new je,BD=null,zd=(1+Math.sqrt(5))/2,fp=1/zd,Oz=[new R(1,1,1),new R(-1,1,1),new R(1,1,-1),new R(-1,1,-1),new R(0,zd,fp),new R(0,zd,-fp),new R(fp,0,zd),new R(-fp,0,zd),new R(zd,fp,0),new R(-zd,fp,0)],dw=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=zoe(pp),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){BD=this._renderer.getRenderTarget();let o=this._allocateTargets();return this._sceneToCubeUV(e,n,r,o),t>0&&this._blur(o,0,0,t),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e){return this._fromTexture(e)}fromCubemap(e){return this._fromTexture(e)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=Nz(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=Az(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let e=0;e2?Ks:0,Ks,Ks),d.setRenderTarget(r),b&&d.render(m,a),d.render(e,a)}m.geometry.dispose(),m.material.dispose(),d.toneMapping=p,d.outputEncoding=h,d.autoClear=u,e.background=g}_setEncoding(e,t){this._renderer.capabilities.isWebGL2===!0&&t.format===rr&&t.type===Ka&&t.encoding===gc?e.value=uc[sr]:e.value=uc[t.encoding]}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===uu||e.mapping===hu;r?this._cubemapShader==null&&(this._cubemapShader=Nz()):this._equirectShader==null&&(this._equirectShader=Az());let o=r?this._cubemapShader:this._equirectShader,s=new di(xg[0],o),a=o.uniforms;a.envMap.value=e,r||a.texelSize.value.set(1/e.image.width,1/e.image.height),this._setEncoding(a.inputEncoding,e),this._setEncoding(a.outputEncoding,t.texture),Dx(t,0,0,3*Ks,2*Ks),n.setRenderTarget(t),n.render(s,FD)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let r=1;rpp&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${pp}`);let g=[],_=0;for(let D=0;Dsc-Sp?r-sc+Sp:0);Dx(t,C,T,3*x,2*x),l.setRenderTarget(t),l.render(u,FD)}};function Boe(i){return i===void 0||i.type!==Ka?!1:i.encoding===sr||i.encoding===gc||i.encoding===Xw}function Voe(){let i=[],e=[],t=[],n=sc;for(let r=0;rsc-Sp?s=xH[r-sc+Sp-1]:r==0&&(s=0),t.push(s);let a=1/(o-1),l=-a/2,c=1+a/2,d=[l,l,c,l,c,c,l,l,c,c,l,c],u=6,h=6,p=3,f=2,m=1,b=new Float32Array(p*h*u),g=new Float32Array(f*h*u),_=new Float32Array(m*h*u);for(let C=0;C2?0:-1,E=[T,D,0,T+2/3,D,0,T+2/3,D+1,0,T,D,0,T+2/3,D+1,0,T,D+1,0];b.set(E,p*h*C),g.set(d,f*h*C);let P=[C,C,C,C,C,C];_.set(P,m*h*C)}let x=new It;x.setAttribute("position",new un(b,p)),x.setAttribute("uv",new un(g,f)),x.setAttribute("faceIndex",new un(_,m)),i.push(x),n>Sp&&n--}return{_lodPlanes:i,_sizeLods:e,_sigmas:t}}function Rz(i){let e=new yo(3*Ks,3*Ks,i);return e.texture.mapping=Qp,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function Dx(i,e,t,n,r){i.viewport.set(e,t,n,r),i.scissor.set(e,t,n,r)}function zoe(i){let e=new Float32Array(i),t=new R(0,1,0);return new dc({name:"SphericalGaussianBlur",defines:{n:i},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:e},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:t},inputEncoding:{value:uc[sr]},outputEncoding:{value:uc[sr]}},vertexShader:KP(),fragmentShader:` +}`,rn={alphamap_fragment:sie,alphamap_pars_fragment:aie,alphatest_fragment:lie,alphatest_pars_fragment:cie,aomap_fragment:die,aomap_pars_fragment:uie,begin_vertex:hie,beginnormal_vertex:pie,bsdfs:fie,bumpmap_pars_fragment:mie,clipping_planes_fragment:gie,clipping_planes_pars_fragment:_ie,clipping_planes_pars_vertex:vie,clipping_planes_vertex:bie,color_fragment:yie,color_pars_fragment:xie,color_pars_vertex:wie,color_vertex:Cie,common:Sie,cube_uv_reflection_fragment:Mie,defaultnormal_vertex:Eie,displacementmap_pars_vertex:Iie,displacementmap_vertex:Tie,emissivemap_fragment:Die,emissivemap_pars_fragment:Pie,encodings_fragment:Oie,encodings_pars_fragment:Rie,envmap_fragment:Aie,envmap_common_pars_fragment:Nie,envmap_pars_fragment:kie,envmap_pars_vertex:Lie,envmap_physical_pars_fragment:qie,envmap_vertex:Fie,fog_vertex:Bie,fog_pars_vertex:Vie,fog_fragment:zie,fog_pars_fragment:Uie,gradientmap_pars_fragment:Hie,lightmap_fragment:Gie,lightmap_pars_fragment:jie,lights_lambert_vertex:Wie,lights_pars_begin:$ie,lights_toon_fragment:Yie,lights_toon_pars_fragment:Xie,lights_phong_fragment:Zie,lights_phong_pars_fragment:Qie,lights_physical_fragment:Kie,lights_physical_pars_fragment:Jie,lights_fragment_begin:ere,lights_fragment_maps:tre,lights_fragment_end:nre,logdepthbuf_fragment:ire,logdepthbuf_pars_fragment:rre,logdepthbuf_pars_vertex:ore,logdepthbuf_vertex:sre,map_fragment:are,map_pars_fragment:lre,map_particle_fragment:cre,map_particle_pars_fragment:dre,metalnessmap_fragment:ure,metalnessmap_pars_fragment:hre,morphnormal_vertex:pre,morphtarget_pars_vertex:fre,morphtarget_vertex:mre,normal_fragment_begin:gre,normal_fragment_maps:_re,normal_pars_fragment:vre,normal_pars_vertex:bre,normal_vertex:yre,normalmap_pars_fragment:xre,clearcoat_normal_fragment_begin:wre,clearcoat_normal_fragment_maps:Cre,clearcoat_pars_fragment:Sre,output_fragment:Mre,packing:Ere,premultiplied_alpha_fragment:Ire,project_vertex:Tre,dithering_fragment:Dre,dithering_pars_fragment:Pre,roughnessmap_fragment:Ore,roughnessmap_pars_fragment:Rre,shadowmap_pars_fragment:Are,shadowmap_pars_vertex:Nre,shadowmap_vertex:kre,shadowmask_pars_fragment:Lre,skinbase_vertex:Fre,skinning_pars_vertex:Bre,skinning_vertex:Vre,skinnormal_vertex:zre,specularmap_fragment:Ure,specularmap_pars_fragment:Hre,tonemapping_fragment:Gre,tonemapping_pars_fragment:jre,transmission_fragment:Wre,transmission_pars_fragment:$re,uv_pars_fragment:qre,uv_pars_vertex:Yre,uv_vertex:Xre,uv2_pars_fragment:Zre,uv2_pars_vertex:Qre,uv2_vertex:Kre,worldpos_vertex:Jre,background_vert:eoe,background_frag:toe,cube_vert:noe,cube_frag:ioe,depth_vert:roe,depth_frag:ooe,distanceRGBA_vert:soe,distanceRGBA_frag:aoe,equirect_vert:loe,equirect_frag:coe,linedashed_vert:doe,linedashed_frag:uoe,meshbasic_vert:hoe,meshbasic_frag:poe,meshlambert_vert:foe,meshlambert_frag:moe,meshmatcap_vert:goe,meshmatcap_frag:_oe,meshnormal_vert:voe,meshnormal_frag:boe,meshphong_vert:yoe,meshphong_frag:xoe,meshphysical_vert:woe,meshphysical_frag:Coe,meshtoon_vert:Soe,meshtoon_frag:Moe,points_vert:Eoe,points_frag:Ioe,shadow_vert:Toe,shadow_frag:Doe,sprite_vert:Poe,sprite_frag:Ooe},Ue={common:{diffuse:{value:new je(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new yi},uv2Transform:{value:new yi},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new je(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new je(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new yi}},sprite:{diffuse:{value:new je(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new yi}}},ys={basic:{uniforms:br([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.fog]),vertexShader:rn.meshbasic_vert,fragmentShader:rn.meshbasic_frag},lambert:{uniforms:br([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.fog,Ue.lights,{emissive:{value:new je(0)}}]),vertexShader:rn.meshlambert_vert,fragmentShader:rn.meshlambert_frag},phong:{uniforms:br([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,Ue.lights,{emissive:{value:new je(0)},specular:{value:new je(1118481)},shininess:{value:30}}]),vertexShader:rn.meshphong_vert,fragmentShader:rn.meshphong_frag},standard:{uniforms:br([Ue.common,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.roughnessmap,Ue.metalnessmap,Ue.fog,Ue.lights,{emissive:{value:new je(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:rn.meshphysical_vert,fragmentShader:rn.meshphysical_frag},toon:{uniforms:br([Ue.common,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.gradientmap,Ue.fog,Ue.lights,{emissive:{value:new je(0)}}]),vertexShader:rn.meshtoon_vert,fragmentShader:rn.meshtoon_frag},matcap:{uniforms:br([Ue.common,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,{matcap:{value:null}}]),vertexShader:rn.meshmatcap_vert,fragmentShader:rn.meshmatcap_frag},points:{uniforms:br([Ue.points,Ue.fog]),vertexShader:rn.points_vert,fragmentShader:rn.points_frag},dashed:{uniforms:br([Ue.common,Ue.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:rn.linedashed_vert,fragmentShader:rn.linedashed_frag},depth:{uniforms:br([Ue.common,Ue.displacementmap]),vertexShader:rn.depth_vert,fragmentShader:rn.depth_frag},normal:{uniforms:br([Ue.common,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,{opacity:{value:1}}]),vertexShader:rn.meshnormal_vert,fragmentShader:rn.meshnormal_frag},sprite:{uniforms:br([Ue.sprite,Ue.fog]),vertexShader:rn.sprite_vert,fragmentShader:rn.sprite_frag},background:{uniforms:{uvTransform:{value:new yi},t2D:{value:null}},vertexShader:rn.background_vert,fragmentShader:rn.background_frag},cube:{uniforms:br([Ue.envmap,{opacity:{value:1}}]),vertexShader:rn.cube_vert,fragmentShader:rn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:rn.equirect_vert,fragmentShader:rn.equirect_frag},distanceRGBA:{uniforms:br([Ue.common,Ue.displacementmap,{referencePosition:{value:new R},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:rn.distanceRGBA_vert,fragmentShader:rn.distanceRGBA_frag},shadow:{uniforms:br([Ue.lights,Ue.fog,{color:{value:new je(0)},opacity:{value:1}}]),vertexShader:rn.shadow_vert,fragmentShader:rn.shadow_frag}};ys.physical={uniforms:br([ys.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new xe(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new je(0)},sheenColorMap:{value:null},sheenRoughness:{value:0},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new je(0)},specularIntensity:{value:0},specularIntensityMap:{value:null},specularColor:{value:new je(1,1,1)},specularColorMap:{value:null}}]),vertexShader:rn.meshphysical_vert,fragmentShader:rn.meshphysical_frag};function Roe(i,e,t,n,r){let o=new je(0),s=0,a,l,c=null,d=0,u=null;function h(f,m){let b=!1,g=m.isScene===!0?m.background:null;g&&g.isTexture&&(g=e.get(g));let _=i.xr,x=_.getSession&&_.getSession();x&&x.environmentBlendMode==="additive"&&(g=null),g===null?p(o,s):g&&g.isColor&&(p(g,1),b=!0),(i.autoClear||b)&&i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil),g&&(g.isCubeTexture||g.mapping===Qp)?(l===void 0&&(l=new di(new lc(1,1,1),new ws({name:"BackgroundCubeMaterial",uniforms:Pp(ys.cube.uniforms),vertexShader:ys.cube.vertexShader,fragmentShader:ys.cube.fragmentShader,side:bi,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(C,T,D){this.matrixWorld.copyPosition(D.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(l)),l.material.uniforms.envMap.value=g,l.material.uniforms.flipEnvMap.value=g.isCubeTexture&&g.isRenderTargetTexture===!1?-1:1,(c!==g||d!==g.version||u!==i.toneMapping)&&(l.material.needsUpdate=!0,c=g,d=g.version,u=i.toneMapping),f.unshift(l,l.geometry,l.material,0,0,null)):g&&g.isTexture&&(a===void 0&&(a=new di(new Ap(2,2),new ws({name:"BackgroundMaterial",uniforms:Pp(ys.background.uniforms),vertexShader:ys.background.vertexShader,fragmentShader:ys.background.fragmentShader,side:Yd,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(a)),a.material.uniforms.t2D.value=g,g.matrixAutoUpdate===!0&&g.updateMatrix(),a.material.uniforms.uvTransform.value.copy(g.matrix),(c!==g||d!==g.version||u!==i.toneMapping)&&(a.material.needsUpdate=!0,c=g,d=g.version,u=i.toneMapping),f.unshift(a,a.geometry,a.material,0,0,null))}function p(f,m){t.buffers.color.setClear(f.r,f.g,f.b,m,r)}return{getClearColor:function(){return o},setClearColor:function(f,m=1){o.set(f),s=m,p(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(f){s=f,p(o,s)},render:h}}function Aoe(i,e,t,n){let r=i.getParameter(34921),o=n.isWebGL2?null:e.get("OES_vertex_array_object"),s=n.isWebGL2||o!==null,a={},l=m(null),c=l;function d(B,j,q,k,G){let K=!1;if(s){let de=f(k,q,j);c!==de&&(c=de,h(c.object)),K=b(k,G),K&&g(k,G)}else{let de=j.wireframe===!0;(c.geometry!==k.id||c.program!==q.id||c.wireframe!==de)&&(c.geometry=k.id,c.program=q.id,c.wireframe=de,K=!0)}B.isInstancedMesh===!0&&(K=!0),G!==null&&t.update(G,34963),K&&(E(B,j,q,k),G!==null&&i.bindBuffer(34963,t.get(G).buffer))}function u(){return n.isWebGL2?i.createVertexArray():o.createVertexArrayOES()}function h(B){return n.isWebGL2?i.bindVertexArray(B):o.bindVertexArrayOES(B)}function p(B){return n.isWebGL2?i.deleteVertexArray(B):o.deleteVertexArrayOES(B)}function f(B,j,q){let k=q.wireframe===!0,G=a[B.id];G===void 0&&(G={},a[B.id]=G);let K=G[j.id];K===void 0&&(K={},G[j.id]=K);let de=K[k];return de===void 0&&(de=m(u()),K[k]=de),de}function m(B){let j=[],q=[],k=[];for(let G=0;G=0){let He=G[Te];if(He===void 0&&(Te==="instanceMatrix"&&B.instanceMatrix&&(He=B.instanceMatrix),Te==="instanceColor"&&B.instanceColor&&(He=B.instanceColor)),He!==void 0){let he=He.normalized,re=He.itemSize,qe=t.get(He);if(qe===void 0)continue;let ue=qe.buffer,Ge=qe.type,ut=qe.bytesPerElement;if(He.isInterleavedBufferAttribute){let Ve=He.data,Qe=Ve.stride,Dt=He.offset;if(Ve&&Ve.isInstancedInterleavedBuffer){for(let _e=0;_e0&&i.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";E="mediump"}return E==="mediump"&&i.getShaderPrecisionFormat(35633,36337).precision>0&&i.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let s=typeof WebGL2RenderingContext<"u"&&i instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext<"u"&&i instanceof WebGL2ComputeRenderingContext,a=t.precision!==void 0?t.precision:"highp",l=o(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);let c=s||e.has("WEBGL_draw_buffers"),d=t.logarithmicDepthBuffer===!0,u=i.getParameter(34930),h=i.getParameter(35660),p=i.getParameter(3379),f=i.getParameter(34076),m=i.getParameter(34921),b=i.getParameter(36347),g=i.getParameter(36348),_=i.getParameter(36349),x=h>0,C=s||e.has("OES_texture_float"),T=x&&C,D=s?i.getParameter(36183):0;return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:r,getMaxPrecision:o,precision:a,logarithmicDepthBuffer:d,maxTextures:u,maxVertexTextures:h,maxTextureSize:p,maxCubemapSize:f,maxAttributes:m,maxVertexUniforms:b,maxVaryings:g,maxFragmentUniforms:_,vertexTextures:x,floatFragmentTextures:C,floatVertexTextures:T,maxSamples:D}}function Loe(i){let e=this,t=null,n=0,r=!1,o=!1,s=new $o,a=new yi,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(u,h,p){let f=u.length!==0||h||n!==0||r;return r=h,t=d(u,p,0),n=u.length,f},this.beginShadows=function(){o=!0,d(null)},this.endShadows=function(){o=!1,c()},this.setState=function(u,h,p){let f=u.clippingPlanes,m=u.clipIntersection,b=u.clipShadows,g=i.get(u);if(!r||f===null||f.length===0||o&&!b)o?d(null):c();else{let _=o?0:n,x=_*4,C=g.clippingState||null;l.value=C,C=d(f,h,x,p);for(let T=0;T!==x;++T)C[T]=t[T];g.clippingState=C,this.numIntersection=m?this.numPlanes:0,this.numPlanes+=_}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(u,h,p,f){let m=u!==null?u.length:0,b=null;if(m!==0){if(b=l.value,f!==!0||b===null){let g=p+m*4,_=h.matrixWorldInverse;a.getNormalMatrix(_),(b===null||b.length0){let c=i.getRenderTarget(),d=new Rp(l.height/2);return d.fromEquirectangularTexture(i,s),e.set(s,d),i.setRenderTarget(c),s.addEventListener("dispose",r),t(d.texture,s.mapping)}else return null}}return s}function r(s){let a=s.target;a.removeEventListener("dispose",r);let l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:n,dispose:o}}var Jd=class extends Qd{constructor(e=-1,t=1,n=1,r=-1,o=.1,s=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,o=n-e,s=n+e,a=r+t,l=r-t;if(this.view!==null&&this.view.enabled){let c=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}};Jd.prototype.isOrthographicCamera=!0;var dc=class extends ws{constructor(e){super(e),this.type="RawShaderMaterial"}};dc.prototype.isRawShaderMaterial=!0;var Sp=4,sc=8,Ks=Math.pow(2,sc),yH=[.125,.215,.35,.446,.526,.582],xH=sc-Sp+1+yH.length,pp=20,uc={[sr]:0,[gc]:1,[Qw]:2,[qP]:3,[YP]:4,[XP]:5,[Zw]:6},LD=new Jd,{_lodPlanes:wg,_sizeLods:Tz,_sigmas:Dx}=Voe(),Dz=new je,FD=null,zd=(1+Math.sqrt(5))/2,fp=1/zd,Pz=[new R(1,1,1),new R(-1,1,1),new R(1,1,-1),new R(-1,1,-1),new R(0,zd,fp),new R(0,zd,-fp),new R(fp,0,zd),new R(-fp,0,zd),new R(zd,fp,0),new R(-zd,fp,0)],uw=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=zoe(pp),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){FD=this._renderer.getRenderTarget();let o=this._allocateTargets();return this._sceneToCubeUV(e,n,r,o),t>0&&this._blur(o,0,0,t),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e){return this._fromTexture(e)}fromCubemap(e){return this._fromTexture(e)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=Az(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=Rz(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let e=0;e2?Ks:0,Ks,Ks),d.setRenderTarget(r),b&&d.render(m,a),d.render(e,a)}m.geometry.dispose(),m.material.dispose(),d.toneMapping=p,d.outputEncoding=h,d.autoClear=u,e.background=g}_setEncoding(e,t){this._renderer.capabilities.isWebGL2===!0&&t.format===rr&&t.type===Ka&&t.encoding===gc?e.value=uc[sr]:e.value=uc[t.encoding]}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===uu||e.mapping===hu;r?this._cubemapShader==null&&(this._cubemapShader=Az()):this._equirectShader==null&&(this._equirectShader=Rz());let o=r?this._cubemapShader:this._equirectShader,s=new di(wg[0],o),a=o.uniforms;a.envMap.value=e,r||a.texelSize.value.set(1/e.image.width,1/e.image.height),this._setEncoding(a.inputEncoding,e),this._setEncoding(a.outputEncoding,t.texture),Px(t,0,0,3*Ks,2*Ks),n.setRenderTarget(t),n.render(s,LD)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let r=1;rpp&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${pp}`);let g=[],_=0;for(let D=0;Dsc-Sp?r-sc+Sp:0);Px(t,C,T,3*x,2*x),l.setRenderTarget(t),l.render(u,LD)}};function Boe(i){return i===void 0||i.type!==Ka?!1:i.encoding===sr||i.encoding===gc||i.encoding===Zw}function Voe(){let i=[],e=[],t=[],n=sc;for(let r=0;rsc-Sp?s=yH[r-sc+Sp-1]:r==0&&(s=0),t.push(s);let a=1/(o-1),l=-a/2,c=1+a/2,d=[l,l,c,l,c,c,l,l,c,c,l,c],u=6,h=6,p=3,f=2,m=1,b=new Float32Array(p*h*u),g=new Float32Array(f*h*u),_=new Float32Array(m*h*u);for(let C=0;C2?0:-1,E=[T,D,0,T+2/3,D,0,T+2/3,D+1,0,T,D,0,T+2/3,D+1,0,T,D+1,0];b.set(E,p*h*C),g.set(d,f*h*C);let P=[C,C,C,C,C,C];_.set(P,m*h*C)}let x=new It;x.setAttribute("position",new un(b,p)),x.setAttribute("uv",new un(g,f)),x.setAttribute("faceIndex",new un(_,m)),i.push(x),n>Sp&&n--}return{_lodPlanes:i,_sizeLods:e,_sigmas:t}}function Oz(i){let e=new yo(3*Ks,3*Ks,i);return e.texture.mapping=Qp,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function Px(i,e,t,n,r){i.viewport.set(e,t,n,r),i.scissor.set(e,t,n,r)}function zoe(i){let e=new Float32Array(i),t=new R(0,1,0);return new dc({name:"SphericalGaussianBlur",defines:{n:i},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:e},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:t},inputEncoding:{value:uc[sr]},outputEncoding:{value:uc[sr]}},vertexShader:QP(),fragmentShader:` precision mediump float; precision mediump int; @@ -2858,7 +2858,7 @@ void main() { uniform float mipInt; uniform vec3 poleAxis; - ${JP()} + ${KP()} #define ENVMAP_TYPE_CUBE_UV #include @@ -2907,7 +2907,7 @@ void main() { gl_FragColor = linearToOutputTexel( gl_FragColor ); } - `,blending:Za,depthTest:!1,depthWrite:!1})}function Az(){let i=new xe(1,1);return new dc({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:i},inputEncoding:{value:uc[sr]},outputEncoding:{value:uc[sr]}},vertexShader:KP(),fragmentShader:` + `,blending:Za,depthTest:!1,depthWrite:!1})}function Rz(){let i=new xe(1,1);return new dc({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:i},inputEncoding:{value:uc[sr]},outputEncoding:{value:uc[sr]}},vertexShader:QP(),fragmentShader:` precision mediump float; precision mediump int; @@ -2917,7 +2917,7 @@ void main() { uniform sampler2D envMap; uniform vec2 texelSize; - ${JP()} + ${KP()} #include @@ -2945,7 +2945,7 @@ void main() { gl_FragColor = linearToOutputTexel( gl_FragColor ); } - `,blending:Za,depthTest:!1,depthWrite:!1})}function Nz(){return new dc({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:uc[sr]},outputEncoding:{value:uc[sr]}},vertexShader:KP(),fragmentShader:` + `,blending:Za,depthTest:!1,depthWrite:!1})}function Az(){return new dc({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:uc[sr]},outputEncoding:{value:uc[sr]}},vertexShader:QP(),fragmentShader:` precision mediump float; precision mediump int; @@ -2954,7 +2954,7 @@ void main() { uniform samplerCube envMap; - ${JP()} + ${KP()} void main() { @@ -2963,7 +2963,7 @@ void main() { gl_FragColor = linearToOutputTexel( gl_FragColor ); } - `,blending:Za,depthTest:!1,depthWrite:!1})}function KP(){return` + `,blending:Za,depthTest:!1,depthWrite:!1})}function QP(){return` precision mediump float; precision mediump int; @@ -3020,7 +3020,7 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function JP(){return` + `}function KP(){return` uniform int inputEncoding; uniform int outputEncoding; @@ -3100,37 +3100,37 @@ void main() { return inputTexelToLinear( color ); } - `}function Uoe(i){let e=new WeakMap,t=null;function n(a){if(a&&a.isTexture&&a.isRenderTargetTexture===!1){let l=a.mapping,c=l===Ag||l===Ng,d=l===uu||l===hu;if(c||d){if(e.has(a))return e.get(a).texture;{let u=a.image;if(c&&u&&u.height>0||d&&u&&r(u)){let h=i.getRenderTarget();t===null&&(t=new dw(i));let p=c?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,p),i.setRenderTarget(h),a.addEventListener("dispose",o),p.texture}else return null}}}return a}function r(a){let l=0,c=6;for(let d=0;d65535?Dp:Tp)(h,1);b.version=m;let g=o.get(u);g&&e.remove(g),o.set(u,b)}function d(u){let h=o.get(u);if(h){let p=u.index;p!==null&&h.versione.maxTextureSize&&(P=Math.ceil(E/e.maxTextureSize),E=e.maxTextureSize);let Y=new Float32Array(E*P*4*f),$=new Np(Y,E,P,f);$.format=rr,$.type=Js;let U=D*4;for(let O=0;O0)return i;let r=e*t,o=Lz[r];if(o===void 0&&(o=new Float32Array(r),Lz[r]=o),e!==0){n.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=t,i[s].toArray(o,a)}return o}function Hr(i,e){if(i.length!==e.length)return!1;for(let t=0,n=i.length;t0||d&&u&&r(u)){let h=i.getRenderTarget();t===null&&(t=new uw(i));let p=c?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,p),i.setRenderTarget(h),a.addEventListener("dispose",o),p.texture}else return null}}}return a}function r(a){let l=0,c=6;for(let d=0;d65535?Dp:Tp)(h,1);b.version=m;let g=o.get(u);g&&e.remove(g),o.set(u,b)}function d(u){let h=o.get(u);if(h){let p=u.index;p!==null&&h.versione.maxTextureSize&&(P=Math.ceil(E/e.maxTextureSize),E=e.maxTextureSize);let Y=new Float32Array(E*P*4*f),$=new Np(Y,E,P,f);$.format=rr,$.type=Js;let U=D*4;for(let O=0;O0)return i;let r=e*t,o=kz[r];if(o===void 0&&(o=new Float32Array(r),kz[r]=o),e!==0){n.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=t,i[s].toArray(o,a)}return o}function Hr(i,e){if(i.length!==e.length)return!1;for(let t=0,n=i.length;t/gm;function pP(i){return i.replace(Wse,$se)}function $se(i,e){let t=rn[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return pP(t)}var qse=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Yse=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function $z(i){return i.replace(Yse,DH).replace(qse,Xse)}function Xse(i,e,t,n){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),DH(i,e,t,n)}function DH(i,e,t,n){let r="";for(let o=parseInt(e);o/gm;function hP(i){return i.replace(Wse,$se)}function $se(i,e){let t=rn[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return hP(t)}var qse=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Yse=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Wz(i){return i.replace(Yse,TH).replace(qse,Xse)}function Xse(i,e,t,n){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),TH(i,e,t,n)}function TH(i,e,t,n){let r="";for(let o=parseInt(e);o0?i.gammaFactor:1,p=t.isWebGL2?"":Hse(t),f=Gse(o),m=r.createProgram(),b,g,_=t.glslVersion?"#version "+t.glslVersion+` -`:"";t.isRawShaderMaterial?(b=[f].filter(Ig).join(` +#define LOW_PRECISION`),e}function Zse(i){let e="SHADOWMAP_TYPE_BASIC";return i.shadowMapType===UP?e="SHADOWMAP_TYPE_PCF":i.shadowMapType===UU?e="SHADOWMAP_TYPE_PCF_SOFT":i.shadowMapType===bp&&(e="SHADOWMAP_TYPE_VSM"),e}function Qse(i){let e="ENVMAP_TYPE_CUBE";if(i.envMap)switch(i.envMapMode){case uu:case hu:e="ENVMAP_TYPE_CUBE";break;case Qp:case B_:e="ENVMAP_TYPE_CUBE_UV";break}return e}function Kse(i){let e="ENVMAP_MODE_REFLECTION";if(i.envMap)switch(i.envMapMode){case hu:case B_:e="ENVMAP_MODE_REFRACTION";break}return e}function Jse(i){let e="ENVMAP_BLENDING_NONE";if(i.envMap)switch(i.combine){case F_:e="ENVMAP_BLENDING_MULTIPLY";break;case a4:e="ENVMAP_BLENDING_MIX";break;case l4:e="ENVMAP_BLENDING_ADD";break}return e}function eae(i,e,t,n){let r=i.getContext(),o=t.defines,s=t.vertexShader,a=t.fragmentShader,l=Zse(t),c=Qse(t),d=Kse(t),u=Jse(t),h=i.gammaFactor>0?i.gammaFactor:1,p=t.isWebGL2?"":Hse(t),f=Gse(o),m=r.createProgram(),b,g,_=t.glslVersion?"#version "+t.glslVersion+` +`:"";t.isRawShaderMaterial?(b=[f].filter(Tg).join(` `),b.length>0&&(b+=` -`),g=[p,f].filter(Ig).join(` +`),g=[p,f].filter(Tg).join(` `),g.length>0&&(g+=` -`)):(b=[qz(t),"#define SHADER_NAME "+t.shaderName,f,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+h,"#define MAX_BONES "+t.maxBones,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+d:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.displacementMap&&t.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.useVertexTexture?"#define BONE_TEXTURE":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(Ig).join(` -`),g=[p,qz(t),"#define SHADER_NAME "+t.shaderName,f,"#define GAMMA_FACTOR "+h,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+d:"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(t.extensionShaderTextureLOD||t.envMap)&&t.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==oc?"#define TONE_MAPPING":"",t.toneMapping!==oc?rn.tonemapping_pars_fragment:"",t.toneMapping!==oc?Use("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.format===Wd?"#define OPAQUE":"",rn.encodings_pars_fragment,t.map?kd("mapTexelToLinear",t.mapEncoding):"",t.matcap?kd("matcapTexelToLinear",t.matcapEncoding):"",t.envMap?kd("envMapTexelToLinear",t.envMapEncoding):"",t.emissiveMap?kd("emissiveMapTexelToLinear",t.emissiveMapEncoding):"",t.specularColorMap?kd("specularColorMapTexelToLinear",t.specularColorMapEncoding):"",t.sheenColorMap?kd("sheenColorMapTexelToLinear",t.sheenColorMapEncoding):"",t.lightMap?kd("lightMapTexelToLinear",t.lightMapEncoding):"",zse("linearToOutputTexel",t.outputEncoding),t.depthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` -`].filter(Ig).join(` -`)),s=pP(s),s=jz(s,t),s=Wz(s,t),a=pP(a),a=jz(a,t),a=Wz(a,t),s=$z(s),a=$z(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(_=`#version 300 es +`)):(b=[$z(t),"#define SHADER_NAME "+t.shaderName,f,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+h,"#define MAX_BONES "+t.maxBones,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+d:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.displacementMap&&t.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.useVertexTexture?"#define BONE_TEXTURE":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(Tg).join(` +`),g=[p,$z(t),"#define SHADER_NAME "+t.shaderName,f,"#define GAMMA_FACTOR "+h,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+d:"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(t.extensionShaderTextureLOD||t.envMap)&&t.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==oc?"#define TONE_MAPPING":"",t.toneMapping!==oc?rn.tonemapping_pars_fragment:"",t.toneMapping!==oc?Use("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.format===Wd?"#define OPAQUE":"",rn.encodings_pars_fragment,t.map?kd("mapTexelToLinear",t.mapEncoding):"",t.matcap?kd("matcapTexelToLinear",t.matcapEncoding):"",t.envMap?kd("envMapTexelToLinear",t.envMapEncoding):"",t.emissiveMap?kd("emissiveMapTexelToLinear",t.emissiveMapEncoding):"",t.specularColorMap?kd("specularColorMapTexelToLinear",t.specularColorMapEncoding):"",t.sheenColorMap?kd("sheenColorMapTexelToLinear",t.sheenColorMapEncoding):"",t.lightMap?kd("lightMapTexelToLinear",t.lightMapEncoding):"",zse("linearToOutputTexel",t.outputEncoding),t.depthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`].filter(Tg).join(` +`)),s=hP(s),s=Gz(s,t),s=jz(s,t),a=hP(a),a=Gz(a,t),a=jz(a,t),s=Wz(s),a=Wz(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(_=`#version 300 es `,b=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+b,g=["#define varying in",t.glslVersion===uP?"":"out highp vec4 pc_fragColor;",t.glslVersion===uP?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`+b,g=["#define varying in",t.glslVersion===dP?"":"out highp vec4 pc_fragColor;",t.glslVersion===dP?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` -`+g);let x=_+b+s,C=_+g+a,T=Hz(r,35633,x),D=Hz(r,35632,C);if(r.attachShader(m,T),r.attachShader(m,D),t.index0AttributeName!==void 0?r.bindAttribLocation(m,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(m,0,"position"),r.linkProgram(m),i.debug.checkShaderErrors){let Y=r.getProgramInfoLog(m).trim(),$=r.getShaderInfoLog(T).trim(),U=r.getShaderInfoLog(D).trim(),O=!0,B=!0;if(r.getProgramParameter(m,35714)===!1){O=!1;let j=Gz(r,T,"vertex"),q=Gz(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(m,35715)+` +`+g);let x=_+b+s,C=_+g+a,T=Uz(r,35633,x),D=Uz(r,35632,C);if(r.attachShader(m,T),r.attachShader(m,D),t.index0AttributeName!==void 0?r.bindAttribLocation(m,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(m,0,"position"),r.linkProgram(m),i.debug.checkShaderErrors){let Y=r.getProgramInfoLog(m).trim(),$=r.getShaderInfoLog(T).trim(),U=r.getShaderInfoLog(D).trim(),O=!0,B=!0;if(r.getProgramParameter(m,35714)===!1){O=!1;let j=Hz(r,T,"vertex"),q=Hz(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(m,35715)+` Program Info Log: `+Y+` `+j+` -`+q)}else Y!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Y):($===""||U==="")&&(B=!1);B&&(this.diagnostics={runnable:O,programLog:Y,vertexShader:{log:$,prefix:b},fragmentShader:{log:U,prefix:g}})}r.deleteShader(T),r.deleteShader(D);let E;this.getUniforms=function(){return E===void 0&&(E=new ac(r,m)),E};let P;return this.getAttributes=function(){return P===void 0&&(P=jse(r,m)),P},this.destroy=function(){n.releaseStatesOfProgram(this),r.deleteProgram(m),this.program=void 0},this.name=t.shaderName,this.id=Bse++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=T,this.fragmentShader=D,this}function tae(i,e,t,n,r,o,s){let a=[],l=r.isWebGL2,c=r.logarithmicDepthBuffer,d=r.floatVertexTextures,u=r.maxVertexUniforms,h=r.vertexTextures,p=r.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},m=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoat","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap",,"roughnessMap","metalnessMap","gradientMap","alphaMap","alphaTest","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","morphTargetsCount","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","format","specularIntensityMap","specularColorMap","specularColorMapEncoding","transmission","transmissionMap","thicknessMap","sheen","sheenColorMap","sheenColorMapEncoding","sheenRoughnessMap"];function b(E){let Y=E.skeleton.bones;if(d)return 1024;{let U=Math.floor((u-20)/4),O=Math.min(U,Y.length);return O0,Ee=E.clearcoat>0;return{isWebGL2:l,shaderID:q,shaderName:E.type,vertexShader:G,fragmentShader:K,defines:E.defines,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:p,instancing:U.isInstancedMesh===!0,instancingColor:U.isInstancedMesh===!0&&U.instanceColor!==null,supportsVertexTextures:h,outputEncoding:de!==null?g(de.texture):i.outputEncoding,map:!!E.map,mapEncoding:g(E.map),matcap:!!E.matcap,matcapEncoding:g(E.matcap),envMap:!!j,envMapMode:j&&j.mapping,envMapEncoding:g(j),envMapCubeUV:!!j&&(j.mapping===Qp||j.mapping===F_),lightMap:!!E.lightMap,lightMapEncoding:g(E.lightMap),aoMap:!!E.aoMap,emissiveMap:!!E.emissiveMap,emissiveMapEncoding:g(E.emissiveMap),bumpMap:!!E.bumpMap,normalMap:!!E.normalMap,objectSpaceNormalMap:E.normalMapType===fH,tangentSpaceNormalMap:E.normalMapType===fu,clearcoat:Ee,clearcoatMap:Ee&&!!E.clearcoatMap,clearcoatRoughnessMap:Ee&&!!E.clearcoatRoughnessMap,clearcoatNormalMap:Ee&&!!E.clearcoatNormalMap,displacementMap:!!E.displacementMap,roughnessMap:!!E.roughnessMap,metalnessMap:!!E.metalnessMap,specularMap:!!E.specularMap,specularIntensityMap:!!E.specularIntensityMap,specularColorMap:!!E.specularColorMap,specularColorMapEncoding:g(E.specularColorMap),alphaMap:!!E.alphaMap,alphaTest:Te,gradientMap:!!E.gradientMap,sheen:E.sheen>0,sheenColorMap:!!E.sheenColorMap,sheenColorMapEncoding:g(E.sheenColorMap),sheenRoughnessMap:!!E.sheenRoughnessMap,transmission:E.transmission>0,transmissionMap:!!E.transmissionMap,thicknessMap:!!E.thicknessMap,combine:E.combine,vertexTangents:!!E.normalMap&&!!U.geometry&&!!U.geometry.attributes.tangent,vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!U.geometry&&!!U.geometry.attributes.color&&U.geometry.attributes.color.itemSize===4,vertexUvs:!!E.map||!!E.bumpMap||!!E.normalMap||!!E.specularMap||!!E.alphaMap||!!E.emissiveMap||!!E.roughnessMap||!!E.metalnessMap||!!E.clearcoatMap||!!E.clearcoatRoughnessMap||!!E.clearcoatNormalMap||!!E.displacementMap||!!E.transmissionMap||!!E.thicknessMap||!!E.specularIntensityMap||!!E.specularColorMap||!!E.sheenColorMap||E.sheenRoughnessMap,uvsVertexOnly:!(E.map||E.bumpMap||E.normalMap||E.specularMap||E.alphaMap||E.emissiveMap||E.roughnessMap||E.metalnessMap||E.clearcoatNormalMap||E.transmission>0||E.transmissionMap||E.thicknessMap||E.specularIntensityMap||E.specularColorMap||!!E.sheen>0||E.sheenColorMap||E.sheenRoughnessMap)&&!!E.displacementMap,fog:!!O,useFog:E.fog,fogExp2:O&&O.isFogExp2,flatShading:!!E.flatShading,sizeAttenuation:E.sizeAttenuation,logarithmicDepthBuffer:c,skinning:U.isSkinnedMesh===!0&&k>0,maxBones:k,useVertexTexture:d,morphTargets:!!U.geometry&&!!U.geometry.morphAttributes.position,morphNormals:!!U.geometry&&!!U.geometry.morphAttributes.normal,morphTargetsCount:U.geometry&&U.geometry.morphAttributes.position?U.geometry.morphAttributes.position.length:0,numDirLights:P.directional.length,numPointLights:P.point.length,numSpotLights:P.spot.length,numRectAreaLights:P.rectArea.length,numHemiLights:P.hemi.length,numDirLightShadows:P.directionalShadowMap.length,numPointLightShadows:P.pointShadowMap.length,numSpotLightShadows:P.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,format:E.format,dithering:E.dithering,shadowMapEnabled:i.shadowMap.enabled&&Y.length>0,shadowMapType:i.shadowMap.type,toneMapping:E.toneMapped?i.toneMapping:oc,physicallyCorrectLights:i.physicallyCorrectLights,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===Xd,flipSided:E.side===bi,depthPacking:E.depthPacking!==void 0?E.depthPacking:!1,index0AttributeName:E.index0AttributeName,extensionDerivatives:E.extensions&&E.extensions.derivatives,extensionFragDepth:E.extensions&&E.extensions.fragDepth,extensionDrawBuffers:E.extensions&&E.extensions.drawBuffers,extensionShaderTextureLOD:E.extensions&&E.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:l||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||n.has("EXT_shader_texture_lod"),customProgramCacheKey:E.customProgramCacheKey()}}function x(E){let P=[];if(E.shaderID?P.push(E.shaderID):(P.push(gz(E.fragmentShader)),P.push(gz(E.vertexShader))),E.defines!==void 0)for(let Y in E.defines)P.push(Y),P.push(E.defines[Y]);if(E.isRawShaderMaterial===!1){for(let Y=0;Y0?r.push(x):m.transparent===!0?o.push(x):n.push(x)}function d(p,f,m,b,g,_){let x=l(p,f,m,b,g,_);m.transmission>0?r.unshift(x):m.transparent===!0?o.unshift(x):n.unshift(x)}function u(p,f){n.length>1&&n.sort(p||iae),r.length>1&&r.sort(f||Yz),o.length>1&&o.sort(f||Yz)}function h(){for(let p=t,f=e.length;p=e.get(r).length?(s=new Xz(i),e.get(r).push(s)):s=e.get(r)[o],s}function n(){e=new WeakMap}return{get:t,dispose:n}}function oae(){let i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new R,color:new je};break;case"SpotLight":t={position:new R,direction:new R,color:new je,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new R,color:new je,distance:0,decay:0};break;case"HemisphereLight":t={direction:new R,skyColor:new je,groundColor:new je};break;case"RectAreaLight":t={color:new je,position:new R,halfWidth:new R,halfHeight:new R};break}return i[e.id]=t,t}}}function sae(){let i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,shadowCameraNear:1,shadowCameraFar:1e3};break}return i[e.id]=t,t}}}var aae=0;function lae(i,e){return(e.castShadow?1:0)-(i.castShadow?1:0)}function cae(i,e){let t=new oae,n=sae(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let d=0;d<9;d++)r.probe.push(new R);let o=new R,s=new lt,a=new lt;function l(d,u){let h=0,p=0,f=0;for(let Y=0;Y<9;Y++)r.probe[Y].set(0,0,0);let m=0,b=0,g=0,_=0,x=0,C=0,T=0,D=0;d.sort(lae);let E=u!==!0?Math.PI:1;for(let Y=0,$=d.length;Y<$;Y++){let U=d[Y],O=U.color,B=U.intensity,j=U.distance,q=U.shadow&&U.shadow.map?U.shadow.map.texture:null;if(U.isAmbientLight)h+=O.r*B*E,p+=O.g*B*E,f+=O.b*B*E;else if(U.isLightProbe)for(let k=0;k<9;k++)r.probe[k].addScaledVector(U.sh.coefficients[k],B);else if(U.isDirectionalLight){let k=t.get(U);if(k.color.copy(U.color).multiplyScalar(U.intensity*E),U.castShadow){let G=U.shadow,K=n.get(U);K.shadowBias=G.bias,K.shadowNormalBias=G.normalBias,K.shadowRadius=G.radius,K.shadowMapSize=G.mapSize,r.directionalShadow[m]=K,r.directionalShadowMap[m]=q,r.directionalShadowMatrix[m]=U.shadow.matrix,C++}r.directional[m]=k,m++}else if(U.isSpotLight){let k=t.get(U);if(k.position.setFromMatrixPosition(U.matrixWorld),k.color.copy(O).multiplyScalar(B*E),k.distance=j,k.coneCos=Math.cos(U.angle),k.penumbraCos=Math.cos(U.angle*(1-U.penumbra)),k.decay=U.decay,U.castShadow){let G=U.shadow,K=n.get(U);K.shadowBias=G.bias,K.shadowNormalBias=G.normalBias,K.shadowRadius=G.radius,K.shadowMapSize=G.mapSize,r.spotShadow[g]=K,r.spotShadowMap[g]=q,r.spotShadowMatrix[g]=U.shadow.matrix,D++}r.spot[g]=k,g++}else if(U.isRectAreaLight){let k=t.get(U);k.color.copy(O).multiplyScalar(B),k.halfWidth.set(U.width*.5,0,0),k.halfHeight.set(0,U.height*.5,0),r.rectArea[_]=k,_++}else if(U.isPointLight){let k=t.get(U);if(k.color.copy(U.color).multiplyScalar(U.intensity*E),k.distance=U.distance,k.decay=U.decay,U.castShadow){let G=U.shadow,K=n.get(U);K.shadowBias=G.bias,K.shadowNormalBias=G.normalBias,K.shadowRadius=G.radius,K.shadowMapSize=G.mapSize,K.shadowCameraNear=G.camera.near,K.shadowCameraFar=G.camera.far,r.pointShadow[b]=K,r.pointShadowMap[b]=q,r.pointShadowMatrix[b]=U.shadow.matrix,T++}r.point[b]=k,b++}else if(U.isHemisphereLight){let k=t.get(U);k.skyColor.copy(U.color).multiplyScalar(B*E),k.groundColor.copy(U.groundColor).multiplyScalar(B*E),r.hemi[x]=k,x++}}_>0&&(e.isWebGL2||i.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Ue.LTC_FLOAT_1,r.rectAreaLTC2=Ue.LTC_FLOAT_2):i.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Ue.LTC_HALF_1,r.rectAreaLTC2=Ue.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=h,r.ambient[1]=p,r.ambient[2]=f;let P=r.hash;(P.directionalLength!==m||P.pointLength!==b||P.spotLength!==g||P.rectAreaLength!==_||P.hemiLength!==x||P.numDirectionalShadows!==C||P.numPointShadows!==T||P.numSpotShadows!==D)&&(r.directional.length=m,r.spot.length=g,r.rectArea.length=_,r.point.length=b,r.hemi.length=x,r.directionalShadow.length=C,r.directionalShadowMap.length=C,r.pointShadow.length=T,r.pointShadowMap.length=T,r.spotShadow.length=D,r.spotShadowMap.length=D,r.directionalShadowMatrix.length=C,r.pointShadowMatrix.length=T,r.spotShadowMatrix.length=D,P.directionalLength=m,P.pointLength=b,P.spotLength=g,P.rectAreaLength=_,P.hemiLength=x,P.numDirectionalShadows=C,P.numPointShadows=T,P.numSpotShadows=D,r.version=aae++)}function c(d,u){let h=0,p=0,f=0,m=0,b=0,g=u.matrixWorldInverse;for(let _=0,x=d.length;_=t.get(o).length?(a=new Zz(i,e),t.get(o).push(a)):a=t.get(o)[s],a}function r(){t=new WeakMap}return{get:n,dispose:r}}var kp=class extends Ii{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=hH,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}};kp.prototype.isMeshDepthMaterial=!0;var Lp=class extends Ii{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new R,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};Lp.prototype.isMeshDistanceMaterial=!0;var uae=`void main() { +`+q)}else Y!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Y):($===""||U==="")&&(B=!1);B&&(this.diagnostics={runnable:O,programLog:Y,vertexShader:{log:$,prefix:b},fragmentShader:{log:U,prefix:g}})}r.deleteShader(T),r.deleteShader(D);let E;this.getUniforms=function(){return E===void 0&&(E=new ac(r,m)),E};let P;return this.getAttributes=function(){return P===void 0&&(P=jse(r,m)),P},this.destroy=function(){n.releaseStatesOfProgram(this),r.deleteProgram(m),this.program=void 0},this.name=t.shaderName,this.id=Bse++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=T,this.fragmentShader=D,this}function tae(i,e,t,n,r,o,s){let a=[],l=r.isWebGL2,c=r.logarithmicDepthBuffer,d=r.floatVertexTextures,u=r.maxVertexUniforms,h=r.vertexTextures,p=r.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},m=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoat","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap",,"roughnessMap","metalnessMap","gradientMap","alphaMap","alphaTest","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","morphTargetsCount","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","format","specularIntensityMap","specularColorMap","specularColorMapEncoding","transmission","transmissionMap","thicknessMap","sheen","sheenColorMap","sheenColorMapEncoding","sheenRoughnessMap"];function b(E){let Y=E.skeleton.bones;if(d)return 1024;{let U=Math.floor((u-20)/4),O=Math.min(U,Y.length);return O0,Ee=E.clearcoat>0;return{isWebGL2:l,shaderID:q,shaderName:E.type,vertexShader:G,fragmentShader:K,defines:E.defines,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:p,instancing:U.isInstancedMesh===!0,instancingColor:U.isInstancedMesh===!0&&U.instanceColor!==null,supportsVertexTextures:h,outputEncoding:de!==null?g(de.texture):i.outputEncoding,map:!!E.map,mapEncoding:g(E.map),matcap:!!E.matcap,matcapEncoding:g(E.matcap),envMap:!!j,envMapMode:j&&j.mapping,envMapEncoding:g(j),envMapCubeUV:!!j&&(j.mapping===Qp||j.mapping===B_),lightMap:!!E.lightMap,lightMapEncoding:g(E.lightMap),aoMap:!!E.aoMap,emissiveMap:!!E.emissiveMap,emissiveMapEncoding:g(E.emissiveMap),bumpMap:!!E.bumpMap,normalMap:!!E.normalMap,objectSpaceNormalMap:E.normalMapType===pH,tangentSpaceNormalMap:E.normalMapType===fu,clearcoat:Ee,clearcoatMap:Ee&&!!E.clearcoatMap,clearcoatRoughnessMap:Ee&&!!E.clearcoatRoughnessMap,clearcoatNormalMap:Ee&&!!E.clearcoatNormalMap,displacementMap:!!E.displacementMap,roughnessMap:!!E.roughnessMap,metalnessMap:!!E.metalnessMap,specularMap:!!E.specularMap,specularIntensityMap:!!E.specularIntensityMap,specularColorMap:!!E.specularColorMap,specularColorMapEncoding:g(E.specularColorMap),alphaMap:!!E.alphaMap,alphaTest:Te,gradientMap:!!E.gradientMap,sheen:E.sheen>0,sheenColorMap:!!E.sheenColorMap,sheenColorMapEncoding:g(E.sheenColorMap),sheenRoughnessMap:!!E.sheenRoughnessMap,transmission:E.transmission>0,transmissionMap:!!E.transmissionMap,thicknessMap:!!E.thicknessMap,combine:E.combine,vertexTangents:!!E.normalMap&&!!U.geometry&&!!U.geometry.attributes.tangent,vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!U.geometry&&!!U.geometry.attributes.color&&U.geometry.attributes.color.itemSize===4,vertexUvs:!!E.map||!!E.bumpMap||!!E.normalMap||!!E.specularMap||!!E.alphaMap||!!E.emissiveMap||!!E.roughnessMap||!!E.metalnessMap||!!E.clearcoatMap||!!E.clearcoatRoughnessMap||!!E.clearcoatNormalMap||!!E.displacementMap||!!E.transmissionMap||!!E.thicknessMap||!!E.specularIntensityMap||!!E.specularColorMap||!!E.sheenColorMap||E.sheenRoughnessMap,uvsVertexOnly:!(E.map||E.bumpMap||E.normalMap||E.specularMap||E.alphaMap||E.emissiveMap||E.roughnessMap||E.metalnessMap||E.clearcoatNormalMap||E.transmission>0||E.transmissionMap||E.thicknessMap||E.specularIntensityMap||E.specularColorMap||!!E.sheen>0||E.sheenColorMap||E.sheenRoughnessMap)&&!!E.displacementMap,fog:!!O,useFog:E.fog,fogExp2:O&&O.isFogExp2,flatShading:!!E.flatShading,sizeAttenuation:E.sizeAttenuation,logarithmicDepthBuffer:c,skinning:U.isSkinnedMesh===!0&&k>0,maxBones:k,useVertexTexture:d,morphTargets:!!U.geometry&&!!U.geometry.morphAttributes.position,morphNormals:!!U.geometry&&!!U.geometry.morphAttributes.normal,morphTargetsCount:U.geometry&&U.geometry.morphAttributes.position?U.geometry.morphAttributes.position.length:0,numDirLights:P.directional.length,numPointLights:P.point.length,numSpotLights:P.spot.length,numRectAreaLights:P.rectArea.length,numHemiLights:P.hemi.length,numDirLightShadows:P.directionalShadowMap.length,numPointLightShadows:P.pointShadowMap.length,numSpotLightShadows:P.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,format:E.format,dithering:E.dithering,shadowMapEnabled:i.shadowMap.enabled&&Y.length>0,shadowMapType:i.shadowMap.type,toneMapping:E.toneMapped?i.toneMapping:oc,physicallyCorrectLights:i.physicallyCorrectLights,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===Xd,flipSided:E.side===bi,depthPacking:E.depthPacking!==void 0?E.depthPacking:!1,index0AttributeName:E.index0AttributeName,extensionDerivatives:E.extensions&&E.extensions.derivatives,extensionFragDepth:E.extensions&&E.extensions.fragDepth,extensionDrawBuffers:E.extensions&&E.extensions.drawBuffers,extensionShaderTextureLOD:E.extensions&&E.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:l||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||n.has("EXT_shader_texture_lod"),customProgramCacheKey:E.customProgramCacheKey()}}function x(E){let P=[];if(E.shaderID?P.push(E.shaderID):(P.push(mz(E.fragmentShader)),P.push(mz(E.vertexShader))),E.defines!==void 0)for(let Y in E.defines)P.push(Y),P.push(E.defines[Y]);if(E.isRawShaderMaterial===!1){for(let Y=0;Y0?r.push(x):m.transparent===!0?o.push(x):n.push(x)}function d(p,f,m,b,g,_){let x=l(p,f,m,b,g,_);m.transmission>0?r.unshift(x):m.transparent===!0?o.unshift(x):n.unshift(x)}function u(p,f){n.length>1&&n.sort(p||iae),r.length>1&&r.sort(f||qz),o.length>1&&o.sort(f||qz)}function h(){for(let p=t,f=e.length;p=e.get(r).length?(s=new Yz(i),e.get(r).push(s)):s=e.get(r)[o],s}function n(){e=new WeakMap}return{get:t,dispose:n}}function oae(){let i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new R,color:new je};break;case"SpotLight":t={position:new R,direction:new R,color:new je,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new R,color:new je,distance:0,decay:0};break;case"HemisphereLight":t={direction:new R,skyColor:new je,groundColor:new je};break;case"RectAreaLight":t={color:new je,position:new R,halfWidth:new R,halfHeight:new R};break}return i[e.id]=t,t}}}function sae(){let i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,shadowCameraNear:1,shadowCameraFar:1e3};break}return i[e.id]=t,t}}}var aae=0;function lae(i,e){return(e.castShadow?1:0)-(i.castShadow?1:0)}function cae(i,e){let t=new oae,n=sae(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let d=0;d<9;d++)r.probe.push(new R);let o=new R,s=new lt,a=new lt;function l(d,u){let h=0,p=0,f=0;for(let Y=0;Y<9;Y++)r.probe[Y].set(0,0,0);let m=0,b=0,g=0,_=0,x=0,C=0,T=0,D=0;d.sort(lae);let E=u!==!0?Math.PI:1;for(let Y=0,$=d.length;Y<$;Y++){let U=d[Y],O=U.color,B=U.intensity,j=U.distance,q=U.shadow&&U.shadow.map?U.shadow.map.texture:null;if(U.isAmbientLight)h+=O.r*B*E,p+=O.g*B*E,f+=O.b*B*E;else if(U.isLightProbe)for(let k=0;k<9;k++)r.probe[k].addScaledVector(U.sh.coefficients[k],B);else if(U.isDirectionalLight){let k=t.get(U);if(k.color.copy(U.color).multiplyScalar(U.intensity*E),U.castShadow){let G=U.shadow,K=n.get(U);K.shadowBias=G.bias,K.shadowNormalBias=G.normalBias,K.shadowRadius=G.radius,K.shadowMapSize=G.mapSize,r.directionalShadow[m]=K,r.directionalShadowMap[m]=q,r.directionalShadowMatrix[m]=U.shadow.matrix,C++}r.directional[m]=k,m++}else if(U.isSpotLight){let k=t.get(U);if(k.position.setFromMatrixPosition(U.matrixWorld),k.color.copy(O).multiplyScalar(B*E),k.distance=j,k.coneCos=Math.cos(U.angle),k.penumbraCos=Math.cos(U.angle*(1-U.penumbra)),k.decay=U.decay,U.castShadow){let G=U.shadow,K=n.get(U);K.shadowBias=G.bias,K.shadowNormalBias=G.normalBias,K.shadowRadius=G.radius,K.shadowMapSize=G.mapSize,r.spotShadow[g]=K,r.spotShadowMap[g]=q,r.spotShadowMatrix[g]=U.shadow.matrix,D++}r.spot[g]=k,g++}else if(U.isRectAreaLight){let k=t.get(U);k.color.copy(O).multiplyScalar(B),k.halfWidth.set(U.width*.5,0,0),k.halfHeight.set(0,U.height*.5,0),r.rectArea[_]=k,_++}else if(U.isPointLight){let k=t.get(U);if(k.color.copy(U.color).multiplyScalar(U.intensity*E),k.distance=U.distance,k.decay=U.decay,U.castShadow){let G=U.shadow,K=n.get(U);K.shadowBias=G.bias,K.shadowNormalBias=G.normalBias,K.shadowRadius=G.radius,K.shadowMapSize=G.mapSize,K.shadowCameraNear=G.camera.near,K.shadowCameraFar=G.camera.far,r.pointShadow[b]=K,r.pointShadowMap[b]=q,r.pointShadowMatrix[b]=U.shadow.matrix,T++}r.point[b]=k,b++}else if(U.isHemisphereLight){let k=t.get(U);k.skyColor.copy(U.color).multiplyScalar(B*E),k.groundColor.copy(U.groundColor).multiplyScalar(B*E),r.hemi[x]=k,x++}}_>0&&(e.isWebGL2||i.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Ue.LTC_FLOAT_1,r.rectAreaLTC2=Ue.LTC_FLOAT_2):i.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Ue.LTC_HALF_1,r.rectAreaLTC2=Ue.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=h,r.ambient[1]=p,r.ambient[2]=f;let P=r.hash;(P.directionalLength!==m||P.pointLength!==b||P.spotLength!==g||P.rectAreaLength!==_||P.hemiLength!==x||P.numDirectionalShadows!==C||P.numPointShadows!==T||P.numSpotShadows!==D)&&(r.directional.length=m,r.spot.length=g,r.rectArea.length=_,r.point.length=b,r.hemi.length=x,r.directionalShadow.length=C,r.directionalShadowMap.length=C,r.pointShadow.length=T,r.pointShadowMap.length=T,r.spotShadow.length=D,r.spotShadowMap.length=D,r.directionalShadowMatrix.length=C,r.pointShadowMatrix.length=T,r.spotShadowMatrix.length=D,P.directionalLength=m,P.pointLength=b,P.spotLength=g,P.rectAreaLength=_,P.hemiLength=x,P.numDirectionalShadows=C,P.numPointShadows=T,P.numSpotShadows=D,r.version=aae++)}function c(d,u){let h=0,p=0,f=0,m=0,b=0,g=u.matrixWorldInverse;for(let _=0,x=d.length;_=t.get(o).length?(a=new Xz(i,e),t.get(o).push(a)):a=t.get(o)[s],a}function r(){t=new WeakMap}return{get:n,dispose:r}}var kp=class extends Ii{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=uH,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}};kp.prototype.isMeshDepthMaterial=!0;var Lp=class extends Ii{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new R,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};Lp.prototype.isMeshDistanceMaterial=!0;var uae=`void main() { gl_Position = vec4( position, 1.0 ); }`,hae=`uniform sampler2D shadow_pass; uniform vec2 resolution; @@ -3158,7 +3158,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function PH(i,e,t){let n=new Kd,r=new xe,o=new xe,s=new Cn,a=new kp({depthPacking:pH}),l=new Lp,c={},d=t.maxTextureSize,u={0:bi,1:Yd,2:Xd},h=new ws({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:uae,fragmentShader:hae}),p=h.clone();p.defines.HORIZONTAL_PASS=1;let f=new It;f.setAttribute("position",new un(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new di(f,h),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=HP,this.render=function(C,T,D){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||C.length===0)return;let E=i.getRenderTarget(),P=i.getActiveCubeFace(),Y=i.getActiveMipmapLevel(),$=i.state;$.setBlending(Za),$.buffers.color.setClear(1,1,1,1),$.buffers.depth.setTest(!0),$.setScissorTest(!1);for(let U=0,O=C.length;Ud||r.y>d)&&(r.x>d&&(o.x=Math.floor(d/q.x),r.x=o.x*q.x,j.mapSize.x=o.x),r.y>d&&(o.y=Math.floor(d/q.y),r.y=o.y*q.y,j.mapSize.y=o.y)),j.map===null&&!j.isPointLightShadow&&this.type===bp){let G={minFilter:Fi,magFilter:Fi,format:rr};j.map=new yo(r.x,r.y,G),j.map.texture.name=B.name+".shadowMap",j.mapPass=new yo(r.x,r.y,G),j.camera.updateProjectionMatrix()}if(j.map===null){let G={minFilter:Ei,magFilter:Ei,format:rr};j.map=new yo(r.x,r.y,G),j.map.texture.name=B.name+".shadowMap",j.camera.updateProjectionMatrix()}i.setRenderTarget(j.map),i.clear();let k=j.getViewportCount();for(let G=0;G0){let B=U.uuid,j=D.uuid,q=c[B];q===void 0&&(q={},c[B]=q);let k=q[j];k===void 0&&(k=U.clone(),q[j]=k),U=k}return U.visible=D.visible,U.wireframe=D.wireframe,$===bp?U.side=D.shadowSide!==null?D.shadowSide:D.side:U.side=D.shadowSide!==null?D.shadowSide:u[D.side],U.alphaMap=D.alphaMap,U.alphaTest=D.alphaTest,U.clipShadows=D.clipShadows,U.clippingPlanes=D.clippingPlanes,U.clipIntersection=D.clipIntersection,U.displacementMap=D.displacementMap,U.displacementScale=D.displacementScale,U.displacementBias=D.displacementBias,U.wireframeLinewidth=D.wireframeLinewidth,U.linewidth=D.linewidth,E.isPointLight===!0&&U.isMeshDistanceMaterial===!0&&(U.referencePosition.setFromMatrixPosition(E.matrixWorld),U.nearDistance=P,U.farDistance=Y),U}function x(C,T,D,E,P){if(C.visible===!1)return;if(C.layers.test(T.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&P===bp)&&(!C.frustumCulled||n.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,C.matrixWorld);let U=e.update(C),O=C.material;if(Array.isArray(O)){let B=U.groups;for(let j=0,q=B.length;j=1):q.indexOf("OpenGL ES")!==-1&&(j=parseFloat(/^OpenGL ES (\d)/.exec(q)[1]),B=j>=2);let k=null,G={},K=i.getParameter(3088),de=i.getParameter(2978),Te=new Cn().fromArray(K),Ee=new Cn().fromArray(de);function He(Q,$e,Se){let ft=new Uint8Array(4),ct=i.createTexture();i.bindTexture(Q,ct),i.texParameteri(Q,10241,9728),i.texParameteri(Q,10240,9728);for(let pn=0;pnNe||F.height>Ne)&&(ke=Ne/Math.max(F.width,F.height)),ke<1||A===!0)if(typeof HTMLImageElement<"u"&&F instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&F instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&F instanceof ImageBitmap){let et=A?_H:Math.floor,Ot=et(ke*F.width),_t=et(ke*F.height);p===void 0&&(p=m(Ot,_t));let Ft=fe?m(Ot,_t):p;return Ft.width=Ot,Ft.height=_t,Ft.getContext("2d").drawImage(F,0,0,Ot,_t),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+F.width+"x"+F.height+") to ("+Ot+"x"+_t+")."),Ft}else return"data"in F&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+F.width+"x"+F.height+")."),F;return F}function g(F){return hP(F.width)&&hP(F.height)}function _(F){return a?!1:F.wrapS!==ir||F.wrapT!==ir||F.minFilter!==Ei&&F.minFilter!==Fi}function x(F,A){return F.generateMipmaps&&A&&F.minFilter!==Ei&&F.minFilter!==Fi}function C(F,A,fe,Ne,ke=1){i.generateMipmap(F);let et=n.get(A);et.__maxMipLevel=Math.log2(Math.max(fe,Ne,ke))}function T(F,A,fe,Ne){if(a===!1)return A;if(F!==null){if(i[F]!==void 0)return i[F];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+F+"'")}let ke=A;return A===6403&&(fe===5126&&(ke=33326),fe===5131&&(ke=33325),fe===5121&&(ke=33321)),A===6407&&(fe===5126&&(ke=34837),fe===5131&&(ke=34843),fe===5121&&(ke=32849)),A===6408&&(fe===5126&&(ke=34836),fe===5131&&(ke=34842),fe===5121&&(ke=Ne===gc?35907:32856)),(ke===33325||ke===33326||ke===34842||ke===34836)&&e.get("EXT_color_buffer_float"),ke}function D(F){return F===Ei||F===ew||F===tw?9728:9729}function E(F){let A=F.target;A.removeEventListener("dispose",E),Y(A),A.isVideoTexture&&h.delete(A),s.memory.textures--}function P(F){let A=F.target;A.removeEventListener("dispose",P),$(A)}function Y(F){let A=n.get(F);A.__webglInit!==void 0&&(i.deleteTexture(A.__webglTexture),n.remove(F))}function $(F){let A=F.texture,fe=n.get(F),Ne=n.get(A);if(F){if(Ne.__webglTexture!==void 0&&(i.deleteTexture(Ne.__webglTexture),s.memory.textures--),F.depthTexture&&F.depthTexture.dispose(),F.isWebGLCubeRenderTarget)for(let ke=0;ke<6;ke++)i.deleteFramebuffer(fe.__webglFramebuffer[ke]),fe.__webglDepthbuffer&&i.deleteRenderbuffer(fe.__webglDepthbuffer[ke]);else i.deleteFramebuffer(fe.__webglFramebuffer),fe.__webglDepthbuffer&&i.deleteRenderbuffer(fe.__webglDepthbuffer),fe.__webglMultisampledFramebuffer&&i.deleteFramebuffer(fe.__webglMultisampledFramebuffer),fe.__webglColorRenderbuffer&&i.deleteRenderbuffer(fe.__webglColorRenderbuffer),fe.__webglDepthRenderbuffer&&i.deleteRenderbuffer(fe.__webglDepthRenderbuffer);if(F.isWebGLMultipleRenderTargets)for(let ke=0,et=A.length;ke=l&&console.warn("THREE.WebGLTextures: Trying to use "+F+" texture units while this GPU supports only "+l),U+=1,F}function j(F,A){let fe=n.get(F);if(F.isVideoTexture&&_e(F),F.version>0&&fe.__version!==F.version){let Ne=F.image;if(Ne===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(Ne.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{He(fe,F,A);return}}t.activeTexture(33984+A),t.bindTexture(3553,fe.__webglTexture)}function q(F,A){let fe=n.get(F);if(F.version>0&&fe.__version!==F.version){He(fe,F,A);return}t.activeTexture(33984+A),t.bindTexture(35866,fe.__webglTexture)}function k(F,A){let fe=n.get(F);if(F.version>0&&fe.__version!==F.version){He(fe,F,A);return}t.activeTexture(33984+A),t.bindTexture(32879,fe.__webglTexture)}function G(F,A){let fe=n.get(F);if(F.version>0&&fe.__version!==F.version){he(fe,F,A);return}t.activeTexture(33984+A),t.bindTexture(34067,fe.__webglTexture)}let K={[kg]:10497,[ir]:33071,[Lg]:33648},de={[Ei]:9728,[ew]:9984,[tw]:9986,[Fi]:9729,[$P]:9985,[pu]:9987};function Te(F,A,fe){if(fe?(i.texParameteri(F,10242,K[A.wrapS]),i.texParameteri(F,10243,K[A.wrapT]),(F===32879||F===35866)&&i.texParameteri(F,32882,K[A.wrapR]),i.texParameteri(F,10240,de[A.magFilter]),i.texParameteri(F,10241,de[A.minFilter])):(i.texParameteri(F,10242,33071),i.texParameteri(F,10243,33071),(F===32879||F===35866)&&i.texParameteri(F,32882,33071),(A.wrapS!==ir||A.wrapT!==ir)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),i.texParameteri(F,10240,D(A.magFilter)),i.texParameteri(F,10241,D(A.minFilter)),A.minFilter!==Ei&&A.minFilter!==Fi&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){let Ne=e.get("EXT_texture_filter_anisotropic");if(A.type===Js&&e.has("OES_texture_float_linear")===!1||a===!1&&A.type===jd&&e.has("OES_texture_half_float_linear")===!1)return;(A.anisotropy>1||n.get(A).__currentAnisotropy)&&(i.texParameterf(F,Ne.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(A.anisotropy,r.getMaxAnisotropy())),n.get(A).__currentAnisotropy=A.anisotropy)}}function Ee(F,A){F.__webglInit===void 0&&(F.__webglInit=!0,A.addEventListener("dispose",E),F.__webglTexture=i.createTexture(),s.memory.textures++)}function He(F,A,fe){let Ne=3553;A.isDataTexture2DArray&&(Ne=35866),A.isDataTexture3D&&(Ne=32879),Ee(F,A),t.activeTexture(33984+fe),t.bindTexture(Ne,F.__webglTexture),i.pixelStorei(37440,A.flipY),i.pixelStorei(37441,A.premultiplyAlpha),i.pixelStorei(3317,A.unpackAlignment),i.pixelStorei(37443,0);let ke=_(A)&&g(A.image)===!1,et=b(A.image,ke,!1,d),Ot=g(et)||a,_t=o.convert(A.format),Ft=o.convert(A.type),pt=T(A.internalFormat,_t,Ft,A.encoding);Te(Ne,A,Ot);let Q,$e=A.mipmaps;if(A.isDepthTexture)pt=6402,a?A.type===Js?pt=36012:A.type===Tg?pt=33190:A.type===Cp?pt=35056:pt=33189:A.type===Js&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),A.format===$d&&pt===6402&&A.type!==Fg&&A.type!==Tg&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),A.type=Fg,Ft=o.convert(A.type)),A.format===Mp&&pt===6402&&(pt=34041,A.type!==Cp&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),A.type=Cp,Ft=o.convert(A.type))),t.texImage2D(3553,0,pt,et.width,et.height,0,_t,Ft,null);else if(A.isDataTexture)if($e.length>0&&Ot){for(let Se=0,ft=$e.length;Se0&&Ot){for(let Se=0,ft=$e.length;Sep+f?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=p-f&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=t.getPose(e.gripSpace,n),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}},fP=class extends ta{constructor(e,t){super();let n=this,r=e.state,o=null,s=1,a=null,l="local-floor",c=null,d=null,u=null,h=null,p=null,f=!1,m=null,b=null,g=null,_=null,x=null,C=null,T=[],D=new Map,E=new Mi;E.layers.enable(1),E.viewport=new Cn;let P=new Mi;P.layers.enable(2),P.viewport=new Cn;let Y=[E,P],$=new Wg;$.layers.enable(1),$.layers.enable(2);let U=null,O=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(he){let re=T[he];return re===void 0&&(re=new Pg,T[he]=re),re.getTargetRaySpace()},this.getControllerGrip=function(he){let re=T[he];return re===void 0&&(re=new Pg,T[he]=re),re.getGripSpace()},this.getHand=function(he){let re=T[he];return re===void 0&&(re=new Pg,T[he]=re),re.getHandSpace()};function B(he){let re=D.get(he.inputSource);re&&re.dispatchEvent({type:he.type,data:he.inputSource})}function j(){D.forEach(function(he,re){he.disconnect(re)}),D.clear(),U=null,O=null,r.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),u&&t.deleteFramebuffer(u),m&&t.deleteFramebuffer(m),b&&t.deleteRenderbuffer(b),g&&t.deleteRenderbuffer(g),u=null,m=null,b=null,g=null,p=null,h=null,d=null,o=null,He.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(he){s=he,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(he){l=he,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getBaseLayer=function(){return h!==null?h:p},this.getBinding=function(){return d},this.getFrame=function(){return _},this.getSession=function(){return o},this.setSession=function(he){return At(this,null,function*(){if(o=he,o!==null){o.addEventListener("select",B),o.addEventListener("selectstart",B),o.addEventListener("selectend",B),o.addEventListener("squeeze",B),o.addEventListener("squeezestart",B),o.addEventListener("squeezeend",B),o.addEventListener("end",j),o.addEventListener("inputsourceschange",q);let re=t.getContextAttributes();if(re.xrCompatible!==!0&&(yield t.makeXRCompatible()),o.renderState.layers===void 0){let qe={antialias:re.antialias,alpha:re.alpha,depth:re.depth,stencil:re.stencil,framebufferScaleFactor:s};p=new XRWebGLLayer(o,t,qe),o.updateRenderState({baseLayer:p})}else if(t instanceof WebGLRenderingContext){let qe={antialias:!0,alpha:re.alpha,depth:re.depth,stencil:re.stencil,framebufferScaleFactor:s};p=new XRWebGLLayer(o,t,qe),o.updateRenderState({layers:[p]})}else{f=re.antialias;let qe=null;re.depth&&(C=256,re.stencil&&(C|=1024),x=re.stencil?33306:36096,qe=re.stencil?35056:33190);let ue={colorFormat:re.alpha?32856:32849,depthFormat:qe,scaleFactor:s};d=new XRWebGLBinding(o,t),h=d.createProjectionLayer(ue),u=t.createFramebuffer(),o.updateRenderState({layers:[h]}),f&&(m=t.createFramebuffer(),b=t.createRenderbuffer(),t.bindRenderbuffer(36161,b),t.renderbufferStorageMultisample(36161,4,32856,h.textureWidth,h.textureHeight),r.bindFramebuffer(36160,m),t.framebufferRenderbuffer(36160,36064,36161,b),t.bindRenderbuffer(36161,null),qe!==null&&(g=t.createRenderbuffer(),t.bindRenderbuffer(36161,g),t.renderbufferStorageMultisample(36161,4,qe,h.textureWidth,h.textureHeight),t.framebufferRenderbuffer(36160,x,36161,g),t.bindRenderbuffer(36161,null)),r.bindFramebuffer(36160,null))}a=yield o.requestReferenceSpace(l),He.setContext(o),He.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}})};function q(he){let re=o.inputSources;for(let qe=0;qe0&&(g.alphaTest.value=_.alphaTest);let x=i.get(_).envMap;if(x){g.envMap.value=x,g.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,g.reflectivity.value=_.reflectivity,g.ior.value=_.ior,g.refractionRatio.value=_.refractionRatio;let D=i.get(x).__maxMipLevel;D!==void 0&&(g.maxMipLevel.value=D)}_.lightMap&&(g.lightMap.value=_.lightMap,g.lightMapIntensity.value=_.lightMapIntensity),_.aoMap&&(g.aoMap.value=_.aoMap,g.aoMapIntensity.value=_.aoMapIntensity);let C;_.map?C=_.map:_.specularMap?C=_.specularMap:_.displacementMap?C=_.displacementMap:_.normalMap?C=_.normalMap:_.bumpMap?C=_.bumpMap:_.roughnessMap?C=_.roughnessMap:_.metalnessMap?C=_.metalnessMap:_.alphaMap?C=_.alphaMap:_.emissiveMap?C=_.emissiveMap:_.clearcoatMap?C=_.clearcoatMap:_.clearcoatNormalMap?C=_.clearcoatNormalMap:_.clearcoatRoughnessMap?C=_.clearcoatRoughnessMap:_.specularIntensityMap?C=_.specularIntensityMap:_.specularColorMap?C=_.specularColorMap:_.transmissionMap?C=_.transmissionMap:_.thicknessMap?C=_.thicknessMap:_.sheenColorMap?C=_.sheenColorMap:_.sheenRoughnessMap&&(C=_.sheenRoughnessMap),C!==void 0&&(C.isWebGLRenderTarget&&(C=C.texture),C.matrixAutoUpdate===!0&&C.updateMatrix(),g.uvTransform.value.copy(C.matrix));let T;_.aoMap?T=_.aoMap:_.lightMap&&(T=_.lightMap),T!==void 0&&(T.isWebGLRenderTarget&&(T=T.texture),T.matrixAutoUpdate===!0&&T.updateMatrix(),g.uv2Transform.value.copy(T.matrix))}function r(g,_){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity}function o(g,_){g.dashSize.value=_.dashSize,g.totalSize.value=_.dashSize+_.gapSize,g.scale.value=_.scale}function s(g,_,x,C){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity,g.size.value=_.size*x,g.scale.value=C*.5,_.map&&(g.map.value=_.map),_.alphaMap&&(g.alphaMap.value=_.alphaMap),_.alphaTest>0&&(g.alphaTest.value=_.alphaTest);let T;_.map?T=_.map:_.alphaMap&&(T=_.alphaMap),T!==void 0&&(T.matrixAutoUpdate===!0&&T.updateMatrix(),g.uvTransform.value.copy(T.matrix))}function a(g,_){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity,g.rotation.value=_.rotation,_.map&&(g.map.value=_.map),_.alphaMap&&(g.alphaMap.value=_.alphaMap),_.alphaTest>0&&(g.alphaTest.value=_.alphaTest);let x;_.map?x=_.map:_.alphaMap&&(x=_.alphaMap),x!==void 0&&(x.matrixAutoUpdate===!0&&x.updateMatrix(),g.uvTransform.value.copy(x.matrix))}function l(g,_){_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap)}function c(g,_){g.specular.value.copy(_.specular),g.shininess.value=Math.max(_.shininess,1e-4),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===bi&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===bi&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function d(g,_){_.gradientMap&&(g.gradientMap.value=_.gradientMap),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===bi&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===bi&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function u(g,_){g.roughness.value=_.roughness,g.metalness.value=_.metalness,_.roughnessMap&&(g.roughnessMap.value=_.roughnessMap),_.metalnessMap&&(g.metalnessMap.value=_.metalnessMap),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===bi&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===bi&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias),i.get(_).envMap&&(g.envMapIntensity.value=_.envMapIntensity)}function h(g,_,x){u(g,_),g.ior.value=_.ior,_.sheen>0&&(g.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),g.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap&&(g.sheenColorMap.value=_.sheenColorMap),_.sheenRoughnessMap&&(g.sheenRoughnessMap.value=_.sheenRoughnessMap)),_.clearcoat>0&&(g.clearcoat.value=_.clearcoat,g.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap&&(g.clearcoatMap.value=_.clearcoatMap),_.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap),_.clearcoatNormalMap&&(g.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),g.clearcoatNormalMap.value=_.clearcoatNormalMap,_.side===bi&&g.clearcoatNormalScale.value.negate())),_.transmission>0&&(g.transmission.value=_.transmission,g.transmissionSamplerMap.value=x.texture,g.transmissionSamplerSize.value.set(x.width,x.height),_.transmissionMap&&(g.transmissionMap.value=_.transmissionMap),g.thickness.value=_.thickness,_.thicknessMap&&(g.thicknessMap.value=_.thicknessMap),g.attenuationDistance.value=_.attenuationDistance,g.attenuationColor.value.copy(_.attenuationColor)),g.specularIntensity.value=_.specularIntensity,g.specularColor.value.copy(_.specularColor),_.specularIntensityMap&&(g.specularIntensityMap.value=_.specularIntensityMap),_.specularColorMap&&(g.specularColorMap.value=_.specularColorMap)}function p(g,_){_.matcap&&(g.matcap.value=_.matcap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===bi&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===bi&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function f(g,_){_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function m(g,_){_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias),g.referencePosition.value.copy(_.referencePosition),g.nearDistance.value=_.nearDistance,g.farDistance.value=_.farDistance}function b(g,_){_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===bi&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===bi&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}return{refreshFogUniforms:e,refreshMaterialUniforms:t}}function _ae(){let i=Qw("canvas");return i.style.display="block",i}function An(i={}){let e=i.canvas!==void 0?i.canvas:_ae(),t=i.context!==void 0?i.context:null,n=i.alpha!==void 0?i.alpha:!1,r=i.depth!==void 0?i.depth:!0,o=i.stencil!==void 0?i.stencil:!0,s=i.antialias!==void 0?i.antialias:!1,a=i.premultipliedAlpha!==void 0?i.premultipliedAlpha:!0,l=i.preserveDrawingBuffer!==void 0?i.preserveDrawingBuffer:!1,c=i.powerPreference!==void 0?i.powerPreference:"default",d=i.failIfMajorPerformanceCaveat!==void 0?i.failIfMajorPerformanceCaveat:!1,u=null,h=null,p=[],f=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=sr,this.physicallyCorrectLights=!1,this.toneMapping=oc,this.toneMappingExposure=1;let m=this,b=!1,g=0,_=0,x=null,C=-1,T=null,D=new Cn,E=new Cn,P=null,Y=e.width,$=e.height,U=1,O=null,B=null,j=new Cn(0,0,Y,$),q=new Cn(0,0,Y,$),k=!1,G=[],K=new Kd,de=!1,Te=!1,Ee=null,He=new lt,he=new R,re={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function qe(){return x===null?U:1}let ue=t;function Ge(L,ne){for(let pe=0;pe0?h=f[f.length-1]:h=null,p.pop(),p.length>0?u=p[p.length-1]:u=null};function fR(L,ne,pe,oe){if(L.visible===!1)return;if(L.layers.test(ne.layers)){if(L.isGroup)pe=L.renderOrder;else if(L.isLOD)L.autoUpdate===!0&&L.update(ne);else if(L.isLight)h.pushLight(L),L.castShadow&&h.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||K.intersectsSprite(L)){oe&&he.setFromMatrixPosition(L.matrixWorld).applyMatrix4(He);let Rt=A.update(L),Tt=L.material;Tt.visible&&u.push(L,Rt,Tt,pe,he.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(L.isSkinnedMesh&&L.skeleton.frame!==Dt.render.frame&&(L.skeleton.update(),L.skeleton.frame=Dt.render.frame),!L.frustumCulled||K.intersectsObject(L))){oe&&he.setFromMatrixPosition(L.matrixWorld).applyMatrix4(He);let Rt=A.update(L),Tt=L.material;if(Array.isArray(Tt)){let on=Rt.groups;for(let Tn=0,fn=on.length;Tn0&&L5(we,ne,pe),oe&&Qe.viewport(D.copy(oe)),we.length>0&&rv(we,ne,pe),zt.length>0&&rv(zt,ne,pe),Rt.length>0&&rv(Rt,ne,pe)}function L5(L,ne,pe){if(Ee===null){let Rt=s===!0&&Ve.isWebGL2===!0?Hg:yo;Ee=new Rt(1024,1024,{generateMipmaps:!0,type:Se.convert(jd)!==null?jd:Ka,minFilter:pu,magFilter:Ei,wrapS:ir,wrapT:ir})}let oe=m.getRenderTarget();m.setRenderTarget(Ee),m.clear();let we=m.toneMapping;m.toneMapping=oc,rv(L,ne,pe),m.toneMapping=we,De.updateMultisampleRenderTarget(Ee),De.updateRenderTargetMipmap(Ee),m.setRenderTarget(oe)}function rv(L,ne,pe){let oe=ne.isScene===!0?ne.overrideMaterial:null;for(let we=0,zt=L.length;we=0&&ne<=L.width-oe&&pe>=0&&pe<=L.height-we&&ue.readPixels(ne,pe,oe,we,Se.convert(Tn),Se.convert(fn),zt):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let on=x!==null?_e.get(x).__webglFramebuffer:null;Qe.bindFramebuffer(36160,on)}}},this.copyFramebufferToTexture=function(L,ne,pe=0){let oe=Math.pow(2,-pe),we=Math.floor(ne.image.width*oe),zt=Math.floor(ne.image.height*oe),Rt=Se.convert(ne.format);Ve.isWebGL2&&(Rt===6407&&(Rt=32849),Rt===6408&&(Rt=32856)),De.setTexture2D(ne,0),ue.copyTexImage2D(3553,pe,Rt,L.x,L.y,we,zt,0),Qe.unbindTexture()},this.copyTextureToTexture=function(L,ne,pe,oe=0){let we=ne.image.width,zt=ne.image.height,Rt=Se.convert(pe.format),Tt=Se.convert(pe.type);De.setTexture2D(pe,0),ue.pixelStorei(37440,pe.flipY),ue.pixelStorei(37441,pe.premultiplyAlpha),ue.pixelStorei(3317,pe.unpackAlignment),ne.isDataTexture?ue.texSubImage2D(3553,oe,L.x,L.y,we,zt,Rt,Tt,ne.image.data):ne.isCompressedTexture?ue.compressedTexSubImage2D(3553,oe,L.x,L.y,ne.mipmaps[0].width,ne.mipmaps[0].height,Rt,ne.mipmaps[0].data):ue.texSubImage2D(3553,oe,L.x,L.y,Rt,Tt,ne.image),oe===0&&pe.generateMipmaps&&ue.generateMipmap(3553),Qe.unbindTexture()},this.copyTextureToTexture3D=function(L,ne,pe,oe,we=0){if(m.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let zt=L.max.x-L.min.x+1,Rt=L.max.y-L.min.y+1,Tt=L.max.z-L.min.z+1,on=Se.convert(oe.format),Tn=Se.convert(oe.type),fn;if(oe.isDataTexture3D)De.setTexture3D(oe,0),fn=32879;else if(oe.isDataTexture2DArray)De.setTexture2DArray(oe,0),fn=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}ue.pixelStorei(37440,oe.flipY),ue.pixelStorei(37441,oe.premultiplyAlpha),ue.pixelStorei(3317,oe.unpackAlignment);let bn=ue.getParameter(3314),ni=ue.getParameter(32878),Sc=ue.getParameter(3316),xn=ue.getParameter(3315),mf=ue.getParameter(32877),qn=pe.isCompressedTexture?pe.mipmaps[0]:pe.image;ue.pixelStorei(3314,qn.width),ue.pixelStorei(32878,qn.height),ue.pixelStorei(3316,L.min.x),ue.pixelStorei(3315,L.min.y),ue.pixelStorei(32877,L.min.z),pe.isDataTexture||pe.isDataTexture3D?ue.texSubImage3D(fn,we,ne.x,ne.y,ne.z,zt,Rt,Tt,on,Tn,qn.data):pe.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ue.compressedTexSubImage3D(fn,we,ne.x,ne.y,ne.z,zt,Rt,Tt,on,qn.data)):ue.texSubImage3D(fn,we,ne.x,ne.y,ne.z,zt,Rt,Tt,on,Tn,qn),ue.pixelStorei(3314,bn),ue.pixelStorei(32878,ni),ue.pixelStorei(3316,Sc),ue.pixelStorei(3315,xn),ue.pixelStorei(32877,mf),we===0&&oe.generateMipmaps&&ue.generateMipmap(fn),Qe.unbindTexture()},this.initTexture=function(L){De.setTexture2D(L,0),Qe.unbindTexture()},this.resetState=function(){g=0,_=0,x=null,Qe.reset(),ft.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}An.prototype.isWebGLRenderer=!0;var uw=class extends An{};uw.prototype.isWebGL1Renderer=!0;var $g=class i{constructor(e,t=25e-5){this.name="",this.color=new je(e),this.density=t}clone(){return new i(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};$g.prototype.isFogExp2=!0;var qg=class i{constructor(e,t=1,n=1e3){this.name="",this.color=new je(e),this.near=t,this.far=n}clone(){return new i(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};qg.prototype.isFog=!0;var Fp=class extends hn{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),t}};Fp.prototype.isScene=!0;var el=class{constructor(e,t){this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Ep,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=bo()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,o=this.stride;re.far||t.push({distance:l,point:wg.clone(),uv:or.getUV(wg,Px,Sg,Ox,Qz,zD,Kz,new xe),face:null,object:this})}copy(e){return super.copy(e),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};Vp.prototype.isSprite=!0;function Rx(i,e,t,n,r,o){vp.subVectors(i,t).addScalar(.5).multiply(n),r!==void 0?(Cg.x=o*vp.x-r*vp.y,Cg.y=r*vp.x+o*vp.y):Cg.copy(vp),i.copy(e),i.x+=Cg.x,i.y+=Cg.y,i.applyMatrix4(RH)}var Ax=new R,Jz=new R,hw=class extends hn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);let t=e.levels;for(let n=0,r=t.length;n0){let n,r;for(n=1,r=t.length;n0){Ax.setFromMatrixPosition(this.matrixWorld);let r=e.ray.origin.distanceTo(Ax);this.getObjectForDistance(r).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){Ax.setFromMatrixPosition(e.matrixWorld),Jz.setFromMatrixPosition(this.matrixWorld);let n=Ax.distanceTo(Jz)/e.zoom;t[0].object.visible=!0;let r,o;for(r=1,o=t.length;r=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(this._currentLevel=r-1;rl)continue;h.applyMatrix4(this.matrixWorld);let P=e.ray.origin.distanceTo(h);Pe.far||t.push({distance:P,point:u.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}else{let g=Math.max(0,s.start),_=Math.min(b.count,s.start+s.count);for(let x=g,C=_-1;xl)continue;h.applyMatrix4(this.matrixWorld);let D=e.ray.origin.distanceTo(h);De.far||t.push({distance:D,point:u.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let e=this.geometry;if(e.isBufferGeometry){let t=e.morphAttributes,n=Object.keys(t);if(n.length>0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};Cs.prototype.isLine=!0;var dU=new R,uU=new R,xr=class extends Cs{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){let e=this.geometry;if(e.isBufferGeometry)if(e.index===null){let t=e.attributes.position,n=[];for(let r=0,o=t.count;r0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};eu.prototype.isPoints=!0;function pU(i,e,t,n,r,o,s){let a=mP.distanceSqToPoint(i);if(ar.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:s})}}var fw=class extends Gi{constructor(e,t,n,r,o,s,a,l,c){super(e,t,n,r,o,s,a,l,c),this.format=a!==void 0?a:Wd,this.minFilter=s!==void 0?s:Fi,this.magFilter=o!==void 0?o:Fi,this.generateMipmaps=!1;let d=this;function u(){d.needsUpdate=!0,e.requestVideoFrameCallback(u)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(u)}clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}};fw.prototype.isVideoTexture=!0;var Zg=class extends Gi{constructor(e,t,n,r,o,s,a,l,c,d,u,h){super(null,s,a,l,c,d,r,o,u,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}};Zg.prototype.isCompressedTexture=!0;var mw=class extends Gi{constructor(e,t,n,r,o,s,a,l,c){super(e,t,n,r,o,s,a,l,c),this.needsUpdate=!0}};mw.prototype.isCanvasTexture=!0;var gw=class extends Gi{constructor(e,t,n,r,o,s,a,l,c,d){if(d=d!==void 0?d:$d,d!==$d&&d!==Mp)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&d===$d&&(n=Fg),n===void 0&&d===Mp&&(n=Cp),super(null,r,o,s,a,l,d,n,c),this.image={width:e,height:t},this.magFilter=a!==void 0?a:Ei,this.minFilter=l!==void 0?l:Ei,this.flipY=!1,this.generateMipmaps=!1}};gw.prototype.isDepthTexture=!0;var Qg=class i extends It{constructor(e=1,t=8,n=0,r=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);let o=[],s=[],a=[],l=[],c=new R,d=new xe;s.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let u=0,h=3;u<=t;u++,h+=3){let p=n+u/t*r;c.x=e*Math.cos(p),c.y=e*Math.sin(p),s.push(c.x,c.y,c.z),a.push(0,0,1),d.x=(s[h]/e+1)/2,d.y=(s[h+1]/e+1)/2,l.push(d.x,d.y)}for(let u=1;u<=t;u++)o.push(u,u+1,0);this.setIndex(o),this.setAttribute("position",new tt(s,3)),this.setAttribute("normal",new tt(a,3)),this.setAttribute("uv",new tt(l,2))}static fromJSON(e){return new i(e.radius,e.segments,e.thetaStart,e.thetaLength)}},tu=class i extends It{constructor(e=1,t=1,n=1,r=8,o=1,s=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:o,openEnded:s,thetaStart:a,thetaLength:l};let c=this;r=Math.floor(r),o=Math.floor(o);let d=[],u=[],h=[],p=[],f=0,m=[],b=n/2,g=0;_(),s===!1&&(e>0&&x(!0),t>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new tt(u,3)),this.setAttribute("normal",new tt(h,3)),this.setAttribute("uv",new tt(p,2));function _(){let C=new R,T=new R,D=0,E=(t-e)/n;for(let P=0;P<=o;P++){let Y=[],$=P/o,U=$*(t-e)+e;for(let O=0;O<=r;O++){let B=O/r,j=B*l+a,q=Math.sin(j),k=Math.cos(j);T.x=U*q,T.y=-$*n+b,T.z=U*k,u.push(T.x,T.y,T.z),C.set(q,E,k).normalize(),h.push(C.x,C.y,C.z),p.push(B,1-$),Y.push(f++)}m.push(Y)}for(let P=0;P.9&&E<.1&&(x<.2&&(s[_+0]+=1),C<.2&&(s[_+2]+=1),T<.2&&(s[_+4]+=1))}}function h(_){o.push(_.x,_.y,_.z)}function p(_,x){let C=_*3;x.x=e[C+0],x.y=e[C+1],x.z=e[C+2]}function f(){let _=new R,x=new R,C=new R,T=new R,D=new xe,E=new xe,P=new xe;for(let Y=0,$=0;Y0)l=r-1;else{l=r;break}if(r=l,n[r]===s)return r/(o-1);let d=n[r],h=n[r+1]-d,p=(s-d)/h;return(r+p)/(o-1)}getTangent(e,t){let r=e-1e-4,o=e+1e-4;r<0&&(r=0),o>1&&(o=1);let s=this.getPoint(r),a=this.getPoint(o),l=t||(s.isVector2?new xe:new R);return l.copy(a).sub(s).normalize(),l}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){let n=new R,r=[],o=[],s=[],a=new R,l=new lt;for(let p=0;p<=e;p++){let f=p/e;r[p]=this.getTangentAt(f,new R)}o[0]=new R,s[0]=new R;let c=Number.MAX_VALUE,d=Math.abs(r[0].x),u=Math.abs(r[0].y),h=Math.abs(r[0].z);d<=c&&(c=d,n.set(1,0,0)),u<=c&&(c=u,n.set(0,1,0)),h<=c&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),o[0].crossVectors(r[0],a),s[0].crossVectors(r[0],o[0]);for(let p=1;p<=e;p++){if(o[p]=o[p-1].clone(),s[p]=s[p-1].clone(),a.crossVectors(r[p-1],r[p]),a.length()>Number.EPSILON){a.normalize();let f=Math.acos(nr(r[p-1].dot(r[p]),-1,1));o[p].applyMatrix4(l.makeRotationAxis(a,f))}s[p].crossVectors(r[p],o[p])}if(t===!0){let p=Math.acos(nr(o[0].dot(o[e]),-1,1));p/=e,r[0].dot(a.crossVectors(o[0],o[e]))>0&&(p=-p);for(let f=1;f<=e;f++)o[f].applyMatrix4(l.makeRotationAxis(r[f],p*f)),s[f].crossVectors(r[f],o[f])}return{tangents:r,normals:o,binormals:s}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}},nu=class extends Gr{constructor(e=0,t=0,n=1,r=1,o=0,s=Math.PI*2,a=!1,l=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(e,t){let n=t||new xe,r=Math.PI*2,o=this.aEndAngle-this.aStartAngle,s=Math.abs(o)r;)o-=r;o0?0:(Math.floor(Math.abs(a)/o)+1)*o:l===0&&a===o-1&&(a=o-2,l=1);let c,d;this.closed||a>0?c=r[(a-1)%o]:(Ux.subVectors(r[0],r[1]).add(r[0]),c=Ux);let u=r[a%o],h=r[(a+1)%o];if(this.closed||a+2r.length-2?r.length-1:s+1],u=r[s>r.length-3?r.length-1:s+2];return n.set(fU(a,l.x,c.x,d.x,u.x),fU(a,l.y,c.y,d.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){let s=r[o]-n,a=this.curves[o],l=a.getLength(),c=l===0?0:1-s/l;return a.getPointAt(c,t)}o++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let n=0,r=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){let u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);let d=c.getPoint(1);return this.currentPoint.copy(d),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}},qo=class extends ru{constructor(e){super(e),this.uuid=bo(),this.type="Shape",this.holes=[]}getPointsHoles(e){let t=[];for(let n=0,r=this.holes.length;n80*t){a=c=i[0],l=d=i[1];for(let f=t;fc&&(c=u),h>d&&(d=h);p=Math.max(c-a,d-l),p=p!==0?1/p:0}return r_(o,s,t,a,l,p),s}};function AH(i,e,t,n,r){let o,s;if(r===Gae(i,e,t,n)>0)for(o=e;o=e;o-=n)s=mU(o,i[o],i[o+1],s);return s&&Kw(s,s.next)&&(s_(s),s=s.next),s}function pc(i,e){if(!i)return i;e||(e=i);let t=i,n;do if(n=!1,!t.steiner&&(Kw(t,t.next)||ti(t.prev,t,t.next)===0)){if(s_(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function r_(i,e,t,n,r,o,s){if(!i)return;!s&&o&&Fae(i,n,r,o);let a=i,l,c;for(;i.prev!==i.next;){if(l=i.prev,c=i.next,o?Dae(i,n,r,o):Tae(i)){e.push(l.i/t),e.push(i.i/t),e.push(c.i/t),s_(i),i=c.next,a=c.next;continue}if(i=c,i===a){s?s===1?(i=Pae(pc(i),e,t),r_(i,e,t,n,r,o,2)):s===2&&Oae(i,e,t,n,r,o):r_(pc(i),e,t,n,r,o,1);break}}}function Tae(i){let e=i.prev,t=i,n=i.next;if(ti(e,t,n)>=0)return!1;let r=i.next.next;for(;r!==i.prev;){if(xp(e.x,e.y,t.x,t.y,n.x,n.y,r.x,r.y)&&ti(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Dae(i,e,t,n){let r=i.prev,o=i,s=i.next;if(ti(r,o,s)>=0)return!1;let a=r.xo.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,d=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,u=gP(a,l,e,t,n),h=gP(c,d,e,t,n),p=i.prevZ,f=i.nextZ;for(;p&&p.z>=u&&f&&f.z<=h;){if(p!==i.prev&&p!==i.next&&xp(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&ti(p.prev,p,p.next)>=0||(p=p.prevZ,f!==i.prev&&f!==i.next&&xp(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&ti(f.prev,f,f.next)>=0))return!1;f=f.nextZ}for(;p&&p.z>=u;){if(p!==i.prev&&p!==i.next&&xp(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&ti(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=h;){if(f!==i.prev&&f!==i.next&&xp(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&ti(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Pae(i,e,t){let n=i;do{let r=n.prev,o=n.next.next;!Kw(r,o)&&NH(r,n,n.next,o)&&o_(r,o)&&o_(o,r)&&(e.push(r.i/t),e.push(n.i/t),e.push(o.i/t),s_(n),s_(n.next),n=i=o),n=n.next}while(n!==i);return pc(n)}function Oae(i,e,t,n,r,o){let s=i;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&zae(s,a)){let l=kH(s,a);s=pc(s,s.next),l=pc(l,l.next),r_(s,e,t,n,r,o),r_(l,e,t,n,r,o);return}a=a.next}s=s.next}while(s!==i)}function Rae(i,e,t,n){let r=[],o,s,a,l,c;for(o=0,s=e.length;o=t.next.y&&t.next.y!==t.y){let h=t.x+(r-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(h<=n&&h>o){if(o=h,h===n){if(r===t.y)return t;if(r===t.next.y)return t.next}s=t.x=t.x&&t.x>=l&&n!==t.x&&xp(rs.x||t.x===s.x&&Lae(s,t)))&&(s=t,d=u)),t=t.next;while(t!==a);return s}function Lae(i,e){return ti(i.prev,i,e.prev)<0&&ti(e.next,i,i.next)<0}function Fae(i,e,t,n){let r=i;do r.z===null&&(r.z=gP(r.x,r.y,e,t,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==i);r.prevZ.nextZ=null,r.prevZ=null,Bae(r)}function Bae(i){let e,t,n,r,o,s,a,l,c=1;do{for(t=i,i=null,o=null,s=0;t;){for(s++,n=t,a=0,e=0;e0||l>0&&n;)a!==0&&(l===0||!n||t.z<=n.z)?(r=t,t=t.nextZ,a--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:i=r,r.prevZ=o,o=r;t=n}o.nextZ=null,c*=2}while(s>1);return i}function gP(i,e,t,n,r){return i=32767*(i-t)*r,e=32767*(e-n)*r,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,i|e<<1}function Vae(i){let e=i,t=i;do(e.x=0&&(i-s)*(n-a)-(t-s)*(e-a)>=0&&(t-s)*(o-a)-(r-s)*(n-a)>=0}function zae(i,e){return i.next.i!==e.i&&i.prev.i!==e.i&&!Uae(i,e)&&(o_(i,e)&&o_(e,i)&&Hae(i,e)&&(ti(i.prev,i,e.prev)||ti(i,e.prev,e))||Kw(i,e)&&ti(i.prev,i,i.next)>0&&ti(e.prev,e,e.next)>0)}function ti(i,e,t){return(e.y-i.y)*(t.x-e.x)-(e.x-i.x)*(t.y-e.y)}function Kw(i,e){return i.x===e.x&&i.y===e.y}function NH(i,e,t,n){let r=Gx(ti(i,e,t)),o=Gx(ti(i,e,n)),s=Gx(ti(t,n,i)),a=Gx(ti(t,n,e));return!!(r!==o&&s!==a||r===0&&Hx(i,t,e)||o===0&&Hx(i,n,e)||s===0&&Hx(t,i,n)||a===0&&Hx(t,e,n))}function Hx(i,e,t){return e.x<=Math.max(i.x,t.x)&&e.x>=Math.min(i.x,t.x)&&e.y<=Math.max(i.y,t.y)&&e.y>=Math.min(i.y,t.y)}function Gx(i){return i>0?1:i<0?-1:0}function Uae(i,e){let t=i;do{if(t.i!==i.i&&t.next.i!==i.i&&t.i!==e.i&&t.next.i!==e.i&&NH(t,t.next,i,e))return!0;t=t.next}while(t!==i);return!1}function o_(i,e){return ti(i.prev,i,i.next)<0?ti(i,e,i.next)>=0&&ti(i,i.prev,e)>=0:ti(i,e,i.prev)<0||ti(i,i.next,e)<0}function Hae(i,e){let t=i,n=!1,r=(i.x+e.x)/2,o=(i.y+e.y)/2;do t.y>o!=t.next.y>o&&t.next.y!==t.y&&r<(t.next.x-t.x)*(o-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==i);return n}function kH(i,e){let t=new _P(i.i,i.x,i.y),n=new _P(e.i,e.x,e.y),r=i.next,o=e.prev;return i.next=e,e.prev=i,t.next=r,r.prev=t,n.next=t,t.prev=n,o.next=n,n.prev=o,n}function mU(i,e,t,n){let r=new _P(i,e,t);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function s_(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function _P(i,e,t){this.i=i,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Gae(i,e,t,n){let r=0;for(let o=e,s=t-n;o2&&i[e-1].equals(i[0])&&i.pop()}function _U(i,e){for(let t=0;tNumber.EPSILON){let _t=Math.sqrt(et),Ft=Math.sqrt(Ne*Ne+ke*ke),pt=De.x-fe/_t,Q=De.y+A/_t,$e=Be.x-ke/Ft,Se=Be.y+Ne/Ft,ft=(($e-pt)*ke-(Se-Q)*Ne)/(A*ke-fe*Ne);ht=pt+A*ft-_e.x,We=Q+fe*ft-_e.y;let ct=ht*ht+We*We;if(ct<=2)return new xe(ht,We);F=Math.sqrt(ct/2)}else{let _t=!1;A>Number.EPSILON?Ne>Number.EPSILON&&(_t=!0):A<-Number.EPSILON?Ne<-Number.EPSILON&&(_t=!0):Math.sign(fe)===Math.sign(ke)&&(_t=!0),_t?(ht=-fe,We=A,F=Math.sqrt(et)):(ht=A,We=fe,F=Math.sqrt(et/2))}return new xe(ht/F,We/F)}let de=[];for(let _e=0,De=j.length,Be=De-1,ht=_e+1;_e=0;_e--){let De=_e/b,Be=p*Math.cos(De*Math.PI/2),ht=f*Math.sin(De*Math.PI/2)+m;for(let We=0,F=j.length;We=0;){let ht=Be,We=Be-1;We<0&&(We=_e.length-1);for(let F=0,A=d+b*2;F0)&&p.push(x,C,D),(g!==n-1||l0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}};g_.prototype.isMeshPhysicalMaterial=!0;var __=class extends Ii{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new je(16777215),this.specular=new je(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=L_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}};__.prototype.isMeshPhongMaterial=!0;var v_=class extends Ii{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new je(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}};v_.prototype.isMeshToonMaterial=!0;var b_=class extends Ii{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}};b_.prototype.isMeshNormalMaterial=!0;var y_=class extends Ii{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=L_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}};y_.prototype.isMeshLambertMaterial=!0;var x_=class extends Ii{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new je(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this}};x_.prototype.isMeshMatcapMaterial=!0;var w_=class extends Ti{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}};w_.prototype.isLineDashedMaterial=!0;var qae=Object.freeze({__proto__:null,ShadowMaterial:m_,SpriteMaterial:Bp,RawShaderMaterial:dc,ShaderMaterial:ws,PointsMaterial:nl,MeshPhysicalMaterial:g_,MeshStandardMaterial:Xp,MeshPhongMaterial:__,MeshToonMaterial:v_,MeshNormalMaterial:b_,MeshLambertMaterial:y_,MeshDepthMaterial:kp,MeshDistanceMaterial:Lp,MeshBasicMaterial:xs,MeshMatcapMaterial:x_,LineDashedMaterial:w_,LineBasicMaterial:Ti,Material:Ii}),Qn={arraySlice:function(i,e,t){return Qn.isTypedArray(i)?new i.constructor(i.subarray(e,t!==void 0?t:i.length)):i.slice(e,t)},convertArray:function(i,e,t){return!i||!t&&i.constructor===e?i:typeof e.BYTES_PER_ELEMENT=="number"?new e(i):Array.prototype.slice.call(i)},isTypedArray:function(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)},getKeyframeOrder:function(i){function e(r,o){return i[r]-i[o]}let t=i.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort(e),n},sortedArray:function(i,e,t){let n=i.length,r=new i.constructor(n);for(let o=0,s=0;s!==n;++o){let a=t[o]*e;for(let l=0;l!==e;++l)r[s++]=i[a+l]}return r},flattenJSON:function(i,e,t,n){let r=1,o=i[0];for(;o!==void 0&&o[n]===void 0;)o=i[r++];if(o===void 0)return;let s=o[n];if(s!==void 0)if(Array.isArray(s))do s=o[n],s!==void 0&&(e.push(o.time),t.push.apply(t,s)),o=i[r++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[n],s!==void 0&&(e.push(o.time),s.toArray(t,t.length)),o=i[r++];while(o!==void 0);else do s=o[n],s!==void 0&&(e.push(o.time),t.push(s)),o=i[r++];while(o!==void 0)},subclip:function(i,e,t,n,r=30){let o=i.clone();o.name=e;let s=[];for(let l=0;l=n)){u.push(c.times[p]);for(let m=0;mo.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l=a.times[f]){let g=f*u+d,_=g+u-d;m=Qn.arraySlice(a.values,g,_)}else{let g=a.createInterpolant(),_=d,x=u-d;g.evaluate(o),m=Qn.arraySlice(g.resultBuffer,_,x)}l==="quaternion"&&new Bi().fromArray(m).normalize().conjugate().toArray(m);let b=c.times.length;for(let g=0;g=o)){let a=t[1];e=o)break t}s=n,n=0;break n}break e}for(;n>>1;et;)--s;if(++s,o!==0||s!==r){o>=s&&(s=Math.max(s,1),o=s-1);let a=this.getValueSize();this.times=Qn.arraySlice(n,o,s),this.values=Qn.arraySlice(this.values,o*a,s*a)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let n=this.times,r=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){let l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(r!==void 0&&Qn.isTypedArray(r))for(let a=0,l=r.length;a!==l;++a){let c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){let e=Qn.arraySlice(this.times),t=Qn.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===Qx,o=e.length-1,s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*n,l=s*n,c=0;c!==n;++c)t[l+c]=t[a+c];++s}return s!==e.length?(this.times=Qn.arraySlice(e,0,s),this.values=Qn.arraySlice(t,0,s*n)):(this.times=e,this.values=t),this}clone(){let e=Qn.arraySlice(this.times,0),t=Qn.arraySlice(this.values,0),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}};xo.prototype.TimeBufferType=Float32Array;xo.prototype.ValueBufferType=Float32Array;xo.prototype.DefaultInterpolation=Vg;var ol=class extends xo{};ol.prototype.ValueTypeName="bool";ol.prototype.ValueBufferType=Array;ol.prototype.DefaultInterpolation=Bg;ol.prototype.InterpolantFactoryMethodLinear=void 0;ol.prototype.InterpolantFactoryMethodSmooth=void 0;var S_=class extends xo{};S_.prototype.ValueTypeName="color";var ou=class extends xo{};ou.prototype.ValueTypeName="number";var xw=class extends Ss{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(n-t)/(r-t),c=e*a;for(let d=c+a;c!==d;c+=4)Bi.slerpFlat(o,0,s,c-a,s,c,l);return o}},fc=class extends xo{InterpolantFactoryMethodLinear(e){return new xw(this.times,this.values,this.getValueSize(),e)}};fc.prototype.ValueTypeName="quaternion";fc.prototype.DefaultInterpolation=Vg;fc.prototype.InterpolantFactoryMethodSmooth=void 0;var sl=class extends xo{};sl.prototype.ValueTypeName="string";sl.prototype.ValueBufferType=Array;sl.prototype.DefaultInterpolation=Bg;sl.prototype.InterpolantFactoryMethodLinear=void 0;sl.prototype.InterpolantFactoryMethodSmooth=void 0;var su=class extends xo{};su.prototype.ValueTypeName="vector";var au=class{constructor(e,t=-1,n,r=Yw){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=bo(),this.duration<0&&this.resetDuration()}static parse(e){let t=[],n=e.tracks,r=1/(e.fps||1);for(let s=0,a=n.length;s!==a;++s)t.push(Xae(n[s]).scale(r));let o=new this(e.name,e.duration,t,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){let t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=n.length;o!==s;++o)t.push(xo.toJSON(n[o]));return r}static CreateFromMorphTargetSequence(e,t,n,r){let o=t.length,s=[];for(let a=0;a1){let u=d[1],h=r[u];h||(r[u]=h=[]),h.push(c)}}let s=[];for(let a in r)s.push(this.CreateFromMorphTargetSequence(a,r[a],t,n));return s}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let n=function(u,h,p,f,m){if(p.length!==0){let b=[],g=[];Qn.flattenJSON(p,b,g,f),b.length!==0&&m.push(new u(h,b,g))}},r=[],o=e.name||"default",s=e.fps||30,a=e.blendMode,l=e.length||-1,c=e.hierarchy||[];for(let u=0;u{t&&t(o),this.manager.itemEnd(e)},0),o;if(Ya[e]!==void 0){Ya[e].push({onLoad:t,onProgress:n,onError:r});return}Ya[e]=[],Ya[e].push({onLoad:t,onProgress:n,onError:r});let s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"});fetch(s).then(a=>{if(a.status===200||a.status===0){a.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");let l=Ya[e],c=a.body.getReader(),d=a.headers.get("Content-Length"),u=d?parseInt(d):0,h=u!==0,p=0;return new ReadableStream({start(f){m();function m(){c.read().then(({done:b,value:g})=>{if(b)f.close();else{p+=g.byteLength;let _=new ProgressEvent("progress",{lengthComputable:h,loaded:p,total:u});for(let x=0,C=l.length;x{let l=new Response(a);switch(this.responseType){case"arraybuffer":return l.arrayBuffer();case"blob":return l.blob();case"document":return l.text().then(c=>new DOMParser().parseFromString(c,this.mimeType));case"json":return l.json();default:return l.text()}}).then(a=>{lu.add(e,a);let l=Ya[e];delete Ya[e];for(let c=0,d=l.length;c{let l=Ya[e];delete Ya[e];for(let c=0,d=l.length;c0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(let o in e.uniforms){let s=e.uniforms[o];switch(r.uniforms[o]={},s.type){case"t":r.uniforms[o].value=n(s.value);break;case"c":r.uniforms[o].value=new je().setHex(s.value);break;case"v2":r.uniforms[o].value=new xe().fromArray(s.value);break;case"v3":r.uniforms[o].value=new R().fromArray(s.value);break;case"v4":r.uniforms[o].value=new Cn().fromArray(s.value);break;case"m3":r.uniforms[o].value=new yi().fromArray(s.value);break;case"m4":r.uniforms[o].value=new lt().fromArray(s.value);break;default:r.uniforms[o].value=s.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.extensions!==void 0)for(let o in e.extensions)r.extensions[o]=e.extensions[o];if(e.shading!==void 0&&(r.flatShading=e.shading===1),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=n(e.map)),e.matcap!==void 0&&(r.matcap=n(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),r.normalScale=new xe().fromArray(o)}return e.displacementMap!==void 0&&(r.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=n(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new xe().fromArray(e.clearcoatNormalScale)),e.transmissionMap!==void 0&&(r.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=n(e.thicknessMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}},Zp=class{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let n=0,r=e.length;n0){let l=new M_(t);o=new cu(l),o.setCrossOrigin(this.crossOrigin);for(let c=0,d=e.length;c0){r=new cu(this.manager),r.setCrossOrigin(this.crossOrigin);for(let s=0,a=e.length;s"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let o=this,s=lu.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(s),o.manager.itemEnd(e)},0),s;let a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){lu.add(e,l),t&&t(l),o.manager.itemEnd(e)}).catch(function(l){r&&r(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}};Pw.prototype.isImageBitmapLoader=!0;var jx,nO={getContext:function(){return jx===void 0&&(jx=new(window.AudioContext||window.webkitAudioContext)),jx},setContext:function(i){jx=i}},Ow=class extends ar{constructor(e){super(e)}load(e,t,n,r){let o=this,s=new Yo(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{let l=a.slice(0);nO.getContext().decodeAudioData(l,function(d){t(d)})}catch(l){r?r(l):console.error(l),o.manager.itemError(e)}},n,r)}},Rw=class extends du{constructor(e,t,n=1){super(void 0,n);let r=new je().set(e),o=new je().set(t),s=new R(r.r,r.g,r.b),a=new R(o.r,o.g,o.b),l=Math.sqrt(Math.PI),c=l*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(s).sub(a).multiplyScalar(c)}};Rw.prototype.isHemisphereLightProbe=!0;var Aw=class extends du{constructor(e,t=1){super(void 0,t);let n=new je().set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}};Aw.prototype.isAmbientLightProbe=!0;var EU=new lt,IU=new lt,xP=class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Mi,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Mi,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){let t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep;let r=e.projectionMatrix.clone(),o=t.eyeSep/2,s=o*t.near/t.focus,a=t.near*Math.tan(qd*t.fov*.5)/t.zoom,l,c;IU.elements[12]=-o,EU.elements[12]=o,l=-a*t.aspect+s,c=a*t.aspect+s,r.elements[0]=2*t.near/(c-l),r.elements[8]=(c+l)/(c-l),this.cameraL.projectionMatrix.copy(r),l=-a*t.aspect-s,c=a*t.aspect-s,r.elements[0]=2*t.near/(c-l),r.elements[8]=(c+l)/(c-l),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(IU),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(EU)}},Nw=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=TU(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=TU();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}};function TU(){return(typeof performance>"u"?Date:performance).now()}var Ld=new R,DU=new Bi,Qae=new R,Fd=new R,wP=class extends hn{constructor(){super(),this.type="AudioListener",this.context=nO.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Nw}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);let t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Ld,DU,Qae),Fd.set(0,0,-1).applyQuaternion(DU),t.positionX){let r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Ld.x,r),t.positionY.linearRampToValueAtTime(Ld.y,r),t.positionZ.linearRampToValueAtTime(Ld.z,r),t.forwardX.linearRampToValueAtTime(Fd.x,r),t.forwardY.linearRampToValueAtTime(Fd.y,r),t.forwardZ.linearRampToValueAtTime(Fd.z,r),t.upX.linearRampToValueAtTime(n.x,r),t.upY.linearRampToValueAtTime(n.y,r),t.upZ.linearRampToValueAtTime(n.z,r)}else t.setPosition(Ld.x,Ld.y,Ld.z),t.setOrientation(Fd.x,Fd.y,Fd.z,n.x,n.y,n.z)}},k_=class extends hn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;let t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(n[l]!==n[l+t]){a.setValue(n,r);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let o=n,s=r;o!==s;++o)t[o]=t[r+o%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let s=0;s!==o;++s)e[t+s]=e[n+s]}_slerp(e,t,n,r){Bi.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,o){let s=this._workIndex*o;Bi.multiplyQuaternionsFlat(e,s,e,t,e,n),Bi.slerpFlat(e,t,e,t,e,s,r)}_lerp(e,t,n,r,o){let s=1-r;for(let a=0;a!==o;++a){let l=t+a;e[l]=e[l]*s+e[n+a]*r}}_lerpAdditive(e,t,n,r,o){for(let s=0;s!==o;++s){let a=t+s;e[a]=e[a]+e[n+s]*r}}},iO="\\[\\]\\.:\\/",Jae=new RegExp("["+iO+"]","g"),rO="[^"+iO+"]",ele="[^"+iO.replace("\\.","")+"]",tle=/((?:WC+[\/:])*)/.source.replace("WC",rO),nle=/(WCOD+)?/.source.replace("WCOD",ele),ile=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",rO),rle=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",rO),ole=new RegExp("^"+tle+nle+ile+rle+"$"),sle=["material","materials","bones"],SP=class{constructor(e,t,n){let r=n||jn.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=n.length;r!==o;++r)n[r].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},jn=(()=>{class i{constructor(t,n,r){this.path=n,this.parsedPath=r||i.parseTrackName(n),this.node=i.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,n,r){return t&&t.isAnimationObjectGroup?new i.Composite(t,n,r):new i(t,n,r)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Jae,"")}static parseTrackName(t){let n=ole.exec(t);if(!n)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},o=r.nodeName&&r.nodeName.lastIndexOf(".");if(o!==void 0&&o!==-1){let s=r.nodeName.substring(o+1);sle.indexOf(s)!==-1&&(r.nodeName=r.nodeName.substring(0,o),r.objectName=s)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return r}static findNode(t,n){if(!n||n===""||n==="."||n===-1||n===t.name||n===t.uuid)return t;if(t.skeleton){let r=t.skeleton.getBoneByName(n);if(r!==void 0)return r}if(t.children){let r=function(s){for(let a=0;a=o){let u=o++,h=e[u];t[h.uuid]=d,e[d]=h,t[c]=u,e[u]=l;for(let p=0,f=r;p!==f;++p){let m=n[p],b=m[u],g=m[d];m[d]=b,m[u]=g}}}this.nCachedObjects_=o}uncache(){let e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,o=this.nCachedObjects_,s=e.length;for(let a=0,l=arguments.length;a!==l;++a){let c=arguments[a],d=c.uuid,u=t[d];if(u!==void 0)if(delete t[d],u0&&(t[p.uuid]=u),e[u]=p,e.pop();for(let f=0,m=r;f!==m;++f){let b=n[f];b[u]=b[h],b.pop()}}}this.nCachedObjects_=o}subscribe_(e,t){let n=this._bindingsIndicesByPath,r=n[e],o=this._bindings;if(r!==void 0)return o[r];let s=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,d=this.nCachedObjects_,u=new Array(c);r=o.length,n[e]=r,s.push(e),a.push(t),o.push(u);for(let h=d,p=l.length;h!==p;++h){let f=l[h];u[h]=new jn(f,e,t)}return u}unsubscribe_(e){let t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){let r=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length-1,l=s[a],c=e[a];t[c]=n,s[n]=l,s.pop(),o[n]=o[a],o.pop(),r[n]=r[a],r.pop()}}};Fw.prototype.isAnimationObjectGroup=!0;var MP=class{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;let o=t.tracks,s=o.length,a=new Array(s),l={endingStart:Hd,endingEnd:Hd};for(let c=0;c!==s;++c){let d=o[c].createInterpolant(null);a[c]=d,d.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=lH,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){let r=this._clip.duration,o=e._clip.duration,s=o/r,a=r/o;e.warp(1,s,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){let e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){let r=this._mixer,o=r.time,s=this.timeScale,a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);let l=a.parameterPositions,c=a.sampleValues;return l[0]=o,l[1]=o+n,c[0]=e/s,c[1]=t/s,this}stopWarping(){let e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled){this._updateWeight(e);return}let o=this._startTime;if(o!==null){let l=(e-o)*n;if(l<0||n===0)return;this._startTime=null,t=n*l}t*=this._updateTimeScale(e);let s=this._updateTime(t),a=this._updateWeight(e);if(a>0){let l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case qP:for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(s),c[d].accumulateAdditive(a);break;case Yw:default:for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(s),c[d].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,r=this.time+e,o=this._loopCount,s=n===cH;if(e===0)return o===-1?r:s&&(o&1)===1?t-r:r;if(n===aH){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),r>=t||r<0){let a=Math.floor(r/t);r-=t*a,o+=Math.abs(a);let l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){let c=e<0;this._setEndings(c,!c,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(s&&(o&1)===1)return t-r}return r}_setEndings(e,t,n){let r=this._interpolantSettings;n?(r.endingStart=Gd,r.endingEnd=Gd):(e?r.endingStart=this.zeroSlopeAtStart?Gd:Hd:r.endingStart=zg,t?r.endingEnd=this.zeroSlopeAtEnd?Gd:Hd:r.endingEnd=zg)}_scheduleFading(e,t,n){let r=this._mixer,o=r.time,s=this._weightInterpolant;s===null&&(s=r._lendControlInterpolant(),this._weightInterpolant=s);let a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=t,a[1]=o+e,l[1]=n,this}},Bw=class extends ta{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){let n=e._localRoot||this._root,r=e._clip.tracks,o=r.length,s=e._propertyBindings,a=e._interpolants,l=n.uuid,c=this._bindingsByRootAndName,d=c[l];d===void 0&&(d={},c[l]=d);for(let u=0;u!==o;++u){let h=r[u],p=h.name,f=d[p];if(f!==void 0)s[u]=f;else{if(f=s[u],f!==void 0){f._cacheIndex===null&&(++f.referenceCount,this._addInactiveBinding(f,l,p));continue}let m=t&&t._propertyBindings[u].binding.parsedPath;f=new Lw(jn.create(n,p,m),h.ValueTypeName,h.getValueSize()),++f.referenceCount,this._addInactiveBinding(f,l,p),s[u]=f}a[u].resultBuffer=f.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){let n=(e._localRoot||this._root).uuid,r=e._clip.uuid,o=this._actionsByClip[r];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,r,n)}let t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){let o=t[n];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){let o=t[n];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return t!==null&&t=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,r=this.time+=e,o=Math.sign(e),s=this._accuIndex^=1;for(let c=0;c!==n;++c)t[c]._update(r,e,o,s);let a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(s);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return RU.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};mc.prototype.isBox2=!0;var AU=new R,Wx=new R,Hw=class{constructor(e=new R,t=new R){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){AU.subVectors(e,this.start),Wx.subVectors(this.end,this.start);let n=Wx.dot(Wx),o=Wx.dot(AU)/n;return t&&(o=nr(o,0,1)),o}closestPointToPoint(e,t,n){let r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},NU=new R,PP=class extends hn{constructor(e,t){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;let n=new It,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,a=1,l=32;s.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{VU.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(VU,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}},$w=class extends xr{constructor(e=1){let t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new It;r.setAttribute("position",new tt(t,3)),r.setAttribute("color",new tt(n,3));let o=new Ti({vertexColors:!0,toneMapped:!1});super(r,o),this.type="AxesHelper"}setColors(e,t,n){let r=new je,o=this.geometry.attributes.color.array;return r.set(e),r.toArray(o,0),r.toArray(o,3),r.set(t),r.toArray(o,6),r.toArray(o,9),r.set(n),r.toArray(o,12),r.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},VP=class{constructor(){this.type="ShapePath",this.color=new je,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new ru,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,o,s){return this.currentPath.bezierCurveTo(e,t,n,r,o,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(_){let x=[];for(let C=0,T=_.length;CNumber.EPSILON){if(U<0&&(P=x[E],$=-$,Y=x[D],U=-U),_.yY.y)continue;if(_.y===P.y){if(_.x===P.x)return!0}else{let O=U*(_.x-P.x)-$*(_.y-P.y);if(O===0)return!0;if(O<0)continue;T=!T}}else{if(_.y!==P.y)continue;if(Y.x<=_.x&&_.x<=P.x||P.x<=_.x&&_.x<=Y.x)return!0}}return T}let o=ea.isClockWise,s=this.subPaths;if(s.length===0)return[];if(t===!0)return n(s);let a,l,c,d=[];if(s.length===1)return l=s[0],c=new qo,c.curves=l.curves,d.push(c),d;let u=!o(s[0].getPoints());u=e?!u:u;let h=[],p=[],f=[],m=0,b;p[m]=void 0,f[m]=[];for(let _=0,x=s.length;_1){let _=!1,x=[];for(let C=0,T=p.length;C0&&(_||(f=h))}let g;for(let _=0,x=p.length;_65504&&(console.warn("THREE.DataUtils.toHalfFloat(): value exceeds 65504."),e=65504),BH[0]=e;let t=lle[0],n=t>>16&32768,r=t>>12&2047,o=t>>23&255;return o<103?n:o>142?(n|=31744,n|=(o==255?0:1)&&t&8388607,n):o<113?(r|=2048,n|=(r>>114-o)+(r>>113-o&1),n):(n|=o-112<<10|r>>1,n+=r&1,n)}},cle=0,dle=1,ule=0,hle=1,ple=2;function fle(i){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),i}function mle(i=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),i.isMultiMaterial=!0,i.materials=i,i.clone=function(){return i.slice()},i}function gle(i,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new eu(i,e)}function _le(i){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Vp(i)}function vle(i,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new eu(i,e)}function ble(i){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new nl(i)}function yle(i){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new nl(i)}function xle(i){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new nl(i)}function wle(i,e,t){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new R(i,e,t)}function Cle(i,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new un(i,e).setUsage(Ip)}function Sle(i,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new iw(i,e)}function Mle(i,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new rw(i,e)}function Ele(i,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new ow(i,e)}function Ile(i,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new sw(i,e)}function Tle(i,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Tp(i,e)}function Dle(i,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new aw(i,e)}function Ple(i,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Dp(i,e)}function Ole(i,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new tt(i,e)}function Rle(i,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new cw(i,e)}Gr.create=function(i,e){return console.log("THREE.Curve.create() has been deprecated"),i.prototype=Object.create(Gr.prototype),i.prototype.constructor=i,i.prototype.getPoint=e,i};ru.prototype.fromPoints=function(i){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(i)};function Ale(i){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new $w(i)}function Nle(i,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Ww(i,e)}function kle(i,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new xr(new e_(i.geometry),new Ti({color:e!==void 0?e:16777215}))}jw.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};Gw.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};function Lle(i,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new xr(new f_(i.geometry),new Ti({color:e!==void 0?e:16777215}))}ar.prototype.extractUrlBase=function(i){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Zp.extractUrlBase(i)};ar.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};function Fle(i){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Yo(i)}function Ble(i){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Cw(i)}mc.prototype.center=function(i){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(i)};mc.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()};mc.prototype.isIntersectionBox=function(i){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};mc.prototype.size=function(i){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(i)};Ur.prototype.center=function(i){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(i)};Ur.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()};Ur.prototype.isIntersectionBox=function(i){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};Ur.prototype.isIntersectionSphere=function(i){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(i)};Ur.prototype.size=function(i){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(i)};na.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()};Kd.prototype.setFromMatrix=function(i){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(i)};Hw.prototype.center=function(i){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(i)};yi.prototype.flattenToArrayOffset=function(i,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(i,e)};yi.prototype.multiplyVector3=function(i){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),i.applyMatrix3(this)};yi.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")};yi.prototype.applyToBufferAttribute=function(i){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),i.applyMatrix3(this)};yi.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")};yi.prototype.getInverse=function(i){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(i).invert()};lt.prototype.extractPosition=function(i){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(i)};lt.prototype.flattenToArrayOffset=function(i,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(i,e)};lt.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new R().setFromMatrixColumn(this,3)};lt.prototype.setRotationFromQuaternion=function(i){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(i)};lt.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")};lt.prototype.multiplyVector3=function(i){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};lt.prototype.multiplyVector4=function(i){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};lt.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")};lt.prototype.rotateAxis=function(i){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),i.transformDirection(this)};lt.prototype.crossVector=function(i){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};lt.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")};lt.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")};lt.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")};lt.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")};lt.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")};lt.prototype.applyToBufferAttribute=function(i){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};lt.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")};lt.prototype.makeFrustum=function(i,e,t,n,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(i,e,n,t,r,o)};lt.prototype.getInverse=function(i){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(i).invert()};$o.prototype.isIntersectionLine=function(i){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(i)};Bi.prototype.multiplyVector3=function(i){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),i.applyQuaternion(this)};Bi.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()};ia.prototype.isIntersectionBox=function(i){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};ia.prototype.isIntersectionPlane=function(i){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(i)};ia.prototype.isIntersectionSphere=function(i){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(i)};or.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()};or.prototype.barycoordFromPoint=function(i,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(i,e)};or.prototype.midpoint=function(i){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(i)};or.prototypenormal=function(i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(i)};or.prototype.plane=function(i){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(i)};or.barycoordFromPoint=function(i,e,t,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),or.getBarycoord(i,e,t,n,r)};or.normal=function(i,e,t,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),or.getNormal(i,e,t,n)};qo.prototype.extractAllPoints=function(i){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(i)};qo.prototype.extrude=function(i){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new rl(this,i)};qo.prototype.makeGeometry=function(i){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new qp(this,i)};xe.prototype.fromAttribute=function(i,e,t){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,e,t)};xe.prototype.distanceToManhattan=function(i){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(i)};xe.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};R.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")};R.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")};R.prototype.getPositionFromMatrix=function(i){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(i)};R.prototype.getScaleFromMatrix=function(i){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(i)};R.prototype.getColumnFromMatrix=function(i,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,i)};R.prototype.applyProjection=function(i){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(i)};R.prototype.fromAttribute=function(i,e,t){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,e,t)};R.prototype.distanceToManhattan=function(i){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(i)};R.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};Cn.prototype.fromAttribute=function(i,e,t){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,e,t)};Cn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};hn.prototype.getChildByName=function(i){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(i)};hn.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")};hn.prototype.translate=function(i,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,i)};hn.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")};hn.prototype.applyMatrix=function(i){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(i)};Object.defineProperties(hn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(i){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=i}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});di.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")};Object.defineProperties(di.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),dH},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});zp.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Mi.prototype.setLens=function(i,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(i)};Object.defineProperties(wo.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(i){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=i}},shadowCameraLeft:{set:function(i){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=i}},shadowCameraRight:{set:function(i){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=i}},shadowCameraTop:{set:function(i){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=i}},shadowCameraBottom:{set:function(i){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=i}},shadowCameraNear:{set:function(i){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=i}},shadowCameraFar:{set:function(i){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=i}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(i){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=i}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(i){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=i}},shadowMapHeight:{set:function(i){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=i}}});Object.defineProperties(un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Ip},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Ip)}}});un.prototype.setDynamic=function(i){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(i===!0?Ip:Ep),this};un.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},un.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};It.prototype.addIndex=function(i){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(i)};It.prototype.addAttribute=function(i,e){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),!(e&&e.isBufferAttribute)&&!(e&&e.isInterleavedBufferAttribute)?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(i,new un(arguments[1],arguments[2]))):i==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):this.setAttribute(i,e)};It.prototype.addDrawCall=function(i,e,t){t!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(i,e)};It.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()};It.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")};It.prototype.removeAttribute=function(i){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(i)};It.prototype.applyMatrix=function(i){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(i)};Object.defineProperties(It.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}});el.prototype.setDynamic=function(i){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(i===!0?Ip:Ep),this};el.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};rl.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")};rl.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")};rl.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")};Fp.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")};Vw.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this};Object.defineProperties(Ii.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new je}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(i){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===GP}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(i){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=i}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}});Object.defineProperties(ws.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(i){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=i}}});An.prototype.clearTarget=function(i,e,t,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(i),this.clear(e,t,n)};An.prototype.animate=function(i){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(i)};An.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()};An.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()};An.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision};An.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()};An.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")};An.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")};An.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")};An.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")};An.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")};An.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")};An.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures};An.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")};An.prototype.enableScissorTest=function(i){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(i)};An.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};An.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};An.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};An.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};An.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")};An.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")};An.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")};An.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")};An.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")};An.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()};Object.defineProperties(An.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(i){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=i}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(i){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=i}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(i){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=i===!0?gc:sr}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}});Object.defineProperties(PH.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});function Vle(i,e,t){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Rp(i,t)}Object.defineProperties(yo.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(i){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=i}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(i){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=i}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(i){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=i}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(i){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=i}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(i){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=i}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(i){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=i}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(i){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=i}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(i){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=i}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(i){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=i}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(i){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=i}}});k_.prototype.load=function(i){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let e=this;return new Ow().load(i,function(n){e.setBuffer(n)}),this};kw.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()};Op.prototype.updateCubeMap=function(i,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(i,e)};Op.prototype.clear=function(i,e,t,n){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(i,e,t,n)};Ja.crossOrigin=void 0;Ja.loadTexture=function(i,e,t,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let r=new Sw;r.setCrossOrigin(this.crossOrigin);let o=r.load(i,t,void 0,n);return e&&(o.mapping=e),o};Ja.loadTextureCube=function(i,e,t,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let r=new ww;r.setCrossOrigin(this.crossOrigin);let o=r.load(i,t,void 0,n);return e&&(o.mapping=e),o};Ja.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};Ja.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};function zle(){console.error("THREE.CanvasRenderer has been removed")}function Ule(){console.error("THREE.JSONLoader has been removed.")}var Hle={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function Gle(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}function jle(){return console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),new It}function Wle(){return console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),new It}function $le(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function qle(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function Yle(){console.error("THREE.ImmediateRenderObject has been removed.")}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:UP}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=UP);var Jp=(()=>{class i{linearGradientId=Math.random().toString(36).slice(-6);fillUrl=`url(#${this.linearGradientId})`;static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["me-logo"]],standalone:!0,features:[ce],decls:19,vars:2,consts:[["width","24","height","24","viewBox","0 0 256 256","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","256","height","256","fill","none"],["d","M229 64.5V192.5L128 248.5L127.5 115.5L229 64.5Z"],["d","M208 76V99L128 141.5V116L208 76Z","fill","white"],["d","M208 122.5V141.5L128 182.5V161.5L208 122.5Z","fill","white"],["d","M208 164.5V183L128 225.5V206L208 164.5Z","fill","white"],["d","M149 106V214.5L127 226V117.5L149 106Z","fill","white"],["d","M26 61L47.5 72.5V200L26 187V61Z","fill","#FBBC04"],["d","M125.5 10.5L145.5 21V60.5L125.5 56.5V10.5Z","fill","#DCA810"],["d","M164 31L184 41.5V81L164 78V31Z","fill","#309C4D"],["d","M164 31L184 41.5L87 94L65 82L164 31Z","fill","#11792D"],["d","M208 54.5L229 64.5L128 116L107 105L208 54.5Z","fill","#2C5CAC"],["d","M125.5 10.5L145.5 21L47.5 72.5L26 61L125.5 10.5Z","fill","#C78B15"],["d","M65 82L87 94V224L65 210.5V82Z","fill","#34A853"],["d","M107 105L128 116V248.5L107 236V105Z","fill","#4285F4"],["x1","144.5","y1","232","x2","219","y2","69.5","gradientUnits","userSpaceOnUse"],["stop-color","#4285F4"],["offset","1","stop-color","#2C5CAC"]],template:function(n,r){n&1&&(io(),v(0,"svg",0),J(1,"rect",1)(2,"path",2)(3,"path",3)(4,"path",4)(5,"path",5)(6,"path",6)(7,"path",7)(8,"path",8)(9,"path",9)(10,"path",10)(11,"path",11)(12,"path",12)(13,"path",13)(14,"path",14),v(15,"defs")(16,"linearGradient",15),J(17,"stop",16)(18,"stop",17),y()()()),n&2&&(w(2),Ze("fill",r.fillUrl),w(14),Ze("id",r.linearGradientId))},styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}"]})}return i})();var _c=(()=>{class i{hiddenInputOpNodeIds=yt({});hiddenOutputIds=yt({});toggleInputOpNodeVisibility(t){this.hiddenInputOpNodeIds.update(n=>(n[t]===!0?delete n[t]:n[t]=!0,Z({},n)))}setInputOpNodeVisible(t,n){let r=this.hiddenInputOpNodeIds()[t]!==!0;for(let o of n)o!==t&&(this.hiddenInputOpNodeIds()[o]||(r=!1));if(r)this.hiddenInputOpNodeIds.set({});else{let o={};for(let s of n)s!==t&&(o[s]=!0);this.hiddenInputOpNodeIds.set(o)}}toggleOutputVisibility(t){this.hiddenOutputIds.update(n=>(n[t]===!0?delete n[t]:n[t]=!0,Z({},n)))}setOutputVisible(t,n){let r=this.hiddenOutputIds()[t]!==!0;for(let o of n)o!==t&&(this.hiddenOutputIds()[o]||(r=!1));if(r)this.hiddenOutputIds.set({});else{let o={};for(let s of n)s!==t&&(o[s]=!0);this.hiddenOutputIds.set(o)}}getInputOpNodeVisible(t){return!this.hiddenInputOpNodeIds()[t]}getOutputVisible(t){return!this.hiddenOutputIds()[t]}resetInputOutputHiddenIds(){this.hiddenInputOpNodeIds.set({}),this.hiddenOutputIds.set({})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var Xo=(()=>{class i{appService;selectedNodeIds=yt({});hasSelectedNodes=Xt(()=>Object.keys(this.selectedNodeIds()).length>0);selectedNodeCount=Xt(()=>Object.keys(this.selectedNodeIds()).length);paneId="";constructor(t){this.appService=t}toggleNode(t){this.selectedNodeIds.update(n=>{if(!this.modelGraph)return n;let r=this.modelGraph.nodesById[t];if(xt(r)){let o=r.descendantsOpNodeIds||[],s=o.some(a=>n[a]);for(let a of o)Et(this.modelGraph.nodesById[a])&&(s?delete n[a]:n[a]=!0)}else n[t]?delete n[t]:n[t]=!0;return Z({},n)})}toggleNodes(t){if(t.length===0||!this.modelGraph)return;let n=Z({},this.selectedNodeIds());for(let r of t){let o=this.modelGraph.nodesById[r];if(Et(o))n[r]?delete n[r]:n[r]=!0;else if(xt(o)&&!o.expanded)for(let s of o.descendantsOpNodeIds||[])n[s]?delete n[s]:n[s]=!0}this.selectedNodeIds.set(n)}clearSelection(){this.selectedNodeIds.set({})}isHiddenFromSelection(t){return t.label==="pseudo_const"}getSelectedSubgraph(){if(!this.modelGraph)return;let t=this.appService.getGraphById(this.modelGraph.id);if(!t)return;t=JSON.parse(JSON.stringify(t));let n={};for(let h of t.nodes)n[h.id]=h;let r=this.selectedNodeIds(),o=t.nodes.filter(h=>r[h.id]===!0),s=o.find(h=>h.label==="GraphInputs");if(!s){let h=t.nodes.find(p=>p.label==="GraphInputs");if(!h)throw new Error("GraphInputs node not found in the original graph.");s=structuredClone(h),s.outputsMetadata=[],o.push(s)}s.outputsMetadata=s.outputsMetadata||[];let a=new Map,l=s.outputsMetadata.length;for(let h of o){let p=(h.incomingEdges||[]).filter(f=>!r[f.sourceNodeId]);for(let f of p){let m=n[f.sourceNodeId];if(this.isHiddenFromSelection(m)){o.push(m);continue}let b=(m.outputsMetadata||[]).find(_=>_.id===f.sourceNodeOutputId);if(!b)continue;let g=(b.attrs||[]).find(_=>_.key==="tensor_index")?.value;g&&(a.has(g)||(a.set(g,l.toString()),s.outputsMetadata.push({id:l.toString(),attrs:b.attrs}),l++),f.sourceNodeId=s.id,f.sourceNodeOutputId=a.get(g))}}let c=o.find(h=>h.label==="GraphOutputs");if(!c){let h=t.nodes.find(p=>p.label==="GraphOutputs");if(!h)throw new Error("GraphOutputs node not found in the original graph.");c=structuredClone(h),c.incomingEdges=[],o.push(c)}c.incomingEdges=c.incomingEdges||[];let d=new Set,u=c.incomingEdges.length;for(let h of t.nodes){if(r[h.id])continue;let p=(h.incomingEdges||[]).filter(f=>r[f.sourceNodeId]);for(let f of p){let b=(n[f.sourceNodeId].outputsMetadata||[]).find(_=>_.id===f.sourceNodeOutputId);if(!b)continue;let g=(b.attrs||[]).find(_=>_.key==="tensor_index")?.value;if(g&&!d.has(g)){d.add(g);let _=structuredClone(f);_.targetNodeInputId=u.toString(),c.incomingEdges.push(_),u++}}}return{id:`${t.id}_subgraph`,collectionLabel:t.collectionLabel,nodes:o}}get modelGraph(){return this.appService.getCurrentModelGraphFromPane(this.paneId)}static \u0275fac=function(n){return new(n||i)(X(st))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var eC=class{};function zH(i){return i&&typeof i.connect=="function"&&!(i instanceof hl)}var ef=class{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(e=!1,t,n=!0,r){this._multiple=e,this._emitChanges=n,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new me,t&&t.length&&(e?t.forEach(o=>this._markSelected(o)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...e){this._verifyValueAssignment(e),e.forEach(n=>this._markSelected(n));let t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...e){this._verifyValueAssignment(e),e.forEach(n=>this._unmarkSelected(n));let t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...e){this._verifyValueAssignment(e);let t=this.selected,n=new Set(e);e.forEach(o=>this._markSelected(o)),t.filter(o=>!n.has(this._getConcreteValue(o,n))).forEach(o=>this._unmarkSelected(o));let r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(e){return this.isSelected(e)?this.deselect(e):this.select(e)}clear(e=!0){this._unmarkAll();let t=this._hasQueuedChanges();return e&&this._emitChangeEvent(),t}isSelected(e){return this._selection.has(this._getConcreteValue(e))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(e){this._multiple&&this.selected&&this._selected.sort(e)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(e){e=this._getConcreteValue(e),this.isSelected(e)||(this._multiple||this._unmarkAll(),this.isSelected(e)||this._selection.add(e),this._emitChanges&&this._selectedToEmit.push(e))}_unmarkSelected(e){e=this._getConcreteValue(e),this.isSelected(e)&&(this._selection.delete(e),this._emitChanges&&this._deselectedToEmit.push(e))}_unmarkAll(){this.isEmpty()||this._selection.forEach(e=>this._unmarkSelected(e))}_verifyValueAssignment(e){e.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(e,t){if(this.compareWith){t=t??this._selection;for(let n of t)if(this.compareWith(e,n))return n;return e}else return e}};var Xle=20,mu=(()=>{let e=class e{constructor(n,r,o){this._ngZone=n,this._platform=r,this._scrolled=new me,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=o}register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=Xle){return this._platform.isBrowser?new Mt(r=>{this._globalSubscription||this._addGlobalListener();let o=n>0?this._scrolled.pipe(Vv(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{o.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Ke()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let o=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe(Gt(s=>!s||o.indexOf(s)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((o,s)=>{this._scrollableContainsElement(s,n)&&r.push(s)}),r}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(n,r){let o=er(r),s=n.getElementRef().nativeElement;do if(o==s)return!0;while(o=o.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let n=this._getWindow();return yn(n.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}};e.\u0275fac=function(r){return new(r||e)(X(Le),X(gn),X(Ye,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),oO=(()=>{let e=class e{constructor(n,r,o,s){this.elementRef=n,this.scrollDispatcher=r,this.ngZone=o,this.dir=s,this._destroyed=new me,this._elementScrolled=new Mt(a=>this.ngZone.runOutsideAngular(()=>yn(this.elementRef.nativeElement,"scroll").pipe(Xe(this._destroyed)).subscribe(a)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(n){let r=this.elementRef.nativeElement,o=this.dir&&this.dir.value=="rtl";n.left==null&&(n.left=o?n.end:n.start),n.right==null&&(n.right=o?n.start:n.end),n.bottom!=null&&(n.top=r.scrollHeight-r.clientHeight-n.bottom),o&&Mh()!=fs.NORMAL?(n.left!=null&&(n.right=r.scrollWidth-r.clientWidth-n.left),Mh()==fs.INVERTED?n.left=n.right:Mh()==fs.NEGATED&&(n.left=n.right?-n.right:n.right)):n.right!=null&&(n.left=r.scrollWidth-r.clientWidth-n.right),this._applyScrollToOptions(n)}_applyScrollToOptions(n){let r=this.elementRef.nativeElement;hy()?r.scrollTo(n):(n.top!=null&&(r.scrollTop=n.top),n.left!=null&&(r.scrollLeft=n.left))}measureScrollOffset(n){let r="left",o="right",s=this.elementRef.nativeElement;if(n=="top")return s.scrollTop;if(n=="bottom")return s.scrollHeight-s.clientHeight-s.scrollTop;let a=this.dir&&this.dir.value=="rtl";return n=="start"?n=a?o:r:n=="end"&&(n=a?r:o),a&&Mh()==fs.INVERTED?n==r?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:a&&Mh()==fs.NEGATED?n==r?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:n==r?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(mu),M(Le),M(ai,8))},e.\u0275dir=ze({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0});let i=e;return i})(),Zle=20,ra=(()=>{let e=class e{constructor(n,r,o){this._platform=n,this._change=new me,this._changeListener=s=>{this._change.next(s)},this._document=o,r.runOutsideAngular(()=>{if(n.isBrowser){let s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let n=this._getWindow();n.removeEventListener("resize",this._changeListener),n.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:o}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+o,right:n.left+r,height:o,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),o=n.documentElement,s=o.getBoundingClientRect(),a=-s.top||n.body.scrollTop||r.scrollY||o.scrollTop||0,l=-s.left||n.body.scrollLeft||r.scrollX||o.scrollLeft||0;return{top:a,left:l}}change(n=Zle){return n>0?this._change.pipe(Vv(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Le),X(Ye,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Zo=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})(),sO=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[$l,Zo,$l,Zo]});let i=e;return i})();var V_=class{attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},Di=class extends V_{constructor(e,t,n,r,o){super(),this.component=e,this.viewContainerRef=t,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=o}},jr=class extends V_{constructor(e,t,n,r){super(),this.templateRef=e,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}},aO=class extends V_{constructor(e){super(),this.element=e instanceof Re?e.nativeElement:e}},oa=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Di)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof jr)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof aO)return this._attachedPortal=e,this.attachDomPortal(e)}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var z_=class extends oa{constructor(e,t,n,r,o){super(),this.outletElement=e,this._componentFactoryResolver=t,this._appRef=n,this._defaultInjector=r,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(e){let n=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),r;return e.viewContainerRef?(r=e.viewContainerRef.createComponent(n,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector,e.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=n.create(e.injector||this._defaultInjector||bt.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=e,r}attachTemplatePortal(e){let t=e.viewContainerRef,n=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);r!==-1&&t.remove(r)}),this._attachedPortal=e,n}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}};var Qo=(()=>{let e=class e extends oa{constructor(n,r,o){super(),this._componentFactoryResolver=n,this._viewContainerRef=r,this._isInitialized=!1,this.attached=new Pe,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let l=this._document.createComment("dom-portal");s.setAttachedHost(this),a.parentNode.insertBefore(l,a),this._getRootNode().appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,s=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component),a=r.createComponent(s,r.length,n.injector||r.injector,n.projectableNodes||void 0);return r!==this._viewContainerRef&&this._getRootNode().appendChild(a.hostView.rootNodes[0]),super.setDisposeFn(()=>a.destroy()),this._attachedPortal=n,this._attachedRef=a,this.attached.emit(a),a}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}};e.\u0275fac=function(r){return new(r||e)(M(ds),M(Yt),M(Ye))},e.\u0275dir=ze({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[nn]});let i=e;return i})();var Ms=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})();var UH=hy(),lO=class{constructor(e,t){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=gi(-this._previousScrollPosition.left),e.style.top=gi(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,t=this._document.body,n=e.style,r=t.style,o=n.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),UH&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),UH&&(n.scrollBehavior=o,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let t=this._document.body,n=this._viewportRuler.getViewportSize();return t.scrollHeight>n.height||t.scrollWidth>n.width}};var cO=class{constructor(e,t,n,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Gt(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},tC=class{enable(){}disable(){}attach(){}};function dO(i,e){return e.some(t=>{let n=i.bottomt.bottom,o=i.rightt.right;return n||r||o||s})}function HH(i,e){return e.some(t=>{let n=i.topt.bottom,o=i.leftt.right;return n||r||o||s})}var uO=class{constructor(e,t,n,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this._config=r,this._scrollSubscription=null}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();dO(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},Kle=(()=>{let e=class e{constructor(n,r,o,s){this._scrollDispatcher=n,this._viewportRuler=r,this._ngZone=o,this.noop=()=>new tC,this.close=a=>new cO(this._scrollDispatcher,this._ngZone,this._viewportRuler,a),this.block=()=>new lO(this._viewportRuler,this._document),this.reposition=a=>new uO(this._scrollDispatcher,this._viewportRuler,this._ngZone,a),this._document=s}};e.\u0275fac=function(r){return new(r||e)(X(mu),X(ra),X(Le),X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),ui=class{constructor(e){if(this.scrollStrategy=new tC,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){let t=Object.keys(e);for(let n of t)e[n]!==void 0&&(this[n]=e[n])}}};var hO=class{constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}};var YH=(()=>{let e=class e{constructor(n){this._attachedOverlays=[],this._document=n}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),Jle=(()=>{let e=class e extends YH{constructor(n,r){super(n),this._ngZone=r,this._keydownListener=o=>{let s=this._attachedOverlays;for(let a=s.length-1;a>-1;a--)if(s[a]._keydownEvents.observers.length>0){let l=s[a]._keydownEvents;this._ngZone?this._ngZone.run(()=>l.next(o)):l.next(o);break}}}add(n){super.add(n),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(Le,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),ece=(()=>{let e=class e extends YH{constructor(n,r,o){super(n),this._platform=r,this._ngZone=o,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=Si(s)},this._clickListener=s=>{let a=Si(s),l=s.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:a;this._pointerDownEventTarget=null;let c=this._attachedOverlays.slice();for(let d=c.length-1;d>-1;d--){let u=c[d];if(u._outsidePointerEvents.observers.length<1||!u.hasAttached())continue;if(GH(u.overlayElement,a)||GH(u.overlayElement,l))break;let h=u._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>h.next(s)):h.next(s)}}}add(n){if(super.add(n),!this._isAttached){let r=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(r)):this._addEventListeners(r),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let n=this._document.body;n.removeEventListener("pointerdown",this._pointerDownListener,!0),n.removeEventListener("click",this._clickListener,!0),n.removeEventListener("auxclick",this._clickListener,!0),n.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(n.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(n){n.addEventListener("pointerdown",this._pointerDownListener,!0),n.addEventListener("click",this._clickListener,!0),n.addEventListener("auxclick",this._clickListener,!0),n.addEventListener("contextmenu",this._clickListener,!0)}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(gn),X(Le,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function GH(i,e){let t=typeof ShadowRoot<"u"&&ShadowRoot,n=e;for(;n;){if(n===i)return!0;n=t&&n instanceof ShadowRoot?n.host:n.parentNode}return!1}var tf=(()=>{let e=class e{constructor(n,r){this._platform=r,this._document=n}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||Bm()){let o=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let s=0;sthis._backdropClick.next(h),this._backdropTransitionendHandler=h=>{this._disposeBackdrop(h.target)},this._keydownEvents=new me,this._outsidePointerEvents=new me,this._renders=new me,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=kr(()=>qf(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),fr(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=Z(Z({},this._config),e),this._updateElementSize()}setDirection(e){this._config=wt(Z({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=gi(this._config.width),e.height=gi(this._config.height),e.minWidth=gi(this._config.minWidth),e.minHeight=gi(this._config.minHeight),e.maxWidth=gi(this._config.maxWidth),e.maxHeight=gi(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let e=this._backdropElement;if(e){if(this._animationsDisabled){this._disposeBackdrop(e);return}e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",this._backdropTransitionendHandler)}),e.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(e)},500))}}_toggleClasses(e,t,n){let r=gd(t||[]).filter(o=>!!o);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(Xe(Yn(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",this._backdropTransitionendHandler),e.remove(),this._backdropElement===e&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},jH="cdk-overlay-connected-position-bounding-box",tce=/([A-Za-z%]+)$/,pO=class{get positions(){return this._preferredPositions}constructor(e,t,n,r,o){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new me,this._resizeSubscription=Ct.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(jH),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,o=[],s;for(let a of this._preferredPositions){let l=this._getOriginPoint(e,r,a),c=this._getOverlayPoint(l,t,a),d=this._getOverlayFit(c,t,n,a);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,l);return}if(this._canFitWithFlexibleDimensions(d,c,n)){o.push({position:a,origin:l,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(l,a)});continue}(!s||s.overlayFit.visibleAreal&&(l=d,a=c)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&gu(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(jH),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,n){let r;if(n.originX=="center")r=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;r=n.originX=="start"?s:a}t.left<0&&(r-=t.left);let o;return n.originY=="center"?o=e.top+e.height/2:o=n.originY=="top"?e.top:e.bottom,t.top<0&&(o-=t.top),{x:r,y:o}}_getOverlayPoint(e,t,n){let r;n.overlayX=="center"?r=-t.width/2:n.overlayX==="start"?r=this._isRtl()?-t.width:0:r=this._isRtl()?0:-t.width;let o;return n.overlayY=="center"?o=-t.height/2:o=n.overlayY=="top"?0:-t.height,{x:e.x+r,y:e.y+o}}_getOverlayFit(e,t,n,r){let o=$H(t),{x:s,y:a}=e,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(s+=l),c&&(a+=c);let d=0-s,u=s+o.width-n.width,h=0-a,p=a+o.height-n.height,f=this._subtractOverflows(o.width,d,u),m=this._subtractOverflows(o.height,h,p),b=f*m;return{visibleArea:b,isCompletelyWithinViewport:o.width*o.height===b,fitsInViewportVertically:m===o.height,fitsInViewportHorizontally:f==o.width}}_canFitWithFlexibleDimensions(e,t,n){if(this._hasFlexibleDimensions){let r=n.bottom-t.y,o=n.right-t.x,s=WH(this._overlayRef.getConfig().minHeight),a=WH(this._overlayRef.getConfig().minWidth),l=e.fitsInViewportVertically||s!=null&&s<=r,c=e.fitsInViewportHorizontally||a!=null&&a<=o;return l&&c}return!1}_pushOverlayOnScreen(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=$H(t),o=this._viewportRect,s=Math.max(e.x+r.width-o.width,0),a=Math.max(e.y+r.height-o.height,0),l=Math.max(o.top-n.top-e.y,0),c=Math.max(o.left-n.left-e.x,0),d=0,u=0;return r.width<=o.width?d=c||-s:d=e.xf&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-f/2)}let l=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,c=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,d,u,h;if(c)h=n.width-e.x+this._viewportMargin*2,d=e.x-this._viewportMargin;else if(l)u=e.x,d=n.right-e.x;else{let p=Math.min(n.right-e.x+n.left,e.x),f=this._lastBoundingBoxSize.width;d=p*2,u=e.x-p,d>f&&!this._isInitialRender&&!this._growAfterOpen&&(u=e.x-f/2)}return{top:s,left:u,bottom:a,right:h,width:d,height:o}}_setBoundingBoxStyles(e,t){let n=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=gi(n.height),r.top=gi(n.top),r.bottom=gi(n.bottom),r.width=gi(n.width),r.left=gi(n.left),r.right=gi(n.right),t.overlayX==="center"?r.alignItems="center":r.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?r.justifyContent="center":r.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",o&&(r.maxHeight=gi(o)),s&&(r.maxWidth=gi(s))}this._lastBoundingBoxSize=n,gu(this._boundingBox.style,r)}_resetBoundingBoxStyles(){gu(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){gu(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let d=this._viewportRuler.getViewportScrollPosition();gu(n,this._getExactOverlayY(t,e,d)),gu(n,this._getExactOverlayX(t,e,d))}else n.position="static";let a="",l=this._getOffset(t,"x"),c=this._getOffset(t,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),n.transform=a.trim(),s.maxHeight&&(r?n.maxHeight=gi(s.maxHeight):o&&(n.maxHeight="")),s.maxWidth&&(r?n.maxWidth=gi(s.maxWidth):o&&(n.maxWidth="")),gu(this._pane.style,n)}_getExactOverlayY(e,t,n){let r={top:"",bottom:""},o=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(o.y+this._overlayRect.height)}px`}else r.top=gi(o.y);return r}_getExactOverlayX(e,t,n){let r={left:"",right:""},o=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;r.right=`${a-(o.x+this._overlayRect.width)}px`}else r.left=gi(o.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:HH(e,n),isOriginOutsideView:dO(e,n),isOverlayClipped:HH(t,n),isOverlayOutsideView:dO(t,n)}}_subtractOverflows(e,...t){return t.reduce((n,r)=>n-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&gd(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof Re)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}};function gu(i,e){for(let t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function WH(i){if(typeof i!="number"&&i!=null){let[e,t]=i.split(tce);return!t||t==="px"?parseFloat(e):null}return i||null}function $H(i){return{top:Math.floor(i.top),right:Math.floor(i.right),bottom:Math.floor(i.bottom),left:Math.floor(i.left),width:Math.floor(i.width),height:Math.floor(i.height)}}function nce(i,e){return i===e?!0:i.isOriginClipped===e.isOriginClipped&&i.isOriginOutsideView===e.isOriginOutsideView&&i.isOverlayClipped===e.isOverlayClipped&&i.isOverlayOutsideView===e.isOverlayOutsideView}var qH="cdk-global-overlay-wrapper",fO=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(qH),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:s,maxHeight:a}=n,l=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),c=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),d=this._xPosition,u=this._xOffset,h=this._overlayRef.getConfig().direction==="rtl",p="",f="",m="";l?m="flex-start":d==="center"?(m="center",h?f=u:p=u):h?d==="left"||d==="end"?(m="flex-end",p=u):(d==="right"||d==="start")&&(m="flex-start",f=u):d==="left"||d==="start"?(m="flex-start",p=u):(d==="right"||d==="end")&&(m="flex-end",f=u),e.position=this._cssPosition,e.marginLeft=l?"0":p,e.marginTop=c?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=l?"0":f,t.justifyContent=m,t.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(qH),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},ice=(()=>{let e=class e{constructor(n,r,o,s){this._viewportRuler=n,this._document=r,this._platform=o,this._overlayContainer=s}global(){return new fO}flexibleConnectedTo(n){return new pO(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}};e.\u0275fac=function(r){return new(r||e)(X(ra),X(Ye),X(gn),X(tf))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),rce=0,Ht=(()=>{let e=class e{constructor(n,r,o,s,a,l,c,d,u,h,p,f){this.scrollStrategies=n,this._overlayContainer=r,this._componentFactoryResolver=o,this._positionBuilder=s,this._keyboardDispatcher=a,this._injector=l,this._ngZone=c,this._document=d,this._directionality=u,this._location=h,this._outsideClickDispatcher=p,this._animationsModuleType=f}create(n){let r=this._createHostElement(),o=this._createPaneElement(r),s=this._createPortalOutlet(o),a=new ui(n);return a.direction=a.direction||this._directionality.value,new al(s,r,o,a,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(qi))}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=`cdk-overlay-${rce++}`,r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(us)),new z_(n,this._componentFactoryResolver,this._appRef,this._injector,this._document)}};e.\u0275fac=function(r){return new(r||e)(X(Kle),X(tf),X(ds),X(ice),X(Jle),X(bt),X(Le),X(Ye),X(ai),X(Pa),X(ece),X(Zn,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),oce=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],XH=new ge("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.reposition()}}),U_=(()=>{let e=class e{constructor(n){this.elementRef=n}};e.\u0275fac=function(r){return new(r||e)(M(Re))},e.\u0275dir=ze({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0});let i=e;return i})(),mO=(()=>{let e=class e{get offsetX(){return this._offsetX}set offsetX(n){this._offsetX=n,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(n){this._offsetY=n,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(n){this._disposeOnNavigation=n}constructor(n,r,o,s,a){this._overlay=n,this._dir=a,this._backdropSubscription=Ct.EMPTY,this._attachSubscription=Ct.EMPTY,this._detachSubscription=Ct.EMPTY,this._positionSubscription=Ct.EMPTY,this._disposeOnNavigation=!1,this._ngZone=te(Le),this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new Pe,this.positionChange=new Pe,this.attach=new Pe,this.detach=new Pe,this.overlayKeydown=new Pe,this.overlayOutsideClick=new Pe,this._templatePortal=new jr(r,o),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(n){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),n.origin&&this.open&&this._position.apply()),n.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=oce);let n=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=n.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=n.detachments().subscribe(()=>this.detach.emit()),n.keydownEvents().subscribe(r=>{this.overlayKeydown.next(r),r.keyCode===27&&!this.disableClose&&!mi(r)&&(r.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(r=>{let o=this._getOriginElement(),s=Si(r);(!o||o!==s&&!o.contains(s))&&this.overlayOutsideClick.next(r)})}_buildConfig(){let n=this._position=this.positionStrategy||this._createPositionStrategy(),r=new ui({direction:this._dir,positionStrategy:n,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(r.width=this.width),(this.height||this.height===0)&&(r.height=this.height),(this.minWidth||this.minWidth===0)&&(r.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(r.minHeight=this.minHeight),this.backdropClass&&(r.backdropClass=this.backdropClass),this.panelClass&&(r.panelClass=this.panelClass),r}_updatePositionStrategy(n){let r=this.positions.map(o=>({originX:o.originX,originY:o.originY,overlayX:o.overlayX,overlayY:o.overlayY,offsetX:o.offsetX||this.offsetX,offsetY:o.offsetY||this.offsetY,panelClass:o.panelClass||void 0}));return n.setOrigin(this._getOrigin()).withPositions(r).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let n=this._overlay.position().flexibleConnectedTo(this._getOrigin());return this._updatePositionStrategy(n),n}_getOrigin(){return this.origin instanceof U_?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof U_?this.origin.elementRef.nativeElement:this.origin instanceof Re?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(n=>{this.backdropClick.emit(n)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(OS(()=>this.positionChange.observers.length>0)).subscribe(n=>{this._ngZone.run(()=>this.positionChange.emit(n)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(M(Ht),M(Hn),M(Yt),M(XH),M(ai,8))},e.\u0275dir=ze({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",at],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",at],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",at],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",at],push:[2,"cdkConnectedOverlayPush","push",at],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",at]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[an,dn]});let i=e;return i})();function sce(i){return()=>i.scrollStrategies.reposition()}var ace={provide:XH,deps:[Ht],useFactory:sce},Jr=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[Ht,ace],imports:[$l,Ms,sO,sO]});let i=e;return i})();var lce=["*"],nC;function cce(){if(nC===void 0&&(nC=null,typeof window<"u")){let i=window;i.trustedTypes!==void 0&&(nC=i.trustedTypes.createPolicy("angular#components",{createHTML:e=>e}))}return nC}function H_(i){return cce()?.createHTML(i)||i}function ZH(i){return Error(`Unable to find icon with the name "${i}"`)}function dce(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}function QH(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function KH(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var ll=class{constructor(e,t,n){this.url=e,this.svgText=t,this.options=n}},uce=(()=>{let e=class e{constructor(n,r,o,s){this._httpClient=n,this._sanitizer=r,this._errorHandler=s,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=o}addSvgIcon(n,r,o){return this.addSvgIconInNamespace("",n,r,o)}addSvgIconLiteral(n,r,o){return this.addSvgIconLiteralInNamespace("",n,r,o)}addSvgIconInNamespace(n,r,o,s){return this._addSvgIconConfig(n,r,new ll(o,null,s))}addSvgIconResolver(n){return this._resolvers.push(n),this}addSvgIconLiteralInNamespace(n,r,o,s){let a=this._sanitizer.sanitize(Zr.HTML,o);if(!a)throw KH(o);let l=H_(a);return this._addSvgIconConfig(n,r,new ll("",l,s))}addSvgIconSet(n,r){return this.addSvgIconSetInNamespace("",n,r)}addSvgIconSetLiteral(n,r){return this.addSvgIconSetLiteralInNamespace("",n,r)}addSvgIconSetInNamespace(n,r,o){return this._addSvgIconSetConfig(n,new ll(r,null,o))}addSvgIconSetLiteralInNamespace(n,r,o){let s=this._sanitizer.sanitize(Zr.HTML,r);if(!s)throw KH(r);let a=H_(s);return this._addSvgIconSetConfig(n,new ll("",a,o))}registerFontClassAlias(n,r=n){return this._fontCssClassesByAlias.set(n,r),this}classNameForFontAlias(n){return this._fontCssClassesByAlias.get(n)||n}setDefaultFontSetClass(...n){return this._defaultFontSetClass=n,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(n){let r=this._sanitizer.sanitize(Zr.RESOURCE_URL,n);if(!r)throw QH(n);let o=this._cachedIconsByUrl.get(r);return o?Ke(iC(o)):this._loadSvgIconFromConfig(new ll(n,null)).pipe(Sn(s=>this._cachedIconsByUrl.set(r,s)),Je(s=>iC(s)))}getNamedSvgIcon(n,r=""){let o=JH(r,n),s=this._svgIconConfigs.get(o);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(r,n),s)return this._svgIconConfigs.set(o,s),this._getSvgFromConfig(s);let a=this._iconSetConfigs.get(r);return a?this._getSvgFromIconSetConfigs(n,a):ml(ZH(o))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(n){return n.svgText?Ke(iC(this._svgElementFromConfig(n))):this._loadSvgIconFromConfig(n).pipe(Je(r=>iC(r)))}_getSvgFromIconSetConfigs(n,r){let o=this._extractIconWithNameFromAnySet(n,r);if(o)return Ke(o);let s=r.filter(a=>!a.svgText).map(a=>this._loadSvgIconSetFromConfig(a).pipe(Ds(l=>{let d=`Loading icon set URL: ${this._sanitizer.sanitize(Zr.RESOURCE_URL,a.url)} failed: ${l.message}`;return this._errorHandler.handleError(new Error(d)),Ke(null)})));return Mf(s).pipe(Je(()=>{let a=this._extractIconWithNameFromAnySet(n,r);if(!a)throw ZH(n);return a}))}_extractIconWithNameFromAnySet(n,r){for(let o=r.length-1;o>=0;o--){let s=r[o];if(s.svgText&&s.svgText.toString().indexOf(n)>-1){let a=this._svgElementFromConfig(s),l=this._extractSvgIconFromSet(a,n,s.options);if(l)return l}}return null}_loadSvgIconFromConfig(n){return this._fetchIcon(n).pipe(Sn(r=>n.svgText=r),Je(()=>this._svgElementFromConfig(n)))}_loadSvgIconSetFromConfig(n){return n.svgText?Ke(null):this._fetchIcon(n).pipe(Sn(r=>n.svgText=r))}_extractSvgIconFromSet(n,r,o){let s=n.querySelector(`[id="${r}"]`);if(!s)return null;let a=s.cloneNode(!0);if(a.removeAttribute("id"),a.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(a,o);if(a.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(a),o);let l=this._svgElementFromString(H_(""));return l.appendChild(a),this._setSvgAttributes(l,o)}_svgElementFromString(n){let r=this._document.createElement("DIV");r.innerHTML=n;let o=r.querySelector("svg");if(!o)throw Error(" tag not found");return o}_toSvgElement(n){let r=this._svgElementFromString(H_("")),o=n.attributes;for(let s=0;sH_(d)),bl(()=>this._inProgressUrlFetches.delete(a)),Tf());return this._inProgressUrlFetches.set(a,c),c}_addSvgIconConfig(n,r,o){return this._svgIconConfigs.set(JH(n,r),o),this}_addSvgIconSetConfig(n,r){let o=this._iconSetConfigs.get(n);return o?o.push(r):this._iconSetConfigs.set(n,[r]),this}_svgElementFromConfig(n){if(!n.svgElement){let r=this._svgElementFromString(n.svgText);this._setSvgAttributes(r,n.options),n.svgElement=r}return n.svgElement}_getIconConfigFromResolvers(n,r){for(let o=0;oe?e.pathname+e.search:""}}var eG=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gce=eG.map(i=>`[${i}]`).join(", "),_ce=/^url\(['"]?#(.*?)['"]?\)$/,gt=(()=>{let e=class e{get color(){return this._color||this._defaultColor}set color(n){this._color=n}get svgIcon(){return this._svgIcon}set svgIcon(n){n!==this._svgIcon&&(n?this._updateSvgIcon(n):this._svgIcon&&this._clearSvgElement(),this._svgIcon=n)}get fontSet(){return this._fontSet}set fontSet(n){let r=this._cleanupFontValue(n);r!==this._fontSet&&(this._fontSet=r,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(n){let r=this._cleanupFontValue(n);r!==this._fontIcon&&(this._fontIcon=r,this._updateFontIconClasses())}constructor(n,r,o,s,a,l){this._elementRef=n,this._iconRegistry=r,this._location=s,this._errorHandler=a,this.inline=!1,this._previousFontSetClass=[],this._currentIconFetch=Ct.EMPTY,l&&(l.color&&(this.color=this._defaultColor=l.color),l.fontSet&&(this.fontSet=l.fontSet)),o||n.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(n){if(!n)return["",""];let r=n.split(":");switch(r.length){case 1:return["",r[0]];case 2:return r;default:throw Error(`Invalid icon name: "${n}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let n=this._elementsWithExternalReferences;if(n&&n.size){let r=this._location.getPathname();r!==this._previousPath&&(this._previousPath=r,this._prependPathToReferences(r))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(n){this._clearSvgElement();let r=this._location.getPathname();this._previousPath=r,this._cacheChildrenWithExternalReferences(n),this._prependPathToReferences(r),this._elementRef.nativeElement.appendChild(n)}_clearSvgElement(){let n=this._elementRef.nativeElement,r=n.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();r--;){let o=n.childNodes[r];(o.nodeType!==1||o.nodeName.toLowerCase()==="svg")&&o.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let n=this._elementRef.nativeElement,r=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(o=>o.length>0);this._previousFontSetClass.forEach(o=>n.classList.remove(o)),r.forEach(o=>n.classList.add(o)),this._previousFontSetClass=r,this.fontIcon!==this._previousFontIconClass&&!r.includes("mat-ligature-font")&&(this._previousFontIconClass&&n.classList.remove(this._previousFontIconClass),this.fontIcon&&n.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(n){return typeof n=="string"?n.trim().split(" ")[0]:n}_prependPathToReferences(n){let r=this._elementsWithExternalReferences;r&&r.forEach((o,s)=>{o.forEach(a=>{s.setAttribute(a.name,`url('${n}#${a.value}')`)})})}_cacheChildrenWithExternalReferences(n){let r=n.querySelectorAll(gce),o=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{let l=r[s],c=l.getAttribute(a),d=c?c.match(_ce):null;if(d){let u=o.get(l);u||(u=[],o.set(l,u)),u.push({name:a,value:d[1]})}})}_updateSvgIcon(n){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),n){let[r,o]=this._splitIconName(n);r&&(this._svgNamespace=r),o&&(this._svgName=o),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(o,r).pipe(_n(1)).subscribe(s=>this._setSvgElement(s),s=>{let a=`Error retrieving icon ${r}:${o}! ${s.message}`;this._errorHandler.handleError(new Error(a))})}}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(uce),ro("aria-hidden"),M(fce),M(Rr),M(pce,8))},e.\u0275cmp=le({type:e,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(r,o){r&2&&(Ze("data-mat-icon-type",o._usingFontIcon()?"font":"svg")("data-mat-icon-name",o._svgName||o.fontIcon)("data-mat-icon-namespace",o._svgNamespace||o.fontSet)("fontIcon",o._usingFontIcon()?o.fontIcon:null),Nr(o.color?"mat-"+o.color:""),se("mat-icon-inline",o.inline)("mat-icon-no-color",o.color!=="primary"&&o.color!=="accent"&&o.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",at],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],standalone:!0,features:[an,ce],ngContentSelectors:lce,decls:1,vars:0,template:function(r,o){r&1&&(kn(),$t(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0});let i=e;return i})(),it=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[qt,qt]});let i=e;return i})();var vce=["mat-menu-item",""],bce=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],yce=["mat-icon, [matMenuItemIcon]","*"];function xce(i,e){i&1&&(io(),v(0,"svg",2),J(1,"polygon",3),y())}var wce=["*"];function Cce(i,e){if(i&1){let t=ie();v(0,"div",0),H("keydown",function(r){V(t);let o=I();return z(o._handleKeydown(r))})("click",function(){V(t);let r=I();return z(r.closed.emit("click"))})("@transformMenu.start",function(r){V(t);let o=I();return z(o._onAnimationStart(r))})("@transformMenu.done",function(r){V(t);let o=I();return z(o._onAnimationDone(r))}),v(1,"div",1),$t(2),y()()}if(i&2){let t=I();Nr(t._classList),N("id",t.panelId)("@transformMenu",t._panelAnimationState),Ze("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}var gO=new ge("MAT_MENU_PANEL"),G_=(()=>{let e=class e{constructor(n,r,o,s,a){this._elementRef=n,this._document=r,this._focusMonitor=o,this._parentMenu=s,this._changeDetectorRef=a,this.role="menuitem",this.disabled=!1,this.disableRipple=!1,this._hovered=new me,this._focused=new me,this._highlighted=!1,this._triggersSubmenu=!1,s?.addItem?.(this)}focus(n,r){this._focusMonitor&&n?this._focusMonitor.focusVia(this._getHostElement(),n,r):this._getHostElement().focus(r),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let n=this._elementRef.nativeElement.cloneNode(!0),r=n.querySelectorAll("mat-icon, .material-icons");for(let o=0;o enter",Pn("120ms cubic-bezier(0, 0, 0.2, 1)",Qt({opacity:1,transform:"scale(1)"}))),On("* => void",Pn("100ms 25ms linear",Qt({opacity:0})))]),fadeInItems:si("fadeInItems",[fi("showing",Qt({opacity:1})),On("void => *",[Qt({opacity:0}),Pn("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},pHe=rC.fadeInItems,fHe=rC.transformMenu,Mce=0,Ece=new ge("mat-menu-default-options",{providedIn:"root",factory:Ice});function Ice(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}var Jo=(()=>{let e=class e{get xPosition(){return this._xPosition}set xPosition(n){this._xPosition=n,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(n){this._yPosition=n,this.setPositionClasses()}set panelClass(n){let r=this._previousPanelClass,o=Z({},this._classList);r&&r.length&&r.split(" ").forEach(s=>{o[s]=!1}),this._previousPanelClass=n,n&&n.length&&(n.split(" ").forEach(s=>{o[s]=!0}),this._elementRef.nativeElement.className=""),this._classList=o}get classList(){return this.panelClass}set classList(n){this.panelClass=n}constructor(n,r,o,s){this._elementRef=n,this._changeDetectorRef=s,this._elevationPrefix="mat-elevation-z",this._baseElevation=null,this._directDescendantItems=new Yi,this._classList={},this._panelAnimationState="void",this._animationDone=new me,this.closed=new Pe,this.close=this.closed,this.panelId=`mat-menu-panel-${Mce++}`,this._injector=te(bt),this.overlayPanelClass=o.overlayPanelClass||"",this._xPosition=o.xPosition,this._yPosition=o.yPosition,this.backdropClass=o.backdropClass,this.overlapTrigger=o.overlapTrigger,this.hasBackdrop=o.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new yy(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(pi(this._directDescendantItems),Xn(n=>Yn(...n.map(r=>r._focused)))).subscribe(n=>this._keyManager.updateActiveItem(n)),this._directDescendantItems.changes.subscribe(n=>{let r=this._keyManager;if(this._panelAnimationState==="enter"&&r.activeItem?._hasFocus()){let o=n.toArray(),s=Math.max(0,Math.min(o.length-1,r.activeItemIndex||0));o[s]&&!o[s].disabled?r.setActiveItem(s):r.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy()}_hovered(){return this._directDescendantItems.changes.pipe(pi(this._directDescendantItems),Xn(r=>Yn(...r.map(o=>o._hovered))))}addItem(n){}removeItem(n){}_handleKeydown(n){let r=n.keyCode,o=this._keyManager;switch(r){case 27:mi(n)||(n.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(r===38||r===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(n);return}n.stopPropagation()}focusFirstItem(n="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=fr(()=>{let r=null;if(this._directDescendantItems.length&&(r=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!r||!r.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(n).setFirstItemActive(),!o.activeItem&&r&&r.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(n){if(this._baseElevation===null){let l=(typeof getComputedStyle=="function"?getComputedStyle(this._elementRef.nativeElement):null)?.getPropertyValue("--mat-menu-base-elevation-level")||"8";this._baseElevation=parseInt(l)}let r=Math.min(this._baseElevation+n,24),o=`${this._elevationPrefix}${r}`,s=Object.keys(this._classList).find(a=>a.startsWith(this._elevationPrefix));if(!s||s===this._previousElevation){let a=Z({},this._classList);this._previousElevation&&(a[this._previousElevation]=!1),a[o]=!0,this._previousElevation=o,this._classList=a}}setPositionClasses(n=this.xPosition,r=this.yPosition){this._classList=wt(Z({},this._classList),{"mat-menu-before":n==="before","mat-menu-after":n==="after","mat-menu-above":r==="above","mat-menu-below":r==="below"}),this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(n){this._animationDone.next(n),this._isAnimating=!1}_onAnimationStart(n){this._isAnimating=!0,n.toState==="enter"&&this._keyManager.activeItemIndex===0&&(n.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(pi(this._allItems)).subscribe(n=>{this._directDescendantItems.reset(n.filter(r=>r._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Le),M(Ece),M(Fe))},e.\u0275cmp=le({type:e,selectors:[["mat-menu"]],contentQueries:function(r,o,s){if(r&1&&(xi(s,Sce,5),xi(s,G_,5),xi(s,G_,4)),r&2){let a;be(a=ye())&&(o.lazyContent=a.first),be(a=ye())&&(o._allItems=a),be(a=ye())&&(o.items=a)}},viewQuery:function(r,o){if(r&1&&Ie(Hn,5),r&2){let s;be(s=ye())&&(o.templateRef=s.first)}},hostVars:3,hostBindings:function(r,o){r&2&&Ze("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",at],hasBackdrop:[2,"hasBackdrop","hasBackdrop",n=>n==null?null:at(n)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],standalone:!0,features:[Bt([{provide:gO,useExisting:e}]),an,ce],ngContentSelectors:wce,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mat-mdc-elevation-specific",3,"keydown","click","id"],[1,"mat-mdc-menu-content"]],template:function(r,o){r&1&&(kn(),W(0,Cce,3,7,"ng-template"))},styles:['mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font);line-height:var(--mat-menu-item-label-text-line-height);font-size:var(--mat-menu-item-label-text-size);letter-spacing:var(--mat-menu-item-label-text-tracking);font-weight:var(--mat-menu-item-label-text-weight)}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape);background-color:var(--mat-menu-container-color);will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.mat-mdc-menu-panel.ng-animating:has(.mat-mdc-menu-content:empty){display:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color);margin-bottom:var(--mat-menu-divider-bottom-spacing);margin-top:var(--mat-menu-divider-top-spacing)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mat-menu-item-leading-spacing);padding-right:var(--mat-menu-item-trailing-spacing);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}[dir=rtl] .mat-mdc-menu-item{padding-right:var(--mat-menu-item-leading-spacing);padding-left:var(--mat-menu-item-trailing-spacing)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing);padding-right:var(--mat-menu-item-with-icon-trailing-spacing)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-right:var(--mat-menu-item-with-icon-leading-spacing);padding-left:var(--mat-menu-item-with-icon-trailing-spacing)}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color)}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color)}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing);height:var(--mat-menu-item-icon-size);width:var(--mat-menu-item-icon-size)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color)}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color)}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1)}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[rC.transformMenu,rC.fadeInItems]},changeDetection:0});let i=e;return i})(),nG=new ge("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.reposition()}});function Tce(i){return()=>i.scrollStrategies.reposition()}var Dce={provide:nG,deps:[Ht],useFactory:Tce},tG=Fr({passive:!0});var vc=(()=>{let e=class e{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(n){this.menu=n}get menu(){return this._menu}set menu(n){n!==this._menu&&(this._menu=n,this._menuCloseSubscription.unsubscribe(),n&&(this._parentMaterialMenu,this._menuCloseSubscription=n.close.subscribe(r=>{this._destroyMenu(r),(r==="click"||r==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(r)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(n,r,o,s,a,l,c,d,u){this._overlay=n,this._element=r,this._viewContainerRef=o,this._menuItemInstance=l,this._dir=c,this._focusMonitor=d,this._ngZone=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Ct.EMPTY,this._hoverSubscription=Ct.EMPTY,this._menuCloseSubscription=Ct.EMPTY,this._changeDetectorRef=te(Fe),this._handleTouchStart=h=>{yd(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new Pe,this.onMenuOpen=this.menuOpened,this.menuClosed=new Pe,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=a instanceof Jo?a:void 0,r.nativeElement.addEventListener("touchstart",this._handleTouchStart,tG)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,tG),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){let n=this.menu;if(this._menuOpen||!n)return;let r=this._createOverlay(n),o=r.getConfig(),s=o.positionStrategy;this._setPosition(n,s),o.hasBackdrop=n.hasBackdrop==null?!this.triggersSubmenu():n.hasBackdrop,r.attach(this._getPortal(n)),n.lazyContent&&n.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(n),n instanceof Jo&&(n._startAnimation(),n._directDescendantItems.changes.pipe(Xe(n.close)).subscribe(()=>{s.withLockedPosition(!1).reapplyLastPosition(),s.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(n,r){this._focusMonitor&&n?this._focusMonitor.focusVia(this._element,n,r):this._element.nativeElement.focus(r)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(n){if(!this._overlayRef||!this.menuOpen)return;let r=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&(n==="keydown"||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,r instanceof Jo?(r._resetAnimation(),r.lazyContent?r._animationDone.pipe(Gt(o=>o.toState==="void"),_n(1),Xe(r.lazyContent._attached)).subscribe({next:()=>r.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),r?.lazyContent?.detach())}_initMenu(n){n.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,n.direction=this.dir,this._setMenuElevation(n),n.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(n){if(n.setElevation){let r=0,o=n.parentMenu;for(;o;)r++,o=o.parentMenu;n.setElevation(r)}}_setIsMenuOpen(n){n!==this._menuOpen&&(this._menuOpen=n,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(n),this._changeDetectorRef.markForCheck())}_createOverlay(n){if(!this._overlayRef){let r=this._getOverlayConfig(n);this._subscribeToPositions(n,r.positionStrategy),this._overlayRef=this._overlay.create(r),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(n){return new ui({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:n.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:n.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(n,r){n.setPositionClasses&&r.positionChanges.subscribe(o=>{let s=o.connectionPair.overlayX==="start"?"after":"before",a=o.connectionPair.overlayY==="top"?"below":"above";this._ngZone?this._ngZone.run(()=>n.setPositionClasses(s,a)):n.setPositionClasses(s,a)})}_setPosition(n,r){let[o,s]=n.xPosition==="before"?["end","start"]:["start","end"],[a,l]=n.yPosition==="above"?["bottom","top"]:["top","bottom"],[c,d]=[a,l],[u,h]=[o,s],p=0;if(this.triggersSubmenu()){if(h=o=n.xPosition==="before"?"start":"end",s=u=o==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let f=this._parentMaterialMenu.items.first;this._parentInnerPadding=f?f._getHostElement().offsetTop:0}p=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else n.overlapTrigger||(c=a==="top"?"bottom":"top",d=l==="top"?"bottom":"top");r.withPositions([{originX:o,originY:c,overlayX:u,overlayY:a,offsetY:p},{originX:s,originY:c,overlayX:h,overlayY:a,offsetY:p},{originX:o,originY:d,overlayX:u,overlayY:l,offsetY:-p},{originX:s,originY:d,overlayX:h,overlayY:l,offsetY:-p}])}_menuClosingActions(){let n=this._overlayRef.backdropClick(),r=this._overlayRef.detachments(),o=this._parentMaterialMenu?this._parentMaterialMenu.closed:Ke(),s=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Gt(a=>a!==this._menuItemInstance),Gt(()=>this._menuOpen)):Ke();return Yn(n,o,s,r)}_handleMousedown(n){bd(n)||(this._openedBy=n.button===0?"mouse":void 0,this.triggersSubmenu()&&n.preventDefault())}_handleKeydown(n){let r=n.keyCode;(r===13||r===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(r===39&&this.dir==="ltr"||r===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(n){this.triggersSubmenu()?(n.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(Gt(n=>n===this._menuItemInstance&&!n.disabled),ku(0,Cf)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Jo&&this.menu._isAnimating?this.menu._animationDone.pipe(_n(1),ku(0,Cf),Xe(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(n){return(!this._portal||this._portal.templateRef!==n.templateRef)&&(this._portal=new jr(n.templateRef,this._viewContainerRef)),this._portal}};e.\u0275fac=function(r){return new(r||e)(M(Ht),M(Re),M(Yt),M(nG),M(gO,8),M(G_,10),M(ai,8),M(po),M(Le))},e.\u0275dir=ze({type:e,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(r,o){r&1&&H("click",function(a){return o._handleClick(a)})("mousedown",function(a){return o._handleMousedown(a)})("keydown",function(a){return o._handleKeydown(a)}),r&2&&Ze("aria-haspopup",o.menu?"menu":null)("aria-expanded",o.menuOpen)("aria-controls",o.menuOpen?o.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],standalone:!0});let i=e;return i})(),sa=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[Dce],imports:[Ae,Um,qt,Jr,Zo,qt]});let i=e;return i})();var Pce=["tooltip"],oG=20;var sG=new ge("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.reposition({scrollThrottle:oG})}});function Oce(i){return()=>i.scrollStrategies.reposition({scrollThrottle:oG})}var Rce={provide:sG,deps:[Ht],useFactory:Oce};function Ace(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var Nce=new ge("mat-tooltip-default-options",{providedIn:"root",factory:Ace});var iG="tooltip-panel",rG=Fr({passive:!0}),kce=8,Lce=8,Fce=24,Bce=200,Wn=(()=>{let e=class e{get position(){return this._position}set position(n){n!==this._position&&(this._position=n,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(n){this._positionAtOrigin=Ih(n),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(n){this._disabled=Ih(n),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(n){this._showDelay=$s(n)}get hideDelay(){return this._hideDelay}set hideDelay(n){this._hideDelay=$s(n),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(n){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=n!=null?String(n).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(n){this._tooltipClass=n,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(n,r,o,s,a,l,c,d,u,h,p,f){this._overlay=n,this._elementRef=r,this._scrollDispatcher=o,this._viewContainerRef=s,this._ngZone=a,this._platform=l,this._ariaDescriber=c,this._focusMonitor=d,this._dir=h,this._defaultOptions=p,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._tooltipComponent=Vce,this._viewportMargin=8,this._cssClassPrefix="mat-mdc",this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new me,this._injector=te(bt),this._scrollStrategy=u,this._document=f,p&&(this._showDelay=p.showDelay,this._hideDelay=p.hideDelay,p.position&&(this.position=p.position),p.positionAtOrigin&&(this.positionAtOrigin=p.positionAtOrigin),p.touchGestures&&(this.touchGestures=p.touchGestures)),h.change.pipe(Xe(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)}),this._viewportMargin=kce}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Xe(this._destroyed)).subscribe(n=>{n?n==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let n=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([r,o])=>{n.removeEventListener(r,o,rG)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(n,this.message,"tooltip"),this._focusMonitor.stopMonitoring(n)}show(n=this.showDelay,r){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let o=this._createOverlay(r);this._detach(),this._portal=this._portal||new Di(this._tooltipComponent,this._viewContainerRef);let s=this._tooltipInstance=o.attach(this._portal).instance;s._triggerElement=this._elementRef.nativeElement,s._mouseLeaveHideDelay=this._hideDelay,s.afterHidden().pipe(Xe(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),s.show(n)}hide(n=this.hideDelay){let r=this._tooltipInstance;r&&(r.isVisible()?r.hide(n):(r._cancelPendingAnimations(),this._detach()))}toggle(n){this._isTooltipVisible()?this.hide():this.show(void 0,n)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(n){if(this._overlayRef){let s=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!n)&&s._origin instanceof Re)return this._overlayRef;this._detach()}let r=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),o=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin?n||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(r);return o.positionChanges.pipe(Xe(this._destroyed)).subscribe(s=>{this._updateCurrentPositionClass(s.connectionPair),this._tooltipInstance&&s.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:o,panelClass:`${this._cssClassPrefix}-${iG}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Xe(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Xe(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Xe(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&s.keyCode===27&&!mi(s)&&(s.preventDefault(),s.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(n){let r=n.getConfig().positionStrategy,o=this._getOrigin(),s=this._getOverlayPosition();r.withPositions([this._addOffset(Z(Z({},o.main),s.main)),this._addOffset(Z(Z({},o.fallback),s.fallback))])}_addOffset(n){let r=Lce,o=!this._dir||this._dir.value=="ltr";return n.originY==="top"?n.offsetY=-r:n.originY==="bottom"?n.offsetY=r:n.originX==="start"?n.offsetX=o?-r:r:n.originX==="end"&&(n.offsetX=o?r:-r),n}_getOrigin(){let n=!this._dir||this._dir.value=="ltr",r=this.position,o;r=="above"||r=="below"?o={originX:"center",originY:r=="above"?"top":"bottom"}:r=="before"||r=="left"&&n||r=="right"&&!n?o={originX:"start",originY:"center"}:(r=="after"||r=="right"&&n||r=="left"&&!n)&&(o={originX:"end",originY:"center"});let{x:s,y:a}=this._invertPosition(o.originX,o.originY);return{main:o,fallback:{originX:s,originY:a}}}_getOverlayPosition(){let n=!this._dir||this._dir.value=="ltr",r=this.position,o;r=="above"?o={overlayX:"center",overlayY:"bottom"}:r=="below"?o={overlayX:"center",overlayY:"top"}:r=="before"||r=="left"&&n||r=="right"&&!n?o={overlayX:"end",overlayY:"center"}:(r=="after"||r=="right"&&n||r=="left"&&!n)&&(o={overlayX:"start",overlayY:"center"});let{x:s,y:a}=this._invertPosition(o.overlayX,o.overlayY);return{main:o,fallback:{overlayX:s,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),fr(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(n){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=n,this._tooltipInstance._markForCheck())}_invertPosition(n,r){return this.position==="above"||this.position==="below"?r==="top"?r="bottom":r==="bottom"&&(r="top"):n==="end"?n="start":n==="start"&&(n="end"),{x:n,y:r}}_updateCurrentPositionClass(n){let{overlayY:r,originX:o,originY:s}=n,a;if(r==="center"?this._dir&&this._dir.value==="rtl"?a=o==="end"?"left":"right":a=o==="start"?"left":"right":a=r==="bottom"&&s==="top"?"above":"below",a!==this._currentPosition){let l=this._overlayRef;if(l){let c=`${this._cssClassPrefix}-${iG}-`;l.removePanelClass(c+this._currentPosition),l.addPanelClass(c+a)}this._currentPosition=a}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",n=>{this._setupPointerExitEventsIfNeeded();let r;n.x!==void 0&&n.y!==void 0&&(r=n),this.show(void 0,r)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",n=>{let r=n.targetTouches?.[0],o=r?{x:r.clientX,y:r.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout);let s=500;this._touchstartTimeout=setTimeout(()=>this.show(void 0,o),this._defaultOptions.touchLongPressShowDelay??s)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let n=[];if(this._platformSupportsMouseEvents())n.push(["mouseleave",r=>{let o=r.relatedTarget;(!o||!this._overlayRef?.overlayElement.contains(o))&&this.hide()}],["wheel",r=>this._wheelListener(r)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let r=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};n.push(["touchend",r],["touchcancel",r])}this._addListeners(n),this._passiveListeners.push(...n)}_addListeners(n){n.forEach(([r,o])=>{this._elementRef.nativeElement.addEventListener(r,o,rG)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(n){if(this._isTooltipVisible()){let r=this._document.elementFromPoint(n.clientX,n.clientY),o=this._elementRef.nativeElement;r!==o&&!o.contains(r)&&this.hide()}}_disableNativeGesturesIfNecessary(){let n=this.touchGestures;if(n!=="off"){let r=this._elementRef.nativeElement,o=r.style;(n==="on"||r.nodeName!=="INPUT"&&r.nodeName!=="TEXTAREA")&&(o.userSelect=o.msUserSelect=o.webkitUserSelect=o.MozUserSelect="none"),(n==="on"||!r.draggable)&&(o.webkitUserDrag="none"),o.touchAction="none",o.webkitTapHighlightColor="transparent"}}};e.\u0275fac=function(r){return new(r||e)(M(Ht),M(Re),M(mu),M(Yt),M(Le),M(gn),M(T3),M(po),M(sG),M(ai),M(Nce,8),M(Ye))},e.\u0275dir=ze({type:e,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(r,o){r&2&&se("mat-mdc-tooltip-disabled",o.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"],standalone:!0});let i=e;return i})(),Vce=(()=>{let e=class e{constructor(n,r,o){this._changeDetectorRef=n,this._elementRef=r,this._isMultiline=!1,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new me,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide",this._animationsDisabled=o==="NoopAnimations"}show(n){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},n)}hide(n){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},n)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:n}){(!n||!this._triggerElement.contains(n))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let n=this._elementRef.nativeElement.getBoundingClientRect();return n.height>Fce&&n.width>=Bce}_handleAnimationEnd({animationName:n}){(n===this._showAnimation||n===this._hideAnimation)&&this._finalizeAnimation(n===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(n){n?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(n){let r=this._tooltip.nativeElement,o=this._showAnimation,s=this._hideAnimation;if(r.classList.remove(n?s:o),r.classList.add(n?o:s),this._isVisible!==n&&(this._isVisible=n,this._changeDetectorRef.markForCheck()),n&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(r);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}n&&this._onShow(),this._animationsDisabled&&(r.classList.add("_mat-animation-noopable"),this._finalizeAnimation(n))}};e.\u0275fac=function(r){return new(r||e)(M(Fe),M(Re),M(Zn,8))},e.\u0275cmp=le({type:e,selectors:[["mat-tooltip-component"]],viewQuery:function(r,o){if(r&1&&Ie(Pce,7),r&2){let s;be(s=ye())&&(o._tooltip=s.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(r,o){r&1&&H("mouseleave",function(a){return o._handleMouseLeave(a)}),r&2&&tn("zoom",o.isVisible()?1:null)},standalone:!0,features:[ce],decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(r,o){if(r&1){let s=ie();v(0,"div",1,0),H("animationend",function(l){return V(s),z(o._handleAnimationEnd(l))}),v(2,"div",2),S(3),y()()}r&2&&(se("mdc-tooltip--multiline",o._isMultiline),N("ngClass",o.tooltipClass),w(3),nt(o.message))},dependencies:[nb],styles:['.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mdc-plain-tooltip-container-color);color:var(--mdc-plain-tooltip-supporting-text-color);border-radius:var(--mdc-plain-tooltip-container-shape);font-family:var(--mdc-plain-tooltip-supporting-text-font);font-size:var(--mdc-plain-tooltip-supporting-text-size);font-weight:var(--mdc-plain-tooltip-supporting-text-weight);line-height:var(--mdc-plain-tooltip-supporting-text-line-height);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking)}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0});let i=e;return i})();var Jt=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[Rce],imports:[Sy,Ae,Jr,qt,qt,Zo]});let i=e;return i})();var aa={};aS(aa,{setHref:()=>Gce});var zce=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i;function Uce(i){let e=!zce.test(i);return e}function Hce(i){if(!Uce(i))return i}function es(i){return Hce(i)}function Gce(i,e){let t=es(e);t!==void 0&&(i.href=t)}var YHe=typeof window<"u"?window.TrustedScriptURL:void 0;var oGe=typeof window<"u"?window.TrustedHTML:void 0;var CGe=typeof window<"u"?window.TrustedScript:void 0;var lC={};aS(lC,{assign:()=>hde,replace:()=>ude,setHref:()=>dde});function dde(i,e){let t=es(e);t!==void 0&&(i.href=t)}function ude(i,e){let t=es(e);t!==void 0&&i.replace(t)}function hde(i,e){let t=es(e);t!==void 0&&i.assign(t)}function _de(i,e){if(i&1&&J(0,"div",1),i&2){let t=I();tn("top",t.top,"px")("left",t.left,"px")("width",t.width,"px")("height",t.height,"px")("border-color",t.borderColor)("background-color",t.bgColor)}}var cG=(()=>{class i{changeDetectorRef;borderColor;bgColor;startX=-1;startY=-1;endX=-1;endY=-1;isMac=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);constructor(t){this.changeDetectorRef=t}start(t,n){t.preventDefault(),t.stopPropagation(),this.startX=t.offsetX,this.startY=t.offsetY,this.endX=this.startX,this.endY=this.startY;let r=yn(document,"mousemove"),o=yn(window,"mouseup"),s=0,a=0;qr([r]).pipe(Xe(o)).subscribe({next:([l])=>{s=l.offsetX-this.startX,a=l.offsetY-this.startY,this.endX=this.startX+s,this.endY=this.startY+a,this.changeDetectorRef.detectChanges()},complete:()=>{let l=Math.abs(s)<5&&Math.abs(a)<5;n(l,this.startX,this.startY,this.endX,this.endY),this.startX=-1,this.startY=-1,this.endX=-1,this.endY=-1,this.changeDetectorRef.detectChanges()}})}get top(){return Math.min(this.startY,this.endY)}get left(){return Math.min(this.startX,this.endX)}get width(){return Math.abs(this.endX-this.startX)}get height(){return Math.abs(this.endY-this.startY)}static \u0275fac=function(n){return new(n||i)(M(Fe))};static \u0275cmp=le({type:i,selectors:[["drag-area"]],inputs:{borderColor:"borderColor",bgColor:"bgColor"},standalone:!0,features:[ce],decls:1,vars:1,consts:[[1,"container",3,"top","left","width","height","border-color","background-color"],[1,"container"]],template:function(n,r){n&1&&W(0,_de,1,12,"div",0),n&2&&ae(r.startX>0?0:-1)},dependencies:[Ae],styles:[`.container[_ngcontent-%COMP%]{position:absolute;z-index:5000;box-sizing:border-box;border-width:1px;border-style:solid;pointer-events:none} +}`;function DH(i,e,t){let n=new Kd,r=new xe,o=new xe,s=new Cn,a=new kp({depthPacking:hH}),l=new Lp,c={},d=t.maxTextureSize,u={0:bi,1:Yd,2:Xd},h=new ws({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:uae,fragmentShader:hae}),p=h.clone();p.defines.HORIZONTAL_PASS=1;let f=new It;f.setAttribute("position",new un(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new di(f,h),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=UP,this.render=function(C,T,D){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||C.length===0)return;let E=i.getRenderTarget(),P=i.getActiveCubeFace(),Y=i.getActiveMipmapLevel(),$=i.state;$.setBlending(Za),$.buffers.color.setClear(1,1,1,1),$.buffers.depth.setTest(!0),$.setScissorTest(!1);for(let U=0,O=C.length;Ud||r.y>d)&&(r.x>d&&(o.x=Math.floor(d/q.x),r.x=o.x*q.x,j.mapSize.x=o.x),r.y>d&&(o.y=Math.floor(d/q.y),r.y=o.y*q.y,j.mapSize.y=o.y)),j.map===null&&!j.isPointLightShadow&&this.type===bp){let G={minFilter:Fi,magFilter:Fi,format:rr};j.map=new yo(r.x,r.y,G),j.map.texture.name=B.name+".shadowMap",j.mapPass=new yo(r.x,r.y,G),j.camera.updateProjectionMatrix()}if(j.map===null){let G={minFilter:Ei,magFilter:Ei,format:rr};j.map=new yo(r.x,r.y,G),j.map.texture.name=B.name+".shadowMap",j.camera.updateProjectionMatrix()}i.setRenderTarget(j.map),i.clear();let k=j.getViewportCount();for(let G=0;G0){let B=U.uuid,j=D.uuid,q=c[B];q===void 0&&(q={},c[B]=q);let k=q[j];k===void 0&&(k=U.clone(),q[j]=k),U=k}return U.visible=D.visible,U.wireframe=D.wireframe,$===bp?U.side=D.shadowSide!==null?D.shadowSide:D.side:U.side=D.shadowSide!==null?D.shadowSide:u[D.side],U.alphaMap=D.alphaMap,U.alphaTest=D.alphaTest,U.clipShadows=D.clipShadows,U.clippingPlanes=D.clippingPlanes,U.clipIntersection=D.clipIntersection,U.displacementMap=D.displacementMap,U.displacementScale=D.displacementScale,U.displacementBias=D.displacementBias,U.wireframeLinewidth=D.wireframeLinewidth,U.linewidth=D.linewidth,E.isPointLight===!0&&U.isMeshDistanceMaterial===!0&&(U.referencePosition.setFromMatrixPosition(E.matrixWorld),U.nearDistance=P,U.farDistance=Y),U}function x(C,T,D,E,P){if(C.visible===!1)return;if(C.layers.test(T.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&P===bp)&&(!C.frustumCulled||n.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,C.matrixWorld);let U=e.update(C),O=C.material;if(Array.isArray(O)){let B=U.groups;for(let j=0,q=B.length;j=1):q.indexOf("OpenGL ES")!==-1&&(j=parseFloat(/^OpenGL ES (\d)/.exec(q)[1]),B=j>=2);let k=null,G={},K=i.getParameter(3088),de=i.getParameter(2978),Te=new Cn().fromArray(K),Ee=new Cn().fromArray(de);function He(Q,$e,Se){let ft=new Uint8Array(4),ct=i.createTexture();i.bindTexture(Q,ct),i.texParameteri(Q,10241,9728),i.texParameteri(Q,10240,9728);for(let pn=0;pnNe||F.height>Ne)&&(ke=Ne/Math.max(F.width,F.height)),ke<1||A===!0)if(typeof HTMLImageElement<"u"&&F instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&F instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&F instanceof ImageBitmap){let et=A?gH:Math.floor,Ot=et(ke*F.width),_t=et(ke*F.height);p===void 0&&(p=m(Ot,_t));let Ft=fe?m(Ot,_t):p;return Ft.width=Ot,Ft.height=_t,Ft.getContext("2d").drawImage(F,0,0,Ot,_t),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+F.width+"x"+F.height+") to ("+Ot+"x"+_t+")."),Ft}else return"data"in F&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+F.width+"x"+F.height+")."),F;return F}function g(F){return uP(F.width)&&uP(F.height)}function _(F){return a?!1:F.wrapS!==ir||F.wrapT!==ir||F.minFilter!==Ei&&F.minFilter!==Fi}function x(F,A){return F.generateMipmaps&&A&&F.minFilter!==Ei&&F.minFilter!==Fi}function C(F,A,fe,Ne,ke=1){i.generateMipmap(F);let et=n.get(A);et.__maxMipLevel=Math.log2(Math.max(fe,Ne,ke))}function T(F,A,fe,Ne){if(a===!1)return A;if(F!==null){if(i[F]!==void 0)return i[F];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+F+"'")}let ke=A;return A===6403&&(fe===5126&&(ke=33326),fe===5131&&(ke=33325),fe===5121&&(ke=33321)),A===6407&&(fe===5126&&(ke=34837),fe===5131&&(ke=34843),fe===5121&&(ke=32849)),A===6408&&(fe===5126&&(ke=34836),fe===5131&&(ke=34842),fe===5121&&(ke=Ne===gc?35907:32856)),(ke===33325||ke===33326||ke===34842||ke===34836)&&e.get("EXT_color_buffer_float"),ke}function D(F){return F===Ei||F===tw||F===nw?9728:9729}function E(F){let A=F.target;A.removeEventListener("dispose",E),Y(A),A.isVideoTexture&&h.delete(A),s.memory.textures--}function P(F){let A=F.target;A.removeEventListener("dispose",P),$(A)}function Y(F){let A=n.get(F);A.__webglInit!==void 0&&(i.deleteTexture(A.__webglTexture),n.remove(F))}function $(F){let A=F.texture,fe=n.get(F),Ne=n.get(A);if(F){if(Ne.__webglTexture!==void 0&&(i.deleteTexture(Ne.__webglTexture),s.memory.textures--),F.depthTexture&&F.depthTexture.dispose(),F.isWebGLCubeRenderTarget)for(let ke=0;ke<6;ke++)i.deleteFramebuffer(fe.__webglFramebuffer[ke]),fe.__webglDepthbuffer&&i.deleteRenderbuffer(fe.__webglDepthbuffer[ke]);else i.deleteFramebuffer(fe.__webglFramebuffer),fe.__webglDepthbuffer&&i.deleteRenderbuffer(fe.__webglDepthbuffer),fe.__webglMultisampledFramebuffer&&i.deleteFramebuffer(fe.__webglMultisampledFramebuffer),fe.__webglColorRenderbuffer&&i.deleteRenderbuffer(fe.__webglColorRenderbuffer),fe.__webglDepthRenderbuffer&&i.deleteRenderbuffer(fe.__webglDepthRenderbuffer);if(F.isWebGLMultipleRenderTargets)for(let ke=0,et=A.length;ke=l&&console.warn("THREE.WebGLTextures: Trying to use "+F+" texture units while this GPU supports only "+l),U+=1,F}function j(F,A){let fe=n.get(F);if(F.isVideoTexture&&_e(F),F.version>0&&fe.__version!==F.version){let Ne=F.image;if(Ne===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(Ne.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{He(fe,F,A);return}}t.activeTexture(33984+A),t.bindTexture(3553,fe.__webglTexture)}function q(F,A){let fe=n.get(F);if(F.version>0&&fe.__version!==F.version){He(fe,F,A);return}t.activeTexture(33984+A),t.bindTexture(35866,fe.__webglTexture)}function k(F,A){let fe=n.get(F);if(F.version>0&&fe.__version!==F.version){He(fe,F,A);return}t.activeTexture(33984+A),t.bindTexture(32879,fe.__webglTexture)}function G(F,A){let fe=n.get(F);if(F.version>0&&fe.__version!==F.version){he(fe,F,A);return}t.activeTexture(33984+A),t.bindTexture(34067,fe.__webglTexture)}let K={[Lg]:10497,[ir]:33071,[Fg]:33648},de={[Ei]:9728,[tw]:9984,[nw]:9986,[Fi]:9729,[WP]:9985,[pu]:9987};function Te(F,A,fe){if(fe?(i.texParameteri(F,10242,K[A.wrapS]),i.texParameteri(F,10243,K[A.wrapT]),(F===32879||F===35866)&&i.texParameteri(F,32882,K[A.wrapR]),i.texParameteri(F,10240,de[A.magFilter]),i.texParameteri(F,10241,de[A.minFilter])):(i.texParameteri(F,10242,33071),i.texParameteri(F,10243,33071),(F===32879||F===35866)&&i.texParameteri(F,32882,33071),(A.wrapS!==ir||A.wrapT!==ir)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),i.texParameteri(F,10240,D(A.magFilter)),i.texParameteri(F,10241,D(A.minFilter)),A.minFilter!==Ei&&A.minFilter!==Fi&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){let Ne=e.get("EXT_texture_filter_anisotropic");if(A.type===Js&&e.has("OES_texture_float_linear")===!1||a===!1&&A.type===jd&&e.has("OES_texture_half_float_linear")===!1)return;(A.anisotropy>1||n.get(A).__currentAnisotropy)&&(i.texParameterf(F,Ne.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(A.anisotropy,r.getMaxAnisotropy())),n.get(A).__currentAnisotropy=A.anisotropy)}}function Ee(F,A){F.__webglInit===void 0&&(F.__webglInit=!0,A.addEventListener("dispose",E),F.__webglTexture=i.createTexture(),s.memory.textures++)}function He(F,A,fe){let Ne=3553;A.isDataTexture2DArray&&(Ne=35866),A.isDataTexture3D&&(Ne=32879),Ee(F,A),t.activeTexture(33984+fe),t.bindTexture(Ne,F.__webglTexture),i.pixelStorei(37440,A.flipY),i.pixelStorei(37441,A.premultiplyAlpha),i.pixelStorei(3317,A.unpackAlignment),i.pixelStorei(37443,0);let ke=_(A)&&g(A.image)===!1,et=b(A.image,ke,!1,d),Ot=g(et)||a,_t=o.convert(A.format),Ft=o.convert(A.type),pt=T(A.internalFormat,_t,Ft,A.encoding);Te(Ne,A,Ot);let Q,$e=A.mipmaps;if(A.isDepthTexture)pt=6402,a?A.type===Js?pt=36012:A.type===Dg?pt=33190:A.type===Cp?pt=35056:pt=33189:A.type===Js&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),A.format===$d&&pt===6402&&A.type!==Bg&&A.type!==Dg&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),A.type=Bg,Ft=o.convert(A.type)),A.format===Mp&&pt===6402&&(pt=34041,A.type!==Cp&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),A.type=Cp,Ft=o.convert(A.type))),t.texImage2D(3553,0,pt,et.width,et.height,0,_t,Ft,null);else if(A.isDataTexture)if($e.length>0&&Ot){for(let Se=0,ft=$e.length;Se0&&Ot){for(let Se=0,ft=$e.length;Sep+f?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=p-f&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=t.getPose(e.gripSpace,n),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}},pP=class extends ta{constructor(e,t){super();let n=this,r=e.state,o=null,s=1,a=null,l="local-floor",c=null,d=null,u=null,h=null,p=null,f=!1,m=null,b=null,g=null,_=null,x=null,C=null,T=[],D=new Map,E=new Mi;E.layers.enable(1),E.viewport=new Cn;let P=new Mi;P.layers.enable(2),P.viewport=new Cn;let Y=[E,P],$=new $g;$.layers.enable(1),$.layers.enable(2);let U=null,O=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(he){let re=T[he];return re===void 0&&(re=new Og,T[he]=re),re.getTargetRaySpace()},this.getControllerGrip=function(he){let re=T[he];return re===void 0&&(re=new Og,T[he]=re),re.getGripSpace()},this.getHand=function(he){let re=T[he];return re===void 0&&(re=new Og,T[he]=re),re.getHandSpace()};function B(he){let re=D.get(he.inputSource);re&&re.dispatchEvent({type:he.type,data:he.inputSource})}function j(){D.forEach(function(he,re){he.disconnect(re)}),D.clear(),U=null,O=null,r.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),u&&t.deleteFramebuffer(u),m&&t.deleteFramebuffer(m),b&&t.deleteRenderbuffer(b),g&&t.deleteRenderbuffer(g),u=null,m=null,b=null,g=null,p=null,h=null,d=null,o=null,He.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(he){s=he,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(he){l=he,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getBaseLayer=function(){return h!==null?h:p},this.getBinding=function(){return d},this.getFrame=function(){return _},this.getSession=function(){return o},this.setSession=function(he){return At(this,null,function*(){if(o=he,o!==null){o.addEventListener("select",B),o.addEventListener("selectstart",B),o.addEventListener("selectend",B),o.addEventListener("squeeze",B),o.addEventListener("squeezestart",B),o.addEventListener("squeezeend",B),o.addEventListener("end",j),o.addEventListener("inputsourceschange",q);let re=t.getContextAttributes();if(re.xrCompatible!==!0&&(yield t.makeXRCompatible()),o.renderState.layers===void 0){let qe={antialias:re.antialias,alpha:re.alpha,depth:re.depth,stencil:re.stencil,framebufferScaleFactor:s};p=new XRWebGLLayer(o,t,qe),o.updateRenderState({baseLayer:p})}else if(t instanceof WebGLRenderingContext){let qe={antialias:!0,alpha:re.alpha,depth:re.depth,stencil:re.stencil,framebufferScaleFactor:s};p=new XRWebGLLayer(o,t,qe),o.updateRenderState({layers:[p]})}else{f=re.antialias;let qe=null;re.depth&&(C=256,re.stencil&&(C|=1024),x=re.stencil?33306:36096,qe=re.stencil?35056:33190);let ue={colorFormat:re.alpha?32856:32849,depthFormat:qe,scaleFactor:s};d=new XRWebGLBinding(o,t),h=d.createProjectionLayer(ue),u=t.createFramebuffer(),o.updateRenderState({layers:[h]}),f&&(m=t.createFramebuffer(),b=t.createRenderbuffer(),t.bindRenderbuffer(36161,b),t.renderbufferStorageMultisample(36161,4,32856,h.textureWidth,h.textureHeight),r.bindFramebuffer(36160,m),t.framebufferRenderbuffer(36160,36064,36161,b),t.bindRenderbuffer(36161,null),qe!==null&&(g=t.createRenderbuffer(),t.bindRenderbuffer(36161,g),t.renderbufferStorageMultisample(36161,4,qe,h.textureWidth,h.textureHeight),t.framebufferRenderbuffer(36160,x,36161,g),t.bindRenderbuffer(36161,null)),r.bindFramebuffer(36160,null))}a=yield o.requestReferenceSpace(l),He.setContext(o),He.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}})};function q(he){let re=o.inputSources;for(let qe=0;qe0&&(g.alphaTest.value=_.alphaTest);let x=i.get(_).envMap;if(x){g.envMap.value=x,g.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,g.reflectivity.value=_.reflectivity,g.ior.value=_.ior,g.refractionRatio.value=_.refractionRatio;let D=i.get(x).__maxMipLevel;D!==void 0&&(g.maxMipLevel.value=D)}_.lightMap&&(g.lightMap.value=_.lightMap,g.lightMapIntensity.value=_.lightMapIntensity),_.aoMap&&(g.aoMap.value=_.aoMap,g.aoMapIntensity.value=_.aoMapIntensity);let C;_.map?C=_.map:_.specularMap?C=_.specularMap:_.displacementMap?C=_.displacementMap:_.normalMap?C=_.normalMap:_.bumpMap?C=_.bumpMap:_.roughnessMap?C=_.roughnessMap:_.metalnessMap?C=_.metalnessMap:_.alphaMap?C=_.alphaMap:_.emissiveMap?C=_.emissiveMap:_.clearcoatMap?C=_.clearcoatMap:_.clearcoatNormalMap?C=_.clearcoatNormalMap:_.clearcoatRoughnessMap?C=_.clearcoatRoughnessMap:_.specularIntensityMap?C=_.specularIntensityMap:_.specularColorMap?C=_.specularColorMap:_.transmissionMap?C=_.transmissionMap:_.thicknessMap?C=_.thicknessMap:_.sheenColorMap?C=_.sheenColorMap:_.sheenRoughnessMap&&(C=_.sheenRoughnessMap),C!==void 0&&(C.isWebGLRenderTarget&&(C=C.texture),C.matrixAutoUpdate===!0&&C.updateMatrix(),g.uvTransform.value.copy(C.matrix));let T;_.aoMap?T=_.aoMap:_.lightMap&&(T=_.lightMap),T!==void 0&&(T.isWebGLRenderTarget&&(T=T.texture),T.matrixAutoUpdate===!0&&T.updateMatrix(),g.uv2Transform.value.copy(T.matrix))}function r(g,_){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity}function o(g,_){g.dashSize.value=_.dashSize,g.totalSize.value=_.dashSize+_.gapSize,g.scale.value=_.scale}function s(g,_,x,C){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity,g.size.value=_.size*x,g.scale.value=C*.5,_.map&&(g.map.value=_.map),_.alphaMap&&(g.alphaMap.value=_.alphaMap),_.alphaTest>0&&(g.alphaTest.value=_.alphaTest);let T;_.map?T=_.map:_.alphaMap&&(T=_.alphaMap),T!==void 0&&(T.matrixAutoUpdate===!0&&T.updateMatrix(),g.uvTransform.value.copy(T.matrix))}function a(g,_){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity,g.rotation.value=_.rotation,_.map&&(g.map.value=_.map),_.alphaMap&&(g.alphaMap.value=_.alphaMap),_.alphaTest>0&&(g.alphaTest.value=_.alphaTest);let x;_.map?x=_.map:_.alphaMap&&(x=_.alphaMap),x!==void 0&&(x.matrixAutoUpdate===!0&&x.updateMatrix(),g.uvTransform.value.copy(x.matrix))}function l(g,_){_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap)}function c(g,_){g.specular.value.copy(_.specular),g.shininess.value=Math.max(_.shininess,1e-4),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===bi&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===bi&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function d(g,_){_.gradientMap&&(g.gradientMap.value=_.gradientMap),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===bi&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===bi&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function u(g,_){g.roughness.value=_.roughness,g.metalness.value=_.metalness,_.roughnessMap&&(g.roughnessMap.value=_.roughnessMap),_.metalnessMap&&(g.metalnessMap.value=_.metalnessMap),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===bi&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===bi&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias),i.get(_).envMap&&(g.envMapIntensity.value=_.envMapIntensity)}function h(g,_,x){u(g,_),g.ior.value=_.ior,_.sheen>0&&(g.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),g.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap&&(g.sheenColorMap.value=_.sheenColorMap),_.sheenRoughnessMap&&(g.sheenRoughnessMap.value=_.sheenRoughnessMap)),_.clearcoat>0&&(g.clearcoat.value=_.clearcoat,g.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap&&(g.clearcoatMap.value=_.clearcoatMap),_.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap),_.clearcoatNormalMap&&(g.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),g.clearcoatNormalMap.value=_.clearcoatNormalMap,_.side===bi&&g.clearcoatNormalScale.value.negate())),_.transmission>0&&(g.transmission.value=_.transmission,g.transmissionSamplerMap.value=x.texture,g.transmissionSamplerSize.value.set(x.width,x.height),_.transmissionMap&&(g.transmissionMap.value=_.transmissionMap),g.thickness.value=_.thickness,_.thicknessMap&&(g.thicknessMap.value=_.thicknessMap),g.attenuationDistance.value=_.attenuationDistance,g.attenuationColor.value.copy(_.attenuationColor)),g.specularIntensity.value=_.specularIntensity,g.specularColor.value.copy(_.specularColor),_.specularIntensityMap&&(g.specularIntensityMap.value=_.specularIntensityMap),_.specularColorMap&&(g.specularColorMap.value=_.specularColorMap)}function p(g,_){_.matcap&&(g.matcap.value=_.matcap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===bi&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===bi&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function f(g,_){_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function m(g,_){_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias),g.referencePosition.value.copy(_.referencePosition),g.nearDistance.value=_.nearDistance,g.farDistance.value=_.farDistance}function b(g,_){_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===bi&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===bi&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}return{refreshFogUniforms:e,refreshMaterialUniforms:t}}function _ae(){let i=Kw("canvas");return i.style.display="block",i}function An(i={}){let e=i.canvas!==void 0?i.canvas:_ae(),t=i.context!==void 0?i.context:null,n=i.alpha!==void 0?i.alpha:!1,r=i.depth!==void 0?i.depth:!0,o=i.stencil!==void 0?i.stencil:!0,s=i.antialias!==void 0?i.antialias:!1,a=i.premultipliedAlpha!==void 0?i.premultipliedAlpha:!0,l=i.preserveDrawingBuffer!==void 0?i.preserveDrawingBuffer:!1,c=i.powerPreference!==void 0?i.powerPreference:"default",d=i.failIfMajorPerformanceCaveat!==void 0?i.failIfMajorPerformanceCaveat:!1,u=null,h=null,p=[],f=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=sr,this.physicallyCorrectLights=!1,this.toneMapping=oc,this.toneMappingExposure=1;let m=this,b=!1,g=0,_=0,x=null,C=-1,T=null,D=new Cn,E=new Cn,P=null,Y=e.width,$=e.height,U=1,O=null,B=null,j=new Cn(0,0,Y,$),q=new Cn(0,0,Y,$),k=!1,G=[],K=new Kd,de=!1,Te=!1,Ee=null,He=new lt,he=new R,re={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function qe(){return x===null?U:1}let ue=t;function Ge(L,ne){for(let pe=0;pe0?h=f[f.length-1]:h=null,p.pop(),p.length>0?u=p[p.length-1]:u=null};function pR(L,ne,pe,oe){if(L.visible===!1)return;if(L.layers.test(ne.layers)){if(L.isGroup)pe=L.renderOrder;else if(L.isLOD)L.autoUpdate===!0&&L.update(ne);else if(L.isLight)h.pushLight(L),L.castShadow&&h.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||K.intersectsSprite(L)){oe&&he.setFromMatrixPosition(L.matrixWorld).applyMatrix4(He);let Rt=A.update(L),Tt=L.material;Tt.visible&&u.push(L,Rt,Tt,pe,he.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(L.isSkinnedMesh&&L.skeleton.frame!==Dt.render.frame&&(L.skeleton.update(),L.skeleton.frame=Dt.render.frame),!L.frustumCulled||K.intersectsObject(L))){oe&&he.setFromMatrixPosition(L.matrixWorld).applyMatrix4(He);let Rt=A.update(L),Tt=L.material;if(Array.isArray(Tt)){let on=Rt.groups;for(let Tn=0,fn=on.length;Tn0&&L5(we,ne,pe),oe&&Qe.viewport(D.copy(oe)),we.length>0&&ov(we,ne,pe),zt.length>0&&ov(zt,ne,pe),Rt.length>0&&ov(Rt,ne,pe)}function L5(L,ne,pe){if(Ee===null){let Rt=s===!0&&Ve.isWebGL2===!0?Gg:yo;Ee=new Rt(1024,1024,{generateMipmaps:!0,type:Se.convert(jd)!==null?jd:Ka,minFilter:pu,magFilter:Ei,wrapS:ir,wrapT:ir})}let oe=m.getRenderTarget();m.setRenderTarget(Ee),m.clear();let we=m.toneMapping;m.toneMapping=oc,ov(L,ne,pe),m.toneMapping=we,De.updateMultisampleRenderTarget(Ee),De.updateRenderTargetMipmap(Ee),m.setRenderTarget(oe)}function ov(L,ne,pe){let oe=ne.isScene===!0?ne.overrideMaterial:null;for(let we=0,zt=L.length;we=0&&ne<=L.width-oe&&pe>=0&&pe<=L.height-we&&ue.readPixels(ne,pe,oe,we,Se.convert(Tn),Se.convert(fn),zt):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let on=x!==null?_e.get(x).__webglFramebuffer:null;Qe.bindFramebuffer(36160,on)}}},this.copyFramebufferToTexture=function(L,ne,pe=0){let oe=Math.pow(2,-pe),we=Math.floor(ne.image.width*oe),zt=Math.floor(ne.image.height*oe),Rt=Se.convert(ne.format);Ve.isWebGL2&&(Rt===6407&&(Rt=32849),Rt===6408&&(Rt=32856)),De.setTexture2D(ne,0),ue.copyTexImage2D(3553,pe,Rt,L.x,L.y,we,zt,0),Qe.unbindTexture()},this.copyTextureToTexture=function(L,ne,pe,oe=0){let we=ne.image.width,zt=ne.image.height,Rt=Se.convert(pe.format),Tt=Se.convert(pe.type);De.setTexture2D(pe,0),ue.pixelStorei(37440,pe.flipY),ue.pixelStorei(37441,pe.premultiplyAlpha),ue.pixelStorei(3317,pe.unpackAlignment),ne.isDataTexture?ue.texSubImage2D(3553,oe,L.x,L.y,we,zt,Rt,Tt,ne.image.data):ne.isCompressedTexture?ue.compressedTexSubImage2D(3553,oe,L.x,L.y,ne.mipmaps[0].width,ne.mipmaps[0].height,Rt,ne.mipmaps[0].data):ue.texSubImage2D(3553,oe,L.x,L.y,Rt,Tt,ne.image),oe===0&&pe.generateMipmaps&&ue.generateMipmap(3553),Qe.unbindTexture()},this.copyTextureToTexture3D=function(L,ne,pe,oe,we=0){if(m.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let zt=L.max.x-L.min.x+1,Rt=L.max.y-L.min.y+1,Tt=L.max.z-L.min.z+1,on=Se.convert(oe.format),Tn=Se.convert(oe.type),fn;if(oe.isDataTexture3D)De.setTexture3D(oe,0),fn=32879;else if(oe.isDataTexture2DArray)De.setTexture2DArray(oe,0),fn=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}ue.pixelStorei(37440,oe.flipY),ue.pixelStorei(37441,oe.premultiplyAlpha),ue.pixelStorei(3317,oe.unpackAlignment);let bn=ue.getParameter(3314),ni=ue.getParameter(32878),Sc=ue.getParameter(3316),xn=ue.getParameter(3315),mf=ue.getParameter(32877),qn=pe.isCompressedTexture?pe.mipmaps[0]:pe.image;ue.pixelStorei(3314,qn.width),ue.pixelStorei(32878,qn.height),ue.pixelStorei(3316,L.min.x),ue.pixelStorei(3315,L.min.y),ue.pixelStorei(32877,L.min.z),pe.isDataTexture||pe.isDataTexture3D?ue.texSubImage3D(fn,we,ne.x,ne.y,ne.z,zt,Rt,Tt,on,Tn,qn.data):pe.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ue.compressedTexSubImage3D(fn,we,ne.x,ne.y,ne.z,zt,Rt,Tt,on,qn.data)):ue.texSubImage3D(fn,we,ne.x,ne.y,ne.z,zt,Rt,Tt,on,Tn,qn),ue.pixelStorei(3314,bn),ue.pixelStorei(32878,ni),ue.pixelStorei(3316,Sc),ue.pixelStorei(3315,xn),ue.pixelStorei(32877,mf),we===0&&oe.generateMipmaps&&ue.generateMipmap(fn),Qe.unbindTexture()},this.initTexture=function(L){De.setTexture2D(L,0),Qe.unbindTexture()},this.resetState=function(){g=0,_=0,x=null,Qe.reset(),ft.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}An.prototype.isWebGLRenderer=!0;var hw=class extends An{};hw.prototype.isWebGL1Renderer=!0;var qg=class i{constructor(e,t=25e-5){this.name="",this.color=new je(e),this.density=t}clone(){return new i(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};qg.prototype.isFogExp2=!0;var Yg=class i{constructor(e,t=1,n=1e3){this.name="",this.color=new je(e),this.near=t,this.far=n}clone(){return new i(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};Yg.prototype.isFog=!0;var Fp=class extends hn{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),t}};Fp.prototype.isScene=!0;var el=class{constructor(e,t){this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Ep,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=bo()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,o=this.stride;re.far||t.push({distance:l,point:Cg.clone(),uv:or.getUV(Cg,Ox,Mg,Rx,Zz,VD,Qz,new xe),face:null,object:this})}copy(e){return super.copy(e),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};Vp.prototype.isSprite=!0;function Ax(i,e,t,n,r,o){vp.subVectors(i,t).addScalar(.5).multiply(n),r!==void 0?(Sg.x=o*vp.x-r*vp.y,Sg.y=r*vp.x+o*vp.y):Sg.copy(vp),i.copy(e),i.x+=Sg.x,i.y+=Sg.y,i.applyMatrix4(OH)}var Nx=new R,Kz=new R,pw=class extends hn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);let t=e.levels;for(let n=0,r=t.length;n0){let n,r;for(n=1,r=t.length;n0){Nx.setFromMatrixPosition(this.matrixWorld);let r=e.ray.origin.distanceTo(Nx);this.getObjectForDistance(r).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){Nx.setFromMatrixPosition(e.matrixWorld),Kz.setFromMatrixPosition(this.matrixWorld);let n=Nx.distanceTo(Kz)/e.zoom;t[0].object.visible=!0;let r,o;for(r=1,o=t.length;r=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(this._currentLevel=r-1;rl)continue;h.applyMatrix4(this.matrixWorld);let P=e.ray.origin.distanceTo(h);Pe.far||t.push({distance:P,point:u.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}else{let g=Math.max(0,s.start),_=Math.min(b.count,s.start+s.count);for(let x=g,C=_-1;xl)continue;h.applyMatrix4(this.matrixWorld);let D=e.ray.origin.distanceTo(h);De.far||t.push({distance:D,point:u.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let e=this.geometry;if(e.isBufferGeometry){let t=e.morphAttributes,n=Object.keys(t);if(n.length>0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};Cs.prototype.isLine=!0;var cU=new R,dU=new R,xr=class extends Cs{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){let e=this.geometry;if(e.isBufferGeometry)if(e.index===null){let t=e.attributes.position,n=[];for(let r=0,o=t.count;r0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};eu.prototype.isPoints=!0;function hU(i,e,t,n,r,o,s){let a=fP.distanceSqToPoint(i);if(ar.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:s})}}var mw=class extends Gi{constructor(e,t,n,r,o,s,a,l,c){super(e,t,n,r,o,s,a,l,c),this.format=a!==void 0?a:Wd,this.minFilter=s!==void 0?s:Fi,this.magFilter=o!==void 0?o:Fi,this.generateMipmaps=!1;let d=this;function u(){d.needsUpdate=!0,e.requestVideoFrameCallback(u)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(u)}clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}};mw.prototype.isVideoTexture=!0;var Qg=class extends Gi{constructor(e,t,n,r,o,s,a,l,c,d,u,h){super(null,s,a,l,c,d,r,o,u,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}};Qg.prototype.isCompressedTexture=!0;var gw=class extends Gi{constructor(e,t,n,r,o,s,a,l,c){super(e,t,n,r,o,s,a,l,c),this.needsUpdate=!0}};gw.prototype.isCanvasTexture=!0;var _w=class extends Gi{constructor(e,t,n,r,o,s,a,l,c,d){if(d=d!==void 0?d:$d,d!==$d&&d!==Mp)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&d===$d&&(n=Bg),n===void 0&&d===Mp&&(n=Cp),super(null,r,o,s,a,l,d,n,c),this.image={width:e,height:t},this.magFilter=a!==void 0?a:Ei,this.minFilter=l!==void 0?l:Ei,this.flipY=!1,this.generateMipmaps=!1}};_w.prototype.isDepthTexture=!0;var Kg=class i extends It{constructor(e=1,t=8,n=0,r=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);let o=[],s=[],a=[],l=[],c=new R,d=new xe;s.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let u=0,h=3;u<=t;u++,h+=3){let p=n+u/t*r;c.x=e*Math.cos(p),c.y=e*Math.sin(p),s.push(c.x,c.y,c.z),a.push(0,0,1),d.x=(s[h]/e+1)/2,d.y=(s[h+1]/e+1)/2,l.push(d.x,d.y)}for(let u=1;u<=t;u++)o.push(u,u+1,0);this.setIndex(o),this.setAttribute("position",new tt(s,3)),this.setAttribute("normal",new tt(a,3)),this.setAttribute("uv",new tt(l,2))}static fromJSON(e){return new i(e.radius,e.segments,e.thetaStart,e.thetaLength)}},tu=class i extends It{constructor(e=1,t=1,n=1,r=8,o=1,s=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:o,openEnded:s,thetaStart:a,thetaLength:l};let c=this;r=Math.floor(r),o=Math.floor(o);let d=[],u=[],h=[],p=[],f=0,m=[],b=n/2,g=0;_(),s===!1&&(e>0&&x(!0),t>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new tt(u,3)),this.setAttribute("normal",new tt(h,3)),this.setAttribute("uv",new tt(p,2));function _(){let C=new R,T=new R,D=0,E=(t-e)/n;for(let P=0;P<=o;P++){let Y=[],$=P/o,U=$*(t-e)+e;for(let O=0;O<=r;O++){let B=O/r,j=B*l+a,q=Math.sin(j),k=Math.cos(j);T.x=U*q,T.y=-$*n+b,T.z=U*k,u.push(T.x,T.y,T.z),C.set(q,E,k).normalize(),h.push(C.x,C.y,C.z),p.push(B,1-$),Y.push(f++)}m.push(Y)}for(let P=0;P.9&&E<.1&&(x<.2&&(s[_+0]+=1),C<.2&&(s[_+2]+=1),T<.2&&(s[_+4]+=1))}}function h(_){o.push(_.x,_.y,_.z)}function p(_,x){let C=_*3;x.x=e[C+0],x.y=e[C+1],x.z=e[C+2]}function f(){let _=new R,x=new R,C=new R,T=new R,D=new xe,E=new xe,P=new xe;for(let Y=0,$=0;Y0)l=r-1;else{l=r;break}if(r=l,n[r]===s)return r/(o-1);let d=n[r],h=n[r+1]-d,p=(s-d)/h;return(r+p)/(o-1)}getTangent(e,t){let r=e-1e-4,o=e+1e-4;r<0&&(r=0),o>1&&(o=1);let s=this.getPoint(r),a=this.getPoint(o),l=t||(s.isVector2?new xe:new R);return l.copy(a).sub(s).normalize(),l}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){let n=new R,r=[],o=[],s=[],a=new R,l=new lt;for(let p=0;p<=e;p++){let f=p/e;r[p]=this.getTangentAt(f,new R)}o[0]=new R,s[0]=new R;let c=Number.MAX_VALUE,d=Math.abs(r[0].x),u=Math.abs(r[0].y),h=Math.abs(r[0].z);d<=c&&(c=d,n.set(1,0,0)),u<=c&&(c=u,n.set(0,1,0)),h<=c&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),o[0].crossVectors(r[0],a),s[0].crossVectors(r[0],o[0]);for(let p=1;p<=e;p++){if(o[p]=o[p-1].clone(),s[p]=s[p-1].clone(),a.crossVectors(r[p-1],r[p]),a.length()>Number.EPSILON){a.normalize();let f=Math.acos(nr(r[p-1].dot(r[p]),-1,1));o[p].applyMatrix4(l.makeRotationAxis(a,f))}s[p].crossVectors(r[p],o[p])}if(t===!0){let p=Math.acos(nr(o[0].dot(o[e]),-1,1));p/=e,r[0].dot(a.crossVectors(o[0],o[e]))>0&&(p=-p);for(let f=1;f<=e;f++)o[f].applyMatrix4(l.makeRotationAxis(r[f],p*f)),s[f].crossVectors(r[f],o[f])}return{tangents:r,normals:o,binormals:s}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}},nu=class extends Gr{constructor(e=0,t=0,n=1,r=1,o=0,s=Math.PI*2,a=!1,l=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(e,t){let n=t||new xe,r=Math.PI*2,o=this.aEndAngle-this.aStartAngle,s=Math.abs(o)r;)o-=r;o0?0:(Math.floor(Math.abs(a)/o)+1)*o:l===0&&a===o-1&&(a=o-2,l=1);let c,d;this.closed||a>0?c=r[(a-1)%o]:(Hx.subVectors(r[0],r[1]).add(r[0]),c=Hx);let u=r[a%o],h=r[(a+1)%o];if(this.closed||a+2r.length-2?r.length-1:s+1],u=r[s>r.length-3?r.length-1:s+2];return n.set(pU(a,l.x,c.x,d.x,u.x),pU(a,l.y,c.y,d.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){let s=r[o]-n,a=this.curves[o],l=a.getLength(),c=l===0?0:1-s/l;return a.getPointAt(c,t)}o++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let n=0,r=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){let u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);let d=c.getPoint(1);return this.currentPoint.copy(d),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}},qo=class extends ru{constructor(e){super(e),this.uuid=bo(),this.type="Shape",this.holes=[]}getPointsHoles(e){let t=[];for(let n=0,r=this.holes.length;n80*t){a=c=i[0],l=d=i[1];for(let f=t;fc&&(c=u),h>d&&(d=h);p=Math.max(c-a,d-l),p=p!==0?1/p:0}return o_(o,s,t,a,l,p),s}};function RH(i,e,t,n,r){let o,s;if(r===Gae(i,e,t,n)>0)for(o=e;o=e;o-=n)s=fU(o,i[o],i[o+1],s);return s&&Jw(s,s.next)&&(a_(s),s=s.next),s}function pc(i,e){if(!i)return i;e||(e=i);let t=i,n;do if(n=!1,!t.steiner&&(Jw(t,t.next)||ti(t.prev,t,t.next)===0)){if(a_(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function o_(i,e,t,n,r,o,s){if(!i)return;!s&&o&&Fae(i,n,r,o);let a=i,l,c;for(;i.prev!==i.next;){if(l=i.prev,c=i.next,o?Dae(i,n,r,o):Tae(i)){e.push(l.i/t),e.push(i.i/t),e.push(c.i/t),a_(i),i=c.next,a=c.next;continue}if(i=c,i===a){s?s===1?(i=Pae(pc(i),e,t),o_(i,e,t,n,r,o,2)):s===2&&Oae(i,e,t,n,r,o):o_(pc(i),e,t,n,r,o,1);break}}}function Tae(i){let e=i.prev,t=i,n=i.next;if(ti(e,t,n)>=0)return!1;let r=i.next.next;for(;r!==i.prev;){if(xp(e.x,e.y,t.x,t.y,n.x,n.y,r.x,r.y)&&ti(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Dae(i,e,t,n){let r=i.prev,o=i,s=i.next;if(ti(r,o,s)>=0)return!1;let a=r.xo.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,d=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,u=mP(a,l,e,t,n),h=mP(c,d,e,t,n),p=i.prevZ,f=i.nextZ;for(;p&&p.z>=u&&f&&f.z<=h;){if(p!==i.prev&&p!==i.next&&xp(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&ti(p.prev,p,p.next)>=0||(p=p.prevZ,f!==i.prev&&f!==i.next&&xp(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&ti(f.prev,f,f.next)>=0))return!1;f=f.nextZ}for(;p&&p.z>=u;){if(p!==i.prev&&p!==i.next&&xp(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&ti(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=h;){if(f!==i.prev&&f!==i.next&&xp(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&ti(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Pae(i,e,t){let n=i;do{let r=n.prev,o=n.next.next;!Jw(r,o)&&AH(r,n,n.next,o)&&s_(r,o)&&s_(o,r)&&(e.push(r.i/t),e.push(n.i/t),e.push(o.i/t),a_(n),a_(n.next),n=i=o),n=n.next}while(n!==i);return pc(n)}function Oae(i,e,t,n,r,o){let s=i;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&zae(s,a)){let l=NH(s,a);s=pc(s,s.next),l=pc(l,l.next),o_(s,e,t,n,r,o),o_(l,e,t,n,r,o);return}a=a.next}s=s.next}while(s!==i)}function Rae(i,e,t,n){let r=[],o,s,a,l,c;for(o=0,s=e.length;o=t.next.y&&t.next.y!==t.y){let h=t.x+(r-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(h<=n&&h>o){if(o=h,h===n){if(r===t.y)return t;if(r===t.next.y)return t.next}s=t.x=t.x&&t.x>=l&&n!==t.x&&xp(rs.x||t.x===s.x&&Lae(s,t)))&&(s=t,d=u)),t=t.next;while(t!==a);return s}function Lae(i,e){return ti(i.prev,i,e.prev)<0&&ti(e.next,i,i.next)<0}function Fae(i,e,t,n){let r=i;do r.z===null&&(r.z=mP(r.x,r.y,e,t,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==i);r.prevZ.nextZ=null,r.prevZ=null,Bae(r)}function Bae(i){let e,t,n,r,o,s,a,l,c=1;do{for(t=i,i=null,o=null,s=0;t;){for(s++,n=t,a=0,e=0;e0||l>0&&n;)a!==0&&(l===0||!n||t.z<=n.z)?(r=t,t=t.nextZ,a--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:i=r,r.prevZ=o,o=r;t=n}o.nextZ=null,c*=2}while(s>1);return i}function mP(i,e,t,n,r){return i=32767*(i-t)*r,e=32767*(e-n)*r,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,i|e<<1}function Vae(i){let e=i,t=i;do(e.x=0&&(i-s)*(n-a)-(t-s)*(e-a)>=0&&(t-s)*(o-a)-(r-s)*(n-a)>=0}function zae(i,e){return i.next.i!==e.i&&i.prev.i!==e.i&&!Uae(i,e)&&(s_(i,e)&&s_(e,i)&&Hae(i,e)&&(ti(i.prev,i,e.prev)||ti(i,e.prev,e))||Jw(i,e)&&ti(i.prev,i,i.next)>0&&ti(e.prev,e,e.next)>0)}function ti(i,e,t){return(e.y-i.y)*(t.x-e.x)-(e.x-i.x)*(t.y-e.y)}function Jw(i,e){return i.x===e.x&&i.y===e.y}function AH(i,e,t,n){let r=jx(ti(i,e,t)),o=jx(ti(i,e,n)),s=jx(ti(t,n,i)),a=jx(ti(t,n,e));return!!(r!==o&&s!==a||r===0&&Gx(i,t,e)||o===0&&Gx(i,n,e)||s===0&&Gx(t,i,n)||a===0&&Gx(t,e,n))}function Gx(i,e,t){return e.x<=Math.max(i.x,t.x)&&e.x>=Math.min(i.x,t.x)&&e.y<=Math.max(i.y,t.y)&&e.y>=Math.min(i.y,t.y)}function jx(i){return i>0?1:i<0?-1:0}function Uae(i,e){let t=i;do{if(t.i!==i.i&&t.next.i!==i.i&&t.i!==e.i&&t.next.i!==e.i&&AH(t,t.next,i,e))return!0;t=t.next}while(t!==i);return!1}function s_(i,e){return ti(i.prev,i,i.next)<0?ti(i,e,i.next)>=0&&ti(i,i.prev,e)>=0:ti(i,e,i.prev)<0||ti(i,i.next,e)<0}function Hae(i,e){let t=i,n=!1,r=(i.x+e.x)/2,o=(i.y+e.y)/2;do t.y>o!=t.next.y>o&&t.next.y!==t.y&&r<(t.next.x-t.x)*(o-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==i);return n}function NH(i,e){let t=new gP(i.i,i.x,i.y),n=new gP(e.i,e.x,e.y),r=i.next,o=e.prev;return i.next=e,e.prev=i,t.next=r,r.prev=t,n.next=t,t.prev=n,o.next=n,n.prev=o,n}function fU(i,e,t,n){let r=new gP(i,e,t);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function a_(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function gP(i,e,t){this.i=i,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Gae(i,e,t,n){let r=0;for(let o=e,s=t-n;o2&&i[e-1].equals(i[0])&&i.pop()}function gU(i,e){for(let t=0;tNumber.EPSILON){let _t=Math.sqrt(et),Ft=Math.sqrt(Ne*Ne+ke*ke),pt=De.x-fe/_t,Q=De.y+A/_t,$e=Be.x-ke/Ft,Se=Be.y+Ne/Ft,ft=(($e-pt)*ke-(Se-Q)*Ne)/(A*ke-fe*Ne);ht=pt+A*ft-_e.x,We=Q+fe*ft-_e.y;let ct=ht*ht+We*We;if(ct<=2)return new xe(ht,We);F=Math.sqrt(ct/2)}else{let _t=!1;A>Number.EPSILON?Ne>Number.EPSILON&&(_t=!0):A<-Number.EPSILON?Ne<-Number.EPSILON&&(_t=!0):Math.sign(fe)===Math.sign(ke)&&(_t=!0),_t?(ht=-fe,We=A,F=Math.sqrt(et)):(ht=A,We=fe,F=Math.sqrt(et/2))}return new xe(ht/F,We/F)}let de=[];for(let _e=0,De=j.length,Be=De-1,ht=_e+1;_e=0;_e--){let De=_e/b,Be=p*Math.cos(De*Math.PI/2),ht=f*Math.sin(De*Math.PI/2)+m;for(let We=0,F=j.length;We=0;){let ht=Be,We=Be-1;We<0&&(We=_e.length-1);for(let F=0,A=d+b*2;F0)&&p.push(x,C,D),(g!==n-1||l0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}};__.prototype.isMeshPhysicalMaterial=!0;var v_=class extends Ii{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new je(16777215),this.specular=new je(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=F_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}};v_.prototype.isMeshPhongMaterial=!0;var b_=class extends Ii{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new je(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}};b_.prototype.isMeshToonMaterial=!0;var y_=class extends Ii{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}};y_.prototype.isMeshNormalMaterial=!0;var x_=class extends Ii{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=F_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}};x_.prototype.isMeshLambertMaterial=!0;var w_=class extends Ii{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new je(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this}};w_.prototype.isMeshMatcapMaterial=!0;var C_=class extends Ti{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}};C_.prototype.isLineDashedMaterial=!0;var qae=Object.freeze({__proto__:null,ShadowMaterial:g_,SpriteMaterial:Bp,RawShaderMaterial:dc,ShaderMaterial:ws,PointsMaterial:nl,MeshPhysicalMaterial:__,MeshStandardMaterial:Xp,MeshPhongMaterial:v_,MeshToonMaterial:b_,MeshNormalMaterial:y_,MeshLambertMaterial:x_,MeshDepthMaterial:kp,MeshDistanceMaterial:Lp,MeshBasicMaterial:xs,MeshMatcapMaterial:w_,LineDashedMaterial:C_,LineBasicMaterial:Ti,Material:Ii}),Qn={arraySlice:function(i,e,t){return Qn.isTypedArray(i)?new i.constructor(i.subarray(e,t!==void 0?t:i.length)):i.slice(e,t)},convertArray:function(i,e,t){return!i||!t&&i.constructor===e?i:typeof e.BYTES_PER_ELEMENT=="number"?new e(i):Array.prototype.slice.call(i)},isTypedArray:function(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)},getKeyframeOrder:function(i){function e(r,o){return i[r]-i[o]}let t=i.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort(e),n},sortedArray:function(i,e,t){let n=i.length,r=new i.constructor(n);for(let o=0,s=0;s!==n;++o){let a=t[o]*e;for(let l=0;l!==e;++l)r[s++]=i[a+l]}return r},flattenJSON:function(i,e,t,n){let r=1,o=i[0];for(;o!==void 0&&o[n]===void 0;)o=i[r++];if(o===void 0)return;let s=o[n];if(s!==void 0)if(Array.isArray(s))do s=o[n],s!==void 0&&(e.push(o.time),t.push.apply(t,s)),o=i[r++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[n],s!==void 0&&(e.push(o.time),s.toArray(t,t.length)),o=i[r++];while(o!==void 0);else do s=o[n],s!==void 0&&(e.push(o.time),t.push(s)),o=i[r++];while(o!==void 0)},subclip:function(i,e,t,n,r=30){let o=i.clone();o.name=e;let s=[];for(let l=0;l=n)){u.push(c.times[p]);for(let m=0;mo.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l=a.times[f]){let g=f*u+d,_=g+u-d;m=Qn.arraySlice(a.values,g,_)}else{let g=a.createInterpolant(),_=d,x=u-d;g.evaluate(o),m=Qn.arraySlice(g.resultBuffer,_,x)}l==="quaternion"&&new Bi().fromArray(m).normalize().conjugate().toArray(m);let b=c.times.length;for(let g=0;g=o)){let a=t[1];e=o)break t}s=n,n=0;break n}break e}for(;n>>1;et;)--s;if(++s,o!==0||s!==r){o>=s&&(s=Math.max(s,1),o=s-1);let a=this.getValueSize();this.times=Qn.arraySlice(n,o,s),this.values=Qn.arraySlice(this.values,o*a,s*a)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let n=this.times,r=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){let l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(r!==void 0&&Qn.isTypedArray(r))for(let a=0,l=r.length;a!==l;++a){let c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){let e=Qn.arraySlice(this.times),t=Qn.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===Kx,o=e.length-1,s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*n,l=s*n,c=0;c!==n;++c)t[l+c]=t[a+c];++s}return s!==e.length?(this.times=Qn.arraySlice(e,0,s),this.values=Qn.arraySlice(t,0,s*n)):(this.times=e,this.values=t),this}clone(){let e=Qn.arraySlice(this.times,0),t=Qn.arraySlice(this.values,0),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}};xo.prototype.TimeBufferType=Float32Array;xo.prototype.ValueBufferType=Float32Array;xo.prototype.DefaultInterpolation=zg;var ol=class extends xo{};ol.prototype.ValueTypeName="bool";ol.prototype.ValueBufferType=Array;ol.prototype.DefaultInterpolation=Vg;ol.prototype.InterpolantFactoryMethodLinear=void 0;ol.prototype.InterpolantFactoryMethodSmooth=void 0;var M_=class extends xo{};M_.prototype.ValueTypeName="color";var ou=class extends xo{};ou.prototype.ValueTypeName="number";var ww=class extends Ss{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(n-t)/(r-t),c=e*a;for(let d=c+a;c!==d;c+=4)Bi.slerpFlat(o,0,s,c-a,s,c,l);return o}},fc=class extends xo{InterpolantFactoryMethodLinear(e){return new ww(this.times,this.values,this.getValueSize(),e)}};fc.prototype.ValueTypeName="quaternion";fc.prototype.DefaultInterpolation=zg;fc.prototype.InterpolantFactoryMethodSmooth=void 0;var sl=class extends xo{};sl.prototype.ValueTypeName="string";sl.prototype.ValueBufferType=Array;sl.prototype.DefaultInterpolation=Vg;sl.prototype.InterpolantFactoryMethodLinear=void 0;sl.prototype.InterpolantFactoryMethodSmooth=void 0;var su=class extends xo{};su.prototype.ValueTypeName="vector";var au=class{constructor(e,t=-1,n,r=Xw){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=bo(),this.duration<0&&this.resetDuration()}static parse(e){let t=[],n=e.tracks,r=1/(e.fps||1);for(let s=0,a=n.length;s!==a;++s)t.push(Xae(n[s]).scale(r));let o=new this(e.name,e.duration,t,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){let t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=n.length;o!==s;++o)t.push(xo.toJSON(n[o]));return r}static CreateFromMorphTargetSequence(e,t,n,r){let o=t.length,s=[];for(let a=0;a1){let u=d[1],h=r[u];h||(r[u]=h=[]),h.push(c)}}let s=[];for(let a in r)s.push(this.CreateFromMorphTargetSequence(a,r[a],t,n));return s}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let n=function(u,h,p,f,m){if(p.length!==0){let b=[],g=[];Qn.flattenJSON(p,b,g,f),b.length!==0&&m.push(new u(h,b,g))}},r=[],o=e.name||"default",s=e.fps||30,a=e.blendMode,l=e.length||-1,c=e.hierarchy||[];for(let u=0;u{t&&t(o),this.manager.itemEnd(e)},0),o;if(Ya[e]!==void 0){Ya[e].push({onLoad:t,onProgress:n,onError:r});return}Ya[e]=[],Ya[e].push({onLoad:t,onProgress:n,onError:r});let s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"});fetch(s).then(a=>{if(a.status===200||a.status===0){a.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");let l=Ya[e],c=a.body.getReader(),d=a.headers.get("Content-Length"),u=d?parseInt(d):0,h=u!==0,p=0;return new ReadableStream({start(f){m();function m(){c.read().then(({done:b,value:g})=>{if(b)f.close();else{p+=g.byteLength;let _=new ProgressEvent("progress",{lengthComputable:h,loaded:p,total:u});for(let x=0,C=l.length;x{let l=new Response(a);switch(this.responseType){case"arraybuffer":return l.arrayBuffer();case"blob":return l.blob();case"document":return l.text().then(c=>new DOMParser().parseFromString(c,this.mimeType));case"json":return l.json();default:return l.text()}}).then(a=>{lu.add(e,a);let l=Ya[e];delete Ya[e];for(let c=0,d=l.length;c{let l=Ya[e];delete Ya[e];for(let c=0,d=l.length;c0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(let o in e.uniforms){let s=e.uniforms[o];switch(r.uniforms[o]={},s.type){case"t":r.uniforms[o].value=n(s.value);break;case"c":r.uniforms[o].value=new je().setHex(s.value);break;case"v2":r.uniforms[o].value=new xe().fromArray(s.value);break;case"v3":r.uniforms[o].value=new R().fromArray(s.value);break;case"v4":r.uniforms[o].value=new Cn().fromArray(s.value);break;case"m3":r.uniforms[o].value=new yi().fromArray(s.value);break;case"m4":r.uniforms[o].value=new lt().fromArray(s.value);break;default:r.uniforms[o].value=s.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.extensions!==void 0)for(let o in e.extensions)r.extensions[o]=e.extensions[o];if(e.shading!==void 0&&(r.flatShading=e.shading===1),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=n(e.map)),e.matcap!==void 0&&(r.matcap=n(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),r.normalScale=new xe().fromArray(o)}return e.displacementMap!==void 0&&(r.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=n(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new xe().fromArray(e.clearcoatNormalScale)),e.transmissionMap!==void 0&&(r.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=n(e.thicknessMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}},Zp=class{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let n=0,r=e.length;n0){let l=new E_(t);o=new cu(l),o.setCrossOrigin(this.crossOrigin);for(let c=0,d=e.length;c0){r=new cu(this.manager),r.setCrossOrigin(this.crossOrigin);for(let s=0,a=e.length;s"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let o=this,s=lu.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(s),o.manager.itemEnd(e)},0),s;let a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){lu.add(e,l),t&&t(l),o.manager.itemEnd(e)}).catch(function(l){r&&r(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}};Ow.prototype.isImageBitmapLoader=!0;var Wx,tO={getContext:function(){return Wx===void 0&&(Wx=new(window.AudioContext||window.webkitAudioContext)),Wx},setContext:function(i){Wx=i}},Rw=class extends ar{constructor(e){super(e)}load(e,t,n,r){let o=this,s=new Yo(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{let l=a.slice(0);tO.getContext().decodeAudioData(l,function(d){t(d)})}catch(l){r?r(l):console.error(l),o.manager.itemError(e)}},n,r)}},Aw=class extends du{constructor(e,t,n=1){super(void 0,n);let r=new je().set(e),o=new je().set(t),s=new R(r.r,r.g,r.b),a=new R(o.r,o.g,o.b),l=Math.sqrt(Math.PI),c=l*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(s).sub(a).multiplyScalar(c)}};Aw.prototype.isHemisphereLightProbe=!0;var Nw=class extends du{constructor(e,t=1){super(void 0,t);let n=new je().set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}};Nw.prototype.isAmbientLightProbe=!0;var MU=new lt,EU=new lt,yP=class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Mi,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Mi,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){let t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep;let r=e.projectionMatrix.clone(),o=t.eyeSep/2,s=o*t.near/t.focus,a=t.near*Math.tan(qd*t.fov*.5)/t.zoom,l,c;EU.elements[12]=-o,MU.elements[12]=o,l=-a*t.aspect+s,c=a*t.aspect+s,r.elements[0]=2*t.near/(c-l),r.elements[8]=(c+l)/(c-l),this.cameraL.projectionMatrix.copy(r),l=-a*t.aspect-s,c=a*t.aspect-s,r.elements[0]=2*t.near/(c-l),r.elements[8]=(c+l)/(c-l),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(EU),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(MU)}},kw=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=IU(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=IU();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}};function IU(){return(typeof performance>"u"?Date:performance).now()}var Ld=new R,TU=new Bi,Qae=new R,Fd=new R,xP=class extends hn{constructor(){super(),this.type="AudioListener",this.context=tO.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new kw}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);let t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Ld,TU,Qae),Fd.set(0,0,-1).applyQuaternion(TU),t.positionX){let r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Ld.x,r),t.positionY.linearRampToValueAtTime(Ld.y,r),t.positionZ.linearRampToValueAtTime(Ld.z,r),t.forwardX.linearRampToValueAtTime(Fd.x,r),t.forwardY.linearRampToValueAtTime(Fd.y,r),t.forwardZ.linearRampToValueAtTime(Fd.z,r),t.upX.linearRampToValueAtTime(n.x,r),t.upY.linearRampToValueAtTime(n.y,r),t.upZ.linearRampToValueAtTime(n.z,r)}else t.setPosition(Ld.x,Ld.y,Ld.z),t.setOrientation(Fd.x,Fd.y,Fd.z,n.x,n.y,n.z)}},L_=class extends hn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;let t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(n[l]!==n[l+t]){a.setValue(n,r);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let o=n,s=r;o!==s;++o)t[o]=t[r+o%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let s=0;s!==o;++s)e[t+s]=e[n+s]}_slerp(e,t,n,r){Bi.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,o){let s=this._workIndex*o;Bi.multiplyQuaternionsFlat(e,s,e,t,e,n),Bi.slerpFlat(e,t,e,t,e,s,r)}_lerp(e,t,n,r,o){let s=1-r;for(let a=0;a!==o;++a){let l=t+a;e[l]=e[l]*s+e[n+a]*r}}_lerpAdditive(e,t,n,r,o){for(let s=0;s!==o;++s){let a=t+s;e[a]=e[a]+e[n+s]*r}}},nO="\\[\\]\\.:\\/",Jae=new RegExp("["+nO+"]","g"),iO="[^"+nO+"]",ele="[^"+nO.replace("\\.","")+"]",tle=/((?:WC+[\/:])*)/.source.replace("WC",iO),nle=/(WCOD+)?/.source.replace("WCOD",ele),ile=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",iO),rle=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",iO),ole=new RegExp("^"+tle+nle+ile+rle+"$"),sle=["material","materials","bones"],CP=class{constructor(e,t,n){let r=n||jn.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=n.length;r!==o;++r)n[r].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},jn=(()=>{class i{constructor(t,n,r){this.path=n,this.parsedPath=r||i.parseTrackName(n),this.node=i.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,n,r){return t&&t.isAnimationObjectGroup?new i.Composite(t,n,r):new i(t,n,r)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Jae,"")}static parseTrackName(t){let n=ole.exec(t);if(!n)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},o=r.nodeName&&r.nodeName.lastIndexOf(".");if(o!==void 0&&o!==-1){let s=r.nodeName.substring(o+1);sle.indexOf(s)!==-1&&(r.nodeName=r.nodeName.substring(0,o),r.objectName=s)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return r}static findNode(t,n){if(!n||n===""||n==="."||n===-1||n===t.name||n===t.uuid)return t;if(t.skeleton){let r=t.skeleton.getBoneByName(n);if(r!==void 0)return r}if(t.children){let r=function(s){for(let a=0;a=o){let u=o++,h=e[u];t[h.uuid]=d,e[d]=h,t[c]=u,e[u]=l;for(let p=0,f=r;p!==f;++p){let m=n[p],b=m[u],g=m[d];m[d]=b,m[u]=g}}}this.nCachedObjects_=o}uncache(){let e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,o=this.nCachedObjects_,s=e.length;for(let a=0,l=arguments.length;a!==l;++a){let c=arguments[a],d=c.uuid,u=t[d];if(u!==void 0)if(delete t[d],u0&&(t[p.uuid]=u),e[u]=p,e.pop();for(let f=0,m=r;f!==m;++f){let b=n[f];b[u]=b[h],b.pop()}}}this.nCachedObjects_=o}subscribe_(e,t){let n=this._bindingsIndicesByPath,r=n[e],o=this._bindings;if(r!==void 0)return o[r];let s=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,d=this.nCachedObjects_,u=new Array(c);r=o.length,n[e]=r,s.push(e),a.push(t),o.push(u);for(let h=d,p=l.length;h!==p;++h){let f=l[h];u[h]=new jn(f,e,t)}return u}unsubscribe_(e){let t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){let r=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length-1,l=s[a],c=e[a];t[c]=n,s[n]=l,s.pop(),o[n]=o[a],o.pop(),r[n]=r[a],r.pop()}}};Bw.prototype.isAnimationObjectGroup=!0;var SP=class{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;let o=t.tracks,s=o.length,a=new Array(s),l={endingStart:Hd,endingEnd:Hd};for(let c=0;c!==s;++c){let d=o[c].createInterpolant(null);a[c]=d,d.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=aH,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){let r=this._clip.duration,o=e._clip.duration,s=o/r,a=r/o;e.warp(1,s,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){let e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){let r=this._mixer,o=r.time,s=this.timeScale,a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);let l=a.parameterPositions,c=a.sampleValues;return l[0]=o,l[1]=o+n,c[0]=e/s,c[1]=t/s,this}stopWarping(){let e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled){this._updateWeight(e);return}let o=this._startTime;if(o!==null){let l=(e-o)*n;if(l<0||n===0)return;this._startTime=null,t=n*l}t*=this._updateTimeScale(e);let s=this._updateTime(t),a=this._updateWeight(e);if(a>0){let l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case $P:for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(s),c[d].accumulateAdditive(a);break;case Xw:default:for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(s),c[d].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,r=this.time+e,o=this._loopCount,s=n===lH;if(e===0)return o===-1?r:s&&(o&1)===1?t-r:r;if(n===sH){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),r>=t||r<0){let a=Math.floor(r/t);r-=t*a,o+=Math.abs(a);let l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){let c=e<0;this._setEndings(c,!c,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(s&&(o&1)===1)return t-r}return r}_setEndings(e,t,n){let r=this._interpolantSettings;n?(r.endingStart=Gd,r.endingEnd=Gd):(e?r.endingStart=this.zeroSlopeAtStart?Gd:Hd:r.endingStart=Ug,t?r.endingEnd=this.zeroSlopeAtEnd?Gd:Hd:r.endingEnd=Ug)}_scheduleFading(e,t,n){let r=this._mixer,o=r.time,s=this._weightInterpolant;s===null&&(s=r._lendControlInterpolant(),this._weightInterpolant=s);let a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=t,a[1]=o+e,l[1]=n,this}},Vw=class extends ta{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){let n=e._localRoot||this._root,r=e._clip.tracks,o=r.length,s=e._propertyBindings,a=e._interpolants,l=n.uuid,c=this._bindingsByRootAndName,d=c[l];d===void 0&&(d={},c[l]=d);for(let u=0;u!==o;++u){let h=r[u],p=h.name,f=d[p];if(f!==void 0)s[u]=f;else{if(f=s[u],f!==void 0){f._cacheIndex===null&&(++f.referenceCount,this._addInactiveBinding(f,l,p));continue}let m=t&&t._propertyBindings[u].binding.parsedPath;f=new Fw(jn.create(n,p,m),h.ValueTypeName,h.getValueSize()),++f.referenceCount,this._addInactiveBinding(f,l,p),s[u]=f}a[u].resultBuffer=f.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){let n=(e._localRoot||this._root).uuid,r=e._clip.uuid,o=this._actionsByClip[r];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,r,n)}let t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){let o=t[n];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){let o=t[n];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return t!==null&&t=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,r=this.time+=e,o=Math.sign(e),s=this._accuIndex^=1;for(let c=0;c!==n;++c)t[c]._update(r,e,o,s);let a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(s);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return OU.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};mc.prototype.isBox2=!0;var RU=new R,$x=new R,Gw=class{constructor(e=new R,t=new R){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){RU.subVectors(e,this.start),$x.subVectors(this.end,this.start);let n=$x.dot($x),o=$x.dot(RU)/n;return t&&(o=nr(o,0,1)),o}closestPointToPoint(e,t,n){let r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},AU=new R,DP=class extends hn{constructor(e,t){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;let n=new It,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,a=1,l=32;s.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{BU.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(BU,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}},qw=class extends xr{constructor(e=1){let t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new It;r.setAttribute("position",new tt(t,3)),r.setAttribute("color",new tt(n,3));let o=new Ti({vertexColors:!0,toneMapped:!1});super(r,o),this.type="AxesHelper"}setColors(e,t,n){let r=new je,o=this.geometry.attributes.color.array;return r.set(e),r.toArray(o,0),r.toArray(o,3),r.set(t),r.toArray(o,6),r.toArray(o,9),r.set(n),r.toArray(o,12),r.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},BP=class{constructor(){this.type="ShapePath",this.color=new je,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new ru,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,o,s){return this.currentPath.bezierCurveTo(e,t,n,r,o,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(_){let x=[];for(let C=0,T=_.length;CNumber.EPSILON){if(U<0&&(P=x[E],$=-$,Y=x[D],U=-U),_.yY.y)continue;if(_.y===P.y){if(_.x===P.x)return!0}else{let O=U*(_.x-P.x)-$*(_.y-P.y);if(O===0)return!0;if(O<0)continue;T=!T}}else{if(_.y!==P.y)continue;if(Y.x<=_.x&&_.x<=P.x||P.x<=_.x&&_.x<=Y.x)return!0}}return T}let o=ea.isClockWise,s=this.subPaths;if(s.length===0)return[];if(t===!0)return n(s);let a,l,c,d=[];if(s.length===1)return l=s[0],c=new qo,c.curves=l.curves,d.push(c),d;let u=!o(s[0].getPoints());u=e?!u:u;let h=[],p=[],f=[],m=0,b;p[m]=void 0,f[m]=[];for(let _=0,x=s.length;_1){let _=!1,x=[];for(let C=0,T=p.length;C0&&(_||(f=h))}let g;for(let _=0,x=p.length;_65504&&(console.warn("THREE.DataUtils.toHalfFloat(): value exceeds 65504."),e=65504),FH[0]=e;let t=lle[0],n=t>>16&32768,r=t>>12&2047,o=t>>23&255;return o<103?n:o>142?(n|=31744,n|=(o==255?0:1)&&t&8388607,n):o<113?(r|=2048,n|=(r>>114-o)+(r>>113-o&1),n):(n|=o-112<<10|r>>1,n+=r&1,n)}},cle=0,dle=1,ule=0,hle=1,ple=2;function fle(i){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),i}function mle(i=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),i.isMultiMaterial=!0,i.materials=i,i.clone=function(){return i.slice()},i}function gle(i,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new eu(i,e)}function _le(i){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Vp(i)}function vle(i,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new eu(i,e)}function ble(i){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new nl(i)}function yle(i){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new nl(i)}function xle(i){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new nl(i)}function wle(i,e,t){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new R(i,e,t)}function Cle(i,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new un(i,e).setUsage(Ip)}function Sle(i,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new rw(i,e)}function Mle(i,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new ow(i,e)}function Ele(i,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new sw(i,e)}function Ile(i,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new aw(i,e)}function Tle(i,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Tp(i,e)}function Dle(i,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new lw(i,e)}function Ple(i,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Dp(i,e)}function Ole(i,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new tt(i,e)}function Rle(i,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new dw(i,e)}Gr.create=function(i,e){return console.log("THREE.Curve.create() has been deprecated"),i.prototype=Object.create(Gr.prototype),i.prototype.constructor=i,i.prototype.getPoint=e,i};ru.prototype.fromPoints=function(i){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(i)};function Ale(i){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new qw(i)}function Nle(i,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new $w(i,e)}function kle(i,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new xr(new t_(i.geometry),new Ti({color:e!==void 0?e:16777215}))}Ww.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};jw.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};function Lle(i,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new xr(new m_(i.geometry),new Ti({color:e!==void 0?e:16777215}))}ar.prototype.extractUrlBase=function(i){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Zp.extractUrlBase(i)};ar.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};function Fle(i){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Yo(i)}function Ble(i){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Sw(i)}mc.prototype.center=function(i){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(i)};mc.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()};mc.prototype.isIntersectionBox=function(i){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};mc.prototype.size=function(i){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(i)};Ur.prototype.center=function(i){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(i)};Ur.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()};Ur.prototype.isIntersectionBox=function(i){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};Ur.prototype.isIntersectionSphere=function(i){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(i)};Ur.prototype.size=function(i){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(i)};na.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()};Kd.prototype.setFromMatrix=function(i){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(i)};Gw.prototype.center=function(i){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(i)};yi.prototype.flattenToArrayOffset=function(i,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(i,e)};yi.prototype.multiplyVector3=function(i){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),i.applyMatrix3(this)};yi.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")};yi.prototype.applyToBufferAttribute=function(i){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),i.applyMatrix3(this)};yi.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")};yi.prototype.getInverse=function(i){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(i).invert()};lt.prototype.extractPosition=function(i){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(i)};lt.prototype.flattenToArrayOffset=function(i,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(i,e)};lt.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new R().setFromMatrixColumn(this,3)};lt.prototype.setRotationFromQuaternion=function(i){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(i)};lt.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")};lt.prototype.multiplyVector3=function(i){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};lt.prototype.multiplyVector4=function(i){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};lt.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")};lt.prototype.rotateAxis=function(i){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),i.transformDirection(this)};lt.prototype.crossVector=function(i){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};lt.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")};lt.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")};lt.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")};lt.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")};lt.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")};lt.prototype.applyToBufferAttribute=function(i){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};lt.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")};lt.prototype.makeFrustum=function(i,e,t,n,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(i,e,n,t,r,o)};lt.prototype.getInverse=function(i){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(i).invert()};$o.prototype.isIntersectionLine=function(i){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(i)};Bi.prototype.multiplyVector3=function(i){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),i.applyQuaternion(this)};Bi.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()};ia.prototype.isIntersectionBox=function(i){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};ia.prototype.isIntersectionPlane=function(i){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(i)};ia.prototype.isIntersectionSphere=function(i){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(i)};or.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()};or.prototype.barycoordFromPoint=function(i,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(i,e)};or.prototype.midpoint=function(i){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(i)};or.prototypenormal=function(i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(i)};or.prototype.plane=function(i){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(i)};or.barycoordFromPoint=function(i,e,t,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),or.getBarycoord(i,e,t,n,r)};or.normal=function(i,e,t,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),or.getNormal(i,e,t,n)};qo.prototype.extractAllPoints=function(i){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(i)};qo.prototype.extrude=function(i){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new rl(this,i)};qo.prototype.makeGeometry=function(i){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new qp(this,i)};xe.prototype.fromAttribute=function(i,e,t){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,e,t)};xe.prototype.distanceToManhattan=function(i){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(i)};xe.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};R.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")};R.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")};R.prototype.getPositionFromMatrix=function(i){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(i)};R.prototype.getScaleFromMatrix=function(i){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(i)};R.prototype.getColumnFromMatrix=function(i,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,i)};R.prototype.applyProjection=function(i){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(i)};R.prototype.fromAttribute=function(i,e,t){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,e,t)};R.prototype.distanceToManhattan=function(i){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(i)};R.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};Cn.prototype.fromAttribute=function(i,e,t){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,e,t)};Cn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};hn.prototype.getChildByName=function(i){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(i)};hn.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")};hn.prototype.translate=function(i,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,i)};hn.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")};hn.prototype.applyMatrix=function(i){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(i)};Object.defineProperties(hn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(i){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=i}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});di.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")};Object.defineProperties(di.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),cH},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});zp.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Mi.prototype.setLens=function(i,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(i)};Object.defineProperties(wo.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(i){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=i}},shadowCameraLeft:{set:function(i){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=i}},shadowCameraRight:{set:function(i){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=i}},shadowCameraTop:{set:function(i){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=i}},shadowCameraBottom:{set:function(i){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=i}},shadowCameraNear:{set:function(i){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=i}},shadowCameraFar:{set:function(i){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=i}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(i){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=i}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(i){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=i}},shadowMapHeight:{set:function(i){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=i}}});Object.defineProperties(un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Ip},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Ip)}}});un.prototype.setDynamic=function(i){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(i===!0?Ip:Ep),this};un.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},un.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};It.prototype.addIndex=function(i){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(i)};It.prototype.addAttribute=function(i,e){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),!(e&&e.isBufferAttribute)&&!(e&&e.isInterleavedBufferAttribute)?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(i,new un(arguments[1],arguments[2]))):i==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):this.setAttribute(i,e)};It.prototype.addDrawCall=function(i,e,t){t!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(i,e)};It.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()};It.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")};It.prototype.removeAttribute=function(i){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(i)};It.prototype.applyMatrix=function(i){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(i)};Object.defineProperties(It.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}});el.prototype.setDynamic=function(i){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(i===!0?Ip:Ep),this};el.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};rl.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")};rl.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")};rl.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")};Fp.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")};zw.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this};Object.defineProperties(Ii.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new je}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(i){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===HP}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(i){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=i}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}});Object.defineProperties(ws.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(i){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=i}}});An.prototype.clearTarget=function(i,e,t,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(i),this.clear(e,t,n)};An.prototype.animate=function(i){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(i)};An.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()};An.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()};An.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision};An.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()};An.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")};An.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")};An.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")};An.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")};An.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")};An.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")};An.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures};An.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")};An.prototype.enableScissorTest=function(i){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(i)};An.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};An.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};An.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};An.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};An.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")};An.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")};An.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")};An.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")};An.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")};An.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()};Object.defineProperties(An.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(i){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=i}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(i){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=i}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(i){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=i===!0?gc:sr}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}});Object.defineProperties(DH.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});function Vle(i,e,t){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Rp(i,t)}Object.defineProperties(yo.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(i){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=i}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(i){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=i}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(i){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=i}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(i){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=i}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(i){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=i}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(i){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=i}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(i){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=i}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(i){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=i}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(i){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=i}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(i){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=i}}});L_.prototype.load=function(i){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let e=this;return new Rw().load(i,function(n){e.setBuffer(n)}),this};Lw.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()};Op.prototype.updateCubeMap=function(i,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(i,e)};Op.prototype.clear=function(i,e,t,n){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(i,e,t,n)};Ja.crossOrigin=void 0;Ja.loadTexture=function(i,e,t,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let r=new Mw;r.setCrossOrigin(this.crossOrigin);let o=r.load(i,t,void 0,n);return e&&(o.mapping=e),o};Ja.loadTextureCube=function(i,e,t,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let r=new Cw;r.setCrossOrigin(this.crossOrigin);let o=r.load(i,t,void 0,n);return e&&(o.mapping=e),o};Ja.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};Ja.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};function zle(){console.error("THREE.CanvasRenderer has been removed")}function Ule(){console.error("THREE.JSONLoader has been removed.")}var Hle={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function Gle(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}function jle(){return console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),new It}function Wle(){return console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),new It}function $le(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function qle(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function Yle(){console.error("THREE.ImmediateRenderObject has been removed.")}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:zP}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=zP);var Jp=(()=>{class i{linearGradientId=Math.random().toString(36).slice(-6);fillUrl=`url(#${this.linearGradientId})`;static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["me-logo"]],standalone:!0,features:[ce],decls:19,vars:2,consts:[["width","24","height","24","viewBox","0 0 256 256","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","256","height","256","fill","none"],["d","M229 64.5V192.5L128 248.5L127.5 115.5L229 64.5Z"],["d","M208 76V99L128 141.5V116L208 76Z","fill","white"],["d","M208 122.5V141.5L128 182.5V161.5L208 122.5Z","fill","white"],["d","M208 164.5V183L128 225.5V206L208 164.5Z","fill","white"],["d","M149 106V214.5L127 226V117.5L149 106Z","fill","white"],["d","M26 61L47.5 72.5V200L26 187V61Z","fill","#FBBC04"],["d","M125.5 10.5L145.5 21V60.5L125.5 56.5V10.5Z","fill","#DCA810"],["d","M164 31L184 41.5V81L164 78V31Z","fill","#309C4D"],["d","M164 31L184 41.5L87 94L65 82L164 31Z","fill","#11792D"],["d","M208 54.5L229 64.5L128 116L107 105L208 54.5Z","fill","#2C5CAC"],["d","M125.5 10.5L145.5 21L47.5 72.5L26 61L125.5 10.5Z","fill","#C78B15"],["d","M65 82L87 94V224L65 210.5V82Z","fill","#34A853"],["d","M107 105L128 116V248.5L107 236V105Z","fill","#4285F4"],["x1","144.5","y1","232","x2","219","y2","69.5","gradientUnits","userSpaceOnUse"],["stop-color","#4285F4"],["offset","1","stop-color","#2C5CAC"]],template:function(n,r){n&1&&(io(),v(0,"svg",0),J(1,"rect",1)(2,"path",2)(3,"path",3)(4,"path",4)(5,"path",5)(6,"path",6)(7,"path",7)(8,"path",8)(9,"path",9)(10,"path",10)(11,"path",11)(12,"path",12)(13,"path",13)(14,"path",14),v(15,"defs")(16,"linearGradient",15),J(17,"stop",16)(18,"stop",17),y()()()),n&2&&(w(2),Ze("fill",r.fillUrl),w(14),Ze("id",r.linearGradientId))},styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}"]})}return i})();var _c=(()=>{class i{hiddenInputOpNodeIds=xt({});hiddenOutputIds=xt({});toggleInputOpNodeVisibility(t){this.hiddenInputOpNodeIds.update(n=>(n[t]===!0?delete n[t]:n[t]=!0,Z({},n)))}setInputOpNodeVisible(t,n){let r=this.hiddenInputOpNodeIds()[t]!==!0;for(let o of n)o!==t&&(this.hiddenInputOpNodeIds()[o]||(r=!1));if(r)this.hiddenInputOpNodeIds.set({});else{let o={};for(let s of n)s!==t&&(o[s]=!0);this.hiddenInputOpNodeIds.set(o)}}toggleOutputVisibility(t){this.hiddenOutputIds.update(n=>(n[t]===!0?delete n[t]:n[t]=!0,Z({},n)))}setOutputVisible(t,n){let r=this.hiddenOutputIds()[t]!==!0;for(let o of n)o!==t&&(this.hiddenOutputIds()[o]||(r=!1));if(r)this.hiddenOutputIds.set({});else{let o={};for(let s of n)s!==t&&(o[s]=!0);this.hiddenOutputIds.set(o)}}getInputOpNodeVisible(t){return!this.hiddenInputOpNodeIds()[t]}getOutputVisible(t){return!this.hiddenOutputIds()[t]}resetInputOutputHiddenIds(){this.hiddenInputOpNodeIds.set({}),this.hiddenOutputIds.set({})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var Xo=(()=>{class i{appService;selectedNodeIds=xt({});hasSelectedNodes=Xt(()=>Object.keys(this.selectedNodeIds()).length>0);selectedNodeCount=Xt(()=>Object.keys(this.selectedNodeIds()).length);paneId="";constructor(t){this.appService=t}toggleNode(t){this.selectedNodeIds.update(n=>{if(!this.modelGraph)return n;let r=this.modelGraph.nodesById[t];if(bt(r)){let o=r.descendantsOpNodeIds||[],s=o.some(a=>n[a]);for(let a of o)Et(this.modelGraph.nodesById[a])&&(s?delete n[a]:n[a]=!0)}else n[t]?delete n[t]:n[t]=!0;return Z({},n)})}toggleNodes(t){if(t.length===0||!this.modelGraph)return;let n=Z({},this.selectedNodeIds());for(let r of t){let o=this.modelGraph.nodesById[r];if(Et(o))n[r]?delete n[r]:n[r]=!0;else if(bt(o)&&!o.expanded)for(let s of o.descendantsOpNodeIds||[])n[s]?delete n[s]:n[s]=!0}this.selectedNodeIds.set(n)}clearSelection(){this.selectedNodeIds.set({})}isHiddenFromSelection(t){return t.label==="pseudo_const"}getSelectedSubgraph(){if(!this.modelGraph)return;let t=this.appService.getGraphById(this.modelGraph.id);if(!t)return;t=JSON.parse(JSON.stringify(t));let n={};for(let h of t.nodes)n[h.id]=h;let r=this.selectedNodeIds(),o=t.nodes.filter(h=>r[h.id]===!0),s=o.find(h=>h.label==="GraphInputs");if(!s){let h=t.nodes.find(p=>p.label==="GraphInputs");if(!h)throw new Error("GraphInputs node not found in the original graph.");s=structuredClone(h),s.outputsMetadata=[],o.push(s)}s.outputsMetadata=s.outputsMetadata||[];let a=new Map,l=s.outputsMetadata.length;for(let h of o){let p=(h.incomingEdges||[]).filter(f=>!r[f.sourceNodeId]);for(let f of p){let m=n[f.sourceNodeId];if(this.isHiddenFromSelection(m)){o.push(m);continue}let b=(m.outputsMetadata||[]).find(_=>_.id===f.sourceNodeOutputId);if(!b)continue;let g=(b.attrs||[]).find(_=>_.key==="tensor_index")?.value;g&&(a.has(g)||(a.set(g,l.toString()),s.outputsMetadata.push({id:l.toString(),attrs:b.attrs}),l++),f.sourceNodeId=s.id,f.sourceNodeOutputId=a.get(g))}}let c=o.find(h=>h.label==="GraphOutputs");if(!c){let h=t.nodes.find(p=>p.label==="GraphOutputs");if(!h)throw new Error("GraphOutputs node not found in the original graph.");c=structuredClone(h),c.incomingEdges=[],o.push(c)}c.incomingEdges=c.incomingEdges||[];let d=new Set,u=c.incomingEdges.length;for(let h of t.nodes){if(r[h.id])continue;let p=(h.incomingEdges||[]).filter(f=>r[f.sourceNodeId]);for(let f of p){let b=(n[f.sourceNodeId].outputsMetadata||[]).find(_=>_.id===f.sourceNodeOutputId);if(!b)continue;let g=(b.attrs||[]).find(_=>_.key==="tensor_index")?.value;if(g&&!d.has(g)){d.add(g);let _=structuredClone(f);_.targetNodeInputId=u.toString(),c.incomingEdges.push(_),u++}}}return{id:`${t.id}_subgraph`,collectionLabel:t.collectionLabel,nodes:o}}get modelGraph(){return this.appService.getCurrentModelGraphFromPane(this.paneId)}static \u0275fac=function(n){return new(n||i)(X(st))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var tC=class{};function VH(i){return i&&typeof i.connect=="function"&&!(i instanceof hl)}var ef=class{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(e=!1,t,n=!0,r){this._multiple=e,this._emitChanges=n,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new me,t&&t.length&&(e?t.forEach(o=>this._markSelected(o)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...e){this._verifyValueAssignment(e),e.forEach(n=>this._markSelected(n));let t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...e){this._verifyValueAssignment(e),e.forEach(n=>this._unmarkSelected(n));let t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...e){this._verifyValueAssignment(e);let t=this.selected,n=new Set(e);e.forEach(o=>this._markSelected(o)),t.filter(o=>!n.has(this._getConcreteValue(o,n))).forEach(o=>this._unmarkSelected(o));let r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(e){return this.isSelected(e)?this.deselect(e):this.select(e)}clear(e=!0){this._unmarkAll();let t=this._hasQueuedChanges();return e&&this._emitChangeEvent(),t}isSelected(e){return this._selection.has(this._getConcreteValue(e))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(e){this._multiple&&this.selected&&this._selected.sort(e)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(e){e=this._getConcreteValue(e),this.isSelected(e)||(this._multiple||this._unmarkAll(),this.isSelected(e)||this._selection.add(e),this._emitChanges&&this._selectedToEmit.push(e))}_unmarkSelected(e){e=this._getConcreteValue(e),this.isSelected(e)&&(this._selection.delete(e),this._emitChanges&&this._deselectedToEmit.push(e))}_unmarkAll(){this.isEmpty()||this._selection.forEach(e=>this._unmarkSelected(e))}_verifyValueAssignment(e){e.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(e,t){if(this.compareWith){t=t??this._selection;for(let n of t)if(this.compareWith(e,n))return n;return e}else return e}};var Xle=20,mu=(()=>{let e=class e{constructor(n,r,o){this._ngZone=n,this._platform=r,this._scrolled=new me,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=o}register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=Xle){return this._platform.isBrowser?new Mt(r=>{this._globalSubscription||this._addGlobalListener();let o=n>0?this._scrolled.pipe(zv(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{o.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Ke()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let o=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe(Gt(s=>!s||o.indexOf(s)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((o,s)=>{this._scrollableContainsElement(s,n)&&r.push(s)}),r}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(n,r){let o=er(r),s=n.getElementRef().nativeElement;do if(o==s)return!0;while(o=o.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let n=this._getWindow();return yn(n.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}};e.\u0275fac=function(r){return new(r||e)(X(Le),X(gn),X(Ye,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),rO=(()=>{let e=class e{constructor(n,r,o,s){this.elementRef=n,this.scrollDispatcher=r,this.ngZone=o,this.dir=s,this._destroyed=new me,this._elementScrolled=new Mt(a=>this.ngZone.runOutsideAngular(()=>yn(this.elementRef.nativeElement,"scroll").pipe(Xe(this._destroyed)).subscribe(a)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(n){let r=this.elementRef.nativeElement,o=this.dir&&this.dir.value=="rtl";n.left==null&&(n.left=o?n.end:n.start),n.right==null&&(n.right=o?n.start:n.end),n.bottom!=null&&(n.top=r.scrollHeight-r.clientHeight-n.bottom),o&&Mh()!=fs.NORMAL?(n.left!=null&&(n.right=r.scrollWidth-r.clientWidth-n.left),Mh()==fs.INVERTED?n.left=n.right:Mh()==fs.NEGATED&&(n.left=n.right?-n.right:n.right)):n.right!=null&&(n.left=r.scrollWidth-r.clientWidth-n.right),this._applyScrollToOptions(n)}_applyScrollToOptions(n){let r=this.elementRef.nativeElement;py()?r.scrollTo(n):(n.top!=null&&(r.scrollTop=n.top),n.left!=null&&(r.scrollLeft=n.left))}measureScrollOffset(n){let r="left",o="right",s=this.elementRef.nativeElement;if(n=="top")return s.scrollTop;if(n=="bottom")return s.scrollHeight-s.clientHeight-s.scrollTop;let a=this.dir&&this.dir.value=="rtl";return n=="start"?n=a?o:r:n=="end"&&(n=a?r:o),a&&Mh()==fs.INVERTED?n==r?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:a&&Mh()==fs.NEGATED?n==r?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:n==r?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(mu),M(Le),M(ai,8))},e.\u0275dir=ze({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0});let i=e;return i})(),Zle=20,ra=(()=>{let e=class e{constructor(n,r,o){this._platform=n,this._change=new me,this._changeListener=s=>{this._change.next(s)},this._document=o,r.runOutsideAngular(()=>{if(n.isBrowser){let s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let n=this._getWindow();n.removeEventListener("resize",this._changeListener),n.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:o}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+o,right:n.left+r,height:o,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),o=n.documentElement,s=o.getBoundingClientRect(),a=-s.top||n.body.scrollTop||r.scrollY||o.scrollTop||0,l=-s.left||n.body.scrollLeft||r.scrollX||o.scrollLeft||0;return{top:a,left:l}}change(n=Zle){return n>0?this._change.pipe(zv(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Le),X(Ye,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Zo=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})(),oO=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[$l,Zo,$l,Zo]});let i=e;return i})();var z_=class{attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},Di=class extends z_{constructor(e,t,n,r,o){super(),this.component=e,this.viewContainerRef=t,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=o}},jr=class extends z_{constructor(e,t,n,r){super(),this.templateRef=e,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}},sO=class extends z_{constructor(e){super(),this.element=e instanceof Re?e.nativeElement:e}},oa=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Di)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof jr)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof sO)return this._attachedPortal=e,this.attachDomPortal(e)}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var U_=class extends oa{constructor(e,t,n,r,o){super(),this.outletElement=e,this._componentFactoryResolver=t,this._appRef=n,this._defaultInjector=r,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(e){let n=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),r;return e.viewContainerRef?(r=e.viewContainerRef.createComponent(n,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector,e.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=n.create(e.injector||this._defaultInjector||yt.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=e,r}attachTemplatePortal(e){let t=e.viewContainerRef,n=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);r!==-1&&t.remove(r)}),this._attachedPortal=e,n}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}};var Qo=(()=>{let e=class e extends oa{constructor(n,r,o){super(),this._componentFactoryResolver=n,this._viewContainerRef=r,this._isInitialized=!1,this.attached=new Pe,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let l=this._document.createComment("dom-portal");s.setAttachedHost(this),a.parentNode.insertBefore(l,a),this._getRootNode().appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,s=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component),a=r.createComponent(s,r.length,n.injector||r.injector,n.projectableNodes||void 0);return r!==this._viewContainerRef&&this._getRootNode().appendChild(a.hostView.rootNodes[0]),super.setDisposeFn(()=>a.destroy()),this._attachedPortal=n,this._attachedRef=a,this.attached.emit(a),a}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}};e.\u0275fac=function(r){return new(r||e)(M(ds),M(Yt),M(Ye))},e.\u0275dir=ze({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[nn]});let i=e;return i})();var Ms=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})();var zH=py(),aO=class{constructor(e,t){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=gi(-this._previousScrollPosition.left),e.style.top=gi(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,t=this._document.body,n=e.style,r=t.style,o=n.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),zH&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),zH&&(n.scrollBehavior=o,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let t=this._document.body,n=this._viewportRuler.getViewportSize();return t.scrollHeight>n.height||t.scrollWidth>n.width}};var lO=class{constructor(e,t,n,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Gt(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},nC=class{enable(){}disable(){}attach(){}};function cO(i,e){return e.some(t=>{let n=i.bottomt.bottom,o=i.rightt.right;return n||r||o||s})}function UH(i,e){return e.some(t=>{let n=i.topt.bottom,o=i.leftt.right;return n||r||o||s})}var dO=class{constructor(e,t,n,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this._config=r,this._scrollSubscription=null}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();cO(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},Kle=(()=>{let e=class e{constructor(n,r,o,s){this._scrollDispatcher=n,this._viewportRuler=r,this._ngZone=o,this.noop=()=>new nC,this.close=a=>new lO(this._scrollDispatcher,this._ngZone,this._viewportRuler,a),this.block=()=>new aO(this._viewportRuler,this._document),this.reposition=a=>new dO(this._scrollDispatcher,this._viewportRuler,this._ngZone,a),this._document=s}};e.\u0275fac=function(r){return new(r||e)(X(mu),X(ra),X(Le),X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),ui=class{constructor(e){if(this.scrollStrategy=new nC,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){let t=Object.keys(e);for(let n of t)e[n]!==void 0&&(this[n]=e[n])}}};var uO=class{constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}};var qH=(()=>{let e=class e{constructor(n){this._attachedOverlays=[],this._document=n}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}};e.\u0275fac=function(r){return new(r||e)(X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),Jle=(()=>{let e=class e extends qH{constructor(n,r){super(n),this._ngZone=r,this._keydownListener=o=>{let s=this._attachedOverlays;for(let a=s.length-1;a>-1;a--)if(s[a]._keydownEvents.observers.length>0){let l=s[a]._keydownEvents;this._ngZone?this._ngZone.run(()=>l.next(o)):l.next(o);break}}}add(n){super.add(n),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(Le,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),ece=(()=>{let e=class e extends qH{constructor(n,r,o){super(n),this._platform=r,this._ngZone=o,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=Si(s)},this._clickListener=s=>{let a=Si(s),l=s.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:a;this._pointerDownEventTarget=null;let c=this._attachedOverlays.slice();for(let d=c.length-1;d>-1;d--){let u=c[d];if(u._outsidePointerEvents.observers.length<1||!u.hasAttached())continue;if(HH(u.overlayElement,a)||HH(u.overlayElement,l))break;let h=u._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>h.next(s)):h.next(s)}}}add(n){if(super.add(n),!this._isAttached){let r=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(r)):this._addEventListeners(r),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let n=this._document.body;n.removeEventListener("pointerdown",this._pointerDownListener,!0),n.removeEventListener("click",this._clickListener,!0),n.removeEventListener("auxclick",this._clickListener,!0),n.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(n.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(n){n.addEventListener("pointerdown",this._pointerDownListener,!0),n.addEventListener("click",this._clickListener,!0),n.addEventListener("auxclick",this._clickListener,!0),n.addEventListener("contextmenu",this._clickListener,!0)}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(gn),X(Le,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function HH(i,e){let t=typeof ShadowRoot<"u"&&ShadowRoot,n=e;for(;n;){if(n===i)return!0;n=t&&n instanceof ShadowRoot?n.host:n.parentNode}return!1}var tf=(()=>{let e=class e{constructor(n,r){this._platform=r,this._document=n}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||Vm()){let o=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let s=0;sthis._backdropClick.next(h),this._backdropTransitionendHandler=h=>{this._disposeBackdrop(h.target)},this._keydownEvents=new me,this._outsidePointerEvents=new me,this._renders=new me,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=kr(()=>qf(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),fr(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=Z(Z({},this._config),e),this._updateElementSize()}setDirection(e){this._config=wt(Z({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=gi(this._config.width),e.height=gi(this._config.height),e.minWidth=gi(this._config.minWidth),e.minHeight=gi(this._config.minHeight),e.maxWidth=gi(this._config.maxWidth),e.maxHeight=gi(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let e=this._backdropElement;if(e){if(this._animationsDisabled){this._disposeBackdrop(e);return}e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",this._backdropTransitionendHandler)}),e.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(e)},500))}}_toggleClasses(e,t,n){let r=gd(t||[]).filter(o=>!!o);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(Xe(Yn(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",this._backdropTransitionendHandler),e.remove(),this._backdropElement===e&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},GH="cdk-overlay-connected-position-bounding-box",tce=/([A-Za-z%]+)$/,hO=class{get positions(){return this._preferredPositions}constructor(e,t,n,r,o){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new me,this._resizeSubscription=Ct.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(GH),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,o=[],s;for(let a of this._preferredPositions){let l=this._getOriginPoint(e,r,a),c=this._getOverlayPoint(l,t,a),d=this._getOverlayFit(c,t,n,a);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,l);return}if(this._canFitWithFlexibleDimensions(d,c,n)){o.push({position:a,origin:l,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(l,a)});continue}(!s||s.overlayFit.visibleAreal&&(l=d,a=c)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&gu(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(GH),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,n){let r;if(n.originX=="center")r=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;r=n.originX=="start"?s:a}t.left<0&&(r-=t.left);let o;return n.originY=="center"?o=e.top+e.height/2:o=n.originY=="top"?e.top:e.bottom,t.top<0&&(o-=t.top),{x:r,y:o}}_getOverlayPoint(e,t,n){let r;n.overlayX=="center"?r=-t.width/2:n.overlayX==="start"?r=this._isRtl()?-t.width:0:r=this._isRtl()?0:-t.width;let o;return n.overlayY=="center"?o=-t.height/2:o=n.overlayY=="top"?0:-t.height,{x:e.x+r,y:e.y+o}}_getOverlayFit(e,t,n,r){let o=WH(t),{x:s,y:a}=e,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(s+=l),c&&(a+=c);let d=0-s,u=s+o.width-n.width,h=0-a,p=a+o.height-n.height,f=this._subtractOverflows(o.width,d,u),m=this._subtractOverflows(o.height,h,p),b=f*m;return{visibleArea:b,isCompletelyWithinViewport:o.width*o.height===b,fitsInViewportVertically:m===o.height,fitsInViewportHorizontally:f==o.width}}_canFitWithFlexibleDimensions(e,t,n){if(this._hasFlexibleDimensions){let r=n.bottom-t.y,o=n.right-t.x,s=jH(this._overlayRef.getConfig().minHeight),a=jH(this._overlayRef.getConfig().minWidth),l=e.fitsInViewportVertically||s!=null&&s<=r,c=e.fitsInViewportHorizontally||a!=null&&a<=o;return l&&c}return!1}_pushOverlayOnScreen(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=WH(t),o=this._viewportRect,s=Math.max(e.x+r.width-o.width,0),a=Math.max(e.y+r.height-o.height,0),l=Math.max(o.top-n.top-e.y,0),c=Math.max(o.left-n.left-e.x,0),d=0,u=0;return r.width<=o.width?d=c||-s:d=e.xf&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-f/2)}let l=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,c=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,d,u,h;if(c)h=n.width-e.x+this._viewportMargin*2,d=e.x-this._viewportMargin;else if(l)u=e.x,d=n.right-e.x;else{let p=Math.min(n.right-e.x+n.left,e.x),f=this._lastBoundingBoxSize.width;d=p*2,u=e.x-p,d>f&&!this._isInitialRender&&!this._growAfterOpen&&(u=e.x-f/2)}return{top:s,left:u,bottom:a,right:h,width:d,height:o}}_setBoundingBoxStyles(e,t){let n=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=gi(n.height),r.top=gi(n.top),r.bottom=gi(n.bottom),r.width=gi(n.width),r.left=gi(n.left),r.right=gi(n.right),t.overlayX==="center"?r.alignItems="center":r.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?r.justifyContent="center":r.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",o&&(r.maxHeight=gi(o)),s&&(r.maxWidth=gi(s))}this._lastBoundingBoxSize=n,gu(this._boundingBox.style,r)}_resetBoundingBoxStyles(){gu(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){gu(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let d=this._viewportRuler.getViewportScrollPosition();gu(n,this._getExactOverlayY(t,e,d)),gu(n,this._getExactOverlayX(t,e,d))}else n.position="static";let a="",l=this._getOffset(t,"x"),c=this._getOffset(t,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),n.transform=a.trim(),s.maxHeight&&(r?n.maxHeight=gi(s.maxHeight):o&&(n.maxHeight="")),s.maxWidth&&(r?n.maxWidth=gi(s.maxWidth):o&&(n.maxWidth="")),gu(this._pane.style,n)}_getExactOverlayY(e,t,n){let r={top:"",bottom:""},o=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(o.y+this._overlayRect.height)}px`}else r.top=gi(o.y);return r}_getExactOverlayX(e,t,n){let r={left:"",right:""},o=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;r.right=`${a-(o.x+this._overlayRect.width)}px`}else r.left=gi(o.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:UH(e,n),isOriginOutsideView:cO(e,n),isOverlayClipped:UH(t,n),isOverlayOutsideView:cO(t,n)}}_subtractOverflows(e,...t){return t.reduce((n,r)=>n-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&gd(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof Re)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}};function gu(i,e){for(let t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function jH(i){if(typeof i!="number"&&i!=null){let[e,t]=i.split(tce);return!t||t==="px"?parseFloat(e):null}return i||null}function WH(i){return{top:Math.floor(i.top),right:Math.floor(i.right),bottom:Math.floor(i.bottom),left:Math.floor(i.left),width:Math.floor(i.width),height:Math.floor(i.height)}}function nce(i,e){return i===e?!0:i.isOriginClipped===e.isOriginClipped&&i.isOriginOutsideView===e.isOriginOutsideView&&i.isOverlayClipped===e.isOverlayClipped&&i.isOverlayOutsideView===e.isOverlayOutsideView}var $H="cdk-global-overlay-wrapper",pO=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add($H),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:s,maxHeight:a}=n,l=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),c=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),d=this._xPosition,u=this._xOffset,h=this._overlayRef.getConfig().direction==="rtl",p="",f="",m="";l?m="flex-start":d==="center"?(m="center",h?f=u:p=u):h?d==="left"||d==="end"?(m="flex-end",p=u):(d==="right"||d==="start")&&(m="flex-start",f=u):d==="left"||d==="start"?(m="flex-start",p=u):(d==="right"||d==="end")&&(m="flex-end",f=u),e.position=this._cssPosition,e.marginLeft=l?"0":p,e.marginTop=c?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=l?"0":f,t.justifyContent=m,t.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove($H),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},ice=(()=>{let e=class e{constructor(n,r,o,s){this._viewportRuler=n,this._document=r,this._platform=o,this._overlayContainer=s}global(){return new pO}flexibleConnectedTo(n){return new hO(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}};e.\u0275fac=function(r){return new(r||e)(X(ra),X(Ye),X(gn),X(tf))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),rce=0,Ht=(()=>{let e=class e{constructor(n,r,o,s,a,l,c,d,u,h,p,f){this.scrollStrategies=n,this._overlayContainer=r,this._componentFactoryResolver=o,this._positionBuilder=s,this._keyboardDispatcher=a,this._injector=l,this._ngZone=c,this._document=d,this._directionality=u,this._location=h,this._outsideClickDispatcher=p,this._animationsModuleType=f}create(n){let r=this._createHostElement(),o=this._createPaneElement(r),s=this._createPortalOutlet(o),a=new ui(n);return a.direction=a.direction||this._directionality.value,new al(s,r,o,a,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(qi))}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=`cdk-overlay-${rce++}`,r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(us)),new U_(n,this._componentFactoryResolver,this._appRef,this._injector,this._document)}};e.\u0275fac=function(r){return new(r||e)(X(Kle),X(tf),X(ds),X(ice),X(Jle),X(yt),X(Le),X(Ye),X(ai),X(Pa),X(ece),X(Zn,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),oce=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],YH=new ge("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.reposition()}}),H_=(()=>{let e=class e{constructor(n){this.elementRef=n}};e.\u0275fac=function(r){return new(r||e)(M(Re))},e.\u0275dir=ze({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0});let i=e;return i})(),fO=(()=>{let e=class e{get offsetX(){return this._offsetX}set offsetX(n){this._offsetX=n,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(n){this._offsetY=n,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(n){this._disposeOnNavigation=n}constructor(n,r,o,s,a){this._overlay=n,this._dir=a,this._backdropSubscription=Ct.EMPTY,this._attachSubscription=Ct.EMPTY,this._detachSubscription=Ct.EMPTY,this._positionSubscription=Ct.EMPTY,this._disposeOnNavigation=!1,this._ngZone=te(Le),this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new Pe,this.positionChange=new Pe,this.attach=new Pe,this.detach=new Pe,this.overlayKeydown=new Pe,this.overlayOutsideClick=new Pe,this._templatePortal=new jr(r,o),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(n){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),n.origin&&this.open&&this._position.apply()),n.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=oce);let n=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=n.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=n.detachments().subscribe(()=>this.detach.emit()),n.keydownEvents().subscribe(r=>{this.overlayKeydown.next(r),r.keyCode===27&&!this.disableClose&&!mi(r)&&(r.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(r=>{let o=this._getOriginElement(),s=Si(r);(!o||o!==s&&!o.contains(s))&&this.overlayOutsideClick.next(r)})}_buildConfig(){let n=this._position=this.positionStrategy||this._createPositionStrategy(),r=new ui({direction:this._dir,positionStrategy:n,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(r.width=this.width),(this.height||this.height===0)&&(r.height=this.height),(this.minWidth||this.minWidth===0)&&(r.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(r.minHeight=this.minHeight),this.backdropClass&&(r.backdropClass=this.backdropClass),this.panelClass&&(r.panelClass=this.panelClass),r}_updatePositionStrategy(n){let r=this.positions.map(o=>({originX:o.originX,originY:o.originY,overlayX:o.overlayX,overlayY:o.overlayY,offsetX:o.offsetX||this.offsetX,offsetY:o.offsetY||this.offsetY,panelClass:o.panelClass||void 0}));return n.setOrigin(this._getOrigin()).withPositions(r).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let n=this._overlay.position().flexibleConnectedTo(this._getOrigin());return this._updatePositionStrategy(n),n}_getOrigin(){return this.origin instanceof H_?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof H_?this.origin.elementRef.nativeElement:this.origin instanceof Re?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(n=>{this.backdropClick.emit(n)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(OS(()=>this.positionChange.observers.length>0)).subscribe(n=>{this._ngZone.run(()=>this.positionChange.emit(n)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(M(Ht),M(Hn),M(Yt),M(YH),M(ai,8))},e.\u0275dir=ze({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",at],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",at],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",at],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",at],push:[2,"cdkConnectedOverlayPush","push",at],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",at]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[an,dn]});let i=e;return i})();function sce(i){return()=>i.scrollStrategies.reposition()}var ace={provide:YH,deps:[Ht],useFactory:sce},Jr=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[Ht,ace],imports:[$l,Ms,oO,oO]});let i=e;return i})();var lce=["*"],iC;function cce(){if(iC===void 0&&(iC=null,typeof window<"u")){let i=window;i.trustedTypes!==void 0&&(iC=i.trustedTypes.createPolicy("angular#components",{createHTML:e=>e}))}return iC}function G_(i){return cce()?.createHTML(i)||i}function XH(i){return Error(`Unable to find icon with the name "${i}"`)}function dce(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}function ZH(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function QH(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var ll=class{constructor(e,t,n){this.url=e,this.svgText=t,this.options=n}},uce=(()=>{let e=class e{constructor(n,r,o,s){this._httpClient=n,this._sanitizer=r,this._errorHandler=s,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=o}addSvgIcon(n,r,o){return this.addSvgIconInNamespace("",n,r,o)}addSvgIconLiteral(n,r,o){return this.addSvgIconLiteralInNamespace("",n,r,o)}addSvgIconInNamespace(n,r,o,s){return this._addSvgIconConfig(n,r,new ll(o,null,s))}addSvgIconResolver(n){return this._resolvers.push(n),this}addSvgIconLiteralInNamespace(n,r,o,s){let a=this._sanitizer.sanitize(Zr.HTML,o);if(!a)throw QH(o);let l=G_(a);return this._addSvgIconConfig(n,r,new ll("",l,s))}addSvgIconSet(n,r){return this.addSvgIconSetInNamespace("",n,r)}addSvgIconSetLiteral(n,r){return this.addSvgIconSetLiteralInNamespace("",n,r)}addSvgIconSetInNamespace(n,r,o){return this._addSvgIconSetConfig(n,new ll(r,null,o))}addSvgIconSetLiteralInNamespace(n,r,o){let s=this._sanitizer.sanitize(Zr.HTML,r);if(!s)throw QH(r);let a=G_(s);return this._addSvgIconSetConfig(n,new ll("",a,o))}registerFontClassAlias(n,r=n){return this._fontCssClassesByAlias.set(n,r),this}classNameForFontAlias(n){return this._fontCssClassesByAlias.get(n)||n}setDefaultFontSetClass(...n){return this._defaultFontSetClass=n,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(n){let r=this._sanitizer.sanitize(Zr.RESOURCE_URL,n);if(!r)throw ZH(n);let o=this._cachedIconsByUrl.get(r);return o?Ke(rC(o)):this._loadSvgIconFromConfig(new ll(n,null)).pipe(Sn(s=>this._cachedIconsByUrl.set(r,s)),Je(s=>rC(s)))}getNamedSvgIcon(n,r=""){let o=KH(r,n),s=this._svgIconConfigs.get(o);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(r,n),s)return this._svgIconConfigs.set(o,s),this._getSvgFromConfig(s);let a=this._iconSetConfigs.get(r);return a?this._getSvgFromIconSetConfigs(n,a):ml(XH(o))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(n){return n.svgText?Ke(rC(this._svgElementFromConfig(n))):this._loadSvgIconFromConfig(n).pipe(Je(r=>rC(r)))}_getSvgFromIconSetConfigs(n,r){let o=this._extractIconWithNameFromAnySet(n,r);if(o)return Ke(o);let s=r.filter(a=>!a.svgText).map(a=>this._loadSvgIconSetFromConfig(a).pipe(Ds(l=>{let d=`Loading icon set URL: ${this._sanitizer.sanitize(Zr.RESOURCE_URL,a.url)} failed: ${l.message}`;return this._errorHandler.handleError(new Error(d)),Ke(null)})));return Mf(s).pipe(Je(()=>{let a=this._extractIconWithNameFromAnySet(n,r);if(!a)throw XH(n);return a}))}_extractIconWithNameFromAnySet(n,r){for(let o=r.length-1;o>=0;o--){let s=r[o];if(s.svgText&&s.svgText.toString().indexOf(n)>-1){let a=this._svgElementFromConfig(s),l=this._extractSvgIconFromSet(a,n,s.options);if(l)return l}}return null}_loadSvgIconFromConfig(n){return this._fetchIcon(n).pipe(Sn(r=>n.svgText=r),Je(()=>this._svgElementFromConfig(n)))}_loadSvgIconSetFromConfig(n){return n.svgText?Ke(null):this._fetchIcon(n).pipe(Sn(r=>n.svgText=r))}_extractSvgIconFromSet(n,r,o){let s=n.querySelector(`[id="${r}"]`);if(!s)return null;let a=s.cloneNode(!0);if(a.removeAttribute("id"),a.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(a,o);if(a.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(a),o);let l=this._svgElementFromString(G_(""));return l.appendChild(a),this._setSvgAttributes(l,o)}_svgElementFromString(n){let r=this._document.createElement("DIV");r.innerHTML=n;let o=r.querySelector("svg");if(!o)throw Error(" tag not found");return o}_toSvgElement(n){let r=this._svgElementFromString(G_("")),o=n.attributes;for(let s=0;sG_(d)),bl(()=>this._inProgressUrlFetches.delete(a)),Tf());return this._inProgressUrlFetches.set(a,c),c}_addSvgIconConfig(n,r,o){return this._svgIconConfigs.set(KH(n,r),o),this}_addSvgIconSetConfig(n,r){let o=this._iconSetConfigs.get(n);return o?o.push(r):this._iconSetConfigs.set(n,[r]),this}_svgElementFromConfig(n){if(!n.svgElement){let r=this._svgElementFromString(n.svgText);this._setSvgAttributes(r,n.options),n.svgElement=r}return n.svgElement}_getIconConfigFromResolvers(n,r){for(let o=0;oe?e.pathname+e.search:""}}var JH=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],gce=JH.map(i=>`[${i}]`).join(", "),_ce=/^url\(['"]?#(.*?)['"]?\)$/,gt=(()=>{let e=class e{get color(){return this._color||this._defaultColor}set color(n){this._color=n}get svgIcon(){return this._svgIcon}set svgIcon(n){n!==this._svgIcon&&(n?this._updateSvgIcon(n):this._svgIcon&&this._clearSvgElement(),this._svgIcon=n)}get fontSet(){return this._fontSet}set fontSet(n){let r=this._cleanupFontValue(n);r!==this._fontSet&&(this._fontSet=r,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(n){let r=this._cleanupFontValue(n);r!==this._fontIcon&&(this._fontIcon=r,this._updateFontIconClasses())}constructor(n,r,o,s,a,l){this._elementRef=n,this._iconRegistry=r,this._location=s,this._errorHandler=a,this.inline=!1,this._previousFontSetClass=[],this._currentIconFetch=Ct.EMPTY,l&&(l.color&&(this.color=this._defaultColor=l.color),l.fontSet&&(this.fontSet=l.fontSet)),o||n.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(n){if(!n)return["",""];let r=n.split(":");switch(r.length){case 1:return["",r[0]];case 2:return r;default:throw Error(`Invalid icon name: "${n}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let n=this._elementsWithExternalReferences;if(n&&n.size){let r=this._location.getPathname();r!==this._previousPath&&(this._previousPath=r,this._prependPathToReferences(r))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(n){this._clearSvgElement();let r=this._location.getPathname();this._previousPath=r,this._cacheChildrenWithExternalReferences(n),this._prependPathToReferences(r),this._elementRef.nativeElement.appendChild(n)}_clearSvgElement(){let n=this._elementRef.nativeElement,r=n.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();r--;){let o=n.childNodes[r];(o.nodeType!==1||o.nodeName.toLowerCase()==="svg")&&o.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let n=this._elementRef.nativeElement,r=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(o=>o.length>0);this._previousFontSetClass.forEach(o=>n.classList.remove(o)),r.forEach(o=>n.classList.add(o)),this._previousFontSetClass=r,this.fontIcon!==this._previousFontIconClass&&!r.includes("mat-ligature-font")&&(this._previousFontIconClass&&n.classList.remove(this._previousFontIconClass),this.fontIcon&&n.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(n){return typeof n=="string"?n.trim().split(" ")[0]:n}_prependPathToReferences(n){let r=this._elementsWithExternalReferences;r&&r.forEach((o,s)=>{o.forEach(a=>{s.setAttribute(a.name,`url('${n}#${a.value}')`)})})}_cacheChildrenWithExternalReferences(n){let r=n.querySelectorAll(gce),o=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{let l=r[s],c=l.getAttribute(a),d=c?c.match(_ce):null;if(d){let u=o.get(l);u||(u=[],o.set(l,u)),u.push({name:a,value:d[1]})}})}_updateSvgIcon(n){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),n){let[r,o]=this._splitIconName(n);r&&(this._svgNamespace=r),o&&(this._svgName=o),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(o,r).pipe(_n(1)).subscribe(s=>this._setSvgElement(s),s=>{let a=`Error retrieving icon ${r}:${o}! ${s.message}`;this._errorHandler.handleError(new Error(a))})}}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(uce),ro("aria-hidden"),M(fce),M(Rr),M(pce,8))},e.\u0275cmp=le({type:e,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(r,o){r&2&&(Ze("data-mat-icon-type",o._usingFontIcon()?"font":"svg")("data-mat-icon-name",o._svgName||o.fontIcon)("data-mat-icon-namespace",o._svgNamespace||o.fontSet)("fontIcon",o._usingFontIcon()?o.fontIcon:null),Nr(o.color?"mat-"+o.color:""),se("mat-icon-inline",o.inline)("mat-icon-no-color",o.color!=="primary"&&o.color!=="accent"&&o.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",at],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],standalone:!0,features:[an,ce],ngContentSelectors:lce,decls:1,vars:0,template:function(r,o){r&1&&(kn(),$t(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0});let i=e;return i})(),it=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[qt,qt]});let i=e;return i})();var vce=["mat-menu-item",""],bce=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],yce=["mat-icon, [matMenuItemIcon]","*"];function xce(i,e){i&1&&(io(),v(0,"svg",2),J(1,"polygon",3),y())}var wce=["*"];function Cce(i,e){if(i&1){let t=ie();v(0,"div",0),H("keydown",function(r){V(t);let o=I();return z(o._handleKeydown(r))})("click",function(){V(t);let r=I();return z(r.closed.emit("click"))})("@transformMenu.start",function(r){V(t);let o=I();return z(o._onAnimationStart(r))})("@transformMenu.done",function(r){V(t);let o=I();return z(o._onAnimationDone(r))}),v(1,"div",1),$t(2),y()()}if(i&2){let t=I();Nr(t._classList),N("id",t.panelId)("@transformMenu",t._panelAnimationState),Ze("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}var mO=new ge("MAT_MENU_PANEL"),j_=(()=>{let e=class e{constructor(n,r,o,s,a){this._elementRef=n,this._document=r,this._focusMonitor=o,this._parentMenu=s,this._changeDetectorRef=a,this.role="menuitem",this.disabled=!1,this.disableRipple=!1,this._hovered=new me,this._focused=new me,this._highlighted=!1,this._triggersSubmenu=!1,s?.addItem?.(this)}focus(n,r){this._focusMonitor&&n?this._focusMonitor.focusVia(this._getHostElement(),n,r):this._getHostElement().focus(r),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let n=this._elementRef.nativeElement.cloneNode(!0),r=n.querySelectorAll("mat-icon, .material-icons");for(let o=0;o enter",Pn("120ms cubic-bezier(0, 0, 0.2, 1)",Qt({opacity:1,transform:"scale(1)"}))),On("* => void",Pn("100ms 25ms linear",Qt({opacity:0})))]),fadeInItems:si("fadeInItems",[fi("showing",Qt({opacity:1})),On("void => *",[Qt({opacity:0}),Pn("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},pHe=oC.fadeInItems,fHe=oC.transformMenu,Mce=0,Ece=new ge("mat-menu-default-options",{providedIn:"root",factory:Ice});function Ice(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}var Jo=(()=>{let e=class e{get xPosition(){return this._xPosition}set xPosition(n){this._xPosition=n,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(n){this._yPosition=n,this.setPositionClasses()}set panelClass(n){let r=this._previousPanelClass,o=Z({},this._classList);r&&r.length&&r.split(" ").forEach(s=>{o[s]=!1}),this._previousPanelClass=n,n&&n.length&&(n.split(" ").forEach(s=>{o[s]=!0}),this._elementRef.nativeElement.className=""),this._classList=o}get classList(){return this.panelClass}set classList(n){this.panelClass=n}constructor(n,r,o,s){this._elementRef=n,this._changeDetectorRef=s,this._elevationPrefix="mat-elevation-z",this._baseElevation=null,this._directDescendantItems=new Yi,this._classList={},this._panelAnimationState="void",this._animationDone=new me,this.closed=new Pe,this.close=this.closed,this.panelId=`mat-menu-panel-${Mce++}`,this._injector=te(yt),this.overlayPanelClass=o.overlayPanelClass||"",this._xPosition=o.xPosition,this._yPosition=o.yPosition,this.backdropClass=o.backdropClass,this.overlapTrigger=o.overlapTrigger,this.hasBackdrop=o.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new xy(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(pi(this._directDescendantItems),Xn(n=>Yn(...n.map(r=>r._focused)))).subscribe(n=>this._keyManager.updateActiveItem(n)),this._directDescendantItems.changes.subscribe(n=>{let r=this._keyManager;if(this._panelAnimationState==="enter"&&r.activeItem?._hasFocus()){let o=n.toArray(),s=Math.max(0,Math.min(o.length-1,r.activeItemIndex||0));o[s]&&!o[s].disabled?r.setActiveItem(s):r.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy()}_hovered(){return this._directDescendantItems.changes.pipe(pi(this._directDescendantItems),Xn(r=>Yn(...r.map(o=>o._hovered))))}addItem(n){}removeItem(n){}_handleKeydown(n){let r=n.keyCode,o=this._keyManager;switch(r){case 27:mi(n)||(n.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(r===38||r===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(n);return}n.stopPropagation()}focusFirstItem(n="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=fr(()=>{let r=null;if(this._directDescendantItems.length&&(r=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!r||!r.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(n).setFirstItemActive(),!o.activeItem&&r&&r.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(n){if(this._baseElevation===null){let l=(typeof getComputedStyle=="function"?getComputedStyle(this._elementRef.nativeElement):null)?.getPropertyValue("--mat-menu-base-elevation-level")||"8";this._baseElevation=parseInt(l)}let r=Math.min(this._baseElevation+n,24),o=`${this._elevationPrefix}${r}`,s=Object.keys(this._classList).find(a=>a.startsWith(this._elevationPrefix));if(!s||s===this._previousElevation){let a=Z({},this._classList);this._previousElevation&&(a[this._previousElevation]=!1),a[o]=!0,this._previousElevation=o,this._classList=a}}setPositionClasses(n=this.xPosition,r=this.yPosition){this._classList=wt(Z({},this._classList),{"mat-menu-before":n==="before","mat-menu-after":n==="after","mat-menu-above":r==="above","mat-menu-below":r==="below"}),this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(n){this._animationDone.next(n),this._isAnimating=!1}_onAnimationStart(n){this._isAnimating=!0,n.toState==="enter"&&this._keyManager.activeItemIndex===0&&(n.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(pi(this._allItems)).subscribe(n=>{this._directDescendantItems.reset(n.filter(r=>r._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Le),M(Ece),M(Fe))},e.\u0275cmp=le({type:e,selectors:[["mat-menu"]],contentQueries:function(r,o,s){if(r&1&&(xi(s,Sce,5),xi(s,j_,5),xi(s,j_,4)),r&2){let a;be(a=ye())&&(o.lazyContent=a.first),be(a=ye())&&(o._allItems=a),be(a=ye())&&(o.items=a)}},viewQuery:function(r,o){if(r&1&&Ie(Hn,5),r&2){let s;be(s=ye())&&(o.templateRef=s.first)}},hostVars:3,hostBindings:function(r,o){r&2&&Ze("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",at],hasBackdrop:[2,"hasBackdrop","hasBackdrop",n=>n==null?null:at(n)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],standalone:!0,features:[Bt([{provide:mO,useExisting:e}]),an,ce],ngContentSelectors:wce,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mat-mdc-elevation-specific",3,"keydown","click","id"],[1,"mat-mdc-menu-content"]],template:function(r,o){r&1&&(kn(),W(0,Cce,3,7,"ng-template"))},styles:['mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font);line-height:var(--mat-menu-item-label-text-line-height);font-size:var(--mat-menu-item-label-text-size);letter-spacing:var(--mat-menu-item-label-text-tracking);font-weight:var(--mat-menu-item-label-text-weight)}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape);background-color:var(--mat-menu-container-color);will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.mat-mdc-menu-panel.ng-animating:has(.mat-mdc-menu-content:empty){display:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color);margin-bottom:var(--mat-menu-divider-bottom-spacing);margin-top:var(--mat-menu-divider-top-spacing)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mat-menu-item-leading-spacing);padding-right:var(--mat-menu-item-trailing-spacing);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}[dir=rtl] .mat-mdc-menu-item{padding-right:var(--mat-menu-item-leading-spacing);padding-left:var(--mat-menu-item-trailing-spacing)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing);padding-right:var(--mat-menu-item-with-icon-trailing-spacing)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-right:var(--mat-menu-item-with-icon-leading-spacing);padding-left:var(--mat-menu-item-with-icon-trailing-spacing)}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color)}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color)}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing);height:var(--mat-menu-item-icon-size);width:var(--mat-menu-item-icon-size)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color)}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color)}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1)}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[oC.transformMenu,oC.fadeInItems]},changeDetection:0});let i=e;return i})(),tG=new ge("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.reposition()}});function Tce(i){return()=>i.scrollStrategies.reposition()}var Dce={provide:tG,deps:[Ht],useFactory:Tce},eG=Fr({passive:!0});var vc=(()=>{let e=class e{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(n){this.menu=n}get menu(){return this._menu}set menu(n){n!==this._menu&&(this._menu=n,this._menuCloseSubscription.unsubscribe(),n&&(this._parentMaterialMenu,this._menuCloseSubscription=n.close.subscribe(r=>{this._destroyMenu(r),(r==="click"||r==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(r)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(n,r,o,s,a,l,c,d,u){this._overlay=n,this._element=r,this._viewContainerRef=o,this._menuItemInstance=l,this._dir=c,this._focusMonitor=d,this._ngZone=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Ct.EMPTY,this._hoverSubscription=Ct.EMPTY,this._menuCloseSubscription=Ct.EMPTY,this._changeDetectorRef=te(Fe),this._handleTouchStart=h=>{yd(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new Pe,this.onMenuOpen=this.menuOpened,this.menuClosed=new Pe,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=a instanceof Jo?a:void 0,r.nativeElement.addEventListener("touchstart",this._handleTouchStart,eG)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,eG),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){let n=this.menu;if(this._menuOpen||!n)return;let r=this._createOverlay(n),o=r.getConfig(),s=o.positionStrategy;this._setPosition(n,s),o.hasBackdrop=n.hasBackdrop==null?!this.triggersSubmenu():n.hasBackdrop,r.attach(this._getPortal(n)),n.lazyContent&&n.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(n),n instanceof Jo&&(n._startAnimation(),n._directDescendantItems.changes.pipe(Xe(n.close)).subscribe(()=>{s.withLockedPosition(!1).reapplyLastPosition(),s.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(n,r){this._focusMonitor&&n?this._focusMonitor.focusVia(this._element,n,r):this._element.nativeElement.focus(r)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(n){if(!this._overlayRef||!this.menuOpen)return;let r=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&(n==="keydown"||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,r instanceof Jo?(r._resetAnimation(),r.lazyContent?r._animationDone.pipe(Gt(o=>o.toState==="void"),_n(1),Xe(r.lazyContent._attached)).subscribe({next:()=>r.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),r?.lazyContent?.detach())}_initMenu(n){n.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,n.direction=this.dir,this._setMenuElevation(n),n.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(n){if(n.setElevation){let r=0,o=n.parentMenu;for(;o;)r++,o=o.parentMenu;n.setElevation(r)}}_setIsMenuOpen(n){n!==this._menuOpen&&(this._menuOpen=n,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(n),this._changeDetectorRef.markForCheck())}_createOverlay(n){if(!this._overlayRef){let r=this._getOverlayConfig(n);this._subscribeToPositions(n,r.positionStrategy),this._overlayRef=this._overlay.create(r),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(n){return new ui({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:n.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:n.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(n,r){n.setPositionClasses&&r.positionChanges.subscribe(o=>{let s=o.connectionPair.overlayX==="start"?"after":"before",a=o.connectionPair.overlayY==="top"?"below":"above";this._ngZone?this._ngZone.run(()=>n.setPositionClasses(s,a)):n.setPositionClasses(s,a)})}_setPosition(n,r){let[o,s]=n.xPosition==="before"?["end","start"]:["start","end"],[a,l]=n.yPosition==="above"?["bottom","top"]:["top","bottom"],[c,d]=[a,l],[u,h]=[o,s],p=0;if(this.triggersSubmenu()){if(h=o=n.xPosition==="before"?"start":"end",s=u=o==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let f=this._parentMaterialMenu.items.first;this._parentInnerPadding=f?f._getHostElement().offsetTop:0}p=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else n.overlapTrigger||(c=a==="top"?"bottom":"top",d=l==="top"?"bottom":"top");r.withPositions([{originX:o,originY:c,overlayX:u,overlayY:a,offsetY:p},{originX:s,originY:c,overlayX:h,overlayY:a,offsetY:p},{originX:o,originY:d,overlayX:u,overlayY:l,offsetY:-p},{originX:s,originY:d,overlayX:h,overlayY:l,offsetY:-p}])}_menuClosingActions(){let n=this._overlayRef.backdropClick(),r=this._overlayRef.detachments(),o=this._parentMaterialMenu?this._parentMaterialMenu.closed:Ke(),s=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Gt(a=>a!==this._menuItemInstance),Gt(()=>this._menuOpen)):Ke();return Yn(n,o,s,r)}_handleMousedown(n){bd(n)||(this._openedBy=n.button===0?"mouse":void 0,this.triggersSubmenu()&&n.preventDefault())}_handleKeydown(n){let r=n.keyCode;(r===13||r===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(r===39&&this.dir==="ltr"||r===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(n){this.triggersSubmenu()?(n.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(Gt(n=>n===this._menuItemInstance&&!n.disabled),ku(0,Cf)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof Jo&&this.menu._isAnimating?this.menu._animationDone.pipe(_n(1),ku(0,Cf),Xe(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(n){return(!this._portal||this._portal.templateRef!==n.templateRef)&&(this._portal=new jr(n.templateRef,this._viewContainerRef)),this._portal}};e.\u0275fac=function(r){return new(r||e)(M(Ht),M(Re),M(Yt),M(tG),M(mO,8),M(j_,10),M(ai,8),M(po),M(Le))},e.\u0275dir=ze({type:e,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(r,o){r&1&&H("click",function(a){return o._handleClick(a)})("mousedown",function(a){return o._handleMousedown(a)})("keydown",function(a){return o._handleKeydown(a)}),r&2&&Ze("aria-haspopup",o.menu?"menu":null)("aria-expanded",o.menuOpen)("aria-controls",o.menuOpen?o.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],standalone:!0});let i=e;return i})(),sa=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[Dce],imports:[Ae,Hm,qt,Jr,Zo,qt]});let i=e;return i})();var Pce=["tooltip"],rG=20;var oG=new ge("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.reposition({scrollThrottle:rG})}});function Oce(i){return()=>i.scrollStrategies.reposition({scrollThrottle:rG})}var Rce={provide:oG,deps:[Ht],useFactory:Oce};function Ace(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var Nce=new ge("mat-tooltip-default-options",{providedIn:"root",factory:Ace});var nG="tooltip-panel",iG=Fr({passive:!0}),kce=8,Lce=8,Fce=24,Bce=200,Wn=(()=>{let e=class e{get position(){return this._position}set position(n){n!==this._position&&(this._position=n,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(n){this._positionAtOrigin=Ih(n),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(n){this._disabled=Ih(n),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(n){this._showDelay=$s(n)}get hideDelay(){return this._hideDelay}set hideDelay(n){this._hideDelay=$s(n),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(n){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=n!=null?String(n).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(n){this._tooltipClass=n,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(n,r,o,s,a,l,c,d,u,h,p,f){this._overlay=n,this._elementRef=r,this._scrollDispatcher=o,this._viewContainerRef=s,this._ngZone=a,this._platform=l,this._ariaDescriber=c,this._focusMonitor=d,this._dir=h,this._defaultOptions=p,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._tooltipComponent=Vce,this._viewportMargin=8,this._cssClassPrefix="mat-mdc",this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new me,this._injector=te(yt),this._scrollStrategy=u,this._document=f,p&&(this._showDelay=p.showDelay,this._hideDelay=p.hideDelay,p.position&&(this.position=p.position),p.positionAtOrigin&&(this.positionAtOrigin=p.positionAtOrigin),p.touchGestures&&(this.touchGestures=p.touchGestures)),h.change.pipe(Xe(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)}),this._viewportMargin=kce}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Xe(this._destroyed)).subscribe(n=>{n?n==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let n=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([r,o])=>{n.removeEventListener(r,o,iG)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(n,this.message,"tooltip"),this._focusMonitor.stopMonitoring(n)}show(n=this.showDelay,r){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let o=this._createOverlay(r);this._detach(),this._portal=this._portal||new Di(this._tooltipComponent,this._viewContainerRef);let s=this._tooltipInstance=o.attach(this._portal).instance;s._triggerElement=this._elementRef.nativeElement,s._mouseLeaveHideDelay=this._hideDelay,s.afterHidden().pipe(Xe(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),s.show(n)}hide(n=this.hideDelay){let r=this._tooltipInstance;r&&(r.isVisible()?r.hide(n):(r._cancelPendingAnimations(),this._detach()))}toggle(n){this._isTooltipVisible()?this.hide():this.show(void 0,n)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(n){if(this._overlayRef){let s=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!n)&&s._origin instanceof Re)return this._overlayRef;this._detach()}let r=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),o=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin?n||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(r);return o.positionChanges.pipe(Xe(this._destroyed)).subscribe(s=>{this._updateCurrentPositionClass(s.connectionPair),this._tooltipInstance&&s.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:o,panelClass:`${this._cssClassPrefix}-${nG}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Xe(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Xe(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Xe(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&s.keyCode===27&&!mi(s)&&(s.preventDefault(),s.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(n){let r=n.getConfig().positionStrategy,o=this._getOrigin(),s=this._getOverlayPosition();r.withPositions([this._addOffset(Z(Z({},o.main),s.main)),this._addOffset(Z(Z({},o.fallback),s.fallback))])}_addOffset(n){let r=Lce,o=!this._dir||this._dir.value=="ltr";return n.originY==="top"?n.offsetY=-r:n.originY==="bottom"?n.offsetY=r:n.originX==="start"?n.offsetX=o?-r:r:n.originX==="end"&&(n.offsetX=o?r:-r),n}_getOrigin(){let n=!this._dir||this._dir.value=="ltr",r=this.position,o;r=="above"||r=="below"?o={originX:"center",originY:r=="above"?"top":"bottom"}:r=="before"||r=="left"&&n||r=="right"&&!n?o={originX:"start",originY:"center"}:(r=="after"||r=="right"&&n||r=="left"&&!n)&&(o={originX:"end",originY:"center"});let{x:s,y:a}=this._invertPosition(o.originX,o.originY);return{main:o,fallback:{originX:s,originY:a}}}_getOverlayPosition(){let n=!this._dir||this._dir.value=="ltr",r=this.position,o;r=="above"?o={overlayX:"center",overlayY:"bottom"}:r=="below"?o={overlayX:"center",overlayY:"top"}:r=="before"||r=="left"&&n||r=="right"&&!n?o={overlayX:"end",overlayY:"center"}:(r=="after"||r=="right"&&n||r=="left"&&!n)&&(o={overlayX:"start",overlayY:"center"});let{x:s,y:a}=this._invertPosition(o.overlayX,o.overlayY);return{main:o,fallback:{overlayX:s,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),fr(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(n){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=n,this._tooltipInstance._markForCheck())}_invertPosition(n,r){return this.position==="above"||this.position==="below"?r==="top"?r="bottom":r==="bottom"&&(r="top"):n==="end"?n="start":n==="start"&&(n="end"),{x:n,y:r}}_updateCurrentPositionClass(n){let{overlayY:r,originX:o,originY:s}=n,a;if(r==="center"?this._dir&&this._dir.value==="rtl"?a=o==="end"?"left":"right":a=o==="start"?"left":"right":a=r==="bottom"&&s==="top"?"above":"below",a!==this._currentPosition){let l=this._overlayRef;if(l){let c=`${this._cssClassPrefix}-${nG}-`;l.removePanelClass(c+this._currentPosition),l.addPanelClass(c+a)}this._currentPosition=a}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",n=>{this._setupPointerExitEventsIfNeeded();let r;n.x!==void 0&&n.y!==void 0&&(r=n),this.show(void 0,r)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",n=>{let r=n.targetTouches?.[0],o=r?{x:r.clientX,y:r.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout);let s=500;this._touchstartTimeout=setTimeout(()=>this.show(void 0,o),this._defaultOptions.touchLongPressShowDelay??s)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let n=[];if(this._platformSupportsMouseEvents())n.push(["mouseleave",r=>{let o=r.relatedTarget;(!o||!this._overlayRef?.overlayElement.contains(o))&&this.hide()}],["wheel",r=>this._wheelListener(r)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let r=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};n.push(["touchend",r],["touchcancel",r])}this._addListeners(n),this._passiveListeners.push(...n)}_addListeners(n){n.forEach(([r,o])=>{this._elementRef.nativeElement.addEventListener(r,o,iG)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(n){if(this._isTooltipVisible()){let r=this._document.elementFromPoint(n.clientX,n.clientY),o=this._elementRef.nativeElement;r!==o&&!o.contains(r)&&this.hide()}}_disableNativeGesturesIfNecessary(){let n=this.touchGestures;if(n!=="off"){let r=this._elementRef.nativeElement,o=r.style;(n==="on"||r.nodeName!=="INPUT"&&r.nodeName!=="TEXTAREA")&&(o.userSelect=o.msUserSelect=o.webkitUserSelect=o.MozUserSelect="none"),(n==="on"||!r.draggable)&&(o.webkitUserDrag="none"),o.touchAction="none",o.webkitTapHighlightColor="transparent"}}};e.\u0275fac=function(r){return new(r||e)(M(Ht),M(Re),M(mu),M(Yt),M(Le),M(gn),M(I3),M(po),M(oG),M(ai),M(Nce,8),M(Ye))},e.\u0275dir=ze({type:e,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(r,o){r&2&&se("mat-mdc-tooltip-disabled",o.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"],standalone:!0});let i=e;return i})(),Vce=(()=>{let e=class e{constructor(n,r,o){this._changeDetectorRef=n,this._elementRef=r,this._isMultiline=!1,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new me,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide",this._animationsDisabled=o==="NoopAnimations"}show(n){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},n)}hide(n){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},n)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:n}){(!n||!this._triggerElement.contains(n))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let n=this._elementRef.nativeElement.getBoundingClientRect();return n.height>Fce&&n.width>=Bce}_handleAnimationEnd({animationName:n}){(n===this._showAnimation||n===this._hideAnimation)&&this._finalizeAnimation(n===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(n){n?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(n){let r=this._tooltip.nativeElement,o=this._showAnimation,s=this._hideAnimation;if(r.classList.remove(n?s:o),r.classList.add(n?o:s),this._isVisible!==n&&(this._isVisible=n,this._changeDetectorRef.markForCheck()),n&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(r);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}n&&this._onShow(),this._animationsDisabled&&(r.classList.add("_mat-animation-noopable"),this._finalizeAnimation(n))}};e.\u0275fac=function(r){return new(r||e)(M(Fe),M(Re),M(Zn,8))},e.\u0275cmp=le({type:e,selectors:[["mat-tooltip-component"]],viewQuery:function(r,o){if(r&1&&Ie(Pce,7),r&2){let s;be(s=ye())&&(o._tooltip=s.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(r,o){r&1&&H("mouseleave",function(a){return o._handleMouseLeave(a)}),r&2&&tn("zoom",o.isVisible()?1:null)},standalone:!0,features:[ce],decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(r,o){if(r&1){let s=ie();v(0,"div",1,0),H("animationend",function(l){return V(s),z(o._handleAnimationEnd(l))}),v(2,"div",2),S(3),y()()}r&2&&(se("mdc-tooltip--multiline",o._isMultiline),N("ngClass",o.tooltipClass),w(3),nt(o.message))},dependencies:[ib],styles:['.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mdc-plain-tooltip-container-color);color:var(--mdc-plain-tooltip-supporting-text-color);border-radius:var(--mdc-plain-tooltip-container-shape);font-family:var(--mdc-plain-tooltip-supporting-text-font);font-size:var(--mdc-plain-tooltip-supporting-text-size);font-weight:var(--mdc-plain-tooltip-supporting-text-weight);line-height:var(--mdc-plain-tooltip-supporting-text-line-height);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking)}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0});let i=e;return i})();var Jt=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[Rce],imports:[My,Ae,Jr,qt,qt,Zo]});let i=e;return i})();var aa={};aS(aa,{setHref:()=>Gce});var zce=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i;function Uce(i){let e=!zce.test(i);return e}function Hce(i){if(!Uce(i))return i}function es(i){return Hce(i)}function Gce(i,e){let t=es(e);t!==void 0&&(i.href=t)}var YHe=typeof window<"u"?window.TrustedScriptURL:void 0;var oGe=typeof window<"u"?window.TrustedHTML:void 0;var CGe=typeof window<"u"?window.TrustedScript:void 0;var cC={};aS(cC,{assign:()=>hde,replace:()=>ude,setHref:()=>dde});function dde(i,e){let t=es(e);t!==void 0&&(i.href=t)}function ude(i,e){let t=es(e);t!==void 0&&i.replace(t)}function hde(i,e){let t=es(e);t!==void 0&&i.assign(t)}function _de(i,e){if(i&1&&J(0,"div",1),i&2){let t=I();tn("top",t.top,"px")("left",t.left,"px")("width",t.width,"px")("height",t.height,"px")("border-color",t.borderColor)("background-color",t.bgColor)}}var lG=(()=>{class i{changeDetectorRef;borderColor;bgColor;startX=-1;startY=-1;endX=-1;endY=-1;isMac=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);constructor(t){this.changeDetectorRef=t}start(t,n){t.preventDefault(),t.stopPropagation(),this.startX=t.offsetX,this.startY=t.offsetY,this.endX=this.startX,this.endY=this.startY;let r=yn(document,"mousemove"),o=yn(window,"mouseup"),s=0,a=0;qr([r]).pipe(Xe(o)).subscribe({next:([l])=>{s=l.offsetX-this.startX,a=l.offsetY-this.startY,this.endX=this.startX+s,this.endY=this.startY+a,this.changeDetectorRef.detectChanges()},complete:()=>{let l=Math.abs(s)<5&&Math.abs(a)<5;n(l,this.startX,this.startY,this.endX,this.endY),this.startX=-1,this.startY=-1,this.endX=-1,this.endY=-1,this.changeDetectorRef.detectChanges()}})}get top(){return Math.min(this.startY,this.endY)}get left(){return Math.min(this.startX,this.endX)}get width(){return Math.abs(this.endX-this.startX)}get height(){return Math.abs(this.endY-this.startY)}static \u0275fac=function(n){return new(n||i)(M(Fe))};static \u0275cmp=le({type:i,selectors:[["drag-area"]],inputs:{borderColor:"borderColor",bgColor:"bgColor"},standalone:!0,features:[ce],decls:1,vars:1,consts:[[1,"container",3,"top","left","width","height","border-color","background-color"],[1,"container"]],template:function(n,r){n&1&&W(0,_de,1,12,"div",0),n&2&&ae(r.startX>0?0:-1)},dependencies:[Ae],styles:[`.container[_ngcontent-%COMP%]{position:absolute;z-index:5000;box-sizing:border-box;border-width:1px;border-style:solid;pointer-events:none} @@ -3176,7 +3176,7 @@ void main() { -`],changeDetection:0})}return i})();var vO=class{constructor(){this.expansionModel=new ef(!0)}toggle(e){this.expansionModel.toggle(this._trackByValue(e))}expand(e){this.expansionModel.select(this._trackByValue(e))}collapse(e){this.expansionModel.deselect(this._trackByValue(e))}isExpanded(e){return this.expansionModel.isSelected(this._trackByValue(e))}toggleDescendants(e){this.expansionModel.isSelected(this._trackByValue(e))?this.collapseDescendants(e):this.expandDescendants(e)}collapseAll(){this.expansionModel.clear()}expandDescendants(e){let t=[e];t.push(...this.getDescendants(e)),this.expansionModel.select(...t.map(n=>this._trackByValue(n)))}collapseDescendants(e){let t=[e];t.push(...this.getDescendants(e)),this.expansionModel.deselect(...t.map(n=>this._trackByValue(n)))}_trackByValue(e){return this.trackBy?this.trackBy(e):e}},cC=class extends vO{constructor(e,t,n){super(),this.getLevel=e,this.isExpandable=t,this.options=n,this.options&&(this.trackBy=this.options.trackBy)}getDescendants(e){let t=this.dataNodes.indexOf(e),n=[];for(let r=t+1;rthis._trackByValue(e)))}};var yO=new ge("CDK_TREE_NODE_OUTLET_NODE"),dC=(()=>{let e=class e{constructor(n,r){this.viewContainer=n,this._node=r}};e.\u0275fac=function(r){return new(r||e)(M(Yt),M(yO,8))},e.\u0275dir=ze({type:e,selectors:[["","cdkTreeNodeOutlet",""]],standalone:!0});let i=e;return i})(),bO=class{constructor(e){this.$implicit=e}},uC=(()=>{let e=class e{constructor(n){this.template=n}};e.\u0275fac=function(r){return new(r||e)(M(Hn))},e.\u0275dir=ze({type:e,selectors:[["","cdkTreeNodeDef",""]],inputs:{when:[0,"cdkTreeNodeDefWhen","when"]},standalone:!0});let i=e;return i})();var yc=(()=>{let e=class e{get dataSource(){return this._dataSource}set dataSource(n){this._dataSource!==n&&this._switchDataSource(n)}constructor(n,r){this._differs=n,this._changeDetectorRef=r,this._onDestroy=new me,this._levels=new Map,this.viewChange=new Dn({start:0,end:Number.MAX_VALUE})}ngOnInit(){this._dataDiffer=this._differs.find([]).create(this.trackBy),this.treeControl}ngOnDestroy(){this._nodeOutlet.viewContainer.clear(),this.viewChange.complete(),this._onDestroy.next(),this._onDestroy.complete(),this._dataSource&&typeof this._dataSource.disconnect=="function"&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null)}ngAfterContentChecked(){let n=this._nodeDefs.filter(r=>!r.when);n.length>1,this._defaultNodeDef=n[0],this.dataSource&&this._nodeDefs&&!this._dataSubscription&&this._observeRenderChanges()}_switchDataSource(n){this._dataSource&&typeof this._dataSource.disconnect=="function"&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null),n||this._nodeOutlet.viewContainer.clear(),this._dataSource=n,this._nodeDefs&&this._observeRenderChanges()}_observeRenderChanges(){let n;zH(this._dataSource)?n=this._dataSource.connect(this):Ac(this._dataSource)?n=this._dataSource:Array.isArray(this._dataSource)&&(n=Ke(this._dataSource)),n&&(this._dataSubscription=n.pipe(Xe(this._onDestroy)).subscribe(r=>this.renderNodeChanges(r)))}renderNodeChanges(n,r=this._dataDiffer,o=this._nodeOutlet.viewContainer,s){let a=r.diff(n);a&&(a.forEachOperation((l,c,d)=>{if(l.previousIndex==null)this.insertNode(n[d],d,o,s);else if(d==null)o.remove(c),this._levels.delete(l.item);else{let u=o.get(c);o.move(u,d)}}),this._changeDetectorRef.detectChanges())}_getNodeDef(n,r){if(this._nodeDefs.length===1)return this._nodeDefs.first;let o=this._nodeDefs.find(s=>s.when&&s.when(r,n))||this._defaultNodeDef;return o}insertNode(n,r,o,s){let a=this._getNodeDef(n,r),l=new bO(n);this.treeControl.getLevel?l.level=this.treeControl.getLevel(n):typeof s<"u"&&this._levels.has(s)?l.level=this._levels.get(s)+1:l.level=0,this._levels.set(n,l.level),(o||this._nodeOutlet.viewContainer).createEmbeddedView(a.template,l,r),_u.mostRecentTreeNode&&(_u.mostRecentTreeNode.data=n)}};e.\u0275fac=function(r){return new(r||e)(M(Zc),M(Fe))},e.\u0275cmp=le({type:e,selectors:[["cdk-tree"]],contentQueries:function(r,o,s){if(r&1&&xi(s,uC,5),r&2){let a;be(a=ye())&&(o._nodeDefs=a)}},viewQuery:function(r,o){if(r&1&&Ie(dC,7),r&2){let s;be(s=ye())&&(o._nodeOutlet=s.first)}},hostAttrs:["role","tree",1,"cdk-tree"],inputs:{dataSource:"dataSource",treeControl:"treeControl",trackBy:"trackBy"},exportAs:["cdkTree"],standalone:!0,features:[ce],decls:1,vars:0,consts:[["cdkTreeNodeOutlet",""]],template:function(r,o){r&1&&Zi(0,0)},dependencies:[dC],encapsulation:2});let i=e;return i})(),_u=(()=>{let e=class e{get role(){return"treeitem"}set role(n){this._elementRef.nativeElement.setAttribute("role",n)}get data(){return this._data}set data(n){n!==this._data&&(this._data=n,this._setRoleFromData(),this._dataChanges.next())}get isExpanded(){return this._tree.treeControl.isExpanded(this._data)}get level(){return this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._data):this._parentNodeAriaLevel}constructor(n,r){this._elementRef=n,this._tree=r,this._destroyed=new me,this._dataChanges=new me,this._changeDetectorRef=te(Fe),e.mostRecentTreeNode=this,this.role="treeitem"}ngOnInit(){this._parentNodeAriaLevel=vde(this._elementRef.nativeElement),this._elementRef.nativeElement.setAttribute("aria-level",`${this.level+1}`),this._tree.treeControl.expansionModel.changed.pipe(Je(()=>this.isExpanded),vl()).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){e.mostRecentTreeNode===this&&(e.mostRecentTreeNode=null),this._dataChanges.complete(),this._destroyed.next(),this._destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}_setRoleFromData(){!this._tree.treeControl.isExpandable&&this._tree.treeControl.getChildren,this.role="treeitem"}};e.mostRecentTreeNode=null,e.\u0275fac=function(r){return new(r||e)(M(Re),M(yc))},e.\u0275dir=ze({type:e,selectors:[["cdk-tree-node"]],hostAttrs:[1,"cdk-tree-node"],hostVars:1,hostBindings:function(r,o){r&2&&Ze("aria-expanded",o.isExpanded)},inputs:{role:"role"},exportAs:["cdkTreeNode"],standalone:!0});let i=e;return i})();function vde(i){let e=i.parentElement;for(;e&&!bde(e);)e=e.parentElement;return e?e.classList.contains("cdk-nested-tree-node")?wi(e.getAttribute("aria-level")):0:-1}function bde(i){let e=i.classList;return!!(e?.contains("cdk-nested-tree-node")||e?.contains("cdk-tree"))}var yde=/([A-Za-z%]+)$/,xO=(()=>{let e=class e{get level(){return this._level}set level(n){this._setLevelInput(n)}get indent(){return this._indent}set indent(n){this._setIndentInput(n)}constructor(n,r,o,s){this._treeNode=n,this._tree=r,this._element=o,this._dir=s,this._destroyed=new me,this.indentUnits="px",this._indent=40,this._setPadding(),s&&s.change.pipe(Xe(this._destroyed)).subscribe(()=>this._setPadding(!0)),n._dataChanges.subscribe(()=>this._setPadding())}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_paddingIndent(){let n=this._treeNode.data&&this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._treeNode.data):null,r=this._level==null?n:this._level;return typeof r=="number"?`${r*this._indent}${this.indentUnits}`:null}_setPadding(n=!1){let r=this._paddingIndent();if(r!==this._currentPadding||n){let o=this._element.nativeElement,s=this._dir&&this._dir.value==="rtl"?"paddingRight":"paddingLeft",a=s==="paddingLeft"?"paddingRight":"paddingLeft";o.style[s]=r||"",o.style[a]="",this._currentPadding=r}}_setLevelInput(n){this._level=isNaN(n)?null:n,this._setPadding()}_setIndentInput(n){let r=n,o="px";if(typeof n=="string"){let s=n.split(yde);r=s[0],o=s[1]||o}this.indentUnits=o,this._indent=wi(r),this._setPadding()}};e.\u0275fac=function(r){return new(r||e)(M(_u),M(yc),M(Re),M(ai,8))},e.\u0275dir=ze({type:e,selectors:[["","cdkTreeNodePadding",""]],inputs:{level:[2,"cdkTreeNodePadding","level",wi],indent:[0,"cdkTreeNodePaddingIndent","indent"]},standalone:!0,features:[an]});let i=e;return i})(),wO=(()=>{let e=class e{constructor(n,r){this._tree=n,this._treeNode=r,this.recursive=!1}_toggle(n){this.recursive?this._tree.treeControl.toggleDescendants(this._treeNode.data):this._tree.treeControl.toggle(this._treeNode.data),n.stopPropagation()}};e.\u0275fac=function(r){return new(r||e)(M(yc),M(_u))},e.\u0275dir=ze({type:e,selectors:[["","cdkTreeNodeToggle",""]],hostBindings:function(r,o){r&1&&H("click",function(a){return o._toggle(a)})},inputs:{recursive:[2,"cdkTreeNodeToggleRecursive","recursive",at]},standalone:!0,features:[an]});let i=e;return i})();var dG=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})();var hG=(()=>{let e=class e extends _u{constructor(n,r,o){super(n,r),this.disabled=!1,this.tabIndex=Number(o)||0}ngOnInit(){super.ngOnInit()}ngOnDestroy(){super.ngOnDestroy()}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(yc),ro("tabindex"))},e.\u0275dir=ze({type:e,selectors:[["mat-tree-node"]],hostAttrs:[1,"mat-tree-node"],inputs:{disabled:[2,"disabled","disabled",at],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?0:wi(n)]},exportAs:["matTreeNode"],standalone:!0,features:[Bt([{provide:_u,useExisting:e}]),an,nn]});let i=e;return i})(),pG=(()=>{let e=class e extends uC{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["","matTreeNodeDef",""]],inputs:{when:[0,"matTreeNodeDefWhen","when"],data:[0,"matTreeNode","data"]},standalone:!0,features:[Bt([{provide:uC,useExisting:e}]),nn]});let i=e;return i})();var fG=(()=>{let e=class e extends xO{get level(){return this._level}set level(n){this._setLevelInput(n)}get indent(){return this._indent}set indent(n){this._setIndentInput(n)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["","matTreeNodePadding",""]],inputs:{level:[2,"matTreeNodePadding","level",wi],indent:[0,"matTreeNodePaddingIndent","indent"]},standalone:!0,features:[Bt([{provide:xO,useExisting:e}]),an,nn]});let i=e;return i})(),uG=(()=>{let e=class e{constructor(n,r){this.viewContainer=n,this._node=r}};e.\u0275fac=function(r){return new(r||e)(M(Yt),M(yO,8))},e.\u0275dir=ze({type:e,selectors:[["","matTreeNodeOutlet",""]],standalone:!0,features:[Bt([{provide:dC,useExisting:e}])]});let i=e;return i})(),mG=(()=>{let e=class e extends yc{constructor(){super(...arguments),this._nodeOutlet=void 0}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275cmp=le({type:e,selectors:[["mat-tree"]],viewQuery:function(r,o){if(r&1&&Ie(uG,7),r&2){let s;be(s=ye())&&(o._nodeOutlet=s.first)}},hostAttrs:["role","tree",1,"mat-tree"],exportAs:["matTree"],standalone:!0,features:[Bt([{provide:yc,useExisting:e}]),nn,ce],decls:1,vars:0,consts:[["matTreeNodeOutlet",""]],template:function(r,o){r&1&&Zi(0,0)},dependencies:[uG],styles:[".mat-tree{display:block;background-color:var(--mat-tree-container-background-color)}.mat-tree-node,.mat-nested-tree-node{color:var(--mat-tree-node-text-color);font-family:var(--mat-tree-node-text-font);font-size:var(--mat-tree-node-text-size);font-weight:var(--mat-tree-node-text-weight)}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word;min-height:var(--mat-tree-node-min-height)}.mat-nested-tree-node{border-bottom-width:0}"],encapsulation:2});let i=e;return i})(),gG=(()=>{let e=class e extends wO{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["","matTreeNodeToggle",""]],inputs:{recursive:[0,"matTreeNodeToggleRecursive","recursive"]},standalone:!0,features:[Bt([{provide:wO,useExisting:e}]),nn]});let i=e;return i})();var _G=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[dG,qt,qt]});let i=e;return i})(),hC=class{constructor(e,t,n,r){this.transformFunction=e,this.getLevel=t,this.isExpandable=n,this.getChildren=r}_flattenNode(e,t,n,r){let o=this.transformFunction(e,t);if(n.push(o),this.isExpandable(o)){let s=this.getChildren(e);s&&(Array.isArray(s)?this._flattenChildren(s,t,n,r):s.pipe(_n(1)).subscribe(a=>{this._flattenChildren(a,t,n,r)}))}return n}_flattenChildren(e,t,n,r){e.forEach((o,s)=>{let a=r.slice();a.push(s!=e.length-1),this._flattenNode(o,t+1,n,a)})}flattenNodes(e){let t=[];return e.forEach(n=>this._flattenNode(n,0,t,[])),t}expandFlattenedNodes(e,t){let n=[],r=[];return r[0]=!0,e.forEach(o=>{let s=!0;for(let a=0;a<=this.getLevel(o);a++)s=s&&r[a];s&&n.push(o),this.isExpandable(o)&&(r[this.getLevel(o)+1]=t.isExpanded(o))}),n}},pC=class extends eC{get data(){return this._data.value}set data(e){this._data.next(e),this._flattenedData.next(this._treeFlattener.flattenNodes(this.data)),this._treeControl.dataNodes=this._flattenedData.value}constructor(e,t,n){super(),this._treeControl=e,this._treeFlattener=t,this._flattenedData=new Dn([]),this._expandedData=new Dn([]),this._data=new Dn([]),n&&(this.data=n)}connect(e){return Yn(e.viewChange,this._treeControl.expansionModel.changed,this._flattenedData).pipe(Je(()=>(this._expandedData.next(this._treeFlattener.expandFlattenedNodes(this._flattenedData.value,this._treeControl)),this._expandedData.value)))}disconnect(){}};var j_=200,vG=Qt({opacity:0}),bG=Qt({opacity:1}),Cde=`${j_}ms ${CT.DECELERATION_CURVE}`,Sde=`${j_}ms ${CT.STANDARD_CURVE}`,yG={bubbleContainer:si("bubbleContainer",[fi("void, hidden",vG),fi("visible",bG),On("void => *, * => visible",Pn(Cde,bG)),On("* => void, * => hidden",Pn(Sde,vG))])};function Mde(i,e){i&1&&J(0,"a",1)}var xG=(()=>{class i extends oa{portalOutlet;animationState="hidden";changeDetector=te(Fe);attachComponentPortal(t){return this.portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this.portalOutlet.attachTemplatePortal(t)}toggleAnimation(t){this.animationState=t?"visible":"hidden",this.changeDetector.markForCheck()}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ai(i)))(r||i)}})();static \u0275cmp=le({type:i,selectors:[["bubble-container"]],viewQuery:function(n,r){if(n&1&&Ie(Qo,7),n&2){let o;be(o=ye())&&(r.portalOutlet=o.first)}},hostAttrs:["role","dialog",1,"bubble-container"],hostVars:1,hostBindings:function(n,r){n&2&&Yf("@bubbleContainer",r.animationState)},standalone:!0,features:[nn,ce],decls:2,vars:0,consts:[["cdkPortalOutlet",""],["cdkFocusInitial","","tabindex","0"]],template:function(n,r){n&1&&(v(0,"div"),W(1,Mde,1,0,"ng-template",0),y())},dependencies:[Ms,Qo],styles:[`.bubble-container{box-shadow:0 1px 2px #3c40434d,0 1px 3px 1px #3c404326;border-radius:8px;overflow:auto;background:#fff;color:#000000de;font-family:Google Sans Text,Arial,Helvetica,sans-serif;font-size:.875rem;font-weight:400;line-height:1.25rem;letter-spacing:normal} +`],changeDetection:0})}return i})();var _O=class{constructor(){this.expansionModel=new ef(!0)}toggle(e){this.expansionModel.toggle(this._trackByValue(e))}expand(e){this.expansionModel.select(this._trackByValue(e))}collapse(e){this.expansionModel.deselect(this._trackByValue(e))}isExpanded(e){return this.expansionModel.isSelected(this._trackByValue(e))}toggleDescendants(e){this.expansionModel.isSelected(this._trackByValue(e))?this.collapseDescendants(e):this.expandDescendants(e)}collapseAll(){this.expansionModel.clear()}expandDescendants(e){let t=[e];t.push(...this.getDescendants(e)),this.expansionModel.select(...t.map(n=>this._trackByValue(n)))}collapseDescendants(e){let t=[e];t.push(...this.getDescendants(e)),this.expansionModel.deselect(...t.map(n=>this._trackByValue(n)))}_trackByValue(e){return this.trackBy?this.trackBy(e):e}},dC=class extends _O{constructor(e,t,n){super(),this.getLevel=e,this.isExpandable=t,this.options=n,this.options&&(this.trackBy=this.options.trackBy)}getDescendants(e){let t=this.dataNodes.indexOf(e),n=[];for(let r=t+1;rthis._trackByValue(e)))}};var bO=new ge("CDK_TREE_NODE_OUTLET_NODE"),uC=(()=>{let e=class e{constructor(n,r){this.viewContainer=n,this._node=r}};e.\u0275fac=function(r){return new(r||e)(M(Yt),M(bO,8))},e.\u0275dir=ze({type:e,selectors:[["","cdkTreeNodeOutlet",""]],standalone:!0});let i=e;return i})(),vO=class{constructor(e){this.$implicit=e}},hC=(()=>{let e=class e{constructor(n){this.template=n}};e.\u0275fac=function(r){return new(r||e)(M(Hn))},e.\u0275dir=ze({type:e,selectors:[["","cdkTreeNodeDef",""]],inputs:{when:[0,"cdkTreeNodeDefWhen","when"]},standalone:!0});let i=e;return i})();var yc=(()=>{let e=class e{get dataSource(){return this._dataSource}set dataSource(n){this._dataSource!==n&&this._switchDataSource(n)}constructor(n,r){this._differs=n,this._changeDetectorRef=r,this._onDestroy=new me,this._levels=new Map,this.viewChange=new Dn({start:0,end:Number.MAX_VALUE})}ngOnInit(){this._dataDiffer=this._differs.find([]).create(this.trackBy),this.treeControl}ngOnDestroy(){this._nodeOutlet.viewContainer.clear(),this.viewChange.complete(),this._onDestroy.next(),this._onDestroy.complete(),this._dataSource&&typeof this._dataSource.disconnect=="function"&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null)}ngAfterContentChecked(){let n=this._nodeDefs.filter(r=>!r.when);n.length>1,this._defaultNodeDef=n[0],this.dataSource&&this._nodeDefs&&!this._dataSubscription&&this._observeRenderChanges()}_switchDataSource(n){this._dataSource&&typeof this._dataSource.disconnect=="function"&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null),n||this._nodeOutlet.viewContainer.clear(),this._dataSource=n,this._nodeDefs&&this._observeRenderChanges()}_observeRenderChanges(){let n;VH(this._dataSource)?n=this._dataSource.connect(this):Ac(this._dataSource)?n=this._dataSource:Array.isArray(this._dataSource)&&(n=Ke(this._dataSource)),n&&(this._dataSubscription=n.pipe(Xe(this._onDestroy)).subscribe(r=>this.renderNodeChanges(r)))}renderNodeChanges(n,r=this._dataDiffer,o=this._nodeOutlet.viewContainer,s){let a=r.diff(n);a&&(a.forEachOperation((l,c,d)=>{if(l.previousIndex==null)this.insertNode(n[d],d,o,s);else if(d==null)o.remove(c),this._levels.delete(l.item);else{let u=o.get(c);o.move(u,d)}}),this._changeDetectorRef.detectChanges())}_getNodeDef(n,r){if(this._nodeDefs.length===1)return this._nodeDefs.first;let o=this._nodeDefs.find(s=>s.when&&s.when(r,n))||this._defaultNodeDef;return o}insertNode(n,r,o,s){let a=this._getNodeDef(n,r),l=new vO(n);this.treeControl.getLevel?l.level=this.treeControl.getLevel(n):typeof s<"u"&&this._levels.has(s)?l.level=this._levels.get(s)+1:l.level=0,this._levels.set(n,l.level),(o||this._nodeOutlet.viewContainer).createEmbeddedView(a.template,l,r),_u.mostRecentTreeNode&&(_u.mostRecentTreeNode.data=n)}};e.\u0275fac=function(r){return new(r||e)(M(Zc),M(Fe))},e.\u0275cmp=le({type:e,selectors:[["cdk-tree"]],contentQueries:function(r,o,s){if(r&1&&xi(s,hC,5),r&2){let a;be(a=ye())&&(o._nodeDefs=a)}},viewQuery:function(r,o){if(r&1&&Ie(uC,7),r&2){let s;be(s=ye())&&(o._nodeOutlet=s.first)}},hostAttrs:["role","tree",1,"cdk-tree"],inputs:{dataSource:"dataSource",treeControl:"treeControl",trackBy:"trackBy"},exportAs:["cdkTree"],standalone:!0,features:[ce],decls:1,vars:0,consts:[["cdkTreeNodeOutlet",""]],template:function(r,o){r&1&&Zi(0,0)},dependencies:[uC],encapsulation:2});let i=e;return i})(),_u=(()=>{let e=class e{get role(){return"treeitem"}set role(n){this._elementRef.nativeElement.setAttribute("role",n)}get data(){return this._data}set data(n){n!==this._data&&(this._data=n,this._setRoleFromData(),this._dataChanges.next())}get isExpanded(){return this._tree.treeControl.isExpanded(this._data)}get level(){return this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._data):this._parentNodeAriaLevel}constructor(n,r){this._elementRef=n,this._tree=r,this._destroyed=new me,this._dataChanges=new me,this._changeDetectorRef=te(Fe),e.mostRecentTreeNode=this,this.role="treeitem"}ngOnInit(){this._parentNodeAriaLevel=vde(this._elementRef.nativeElement),this._elementRef.nativeElement.setAttribute("aria-level",`${this.level+1}`),this._tree.treeControl.expansionModel.changed.pipe(Je(()=>this.isExpanded),vl()).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){e.mostRecentTreeNode===this&&(e.mostRecentTreeNode=null),this._dataChanges.complete(),this._destroyed.next(),this._destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}_setRoleFromData(){!this._tree.treeControl.isExpandable&&this._tree.treeControl.getChildren,this.role="treeitem"}};e.mostRecentTreeNode=null,e.\u0275fac=function(r){return new(r||e)(M(Re),M(yc))},e.\u0275dir=ze({type:e,selectors:[["cdk-tree-node"]],hostAttrs:[1,"cdk-tree-node"],hostVars:1,hostBindings:function(r,o){r&2&&Ze("aria-expanded",o.isExpanded)},inputs:{role:"role"},exportAs:["cdkTreeNode"],standalone:!0});let i=e;return i})();function vde(i){let e=i.parentElement;for(;e&&!bde(e);)e=e.parentElement;return e?e.classList.contains("cdk-nested-tree-node")?wi(e.getAttribute("aria-level")):0:-1}function bde(i){let e=i.classList;return!!(e?.contains("cdk-nested-tree-node")||e?.contains("cdk-tree"))}var yde=/([A-Za-z%]+)$/,yO=(()=>{let e=class e{get level(){return this._level}set level(n){this._setLevelInput(n)}get indent(){return this._indent}set indent(n){this._setIndentInput(n)}constructor(n,r,o,s){this._treeNode=n,this._tree=r,this._element=o,this._dir=s,this._destroyed=new me,this.indentUnits="px",this._indent=40,this._setPadding(),s&&s.change.pipe(Xe(this._destroyed)).subscribe(()=>this._setPadding(!0)),n._dataChanges.subscribe(()=>this._setPadding())}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_paddingIndent(){let n=this._treeNode.data&&this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._treeNode.data):null,r=this._level==null?n:this._level;return typeof r=="number"?`${r*this._indent}${this.indentUnits}`:null}_setPadding(n=!1){let r=this._paddingIndent();if(r!==this._currentPadding||n){let o=this._element.nativeElement,s=this._dir&&this._dir.value==="rtl"?"paddingRight":"paddingLeft",a=s==="paddingLeft"?"paddingRight":"paddingLeft";o.style[s]=r||"",o.style[a]="",this._currentPadding=r}}_setLevelInput(n){this._level=isNaN(n)?null:n,this._setPadding()}_setIndentInput(n){let r=n,o="px";if(typeof n=="string"){let s=n.split(yde);r=s[0],o=s[1]||o}this.indentUnits=o,this._indent=wi(r),this._setPadding()}};e.\u0275fac=function(r){return new(r||e)(M(_u),M(yc),M(Re),M(ai,8))},e.\u0275dir=ze({type:e,selectors:[["","cdkTreeNodePadding",""]],inputs:{level:[2,"cdkTreeNodePadding","level",wi],indent:[0,"cdkTreeNodePaddingIndent","indent"]},standalone:!0,features:[an]});let i=e;return i})(),xO=(()=>{let e=class e{constructor(n,r){this._tree=n,this._treeNode=r,this.recursive=!1}_toggle(n){this.recursive?this._tree.treeControl.toggleDescendants(this._treeNode.data):this._tree.treeControl.toggle(this._treeNode.data),n.stopPropagation()}};e.\u0275fac=function(r){return new(r||e)(M(yc),M(_u))},e.\u0275dir=ze({type:e,selectors:[["","cdkTreeNodeToggle",""]],hostBindings:function(r,o){r&1&&H("click",function(a){return o._toggle(a)})},inputs:{recursive:[2,"cdkTreeNodeToggleRecursive","recursive",at]},standalone:!0,features:[an]});let i=e;return i})();var cG=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({});let i=e;return i})();var uG=(()=>{let e=class e extends _u{constructor(n,r,o){super(n,r),this.disabled=!1,this.tabIndex=Number(o)||0}ngOnInit(){super.ngOnInit()}ngOnDestroy(){super.ngOnDestroy()}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(yc),ro("tabindex"))},e.\u0275dir=ze({type:e,selectors:[["mat-tree-node"]],hostAttrs:[1,"mat-tree-node"],inputs:{disabled:[2,"disabled","disabled",at],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?0:wi(n)]},exportAs:["matTreeNode"],standalone:!0,features:[Bt([{provide:_u,useExisting:e}]),an,nn]});let i=e;return i})(),hG=(()=>{let e=class e extends hC{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["","matTreeNodeDef",""]],inputs:{when:[0,"matTreeNodeDefWhen","when"],data:[0,"matTreeNode","data"]},standalone:!0,features:[Bt([{provide:hC,useExisting:e}]),nn]});let i=e;return i})();var pG=(()=>{let e=class e extends yO{get level(){return this._level}set level(n){this._setLevelInput(n)}get indent(){return this._indent}set indent(n){this._setIndentInput(n)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["","matTreeNodePadding",""]],inputs:{level:[2,"matTreeNodePadding","level",wi],indent:[0,"matTreeNodePaddingIndent","indent"]},standalone:!0,features:[Bt([{provide:yO,useExisting:e}]),an,nn]});let i=e;return i})(),dG=(()=>{let e=class e{constructor(n,r){this.viewContainer=n,this._node=r}};e.\u0275fac=function(r){return new(r||e)(M(Yt),M(bO,8))},e.\u0275dir=ze({type:e,selectors:[["","matTreeNodeOutlet",""]],standalone:!0,features:[Bt([{provide:uC,useExisting:e}])]});let i=e;return i})(),fG=(()=>{let e=class e extends yc{constructor(){super(...arguments),this._nodeOutlet=void 0}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275cmp=le({type:e,selectors:[["mat-tree"]],viewQuery:function(r,o){if(r&1&&Ie(dG,7),r&2){let s;be(s=ye())&&(o._nodeOutlet=s.first)}},hostAttrs:["role","tree",1,"mat-tree"],exportAs:["matTree"],standalone:!0,features:[Bt([{provide:yc,useExisting:e}]),nn,ce],decls:1,vars:0,consts:[["matTreeNodeOutlet",""]],template:function(r,o){r&1&&Zi(0,0)},dependencies:[dG],styles:[".mat-tree{display:block;background-color:var(--mat-tree-container-background-color)}.mat-tree-node,.mat-nested-tree-node{color:var(--mat-tree-node-text-color);font-family:var(--mat-tree-node-text-font);font-size:var(--mat-tree-node-text-size);font-weight:var(--mat-tree-node-text-weight)}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word;min-height:var(--mat-tree-node-min-height)}.mat-nested-tree-node{border-bottom-width:0}"],encapsulation:2});let i=e;return i})(),mG=(()=>{let e=class e extends xO{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["","matTreeNodeToggle",""]],inputs:{recursive:[0,"matTreeNodeToggleRecursive","recursive"]},standalone:!0,features:[Bt([{provide:xO,useExisting:e}]),nn]});let i=e;return i})();var gG=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[cG,qt,qt]});let i=e;return i})(),pC=class{constructor(e,t,n,r){this.transformFunction=e,this.getLevel=t,this.isExpandable=n,this.getChildren=r}_flattenNode(e,t,n,r){let o=this.transformFunction(e,t);if(n.push(o),this.isExpandable(o)){let s=this.getChildren(e);s&&(Array.isArray(s)?this._flattenChildren(s,t,n,r):s.pipe(_n(1)).subscribe(a=>{this._flattenChildren(a,t,n,r)}))}return n}_flattenChildren(e,t,n,r){e.forEach((o,s)=>{let a=r.slice();a.push(s!=e.length-1),this._flattenNode(o,t+1,n,a)})}flattenNodes(e){let t=[];return e.forEach(n=>this._flattenNode(n,0,t,[])),t}expandFlattenedNodes(e,t){let n=[],r=[];return r[0]=!0,e.forEach(o=>{let s=!0;for(let a=0;a<=this.getLevel(o);a++)s=s&&r[a];s&&n.push(o),this.isExpandable(o)&&(r[this.getLevel(o)+1]=t.isExpanded(o))}),n}},fC=class extends tC{get data(){return this._data.value}set data(e){this._data.next(e),this._flattenedData.next(this._treeFlattener.flattenNodes(this.data)),this._treeControl.dataNodes=this._flattenedData.value}constructor(e,t,n){super(),this._treeControl=e,this._treeFlattener=t,this._flattenedData=new Dn([]),this._expandedData=new Dn([]),this._data=new Dn([]),n&&(this.data=n)}connect(e){return Yn(e.viewChange,this._treeControl.expansionModel.changed,this._flattenedData).pipe(Je(()=>(this._expandedData.next(this._treeFlattener.expandFlattenedNodes(this._flattenedData.value,this._treeControl)),this._expandedData.value)))}disconnect(){}};var W_=200,_G=Qt({opacity:0}),vG=Qt({opacity:1}),Cde=`${W_}ms ${wT.DECELERATION_CURVE}`,Sde=`${W_}ms ${wT.STANDARD_CURVE}`,bG={bubbleContainer:si("bubbleContainer",[fi("void, hidden",_G),fi("visible",vG),On("void => *, * => visible",Pn(Cde,vG)),On("* => void, * => hidden",Pn(Sde,_G))])};function Mde(i,e){i&1&&J(0,"a",1)}var yG=(()=>{class i extends oa{portalOutlet;animationState="hidden";changeDetector=te(Fe);attachComponentPortal(t){return this.portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this.portalOutlet.attachTemplatePortal(t)}toggleAnimation(t){this.animationState=t?"visible":"hidden",this.changeDetector.markForCheck()}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Ai(i)))(r||i)}})();static \u0275cmp=le({type:i,selectors:[["bubble-container"]],viewQuery:function(n,r){if(n&1&&Ie(Qo,7),n&2){let o;be(o=ye())&&(r.portalOutlet=o.first)}},hostAttrs:["role","dialog",1,"bubble-container"],hostVars:1,hostBindings:function(n,r){n&2&&Yf("@bubbleContainer",r.animationState)},standalone:!0,features:[nn,ce],decls:2,vars:0,consts:[["cdkPortalOutlet",""],["cdkFocusInitial","","tabindex","0"]],template:function(n,r){n&1&&(v(0,"div"),W(1,Mde,1,0,"ng-template",0),y())},dependencies:[Ms,Qo],styles:[`.bubble-container{box-shadow:0 1px 2px #3c40434d,0 1px 3px 1px #3c404326;border-radius:8px;overflow:auto;background:#fff;color:#000000de;font-family:Google Sans Text,Arial,Helvetica,sans-serif;font-size:.875rem;font-weight:400;line-height:1.25rem;letter-spacing:normal} /** * @license * Copyright 2024 The Model Explorer Authors. All Rights Reserved. @@ -3194,8 +3194,8 @@ void main() { * limitations under the License. * ============================================================================== */ -`],encapsulation:2,data:{animation:[yG.bubbleContainer]},changeDetection:0})}return i})();var Ede=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top",offsetY:8},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",offsetY:-8},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",offsetY:-8},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top",offsetY:8}],Ide={minWidth:220,maxWidth:420,minHeight:64,maxHeight:420},fC=(()=>{class i{ngZone;overlay;elementRef;viewContainerRef;document;focusTrapFactory;injector;overlayRef;portal;disabledInternal=!1;panelClassInternal;set dialog(t){t&&(t instanceof Hn?this.setPortal(new jr(t,this.viewContainerRef)):this.setPortal(new Di(t,this.viewContainerRef)))}set disabled(t){this.disabledInternal=t,this.disabledInternal&&this.closeDialog()}get disabled(){return this.disabledInternal}overlaySize;overlayPositions;overlayDimensions=Ide;set panelClass(t){this.panelClassInternal!==t&&(this.panelClassInternal&&this.overlayRef?.removePanelClass(this.panelClassInternal),t&&this.overlayRef?.addPanelClass(t),this.panelClassInternal=t)}opened=new Pe;closed=new Pe;destroyed=new ma;openStatusChange=new Dn(!1);openings=this.openStatusChange.pipe(Gt(t=>t&&!this.disabled));bubbleContainerRef;focusTrap;elementFocusedBeforeDialogWasOpened=void 0;constructor(t,n,r,o,s,a,l){this.ngZone=t,this.overlay=n,this.elementRef=r,this.viewContainerRef=o,this.document=s,this.focusTrapFactory=a,this.injector=l,this.attachKeyboardCloseEventListeners(r.nativeElement)}ngOnInit(){}ngOnDestroy(){this.closeDialog(),this.openStatusChange.complete(),this.destroyed.next(),this.destroyed.complete(),this.overlayRef&&this.overlayRef.dispose()}setPortal(t){this.portal=t}openDialog(){if(this.disabled||this.overlayRef?.hasAttached())return;let t=this.portal;t!=null&&this.ngZone.run(()=>{this.bubbleContainerRef=this.createAndAttachBubbleContainer(),this.bubbleContainerRef.instance.attach(t);let n=this.bubbleContainerRef.location.nativeElement;this.attachMouseEventListeners(n),this.attachKeyboardCloseEventListeners(n),this.trapFocus(n),this.bubbleContainerRef.instance.toggleAnimation(!0),this.opened.observers.length&&setTimeout(()=>{this.opened.emit()},j_)})}closeDialog(){this.overlayRef?.hasAttached()&&(this.bubbleContainerRef.instance.toggleAnimation(!1),setTimeout(()=>{this.ngZone.run(()=>{this.overlayRef&&this.overlayRef.detach(),this.cleanupFocusTrap(),this.restoreFocus(),this.cleanupBubbleContainer(),this.closed.emit()})},j_))}trapFocus(t){let n=this.document.activeElement,r=this.elementRef.nativeElement;n&&n===r&&(this.document&&(this.elementFocusedBeforeDialogWasOpened=this.document.activeElement),this.focusTrap=this.focusTrapFactory.create(t),this.focusTrap.attachAnchors())}focusInitialElement(){this.focusTrap&&this.focusTrap.focusInitialElementWhenReady()}cleanupFocusTrap(){this.focusTrap&&(this.focusTrap.destroy(),this.focusTrap=void 0)}restoreFocus(){let t=this.elementFocusedBeforeDialogWasOpened;if(!t||typeof t.focus!="function")return;let n=this.bubbleContainerRef?.location.nativeElement,r=this.document.activeElement;!r||!n?.contains(r)||(t.focus(),this.elementFocusedBeforeDialogWasOpened=void 0)}cleanupBubbleContainer(){this.bubbleContainerRef&&(this.bubbleContainerRef.destroy(),this.bubbleContainerRef=void 0)}createPositionStrategy(t){return this.overlay.position().flexibleConnectedTo(this.elementRef).withPositions(t).setOrigin(this.elementRef)}createScrollStrategy(){return this.overlay.scrollStrategies.close()}createAndAttachBubbleContainer(){let t=bt.create({parent:this.injector,providers:[]}),n=new Di(xG,null,t);return this.overlayRef==null&&(this.overlayRef=this.overlay.create(this.createOverlayConfig(Ede))),this.overlaySize&&this.overlayRef.updateSize(this.overlaySize),this.overlayPositions&&this.overlayPositions.length>0&&this.overlayRef.updatePositionStrategy(this.createPositionStrategy(this.overlayPositions)),this.overlayRef.attach(n)}static \u0275fac=function(n){return new(n||i)(M(Le),M(Ht),M(Re),M(Yt),M(Document),M(kh),M(bt))};static \u0275dir=ze({type:i,inputs:{overlaySize:"overlaySize",overlayPositions:"overlayPositions",overlayDimensions:"overlayDimensions",panelClass:"panelClass"},outputs:{opened:"opened",closed:"closed"},standalone:!0})}return i})();var Tde=500,$n=(()=>{class i extends fC{hoverDelayMs=Tde;activity=new me;constructor(t,n,r,o,s,a,l){super(t,n,r,o,s,a,l),this.attachMouseEventListeners(r.nativeElement)}ngOnInit(){super.ngOnInit(),this.listenForOpenEvents(this.hoverDelayMs)}listenForOpenEvents(t){this.openStatusChange.pipe(Ef(()=>this.activity.pipe(To(t)))).pipe(Xe(this.destroyed)).subscribe(r=>{r?this.openDialog():this.closeDialog()})}attachMouseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"mouseenter").pipe(Xe(this.destroyed)).subscribe(()=>{this.openingDialog()}),yn(t,"click").pipe(Xe(this.destroyed)).subscribe(n=>{n.target.closest("[bubbleClose]")?this.closingDialog():(this.openingDialog(),this.openDialog())}),yn(t,"mouseleave").pipe(Xe(this.destroyed)).subscribe(()=>{this.closingDialog()}),yn(t,"mousemove").pipe(Xe(this.destroyed)).subscribe(()=>{this.activity.next()})})}attachKeyboardCloseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"keydown").pipe(Xe(this.destroyed)).subscribe(n=>{switch(n.keyCode){case 27:this.overlayRef?.hasAttached()&&n.stopPropagation(),this.closeDialog();return;default:return}})})}openingDialog(){this.disabled||(this.openStatusChange.next(!0),this.activity.next())}closingDialog(){this.openStatusChange.next(!1),this.activity.next()}createOverlayConfig(t){return new ui(wt(Z({},this.overlayDimensions),{positionStrategy:super.createPositionStrategy(t),scrollStrategy:this.createScrollStrategy(),panelClass:this.panelClassInternal}))}static \u0275fac=function(n){return new(n||i)(M(Le),M(Ht),M(Re),M(Yt),M(Ye),M(kh),M(bt))};static \u0275dir=ze({type:i,selectors:[["","bubble",""]],hostAttrs:[1,"bubble"],inputs:{dialog:[0,"bubble","dialog"],disabled:[0,"bubbleDisabled","disabled"],hoverDelayMs:"hoverDelayMs"},exportAs:["bubble"],standalone:!0,features:[nn]})}return i})();var mC=[si("transformPanel",[fi("void",Qt({opacity:0,transform:"scale(1, 0.8)"})),On("void => showing",Pn("120ms cubic-bezier(0, 0, 0.2, 1)",Qt({opacity:1,transform:"scale(1, 1)"}))),On("* => void",Pn("100ms linear",Qt({opacity:0})))])];var Dde=["tree"],CG=i=>({node:i});function Pde(i,e){if(i&1&&S(0),i&2){let t=I().$implicit;$E(" ",t.boldLabel," (",t.label,") ")}}function Ode(i,e){if(i&1&&S(0),i&2){let t=I().$implicit;Me(" ",t.label," ")}}function Rde(i,e){i&1&&Zi(0)}function Ade(i,e){if(i&1&&W(0,Rde,1,0,"ng-container",14),i&2){let t=I().$implicit;I();let n=ve(5);N("ngTemplateOutlet",n)("ngTemplateOutletContext",Pl(2,CG,t))}}function Nde(i,e){if(i&1&&(v(0,"tr")(1,"td",17)(2,"mat-icon",18),S(3,"circle"),y(),S(4),y(),v(5,"td",19),S(6),y()()),i&2){let t=e.$implicit,n=I(2).$implicit,r=I();se("search-match",r.isSearchMatched(n.metadata[t])),w(4),Me(" ",t,""),w(2),nt(n.metadata[t])}}function kde(i,e){if(i&1&&(v(0,"table",15),W(1,Nde,7,4,"tr",16),y()),i&2){let t=I().$implicit,n=I();w(),N("ngForOf",n.getSortedMetadataKeys(t))}}function Lde(i,e){if(i&1&&(v(0,"div",20)(1,"mat-icon",21),S(2,"my_location"),y()()),i&2){let t=I(2);N("matTooltip",t.locatorTooltip)("matTooltipPosition",t.tooltipPosition)}}function Fde(i,e){if(i&1&&(v(0,"div",23),S(1),y()),i&2){let t=I(3);w(),Me(" Showing at most ",t.getMaxConstValueCount()," elements ")}}function Bde(i,e){if(i&1&&(v(0,"div",22),W(1,Fde,2,1,"div",23),v(2,"div",24),S(3),y()()),i&2){let t=I().$implicit,n=I();w(),ae(n.getMaxConstValueCount()!==0?1:-1),w(2),nt(n.getConstValues(t))}}function Vde(i,e){if(i&1){let t=ie();v(0,"mat-tree-node",6)(1,"div",7),H("click",function(r){let o=V(t).$implicit,s=I();return z(s.handleLocateNode(o,r.altKey))}),v(2,"div",8)(3,"div",9)(4,"div",10)(5,"span",11),W(6,Pde,1,2)(7,Ode,1,1),y(),W(8,Ade,1,4,"ng-container"),y()(),W(9,kde,2,1,"table",12),y(),W(10,Lde,3,2,"div",13),y(),W(11,Bde,4,2,"ng-template",null,2,kt),y()}if(i&2){let t=e.$implicit,n=ve(12),r=I();se("has-locator",t.showLocator)("has-values",r.showHoverForValuesLabel(t))("highlight",t.highlight)("has-metadata",r.hasMetadata(t)),N("bubble",n)("overlaySize",r.constValuesPopupSize)("overlayPositions",r.constValuesPopupPosition)("hoverDelayMs",50)("bubbleDisabled",!r.showHoverForValuesLabel(t))("matTreeNodePaddingIndent",r.treeItemPadding),Ze("data-id",t.nodeId),w(2),se("has-extra-data",t.extraData!=null),w(3),se("color-bold",r.colorBoldNodeLabel)("search-match",r.isSearchMatched(t.label,t.boldLabel)),w(),ae(t.boldLabel?6:7),w(2),ae(t.extraData?8:-1),w(),N("ngIf",r.hasMetadata(t)),w(),N("ngIf",t.showLocator&&r.showLocator)}}function zde(i,e){i&1&&Zi(0)}function Ude(i,e){if(i&1&&W(0,zde,1,0,"ng-container",14),i&2){let t=I().$implicit;I();let n=ve(5);N("ngTemplateOutlet",n)("ngTemplateOutletContext",Pl(2,CG,t))}}function Hde(i,e){if(i&1&&(v(0,"div",20)(1,"mat-icon",21),S(2,"my_location"),y()()),i&2){let t=I(2);N("matTooltip",t.locatorTooltip)("matTooltipPosition",t.tooltipPosition)}}function Gde(i,e){if(i&1){let t=ie();v(0,"mat-tree-node",25)(1,"div",26),H("click",function(r){let o=V(t).$implicit,s=I();return z(s.handleLocateNode(o,r.altKey))}),v(2,"div",9)(3,"button",27)(4,"mat-icon",28),S(5),y()(),v(6,"div",10),S(7),W(8,Ude,1,4,"ng-container"),y()(),W(9,Hde,3,2,"div",13),y()()}if(i&2){let t=e.$implicit,n=I();se("has-locator",t.showLocator),N("matTreeNodePaddingIndent",n.treeItemPadding),Ze("data-id",t.nodeId),w(),se("highlight",t.highlightGroupLabel),w(),se("has-extra-data",t.extraData!=null),w(),Ze("aria-label","Toggle "+t.label),w(2),Me(" ",n.treeControl.isExpanded(t)?"keyboard_arrow_down":"chevron_right"," "),w(2),Me(" ",t.label," "),w(),ae(t.extraData?8:-1),w(),N("ngIf",t.showLocator&&n.showLocator)}}function jde(i,e){if(i&1&&(v(0,"div",30)(1,"mat-icon"),S(2),y()()),i&2){let t=e.$implicit,n=I(2);N("matTooltip",n.getExtraLabelTooltip(t)),w(2),nt(t)}}function Wde(i,e){if(i&1&&(v(0,"div",29),ln(1,jde,3,2,"div",30,Qr),y()),i&2){let t=e.node;w(),cn(t.extraData.matchTypes)}}var xc=(()=>{class i{appService;changeDetectorRef;data;solidBackground=!1;rendererId="";tooltipPosition="left";showLocator=!0;colorBoldNodeLabel=!1;onClose=new Pe;tree;constValuesPopupSize={minWidth:100};constValuesPopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top"}];locatorTooltip=`Click: locate -Alt+click: select`;transformer=(t,n)=>({nodeId:t.nodeId,node:t.node,expandable:!!t.children&&t.children.length>0,label:t.label,boldLabel:t.boldLabel,level:n,showLocator:t.showLocator,highlight:t.highlight,metadata:t.metadata,extraData:t.extraData});curSearchMatches=[];treeItemPadding=8;treeControl=new cC(t=>t.level,t=>t.expandable);treeFlattener=new hC(this.transformer,t=>t.level,t=>t.expandable,t=>t.children);dataSource=new pC(this.treeControl,this.treeFlattener);constructor(t,n){this.appService=t,this.changeDetectorRef=n}ngOnChanges(t){this.data!=null&&(this.dataSource.data=this.data,this.treeControl.expandAll())}updateData(t){this.data=t,this.dataSource.data=this.data,this.treeControl.expandAll(),this.changeDetectorRef.markForCheck()}updateSearchResults(t){this.curSearchMatches=t,this.changeDetectorRef.markForCheck()}handleLocateNode(t,n){t.showLocator&&(this.appService.curToLocateNodeInfo.set({nodeId:t.nodeId||"",rendererId:this.rendererId,isGroupNode:t.expandable,select:n}),this.onClose.emit({}))}hasChild(t,n){return n.expandable}hasMetadata(t){return t.metadata!=null&&Object.keys(t.metadata).length>0}getSortedMetadataKeys(t){return Object.keys(t.metadata||{}).filter(n=>!n.startsWith("__")).sort()}showHoverForValuesLabel(t){let n=t.node;if(!n)return!1;if(Et(n)){let r=n.attrs||{};if(r[ka])return r[ka]!=="DATA_ELIDED"}return!1}getMaxConstValueCount(){return this.appService.config()?.maxConstValueCount??0}getConstValues(t){let n=t.node;return n&&Et(n)?(n.attrs||{})[ka]||"":""}getExtraLabelTooltip(t){switch(t){case vt.NODE_LABEL:return"Node label matched";case vt.ATTRIBUTE:return"Node attribute(s) matched";case vt.INPUT_METADATA:return"Input(s) matched";case vt.OUTPUT_METADATA:return"Output(s) matched";default:return""}}isSearchMatched(t,n){return this.curSearchMatches?this.curSearchMatches.find(r=>r.matchedText===t||r.matchedText===n)!=null:!1}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["io-tree"]],viewQuery:function(n,r){if(n&1&&Ie(Dde,5),n&2){let o;be(o=ye())&&(r.tree=o.first)}},inputs:{data:"data",solidBackground:"solidBackground",rendererId:"rendererId",tooltipPosition:"tooltipPosition",showLocator:"showLocator",colorBoldNodeLabel:"colorBoldNodeLabel"},outputs:{onClose:"onClose"},standalone:!0,features:[dn,ce],decls:6,vars:7,consts:[["tree",""],["matchTypes",""],["constValuesPopup",""],[1,"io-tree",3,"dataSource","treeControl"],["class","leaf","matTreeNodePadding","",3,"has-locator","has-values","highlight","has-metadata","bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled","matTreeNodePaddingIndent",4,"matTreeNodeDef"],["matTreeNodePadding","",3,"has-locator","matTreeNodePaddingIndent",4,"matTreeNodeDef","matTreeNodeDefWhen"],["matTreeNodePadding","",1,"leaf",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled","matTreeNodePaddingIndent"],[1,"edge-node",3,"click"],[1,"label-and-metadata"],[1,"label-container"],[1,"label"],[1,"node-label"],["class","metadata-table",4,"ngIf"],["class","locator-container","matTooltipClass","multiline-tooltip-left",3,"matTooltip","matTooltipPosition",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"metadata-table"],[3,"search-match",4,"ngFor","ngForOf"],[1,"key"],[1,"bullet"],[1,"value"],["matTooltipClass","multiline-tooltip-left",1,"locator-container",3,"matTooltip","matTooltipPosition"],[1,"locator-icon"],[1,"model-explorer-const-values-popup"],[1,"values-count-msg"],[1,"content"],["matTreeNodePadding","",3,"matTreeNodePaddingIndent"],[1,"expandable-tree-node",3,"click"],["mat-icon-button","","matTreeNodeToggle","",1,"expand-icon-button"],[1,"expander"],[1,"match-types-container"],[1,"extra-label-container",3,"matTooltip"]],template:function(n,r){n&1&&(v(0,"mat-tree",3,0),W(2,Vde,13,25,"mat-tree-node",4)(3,Gde,10,13,"mat-tree-node",5),y(),W(4,Wde,3,0,"ng-template",null,1,kt)),n&2&&(se("solid-background",r.solidBackground),N("dataSource",r.dataSource)("treeControl",r.treeControl)("@transformPanel","showing")("@.disabled",!r.solidBackground),w(3),N("matTreeNodeDefWhen",r.hasChild))},dependencies:[$n,Ae,Ci,Mn,Bs,In,Ho,it,gt,Jt,Wn,_G,pG,fG,gG,mG,hG],styles:[`.io-tree[_ngcontent-%COMP%]{background-color:transparent;padding-top:4px}.io-tree.solid-background[_ngcontent-%COMP%]{transform-origin:top center;background-color:#fff;border:1px solid #ccc;border-radius:4px;padding-bottom:8px;min-width:270px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.io-tree[_ngcontent-%COMP%] mat-tree-node.has-locator[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] mat-tree-node.has-values[_ngcontent-%COMP%]{cursor:pointer}.io-tree[_ngcontent-%COMP%] mat-tree-node.has-locator[_ngcontent-%COMP%]:hover, .io-tree[_ngcontent-%COMP%] mat-tree-node.has-values[_ngcontent-%COMP%]:hover{background-color:#f3f3f3}.io-tree[_ngcontent-%COMP%] mat-tree-node.highlight[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#00639b;font-weight:500}.io-tree[_ngcontent-%COMP%] mat-tree-node[_ngcontent-%COMP%]:not(:last-child).has-metadata.leaf{margin-bottom:6px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;width:100%;box-sizing:border-box;padding-right:12px;padding-left:27px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%]:hover .locator-container[_ngcontent-%COMP%]{opacity:.8}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata.has-extra-data[_ngcontent-%COMP%]{width:100%}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata.has-extra-data[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{width:100%;justify-content:space-between}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .node-label.color-bold[_ngcontent-%COMP%]{color:#00639b;font-weight:500}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .node-label.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .hover-for-values-label[_ngcontent-%COMP%]{text-decoration:underline;text-decoration-style:dotted;color:#999;margin-left:8px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;padding:0;font-size:11px;margin-top:2px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{vertical-align:text-top}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] mat-icon.bullet[_ngcontent-%COMP%]{font-size:4px;width:5px;height:5px;color:#bbb;margin-right:2px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%]{color:#999;padding-right:4px;white-space:nowrap;line-height:12px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]{line-height:12px}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] mat-tree-node[_ngcontent-%COMP%]{font-size:13px;min-height:22px;word-break:break-word}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%]{color:#999;display:flex;align-items:center;justify-content:space-between;width:100%;box-sizing:border-box;padding-right:12px;padding-left:4px}.io-tree[_ngcontent-%COMP%] .expandable-tree-node.highlight[_ngcontent-%COMP%]{color:#000000de}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%]:hover .locator-container[_ngcontent-%COMP%]{opacity:.8}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] mat-icon.expander[_ngcontent-%COMP%]{color:#999}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container.has-extra-data[_ngcontent-%COMP%]{width:100%}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container.has-extra-data[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex-grow:1;justify-content:space-between}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .expand-icon-button[_ngcontent-%COMP%]{padding:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.io-tree[_ngcontent-%COMP%] .expand-icon-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;margin-top:6px}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%]{height:18px;opacity:.5;cursor:pointer;display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%] mat-icon.locator-icon[_ngcontent-%COMP%]{color:#333;font-size:16px;width:16px;height:16px}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%]:hover{opacity:.8}.io-tree[_ngcontent-%COMP%] .match-types-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-self:center;gap:2px;margin-left:8px}.io-tree[_ngcontent-%COMP%] .extra-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-self:center;padding:4px;border-radius:99px;background-color:#e8f0fe;box-sizing:border-box}.io-tree[_ngcontent-%COMP%] .extra-label-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#9da3a9}.io-tree[_ngcontent-%COMP%] .mat-mdc-button-touch-target{width:24px;height:24px}.io-tree-invisible[_ngcontent-%COMP%]{display:none}.io-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.io-tree[_ngcontent-%COMP%] .mat-nested-tree-node[_ngcontent-%COMP%] div[role=group][_ngcontent-%COMP%]{padding-left:8px}.io-tree[_ngcontent-%COMP%] div[role=group][_ngcontent-%COMP%] > .mat-tree-node[_ngcontent-%COMP%]{padding-left:16px} bubble-container:has(.model-explorer-const-values-popup){width:100%} .model-explorer-const-values-popup{padding:8px;font-size:11px;line-height:12px;background-color:#fff} .model-explorer-const-values-popup .values-count-msg{margin-bottom:8px;color:#999} .model-explorer-const-values-popup .content{white-space:pre-wrap;font-family:monospace} +`],encapsulation:2,data:{animation:[bG.bubbleContainer]},changeDetection:0})}return i})();var Ede=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top",offsetY:8},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",offsetY:-8},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",offsetY:-8},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top",offsetY:8}],Ide={minWidth:220,maxWidth:420,minHeight:64,maxHeight:420},mC=(()=>{class i{ngZone;overlay;elementRef;viewContainerRef;document;focusTrapFactory;injector;overlayRef;portal;disabledInternal=!1;panelClassInternal;set dialog(t){t&&(t instanceof Hn?this.setPortal(new jr(t,this.viewContainerRef)):this.setPortal(new Di(t,this.viewContainerRef)))}set disabled(t){this.disabledInternal=t,this.disabledInternal&&this.closeDialog()}get disabled(){return this.disabledInternal}overlaySize;overlayPositions;overlayDimensions=Ide;set panelClass(t){this.panelClassInternal!==t&&(this.panelClassInternal&&this.overlayRef?.removePanelClass(this.panelClassInternal),t&&this.overlayRef?.addPanelClass(t),this.panelClassInternal=t)}opened=new Pe;closed=new Pe;destroyed=new ma;openStatusChange=new Dn(!1);openings=this.openStatusChange.pipe(Gt(t=>t&&!this.disabled));bubbleContainerRef;focusTrap;elementFocusedBeforeDialogWasOpened=void 0;constructor(t,n,r,o,s,a,l){this.ngZone=t,this.overlay=n,this.elementRef=r,this.viewContainerRef=o,this.document=s,this.focusTrapFactory=a,this.injector=l,this.attachKeyboardCloseEventListeners(r.nativeElement)}ngOnInit(){}ngOnDestroy(){this.closeDialog(),this.openStatusChange.complete(),this.destroyed.next(),this.destroyed.complete(),this.overlayRef&&this.overlayRef.dispose()}setPortal(t){this.portal=t}openDialog(){if(this.disabled||this.overlayRef?.hasAttached())return;let t=this.portal;t!=null&&this.ngZone.run(()=>{this.bubbleContainerRef=this.createAndAttachBubbleContainer(),this.bubbleContainerRef.instance.attach(t);let n=this.bubbleContainerRef.location.nativeElement;this.attachMouseEventListeners(n),this.attachKeyboardCloseEventListeners(n),this.trapFocus(n),this.bubbleContainerRef.instance.toggleAnimation(!0),this.opened.observers.length&&setTimeout(()=>{this.opened.emit()},W_)})}closeDialog(){this.overlayRef?.hasAttached()&&(this.bubbleContainerRef.instance.toggleAnimation(!1),setTimeout(()=>{this.ngZone.run(()=>{this.overlayRef&&this.overlayRef.detach(),this.cleanupFocusTrap(),this.restoreFocus(),this.cleanupBubbleContainer(),this.closed.emit()})},W_))}trapFocus(t){let n=this.document.activeElement,r=this.elementRef.nativeElement;n&&n===r&&(this.document&&(this.elementFocusedBeforeDialogWasOpened=this.document.activeElement),this.focusTrap=this.focusTrapFactory.create(t),this.focusTrap.attachAnchors())}focusInitialElement(){this.focusTrap&&this.focusTrap.focusInitialElementWhenReady()}cleanupFocusTrap(){this.focusTrap&&(this.focusTrap.destroy(),this.focusTrap=void 0)}restoreFocus(){let t=this.elementFocusedBeforeDialogWasOpened;if(!t||typeof t.focus!="function")return;let n=this.bubbleContainerRef?.location.nativeElement,r=this.document.activeElement;!r||!n?.contains(r)||(t.focus(),this.elementFocusedBeforeDialogWasOpened=void 0)}cleanupBubbleContainer(){this.bubbleContainerRef&&(this.bubbleContainerRef.destroy(),this.bubbleContainerRef=void 0)}createPositionStrategy(t){return this.overlay.position().flexibleConnectedTo(this.elementRef).withPositions(t).setOrigin(this.elementRef)}createScrollStrategy(){return this.overlay.scrollStrategies.close()}createAndAttachBubbleContainer(){let t=yt.create({parent:this.injector,providers:[]}),n=new Di(yG,null,t);return this.overlayRef==null&&(this.overlayRef=this.overlay.create(this.createOverlayConfig(Ede))),this.overlaySize&&this.overlayRef.updateSize(this.overlaySize),this.overlayPositions&&this.overlayPositions.length>0&&this.overlayRef.updatePositionStrategy(this.createPositionStrategy(this.overlayPositions)),this.overlayRef.attach(n)}static \u0275fac=function(n){return new(n||i)(M(Le),M(Ht),M(Re),M(Yt),M(Document),M(kh),M(yt))};static \u0275dir=ze({type:i,inputs:{overlaySize:"overlaySize",overlayPositions:"overlayPositions",overlayDimensions:"overlayDimensions",panelClass:"panelClass"},outputs:{opened:"opened",closed:"closed"},standalone:!0})}return i})();var Tde=500,$n=(()=>{class i extends mC{hoverDelayMs=Tde;activity=new me;constructor(t,n,r,o,s,a,l){super(t,n,r,o,s,a,l),this.attachMouseEventListeners(r.nativeElement)}ngOnInit(){super.ngOnInit(),this.listenForOpenEvents(this.hoverDelayMs)}listenForOpenEvents(t){this.openStatusChange.pipe(Ef(()=>this.activity.pipe(To(t)))).pipe(Xe(this.destroyed)).subscribe(r=>{r?this.openDialog():this.closeDialog()})}attachMouseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"mouseenter").pipe(Xe(this.destroyed)).subscribe(()=>{this.openingDialog()}),yn(t,"click").pipe(Xe(this.destroyed)).subscribe(n=>{n.target.closest("[bubbleClose]")?this.closingDialog():(this.openingDialog(),this.openDialog())}),yn(t,"mouseleave").pipe(Xe(this.destroyed)).subscribe(()=>{this.closingDialog()}),yn(t,"mousemove").pipe(Xe(this.destroyed)).subscribe(()=>{this.activity.next()})})}attachKeyboardCloseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"keydown").pipe(Xe(this.destroyed)).subscribe(n=>{switch(n.keyCode){case 27:this.overlayRef?.hasAttached()&&n.stopPropagation(),this.closeDialog();return;default:return}})})}openingDialog(){this.disabled||(this.openStatusChange.next(!0),this.activity.next())}closingDialog(){this.openStatusChange.next(!1),this.activity.next()}createOverlayConfig(t){return new ui(wt(Z({},this.overlayDimensions),{positionStrategy:super.createPositionStrategy(t),scrollStrategy:this.createScrollStrategy(),panelClass:this.panelClassInternal}))}static \u0275fac=function(n){return new(n||i)(M(Le),M(Ht),M(Re),M(Yt),M(Ye),M(kh),M(yt))};static \u0275dir=ze({type:i,selectors:[["","bubble",""]],hostAttrs:[1,"bubble"],inputs:{dialog:[0,"bubble","dialog"],disabled:[0,"bubbleDisabled","disabled"],hoverDelayMs:"hoverDelayMs"},exportAs:["bubble"],standalone:!0,features:[nn]})}return i})();var gC=[si("transformPanel",[fi("void",Qt({opacity:0,transform:"scale(1, 0.8)"})),On("void => showing",Pn("120ms cubic-bezier(0, 0, 0.2, 1)",Qt({opacity:1,transform:"scale(1, 1)"}))),On("* => void",Pn("100ms linear",Qt({opacity:0})))])];var Dde=["tree"],wG=i=>({node:i});function Pde(i,e){if(i&1&&S(0),i&2){let t=I().$implicit;$E(" ",t.boldLabel," (",t.label,") ")}}function Ode(i,e){if(i&1&&S(0),i&2){let t=I().$implicit;Me(" ",t.label," ")}}function Rde(i,e){i&1&&Zi(0)}function Ade(i,e){if(i&1&&W(0,Rde,1,0,"ng-container",14),i&2){let t=I().$implicit;I();let n=ve(5);N("ngTemplateOutlet",n)("ngTemplateOutletContext",Pl(2,wG,t))}}function Nde(i,e){if(i&1&&(v(0,"tr")(1,"td",17)(2,"mat-icon",18),S(3,"circle"),y(),S(4),y(),v(5,"td",19),S(6),y()()),i&2){let t=e.$implicit,n=I(2).$implicit,r=I();se("search-match",r.isSearchMatched(n.metadata[t])),w(4),Me(" ",t,""),w(2),nt(n.metadata[t])}}function kde(i,e){if(i&1&&(v(0,"table",15),W(1,Nde,7,4,"tr",16),y()),i&2){let t=I().$implicit,n=I();w(),N("ngForOf",n.getSortedMetadataKeys(t))}}function Lde(i,e){if(i&1&&(v(0,"div",20)(1,"mat-icon",21),S(2,"my_location"),y()()),i&2){let t=I(2);N("matTooltip",t.locatorTooltip)("matTooltipPosition",t.tooltipPosition)}}function Fde(i,e){if(i&1&&(v(0,"div",23),S(1),y()),i&2){let t=I(3);w(),Me(" Showing at most ",t.getMaxConstValueCount()," elements ")}}function Bde(i,e){if(i&1&&(v(0,"div",22),W(1,Fde,2,1,"div",23),v(2,"div",24),S(3),y()()),i&2){let t=I().$implicit,n=I();w(),ae(n.getMaxConstValueCount()!==0?1:-1),w(2),nt(n.getConstValues(t))}}function Vde(i,e){if(i&1){let t=ie();v(0,"mat-tree-node",6)(1,"div",7),H("click",function(r){let o=V(t).$implicit,s=I();return z(s.handleLocateNode(o,r.altKey))}),v(2,"div",8)(3,"div",9)(4,"div",10)(5,"span",11),W(6,Pde,1,2)(7,Ode,1,1),y(),W(8,Ade,1,4,"ng-container"),y()(),W(9,kde,2,1,"table",12),y(),W(10,Lde,3,2,"div",13),y(),W(11,Bde,4,2,"ng-template",null,2,kt),y()}if(i&2){let t=e.$implicit,n=ve(12),r=I();se("has-locator",t.showLocator)("has-values",r.showHoverForValuesLabel(t))("highlight",t.highlight)("has-metadata",r.hasMetadata(t)),N("bubble",n)("overlaySize",r.constValuesPopupSize)("overlayPositions",r.constValuesPopupPosition)("hoverDelayMs",50)("bubbleDisabled",!r.showHoverForValuesLabel(t))("matTreeNodePaddingIndent",r.treeItemPadding),Ze("data-id",t.nodeId),w(2),se("has-extra-data",t.extraData!=null),w(3),se("color-bold",r.colorBoldNodeLabel)("search-match",r.isSearchMatched(t.label,t.boldLabel)),w(),ae(t.boldLabel?6:7),w(2),ae(t.extraData?8:-1),w(),N("ngIf",r.hasMetadata(t)),w(),N("ngIf",t.showLocator&&r.showLocator)}}function zde(i,e){i&1&&Zi(0)}function Ude(i,e){if(i&1&&W(0,zde,1,0,"ng-container",14),i&2){let t=I().$implicit;I();let n=ve(5);N("ngTemplateOutlet",n)("ngTemplateOutletContext",Pl(2,wG,t))}}function Hde(i,e){if(i&1&&(v(0,"div",20)(1,"mat-icon",21),S(2,"my_location"),y()()),i&2){let t=I(2);N("matTooltip",t.locatorTooltip)("matTooltipPosition",t.tooltipPosition)}}function Gde(i,e){if(i&1){let t=ie();v(0,"mat-tree-node",25)(1,"div",26),H("click",function(r){let o=V(t).$implicit,s=I();return z(s.handleLocateNode(o,r.altKey))}),v(2,"div",9)(3,"button",27)(4,"mat-icon",28),S(5),y()(),v(6,"div",10),S(7),W(8,Ude,1,4,"ng-container"),y()(),W(9,Hde,3,2,"div",13),y()()}if(i&2){let t=e.$implicit,n=I();se("has-locator",t.showLocator),N("matTreeNodePaddingIndent",n.treeItemPadding),Ze("data-id",t.nodeId),w(),se("highlight",t.highlightGroupLabel),w(),se("has-extra-data",t.extraData!=null),w(),Ze("aria-label","Toggle "+t.label),w(2),Me(" ",n.treeControl.isExpanded(t)?"keyboard_arrow_down":"chevron_right"," "),w(2),Me(" ",t.label," "),w(),ae(t.extraData?8:-1),w(),N("ngIf",t.showLocator&&n.showLocator)}}function jde(i,e){if(i&1&&(v(0,"div",30)(1,"mat-icon"),S(2),y()()),i&2){let t=e.$implicit,n=I(2);N("matTooltip",n.getExtraLabelTooltip(t)),w(2),nt(t)}}function Wde(i,e){if(i&1&&(v(0,"div",29),ln(1,jde,3,2,"div",30,Qr),y()),i&2){let t=e.node;w(),cn(t.extraData.matchTypes)}}var xc=(()=>{class i{appService;changeDetectorRef;data;solidBackground=!1;rendererId="";tooltipPosition="left";showLocator=!0;colorBoldNodeLabel=!1;onClose=new Pe;tree;constValuesPopupSize={minWidth:100};constValuesPopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top"}];locatorTooltip=`Click: locate +Alt+click: select`;transformer=(t,n)=>({nodeId:t.nodeId,node:t.node,expandable:!!t.children&&t.children.length>0,label:t.label,boldLabel:t.boldLabel,level:n,showLocator:t.showLocator,highlight:t.highlight,metadata:t.metadata,extraData:t.extraData});curSearchMatches=[];treeItemPadding=8;treeControl=new dC(t=>t.level,t=>t.expandable);treeFlattener=new pC(this.transformer,t=>t.level,t=>t.expandable,t=>t.children);dataSource=new fC(this.treeControl,this.treeFlattener);constructor(t,n){this.appService=t,this.changeDetectorRef=n}ngOnChanges(t){this.data!=null&&(this.dataSource.data=this.data,this.treeControl.expandAll())}updateData(t){this.data=t,this.dataSource.data=this.data,this.treeControl.expandAll(),this.changeDetectorRef.markForCheck()}updateSearchResults(t){this.curSearchMatches=t,this.changeDetectorRef.markForCheck()}handleLocateNode(t,n){t.showLocator&&(this.appService.curToLocateNodeInfo.set({nodeId:t.nodeId||"",rendererId:this.rendererId,isGroupNode:t.expandable,select:n}),this.onClose.emit({}))}hasChild(t,n){return n.expandable}hasMetadata(t){return t.metadata!=null&&Object.keys(t.metadata).length>0}getSortedMetadataKeys(t){return Object.keys(t.metadata||{}).filter(n=>!n.startsWith("__")).sort()}showHoverForValuesLabel(t){let n=t.node;if(!n)return!1;if(Et(n)){let r=n.attrs||{};if(r[ka])return r[ka]!=="DATA_ELIDED"}return!1}getMaxConstValueCount(){return this.appService.config()?.maxConstValueCount??0}getConstValues(t){let n=t.node;return n&&Et(n)?(n.attrs||{})[ka]||"":""}getExtraLabelTooltip(t){switch(t){case vt.NODE_LABEL:return"Node label matched";case vt.ATTRIBUTE:return"Node attribute(s) matched";case vt.INPUT_METADATA:return"Input(s) matched";case vt.OUTPUT_METADATA:return"Output(s) matched";default:return""}}isSearchMatched(t,n){return this.curSearchMatches?this.curSearchMatches.find(r=>r.matchedText===t||r.matchedText===n)!=null:!1}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["io-tree"]],viewQuery:function(n,r){if(n&1&&Ie(Dde,5),n&2){let o;be(o=ye())&&(r.tree=o.first)}},inputs:{data:"data",solidBackground:"solidBackground",rendererId:"rendererId",tooltipPosition:"tooltipPosition",showLocator:"showLocator",colorBoldNodeLabel:"colorBoldNodeLabel"},outputs:{onClose:"onClose"},standalone:!0,features:[dn,ce],decls:6,vars:7,consts:[["tree",""],["matchTypes",""],["constValuesPopup",""],[1,"io-tree",3,"dataSource","treeControl"],["class","leaf","matTreeNodePadding","",3,"has-locator","has-values","highlight","has-metadata","bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled","matTreeNodePaddingIndent",4,"matTreeNodeDef"],["matTreeNodePadding","",3,"has-locator","matTreeNodePaddingIndent",4,"matTreeNodeDef","matTreeNodeDefWhen"],["matTreeNodePadding","",1,"leaf",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled","matTreeNodePaddingIndent"],[1,"edge-node",3,"click"],[1,"label-and-metadata"],[1,"label-container"],[1,"label"],[1,"node-label"],["class","metadata-table",4,"ngIf"],["class","locator-container","matTooltipClass","multiline-tooltip-left",3,"matTooltip","matTooltipPosition",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"metadata-table"],[3,"search-match",4,"ngFor","ngForOf"],[1,"key"],[1,"bullet"],[1,"value"],["matTooltipClass","multiline-tooltip-left",1,"locator-container",3,"matTooltip","matTooltipPosition"],[1,"locator-icon"],[1,"model-explorer-const-values-popup"],[1,"values-count-msg"],[1,"content"],["matTreeNodePadding","",3,"matTreeNodePaddingIndent"],[1,"expandable-tree-node",3,"click"],["mat-icon-button","","matTreeNodeToggle","",1,"expand-icon-button"],[1,"expander"],[1,"match-types-container"],[1,"extra-label-container",3,"matTooltip"]],template:function(n,r){n&1&&(v(0,"mat-tree",3,0),W(2,Vde,13,25,"mat-tree-node",4)(3,Gde,10,13,"mat-tree-node",5),y(),W(4,Wde,3,0,"ng-template",null,1,kt)),n&2&&(se("solid-background",r.solidBackground),N("dataSource",r.dataSource)("treeControl",r.treeControl)("@transformPanel","showing")("@.disabled",!r.solidBackground),w(3),N("matTreeNodeDefWhen",r.hasChild))},dependencies:[$n,Ae,Ci,Mn,Bs,In,Ho,it,gt,Jt,Wn,gG,hG,pG,mG,fG,uG],styles:[`.io-tree[_ngcontent-%COMP%]{background-color:transparent;padding-top:4px}.io-tree.solid-background[_ngcontent-%COMP%]{transform-origin:top center;background-color:#fff;border:1px solid #ccc;border-radius:4px;padding-bottom:8px;min-width:270px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.io-tree[_ngcontent-%COMP%] mat-tree-node.has-locator[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] mat-tree-node.has-values[_ngcontent-%COMP%]{cursor:pointer}.io-tree[_ngcontent-%COMP%] mat-tree-node.has-locator[_ngcontent-%COMP%]:hover, .io-tree[_ngcontent-%COMP%] mat-tree-node.has-values[_ngcontent-%COMP%]:hover{background-color:#f3f3f3}.io-tree[_ngcontent-%COMP%] mat-tree-node.highlight[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#00639b;font-weight:500}.io-tree[_ngcontent-%COMP%] mat-tree-node[_ngcontent-%COMP%]:not(:last-child).has-metadata.leaf{margin-bottom:6px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;width:100%;box-sizing:border-box;padding-right:12px;padding-left:27px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%]:hover .locator-container[_ngcontent-%COMP%]{opacity:.8}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata.has-extra-data[_ngcontent-%COMP%]{width:100%}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata.has-extra-data[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{width:100%;justify-content:space-between}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .node-label.color-bold[_ngcontent-%COMP%]{color:#00639b;font-weight:500}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .node-label.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .hover-for-values-label[_ngcontent-%COMP%]{text-decoration:underline;text-decoration-style:dotted;color:#999;margin-left:8px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;padding:0;font-size:11px;margin-top:2px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{vertical-align:text-top}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] mat-icon.bullet[_ngcontent-%COMP%]{font-size:4px;width:5px;height:5px;color:#bbb;margin-right:2px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%]{color:#999;padding-right:4px;white-space:nowrap;line-height:12px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]{line-height:12px}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] mat-tree-node[_ngcontent-%COMP%]{font-size:13px;min-height:22px;word-break:break-word}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%]{color:#999;display:flex;align-items:center;justify-content:space-between;width:100%;box-sizing:border-box;padding-right:12px;padding-left:4px}.io-tree[_ngcontent-%COMP%] .expandable-tree-node.highlight[_ngcontent-%COMP%]{color:#000000de}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%]:hover .locator-container[_ngcontent-%COMP%]{opacity:.8}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] mat-icon.expander[_ngcontent-%COMP%]{color:#999}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container.has-extra-data[_ngcontent-%COMP%]{width:100%}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container.has-extra-data[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex-grow:1;justify-content:space-between}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .expand-icon-button[_ngcontent-%COMP%]{padding:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.io-tree[_ngcontent-%COMP%] .expand-icon-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;margin-top:6px}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%]{height:18px;opacity:.5;cursor:pointer;display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%] mat-icon.locator-icon[_ngcontent-%COMP%]{color:#333;font-size:16px;width:16px;height:16px}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%]:hover{opacity:.8}.io-tree[_ngcontent-%COMP%] .match-types-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-self:center;gap:2px;margin-left:8px}.io-tree[_ngcontent-%COMP%] .extra-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-self:center;padding:4px;border-radius:99px;background-color:#e8f0fe;box-sizing:border-box}.io-tree[_ngcontent-%COMP%] .extra-label-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#9da3a9}.io-tree[_ngcontent-%COMP%] .mat-mdc-button-touch-target{width:24px;height:24px}.io-tree-invisible[_ngcontent-%COMP%]{display:none}.io-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.io-tree[_ngcontent-%COMP%] .mat-nested-tree-node[_ngcontent-%COMP%] div[role=group][_ngcontent-%COMP%]{padding-left:8px}.io-tree[_ngcontent-%COMP%] div[role=group][_ngcontent-%COMP%] > .mat-tree-node[_ngcontent-%COMP%]{padding-left:16px} bubble-container:has(.model-explorer-const-values-popup){width:100%} .model-explorer-const-values-popup{padding:8px;font-size:11px;line-height:12px;background-color:#fff} .model-explorer-const-values-popup .values-count-msg{margin-bottom:8px;color:#999} .model-explorer-const-values-popup .content{white-space:pre-wrap;font-family:monospace} @@ -3213,7 +3213,7 @@ Alt+click: select`;transformer=(t,n)=>({nodeId:t.nodeId,node:t.node,expandable:! -`],data:{animation:mC},changeDetection:0})}return i})();function cl(i,e,t,n,r=[]){let o={label:"",children:[],type:t,isGroupNode:!0},s=[];for(let l=0;lf.label===c.label&&f.isGroupNode);if(p==null){let f={label:c.label,boldLabel:wG(d),nodeId:c.id,node:c,type:t,showLocator:!0,highlight:c.id===n,isGroupNode:c.nodeType===Gs.GROUP_NODE,metadata:d};u!=null&&(f.extraData=u),h.children.push(f)}else p.nodeId=c.id,p.showLocator=!0,p.extraData=u}}}o=qde(o);let a=[o];if(s.length>0){let l="weights";for(let c of s)if(!c.node.label.toLowerCase().includes("const")){l="";break}a.push({label:l,children:s.map(c=>({label:c.node.label,boldLabel:wG(c.metadata),nodeId:c.node.id,node:c.node,type:t,showLocator:!1,highlight:c.node.id===n,isGroupNode:!1,metadata:e[c.index]})),type:t,isGroupNode:!1})}return a}function wG(i){if(i)return i[Bo]}function $de(i,e){let t=i?["",...i.split("/")]:[""],n,r=[];for(let o of t)if(o!==""&&r.push(o),o==="")n=e;else{n&&!n.children&&(n.children=[]);let s=n.children.find(a=>a.label===o);if(s==null){let a={label:o,children:[],type:e.type,isGroupNode:!0};n.children.push(a),n=a}else n=s}return n}function qde(i){let e=i,t=[];for(;t.push(e.label),e?.children&&e.children.length===1&&(e.children[0].children||[]).length>0&&!e.showLocator;)e=e.children[0];return e!==i&&(e.label=t.join(" / ")),e}var Yde=Nn,wr=(()=>{class i{charsInfoRegular={};charsInfoMedium={};charsInfoBold={};charsInfoIcons={};textureRegular;textureMedium;textureBold;textureIcons;fontInfoRegular;fontInfoMedium;fontInfoBold;fontInfoIcons;depsLoadedPromise;constructor(){this.depsLoadedPromise=new Promise(t=>At(this,null,function*(){yield this.loadDeps(),t()}))}loadDeps(){return At(this,null,function*(){let t="/static_files",n=yield Promise.all([this.loadFontAtals(`${t}/GoogleSansTextRegular.png`),this.loadFontAtals(`${t}/GoogleSansTextMedium.png`),this.loadFontAtals(`${t}/GoogleSansTextBold.png`),this.loadFontAtals(`${t}/icons_20240521.png`),this.loadFontInfo(`${t}/GoogleSansTextRegular.json`),this.loadFontInfo(`${t}/GoogleSansTextMedium.json`),this.loadFontInfo(`${t}/GoogleSansTextBold.json`),this.loadFontInfo(`${t}/icons_20240521.json`)]);this.textureRegular=n[0],this.textureMedium=n[1],this.textureBold=n[2],this.textureIcons=n[3],this.charsInfoRegular=n[4].charsInfo,this.charsInfoMedium=n[5].charsInfo,this.charsInfoBold=n[6].charsInfo,this.charsInfoIcons=n[7].charsInfo,this.fontInfoRegular=n[4].fontInfo,this.fontInfoMedium=n[5].fontInfo,this.fontInfoBold=n[6].fontInfo,this.fontInfoIcons=n[7].fontInfo})}getCharsInfo(t){switch(t){case mn.REGULAR:return this.charsInfoRegular;case mn.MEDIUM:return this.charsInfoMedium;case mn.BOLD:return this.charsInfoBold;case mn.ICONS:return this.charsInfoIcons;default:return this.charsInfoRegular}}getFontInfo(t){switch(t){case mn.REGULAR:return this.fontInfoRegular;case mn.MEDIUM:return this.fontInfoMedium;case mn.BOLD:return this.fontInfoBold;case mn.ICONS:return this.fontInfoIcons;default:return this.fontInfoRegular}}loadFontAtals(t){return At(this,null,function*(){return new Promise(n=>{new Yde.TextureLoader().load(t,r=>{n(r)})})})}loadFontInfo(t){return At(this,null,function*(){let r=yield(yield fetch(t)).json(),o={};for(let s of r.chars)o[s.char]=s;return{fontInfo:r,charsInfo:o}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var lr=Nn,Xde=` +`],data:{animation:gC},changeDetection:0})}return i})();function cl(i,e,t,n,r=[]){let o={label:"",children:[],type:t,isGroupNode:!0},s=[];for(let l=0;lf.label===c.label&&f.isGroupNode);if(p==null){let f={label:c.label,boldLabel:xG(d),nodeId:c.id,node:c,type:t,showLocator:!0,highlight:c.id===n,isGroupNode:c.nodeType===Gs.GROUP_NODE,metadata:d};u!=null&&(f.extraData=u),h.children.push(f)}else p.nodeId=c.id,p.showLocator=!0,p.extraData=u}}}o=qde(o);let a=[o];if(s.length>0){let l="weights";for(let c of s)if(!c.node.label.toLowerCase().includes("const")){l="";break}a.push({label:l,children:s.map(c=>({label:c.node.label,boldLabel:xG(c.metadata),nodeId:c.node.id,node:c.node,type:t,showLocator:!1,highlight:c.node.id===n,isGroupNode:!1,metadata:e[c.index]})),type:t,isGroupNode:!1})}return a}function xG(i){if(i)return i[Bo]}function $de(i,e){let t=i?["",...i.split("/")]:[""],n,r=[];for(let o of t)if(o!==""&&r.push(o),o==="")n=e;else{n&&!n.children&&(n.children=[]);let s=n.children.find(a=>a.label===o);if(s==null){let a={label:o,children:[],type:e.type,isGroupNode:!0};n.children.push(a),n=a}else n=s}return n}function qde(i){let e=i,t=[];for(;t.push(e.label),e?.children&&e.children.length===1&&(e.children[0].children||[]).length>0&&!e.showLocator;)e=e.children[0];return e!==i&&(e.label=t.join(" / ")),e}var Yde=Nn,wr=(()=>{class i{charsInfoRegular={};charsInfoMedium={};charsInfoBold={};charsInfoIcons={};textureRegular;textureMedium;textureBold;textureIcons;fontInfoRegular;fontInfoMedium;fontInfoBold;fontInfoIcons;depsLoadedPromise;constructor(){this.depsLoadedPromise=new Promise(t=>At(this,null,function*(){yield this.loadDeps(),t()}))}loadDeps(){return At(this,null,function*(){let t="/static_files",n=yield Promise.all([this.loadFontAtals(`${t}/GoogleSansTextRegular.png`),this.loadFontAtals(`${t}/GoogleSansTextMedium.png`),this.loadFontAtals(`${t}/GoogleSansTextBold.png`),this.loadFontAtals(`${t}/icons_20240521.png`),this.loadFontInfo(`${t}/GoogleSansTextRegular.json`),this.loadFontInfo(`${t}/GoogleSansTextMedium.json`),this.loadFontInfo(`${t}/GoogleSansTextBold.json`),this.loadFontInfo(`${t}/icons_20240521.json`)]);this.textureRegular=n[0],this.textureMedium=n[1],this.textureBold=n[2],this.textureIcons=n[3],this.charsInfoRegular=n[4].charsInfo,this.charsInfoMedium=n[5].charsInfo,this.charsInfoBold=n[6].charsInfo,this.charsInfoIcons=n[7].charsInfo,this.fontInfoRegular=n[4].fontInfo,this.fontInfoMedium=n[5].fontInfo,this.fontInfoBold=n[6].fontInfo,this.fontInfoIcons=n[7].fontInfo})}getCharsInfo(t){switch(t){case mn.REGULAR:return this.charsInfoRegular;case mn.MEDIUM:return this.charsInfoMedium;case mn.BOLD:return this.charsInfoBold;case mn.ICONS:return this.charsInfoIcons;default:return this.charsInfoRegular}}getFontInfo(t){switch(t){case mn.REGULAR:return this.fontInfoRegular;case mn.MEDIUM:return this.fontInfoMedium;case mn.BOLD:return this.fontInfoBold;case mn.ICONS:return this.fontInfoIcons;default:return this.fontInfoRegular}}loadFontAtals(t){return At(this,null,function*(){return new Promise(n=>{new Yde.TextureLoader().load(t,r=>{n(r)})})})}loadFontInfo(t){return At(this,null,function*(){let r=yield(yield fetch(t)).json(),o={};for(let s of r.chars)o[s.char]=s;return{fontInfo:r,charsInfo:o}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var lr=Nn,Xde=` precision highp float; #define PI 3.1415926535897932384626433832795 @@ -3340,7 +3340,7 @@ varying vec3 vColor; void main() { gl_FragColor = vec4(vColor, 1.0); } -`,CO=6,SO=6,Jde=4,vu=class{color;edgeWidth;edgesMesh;material;arrowHeadMat;arrowHeadsMesh;planeGeo;arrowHeadGeometry;savedEdgeSegments={};savedEdges={};savedArrowHeads={};curAnimationProgrssUniform={value:-1};originalColors=[];originalYOffsets=[];originalArrowHeadYOffsets=[];lastColorUpdateEdgeSegments=[];lastColorUpdateArrowHeads=[];lastYOffsetsUpdateEdgeSegments=[];lastYOffsetsUpdateArrowHeads=[];constructor(e,t){this.color=e,this.edgeWidth=t,this.planeGeo=new lr.PlaneGeometry(1,1),this.planeGeo.rotateX(-Math.PI/2),this.material=new lr.ShaderMaterial({uniforms:{edgeWidth:{value:this.edgeWidth},animationProgress:this.curAnimationProgrssUniform},vertexShader:Xde,fragmentShader:Zde,transparent:!0});let n=new lr.Shape;n.moveTo(-CO/2,-SO).lineTo(0,-Jde).lineTo(CO/2,-SO).lineTo(0,0).lineTo(-CO/2,-SO),this.arrowHeadGeometry=new lr.ShapeGeometry(n),this.arrowHeadGeometry.rotateX(-Math.PI/2),this.arrowHeadMat=new lr.ShaderMaterial({uniforms:{animationProgress:this.curAnimationProgrssUniform},vertexShader:Qde,fragmentShader:Kde,transparent:!0})}generateMesh(e,t,n=!1){if(e.length===0){this.edgesMesh=void 0,this.arrowHeadsMesh=void 0;return}let r=[],o=[],s=[],a=[],l=[],c=[],d=[],u=[],h={},p={};this.savedEdges={};let f=0,m=0;for(let{edge:_,index:x}of e){let C=_.curvePoints||[],T=t.nodesById[_.fromNodeId],D=t.nodesById[_.toNodeId],E=T.globalX||0,P=T.globalY||0;for(let Y=0;Y0)for(let r of e)for(let o of this.savedEdges[r]||[]){let s=o.index;n.setXYZ(s,t.r,t.g,t.b),this.lastColorUpdateEdgeSegments.push(o)}n.needsUpdate=!0}if(this.arrowHeadsMesh){let n=this.arrowHeadsMesh.geometry.getAttribute("color");if(e.length>0)for(let r of e){let o=this.savedArrowHeads[r],s=o.index;n.setXYZ(s,t.r,t.g,t.b),this.lastColorUpdateArrowHeads.push(o)}n.needsUpdate=!0}}updateYOffsets(e,t){if(this.edgesMesh){let n=this.edgesMesh.geometry.getAttribute("yOffset");if(e.length>0)for(let r of e)for(let o of this.savedEdges[r]||[]){let s=o.index;n.setX(s,t),this.lastYOffsetsUpdateEdgeSegments.push(o)}n.needsUpdate=!0}if(this.arrowHeadsMesh){let n=this.arrowHeadsMesh.geometry.getAttribute("yOffset");if(e.length>0)for(let r of e){let o=this.savedArrowHeads[r],s=o.index;n.setX(s,t),this.lastYOffsetsUpdateArrowHeads.push(o)}n.needsUpdate=!0}}restoreColors(){if(this.edgesMesh){let e=this.edgesMesh.geometry.getAttribute("color");if(this.lastColorUpdateEdgeSegments.length>0){for(let t of this.lastColorUpdateEdgeSegments){let n=t.index;e.setXYZ(n,this.originalColors[n*3],this.originalColors[n*3+1],this.originalColors[n*3+2])}e.needsUpdate=!0}this.lastColorUpdateEdgeSegments=[]}if(this.arrowHeadsMesh){let e=this.arrowHeadsMesh.geometry.getAttribute("color");if(this.lastColorUpdateArrowHeads.length>0){for(let t of this.lastColorUpdateArrowHeads){let n=t.index;e.setXYZ(n,this.originalColors[n*3],this.originalColors[n*3+1],this.originalColors[n*3+2])}e.needsUpdate=!0}this.lastColorUpdateArrowHeads=[]}}restoreYOffsets(){if(this.edgesMesh){let e=this.edgesMesh.geometry.getAttribute("yOffset");if(this.lastYOffsetsUpdateEdgeSegments.length>0){for(let t of this.lastYOffsetsUpdateEdgeSegments){let n=t.index;e.setX(n,this.originalYOffsets[n])}e.needsUpdate=!0}this.lastYOffsetsUpdateEdgeSegments=[]}if(this.arrowHeadsMesh){let e=this.arrowHeadsMesh.geometry.getAttribute("yOffset");if(this.lastYOffsetsUpdateArrowHeads.length>0){for(let t of this.lastYOffsetsUpdateArrowHeads){let n=t.index;e.setX(n,this.originalArrowHeadYOffsets[n])}e.needsUpdate=!0}this.lastYOffsetsUpdateArrowHeads=[]}}clear(){this.edgesMesh&&this.edgesMesh.removeFromParent(),this.arrowHeadsMesh&&this.arrowHeadsMesh.removeFromParent()}clearSavedDataForAnimation(){this.savedEdgeSegments={},this.savedEdges={},this.savedArrowHeads={}}updateAnimationProgress(e){this.edgesMesh&&(this.curAnimationProgrssUniform.value=e)}};var ji=Nn,eue=` +`,wO=6,CO=6,Jde=4,vu=class{color;edgeWidth;edgesMesh;material;arrowHeadMat;arrowHeadsMesh;planeGeo;arrowHeadGeometry;savedEdgeSegments={};savedEdges={};savedArrowHeads={};curAnimationProgrssUniform={value:-1};originalColors=[];originalYOffsets=[];originalArrowHeadYOffsets=[];lastColorUpdateEdgeSegments=[];lastColorUpdateArrowHeads=[];lastYOffsetsUpdateEdgeSegments=[];lastYOffsetsUpdateArrowHeads=[];constructor(e,t){this.color=e,this.edgeWidth=t,this.planeGeo=new lr.PlaneGeometry(1,1),this.planeGeo.rotateX(-Math.PI/2),this.material=new lr.ShaderMaterial({uniforms:{edgeWidth:{value:this.edgeWidth},animationProgress:this.curAnimationProgrssUniform},vertexShader:Xde,fragmentShader:Zde,transparent:!0});let n=new lr.Shape;n.moveTo(-wO/2,-CO).lineTo(0,-Jde).lineTo(wO/2,-CO).lineTo(0,0).lineTo(-wO/2,-CO),this.arrowHeadGeometry=new lr.ShapeGeometry(n),this.arrowHeadGeometry.rotateX(-Math.PI/2),this.arrowHeadMat=new lr.ShaderMaterial({uniforms:{animationProgress:this.curAnimationProgrssUniform},vertexShader:Qde,fragmentShader:Kde,transparent:!0})}generateMesh(e,t,n=!1){if(e.length===0){this.edgesMesh=void 0,this.arrowHeadsMesh=void 0;return}let r=[],o=[],s=[],a=[],l=[],c=[],d=[],u=[],h={},p={};this.savedEdges={};let f=0,m=0;for(let{edge:_,index:x}of e){let C=_.curvePoints||[],T=t.nodesById[_.fromNodeId],D=t.nodesById[_.toNodeId],E=T.globalX||0,P=T.globalY||0;for(let Y=0;Y0)for(let r of e)for(let o of this.savedEdges[r]||[]){let s=o.index;n.setXYZ(s,t.r,t.g,t.b),this.lastColorUpdateEdgeSegments.push(o)}n.needsUpdate=!0}if(this.arrowHeadsMesh){let n=this.arrowHeadsMesh.geometry.getAttribute("color");if(e.length>0)for(let r of e){let o=this.savedArrowHeads[r],s=o.index;n.setXYZ(s,t.r,t.g,t.b),this.lastColorUpdateArrowHeads.push(o)}n.needsUpdate=!0}}updateYOffsets(e,t){if(this.edgesMesh){let n=this.edgesMesh.geometry.getAttribute("yOffset");if(e.length>0)for(let r of e)for(let o of this.savedEdges[r]||[]){let s=o.index;n.setX(s,t),this.lastYOffsetsUpdateEdgeSegments.push(o)}n.needsUpdate=!0}if(this.arrowHeadsMesh){let n=this.arrowHeadsMesh.geometry.getAttribute("yOffset");if(e.length>0)for(let r of e){let o=this.savedArrowHeads[r],s=o.index;n.setX(s,t),this.lastYOffsetsUpdateArrowHeads.push(o)}n.needsUpdate=!0}}restoreColors(){if(this.edgesMesh){let e=this.edgesMesh.geometry.getAttribute("color");if(this.lastColorUpdateEdgeSegments.length>0){for(let t of this.lastColorUpdateEdgeSegments){let n=t.index;e.setXYZ(n,this.originalColors[n*3],this.originalColors[n*3+1],this.originalColors[n*3+2])}e.needsUpdate=!0}this.lastColorUpdateEdgeSegments=[]}if(this.arrowHeadsMesh){let e=this.arrowHeadsMesh.geometry.getAttribute("color");if(this.lastColorUpdateArrowHeads.length>0){for(let t of this.lastColorUpdateArrowHeads){let n=t.index;e.setXYZ(n,this.originalColors[n*3],this.originalColors[n*3+1],this.originalColors[n*3+2])}e.needsUpdate=!0}this.lastColorUpdateArrowHeads=[]}}restoreYOffsets(){if(this.edgesMesh){let e=this.edgesMesh.geometry.getAttribute("yOffset");if(this.lastYOffsetsUpdateEdgeSegments.length>0){for(let t of this.lastYOffsetsUpdateEdgeSegments){let n=t.index;e.setX(n,this.originalYOffsets[n])}e.needsUpdate=!0}this.lastYOffsetsUpdateEdgeSegments=[]}if(this.arrowHeadsMesh){let e=this.arrowHeadsMesh.geometry.getAttribute("yOffset");if(this.lastYOffsetsUpdateArrowHeads.length>0){for(let t of this.lastYOffsetsUpdateArrowHeads){let n=t.index;e.setX(n,this.originalArrowHeadYOffsets[n])}e.needsUpdate=!0}this.lastYOffsetsUpdateArrowHeads=[]}}clear(){this.edgesMesh&&this.edgesMesh.removeFromParent(),this.arrowHeadsMesh&&this.arrowHeadsMesh.removeFromParent()}clearSavedDataForAnimation(){this.savedEdgeSegments={},this.savedEdges={},this.savedArrowHeads={}}updateAnimationProgress(e){this.edgesMesh&&(this.curAnimationProgrssUniform.value=e)}};var ji=Nn,eue=` precision highp float; uniform float borderRadius; @@ -3647,11 +3647,11 @@ void main() { } gl_FragColor = vec4(color, opacity); } -`,Wi=class{threejsService;mesh;material;planeGeo;labelCharSizesCache={};fontSize;distanceRange;savedBounds={};nodeIdToOpacityIndexRanges={};nodeIdToColorIndexRanges={};lastOpacityUpdateIndexRanges=[];lastColorUpdateIndexRanges=[];originalColors=[];curAnimationProgrssUniform={value:-1};constructor(e){this.threejsService=e,this.planeGeo=new eo.PlaneGeometry(1,1),this.planeGeo.rotateX(-Math.PI/2),this.fontSize=this.threejsService.fontInfoRegular.info.size,this.distanceRange=this.threejsService.fontInfoRegular.distanceField.distanceRange,this.material=new eo.ShaderMaterial({uniforms:{textureRegular:{value:this.threejsService.textureRegular},textureMedium:{value:this.threejsService.textureMedium},textureBold:{value:this.threejsService.textureBold},textureIcons:{value:this.threejsService.textureIcons},distanceRange:{value:this.distanceRange},animationProgress:this.curAnimationProgrssUniform},extensions:{derivatives:!0},vertexShader:nue,fragmentShader:iue,transparent:!0,alphaToCoverage:!0})}generateMesh(e,t=!1,n=!1,r=!1){let o=0;this.nodeIdToOpacityIndexRanges={},this.nodeIdToColorIndexRanges={};let s=[],a=[],l=[],c=[],d=[],u=[],h=[],p=[],f=[],m=[],b=Object.keys(this.savedBounds).length>0,g=Z({},this.savedBounds);this.savedBounds={};for(let x of e){let C=this.threejsService.getCharsInfo(x.weight),D=this.threejsService.getFontInfo(x.weight).common.scaleW,E=this.getLabelSizes(x.label,x.weight,x.height,x.maxWidth,x.treatLabelAsAWhole,x.angle,x.edgeTextMode).sizes,P=x.height/this.fontSize,Y=x.x,$=x.z,O=(x.treatLabelAsAWhole?{rects:[{x:0,y:0,width:20,height:x.height}]}:this.getLabelSizes("a",x.weight,x.height).sizes).rects[0].height*P;switch(x.vAlign){case"top":$-=E.minZ*P;break;case"bottom":$-=E.maxZ*P;break;case"center":$-=(E.minZ+E.maxZ)/2*P+O/2;break;default:break}switch(x.hAlign){case"left":Y-=E.minX*P;break;case"right":Y-=E.maxX*P;break;case"center":Y-=(E.minX+E.maxX)/2*P;break;default:break}let B=x.y,j=u.length;for(let q=0;q0){for(let r of e)if(this.nodeIdToOpacityIndexRanges[r])for(let{minIndex:o,maxIndex:s}of this.nodeIdToOpacityIndexRanges[r]){for(let a=o;a<=s;a++)n.setX(a,t);this.lastOpacityUpdateIndexRanges.push({minIndex:o,maxIndex:s})}}n.needsUpdate=!0}updateColorInNode(e,t){if(!this.mesh)return;let n=this.mesh.geometry.getAttribute("color");if(e.length>0){for(let r of e)if(this.nodeIdToColorIndexRanges[r])for(let{minIndex:o,maxIndex:s}of this.nodeIdToColorIndexRanges[r]){for(let a=o;a<=s;a++)n.setXYZ(a,t.r,t.g,t.b);this.lastColorUpdateIndexRanges.push({minIndex:o,maxIndex:s})}}n.needsUpdate=!0}restoreOpacities(){if(!this.mesh)return;let e=this.mesh.geometry.getAttribute("opacity");if(this.lastOpacityUpdateIndexRanges.length>=0){for(let{minIndex:t,maxIndex:n}of this.lastOpacityUpdateIndexRanges)for(let r=t;r<=n;r++)e.setX(r,1);e.needsUpdate=!0}this.lastOpacityUpdateIndexRanges=[]}restoreColors(){if(!this.mesh)return;let e=this.mesh.geometry.getAttribute("color");if(this.lastColorUpdateIndexRanges.length>=0){for(let{minIndex:t,maxIndex:n}of this.lastColorUpdateIndexRanges)for(let r=t;r<=n;r++)e.setXYZ(r,this.originalColors[r*3],this.originalColors[r*3+1],this.originalColors[r*3+2]);e.needsUpdate=!0}this.lastColorUpdateIndexRanges=[]}updateAnimationProgress(e){this.curAnimationProgrssUniform.value=e}getLabelSizes(e,t,n,r,o,s,a){let l=this.getLabelCharSizesKey(e,t,s),c=this.labelCharSizesCache[l],d;if(c==null){if(c=this.getLabelSizesInternal(e,t,o,s,a),r!=null){let u=n/this.fontSize,h=e;for(let p=0;pr){h=h.substring(0,p-1),h+="...";break}}d=h,c=this.getLabelSizesInternal(h,t,o),l=this.getLabelCharSizesKey(h,t)}this.labelCharSizesCache[l]=c}return{sizes:this.labelCharSizesCache[l],updatedLabel:d}}updateLabelSizesCache(e,t,n){let r=this.getLabelCharSizesKey(e,t);this.labelCharSizesCache[r]=n}getFontSize(){return this.fontSize}clearSavedDataForAnimation(){this.savedBounds={}}getLabelCharSizesKey(e,t,n){return`${e}__${t}__${n}`}getLabelSizesInternal(e,t,n,r,o){let s=this.threejsService.getCharsInfo(t),a=[],l=0,c=Number.MAX_VALUE,d=Number.MAX_VALUE,u=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;for(let p of n?[e]:e){let f=s[p];f||(f=s["?"]);let m=f.yoffset;o?(l+=Math.sin(r||0)*(f.yoffset+f.height/2),m=Math.cos(r||0)*(f.yoffset+f.height/2)):l+=f.xoffset;let b=f.width,g=f.height,_={x:l,y:m,width:b,height:g};a.push(_),c=Math.min(c,_.x),d=Math.min(d,_.y),u=Math.max(u,_.x+_.width),h=Math.max(h,_.y+_.height),l+=f.xadvance*.98}return{rects:a,minX:c,minZ:0,maxX:u,maxZ:this.fontSize}}};var MG=26;var rue=Kt*.2,EG=Kt*.4,IG=Nn,gC=(()=>{class i{ATTRS_TABLE_KEY_COLOR=new IG.Color("#808080");ATTRS_TABLE_VALUE_COLOR=new IG.Color("#0d0d0d");threejsService=te(wr);attrsTableTexts=new Wi(this.threejsService);webglRenderer;webglRendererThreejsService;attrsTableBgs=new Pi(4);init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}renderAttrsTable(){if(Object.keys(this.webglRenderer.curShowOnNodeItemTypes).filter(s=>this.webglRenderer.curShowOnNodeItemTypes[s].selected).length===0)return;let t=[],r=9/this.attrsTableTexts.getFontSize(),o=[];for(let{node:s,index:a}of this.webglRenderer.nodesToRender){let l=[],c=MG+AI-4+YI(s.label),d=0,u=0,h=[];if(Et(s)){let m=BI(this.webglRenderer.curShowOnNodeItemTypes);for(let b of m){let g=Yb(s,b);h.push({key:b,value:g})}this.webglRenderer.curShowOnNodeItemTypes[Rn.OP_ATTRS]?.selected&&h.push(...UI(s,this.webglRenderer.curShowOnNodeItemTypes[Rn.OP_ATTRS]?.filterRegex||"")),this.webglRenderer.curShowOnNodeItemTypes[Rn.OP_INPUTS]?.selected&&h.push(...GI(s,this.webglRenderer.curModelGraph)),this.webglRenderer.curShowOnNodeItemTypes[Rn.OP_OUTPUTS]?.selected&&h.push(...jI(s)),h.push(...WI(s,this.webglRenderer.curModelGraph.id,this.webglRenderer.curShowOnNodeItemTypes,this.webglRenderer.curNodeDataProviderRuns))}else if(xt(s)){let m=VI(this.webglRenderer.curShowOnNodeItemTypes);for(let b of m){let g=Yb(s,b);h.push({key:b,value:g})}this.webglRenderer.curShowOnNodeItemTypes[Rn.LAYER_NODE_ATTRS]?.selected&&h.push(...HI(s,this.webglRenderer.curModelGraph,this.webglRenderer.curShowOnNodeItemTypes[Rn.LAYER_NODE_ATTRS]?.filterRegex||""))}for(let{key:m,value:b}of h){let{keyLabelData:g,keyLabelWidth:_,valueLabelData:x,valueLabelWidth:C}=this.createAttrsTableKeyValueLabels(s,a,m,b,c,r);t.push(g,x),d=Math.max(_,d),u=Math.max(C,u),l.push({keyLabelData:g,valueLabelData:x}),c+=Em}let p=d+u+Hb,f=(this.webglRenderer.getNodeWidth(s)-p)/2;for(let m of l)m.keyLabelData.x=this.webglRenderer.getNodeX(s)+d,m.valueLabelData.x=this.webglRenderer.getNodeX(s)+d+Hb,m.keyLabelData.x+=f,m.valueLabelData.x+=f;if(l.length>0&&Et(s)){let b=this.webglRenderer.getNodeWidth(s)-16,g=l.length*Em;o.push({id:s.id,index:o.length,bound:{x:this.webglRenderer.getNodeX(s)+16/2+b/2,y:l[0].keyLabelData.z+g/2-Em/2,width:b,height:g},yOffset:Kt*a+rue,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:{r:1,g:1,b:1},borderWidth:1,opacity:1})}}t.length>0&&(this.attrsTableTexts.generateMesh(t),this.webglRendererThreejsService.addToScene(this.attrsTableTexts.mesh),this.attrsTableBgs.generateMesh(o),this.webglRendererThreejsService.addToScene(this.attrsTableBgs.mesh))}updateAnimationProgress(t){this.attrsTableTexts.updateAnimationProgress(t),this.attrsTableBgs.updateAnimationProgress(t)}createAttrsTableKeyValueLabels(t,n,r,o,s,a){let l={id:`${t.id}_attrs_table_${r}_key`,nodeId:t.id,label:`${r}:`,height:9,hAlign:"right",vAlign:"center",weight:mn.MEDIUM,x:this.webglRenderer.getNodeX(t),y:n*Kt+EG,z:this.webglRenderer.getNodeY(t)+s,color:this.ATTRS_TABLE_KEY_COLOR},c=this.attrsTableTexts.getLabelSizes(l.label,l.weight,l.height).sizes,d=(c.maxX-c.minX)*a,u={id:`${t.id}_attrs_table_${r}_value`,nodeId:t.id,label:o,height:9,hAlign:"left",vAlign:"center",weight:mn.REGULAR,x:this.webglRenderer.getNodeX(t),y:n*Kt+EG,z:this.webglRenderer.getNodeY(t)+s,color:this.ATTRS_TABLE_VALUE_COLOR,maxWidth:NI},{sizes:h,updatedLabel:p}=this.attrsTableTexts.getLabelSizes(u.label,u.weight,u.height,u.maxWidth);p!=null&&(u.label=p);let f=(h.maxX-h.minX)*a;return{keyLabelData:l,keyLabelWidth:d,valueLabelData:u,valueLabelWidth:f}}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var W_=Nn,_C=(()=>{class i{appService;EDGE_TEXT_COLOR=new W_.Color("#041E49");threejsService=te(wr);edgeTexts=new Wi(this.threejsService);webglRenderer;webglRendererThreejsService;constructor(t){this.appService=t}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}renderEdgeTexts(){let t=this.genLabelsOnEdges(this.webglRenderer.edgesToRender,this.EDGE_TEXT_COLOR);this.edgeTexts.generateMesh(t),this.webglRendererThreejsService.addToScene(this.edgeTexts.mesh)}genLabelsOnEdges(t,n){let r=this.appService.config()?.edgeLabelFontSize||$b,o=this.appService.config()?.disallowVerticalEdgeLabels||!1,s=[],a=this.threejsService.getCharsInfo(mn.MEDIUM);for(let{edge:l}of t){let c=this.webglRenderer.curModelGraph.nodesById[l.fromNodeId],d=this.webglRenderer.curModelGraph.nodesById[l.toNodeId];if(!Et(c)||!Et(d))continue;let u="?",h=c.outputsMetadata||{};for(let T of Object.keys(h))if((c.outgoingEdges||[]).find(E=>E.sourceNodeOutputId===T&&E.targetNodeId===l.toNodeId)!=null){u=h[T].shape||"?",u=u.split("").map(E=>(E==="x"&&(E="x"),E==="\u2217"&&(E="*"),E===""&&(E=""),a[E]==null?"?":E)).join("");break}let p=l.curvePoints||[],f=c.globalX||0,m=c.globalY||0,b=new W_.CurvePath;for(let T=0;T1,C=()=>{let T=b.getPointAt(.5);s.push({id:`${l.id}_${u}`,nodeId:l.toNodeId,label:u,height:r,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,x:T.x,y:95,z:T.y,color:n,borderColor:{r:1,g:1,b:1}})};if(x)C();else{let T=[],D=Math.max(0,Math.min(.25,1-u.length*_-5/g)),E=Math.max(.05,1-5/g-D-_*u.length),P=.05,Y=!0,$=r/this.edgeTexts.getFontSize();for(let U=0;U=Math.PI/4&&de<=Math.PI*1.75){Y=!1;break}if(T.push({pos:G,position:Math.min(j,1),angle:de,tan:K,char:k}),B!=null){let he=Math.abs(de-B);if(Math.min(he,Math.abs(he-Math.PI))>.15&&(Y=!1,U+.05=T[T.length-1].pos.x;if(U){let O=[],B=T[0].position;for(let j=u.length-1;j>=0;j--){let q=u[j],k=b.getPointAt(Math.min(1,B)),G=b.getTangentAt(Math.min(1,B)),K=(Math.PI*2-Math.atan(G.y/G.x))%(Math.PI*2);K<0&&(K+=Math.PI*2),O.push({pos:k,angle:K,tan:G,position:B,char:q});let de=a[q],Te=0;j>=1&&(Te=a[u[j-1]].xadvance);let Ee=(de.xadvance/2+Te/2)*$/g;B+=Ee}T=O}for(let O=0;O{class i{EDGE_COLOR_INCOMING=new nf.Color("#009e73");EDGE_TEXT_COLOR_INCOMING=new nf.Color("#125341");EDGE_COLOR_OUTGOING=new nf.Color("#d55e00");EDGE_TEXT_COLOR_OUTGOING=new nf.Color("#994d11");inputsRenderedEdges=[];outputsRenderedEdges=[];inputsByHighlightedNode={};outputsByHighlightedNode={};webglRenderer;webglRendererThreejsService;threejsService=te(wr);ioPickerBgs=new Pi(99);ioPickerTexts=new Wi(this.threejsService);incomingHighlightedEdges=new vu(this.EDGE_COLOR_INCOMING,TG);outgoingHighlightedEdges=new vu(this.EDGE_COLOR_OUTGOING,TG);incomingHighlightedEdgeTexts=new Wi(this.threejsService);outgoingHighlightedEdgeTexts=new Wi(this.threejsService);init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}updateIncomingAndOutgoingHighlights(){if(!this.webglRenderer.curModelGraph)return;if(this.clearIncomingAndOutgoingHighlights(),!this.shouldUpdateIncomingAndOutgoingEdgesHighlights()){this.incomingHighlightedEdges.clearSavedDataForAnimation(),this.outgoingHighlightedEdges.clearSavedDataForAnimation(),this.incomingHighlightedEdgeTexts.clearSavedDataForAnimation(),this.outgoingHighlightedEdgeTexts.clearSavedDataForAnimation(),this.ioPickerBgs.clearSavedDataForAnimation(),this.ioPickerTexts.clearSavedDataForAnimation();return}let t=this.webglRenderer.appService.config()?.showOpNodeOutOfLayerEdgesWithoutSelecting,n=this.getHighlightedIncomingNodesAndEdges(this.webglRenderer.curHiddenInputOpNodeIds,void 0,{reuseRenderedEdgeCurvePoints:t});if(n.overlayEdges.length>0){let a=n.overlayEdges.map(l=>t?{edge:l,index:95/Kt}:{edge:wt(Z({},l),{curvePoints:bh(l.points,qh,Yh,nf)}),index:95/Kt});if(this.incomingHighlightedEdges.generateMesh(a,this.webglRenderer.curModelGraph),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdges.edgesMesh),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdges.arrowHeadsMesh),this.webglRenderer.curShowOnEdgeItemTypes[Fl.TENSOR_SHAPE]?.selected){let l=this.webglRenderer.webglRendererEdgeTextsService.genLabelsOnEdges(a,this.EDGE_TEXT_COLOR_INCOMING);this.incomingHighlightedEdgeTexts.generateMesh(l,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdgeTexts.mesh)}}this.inputsByHighlightedNode=n.inputsByHighlightedNode,this.inputsRenderedEdges=n.renderedEdges;let r=this.getHighlightedOutgoingNodesAndEdges(this.webglRenderer.curHiddenOutputIds,void 0,{reuseRenderedEdgeCurvePoints:t});if(r.overlayEdges.length>0){let a=r.overlayEdges.map(l=>t?{edge:l,index:95/Kt}:{edge:wt(Z({},l),{curvePoints:bh(l.points,qh,Yh,nf)}),index:95/Kt});if(this.outgoingHighlightedEdges.generateMesh(a,this.webglRenderer.curModelGraph),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdges.edgesMesh),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdges.arrowHeadsMesh),this.webglRenderer.curShowOnEdgeItemTypes[Fl.TENSOR_SHAPE]?.selected){let l=this.webglRenderer.webglRendererEdgeTextsService.genLabelsOnEdges(a,this.EDGE_TEXT_COLOR_OUTGOING);this.outgoingHighlightedEdgeTexts.generateMesh(l,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdgeTexts.mesh)}}this.outputsByHighlightedNode=r.outputsByHighlightedNode,this.outputsRenderedEdges=r.renderedEdges;let o=[],s=[];for(let a of Object.keys(Z(Z({},this.inputsByHighlightedNode),this.outputsByHighlightedNode))){let l=this.webglRenderer.curModelGraph.nodesById[a];if(xt(l)){let c=aue,d=MO,u=this.inputsByHighlightedNode[a]!=null,h=u?this.inputsByHighlightedNode[a].length:this.outputsByHighlightedNode[a].length;o.push({id:`${a}${vC}${u?"input":"output"}`,index:o.length,bound:{x:this.webglRenderer.getNodeX(l)+c/2,y:this.webglRenderer.getNodeY(l)-d/4,width:c,height:d},yOffset:95,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:u?this.EDGE_COLOR_INCOMING:this.EDGE_COLOR_OUTGOING,borderWidth:0,opacity:1}),s.push({id:`${a}${vC}${u?"input":"output"}`,nodeId:a,label:`${h} ${u?"input":"output"}${h!==1?"s":""}`,height:8,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,color:{r:1,g:1,b:1},x:this.webglRenderer.getNodeX(l)+c/2,y:96,z:this.webglRenderer.getNodeY(l)-d/4+1})}}this.ioPickerTexts.generateMesh(s,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.ioPickerTexts.mesh),this.ioPickerBgs.generateMesh(o,!0,!1,!1,!0),this.webglRendererThreejsService.addToScene(this.ioPickerBgs.mesh),this.webglRendererThreejsService.addToScene(this.ioPickerBgs.meshForRayCasting),this.webglRenderer.animateIntoPositions(a=>{this.incomingHighlightedEdges.updateAnimationProgress(a),this.outgoingHighlightedEdges.updateAnimationProgress(a),this.incomingHighlightedEdgeTexts.updateAnimationProgress(a),this.outgoingHighlightedEdgeTexts.updateAnimationProgress(a),this.ioPickerBgs.updateAnimationProgress(a),this.ioPickerTexts.updateAnimationProgress(a)})}handleClickIoPicker(t,n){t?this.inputsByHighlightedNode[n].length===1?this.webglRenderer.sendLocateNodeRequest(this.inputsByHighlightedNode[n][0].id,this.webglRenderer.rendererId):this.webglRenderer.showIoTree(this.webglRenderer.ioPicker.nativeElement,this.inputsByHighlightedNode[n],"incoming"):this.outputsByHighlightedNode[n].length===1?this.webglRenderer.sendLocateNodeRequest(this.outputsByHighlightedNode[n][0].id,this.webglRenderer.rendererId):this.webglRenderer.showIoTree(this.webglRenderer.ioPicker.nativeElement,this.outputsByHighlightedNode[n],"outgoing")}getHighlightedIncomingNodesAndEdges(t,n,r){let o=r?.ignoreEdgesWithinSameNamespace??!1,s=r?.reuseRenderedEdgeCurvePoints??!1;n||(n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]);let a=[],l=[],c={},d=[];for(let u of n.incomingEdges||[]){if(t[u.sourceNodeId])continue;let h=this.webglRenderer.curModelGraph.nodesById[u.sourceNodeId];if(!h||o&&h.namespace===n.namespace)continue;let p=$I(h.namespace,n.namespace),f=this.getLastCollapsedAncestorNode(h,p);l.push(f),c[f.id]==null&&(c[f.id]=[]),c[f.id].push(h);let m=this.findEdgeConnectingTwoNodesInNamespace(p,h.id,n.id),b=[],g=[];if(m){a.push(m);let _=m.curvePoints||[],x=this.webglRenderer.curModelGraph.nodesById[m.fromNodeId];if(m.fromNodeId!==f.id){let D=m.points[0].x+(x.globalX||0),E=m.points[0].y+(x.globalY||0),P=this.getBestAnchorPointOnNode(D,E,f);b.push({x:P.x-(f.globalX||0),y:P.y-(f.globalY||0)}),s&&g.push({x:P.x-(f.globalX||0),y:P.y-(f.globalY||0)},{x:_[0].x-(f.globalX||0)+(x.globalX||0),y:_[0].y-(f.globalY||0)+(x.globalY||0)})}let C=b,T=m.points;if(s&&(C=g,T=_),C.push(...T.map(D=>({x:D.x-(f.globalX||0)+(x.globalX||0),y:D.y-(f.globalY||0)+(x.globalY||0)}))),m.toNodeId!==n?.id){let D=m.points[m.points.length-1].x+(x.globalX||0),E=m.points[m.points.length-1].y+(x.globalY||0),P=this.getBestAnchorPointOnNode(D,E,n);s?g.push({x:_[_.length-1].x-(f.globalX||0)+(x.globalX||0),y:_[_.length-1].y-(f.globalY||0)+(x.globalY||0)},{x:P.x-(f.globalX||0),y:P.y-(f.globalY||0)}):b.push({x:P.x-(f.globalX||0),y:P.y-(f.globalY||0)})}}else(xt(f)||Et(f)&&!f.hideInLayout)&&(s?g:b).push(...this.getDirectEdgeBetweenNodes(f,n));s?g.length>0&&d.push({id:`overlay_${f.id}___${n.id}`,fromNodeId:f.id,toNodeId:n.id,points:[],curvePoints:g,type:"incoming"}):b.length>0&&d.push({id:`overlay_${f.id}___${n.id}`,fromNodeId:f.id,toNodeId:n.id,points:b,type:"incoming"})}return{renderedEdges:a,highlightedNodes:l,inputsByHighlightedNode:c,overlayEdges:d}}getHighlightedOutgoingNodesAndEdges(t,n,r){let o=r?.ignoreEdgesWithinSameNamespace??!1,s=r?.reuseRenderedEdgeCurvePoints??!1;n||(n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]);let a=[],l=[],c={},d=[];for(let u of n.outgoingEdges||[]){if(t[u.sourceNodeOutputId])continue;let h=this.webglRenderer.curModelGraph.nodesById[u.targetNodeId];if(!h||o&&h.namespace===n.namespace)continue;let p=$I(h.namespace,n.namespace),f=this.getLastCollapsedAncestorNode(h,p);l.push(f),c[f.id]==null&&(c[f.id]=[]),c[f.id].push(h);let m=this.findEdgeConnectingTwoNodesInNamespace(p,n.id,h.id),b=[],g=[];if(m){a.push(m);let _=m.curvePoints||[],x=this.webglRenderer.curModelGraph.nodesById[m.fromNodeId];if(m.fromNodeId!==n?.id){let D=m.points[0].x+(x.globalX||0),E=m.points[0].y+(x.globalY||0),P=this.getBestAnchorPointOnNode(D,E,n);b.push({x:P.x-(n.globalX||0),y:P.y-(n.globalY||0)}),s&&g.push({x:P.x-(n.globalX||0),y:P.y-(n.globalY||0)},{x:_[0].x-(n.globalX||0)+(x.globalX||0),y:_[0].y-(n.globalY||0)+(x.globalY||0)})}let C=b,T=m.points;if(s&&(C=g,T=_),C.push(...T.map(D=>({x:D.x-(n.globalX||0)+(x.globalX||0),y:D.y-(n.globalY||0)+(x.globalY||0)}))),m.toNodeId!==f.id){let D=m.points[m.points.length-1].x+(x.globalX||0),E=m.points[m.points.length-1].y+(x.globalY||0),P=this.getBestAnchorPointOnNode(D,E,f);s?g.push({x:_[_.length-1].x-(n.globalX||0)+(x.globalX||0),y:_[_.length-1].y-(n.globalY||0)+(x.globalY||0)},{x:P.x-(n.globalX||0),y:P.y-(n.globalY||0)}):b.push({x:P.x-(n.globalX||0),y:P.y-(n.globalY||0)})}}else(xt(f)||Et(f)&&!f.hideInLayout)&&(s?g:b).push(...this.getDirectEdgeBetweenNodes(n,f));s?g.length>0&&d.push({id:`overlay_${n.id}___${f.id}`,fromNodeId:n.id,toNodeId:f.id,points:[],curvePoints:g,type:"outgoing"}):b.length>0&&d.push({id:`overlay_${n.id}___${f.id}`,fromNodeId:n.id,toNodeId:f.id,points:b,type:"outgoing"})}return{renderedEdges:a,highlightedNodes:l,outputsByHighlightedNode:c,overlayEdges:d}}getLastCollapsedAncestorNode(t,n){let r=t,o=[];for(;r&&(xt(r)&&!r.expanded&&o.push(r),r.namespace!==n);)r=this.webglRenderer.curModelGraph.nodesById[r.nsParentId||""];return o.length>0?o[o.length-1]:t}shouldUpdateIncomingAndOutgoingEdgesHighlights(){if(!this.webglRenderer.selectedNodeId)return!1;let t=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId];if(xt(t))return!1;let n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.rootNodeId||""];return!(n&&xt(n)&&!(n.descendantsOpNodeIds||[]).includes(this.webglRenderer.selectedNodeId)||!this.webglRenderer.isNodeRendered(this.webglRenderer.selectedNodeId))}clearIncomingAndOutgoingHighlights(){this.incomingHighlightedEdges.clear(),this.outgoingHighlightedEdges.clear(),this.inputsByHighlightedNode={},this.outputsByHighlightedNode={},this.inputsRenderedEdges=[],this.outputsRenderedEdges=[];for(let t of[this.ioPickerBgs.mesh,this.ioPickerBgs.meshForRayCasting,this.ioPickerTexts.mesh,this.incomingHighlightedEdgeTexts.mesh,this.outgoingHighlightedEdgeTexts.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t));this.ioPickerBgs.meshForRayCasting=void 0}findEdgeConnectingTwoNodesInNamespace(t,n,r){let o=t===""?"":`${t}___group___`;return this.webglRenderer.curModelGraph.edgesByGroupNodeIds[o].find(s=>{let a=this.webglRenderer.curModelGraph.nodesById[s.fromNodeId],l=this.webglRenderer.curModelGraph.nodesById[s.toNodeId],c=this.containNode(a,n),d=this.containNode(l,r);return c&&d})}containNode(t,n){return Et(t)&&t.id===n||xt(t)&&(t.descendantsOpNodeIds||[]).includes(n)}getDirectEdgeBetweenNodes(t,n){let r=[],o=t.globalX||0,s=t.globalY||0,a=t.width||0,l=t.height||0,c=n.globalX||0,d=n.globalY||0,u=n.width||0,h=n.height||0,p=o+a/2,f=d>s?s+l:s,m=c+u/2,b=d>s?d:d+h;return r.push({x:p+(t.x||0)-o,y:f+(t.y||0)-s},{x:m+(n.x||0)-o,y:b+(n.y||0)-s}),r}getBestAnchorPointOnNode(t,n,r){let o=this.webglRenderer.getNodeX(r),s=this.webglRenderer.getNodeY(r),a=this.webglRenderer.getNodeWidth(r),l=this.webglRenderer.getNodeHeight(r),c=[{point:{x:o+a/2,y:s},distance:0,direction:"horizontal"},{point:{x:o+a,y:s+l/2},distance:0,direction:"vertical"},{point:{x:o+a/2,y:s+l},distance:0,direction:"horizontal"},{point:{x:o,y:s+l/2},distance:0,direction:"vertical"}];for(let d of c)d.distance=this.getDistanceSquared(t,n,d.point.x,d.point.y);if(c.sort((d,u)=>d.distance-u.distance),c[0].direction!==c[1].direction){let d=this.getAngle(t,n,c[0].point.x,c[0].point.y,c[0].direction),u=this.getAngle(t,n,c[1].point.x,c[1].point.y,c[1].direction);return d>=u?c[0].point:c[1].point}return c[0].point}getAngle(t,n,r,o,s){return Math.atan(s==="horizontal"?Math.abs(o-n)/Math.abs(r-t):Math.abs(r-t)/Math.abs(o-n))}getDistanceSquared(t,n,r,o){return Math.pow(t-r,2)+Math.pow(n-o,2)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var EO=MO,DG=68,IO=Nn,yC=(()=>{class i{IDENTICAL_GROUPS_BG_COLOR=new IO.Color("#e2edff");IDENTICAL_GROUPS_INDICATOR_BG_COLOR=new IO.Color("#e3e3e3");IDENTICAL_GROUPS_INDICATOR_BORDER_COLOR=new IO.Color("#ccc");webglRenderer;webglRendererThreejsService;threejsService=te(wr);identicalLayerIndicatorBgs=new Pi(99);identicalLayerIndicatorTexts=new Wi(this.threejsService);init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}updateIdenticalLayerIndicators(){if(!this.webglRenderer.curModelGraph)return;this.clearIdenticalLayerIndicators();let t=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId],n=[],r=[];if(xt(t)&&t?.identicalGroupIndex!=null){let o=t.identicalGroupIndex,s=this.webglRenderer.nodesToRender.filter(({node:a})=>xt(a)&&a.identicalGroupIndex===o).map(({node:a})=>this.webglRenderer.curModelGraph.nodesById[a.id]);for(let a of s){if(a.id===t.id)continue;let l=this.webglRenderer.getNodeX(a)+DG/2,c=this.webglRenderer.getNodeY(a)-EO/2+EO/4;n.push({id:a.id,index:n.length,bound:{x:l,y:c,width:DG,height:EO},yOffset:95,isRounded:!0,borderColor:this.IDENTICAL_GROUPS_INDICATOR_BORDER_COLOR,bgColor:this.IDENTICAL_GROUPS_INDICATOR_BG_COLOR,borderWidth:1,opacity:1}),r.push({id:a.id,label:"Identical layer",height:8,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,color:{r:0,g:0,b:0},x:l,y:96,z:c})}}this.identicalLayerIndicatorBgs.generateMesh(n,!1,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.identicalLayerIndicatorBgs.mesh),this.identicalLayerIndicatorTexts.generateMesh(r,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.identicalLayerIndicatorTexts.mesh),this.webglRenderer.animateIntoPositions(o=>{this.identicalLayerIndicatorBgs.updateAnimationProgress(o),this.identicalLayerIndicatorTexts.updateAnimationProgress(o)})}clearIdenticalLayerIndicators(){for(let t of[this.identicalLayerIndicatorBgs.mesh,this.identicalLayerIndicatorTexts.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t))}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var xC=(()=>{class i{curIoTracingData;webglRenderer;init(t){this.webglRenderer=t}genTracingData(){if(!this.webglRenderer.selectedNodeId||!Et(this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]))return;let t=new Set,n=new Set,r=[this.webglRenderer.selectedNodeId];for(;r.length>0;){let s=r.shift();if(n.has(s))continue;n.add(s);let a=this.webglRenderer.curModelGraph.nodesById[s];a.hideInLayout||t.add(s);for(let l of a.incomingEdges||[])r.push(l.sourceNodeId)}let o=new Set;for(r=[this.webglRenderer.selectedNodeId];r.length>0;){let s=r.shift();if(o.has(s))continue;o.add(s);let a=this.webglRenderer.curModelGraph.nodesById[s];a.hideInLayout||t.add(s);for(let l of a.outgoingEdges||[])r.push(l.targetNodeId)}for(let s of[...t]){let a=s;for(;;){let l=this.webglRenderer.curModelGraph.nodesById[a];if(!l.nsParentId||t.has(l.nsParentId))break;a=l.nsParentId,t.add(a)}}this.curIoTracingData={tracedNodeId:this.webglRenderer.selectedNodeId,visibleNodeIds:t}}clearTracingData(){this.curIoTracingData=void 0}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var uue="/api/v1/read_text_file",hue="/api/v1/load_node_data",Cr=(()=>{class i{appService;runs=yt({});remoteSourceLoading=yt(!1);leftPaneModelGraph$=Ub(Xt(()=>this.appService.panes()[0].modelGraph));rightPaneModelGraph$=Ub(Xt(()=>{let t=this.appService.panes();if(!(t.length<=1))return t[1].modelGraph}));constructor(t){this.appService=t,this.leftPaneModelGraph$.subscribe(n=>{n!=null&&this.handleModelGraphInPaneChanged(n,0)}),this.rightPaneModelGraph$.subscribe(n=>{n!=null&&this.handleModelGraphInPaneChanged(n,1)})}addRun(t,n,r,o,s,a=!1,l){let c=o.collectionLabel;this.runs.update(d=>{if(a){let h=[];for(let[p,f]of Object.entries(d))a&&f.collectionId===c&&h.push(p);for(let p of h)delete d[p]}d[t]={runId:t,runName:n,done:s!=null,results:s==null?void 0:{[o.id]:this.processNodeDataProviderDataForGraph(o,s)},extensionId:r,collectionId:c,remotePath:l,nodeDataProviderData:s};let u=this.appService.panes();for(let h of u)h.modelGraph?.id===o.id&&h.modelGraph?.collectionLabel===o.collectionLabel&&this.appService.setSelectedNodeDataProviderRunId(h.id,t);return Z({},d)})}updateRunResults(t,n,r,o){this.runs.update(s=>{let a=s[t];return a.done=!0,a.nodeDataProviderData=n,a.results==null&&(a.results={}),a.results[r.id]=this.processNodeDataProviderDataForGraph(r,n),o&&(a.error=o),Z({},s)})}addRunFromRemoteSource(t,n){return At(this,null,function*(){this.remoteSourceLoading.set(!0);let r=t.split("/"),o=r[r.length-1],s=`/read_file?path=${t}`;if(!0)if(t.startsWith("node_data://")){let d=t.replace("node_data://","").split("/");o=d[0];let u=Number(d[1]);s=`${hue}?node_data_index=${u}`}else s=`${uue}?path=${t}`;let a=Lr();this.addRun(a,o,"",n,void 0,!1,t);let l=yield fetch(s);if(!l.ok){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to load JSON file "${t}"`),this.remoteSourceLoading.set(!1);return}if(!0){let c=JSON.parse(yield l.text());if(c.error)this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${c.error}`);else try{this.updateRunResults(a,this.getNodeDataProviderData(c.content,n),n),this.notifyRemoteNodeDataChanges()}catch(d){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${d}`)}}else{let c=JSON.parse((yield l.text()).replace(`)]}' -`,""));try{this.updateRunResults(a,this.getNodeDataProviderData(c.content,n),n),this.notifyRemoteNodeDataChanges()}catch(d){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${d}`)}}this.remoteSourceLoading.set(!1)})}deleteRun(t){this.runs.update(n=>(delete n[t],Z({},n))),this.notifyRemoteNodeDataChanges();for(let n of this.appService.panes())if(n.selectedNodeDataProviderRunId===t){let r=this.getRunsForModelGraph(n.modelGraph);this.appService.setSelectedNodeDataProviderRunId(n.id,r.length>0?r[0].runId:void 0)}}getSelectedRunForModelGraph(t,n){let r=this.appService.getSelectedNodeDataProviderRunId(t);return r?this.getRunsForModelGraph(n).find(s=>s.runId===r):void 0}getRunsForModelGraph(t){let n=[],r=this.runs();for(let o of Object.values(r)){if(o.collectionId!==t.collectionLabel)continue;let s=o.nodeDataProviderData;s&&s[t.id]!=null&&n.push(o)}return n}processNodeDataProviderDataForGraph(t,n){this.genOutputTensorIdToNodeIdMap(t);let r={},o=n[t.id];if(!o)return{};let s=[];for(let c of o.gradient||[]){let d={stop:c.stop};c.bgColor!=null&&(d.bgColor=this.getRgbFromColor(c.bgColor,"#ffffff")),c.textColor!=null&&(d.textColor=this.getRgbFromColor(c.textColor,"#000000")),s.push(d)}s.sort((c,d)=>c.stop-d.stop);let a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if(s.length>0)for(let{value:c}of Object.values(o.results))typeof c=="number"&&(a=Math.min(a,c),l=Math.max(l,c));for(let c of Object.keys(o.results)){let d=o.results[c];if(typeof d.value=="number"&&d.bgColor==null&&(d.bgColor=this.getBgColor(d.value,o.thresholds||[],s,a,l)),typeof d.value=="number"&&d.textColor==null&&(d.textColor=this.getTextColor(d.value,o.thresholds||[],s,a,l)),(d.textColor==null||d.textColor==="")&&d.bgColor!=null){let b=this.getRgbFromColor(d.bgColor,"#ffffff");b!=null&&Math.pow(b.r/255,2.2)*.2126+Math.pow(b.g/255,2.2)*.7152+Math.pow(b.b/255,2.2)*.0722<.38&&(d.textColor="#ffffff")}let u="-",h=d.value;typeof h=="number"||typeof h=="boolean"||typeof h=="string"?u=`${h}`:u=JSON.stringify(h),u=u;let f=`${(t.outputTensorIdToNodeId||{})[c]??c}`,m=r[f];if(!m)r[f]=wt(Z({},d),{strValue:u,allValues:{[c]:d.value}});else{let b=m.allValues;b[c]=d.value,r[f]={value:d.value,bgColor:d.bgColor,textColor:d.textColor,allValues:b,strValue:`${m.strValue}, ${u}`}}}return r}getBgColor(t,n,r,o,s){if(r.length>0)return this.getColorFromGradient(t,r,o,s,!0,"transparent");for(let a of n)if(t<=a.value)return a.bgColor;return"transparent"}getTextColor(t,n,r,o,s){if(r.length>0)return this.getColorFromGradient(t,r,o,s,!1,"");for(let a of n)if(t<=a.value)return a.textColor||"";return""}getColorFromGradient(t,n,r,o,s,a){let l=(t-r)/(o-r);for(let c=0;c=d.stop&&l<=u.stop){if(h==null||p==null)return a;let f=(l-d.stop)/(u.stop-d.stop),m=Math.floor(h.r+(p.r-h.r)*f),b=Math.floor(h.g+(p.g-h.g)*f),g=Math.floor(h.b+(p.b-h.b)*f);return`#${this.numToHex(m)}${this.numToHex(b)}${this.numToHex(g)}`}}return a}genOutputTensorIdToNodeIdMap(t){if(t.outputTensorIdToNodeId==null){t.outputTensorIdToNodeId={};for(let n of t.nodes)if(Et(n)){let r=n.outputsMetadata||{};for(let o of Object.keys(r)){let a=r[o].tensor_name;a!=null&&(t.outputTensorIdToNodeId[a]=n.id)}}}}handleModelGraphInPaneChanged(t,n){let r=this.getRunsForModelGraph(t);if(r.length>0){for(let o of r)o.results==null&&(o.results={}),o.results[t.id]==null&&o.nodeDataProviderData!=null&&(o.results[t.id]=this.processNodeDataProviderDataForGraph(t,o.nodeDataProviderData));this.appService.setSelectedNodeDataProviderRunId(this.appService.panes()[n].id,r[0].runId)}}getRgbFromColor(t,n){let r=t;return t.startsWith("#")||(r=qb[t]),r||(r=n),r=r.replace("#",""),{r:this.hexStrToInt(r.substring(0,2)),g:this.hexStrToInt(r.substring(2,4)),b:this.hexStrToInt(r.substring(4,6))}}numToHex(t){let n=t.toString(16);return n.length===1?`0${n}`:n}hexStrToInt(t){return/^[a-fA-F0-9]+$/.test(t)?parseInt(t,16):255}getNodeDataProviderData(t,n){let r=JSON.parse(t),o={};return r.results!=null&&r.results.results==null?n&&(o[n.id]=r):o=r,o}notifyRemoteNodeDataChanges(){let t=Object.values(this.runs()).filter(n=>n.remotePath!=null).map(n=>n.remotePath);this.appService.remoteNodeDataPaths.set(t)}static \u0275fac=function(n){return new(n||i)(X(st))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var pue=Kt*.5,fue=Nn,wC=(()=>{class i{nodeDataProviderExtensionService;curNodeDataProviderResults=Xt(()=>this.webglRenderer?(this.nodeDataProviderExtensionService.getSelectedRunForModelGraph(this.webglRenderer.paneId,this.webglRenderer.curModelGraph)?.results||{})[this.webglRenderer.curModelGraph.id]:void 0);webglRenderer;webglRendererThreejsService;nodeDataProviderDistributionBars=new Pi(0);constructor(t){this.nodeDataProviderExtensionService=t}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}renderNodeDataProviderDistributionBars(){let t=this.curNodeDataProviderResults()||{};if(Object.keys(t).length===0)return;let{groupIdToDescendantsBgColorCounts:n,sortedBgColors:r}=this.genGroupIdToDescendantsBgColorCounts(),o=[];for(let{node:s,index:a}of this.webglRenderer.nodesToRender){if(!n[s.id])continue;let l=s,c=l.width||0,d=n[s.id],u=0;for(let f of Object.values(d))u+=f;let h=0,p=0;for(let f of r){if(d[f]==null||f==="transparent")continue;let b=d[f]/u*c,g=LI,_=h;o.push({id:`${s.id}_${p}`,index:o.length,bound:{x:this.webglRenderer.getNodeX(l)+_+b/2,y:this.webglRenderer.getNodeY(l)+this.webglRenderer.getNodeHeight(l)-LI+g/2,width:b,height:g},yOffset:Kt*a+pue,isRounded:!1,borderColor:{r:1,g:1,b:1},bgColor:new fue.Color(f),borderWidth:0,opacity:1}),h+=b,p++}}this.nodeDataProviderDistributionBars.generateMesh(o),this.webglRendererThreejsService.addToScene(this.nodeDataProviderDistributionBars.mesh)}updateAnimationProgress(t){this.nodeDataProviderDistributionBars.updateAnimationProgress(t)}genGroupIdToDescendantsBgColorCounts(){let t=this.curNodeDataProviderResults()||{},n={},r=new Set;for(let{node:o}of this.webglRenderer.nodesToRender)if(xt(o)&&!o.expanded){let s={};for(let a of o.descendantsOpNodeIds||[]){let l=this.webglRenderer.curModelGraph.nodesById[a],c=t[l.id]?.bgColor||"";c&&(s[c]==null&&(s[c]=0),s[c]++,r.add(c))}n[o.id]=s}return{groupIdToDescendantsBgColorCounts:n,sortedBgColors:[...r].sort((o,s)=>o.localeCompare(s))}}static \u0275fac=function(n){return new(n||i)(X(Cr))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var gue=-Kt*.3,_ue=Kt*.3,vue=Nn,CC=(()=>{class i{appService;SEARCH_RESULTS_HIGHLIGHT_COLOR=new vue.Color("#f5d55a");searchResultsHighlightBorders=new Pi(8);searchResultsNodeLabelHighlightBg=new Pi(4);webglRenderer;webglRendererThreejsService;curSearchResults=void 0;constructor(t){this.appService=t}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService,mt(()=>{let n=this.appService.getPaneById(this.webglRenderer.paneId);!n||!n.modelGraph||this.curSearchResults!==n.searchResults&&(this.curSearchResults=n.searchResults,this.renderSearchResults(),this.webglRendererThreejsService.render())})}renderSearchResults(){if(!this.curSearchResults)return;this.clearSearchResults();let t=new Set;for(let s of Object.keys(this.curSearchResults.results)){let a=this.webglRenderer.curModelGraph.nodesById[s];if(this.webglRenderer.isNodeRendered(s))t.add(s);else{let l=a;for(;l&&(l=this.webglRenderer.curModelGraph.nodesById[l.nsParentId||""],!(!l||this.webglRenderer.isNodeRendered(l.id))););t.add(l.id)}}let n=[];for(let s of t){let a=this.webglRenderer.curModelGraph.nodesById[s],l=this.webglRenderer.nodesToRenderMap[s].index,c=this.webglRenderer.getNodeX(a)-2,d=this.webglRenderer.getNodeY(a)-2,u=this.webglRenderer.getNodeWidth(a)+4,h=this.webglRenderer.getNodeHeight(a)+4;n.push({id:s,index:n.length,bound:{x:c+u/2,y:d+h/2,width:u,height:h},yOffset:Kt*l+gue,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:this.SEARCH_RESULTS_HIGHLIGHT_COLOR,borderWidth:0,opacity:1})}this.searchResultsHighlightBorders.generateMesh(n),this.webglRendererThreejsService.addToScene(this.searchResultsHighlightBorders.mesh);let r=[],o=Fo/this.webglRenderer.texts.getFontSize();for(let s of Object.keys(this.curSearchResults.results)){if(!this.webglRenderer.isNodeRendered(s))continue;let a=this.curSearchResults.results[s];for(let l of a)if(l.type===vt.NODE_LABEL){let c=this.webglRenderer.curModelGraph.nodesById[s],d=this.webglRenderer.nodesToRenderMap[s].index,u=this.webglRenderer.getNodeX(c)+this.webglRenderer.getNodeWidth(c)/2,h=0,p=0,f=0,m=dd(c.label);if(m.length===1){let b=this.webglRenderer.texts.getLabelSizes(c.label,xt(c)?mn.BOLD:mn.MEDIUM,Fo).sizes;f=(b.maxX-b.minX)*o+4,p=(b.maxZ-b.minZ)*o+4,h=this.webglRenderer.getNodeY(c)+this.webglRenderer.getNodeLabelRelativeY(c)-2*o}else{let{minX:b,maxX:g}=this.webglRenderer.getNodeLabelSizes(c);f=(g-b)*o+4,p=m.length*vh+4,h=this.webglRenderer.getNodeY(c)+p/2+4.5-2*o}r.push({id:s,index:n.length,bound:{x:u,y:h,width:f,height:p},yOffset:Kt*d+_ue,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:this.SEARCH_RESULTS_HIGHLIGHT_COLOR,borderWidth:0,opacity:1})}}this.searchResultsNodeLabelHighlightBg.generateMesh(r),this.webglRendererThreejsService.addToScene(this.searchResultsNodeLabelHighlightBg.mesh),this.webglRenderer.animateIntoPositions(s=>{this.searchResultsHighlightBorders.updateAnimationProgress(s),this.searchResultsNodeLabelHighlightBg.updateAnimationProgress(s)})}clearSearchResults(){for(let t of[this.searchResultsHighlightBorders.mesh,this.searchResultsNodeLabelHighlightBg.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t))}static \u0275fac=function(n){return new(n||i)(X(st))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var PG=320,SC=(()=>{class i{appService;destroyRef;webglRenderer;webglRendererThreejsService;constructor(t,n){this.appService=t,this.destroyRef=n}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService,this.appService.addSnapshotClicked.pipe(Vi(this.destroyRef)).subscribe(n=>{n.rendererId===this.webglRenderer.rendererId&&this.addSnapshot()}),this.appService.curSnapshotToRestore.pipe(Vi(this.destroyRef)).subscribe(n=>{n.rendererId===this.webglRenderer.rendererId&&this.restoreSnapshot(n.snapshot)})}addSnapshot(){return At(this,null,function*(){this.webglRenderer.flash();let t=yield this.takeSnapshot();this.webglRenderer.appService.addSnapshot(t,this.webglRenderer.curModelGraph.id,this.webglRenderer.paneId)})}takeSnapshot(){return At(this,null,function*(){let t=this.webglRenderer.container.nativeElement,n=this.webglRendererThreejsService.convertScreenPosToScene(0,0),r=this.webglRendererThreejsService.convertScreenPosToScene(t.clientWidth,t.clientHeight),o={x:n.x,y:n.y,width:r.x-n.x,height:r.y-n.y},s=[];zI(void 0,this.webglRenderer.curModelGraph,s);let a=this.webglRenderer.canvas.nativeElement,l=this.webglRenderer.snapshotCanvas.nativeElement,c=PG,d=PG/a.width*a.height;this.webglRendererThreejsService.renderSnapshot(c,d);let u=window.devicePixelRatio,h=new OffscreenCanvas(c*u,d*u),p=h.getContext("2d");p.imageSmoothingQuality="high",p.drawImage(l,0,0,l.width,l.height,0,0,h.width,h.height);let f=yield createImageBitmap(h),m=this.webglRenderer.appService.getFlattenLayers(this.webglRenderer.paneId);return{id:Lr(),rect:o,imageBitmap:f,selectedNodeId:this.webglRenderer.selectedNodeId,deepestExpandedGroupNodeIds:s,showOnNodeItemTypes:Z({},this.webglRenderer.curShowOnNodeItemTypes),showOnEdgeItemTypes:Z({},this.webglRenderer.curShowOnEdgeItemTypes),flattenLayers:m}})}restoreSnapshot(t){t.showOnNodeItemTypes&&(this.webglRenderer.curShowOnNodeItemTypes=Z({},t.showOnNodeItemTypes),this.webglRenderer.appService.setShowOnNode(this.webglRenderer.paneId,this.webglRenderer.rendererId,this.webglRenderer.curShowOnNodeItemTypes)),t.showOnEdgeItemTypes&&(this.webglRenderer.curShowOnEdgeItemTypes=Z({},t.showOnEdgeItemTypes),this.webglRenderer.appService.setShowOnEdge(this.webglRenderer.paneId,this.webglRenderer.rendererId,this.webglRenderer.curShowOnEdgeItemTypes));let n=this.webglRenderer.appService.getFlattenLayers(this.webglRenderer.paneId),r=t.flattenLayers===!0;n!==r?(this.webglRenderer.appService.processGraph(this.webglRenderer.paneId,r,t),this.webglRenderer.appService.setFlattenLayersInCurrentPane(r)):this.webglRenderer.sendRelayoutGraphRequest(t.selectedNodeId||"",t.deepestExpandedGroupNodeIds||[],!1,t.rect,!0,t.showOnNodeItemTypes)}static \u0275fac=function(n){return new(n||i)(X(st),X(Ni))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var OG={r:1,g:1,b:1},MC=14,xue=Nn,EC=(()=>{class i{appService;subgraphSelectionService;SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR=new xue.Color("#09B83E");webglRenderer;webglRendererThreejsService;threejsService=te(wr);curSubgraphSelectedNodeIds={};subgraphsSelectedNodeMarkerBgs=new Pi(99);subgraphSelectedNodeMarkerTexts=new Wi(this.threejsService);constructor(t,n){this.appService=t,this.subgraphSelectionService=n}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService,mt(()=>{this.curSubgraphSelectedNodeIds=this.subgraphSelectionService.selectedNodeIds(),this.renderSubgraphSelectedNodeMarkers()})}renderSubgraphSelectedNodeMarkers(){if(!this.enableSubgraphSelection)return;let t=Object.keys(this.curSubgraphSelectedNodeIds),n=new Set(t);if(this.clearSubgraphSelectedNodeMarkers(),t.length===0){this.webglRendererThreejsService.render();return}let r=[],o=new Set;for(let a of t){let c=this.webglRenderer.curModelGraph.nodesById[a];for(;;){let d=this.webglRenderer.curModelGraph.nodesById[c.nsParentId||""];if(d)o.add(d.id),c=d;else break}}let s=[];for(let a of o){if(!this.webglRenderer.isNodeRendered(a))continue;let l=this.webglRenderer.curModelGraph.nodesById[a],c=this.webglRenderer.getNodeX(l)+this.webglRenderer.getNodeWidth(l),d=this.webglRenderer.getNodeY(l),u=(l.descendantsOpNodeIds||[]).filter(f=>{let m=this.webglRenderer.curModelGraph.nodesById[f];return n.has(m.id)}).length;s.push({id:`${a}_subgraph_count_label`,nodeId:a,label:`${u}`,height:8,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,color:this.webglRenderer.NODE_LABEL_COLOR,x:c,y:96,z:d+1});let h=MC*(u>=1e3?2:1.5),p=MC;r.push({id:a,index:r.length,bound:{x:c,y:d,width:h,height:p},yOffset:95.5,isRounded:!0,borderColor:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,bgColor:OG,borderWidth:1.5,opacity:1})}for(let a of t){if(!this.webglRenderer.isNodeRendered(a))continue;let l=this.webglRenderer.curModelGraph.nodesById[a],c=this.webglRenderer.getNodeX(l)+this.webglRenderer.getNodeWidth(l),d=this.webglRenderer.getNodeY(l),u=MC,h=MC;r.push({id:a,index:r.length,bound:{x:c,y:d,width:u,height:h},yOffset:95.5,isRounded:!0,borderColor:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,bgColor:OG,borderWidth:1.5,opacity:1}),s.push({id:`${l.id}_checkmark`,nodeId:l.id,label:"0xe876",height:24,hAlign:"center",vAlign:"center",weight:mn.ICONS,color:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,x:c,y:96,z:d+14,treatLabelAsAWhole:!0,weightLevel:.9})}this.subgraphsSelectedNodeMarkerBgs.generateMesh(r,!1,!1,!1,!0),this.webglRendererThreejsService.addToScene(this.subgraphsSelectedNodeMarkerBgs.mesh),this.subgraphSelectedNodeMarkerTexts.generateMesh(s,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.subgraphSelectedNodeMarkerTexts.mesh),this.webglRenderer.animateIntoPositions(a=>{this.subgraphsSelectedNodeMarkerBgs.updateAnimationProgress(a),this.subgraphSelectedNodeMarkerTexts.updateAnimationProgress(a)})}get enableSubgraphSelection(){return this.appService.config()?.enableSubgraphSelection===!0}clearSubgraphSelectedNodeMarkers(){for(let t of[this.subgraphsSelectedNodeMarkerBgs.mesh,this.subgraphSelectedNodeMarkerTexts.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t))}static \u0275fac=function(n){return new(n||i)(X(st),X(Xo))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var Sr=500,RG=200,ts=Nn,IC=(()=>{class i{curScale=1;fps="";camera;raycaster;zoom=hD();webglRenderer;curTranslateX=0;curTranslateY=0;scene;renderer;snapshotRenderer;pngDownloaderRenderer;savedCenterX=null;savedCenterY=null;resizeTimeoutRef=-1;fpsStartTime=-1;frames=0;init(t){this.webglRenderer=t}setupZoomAndPan(t,n=.1,r=10){let o=Go(t),s=0,a=0;this.zoom.scaleExtent([n,r]).wheelDelta(()=>-dt.deltaY*(dt.deltaMode?120:1)/150).filter(()=>{if(dt.type==="mousedown"&&(s=this.curTranslateX,a=this.curTranslateY),dt.button===2||Tm&&dt.ctrlKey&&dt.button===0&&dt.type==="mousedown")return!1;if(dt.type==="dblclick")return dt.stopPropagation(),this.webglRenderer.handleDoubleClickOnGraph(dt.altKey,dt.shiftKey),!1;if(dt.type==="wheel"&&!dt.ctrlKey){let l=.5/this.curScale;return this.zoom.translateBy(o,-Number(dt.deltaX)*l,-Number(dt.deltaY)*l),dt.preventDefault(),!1}return!0}).on("zoom",()=>{this.handleZoom()}).on("end",()=>{this.handleZoomEnd(s,a)}),this.zoom.interpolate(Sd),o.call(this.zoom)}setupThreeJs(){let t=this.webglRenderer.canvas.nativeElement;this.scene=new ts.Scene,this.scene.background=new ts.Color(16777215);let n=t.clientWidth/t.clientHeight;this.camera=new ts.OrthographicCamera(0,2*Sr*n,0,-2*Sr,.001,1e3),this.camera.position.y=RG,this.camera.lookAt(new ts.Vector3(0,0,0)),this.camera.updateMatrixWorld(),this.camera.updateProjectionMatrix(),this.renderer=new ts.WebGLRenderer({canvas:t,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0});let r=ld();this.renderer.setPixelRatio(r),this.renderer.setSize(t.clientWidth,t.clientHeight);let o=this.webglRenderer.snapshotCanvas.nativeElement;this.snapshotRenderer=new ts.WebGLRenderer({canvas:o,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0,preserveDrawingBuffer:!0}),this.snapshotRenderer.setPixelRatio(r),this.render(),new ResizeObserver(()=>{requestAnimationFrame(()=>{this.resizeRendererToDisplaySize()})}).observe(this.webglRenderer.container.nativeElement),this.raycaster=new ts.Raycaster,this.raycaster.params.Points.threshold=5.5}clearScene(t=[]){for(let n=this.scene.children.length-1;n>=0;n--){let r=this.scene.children[n];t.includes(r)||(r.geometry&&r.geometry.dispose(),this.scene.remove(r))}}setupPngDownloaderRenderer(t,n,r,o){this.pngDownloaderRenderer||(this.pngDownloaderRenderer=new ts.WebGLRenderer({canvas:t,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0,preserveDrawingBuffer:!0}),this.pngDownloaderRenderer.setPixelRatio(ld())),n&&(this.scene.background=null,this.pngDownloaderRenderer.setClearColor(0,0)),this.pngDownloaderRenderer.setSize(r,o,!1)}renderPngDownloader(t){this.pngDownloaderRenderer.render(this.scene,t)}renderSnapshot(t,n){this.snapshotRenderer.setSize(t,n,!1),this.snapshotRenderer.render(this.scene,this.camera)}setSceneBackground(t){this.scene.background=t}createOrthographicCamera(t,n,r,o){let s=new ts.OrthographicCamera(t,n,r,o,.001,1e3);return s.position.y=RG,s.lookAt(new ts.Vector3(0,0,0)),s.updateMatrixWorld(),s.updateProjectionMatrix(),s}dispose(){this.renderer&&(this.renderer.dispose(),this.renderer.forceContextLoss()),this.snapshotRenderer&&(this.snapshotRenderer.dispose(),this.snapshotRenderer.forceContextLoss()),this.pngDownloaderRenderer&&(this.pngDownloaderRenderer.dispose(),this.pngDownloaderRenderer.forceContextLoss())}render(t=!1){if(!(!this.renderer||!this.scene||!this.camera)&&(this.renderer.render(this.scene,this.camera),this.webglRenderer.benchmark&&t)){this.fpsStartTime<0&&(this.fpsStartTime=performance.now()),this.frames+=1;let n=performance.now()-this.fpsStartTime;n>1e3&&(this.fps=(this.frames/n*1e3).toFixed(1),this.fpsStartTime=-1,this.frames=0,this.webglRenderer.changeDetectorRef.markForCheck())}}zoomFitGraph(t=.9,n=200){this.zoomFit({x:this.webglRenderer.currentMinX,y:this.webglRenderer.currentMinZ,width:this.webglRenderer.currentMaxX-this.webglRenderer.currentMinX,height:this.webglRenderer.currentMaxZ-this.webglRenderer.currentMinZ},t,n)}zoomFit(t,n=.9,r=300,o=!1,s=!0,a=!1){if(!this.webglRenderer.container)return;let l=this.webglRenderer.container.nativeElement,c=l.clientWidth*n,d=l.clientHeight*n,u=t.width/t.height,h=c/d,p=o?this.curScale:Math.abs(u>h?this.convertXFromScreenToScene(c)/t.width:this.convertZFromScreenToScene(d)/t.height),f=t.x+t.width/2,m=t.y+t.height/2;if(!o&&s){let b=this.convertZFromScreenToScene(45)/30;if(p=Math.min(b,p),a){let g=this.convertZFromScreenToScene(20)/30;p{let o=n.nodesById[t];this.zoomFit({x:this.webglRenderer.getNodeX(o),y:this.webglRenderer.getNodeY(o),width:this.webglRenderer.getNodeWidth(o),height:this.webglRenderer.getNodeHeight(o)},.9,r,!1,!0,!0)},0):setTimeout(()=>{this.zoomFitGraph(.9,r)})}addToScene(t){t&&this.scene.add(t)}removeFromScene(t){t&&this.scene.remove(t)}convertXFromSceneToScreen(t){if(!this.webglRenderer.container)return 0;let n=this.webglRenderer.container.nativeElement,r=n.clientWidth,o=r/n.clientHeight;return t/(Sr/1*o)/-2*r}convertZFromSceneToScreen(t){if(!this.webglRenderer.container)return 0;let r=this.webglRenderer.container.nativeElement.clientHeight;return t*1*r/Sr/2}convertXFromScreenToScene(t){if(!this.webglRenderer.container)return 0;let n=this.webglRenderer.container.nativeElement,r=n.clientWidth,o=r/n.clientHeight;return t/r*-2*(Sr/1*o)}convertZFromScreenToScene(t,n=1){if(!this.webglRenderer.container)return 0;let o=this.webglRenderer.container.nativeElement.clientHeight;return t*Sr*2/n/o}convertScenePosToScreen(t,n){let r=this.webglRenderer.container.nativeElement,o=r.clientWidth,s=r.clientHeight,a=new ts.Vector3(t,0,n);return a.project(this.camera),{x:a.x*o/2+o/2,y:-(a.y*s/2)+s/2}}convertScreenPosToScene(t,n){let r=new ts.Vector3;r.set(t/this.webglRenderer.canvas.nativeElement.offsetWidth*2-1,-(n/this.webglRenderer.canvas.nativeElement.offsetHeight)*2+1,-1);let o=r.unproject(this.camera);return{x:o.x,y:o.z}}handleZoom(){this.curScale=dt.transform.k,this.curTranslateX=dt.transform.x,this.curTranslateY=dt.transform.y,requestAnimationFrame(()=>{this.camera&&(this.setCameraFrustum(),this.webglRenderer.updateNodeBgColorWhenFar(),this.render(),this.webglRenderer.handleHoveredGroupNodeIconChanged())})}handleZoomEnd(t,n){if(dt.sourceEvent&&dt.sourceEvent.type==="mouseup"){let r=Math.abs(this.curTranslateX-t),o=Math.abs(this.curTranslateY-n);r>=0&&r<=3&&o>=0&&o<=3&&this.webglRenderer.handleClickOnGraph(dt.sourceEvent.shiftKey)}}setCameraFrustum(){let t=this.webglRenderer.container.nativeElement,n=t.clientWidth,r=t.clientHeight,o=n/r,s=this.curTranslateX-n/2,a=this.curTranslateY-r/2;this.camera.left=-Sr/this.curScale*o-s/n*2*Sr/this.curScale*o,this.camera.right=Sr/this.curScale*o-s/n*2*Sr/this.curScale*o,this.camera.top=Sr/this.curScale+a*Sr/this.curScale/r*2,this.camera.bottom=-Sr/this.curScale+a*Sr/this.curScale/r*2,this.camera.updateProjectionMatrix()}resizeRendererToDisplaySize(t=!0){let n=this.webglRenderer.container.nativeElement,r=this.renderer.domElement,o=n.clientWidth,s=n.clientHeight;if(o===0||s===0)return;if(r.width!==o||r.height!==s){if(this.savedCenterX==null&&this.savedCenterY==null){let{x:l,y:c}=this.convertScreenPosToScene(o/2,s/2);this.savedCenterX=l,this.savedCenterY=c}this.renderer.setSize(o,s,!1),this.webglRenderer.canvas.nativeElement.style.width="100%",this.webglRenderer.canvas.nativeElement.style.height="100%",this.setCameraFrustum(),this.render(),this.zoomFit({x:this.savedCenterX,y:this.savedCenterY,width:1e-7,height:1e-7},.9,0,!0),this.resizeTimeoutRef>=0&&window.clearTimeout(this.resizeTimeoutRef),this.resizeTimeoutRef=window.setTimeout(()=>{this.savedCenterX=null,this.savedCenterY=null},500)}}centerViewAt(t,n,r,o=300){if(!this.webglRenderer.container)return;let s=this.webglRenderer.container.nativeElement,a=s.clientWidth,l=s.clientHeight,c=a/l,d=-2*Sr*c/2/r+t,u=-n+Sr/r,h=Rd.scale(r).translate(this.convertXFromSceneToScreen(d),this.convertZFromSceneToScreen(u)),p=Go(s);o===0?p.call(this.zoom.transform,h):p.transition().duration(this.webglRenderer.appService.testMode?0:o).ease(qT).call(this.zoom.transform,h)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var rf=function(i){return i.COLOR="COLOR",i.NUMBER="NUMBER",i}(rf||{}),Sue={type:rf.COLOR,label:"Bg color",id:Hs.NODE_BG_COLOR,defaultValue:"#ffffff"},Mue={type:rf.COLOR,label:"Border color",id:Hs.NODE_BORDER_COLOR,defaultValue:"#777777"},Eue={type:rf.COLOR,label:"Text color",id:Hs.NODE_TEXT_COLOR,defaultValue:"#041e49"},NG=[Sue,Mue,Eue],AG="model_explorer_node_styler_rules",la=(()=>{class i{appService;localStorageService;rules=yt([]);matchedNodes=yt({});hasNonEmptyNodeStylerRules=Xt(()=>this.rules().filter(t=>yh(t.queries)&&Object.keys(t.styles).length>0).length>0);constructor(t,n){if(this.appService=t,this.localStorageService=n,mt(()=>{let r=this.rules();this.appService.testMode||this.localStorageService.setItem(AG,JSON.stringify(r)),this.computeMatchedNodes(r)},{allowSignalWrites:!0}),this.appService.testMode){let r=new URLSearchParams(document.location.search),o=decodeURIComponent(r.get("test_node_styler_rules")||"");this.updateRules(o===""?[]:JSON.parse(o))}else{let r=this.localStorageService.getItem(AG)||"",o=r===""?[]:JSON.parse(r);this.updateRules(o)}}addNewRule(){this.rules.update(t=>{let n=[...t];return n.push({queries:[{type:Ln.NODE_TYPE,nodeType:mr.OP_NODES},{type:Ln.REGEX,queryRegex:"",matchTypes:[vt.NODE_LABEL]}],nodeType:mr.OP_NODES,styles:{},version:zb.V2}),n})}moveUpRule(t){this.rules.update(n=>{let r=[...n],o=n[t];return r.splice(t,1),r.splice(t-1,0,o),r})}moveDownRule(t){this.rules.update(n=>{let r=[...n],o=n[t];return r.splice(t,1),r.splice(t+1,0,o),r})}duplicateRule(t){this.rules.update(n=>{let r=JSON.parse(JSON.stringify(n[t]));return[...n.slice(0,t),r,...n.slice(t)]})}updateRules(t){this.rules.set(this.convertOldRulesIfNecessary(t))}updateQueries(t,n){this.rules.update(r=>{let o=r[t];return o.queries=n,[...r]})}toggleStyle(t,n,r){this.rules.update(o=>{let s=o[t];return r==null?s.styles[n.id]==null?s.styles[n.id]={id:n.id,value:n.defaultValue}:delete s.styles[n.id]:r?s.styles[n.id]={id:n.id,value:n.defaultValue}:delete s.styles[n.id],[...o]})}updateStyleValue(t,n,r){this.rules.update(o=>{let s=o[t],a=s.styles[n.id];return a&&(typeof a=="string"?s.styles[n.id]=r:a.value=r),[...o]})}deleteRule(t){this.rules.update(n=>{let r=[...n];return r.splice(t,1),r})}convertOldRulesIfNecessary(t){return t.map(n=>{if(n.version==null&&n.nodeType){let r={type:Ln.NODE_TYPE,nodeType:n.nodeType};n.queries.unshift(r),n.version=zb.V2}return n})}computeMatchedNodes(t){let n=Zb(t),r={};if(t.length>0&&t.some(o=>yh(o.queries))){let o=this.appService.panes();for(let s=0;sthis._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(e){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(e,Pue))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},kG=new ge("MatSnackBarData"),of=class{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}},Oue=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"],standalone:!0});let i=e;return i})(),Rue=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"],standalone:!0});let i=e;return i})(),Aue=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"],standalone:!0});let i=e;return i})(),LG=(()=>{let e=class e{constructor(n,r){this.snackBarRef=n,this.data=r}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}};e.\u0275fac=function(r){return new(r||e)(M($_),M(kG))},e.\u0275cmp=le({type:e,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],standalone:!0,features:[ce],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(r,o){r&1&&(v(0,"div",0),S(1),y(),W(2,Iue,3,1,"div",1)),r&2&&(w(),Me(" ",o.data.message,` -`),w(),ae(o.hasAction?2:-1))},dependencies:[zi,Oue,Rue,Aue],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0});let i=e;return i})(),Nue={snackBarState:si("state",[fi("void, hidden",Qt({transform:"scale(0.8)",opacity:0})),fi("visible",Qt({transform:"scale(1)",opacity:1})),On("* => visible",Pn("150ms cubic-bezier(0, 0, 0.2, 1)")),On("* => void, * => hidden",Pn("75ms cubic-bezier(0.4, 0.0, 1, 1)",Qt({opacity:0})))])},kue=0,Lue=(()=>{let e=class e extends oa{constructor(n,r,o,s,a){super(),this._ngZone=n,this._elementRef=r,this._changeDetectorRef=o,this._platform=s,this.snackBarConfig=a,this._document=te(Ye),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new me,this._onExit=new me,this._onEnter=new me,this._animationState="void",this._liveElementId=`mat-snack-bar-container-live-${kue++}`,this.attachDomPortal=l=>{this._assertNotAttached();let c=this._portalOutlet.attachDomPortal(l);return this._afterPortalAttached(),c},a.politeness==="assertive"&&!a.announcementMessage?this._live="assertive":a.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(n){this._assertNotAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._afterPortalAttached(),r}attachTemplatePortal(n){this._assertNotAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._afterPortalAttached(),r}onAnimationEnd(n){let{fromState:r,toState:o}=n;if((o==="void"&&r!=="void"||o==="hidden")&&this._completeExit(),o==="visible"){let s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let n=this._elementRef.nativeElement,r=this.snackBarConfig.panelClass;r&&(Array.isArray(r)?r.forEach(a=>n.classList.add(a)):n.classList.add(r)),this._exposeToModals();let o=this._label.nativeElement,s="mdc-snackbar__label";o.classList.toggle(s,!o.querySelector(`.${s}`))}_exposeToModals(){let n=this._liveElementId,r=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{let r=n.getAttribute("aria-owns");if(r){let o=r.replace(this._liveElementId,"").trim();o.length>0?n.setAttribute("aria-owns",o):n.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{let n=this._elementRef.nativeElement.querySelector("[aria-hidden]"),r=this._elementRef.nativeElement.querySelector("[aria-live]");if(n&&r){let o=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&n.contains(document.activeElement)&&(o=document.activeElement),n.removeAttribute("aria-hidden"),r.appendChild(n),o?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}};e.\u0275fac=function(r){return new(r||e)(M(Le),M(Re),M(Fe),M(gn),M(of))},e.\u0275cmp=le({type:e,selectors:[["mat-snack-bar-container"]],viewQuery:function(r,o){if(r&1&&(Ie(Qo,7),Ie(Tue,7)),r&2){let s;be(s=ye())&&(o._portalOutlet=s.first),be(s=ye())&&(o._label=s.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:1,hostBindings:function(r,o){r&1&&WE("@state.done",function(a){return o.onAnimationEnd(a)}),r&2&&Yf("@state",o._animationState)},standalone:!0,features:[nn,ce],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(r,o){r&1&&(v(0,"div",1)(1,"div",2,0)(3,"div",3),W(4,Due,0,0,"ng-template",4),y(),J(5,"div"),y()()),r&2&&(w(5),Ze("aria-live",o._live)("role",o._role)("id",o._liveElementId))},dependencies:[Qo],styles:[".mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}.cdk-high-contrast-active .mat-mdc-snackbar-surface{outline:solid 1px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color);border-radius:var(--mdc-snackbar-container-shape);background-color:var(--mdc-snackbar-container-color)}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mdc-snackbar-supporting-text-font);font-size:var(--mdc-snackbar-supporting-text-size);font-weight:var(--mdc-snackbar-supporting-text-weight);line-height:var(--mdc-snackbar-supporting-text-line-height)}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-snack-bar-button-color);--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}"],encapsulation:2,data:{animation:[Nue.snackBarState]}});let i=e;return i})();function Fue(){return new of}var Bue=new ge("mat-snack-bar-default-options",{providedIn:"root",factory:Fue}),yu=(()=>{let e=class e{get _openedSnackBarRef(){let n=this._parentSnackBar;return n?n._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(n){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=n:this._snackBarRefAtThisLevel=n}constructor(n,r,o,s,a,l){this._overlay=n,this._live=r,this._injector=o,this._breakpointObserver=s,this._parentSnackBar=a,this._defaultConfig=l,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=LG,this.snackBarContainerComponent=Lue,this.handsetCssClass="mat-mdc-snack-bar-handset"}openFromComponent(n,r){return this._attach(n,r)}openFromTemplate(n,r){return this._attach(n,r)}open(n,r="",o){let s=Z(Z({},this._defaultConfig),o);return s.data={message:n,action:r},s.announcementMessage===n&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(n,r){let o=r&&r.viewContainerRef&&r.viewContainerRef.injector,s=bt.create({parent:o||this._injector,providers:[{provide:of,useValue:r}]}),a=new Di(this.snackBarContainerComponent,r.viewContainerRef,s),l=n.attach(a);return l.instance.snackBarConfig=r,l.instance}_attach(n,r){let o=Z(Z(Z({},new of),this._defaultConfig),r),s=this._createOverlay(o),a=this._attachSnackBarContainer(s,o),l=new $_(a,s);if(n instanceof Hn){let c=new jr(n,null,{$implicit:o.data,snackBarRef:l});l.instance=a.attachTemplatePortal(c)}else{let c=this._createInjector(o,l),d=new Di(n,void 0,c),u=a.attachComponentPortal(d);l.instance=u.instance}return this._breakpointObserver.observe(fy.HandsetPortrait).pipe(Xe(s.detachments())).subscribe(c=>{s.overlayElement.classList.toggle(this.handsetCssClass,c.matches)}),o.announcementMessage&&a._onAnnounce.subscribe(()=>{this._live.announce(o.announcementMessage,o.politeness)}),this._animateSnackBar(l,o),this._openedSnackBarRef=l,this._openedSnackBarRef}_animateSnackBar(n,r){n.afterDismissed().subscribe(()=>{this._openedSnackBarRef==n&&(this._openedSnackBarRef=null),r.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{n.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):n.containerInstance.enter(),r.duration&&r.duration>0&&n.afterOpened().subscribe(()=>n._dismissAfter(r.duration))}_createOverlay(n){let r=new ui;r.direction=n.direction;let o=this._overlay.position().global(),s=n.direction==="rtl",a=n.horizontalPosition==="left"||n.horizontalPosition==="start"&&!s||n.horizontalPosition==="end"&&s,l=!a&&n.horizontalPosition!=="center";return a?o.left("0"):l?o.right("0"):o.centerHorizontally(),n.verticalPosition==="top"?o.top("0"):o.bottom("0"),r.positionStrategy=o,this._overlay.create(r)}_createInjector(n,r){let o=n&&n.viewContainerRef&&n.viewContainerRef.injector;return bt.create({parent:o||this._injector,providers:[{provide:$_,useValue:r},{provide:kG,useValue:n.data}]})}};e.\u0275fac=function(r){return new(r||e)(X(Ht),X(Cy),X(bt),X(Th),X(e,12),X(Bue))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var FG=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[yu],imports:[Jr,Ms,In,qt,LG,qt]});let i=e;return i})();var Vue=["container"],zue=["canvas"],Uue=["snapshotCanvas"],Hue=["pngDownloaderCanvas"],Gue=["hoverToolbar"],jue=["ioPicker"],Wue=["subgraphMenuTrigger"],$ue=["groupNodeIconMatTooltip"],que=["ioPickerMatTooltip"],Yue=["moreActionsMenuTrigger"],Xue=["rangeZoomDragArea"],Zue=["dragToSelectDragArea"];function Que(i,e){if(i&1){let t=ie();v(0,"div",33),H("click",function(){V(t);let r=I();return z(r.handleClickCollapseAll(r.hoveredNodeIdWhenClickingMoreActions))}),v(1,"mat-icon"),S(2,"unfold_less_double"),y(),S(3," Collapse layer & all sub-layers "),y()}}function Kue(i,e){if(i&1){let t=ie();v(0,"div",34),H("click",function(r){V(t);let o=I();return z(o.handleClickOpenGroupNodeInPopup(r,o.hoveredNodeIdWhenClickingMoreActions))}),v(1,"mat-icon"),S(2,"open_in_new"),y(),S(3," Open layer in popup "),y()}}function Jue(i,e){if(i&1){let t=ie();v(0,"div",35),H("click",function(){let r=V(t).$implicit,o=I();return z(o.handleClickSubgraphId(r))}),v(1,"mat-icon"),S(2,"subdirectory_arrow_right"),y(),S(3),y()}if(i&2){let t=e.$implicit;w(3),Me(" ",t," ")}}function ehe(i,e){if(i&1&&(v(0,"div",32),S(1),y()),i&2){let t=I();w(),Me("FPS: ",t.fps,"")}}var the=1.2,nhe=2,BG=1.5,ihe=200,DO=400,rhe=1,VG=14,ohe=5e3,she=-Kt*.5,PO=Kt*.4,zG=Kt*.3,ahe=Kt*.4,lhe="______",vn=Nn,DC=function(i){return i[i.NODE=0]="NODE",i[i.EDGE=1]="EDGE",i}(DC||{}),PC=(()=>{class i{changeDetectorRef;destroyRef;ngZone;nodeDataProviderExtensionService;nodeStylerService;overlay;snackBar;splitPaneService;subgraphSelectionService;uiStateService;viewContainerRef;webglRendererAttrsTableService;webglRendererEdgeTextsService;webglRendererIdenticalLayerService;webglRendererIoHighlightService;webglRendererIoTracingService;webglRendererNdpService;webglRendererSearchResultsService;webglRendererSnapshotService;webglRendererSubgraphSelectionService;webglRendererThreejsService;workerService;modelGraph;rendererId;paneId;rootNodeId;inPopup=!1;benchmark=!1;openInPopupClicked=new Pe;container;canvas;snapshotCanvas;pngDownloaderCanvas;hoverToolbar;ioPicker;subgraphMenuTrigger;groupNodeIconMatTooltip;ioPickerMatTooltip;moreActionsMenuTrigger;rangeZoomDragArea;dragToSelectDragArea;appService=te(st);threejsService=te(wr);SELECTED_NODE_BORDER_COLOR=new vn.Color("#1A73E8");SELECTED_NODE_BG_COLOR=new vn.Color("#C2E7FF");HOVERED_NODE_BORDER_COLOR=new vn.Color("#000");HOVERED_GROUP_NODE_BORDER_COLOR=new vn.Color("#666");IDENTICAL_GROUPS_BG_COLOR=new vn.Color("#e2edff");NODE_LABEL_COLOR=new vn.Color("#041E49");OP_NODE_BORDER_COLOR=new vn.Color("#777");GROUP_NODE_BORDER_COLOR=new vn.Color("#aaa");GROUP_NODE_LABEL_SEPARATOR_COLOR=new vn.Color("#DADCE0");GROUP_NODE_ICON_COLOR=new vn.Color("#444746");GROUP_NODE_PIN_TO_TOP_SEPARATOR_COLOR=new vn.Color("#bbb");EDGE_COLOR=new vn.Color(this.appService.config()?.edgeColor||"#aaa");EDGE_COLOR_INCOMING=new vn.Color("#009e73");EDGE_TEXT_COLOR_INCOMING=new vn.Color("#125341");EDGE_COLOR_OUTGOING=new vn.Color("#d55e00");EDGE_TEXT_COLOR_OUTGOING=new vn.Color("#994d11");ARTIFCIAL_GROUPS_BORDER_COLOR=new vn.Color("#800080");SUBGRAPH_INDICATOR_BORDER_COLOR=new vn.Color("#135cbb");SUBGRAPH_INDICATOR_BG_COLOR=new vn.Color("#d5e7ff");GROUP_NODE_BG_COLORS=(()=>{let s=[];for(let a=0;a<6;a++){let l=96+a*-2.4;s.push(new vn.Color(`hsl(212, 40%, ${Math.round(l)}%)`))}return s})();graphId="";curModelGraph;tracing=!1;showBusySpinner=!1;selectedNodeId="";flashing=!1;hoveredNodeIdWhenClickingMoreActions="";currentMinX=0;currentMaxX=0;currentMinZ=0;currentMaxZ=0;groupNodeIcon={top:-1e3,left:-1e3,width:0,height:0};ioPickerTop=-1e3;ioPickerLeft=-1e3;ioPickerWidth=0;ioPickerHeight=0;ioPickerTooltip="";subgraphIndicatorTop=-1e3;subgraphIndicatorLeft=-1e3;subgraphIndicatorWidth=0;subgraphIndicatorHeight=0;curSubgraphIdsForMenu=[];curShowOnNodeItemTypes={};curShowOnEdgeItemTypes={};nodesToRender=[];nodesToRenderMap={};edgesToRender=[];curNodeDataProviderRuns={};curHiddenInputOpNodeIds={};curHiddenOutputIds={};elementsToRender=[];updateNodesStylesSavedSelectedNodeId="";updateNodesStylesSavedIoTracingData;curSelectedRenderer;portal=null;showBusySpinnerTimeoutRef=-1;prevNodeDataProviderData=void 0;nodeBodies=new Pi(6);groupNodeIcons=new Wi(this.threejsService);groupNodeIconBgs=new Pi(99);artificialGroupBorders=new Pi(6);subgraphIndicatorBgs=new Pi(3);subgraphIndicatorIcons=new Wi(this.threejsService);edges=new vu(this.EDGE_COLOR,rhe);texts=new Wi(this.threejsService);mousePos=new vn.Vector2;draggingArea=!1;hoveredNodeId="";hoveredGroupNodeIconId="";nodeIdForHoveredGroupNodeIcon="";hoveredIoPickerId="";hoveredSubgraphIndicatorId="";savedUpdateNodeBgWhenFarProgress=-1;curNodeStylerRules=[];curProcessedNodeStylerRules=[];renderedEdgeIdsToHide=[];selectedNodeInfo=Xt(()=>{let t=this.appService.getPaneById(this.paneId);if(t)return t.selectedNodeInfo});messageEventListener=t=>{this.hideBusySpinner();let n=t.data;switch(n.eventType){case Ji.EXPAND_OR_COLLAPSE_GROUP_NODE_RESP:this.rendererId===n.rendererId&&this.handleExpandOrCollapseGroupNodeDone(n.modelGraph,n.rendererId,n.groupNodeId,n.expanded,n.deepestExpandedGroupNodeIds);break;case Ji.RELAYOUT_GRAPH_RESP:this.rendererId===n.rendererId&&this.handleReLayoutGraphDone(n.rendererId,n.modelGraph,n.selectedNodeId,n.forRestoringUiState,n.rectToZoomFit,n.forRestoringSnapshotAfterTogglingFlattenLayers,n.targetDeepestGroupNodeIdsToExpand);break;case Ji.LOCATE_NODE_RESP:this.rendererId===n.rendererId&&this.handleLocateNodeDone(n.rendererId,n.modelGraph,n.nodeId,n.deepestExpandedGroupNodeIds,n.noNodeShake===!0,n.select===!0);break;case Ji.PREPARE_POPUP_RESP:this.paneId===n.paneId&&this.openInPopupClicked.emit({id:n.rendererId,groupNode:n.modelGraph.nodesById[n.groupNodeId],initialPosition:n.initialPosition,curModelGraph:n.modelGraph});break;default:break}};constructor(t,n,r,o,s,a,l,c,d,u,h,p,f,m,b,g,_,x,C,T,D,E){this.changeDetectorRef=t,this.destroyRef=n,this.ngZone=r,this.nodeDataProviderExtensionService=o,this.nodeStylerService=s,this.overlay=a,this.snackBar=l,this.splitPaneService=c,this.subgraphSelectionService=d,this.uiStateService=u,this.viewContainerRef=h,this.webglRendererAttrsTableService=p,this.webglRendererEdgeTextsService=f,this.webglRendererIdenticalLayerService=m,this.webglRendererIoHighlightService=b,this.webglRendererIoTracingService=g,this.webglRendererNdpService=_,this.webglRendererSearchResultsService=x,this.webglRendererSnapshotService=C,this.webglRendererSubgraphSelectionService=T,this.webglRendererThreejsService=D,this.workerService=E,this.webglRendererAttrsTableService.init(this),this.webglRendererEdgeTextsService.init(this),this.webglRendererIdenticalLayerService.init(this),this.webglRendererIoHighlightService.init(this),this.webglRendererIoTracingService.init(this),this.webglRendererNdpService.init(this),this.webglRendererSearchResultsService.init(this),this.webglRendererSnapshotService.init(this),this.webglRendererSubgraphSelectionService.init(this),this.webglRendererThreejsService.init(this),this.workerService.worker.addEventListener("message",this.messageEventListener),mt(()=>{this.curSelectedRenderer=this.appService.curSelectedRenderer()}),this.appService.spaceKeyToZoomFitClicked.pipe(Vi(this.destroyRef)).subscribe(P=>{this.rendererId===this.curSelectedRenderer?.id&&this.webglRendererThreejsService.zoomFitGraph()}),mt(()=>{let P=this.appService.curToLocateNodeInfo();P?.rendererId===this.rendererId&&(P&&this.sendLocateNodeRequest(P.nodeId,P.rendererId,P.noNodeShake,P.select),this.appService.curToLocateNodeInfo.set(void 0))},{allowSignalWrites:!0}),mt(()=>{let P=this.appService.getPaneById(this.paneId);if(!P||!P.modelGraph)return;let Y=P.nodeIdToReveal;if(!Y)return;this.revealNode(Y)&&this.appService.setNodeToReveal(this.paneId,void 0)},{allowSignalWrites:!0}),mt(()=>{let P=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);this.curNodeDataProviderRuns={};for(let Y of P)this.curNodeDataProviderRuns[Y.runId]=Y}),mt(()=>{let P=this.webglRendererNdpService.curNodeDataProviderResults();P!==this.prevNodeDataProviderData&&(this.handleCurNodeDataProviderResultsChanged(),this.prevNodeDataProviderData=P)}),mt(()=>{if(!this.appService.getPaneById(this.paneId))return;let Y=this.appService.getShowOnNodeItemTypes(this.paneId,this.rendererId);JSON.stringify(Y)!==JSON.stringify(this.curShowOnNodeItemTypes)&&(this.curShowOnNodeItemTypes=Y,this.sendRelayoutGraphRequest(this.selectedNodeId))}),this.appService.expandOrCollapseAllGraphLayersClicked.pipe(Vi(this.destroyRef)).subscribe(P=>{P.rendererId===this.rendererId&&this.sendExpandOrCollapseGroupNodeRequest(void 0,!0,P.expandOrCollapse)}),mt(()=>{let P=this.selectedNodeInfo();P?.rendererId===this.rendererId&&(this.selectedNodeId=P?.nodeId||"",this.tracing&&(this.selectedNodeId&&Et(this.curModelGraph.nodesById[this.selectedNodeId])?this.webglRendererIoTracingService.genTracingData():this.webglRendererIoTracingService.clearTracingData()),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render())}),this.appService.downloadAsPngClicked.pipe(Vi(this.destroyRef)).subscribe(P=>{P.rendererId===this.rendererId&&this.handleDownloadAsPng(P.fullGraph,P.transparentBackground)}),mt(()=>{let P=this.nodeStylerService.rules().filter($=>yh($.queries)&&Object.keys($.styles).length>0),Y=JSON.stringify(P);JSON.stringify(this.curNodeStylerRules)!==Y&&(this.curNodeStylerRules=JSON.parse(Y),this.curProcessedNodeStylerRules=Zb(this.curNodeStylerRules),this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render())}),mt(()=>{if(!this.appService.getPaneById(this.paneId))return;let Y=this.appService.getShowOnEdgeItemTypes(this.paneId,this.rendererId);JSON.stringify(Y)!==JSON.stringify(this.curShowOnEdgeItemTypes)&&(this.curShowOnEdgeItemTypes=Y,this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render())}),mt(()=>{this.curHiddenInputOpNodeIds=this.splitPaneService.hiddenInputOpNodeIds(),this.curHiddenOutputIds=this.splitPaneService.hiddenOutputIds(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.updateNodesStyles(),this.webglRendererThreejsService.render()})}ngOnInit(){this.graphId=this.modelGraph.id,this.curModelGraph=this.modelGraph,this.appService.updateCurrentModelGraph(this.paneId,this.curModelGraph),this.inPopup||(this.curShowOnNodeItemTypes=this.appService.getSavedShowOnNodeItemTypes(),this.curShowOnEdgeItemTypes=this.appService.getSavedShowOnEdgeItemTypes()),this.webglRendererThreejsService.setupZoomAndPan(this.container.nativeElement,1e-4,20),this.webglRendererThreejsService.setupThreeJs(),this.ngZone.runOutsideAngular(()=>{this.canvas.nativeElement.addEventListener("mousemove",s=>{this.handleMouseMove(s)})});let t=this.appService.curInitialUiState(),n=s=>{this.updateNodesAndEdgesToRender(),this.renderGraph(),this.webglRendererThreejsService.zoomFitGraph(.9,0);let a=this.appService.getPaneById(this.paneId);if(a?.snapshotToRestore!=null){let l=a.snapshotToRestore;this.curShowOnNodeItemTypes=a.snapshotToRestore.showOnNodeItemTypes||{},this.appService.setShowOnNode(this.paneId,this.rendererId,this.curShowOnNodeItemTypes),this.sendRelayoutGraphRequest(l.selectedNodeId||"",l.deepestExpandedGroupNodeIds||[],!1,l.rect,!0,l.showOnNodeItemTypes,!0),a.snapshotToRestore=void 0}else s!=null&&s!==""&&setTimeout(()=>{this.appService.curToLocateNodeInfo.set({nodeId:s,rendererId:this.rendererId,isGroupNode:!1,noNodeShake:!0})});this.sendExpandGroupNodeRequest(this.rootNodeId||"")};if(!t||t.paneStates.length===0||this.inPopup){let s=this.inPopup?void 0:this.appService.getPaneById(this.paneId)?.selectedNodeInfo?.nodeId;n(s)}else{let s=this.appService.getPaneIndexById(this.paneId),a=t.paneStates[s];a?(this.sendRelayoutGraphRequest(a.selectedNodeId,a.deepestExpandedGroupNodeIds,!0),this.uiStateService.setDeepestExpandedGroupNodeIds(a.deepestExpandedGroupNodeIds,s)):n()}let r=window;r[Gb]==null&&(r[Gb]={renderers:{}});let o=this.inPopup?-1:this.appService.getPaneIndexById(this.paneId);r[Gb].renderers[o]=this,this.benchmark&&this.startBenchmark()}ngOnDestroy(){this.workerService.worker.removeEventListener("message",this.messageEventListener),this.webglRendererThreejsService.dispose(),document.body.style.cursor="default"}getActiveSelectedNodeInfo(){if(this.selectedNodeId)return{nodeId:this.selectedNodeId,rendererId:this.rendererId,isGroupNode:xt(this.curModelGraph.nodesById[this.selectedNodeId])}}toggleIoTrace(){this.tracing=!this.tracing,this.tracing?this.webglRendererIoTracingService.genTracingData():this.webglRendererIoTracingService.clearTracingData(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.updateNodesStyles(),this.webglRendererThreejsService.render()}setZoomFactor(t){let n=this.container.nativeElement,r=this.webglRendererThreejsService.convertScreenPosToScene(0,0),o=this.webglRendererThreejsService.convertScreenPosToScene(n.offsetWidth,n.offsetHeight),s=Math.min(r.x,o.x),a=Math.max(r.x,o.x),l=Math.min(r.y,o.y),c=Math.max(r.y,o.y),d=a-s,u=c-l,h=(s+a)/2,p=(l+c)/2,f=h-d/2/t,m=h+d/2/t,b=p-u/2/t,g=p+u/2/t;this.webglRendererThreejsService.zoomFit({x:f,y:b,width:m-f,height:g-b},.9,0,!1,!1)}handleMouseDownCanvas(t){Tm&&(t.metaKey||t.ctrlKey)||!Tm&&t.ctrlKey?(this.draggingArea=!0,this.rangeZoomDragArea.start(t,(n,r,o,s,a)=>{let l=this.webglRendererThreejsService.convertScreenPosToScene(r,o),c=this.webglRendererThreejsService.convertScreenPosToScene(s,a),d=Math.min(l.x,c.x),u=Math.max(l.x,c.x),h=Math.min(l.y,c.y),p=Math.max(l.y,c.y);this.webglRendererThreejsService.zoomFit({x:d,y:h,width:u-d,height:p-h},.9,200,!1,!1),this.draggingArea=!1})):t.shiftKey&&this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&(this.draggingArea=!0,this.dragToSelectDragArea.start(t,(n,r,o,s,a)=>{if(this.draggingArea=!1,n)this.hoveredNodeId?this.curModelGraph.nodesById[this.hoveredNodeId]&&this.handleShiftSelectNode(this.hoveredNodeId):this.handleClearSubgraphSelectedNodes();else{let l=this.webglRendererThreejsService.convertScreenPosToScene(r,o),c=this.webglRendererThreejsService.convertScreenPosToScene(s,a),d=Math.min(l.x,c.x),u=Math.max(l.x,c.x),h=Math.min(l.y,c.y),p=Math.max(l.y,c.y),f=[];for(let{node:m}of this.nodesToRender){let b=this.getNodeX(m),g=this.getNodeY(m),_=this.getNodeWidth(m),x=this.getNodeHeight(m),C=b,T=g,D=b+_,E=g+x,P=uD,$=h>E,U=p1&&(this.curSubgraphIdsForMenu=n,this.subgraphMenuTrigger.openMenu())}handleClickSubgraphId(t){this.openSubgraph(t)}handleDoubleClickOnGraph(t,n){this.selectedNodeId!==""&&!n&&this.handleToggleExpandCollapse(this.curModelGraph.nodesById[this.selectedNodeId],t)}handleClickOnGraph(t){this.hoveredNodeId?this.curModelGraph.nodesById[this.hoveredNodeId]&&(t||this.handleSelectNode(this.hoveredNodeId)):this.handleSelectNode("")}handleMouseEnterGroupNodeIcon(){this.groupNodeIconMatTooltip.show()}handleMouseLeaveGroupNodeIcon(){this.groupNodeIconMatTooltip.hide()}handleMouseEnterIoPicker(){this.ioPickerMatTooltip.show()}handleMouseLeaveIoPicker(){this.ioPickerMatTooltip.hide()}handleHoveredGroupNodeIconChanged(t){if(this.groupNodeIcon.top=-1e3,this.groupNodeIcon.left=-1e3,this.groupNodeIcon.width=0,this.groupNodeIcon.height=0,this.groupNodeIcon.tooltip=void 0,this.hoveredGroupNodeIconId!==""&&t!=null){let{x:n,y:r}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x-t.bound.width/2,t.bound.y-t.bound.height/2),{x:o,y:s}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x+t.bound.width/2,t.bound.y+t.bound.height/2);if(this.groupNodeIcon.top=r,this.groupNodeIcon.left=n,this.groupNodeIcon.width=o-n,this.groupNodeIcon.height=s-r,t.id.includes("_left")){let a=this.curModelGraph.nodesById[t.nodeId];this.groupNodeIcon.tooltip=a.expanded?"Collapse layer":"Expand layer"}else t.id.includes("_right")&&(this.groupNodeIcon.tooltip="More actions")}this.changeDetectorRef.detectChanges()}isNodeRendered(t){return this.nodesToRenderMap[t]!=null}sendLocateNodeRequest(t,n,r=!1,o=!1){if(this.showBusySpinnerWithDelay(),this.isNodeRendered(t))this.hideBusySpinner(),this.handleLocateNodeDone(n,this.curModelGraph,t,[],r,o,!0);else{let s={eventType:Ji.LOCATE_NODE_REQ,modelGraphId:this.curModelGraph.id,showOnNodeItemTypes:this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,nodeId:t,rendererId:n,noNodeShake:r,select:o};this.workerService.worker.postMessage(s)}}sendRelayoutGraphRequest(t,n,r=!1,o,s=!1,a,l){this.showBusySpinnerWithDelay();let c={eventType:Ji.RELAYOUT_GRAPH_REQ,modelGraphId:this.curModelGraph.id,showOnNodeItemTypes:a||this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,selectedNodeId:t,targetDeepestGroupNodeIdsToExpand:n,rendererId:this.rendererId,forRestoringUiState:r,rectToZoomFit:o,clearAllExpandStates:s,forRestoringSnapshotAfterTogglingFlattenLayers:l};this.workerService.worker.postMessage(c)}animateIntoPositions(t=n=>{this.updateAnimatinProgress(n)}){let n=Date.now(),r=()=>{let o=Date.now()-n,s=this.appService.testMode?1:Math.min(1,o/ihe);if(s=Math.sin(s*Math.PI/2),t(s),this.webglRendererThreejsService.render(),s>=1){t(s),this.webglRendererThreejsService.render();return}requestAnimationFrame(r)};r()}flash(){this.flashing=!0,this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.flashing=!1,this.changeDetectorRef.detectChanges()},300)}updateNodeBgColorWhenFar(){let t=this.webglRendererThreejsService.convertZFromSceneToScreen(30)*this.webglRendererThreejsService.curScale,n=7.5,o=Math.max(0,Math.min(1,(n-t)/(n-7)));Math.abs(o-this.savedUpdateNodeBgWhenFarProgress)<1e-5||(this.savedUpdateNodeBgWhenFarProgress=o,this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,o/3))}showIoTree(t,n,r){let o=this.createOverlay(t),s=o.attach(this.portal),a=cl(n,[],r);s.instance.solidBackground=!0,s.instance.rendererId=this.rendererId,s.instance.updateData(a),s.instance.onClose.subscribe(()=>{o.dispose()})}getNodeX(t){return(t.x||0)+(t.globalX||0)}getNodeY(t){return(t.y||0)+(t.globalY||0)}getNodeWidth(t){return t.width||0}getNodeHeight(t){return t.height||0}getNodeLabelRelativeY(t){return 14}getNodeLabelSizes(t){let n=Fo/this.texts.getFontSize(),r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=0,a=dd(this.getNodeLabel(t));for(let l=0;l{this.webglRendererThreejsService.zoomFit(s,1,200,!1,!1)};a?setTimeout(()=>{c()}):c()}else r!==lhe&&this.webglRendererThreejsService.zoomFitOnNode(r,n,o?0:DO);this.selectedNodeId!==r&&this.handleSelectNode(r||""),this.inPopup||this.uiStateService.setDeepestExpandedGroupNodeIds(l||[],this.appService.getPaneIndexById(this.paneId))}handleCurNodeDataProviderResultsChanged(){this.renderGraph(),this.updateNodesStyles(),this.webglRendererThreejsService.render()}handleLocateNodeDone(t,n,r,o,s,a,l=!1){this.updateCurModelGraph(n),this.updateNodesAndEdgesToRender(),a&&this.appService.selectNode(this.paneId,{nodeId:r,rendererId:t,isGroupNode:xt(this.curModelGraph.nodesById[r])}),this.webglRendererThreejsService.zoomFitOnNode(r,n,DO),l||(this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render(),this.inPopup||this.uiStateService.setDeepestExpandedGroupNodeIds(o,this.appService.getPaneIndexById(this.paneId))),s||setTimeout(()=>{this.shakeNode(r)},250)}sendExpandGroupNodeRequest(t){let n=this.curModelGraph.nodesById[t];n!=null&&!n.expanded&&this.sendExpandOrCollapseGroupNodeRequest(n,!1,!0)}sendExpandOrCollapseGroupNodeRequest(t,n=!1,r){this.showBusySpinnerWithDelay();let o={eventType:Ji.EXPAND_OR_COLLAPSE_GROUP_NODE_REQ,modelGraphId:this.curModelGraph.id,groupNodeId:t?.id,expand:r??!t?.expanded,showOnNodeItemTypes:this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,rendererId:this.rendererId,paneId:this.paneId,all:n,ts:Date.now()};this.workerService.worker.postMessage(o)}renderGraph(){this.clearScene(),this.renderEdges(),this.renderTexts(),this.curShowOnEdgeItemTypes[Fl.TENSOR_SHAPE]?.selected&&this.webglRendererEdgeTextsService.renderEdgeTexts(),this.webglRendererAttrsTableService.renderAttrsTable(),this.renderNodes(),this.webglRendererNdpService.renderNodeDataProviderDistributionBars(),this.renderArtificialGroupBorders(),this.webglRendererSearchResultsService.renderSearchResults(),this.webglRendererSubgraphSelectionService.renderSubgraphSelectedNodeMarkers(),this.updateNodeBgColorWhenFar(),this.animateIntoPositions()}renderNodes(){this.currentMinX=Number.POSITIVE_INFINITY,this.currentMinZ=Number.POSITIVE_INFINITY,this.currentMaxX=Number.NEGATIVE_INFINITY,this.currentMaxZ=Number.NEGATIVE_INFINITY;let t=this.nodesToRender.length,n=[],r=[],o=[],s=[],a=[],l=Fo/this.texts.getFontSize();for(let c=0;c0){if(this.appService.config()?.showOpNodeOutOfLayerEdgesWithoutSelecting){for(let{node:t}of this.nodesToRender)if(Et(t)&&t.nsParentId){let{overlayEdges:n,renderedEdges:r}=this.webglRendererIoHighlightService.getHighlightedIncomingNodesAndEdges(this.curHiddenInputOpNodeIds,t,{ignoreEdgesWithinSameNamespace:!0,reuseRenderedEdgeCurvePoints:!0});if(n.length>0){this.renderedEdgeIdsToHide.push(...r.map(a=>a.id));for(let a of n)this.edgesToRender.push({edge:a,index:92/Kt})}let{overlayEdges:o,renderedEdges:s}=this.webglRendererIoHighlightService.getHighlightedOutgoingNodesAndEdges(this.curHiddenOutputIds,t,{ignoreEdgesWithinSameNamespace:!0,reuseRenderedEdgeCurvePoints:!0});if(o.length>0){this.renderedEdgeIdsToHide.push(...s.map(a=>a.id));for(let a of o)this.edgesToRender.push({edge:a,index:92/Kt})}}}this.edges.generateMesh(this.edgesToRender,this.curModelGraph),this.webglRendererThreejsService.addToScene(this.edges.edgesMesh),this.webglRendererThreejsService.addToScene(this.edges.arrowHeadsMesh)}}renderTexts(){let t=[];for(let{node:n,index:r}of this.nodesToRender){let o=this.NODE_LABEL_COLOR;for(let a of this.curProcessedNodeStylerRules)if(Dm(n,a.queries,this.curModelGraph)){let l=cd(a,Hs.NODE_TEXT_COLOR);l!==""&&(o=new vn.Color(l));break}let s=dd(this.getNodeLabel(n));for(let a=0;a{this.hoveredNodeId=r,this.updateNodesStyles(),this.webglRendererThreejsService.render()}),this.groupNodeIconBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredGroupNodeIconId=r,this.nodeIdForHoveredGroupNodeIcon=o?.nodeId||"",this.updateNodesStyles(),this.handleHoveredGroupNodeIconChanged(o),this.webglRendererThreejsService.render()},!1),this.webglRendererIoHighlightService.ioPickerBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredIoPickerId=r,this.handleHoveredIoPickerChanged(o)}),this.subgraphIndicatorBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredSubgraphIndicatorId=r,this.handleHoveredSubgraphIndicatorChanged(o)})}handleHoveredIoPickerChanged(t){this.ioPickerTop=-1e3,this.ioPickerLeft=-1e3,this.ioPickerTooltip="";let n=this.hoveredIoPickerId.endsWith("input");if(this.hoveredIoPickerId!==""){let{x:r,y:o}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x-t.bound.width/2,t.bound.y-t.bound.height/2),{x:s,y:a}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x+t.bound.width/2,t.bound.y+t.bound.height/2);this.ioPickerTop=o,this.ioPickerLeft=r,this.ioPickerWidth=s-r,this.ioPickerHeight=a-o,this.ioPickerTooltip=`Click to reveal ${n?"input":"output"} node(s)`}this.changeDetectorRef.detectChanges()}handleHoveredSubgraphIndicatorChanged(t){if(this.subgraphIndicatorTop=-1e3,this.subgraphIndicatorLeft=-1e3,this.hoveredSubgraphIndicatorId!==""){let{x:n,y:r}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x-t.bound.width/2,t.bound.y-t.bound.height/2),{x:o,y:s}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x+t.bound.width/2,t.bound.y+t.bound.height/2);this.subgraphIndicatorTop=r,this.subgraphIndicatorLeft=n,this.subgraphIndicatorWidth=o-n,this.subgraphIndicatorHeight=s-r}this.changeDetectorRef.detectChanges()}updateNodesStyles(){let t=!1;this.selectedNodeId!==this.updateNodesStylesSavedSelectedNodeId&&(this.updateNodesStylesSavedSelectedNodeId=this.selectedNodeId,t=!0);let n=!1;this.webglRendererIoTracingService.curIoTracingData!==this.updateNodesStylesSavedIoTracingData&&(this.updateNodesStylesSavedIoTracingData=this.webglRendererIoTracingService.curIoTracingData,n=!0),this.nodeBodies.restoreBorderColors(),this.nodeBodies.restoreBgColors(),this.nodeBodies.restoreBorderWidths(),this.nodeBodies.restoreOpacities(),this.groupNodeIconBgs.restoreOpacities(),this.texts.restoreOpacities(),this.texts.restoreColors(),this.webglRendererEdgeTextsService.edgeTexts.restoreOpacities(),this.groupNodeIcons.restoreOpacities(),this.webglRendererAttrsTableService.attrsTableTexts.restoreOpacities(),(t||n)&&this.edges.restoreColors(),this.edges.restoreYOffsets();let r=this.curModelGraph.nodesById[this.selectedNodeId];if(r!=null&&xt(r)){let u=r.identicalGroupIndex;if(u!=null){let h=this.nodesToRender.filter(({node:p})=>xt(p)&&p.identicalGroupIndex===u).map(({node:p})=>p.id);this.nodeBodies.updateBgColor(h,this.IDENTICAL_GROUPS_BG_COLOR)}}let o=this.curModelGraph.nodesById[this.hoveredNodeId],s=xt(o)?this.HOVERED_GROUP_NODE_BORDER_COLOR:this.HOVERED_NODE_BORDER_COLOR;Et(o)&&o.style?.hoveredBorderColor&&(s=new vn.Color(o.style.hoveredBorderColor)),this.nodeBodies.updateBorderColor([this.hoveredNodeId],s),this.selectedNodeId&&r!=null&&(this.nodeBodies.updateBorderColor([this.selectedNodeId],this.SELECTED_NODE_BORDER_COLOR),this.nodeBodies.updateBorderWidth([this.selectedNodeId],nhe),this.nodeBodies.updateBgColor([this.selectedNodeId],this.SELECTED_NODE_BG_COLOR,Et(r))),this.groupNodeIconBgs.updateOpacity([this.hoveredGroupNodeIconId],.07);let a=Object.keys(this.webglRendererIoHighlightService.inputsByHighlightedNode);if(a.length>0){this.nodeBodies.updateBorderColor(a,new vn.Color(this.EDGE_COLOR_INCOMING.r,this.EDGE_COLOR_INCOMING.g,this.EDGE_COLOR_INCOMING.b));for(let u of a)this.nodeBodies.updateBorderWidth([u],BG)}let l=Object.keys(this.webglRendererIoHighlightService.outputsByHighlightedNode);if(l.length>0){this.nodeBodies.updateBorderColor(l,new vn.Color(this.EDGE_COLOR_OUTGOING.r,this.EDGE_COLOR_OUTGOING.g,this.EDGE_COLOR_OUTGOING.b));for(let u of l)this.nodeBodies.updateBorderWidth([u],BG)}let c=[...this.webglRendererIoHighlightService.inputsRenderedEdges,...this.webglRendererIoHighlightService.outputsRenderedEdges].map(u=>u.id);c.push(...this.renderedEdgeIdsToHide),this.edges.updateYOffsets(c,1e3);let d=this.webglRendererNdpService.curNodeDataProviderResults()||{};for(let u of Object.keys(d)){if(!this.isNodeRendered(u)||!Et(this.curModelGraph.nodesById[u]))continue;let h=d[u].bgColor;h&&h!=="transparent"&&this.nodeBodies.updateBgColor([u],new vn.Color(h));let p=d[u].textColor;p&&this.texts.updateColorInNode([u],new vn.Color(p))}if(this.webglRendererIoTracingService.curIoTracingData!=null){let u=Object.keys(this.curModelGraph.nodesById).filter(p=>!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p)&&this.isNodeRendered(p));this.nodeBodies.updateOpacity(u,.2),this.texts.updateOpacityInNode(u,.3),this.groupNodeIcons.updateOpacityInNode(u,.3),this.webglRendererAttrsTableService.attrsTableTexts.updateOpacityInNode(u,.3),this.webglRendererEdgeTextsService.edgeTexts.updateOpacityInNode(u,.3);let h=this.edgesToRender.filter(({edge:p})=>!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p.fromNodeId)||!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p.toNodeId)).map(({edge:p})=>p.id);this.edges.updateColors(h,{r:.92,g:.92,b:.92})}}shakeNode(t){if(this.appService.testMode)return;let n=Date.now(),r=()=>{let o=Date.now()-n,s=Math.min(1,o/1100);s=-(Math.cos(Math.PI*s)-1)/2;let a=Math.sin(s*Math.PI*9)*8;if(this.nodeBodies.updateAngle(t,a),this.webglRendererSearchResultsService.searchResultsHighlightBorders.updateAngle(t,a),this.webglRendererThreejsService.render(),s>=1){this.nodeBodies.updateAngle(t,0),this.webglRendererSearchResultsService.searchResultsHighlightBorders.updateAngle(t,0),this.webglRendererThreejsService.render();return}requestAnimationFrame(r)};r()}clearScene(){let t=[this.webglRendererSearchResultsService.searchResultsHighlightBorders.mesh,this.webglRendererSearchResultsService.searchResultsNodeLabelHighlightBg.mesh];this.webglRendererThreejsService.clearScene(t),this.updateNodesStylesSavedSelectedNodeId="",this.updateNodesStylesSavedIoTracingData=void 0}handleDownloadAsPng(t,n){return At(this,null,function*(){let r=this.container.nativeElement.offsetWidth/ld(),o=this.container.nativeElement.offsetHeight/ld(),s=this.webglRendererThreejsService.camera;if(t){let d=this.currentMaxX+20,u=this.currentMinX-20,h=this.currentMaxZ+20,p=this.currentMinZ-20;r=d-u,o=h-p;let f=ohe/ld();r>f&&(o=o*f/r,r=f),o>f&&(r=r*f/o,o=f),s=this.webglRendererThreejsService.createOrthographicCamera(u,d,-p,-h)}let a=this.pngDownloaderCanvas.nativeElement;this.webglRendererThreejsService.setupPngDownloaderRenderer(a,n,r,o),this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,0),this.webglRendererThreejsService.renderPngDownloader(s),this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,this.savedUpdateNodeBgWhenFarProgress/3);let l=document.createElement("a");l.download="model_explorer_graph.png",aa.setHref(l,a.toDataURL()),l.click(),this.webglRendererThreejsService.setSceneBackground(new vn.Color(16777215))})}openSubgraph(t){return At(this,null,function*(){this.appService.addSubgraphBreadcrumbItem(this.paneId,this.curModelGraph.id,t,yield this.webglRendererSnapshotService.takeSnapshot());let n=this.appService.getGraphById(t);n&&(this.appService.selectNode(this.paneId,void 0),this.appService.setFlattenLayersInCurrentPane(!1),this.appService.curInitialUiState.set(void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.selectGraphInCurrentPane(n))})}getGroupNodeLabelSeparatorId(t,n){return`${t}_${n}`}getGroupNodeBgColor(t){let r=(t.namespace||"").split("/").filter(s=>s!=="").length,o=this.GROUP_NODE_BG_COLORS[Math.min(this.GROUP_NODE_BG_COLORS.length-1,r)];return this.threeColorToRgb(o)}threeColorToRgb(t){return{r:t.r,g:t.g,b:t.b}}startBenchmark(){let t=()=>{this.webglRendererThreejsService.render(!0),requestAnimationFrame(t)};t()}handleShiftSelectNode(t){this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&this.subgraphSelectionService.toggleNode(t)}handleClearSubgraphSelectedNodes(){this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&this.subgraphSelectionService.clearSelection()}createOverlay(t){let n=new ui({positionStrategy:this.overlay.position().flexibleConnectedTo(t).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}]).withDefaultOffsetX(t.clientWidth).withViewportMargin(20),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",maxHeight:"400px",panelClass:"io-tree-popup-container"}),r=this.overlay.create(n);return this.portal=new Di(xc,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}showBusySpinnerWithDelay(){this.hideBusySpinner(),this.showBusySpinnerTimeoutRef=window.setTimeout(()=>{this.showBusySpinnerTimeoutRef<0||(this.snackBar.open("Processing. Please wait..."),this.showBusySpinner=!0,this.changeDetectorRef.detectChanges())},1e3)}hideBusySpinner(){this.showBusySpinnerTimeoutRef>=0&&(clearTimeout(this.showBusySpinnerTimeoutRef),this.showBusySpinnerTimeoutRef=-1),this.snackBar.dismiss(),this.showBusySpinner=!1,this.changeDetectorRef.detectChanges()}revealNode(t){let n=this.curModelGraph.nodesById[t];return n?(this.sendRelayoutGraphRequest(t,n.nsParentId?[n.nsParentId]:[]),!0):!1}updateCurModelGraph(t){let n=this.curModelGraph.edgesByGroupNodeIds;this.curModelGraph=wt(Z({},t),{edgesByGroupNodeIds:Z(Z({},n),t.edgesByGroupNodeIds)}),this.appService.updateCurrentModelGraph(this.paneId,this.curModelGraph)}updateNodesAndEdgesToRender(){if(!this.curModelGraph)return;this.elementsToRender=[],this.nodesToRender=[],this.nodesToRenderMap={},this.edgesToRender=[];let t=!0,n=!1,r=o=>{let s=this.curModelGraph.nodesById[o||""];if(t&&s){this.elementsToRender.push({type:DC.NODE,id:s.id,node:s});let l={node:s,index:this.elementsToRender.length-1};this.nodesToRender.push(l),this.nodesToRenderMap[l.node.id]=l,xt(s)&&s.sectionContainer&&(n=!0)}if(t=!1,o&&s&&s.expanded||!o)for(let l of this.curModelGraph.edgesByGroupNodeIds[o||""]||[])this.elementsToRender.push({type:DC.EDGE,id:l.id,edge:l}),this.edgesToRender.push({edge:l,index:this.elementsToRender.length-1});let a=[];o?s.expanded&&(a=(s.nsChildrenIds||[]).map(l=>this.curModelGraph.nodesById[l])):a=this.curModelGraph.rootNodes;for(let l of a){let c={type:DC.NODE,id:l.id,node:l};!n&&xt(l)&&l.sectionContainer&&(n=!0),this.elementsToRender.push(c);let d={node:l,index:this.elementsToRender.length-1};this.nodesToRender.push(d),this.nodesToRenderMap[d.node.id]=d,xt(l)&&l.expanded&&r(l.id)}};r(this.rootNodeId),this.appService.setPaneHasArtificialLayers(this.paneId,n)}getNodeLabel(t){return Et(t)?t.label==="Placeholder"?t.id:t.label:xt(t)?t.label:"-"}static \u0275fac=function(n){return new(n||i)(M(Fe),M(Ni),M(Le),M(Cr),M(la),M(Ht),M(yu),M(_c),M(Xo),M(zl),M(Yt),M(gC),M(_C),M(yC),M(bC),M(xC),M(wC),M(CC),M(SC),M(EC),M(IC),M(Ul))};static \u0275cmp=le({type:i,selectors:[["webgl-renderer"]],viewQuery:function(n,r){if(n&1&&(Ie(Vue,7),Ie(zue,7),Ie(Uue,7),Ie(Hue,7),Ie(Gue,7),Ie(jue,7),Ie(Wue,7),Ie($ue,5),Ie(que,5),Ie(Yue,7),Ie(Xue,7),Ie(Zue,7)),n&2){let o;be(o=ye())&&(r.container=o.first),be(o=ye())&&(r.canvas=o.first),be(o=ye())&&(r.snapshotCanvas=o.first),be(o=ye())&&(r.pngDownloaderCanvas=o.first),be(o=ye())&&(r.hoverToolbar=o.first),be(o=ye())&&(r.ioPicker=o.first),be(o=ye())&&(r.subgraphMenuTrigger=o.first),be(o=ye())&&(r.groupNodeIconMatTooltip=o.first),be(o=ye())&&(r.ioPickerMatTooltip=o.first),be(o=ye())&&(r.moreActionsMenuTrigger=o.first),be(o=ye())&&(r.rangeZoomDragArea=o.first),be(o=ye())&&(r.dragToSelectDragArea=o.first)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId",rootNodeId:"rootNodeId",inPopup:"inPopup",benchmark:"benchmark"},outputs:{openInPopupClicked:"openInPopupClicked"},standalone:!0,features:[Bt([gC,_C,yC,bC,xC,wC,CC,SC,EC,IC]),ce],decls:39,vars:59,consts:[["container",""],["canvas",""],["snapshotCanvas",""],["pngDownloaderCanvas",""],["groupNodeIconMatTooltip","matTooltip"],["moreActionsMenuTrigger","matMenuTrigger"],["moreActionsMenu","matMenu"],["ioPicker",""],["ioPickerMatTooltip","matTooltip"],["subgraphIndicator",""],["subgraphMenuTrigger","matMenuTrigger"],["menu","matMenu"],["rangeZoomDragArea",""],["dragToSelectDragArea",""],[1,"container",3,"mouseleave"],[1,"main",3,"mousedown","contextmenu"],[1,"snapshot"],[1,"download-png"],[1,"group-node-icon",3,"mouseenter","mouseleave","mousedown"],["matTooltipPosition","above",1,"group-node-icon-tooltip",3,"matTooltip","matTooltipShowDelay","matTooltipDisabled"],[1,"more-actions-menu-trigger",3,"matMenuTriggerFor"],[1,"model-explorer-menu-item-with-icon","expand-all",3,"click"],["class","model-explorer-menu-item-with-icon collapse-all",3,"click",4,"ngIf"],["class","model-explorer-menu-item-with-icon open-in-popup",3,"click",4,"ngIf"],[1,"io-picker",3,"mousedown","mouseenter","mouseleave"],["matTooltipPosition","above",1,"io-picker-tooltip",3,"matTooltip"],["matTooltip","Jump to subgraph","matTooltipPosition","above",1,"subgraph-indicator",3,"mousedown","click"],[1,"subgraph-indicator-menu-trigger",3,"matMenuTriggerFor"],[1,"model-explorer-menu-item-with-icon"],["bgColor","rgba(97, 175, 252, 0.2)","borderColor","#1976d2"],["bgColor","rgba(9, 184, 62, 0.2)","borderColor","#09b83e"],[1,"flash"],[1,"fps"],[1,"model-explorer-menu-item-with-icon","collapse-all",3,"click"],[1,"model-explorer-menu-item-with-icon","open-in-popup",3,"click"],[1,"model-explorer-menu-item-with-icon",3,"click"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",14,0),H("mouseleave",function(a){return V(o),z(r.handleMouseLeaveRenderer(a))}),v(2,"canvas",15,1),H("mousedown",function(a){return V(o),z(r.handleMouseDownCanvas(a))})("contextmenu",function(a){return V(o),z(a.preventDefault())}),y(),J(4,"canvas",16,2)(6,"canvas",17,3),v(8,"div",18),H("mouseenter",function(){return V(o),z(r.handleMouseEnterGroupNodeIcon())})("mouseleave",function(){return V(o),z(r.handleMouseLeaveGroupNodeIcon())})("mousedown",function(a){return V(o),z(r.handleClickGroupNodeIcon(a))}),y(),J(9,"div",19,4)(11,"div",20,5),v(13,"mat-menu",null,6)(15,"div",21),H("click",function(){return V(o),z(r.handleClickExpandAll(r.hoveredNodeIdWhenClickingMoreActions))}),v(16,"mat-icon"),S(17,"unfold_more_double"),y(),S(18," Expand layer & all sub-layers "),y(),W(19,Que,4,0,"div",22)(20,Kue,4,0,"div",23),y(),v(21,"div",24,7),H("mousedown",function(a){return V(o),z(r.handleClickIoPicker(a))})("mouseenter",function(){return V(o),z(r.handleMouseEnterIoPicker())})("mouseleave",function(){return V(o),z(r.handleMouseLeaveIoPicker())}),y(),J(23,"div",25,8),v(25,"div",26,9),H("mousedown",function(a){return V(o),z(a.stopPropagation())})("click",function(){return V(o),z(r.handleClickSubgraphIndicator())}),y(),J(27,"div",27,10),v(29,"mat-menu",null,11),ln(31,Jue,4,1,"div",28,Qr),y(),J(33,"drag-area",29,12)(35,"drag-area",30,13)(37,"div",31),W(38,ehe,2,1,"div",32),y()}if(n&2){let o=ve(14),s=ve(30);w(8),tn("top",r.groupNodeIcon.top,"px")("left",r.groupNodeIcon.left,"px")("width",r.groupNodeIcon.width,"px")("height",r.groupNodeIcon.height,"px"),w(),tn("top",r.groupNodeIcon.top,"px")("left",r.groupNodeIcon.left,"px")("width",r.groupNodeIcon.width,"px")("height",r.groupNodeIcon.height,"px"),N("matTooltip",r.groupNodeIcon.tooltip||"")("matTooltipShowDelay",200)("matTooltipDisabled",r.groupNodeIcon.tooltip==null),w(2),tn("top",r.groupNodeIcon.top+r.groupNodeIcon.height,"px")("left",r.groupNodeIcon.left,"px"),N("matMenuTriggerFor",o),w(8),N("ngIf",r.getShowCollapseAllButton(r.hoveredNodeIdWhenClickingMoreActions)),w(),N("ngIf",r.showOpenInPopupButton),w(),tn("top",r.ioPickerTop,"px")("left",r.ioPickerLeft,"px")("width",r.ioPickerWidth,"px")("height",r.ioPickerHeight,"px"),w(2),tn("top",r.ioPickerTop,"px")("left",r.ioPickerLeft,"px")("width",r.ioPickerWidth,"px")("height",r.ioPickerHeight,"px"),N("matTooltip",r.ioPickerTooltip),w(2),tn("top",r.subgraphIndicatorTop,"px")("left",r.subgraphIndicatorLeft,"px")("width",r.subgraphIndicatorWidth,"px")("height",r.subgraphIndicatorHeight,"px"),w(2),tn("top",r.subgraphIndicatorTop+r.subgraphIndicatorHeight,"px")("left",r.subgraphIndicatorLeft,"px"),N("matMenuTriggerFor",s),w(4),cn(r.curSubgraphIdsForMenu),w(6),se("flashing",r.flashing),w(),ae(r.benchmark?38:-1)}},dependencies:[Ae,Mn,cG,it,gt,sa,Jo,vc,Jt,Wn],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;position:relative}.container[_ngcontent-%COMP%] canvas.main[_ngcontent-%COMP%]{width:100%!important;height:100%!important;box-sizing:border-box}.container[_ngcontent-%COMP%] canvas.snapshot[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] canvas.download-png[_ngcontent-%COMP%]{position:absolute;left:0;bottom:0;width:400px;height:300px;border:1px solid red;box-sizing:border-box;background-color:#fff;display:none}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%]{position:absolute;width:50px;height:40px;box-sizing:border-box;display:flex;transition:opacity .15s;opacity:1;pointer-events:none}.container[_ngcontent-%COMP%] .hover-toolbar.hide[_ngcontent-%COMP%]{transition:none;opacity:0}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content-wrapper[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;pointer-events:all}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%]{font-size:12px;border:1px solid #ccc;background-color:#fafafae6;border-radius:99px;padding:0 8px;box-sizing:border-box;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;display:flex;align-items:center}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.8;width:24px;padding:4px 0}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1;background-color:#eee}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;font-weight:700;width:16px;height:16px;line-height:16px;color:#ea8600}.container[_ngcontent-%COMP%] .io-picker[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .group-node-icon[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .subgraph-indicator[_ngcontent-%COMP%]{position:absolute;box-sizing:border-box;display:flex;background-color:transparent}.container[_ngcontent-%COMP%] .group-node-icon[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .io-picker[_ngcontent-%COMP%]{z-index:100}.container[_ngcontent-%COMP%] .group-node-icon-tooltip[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .io-picker-tooltip[_ngcontent-%COMP%]{position:absolute;z-index:50}.container[_ngcontent-%COMP%] .subgraph-indicator-menu-trigger[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .more-actions-menu-trigger[_ngcontent-%COMP%]{position:absolute;visibility:hidden}.container[_ngcontent-%COMP%] .flash[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:5000;box-sizing:border-box;border:5px solid #1976d2;pointer-events:none;opacity:0}@keyframes _ngcontent-%COMP%_flashing{5%{opacity:1}to{opacity:0}}.container[_ngcontent-%COMP%] .flashing[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_flashing .3s ease-out}.container[_ngcontent-%COMP%] .fps[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;z-index:100;font-size:32px;border:1px solid #777;padding:8px;border-radius:4px;background-color:#fff} .multiline-tooltip{white-space:pre-line} .multiline-tooltip-left{white-space:pre-line} .multiline-tooltip-left>div{text-align:left} .model-explorer-menu-item-with-icon{font-family:Google Sans Text,Arial,Helvetica,sans-serif;display:flex;align-items:center;font-size:12px;padding:5px 8px;line-height:15px;letter-spacing:normal} .model-explorer-menu-item-with-icon mat-icon{font-size:16px;width:16px;height:16px;margin-right:4px;color:#999} .model-explorer-menu-item-with-icon:hover{background-color:#0000000a} +`,Wi=class{threejsService;mesh;material;planeGeo;labelCharSizesCache={};fontSize;distanceRange;savedBounds={};nodeIdToOpacityIndexRanges={};nodeIdToColorIndexRanges={};lastOpacityUpdateIndexRanges=[];lastColorUpdateIndexRanges=[];originalColors=[];curAnimationProgrssUniform={value:-1};constructor(e){this.threejsService=e,this.planeGeo=new eo.PlaneGeometry(1,1),this.planeGeo.rotateX(-Math.PI/2),this.fontSize=this.threejsService.fontInfoRegular.info.size,this.distanceRange=this.threejsService.fontInfoRegular.distanceField.distanceRange,this.material=new eo.ShaderMaterial({uniforms:{textureRegular:{value:this.threejsService.textureRegular},textureMedium:{value:this.threejsService.textureMedium},textureBold:{value:this.threejsService.textureBold},textureIcons:{value:this.threejsService.textureIcons},distanceRange:{value:this.distanceRange},animationProgress:this.curAnimationProgrssUniform},extensions:{derivatives:!0},vertexShader:nue,fragmentShader:iue,transparent:!0,alphaToCoverage:!0})}generateMesh(e,t=!1,n=!1,r=!1){let o=0;this.nodeIdToOpacityIndexRanges={},this.nodeIdToColorIndexRanges={};let s=[],a=[],l=[],c=[],d=[],u=[],h=[],p=[],f=[],m=[],b=Object.keys(this.savedBounds).length>0,g=Z({},this.savedBounds);this.savedBounds={};for(let x of e){let C=this.threejsService.getCharsInfo(x.weight),D=this.threejsService.getFontInfo(x.weight).common.scaleW,E=this.getLabelSizes(x.label,x.weight,x.height,x.maxWidth,x.treatLabelAsAWhole,x.angle,x.edgeTextMode).sizes,P=x.height/this.fontSize,Y=x.x,$=x.z,O=(x.treatLabelAsAWhole?{rects:[{x:0,y:0,width:20,height:x.height}]}:this.getLabelSizes("a",x.weight,x.height).sizes).rects[0].height*P;switch(x.vAlign){case"top":$-=E.minZ*P;break;case"bottom":$-=E.maxZ*P;break;case"center":$-=(E.minZ+E.maxZ)/2*P+O/2;break;default:break}switch(x.hAlign){case"left":Y-=E.minX*P;break;case"right":Y-=E.maxX*P;break;case"center":Y-=(E.minX+E.maxX)/2*P;break;default:break}let B=x.y,j=u.length;for(let q=0;q0){for(let r of e)if(this.nodeIdToOpacityIndexRanges[r])for(let{minIndex:o,maxIndex:s}of this.nodeIdToOpacityIndexRanges[r]){for(let a=o;a<=s;a++)n.setX(a,t);this.lastOpacityUpdateIndexRanges.push({minIndex:o,maxIndex:s})}}n.needsUpdate=!0}updateColorInNode(e,t){if(!this.mesh)return;let n=this.mesh.geometry.getAttribute("color");if(e.length>0){for(let r of e)if(this.nodeIdToColorIndexRanges[r])for(let{minIndex:o,maxIndex:s}of this.nodeIdToColorIndexRanges[r]){for(let a=o;a<=s;a++)n.setXYZ(a,t.r,t.g,t.b);this.lastColorUpdateIndexRanges.push({minIndex:o,maxIndex:s})}}n.needsUpdate=!0}restoreOpacities(){if(!this.mesh)return;let e=this.mesh.geometry.getAttribute("opacity");if(this.lastOpacityUpdateIndexRanges.length>=0){for(let{minIndex:t,maxIndex:n}of this.lastOpacityUpdateIndexRanges)for(let r=t;r<=n;r++)e.setX(r,1);e.needsUpdate=!0}this.lastOpacityUpdateIndexRanges=[]}restoreColors(){if(!this.mesh)return;let e=this.mesh.geometry.getAttribute("color");if(this.lastColorUpdateIndexRanges.length>=0){for(let{minIndex:t,maxIndex:n}of this.lastColorUpdateIndexRanges)for(let r=t;r<=n;r++)e.setXYZ(r,this.originalColors[r*3],this.originalColors[r*3+1],this.originalColors[r*3+2]);e.needsUpdate=!0}this.lastColorUpdateIndexRanges=[]}updateAnimationProgress(e){this.curAnimationProgrssUniform.value=e}getLabelSizes(e,t,n,r,o,s,a){let l=this.getLabelCharSizesKey(e,t,s),c=this.labelCharSizesCache[l],d;if(c==null){if(c=this.getLabelSizesInternal(e,t,o,s,a),r!=null){let u=n/this.fontSize,h=e;for(let p=0;pr){h=h.substring(0,p-1),h+="...";break}}d=h,c=this.getLabelSizesInternal(h,t,o),l=this.getLabelCharSizesKey(h,t)}this.labelCharSizesCache[l]=c}return{sizes:this.labelCharSizesCache[l],updatedLabel:d}}updateLabelSizesCache(e,t,n){let r=this.getLabelCharSizesKey(e,t);this.labelCharSizesCache[r]=n}getFontSize(){return this.fontSize}clearSavedDataForAnimation(){this.savedBounds={}}getLabelCharSizesKey(e,t,n){return`${e}__${t}__${n}`}getLabelSizesInternal(e,t,n,r,o){let s=this.threejsService.getCharsInfo(t),a=[],l=0,c=Number.MAX_VALUE,d=Number.MAX_VALUE,u=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;for(let p of n?[e]:e){let f=s[p];f||(f=s["?"]);let m=f.yoffset;o?(l+=Math.sin(r||0)*(f.yoffset+f.height/2),m=Math.cos(r||0)*(f.yoffset+f.height/2)):l+=f.xoffset;let b=f.width,g=f.height,_={x:l,y:m,width:b,height:g};a.push(_),c=Math.min(c,_.x),d=Math.min(d,_.y),u=Math.max(u,_.x+_.width),h=Math.max(h,_.y+_.height),l+=f.xadvance*.98}return{rects:a,minX:c,minZ:0,maxX:u,maxZ:this.fontSize}}};var SG=26;var rue=Kt*.2,MG=Kt*.4,EG=Nn,_C=(()=>{class i{ATTRS_TABLE_KEY_COLOR=new EG.Color("#808080");ATTRS_TABLE_VALUE_COLOR=new EG.Color("#0d0d0d");threejsService=te(wr);attrsTableTexts=new Wi(this.threejsService);webglRenderer;webglRendererThreejsService;attrsTableBgs=new Pi(4);init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}renderAttrsTable(){if(Object.keys(this.webglRenderer.curShowOnNodeItemTypes).filter(s=>this.webglRenderer.curShowOnNodeItemTypes[s].selected).length===0)return;let t=[],r=9/this.attrsTableTexts.getFontSize(),o=[];for(let{node:s,index:a}of this.webglRenderer.nodesToRender){let l=[],c=SG+AI-4+qI(s.label),d=0,u=0,h=[];if(Et(s)){let m=BI(this.webglRenderer.curShowOnNodeItemTypes);for(let b of m){let g=Xb(s,b);h.push({key:b,value:g})}this.webglRenderer.curShowOnNodeItemTypes[Rn.OP_ATTRS]?.selected&&h.push(...zI(s,this.webglRenderer.curShowOnNodeItemTypes[Rn.OP_ATTRS]?.filterRegex||"")),this.webglRenderer.curShowOnNodeItemTypes[Rn.OP_INPUTS]?.selected&&h.push(...HI(s,this.webglRenderer.curModelGraph)),this.webglRenderer.curShowOnNodeItemTypes[Rn.OP_OUTPUTS]?.selected&&h.push(...GI(s)),h.push(...jI(s,this.webglRenderer.curModelGraph.id,this.webglRenderer.curShowOnNodeItemTypes,this.webglRenderer.curNodeDataProviderRuns))}else if(bt(s)){let m=VI(this.webglRenderer.curShowOnNodeItemTypes);for(let b of m){let g=Xb(s,b);h.push({key:b,value:g})}this.webglRenderer.curShowOnNodeItemTypes[Rn.LAYER_NODE_ATTRS]?.selected&&h.push(...UI(s,this.webglRenderer.curModelGraph,this.webglRenderer.curShowOnNodeItemTypes[Rn.LAYER_NODE_ATTRS]?.filterRegex||""))}for(let{key:m,value:b}of h){let{keyLabelData:g,keyLabelWidth:_,valueLabelData:x,valueLabelWidth:C}=this.createAttrsTableKeyValueLabels(s,a,m,b,c,r);t.push(g,x),d=Math.max(_,d),u=Math.max(C,u),l.push({keyLabelData:g,valueLabelData:x}),c+=Em}let p=d+u+Gb,f=(this.webglRenderer.getNodeWidth(s)-p)/2;for(let m of l)m.keyLabelData.x=this.webglRenderer.getNodeX(s)+d,m.valueLabelData.x=this.webglRenderer.getNodeX(s)+d+Gb,m.keyLabelData.x+=f,m.valueLabelData.x+=f;if(l.length>0&&Et(s)){let b=this.webglRenderer.getNodeWidth(s)-16,g=l.length*Em;o.push({id:s.id,index:o.length,bound:{x:this.webglRenderer.getNodeX(s)+16/2+b/2,y:l[0].keyLabelData.z+g/2-Em/2,width:b,height:g},yOffset:Kt*a+rue,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:{r:1,g:1,b:1},borderWidth:1,opacity:1})}}t.length>0&&(this.attrsTableTexts.generateMesh(t),this.webglRendererThreejsService.addToScene(this.attrsTableTexts.mesh),this.attrsTableBgs.generateMesh(o),this.webglRendererThreejsService.addToScene(this.attrsTableBgs.mesh))}updateAnimationProgress(t){this.attrsTableTexts.updateAnimationProgress(t),this.attrsTableBgs.updateAnimationProgress(t)}createAttrsTableKeyValueLabels(t,n,r,o,s,a){let l={id:`${t.id}_attrs_table_${r}_key`,nodeId:t.id,label:`${r}:`,height:9,hAlign:"right",vAlign:"center",weight:mn.MEDIUM,x:this.webglRenderer.getNodeX(t),y:n*Kt+MG,z:this.webglRenderer.getNodeY(t)+s,color:this.ATTRS_TABLE_KEY_COLOR},c=this.attrsTableTexts.getLabelSizes(l.label,l.weight,l.height).sizes,d=(c.maxX-c.minX)*a,u={id:`${t.id}_attrs_table_${r}_value`,nodeId:t.id,label:o,height:9,hAlign:"left",vAlign:"center",weight:mn.REGULAR,x:this.webglRenderer.getNodeX(t),y:n*Kt+MG,z:this.webglRenderer.getNodeY(t)+s,color:this.ATTRS_TABLE_VALUE_COLOR,maxWidth:NI},{sizes:h,updatedLabel:p}=this.attrsTableTexts.getLabelSizes(u.label,u.weight,u.height,u.maxWidth);p!=null&&(u.label=p);let f=(h.maxX-h.minX)*a;return{keyLabelData:l,keyLabelWidth:d,valueLabelData:u,valueLabelWidth:f}}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var $_=Nn,vC=(()=>{class i{appService;EDGE_TEXT_COLOR=new $_.Color("#041E49");threejsService=te(wr);edgeTexts=new Wi(this.threejsService);webglRenderer;webglRendererThreejsService;constructor(t){this.appService=t}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}renderEdgeTexts(){let t=this.genLabelsOnEdges(this.webglRenderer.edgesToRender,this.EDGE_TEXT_COLOR);this.edgeTexts.generateMesh(t),this.webglRendererThreejsService.addToScene(this.edgeTexts.mesh)}genLabelsOnEdges(t,n){let r=this.appService.config()?.edgeLabelFontSize||qb,o=this.appService.config()?.disallowVerticalEdgeLabels||!1,s=[],a=this.threejsService.getCharsInfo(mn.MEDIUM);for(let{edge:l}of t){let c=this.webglRenderer.curModelGraph.nodesById[l.fromNodeId],d=this.webglRenderer.curModelGraph.nodesById[l.toNodeId];if(!Et(c)||!Et(d))continue;let u="?",h=c.outputsMetadata||{};for(let T of Object.keys(h))if((c.outgoingEdges||[]).find(E=>E.sourceNodeOutputId===T&&E.targetNodeId===l.toNodeId)!=null){u=h[T].shape||"?",u=u.split("").map(E=>(E==="x"&&(E="x"),E==="\u2217"&&(E="*"),E===""&&(E=""),a[E]==null?"?":E)).join("");break}let p=l.curvePoints||[],f=c.globalX||0,m=c.globalY||0,b=new $_.CurvePath;for(let T=0;T1,C=()=>{let T=b.getPointAt(.5);s.push({id:`${l.id}_${u}`,nodeId:l.toNodeId,label:u,height:r,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,x:T.x,y:95,z:T.y,color:n,borderColor:{r:1,g:1,b:1}})};if(x)C();else{let T=[],D=Math.max(0,Math.min(.25,1-u.length*_-5/g)),E=Math.max(.05,1-5/g-D-_*u.length),P=.05,Y=!0,$=r/this.edgeTexts.getFontSize();for(let U=0;U=Math.PI/4&&de<=Math.PI*1.75){Y=!1;break}if(T.push({pos:G,position:Math.min(j,1),angle:de,tan:K,char:k}),B!=null){let he=Math.abs(de-B);if(Math.min(he,Math.abs(he-Math.PI))>.15&&(Y=!1,U+.05=T[T.length-1].pos.x;if(U){let O=[],B=T[0].position;for(let j=u.length-1;j>=0;j--){let q=u[j],k=b.getPointAt(Math.min(1,B)),G=b.getTangentAt(Math.min(1,B)),K=(Math.PI*2-Math.atan(G.y/G.x))%(Math.PI*2);K<0&&(K+=Math.PI*2),O.push({pos:k,angle:K,tan:G,position:B,char:q});let de=a[q],Te=0;j>=1&&(Te=a[u[j-1]].xadvance);let Ee=(de.xadvance/2+Te/2)*$/g;B+=Ee}T=O}for(let O=0;O{class i{EDGE_COLOR_INCOMING=new nf.Color("#009e73");EDGE_TEXT_COLOR_INCOMING=new nf.Color("#125341");EDGE_COLOR_OUTGOING=new nf.Color("#d55e00");EDGE_TEXT_COLOR_OUTGOING=new nf.Color("#994d11");inputsRenderedEdges=[];outputsRenderedEdges=[];inputsByHighlightedNode={};outputsByHighlightedNode={};webglRenderer;webglRendererThreejsService;threejsService=te(wr);ioPickerBgs=new Pi(99);ioPickerTexts=new Wi(this.threejsService);incomingHighlightedEdges=new vu(this.EDGE_COLOR_INCOMING,IG);outgoingHighlightedEdges=new vu(this.EDGE_COLOR_OUTGOING,IG);incomingHighlightedEdgeTexts=new Wi(this.threejsService);outgoingHighlightedEdgeTexts=new Wi(this.threejsService);init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}updateIncomingAndOutgoingHighlights(){if(!this.webglRenderer.curModelGraph)return;if(this.clearIncomingAndOutgoingHighlights(),!this.shouldUpdateIncomingAndOutgoingEdgesHighlights()){this.incomingHighlightedEdges.clearSavedDataForAnimation(),this.outgoingHighlightedEdges.clearSavedDataForAnimation(),this.incomingHighlightedEdgeTexts.clearSavedDataForAnimation(),this.outgoingHighlightedEdgeTexts.clearSavedDataForAnimation(),this.ioPickerBgs.clearSavedDataForAnimation(),this.ioPickerTexts.clearSavedDataForAnimation();return}let t=this.webglRenderer.appService.config()?.showOpNodeOutOfLayerEdgesWithoutSelecting,n=this.getHighlightedIncomingNodesAndEdges(this.webglRenderer.curHiddenInputOpNodeIds,void 0,{reuseRenderedEdgeCurvePoints:t});if(n.overlayEdges.length>0){let a=n.overlayEdges.map(l=>t?{edge:l,index:95/Kt}:{edge:wt(Z({},l),{curvePoints:bh(l.points,qh,Yh,nf)}),index:95/Kt});if(this.incomingHighlightedEdges.generateMesh(a,this.webglRenderer.curModelGraph),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdges.edgesMesh),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdges.arrowHeadsMesh),this.webglRenderer.curShowOnEdgeItemTypes[Fl.TENSOR_SHAPE]?.selected){let l=this.webglRenderer.webglRendererEdgeTextsService.genLabelsOnEdges(a,this.EDGE_TEXT_COLOR_INCOMING);this.incomingHighlightedEdgeTexts.generateMesh(l,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdgeTexts.mesh)}}this.inputsByHighlightedNode=n.inputsByHighlightedNode,this.inputsRenderedEdges=n.renderedEdges;let r=this.getHighlightedOutgoingNodesAndEdges(this.webglRenderer.curHiddenOutputIds,void 0,{reuseRenderedEdgeCurvePoints:t});if(r.overlayEdges.length>0){let a=r.overlayEdges.map(l=>t?{edge:l,index:95/Kt}:{edge:wt(Z({},l),{curvePoints:bh(l.points,qh,Yh,nf)}),index:95/Kt});if(this.outgoingHighlightedEdges.generateMesh(a,this.webglRenderer.curModelGraph),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdges.edgesMesh),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdges.arrowHeadsMesh),this.webglRenderer.curShowOnEdgeItemTypes[Fl.TENSOR_SHAPE]?.selected){let l=this.webglRenderer.webglRendererEdgeTextsService.genLabelsOnEdges(a,this.EDGE_TEXT_COLOR_OUTGOING);this.outgoingHighlightedEdgeTexts.generateMesh(l,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdgeTexts.mesh)}}this.outputsByHighlightedNode=r.outputsByHighlightedNode,this.outputsRenderedEdges=r.renderedEdges;let o=[],s=[];for(let a of Object.keys(Z(Z({},this.inputsByHighlightedNode),this.outputsByHighlightedNode))){let l=this.webglRenderer.curModelGraph.nodesById[a];if(bt(l)){let c=aue,d=SO,u=this.inputsByHighlightedNode[a]!=null,h=u?this.inputsByHighlightedNode[a].length:this.outputsByHighlightedNode[a].length;o.push({id:`${a}${bC}${u?"input":"output"}`,index:o.length,bound:{x:this.webglRenderer.getNodeX(l)+c/2,y:this.webglRenderer.getNodeY(l)-d/4,width:c,height:d},yOffset:95,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:u?this.EDGE_COLOR_INCOMING:this.EDGE_COLOR_OUTGOING,borderWidth:0,opacity:1}),s.push({id:`${a}${bC}${u?"input":"output"}`,nodeId:a,label:`${h} ${u?"input":"output"}${h!==1?"s":""}`,height:8,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,color:{r:1,g:1,b:1},x:this.webglRenderer.getNodeX(l)+c/2,y:96,z:this.webglRenderer.getNodeY(l)-d/4+1})}}this.ioPickerTexts.generateMesh(s,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.ioPickerTexts.mesh),this.ioPickerBgs.generateMesh(o,!0,!1,!1,!0),this.webglRendererThreejsService.addToScene(this.ioPickerBgs.mesh),this.webglRendererThreejsService.addToScene(this.ioPickerBgs.meshForRayCasting),this.webglRenderer.animateIntoPositions(a=>{this.incomingHighlightedEdges.updateAnimationProgress(a),this.outgoingHighlightedEdges.updateAnimationProgress(a),this.incomingHighlightedEdgeTexts.updateAnimationProgress(a),this.outgoingHighlightedEdgeTexts.updateAnimationProgress(a),this.ioPickerBgs.updateAnimationProgress(a),this.ioPickerTexts.updateAnimationProgress(a)})}handleClickIoPicker(t,n){t?this.inputsByHighlightedNode[n].length===1?this.webglRenderer.sendLocateNodeRequest(this.inputsByHighlightedNode[n][0].id,this.webglRenderer.rendererId):this.webglRenderer.showIoTree(this.webglRenderer.ioPicker.nativeElement,this.inputsByHighlightedNode[n],"incoming"):this.outputsByHighlightedNode[n].length===1?this.webglRenderer.sendLocateNodeRequest(this.outputsByHighlightedNode[n][0].id,this.webglRenderer.rendererId):this.webglRenderer.showIoTree(this.webglRenderer.ioPicker.nativeElement,this.outputsByHighlightedNode[n],"outgoing")}getHighlightedIncomingNodesAndEdges(t,n,r){let o=r?.ignoreEdgesWithinSameNamespace??!1,s=r?.reuseRenderedEdgeCurvePoints??!1;n||(n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]);let a=[],l=[],c={},d=[];for(let u of n.incomingEdges||[]){if(t[u.sourceNodeId])continue;let h=this.webglRenderer.curModelGraph.nodesById[u.sourceNodeId];if(!h||o&&h.namespace===n.namespace)continue;let p=WI(h.namespace,n.namespace),f=this.getLastCollapsedAncestorNode(h,p);l.push(f),c[f.id]==null&&(c[f.id]=[]),c[f.id].push(h);let m=this.findEdgeConnectingTwoNodesInNamespace(p,h.id,n.id),b=[],g=[];if(m){a.push(m);let _=m.curvePoints||[],x=this.webglRenderer.curModelGraph.nodesById[m.fromNodeId];if(m.fromNodeId!==f.id){let D=m.points[0].x+(x.globalX||0),E=m.points[0].y+(x.globalY||0),P=this.getBestAnchorPointOnNode(D,E,f);b.push({x:P.x-(f.globalX||0),y:P.y-(f.globalY||0)}),s&&g.push({x:P.x-(f.globalX||0),y:P.y-(f.globalY||0)},{x:_[0].x-(f.globalX||0)+(x.globalX||0),y:_[0].y-(f.globalY||0)+(x.globalY||0)})}let C=b,T=m.points;if(s&&(C=g,T=_),C.push(...T.map(D=>({x:D.x-(f.globalX||0)+(x.globalX||0),y:D.y-(f.globalY||0)+(x.globalY||0)}))),m.toNodeId!==n?.id){let D=m.points[m.points.length-1].x+(x.globalX||0),E=m.points[m.points.length-1].y+(x.globalY||0),P=this.getBestAnchorPointOnNode(D,E,n);s?g.push({x:_[_.length-1].x-(f.globalX||0)+(x.globalX||0),y:_[_.length-1].y-(f.globalY||0)+(x.globalY||0)},{x:P.x-(f.globalX||0),y:P.y-(f.globalY||0)}):b.push({x:P.x-(f.globalX||0),y:P.y-(f.globalY||0)})}}else(bt(f)||Et(f)&&!f.hideInLayout)&&(s?g:b).push(...this.getDirectEdgeBetweenNodes(f,n));s?g.length>0&&d.push({id:`overlay_${f.id}___${n.id}`,fromNodeId:f.id,toNodeId:n.id,points:[],curvePoints:g,type:"incoming"}):b.length>0&&d.push({id:`overlay_${f.id}___${n.id}`,fromNodeId:f.id,toNodeId:n.id,points:b,type:"incoming"})}return{renderedEdges:a,highlightedNodes:l,inputsByHighlightedNode:c,overlayEdges:d}}getHighlightedOutgoingNodesAndEdges(t,n,r){let o=r?.ignoreEdgesWithinSameNamespace??!1,s=r?.reuseRenderedEdgeCurvePoints??!1;n||(n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]);let a=[],l=[],c={},d=[];for(let u of n.outgoingEdges||[]){if(t[u.sourceNodeOutputId])continue;let h=this.webglRenderer.curModelGraph.nodesById[u.targetNodeId];if(!h||o&&h.namespace===n.namespace)continue;let p=WI(h.namespace,n.namespace),f=this.getLastCollapsedAncestorNode(h,p);l.push(f),c[f.id]==null&&(c[f.id]=[]),c[f.id].push(h);let m=this.findEdgeConnectingTwoNodesInNamespace(p,n.id,h.id),b=[],g=[];if(m){a.push(m);let _=m.curvePoints||[],x=this.webglRenderer.curModelGraph.nodesById[m.fromNodeId];if(m.fromNodeId!==n?.id){let D=m.points[0].x+(x.globalX||0),E=m.points[0].y+(x.globalY||0),P=this.getBestAnchorPointOnNode(D,E,n);b.push({x:P.x-(n.globalX||0),y:P.y-(n.globalY||0)}),s&&g.push({x:P.x-(n.globalX||0),y:P.y-(n.globalY||0)},{x:_[0].x-(n.globalX||0)+(x.globalX||0),y:_[0].y-(n.globalY||0)+(x.globalY||0)})}let C=b,T=m.points;if(s&&(C=g,T=_),C.push(...T.map(D=>({x:D.x-(n.globalX||0)+(x.globalX||0),y:D.y-(n.globalY||0)+(x.globalY||0)}))),m.toNodeId!==f.id){let D=m.points[m.points.length-1].x+(x.globalX||0),E=m.points[m.points.length-1].y+(x.globalY||0),P=this.getBestAnchorPointOnNode(D,E,f);s?g.push({x:_[_.length-1].x-(n.globalX||0)+(x.globalX||0),y:_[_.length-1].y-(n.globalY||0)+(x.globalY||0)},{x:P.x-(n.globalX||0),y:P.y-(n.globalY||0)}):b.push({x:P.x-(n.globalX||0),y:P.y-(n.globalY||0)})}}else(bt(f)||Et(f)&&!f.hideInLayout)&&(s?g:b).push(...this.getDirectEdgeBetweenNodes(n,f));s?g.length>0&&d.push({id:`overlay_${n.id}___${f.id}`,fromNodeId:n.id,toNodeId:f.id,points:[],curvePoints:g,type:"outgoing"}):b.length>0&&d.push({id:`overlay_${n.id}___${f.id}`,fromNodeId:n.id,toNodeId:f.id,points:b,type:"outgoing"})}return{renderedEdges:a,highlightedNodes:l,outputsByHighlightedNode:c,overlayEdges:d}}getLastCollapsedAncestorNode(t,n){let r=t,o=[];for(;r&&(bt(r)&&!r.expanded&&o.push(r),r.namespace!==n);)r=this.webglRenderer.curModelGraph.nodesById[r.nsParentId||""];return o.length>0?o[o.length-1]:t}shouldUpdateIncomingAndOutgoingEdgesHighlights(){if(!this.webglRenderer.selectedNodeId)return!1;let t=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId];if(bt(t))return!1;let n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.rootNodeId||""];return!(n&&bt(n)&&!(n.descendantsOpNodeIds||[]).includes(this.webglRenderer.selectedNodeId)||!this.webglRenderer.isNodeRendered(this.webglRenderer.selectedNodeId))}clearIncomingAndOutgoingHighlights(){this.incomingHighlightedEdges.clear(),this.outgoingHighlightedEdges.clear(),this.inputsByHighlightedNode={},this.outputsByHighlightedNode={},this.inputsRenderedEdges=[],this.outputsRenderedEdges=[];for(let t of[this.ioPickerBgs.mesh,this.ioPickerBgs.meshForRayCasting,this.ioPickerTexts.mesh,this.incomingHighlightedEdgeTexts.mesh,this.outgoingHighlightedEdgeTexts.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t));this.ioPickerBgs.meshForRayCasting=void 0}findEdgeConnectingTwoNodesInNamespace(t,n,r){let o=t===""?"":`${t}___group___`;return this.webglRenderer.curModelGraph.edgesByGroupNodeIds[o].find(s=>{let a=this.webglRenderer.curModelGraph.nodesById[s.fromNodeId],l=this.webglRenderer.curModelGraph.nodesById[s.toNodeId],c=this.containNode(a,n),d=this.containNode(l,r);return c&&d})}containNode(t,n){return Et(t)&&t.id===n||bt(t)&&(t.descendantsOpNodeIds||[]).includes(n)}getDirectEdgeBetweenNodes(t,n){let r=[],o=t.globalX||0,s=t.globalY||0,a=t.width||0,l=t.height||0,c=n.globalX||0,d=n.globalY||0,u=n.width||0,h=n.height||0,p=o+a/2,f=d>s?s+l:s,m=c+u/2,b=d>s?d:d+h;return r.push({x:p+(t.x||0)-o,y:f+(t.y||0)-s},{x:m+(n.x||0)-o,y:b+(n.y||0)-s}),r}getBestAnchorPointOnNode(t,n,r){let o=this.webglRenderer.getNodeX(r),s=this.webglRenderer.getNodeY(r),a=this.webglRenderer.getNodeWidth(r),l=this.webglRenderer.getNodeHeight(r),c=[{point:{x:o+a/2,y:s},distance:0,direction:"horizontal"},{point:{x:o+a,y:s+l/2},distance:0,direction:"vertical"},{point:{x:o+a/2,y:s+l},distance:0,direction:"horizontal"},{point:{x:o,y:s+l/2},distance:0,direction:"vertical"}];for(let d of c)d.distance=this.getDistanceSquared(t,n,d.point.x,d.point.y);if(c.sort((d,u)=>d.distance-u.distance),c[0].direction!==c[1].direction){let d=this.getAngle(t,n,c[0].point.x,c[0].point.y,c[0].direction),u=this.getAngle(t,n,c[1].point.x,c[1].point.y,c[1].direction);return d>=u?c[0].point:c[1].point}return c[0].point}getAngle(t,n,r,o,s){return Math.atan(s==="horizontal"?Math.abs(o-n)/Math.abs(r-t):Math.abs(r-t)/Math.abs(o-n))}getDistanceSquared(t,n,r,o){return Math.pow(t-r,2)+Math.pow(n-o,2)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var MO=SO,TG=68,EO=Nn,xC=(()=>{class i{IDENTICAL_GROUPS_BG_COLOR=new EO.Color("#e2edff");IDENTICAL_GROUPS_INDICATOR_BG_COLOR=new EO.Color("#e3e3e3");IDENTICAL_GROUPS_INDICATOR_BORDER_COLOR=new EO.Color("#ccc");webglRenderer;webglRendererThreejsService;threejsService=te(wr);identicalLayerIndicatorBgs=new Pi(99);identicalLayerIndicatorTexts=new Wi(this.threejsService);init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}updateIdenticalLayerIndicators(){if(!this.webglRenderer.curModelGraph)return;this.clearIdenticalLayerIndicators();let t=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId],n=[],r=[];if(bt(t)&&t?.identicalGroupIndex!=null){let o=t.identicalGroupIndex,s=this.webglRenderer.nodesToRender.filter(({node:a})=>bt(a)&&a.identicalGroupIndex===o).map(({node:a})=>this.webglRenderer.curModelGraph.nodesById[a.id]);for(let a of s){if(a.id===t.id)continue;let l=this.webglRenderer.getNodeX(a)+TG/2,c=this.webglRenderer.getNodeY(a)-MO/2+MO/4;n.push({id:a.id,index:n.length,bound:{x:l,y:c,width:TG,height:MO},yOffset:95,isRounded:!0,borderColor:this.IDENTICAL_GROUPS_INDICATOR_BORDER_COLOR,bgColor:this.IDENTICAL_GROUPS_INDICATOR_BG_COLOR,borderWidth:1,opacity:1}),r.push({id:a.id,label:"Identical layer",height:8,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,color:{r:0,g:0,b:0},x:l,y:96,z:c})}}this.identicalLayerIndicatorBgs.generateMesh(n,!1,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.identicalLayerIndicatorBgs.mesh),this.identicalLayerIndicatorTexts.generateMesh(r,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.identicalLayerIndicatorTexts.mesh),this.webglRenderer.animateIntoPositions(o=>{this.identicalLayerIndicatorBgs.updateAnimationProgress(o),this.identicalLayerIndicatorTexts.updateAnimationProgress(o)})}clearIdenticalLayerIndicators(){for(let t of[this.identicalLayerIndicatorBgs.mesh,this.identicalLayerIndicatorTexts.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t))}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var wC=(()=>{class i{curIoTracingData;webglRenderer;init(t){this.webglRenderer=t}genTracingData(){if(!this.webglRenderer.selectedNodeId||!Et(this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]))return;let t=new Set,n=new Set,r=[this.webglRenderer.selectedNodeId];for(;r.length>0;){let s=r.shift();if(n.has(s))continue;n.add(s);let a=this.webglRenderer.curModelGraph.nodesById[s];a.hideInLayout||t.add(s);for(let l of a.incomingEdges||[])r.push(l.sourceNodeId)}let o=new Set;for(r=[this.webglRenderer.selectedNodeId];r.length>0;){let s=r.shift();if(o.has(s))continue;o.add(s);let a=this.webglRenderer.curModelGraph.nodesById[s];a.hideInLayout||t.add(s);for(let l of a.outgoingEdges||[])r.push(l.targetNodeId)}for(let s of[...t]){let a=s;for(;;){let l=this.webglRenderer.curModelGraph.nodesById[a];if(!l.nsParentId||t.has(l.nsParentId))break;a=l.nsParentId,t.add(a)}}this.curIoTracingData={tracedNodeId:this.webglRenderer.selectedNodeId,visibleNodeIds:t}}clearTracingData(){this.curIoTracingData=void 0}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var uue="/api/v1/read_text_file",hue="/api/v1/load_node_data",Cr=(()=>{class i{appService;runs=xt({});remoteSourceLoading=xt(!1);leftPaneModelGraph$=Hb(Xt(()=>this.appService.panes()[0].modelGraph));rightPaneModelGraph$=Hb(Xt(()=>{let t=this.appService.panes();if(!(t.length<=1))return t[1].modelGraph}));constructor(t){this.appService=t,this.leftPaneModelGraph$.subscribe(n=>{n!=null&&this.handleModelGraphInPaneChanged(n,0)}),this.rightPaneModelGraph$.subscribe(n=>{n!=null&&this.handleModelGraphInPaneChanged(n,1)})}addRun(t,n,r,o,s,a=!1,l){let c=o.collectionLabel;this.runs.update(d=>{if(a){let h=[];for(let[p,f]of Object.entries(d))a&&f.collectionId===c&&h.push(p);for(let p of h)delete d[p]}d[t]={runId:t,runName:n,done:s!=null,results:s==null?void 0:{[o.id]:this.processNodeDataProviderDataForGraph(o,s)},extensionId:r,collectionId:c,remotePath:l,nodeDataProviderData:s};let u=this.appService.panes();for(let h of u)h.modelGraph?.id===o.id&&h.modelGraph?.collectionLabel===o.collectionLabel&&this.appService.setSelectedNodeDataProviderRunId(h.id,t);return Z({},d)})}updateRunResults(t,n,r,o){this.runs.update(s=>{let a=s[t];return a.done=!0,a.nodeDataProviderData=n,a.results==null&&(a.results={}),a.results[r.id]=this.processNodeDataProviderDataForGraph(r,n),o&&(a.error=o),Z({},s)})}addRunFromRemoteSource(t,n){return At(this,null,function*(){this.remoteSourceLoading.set(!0);let r=t.split("/"),o=r[r.length-1],s=`/read_file?path=${t}`;if(!0)if(t.startsWith("node_data://")){let d=t.replace("node_data://","").split("/");o=d[0];let u=Number(d[1]);s=`${hue}?node_data_index=${u}`}else s=`${uue}?path=${t}`;let a=Lr();this.addRun(a,o,"",n,void 0,!1,t);let l=yield fetch(s);if(!l.ok){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to load JSON file "${t}"`),this.remoteSourceLoading.set(!1);return}if(!0){let c=JSON.parse(yield l.text());if(c.error)this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${c.error}`);else try{this.updateRunResults(a,this.getNodeDataProviderData(c.content,n),n),this.notifyRemoteNodeDataChanges()}catch(d){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${d}`)}}else{let c=JSON.parse((yield l.text()).replace(`)]}' +`,""));try{this.updateRunResults(a,this.getNodeDataProviderData(c.content,n),n),this.notifyRemoteNodeDataChanges()}catch(d){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${d}`)}}this.remoteSourceLoading.set(!1)})}deleteRun(t){this.runs.update(n=>(delete n[t],Z({},n))),this.notifyRemoteNodeDataChanges();for(let n of this.appService.panes())if(n.selectedNodeDataProviderRunId===t){let r=this.getRunsForModelGraph(n.modelGraph);this.appService.setSelectedNodeDataProviderRunId(n.id,r.length>0?r[0].runId:void 0)}}getSelectedRunForModelGraph(t,n){let r=this.appService.getSelectedNodeDataProviderRunId(t);return r?this.getRunsForModelGraph(n).find(s=>s.runId===r):void 0}getRunsForModelGraph(t){let n=[],r=this.runs();for(let o of Object.values(r)){if(o.collectionId!==t.collectionLabel)continue;let s=o.nodeDataProviderData;s&&s[t.id]!=null&&n.push(o)}return n}processNodeDataProviderDataForGraph(t,n){this.genOutputTensorIdToNodeIdMap(t);let r={},o=n[t.id];if(!o)return{};let s=[];for(let c of o.gradient||[]){let d={stop:c.stop};c.bgColor!=null&&(d.bgColor=this.getRgbFromColor(c.bgColor,"#ffffff")),c.textColor!=null&&(d.textColor=this.getRgbFromColor(c.textColor,"#000000")),s.push(d)}s.sort((c,d)=>c.stop-d.stop);let a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if(s.length>0)for(let{value:c}of Object.values(o.results))typeof c=="number"&&(a=Math.min(a,c),l=Math.max(l,c));for(let c of Object.keys(o.results)){let d=o.results[c];if(typeof d.value=="number"&&d.bgColor==null&&(d.bgColor=this.getBgColor(d.value,o.thresholds||[],s,a,l)),typeof d.value=="number"&&d.textColor==null&&(d.textColor=this.getTextColor(d.value,o.thresholds||[],s,a,l)),(d.textColor==null||d.textColor==="")&&d.bgColor!=null){let b=this.getRgbFromColor(d.bgColor,"#ffffff");b!=null&&Math.pow(b.r/255,2.2)*.2126+Math.pow(b.g/255,2.2)*.7152+Math.pow(b.b/255,2.2)*.0722<.38&&(d.textColor="#ffffff")}let u="-",h=d.value;typeof h=="number"||typeof h=="boolean"||typeof h=="string"?u=`${h}`:u=JSON.stringify(h),u=u;let f=`${(t.outputTensorIdToNodeId||{})[c]??c}`,m=r[f];if(!m)r[f]=wt(Z({},d),{strValue:u,allValues:{[c]:d.value}});else{let b=m.allValues;b[c]=d.value,r[f]={value:d.value,bgColor:d.bgColor,textColor:d.textColor,allValues:b,strValue:`${m.strValue}, ${u}`}}}return r}getBgColor(t,n,r,o,s){if(r.length>0)return this.getColorFromGradient(t,r,o,s,!0,"transparent");for(let a of n)if(t<=a.value)return a.bgColor;return"transparent"}getTextColor(t,n,r,o,s){if(r.length>0)return this.getColorFromGradient(t,r,o,s,!1,"");for(let a of n)if(t<=a.value)return a.textColor||"";return""}getColorFromGradient(t,n,r,o,s,a){let l=(t-r)/(o-r);for(let c=0;c=d.stop&&l<=u.stop){if(h==null||p==null)return a;let f=(l-d.stop)/(u.stop-d.stop),m=Math.floor(h.r+(p.r-h.r)*f),b=Math.floor(h.g+(p.g-h.g)*f),g=Math.floor(h.b+(p.b-h.b)*f);return`#${this.numToHex(m)}${this.numToHex(b)}${this.numToHex(g)}`}}return a}genOutputTensorIdToNodeIdMap(t){if(t.outputTensorIdToNodeId==null){t.outputTensorIdToNodeId={};for(let n of t.nodes)if(Et(n)){let r=n.outputsMetadata||{};for(let o of Object.keys(r)){let a=r[o].tensor_name;a!=null&&(t.outputTensorIdToNodeId[a]=n.id)}}}}handleModelGraphInPaneChanged(t,n){let r=this.getRunsForModelGraph(t);if(r.length>0){for(let o of r)o.results==null&&(o.results={}),o.results[t.id]==null&&o.nodeDataProviderData!=null&&(o.results[t.id]=this.processNodeDataProviderDataForGraph(t,o.nodeDataProviderData));this.appService.setSelectedNodeDataProviderRunId(this.appService.panes()[n].id,r[0].runId)}}getRgbFromColor(t,n){let r=t;return t.startsWith("#")||(r=Yb[t]),r||(r=n),r=r.replace("#",""),{r:this.hexStrToInt(r.substring(0,2)),g:this.hexStrToInt(r.substring(2,4)),b:this.hexStrToInt(r.substring(4,6))}}numToHex(t){let n=t.toString(16);return n.length===1?`0${n}`:n}hexStrToInt(t){return/^[a-fA-F0-9]+$/.test(t)?parseInt(t,16):255}getNodeDataProviderData(t,n){let r=JSON.parse(t),o={};return r.results!=null&&r.results.results==null?n&&(o[n.id]=r):o=r,o}notifyRemoteNodeDataChanges(){let t=Object.values(this.runs()).filter(n=>n.remotePath!=null).map(n=>n.remotePath);this.appService.remoteNodeDataPaths.set(t)}static \u0275fac=function(n){return new(n||i)(X(st))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var pue=Kt*.5,fue=Nn,CC=(()=>{class i{nodeDataProviderExtensionService;curNodeDataProviderResults=Xt(()=>this.webglRenderer?(this.nodeDataProviderExtensionService.getSelectedRunForModelGraph(this.webglRenderer.paneId,this.webglRenderer.curModelGraph)?.results||{})[this.webglRenderer.curModelGraph.id]:void 0);webglRenderer;webglRendererThreejsService;nodeDataProviderDistributionBars=new Pi(0);constructor(t){this.nodeDataProviderExtensionService=t}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}renderNodeDataProviderDistributionBars(){let t=this.curNodeDataProviderResults()||{};if(Object.keys(t).length===0)return;let{groupIdToDescendantsBgColorCounts:n,sortedBgColors:r}=this.genGroupIdToDescendantsBgColorCounts(),o=[];for(let{node:s,index:a}of this.webglRenderer.nodesToRender){if(!n[s.id])continue;let l=s,c=l.width||0,d=n[s.id],u=0;for(let f of Object.values(d))u+=f;let h=0,p=0;for(let f of r){if(d[f]==null||f==="transparent")continue;let b=d[f]/u*c,g=LI,_=h;o.push({id:`${s.id}_${p}`,index:o.length,bound:{x:this.webglRenderer.getNodeX(l)+_+b/2,y:this.webglRenderer.getNodeY(l)+this.webglRenderer.getNodeHeight(l)-LI+g/2,width:b,height:g},yOffset:Kt*a+pue,isRounded:!1,borderColor:{r:1,g:1,b:1},bgColor:new fue.Color(f),borderWidth:0,opacity:1}),h+=b,p++}}this.nodeDataProviderDistributionBars.generateMesh(o),this.webglRendererThreejsService.addToScene(this.nodeDataProviderDistributionBars.mesh)}updateAnimationProgress(t){this.nodeDataProviderDistributionBars.updateAnimationProgress(t)}genGroupIdToDescendantsBgColorCounts(){let t=this.curNodeDataProviderResults()||{},n={},r=new Set;for(let{node:o}of this.webglRenderer.nodesToRender)if(bt(o)&&!o.expanded){let s={};for(let a of o.descendantsOpNodeIds||[]){let l=this.webglRenderer.curModelGraph.nodesById[a],c=t[l.id]?.bgColor||"";c&&(s[c]==null&&(s[c]=0),s[c]++,r.add(c))}n[o.id]=s}return{groupIdToDescendantsBgColorCounts:n,sortedBgColors:[...r].sort((o,s)=>o.localeCompare(s))}}static \u0275fac=function(n){return new(n||i)(X(Cr))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var gue=-Kt*.3,_ue=Kt*.3,vue=Nn,SC=(()=>{class i{appService;SEARCH_RESULTS_HIGHLIGHT_COLOR=new vue.Color("#f5d55a");searchResultsHighlightBorders=new Pi(8);searchResultsNodeLabelHighlightBg=new Pi(4);webglRenderer;webglRendererThreejsService;curSearchResults=void 0;constructor(t){this.appService=t}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService,mt(()=>{let n=this.appService.getPaneById(this.webglRenderer.paneId);!n||!n.modelGraph||this.curSearchResults!==n.searchResults&&(this.curSearchResults=n.searchResults,this.renderSearchResults(),this.webglRendererThreejsService.render())})}renderSearchResults(){if(!this.curSearchResults)return;this.clearSearchResults();let t=new Set;for(let s of Object.keys(this.curSearchResults.results)){let a=this.webglRenderer.curModelGraph.nodesById[s];if(this.webglRenderer.isNodeRendered(s))t.add(s);else{let l=a;for(;l&&(l=this.webglRenderer.curModelGraph.nodesById[l.nsParentId||""],!(!l||this.webglRenderer.isNodeRendered(l.id))););t.add(l.id)}}let n=[];for(let s of t){let a=this.webglRenderer.curModelGraph.nodesById[s],l=this.webglRenderer.nodesToRenderMap[s].index,c=this.webglRenderer.getNodeX(a)-2,d=this.webglRenderer.getNodeY(a)-2,u=this.webglRenderer.getNodeWidth(a)+4,h=this.webglRenderer.getNodeHeight(a)+4;n.push({id:s,index:n.length,bound:{x:c+u/2,y:d+h/2,width:u,height:h},yOffset:Kt*l+gue,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:this.SEARCH_RESULTS_HIGHLIGHT_COLOR,borderWidth:0,opacity:1})}this.searchResultsHighlightBorders.generateMesh(n),this.webglRendererThreejsService.addToScene(this.searchResultsHighlightBorders.mesh);let r=[],o=Fo/this.webglRenderer.texts.getFontSize();for(let s of Object.keys(this.curSearchResults.results)){if(!this.webglRenderer.isNodeRendered(s))continue;let a=this.curSearchResults.results[s];for(let l of a)if(l.type===vt.NODE_LABEL){let c=this.webglRenderer.curModelGraph.nodesById[s],d=this.webglRenderer.nodesToRenderMap[s].index,u=this.webglRenderer.getNodeX(c)+this.webglRenderer.getNodeWidth(c)/2,h=0,p=0,f=0,m=dd(c.label);if(m.length===1){let b=this.webglRenderer.texts.getLabelSizes(c.label,bt(c)?mn.BOLD:mn.MEDIUM,Fo).sizes;f=(b.maxX-b.minX)*o+4,p=(b.maxZ-b.minZ)*o+4,h=this.webglRenderer.getNodeY(c)+this.webglRenderer.getNodeLabelRelativeY(c)-2*o}else{let{minX:b,maxX:g}=this.webglRenderer.getNodeLabelSizes(c);f=(g-b)*o+4,p=m.length*vh+4,h=this.webglRenderer.getNodeY(c)+p/2+4.5-2*o}r.push({id:s,index:n.length,bound:{x:u,y:h,width:f,height:p},yOffset:Kt*d+_ue,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:this.SEARCH_RESULTS_HIGHLIGHT_COLOR,borderWidth:0,opacity:1})}}this.searchResultsNodeLabelHighlightBg.generateMesh(r),this.webglRendererThreejsService.addToScene(this.searchResultsNodeLabelHighlightBg.mesh),this.webglRenderer.animateIntoPositions(s=>{this.searchResultsHighlightBorders.updateAnimationProgress(s),this.searchResultsNodeLabelHighlightBg.updateAnimationProgress(s)})}clearSearchResults(){for(let t of[this.searchResultsHighlightBorders.mesh,this.searchResultsNodeLabelHighlightBg.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t))}static \u0275fac=function(n){return new(n||i)(X(st))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var DG=320,MC=(()=>{class i{appService;destroyRef;webglRenderer;webglRendererThreejsService;constructor(t,n){this.appService=t,this.destroyRef=n}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService,this.appService.addSnapshotClicked.pipe(Vi(this.destroyRef)).subscribe(n=>{n.rendererId===this.webglRenderer.rendererId&&this.addSnapshot()}),this.appService.curSnapshotToRestore.pipe(Vi(this.destroyRef)).subscribe(n=>{n.rendererId===this.webglRenderer.rendererId&&this.restoreSnapshot(n.snapshot)})}addSnapshot(){return At(this,null,function*(){this.webglRenderer.flash();let t=yield this.takeSnapshot();this.webglRenderer.appService.addSnapshot(t,this.webglRenderer.curModelGraph.id,this.webglRenderer.paneId)})}takeSnapshot(){return At(this,null,function*(){let t=this.webglRenderer.container.nativeElement,n=this.webglRendererThreejsService.convertScreenPosToScene(0,0),r=this.webglRendererThreejsService.convertScreenPosToScene(t.clientWidth,t.clientHeight),o={x:n.x,y:n.y,width:r.x-n.x,height:r.y-n.y},s=[];Dm(void 0,this.webglRenderer.curModelGraph,s);let a=this.webglRenderer.canvas.nativeElement,l=this.webglRenderer.snapshotCanvas.nativeElement,c=DG,d=DG/a.width*a.height;this.webglRendererThreejsService.renderSnapshot(c,d);let u=window.devicePixelRatio,h=new OffscreenCanvas(c*u,d*u),p=h.getContext("2d");p.imageSmoothingQuality="high",p.drawImage(l,0,0,l.width,l.height,0,0,h.width,h.height);let f=yield createImageBitmap(h),m=this.webglRenderer.appService.getFlattenLayers(this.webglRenderer.paneId);return{id:Lr(),rect:o,imageBitmap:f,selectedNodeId:this.webglRenderer.selectedNodeId,deepestExpandedGroupNodeIds:s,showOnNodeItemTypes:Z({},this.webglRenderer.curShowOnNodeItemTypes),showOnEdgeItemTypes:Z({},this.webglRenderer.curShowOnEdgeItemTypes),flattenLayers:m}})}restoreSnapshot(t){t.showOnNodeItemTypes&&(this.webglRenderer.curShowOnNodeItemTypes=Z({},t.showOnNodeItemTypes),this.webglRenderer.appService.setShowOnNode(this.webglRenderer.paneId,this.webglRenderer.rendererId,this.webglRenderer.curShowOnNodeItemTypes)),t.showOnEdgeItemTypes&&(this.webglRenderer.curShowOnEdgeItemTypes=Z({},t.showOnEdgeItemTypes),this.webglRenderer.appService.setShowOnEdge(this.webglRenderer.paneId,this.webglRenderer.rendererId,this.webglRenderer.curShowOnEdgeItemTypes));let n=this.webglRenderer.appService.getFlattenLayers(this.webglRenderer.paneId),r=t.flattenLayers===!0;n!==r?(this.webglRenderer.appService.processGraph(this.webglRenderer.paneId,r,t),this.webglRenderer.appService.setFlattenLayersInCurrentPane(r)):this.webglRenderer.sendRelayoutGraphRequest(t.selectedNodeId||"",t.deepestExpandedGroupNodeIds||[],!1,t.rect,!0,t.showOnNodeItemTypes)}static \u0275fac=function(n){return new(n||i)(X(st),X(Ni))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var PG={r:1,g:1,b:1},EC=14,xue=Nn,IC=(()=>{class i{appService;subgraphSelectionService;SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR=new xue.Color("#09B83E");webglRenderer;webglRendererThreejsService;threejsService=te(wr);curSubgraphSelectedNodeIds={};subgraphsSelectedNodeMarkerBgs=new Pi(99);subgraphSelectedNodeMarkerTexts=new Wi(this.threejsService);constructor(t,n){this.appService=t,this.subgraphSelectionService=n}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService,mt(()=>{this.curSubgraphSelectedNodeIds=this.subgraphSelectionService.selectedNodeIds(),this.renderSubgraphSelectedNodeMarkers()})}renderSubgraphSelectedNodeMarkers(){if(!this.enableSubgraphSelection)return;let t=Object.keys(this.curSubgraphSelectedNodeIds),n=new Set(t);if(this.clearSubgraphSelectedNodeMarkers(),t.length===0){this.webglRendererThreejsService.render();return}let r=[],o=new Set;for(let a of t){let c=this.webglRenderer.curModelGraph.nodesById[a];for(;;){let d=this.webglRenderer.curModelGraph.nodesById[c.nsParentId||""];if(d)o.add(d.id),c=d;else break}}let s=[];for(let a of o){if(!this.webglRenderer.isNodeRendered(a))continue;let l=this.webglRenderer.curModelGraph.nodesById[a],c=this.webglRenderer.getNodeX(l)+this.webglRenderer.getNodeWidth(l),d=this.webglRenderer.getNodeY(l),u=(l.descendantsOpNodeIds||[]).filter(f=>{let m=this.webglRenderer.curModelGraph.nodesById[f];return n.has(m.id)}).length;s.push({id:`${a}_subgraph_count_label`,nodeId:a,label:`${u}`,height:8,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,color:this.webglRenderer.NODE_LABEL_COLOR,x:c,y:96,z:d+1});let h=EC*(u>=1e3?2:1.5),p=EC;r.push({id:a,index:r.length,bound:{x:c,y:d,width:h,height:p},yOffset:95.5,isRounded:!0,borderColor:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,bgColor:PG,borderWidth:1.5,opacity:1})}for(let a of t){if(!this.webglRenderer.isNodeRendered(a))continue;let l=this.webglRenderer.curModelGraph.nodesById[a],c=this.webglRenderer.getNodeX(l)+this.webglRenderer.getNodeWidth(l),d=this.webglRenderer.getNodeY(l),u=EC,h=EC;r.push({id:a,index:r.length,bound:{x:c,y:d,width:u,height:h},yOffset:95.5,isRounded:!0,borderColor:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,bgColor:PG,borderWidth:1.5,opacity:1}),s.push({id:`${l.id}_checkmark`,nodeId:l.id,label:"0xe876",height:24,hAlign:"center",vAlign:"center",weight:mn.ICONS,color:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,x:c,y:96,z:d+14,treatLabelAsAWhole:!0,weightLevel:.9})}this.subgraphsSelectedNodeMarkerBgs.generateMesh(r,!1,!1,!1,!0),this.webglRendererThreejsService.addToScene(this.subgraphsSelectedNodeMarkerBgs.mesh),this.subgraphSelectedNodeMarkerTexts.generateMesh(s,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.subgraphSelectedNodeMarkerTexts.mesh),this.webglRenderer.animateIntoPositions(a=>{this.subgraphsSelectedNodeMarkerBgs.updateAnimationProgress(a),this.subgraphSelectedNodeMarkerTexts.updateAnimationProgress(a)})}get enableSubgraphSelection(){return this.appService.config()?.enableSubgraphSelection===!0}clearSubgraphSelectedNodeMarkers(){for(let t of[this.subgraphsSelectedNodeMarkerBgs.mesh,this.subgraphSelectedNodeMarkerTexts.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t))}static \u0275fac=function(n){return new(n||i)(X(st),X(Xo))};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var Sr=500,OG=200,ts=Nn,TC=(()=>{class i{curScale=1;fps="";camera;raycaster;zoom=uD();webglRenderer;curTranslateX=0;curTranslateY=0;scene;renderer;snapshotRenderer;pngDownloaderRenderer;savedCenterX=null;savedCenterY=null;resizeTimeoutRef=-1;fpsStartTime=-1;frames=0;init(t){this.webglRenderer=t}setupZoomAndPan(t,n=.1,r=10){let o=Go(t),s=0,a=0;this.zoom.scaleExtent([n,r]).wheelDelta(()=>-dt.deltaY*(dt.deltaMode?120:1)/150).filter(()=>{if(dt.type==="mousedown"&&(s=this.curTranslateX,a=this.curTranslateY),dt.button===2||Tm&&dt.ctrlKey&&dt.button===0&&dt.type==="mousedown")return!1;if(dt.type==="dblclick")return dt.stopPropagation(),this.webglRenderer.handleDoubleClickOnGraph(dt.altKey,dt.shiftKey),!1;if(dt.type==="wheel"&&!dt.ctrlKey){let l=.5/this.curScale;return this.zoom.translateBy(o,-Number(dt.deltaX)*l,-Number(dt.deltaY)*l),dt.preventDefault(),!1}return!0}).on("zoom",()=>{this.handleZoom()}).on("end",()=>{this.handleZoomEnd(s,a)}),this.zoom.interpolate(Sd),o.call(this.zoom)}setupThreeJs(){let t=this.webglRenderer.canvas.nativeElement;this.scene=new ts.Scene,this.scene.background=new ts.Color(16777215);let n=t.clientWidth/t.clientHeight;this.camera=new ts.OrthographicCamera(0,2*Sr*n,0,-2*Sr,.001,1e3),this.camera.position.y=OG,this.camera.lookAt(new ts.Vector3(0,0,0)),this.camera.updateMatrixWorld(),this.camera.updateProjectionMatrix(),this.renderer=new ts.WebGLRenderer({canvas:t,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0});let r=ld();this.renderer.setPixelRatio(r),this.renderer.setSize(t.clientWidth,t.clientHeight);let o=this.webglRenderer.snapshotCanvas.nativeElement;this.snapshotRenderer=new ts.WebGLRenderer({canvas:o,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0,preserveDrawingBuffer:!0}),this.snapshotRenderer.setPixelRatio(r),this.render(),new ResizeObserver(()=>{requestAnimationFrame(()=>{this.resizeRendererToDisplaySize()})}).observe(this.webglRenderer.container.nativeElement),this.raycaster=new ts.Raycaster,this.raycaster.params.Points.threshold=5.5}clearScene(t=[]){for(let n=this.scene.children.length-1;n>=0;n--){let r=this.scene.children[n];t.includes(r)||(r.geometry&&r.geometry.dispose(),this.scene.remove(r))}}setupPngDownloaderRenderer(t,n,r,o){this.pngDownloaderRenderer||(this.pngDownloaderRenderer=new ts.WebGLRenderer({canvas:t,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0,preserveDrawingBuffer:!0}),this.pngDownloaderRenderer.setPixelRatio(ld())),n&&(this.scene.background=null,this.pngDownloaderRenderer.setClearColor(0,0)),this.pngDownloaderRenderer.setSize(r,o,!1)}renderPngDownloader(t){this.pngDownloaderRenderer.render(this.scene,t)}renderSnapshot(t,n){this.snapshotRenderer.setSize(t,n,!1),this.snapshotRenderer.render(this.scene,this.camera)}setSceneBackground(t){this.scene.background=t}createOrthographicCamera(t,n,r,o){let s=new ts.OrthographicCamera(t,n,r,o,.001,1e3);return s.position.y=OG,s.lookAt(new ts.Vector3(0,0,0)),s.updateMatrixWorld(),s.updateProjectionMatrix(),s}dispose(){this.renderer&&(this.renderer.dispose(),this.renderer.forceContextLoss()),this.snapshotRenderer&&(this.snapshotRenderer.dispose(),this.snapshotRenderer.forceContextLoss()),this.pngDownloaderRenderer&&(this.pngDownloaderRenderer.dispose(),this.pngDownloaderRenderer.forceContextLoss())}render(t=!1){if(!(!this.renderer||!this.scene||!this.camera)&&(this.renderer.render(this.scene,this.camera),this.webglRenderer.benchmark&&t)){this.fpsStartTime<0&&(this.fpsStartTime=performance.now()),this.frames+=1;let n=performance.now()-this.fpsStartTime;n>1e3&&(this.fps=(this.frames/n*1e3).toFixed(1),this.fpsStartTime=-1,this.frames=0,this.webglRenderer.changeDetectorRef.markForCheck())}}zoomFitGraph(t=.9,n=200){this.zoomFit({x:this.webglRenderer.currentMinX,y:this.webglRenderer.currentMinZ,width:this.webglRenderer.currentMaxX-this.webglRenderer.currentMinX,height:this.webglRenderer.currentMaxZ-this.webglRenderer.currentMinZ},t,n)}zoomFit(t,n=.9,r=300,o=!1,s=!0,a=!1){if(!this.webglRenderer.container)return;let l=this.webglRenderer.container.nativeElement,c=l.clientWidth*n,d=l.clientHeight*n,u=t.width/t.height,h=c/d,p=o?this.curScale:Math.abs(u>h?this.convertXFromScreenToScene(c)/t.width:this.convertZFromScreenToScene(d)/t.height),f=t.x+t.width/2,m=t.y+t.height/2;if(!o&&s){let b=this.convertZFromScreenToScene(45)/30;if(p=Math.min(b,p),a){let g=this.convertZFromScreenToScene(20)/30;p{let o=n.nodesById[t];this.zoomFit({x:this.webglRenderer.getNodeX(o),y:this.webglRenderer.getNodeY(o),width:this.webglRenderer.getNodeWidth(o),height:this.webglRenderer.getNodeHeight(o)},.9,r,!1,!0,!0)},0):setTimeout(()=>{this.zoomFitGraph(.9,r)})}addToScene(t){t&&this.scene.add(t)}removeFromScene(t){t&&this.scene.remove(t)}convertXFromSceneToScreen(t){if(!this.webglRenderer.container)return 0;let n=this.webglRenderer.container.nativeElement,r=n.clientWidth,o=r/n.clientHeight;return t/(Sr/1*o)/-2*r}convertZFromSceneToScreen(t){if(!this.webglRenderer.container)return 0;let r=this.webglRenderer.container.nativeElement.clientHeight;return t*1*r/Sr/2}convertXFromScreenToScene(t){if(!this.webglRenderer.container)return 0;let n=this.webglRenderer.container.nativeElement,r=n.clientWidth,o=r/n.clientHeight;return t/r*-2*(Sr/1*o)}convertZFromScreenToScene(t,n=1){if(!this.webglRenderer.container)return 0;let o=this.webglRenderer.container.nativeElement.clientHeight;return t*Sr*2/n/o}convertScenePosToScreen(t,n){let r=this.webglRenderer.container.nativeElement,o=r.clientWidth,s=r.clientHeight,a=new ts.Vector3(t,0,n);return a.project(this.camera),{x:a.x*o/2+o/2,y:-(a.y*s/2)+s/2}}convertScreenPosToScene(t,n){let r=new ts.Vector3;r.set(t/this.webglRenderer.canvas.nativeElement.offsetWidth*2-1,-(n/this.webglRenderer.canvas.nativeElement.offsetHeight)*2+1,-1);let o=r.unproject(this.camera);return{x:o.x,y:o.z}}handleZoom(){this.curScale=dt.transform.k,this.curTranslateX=dt.transform.x,this.curTranslateY=dt.transform.y,requestAnimationFrame(()=>{this.camera&&(this.setCameraFrustum(),this.webglRenderer.updateNodeBgColorWhenFar(),this.render(),this.webglRenderer.handleHoveredGroupNodeIconChanged())})}handleZoomEnd(t,n){if(dt.sourceEvent&&dt.sourceEvent.type==="mouseup"){let r=Math.abs(this.curTranslateX-t),o=Math.abs(this.curTranslateY-n);r>=0&&r<=3&&o>=0&&o<=3&&this.webglRenderer.handleClickOnGraph(dt.sourceEvent.shiftKey)}}setCameraFrustum(){let t=this.webglRenderer.container.nativeElement,n=t.clientWidth,r=t.clientHeight,o=n/r,s=this.curTranslateX-n/2,a=this.curTranslateY-r/2;this.camera.left=-Sr/this.curScale*o-s/n*2*Sr/this.curScale*o,this.camera.right=Sr/this.curScale*o-s/n*2*Sr/this.curScale*o,this.camera.top=Sr/this.curScale+a*Sr/this.curScale/r*2,this.camera.bottom=-Sr/this.curScale+a*Sr/this.curScale/r*2,this.camera.updateProjectionMatrix()}resizeRendererToDisplaySize(t=!0){let n=this.webglRenderer.container.nativeElement,r=this.renderer.domElement,o=n.clientWidth,s=n.clientHeight;if(o===0||s===0)return;if(r.width!==o||r.height!==s){if(this.savedCenterX==null&&this.savedCenterY==null){let{x:l,y:c}=this.convertScreenPosToScene(o/2,s/2);this.savedCenterX=l,this.savedCenterY=c}this.renderer.setSize(o,s,!1),this.webglRenderer.canvas.nativeElement.style.width="100%",this.webglRenderer.canvas.nativeElement.style.height="100%",this.setCameraFrustum(),this.render(),this.zoomFit({x:this.savedCenterX,y:this.savedCenterY,width:1e-7,height:1e-7},.9,0,!0),this.resizeTimeoutRef>=0&&window.clearTimeout(this.resizeTimeoutRef),this.resizeTimeoutRef=window.setTimeout(()=>{this.savedCenterX=null,this.savedCenterY=null},500)}}centerViewAt(t,n,r,o=300){if(!this.webglRenderer.container)return;let s=this.webglRenderer.container.nativeElement,a=s.clientWidth,l=s.clientHeight,c=a/l,d=-2*Sr*c/2/r+t,u=-n+Sr/r,h=Rd.scale(r).translate(this.convertXFromSceneToScreen(d),this.convertZFromSceneToScreen(u)),p=Go(s);o===0?p.call(this.zoom.transform,h):p.transition().duration(this.webglRenderer.appService.testMode?0:o).ease($T).call(this.zoom.transform,h)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var rf=function(i){return i.COLOR="COLOR",i.NUMBER="NUMBER",i}(rf||{}),Sue={type:rf.COLOR,label:"Bg color",id:Hs.NODE_BG_COLOR,defaultValue:"#ffffff"},Mue={type:rf.COLOR,label:"Border color",id:Hs.NODE_BORDER_COLOR,defaultValue:"#777777"},Eue={type:rf.COLOR,label:"Text color",id:Hs.NODE_TEXT_COLOR,defaultValue:"#041e49"},AG=[Sue,Mue,Eue],RG="model_explorer_node_styler_rules",la=(()=>{class i{appService;localStorageService;rules=xt([]);matchedNodes=xt({});hasNonEmptyNodeStylerRules=Xt(()=>this.rules().filter(t=>yh(t.queries)&&Object.keys(t.styles).length>0).length>0);constructor(t,n){if(this.appService=t,this.localStorageService=n,mt(()=>{let r=this.rules();this.appService.testMode||this.localStorageService.setItem(RG,JSON.stringify(r)),this.computeMatchedNodes(r)},{allowSignalWrites:!0}),this.appService.testMode){let r=new URLSearchParams(document.location.search),o=decodeURIComponent(r.get("test_node_styler_rules")||"");this.updateRules(o===""?[]:JSON.parse(o))}else{let r=this.localStorageService.getItem(RG)||"",o=r===""?[]:JSON.parse(r);this.updateRules(o)}}addNewRule(){this.rules.update(t=>{let n=[...t];return n.push({queries:[{type:Ln.NODE_TYPE,nodeType:mr.OP_NODES},{type:Ln.REGEX,queryRegex:"",matchTypes:[vt.NODE_LABEL]}],nodeType:mr.OP_NODES,styles:{},version:Ub.V2}),n})}moveUpRule(t){this.rules.update(n=>{let r=[...n],o=n[t];return r.splice(t,1),r.splice(t-1,0,o),r})}moveDownRule(t){this.rules.update(n=>{let r=[...n],o=n[t];return r.splice(t,1),r.splice(t+1,0,o),r})}duplicateRule(t){this.rules.update(n=>{let r=JSON.parse(JSON.stringify(n[t]));return[...n.slice(0,t),r,...n.slice(t)]})}updateRules(t){this.rules.set(this.convertOldRulesIfNecessary(t))}updateQueries(t,n){this.rules.update(r=>{let o=r[t];return o.queries=n,[...r]})}toggleStyle(t,n,r){this.rules.update(o=>{let s=o[t];return r==null?s.styles[n.id]==null?s.styles[n.id]={id:n.id,value:n.defaultValue}:delete s.styles[n.id]:r?s.styles[n.id]={id:n.id,value:n.defaultValue}:delete s.styles[n.id],[...o]})}updateStyleValue(t,n,r){this.rules.update(o=>{let s=o[t],a=s.styles[n.id];return a&&(typeof a=="string"?s.styles[n.id]=r:a.value=r),[...o]})}deleteRule(t){this.rules.update(n=>{let r=[...n];return r.splice(t,1),r})}convertOldRulesIfNecessary(t){return t.map(n=>{if(n.version==null&&n.nodeType){let r={type:Ln.NODE_TYPE,nodeType:n.nodeType};n.queries.unshift(r),n.version=Ub.V2}return n})}computeMatchedNodes(t){let n=Qb(t),r={};if(t.length>0&&t.some(o=>yh(o.queries))){let o=this.appService.panes();for(let s=0;sthis._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(e){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(e,Pue))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},NG=new ge("MatSnackBarData"),of=class{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}},Oue=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"],standalone:!0});let i=e;return i})(),Rue=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"],standalone:!0});let i=e;return i})(),Aue=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"],standalone:!0});let i=e;return i})(),kG=(()=>{let e=class e{constructor(n,r){this.snackBarRef=n,this.data=r}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}};e.\u0275fac=function(r){return new(r||e)(M(q_),M(NG))},e.\u0275cmp=le({type:e,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],standalone:!0,features:[ce],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(r,o){r&1&&(v(0,"div",0),S(1),y(),W(2,Iue,3,1,"div",1)),r&2&&(w(),Me(" ",o.data.message,` +`),w(),ae(o.hasAction?2:-1))},dependencies:[zi,Oue,Rue,Aue],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0});let i=e;return i})(),Nue={snackBarState:si("state",[fi("void, hidden",Qt({transform:"scale(0.8)",opacity:0})),fi("visible",Qt({transform:"scale(1)",opacity:1})),On("* => visible",Pn("150ms cubic-bezier(0, 0, 0.2, 1)")),On("* => void, * => hidden",Pn("75ms cubic-bezier(0.4, 0.0, 1, 1)",Qt({opacity:0})))])},kue=0,Lue=(()=>{let e=class e extends oa{constructor(n,r,o,s,a){super(),this._ngZone=n,this._elementRef=r,this._changeDetectorRef=o,this._platform=s,this.snackBarConfig=a,this._document=te(Ye),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new me,this._onExit=new me,this._onEnter=new me,this._animationState="void",this._liveElementId=`mat-snack-bar-container-live-${kue++}`,this.attachDomPortal=l=>{this._assertNotAttached();let c=this._portalOutlet.attachDomPortal(l);return this._afterPortalAttached(),c},a.politeness==="assertive"&&!a.announcementMessage?this._live="assertive":a.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(n){this._assertNotAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._afterPortalAttached(),r}attachTemplatePortal(n){this._assertNotAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._afterPortalAttached(),r}onAnimationEnd(n){let{fromState:r,toState:o}=n;if((o==="void"&&r!=="void"||o==="hidden")&&this._completeExit(),o==="visible"){let s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let n=this._elementRef.nativeElement,r=this.snackBarConfig.panelClass;r&&(Array.isArray(r)?r.forEach(a=>n.classList.add(a)):n.classList.add(r)),this._exposeToModals();let o=this._label.nativeElement,s="mdc-snackbar__label";o.classList.toggle(s,!o.querySelector(`.${s}`))}_exposeToModals(){let n=this._liveElementId,r=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{let r=n.getAttribute("aria-owns");if(r){let o=r.replace(this._liveElementId,"").trim();o.length>0?n.setAttribute("aria-owns",o):n.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{let n=this._elementRef.nativeElement.querySelector("[aria-hidden]"),r=this._elementRef.nativeElement.querySelector("[aria-live]");if(n&&r){let o=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&n.contains(document.activeElement)&&(o=document.activeElement),n.removeAttribute("aria-hidden"),r.appendChild(n),o?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}};e.\u0275fac=function(r){return new(r||e)(M(Le),M(Re),M(Fe),M(gn),M(of))},e.\u0275cmp=le({type:e,selectors:[["mat-snack-bar-container"]],viewQuery:function(r,o){if(r&1&&(Ie(Qo,7),Ie(Tue,7)),r&2){let s;be(s=ye())&&(o._portalOutlet=s.first),be(s=ye())&&(o._label=s.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:1,hostBindings:function(r,o){r&1&&WE("@state.done",function(a){return o.onAnimationEnd(a)}),r&2&&Yf("@state",o._animationState)},standalone:!0,features:[nn,ce],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(r,o){r&1&&(v(0,"div",1)(1,"div",2,0)(3,"div",3),W(4,Due,0,0,"ng-template",4),y(),J(5,"div"),y()()),r&2&&(w(5),Ze("aria-live",o._live)("role",o._role)("id",o._liveElementId))},dependencies:[Qo],styles:[".mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}.cdk-high-contrast-active .mat-mdc-snackbar-surface{outline:solid 1px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color);border-radius:var(--mdc-snackbar-container-shape);background-color:var(--mdc-snackbar-container-color)}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mdc-snackbar-supporting-text-font);font-size:var(--mdc-snackbar-supporting-text-size);font-weight:var(--mdc-snackbar-supporting-text-weight);line-height:var(--mdc-snackbar-supporting-text-line-height)}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-snack-bar-button-color);--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}"],encapsulation:2,data:{animation:[Nue.snackBarState]}});let i=e;return i})();function Fue(){return new of}var Bue=new ge("mat-snack-bar-default-options",{providedIn:"root",factory:Fue}),yu=(()=>{let e=class e{get _openedSnackBarRef(){let n=this._parentSnackBar;return n?n._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(n){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=n:this._snackBarRefAtThisLevel=n}constructor(n,r,o,s,a,l){this._overlay=n,this._live=r,this._injector=o,this._breakpointObserver=s,this._parentSnackBar=a,this._defaultConfig=l,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=kG,this.snackBarContainerComponent=Lue,this.handsetCssClass="mat-mdc-snack-bar-handset"}openFromComponent(n,r){return this._attach(n,r)}openFromTemplate(n,r){return this._attach(n,r)}open(n,r="",o){let s=Z(Z({},this._defaultConfig),o);return s.data={message:n,action:r},s.announcementMessage===n&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(n,r){let o=r&&r.viewContainerRef&&r.viewContainerRef.injector,s=yt.create({parent:o||this._injector,providers:[{provide:of,useValue:r}]}),a=new Di(this.snackBarContainerComponent,r.viewContainerRef,s),l=n.attach(a);return l.instance.snackBarConfig=r,l.instance}_attach(n,r){let o=Z(Z(Z({},new of),this._defaultConfig),r),s=this._createOverlay(o),a=this._attachSnackBarContainer(s,o),l=new q_(a,s);if(n instanceof Hn){let c=new jr(n,null,{$implicit:o.data,snackBarRef:l});l.instance=a.attachTemplatePortal(c)}else{let c=this._createInjector(o,l),d=new Di(n,void 0,c),u=a.attachComponentPortal(d);l.instance=u.instance}return this._breakpointObserver.observe(my.HandsetPortrait).pipe(Xe(s.detachments())).subscribe(c=>{s.overlayElement.classList.toggle(this.handsetCssClass,c.matches)}),o.announcementMessage&&a._onAnnounce.subscribe(()=>{this._live.announce(o.announcementMessage,o.politeness)}),this._animateSnackBar(l,o),this._openedSnackBarRef=l,this._openedSnackBarRef}_animateSnackBar(n,r){n.afterDismissed().subscribe(()=>{this._openedSnackBarRef==n&&(this._openedSnackBarRef=null),r.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{n.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):n.containerInstance.enter(),r.duration&&r.duration>0&&n.afterOpened().subscribe(()=>n._dismissAfter(r.duration))}_createOverlay(n){let r=new ui;r.direction=n.direction;let o=this._overlay.position().global(),s=n.direction==="rtl",a=n.horizontalPosition==="left"||n.horizontalPosition==="start"&&!s||n.horizontalPosition==="end"&&s,l=!a&&n.horizontalPosition!=="center";return a?o.left("0"):l?o.right("0"):o.centerHorizontally(),n.verticalPosition==="top"?o.top("0"):o.bottom("0"),r.positionStrategy=o,this._overlay.create(r)}_createInjector(n,r){let o=n&&n.viewContainerRef&&n.viewContainerRef.injector;return yt.create({parent:o||this._injector,providers:[{provide:q_,useValue:r},{provide:NG,useValue:n.data}]})}};e.\u0275fac=function(r){return new(r||e)(X(Ht),X(Sy),X(yt),X(Th),X(e,12),X(Bue))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var LG=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[yu],imports:[Jr,Ms,In,qt,kG,qt]});let i=e;return i})();var Vue=["container"],zue=["canvas"],Uue=["snapshotCanvas"],Hue=["pngDownloaderCanvas"],Gue=["hoverToolbar"],jue=["ioPicker"],Wue=["subgraphMenuTrigger"],$ue=["groupNodeIconMatTooltip"],que=["ioPickerMatTooltip"],Yue=["moreActionsMenuTrigger"],Xue=["rangeZoomDragArea"],Zue=["dragToSelectDragArea"];function Que(i,e){if(i&1){let t=ie();v(0,"div",33),H("click",function(){V(t);let r=I();return z(r.handleClickCollapseAll(r.hoveredNodeIdWhenClickingMoreActions))}),v(1,"mat-icon"),S(2,"unfold_less_double"),y(),S(3," Collapse layer & all sub-layers "),y()}}function Kue(i,e){if(i&1){let t=ie();v(0,"div",34),H("click",function(r){V(t);let o=I();return z(o.handleClickOpenGroupNodeInPopup(r,o.hoveredNodeIdWhenClickingMoreActions))}),v(1,"mat-icon"),S(2,"open_in_new"),y(),S(3," Open layer in popup "),y()}}function Jue(i,e){if(i&1){let t=ie();v(0,"div",35),H("click",function(){let r=V(t).$implicit,o=I();return z(o.handleClickSubgraphId(r))}),v(1,"mat-icon"),S(2,"subdirectory_arrow_right"),y(),S(3),y()}if(i&2){let t=e.$implicit;w(3),Me(" ",t," ")}}function ehe(i,e){if(i&1&&(v(0,"div",32),S(1),y()),i&2){let t=I();w(),Me("FPS: ",t.fps,"")}}var the=1.2,nhe=2,FG=1.5,ihe=200,TO=400,rhe=1,BG=14,ohe=5e3,she=-Kt*.5,DO=Kt*.4,VG=Kt*.3,ahe=Kt*.4,lhe="______",vn=Nn,PC=function(i){return i[i.NODE=0]="NODE",i[i.EDGE=1]="EDGE",i}(PC||{}),OC=(()=>{class i{changeDetectorRef;destroyRef;ngZone;nodeDataProviderExtensionService;nodeStylerService;overlay;snackBar;splitPaneService;subgraphSelectionService;uiStateService;viewContainerRef;webglRendererAttrsTableService;webglRendererEdgeTextsService;webglRendererIdenticalLayerService;webglRendererIoHighlightService;webglRendererIoTracingService;webglRendererNdpService;webglRendererSearchResultsService;webglRendererSnapshotService;webglRendererSubgraphSelectionService;webglRendererThreejsService;workerService;modelGraph;rendererId;paneId;rootNodeId;inPopup=!1;benchmark=!1;openInPopupClicked=new Pe;container;canvas;snapshotCanvas;pngDownloaderCanvas;hoverToolbar;ioPicker;subgraphMenuTrigger;groupNodeIconMatTooltip;ioPickerMatTooltip;moreActionsMenuTrigger;rangeZoomDragArea;dragToSelectDragArea;appService=te(st);threejsService=te(wr);SELECTED_NODE_BORDER_COLOR=new vn.Color("#1A73E8");SELECTED_NODE_BG_COLOR=new vn.Color("#C2E7FF");HOVERED_NODE_BORDER_COLOR=new vn.Color("#000");HOVERED_GROUP_NODE_BORDER_COLOR=new vn.Color("#666");IDENTICAL_GROUPS_BG_COLOR=new vn.Color("#e2edff");NODE_LABEL_COLOR=new vn.Color("#041E49");OP_NODE_BORDER_COLOR=new vn.Color("#777");GROUP_NODE_BORDER_COLOR=new vn.Color("#aaa");GROUP_NODE_LABEL_SEPARATOR_COLOR=new vn.Color("#DADCE0");GROUP_NODE_ICON_COLOR=new vn.Color("#444746");GROUP_NODE_PIN_TO_TOP_SEPARATOR_COLOR=new vn.Color("#bbb");EDGE_COLOR=new vn.Color(this.appService.config()?.edgeColor||"#aaa");EDGE_COLOR_INCOMING=new vn.Color("#009e73");EDGE_TEXT_COLOR_INCOMING=new vn.Color("#125341");EDGE_COLOR_OUTGOING=new vn.Color("#d55e00");EDGE_TEXT_COLOR_OUTGOING=new vn.Color("#994d11");ARTIFCIAL_GROUPS_BORDER_COLOR=new vn.Color("#800080");SUBGRAPH_INDICATOR_BORDER_COLOR=new vn.Color("#135cbb");SUBGRAPH_INDICATOR_BG_COLOR=new vn.Color("#d5e7ff");GROUP_NODE_BG_COLORS=(()=>{let s=[];for(let a=0;a<6;a++){let l=96+a*-2.4;s.push(new vn.Color(`hsl(212, 40%, ${Math.round(l)}%)`))}return s})();graphId="";curModelGraph;tracing=!1;showBusySpinner=!1;selectedNodeId="";flashing=!1;hoveredNodeIdWhenClickingMoreActions="";currentMinX=0;currentMaxX=0;currentMinZ=0;currentMaxZ=0;groupNodeIcon={top:-1e3,left:-1e3,width:0,height:0};ioPickerTop=-1e3;ioPickerLeft=-1e3;ioPickerWidth=0;ioPickerHeight=0;ioPickerTooltip="";subgraphIndicatorTop=-1e3;subgraphIndicatorLeft=-1e3;subgraphIndicatorWidth=0;subgraphIndicatorHeight=0;curSubgraphIdsForMenu=[];curShowOnNodeItemTypes={};curShowOnEdgeItemTypes={};nodesToRender=[];nodesToRenderMap={};edgesToRender=[];curNodeDataProviderRuns={};curHiddenInputOpNodeIds={};curHiddenOutputIds={};elementsToRender=[];updateNodesStylesSavedSelectedNodeId="";updateNodesStylesSavedIoTracingData;curSelectedRenderer;portal=null;showBusySpinnerTimeoutRef=-1;prevNodeDataProviderData=void 0;nodeBodies=new Pi(6);groupNodeIcons=new Wi(this.threejsService);groupNodeIconBgs=new Pi(99);artificialGroupBorders=new Pi(6);subgraphIndicatorBgs=new Pi(3);subgraphIndicatorIcons=new Wi(this.threejsService);edges=new vu(this.EDGE_COLOR,rhe);texts=new Wi(this.threejsService);mousePos=new vn.Vector2;draggingArea=!1;hoveredNodeId="";hoveredGroupNodeIconId="";nodeIdForHoveredGroupNodeIcon="";hoveredIoPickerId="";hoveredSubgraphIndicatorId="";savedUpdateNodeBgWhenFarProgress=-1;curNodeStylerRules=[];curProcessedNodeStylerRules=[];renderedEdgeIdsToHide=[];selectedNodeInfo=Xt(()=>{let t=this.appService.getPaneById(this.paneId);if(t)return t.selectedNodeInfo});messageEventListener=t=>{this.hideBusySpinner();let n=t.data;switch(n.eventType){case Ji.EXPAND_OR_COLLAPSE_GROUP_NODE_RESP:this.rendererId===n.rendererId&&this.handleExpandOrCollapseGroupNodeDone(n.modelGraph,n.rendererId,n.groupNodeId,n.expanded,n.deepestExpandedGroupNodeIds);break;case Ji.RELAYOUT_GRAPH_RESP:this.rendererId===n.rendererId&&this.handleReLayoutGraphDone(n.rendererId,n.modelGraph,n.selectedNodeId,n.forRestoringUiState,n.rectToZoomFit,n.forRestoringSnapshotAfterTogglingFlattenLayers,n.targetDeepestGroupNodeIdsToExpand);break;case Ji.LOCATE_NODE_RESP:this.rendererId===n.rendererId&&this.handleLocateNodeDone(n.rendererId,n.modelGraph,n.nodeId,n.deepestExpandedGroupNodeIds,n.noNodeShake===!0,n.select===!0);break;case Ji.PREPARE_POPUP_RESP:this.paneId===n.paneId&&this.openInPopupClicked.emit({id:n.rendererId,groupNode:n.modelGraph.nodesById[n.groupNodeId],initialPosition:n.initialPosition,curModelGraph:n.modelGraph});break;default:break}};constructor(t,n,r,o,s,a,l,c,d,u,h,p,f,m,b,g,_,x,C,T,D,E){this.changeDetectorRef=t,this.destroyRef=n,this.ngZone=r,this.nodeDataProviderExtensionService=o,this.nodeStylerService=s,this.overlay=a,this.snackBar=l,this.splitPaneService=c,this.subgraphSelectionService=d,this.uiStateService=u,this.viewContainerRef=h,this.webglRendererAttrsTableService=p,this.webglRendererEdgeTextsService=f,this.webglRendererIdenticalLayerService=m,this.webglRendererIoHighlightService=b,this.webglRendererIoTracingService=g,this.webglRendererNdpService=_,this.webglRendererSearchResultsService=x,this.webglRendererSnapshotService=C,this.webglRendererSubgraphSelectionService=T,this.webglRendererThreejsService=D,this.workerService=E,this.webglRendererAttrsTableService.init(this),this.webglRendererEdgeTextsService.init(this),this.webglRendererIdenticalLayerService.init(this),this.webglRendererIoHighlightService.init(this),this.webglRendererIoTracingService.init(this),this.webglRendererNdpService.init(this),this.webglRendererSearchResultsService.init(this),this.webglRendererSnapshotService.init(this),this.webglRendererSubgraphSelectionService.init(this),this.webglRendererThreejsService.init(this),this.workerService.worker.addEventListener("message",this.messageEventListener),mt(()=>{this.curSelectedRenderer=this.appService.curSelectedRenderer()}),this.appService.spaceKeyToZoomFitClicked.pipe(Vi(this.destroyRef)).subscribe(P=>{this.rendererId===this.curSelectedRenderer?.id&&this.webglRendererThreejsService.zoomFitGraph()}),mt(()=>{let P=this.appService.curToLocateNodeInfo();P?.rendererId===this.rendererId&&(P&&this.sendLocateNodeRequest(P.nodeId,P.rendererId,P.noNodeShake,P.select),this.appService.curToLocateNodeInfo.set(void 0))},{allowSignalWrites:!0}),mt(()=>{let P=this.appService.getPaneById(this.paneId);if(!P||!P.modelGraph)return;let Y=P.nodeIdToReveal;if(!Y)return;this.revealNode(Y)&&this.appService.setNodeToReveal(this.paneId,void 0)},{allowSignalWrites:!0}),mt(()=>{let P=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);this.curNodeDataProviderRuns={};for(let Y of P)this.curNodeDataProviderRuns[Y.runId]=Y}),mt(()=>{let P=this.webglRendererNdpService.curNodeDataProviderResults();P!==this.prevNodeDataProviderData&&(this.handleCurNodeDataProviderResultsChanged(),this.prevNodeDataProviderData=P)}),mt(()=>{if(!this.appService.getPaneById(this.paneId))return;let Y=this.appService.getShowOnNodeItemTypes(this.paneId,this.rendererId);JSON.stringify(Y)!==JSON.stringify(this.curShowOnNodeItemTypes)&&(this.curShowOnNodeItemTypes=Y,this.sendRelayoutGraphRequest(this.selectedNodeId))}),this.appService.expandOrCollapseAllGraphLayersClicked.pipe(Vi(this.destroyRef)).subscribe(P=>{P.rendererId===this.rendererId&&this.sendExpandOrCollapseGroupNodeRequest(void 0,!0,P.expandOrCollapse)}),mt(()=>{let P=this.selectedNodeInfo();P?.rendererId===this.rendererId&&(this.selectedNodeId=P?.nodeId||"",this.tracing&&(this.selectedNodeId&&Et(this.curModelGraph.nodesById[this.selectedNodeId])?this.webglRendererIoTracingService.genTracingData():this.webglRendererIoTracingService.clearTracingData()),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render())}),this.appService.downloadAsPngClicked.pipe(Vi(this.destroyRef)).subscribe(P=>{P.rendererId===this.rendererId&&this.handleDownloadAsPng(P.fullGraph,P.transparentBackground)}),mt(()=>{let P=this.nodeStylerService.rules().filter($=>yh($.queries)&&Object.keys($.styles).length>0),Y=JSON.stringify(P);JSON.stringify(this.curNodeStylerRules)!==Y&&(this.curNodeStylerRules=JSON.parse(Y),this.curProcessedNodeStylerRules=Qb(this.curNodeStylerRules),this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render())}),mt(()=>{if(!this.appService.getPaneById(this.paneId))return;let Y=this.appService.getShowOnEdgeItemTypes(this.paneId,this.rendererId);JSON.stringify(Y)!==JSON.stringify(this.curShowOnEdgeItemTypes)&&(this.curShowOnEdgeItemTypes=Y,this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render())}),mt(()=>{this.curHiddenInputOpNodeIds=this.splitPaneService.hiddenInputOpNodeIds(),this.curHiddenOutputIds=this.splitPaneService.hiddenOutputIds(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.updateNodesStyles(),this.webglRendererThreejsService.render()})}ngOnInit(){this.graphId=this.modelGraph.id,this.curModelGraph=this.modelGraph,this.appService.updateCurrentModelGraph(this.paneId,this.curModelGraph),this.inPopup||(this.curShowOnNodeItemTypes=this.appService.getSavedShowOnNodeItemTypes(),this.curShowOnEdgeItemTypes=this.appService.getSavedShowOnEdgeItemTypes()),this.webglRendererThreejsService.setupZoomAndPan(this.container.nativeElement,1e-4,20),this.webglRendererThreejsService.setupThreeJs(),this.ngZone.runOutsideAngular(()=>{this.canvas.nativeElement.addEventListener("mousemove",s=>{this.handleMouseMove(s)})});let t=this.appService.curInitialUiState(),n=s=>{this.updateNodesAndEdgesToRender(),this.renderGraph(),this.webglRendererThreejsService.zoomFitGraph(.9,0);let a=this.appService.getPaneById(this.paneId);if(a?.snapshotToRestore!=null){let l=a.snapshotToRestore;this.curShowOnNodeItemTypes=a.snapshotToRestore.showOnNodeItemTypes||{},this.appService.setShowOnNode(this.paneId,this.rendererId,this.curShowOnNodeItemTypes),this.sendRelayoutGraphRequest(l.selectedNodeId||"",l.deepestExpandedGroupNodeIds||[],!1,l.rect,!0,l.showOnNodeItemTypes,!0),a.snapshotToRestore=void 0}else s!=null&&s!==""&&setTimeout(()=>{this.appService.curToLocateNodeInfo.set({nodeId:s,rendererId:this.rendererId,isGroupNode:!1,noNodeShake:!0})});this.sendExpandGroupNodeRequest(this.rootNodeId||"")};if(!t||t.paneStates.length===0||this.inPopup){let s=this.inPopup?void 0:this.appService.getPaneById(this.paneId)?.selectedNodeInfo?.nodeId;n(s)}else{let s=this.appService.getPaneIndexById(this.paneId),a=t.paneStates[s];if(!a)n();else{let l=a.deepestExpandedGroupNodeIds;if(l.length===1&&l[0]==="___all___"){let c=[];Dm(void 0,this.curModelGraph,c,!0),l=c}this.sendRelayoutGraphRequest(a.selectedNodeId,l,!0),this.uiStateService.setDeepestExpandedGroupNodeIds(a.deepestExpandedGroupNodeIds,s)}}let r=window;r[jb]==null&&(r[jb]={renderers:{}});let o=this.inPopup?-1:this.appService.getPaneIndexById(this.paneId);r[jb].renderers[o]=this,this.benchmark&&this.startBenchmark()}ngOnDestroy(){this.workerService.worker.removeEventListener("message",this.messageEventListener),this.webglRendererThreejsService.dispose(),document.body.style.cursor="default"}getActiveSelectedNodeInfo(){if(this.selectedNodeId)return{nodeId:this.selectedNodeId,rendererId:this.rendererId,isGroupNode:bt(this.curModelGraph.nodesById[this.selectedNodeId])}}toggleIoTrace(){this.tracing=!this.tracing,this.tracing?this.webglRendererIoTracingService.genTracingData():this.webglRendererIoTracingService.clearTracingData(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.updateNodesStyles(),this.webglRendererThreejsService.render()}setZoomFactor(t){let n=this.container.nativeElement,r=this.webglRendererThreejsService.convertScreenPosToScene(0,0),o=this.webglRendererThreejsService.convertScreenPosToScene(n.offsetWidth,n.offsetHeight),s=Math.min(r.x,o.x),a=Math.max(r.x,o.x),l=Math.min(r.y,o.y),c=Math.max(r.y,o.y),d=a-s,u=c-l,h=(s+a)/2,p=(l+c)/2,f=h-d/2/t,m=h+d/2/t,b=p-u/2/t,g=p+u/2/t;this.webglRendererThreejsService.zoomFit({x:f,y:b,width:m-f,height:g-b},.9,0,!1,!1)}handleMouseDownCanvas(t){Tm&&(t.metaKey||t.ctrlKey)||!Tm&&t.ctrlKey?(this.draggingArea=!0,this.rangeZoomDragArea.start(t,(n,r,o,s,a)=>{let l=this.webglRendererThreejsService.convertScreenPosToScene(r,o),c=this.webglRendererThreejsService.convertScreenPosToScene(s,a),d=Math.min(l.x,c.x),u=Math.max(l.x,c.x),h=Math.min(l.y,c.y),p=Math.max(l.y,c.y);this.webglRendererThreejsService.zoomFit({x:d,y:h,width:u-d,height:p-h},.9,200,!1,!1),this.draggingArea=!1})):t.shiftKey&&this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&(this.draggingArea=!0,this.dragToSelectDragArea.start(t,(n,r,o,s,a)=>{if(this.draggingArea=!1,n)this.hoveredNodeId?this.curModelGraph.nodesById[this.hoveredNodeId]&&this.handleShiftSelectNode(this.hoveredNodeId):this.handleClearSubgraphSelectedNodes();else{let l=this.webglRendererThreejsService.convertScreenPosToScene(r,o),c=this.webglRendererThreejsService.convertScreenPosToScene(s,a),d=Math.min(l.x,c.x),u=Math.max(l.x,c.x),h=Math.min(l.y,c.y),p=Math.max(l.y,c.y),f=[];for(let{node:m}of this.nodesToRender){let b=this.getNodeX(m),g=this.getNodeY(m),_=this.getNodeWidth(m),x=this.getNodeHeight(m),C=b,T=g,D=b+_,E=g+x,P=uD,$=h>E,U=p1&&(this.curSubgraphIdsForMenu=n,this.subgraphMenuTrigger.openMenu())}handleClickSubgraphId(t){this.openSubgraph(t)}handleDoubleClickOnGraph(t,n){this.selectedNodeId!==""&&!n&&this.handleToggleExpandCollapse(this.curModelGraph.nodesById[this.selectedNodeId],t)}handleClickOnGraph(t){this.hoveredNodeId?this.curModelGraph.nodesById[this.hoveredNodeId]&&(t||this.handleSelectNode(this.hoveredNodeId)):this.handleSelectNode("")}handleMouseEnterGroupNodeIcon(){this.groupNodeIconMatTooltip.show()}handleMouseLeaveGroupNodeIcon(){this.groupNodeIconMatTooltip.hide()}handleMouseEnterIoPicker(){this.ioPickerMatTooltip.show()}handleMouseLeaveIoPicker(){this.ioPickerMatTooltip.hide()}handleHoveredGroupNodeIconChanged(t){if(this.groupNodeIcon.top=-1e3,this.groupNodeIcon.left=-1e3,this.groupNodeIcon.width=0,this.groupNodeIcon.height=0,this.groupNodeIcon.tooltip=void 0,this.hoveredGroupNodeIconId!==""&&t!=null){let{x:n,y:r}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x-t.bound.width/2,t.bound.y-t.bound.height/2),{x:o,y:s}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x+t.bound.width/2,t.bound.y+t.bound.height/2);if(this.groupNodeIcon.top=r,this.groupNodeIcon.left=n,this.groupNodeIcon.width=o-n,this.groupNodeIcon.height=s-r,t.id.includes("_left")){let a=this.curModelGraph.nodesById[t.nodeId];this.groupNodeIcon.tooltip=a.expanded?"Collapse layer":"Expand layer"}else t.id.includes("_right")&&(this.groupNodeIcon.tooltip="More actions")}this.changeDetectorRef.detectChanges()}isNodeRendered(t){return this.nodesToRenderMap[t]!=null}sendLocateNodeRequest(t,n,r=!1,o=!1){if(this.showBusySpinnerWithDelay(),this.isNodeRendered(t))this.hideBusySpinner(),this.handleLocateNodeDone(n,this.curModelGraph,t,[],r,o,!0);else{let s={eventType:Ji.LOCATE_NODE_REQ,modelGraphId:this.curModelGraph.id,showOnNodeItemTypes:this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,nodeId:t,rendererId:n,noNodeShake:r,select:o};this.workerService.worker.postMessage(s)}}sendRelayoutGraphRequest(t,n,r=!1,o,s=!1,a,l){this.showBusySpinnerWithDelay();let c={eventType:Ji.RELAYOUT_GRAPH_REQ,modelGraphId:this.curModelGraph.id,showOnNodeItemTypes:a||this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,selectedNodeId:t,targetDeepestGroupNodeIdsToExpand:n,rendererId:this.rendererId,forRestoringUiState:r,rectToZoomFit:o,clearAllExpandStates:s,forRestoringSnapshotAfterTogglingFlattenLayers:l};this.workerService.worker.postMessage(c)}animateIntoPositions(t=n=>{this.updateAnimatinProgress(n)}){let n=Date.now(),r=()=>{let o=Date.now()-n,s=this.appService.testMode?1:Math.min(1,o/ihe);if(s=Math.sin(s*Math.PI/2),t(s),this.webglRendererThreejsService.render(),s>=1){t(s),this.webglRendererThreejsService.render();return}requestAnimationFrame(r)};r()}flash(){this.flashing=!0,this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.flashing=!1,this.changeDetectorRef.detectChanges()},300)}updateNodeBgColorWhenFar(){let t=this.webglRendererThreejsService.convertZFromSceneToScreen(30)*this.webglRendererThreejsService.curScale,n=7.5,o=Math.max(0,Math.min(1,(n-t)/(n-7)));Math.abs(o-this.savedUpdateNodeBgWhenFarProgress)<1e-5||(this.savedUpdateNodeBgWhenFarProgress=o,this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,o/3))}showIoTree(t,n,r){let o=this.createOverlay(t),s=o.attach(this.portal),a=cl(n,[],r);s.instance.solidBackground=!0,s.instance.rendererId=this.rendererId,s.instance.updateData(a),s.instance.onClose.subscribe(()=>{o.dispose()})}getNodeX(t){return(t.x||0)+(t.globalX||0)}getNodeY(t){return(t.y||0)+(t.globalY||0)}getNodeWidth(t){return t.width||0}getNodeHeight(t){return t.height||0}getNodeLabelRelativeY(t){return 14}getNodeLabelSizes(t){let n=Fo/this.texts.getFontSize(),r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=0,a=dd(this.getNodeLabel(t));for(let l=0;l{this.webglRendererThreejsService.zoomFit(s,1,200,!1,!1)};a?setTimeout(()=>{c()}):c()}else r!==lhe&&this.webglRendererThreejsService.zoomFitOnNode(r,n,o?0:TO);this.selectedNodeId!==r&&this.handleSelectNode(r||""),this.inPopup||this.uiStateService.setDeepestExpandedGroupNodeIds(l||[],this.appService.getPaneIndexById(this.paneId))}handleCurNodeDataProviderResultsChanged(){this.renderGraph(),this.updateNodesStyles(),this.webglRendererThreejsService.render()}handleLocateNodeDone(t,n,r,o,s,a,l=!1){this.updateCurModelGraph(n),this.updateNodesAndEdgesToRender(),a&&this.appService.selectNode(this.paneId,{nodeId:r,rendererId:t,isGroupNode:bt(this.curModelGraph.nodesById[r])}),this.webglRendererThreejsService.zoomFitOnNode(r,n,TO),l||(this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render(),this.inPopup||this.uiStateService.setDeepestExpandedGroupNodeIds(o,this.appService.getPaneIndexById(this.paneId))),s||setTimeout(()=>{this.shakeNode(r)},250)}sendExpandGroupNodeRequest(t){let n=this.curModelGraph.nodesById[t];n!=null&&!n.expanded&&this.sendExpandOrCollapseGroupNodeRequest(n,!1,!0)}sendExpandOrCollapseGroupNodeRequest(t,n=!1,r){this.showBusySpinnerWithDelay();let o={eventType:Ji.EXPAND_OR_COLLAPSE_GROUP_NODE_REQ,modelGraphId:this.curModelGraph.id,groupNodeId:t?.id,expand:r??!t?.expanded,showOnNodeItemTypes:this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,rendererId:this.rendererId,paneId:this.paneId,all:n,ts:Date.now()};this.workerService.worker.postMessage(o)}renderGraph(){this.clearScene(),this.renderEdges(),this.renderTexts(),this.curShowOnEdgeItemTypes[Fl.TENSOR_SHAPE]?.selected&&this.webglRendererEdgeTextsService.renderEdgeTexts(),this.webglRendererAttrsTableService.renderAttrsTable(),this.renderNodes(),this.webglRendererNdpService.renderNodeDataProviderDistributionBars(),this.renderArtificialGroupBorders(),this.webglRendererSearchResultsService.renderSearchResults(),this.webglRendererSubgraphSelectionService.renderSubgraphSelectedNodeMarkers(),this.updateNodeBgColorWhenFar(),this.animateIntoPositions()}renderNodes(){this.currentMinX=Number.POSITIVE_INFINITY,this.currentMinZ=Number.POSITIVE_INFINITY,this.currentMaxX=Number.NEGATIVE_INFINITY,this.currentMaxZ=Number.NEGATIVE_INFINITY;let t=this.nodesToRender.length,n=[],r=[],o=[],s=[],a=[],l=Fo/this.texts.getFontSize();for(let c=0;c0){if(this.appService.config()?.showOpNodeOutOfLayerEdgesWithoutSelecting){for(let{node:t}of this.nodesToRender)if(Et(t)&&t.nsParentId){let{overlayEdges:n,renderedEdges:r}=this.webglRendererIoHighlightService.getHighlightedIncomingNodesAndEdges(this.curHiddenInputOpNodeIds,t,{ignoreEdgesWithinSameNamespace:!0,reuseRenderedEdgeCurvePoints:!0});if(n.length>0){this.renderedEdgeIdsToHide.push(...r.map(a=>a.id));for(let a of n)this.edgesToRender.push({edge:a,index:92/Kt})}let{overlayEdges:o,renderedEdges:s}=this.webglRendererIoHighlightService.getHighlightedOutgoingNodesAndEdges(this.curHiddenOutputIds,t,{ignoreEdgesWithinSameNamespace:!0,reuseRenderedEdgeCurvePoints:!0});if(o.length>0){this.renderedEdgeIdsToHide.push(...s.map(a=>a.id));for(let a of o)this.edgesToRender.push({edge:a,index:92/Kt})}}}this.edges.generateMesh(this.edgesToRender,this.curModelGraph),this.webglRendererThreejsService.addToScene(this.edges.edgesMesh),this.webglRendererThreejsService.addToScene(this.edges.arrowHeadsMesh)}}renderTexts(){let t=[];for(let{node:n,index:r}of this.nodesToRender){let o=this.NODE_LABEL_COLOR;for(let a of this.curProcessedNodeStylerRules)if(Pm(n,a.queries,this.curModelGraph)){let l=cd(a,Hs.NODE_TEXT_COLOR);l!==""&&(o=new vn.Color(l));break}let s=dd(this.getNodeLabel(n));for(let a=0;a{this.hoveredNodeId=r,this.updateNodesStyles(),this.webglRendererThreejsService.render()}),this.groupNodeIconBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredGroupNodeIconId=r,this.nodeIdForHoveredGroupNodeIcon=o?.nodeId||"",this.updateNodesStyles(),this.handleHoveredGroupNodeIconChanged(o),this.webglRendererThreejsService.render()},!1),this.webglRendererIoHighlightService.ioPickerBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredIoPickerId=r,this.handleHoveredIoPickerChanged(o)}),this.subgraphIndicatorBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredSubgraphIndicatorId=r,this.handleHoveredSubgraphIndicatorChanged(o)})}handleHoveredIoPickerChanged(t){this.ioPickerTop=-1e3,this.ioPickerLeft=-1e3,this.ioPickerTooltip="";let n=this.hoveredIoPickerId.endsWith("input");if(this.hoveredIoPickerId!==""){let{x:r,y:o}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x-t.bound.width/2,t.bound.y-t.bound.height/2),{x:s,y:a}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x+t.bound.width/2,t.bound.y+t.bound.height/2);this.ioPickerTop=o,this.ioPickerLeft=r,this.ioPickerWidth=s-r,this.ioPickerHeight=a-o,this.ioPickerTooltip=`Click to reveal ${n?"input":"output"} node(s)`}this.changeDetectorRef.detectChanges()}handleHoveredSubgraphIndicatorChanged(t){if(this.subgraphIndicatorTop=-1e3,this.subgraphIndicatorLeft=-1e3,this.hoveredSubgraphIndicatorId!==""){let{x:n,y:r}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x-t.bound.width/2,t.bound.y-t.bound.height/2),{x:o,y:s}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x+t.bound.width/2,t.bound.y+t.bound.height/2);this.subgraphIndicatorTop=r,this.subgraphIndicatorLeft=n,this.subgraphIndicatorWidth=o-n,this.subgraphIndicatorHeight=s-r}this.changeDetectorRef.detectChanges()}updateNodesStyles(){let t=!1;this.selectedNodeId!==this.updateNodesStylesSavedSelectedNodeId&&(this.updateNodesStylesSavedSelectedNodeId=this.selectedNodeId,t=!0);let n=!1;this.webglRendererIoTracingService.curIoTracingData!==this.updateNodesStylesSavedIoTracingData&&(this.updateNodesStylesSavedIoTracingData=this.webglRendererIoTracingService.curIoTracingData,n=!0),this.nodeBodies.restoreBorderColors(),this.nodeBodies.restoreBgColors(),this.nodeBodies.restoreBorderWidths(),this.nodeBodies.restoreOpacities(),this.groupNodeIconBgs.restoreOpacities(),this.texts.restoreOpacities(),this.texts.restoreColors(),this.webglRendererEdgeTextsService.edgeTexts.restoreOpacities(),this.groupNodeIcons.restoreOpacities(),this.webglRendererAttrsTableService.attrsTableTexts.restoreOpacities(),(t||n)&&this.edges.restoreColors(),this.edges.restoreYOffsets();let r=this.curModelGraph.nodesById[this.selectedNodeId];if(r!=null&&bt(r)){let u=r.identicalGroupIndex;if(u!=null){let h=this.nodesToRender.filter(({node:p})=>bt(p)&&p.identicalGroupIndex===u).map(({node:p})=>p.id);this.nodeBodies.updateBgColor(h,this.IDENTICAL_GROUPS_BG_COLOR)}}let o=this.curModelGraph.nodesById[this.hoveredNodeId],s=bt(o)?this.HOVERED_GROUP_NODE_BORDER_COLOR:this.HOVERED_NODE_BORDER_COLOR;Et(o)&&o.style?.hoveredBorderColor&&(s=new vn.Color(o.style.hoveredBorderColor)),this.nodeBodies.updateBorderColor([this.hoveredNodeId],s),this.selectedNodeId&&r!=null&&(this.nodeBodies.updateBorderColor([this.selectedNodeId],this.SELECTED_NODE_BORDER_COLOR),this.nodeBodies.updateBorderWidth([this.selectedNodeId],nhe),this.nodeBodies.updateBgColor([this.selectedNodeId],this.SELECTED_NODE_BG_COLOR,Et(r))),this.groupNodeIconBgs.updateOpacity([this.hoveredGroupNodeIconId],.07);let a=Object.keys(this.webglRendererIoHighlightService.inputsByHighlightedNode);if(a.length>0){this.nodeBodies.updateBorderColor(a,new vn.Color(this.EDGE_COLOR_INCOMING.r,this.EDGE_COLOR_INCOMING.g,this.EDGE_COLOR_INCOMING.b));for(let u of a)this.nodeBodies.updateBorderWidth([u],FG)}let l=Object.keys(this.webglRendererIoHighlightService.outputsByHighlightedNode);if(l.length>0){this.nodeBodies.updateBorderColor(l,new vn.Color(this.EDGE_COLOR_OUTGOING.r,this.EDGE_COLOR_OUTGOING.g,this.EDGE_COLOR_OUTGOING.b));for(let u of l)this.nodeBodies.updateBorderWidth([u],FG)}let c=[...this.webglRendererIoHighlightService.inputsRenderedEdges,...this.webglRendererIoHighlightService.outputsRenderedEdges].map(u=>u.id);c.push(...this.renderedEdgeIdsToHide),this.edges.updateYOffsets(c,1e3);let d=this.webglRendererNdpService.curNodeDataProviderResults()||{};for(let u of Object.keys(d)){if(!this.isNodeRendered(u)||!Et(this.curModelGraph.nodesById[u]))continue;let h=d[u].bgColor;h&&h!=="transparent"&&this.nodeBodies.updateBgColor([u],new vn.Color(h));let p=d[u].textColor;p&&this.texts.updateColorInNode([u],new vn.Color(p))}if(this.webglRendererIoTracingService.curIoTracingData!=null){let u=Object.keys(this.curModelGraph.nodesById).filter(p=>!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p)&&this.isNodeRendered(p));this.nodeBodies.updateOpacity(u,.2),this.texts.updateOpacityInNode(u,.3),this.groupNodeIcons.updateOpacityInNode(u,.3),this.webglRendererAttrsTableService.attrsTableTexts.updateOpacityInNode(u,.3),this.webglRendererEdgeTextsService.edgeTexts.updateOpacityInNode(u,.3);let h=this.edgesToRender.filter(({edge:p})=>!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p.fromNodeId)||!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p.toNodeId)).map(({edge:p})=>p.id);this.edges.updateColors(h,{r:.92,g:.92,b:.92})}}shakeNode(t){if(this.appService.testMode)return;let n=Date.now(),r=()=>{let o=Date.now()-n,s=Math.min(1,o/1100);s=-(Math.cos(Math.PI*s)-1)/2;let a=Math.sin(s*Math.PI*9)*8;if(this.nodeBodies.updateAngle(t,a),this.webglRendererSearchResultsService.searchResultsHighlightBorders.updateAngle(t,a),this.webglRendererThreejsService.render(),s>=1){this.nodeBodies.updateAngle(t,0),this.webglRendererSearchResultsService.searchResultsHighlightBorders.updateAngle(t,0),this.webglRendererThreejsService.render();return}requestAnimationFrame(r)};r()}clearScene(){let t=[this.webglRendererSearchResultsService.searchResultsHighlightBorders.mesh,this.webglRendererSearchResultsService.searchResultsNodeLabelHighlightBg.mesh];this.webglRendererThreejsService.clearScene(t),this.updateNodesStylesSavedSelectedNodeId="",this.updateNodesStylesSavedIoTracingData=void 0}handleDownloadAsPng(t,n){return At(this,null,function*(){let r=this.container.nativeElement.offsetWidth/ld(),o=this.container.nativeElement.offsetHeight/ld(),s=this.webglRendererThreejsService.camera;if(t){let d=this.currentMaxX+20,u=this.currentMinX-20,h=this.currentMaxZ+20,p=this.currentMinZ-20;r=d-u,o=h-p;let f=ohe/ld();r>f&&(o=o*f/r,r=f),o>f&&(r=r*f/o,o=f),s=this.webglRendererThreejsService.createOrthographicCamera(u,d,-p,-h)}let a=this.pngDownloaderCanvas.nativeElement;this.webglRendererThreejsService.setupPngDownloaderRenderer(a,n,r,o),this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,0),this.webglRendererThreejsService.renderPngDownloader(s),this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,this.savedUpdateNodeBgWhenFarProgress/3);let l=document.createElement("a");l.download="model_explorer_graph.png",aa.setHref(l,a.toDataURL()),l.click(),this.webglRendererThreejsService.setSceneBackground(new vn.Color(16777215))})}openSubgraph(t){return At(this,null,function*(){this.appService.addSubgraphBreadcrumbItem(this.paneId,this.curModelGraph.id,t,yield this.webglRendererSnapshotService.takeSnapshot());let n=this.appService.getGraphById(t);n&&(this.appService.selectNode(this.paneId,void 0),this.appService.setFlattenLayersInCurrentPane(!1),this.appService.curInitialUiState.set(void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.selectGraphInCurrentPane(n))})}getGroupNodeLabelSeparatorId(t,n){return`${t}_${n}`}getGroupNodeBgColor(t){let r=(t.namespace||"").split("/").filter(s=>s!=="").length,o=this.GROUP_NODE_BG_COLORS[Math.min(this.GROUP_NODE_BG_COLORS.length-1,r)];return this.threeColorToRgb(o)}threeColorToRgb(t){return{r:t.r,g:t.g,b:t.b}}startBenchmark(){let t=()=>{this.webglRendererThreejsService.render(!0),requestAnimationFrame(t)};t()}handleShiftSelectNode(t){this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&this.subgraphSelectionService.toggleNode(t)}handleClearSubgraphSelectedNodes(){this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&this.subgraphSelectionService.clearSelection()}createOverlay(t){let n=new ui({positionStrategy:this.overlay.position().flexibleConnectedTo(t).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}]).withDefaultOffsetX(t.clientWidth).withViewportMargin(20),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",maxHeight:"400px",panelClass:"io-tree-popup-container"}),r=this.overlay.create(n);return this.portal=new Di(xc,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}showBusySpinnerWithDelay(){this.hideBusySpinner(),this.showBusySpinnerTimeoutRef=window.setTimeout(()=>{this.showBusySpinnerTimeoutRef<0||(this.snackBar.open("Processing. Please wait..."),this.showBusySpinner=!0,this.changeDetectorRef.detectChanges())},1e3)}hideBusySpinner(){this.showBusySpinnerTimeoutRef>=0&&(clearTimeout(this.showBusySpinnerTimeoutRef),this.showBusySpinnerTimeoutRef=-1),this.snackBar.dismiss(),this.showBusySpinner=!1,this.changeDetectorRef.detectChanges()}revealNode(t){let n=this.curModelGraph.nodesById[t];return n?(this.sendRelayoutGraphRequest(t,n.nsParentId?[n.nsParentId]:[]),!0):!1}updateCurModelGraph(t){let n=this.curModelGraph.edgesByGroupNodeIds;this.curModelGraph=wt(Z({},t),{edgesByGroupNodeIds:Z(Z({},n),t.edgesByGroupNodeIds)}),this.appService.updateCurrentModelGraph(this.paneId,this.curModelGraph)}updateNodesAndEdgesToRender(){if(!this.curModelGraph)return;this.elementsToRender=[],this.nodesToRender=[],this.nodesToRenderMap={},this.edgesToRender=[];let t=!0,n=!1,r=o=>{let s=this.curModelGraph.nodesById[o||""];if(t&&s){this.elementsToRender.push({type:PC.NODE,id:s.id,node:s});let l={node:s,index:this.elementsToRender.length-1};this.nodesToRender.push(l),this.nodesToRenderMap[l.node.id]=l,bt(s)&&s.sectionContainer&&(n=!0)}if(t=!1,o&&s&&s.expanded||!o)for(let l of this.curModelGraph.edgesByGroupNodeIds[o||""]||[])this.elementsToRender.push({type:PC.EDGE,id:l.id,edge:l}),this.edgesToRender.push({edge:l,index:this.elementsToRender.length-1});let a=[];o?s.expanded&&(a=(s.nsChildrenIds||[]).map(l=>this.curModelGraph.nodesById[l])):a=this.curModelGraph.rootNodes;for(let l of a){let c={type:PC.NODE,id:l.id,node:l};!n&&bt(l)&&l.sectionContainer&&(n=!0),this.elementsToRender.push(c);let d={node:l,index:this.elementsToRender.length-1};this.nodesToRender.push(d),this.nodesToRenderMap[d.node.id]=d,bt(l)&&l.expanded&&r(l.id)}};r(this.rootNodeId),this.appService.setPaneHasArtificialLayers(this.paneId,n)}getNodeLabel(t){return Et(t)?t.label==="Placeholder"?t.id:t.label:bt(t)?t.label:"-"}static \u0275fac=function(n){return new(n||i)(M(Fe),M(Ni),M(Le),M(Cr),M(la),M(Ht),M(yu),M(_c),M(Xo),M(zl),M(Yt),M(_C),M(vC),M(xC),M(yC),M(wC),M(CC),M(SC),M(MC),M(IC),M(TC),M(Ul))};static \u0275cmp=le({type:i,selectors:[["webgl-renderer"]],viewQuery:function(n,r){if(n&1&&(Ie(Vue,7),Ie(zue,7),Ie(Uue,7),Ie(Hue,7),Ie(Gue,7),Ie(jue,7),Ie(Wue,7),Ie($ue,5),Ie(que,5),Ie(Yue,7),Ie(Xue,7),Ie(Zue,7)),n&2){let o;be(o=ye())&&(r.container=o.first),be(o=ye())&&(r.canvas=o.first),be(o=ye())&&(r.snapshotCanvas=o.first),be(o=ye())&&(r.pngDownloaderCanvas=o.first),be(o=ye())&&(r.hoverToolbar=o.first),be(o=ye())&&(r.ioPicker=o.first),be(o=ye())&&(r.subgraphMenuTrigger=o.first),be(o=ye())&&(r.groupNodeIconMatTooltip=o.first),be(o=ye())&&(r.ioPickerMatTooltip=o.first),be(o=ye())&&(r.moreActionsMenuTrigger=o.first),be(o=ye())&&(r.rangeZoomDragArea=o.first),be(o=ye())&&(r.dragToSelectDragArea=o.first)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId",rootNodeId:"rootNodeId",inPopup:"inPopup",benchmark:"benchmark"},outputs:{openInPopupClicked:"openInPopupClicked"},standalone:!0,features:[Bt([_C,vC,xC,yC,wC,CC,SC,MC,IC,TC]),ce],decls:39,vars:59,consts:[["container",""],["canvas",""],["snapshotCanvas",""],["pngDownloaderCanvas",""],["groupNodeIconMatTooltip","matTooltip"],["moreActionsMenuTrigger","matMenuTrigger"],["moreActionsMenu","matMenu"],["ioPicker",""],["ioPickerMatTooltip","matTooltip"],["subgraphIndicator",""],["subgraphMenuTrigger","matMenuTrigger"],["menu","matMenu"],["rangeZoomDragArea",""],["dragToSelectDragArea",""],[1,"container",3,"mouseleave"],[1,"main",3,"mousedown","contextmenu"],[1,"snapshot"],[1,"download-png"],[1,"group-node-icon",3,"mouseenter","mouseleave","mousedown"],["matTooltipPosition","above",1,"group-node-icon-tooltip",3,"matTooltip","matTooltipShowDelay","matTooltipDisabled"],[1,"more-actions-menu-trigger",3,"matMenuTriggerFor"],[1,"model-explorer-menu-item-with-icon","expand-all",3,"click"],["class","model-explorer-menu-item-with-icon collapse-all",3,"click",4,"ngIf"],["class","model-explorer-menu-item-with-icon open-in-popup",3,"click",4,"ngIf"],[1,"io-picker",3,"mousedown","mouseenter","mouseleave"],["matTooltipPosition","above",1,"io-picker-tooltip",3,"matTooltip"],["matTooltip","Jump to subgraph","matTooltipPosition","above",1,"subgraph-indicator",3,"mousedown","click"],[1,"subgraph-indicator-menu-trigger",3,"matMenuTriggerFor"],[1,"model-explorer-menu-item-with-icon"],["bgColor","rgba(97, 175, 252, 0.2)","borderColor","#1976d2"],["bgColor","rgba(9, 184, 62, 0.2)","borderColor","#09b83e"],[1,"flash"],[1,"fps"],[1,"model-explorer-menu-item-with-icon","collapse-all",3,"click"],[1,"model-explorer-menu-item-with-icon","open-in-popup",3,"click"],[1,"model-explorer-menu-item-with-icon",3,"click"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",14,0),H("mouseleave",function(a){return V(o),z(r.handleMouseLeaveRenderer(a))}),v(2,"canvas",15,1),H("mousedown",function(a){return V(o),z(r.handleMouseDownCanvas(a))})("contextmenu",function(a){return V(o),z(a.preventDefault())}),y(),J(4,"canvas",16,2)(6,"canvas",17,3),v(8,"div",18),H("mouseenter",function(){return V(o),z(r.handleMouseEnterGroupNodeIcon())})("mouseleave",function(){return V(o),z(r.handleMouseLeaveGroupNodeIcon())})("mousedown",function(a){return V(o),z(r.handleClickGroupNodeIcon(a))}),y(),J(9,"div",19,4)(11,"div",20,5),v(13,"mat-menu",null,6)(15,"div",21),H("click",function(){return V(o),z(r.handleClickExpandAll(r.hoveredNodeIdWhenClickingMoreActions))}),v(16,"mat-icon"),S(17,"unfold_more_double"),y(),S(18," Expand layer & all sub-layers "),y(),W(19,Que,4,0,"div",22)(20,Kue,4,0,"div",23),y(),v(21,"div",24,7),H("mousedown",function(a){return V(o),z(r.handleClickIoPicker(a))})("mouseenter",function(){return V(o),z(r.handleMouseEnterIoPicker())})("mouseleave",function(){return V(o),z(r.handleMouseLeaveIoPicker())}),y(),J(23,"div",25,8),v(25,"div",26,9),H("mousedown",function(a){return V(o),z(a.stopPropagation())})("click",function(){return V(o),z(r.handleClickSubgraphIndicator())}),y(),J(27,"div",27,10),v(29,"mat-menu",null,11),ln(31,Jue,4,1,"div",28,Qr),y(),J(33,"drag-area",29,12)(35,"drag-area",30,13)(37,"div",31),W(38,ehe,2,1,"div",32),y()}if(n&2){let o=ve(14),s=ve(30);w(8),tn("top",r.groupNodeIcon.top,"px")("left",r.groupNodeIcon.left,"px")("width",r.groupNodeIcon.width,"px")("height",r.groupNodeIcon.height,"px"),w(),tn("top",r.groupNodeIcon.top,"px")("left",r.groupNodeIcon.left,"px")("width",r.groupNodeIcon.width,"px")("height",r.groupNodeIcon.height,"px"),N("matTooltip",r.groupNodeIcon.tooltip||"")("matTooltipShowDelay",200)("matTooltipDisabled",r.groupNodeIcon.tooltip==null),w(2),tn("top",r.groupNodeIcon.top+r.groupNodeIcon.height,"px")("left",r.groupNodeIcon.left,"px"),N("matMenuTriggerFor",o),w(8),N("ngIf",r.getShowCollapseAllButton(r.hoveredNodeIdWhenClickingMoreActions)),w(),N("ngIf",r.showOpenInPopupButton),w(),tn("top",r.ioPickerTop,"px")("left",r.ioPickerLeft,"px")("width",r.ioPickerWidth,"px")("height",r.ioPickerHeight,"px"),w(2),tn("top",r.ioPickerTop,"px")("left",r.ioPickerLeft,"px")("width",r.ioPickerWidth,"px")("height",r.ioPickerHeight,"px"),N("matTooltip",r.ioPickerTooltip),w(2),tn("top",r.subgraphIndicatorTop,"px")("left",r.subgraphIndicatorLeft,"px")("width",r.subgraphIndicatorWidth,"px")("height",r.subgraphIndicatorHeight,"px"),w(2),tn("top",r.subgraphIndicatorTop+r.subgraphIndicatorHeight,"px")("left",r.subgraphIndicatorLeft,"px"),N("matMenuTriggerFor",s),w(4),cn(r.curSubgraphIdsForMenu),w(6),se("flashing",r.flashing),w(),ae(r.benchmark?38:-1)}},dependencies:[Ae,Mn,lG,it,gt,sa,Jo,vc,Jt,Wn],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;position:relative}.container[_ngcontent-%COMP%] canvas.main[_ngcontent-%COMP%]{width:100%!important;height:100%!important;box-sizing:border-box}.container[_ngcontent-%COMP%] canvas.snapshot[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] canvas.download-png[_ngcontent-%COMP%]{position:absolute;left:0;bottom:0;width:400px;height:300px;border:1px solid red;box-sizing:border-box;background-color:#fff;display:none}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%]{position:absolute;width:50px;height:40px;box-sizing:border-box;display:flex;transition:opacity .15s;opacity:1;pointer-events:none}.container[_ngcontent-%COMP%] .hover-toolbar.hide[_ngcontent-%COMP%]{transition:none;opacity:0}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content-wrapper[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;pointer-events:all}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%]{font-size:12px;border:1px solid #ccc;background-color:#fafafae6;border-radius:99px;padding:0 8px;box-sizing:border-box;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;display:flex;align-items:center}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.8;width:24px;padding:4px 0}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1;background-color:#eee}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;font-weight:700;width:16px;height:16px;line-height:16px;color:#ea8600}.container[_ngcontent-%COMP%] .io-picker[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .group-node-icon[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .subgraph-indicator[_ngcontent-%COMP%]{position:absolute;box-sizing:border-box;display:flex;background-color:transparent}.container[_ngcontent-%COMP%] .group-node-icon[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .io-picker[_ngcontent-%COMP%]{z-index:100}.container[_ngcontent-%COMP%] .group-node-icon-tooltip[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .io-picker-tooltip[_ngcontent-%COMP%]{position:absolute;z-index:50}.container[_ngcontent-%COMP%] .subgraph-indicator-menu-trigger[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .more-actions-menu-trigger[_ngcontent-%COMP%]{position:absolute;visibility:hidden}.container[_ngcontent-%COMP%] .flash[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:5000;box-sizing:border-box;border:5px solid #1976d2;pointer-events:none;opacity:0}@keyframes _ngcontent-%COMP%_flashing{5%{opacity:1}to{opacity:0}}.container[_ngcontent-%COMP%] .flashing[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_flashing .3s ease-out}.container[_ngcontent-%COMP%] .fps[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;z-index:100;font-size:32px;border:1px solid #777;padding:8px;border-radius:4px;background-color:#fff} .multiline-tooltip{white-space:pre-line} .multiline-tooltip-left{white-space:pre-line} .multiline-tooltip-left>div{text-align:left} .model-explorer-menu-item-with-icon{font-family:Google Sans Text,Arial,Helvetica,sans-serif;display:flex;align-items:center;font-size:12px;padding:5px 8px;line-height:15px;letter-spacing:normal} .model-explorer-menu-item-with-icon mat-icon{font-size:16px;width:16px;height:16px;margin-right:4px;color:#999} .model-explorer-menu-item-with-icon:hover{background-color:#0000000a} @@ -3669,7 +3669,7 @@ void main() { -`],changeDetection:0})}return i})();function che(i,e){if(i&1){let t=ie();v(0,"button",10),H("click",function(){V(t);let r=I(2);return z(r.handleClickStart())}),S(1," Start "),y()}}function dhe(i,e){i&1&&(v(0,"div",9),S(1,"Generating graph. Please wait..."),y())}function uhe(i,e){if(i&1&&(v(0,"div",2)(1,"div",4)(2,"div",5),S(3,"Node count"),y(),J(4,"input",6),y(),v(5,"div",4)(6,"div",5),S(7,"Edge count"),y(),J(8,"input",6),y(),v(9,"div",4)(10,"div",5),S(11,"Colorize"),y(),J(12,"input",7),y(),W(13,che,2,0,"button",8)(14,dhe,2,0,"div",9),y()),i&2){let t=I();w(4),N("formControl",t.curNodeCount),w(4),N("formControl",t.curEdgeCount),w(4),N("formControl",t.curColorize),w(),ae(t.generating?14:13)}}function hhe(i,e){if(i&1&&J(0,"webgl-renderer",3),i&2){let t=I();N("modelGraph",t.modelGraph)("benchmark",!0)}}var phe=Nn,UG=(()=>{class i{changeDetectorRef;curNodeCount=new gr(1e4);curEdgeCount=new gr(5e3);curColorize=new gr(!1);generating=!1;modelGraph;constructor(t){this.changeDetectorRef=t}handleClickStart(){this.generating=!0,this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.genModelGraph()},100)}genModelGraph(){let t=this.curNodeCount.value,n=this.curEdgeCount.value,r=Math.max(500,Math.floor(Math.sqrt(t)*300)),o=[];for(let l=0;l{class i{changeDetectorRef;curNodeCount=new gr(1e4);curEdgeCount=new gr(5e3);curColorize=new gr(!1);generating=!1;modelGraph;constructor(t){this.changeDetectorRef=t}handleClickStart(){this.generating=!0,this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.genModelGraph()},100)}genModelGraph(){let t=this.curNodeCount.value,n=this.curEdgeCount.value,r=Math.max(500,Math.floor(Math.sqrt(t)*300)),o=[];for(let l=0;l{class i{extensionServerAddress=fhe;extensions={};loadExtensions(){return At(this,null,function*(){let t=(yield this.sendGetRequest("api_list_extensions"))||[];t.sort((n,r)=>n.name.localeCompare(r.name));for(let n of t)this.extensions[n.id]=n;return t})}sendCommandToExtension(t){return At(this,null,function*(){return yield this.sendGetRequest("api_cmd",t)})}updateExtensionServerAddress(t){this.extensionServerAddress=t}sendGetRequest(t,n){return At(this,null,function*(){let r=`${this.extensionServerAddress}/${t}`;n&&(r=`${r}?cmd=${encodeURIComponent(JSON.stringify(n))}`);try{let o=yield fetch(r,{credentials:"include"});return o.ok?yield o.json():void 0}catch(o){console.warn(o);return}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var GG=function(i){return i.RefreshPage="refreshPage",i}(GG||{}),OC=(()=>{class i{init(){new EventSource("/apistream/server_director").addEventListener("message",n=>{if(!n.data)return;let r=JSON.parse(n.data);switch(r.name){case GG.RefreshPage:lC.setHref(window.location,r.url);break;default:break}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var ghe=["determinateSpinner"];function _he(i,e){if(i&1&&(io(),v(0,"svg",11),J(1,"circle",12),y()),i&2){let t=I();Ze("viewBox",t._viewBox()),w(),tn("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Ze("r",t._circleRadius())}}var vhe=new ge("mat-progress-spinner-default-options",{providedIn:"root",factory:bhe});function bhe(){return{diameter:jG}}var jG=100,yhe=10,ca=(()=>{let e=class e{get color(){return this._color||this._defaultColor}set color(n){this._color=n}constructor(n,r,o){this._elementRef=n,this._defaultColor="primary",this._value=0,this._diameter=jG,this._noopAnimations=r==="NoopAnimations"&&!!o&&!o._forceAnimations,this.mode=n.nativeElement.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",o&&(o.color&&(this.color=this._defaultColor=o.color),o.diameter&&(this.diameter=o.diameter),o.strokeWidth&&(this.strokeWidth=o.strokeWidth))}get value(){return this.mode==="determinate"?this._value:0}set value(n){this._value=Math.max(0,Math.min(100,n||0))}get diameter(){return this._diameter}set diameter(n){this._diameter=n||0}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(n){this._strokeWidth=n||0}_circleRadius(){return(this.diameter-yhe)/2}_viewBox(){let n=this._circleRadius()*2+this.strokeWidth;return`0 0 ${n} ${n}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Zn,8),M(vhe))},e.\u0275cmp=le({type:e,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(r,o){if(r&1&&Ie(ghe,5),r&2){let s;be(s=ye())&&(o._determinateCircle=s.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(r,o){r&2&&(Ze("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",o.mode==="determinate"?o.value:null)("mode",o.mode),Nr("mat-"+o.color),tn("width",o.diameter,"px")("height",o.diameter,"px")("--mdc-circular-progress-size",o.diameter+"px")("--mdc-circular-progress-active-indicator-width",o.diameter+"px"),se("_mat-animation-noopable",o._noopAnimations)("mdc-circular-progress--indeterminate",o.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",wi],diameter:[2,"diameter","diameter",wi],strokeWidth:[2,"strokeWidth","strokeWidth",wi]},exportAs:["matProgressSpinner"],standalone:!0,features:[an,ce],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(r,o){if(r&1&&(W(0,_he,2,8,"ng-template",null,0,kt),v(2,"div",2,1),io(),v(4,"svg",3),J(5,"circle",4),y()(),F0(),v(6,"div",5)(7,"div",6)(8,"div",7),Zi(9,8),y(),v(10,"div",9),Zi(11,8),y(),v(12,"div",10),Zi(13,8),y()()()),r&2){let s=ve(1);w(4),Ze("viewBox",o._viewBox()),w(),tn("stroke-dasharray",o._strokeCircumference(),"px")("stroke-dashoffset",o._strokeDashOffset(),"px")("stroke-width",o._circleStrokeWidth(),"%"),Ze("r",o._circleRadius()),w(4),N("ngTemplateOutlet",s),w(2),N("ngTemplateOutlet",s),w(2),N("ngTemplateOutlet",s)}},dependencies:[Bs],styles:[".mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color)}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}"],encapsulation:2,changeDetection:0});let i=e;return i})();var ns=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[Ae,qt]});let i=e;return i})();function xhe(i,e){i&1&&(v(0,"tr")(1,"td"),J(2,"div",9),y(),v(3,"td")(4,"div",2),S(5,"Artificial layer to reduce layout load"),y()()())}function whe(i,e){if(i&1&&(v(0,"tr")(1,"td"),J(2,"div",10),y(),v(3,"td")(4,"div",2),S(5),y()()()),i&2){let t=I();w(2),se("group",t.isSelectedNodeGroup),w(3),Me(" Selected ",t.isSelectedNodeGroup?"layer":"op"," ")}}function Che(i,e){i&1&&(v(0,"tr")(1,"td"),J(2,"div",11),y(),v(3,"td")(4,"div",2),S(5,"Identical layer (if any)"),y()()())}function She(i,e){i&1&&(oo(0),v(1,"tr")(2,"td"),J(3,"div",12),y(),v(4,"td")(5,"div",2),S(6,"Inputs (if any)"),y()()(),v(7,"tr")(8,"td"),J(9,"div",13),y(),v(10,"td")(11,"div",2),S(12,"Outputs (if any)"),y()()(),so())}var WG=(()=>{class i{appService;changeDetectorRef;paneId;showSelectedNodeKey=!1;isSelectedNodeGroup=!1;hasArtificialLayers=!1;constructor(t,n){this.appService=t,this.changeDetectorRef=n,mt(()=>{let r=this.appService.getPaneById(this.paneId);if(!r)return;this.hasArtificialLayers=r.hasArtificialLayers===!0;let o=r.selectedNodeInfo;if(!o){this.showSelectedNodeKey=!1,this.changeDetectorRef.markForCheck();return}this.showSelectedNodeKey=o.nodeId!=="",this.isSelectedNodeGroup=o.isGroupNode,this.changeDetectorRef.markForCheck()})}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["legends-panel"]],inputs:{paneId:"paneId"},standalone:!0,features:[ce],decls:35,vars:4,consts:[[1,"container"],[1,"key","op-node-key"],[1,"label"],[1,"key","group-node-key"],[4,"ngIf"],["colspan","2"],[1,"divider"],[1,"key","shortcut"],[1,"label","shortcut"],[1,"key","artificial-layer-key"],[1,"key","selected-node-key"],[1,"key","identical-group-key"],[1,"key","input-key"],[1,"key","output-key"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"table")(2,"tr")(3,"td"),J(4,"div",1),y(),v(5,"td")(6,"div",2),S(7,"Op"),y()()(),v(8,"tr")(9,"td"),J(10,"div",3),y(),v(11,"td")(12,"div",2),S(13,"Layer"),y()()(),W(14,xhe,6,0,"tr",4)(15,whe,6,3,"tr",4)(16,Che,6,0,"tr",4)(17,She,13,0,"ng-container",4),v(18,"tr")(19,"td",5),J(20,"div",6),y()(),v(21,"tr")(22,"td")(23,"div",7),S(24,"Zoom"),y()(),v(25,"td")(26,"div",8),S(27,"Ctrl+Scroll"),y()()(),v(28,"tr")(29,"td")(30,"div",7),S(31,"Pan"),y()(),v(32,"td")(33,"div",8),S(34,"Drag or scroll"),y()()()()()),n&2&&(w(14),N("ngIf",r.hasArtificialLayers),w(),N("ngIf",r.showSelectedNodeKey),w(),N("ngIf",r.showSelectedNodeKey&&r.isSelectedNodeGroup),w(),N("ngIf",r.showSelectedNodeKey&&!r.isSelectedNodeGroup))},dependencies:[Ae,Mn,it],styles:[`.container[_ngcontent-%COMP%]{height:fit-content;background-color:#ffffffe6;padding:8px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;padding:0;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .key[_ngcontent-%COMP%]{margin-right:4px;box-sizing:border-box}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .op-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:1px solid #666;background-color:#fff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .group-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border:1px solid #777;border-radius:5px;background-color:#eaeaf2}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .artificial-layer-key[_ngcontent-%COMP%]{border:1px solid #800080;width:30px;height:14px;background-color:#f1f1f1}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border:2px solid #1a73e8;border-radius:5px;background-color:#c2e7ff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .identical-group-key[_ngcontent-%COMP%]{width:30px;height:14px;border:1px solid #777;background-color:#e2edff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .input-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:2px solid #009e73}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .output-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:2px solid #d55e00}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .shortcut[_ngcontent-%COMP%]{color:#777;font-size:10px;line-height:10px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{height:1px;border-top:1px solid #ccc;margin:8px 0 4px} +`],changeDetection:0})}return i})();var fhe="http://localhost:5000",UG=(()=>{class i{extensionServerAddress=fhe;extensions={};loadExtensions(){return At(this,null,function*(){let t=(yield this.sendGetRequest("api_list_extensions"))||[];t.sort((n,r)=>n.name.localeCompare(r.name));for(let n of t)this.extensions[n.id]=n;return t})}sendCommandToExtension(t){return At(this,null,function*(){return yield this.sendGetRequest("api_cmd",t)})}updateExtensionServerAddress(t){this.extensionServerAddress=t}sendGetRequest(t,n){return At(this,null,function*(){let r=`${this.extensionServerAddress}/${t}`;n&&(r=`${r}?cmd=${encodeURIComponent(JSON.stringify(n))}`);try{let o=yield fetch(r,{credentials:"include"});return o.ok?yield o.json():void 0}catch(o){console.warn(o);return}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var mhe=["determinateSpinner"];function ghe(i,e){if(i&1&&(io(),v(0,"svg",11),J(1,"circle",12),y()),i&2){let t=I();Ze("viewBox",t._viewBox()),w(),tn("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Ze("r",t._circleRadius())}}var _he=new ge("mat-progress-spinner-default-options",{providedIn:"root",factory:vhe});function vhe(){return{diameter:HG}}var HG=100,bhe=10,ca=(()=>{let e=class e{get color(){return this._color||this._defaultColor}set color(n){this._color=n}constructor(n,r,o){this._elementRef=n,this._defaultColor="primary",this._value=0,this._diameter=HG,this._noopAnimations=r==="NoopAnimations"&&!!o&&!o._forceAnimations,this.mode=n.nativeElement.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",o&&(o.color&&(this.color=this._defaultColor=o.color),o.diameter&&(this.diameter=o.diameter),o.strokeWidth&&(this.strokeWidth=o.strokeWidth))}get value(){return this.mode==="determinate"?this._value:0}set value(n){this._value=Math.max(0,Math.min(100,n||0))}get diameter(){return this._diameter}set diameter(n){this._diameter=n||0}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(n){this._strokeWidth=n||0}_circleRadius(){return(this.diameter-bhe)/2}_viewBox(){let n=this._circleRadius()*2+this.strokeWidth;return`0 0 ${n} ${n}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Zn,8),M(_he))},e.\u0275cmp=le({type:e,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(r,o){if(r&1&&Ie(mhe,5),r&2){let s;be(s=ye())&&(o._determinateCircle=s.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(r,o){r&2&&(Ze("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",o.mode==="determinate"?o.value:null)("mode",o.mode),Nr("mat-"+o.color),tn("width",o.diameter,"px")("height",o.diameter,"px")("--mdc-circular-progress-size",o.diameter+"px")("--mdc-circular-progress-active-indicator-width",o.diameter+"px"),se("_mat-animation-noopable",o._noopAnimations)("mdc-circular-progress--indeterminate",o.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",wi],diameter:[2,"diameter","diameter",wi],strokeWidth:[2,"strokeWidth","strokeWidth",wi]},exportAs:["matProgressSpinner"],standalone:!0,features:[an,ce],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(r,o){if(r&1&&(W(0,ghe,2,8,"ng-template",null,0,kt),v(2,"div",2,1),io(),v(4,"svg",3),J(5,"circle",4),y()(),B0(),v(6,"div",5)(7,"div",6)(8,"div",7),Zi(9,8),y(),v(10,"div",9),Zi(11,8),y(),v(12,"div",10),Zi(13,8),y()()()),r&2){let s=ve(1);w(4),Ze("viewBox",o._viewBox()),w(),tn("stroke-dasharray",o._strokeCircumference(),"px")("stroke-dashoffset",o._strokeDashOffset(),"px")("stroke-width",o._circleStrokeWidth(),"%"),Ze("r",o._circleRadius()),w(4),N("ngTemplateOutlet",s),w(2),N("ngTemplateOutlet",s),w(2),N("ngTemplateOutlet",s)}},dependencies:[Bs],styles:[".mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color)}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}"],encapsulation:2,changeDetection:0});let i=e;return i})();var ns=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[Ae,qt]});let i=e;return i})();function yhe(i,e){i&1&&(v(0,"tr")(1,"td"),J(2,"div",9),y(),v(3,"td")(4,"div",2),S(5,"Artificial layer to reduce layout load"),y()()())}function xhe(i,e){if(i&1&&(v(0,"tr")(1,"td"),J(2,"div",10),y(),v(3,"td")(4,"div",2),S(5),y()()()),i&2){let t=I();w(2),se("group",t.isSelectedNodeGroup),w(3),Me(" Selected ",t.isSelectedNodeGroup?"layer":"op"," ")}}function whe(i,e){i&1&&(v(0,"tr")(1,"td"),J(2,"div",11),y(),v(3,"td")(4,"div",2),S(5,"Identical layer (if any)"),y()()())}function Che(i,e){i&1&&(oo(0),v(1,"tr")(2,"td"),J(3,"div",12),y(),v(4,"td")(5,"div",2),S(6,"Inputs (if any)"),y()()(),v(7,"tr")(8,"td"),J(9,"div",13),y(),v(10,"td")(11,"div",2),S(12,"Outputs (if any)"),y()()(),so())}var GG=(()=>{class i{appService;changeDetectorRef;paneId;showSelectedNodeKey=!1;isSelectedNodeGroup=!1;hasArtificialLayers=!1;constructor(t,n){this.appService=t,this.changeDetectorRef=n,mt(()=>{let r=this.appService.getPaneById(this.paneId);if(!r)return;this.hasArtificialLayers=r.hasArtificialLayers===!0;let o=r.selectedNodeInfo;if(!o){this.showSelectedNodeKey=!1,this.changeDetectorRef.markForCheck();return}this.showSelectedNodeKey=o.nodeId!=="",this.isSelectedNodeGroup=o.isGroupNode,this.changeDetectorRef.markForCheck()})}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["legends-panel"]],inputs:{paneId:"paneId"},standalone:!0,features:[ce],decls:35,vars:4,consts:[[1,"container"],[1,"key","op-node-key"],[1,"label"],[1,"key","group-node-key"],[4,"ngIf"],["colspan","2"],[1,"divider"],[1,"key","shortcut"],[1,"label","shortcut"],[1,"key","artificial-layer-key"],[1,"key","selected-node-key"],[1,"key","identical-group-key"],[1,"key","input-key"],[1,"key","output-key"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"table")(2,"tr")(3,"td"),J(4,"div",1),y(),v(5,"td")(6,"div",2),S(7,"Op"),y()()(),v(8,"tr")(9,"td"),J(10,"div",3),y(),v(11,"td")(12,"div",2),S(13,"Layer"),y()()(),W(14,yhe,6,0,"tr",4)(15,xhe,6,3,"tr",4)(16,whe,6,0,"tr",4)(17,Che,13,0,"ng-container",4),v(18,"tr")(19,"td",5),J(20,"div",6),y()(),v(21,"tr")(22,"td")(23,"div",7),S(24,"Zoom"),y()(),v(25,"td")(26,"div",8),S(27,"Ctrl+Scroll"),y()()(),v(28,"tr")(29,"td")(30,"div",7),S(31,"Pan"),y()(),v(32,"td")(33,"div",8),S(34,"Drag or scroll"),y()()()()()),n&2&&(w(14),N("ngIf",r.hasArtificialLayers),w(),N("ngIf",r.showSelectedNodeKey),w(),N("ngIf",r.showSelectedNodeKey&&r.isSelectedNodeGroup),w(),N("ngIf",r.showSelectedNodeKey&&!r.isSelectedNodeGroup))},dependencies:[Ae,Mn,it],styles:[`.container[_ngcontent-%COMP%]{height:fit-content;background-color:#ffffffe6;padding:8px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;padding:0;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .key[_ngcontent-%COMP%]{margin-right:4px;box-sizing:border-box}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .op-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:1px solid #666;background-color:#fff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .group-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border:1px solid #777;border-radius:5px;background-color:#eaeaf2}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .artificial-layer-key[_ngcontent-%COMP%]{border:1px solid #800080;width:30px;height:14px;background-color:#f1f1f1}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border:2px solid #1a73e8;border-radius:5px;background-color:#c2e7ff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .identical-group-key[_ngcontent-%COMP%]{width:30px;height:14px;border:1px solid #777;background-color:#e2edff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .input-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:2px solid #009e73}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .output-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:2px solid #d55e00}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .shortcut[_ngcontent-%COMP%]{color:#777;font-size:10px;line-height:10px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{height:1px;border-top:1px solid #ccc;margin:8px 0 4px} @@ -3705,10 +3705,10 @@ void main() { -`],changeDetection:0})}return i})();var $G=48,qG=48,RC=class{rootEle;constructor(e){this.rootEle=e}drag(e){let t=e.clientX,n=e.clientY,r=e.offsetX,o=Number(this.rootEle.style.top.replace("px","")),s=Number(this.rootEle.style.left.replace("px","")),a=Number(this.rootEle.style.width.replace("px","")),l=Number(this.rootEle.style.height.replace("px","")),c=yn(document,"mousemove"),d=yn(window,"mouseup"),u=e.target.dataset.position,h=this.rootEle.parentElement.offsetHeight,p=this.rootEle.parentElement.offsetWidth;qr([c]).pipe(Xe(d)).subscribe({next:([f])=>{f.preventDefault();let m=f.clientX-t,b=f.clientY-n;if(!(m===0&&b===0))if(u==null)this.rootEle.style.top=`${Math.min(h-28,Math.max(o+b,0))}px`,this.rootEle.style.left=`${Math.min(p-r,Math.max(-r,s+m))}px`;else{if(u.includes("right")&&(this.rootEle.style.width=`${Math.max($G,a+m)}px`),u.includes("bottom")&&(this.rootEle.style.height=`${Math.max(qG,l+b)}px`),u.includes("left")){let g=Math.max($G,a-m);this.rootEle.style.width=`${g}px`,this.rootEle.style.left=`${s+(a-g)}px`}if(u.includes("top")){let g=Math.max(qG,l-b);this.rootEle.style.height=`${g}px`,this.rootEle.style.top=`${o+(l-g)}px`}}},complete:()=>{}})}};var wc=(()=>{class i extends fC{constructor(t,n,r,o,s,a,l){super(t,n,r,o,s,a,l),this.attachMouseEventListeners(r.nativeElement)}ngOnInit(){super.ngOnInit(),this.listenForOpenEvents()}listenForOpenEvents(){this.openStatusChange.pipe(Xe(this.destroyed)).subscribe(t=>{t?this.openDialog():this.closeDialog()})}attachMouseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"click").pipe(Xe(this.destroyed)).subscribe(n=>{n.target.closest("[bubbleClose]")?this.closingDialog():this.openingDialog()}),this.overlayRef?.backdropClick().pipe(Xe(this.destroyed)).subscribe(()=>{this.closingDialog()})})}attachKeyboardCloseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"keyup").pipe(Xe(this.destroyed)).subscribe(n=>{let r=n.keyCode,o=n.target;switch(r){case 27:this.closingDialog();return;case 32:o.closest("[bubbleClose]")&&this.closingDialog();return;default:return}}),yn(t,"keydown").pipe(Xe(this.destroyed)).subscribe(n=>{let r=n.keyCode,o=n.target;switch(r){case 13:o.closest("[bubbleClose]")&&this.closingDialog();return;default:return}})})}openingDialog(){this.disabled||this.openStatusChange.next(!0)}closingDialog(){this.openStatusChange.next(!1)}createOverlayConfig(t){return new ui(wt(Z({},this.overlayDimensions),{positionStrategy:super.createPositionStrategy(t),scrollStrategy:this.createScrollStrategy(),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",panelClass:this.panelClassInternal}))}static \u0275fac=function(n){return new(n||i)(M(Le),M(Ht),M(Re),M(Yt),M(Ye),M(kh),M(bt))};static \u0275dir=ze({type:i,selectors:[["","bubbleClick",""]],hostAttrs:[1,"bubble-click"],inputs:{dialog:[0,"bubbleClick","dialog"],disabled:[0,"bubbleDisabled","disabled"]},exportAs:["bubbleClick"],standalone:!0,features:[nn]})}return i})();var Ehe=["input"],Ihe=["label"],The=["*"],Dhe=new ge("mat-checkbox-default-options",{providedIn:"root",factory:XG});function XG(){return{color:"accent",clickAction:"check-indeterminate"}}var Mr=function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i}(Mr||{}),Phe={provide:La,useExisting:Yr(()=>AC),multi:!0},OO=class{},Ohe=0,YG=XG(),AC=(()=>{let e=class e{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(n){let r=new OO;return r.source=this,r.checked=n,r}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(n,r,o,s,a,l){this._elementRef=n,this._changeDetectorRef=r,this._ngZone=o,this._animationMode=a,this._options=l,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new Pe,this.indeterminateChange=new Pe,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=Mr.Init,this._controlValueAccessorChangeFn=()=>{},this._validatorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||YG,this.color=this._options.color||YG.color,this.tabIndex=parseInt(s)||0,this.id=this._uniqueId=`mat-mdc-checkbox-${++Ohe}`}ngOnChanges(n){n.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(n){n!=this.checked&&(this._checked=n,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(n){n!==this.disabled&&(this._disabled=n,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(n){let r=n!=this._indeterminate;this._indeterminate=n,r&&(this._indeterminate?this._transitionCheckState(Mr.Indeterminate):this._transitionCheckState(this.checked?Mr.Checked:Mr.Unchecked),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(n){this.checked=!!n}registerOnChange(n){this._controlValueAccessorChangeFn=n}registerOnTouched(n){this._onTouched=n}setDisabledState(n){this.disabled=n}validate(n){return this.required&&n.value!==!0?{required:!0}:null}registerOnValidatorChange(n){this._validatorChangeFn=n}_transitionCheckState(n){let r=this._currentCheckState,o=this._getAnimationTargetElement();if(!(r===n||!o)&&(this._currentAnimationClass&&o.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(r,n),this._currentCheckState=n,this._currentAnimationClass.length>0)){o.classList.add(this._currentAnimationClass);let s=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{o.classList.remove(s)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let n=this._options?.clickAction;!this.disabled&&n!=="noop"?(this.indeterminate&&n!=="check"&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?Mr.Checked:Mr.Unchecked),this._emitChangeEvent()):!this.disabled&&n==="noop"&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(n){n.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(n,r){if(this._animationMode==="NoopAnimations")return"";switch(n){case Mr.Init:if(r===Mr.Checked)return this._animationClasses.uncheckedToChecked;if(r==Mr.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case Mr.Unchecked:return r===Mr.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case Mr.Checked:return r===Mr.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case Mr.Indeterminate:return r===Mr.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(n){let r=this._inputElement;r&&(r.nativeElement.indeterminate=n)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(n){n.target&&this._labelElement.nativeElement.contains(n.target)&&n.stopPropagation()}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Fe),M(Le),ro("tabindex"),M(Zn,8),M(Dhe,8))},e.\u0275cmp=le({type:e,selectors:[["mat-checkbox"]],viewQuery:function(r,o){if(r&1&&(Ie(Ehe,5),Ie(Ihe,5),Ie(za,5)),r&2){let s;be(s=ye())&&(o._inputElement=s.first),be(s=ye())&&(o._labelElement=s.first),be(s=ye())&&(o.ripple=s.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:14,hostBindings:function(r,o){r&2&&(No("id",o.id),Ze("tabindex",null)("aria-label",null)("aria-labelledby",null),Nr(o.color?"mat-"+o.color:"mat-accent"),se("_mat-animation-noopable",o._animationMode==="NoopAnimations")("mdc-checkbox--disabled",o.disabled)("mat-mdc-checkbox-disabled",o.disabled)("mat-mdc-checkbox-checked",o.checked))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],id:"id",required:[2,"required","required",at],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",at],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?void 0:wi(n)],color:"color",checked:[2,"checked","checked",at],disabled:[2,"disabled","disabled",at],indeterminate:[2,"indeterminate","indeterminate",at]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],standalone:!0,features:[Bt([Phe,{provide:pd,useExisting:e,multi:!0}]),an,dn,ce],ngContentSelectors:The,decls:15,vars:19,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(r,o){if(r&1){let s=ie();kn(),v(0,"div",3),H("click",function(l){return V(s),z(o._preventBubblingFromLabel(l))}),v(1,"div",4,0)(3,"div",5),H("click",function(){return V(s),z(o._onTouchTargetClick())}),y(),v(4,"input",6,1),H("blur",function(){return V(s),z(o._onBlur())})("click",function(){return V(s),z(o._onInputClick())})("change",function(l){return V(s),z(o._onInteractionEvent(l))}),y(),J(6,"div",7),v(7,"div",8),io(),v(8,"svg",9),J(9,"path",10),y(),F0(),J(10,"div",11),y(),J(11,"div",12),y(),v(12,"label",13,2),$t(14),y()()}if(r&2){let s=ve(2);N("labelPosition",o.labelPosition),w(4),se("mdc-checkbox--selected",o.checked),N("checked",o.checked)("indeterminate",o.indeterminate)("disabled",o.disabled)("id",o.inputId)("required",o.required)("tabIndex",o.disabled?-1:o.tabIndex),Ze("aria-label",o.ariaLabel||null)("aria-labelledby",o.ariaLabelledby)("aria-describedby",o.ariaDescribedby)("aria-checked",o.indeterminate?"mixed":null)("name",o.name)("value",o.value),w(7),N("matRippleTrigger",s)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),w(),N("for",o.inputId)}},dependencies:[za,Dy],styles:['.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-unselected-icon-color);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color)}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color);border-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color)}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color);background-color:var(--mdc-checkbox-selected-focus-icon-color)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox--disabled .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-selected-checkmark-color)}.cdk-high-contrast-active .mdc-checkbox__mixedmark{margin:0 1px}.mdc-checkbox--disabled .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *,.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color);font-family:var(--mat-checkbox-label-text-font);line-height:var(--mat-checkbox-label-text-line-height);font-size:var(--mat-checkbox-label-text-size);letter-spacing:var(--mat-checkbox-label-text-tracking);font-weight:var(--mat-checkbox-label-text-weight)}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color)}.mat-mdc-checkbox label:empty{display:none}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let i=e;return i})();var NC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[AC,qt,qt]});let i=e;return i})();var RO=class{constructor(e){this._box=e,this._destroyed=new me,this._resizeSubject=new me,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(e){return this._elementObservables.has(e)||this._elementObservables.set(e,new Mt(t=>{let n=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(e,{box:this._box}),()=>{this._resizeObserver?.unobserve(e),n.unsubscribe(),this._elementObservables.delete(e)}}).pipe(Gt(t=>t.some(n=>n.target===e)),Uv({bufferSize:1,refCount:!0}),Xe(this._destroyed))),this._elementObservables.get(e)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},ZG=(()=>{let e=class e{constructor(){this._observers=new Map,this._ngZone=te(Le),typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,n]of this._observers)n.destroy();this._observers.clear(),typeof ResizeObserver<"u"}observe(n,r){let o=r?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new RO(o)),this._observers.get(o).observe(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Ahe=["notch"],Nhe=["matFormFieldNotchedOutline",""],khe=["*"],Lhe=["textField"],Fhe=["iconPrefixContainer"],Bhe=["textPrefixContainer"],Vhe=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],zhe=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function Uhe(i,e){i&1&&J(0,"span",19)}function Hhe(i,e){if(i&1&&(v(0,"label",18),$t(1,1),W(2,Uhe,1,0,"span",19),y()),i&2){let t=I(2);N("floating",t._shouldLabelFloat())("monitorResize",t._hasOutline())("id",t._labelId),Ze("for",t._control.disableAutomaticLabeling?null:t._control.id),w(2),ae(!t.hideRequiredMarker&&t._control.required?2:-1)}}function Ghe(i,e){if(i&1&&W(0,Hhe,3,5,"label",18),i&2){let t=I();ae(t._hasFloatingLabel()?0:-1)}}function jhe(i,e){i&1&&J(0,"div",5)}function Whe(i,e){}function $he(i,e){if(i&1&&W(0,Whe,0,0,"ng-template",11),i&2){I(2);let t=ve(1);N("ngTemplateOutlet",t)}}function qhe(i,e){if(i&1&&(v(0,"div",7),W(1,$he,1,1,null,11),y()),i&2){let t=I();N("matFormFieldNotchedOutlineOpen",t._shouldLabelFloat()),w(),ae(t._forceDisplayInfixLabel()?-1:1)}}function Yhe(i,e){i&1&&(v(0,"div",8,2),$t(2,2),y())}function Xhe(i,e){i&1&&(v(0,"div",9,3),$t(2,3),y())}function Zhe(i,e){}function Qhe(i,e){if(i&1&&W(0,Zhe,0,0,"ng-template",11),i&2){I();let t=ve(1);N("ngTemplateOutlet",t)}}function Khe(i,e){i&1&&(v(0,"div",12),$t(1,4),y())}function Jhe(i,e){i&1&&(v(0,"div",13),$t(1,5),y())}function epe(i,e){i&1&&J(0,"div",14)}function tpe(i,e){if(i&1&&(v(0,"div",16),$t(1,6),y()),i&2){let t=I();N("@transitionMessages",t._subscriptAnimationState)}}function npe(i,e){if(i&1&&(v(0,"mat-hint",20),S(1),y()),i&2){let t=I(2);N("id",t._hintLabelId),w(),nt(t.hintLabel)}}function ipe(i,e){if(i&1&&(v(0,"div",17),W(1,npe,2,2,"mat-hint",20),$t(2,7),J(3,"div",21),$t(4,8),y()),i&2){let t=I();N("@transitionMessages",t._subscriptAnimationState),w(),ae(t.hintLabel?1:-1)}}var LC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["mat-label"]],standalone:!0});let i=e;return i})();var rpe=new ge("MatError");var ope=0,QG=(()=>{let e=class e{constructor(){this.align="start",this.id=`mat-mdc-hint-${ope++}`}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(r,o){r&2&&(No("id",o.id),Ze("align",null),se("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"},standalone:!0});let i=e;return i})(),spe=new ge("MatPrefix");var ape=new ge("MatSuffix");var oj=new ge("FloatingLabelParent"),KG=(()=>{let e=class e{get floating(){return this._floating}set floating(n){this._floating=n,this.monitorResize&&this._handleResize()}get monitorResize(){return this._monitorResize}set monitorResize(n){this._monitorResize=n,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}constructor(n){this._elementRef=n,this._floating=!1,this._monitorResize=!1,this._resizeObserver=te(ZG),this._ngZone=te(Le),this._parent=te(oj),this._resizeSubscription=new Ct}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return lpe(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}};e.\u0275fac=function(r){return new(r||e)(M(Re))},e.\u0275dir=ze({type:e,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(r,o){r&2&&se("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"},standalone:!0});let i=e;return i})();function lpe(i){let e=i;if(e.offsetParent!==null)return e.scrollWidth;let t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);let n=t.scrollWidth;return t.remove(),n}var JG="mdc-line-ripple--active",kC="mdc-line-ripple--deactivating",ej=(()=>{let e=class e{constructor(n,r){this._elementRef=n,this._handleTransitionEnd=o=>{let s=this._elementRef.nativeElement.classList,a=s.contains(kC);o.propertyName==="opacity"&&a&&s.remove(JG,kC)},r.runOutsideAngular(()=>{n.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){let n=this._elementRef.nativeElement.classList;n.remove(kC),n.add(JG)}deactivate(){this._elementRef.nativeElement.classList.add(kC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Le))},e.\u0275dir=ze({type:e,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"],standalone:!0});let i=e;return i})(),tj=(()=>{let e=class e{constructor(n,r){this._elementRef=n,this._ngZone=r,this.open=!1}ngAfterViewInit(){let n=this._elementRef.nativeElement.querySelector(".mdc-floating-label");n?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(n.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>n.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(n){!this.open||!n?this._notch.nativeElement.style.width="":this._notch.nativeElement.style.width=`calc(${n}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Le))},e.\u0275cmp=le({type:e,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(r,o){if(r&1&&Ie(Ahe,5),r&2){let s;be(s=ye())&&(o._notch=s.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(r,o){r&2&&se("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},standalone:!0,features:[ce],attrs:Nhe,ngContentSelectors:khe,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(r,o){r&1&&(kn(),J(0,"div",1),v(1,"div",2,0),$t(3),y(),J(4,"div",3))},encapsulation:2,changeDetection:0});let i=e;return i})(),cpe={transitionMessages:si("transitionMessages",[fi("enter",Qt({opacity:1,transform:"translateY(0%)"})),On("void => enter",[Qt({opacity:0,transform:"translateY(-5px)"}),Pn("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},AO=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e});let i=e;return i})();var Y_=new ge("MatFormField"),dpe=new ge("MAT_FORM_FIELD_DEFAULT_OPTIONS"),nj=0,ij="fill",upe="auto",rj="fixed",hpe="translateY(-50%)",sj=(()=>{let e=class e{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(n){this._hideRequiredMarker=Ih(n)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||upe}set floatLabel(n){n!==this._floatLabel&&(this._floatLabel=n,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(n){let r=this._appearance,o=n||this._defaults?.appearance||ij;this._appearance=o,this._appearance==="outline"&&this._appearance!==r&&(this._needsOutlineLabelOffsetUpdate=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||rj}set subscriptSizing(n){this._subscriptSizing=n||this._defaults?.subscriptSizing||rj}get hintLabel(){return this._hintLabel}set hintLabel(n){this._hintLabel=n,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(n){this._explicitFormFieldControl=n}constructor(n,r,o,s,a,l,c,d){this._elementRef=n,this._changeDetectorRef=r,this._dir=s,this._platform=a,this._defaults=l,this._animationMode=c,this._labelChild=x2(LC),this._hideRequiredMarker=!1,this.color="primary",this._appearance=ij,this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId=`mat-mdc-form-field-label-${nj++}`,this._hintLabelId=`mat-mdc-hint-${nj++}`,this._subscriptAnimationState="",this._destroyed=new me,this._isFocused=null,this._needsOutlineLabelOffsetUpdate=!1,this._injector=te(bt),this.getLabelId=Xt(()=>this._hasFloatingLabel()?this._labelId:null),this._hasFloatingLabel=Xt(()=>!!this._labelChild()),l&&(l.appearance&&(this.appearance=l.appearance),this._hideRequiredMarker=!!l?.hideRequiredMarker,l.color&&(this.color=l.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){let n=this._control;n.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${n.controlType}`),n.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),n.ngControl&&n.ngControl.valueChanges&&n.ngControl.valueChanges.pipe(Xe(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(n=>!n._isText),this._hasTextPrefix=!!this._prefixChildren.find(n=>n._isText),this._hasIconSuffix=!!this._suffixChildren.find(n=>!n._isText),this._hasTextSuffix=!!this._suffixChildren.find(n=>n._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Yn(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0),qf(()=>{this._needsOutlineLabelOffsetUpdate&&(this._needsOutlineLabelOffsetUpdate=!1,this._updateOutlineLabelOffset())},{injector:this._injector}),this._dir.change.pipe(Xe(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0)}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(n){let r=this._control?this._control.ngControl:null;return r&&r[n]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let n=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&n.push(...this._control.userAriaDescribedBy.split(" ")),this._getDisplayedMessages()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,o=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?n.push(r.id):this._hintLabel&&n.push(this._hintLabelId),o&&n.push(o.id)}else this._errorChildren&&n.push(...this._errorChildren.map(r=>r.id));this._control.setDescribedByIds(n)}}_updateOutlineLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return;let n=this._floatingLabel.element;if(!(this._iconPrefixContainer||this._textPrefixContainer)){n.style.transform="";return}if(!this._isAttachedToDom()){this._needsOutlineLabelOffsetUpdate=!0;return}let r=this._iconPrefixContainer?.nativeElement,o=this._textPrefixContainer?.nativeElement,s=r?.getBoundingClientRect().width??0,a=o?.getBoundingClientRect().width??0,l=this._dir.value==="rtl"?"-1":"1",c=`${s+a}px`,u=`calc(${l} * (${c} + var(--mat-mdc-form-field-label-offset-x, 0px)))`;n.style.transform=`var( +`],changeDetection:0})}return i})();var jG=48,WG=48,RC=class{rootEle;constructor(e){this.rootEle=e}drag(e){let t=e.clientX,n=e.clientY,r=e.offsetX,o=Number(this.rootEle.style.top.replace("px","")),s=Number(this.rootEle.style.left.replace("px","")),a=Number(this.rootEle.style.width.replace("px","")),l=Number(this.rootEle.style.height.replace("px","")),c=yn(document,"mousemove"),d=yn(window,"mouseup"),u=e.target.dataset.position,h=this.rootEle.parentElement.offsetHeight,p=this.rootEle.parentElement.offsetWidth;qr([c]).pipe(Xe(d)).subscribe({next:([f])=>{f.preventDefault();let m=f.clientX-t,b=f.clientY-n;if(!(m===0&&b===0))if(u==null)this.rootEle.style.top=`${Math.min(h-28,Math.max(o+b,0))}px`,this.rootEle.style.left=`${Math.min(p-r,Math.max(-r,s+m))}px`;else{if(u.includes("right")&&(this.rootEle.style.width=`${Math.max(jG,a+m)}px`),u.includes("bottom")&&(this.rootEle.style.height=`${Math.max(WG,l+b)}px`),u.includes("left")){let g=Math.max(jG,a-m);this.rootEle.style.width=`${g}px`,this.rootEle.style.left=`${s+(a-g)}px`}if(u.includes("top")){let g=Math.max(WG,l-b);this.rootEle.style.height=`${g}px`,this.rootEle.style.top=`${o+(l-g)}px`}}},complete:()=>{}})}};var wc=(()=>{class i extends mC{constructor(t,n,r,o,s,a,l){super(t,n,r,o,s,a,l),this.attachMouseEventListeners(r.nativeElement)}ngOnInit(){super.ngOnInit(),this.listenForOpenEvents()}listenForOpenEvents(){this.openStatusChange.pipe(Xe(this.destroyed)).subscribe(t=>{t?this.openDialog():this.closeDialog()})}attachMouseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"click").pipe(Xe(this.destroyed)).subscribe(n=>{n.target.closest("[bubbleClose]")?this.closingDialog():this.openingDialog()}),this.overlayRef?.backdropClick().pipe(Xe(this.destroyed)).subscribe(()=>{this.closingDialog()})})}attachKeyboardCloseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"keyup").pipe(Xe(this.destroyed)).subscribe(n=>{let r=n.keyCode,o=n.target;switch(r){case 27:this.closingDialog();return;case 32:o.closest("[bubbleClose]")&&this.closingDialog();return;default:return}}),yn(t,"keydown").pipe(Xe(this.destroyed)).subscribe(n=>{let r=n.keyCode,o=n.target;switch(r){case 13:o.closest("[bubbleClose]")&&this.closingDialog();return;default:return}})})}openingDialog(){this.disabled||this.openStatusChange.next(!0)}closingDialog(){this.openStatusChange.next(!1)}createOverlayConfig(t){return new ui(wt(Z({},this.overlayDimensions),{positionStrategy:super.createPositionStrategy(t),scrollStrategy:this.createScrollStrategy(),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",panelClass:this.panelClassInternal}))}static \u0275fac=function(n){return new(n||i)(M(Le),M(Ht),M(Re),M(Yt),M(Ye),M(kh),M(yt))};static \u0275dir=ze({type:i,selectors:[["","bubbleClick",""]],hostAttrs:[1,"bubble-click"],inputs:{dialog:[0,"bubbleClick","dialog"],disabled:[0,"bubbleDisabled","disabled"]},exportAs:["bubbleClick"],standalone:!0,features:[nn]})}return i})();var Mhe=["input"],Ehe=["label"],Ihe=["*"],The=new ge("mat-checkbox-default-options",{providedIn:"root",factory:qG});function qG(){return{color:"accent",clickAction:"check-indeterminate"}}var Mr=function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i}(Mr||{}),Dhe={provide:La,useExisting:Yr(()=>AC),multi:!0},PO=class{},Phe=0,$G=qG(),AC=(()=>{let e=class e{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(n){let r=new PO;return r.source=this,r.checked=n,r}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(n,r,o,s,a,l){this._elementRef=n,this._changeDetectorRef=r,this._ngZone=o,this._animationMode=a,this._options=l,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new Pe,this.indeterminateChange=new Pe,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=Mr.Init,this._controlValueAccessorChangeFn=()=>{},this._validatorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||$G,this.color=this._options.color||$G.color,this.tabIndex=parseInt(s)||0,this.id=this._uniqueId=`mat-mdc-checkbox-${++Phe}`}ngOnChanges(n){n.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(n){n!=this.checked&&(this._checked=n,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(n){n!==this.disabled&&(this._disabled=n,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(n){let r=n!=this._indeterminate;this._indeterminate=n,r&&(this._indeterminate?this._transitionCheckState(Mr.Indeterminate):this._transitionCheckState(this.checked?Mr.Checked:Mr.Unchecked),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(n){this.checked=!!n}registerOnChange(n){this._controlValueAccessorChangeFn=n}registerOnTouched(n){this._onTouched=n}setDisabledState(n){this.disabled=n}validate(n){return this.required&&n.value!==!0?{required:!0}:null}registerOnValidatorChange(n){this._validatorChangeFn=n}_transitionCheckState(n){let r=this._currentCheckState,o=this._getAnimationTargetElement();if(!(r===n||!o)&&(this._currentAnimationClass&&o.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(r,n),this._currentCheckState=n,this._currentAnimationClass.length>0)){o.classList.add(this._currentAnimationClass);let s=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{o.classList.remove(s)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let n=this._options?.clickAction;!this.disabled&&n!=="noop"?(this.indeterminate&&n!=="check"&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?Mr.Checked:Mr.Unchecked),this._emitChangeEvent()):!this.disabled&&n==="noop"&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(n){n.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(n,r){if(this._animationMode==="NoopAnimations")return"";switch(n){case Mr.Init:if(r===Mr.Checked)return this._animationClasses.uncheckedToChecked;if(r==Mr.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case Mr.Unchecked:return r===Mr.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case Mr.Checked:return r===Mr.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case Mr.Indeterminate:return r===Mr.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(n){let r=this._inputElement;r&&(r.nativeElement.indeterminate=n)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(n){n.target&&this._labelElement.nativeElement.contains(n.target)&&n.stopPropagation()}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Fe),M(Le),ro("tabindex"),M(Zn,8),M(The,8))},e.\u0275cmp=le({type:e,selectors:[["mat-checkbox"]],viewQuery:function(r,o){if(r&1&&(Ie(Mhe,5),Ie(Ehe,5),Ie(za,5)),r&2){let s;be(s=ye())&&(o._inputElement=s.first),be(s=ye())&&(o._labelElement=s.first),be(s=ye())&&(o.ripple=s.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:14,hostBindings:function(r,o){r&2&&(No("id",o.id),Ze("tabindex",null)("aria-label",null)("aria-labelledby",null),Nr(o.color?"mat-"+o.color:"mat-accent"),se("_mat-animation-noopable",o._animationMode==="NoopAnimations")("mdc-checkbox--disabled",o.disabled)("mat-mdc-checkbox-disabled",o.disabled)("mat-mdc-checkbox-checked",o.checked))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],id:"id",required:[2,"required","required",at],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",at],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?void 0:wi(n)],color:"color",checked:[2,"checked","checked",at],disabled:[2,"disabled","disabled",at],indeterminate:[2,"indeterminate","indeterminate",at]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],standalone:!0,features:[Bt([Dhe,{provide:pd,useExisting:e,multi:!0}]),an,dn,ce],ngContentSelectors:Ihe,decls:15,vars:19,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(r,o){if(r&1){let s=ie();kn(),v(0,"div",3),H("click",function(l){return V(s),z(o._preventBubblingFromLabel(l))}),v(1,"div",4,0)(3,"div",5),H("click",function(){return V(s),z(o._onTouchTargetClick())}),y(),v(4,"input",6,1),H("blur",function(){return V(s),z(o._onBlur())})("click",function(){return V(s),z(o._onInputClick())})("change",function(l){return V(s),z(o._onInteractionEvent(l))}),y(),J(6,"div",7),v(7,"div",8),io(),v(8,"svg",9),J(9,"path",10),y(),B0(),J(10,"div",11),y(),J(11,"div",12),y(),v(12,"label",13,2),$t(14),y()()}if(r&2){let s=ve(2);N("labelPosition",o.labelPosition),w(4),se("mdc-checkbox--selected",o.checked),N("checked",o.checked)("indeterminate",o.indeterminate)("disabled",o.disabled)("id",o.inputId)("required",o.required)("tabIndex",o.disabled?-1:o.tabIndex),Ze("aria-label",o.ariaLabel||null)("aria-labelledby",o.ariaLabelledby)("aria-describedby",o.ariaDescribedby)("aria-checked",o.indeterminate?"mixed":null)("name",o.name)("value",o.value),w(7),N("matRippleTrigger",s)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),w(),N("for",o.inputId)}},dependencies:[za,Py],styles:['.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-unselected-icon-color);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color)}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color);border-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color)}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color);background-color:var(--mdc-checkbox-selected-focus-icon-color)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox--disabled .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-selected-checkmark-color)}.cdk-high-contrast-active .mdc-checkbox__mixedmark{margin:0 1px}.mdc-checkbox--disabled .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *,.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color);font-family:var(--mat-checkbox-label-text-font);line-height:var(--mat-checkbox-label-text-line-height);font-size:var(--mat-checkbox-label-text-size);letter-spacing:var(--mat-checkbox-label-text-tracking);font-weight:var(--mat-checkbox-label-text-weight)}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color)}.mat-mdc-checkbox label:empty{display:none}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let i=e;return i})();var NC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[AC,qt,qt]});let i=e;return i})();var OO=class{constructor(e){this._box=e,this._destroyed=new me,this._resizeSubject=new me,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(e){return this._elementObservables.has(e)||this._elementObservables.set(e,new Mt(t=>{let n=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(e,{box:this._box}),()=>{this._resizeObserver?.unobserve(e),n.unsubscribe(),this._elementObservables.delete(e)}}).pipe(Gt(t=>t.some(n=>n.target===e)),Hv({bufferSize:1,refCount:!0}),Xe(this._destroyed))),this._elementObservables.get(e)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},YG=(()=>{let e=class e{constructor(){this._observers=new Map,this._ngZone=te(Le),typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,n]of this._observers)n.destroy();this._observers.clear(),typeof ResizeObserver<"u"}observe(n,r){let o=r?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new OO(o)),this._observers.get(o).observe(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Rhe=["notch"],Ahe=["matFormFieldNotchedOutline",""],Nhe=["*"],khe=["textField"],Lhe=["iconPrefixContainer"],Fhe=["textPrefixContainer"],Bhe=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Vhe=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function zhe(i,e){i&1&&J(0,"span",19)}function Uhe(i,e){if(i&1&&(v(0,"label",18),$t(1,1),W(2,zhe,1,0,"span",19),y()),i&2){let t=I(2);N("floating",t._shouldLabelFloat())("monitorResize",t._hasOutline())("id",t._labelId),Ze("for",t._control.disableAutomaticLabeling?null:t._control.id),w(2),ae(!t.hideRequiredMarker&&t._control.required?2:-1)}}function Hhe(i,e){if(i&1&&W(0,Uhe,3,5,"label",18),i&2){let t=I();ae(t._hasFloatingLabel()?0:-1)}}function Ghe(i,e){i&1&&J(0,"div",5)}function jhe(i,e){}function Whe(i,e){if(i&1&&W(0,jhe,0,0,"ng-template",11),i&2){I(2);let t=ve(1);N("ngTemplateOutlet",t)}}function $he(i,e){if(i&1&&(v(0,"div",7),W(1,Whe,1,1,null,11),y()),i&2){let t=I();N("matFormFieldNotchedOutlineOpen",t._shouldLabelFloat()),w(),ae(t._forceDisplayInfixLabel()?-1:1)}}function qhe(i,e){i&1&&(v(0,"div",8,2),$t(2,2),y())}function Yhe(i,e){i&1&&(v(0,"div",9,3),$t(2,3),y())}function Xhe(i,e){}function Zhe(i,e){if(i&1&&W(0,Xhe,0,0,"ng-template",11),i&2){I();let t=ve(1);N("ngTemplateOutlet",t)}}function Qhe(i,e){i&1&&(v(0,"div",12),$t(1,4),y())}function Khe(i,e){i&1&&(v(0,"div",13),$t(1,5),y())}function Jhe(i,e){i&1&&J(0,"div",14)}function epe(i,e){if(i&1&&(v(0,"div",16),$t(1,6),y()),i&2){let t=I();N("@transitionMessages",t._subscriptAnimationState)}}function tpe(i,e){if(i&1&&(v(0,"mat-hint",20),S(1),y()),i&2){let t=I(2);N("id",t._hintLabelId),w(),nt(t.hintLabel)}}function npe(i,e){if(i&1&&(v(0,"div",17),W(1,tpe,2,2,"mat-hint",20),$t(2,7),J(3,"div",21),$t(4,8),y()),i&2){let t=I();N("@transitionMessages",t._subscriptAnimationState),w(),ae(t.hintLabel?1:-1)}}var LC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["mat-label"]],standalone:!0});let i=e;return i})();var ipe=new ge("MatError");var rpe=0,XG=(()=>{let e=class e{constructor(){this.align="start",this.id=`mat-mdc-hint-${rpe++}`}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(r,o){r&2&&(No("id",o.id),Ze("align",null),se("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"},standalone:!0});let i=e;return i})(),ope=new ge("MatPrefix");var spe=new ge("MatSuffix");var ij=new ge("FloatingLabelParent"),ZG=(()=>{let e=class e{get floating(){return this._floating}set floating(n){this._floating=n,this.monitorResize&&this._handleResize()}get monitorResize(){return this._monitorResize}set monitorResize(n){this._monitorResize=n,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}constructor(n){this._elementRef=n,this._floating=!1,this._monitorResize=!1,this._resizeObserver=te(YG),this._ngZone=te(Le),this._parent=te(ij),this._resizeSubscription=new Ct}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return ape(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}};e.\u0275fac=function(r){return new(r||e)(M(Re))},e.\u0275dir=ze({type:e,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(r,o){r&2&&se("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"},standalone:!0});let i=e;return i})();function ape(i){let e=i;if(e.offsetParent!==null)return e.scrollWidth;let t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);let n=t.scrollWidth;return t.remove(),n}var QG="mdc-line-ripple--active",kC="mdc-line-ripple--deactivating",KG=(()=>{let e=class e{constructor(n,r){this._elementRef=n,this._handleTransitionEnd=o=>{let s=this._elementRef.nativeElement.classList,a=s.contains(kC);o.propertyName==="opacity"&&a&&s.remove(QG,kC)},r.runOutsideAngular(()=>{n.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){let n=this._elementRef.nativeElement.classList;n.remove(kC),n.add(QG)}deactivate(){this._elementRef.nativeElement.classList.add(kC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Le))},e.\u0275dir=ze({type:e,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"],standalone:!0});let i=e;return i})(),JG=(()=>{let e=class e{constructor(n,r){this._elementRef=n,this._ngZone=r,this.open=!1}ngAfterViewInit(){let n=this._elementRef.nativeElement.querySelector(".mdc-floating-label");n?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(n.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>n.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(n){!this.open||!n?this._notch.nativeElement.style.width="":this._notch.nativeElement.style.width=`calc(${n}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Le))},e.\u0275cmp=le({type:e,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(r,o){if(r&1&&Ie(Rhe,5),r&2){let s;be(s=ye())&&(o._notch=s.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(r,o){r&2&&se("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},standalone:!0,features:[ce],attrs:Ahe,ngContentSelectors:Nhe,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(r,o){r&1&&(kn(),J(0,"div",1),v(1,"div",2,0),$t(3),y(),J(4,"div",3))},encapsulation:2,changeDetection:0});let i=e;return i})(),lpe={transitionMessages:si("transitionMessages",[fi("enter",Qt({opacity:1,transform:"translateY(0%)"})),On("void => enter",[Qt({opacity:0,transform:"translateY(-5px)"}),Pn("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},RO=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e});let i=e;return i})();var X_=new ge("MatFormField"),cpe=new ge("MAT_FORM_FIELD_DEFAULT_OPTIONS"),ej=0,tj="fill",dpe="auto",nj="fixed",upe="translateY(-50%)",rj=(()=>{let e=class e{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(n){this._hideRequiredMarker=Ih(n)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||dpe}set floatLabel(n){n!==this._floatLabel&&(this._floatLabel=n,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(n){let r=this._appearance,o=n||this._defaults?.appearance||tj;this._appearance=o,this._appearance==="outline"&&this._appearance!==r&&(this._needsOutlineLabelOffsetUpdate=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||nj}set subscriptSizing(n){this._subscriptSizing=n||this._defaults?.subscriptSizing||nj}get hintLabel(){return this._hintLabel}set hintLabel(n){this._hintLabel=n,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(n){this._explicitFormFieldControl=n}constructor(n,r,o,s,a,l,c,d){this._elementRef=n,this._changeDetectorRef=r,this._dir=s,this._platform=a,this._defaults=l,this._animationMode=c,this._labelChild=y2(LC),this._hideRequiredMarker=!1,this.color="primary",this._appearance=tj,this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId=`mat-mdc-form-field-label-${ej++}`,this._hintLabelId=`mat-mdc-hint-${ej++}`,this._subscriptAnimationState="",this._destroyed=new me,this._isFocused=null,this._needsOutlineLabelOffsetUpdate=!1,this._injector=te(yt),this.getLabelId=Xt(()=>this._hasFloatingLabel()?this._labelId:null),this._hasFloatingLabel=Xt(()=>!!this._labelChild()),l&&(l.appearance&&(this.appearance=l.appearance),this._hideRequiredMarker=!!l?.hideRequiredMarker,l.color&&(this.color=l.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){let n=this._control;n.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${n.controlType}`),n.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),n.ngControl&&n.ngControl.valueChanges&&n.ngControl.valueChanges.pipe(Xe(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(n=>!n._isText),this._hasTextPrefix=!!this._prefixChildren.find(n=>n._isText),this._hasIconSuffix=!!this._suffixChildren.find(n=>!n._isText),this._hasTextSuffix=!!this._suffixChildren.find(n=>n._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Yn(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0),qf(()=>{this._needsOutlineLabelOffsetUpdate&&(this._needsOutlineLabelOffsetUpdate=!1,this._updateOutlineLabelOffset())},{injector:this._injector}),this._dir.change.pipe(Xe(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0)}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(n){let r=this._control?this._control.ngControl:null;return r&&r[n]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let n=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&n.push(...this._control.userAriaDescribedBy.split(" ")),this._getDisplayedMessages()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,o=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?n.push(r.id):this._hintLabel&&n.push(this._hintLabelId),o&&n.push(o.id)}else this._errorChildren&&n.push(...this._errorChildren.map(r=>r.id));this._control.setDescribedByIds(n)}}_updateOutlineLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return;let n=this._floatingLabel.element;if(!(this._iconPrefixContainer||this._textPrefixContainer)){n.style.transform="";return}if(!this._isAttachedToDom()){this._needsOutlineLabelOffsetUpdate=!0;return}let r=this._iconPrefixContainer?.nativeElement,o=this._textPrefixContainer?.nativeElement,s=r?.getBoundingClientRect().width??0,a=o?.getBoundingClientRect().width??0,l=this._dir.value==="rtl"?"-1":"1",c=`${s+a}px`,u=`calc(${l} * (${c} + var(--mat-mdc-form-field-label-offset-x, 0px)))`;n.style.transform=`var( --mat-mdc-form-field-label-transform, - ${hpe} translateX(${u}) - )`}_isAttachedToDom(){let n=this._elementRef.nativeElement;if(n.getRootNode){let r=n.getRootNode();return r&&r!==n}return document.documentElement.contains(n)}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Fe),M(Le),M(ai),M(gn),M(dpe,8),M(Zn,8),M(Ye))},e.\u0275cmp=le({type:e,selectors:[["mat-form-field"]],contentQueries:function(r,o,s){if(r&1&&(B2(s,o._labelChild,LC,5),xi(s,AO,5),xi(s,spe,5),xi(s,ape,5),xi(s,rpe,5),xi(s,QG,5)),r&2){V2();let a;be(a=ye())&&(o._formFieldControl=a.first),be(a=ye())&&(o._prefixChildren=a),be(a=ye())&&(o._suffixChildren=a),be(a=ye())&&(o._errorChildren=a),be(a=ye())&&(o._hintChildren=a)}},viewQuery:function(r,o){if(r&1&&(Ie(Lhe,5),Ie(Fhe,5),Ie(Bhe,5),Ie(KG,5),Ie(tj,5),Ie(ej,5)),r&2){let s;be(s=ye())&&(o._textField=s.first),be(s=ye())&&(o._iconPrefixContainer=s.first),be(s=ye())&&(o._textPrefixContainer=s.first),be(s=ye())&&(o._floatingLabel=s.first),be(s=ye())&&(o._notchedOutline=s.first),be(s=ye())&&(o._lineRipple=s.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(r,o){r&2&&se("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-no-animations",o._animationMode==="NoopAnimations")("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-focused",o._control.focused)("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[Bt([{provide:Y_,useExisting:e},{provide:oj,useExisting:e}]),ce],ngContentSelectors:zhe,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(r,o){if(r&1){let s=ie();kn(Vhe),W(0,Ghe,1,1,"ng-template",null,0,kt),v(2,"div",4,1),H("click",function(l){return V(s),z(o._control.onContainerClick(l))}),W(4,jhe,1,0,"div",5),v(5,"div",6),W(6,qhe,2,2,"div",7)(7,Yhe,3,0,"div",8)(8,Xhe,3,0,"div",9),v(9,"div",10),W(10,Qhe,1,1,null,11),$t(11),y(),W(12,Khe,2,0,"div",12)(13,Jhe,2,0,"div",13),y(),W(14,epe,1,0,"div",14),y(),v(15,"div",15),W(16,tpe,2,1,"div",16)(17,ipe,5,2,"div",17),y()}if(r&2){let s;w(2),se("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),w(2),ae(!o._hasOutline()&&!o._control.disabled?4:-1),w(2),ae(o._hasOutline()?6:-1),w(),ae(o._hasIconPrefix?7:-1),w(),ae(o._hasTextPrefix?8:-1),w(2),ae(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),w(2),ae(o._hasTextSuffix?12:-1),w(),ae(o._hasIconSuffix?13:-1),w(),ae(o._hasOutline()?-1:14),w(),se("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic"),w(),ae((s=o._getDisplayedMessages())==="error"?16:s==="hint"?17:-1)}},dependencies:[KG,tj,Bs,ej,QG],styles:['.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color);caret-color:var(--mdc-filled-text-field-caret-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color);caret-color:var(--mdc-outlined-text-field-caret-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color)}.mdc-text-field--disabled .cdk-high-contrast-active .mdc-text-field__input{background-color:Window}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape);border-top-right-radius:var(--mdc-filled-text-field-container-shape)}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color)}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color)}.mdc-text-field--outlined{height:56px;overflow:visible;padding-left:16px;padding-right:16px}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.cdk-high-contrast-active .mdc-text-field--disabled .mdc-floating-label{z-index:1}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color)}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font);font-size:var(--mdc-filled-text-field-label-text-size);font-weight:var(--mdc-filled-text-field-label-text-weight);letter-spacing:var(--mdc-filled-text-field-label-text-tracking)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color)}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font);font-size:var(--mdc-outlined-text-field-label-text-size);font-weight:var(--mdc-outlined-text-field-label-text-weight);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking)}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color);border-width:var(--mdc-outlined-text-field-outline-width)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;width:12px;border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape))}}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape)}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape)}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 24px)}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-outlined-text-field-container-shape))*2)}}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color)}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height);padding-top:var(--mat-form-field-filled-with-label-container-padding-top);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding);padding-bottom:var(--mat-form-field-container-vertical-padding)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color)}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font);line-height:var(--mat-form-field-subscript-text-line-height);font-size:var(--mat-form-field-subscript-text-size);letter-spacing:var(--mat-form-field-subscript-text-tracking);font-weight:var(--mat-form-field-subscript-text-weight)}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color)}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity)}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color)}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color)}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font);line-height:var(--mat-form-field-container-text-line-height);font-size:var(--mat-form-field-container-text-size);letter-spacing:var(--mat-form-field-container-text-tracking);font-weight:var(--mat-form-field-container-text-weight)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color)}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color)}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color)}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color)}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color)}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[cpe.transitionMessages]},changeDetection:0});let i=e;return i})(),da=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[qt,Ae,py,qt]});let i=e;return i})();var fpe=["trigger"],mpe=["panel"],gpe=[[["mat-select-trigger"]],"*"],_pe=["mat-select-trigger","*"];function vpe(i,e){if(i&1&&(v(0,"span",4),S(1),y()),i&2){let t=I();w(),nt(t.placeholder)}}function bpe(i,e){i&1&&$t(0)}function ype(i,e){if(i&1&&(v(0,"span",11),S(1),y()),i&2){let t=I(2);w(),nt(t.triggerValue)}}function xpe(i,e){if(i&1&&(v(0,"span",5),W(1,bpe,1,0)(2,ype,2,1,"span",11),y()),i&2){let t=I();w(),ae(t.customTrigger?1:2)}}function wpe(i,e){if(i&1){let t=ie();v(0,"div",12,1),H("@transformPanel.done",function(r){V(t);let o=I();return z(o._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){V(t);let o=I();return z(o._handleKeydown(r))}),$t(2,1),y()}if(i&2){let t=I();L2("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",t._getPanelTheme(),""),N("ngClass",t.panelClass)("@transformPanel","showing"),Ze("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}var Cpe={transformPanelWrap:si("transformPanelWrap",[On("* => void",pF("@transformPanel",[hF()],{optional:!0}))]),transformPanel:si("transformPanel",[fi("void",Qt({opacity:0,transform:"scale(1, 0.8)"})),On("void => showing",Pn("120ms cubic-bezier(0, 0, 0.2, 1)",Qt({opacity:1,transform:"scale(1, 1)"}))),On("* => void",Pn("100ms linear",Qt({opacity:0})))])};var aj=0,lj=new ge("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.reposition()}});function Spe(i){return()=>i.scrollStrategies.reposition()}var Mpe=new ge("MAT_SELECT_CONFIG"),Epe={provide:lj,deps:[Ht],useFactory:Spe},Ipe=new ge("MatSelectTrigger"),NO=class{constructor(e,t){this.source=e,this.value=t}},FC=(()=>{let e=class e{_scrollOptionIntoView(n){let r=this.options.toArray()[n];if(r){let o=this.panel.nativeElement,s=Iy(n,this.options,this.optionGroups),a=r._getHostElement();n===0&&s===1?o.scrollTop=0:o.scrollTop=Ty(a.offsetTop,a.offsetHeight,o.scrollTop,o.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(n){return new NO(this,n)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(n){this._hideSingleSelectionIndicator=n,this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(n){this._placeholder=n,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(Jb.required)??!1}set required(n){this._required=n,this.stateChanges.next()}get multiple(){return this._multiple}set multiple(n){this._selectionModel,this._multiple=n}get compareWith(){return this._compareWith}set compareWith(n){this._compareWith=n,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(n){this._assignValue(n)&&this._onChange(n)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(n){this._errorStateTracker.matcher=n}get id(){return this._id}set id(n){this._id=n||this._uid,this.stateChanges.next()}get errorState(){return this._errorStateTracker.errorState}set errorState(n){this._errorStateTracker.errorState=n}constructor(n,r,o,s,a,l,c,d,u,h,p,f,m,b){this._viewportRuler=n,this._changeDetectorRef=r,this._elementRef=a,this._dir=l,this._parentFormField=u,this.ngControl=h,this._liveAnnouncer=m,this._defaultOptions=b,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(g,_)=>g===_,this._uid=`mat-select-${aj++}`,this._triggerAriaLabelledBy=null,this._destroy=new me,this.stateChanges=new me,this.disableAutomaticLabeling=!0,this._onChange=()=>{},this._onTouched=()=>{},this._valueId=`mat-select-value-${aj++}`,this._panelDoneAnimatingStream=new me,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this.disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this._initialized=new me,this.optionSelectionChanges=Io(()=>{let g=this.options;return g?g.changes.pipe(pi(g),Xn(()=>Yn(...g.map(_=>_.onSelectionChange)))):this._initialized.pipe(Xn(()=>this.optionSelectionChanges))}),this.openedChange=new Pe,this._openedStream=this.openedChange.pipe(Gt(g=>g),Je(()=>{})),this._closedStream=this.openedChange.pipe(Gt(g=>!g),Je(()=>{})),this.selectionChange=new Pe,this.valueChange=new Pe,this._trackedModal=null,this._skipPredicate=g=>this.panelOpen?!1:g.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),b?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=b.typeaheadDebounceInterval),this._errorStateTracker=new Ey(s,h,d,c,this.stateChanges),this._scrollStrategyFactory=f,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(p)||0,this.id=this.id}ngOnInit(){this._selectionModel=new ef(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(vl(),Xe(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(Xe(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(Xe(this._destroy)).subscribe(n=>{n.added.forEach(r=>r.select()),n.removed.forEach(r=>r.deselect())}),this.options.changes.pipe(pi(null),Xe(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let n=this._getTriggerAriaLabelledby(),r=this.ngControl;if(n!==this._triggerAriaLabelledBy){let o=this._elementRef.nativeElement;this._triggerAriaLabelledBy=n,n?o.setAttribute("aria-labelledby",n):o.removeAttribute("aria-labelledby")}r&&(this._previousControl!==r.control&&(this._previousControl!==void 0&&r.disabled!==null&&r.disabled!==this.disabled&&(this.disabled=r.disabled),this._previousControl=r.control),this.updateErrorState())}ngOnChanges(n){(n.disabled||n.userAriaDescribedBy)&&this.stateChanges.next(),n.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_applyModalPanelOwnership(){let n=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!n)return;let r=`${this.id}-panel`;this._trackedModal&&Wl(this._trackedModal,"aria-owns",r),Ah(n,"aria-owns",r),this._trackedModal=n}_clearFromModal(){if(!this._trackedModal)return;let n=`${this.id}-panel`;Wl(this._trackedModal,"aria-owns",n),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next())}writeValue(n){this._assignValue(n)}registerOnChange(n){this._onChange=n}registerOnTouched(n){this._onTouched=n}setDisabledState(n){this.disabled=n,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let n=this._selectionModel.selected.map(r=>r.viewValue);return this._isRtl()&&n.reverse(),n.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(n){this.disabled||(this.panelOpen?this._handleOpenKeydown(n):this._handleClosedKeydown(n))}_handleClosedKeydown(n){let r=n.keyCode,o=r===40||r===38||r===37||r===39,s=r===13||r===32,a=this._keyManager;if(!a.isTyping()&&s&&!mi(n)||(this.multiple||n.altKey)&&o)n.preventDefault(),this.open();else if(!this.multiple){let l=this.selected;a.onKeydown(n);let c=this.selected;c&&l!==c&&this._liveAnnouncer.announce(c.viewValue,1e4)}}_handleOpenKeydown(n){let r=this._keyManager,o=n.keyCode,s=o===40||o===38,a=r.isTyping();if(s&&n.altKey)n.preventDefault(),this.close();else if(!a&&(o===13||o===32)&&r.activeItem&&!mi(n))n.preventDefault(),r.activeItem._selectViaInteraction();else if(!a&&this._multiple&&o===65&&n.ctrlKey){n.preventDefault();let l=this.options.some(c=>!c.disabled&&!c.selected);this.options.forEach(c=>{c.disabled||(l?c.select():c.deselect())})}else{let l=r.activeItemIndex;r.onKeydown(n),this._multiple&&s&&n.shiftKey&&r.activeItem&&r.activeItemIndex!==l&&r.activeItem._selectViaInteraction()}}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(_n(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(n){if(this.options.forEach(r=>r.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&n)Array.isArray(n),n.forEach(r=>this._selectOptionByValue(r)),this._sortValues();else{let r=this._selectOptionByValue(n);r?this._keyManager.updateActiveItem(r):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(n){let r=this.options.find(o=>{if(this._selectionModel.isSelected(o))return!1;try{return o.value!=null&&this._compareWith(o.value,n)}catch{return!1}});return r&&this._selectionModel.select(r),r}_assignValue(n){return n!==this._value||this._multiple&&Array.isArray(n)?(this.options&&this._setSelectionByValue(n),this._value=n,!0):!1}_getOverlayWidth(n){return this.panelWidth==="auto"?(n instanceof U_?n.elementRef:n||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let n of this.options)n._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Ph(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let n=Yn(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Xe(n)).subscribe(r=>{this._onSelect(r.source,r.isUserInput),r.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Yn(...this.options.map(r=>r._stateChanges)).pipe(Xe(n)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(n,r){let o=this._selectionModel.isSelected(n);n.value==null&&!this._multiple?(n.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(n.value)):(o!==n.selected&&(n.selected?this._selectionModel.select(n):this._selectionModel.deselect(n)),r&&this._keyManager.setActiveItem(n),this.multiple&&(this._sortValues(),r&&this.focus())),o!==this._selectionModel.isSelected(n)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let n=this.options.toArray();this._selectionModel.sort((r,o)=>this.sortComparator?this.sortComparator(r,o,n):n.indexOf(r)-n.indexOf(o)),this.stateChanges.next()}}_propagateChanges(n){let r;this.multiple?r=this.selected.map(o=>o.value):r=this.selected?this.selected.value:n,this._value=r,this.valueChange.emit(r),this._onChange(r),this.selectionChange.emit(this._getChangeEvent(r)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let n=-1;for(let r=0;r0}focus(n){this._elementRef.nativeElement.focus(n)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let n=this._parentFormField?.getLabelId(),r=n?n+" ":"";return this.ariaLabelledby?r+this.ariaLabelledby:n}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let n=this._parentFormField?.getLabelId(),r=(n?n+" ":"")+this._valueId;return this.ariaLabelledby&&(r+=" "+this.ariaLabelledby),r}_panelDoneAnimating(n){this.openedChange.emit(n)}setDescribedByIds(n){n.length?this._elementRef.nativeElement.setAttribute("aria-describedby",n.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}};e.\u0275fac=function(r){return new(r||e)(M(ra),M(Fe),M(Le),M(V3),M(Re),M(ai,8),M(sT,8),M(aT,8),M(Y_,8),M(hd,10),ro("tabindex"),M(lj),M(Cy),M(Mpe,8))},e.\u0275cmp=le({type:e,selectors:[["mat-select"]],contentQueries:function(r,o,s){if(r&1&&(xi(s,Ipe,5),xi(s,ql,5),xi(s,Fh,5)),r&2){let a;be(a=ye())&&(o.customTrigger=a.first),be(a=ye())&&(o.options=a),be(a=ye())&&(o.optionGroups=a)}},viewQuery:function(r,o){if(r&1&&(Ie(fpe,5),Ie(mpe,5),Ie(mO,5)),r&2){let s;be(s=ye())&&(o.trigger=s.first),be(s=ye())&&(o.panel=s.first),be(s=ye())&&(o._overlayDir=s.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(r,o){r&1&&H("keydown",function(a){return o._handleKeydown(a)})("focus",function(){return o._onFocus()})("blur",function(){return o._onBlur()}),r&2&&(Ze("id",o.id)("tabindex",o.disabled?-1:o.tabIndex)("aria-controls",o.panelOpen?o.id+"-panel":null)("aria-expanded",o.panelOpen)("aria-label",o.ariaLabel||null)("aria-required",o.required.toString())("aria-disabled",o.disabled.toString())("aria-invalid",o.errorState)("aria-activedescendant",o._getAriaActiveDescendant()),se("mat-mdc-select-disabled",o.disabled)("mat-mdc-select-invalid",o.errorState)("mat-mdc-select-required",o.required)("mat-mdc-select-empty",o.empty)("mat-mdc-select-multiple",o.multiple))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",at],disableRipple:[2,"disableRipple","disableRipple",at],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?0:wi(n)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",at],placeholder:"placeholder",required:[2,"required","required",at],multiple:[2,"multiple","multiple",at],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",at],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",wi],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],standalone:!0,features:[Bt([{provide:AO,useExisting:e},{provide:Lh,useExisting:e}]),an,dn,ce],ngContentSelectors:_pe,decls:11,vars:8,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"backdropClick","attach","detach","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(r,o){if(r&1){let s=ie();kn(gpe),v(0,"div",2,0),H("click",function(){return V(s),z(o.open())}),v(3,"div",3),W(4,vpe,2,1,"span",4)(5,xpe,3,1,"span",5),y(),v(6,"div",6)(7,"div",7),io(),v(8,"svg",8),J(9,"path",9),y()()()(),W(10,wpe,3,9,"ng-template",10),H("backdropClick",function(){return V(s),z(o.close())})("attach",function(){return V(s),z(o._onAttached())})("detach",function(){return V(s),z(o.close())})}if(r&2){let s=ve(1);w(3),Ze("id",o._valueId),w(),ae(o.empty?4:5),w(6),N("cdkConnectedOverlayPanelClass",o._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",o._scrollStrategy)("cdkConnectedOverlayOrigin",o._preferredOverlayOrigin||s)("cdkConnectedOverlayOpen",o.panelOpen)("cdkConnectedOverlayPositions",o._positions)("cdkConnectedOverlayWidth",o._overlayWidth)}},dependencies:[U_,mO,nb],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}div.mat-mdc-select-panel .mat-mdc-option{--mdc-list-list-item-container-color: var(--mat-select-panel-background-color)}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform)}'],encapsulation:2,data:{animation:[Cpe.transformPanel]},changeDetection:0});let i=e;return i})();var ua=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[Epe],imports:[Ae,Jr,Bh,qt,Zo,da,Bh,qt]});let i=e;return i})();var sf=(()=>{class i{changeDetectorRef;pageSize;itemsCount;change=new Pe;curPageIndex=0;constructor(t){this.changeDetectorRef=t}reset(){this.curPageIndex=0,this.changeDetectorRef.markForCheck()}handleClickGoToPrevPage(){this.curPageIndex--,this.curPageIndex=Math.max(0,this.curPageIndex),this.change.emit(this.curPageIndex)}handleClickGoToNextPage(){this.curPageIndex++,this.curPageIndex=Math.min(Math.ceil(this.itemsCount/this.pageSize)-1,this.curPageIndex),this.change.emit(this.curPageIndex)}get disablePrevButton(){return this.curPageIndex===0}get disableNextButton(){return this.curPageIndex===Math.ceil(this.itemsCount/this.pageSize)-1}get curRangeText(){let t=Math.min(this.itemsCount,this.curPageIndex*this.pageSize+1),n=Math.min((this.curPageIndex+1)*this.pageSize,this.itemsCount);return t===n?`${t}`:`${t} - ${n}`}static \u0275fac=function(n){return new(n||i)(M(Fe))};static \u0275cmp=le({type:i,selectors:[["paginator"]],inputs:{pageSize:"pageSize",itemsCount:"itemsCount"},outputs:{change:"change"},standalone:!0,features:[ce],decls:9,vars:5,consts:[[1,"container"],[1,"icon-container","prev-page",3,"click"],[1,"range-text"],[1,"icon-container","next-page",3,"click"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1),H("click",function(){return r.handleClickGoToPrevPage()}),v(2,"mat-icon"),S(3,"chevron_left"),y()(),v(4,"div",2),S(5),y(),v(6,"div",3),H("click",function(){return r.handleClickGoToNextPage()}),v(7,"mat-icon"),S(8,"chevron_right"),y()()()),n&2&&(w(),se("disabled",r.disablePrevButton),w(4),Me(" ",r.curRangeText," "),w(),se("disabled",r.disableNextButton))},dependencies:[Ae,it,gt],styles:[`.container[_ngcontent-%COMP%]{display:flex;align-items:center;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:99px;cursor:pointer}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{background-color:#ddd}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{opacity:1}.container[_ngcontent-%COMP%] .icon-container.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.3}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.7;color:#333;font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .range-text[_ngcontent-%COMP%]{color:#333;font-size:12px;display:flex;align-items:center;justify-content:center} + ${upe} translateX(${u}) + )`}_isAttachedToDom(){let n=this._elementRef.nativeElement;if(n.getRootNode){let r=n.getRootNode();return r&&r!==n}return document.documentElement.contains(n)}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Fe),M(Le),M(ai),M(gn),M(cpe,8),M(Zn,8),M(Ye))},e.\u0275cmp=le({type:e,selectors:[["mat-form-field"]],contentQueries:function(r,o,s){if(r&1&&(F2(s,o._labelChild,LC,5),xi(s,RO,5),xi(s,ope,5),xi(s,spe,5),xi(s,ipe,5),xi(s,XG,5)),r&2){B2();let a;be(a=ye())&&(o._formFieldControl=a.first),be(a=ye())&&(o._prefixChildren=a),be(a=ye())&&(o._suffixChildren=a),be(a=ye())&&(o._errorChildren=a),be(a=ye())&&(o._hintChildren=a)}},viewQuery:function(r,o){if(r&1&&(Ie(khe,5),Ie(Lhe,5),Ie(Fhe,5),Ie(ZG,5),Ie(JG,5),Ie(KG,5)),r&2){let s;be(s=ye())&&(o._textField=s.first),be(s=ye())&&(o._iconPrefixContainer=s.first),be(s=ye())&&(o._textPrefixContainer=s.first),be(s=ye())&&(o._floatingLabel=s.first),be(s=ye())&&(o._notchedOutline=s.first),be(s=ye())&&(o._lineRipple=s.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(r,o){r&2&&se("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-no-animations",o._animationMode==="NoopAnimations")("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-focused",o._control.focused)("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[Bt([{provide:X_,useExisting:e},{provide:ij,useExisting:e}]),ce],ngContentSelectors:Vhe,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(r,o){if(r&1){let s=ie();kn(Bhe),W(0,Hhe,1,1,"ng-template",null,0,kt),v(2,"div",4,1),H("click",function(l){return V(s),z(o._control.onContainerClick(l))}),W(4,Ghe,1,0,"div",5),v(5,"div",6),W(6,$he,2,2,"div",7)(7,qhe,3,0,"div",8)(8,Yhe,3,0,"div",9),v(9,"div",10),W(10,Zhe,1,1,null,11),$t(11),y(),W(12,Qhe,2,0,"div",12)(13,Khe,2,0,"div",13),y(),W(14,Jhe,1,0,"div",14),y(),v(15,"div",15),W(16,epe,2,1,"div",16)(17,npe,5,2,"div",17),y()}if(r&2){let s;w(2),se("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),w(2),ae(!o._hasOutline()&&!o._control.disabled?4:-1),w(2),ae(o._hasOutline()?6:-1),w(),ae(o._hasIconPrefix?7:-1),w(),ae(o._hasTextPrefix?8:-1),w(2),ae(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),w(2),ae(o._hasTextSuffix?12:-1),w(),ae(o._hasIconSuffix?13:-1),w(),ae(o._hasOutline()?-1:14),w(),se("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic"),w(),ae((s=o._getDisplayedMessages())==="error"?16:s==="hint"?17:-1)}},dependencies:[ZG,JG,Bs,KG,XG],styles:['.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color);caret-color:var(--mdc-filled-text-field-caret-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color);caret-color:var(--mdc-outlined-text-field-caret-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color)}.mdc-text-field--disabled .cdk-high-contrast-active .mdc-text-field__input{background-color:Window}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape);border-top-right-radius:var(--mdc-filled-text-field-container-shape)}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color)}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color)}.mdc-text-field--outlined{height:56px;overflow:visible;padding-left:16px;padding-right:16px}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.cdk-high-contrast-active .mdc-text-field--disabled .mdc-floating-label{z-index:1}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color)}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font);font-size:var(--mdc-filled-text-field-label-text-size);font-weight:var(--mdc-filled-text-field-label-text-weight);letter-spacing:var(--mdc-filled-text-field-label-text-tracking)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color)}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font);font-size:var(--mdc-outlined-text-field-label-text-size);font-weight:var(--mdc-outlined-text-field-label-text-weight);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking)}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color);border-width:var(--mdc-outlined-text-field-outline-width)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;width:12px;border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape))}}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape)}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape)}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 24px)}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-outlined-text-field-container-shape))*2)}}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color)}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height);padding-top:var(--mat-form-field-filled-with-label-container-padding-top);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding);padding-bottom:var(--mat-form-field-container-vertical-padding)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color)}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font);line-height:var(--mat-form-field-subscript-text-line-height);font-size:var(--mat-form-field-subscript-text-size);letter-spacing:var(--mat-form-field-subscript-text-tracking);font-weight:var(--mat-form-field-subscript-text-weight)}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color)}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity)}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color)}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color)}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font);line-height:var(--mat-form-field-container-text-line-height);font-size:var(--mat-form-field-container-text-size);letter-spacing:var(--mat-form-field-container-text-tracking);font-weight:var(--mat-form-field-container-text-weight)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color)}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color)}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color)}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color)}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color)}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[lpe.transitionMessages]},changeDetection:0});let i=e;return i})(),da=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[qt,Ae,fy,qt]});let i=e;return i})();var ppe=["trigger"],fpe=["panel"],mpe=[[["mat-select-trigger"]],"*"],gpe=["mat-select-trigger","*"];function _pe(i,e){if(i&1&&(v(0,"span",4),S(1),y()),i&2){let t=I();w(),nt(t.placeholder)}}function vpe(i,e){i&1&&$t(0)}function bpe(i,e){if(i&1&&(v(0,"span",11),S(1),y()),i&2){let t=I(2);w(),nt(t.triggerValue)}}function ype(i,e){if(i&1&&(v(0,"span",5),W(1,vpe,1,0)(2,bpe,2,1,"span",11),y()),i&2){let t=I();w(),ae(t.customTrigger?1:2)}}function xpe(i,e){if(i&1){let t=ie();v(0,"div",12,1),H("@transformPanel.done",function(r){V(t);let o=I();return z(o._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){V(t);let o=I();return z(o._handleKeydown(r))}),$t(2,1),y()}if(i&2){let t=I();k2("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",t._getPanelTheme(),""),N("ngClass",t.panelClass)("@transformPanel","showing"),Ze("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}var wpe={transformPanelWrap:si("transformPanelWrap",[On("* => void",hF("@transformPanel",[uF()],{optional:!0}))]),transformPanel:si("transformPanel",[fi("void",Qt({opacity:0,transform:"scale(1, 0.8)"})),On("void => showing",Pn("120ms cubic-bezier(0, 0, 0.2, 1)",Qt({opacity:1,transform:"scale(1, 1)"}))),On("* => void",Pn("100ms linear",Qt({opacity:0})))])};var oj=0,sj=new ge("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.reposition()}});function Cpe(i){return()=>i.scrollStrategies.reposition()}var Spe=new ge("MAT_SELECT_CONFIG"),Mpe={provide:sj,deps:[Ht],useFactory:Cpe},Epe=new ge("MatSelectTrigger"),AO=class{constructor(e,t){this.source=e,this.value=t}},FC=(()=>{let e=class e{_scrollOptionIntoView(n){let r=this.options.toArray()[n];if(r){let o=this.panel.nativeElement,s=Ty(n,this.options,this.optionGroups),a=r._getHostElement();n===0&&s===1?o.scrollTop=0:o.scrollTop=Dy(a.offsetTop,a.offsetHeight,o.scrollTop,o.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(n){return new AO(this,n)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(n){this._hideSingleSelectionIndicator=n,this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(n){this._placeholder=n,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(ey.required)??!1}set required(n){this._required=n,this.stateChanges.next()}get multiple(){return this._multiple}set multiple(n){this._selectionModel,this._multiple=n}get compareWith(){return this._compareWith}set compareWith(n){this._compareWith=n,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(n){this._assignValue(n)&&this._onChange(n)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(n){this._errorStateTracker.matcher=n}get id(){return this._id}set id(n){this._id=n||this._uid,this.stateChanges.next()}get errorState(){return this._errorStateTracker.errorState}set errorState(n){this._errorStateTracker.errorState=n}constructor(n,r,o,s,a,l,c,d,u,h,p,f,m,b){this._viewportRuler=n,this._changeDetectorRef=r,this._elementRef=a,this._dir=l,this._parentFormField=u,this.ngControl=h,this._liveAnnouncer=m,this._defaultOptions=b,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(g,_)=>g===_,this._uid=`mat-select-${oj++}`,this._triggerAriaLabelledBy=null,this._destroy=new me,this.stateChanges=new me,this.disableAutomaticLabeling=!0,this._onChange=()=>{},this._onTouched=()=>{},this._valueId=`mat-select-value-${oj++}`,this._panelDoneAnimatingStream=new me,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this.disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this._initialized=new me,this.optionSelectionChanges=Io(()=>{let g=this.options;return g?g.changes.pipe(pi(g),Xn(()=>Yn(...g.map(_=>_.onSelectionChange)))):this._initialized.pipe(Xn(()=>this.optionSelectionChanges))}),this.openedChange=new Pe,this._openedStream=this.openedChange.pipe(Gt(g=>g),Je(()=>{})),this._closedStream=this.openedChange.pipe(Gt(g=>!g),Je(()=>{})),this.selectionChange=new Pe,this.valueChange=new Pe,this._trackedModal=null,this._skipPredicate=g=>this.panelOpen?!1:g.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),b?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=b.typeaheadDebounceInterval),this._errorStateTracker=new Iy(s,h,d,c,this.stateChanges),this._scrollStrategyFactory=f,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(p)||0,this.id=this.id}ngOnInit(){this._selectionModel=new ef(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(vl(),Xe(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(Xe(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(Xe(this._destroy)).subscribe(n=>{n.added.forEach(r=>r.select()),n.removed.forEach(r=>r.deselect())}),this.options.changes.pipe(pi(null),Xe(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let n=this._getTriggerAriaLabelledby(),r=this.ngControl;if(n!==this._triggerAriaLabelledBy){let o=this._elementRef.nativeElement;this._triggerAriaLabelledBy=n,n?o.setAttribute("aria-labelledby",n):o.removeAttribute("aria-labelledby")}r&&(this._previousControl!==r.control&&(this._previousControl!==void 0&&r.disabled!==null&&r.disabled!==this.disabled&&(this.disabled=r.disabled),this._previousControl=r.control),this.updateErrorState())}ngOnChanges(n){(n.disabled||n.userAriaDescribedBy)&&this.stateChanges.next(),n.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_applyModalPanelOwnership(){let n=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!n)return;let r=`${this.id}-panel`;this._trackedModal&&Wl(this._trackedModal,"aria-owns",r),Ah(n,"aria-owns",r),this._trackedModal=n}_clearFromModal(){if(!this._trackedModal)return;let n=`${this.id}-panel`;Wl(this._trackedModal,"aria-owns",n),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next())}writeValue(n){this._assignValue(n)}registerOnChange(n){this._onChange=n}registerOnTouched(n){this._onTouched=n}setDisabledState(n){this.disabled=n,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let n=this._selectionModel.selected.map(r=>r.viewValue);return this._isRtl()&&n.reverse(),n.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(n){this.disabled||(this.panelOpen?this._handleOpenKeydown(n):this._handleClosedKeydown(n))}_handleClosedKeydown(n){let r=n.keyCode,o=r===40||r===38||r===37||r===39,s=r===13||r===32,a=this._keyManager;if(!a.isTyping()&&s&&!mi(n)||(this.multiple||n.altKey)&&o)n.preventDefault(),this.open();else if(!this.multiple){let l=this.selected;a.onKeydown(n);let c=this.selected;c&&l!==c&&this._liveAnnouncer.announce(c.viewValue,1e4)}}_handleOpenKeydown(n){let r=this._keyManager,o=n.keyCode,s=o===40||o===38,a=r.isTyping();if(s&&n.altKey)n.preventDefault(),this.close();else if(!a&&(o===13||o===32)&&r.activeItem&&!mi(n))n.preventDefault(),r.activeItem._selectViaInteraction();else if(!a&&this._multiple&&o===65&&n.ctrlKey){n.preventDefault();let l=this.options.some(c=>!c.disabled&&!c.selected);this.options.forEach(c=>{c.disabled||(l?c.select():c.deselect())})}else{let l=r.activeItemIndex;r.onKeydown(n),this._multiple&&s&&n.shiftKey&&r.activeItem&&r.activeItemIndex!==l&&r.activeItem._selectViaInteraction()}}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(_n(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(n){if(this.options.forEach(r=>r.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&n)Array.isArray(n),n.forEach(r=>this._selectOptionByValue(r)),this._sortValues();else{let r=this._selectOptionByValue(n);r?this._keyManager.updateActiveItem(r):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(n){let r=this.options.find(o=>{if(this._selectionModel.isSelected(o))return!1;try{return o.value!=null&&this._compareWith(o.value,n)}catch{return!1}});return r&&this._selectionModel.select(r),r}_assignValue(n){return n!==this._value||this._multiple&&Array.isArray(n)?(this.options&&this._setSelectionByValue(n),this._value=n,!0):!1}_getOverlayWidth(n){return this.panelWidth==="auto"?(n instanceof H_?n.elementRef:n||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let n of this.options)n._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Ph(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let n=Yn(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Xe(n)).subscribe(r=>{this._onSelect(r.source,r.isUserInput),r.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Yn(...this.options.map(r=>r._stateChanges)).pipe(Xe(n)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(n,r){let o=this._selectionModel.isSelected(n);n.value==null&&!this._multiple?(n.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(n.value)):(o!==n.selected&&(n.selected?this._selectionModel.select(n):this._selectionModel.deselect(n)),r&&this._keyManager.setActiveItem(n),this.multiple&&(this._sortValues(),r&&this.focus())),o!==this._selectionModel.isSelected(n)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let n=this.options.toArray();this._selectionModel.sort((r,o)=>this.sortComparator?this.sortComparator(r,o,n):n.indexOf(r)-n.indexOf(o)),this.stateChanges.next()}}_propagateChanges(n){let r;this.multiple?r=this.selected.map(o=>o.value):r=this.selected?this.selected.value:n,this._value=r,this.valueChange.emit(r),this._onChange(r),this.selectionChange.emit(this._getChangeEvent(r)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let n=-1;for(let r=0;r0}focus(n){this._elementRef.nativeElement.focus(n)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let n=this._parentFormField?.getLabelId(),r=n?n+" ":"";return this.ariaLabelledby?r+this.ariaLabelledby:n}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let n=this._parentFormField?.getLabelId(),r=(n?n+" ":"")+this._valueId;return this.ariaLabelledby&&(r+=" "+this.ariaLabelledby),r}_panelDoneAnimating(n){this.openedChange.emit(n)}setDescribedByIds(n){n.length?this._elementRef.nativeElement.setAttribute("aria-describedby",n.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}};e.\u0275fac=function(r){return new(r||e)(M(ra),M(Fe),M(Le),M(B3),M(Re),M(ai,8),M(oT,8),M(sT,8),M(X_,8),M(hd,10),ro("tabindex"),M(sj),M(Sy),M(Spe,8))},e.\u0275cmp=le({type:e,selectors:[["mat-select"]],contentQueries:function(r,o,s){if(r&1&&(xi(s,Epe,5),xi(s,ql,5),xi(s,Fh,5)),r&2){let a;be(a=ye())&&(o.customTrigger=a.first),be(a=ye())&&(o.options=a),be(a=ye())&&(o.optionGroups=a)}},viewQuery:function(r,o){if(r&1&&(Ie(ppe,5),Ie(fpe,5),Ie(fO,5)),r&2){let s;be(s=ye())&&(o.trigger=s.first),be(s=ye())&&(o.panel=s.first),be(s=ye())&&(o._overlayDir=s.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(r,o){r&1&&H("keydown",function(a){return o._handleKeydown(a)})("focus",function(){return o._onFocus()})("blur",function(){return o._onBlur()}),r&2&&(Ze("id",o.id)("tabindex",o.disabled?-1:o.tabIndex)("aria-controls",o.panelOpen?o.id+"-panel":null)("aria-expanded",o.panelOpen)("aria-label",o.ariaLabel||null)("aria-required",o.required.toString())("aria-disabled",o.disabled.toString())("aria-invalid",o.errorState)("aria-activedescendant",o._getAriaActiveDescendant()),se("mat-mdc-select-disabled",o.disabled)("mat-mdc-select-invalid",o.errorState)("mat-mdc-select-required",o.required)("mat-mdc-select-empty",o.empty)("mat-mdc-select-multiple",o.multiple))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",at],disableRipple:[2,"disableRipple","disableRipple",at],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?0:wi(n)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",at],placeholder:"placeholder",required:[2,"required","required",at],multiple:[2,"multiple","multiple",at],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",at],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",wi],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],standalone:!0,features:[Bt([{provide:RO,useExisting:e},{provide:Lh,useExisting:e}]),an,dn,ce],ngContentSelectors:gpe,decls:11,vars:8,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"backdropClick","attach","detach","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(r,o){if(r&1){let s=ie();kn(mpe),v(0,"div",2,0),H("click",function(){return V(s),z(o.open())}),v(3,"div",3),W(4,_pe,2,1,"span",4)(5,ype,3,1,"span",5),y(),v(6,"div",6)(7,"div",7),io(),v(8,"svg",8),J(9,"path",9),y()()()(),W(10,xpe,3,9,"ng-template",10),H("backdropClick",function(){return V(s),z(o.close())})("attach",function(){return V(s),z(o._onAttached())})("detach",function(){return V(s),z(o.close())})}if(r&2){let s=ve(1);w(3),Ze("id",o._valueId),w(),ae(o.empty?4:5),w(6),N("cdkConnectedOverlayPanelClass",o._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",o._scrollStrategy)("cdkConnectedOverlayOrigin",o._preferredOverlayOrigin||s)("cdkConnectedOverlayOpen",o.panelOpen)("cdkConnectedOverlayPositions",o._positions)("cdkConnectedOverlayWidth",o._overlayWidth)}},dependencies:[H_,fO,ib],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}div.mat-mdc-select-panel .mat-mdc-option{--mdc-list-list-item-container-color: var(--mat-select-panel-background-color)}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform)}'],encapsulation:2,data:{animation:[wpe.transformPanel]},changeDetection:0});let i=e;return i})();var ua=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[Mpe],imports:[Ae,Jr,Bh,qt,Zo,da,Bh,qt]});let i=e;return i})();var sf=(()=>{class i{changeDetectorRef;pageSize;itemsCount;change=new Pe;curPageIndex=0;constructor(t){this.changeDetectorRef=t}reset(){this.curPageIndex=0,this.changeDetectorRef.markForCheck()}handleClickGoToPrevPage(){this.curPageIndex--,this.curPageIndex=Math.max(0,this.curPageIndex),this.change.emit(this.curPageIndex)}handleClickGoToNextPage(){this.curPageIndex++,this.curPageIndex=Math.min(Math.ceil(this.itemsCount/this.pageSize)-1,this.curPageIndex),this.change.emit(this.curPageIndex)}get disablePrevButton(){return this.curPageIndex===0}get disableNextButton(){return this.curPageIndex===Math.ceil(this.itemsCount/this.pageSize)-1}get curRangeText(){let t=Math.min(this.itemsCount,this.curPageIndex*this.pageSize+1),n=Math.min((this.curPageIndex+1)*this.pageSize,this.itemsCount);return t===n?`${t}`:`${t} - ${n}`}static \u0275fac=function(n){return new(n||i)(M(Fe))};static \u0275cmp=le({type:i,selectors:[["paginator"]],inputs:{pageSize:"pageSize",itemsCount:"itemsCount"},outputs:{change:"change"},standalone:!0,features:[ce],decls:9,vars:5,consts:[[1,"container"],[1,"icon-container","prev-page",3,"click"],[1,"range-text"],[1,"icon-container","next-page",3,"click"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1),H("click",function(){return r.handleClickGoToPrevPage()}),v(2,"mat-icon"),S(3,"chevron_left"),y()(),v(4,"div",2),S(5),y(),v(6,"div",3),H("click",function(){return r.handleClickGoToNextPage()}),v(7,"mat-icon"),S(8,"chevron_right"),y()()()),n&2&&(w(),se("disabled",r.disablePrevButton),w(4),Me(" ",r.curRangeText," "),w(),se("disabled",r.disableNextButton))},dependencies:[Ae,it,gt],styles:[`.container[_ngcontent-%COMP%]{display:flex;align-items:center;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:99px;cursor:pointer}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{background-color:#ddd}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{opacity:1}.container[_ngcontent-%COMP%] .icon-container.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.3}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.7;color:#333;font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .range-text[_ngcontent-%COMP%]{color:#333;font-size:12px;display:flex;align-items:center;justify-content:center} @@ -3726,7 +3726,7 @@ void main() { -`],changeDetection:0})}return i})();var Dpe=["searchInput"],Ppe=["content"];function Ope(i,e){if(i&1){let t=ie();v(0,"div",11),H("click",function(){V(t);let r=I();return z(r.handleClickClearSearchText())}),v(1,"mat-icon",12),S(2,"close"),y()()}}function Rpe(i,e){if(i&1){let t=ie();v(0,"paginator",25),H("change",function(r){V(t);let o=I(2);return z(o.handlePaginatorChanged(r))}),y()}if(i&2){let t=I(2);N("pageSize",t.pageSize)("itemsCount",t.resultsCount)}}function Ape(i,e){if(i&1){let t=ie();v(0,"div",26),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.updateSelectedResultTypes(r))}),v(1,"div",27)(2,"mat-icon"),S(3),y()(),v(4,"div",28),S(5),y()()}if(i&2){let t=e.$implicit;se("selected",t.selected),w(3),nt(t.matchType),w(2),Me(" ",t.label," ")}}function Npe(i,e){if(i&1&&J(0,"io-tree",22),i&2){let t=I(2);N("data",t.curSearchResultsData)("rendererId",t.rendererId)("tooltipPosition","right")("showLocator",!1)}}function kpe(i,e){i&1&&(v(0,"div",23),S(1," No matching results "),y())}function Lpe(i,e){if(i&1&&(v(0,"div",13)(1,"div",14)(2,"div",15)(3,"div",16),S(4),y(),W(5,Rpe,1,2,"paginator",17),y(),v(6,"div",18)(7,"div",19),ln(8,Ape,6,4,"div",20,Qr),y()()(),v(10,"div",21,2),W(12,Npe,1,4,"io-tree",22)(13,kpe,2,0,"div",23),y(),v(14,"div",24)(15,"mat-icon"),S(16,"tips_and_updates"),y(),S(17," Click to locate node. Alt+Click to locate and select node. "),y()()),i&2){let t=I();tn("max-height",t.searchResultsContainerMaxHeight,"px"),w(4),Me(" ",t.searchResultsTitle," "),w(),ae(t.showPaginator?5:-1),w(3),cn(t.searchResultTypes),w(4),ae(t.resultsCount>0?12:13)}}function Fpe(i,e){i&1&&(v(0,"div",29),S(1," No matching results "),y())}function Bpe(i,e){i&1&&(v(0,"div",30),S(1," Use regex to match nodes by label, attributes, input/output node label, and input/output metadata. "),J(2,"br")(3,"br"),S(4," For attributes and I/O metadata, regex will try to match "),v(5,"span",31),S(6),y(),S(7," or "),v(8,"span",31),S(9),y(),S(10,". "),J(11,"br")(12,"br"),S(13," Examples:"),J(14,"br"),v(15,"ul")(16,"li")(17,"span",32),S(18,"axis:"),y(),S(19," will match attributes whose key is "),v(20,"span",31),S(21,"axis"),y(),S(22,". "),y(),v(23,"li")(24,"span",32),S(25,"padding=[SAME|VALID]"),y(),S(26," will match attributes whose key is "),v(27,"span",31),S(28,"padding"),y(),S(29," and value is either "),v(30,"span",31),S(31,"SAME"),y(),S(32," or "),v(33,"span",31),S(34,"VALID"),y(),S(35,". "),y()()()),i&2&&(w(6),Yc("","{","key","}",":","{","value","}",""),w(3),Yc("","{","key","}","=","{","value","}",""))}var cj=(()=>{class i{appService;changeDetectorRef;destroyRef;curModelGraph;rendererId;searchInput;content;curSearchText=new gr("");searchResultTypes=[{matchType:vt.NODE_LABEL,label:"Label",selected:!0},{matchType:vt.ATTRIBUTE,label:"Attrs",selected:!0},{matchType:vt.INPUT_METADATA,label:"Inputs",selected:!0},{matchType:vt.OUTPUT_METADATA,label:"Outputs",selected:!0}];searchResultTypeSelectorOverlaySize={minWidth:0,minHeight:0};searchResultTypeSelectorOverlayPositions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"}];pageSize;curSearchMatchedNodes=[];curSearchMatchData=[];curSearchResultsData;searching=!1;curPageIndex=0;constructor(t,n,r){this.appService=t,this.changeDetectorRef=n,this.destroyRef=r,this.pageSize=this.appService.testMode?12:50,this.curSearchText.valueChanges.pipe(Sn(()=>{this.searching=!0,this.changeDetectorRef.markForCheck()}),To(300),Vi(this.destroyRef)).subscribe(o=>{this.handleSearch((o?.toLowerCase()||"").trim())}),this.appService.searchKeyClicked.pipe(Vi(this.destroyRef)).subscribe(()=>{this.rendererId===this.appService.curSelectedRenderer()?.id&&this.searchInput.nativeElement.focus()})}handleClickClearSearchText(){this.curSearchText.setValue(""),this.handleSearch("")}updateSelectedResultTypes(t){t.selected=!t.selected,this.changeDetectorRef.markForCheck(),this.handleSearch(this.curSearchText.value||""),setTimeout(()=>{this.content.nativeElement.scrollTop=0})}handlePaginatorChanged(t){this.curPageIndex=t,this.updatePagedResults()}getDisableSearchResultTypeOption(t){return this.searchResultTypes.filter(n=>n.selected).length===1&&t.selected}get searchResultsTitle(){let t=this.curSearchMatchedNodes?.length||0;return`${t} result${t===1?"":"s"}`}get showClearButton(){return(this.curSearchText.value||"").trim()!==""}get showResultsPanel(){return!this.searching&&(this.curSearchText.value||"").trim()!==""&&!this.showNoMatches}get showNoMatches(){return!this.searching&&(this.curSearchText.value||"").trim()!==""&&this.curSearchMatchedNodes.length===0&&this.searchResultTypes.every(t=>t.selected)}get resultsCount(){return this.curSearchMatchedNodes.length}get searchResultsContainerMaxHeight(){return document.body.offsetHeight-300}get showPaginator(){return this.resultsCount>this.pageSize}handleSearch(t){if(!t){this.curPageIndex=0,this.curSearchResultsData=void 0,this.curSearchMatchedNodes=[],this.changeDetectorRef.markForCheck(),this.searching=!1,this.appService.clearSearchResults(this.rendererId);return}let n=[],r=[],o={results:{}},s=new Set(this.searchResultTypes.filter(a=>a.selected).map(a=>a.matchType));try{let a=new RegExp(t,"i");for(let l of this.curModelGraph.nodes){if(Et(l)&&l.hideInLayout)continue;let{matches:c,matchTypes:d}=qI(s,a,l,this.curModelGraph);c.length>0&&(n.push(l),r.push({matches:c,matchTypes:d}),o.results[l.id]=c)}this.appService.setSearchResults(this.rendererId,o)}catch(a){console.warn("Failed to search",a)}this.curPageIndex=0,this.curSearchMatchedNodes=[...n],this.curSearchMatchData=r,this.updatePagedResults(),this.searching=!1,this.changeDetectorRef.markForCheck()}updatePagedResults(){this.curSearchResultsData=cl(this.curSearchMatchedNodes.slice(this.curPageIndex*this.pageSize,(this.curPageIndex+1)*this.pageSize),[],"incoming",void 0,this.curSearchMatchData.slice(this.curPageIndex*this.pageSize,(this.curPageIndex+1)*this.pageSize))}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe),M(Ni))};static \u0275cmp=le({type:i,selectors:[["search-bar"]],viewQuery:function(n,r){if(n&1&&(Ie(Dpe,5),Ie(Ppe,5)),n&2){let o;be(o=ye())&&(r.searchInput=o.first),be(o=ye())&&(r.content=o.first)}},inputs:{curModelGraph:"curModelGraph",rendererId:"rendererId"},standalone:!0,features:[ce],decls:14,vars:6,consts:[["searchInput",""],["helpPopup",""],["content",""],[1,"container"],[1,"input-container"],[1,"search"],["placeholder","Search nodes/layers by regex",3,"formControl"],["class","btn-clear-container",3,"click",4,"ngIf"],[1,"icon-container",3,"bubble","hoverDelayMs"],["class","search-results-container",3,"max-height",4,"ngIf"],["class","no-matches",4,"ngIf"],[1,"btn-clear-container",3,"click"],[1,"clear"],[1,"search-results-container"],[1,"title-container"],[1,"title"],[1,"title-label"],[3,"pageSize","itemsCount"],[1,"search-result-type-selector-container"],[1,"options-container"],[1,"option-container",3,"selected"],[1,"content"],[3,"data","rendererId","tooltipPosition","showLocator"],[1,"empty-results"],[1,"footer"],[3,"change","pageSize","itemsCount"],[1,"option-container",3,"click"],[1,"icon-container"],[1,"option-label"],[1,"no-matches"],[1,"model-explorer-search-help-popup"],[1,"code"],[1,"code","regex"]],template:function(n,r){if(n&1&&(v(0,"div",3)(1,"div",4)(2,"mat-icon",5),S(3,"search"),y(),J(4,"input",6,0),W(6,Ope,3,0,"div",7),v(7,"div",8)(8,"mat-icon"),S(9,"help_outline"),y()()(),W(10,Lpe,18,5,"div",9)(11,Fpe,2,0,"div",10),y(),W(12,Bpe,36,8,"ng-template",null,1,kt)),n&2){let o=ve(13);w(4),N("formControl",r.curSearchText),w(2),N("ngIf",r.showClearButton),w(),N("bubble",o)("hoverDelayMs",100),w(3),N("ngIf",r.showResultsPanel),w(),N("ngIf",r.showNoMatches)}},dependencies:[$n,Ae,Mn,xc,NC,it,gt,ua,sf,_r,js,zo,ho],styles:[`.container[_ngcontent-%COMP%]{position:relative;overflow:visible;background-color:#fff;border-radius:99px;height:30px;display:flex;align-items:center;padding:0 8px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:250px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.search[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]{opacity:.6;cursor:pointer}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:24px;border:none;outline:none;box-sizing:border-box;padding:0 4px;font-size:12px;flex-grow:1}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-clear-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#999;opacity:.8}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]:has(input:focus) mat-icon.search[_ngcontent-%COMP%]{color:#1a73e8}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%]{overflow:hidden;position:absolute;top:calc(100% + 12px);left:-4px;border:1px solid #ccc;border-radius:4px;width:380px;display:flex;flex-direction:column;background-color:#fff;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{background-color:#f6f6f6;border-bottom:1px solid #ddd;box-sizing:border-box;padding:0 10px 10px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{height:28px;min-height:28px;font-size:12px;display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-label[_ngcontent-%COMP%]{white-space:nowrap}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex-grow:1;min-height:0;overflow-y:auto;padding-bottom:6px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .empty-results[_ngcontent-%COMP%]{padding:12px 8px 6px;display:flex;align-items:center;font-size:12px;color:#ccc}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:12px;margin-top:2px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .options-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;border:1px solid #ccc;padding:4px 14px;border-radius:6px;background-color:#fff;color:#474747}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container.selected[_ngcontent-%COMP%]{border-color:#a3c9ff;background-color:#a3c9ff;color:#001d35}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#001d35}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:18px;height:18px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin-right:4px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#474747}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif;letter-spacing:normal}.container[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{height:32px;min-height:32px;background-color:#f6f6f6;border-top:1px solid #ddd;box-sizing:border-box;padding:0 10px;font-size:12px;display:flex;align-items:center;color:#777}.container[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;color:#777;margin-right:4px}.container[_ngcontent-%COMP%] .no-matches[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 12px);left:-4px;color:#999;padding:8px;border:1px solid #ccc;border-radius:4px;background-color:#fff;font-size:12px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a} .model-explorer-search-help-popup{padding:12px;font-size:12px;background-color:#fff} .model-explorer-search-help-popup ul{margin-block-end:0} .model-explorer-search-help-popup .code{display:inline-block;background-color:#fffdd0;font-family:monospace} .model-explorer-search-help-popup .code.regex{background-color:#e6d0ff} +`],changeDetection:0})}return i})();var Tpe=["searchInput"],Dpe=["content"];function Ppe(i,e){if(i&1){let t=ie();v(0,"div",11),H("click",function(){V(t);let r=I();return z(r.handleClickClearSearchText())}),v(1,"mat-icon",12),S(2,"close"),y()()}}function Ope(i,e){if(i&1){let t=ie();v(0,"paginator",25),H("change",function(r){V(t);let o=I(2);return z(o.handlePaginatorChanged(r))}),y()}if(i&2){let t=I(2);N("pageSize",t.pageSize)("itemsCount",t.resultsCount)}}function Rpe(i,e){if(i&1){let t=ie();v(0,"div",26),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.updateSelectedResultTypes(r))}),v(1,"div",27)(2,"mat-icon"),S(3),y()(),v(4,"div",28),S(5),y()()}if(i&2){let t=e.$implicit;se("selected",t.selected),w(3),nt(t.matchType),w(2),Me(" ",t.label," ")}}function Ape(i,e){if(i&1&&J(0,"io-tree",22),i&2){let t=I(2);N("data",t.curSearchResultsData)("rendererId",t.rendererId)("tooltipPosition","right")("showLocator",!1)}}function Npe(i,e){i&1&&(v(0,"div",23),S(1," No matching results "),y())}function kpe(i,e){if(i&1&&(v(0,"div",13)(1,"div",14)(2,"div",15)(3,"div",16),S(4),y(),W(5,Ope,1,2,"paginator",17),y(),v(6,"div",18)(7,"div",19),ln(8,Rpe,6,4,"div",20,Qr),y()()(),v(10,"div",21,2),W(12,Ape,1,4,"io-tree",22)(13,Npe,2,0,"div",23),y(),v(14,"div",24)(15,"mat-icon"),S(16,"tips_and_updates"),y(),S(17," Click to locate node. Alt+Click to locate and select node. "),y()()),i&2){let t=I();tn("max-height",t.searchResultsContainerMaxHeight,"px"),w(4),Me(" ",t.searchResultsTitle," "),w(),ae(t.showPaginator?5:-1),w(3),cn(t.searchResultTypes),w(4),ae(t.resultsCount>0?12:13)}}function Lpe(i,e){i&1&&(v(0,"div",29),S(1," No matching results "),y())}function Fpe(i,e){i&1&&(v(0,"div",30),S(1," Use regex to match nodes by label, attributes, input/output node label, and input/output metadata. "),J(2,"br")(3,"br"),S(4," For attributes and I/O metadata, regex will try to match "),v(5,"span",31),S(6),y(),S(7," or "),v(8,"span",31),S(9),y(),S(10,". "),J(11,"br")(12,"br"),S(13," Examples:"),J(14,"br"),v(15,"ul")(16,"li")(17,"span",32),S(18,"axis:"),y(),S(19," will match attributes whose key is "),v(20,"span",31),S(21,"axis"),y(),S(22,". "),y(),v(23,"li")(24,"span",32),S(25,"padding=[SAME|VALID]"),y(),S(26," will match attributes whose key is "),v(27,"span",31),S(28,"padding"),y(),S(29," and value is either "),v(30,"span",31),S(31,"SAME"),y(),S(32," or "),v(33,"span",31),S(34,"VALID"),y(),S(35,". "),y()()()),i&2&&(w(6),Yc("","{","key","}",":","{","value","}",""),w(3),Yc("","{","key","}","=","{","value","}",""))}var aj=(()=>{class i{appService;changeDetectorRef;destroyRef;curModelGraph;rendererId;searchInput;content;curSearchText=new gr("");searchResultTypes=[{matchType:vt.NODE_LABEL,label:"Label",selected:!0},{matchType:vt.ATTRIBUTE,label:"Attrs",selected:!0},{matchType:vt.INPUT_METADATA,label:"Inputs",selected:!0},{matchType:vt.OUTPUT_METADATA,label:"Outputs",selected:!0}];searchResultTypeSelectorOverlaySize={minWidth:0,minHeight:0};searchResultTypeSelectorOverlayPositions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"}];pageSize;curSearchMatchedNodes=[];curSearchMatchData=[];curSearchResultsData;searching=!1;curPageIndex=0;constructor(t,n,r){this.appService=t,this.changeDetectorRef=n,this.destroyRef=r,this.pageSize=this.appService.testMode?12:50,this.curSearchText.valueChanges.pipe(Sn(()=>{this.searching=!0,this.changeDetectorRef.markForCheck()}),To(300),Vi(this.destroyRef)).subscribe(o=>{this.handleSearch((o?.toLowerCase()||"").trim())}),this.appService.searchKeyClicked.pipe(Vi(this.destroyRef)).subscribe(()=>{this.rendererId===this.appService.curSelectedRenderer()?.id&&this.searchInput.nativeElement.focus()})}handleClickClearSearchText(){this.curSearchText.setValue(""),this.handleSearch("")}updateSelectedResultTypes(t){t.selected=!t.selected,this.changeDetectorRef.markForCheck(),this.handleSearch(this.curSearchText.value||""),setTimeout(()=>{this.content.nativeElement.scrollTop=0})}handlePaginatorChanged(t){this.curPageIndex=t,this.updatePagedResults()}getDisableSearchResultTypeOption(t){return this.searchResultTypes.filter(n=>n.selected).length===1&&t.selected}get searchResultsTitle(){let t=this.curSearchMatchedNodes?.length||0;return`${t} result${t===1?"":"s"}`}get showClearButton(){return(this.curSearchText.value||"").trim()!==""}get showResultsPanel(){return!this.searching&&(this.curSearchText.value||"").trim()!==""&&!this.showNoMatches}get showNoMatches(){return!this.searching&&(this.curSearchText.value||"").trim()!==""&&this.curSearchMatchedNodes.length===0&&this.searchResultTypes.every(t=>t.selected)}get resultsCount(){return this.curSearchMatchedNodes.length}get searchResultsContainerMaxHeight(){return document.body.offsetHeight-300}get showPaginator(){return this.resultsCount>this.pageSize}handleSearch(t){if(!t){this.curPageIndex=0,this.curSearchResultsData=void 0,this.curSearchMatchedNodes=[],this.changeDetectorRef.markForCheck(),this.searching=!1,this.appService.clearSearchResults(this.rendererId);return}let n=[],r=[],o={results:{}},s=new Set(this.searchResultTypes.filter(a=>a.selected).map(a=>a.matchType));try{let a=new RegExp(t,"i");for(let l of this.curModelGraph.nodes){if(Et(l)&&l.hideInLayout)continue;let{matches:c,matchTypes:d}=$I(s,a,l,this.curModelGraph);c.length>0&&(n.push(l),r.push({matches:c,matchTypes:d}),o.results[l.id]=c)}this.appService.setSearchResults(this.rendererId,o)}catch(a){console.warn("Failed to search",a)}this.curPageIndex=0,this.curSearchMatchedNodes=[...n],this.curSearchMatchData=r,this.updatePagedResults(),this.searching=!1,this.changeDetectorRef.markForCheck()}updatePagedResults(){this.curSearchResultsData=cl(this.curSearchMatchedNodes.slice(this.curPageIndex*this.pageSize,(this.curPageIndex+1)*this.pageSize),[],"incoming",void 0,this.curSearchMatchData.slice(this.curPageIndex*this.pageSize,(this.curPageIndex+1)*this.pageSize))}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe),M(Ni))};static \u0275cmp=le({type:i,selectors:[["search-bar"]],viewQuery:function(n,r){if(n&1&&(Ie(Tpe,5),Ie(Dpe,5)),n&2){let o;be(o=ye())&&(r.searchInput=o.first),be(o=ye())&&(r.content=o.first)}},inputs:{curModelGraph:"curModelGraph",rendererId:"rendererId"},standalone:!0,features:[ce],decls:14,vars:6,consts:[["searchInput",""],["helpPopup",""],["content",""],[1,"container"],[1,"input-container"],[1,"search"],["placeholder","Search nodes/layers by regex",3,"formControl"],["class","btn-clear-container",3,"click",4,"ngIf"],[1,"icon-container",3,"bubble","hoverDelayMs"],["class","search-results-container",3,"max-height",4,"ngIf"],["class","no-matches",4,"ngIf"],[1,"btn-clear-container",3,"click"],[1,"clear"],[1,"search-results-container"],[1,"title-container"],[1,"title"],[1,"title-label"],[3,"pageSize","itemsCount"],[1,"search-result-type-selector-container"],[1,"options-container"],[1,"option-container",3,"selected"],[1,"content"],[3,"data","rendererId","tooltipPosition","showLocator"],[1,"empty-results"],[1,"footer"],[3,"change","pageSize","itemsCount"],[1,"option-container",3,"click"],[1,"icon-container"],[1,"option-label"],[1,"no-matches"],[1,"model-explorer-search-help-popup"],[1,"code"],[1,"code","regex"]],template:function(n,r){if(n&1&&(v(0,"div",3)(1,"div",4)(2,"mat-icon",5),S(3,"search"),y(),J(4,"input",6,0),W(6,Ppe,3,0,"div",7),v(7,"div",8)(8,"mat-icon"),S(9,"help_outline"),y()()(),W(10,kpe,18,5,"div",9)(11,Lpe,2,0,"div",10),y(),W(12,Fpe,36,8,"ng-template",null,1,kt)),n&2){let o=ve(13);w(4),N("formControl",r.curSearchText),w(2),N("ngIf",r.showClearButton),w(),N("bubble",o)("hoverDelayMs",100),w(3),N("ngIf",r.showResultsPanel),w(),N("ngIf",r.showNoMatches)}},dependencies:[$n,Ae,Mn,xc,NC,it,gt,ua,sf,_r,js,zo,ho],styles:[`.container[_ngcontent-%COMP%]{position:relative;overflow:visible;background-color:#fff;border-radius:99px;height:30px;display:flex;align-items:center;padding:0 8px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:250px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.search[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]{opacity:.6;cursor:pointer}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:24px;border:none;outline:none;box-sizing:border-box;padding:0 4px;font-size:12px;flex-grow:1}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-clear-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#999;opacity:.8}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]:has(input:focus) mat-icon.search[_ngcontent-%COMP%]{color:#1a73e8}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%]{overflow:hidden;position:absolute;top:calc(100% + 12px);left:-4px;border:1px solid #ccc;border-radius:4px;width:380px;display:flex;flex-direction:column;background-color:#fff;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{background-color:#f6f6f6;border-bottom:1px solid #ddd;box-sizing:border-box;padding:0 10px 10px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{height:28px;min-height:28px;font-size:12px;display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-label[_ngcontent-%COMP%]{white-space:nowrap}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex-grow:1;min-height:0;overflow-y:auto;padding-bottom:6px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .empty-results[_ngcontent-%COMP%]{padding:12px 8px 6px;display:flex;align-items:center;font-size:12px;color:#ccc}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:12px;margin-top:2px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .options-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;border:1px solid #ccc;padding:4px 14px;border-radius:6px;background-color:#fff;color:#474747}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container.selected[_ngcontent-%COMP%]{border-color:#a3c9ff;background-color:#a3c9ff;color:#001d35}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#001d35}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:18px;height:18px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin-right:4px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#474747}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif;letter-spacing:normal}.container[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{height:32px;min-height:32px;background-color:#f6f6f6;border-top:1px solid #ddd;box-sizing:border-box;padding:0 10px;font-size:12px;display:flex;align-items:center;color:#777}.container[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;color:#777;margin-right:4px}.container[_ngcontent-%COMP%] .no-matches[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 12px);left:-4px;color:#999;padding:8px;border:1px solid #ccc;border-radius:4px;background-color:#fff;font-size:12px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a} .model-explorer-search-help-popup{padding:12px;font-size:12px;background-color:#fff} .model-explorer-search-help-popup ul{margin-block-end:0} .model-explorer-search-help-popup .code{display:inline-block;background-color:#fffdd0;font-family:monospace} .model-explorer-search-help-popup .code.regex{background-color:#e6d0ff} @@ -3744,7 +3744,7 @@ void main() { -`],changeDetection:0})}return i})();var Vpe=["dialog"],zpe=["trigger"];function Upe(i,e){i&1&&S(0," Maximum state count reached ")}function Hpe(i,e){i&1&&S(0," Save the current graph state ")}function Gpe(i,e){if(i&1&&(v(0,"div",7),W(1,Upe,1,0)(2,Hpe,1,0),v(3,"div",8),S(4," The saved state can be restored by clicking the corresponding state number. You can save up to 9 states. "),y()()),i&2){let t=I();w(),ae(t.disableAddSnapshotButton?1:2)}}function jpe(i,e){if(i&1){let t=ie();v(0,"div",12)(1,"div",13)(2,"div"),S(3),y(),v(4,"div",14),H("click",function(){V(t);let r=I().index,o=I(2);return z(o.handleClickDeleteSnapshot(r))}),v(5,"mat-icon"),S(6,"delete"),y(),S(7," Delete "),y()(),J(8,"canvas"),y()}if(i&2){let t=I(),n=t.$implicit,r=t.index,o=I(2);w(3),Me("Shortcut key: ",r+1,""),w(5),tn("width",o.getSnapshotCanvasWidth(n,!0),"px")("height",o.getSnapshotCanvasHeight(n,!0),"px")}}function Wpe(i,e){if(i&1){let t=ie();v(0,"div",11,1),H("opened",function(){let r=V(t).$implicit,o=I(2);return z(o.handleSnapshotPopupOpened(r))})("click",function(){let r=V(t).index,o=I(2);return z(o.handleClickSnapshot(r))}),S(3),W(4,jpe,9,5,"ng-template",null,2,kt),y()}if(i&2){let t=e.index,n=ve(5),r=I(2);N("bubble",n)("overlaySize",r.snapshotPopupSize)("overlayPositions",r.snapshotPopupPosition)("hoverDelayMs",150),w(3),Me(" ",t+1," ")}}function $pe(i,e){if(i&1&&(v(0,"div",9),W(1,Wpe,6,5,"div",10),y()),i&2){let t=I();w(),N("ngForOf",t.curSnapshots)("ngForTrackBy",t.trackBySnapshotId)}}var qpe=new Set(["1","2","3","4","5","6","7","8","9"]),dj=(()=>{class i{appService;changeDetectorRef;paneId;rendererId;snapshotPopups=new Yi;snapshotTriggers=new Yi;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};snapshotPopupSize={maxWidth:1e3,maxHeight:1e3};snapshotPopupPosition=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top",offsetY:12}];curSnapshots=[];curModelGraph;constructor(t,n){this.appService=t,this.changeDetectorRef=n,mt(()=>{let r=this.appService.getPaneById(this.paneId);this.curModelGraph=r?.modelGraph,r?.modelGraph!=null&&(this.curSnapshots=(r?.snapshots||{})[r.modelGraph.id]||[],this.changeDetectorRef.markForCheck())})}handleKeyboardEvent(t){if(qpe.has(t.key)&&this.appService.curSelectedRenderer()?.id===this.rendererId&&!Xb()){let n=Number(t.key)-1;if(n<=this.curSnapshots.length-1){this.handleClickSnapshot(n);let r=this.snapshotTriggers.get(n)?.nativeElement;r&&(r.classList.add("clicked"),setTimeout(()=>{r.classList.remove("clicked")},50))}}}handleClickAddSnapshot(){this.disableAddSnapshotButton||this.appService.addSnapshotClicked.next({rendererId:this.rendererId})}handleClickSnapshot(t){let n=this.curSnapshots[t];this.snapshotPopups.get(t)?.closeDialog(),this.appService.curSnapshotToRestore.next({snapshot:n,rendererId:this.rendererId})}handleClickDeleteSnapshot(t){this.curModelGraph&&this.appService.deleteSnapshot(t,this.curModelGraph.id,this.paneId)}handleSnapshotPopupOpened(t){let n=document.querySelector(".model-explorer-snapshot-popup canvas"),r=this.getSnapshotCanvasWidth(t),o=this.getSnapshotCanvasHeight(t);n.width=r,n.height=o;let s=n.getContext("2d");s.imageSmoothingQuality="high",s.drawImage(t.imageBitmap,0,0,r,o),n.classList.add("show")}getSnapshotCanvasWidth(t,n=!1){return t.imageBitmap.width/(n?window.devicePixelRatio:1)}getSnapshotCanvasHeight(t,n=!1){return t.imageBitmap.height/(n?window.devicePixelRatio:1)}trackBySnapshotId(t,n){return n.id}get addSnapshotTooltip(){return this.disableAddSnapshotButton?"Maximum bookmark count reached":"Bookmark the current graph states to restore later"}get disableAddSnapshotButton(){return this.curSnapshots.length>=9}get hasSnapshots(){return this.curSnapshots.length>0}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["snapshot-manager"]],viewQuery:function(n,r){if(n&1&&(Ie(Vpe,5),Ie(zpe,5)),n&2){let o;be(o=ye())&&(r.snapshotPopups=o),be(o=ye())&&(r.snapshotTriggers=o)}},hostBindings:function(n,r){n&1&&H("keypress",function(s){return r.handleKeyboardEvent(s)},!1,H0)},inputs:{paneId:"paneId",rendererId:"rendererId"},standalone:!0,features:[ce],decls:7,vars:6,consts:[["help",""],["dialog","bubble","trigger",""],["snapshotPopup",""],[1,"container"],[1,"mat-icon-container","take-snapshot",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon"],["class","snapshots-container",4,"ngIf"],[1,"model-explorer-help-popup"],[1,"description"],[1,"snapshots-container"],["class","snapshot",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","opened","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"snapshot",3,"opened","click","bubble","overlaySize","overlayPositions","hoverDelayMs"],[1,"model-explorer-snapshot-popup"],[1,"info-row"],[1,"icon-container","delete",3,"click"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",3)(1,"div",4),H("click",function(){return V(o),z(r.handleClickAddSnapshot())}),v(2,"mat-icon",5),S(3,"bookmark_add"),y()(),W(4,Gpe,5,1,"ng-template",null,0,kt)(6,$pe,2,2,"div",6),y()}if(n&2){let o=ve(5);w(),se("disabled",r.disableAddSnapshotButton),N("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),N("ngIf",r.hasSnapshots)}},dependencies:[$n,Ae,Ci,Mn,it,gt,Jt],styles:[`.container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:3px}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;height:24px;display:flex;align-items:center;justify-content:center;cursor:pointer}.container[_ngcontent-%COMP%] .mat-icon-container.disabled[_ngcontent-%COMP%]{cursor:default;opacity:.5}.container[_ngcontent-%COMP%] .mat-icon-container.disabled[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]:hover{opacity:.6}.container[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;opacity:.6}.container[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:11px;margin-left:6px;margin-right:6px;gap:2px}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot[_ngcontent-%COMP%]{width:16px;height:16px;border-radius:8px;background-color:#7cacf8;color:#fff;box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-weight:500;cursor:pointer}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot[_ngcontent-%COMP%]:hover, .container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot.clicked[_ngcontent-%COMP%]{background-color:#0b57d0;color:#fff} .model-explorer-snapshot-popup{font-size:11px;line-height:12px;background-color:#fff} .model-explorer-snapshot-popup .info-row{color:#333;display:flex;align-items:center;justify-content:space-between;background-color:#f6f6f6;padding:4px 8px;border-bottom:1px solid #ddd} .model-explorer-snapshot-popup .info-row .icon-container{display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.8} .model-explorer-snapshot-popup .info-row .icon-container:hover{opacity:1} .model-explorer-snapshot-popup .info-row .icon-container mat-icon{font-size:18px;width:18px;height:19px} .model-explorer-snapshot-popup canvas{opacity:0;transition:opacity .2s ease-out} .model-explorer-snapshot-popup canvas.show{opacity:1} +`],changeDetection:0})}return i})();var Bpe=["dialog"],Vpe=["trigger"];function zpe(i,e){i&1&&S(0," Maximum state count reached ")}function Upe(i,e){i&1&&S(0," Save the current graph state ")}function Hpe(i,e){if(i&1&&(v(0,"div",7),W(1,zpe,1,0)(2,Upe,1,0),v(3,"div",8),S(4," The saved state can be restored by clicking the corresponding state number. You can save up to 9 states. "),y()()),i&2){let t=I();w(),ae(t.disableAddSnapshotButton?1:2)}}function Gpe(i,e){if(i&1){let t=ie();v(0,"div",12)(1,"div",13)(2,"div"),S(3),y(),v(4,"div",14),H("click",function(){V(t);let r=I().index,o=I(2);return z(o.handleClickDeleteSnapshot(r))}),v(5,"mat-icon"),S(6,"delete"),y(),S(7," Delete "),y()(),J(8,"canvas"),y()}if(i&2){let t=I(),n=t.$implicit,r=t.index,o=I(2);w(3),Me("Shortcut key: ",r+1,""),w(5),tn("width",o.getSnapshotCanvasWidth(n,!0),"px")("height",o.getSnapshotCanvasHeight(n,!0),"px")}}function jpe(i,e){if(i&1){let t=ie();v(0,"div",11,1),H("opened",function(){let r=V(t).$implicit,o=I(2);return z(o.handleSnapshotPopupOpened(r))})("click",function(){let r=V(t).index,o=I(2);return z(o.handleClickSnapshot(r))}),S(3),W(4,Gpe,9,5,"ng-template",null,2,kt),y()}if(i&2){let t=e.index,n=ve(5),r=I(2);N("bubble",n)("overlaySize",r.snapshotPopupSize)("overlayPositions",r.snapshotPopupPosition)("hoverDelayMs",150),w(3),Me(" ",t+1," ")}}function Wpe(i,e){if(i&1&&(v(0,"div",9),W(1,jpe,6,5,"div",10),y()),i&2){let t=I();w(),N("ngForOf",t.curSnapshots)("ngForTrackBy",t.trackBySnapshotId)}}var $pe=new Set(["1","2","3","4","5","6","7","8","9"]),lj=(()=>{class i{appService;changeDetectorRef;paneId;rendererId;snapshotPopups=new Yi;snapshotTriggers=new Yi;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};snapshotPopupSize={maxWidth:1e3,maxHeight:1e3};snapshotPopupPosition=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top",offsetY:12}];curSnapshots=[];curModelGraph;constructor(t,n){this.appService=t,this.changeDetectorRef=n,mt(()=>{let r=this.appService.getPaneById(this.paneId);this.curModelGraph=r?.modelGraph,r?.modelGraph!=null&&(this.curSnapshots=(r?.snapshots||{})[r.modelGraph.id]||[],this.changeDetectorRef.markForCheck())})}handleKeyboardEvent(t){if($pe.has(t.key)&&this.appService.curSelectedRenderer()?.id===this.rendererId&&!Zb()){let n=Number(t.key)-1;if(n<=this.curSnapshots.length-1){this.handleClickSnapshot(n);let r=this.snapshotTriggers.get(n)?.nativeElement;r&&(r.classList.add("clicked"),setTimeout(()=>{r.classList.remove("clicked")},50))}}}handleClickAddSnapshot(){this.disableAddSnapshotButton||this.appService.addSnapshotClicked.next({rendererId:this.rendererId})}handleClickSnapshot(t){let n=this.curSnapshots[t];this.snapshotPopups.get(t)?.closeDialog(),this.appService.curSnapshotToRestore.next({snapshot:n,rendererId:this.rendererId})}handleClickDeleteSnapshot(t){this.curModelGraph&&this.appService.deleteSnapshot(t,this.curModelGraph.id,this.paneId)}handleSnapshotPopupOpened(t){let n=document.querySelector(".model-explorer-snapshot-popup canvas"),r=this.getSnapshotCanvasWidth(t),o=this.getSnapshotCanvasHeight(t);n.width=r,n.height=o;let s=n.getContext("2d");s.imageSmoothingQuality="high",s.drawImage(t.imageBitmap,0,0,r,o),n.classList.add("show")}getSnapshotCanvasWidth(t,n=!1){return t.imageBitmap.width/(n?window.devicePixelRatio:1)}getSnapshotCanvasHeight(t,n=!1){return t.imageBitmap.height/(n?window.devicePixelRatio:1)}trackBySnapshotId(t,n){return n.id}get addSnapshotTooltip(){return this.disableAddSnapshotButton?"Maximum bookmark count reached":"Bookmark the current graph states to restore later"}get disableAddSnapshotButton(){return this.curSnapshots.length>=9}get hasSnapshots(){return this.curSnapshots.length>0}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["snapshot-manager"]],viewQuery:function(n,r){if(n&1&&(Ie(Bpe,5),Ie(Vpe,5)),n&2){let o;be(o=ye())&&(r.snapshotPopups=o),be(o=ye())&&(r.snapshotTriggers=o)}},hostBindings:function(n,r){n&1&&H("keypress",function(s){return r.handleKeyboardEvent(s)},!1,G0)},inputs:{paneId:"paneId",rendererId:"rendererId"},standalone:!0,features:[ce],decls:7,vars:6,consts:[["help",""],["dialog","bubble","trigger",""],["snapshotPopup",""],[1,"container"],[1,"mat-icon-container","take-snapshot",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon"],["class","snapshots-container",4,"ngIf"],[1,"model-explorer-help-popup"],[1,"description"],[1,"snapshots-container"],["class","snapshot",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","opened","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"snapshot",3,"opened","click","bubble","overlaySize","overlayPositions","hoverDelayMs"],[1,"model-explorer-snapshot-popup"],[1,"info-row"],[1,"icon-container","delete",3,"click"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",3)(1,"div",4),H("click",function(){return V(o),z(r.handleClickAddSnapshot())}),v(2,"mat-icon",5),S(3,"bookmark_add"),y()(),W(4,Hpe,5,1,"ng-template",null,0,kt)(6,Wpe,2,2,"div",6),y()}if(n&2){let o=ve(5);w(),se("disabled",r.disableAddSnapshotButton),N("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),N("ngIf",r.hasSnapshots)}},dependencies:[$n,Ae,Ci,Mn,it,gt,Jt],styles:[`.container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:3px}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;height:24px;display:flex;align-items:center;justify-content:center;cursor:pointer}.container[_ngcontent-%COMP%] .mat-icon-container.disabled[_ngcontent-%COMP%]{cursor:default;opacity:.5}.container[_ngcontent-%COMP%] .mat-icon-container.disabled[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]:hover{opacity:.6}.container[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;opacity:.6}.container[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:11px;margin-left:6px;margin-right:6px;gap:2px}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot[_ngcontent-%COMP%]{width:16px;height:16px;border-radius:8px;background-color:#7cacf8;color:#fff;box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-weight:500;cursor:pointer}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot[_ngcontent-%COMP%]:hover, .container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot.clicked[_ngcontent-%COMP%]{background-color:#0b57d0;color:#fff} .model-explorer-snapshot-popup{font-size:11px;line-height:12px;background-color:#fff} .model-explorer-snapshot-popup .info-row{color:#333;display:flex;align-items:center;justify-content:space-between;background-color:#f6f6f6;padding:4px 8px;border-bottom:1px solid #ddd} .model-explorer-snapshot-popup .info-row .icon-container{display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.8} .model-explorer-snapshot-popup .info-row .icon-container:hover{opacity:1} .model-explorer-snapshot-popup .info-row .icon-container mat-icon{font-size:18px;width:18px;height:19px} .model-explorer-snapshot-popup canvas{opacity:0;transition:opacity .2s ease-out} .model-explorer-snapshot-popup canvas.show{opacity:1} @@ -3762,7 +3762,7 @@ void main() { -`],changeDetection:0})}return i})();function Ype(i,e){i&1&&(v(0,"mat-icon",2),S(1,"chevron_right"),y())}function Xpe(i,e){if(i&1){let t=ie();v(0,"div",1),H("click",function(){let r=V(t).$index,o=I();return z(o.handleClickItem(r))}),S(1),y(),W(2,Ype,2,0,"mat-icon",2)}if(i&2){let t=e.$implicit,n=e.$index,r=I();se("current",n===r.curSubgraphBreadcrumbs.length-1),w(),Me(" ",t.graphId," "),w(),ae(n!==r.curSubgraphBreadcrumbs.length-1?2:-1)}}var uj=(()=>{class i{appService;changeDetectorRef;paneId;curSubgraphBreadcrumbs=[];savedSubgraphBreadcrumbs;constructor(t,n){this.appService=t,this.changeDetectorRef=n,mt(()=>{let o=this.appService.getPaneById(this.paneId)?.subgraphBreadcrumbs;o!==this.savedSubgraphBreadcrumbs&&(this.savedSubgraphBreadcrumbs=o,this.curSubgraphBreadcrumbs=o||[],this.changeDetectorRef.markForCheck())})}handleClickItem(t){if(t===this.curSubgraphBreadcrumbs.length-1)return;this.appService.setCurrentSubgraphBreadcrumb(this.paneId,t);let n=this.curSubgraphBreadcrumbs[t],r=n.snapshot;if(r)if(n.graphId===this.appService.getPaneById(this.paneId)?.modelGraph?.id)this.appService.curSnapshotToRestore.next({rendererId:this.paneId,snapshot:r});else{let o=this.appService.getGraphById(n.graphId);o&&this.appService.selectGraphInCurrentPane(o,r.flattenLayers,r)}}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["subgraph-breadcrumbs"]],inputs:{paneId:"paneId"},standalone:!0,features:[ce],decls:3,vars:0,consts:[[1,"container"],[1,"item",3,"click"],[1,"separator"]],template:function(n,r){n&1&&(v(0,"div",0),ln(1,Xpe,3,4,null,null,Qr),y()),n&2&&(w(),cn(r.curSubgraphBreadcrumbs))},dependencies:[Ae,it,gt,Jt],styles:[`.container[_ngcontent-%COMP%]{border:1px solid #3876c7;background-color:#d5e7ff;border-radius:4px;box-sizing:border-box;padding:4px 8px;display:flex;align-items:center;font-size:13px}.container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;align-items:center;color:#777}.container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover:not(.current){cursor:pointer;text-decoration:underline}.container[_ngcontent-%COMP%] .item.current[_ngcontent-%COMP%]{color:#000}.container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{color:#999;font-size:16px;width:16px;height:16px;margin:0 3px} +`],changeDetection:0})}return i})();function qpe(i,e){i&1&&(v(0,"mat-icon",2),S(1,"chevron_right"),y())}function Ype(i,e){if(i&1){let t=ie();v(0,"div",1),H("click",function(){let r=V(t).$index,o=I();return z(o.handleClickItem(r))}),S(1),y(),W(2,qpe,2,0,"mat-icon",2)}if(i&2){let t=e.$implicit,n=e.$index,r=I();se("current",n===r.curSubgraphBreadcrumbs.length-1),w(),Me(" ",t.graphId," "),w(),ae(n!==r.curSubgraphBreadcrumbs.length-1?2:-1)}}var cj=(()=>{class i{appService;changeDetectorRef;paneId;curSubgraphBreadcrumbs=[];savedSubgraphBreadcrumbs;constructor(t,n){this.appService=t,this.changeDetectorRef=n,mt(()=>{let o=this.appService.getPaneById(this.paneId)?.subgraphBreadcrumbs;o!==this.savedSubgraphBreadcrumbs&&(this.savedSubgraphBreadcrumbs=o,this.curSubgraphBreadcrumbs=o||[],this.changeDetectorRef.markForCheck())})}handleClickItem(t){if(t===this.curSubgraphBreadcrumbs.length-1)return;this.appService.setCurrentSubgraphBreadcrumb(this.paneId,t);let n=this.curSubgraphBreadcrumbs[t],r=n.snapshot;if(r)if(n.graphId===this.appService.getPaneById(this.paneId)?.modelGraph?.id)this.appService.curSnapshotToRestore.next({rendererId:this.paneId,snapshot:r});else{let o=this.appService.getGraphById(n.graphId);o&&this.appService.selectGraphInCurrentPane(o,r.flattenLayers,r)}}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["subgraph-breadcrumbs"]],inputs:{paneId:"paneId"},standalone:!0,features:[ce],decls:3,vars:0,consts:[[1,"container"],[1,"item",3,"click"],[1,"separator"]],template:function(n,r){n&1&&(v(0,"div",0),ln(1,Ype,3,4,null,null,Qr),y()),n&2&&(w(),cn(r.curSubgraphBreadcrumbs))},dependencies:[Ae,it,gt,Jt],styles:[`.container[_ngcontent-%COMP%]{border:1px solid #3876c7;background-color:#d5e7ff;border-radius:4px;box-sizing:border-box;padding:4px 8px;display:flex;align-items:center;font-size:13px}.container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;align-items:center;color:#777}.container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover:not(.current){cursor:pointer;text-decoration:underline}.container[_ngcontent-%COMP%] .item.current[_ngcontent-%COMP%]{color:#000}.container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{color:#999;font-size:16px;width:16px;height:16px;margin:0 3px} @@ -3780,7 +3780,7 @@ void main() { -`],changeDetection:0})}return i})();var hj=(i,e)=>e.type;function Zpe(i,e){i&1&&(v(0,"div",7),S(1," Select data to view on nodes / edges "),y())}function Qpe(i,e){if(i&1){let t=ie();v(0,"div",14)(1,"input",15,3),H("keydown.enter",function(){V(t);let r=ve(2);return z(r.blur())})("input",function(){V(t);let r=ve(2),o=I().$implicit,s=I(2);return z(s.setAttrsFilterText(o,r.value))})("change",function(){V(t);let r=I().$implicit,o=I(2);return z(o.handleAttrsFilterChanged(r))}),y(),v(3,"div",16)(4,"mat-icon"),S(5,"help_outline"),y()(),v(6,"div",17),H("click",function(){V(t);let r=ve(2);return z(r.blur())}),v(7,"mat-icon"),S(8,"done"),y()()()}if(i&2){let t=I().$implicit,n=I(2),r=ve(9);w(),N("disabled",!t.selected)("value",n.getAttrsFilterText(t)),w(2),N("bubble",r)("hoverDelayMs",100)}}function Kpe(i,e){if(i&1){let t=ie();v(0,"div",12),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleToggleShowOnNode(r))}),J(1,"input",13),S(2),y(),W(3,Qpe,9,4,"div",14)}if(i&2){let t=e.$implicit,n=I(2);w(),N("checked",t.selected),w(),Me(" ",t.type," "),w(),ae(n.getIsAttrs(t)?3:-1)}}function Jpe(i,e){if(i&1){let t=ie();v(0,"div",12),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleToggleShowOnEdge(r))}),J(1,"input",13),S(2),y()}if(i&2){let t=e.$implicit;w(),N("checked",t.selected),w(),Me(" ",t.type," ")}}function efe(i,e){if(i&1&&(v(0,"div",8)(1,"div",9)(2,"div"),S(3,"View on nodes"),y(),v(4,"div",10)(5,"mat-icon"),S(6,"close"),y()()(),ln(7,Kpe,4,3,null,null,hj),v(9,"div",9)(10,"div"),S(11,"View on edges"),y()(),ln(12,Jpe,3,2,"div",11,hj),y()),i&2){let t=I();w(7),cn(t.showOnNodeItems),w(5),cn(t.showOnEdgeItems)}}function tfe(i,e){i&1&&(v(0,"div",18),S(1," Use regex to match "),v(2,"span",19),S(3),y(),S(4," or "),v(5,"span",19),S(6),y(),S(7,". "),J(8,"br")(9,"br"),S(10," Examples:"),J(11,"br"),v(12,"ul")(13,"li")(14,"span",20),S(15,"axis:"),y(),S(16," will match attributes whose key is "),v(17,"span",19),S(18,"axis"),y(),S(19,". "),y(),v(20,"li")(21,"span",20),S(22,"padding=[SAME|VALID]"),y(),S(23," will match attributes whose key is "),v(24,"span",19),S(25,"padding"),y(),S(26," and value is either "),v(27,"span",19),S(28,"SAME"),y(),S(29," or "),v(30,"span",19),S(31,"VALID"),y(),S(32,". "),y()()()),i&2&&(w(3),Yc("","{","key","}",":","{","value","}",""),w(3),Yc("","{","key","}","=","{","value","}",""))}var nfe=[Rn.OP_NODE_ID,Rn.OP_ATTRS,Rn.OP_INPUTS,Rn.OP_OUTPUTS,Rn.LAYER_NODE_CHILDREN_COUNT,Rn.LAYER_NODE_DESCENDANTS_COUNT,Rn.LAYER_NODE_ATTRS],ife=[Fl.TENSOR_SHAPE],pj=(()=>{class i{appService;changeDetectorRef;localStorageService;nodeDataProviderExtensionService;rendererId;paneId;inPopup=!1;popup;savedShowOnNodeItemTypes;nodeDataProviderRunNames=Xt(()=>{let t=this.appService.getModelGraphFromPane(this.paneId);return(t?Object.values(this.nodeDataProviderExtensionService.getRunsForModelGraph(t)):[]).map(r=>r.runName)});savedNodeDataProviderRunNames=[];savedShowOnEdgeItemTypes;helpPopupSize={minWidth:0,minHeight:0};viewPopupSize={minWidth:280,minHeight:0};showOnNodeItems=[];showOnEdgeItems=[];curOpAttrsFilterText="";curGroupAttrsFilterText="";opened=!1;constructor(t,n,r,o){this.appService=t,this.changeDetectorRef=n,this.localStorageService=r,this.nodeDataProviderExtensionService=o,mt(()=>{let a=this.appService.getPaneById(this.paneId)?.showOnNodeItemTypes||{},l=this.nodeDataProviderRunNames();if(a===this.savedShowOnNodeItemTypes&&JSON.stringify(l)===JSON.stringify(this.savedNodeDataProviderRunNames))return;this.savedNodeDataProviderRunNames=l,this.savedShowOnNodeItemTypes=a;let c=[];for(let d of nfe){let u={type:d,selected:(a[this.rendererId]||{})[d]?.selected};c.push(u),d===Rn.OP_ATTRS?(u.filterRegex=(a[this.rendererId]||{})[d]?.filterRegex||"",this.curOpAttrsFilterText=u.filterRegex):d===Rn.LAYER_NODE_ATTRS&&(u.filterRegex=(a[this.rendererId]||{})[d]?.filterRegex||"",this.curGroupAttrsFilterText=u.filterRegex)}for(let d of this.savedNodeDataProviderRunNames){let u=`${Na}${d}`;c.push({type:u,selected:(a[this.rendererId]||{})[u]?.selected})}this.showOnNodeItems=c,this.changeDetectorRef.markForCheck()}),mt(()=>{let a=this.appService.getPaneById(this.paneId)?.showOnEdgeItemTypes||{};if(a===this.savedShowOnEdgeItemTypes)return;this.savedShowOnEdgeItemTypes=a;let l=[];for(let c of ife){let d={type:c,selected:(a[this.rendererId]||{})[c]?.selected};l.push(d)}this.showOnEdgeItems=l,this.changeDetectorRef.markForCheck()})}handleClickOnViewOnNode(t){this.opened&&this.popup.closeDialog()}handleToggleShowOnNode(t){this.appService.toggleShowOnNode(this.paneId,this.rendererId,t.type),this.saveShowOnNodeItemsToLocalStorage()}handleToggleShowOnEdge(t){this.appService.toggleShowOnEdge(this.paneId,this.rendererId,t.type),this.saveShowOnEdgeItemsToLocalStorage()}handleAttrsFilterChanged(t){this.appService.setShowOnNodeFilter(this.paneId,this.rendererId,t.type,this.getAttrsFilterText(t)),this.saveShowOnNodeItemsToLocalStorage()}getAttrsFilterText(t){switch(t.type){case Rn.OP_ATTRS:return this.curOpAttrsFilterText;case Rn.LAYER_NODE_ATTRS:return this.curGroupAttrsFilterText;default:return""}}setAttrsFilterText(t,n){switch(t.type){case Rn.OP_ATTRS:this.curOpAttrsFilterText=n;break;case Rn.LAYER_NODE_ATTRS:this.curGroupAttrsFilterText=n;break;default:break}}getIsAttrs(t){return t.type===Rn.OP_ATTRS||t.type===Rn.LAYER_NODE_ATTRS}saveShowOnNodeItemsToLocalStorage(){if(!this.inPopup&&!this.appService.testMode){let t=this.appService.getShowOnNodeItemTypes(this.paneId,this.rendererId),n=Object.keys(t).filter(r=>r.startsWith(Na));for(let r of n)delete t[r];this.localStorageService.setItem(jb,JSON.stringify(t))}}saveShowOnEdgeItemsToLocalStorage(){if(!this.inPopup&&!this.appService.testMode){let t=this.appService.getShowOnEdgeItemTypes(this.paneId,this.rendererId);this.localStorageService.setItem(Wb,JSON.stringify(t))}}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe),M(Vo),M(Cr))};static \u0275cmp=le({type:i,selectors:[["view-on-node"]],viewQuery:function(n,r){if(n&1&&Ie(wc,5),n&2){let o;be(o=ye())&&(r.popup=o.first)}},inputs:{rendererId:"rendererId",paneId:"paneId",inPopup:"inPopup"},standalone:!0,features:[ce],decls:10,vars:5,consts:[["help",""],["viewPopup",""],["helpPopup",""],["input",""],[1,"container",3,"bubble","overlaySize","hoverDelayMs"],[1,"mat-icon-container","view",3,"opened","closed","click","bubbleClick","overlaySize"],[1,"toolbar-icon"],[1,"model-explorer-help-popup"],[1,"model-explorer-view-popup"],[1,"label"],["bubbleClose","",1,"icon-container","close"],[1,"show-on-node-item"],[1,"show-on-node-item",3,"click"],["type","checkbox",3,"checked"],[1,"show-on-node-filter"],["placeholder","Filter by regex",1,"input-attrs-filter",3,"keydown.enter","input","change","disabled","value"],[1,"icon-container",3,"bubble","hoverDelayMs"],[1,"icon-container","ok",3,"click"],[1,"model-explorer-view-on-node-help-popup"],[1,"code"],[1,"code","regex"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",4)(1,"div",5),H("opened",function(){return V(o),z(r.opened=!0)})("closed",function(){return V(o),z(r.opened=!1)})("click",function(a){return V(o),z(r.handleClickOnViewOnNode(a))}),v(2,"mat-icon",6),S(3,"visibility"),y()()(),W(4,Zpe,2,0,"ng-template",null,0,kt)(6,efe,14,0,"ng-template",null,1,kt)(8,tfe,33,8,"ng-template",null,2,kt)}if(n&2){let o=ve(5),s=ve(7);N("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(),N("bubbleClick",s)("overlaySize",r.viewPopupSize)}},dependencies:[$n,wc,Ae,it,gt,Jt],styles:[`.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:20px;height:20px;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px} .model-explorer-view-popup{padding:10px 12px 12px;font-size:12px;background-color:#fff;display:flex;flex-direction:column} .model-explorer-view-popup .label{font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.0727em;margin-bottom:6px;display:flex;align-items:center;justify-content:space-between} .model-explorer-view-popup .label:not(:first-child){margin-top:12px} .model-explorer-view-popup .label .icon-container{cursor:pointer;opacity:.7;display:flex;align-items:center;justify-content:center} .model-explorer-view-popup .label .icon-container:hover{opacity:1} .model-explorer-view-popup .label mat-icon{font-size:20px;width:20px;height:20px;color:#999} .model-explorer-view-popup .show-on-node-item{display:flex;align-items:center;gap:4px;cursor:pointer;color:#555;-webkit-user-select:none;user-select:none} .model-explorer-view-popup .show-on-node-item input{cursor:pointer} .model-explorer-view-popup .show-on-node-filter{margin:1px 0 4px 25px;display:flex;align-items:center;position:relative} .model-explorer-view-popup .show-on-node-filter:focus-within .icon-container.ok{visibility:visible} .model-explorer-view-popup .show-on-node-filter input{flex-grow:1;box-sizing:border-box;border:1px solid #aaa;border-radius:3px;padding:3px 26px 3px 4px;min-width:200px} .model-explorer-view-popup .show-on-node-filter input::placeholder{color:#aaa} .model-explorer-view-popup .show-on-node-filter .icon-container{display:flex;align-items:center;justify-content:center;opacity:.8;cursor:pointer;margin-left:4px} .model-explorer-view-popup .show-on-node-filter .icon-container:hover{opacity:1} .model-explorer-view-popup .show-on-node-filter .icon-container.ok{position:absolute;right:26px;visibility:hidden} .model-explorer-view-popup .show-on-node-filter .icon-container mat-icon{font-size:16px;width:16px;height:16px;color:#999} .model-explorer-view-on-node-help-popup{padding:12px;font-size:12px;background-color:#fff} .model-explorer-view-on-node-help-popup ul{margin-block-end:0} .model-explorer-view-on-node-help-popup .code{display:inline-block;background-color:#fffdd0;font-family:monospace} .model-explorer-view-on-node-help-popup .code.regex{background-color:#e6d0ff} .cdk-overlay-container:has(.model-explorer-view-popup) .cdk-overlay-backdrop{pointer-events:none} +`],changeDetection:0})}return i})();var dj=(i,e)=>e.type;function Xpe(i,e){i&1&&(v(0,"div",7),S(1," Select data to view on nodes / edges "),y())}function Zpe(i,e){if(i&1){let t=ie();v(0,"div",14)(1,"input",15,3),H("keydown.enter",function(){V(t);let r=ve(2);return z(r.blur())})("input",function(){V(t);let r=ve(2),o=I().$implicit,s=I(2);return z(s.setAttrsFilterText(o,r.value))})("change",function(){V(t);let r=I().$implicit,o=I(2);return z(o.handleAttrsFilterChanged(r))}),y(),v(3,"div",16)(4,"mat-icon"),S(5,"help_outline"),y()(),v(6,"div",17),H("click",function(){V(t);let r=ve(2);return z(r.blur())}),v(7,"mat-icon"),S(8,"done"),y()()()}if(i&2){let t=I().$implicit,n=I(2),r=ve(9);w(),N("disabled",!t.selected)("value",n.getAttrsFilterText(t)),w(2),N("bubble",r)("hoverDelayMs",100)}}function Qpe(i,e){if(i&1){let t=ie();v(0,"div",12),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleToggleShowOnNode(r))}),J(1,"input",13),S(2),y(),W(3,Zpe,9,4,"div",14)}if(i&2){let t=e.$implicit,n=I(2);w(),N("checked",t.selected),w(),Me(" ",t.type," "),w(),ae(n.getIsAttrs(t)?3:-1)}}function Kpe(i,e){if(i&1){let t=ie();v(0,"div",12),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleToggleShowOnEdge(r))}),J(1,"input",13),S(2),y()}if(i&2){let t=e.$implicit;w(),N("checked",t.selected),w(),Me(" ",t.type," ")}}function Jpe(i,e){if(i&1&&(v(0,"div",8)(1,"div",9)(2,"div"),S(3,"View on nodes"),y(),v(4,"div",10)(5,"mat-icon"),S(6,"close"),y()()(),ln(7,Qpe,4,3,null,null,dj),v(9,"div",9)(10,"div"),S(11,"View on edges"),y()(),ln(12,Kpe,3,2,"div",11,dj),y()),i&2){let t=I();w(7),cn(t.showOnNodeItems),w(5),cn(t.showOnEdgeItems)}}function efe(i,e){i&1&&(v(0,"div",18),S(1," Use regex to match "),v(2,"span",19),S(3),y(),S(4," or "),v(5,"span",19),S(6),y(),S(7,". "),J(8,"br")(9,"br"),S(10," Examples:"),J(11,"br"),v(12,"ul")(13,"li")(14,"span",20),S(15,"axis:"),y(),S(16," will match attributes whose key is "),v(17,"span",19),S(18,"axis"),y(),S(19,". "),y(),v(20,"li")(21,"span",20),S(22,"padding=[SAME|VALID]"),y(),S(23," will match attributes whose key is "),v(24,"span",19),S(25,"padding"),y(),S(26," and value is either "),v(27,"span",19),S(28,"SAME"),y(),S(29," or "),v(30,"span",19),S(31,"VALID"),y(),S(32,". "),y()()()),i&2&&(w(3),Yc("","{","key","}",":","{","value","}",""),w(3),Yc("","{","key","}","=","{","value","}",""))}var tfe=[Rn.OP_NODE_ID,Rn.OP_ATTRS,Rn.OP_INPUTS,Rn.OP_OUTPUTS,Rn.LAYER_NODE_CHILDREN_COUNT,Rn.LAYER_NODE_DESCENDANTS_COUNT,Rn.LAYER_NODE_ATTRS],nfe=[Fl.TENSOR_SHAPE],uj=(()=>{class i{appService;changeDetectorRef;localStorageService;nodeDataProviderExtensionService;rendererId;paneId;inPopup=!1;popup;savedShowOnNodeItemTypes;nodeDataProviderRunNames=Xt(()=>{let t=this.appService.getModelGraphFromPane(this.paneId);return(t?Object.values(this.nodeDataProviderExtensionService.getRunsForModelGraph(t)):[]).map(r=>r.runName)});savedNodeDataProviderRunNames=[];savedShowOnEdgeItemTypes;helpPopupSize={minWidth:0,minHeight:0};viewPopupSize={minWidth:280,minHeight:0};showOnNodeItems=[];showOnEdgeItems=[];curOpAttrsFilterText="";curGroupAttrsFilterText="";opened=!1;constructor(t,n,r,o){this.appService=t,this.changeDetectorRef=n,this.localStorageService=r,this.nodeDataProviderExtensionService=o,mt(()=>{let a=this.appService.getPaneById(this.paneId)?.showOnNodeItemTypes||{},l=this.nodeDataProviderRunNames();if(a===this.savedShowOnNodeItemTypes&&JSON.stringify(l)===JSON.stringify(this.savedNodeDataProviderRunNames))return;this.savedNodeDataProviderRunNames=l,this.savedShowOnNodeItemTypes=a;let c=[];for(let d of tfe){let u={type:d,selected:(a[this.rendererId]||{})[d]?.selected};c.push(u),d===Rn.OP_ATTRS?(u.filterRegex=(a[this.rendererId]||{})[d]?.filterRegex||"",this.curOpAttrsFilterText=u.filterRegex):d===Rn.LAYER_NODE_ATTRS&&(u.filterRegex=(a[this.rendererId]||{})[d]?.filterRegex||"",this.curGroupAttrsFilterText=u.filterRegex)}for(let d of this.savedNodeDataProviderRunNames){let u=`${Na}${d}`;c.push({type:u,selected:(a[this.rendererId]||{})[u]?.selected})}this.showOnNodeItems=c,this.changeDetectorRef.markForCheck()}),mt(()=>{let a=this.appService.getPaneById(this.paneId)?.showOnEdgeItemTypes||{};if(a===this.savedShowOnEdgeItemTypes)return;this.savedShowOnEdgeItemTypes=a;let l=[];for(let c of nfe){let d={type:c,selected:(a[this.rendererId]||{})[c]?.selected};l.push(d)}this.showOnEdgeItems=l,this.changeDetectorRef.markForCheck()})}handleClickOnViewOnNode(t){this.opened&&this.popup.closeDialog()}handleToggleShowOnNode(t){this.appService.toggleShowOnNode(this.paneId,this.rendererId,t.type),this.saveShowOnNodeItemsToLocalStorage()}handleToggleShowOnEdge(t){this.appService.toggleShowOnEdge(this.paneId,this.rendererId,t.type),this.saveShowOnEdgeItemsToLocalStorage()}handleAttrsFilterChanged(t){this.appService.setShowOnNodeFilter(this.paneId,this.rendererId,t.type,this.getAttrsFilterText(t)),this.saveShowOnNodeItemsToLocalStorage()}getAttrsFilterText(t){switch(t.type){case Rn.OP_ATTRS:return this.curOpAttrsFilterText;case Rn.LAYER_NODE_ATTRS:return this.curGroupAttrsFilterText;default:return""}}setAttrsFilterText(t,n){switch(t.type){case Rn.OP_ATTRS:this.curOpAttrsFilterText=n;break;case Rn.LAYER_NODE_ATTRS:this.curGroupAttrsFilterText=n;break;default:break}}getIsAttrs(t){return t.type===Rn.OP_ATTRS||t.type===Rn.LAYER_NODE_ATTRS}saveShowOnNodeItemsToLocalStorage(){if(!this.inPopup&&!this.appService.testMode){let t=this.appService.getShowOnNodeItemTypes(this.paneId,this.rendererId),n=Object.keys(t).filter(r=>r.startsWith(Na));for(let r of n)delete t[r];this.localStorageService.setItem(Wb,JSON.stringify(t))}}saveShowOnEdgeItemsToLocalStorage(){if(!this.inPopup&&!this.appService.testMode){let t=this.appService.getShowOnEdgeItemTypes(this.paneId,this.rendererId);this.localStorageService.setItem($b,JSON.stringify(t))}}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe),M(Vo),M(Cr))};static \u0275cmp=le({type:i,selectors:[["view-on-node"]],viewQuery:function(n,r){if(n&1&&Ie(wc,5),n&2){let o;be(o=ye())&&(r.popup=o.first)}},inputs:{rendererId:"rendererId",paneId:"paneId",inPopup:"inPopup"},standalone:!0,features:[ce],decls:10,vars:5,consts:[["help",""],["viewPopup",""],["helpPopup",""],["input",""],[1,"container",3,"bubble","overlaySize","hoverDelayMs"],[1,"mat-icon-container","view",3,"opened","closed","click","bubbleClick","overlaySize"],[1,"toolbar-icon"],[1,"model-explorer-help-popup"],[1,"model-explorer-view-popup"],[1,"label"],["bubbleClose","",1,"icon-container","close"],[1,"show-on-node-item"],[1,"show-on-node-item",3,"click"],["type","checkbox",3,"checked"],[1,"show-on-node-filter"],["placeholder","Filter by regex",1,"input-attrs-filter",3,"keydown.enter","input","change","disabled","value"],[1,"icon-container",3,"bubble","hoverDelayMs"],[1,"icon-container","ok",3,"click"],[1,"model-explorer-view-on-node-help-popup"],[1,"code"],[1,"code","regex"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",4)(1,"div",5),H("opened",function(){return V(o),z(r.opened=!0)})("closed",function(){return V(o),z(r.opened=!1)})("click",function(a){return V(o),z(r.handleClickOnViewOnNode(a))}),v(2,"mat-icon",6),S(3,"visibility"),y()()(),W(4,Xpe,2,0,"ng-template",null,0,kt)(6,Jpe,14,0,"ng-template",null,1,kt)(8,efe,33,8,"ng-template",null,2,kt)}if(n&2){let o=ve(5),s=ve(7);N("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(),N("bubbleClick",s)("overlaySize",r.viewPopupSize)}},dependencies:[$n,wc,Ae,it,gt,Jt],styles:[`.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:20px;height:20px;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px} .model-explorer-view-popup{padding:10px 12px 12px;font-size:12px;background-color:#fff;display:flex;flex-direction:column} .model-explorer-view-popup .label{font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.0727em;margin-bottom:6px;display:flex;align-items:center;justify-content:space-between} .model-explorer-view-popup .label:not(:first-child){margin-top:12px} .model-explorer-view-popup .label .icon-container{cursor:pointer;opacity:.7;display:flex;align-items:center;justify-content:center} .model-explorer-view-popup .label .icon-container:hover{opacity:1} .model-explorer-view-popup .label mat-icon{font-size:20px;width:20px;height:20px;color:#999} .model-explorer-view-popup .show-on-node-item{display:flex;align-items:center;gap:4px;cursor:pointer;color:#555;-webkit-user-select:none;user-select:none} .model-explorer-view-popup .show-on-node-item input{cursor:pointer} .model-explorer-view-popup .show-on-node-filter{margin:1px 0 4px 25px;display:flex;align-items:center;position:relative} .model-explorer-view-popup .show-on-node-filter:focus-within .icon-container.ok{visibility:visible} .model-explorer-view-popup .show-on-node-filter input{flex-grow:1;box-sizing:border-box;border:1px solid #aaa;border-radius:3px;padding:3px 26px 3px 4px;min-width:200px} .model-explorer-view-popup .show-on-node-filter input::placeholder{color:#aaa} .model-explorer-view-popup .show-on-node-filter .icon-container{display:flex;align-items:center;justify-content:center;opacity:.8;cursor:pointer;margin-left:4px} .model-explorer-view-popup .show-on-node-filter .icon-container:hover{opacity:1} .model-explorer-view-popup .show-on-node-filter .icon-container.ok{position:absolute;right:26px;visibility:hidden} .model-explorer-view-popup .show-on-node-filter .icon-container mat-icon{font-size:16px;width:16px;height:16px;color:#999} .model-explorer-view-on-node-help-popup{padding:12px;font-size:12px;background-color:#fff} .model-explorer-view-on-node-help-popup ul{margin-block-end:0} .model-explorer-view-on-node-help-popup .code{display:inline-block;background-color:#fffdd0;font-family:monospace} .model-explorer-view-on-node-help-popup .code.regex{background-color:#e6d0ff} .cdk-overlay-container:has(.model-explorer-view-popup) .cdk-overlay-backdrop{pointer-events:none} @@ -3798,7 +3798,7 @@ void main() { -`],changeDetection:0})}return i})();var rfe=["webglRenderer"];function ofe(i,e){if(i&1&&(oo(0),J(1,"search-bar",20)(2,"div",15),so()),i&2){let t=I(2);w(),N("curModelGraph",t.modelGraph)("rendererId",t.rendererId)}}function sfe(i,e){i&1&&(v(0,"div",21),S(1," Zoom to fit "),v(2,"div",22)(3,"mat-icon"),S(4,"keyboard"),y(),S(5," Shortcut: SPACE "),y()())}function afe(i,e){i&1&&(v(0,"div",21),S(1," Expand all layers in the graph "),y())}function lfe(i,e){i&1&&(v(0,"div",21),S(1," Collapse all layers in the graph "),y())}function cfe(i,e){if(i&1){let t=ie();v(0,"div",23),H("click",function(){V(t);let r=I(2);return z(r.handleClickExpandAllLayers())}),v(1,"mat-icon",24),S(2,"unfold_more_double"),y()(),W(3,afe,2,0,"ng-template",null,3,kt),v(5,"div",25),H("click",function(){V(t);let r=I(2);return z(r.handleClickCollapseAllLayers())}),v(6,"mat-icon",26),S(7,"unfold_less_double"),y()(),W(8,lfe,2,0,"ng-template",null,4,kt),J(10,"div",15)}if(i&2){let t=ve(4),n=ve(9),r=I(2);se("disable",r.disableExpandCollapseAllButton),N("bubble",t)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),se("disable",r.disableExpandCollapseAllButton),N("bubble",n)("overlaySize",r.helpPopupSize)("hoverDelayMs",10)}}function dfe(i,e){i&1&&(v(0,"div",21),S(1," Flatten all layers in the graph "),v(2,"div",29),S(3," Nodes will be laid out without any layers data "),y()())}function ufe(i,e){if(i&1){let t=ie();v(0,"div",27),H("click",function(){V(t);let r=I(2);return z(r.handleClickFlattenAllLayers())}),v(1,"mat-icon",28),S(2,"layers_clear"),y()(),J(3,"div",15),W(4,dfe,4,0,"ng-template",null,5,kt)}if(i&2){let t=ve(5),n=I(2);se("enabled",n.flattenAllLayers()),N("bubble",t)("overlaySize",n.helpPopupSize)("hoverDelayMs",10)}}function hfe(i,e){i&1&&(v(0,"span"),S(1,"Disable inputs/outputs tracing"),y())}function pfe(i,e){i&1&&(v(0,"span"),S(1,"Enable inputs/outputs tracing"),y())}function ffe(i,e){if(i&1&&(v(0,"div",21),W(1,hfe,2,0,"span")(2,pfe,2,0,"span"),v(3,"div",29),S(4," Highlight selected op node's ancestors and descendants and dim the rest "),y()()),i&2){let t=I(2);w(),ae(t.tracing?1:2)}}function mfe(i,e){i&1&&(v(0,"div",21),S(1," Download graph as PNG "),v(2,"div",29),S(3," The maximum PNG size is limited to 5000 x 5000 "),y()())}function gfe(i,e){if(i&1){let t=ie();J(0,"div",15),v(1,"div",30),H("menuOpened",function(){V(t);let r=I(2);return z(r.disableDownloadPngHelpPopup=!0)})("menuClosed",function(){V(t);let r=I(2);return z(r.disableDownloadPngHelpPopup=!1)}),v(2,"mat-icon",31),S(3," image "),y()(),W(4,mfe,4,0,"ng-template",null,6,kt),v(6,"mat-menu",32,7)(8,"div",33),H("click",function(){V(t);let r=I(2);return z(r.handleClickDownloadAsPng(!1))}),S(9," Graph in current viewport "),y(),v(10,"div",33),H("click",function(){V(t);let r=I(2);return z(r.handleClickDownloadAsPng(!0))}),S(11," Full graph "),y(),v(12,"div",34),H("click",function(r){V(t);let o=I(2);return z(o.handleClickToggleTransparentPngBackground(r))}),J(13,"input",35),S(14," Transparent background "),y()()}if(i&2){let t=ve(5),n=ve(7),r=I(2);w(),N("bubble",t)("overlaySize",r.helpPopupSize)("hoverDelayMs",10)("bubbleDisabled",r.disableDownloadPngHelpPopup)("matMenuTriggerFor",n),w(12),N("formControl",r.transparentPngBackground)}}function _fe(i,e){if(i&1&&(oo(0),J(1,"div",15)(2,"snapshot-manager",36),so()),i&2){let t=I(2);w(2),N("rendererId",t.rendererId)("paneId",t.paneId)}}function vfe(i,e){if(i&1){let t=ie();v(0,"div",12),W(1,ofe,3,2,"ng-container",13),J(2,"view-on-node",14)(3,"div",15),v(4,"div",16),H("click",function(){V(t);let r=I();return z(r.handleClickZoomFitIcon())}),v(5,"mat-icon",17),S(6,"fit_screen"),y()(),J(7,"div",15),W(8,sfe,6,0,"ng-template",null,1,kt)(10,cfe,11,10)(11,ufe,6,5),v(12,"div",18),H("click",function(){V(t);let r=I();return z(r.handleClickTrace())}),v(13,"mat-icon",19),S(14," multiple_stop "),y()(),W(15,ffe,5,1,"ng-template",null,2,kt)(17,gfe,15,6)(18,_fe,3,2,"ng-container",13),y()}if(i&2){let t=ve(9),n=ve(16),r=I();se("in-popup",r.inPopup)("pushed-down",r.showSubgraphBreadcrumbs),w(),N("ngIf",r.showSearchBar),w(),N("rendererId",r.rendererId)("paneId",r.paneId)("inPopup",r.inPopup),w(2),N("bubble",t)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(6),ae(r.showExpandCollapseAllLayers?10:-1),w(),ae(r.showFlattenLayers?11:-1),w(),se("enabled",r.tracing),N("bubble",n)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),ae(r.showDownloadPng?17:-1),w(),N("ngIf",r.showSnapshotManager)}}function bfe(i,e){if(i&1&&J(0,"subgraph-breadcrumbs",37),i&2){let t=I();N("paneId",t.paneId)}}var BC=(()=>{class i{appService;changeDetectorRef;modelGraph;rendererId;paneId;rootNodeId;inPopup=!1;openInPopupClicked=new Pe;webglRenderer;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};flattenAllLayers=Xt(()=>this.appService.getFlattenLayers(this.paneId));disableDownloadPngHelpPopup=!1;transparentPngBackground=new gr(!1);curSubgraphBreadcrumbs=[];constructor(t,n){this.appService=t,this.changeDetectorRef=n,mt(()=>{let r=this.appService.getPaneById(this.paneId);this.curSubgraphBreadcrumbs=r?.subgraphBreadcrumbs||[],this.changeDetectorRef.markForCheck()})}handleOpenOnPopupClicked(t){this.openInPopupClicked.emit(t)}handleClickZoomFitIcon(){this.appService.spaceKeyToZoomFitClicked.next({})}handleClickExpandAllLayers(){this.appService.expandOrCollapseAllGraphLayersClicked.next({expandOrCollapse:!0,rendererId:this.rendererId})}handleClickCollapseAllLayers(){this.appService.expandOrCollapseAllGraphLayersClicked.next({expandOrCollapse:!1,rendererId:this.rendererId})}handleClickFlattenAllLayers(){let t=this.appService.getPaneById(this.paneId)?.selectedNodeInfo?.nodeId;t!=null&&xt(this.modelGraph.nodesById[t])&&this.appService.selectNode(this.paneId,void 0),this.appService.toggleFlattenLayers(this.paneId),this.appService.processGraph(this.paneId,this.appService.getFlattenLayers(this.paneId)),this.appService.curInitialUiState.set(void 0)}handleClickDownloadAsPng(t){this.appService.downloadAsPngClicked.next({rendererId:this.rendererId,fullGraph:t,transparentBackground:this.transparentPngBackground.value===!0})}handleClickTrace(){this.webglRenderer?.toggleIoTrace()}handleClickToggleTransparentPngBackground(t){t.stopPropagation(),this.transparentPngBackground.setValue(!this.transparentPngBackground.value)}getActiveSelectedNodeInfo(){return this.webglRenderer?.getActiveSelectedNodeInfo()}get showSearchBar(){return!this.inPopup}get showExpandCollapseAllLayers(){return!this.inPopup}get showFlattenLayers(){return!this.inPopup}get showDownloadPng(){return!this.inPopup}get showSnapshotManager(){return!this.inPopup}get showSubgraphBreadcrumbs(){return!this.inPopup&&this.curSubgraphBreadcrumbs.length>1}get disableExpandCollapseAllButton(){return this.appService.getFlattenLayers(this.paneId)}get tracing(){return this.webglRenderer?.tracing===!0}get showToolBar(){return!this.appService.config()?.hideToolBar}get isTestMode(){return this.appService.testMode}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["renderer-wrapper"]],viewQuery:function(n,r){if(n&1&&Ie(rfe,5),n&2){let o;be(o=ye())&&(r.webglRenderer=o.first)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId",rootNodeId:"rootNodeId",inPopup:"inPopup"},outputs:{openInPopupClicked:"openInPopupClicked"},standalone:!0,features:[ce],decls:5,vars:7,consts:[["webglRenderer",""],["helpZoomToFit",""],["helpTraceIO",""],["helpExpandAll",""],["helpCollapseAll",""],["helpFlattenLayers",""],["helpDownloadPng",""],["menu","matMenu"],[1,"container"],[3,"openInPopupClicked","modelGraph","rendererId","paneId","rootNodeId","inPopup"],[1,"toolbar",3,"in-popup","pushed-down"],[3,"paneId",4,"ngIf"],[1,"toolbar"],[4,"ngIf"],[3,"rendererId","paneId","inPopup"],[1,"vertical-divider"],[1,"mat-icon-container","zoom-fit",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon"],[1,"mat-icon-container","trace-io",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","trace"],[3,"curModelGraph","rendererId"],[1,"model-explorer-help-popup"],[1,"shortcut"],[1,"mat-icon-container","expand-all",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","expand-all"],[1,"mat-icon-container","collapse-all",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","collapse-all"],[1,"mat-icon-container","flatten-layers",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","flatten-layers"],[1,"description"],[1,"mat-icon-container","download-png",3,"menuOpened","menuClosed","bubble","overlaySize","hoverDelayMs","bubbleDisabled","matMenuTriggerFor"],[1,"toolbar-icon","download-png"],[1,"model-explorer-download-png-menu"],[1,"menu-item",3,"click"],[1,"transparent-background-toggle",3,"click"],["type","checkbox",3,"formControl"],[3,"rendererId","paneId"],[3,"paneId"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",8)(1,"webgl-renderer",9,0),H("openInPopupClicked",function(a){return V(o),z(r.handleOpenOnPopupClicked(a))}),y(),W(3,vfe,19,20,"div",10)(4,bfe,1,1,"subgraph-breadcrumbs",11),y()}n&2&&(w(),N("modelGraph",r.modelGraph)("rendererId",r.rendererId)("paneId",r.paneId)("rootNodeId",r.rootNodeId)("inPopup",r.inPopup),w(2),ae(r.showToolBar?3:-1),w(),N("ngIf",r.showSubgraphBreadcrumbs))},dependencies:[$n,Ae,Mn,In,it,gt,sa,Jo,vc,Jt,_r,km,zo,ho,cj,dj,uj,pj,PC],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;position:relative}.container[_ngcontent-%COMP%] svg-rednerer[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] webgl-rednerer[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%]{position:absolute;top:8px;left:12px;padding:0 8px 0 6px;box-sizing:border-box;height:40px;display:flex;background-color:#edf2fa;border-radius:99px;align-items:center;outline:2px solid white}.container[_ngcontent-%COMP%] .toolbar.in-popup[_ngcontent-%COMP%]{padding-left:10px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%]:has(search-bar input:focus){border-color:#1a73e8}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] search-bar[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .toolbar.pushed-down[_ngcontent-%COMP%]{top:44px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container.enabled[_ngcontent-%COMP%]{background-color:#ffdeb1;outline:1px solid #ea8600;border-radius:4px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container.disable[_ngcontent-%COMP%]{opacity:.2;pointer-events:none}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.expand-all[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.collapse-all[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.flatten-layers[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;border:1px solid transparent}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.trace[_ngcontent-%COMP%]{transform:rotate(90deg);border:1px solid transparent}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .vertical-divider[_ngcontent-%COMP%]{width:1px;border-left:1px solid #d0d0d0;margin:2px 5px;height:20px}.container[_ngcontent-%COMP%] subgraph-breadcrumbs[_ngcontent-%COMP%]{position:absolute;top:8px;left:12px} bubble-container:has(.model-explorer-view-popup){border-top-left-radius:0;border-top-right-radius:0} .model-explorer-download-png-menu .menu-item{letter-spacing:normal!important;font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;font-size:12px;padding:0 8px;cursor:pointer;display:flex;align-items:center} .model-explorer-download-png-menu .menu-item:hover{background-color:#eee} .model-explorer-download-png-menu .transparent-background-toggle{display:flex;align-items:center;font-size:12px;letter-spacing:normal;padding:6px 8px 0 4px;border-top:1px solid #ddd;margin-top:8px;cursor:pointer} .model-explorer-download-png-menu .transparent-background-toggle input{cursor:inherit} +`],changeDetection:0})}return i})();var ife=["webglRenderer"];function rfe(i,e){if(i&1&&(oo(0),J(1,"search-bar",20)(2,"div",15),so()),i&2){let t=I(2);w(),N("curModelGraph",t.modelGraph)("rendererId",t.rendererId)}}function ofe(i,e){i&1&&(v(0,"div",21),S(1," Zoom to fit "),v(2,"div",22)(3,"mat-icon"),S(4,"keyboard"),y(),S(5," Shortcut: SPACE "),y()())}function sfe(i,e){i&1&&(v(0,"div",21),S(1," Expand all layers in the graph "),y())}function afe(i,e){i&1&&(v(0,"div",21),S(1," Collapse all layers in the graph "),y())}function lfe(i,e){if(i&1){let t=ie();v(0,"div",23),H("click",function(){V(t);let r=I(2);return z(r.handleClickExpandAllLayers())}),v(1,"mat-icon",24),S(2,"unfold_more_double"),y()(),W(3,sfe,2,0,"ng-template",null,3,kt),v(5,"div",25),H("click",function(){V(t);let r=I(2);return z(r.handleClickCollapseAllLayers())}),v(6,"mat-icon",26),S(7,"unfold_less_double"),y()(),W(8,afe,2,0,"ng-template",null,4,kt),J(10,"div",15)}if(i&2){let t=ve(4),n=ve(9),r=I(2);se("disable",r.disableExpandCollapseAllButton),N("bubble",t)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),se("disable",r.disableExpandCollapseAllButton),N("bubble",n)("overlaySize",r.helpPopupSize)("hoverDelayMs",10)}}function cfe(i,e){i&1&&(v(0,"div",21),S(1," Flatten all layers in the graph "),v(2,"div",29),S(3," Nodes will be laid out without any layers data "),y()())}function dfe(i,e){if(i&1){let t=ie();v(0,"div",27),H("click",function(){V(t);let r=I(2);return z(r.handleClickFlattenAllLayers())}),v(1,"mat-icon",28),S(2,"layers_clear"),y()(),J(3,"div",15),W(4,cfe,4,0,"ng-template",null,5,kt)}if(i&2){let t=ve(5),n=I(2);se("enabled",n.flattenAllLayers()),N("bubble",t)("overlaySize",n.helpPopupSize)("hoverDelayMs",10)}}function ufe(i,e){i&1&&(v(0,"span"),S(1,"Disable inputs/outputs tracing"),y())}function hfe(i,e){i&1&&(v(0,"span"),S(1,"Enable inputs/outputs tracing"),y())}function pfe(i,e){if(i&1&&(v(0,"div",21),W(1,ufe,2,0,"span")(2,hfe,2,0,"span"),v(3,"div",29),S(4," Highlight selected op node's ancestors and descendants and dim the rest "),y()()),i&2){let t=I(2);w(),ae(t.tracing?1:2)}}function ffe(i,e){i&1&&(v(0,"div",21),S(1," Download graph as PNG "),v(2,"div",29),S(3," The maximum PNG size is limited to 5000 x 5000 "),y()())}function mfe(i,e){if(i&1){let t=ie();J(0,"div",15),v(1,"div",30),H("menuOpened",function(){V(t);let r=I(2);return z(r.disableDownloadPngHelpPopup=!0)})("menuClosed",function(){V(t);let r=I(2);return z(r.disableDownloadPngHelpPopup=!1)}),v(2,"mat-icon",31),S(3," image "),y()(),W(4,ffe,4,0,"ng-template",null,6,kt),v(6,"mat-menu",32,7)(8,"div",33),H("click",function(){V(t);let r=I(2);return z(r.handleClickDownloadAsPng(!1))}),S(9," Graph in current viewport "),y(),v(10,"div",33),H("click",function(){V(t);let r=I(2);return z(r.handleClickDownloadAsPng(!0))}),S(11," Full graph "),y(),v(12,"div",34),H("click",function(r){V(t);let o=I(2);return z(o.handleClickToggleTransparentPngBackground(r))}),J(13,"input",35),S(14," Transparent background "),y()()}if(i&2){let t=ve(5),n=ve(7),r=I(2);w(),N("bubble",t)("overlaySize",r.helpPopupSize)("hoverDelayMs",10)("bubbleDisabled",r.disableDownloadPngHelpPopup)("matMenuTriggerFor",n),w(12),N("formControl",r.transparentPngBackground)}}function gfe(i,e){if(i&1&&(oo(0),J(1,"div",15)(2,"snapshot-manager",36),so()),i&2){let t=I(2);w(2),N("rendererId",t.rendererId)("paneId",t.paneId)}}function _fe(i,e){if(i&1){let t=ie();v(0,"div",12),W(1,rfe,3,2,"ng-container",13),J(2,"view-on-node",14)(3,"div",15),v(4,"div",16),H("click",function(){V(t);let r=I();return z(r.handleClickZoomFitIcon())}),v(5,"mat-icon",17),S(6,"fit_screen"),y()(),J(7,"div",15),W(8,ofe,6,0,"ng-template",null,1,kt)(10,lfe,11,10)(11,dfe,6,5),v(12,"div",18),H("click",function(){V(t);let r=I();return z(r.handleClickTrace())}),v(13,"mat-icon",19),S(14," multiple_stop "),y()(),W(15,pfe,5,1,"ng-template",null,2,kt)(17,mfe,15,6)(18,gfe,3,2,"ng-container",13),y()}if(i&2){let t=ve(9),n=ve(16),r=I();se("in-popup",r.inPopup)("pushed-down",r.showSubgraphBreadcrumbs),w(),N("ngIf",r.showSearchBar),w(),N("rendererId",r.rendererId)("paneId",r.paneId)("inPopup",r.inPopup),w(2),N("bubble",t)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(6),ae(r.showExpandCollapseAllLayers?10:-1),w(),ae(r.showFlattenLayers?11:-1),w(),se("enabled",r.tracing),N("bubble",n)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),ae(r.showDownloadPng?17:-1),w(),N("ngIf",r.showSnapshotManager)}}function vfe(i,e){if(i&1&&J(0,"subgraph-breadcrumbs",37),i&2){let t=I();N("paneId",t.paneId)}}var BC=(()=>{class i{appService;changeDetectorRef;modelGraph;rendererId;paneId;rootNodeId;inPopup=!1;openInPopupClicked=new Pe;webglRenderer;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};flattenAllLayers=Xt(()=>this.appService.getFlattenLayers(this.paneId));disableDownloadPngHelpPopup=!1;transparentPngBackground=new gr(!1);curSubgraphBreadcrumbs=[];constructor(t,n){this.appService=t,this.changeDetectorRef=n,mt(()=>{let r=this.appService.getPaneById(this.paneId);this.curSubgraphBreadcrumbs=r?.subgraphBreadcrumbs||[],this.changeDetectorRef.markForCheck()})}handleOpenOnPopupClicked(t){this.openInPopupClicked.emit(t)}handleClickZoomFitIcon(){this.appService.spaceKeyToZoomFitClicked.next({})}handleClickExpandAllLayers(){this.appService.expandOrCollapseAllGraphLayersClicked.next({expandOrCollapse:!0,rendererId:this.rendererId})}handleClickCollapseAllLayers(){this.appService.expandOrCollapseAllGraphLayersClicked.next({expandOrCollapse:!1,rendererId:this.rendererId})}handleClickFlattenAllLayers(){let t=this.appService.getPaneById(this.paneId)?.selectedNodeInfo?.nodeId;t!=null&&bt(this.modelGraph.nodesById[t])&&this.appService.selectNode(this.paneId,void 0),this.appService.toggleFlattenLayers(this.paneId),this.appService.processGraph(this.paneId,this.appService.getFlattenLayers(this.paneId)),this.appService.curInitialUiState.set(void 0)}handleClickDownloadAsPng(t){this.appService.downloadAsPngClicked.next({rendererId:this.rendererId,fullGraph:t,transparentBackground:this.transparentPngBackground.value===!0})}handleClickTrace(){this.webglRenderer?.toggleIoTrace()}handleClickToggleTransparentPngBackground(t){t.stopPropagation(),this.transparentPngBackground.setValue(!this.transparentPngBackground.value)}getActiveSelectedNodeInfo(){return this.webglRenderer?.getActiveSelectedNodeInfo()}get showSearchBar(){return!this.inPopup}get showExpandCollapseAllLayers(){return!this.inPopup}get showFlattenLayers(){return!this.inPopup}get showDownloadPng(){return!this.inPopup}get showSnapshotManager(){return!this.inPopup}get showSubgraphBreadcrumbs(){return!this.inPopup&&this.curSubgraphBreadcrumbs.length>1}get disableExpandCollapseAllButton(){return this.appService.getFlattenLayers(this.paneId)}get tracing(){return this.webglRenderer?.tracing===!0}get showToolBar(){return!this.appService.config()?.hideToolBar}get isTestMode(){return this.appService.testMode}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["renderer-wrapper"]],viewQuery:function(n,r){if(n&1&&Ie(ife,5),n&2){let o;be(o=ye())&&(r.webglRenderer=o.first)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId",rootNodeId:"rootNodeId",inPopup:"inPopup"},outputs:{openInPopupClicked:"openInPopupClicked"},standalone:!0,features:[ce],decls:5,vars:7,consts:[["webglRenderer",""],["helpZoomToFit",""],["helpTraceIO",""],["helpExpandAll",""],["helpCollapseAll",""],["helpFlattenLayers",""],["helpDownloadPng",""],["menu","matMenu"],[1,"container"],[3,"openInPopupClicked","modelGraph","rendererId","paneId","rootNodeId","inPopup"],[1,"toolbar",3,"in-popup","pushed-down"],[3,"paneId",4,"ngIf"],[1,"toolbar"],[4,"ngIf"],[3,"rendererId","paneId","inPopup"],[1,"vertical-divider"],[1,"mat-icon-container","zoom-fit",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon"],[1,"mat-icon-container","trace-io",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","trace"],[3,"curModelGraph","rendererId"],[1,"model-explorer-help-popup"],[1,"shortcut"],[1,"mat-icon-container","expand-all",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","expand-all"],[1,"mat-icon-container","collapse-all",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","collapse-all"],[1,"mat-icon-container","flatten-layers",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","flatten-layers"],[1,"description"],[1,"mat-icon-container","download-png",3,"menuOpened","menuClosed","bubble","overlaySize","hoverDelayMs","bubbleDisabled","matMenuTriggerFor"],[1,"toolbar-icon","download-png"],[1,"model-explorer-download-png-menu"],[1,"menu-item",3,"click"],[1,"transparent-background-toggle",3,"click"],["type","checkbox",3,"formControl"],[3,"rendererId","paneId"],[3,"paneId"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",8)(1,"webgl-renderer",9,0),H("openInPopupClicked",function(a){return V(o),z(r.handleOpenOnPopupClicked(a))}),y(),W(3,_fe,19,20,"div",10)(4,vfe,1,1,"subgraph-breadcrumbs",11),y()}n&2&&(w(),N("modelGraph",r.modelGraph)("rendererId",r.rendererId)("paneId",r.paneId)("rootNodeId",r.rootNodeId)("inPopup",r.inPopup),w(2),ae(r.showToolBar?3:-1),w(),N("ngIf",r.showSubgraphBreadcrumbs))},dependencies:[$n,Ae,Mn,In,it,gt,sa,Jo,vc,Jt,_r,Lm,zo,ho,aj,lj,cj,uj,OC],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;position:relative}.container[_ngcontent-%COMP%] svg-rednerer[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] webgl-rednerer[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%]{position:absolute;top:8px;left:12px;padding:0 8px 0 6px;box-sizing:border-box;height:40px;display:flex;background-color:#edf2fa;border-radius:99px;align-items:center;outline:2px solid white}.container[_ngcontent-%COMP%] .toolbar.in-popup[_ngcontent-%COMP%]{padding-left:10px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%]:has(search-bar input:focus){border-color:#1a73e8}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] search-bar[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .toolbar.pushed-down[_ngcontent-%COMP%]{top:44px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container.enabled[_ngcontent-%COMP%]{background-color:#ffdeb1;outline:1px solid #ea8600;border-radius:4px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container.disable[_ngcontent-%COMP%]{opacity:.2;pointer-events:none}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.expand-all[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.collapse-all[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.flatten-layers[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;border:1px solid transparent}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.trace[_ngcontent-%COMP%]{transform:rotate(90deg);border:1px solid transparent}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .vertical-divider[_ngcontent-%COMP%]{width:1px;border-left:1px solid #d0d0d0;margin:2px 5px;height:20px}.container[_ngcontent-%COMP%] subgraph-breadcrumbs[_ngcontent-%COMP%]{position:absolute;top:8px;left:12px} bubble-container:has(.model-explorer-view-popup){border-top-left-radius:0;border-top-right-radius:0} .model-explorer-download-png-menu .menu-item{letter-spacing:normal!important;font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;font-size:12px;padding:0 8px;cursor:pointer;display:flex;align-items:center} .model-explorer-download-png-menu .menu-item:hover{background-color:#eee} .model-explorer-download-png-menu .transparent-background-toggle{display:flex;align-items:center;font-size:12px;letter-spacing:normal;padding:6px 8px 0 4px;border-top:1px solid #ddd;margin-top:8px;cursor:pointer} .model-explorer-download-png-menu .transparent-background-toggle input{cursor:inherit} @@ -3816,7 +3816,7 @@ void main() { -`],changeDetection:0})}return i})();var yfe=["rendererWrapper"],xfe=400,wfe=400,Cfe=26,fj=(()=>{class i{appService;root;id;paneId;groupNode;initialPosition;curModelGraph;closeClicked=new Pe;rendererWrapper;selected=Xt(()=>this.appService.curSelectedRenderer()?.id===this.rendererWrapper?.rendererId&&this.appService.selectedPaneId()===this.paneId);minimized=!1;savedHeight="";mouseDownListener=t=>{this.rendererWrapper&&(this.appService.curSelectedRenderer.set({id:this.rendererWrapper.rendererId,ownerType:Ll.POPUP}),this.appService.selectNode(this.paneId,this.rendererWrapper.getActiveSelectedNodeInfo()),this.appService.selectPane(this.paneId))};constructor(t,n){this.appService=t,this.root=n}ngOnInit(){this.root.nativeElement.addEventListener("mousedown",this.mouseDownListener,!0);let t=this.root.nativeElement;t.style.left=`${this.initialPosition.x}px`,t.style.top=`${this.initialPosition.y}px`,t.style.width=`${xfe}px`,t.style.height=`${wfe}px`}ngOnDestroy(){this.root.nativeElement.removeEventListener("mousedown",this.mouseDownListener,!0)}toggleMinimize(){this.minimized=!this.minimized,this.minimized?(this.savedHeight=this.root.nativeElement.style.height,this.root.nativeElement.style.height=`${Cfe}px`):this.root.nativeElement.style.height=this.savedHeight}handleMouseDown(t){t.stopPropagation(),t.button!==2&&new RC(this.root.nativeElement).drag(t)}handleMouseUp(t){}get title(){return this.groupNode.label}static \u0275fac=function(n){return new(n||i)(M(st),M(Re))};static \u0275cmp=le({type:i,selectors:[["popup-panel"]],viewQuery:function(n,r){if(n&1&&Ie(yfe,5),n&2){let o;be(o=ye())&&(r.rendererWrapper=o.first)}},inputs:{id:"id",paneId:"paneId",groupNode:"groupNode",initialPosition:"initialPosition",curModelGraph:"curModelGraph"},outputs:{closeClicked:"closeClicked"},standalone:!0,features:[ce],decls:22,vars:13,consts:[["rendererWrapper",""],[1,"container",3,"mousedown","mouseup"],[1,"title",3,"dblclick"],[1,"label"],[1,"icons-container"],[1,"mat-icon-container","minimize",3,"click"],[1,"mat-icon-container","close",3,"click"],[3,"modelGraph","rendererId","paneId","rootNodeId","inPopup"],[1,"resize-box",3,"mousedown","mouseup"],["data-position","top"],["data-position","bottom"],["data-position","left"],["data-position","right"],["data-position","top-right"],["data-position","top-left"],["data-position","bottom-right"],["data-position","bottom-left"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",1),H("mousedown",function(a){return V(o),z(r.handleMouseDown(a))})("mouseup",function(a){return V(o),z(r.handleMouseUp(a))}),v(1,"div",2),H("dblclick",function(){return V(o),z(r.toggleMinimize())}),v(2,"div",3),S(3),y(),v(4,"div",4)(5,"div",5),H("click",function(){return V(o),z(r.toggleMinimize())}),v(6,"mat-icon"),S(7),y()(),v(8,"div",6),H("click",function(){return V(o),z(r.closeClicked.emit(r.id))}),v(9,"mat-icon"),S(10,"close"),y()()()(),J(11,"renderer-wrapper",7,0),y(),v(13,"div",8),H("mousedown",function(a){return V(o),z(r.handleMouseDown(a))})("mouseup",function(a){return V(o),z(r.handleMouseUp(a))}),J(14,"div",9)(15,"div",10)(16,"div",11)(17,"div",12)(18,"div",13)(19,"div",14)(20,"div",15)(21,"div",16),y()}n&2&&(se("selected",r.selected())("minimized",r.minimized),w(3),nt(r.title),w(4),nt(r.minimized?"unfold_more":"unfold_less"),w(4),N("modelGraph",r.curModelGraph)("rendererId",r.id)("paneId",r.paneId)("rootNodeId",r.groupNode.id)("inPopup",!0),w(2),se("disabled",r.minimized))},dependencies:[it,gt,BC],styles:[`[_nghost-%COMP%]{position:absolute;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;font-size:13px;outline:2px solid transparent;position:relative;background-color:#fff;border-radius:4px;overflow:hidden;border:2px solid #aaa;cursor:pointer}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{height:27px;border-bottom:1px solid #ccc;box-sizing:border-box;background-color:#e7f3ff;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;overflow:hidden;border-top-left-radius:2px;border-top-right-radius:2px;white-space:nowrap}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;padding-left:8px;padding-right:4px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;display:flex;align-items:center;justify-content:center;opacity:.6;cursor:pointer}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;font-weight:700;width:16px;height:16px}.container[_ngcontent-%COMP%] renderer-wrapper[_ngcontent-%COMP%]{flex-grow:1;min-height:0}.container.selected[_ngcontent-%COMP%]{box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.container.selected[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{background-color:#ea8600;color:#fff}.container.minimized[_ngcontent-%COMP%] svg-renderer[_ngcontent-%COMP%]{display:none}.resize-box[_ngcontent-%COMP%]{position:absolute;inset:-4px;pointer-events:none;z-index:100}.resize-box.disabled[_ngcontent-%COMP%] [data-position][_ngcontent-%COMP%]{pointer-events:none}.resize-box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;pointer-events:all;background-color:transparent}.resize-box[_ngcontent-%COMP%] [data-position=top][_ngcontent-%COMP%]{top:0;width:100%;height:8px;cursor:ns-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom][_ngcontent-%COMP%]{bottom:0;width:100%;height:8px;cursor:ns-resize}.resize-box[_ngcontent-%COMP%] [data-position=left][_ngcontent-%COMP%]{left:0;height:100%;width:8px;cursor:ew-resize}.resize-box[_ngcontent-%COMP%] [data-position=right][_ngcontent-%COMP%]{right:0;height:100%;width:8px;cursor:ew-resize}.resize-box[_ngcontent-%COMP%] [data-position=top-right][_ngcontent-%COMP%]{top:0;right:0;height:8px;width:8px;cursor:nesw-resize}.resize-box[_ngcontent-%COMP%] [data-position=top-left][_ngcontent-%COMP%]{top:0;left:0;height:8px;width:8px;cursor:nwse-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom-left][_ngcontent-%COMP%]{bottom:0;left:0;height:8px;width:8px;cursor:nesw-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom-right][_ngcontent-%COMP%]{bottom:0;right:0;height:8px;width:8px;cursor:nwse-resize} +`],changeDetection:0})}return i})();var bfe=["rendererWrapper"],yfe=400,xfe=400,wfe=26,hj=(()=>{class i{appService;root;id;paneId;groupNode;initialPosition;curModelGraph;closeClicked=new Pe;rendererWrapper;selected=Xt(()=>this.appService.curSelectedRenderer()?.id===this.rendererWrapper?.rendererId&&this.appService.selectedPaneId()===this.paneId);minimized=!1;savedHeight="";mouseDownListener=t=>{this.rendererWrapper&&(this.appService.curSelectedRenderer.set({id:this.rendererWrapper.rendererId,ownerType:Ll.POPUP}),this.appService.selectNode(this.paneId,this.rendererWrapper.getActiveSelectedNodeInfo()),this.appService.selectPane(this.paneId))};constructor(t,n){this.appService=t,this.root=n}ngOnInit(){this.root.nativeElement.addEventListener("mousedown",this.mouseDownListener,!0);let t=this.root.nativeElement;t.style.left=`${this.initialPosition.x}px`,t.style.top=`${this.initialPosition.y}px`,t.style.width=`${yfe}px`,t.style.height=`${xfe}px`}ngOnDestroy(){this.root.nativeElement.removeEventListener("mousedown",this.mouseDownListener,!0)}toggleMinimize(){this.minimized=!this.minimized,this.minimized?(this.savedHeight=this.root.nativeElement.style.height,this.root.nativeElement.style.height=`${wfe}px`):this.root.nativeElement.style.height=this.savedHeight}handleMouseDown(t){t.stopPropagation(),t.button!==2&&new RC(this.root.nativeElement).drag(t)}handleMouseUp(t){}get title(){return this.groupNode.label}static \u0275fac=function(n){return new(n||i)(M(st),M(Re))};static \u0275cmp=le({type:i,selectors:[["popup-panel"]],viewQuery:function(n,r){if(n&1&&Ie(bfe,5),n&2){let o;be(o=ye())&&(r.rendererWrapper=o.first)}},inputs:{id:"id",paneId:"paneId",groupNode:"groupNode",initialPosition:"initialPosition",curModelGraph:"curModelGraph"},outputs:{closeClicked:"closeClicked"},standalone:!0,features:[ce],decls:22,vars:13,consts:[["rendererWrapper",""],[1,"container",3,"mousedown","mouseup"],[1,"title",3,"dblclick"],[1,"label"],[1,"icons-container"],[1,"mat-icon-container","minimize",3,"click"],[1,"mat-icon-container","close",3,"click"],[3,"modelGraph","rendererId","paneId","rootNodeId","inPopup"],[1,"resize-box",3,"mousedown","mouseup"],["data-position","top"],["data-position","bottom"],["data-position","left"],["data-position","right"],["data-position","top-right"],["data-position","top-left"],["data-position","bottom-right"],["data-position","bottom-left"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",1),H("mousedown",function(a){return V(o),z(r.handleMouseDown(a))})("mouseup",function(a){return V(o),z(r.handleMouseUp(a))}),v(1,"div",2),H("dblclick",function(){return V(o),z(r.toggleMinimize())}),v(2,"div",3),S(3),y(),v(4,"div",4)(5,"div",5),H("click",function(){return V(o),z(r.toggleMinimize())}),v(6,"mat-icon"),S(7),y()(),v(8,"div",6),H("click",function(){return V(o),z(r.closeClicked.emit(r.id))}),v(9,"mat-icon"),S(10,"close"),y()()()(),J(11,"renderer-wrapper",7,0),y(),v(13,"div",8),H("mousedown",function(a){return V(o),z(r.handleMouseDown(a))})("mouseup",function(a){return V(o),z(r.handleMouseUp(a))}),J(14,"div",9)(15,"div",10)(16,"div",11)(17,"div",12)(18,"div",13)(19,"div",14)(20,"div",15)(21,"div",16),y()}n&2&&(se("selected",r.selected())("minimized",r.minimized),w(3),nt(r.title),w(4),nt(r.minimized?"unfold_more":"unfold_less"),w(4),N("modelGraph",r.curModelGraph)("rendererId",r.id)("paneId",r.paneId)("rootNodeId",r.groupNode.id)("inPopup",!0),w(2),se("disabled",r.minimized))},dependencies:[it,gt,BC],styles:[`[_nghost-%COMP%]{position:absolute;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;font-size:13px;outline:2px solid transparent;position:relative;background-color:#fff;border-radius:4px;overflow:hidden;border:2px solid #aaa;cursor:pointer}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{height:27px;border-bottom:1px solid #ccc;box-sizing:border-box;background-color:#e7f3ff;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;overflow:hidden;border-top-left-radius:2px;border-top-right-radius:2px;white-space:nowrap}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;padding-left:8px;padding-right:4px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;display:flex;align-items:center;justify-content:center;opacity:.6;cursor:pointer}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;font-weight:700;width:16px;height:16px}.container[_ngcontent-%COMP%] renderer-wrapper[_ngcontent-%COMP%]{flex-grow:1;min-height:0}.container.selected[_ngcontent-%COMP%]{box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.container.selected[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{background-color:#ea8600;color:#fff}.container.minimized[_ngcontent-%COMP%] svg-renderer[_ngcontent-%COMP%]{display:none}.resize-box[_ngcontent-%COMP%]{position:absolute;inset:-4px;pointer-events:none;z-index:100}.resize-box.disabled[_ngcontent-%COMP%] [data-position][_ngcontent-%COMP%]{pointer-events:none}.resize-box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;pointer-events:all;background-color:transparent}.resize-box[_ngcontent-%COMP%] [data-position=top][_ngcontent-%COMP%]{top:0;width:100%;height:8px;cursor:ns-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom][_ngcontent-%COMP%]{bottom:0;width:100%;height:8px;cursor:ns-resize}.resize-box[_ngcontent-%COMP%] [data-position=left][_ngcontent-%COMP%]{left:0;height:100%;width:8px;cursor:ew-resize}.resize-box[_ngcontent-%COMP%] [data-position=right][_ngcontent-%COMP%]{right:0;height:100%;width:8px;cursor:ew-resize}.resize-box[_ngcontent-%COMP%] [data-position=top-right][_ngcontent-%COMP%]{top:0;right:0;height:8px;width:8px;cursor:nesw-resize}.resize-box[_ngcontent-%COMP%] [data-position=top-left][_ngcontent-%COMP%]{top:0;left:0;height:8px;width:8px;cursor:nwse-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom-left][_ngcontent-%COMP%]{bottom:0;left:0;height:8px;width:8px;cursor:nesw-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom-right][_ngcontent-%COMP%]{bottom:0;right:0;height:8px;width:8px;cursor:nwse-resize} @@ -3834,7 +3834,7 @@ void main() { -`],changeDetection:0})}return i})();function Sfe(i,e){if(i&1){let t=ie();v(0,"button",5),H("click",function(){V(t);let r=I(2);return z(r.handleClickExportToResource())}),v(1,"mat-icon"),S(2,"drive_folder_upload"),y(),S(3," Export to resource "),y()}}function Mfe(i,e){if(i&1){let t=ie();v(0,"div",0)(1,"div",1),S(2," Selection "),y(),v(3,"div",2),S(4),v(5,"div",3),H("click",function(){V(t);let r=I();return z(r.handleClickClear())}),S(6," Clear "),y()(),v(7,"div",4)(8,"button",5),H("click",function(){V(t);let r=I();return z(r.handleClickDownloadSubgraph())}),S(9," Download subgraph "),y(),W(10,Sfe,4,0,"button",6),y()()}if(i&2){let t=I();w(4),Me(" ",t.selectedNodeCountLabel()," "),w(6),ae(t.enableExportToResource?10:-1)}}var mj=(()=>{class i{appService;subgraphSelectionService;paneId;hasSelectedNodes;selectedNodeCountLabel=Xt(()=>{let t=this.subgraphSelectionService.selectedNodeCount();return`${t} node${t===1?"":"s"}`});constructor(t,n){this.appService=t,this.subgraphSelectionService=n,this.hasSelectedNodes=this.subgraphSelectionService.hasSelectedNodes}handleClickClear(){this.subgraphSelectionService.clearSelection()}handleClickDownloadSubgraph(){let t=this.subgraphSelectionService.getSelectedSubgraph();if(!t)return;let n=document.createElement("a");n.download=`${t.collectionLabel}_subgraph.json`;let r=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify([t],null,2))}`;aa.setHref(n,r),n.click()}handleClickExportToResource(){let t=this.subgraphSelectionService.getSelectedSubgraph();t&&Qb(`${t.collectionLabel??""}_subgraph.json`,[t])}get enableExportToResource(){return this.appService.config()?.enableExportToResource===!0}static \u0275fac=function(n){return new(n||i)(M(st),M(Xo))};static \u0275cmp=le({type:i,selectors:[["selection-panel"]],inputs:{paneId:"paneId"},standalone:!0,features:[ce],decls:1,vars:1,consts:[[1,"container"],[1,"title"],[1,"content"],[1,"link-clear",3,"click"],[1,"btns-container"],["mat-flat-button","","color","primary",3,"click"],["mat-flat-button","","color","primary"]],template:function(n,r){n&1&&W(0,Mfe,11,2,"div",0),n&2&&ae(r.hasSelectedNodes()?0:-1)},dependencies:[Ae,In,zi,it,gt],styles:[`.container[_ngcontent-%COMP%]{font-size:12px;border:2px solid #09b83e;overflow:hidden;border-radius:6px;background-color:#fff}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:6px 8px;background-color:#09b83e;color:#fff;font-weight:500}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:16px 8px 12px;display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .link-clear[_ngcontent-%COMP%]{text-decoration:underline;color:#00639b;cursor:pointer;opacity:.8;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .link-clear[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:8px;gap:8px}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{letter-spacing:normal;width:100%} +`],changeDetection:0})}return i})();function Cfe(i,e){if(i&1){let t=ie();v(0,"button",5),H("click",function(){V(t);let r=I(2);return z(r.handleClickExportToResource())}),v(1,"mat-icon"),S(2,"drive_folder_upload"),y(),S(3," Export to resource "),y()}}function Sfe(i,e){if(i&1){let t=ie();v(0,"div",0)(1,"div",1),S(2," Selection "),y(),v(3,"div",2),S(4),v(5,"div",3),H("click",function(){V(t);let r=I();return z(r.handleClickClear())}),S(6," Clear "),y()(),v(7,"div",4)(8,"button",5),H("click",function(){V(t);let r=I();return z(r.handleClickDownloadSubgraph())}),S(9," Download subgraph "),y(),W(10,Cfe,4,0,"button",6),y()()}if(i&2){let t=I();w(4),Me(" ",t.selectedNodeCountLabel()," "),w(6),ae(t.enableExportToResource?10:-1)}}var pj=(()=>{class i{appService;subgraphSelectionService;paneId;hasSelectedNodes;selectedNodeCountLabel=Xt(()=>{let t=this.subgraphSelectionService.selectedNodeCount();return`${t} node${t===1?"":"s"}`});constructor(t,n){this.appService=t,this.subgraphSelectionService=n,this.hasSelectedNodes=this.subgraphSelectionService.hasSelectedNodes}handleClickClear(){this.subgraphSelectionService.clearSelection()}handleClickDownloadSubgraph(){let t=this.subgraphSelectionService.getSelectedSubgraph();if(!t)return;let n=document.createElement("a");n.download=`${t.collectionLabel}_subgraph.json`;let r=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify([t],null,2))}`;aa.setHref(n,r),n.click()}handleClickExportToResource(){let t=this.subgraphSelectionService.getSelectedSubgraph();t&&Kb(`${t.collectionLabel??""}_subgraph.json`,[t])}get enableExportToResource(){return this.appService.config()?.enableExportToResource===!0}static \u0275fac=function(n){return new(n||i)(M(st),M(Xo))};static \u0275cmp=le({type:i,selectors:[["selection-panel"]],inputs:{paneId:"paneId"},standalone:!0,features:[ce],decls:1,vars:1,consts:[[1,"container"],[1,"title"],[1,"content"],[1,"link-clear",3,"click"],[1,"btns-container"],["mat-flat-button","","color","primary",3,"click"],["mat-flat-button","","color","primary"]],template:function(n,r){n&1&&W(0,Sfe,11,2,"div",0),n&2&&ae(r.hasSelectedNodes()?0:-1)},dependencies:[Ae,In,zi,it,gt],styles:[`.container[_ngcontent-%COMP%]{font-size:12px;border:2px solid #09b83e;overflow:hidden;border-radius:6px;background-color:#fff}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:6px 8px;background-color:#09b83e;color:#fff;font-weight:500}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:16px 8px 12px;display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .link-clear[_ngcontent-%COMP%]{text-decoration:underline;color:#00639b;cursor:pointer;opacity:.8;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .link-clear[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:8px;gap:8px}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{letter-spacing:normal;width:100%} @@ -3852,7 +3852,7 @@ void main() { -`],changeDetection:0})}return i})();var Efe=["popupPanel"];function Ife(i,e){if(i&1){let t=ie();v(0,"renderer-wrapper",5),H("openInPopupClicked",function(r){V(t);let o=I();return z(o.handleOpenOnPopupClicked(r))}),y()}if(i&2){let t=I();N("modelGraph",t.modelGraph)("rendererId",t.rendererId)("paneId",t.paneId)}}function Tfe(i,e){if(i&1){let t=ie();v(0,"popup-panel",6,0),H("closeClicked",function(r){V(t);let o=I();return z(o.handleClickClosePanel(r))}),y()}if(i&2){let t=e.$implicit,n=I();N("id",t.id)("paneId",n.paneId)("groupNode",t.groupNode)("initialPosition",t.initialPosition)("curModelGraph",t.curModelGraph)}}function Dfe(i,e){if(i&1&&J(0,"legends-panel",4),i&2){let t=I();N("paneId",t.paneId)}}var gj=(()=>{class i{root;appService;changeDetectorRef;subgraphSelectionService;modelGraph;rendererId;paneId;popupPanelComponents=new Yi;popupPanels=[];showRenderer=!0;mouseDownListener=t=>{t.target.closest("popup-panel")==null&&this.appService.curSelectedRenderer.set({id:this.rendererId,ownerType:Ll.GRAPH_PANEL})};resizeObserver;constructor(t,n,r,o){this.root=t,this.appService=n,this.changeDetectorRef=r,this.subgraphSelectionService=o,mt(()=>{let s=this.appService.curSelectedRenderer(),a=this.root.nativeElement.querySelector("popup-panel.top");a&&a.classList.remove("top");let l=this.popupPanelComponents.find(c=>c.rendererWrapper?.rendererId===s?.id);l&&l.root.nativeElement.classList.add("top")})}ngOnInit(){this.root.nativeElement.addEventListener("mousedown",this.mouseDownListener,!0),this.subgraphSelectionService.paneId=this.paneId}ngOnChanges(t){t.modelGraph&&this.modelGraph&&(this.subgraphSelectionService.clearSelection(),this.showRenderer=!1,this.changeDetectorRef.detectChanges(),this.showRenderer=!0,this.changeDetectorRef.detectChanges())}ngAfterViewInit(){let t=this.root.nativeElement;this.resizeObserver=new ResizeObserver(n=>{this.handleResize()}),this.resizeObserver.observe(t)}ngOnDestroy(){this.root.nativeElement.removeEventListener("mousedown",this.mouseDownListener,!0),this.resizeObserver&&this.resizeObserver.unobserve(this.root.nativeElement)}trackByPopupPanelId(t,n){return n.id}handleOpenOnPopupClicked(t){this.popupPanels.push(t)}handleClickClosePanel(t){let n=this.popupPanels.findIndex(r=>r.id===t);n>=0&&this.popupPanels.splice(n,1)}get showLegends(){return!this.appService.config()?.hideLegends}handleResize(){let t=this.root.nativeElement;for(let n of this.popupPanelComponents){let r=n.root.nativeElement;if(!r)continue;let o=Number(r.style.width.replace("px","")),s=Number(r.style.height.replace("px","")),a=Number(r.style.left.replace("px",""))+o,l=Number(r.style.top.replace("px",""))+s;a>t.offsetWidth&&(r.style.left=`${t.offsetWidth-o}px`),l>t.offsetHeight&&(r.style.top=`${t.offsetHeight-s}px`)}}static \u0275fac=function(n){return new(n||i)(M(Re),M(st),M(Fe),M(Xo))};static \u0275cmp=le({type:i,selectors:[["graph-panel"]],viewQuery:function(n,r){if(n&1&&Ie(Efe,5),n&2){let o;be(o=ye())&&(r.popupPanelComponents=o)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId"},standalone:!0,features:[dn,ce],decls:5,vars:5,consts:[["popupPanel",""],[1,"container"],[3,"modelGraph","rendererId","paneId","openInPopupClicked",4,"ngIf"],[3,"id","paneId","groupNode","initialPosition","curModelGraph","closeClicked",4,"ngFor","ngForOf","ngForTrackBy"],[3,"paneId"],[3,"openInPopupClicked","modelGraph","rendererId","paneId"],[3,"closeClicked","id","paneId","groupNode","initialPosition","curModelGraph"]],template:function(n,r){n&1&&(v(0,"div",1),W(1,Ife,1,3,"renderer-wrapper",2)(2,Tfe,2,5,"popup-panel",3)(3,Dfe,1,1,"legends-panel",4),J(4,"selection-panel",4),y()),n&2&&(w(),N("ngIf",r.showRenderer),w(),N("ngForOf",r.popupPanels)("ngForTrackBy",r.trackByPopupPanelId),w(),ae(r.showLegends?3:-1),w(),N("paneId",r.paneId))},dependencies:[Ae,Ci,Mn,WG,fj,BC,mj],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;position:relative;overflow:hidden}.container[_ngcontent-%COMP%] renderer-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] popup-panel.top[_ngcontent-%COMP%]{z-index:100}.container[_ngcontent-%COMP%] legends-panel[_ngcontent-%COMP%]{position:absolute;left:8px;bottom:8px;border-radius:6px;border:1px solid #ddd;overflow:hidden}.container[_ngcontent-%COMP%] selection-panel[_ngcontent-%COMP%]{position:absolute;right:8px;top:8px;overflow:hidden} +`],changeDetection:0})}return i})();var Mfe=["popupPanel"];function Efe(i,e){if(i&1){let t=ie();v(0,"renderer-wrapper",5),H("openInPopupClicked",function(r){V(t);let o=I();return z(o.handleOpenOnPopupClicked(r))}),y()}if(i&2){let t=I();N("modelGraph",t.modelGraph)("rendererId",t.rendererId)("paneId",t.paneId)}}function Ife(i,e){if(i&1){let t=ie();v(0,"popup-panel",6,0),H("closeClicked",function(r){V(t);let o=I();return z(o.handleClickClosePanel(r))}),y()}if(i&2){let t=e.$implicit,n=I();N("id",t.id)("paneId",n.paneId)("groupNode",t.groupNode)("initialPosition",t.initialPosition)("curModelGraph",t.curModelGraph)}}function Tfe(i,e){if(i&1&&J(0,"legends-panel",4),i&2){let t=I();N("paneId",t.paneId)}}var fj=(()=>{class i{root;appService;changeDetectorRef;subgraphSelectionService;modelGraph;rendererId;paneId;popupPanelComponents=new Yi;popupPanels=[];showRenderer=!0;mouseDownListener=t=>{t.target.closest("popup-panel")==null&&this.appService.curSelectedRenderer.set({id:this.rendererId,ownerType:Ll.GRAPH_PANEL})};resizeObserver;constructor(t,n,r,o){this.root=t,this.appService=n,this.changeDetectorRef=r,this.subgraphSelectionService=o,mt(()=>{let s=this.appService.curSelectedRenderer(),a=this.root.nativeElement.querySelector("popup-panel.top");a&&a.classList.remove("top");let l=this.popupPanelComponents.find(c=>c.rendererWrapper?.rendererId===s?.id);l&&l.root.nativeElement.classList.add("top")})}ngOnInit(){this.root.nativeElement.addEventListener("mousedown",this.mouseDownListener,!0),this.subgraphSelectionService.paneId=this.paneId}ngOnChanges(t){t.modelGraph&&this.modelGraph&&(this.subgraphSelectionService.clearSelection(),this.showRenderer=!1,this.changeDetectorRef.detectChanges(),this.showRenderer=!0,this.changeDetectorRef.detectChanges())}ngAfterViewInit(){let t=this.root.nativeElement;this.resizeObserver=new ResizeObserver(n=>{this.handleResize()}),this.resizeObserver.observe(t)}ngOnDestroy(){this.root.nativeElement.removeEventListener("mousedown",this.mouseDownListener,!0),this.resizeObserver&&this.resizeObserver.unobserve(this.root.nativeElement)}trackByPopupPanelId(t,n){return n.id}handleOpenOnPopupClicked(t){this.popupPanels.push(t)}handleClickClosePanel(t){let n=this.popupPanels.findIndex(r=>r.id===t);n>=0&&this.popupPanels.splice(n,1)}get showLegends(){return!this.appService.config()?.hideLegends}handleResize(){let t=this.root.nativeElement;for(let n of this.popupPanelComponents){let r=n.root.nativeElement;if(!r)continue;let o=Number(r.style.width.replace("px","")),s=Number(r.style.height.replace("px","")),a=Number(r.style.left.replace("px",""))+o,l=Number(r.style.top.replace("px",""))+s;a>t.offsetWidth&&(r.style.left=`${t.offsetWidth-o}px`),l>t.offsetHeight&&(r.style.top=`${t.offsetHeight-s}px`)}}static \u0275fac=function(n){return new(n||i)(M(Re),M(st),M(Fe),M(Xo))};static \u0275cmp=le({type:i,selectors:[["graph-panel"]],viewQuery:function(n,r){if(n&1&&Ie(Mfe,5),n&2){let o;be(o=ye())&&(r.popupPanelComponents=o)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId"},standalone:!0,features:[dn,ce],decls:5,vars:5,consts:[["popupPanel",""],[1,"container"],[3,"modelGraph","rendererId","paneId","openInPopupClicked",4,"ngIf"],[3,"id","paneId","groupNode","initialPosition","curModelGraph","closeClicked",4,"ngFor","ngForOf","ngForTrackBy"],[3,"paneId"],[3,"openInPopupClicked","modelGraph","rendererId","paneId"],[3,"closeClicked","id","paneId","groupNode","initialPosition","curModelGraph"]],template:function(n,r){n&1&&(v(0,"div",1),W(1,Efe,1,3,"renderer-wrapper",2)(2,Ife,2,5,"popup-panel",3)(3,Tfe,1,1,"legends-panel",4),J(4,"selection-panel",4),y()),n&2&&(w(),N("ngIf",r.showRenderer),w(),N("ngForOf",r.popupPanels)("ngForTrackBy",r.trackByPopupPanelId),w(),ae(r.showLegends?3:-1),w(),N("paneId",r.paneId))},dependencies:[Ae,Ci,Mn,GG,hj,BC,pj],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;position:relative;overflow:hidden}.container[_ngcontent-%COMP%] renderer-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] popup-panel.top[_ngcontent-%COMP%]{z-index:100}.container[_ngcontent-%COMP%] legends-panel[_ngcontent-%COMP%]{position:absolute;left:8px;bottom:8px;border-radius:6px;border:1px solid #ddd;overflow:hidden}.container[_ngcontent-%COMP%] selection-panel[_ngcontent-%COMP%]{position:absolute;right:8px;top:8px;overflow:hidden} @@ -3870,9 +3870,9 @@ void main() { -`],changeDetection:0})}return i})();var Pfe=["switch"],Ofe=["*"];function Rfe(i,e){i&1&&(v(0,"div",10),io(),v(1,"svg",12),J(2,"path",13),y(),v(3,"svg",14),J(4,"path",15),y()())}var Afe=new ge("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1})}),Nfe={provide:La,useExisting:Yr(()=>zC),multi:!0},VC=class{constructor(e,t){this.source=e,this.checked=t}},kfe=0,zC=(()=>{let e=class e{_createChangeEvent(n){return new VC(this,n)}get buttonId(){return`${this.id||this._uniqueId}-button`}focus(){this._switchElement.nativeElement.focus()}get checked(){return this._checked}set checked(n){this._checked=n,this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(n,r,o,s,a,l){this._elementRef=n,this._focusMonitor=r,this._changeDetectorRef=o,this.defaults=a,this._onChange=c=>{},this._onTouched=()=>{},this._validatorOnChange=()=>{},this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.change=new Pe,this.toggleChange=new Pe,this.tabIndex=parseInt(s)||0,this.color=a.color||"accent",this._noopAnimations=l==="NoopAnimations",this.id=this._uniqueId=`mat-mdc-slide-toggle-${++kfe}`,this.hideIcon=a.hideIcon??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(n=>{n==="keyboard"||n==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):n||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(n){n.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(n){this.checked=!!n}registerOnChange(n){this._onChange=n}registerOnTouched(n){this._onTouched=n}validate(n){return this.required&&n.value!==!0?{required:!0}:null}registerOnValidatorChange(n){this._validatorOnChange=n}setDisabledState(n){this.disabled=n,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new VC(this,this.checked)))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(po),M(Fe),ro("tabindex"),M(Afe),M(Zn,8))},e.\u0275cmp=le({type:e,selectors:[["mat-slide-toggle"]],viewQuery:function(r,o){if(r&1&&Ie(Pfe,5),r&2){let s;be(s=ye())&&(o._switchElement=s.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(r,o){r&2&&(No("id",o.id),Ze("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),Nr(o.color?"mat-"+o.color:""),se("mat-mdc-slide-toggle-focused",o._focused)("mat-mdc-slide-toggle-checked",o.checked)("_mat-animation-noopable",o._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",at],color:"color",disabled:[2,"disabled","disabled",at],disableRipple:[2,"disableRipple","disableRipple",at],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?0:wi(n)],checked:[2,"checked","checked",at],hideIcon:[2,"hideIcon","hideIcon",at]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],standalone:!0,features:[Bt([Nfe,{provide:pd,useExisting:e,multi:!0}]),an,dn,ce],ngContentSelectors:Ofe,decls:13,vars:24,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(r,o){if(r&1){let s=ie();kn(),v(0,"div",1)(1,"button",2,0),H("click",function(){return V(s),z(o._handleClick())}),J(3,"div",3),v(4,"div",4)(5,"div",5)(6,"div",6),J(7,"div",7),y(),v(8,"div",8),J(9,"div",9),y(),W(10,Rfe,5,0,"div",10),y()()(),v(11,"label",11),H("click",function(l){return V(s),z(l.stopPropagation())}),$t(12),y()()}if(r&2){let s=ve(2);N("labelPosition",o.labelPosition),w(),se("mdc-switch--selected",o.checked)("mdc-switch--unselected",!o.checked)("mdc-switch--checked",o.checked)("mdc-switch--disabled",o.disabled),N("tabIndex",o.disabled?-1:o.tabIndex)("disabled",o.disabled),Ze("id",o.buttonId)("name",o.name)("aria-label",o.ariaLabel)("aria-labelledby",o._getAriaLabelledBy())("aria-describedby",o.ariaDescribedby)("aria-required",o.required||null)("aria-checked",o.checked),w(8),N("matRippleTrigger",s)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),w(),ae(o.hideIcon?-1:10),w(),N("for",o.buttonId),Ze("id",o._labelId)}},dependencies:[za,Dy],styles:['.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mdc-switch-track-width)}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mdc-switch-track-height);border-radius:var(--mdc-switch-track-shape)}.mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-switch-track-outline-width);border-color:var(--mat-switch-track-outline-color)}.cdk-high-contrast-active .mdc-switch__track::before,.cdk-high-contrast-active .mdc-switch__track::after{border-color:currentColor}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-switch-selected-track-outline-width);border-color:var(--mat-switch-selected-track-outline-color)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-switch-disabled-unselected-track-outline-width);border-color:var(--mat-switch-disabled-unselected-track-outline-color)}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mdc-switch-unselected-track-color)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color)}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mdc-switch-selected-track-color)}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mdc-switch-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mdc-switch-handle-width);height:var(--mdc-switch-handle-height);border-radius:var(--mdc-switch-handle-shape)}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size);height:var(--mat-switch-unselected-handle-size);margin:var(--mat-switch-unselected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size);height:var(--mat-switch-selected-handle-size);margin:var(--mat-switch-selected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size);height:var(--mat-switch-with-icon-handle-size)}.mat-mdc-slide-toggle:active .mdc-switch:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size);height:var(--mat-switch-pressed-handle-size)}.mat-mdc-slide-toggle:active .mdc-switch--selected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin)}.mat-mdc-slide-toggle:active .mdc-switch--unselected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}.cdk-high-contrast-active .mdc-switch__handle::before,.cdk-high-contrast-active .mdc-switch__handle::after{border-color:currentColor}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color)}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color)}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color)}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color)}.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color)}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color)}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color)}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color)}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color)}.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color)}.mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mdc-switch-state-layer-size);height:var(--mdc-switch-state-layer-size)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch:disabled .mdc-switch__ripple::after{display:none}.mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-hover-state-layer-color)}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-focus-state-layer-color)}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-pressed-state-layer-color);opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity);transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-selected-hover-state-layer-color)}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-selected-focus-state-layer-color)}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-selected-pressed-state-layer-color);opacity:var(--mdc-switch-selected-pressed-state-layer-opacity);transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1}.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity)}.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size);height:var(--mdc-switch-unselected-icon-size);fill:var(--mdc-switch-unselected-icon-color)}.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color)}.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size);height:var(--mdc-switch-selected-icon-size);fill:var(--mdc-switch-selected-icon-color)}.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-switch-label-text-color);font-family:var(--mat-switch-label-text-font);line-height:var(--mat-switch-label-text-line-height);font-size:var(--mat-switch-label-text-size);letter-spacing:var(--mat-switch-label-text-tracking);font-weight:var(--mat-switch-label-text-weight)}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}'],encapsulation:2,changeDetection:0});let i=e;return i})();var UC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[zC,qt,qt]});let i=e;return i})();var Ffe=["container"],Bfe=["oneLineText"];function Vfe(i,e){if(i&1&&(v(0,"div",8),S(1," Showing at most "),v(2,"span",9),S(3),y()()),i&2){let t=I(2);w(2),N("matTooltipShowDelay",300),w(),Me(" ",t.getMaxConstValueCount()," elements ")}}function zfe(i,e){i&1&&(v(0,"div",8),S(1," Showing "),v(2,"span",9),S(3," all elements "),y()()),i&2&&(w(2),N("matTooltipShowDelay",300))}function Ufe(i,e){if(i&1&&(W(0,Vfe,4,2,"div",8)(1,zfe,4,1,"div",8),v(2,"div",4),S(3),y()),i&2){let t=I();ae(t.getMaxConstValueCount()>0?0:t.getMaxConstValueCount()<0?1:-1),w(3),nt(t.text)}}function Hfe(i,e){if(i&1&&(v(0,"div",11)(1,"div",12),S(2),y(),v(3,"div",13),S(4),y()()),i&2){let t=e.$implicit,n=e.$index;w(2),nt(n),w(2),nt(t)}}function Gfe(i,e){if(i&1&&(v(0,"div",8),S(1," Namespace hierarchy "),y(),v(2,"div",10),ln(3,Hfe,5,2,"div",11,X0),y()),i&2){let t=I();w(3),cn(t.namespaceComponents)}}function jfe(i,e){if(i&1&&(v(0,"div",4),S(1),y()),i&2){let t=I();w(),nt(t.formatQuantization)}}function Wfe(i,e){if(i&1&&(v(0,"div",5),S(1),y()),i&2){let t=I();w(),nt(t.text)}}var _j=(()=>{class i{appService;changeDetectorRef;text="";type="";bgColor="transparent";textColor="inherit";container;oneLineText;expanded=!1;hasOverflowInternal=!1;resizeObserver;constructor(t,n){this.appService=t,this.changeDetectorRef=n}get hostExpanded(){return this.expanded}ngAfterViewInit(){setTimeout(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()}),this.container&&(this.resizeObserver=new ResizeObserver(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()}),this.resizeObserver.observe(this.container.nativeElement))}ngOnChanges(){setTimeout(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()})}ngOnDestroy(){this.resizeObserver&&this.resizeObserver.disconnect()}handleToggleExpand(t,n=!1){!this.hasOverflow&&!this.hasMultipleLines||(t.stopPropagation(),!(n&&this.expanded)&&(this.expanded=!this.expanded))}getMaxConstValueCount(){return this.appService.config()?.maxConstValueCount??0}get hasOverflow(){return this.updateHasOverflow(),this.hasOverflowInternal}get hasMultipleLines(){return this.type!=="namespace"&&this.text.includes(` +`],changeDetection:0})}return i})();var Dfe=["switch"],Pfe=["*"];function Ofe(i,e){i&1&&(v(0,"div",10),io(),v(1,"svg",12),J(2,"path",13),y(),v(3,"svg",14),J(4,"path",15),y()())}var Rfe=new ge("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1})}),Afe={provide:La,useExisting:Yr(()=>zC),multi:!0},VC=class{constructor(e,t){this.source=e,this.checked=t}},Nfe=0,zC=(()=>{let e=class e{_createChangeEvent(n){return new VC(this,n)}get buttonId(){return`${this.id||this._uniqueId}-button`}focus(){this._switchElement.nativeElement.focus()}get checked(){return this._checked}set checked(n){this._checked=n,this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(n,r,o,s,a,l){this._elementRef=n,this._focusMonitor=r,this._changeDetectorRef=o,this.defaults=a,this._onChange=c=>{},this._onTouched=()=>{},this._validatorOnChange=()=>{},this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.change=new Pe,this.toggleChange=new Pe,this.tabIndex=parseInt(s)||0,this.color=a.color||"accent",this._noopAnimations=l==="NoopAnimations",this.id=this._uniqueId=`mat-mdc-slide-toggle-${++Nfe}`,this.hideIcon=a.hideIcon??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(n=>{n==="keyboard"||n==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):n||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(n){n.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(n){this.checked=!!n}registerOnChange(n){this._onChange=n}registerOnTouched(n){this._onTouched=n}validate(n){return this.required&&n.value!==!0?{required:!0}:null}registerOnValidatorChange(n){this._validatorOnChange=n}setDisabledState(n){this.disabled=n,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new VC(this,this.checked)))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(po),M(Fe),ro("tabindex"),M(Rfe),M(Zn,8))},e.\u0275cmp=le({type:e,selectors:[["mat-slide-toggle"]],viewQuery:function(r,o){if(r&1&&Ie(Dfe,5),r&2){let s;be(s=ye())&&(o._switchElement=s.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(r,o){r&2&&(No("id",o.id),Ze("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),Nr(o.color?"mat-"+o.color:""),se("mat-mdc-slide-toggle-focused",o._focused)("mat-mdc-slide-toggle-checked",o.checked)("_mat-animation-noopable",o._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",at],color:"color",disabled:[2,"disabled","disabled",at],disableRipple:[2,"disableRipple","disableRipple",at],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?0:wi(n)],checked:[2,"checked","checked",at],hideIcon:[2,"hideIcon","hideIcon",at]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],standalone:!0,features:[Bt([Afe,{provide:pd,useExisting:e,multi:!0}]),an,dn,ce],ngContentSelectors:Pfe,decls:13,vars:24,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(r,o){if(r&1){let s=ie();kn(),v(0,"div",1)(1,"button",2,0),H("click",function(){return V(s),z(o._handleClick())}),J(3,"div",3),v(4,"div",4)(5,"div",5)(6,"div",6),J(7,"div",7),y(),v(8,"div",8),J(9,"div",9),y(),W(10,Ofe,5,0,"div",10),y()()(),v(11,"label",11),H("click",function(l){return V(s),z(l.stopPropagation())}),$t(12),y()()}if(r&2){let s=ve(2);N("labelPosition",o.labelPosition),w(),se("mdc-switch--selected",o.checked)("mdc-switch--unselected",!o.checked)("mdc-switch--checked",o.checked)("mdc-switch--disabled",o.disabled),N("tabIndex",o.disabled?-1:o.tabIndex)("disabled",o.disabled),Ze("id",o.buttonId)("name",o.name)("aria-label",o.ariaLabel)("aria-labelledby",o._getAriaLabelledBy())("aria-describedby",o.ariaDescribedby)("aria-required",o.required||null)("aria-checked",o.checked),w(8),N("matRippleTrigger",s)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),w(),ae(o.hideIcon?-1:10),w(),N("for",o.buttonId),Ze("id",o._labelId)}},dependencies:[za,Py],styles:['.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mdc-switch-track-width)}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mdc-switch-track-height);border-radius:var(--mdc-switch-track-shape)}.mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-switch-track-outline-width);border-color:var(--mat-switch-track-outline-color)}.cdk-high-contrast-active .mdc-switch__track::before,.cdk-high-contrast-active .mdc-switch__track::after{border-color:currentColor}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-switch-selected-track-outline-width);border-color:var(--mat-switch-selected-track-outline-color)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-switch-disabled-unselected-track-outline-width);border-color:var(--mat-switch-disabled-unselected-track-outline-color)}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mdc-switch-unselected-track-color)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color)}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mdc-switch-selected-track-color)}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mdc-switch-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mdc-switch-handle-width);height:var(--mdc-switch-handle-height);border-radius:var(--mdc-switch-handle-shape)}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size);height:var(--mat-switch-unselected-handle-size);margin:var(--mat-switch-unselected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size);height:var(--mat-switch-selected-handle-size);margin:var(--mat-switch-selected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size);height:var(--mat-switch-with-icon-handle-size)}.mat-mdc-slide-toggle:active .mdc-switch:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size);height:var(--mat-switch-pressed-handle-size)}.mat-mdc-slide-toggle:active .mdc-switch--selected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin)}.mat-mdc-slide-toggle:active .mdc-switch--unselected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}.cdk-high-contrast-active .mdc-switch__handle::before,.cdk-high-contrast-active .mdc-switch__handle::after{border-color:currentColor}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color)}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color)}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color)}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color)}.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color)}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color)}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color)}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color)}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color)}.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color)}.mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mdc-switch-state-layer-size);height:var(--mdc-switch-state-layer-size)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch:disabled .mdc-switch__ripple::after{display:none}.mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-hover-state-layer-color)}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-focus-state-layer-color)}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-pressed-state-layer-color);opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity);transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-selected-hover-state-layer-color)}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-selected-focus-state-layer-color)}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-selected-pressed-state-layer-color);opacity:var(--mdc-switch-selected-pressed-state-layer-opacity);transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1}.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity)}.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size);height:var(--mdc-switch-unselected-icon-size);fill:var(--mdc-switch-unselected-icon-color)}.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color)}.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size);height:var(--mdc-switch-selected-icon-size);fill:var(--mdc-switch-selected-icon-color)}.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-switch-label-text-color);font-family:var(--mat-switch-label-text-font);line-height:var(--mat-switch-label-text-line-height);font-size:var(--mat-switch-label-text-size);letter-spacing:var(--mat-switch-label-text-tracking);font-weight:var(--mat-switch-label-text-weight)}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}'],encapsulation:2,changeDetection:0});let i=e;return i})();var UC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({imports:[zC,qt,qt]});let i=e;return i})();var Lfe=["container"],Ffe=["oneLineText"];function Bfe(i,e){if(i&1&&(v(0,"div",8),S(1," Showing at most "),v(2,"span",9),S(3),y()()),i&2){let t=I(2);w(2),N("matTooltipShowDelay",300),w(),Me(" ",t.getMaxConstValueCount()," elements ")}}function Vfe(i,e){i&1&&(v(0,"div",8),S(1," Showing "),v(2,"span",9),S(3," all elements "),y()()),i&2&&(w(2),N("matTooltipShowDelay",300))}function zfe(i,e){if(i&1&&(W(0,Bfe,4,2,"div",8)(1,Vfe,4,1,"div",8),v(2,"div",4),S(3),y()),i&2){let t=I();ae(t.getMaxConstValueCount()>0?0:t.getMaxConstValueCount()<0?1:-1),w(3),nt(t.text)}}function Ufe(i,e){if(i&1&&(v(0,"div",11)(1,"div",12),S(2),y(),v(3,"div",13),S(4),y()()),i&2){let t=e.$implicit,n=e.$index;w(2),nt(n),w(2),nt(t)}}function Hfe(i,e){if(i&1&&(v(0,"div",8),S(1," Namespace hierarchy "),y(),v(2,"div",10),ln(3,Ufe,5,2,"div",11,Z0),y()),i&2){let t=I();w(3),cn(t.namespaceComponents)}}function Gfe(i,e){if(i&1&&(v(0,"div",4),S(1),y()),i&2){let t=I();w(),nt(t.formatQuantization)}}function jfe(i,e){if(i&1&&(v(0,"div",5),S(1),y()),i&2){let t=I();w(),nt(t.text)}}var mj=(()=>{class i{appService;changeDetectorRef;text="";type="";bgColor="transparent";textColor="inherit";container;oneLineText;expanded=!1;hasOverflowInternal=!1;resizeObserver;constructor(t,n){this.appService=t,this.changeDetectorRef=n}get hostExpanded(){return this.expanded}ngAfterViewInit(){setTimeout(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()}),this.container&&(this.resizeObserver=new ResizeObserver(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()}),this.resizeObserver.observe(this.container.nativeElement))}ngOnChanges(){setTimeout(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()})}ngOnDestroy(){this.resizeObserver&&this.resizeObserver.disconnect()}handleToggleExpand(t,n=!1){!this.hasOverflow&&!this.hasMultipleLines||(t.stopPropagation(),!(n&&this.expanded)&&(this.expanded=!this.expanded))}getMaxConstValueCount(){return this.appService.config()?.maxConstValueCount??0}get hasOverflow(){return this.updateHasOverflow(),this.hasOverflowInternal}get hasMultipleLines(){return this.type!=="namespace"&&this.text.includes(` `)}get iconName(){return this.expanded?"unfold_less":"unfold_more"}get hasBgColor(){return this.bgColor!=="transparent"}get namespaceComponents(){let t=this.text.split("/");return this.text!==""&&t.unshift(""),t}get formatQuantization(){return this.text.replace("[","").replace("]","").split(",").map(n=>n.trim()).join(` -`)}updateHasOverflow(){if(!this.oneLineText){this.hasOverflowInternal=!1;return}this.hasOverflowInternal=this.oneLineText.nativeElement.scrollWidth>this.oneLineText.nativeElement.offsetWidth,this.expanded&&(this.type==="namespace"||this.type==="values")&&(this.hasOverflowInternal=!0)}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["expandable-info-text"]],viewQuery:function(n,r){if(n&1&&(Ie(Ffe,5),Ie(Bfe,5)),n&2){let o;be(o=ye())&&(r.container=o.first),be(o=ye())&&(r.oneLineText=o.first)}},hostVars:2,hostBindings:function(n,r){n&2&&se("expanded",r.hostExpanded)},inputs:{text:"text",type:"type",bgColor:"bgColor",textColor:"textColor"},standalone:!0,features:[dn,ce],decls:13,vars:15,consts:[["container",""],["oneLineText",""],[1,"container",3,"click"],[1,"expanded-text"],[1,"monospace-content"],[1,"text-content"],[1,"one-line-text"],[1,"icon-container","toggle",3,"click"],[1,"info-msg"],["matTooltip","configurable in Settings in homepage","matTooltipPosition","above",1,"underline",3,"matTooltipShowDelay"],[1,"namespace-content"],[1,"namespace-row"],[1,"index"],[1,"namespace"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",2,0),H("click",function(a){return V(o),z(r.handleToggleExpand(a,!0))}),v(2,"div",3),W(3,Ufe,4,2,"div",4)(4,Gfe,5,0)(5,jfe,2,1,"div",4)(6,Wfe,2,1,"div",5),y(),v(7,"div",6,1),S(9),y(),v(10,"div",7),H("click",function(a){return V(o),z(r.handleToggleExpand(a))}),v(11,"mat-icon"),S(12),y()()()}n&2&&(tn("background-color",r.bgColor)("color",r.textColor),se("has-bg-color",r.hasBgColor)("has-overflow",r.hasOverflow)("has-multiple-lines",r.hasMultipleLines)("expanded",r.expanded),w(3),ae(r.type==="values"?3:r.type==="namespace"?4:r.type==="quantization"?5:6),w(6),Me(" ",r.text," "),w(3),nt(r.iconName))},dependencies:[Ae,it,gt,Jt,Wn],styles:[`[_nghost-%COMP%]{overflow:hidden}.container[_ngcontent-%COMP%]{overflow:hidden;display:flex;align-items:flex-start;position:relative}.container.has-overflow[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%]{cursor:pointer}.container.has-overflow[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex}.container.has-overflow[_ngcontent-%COMP%]:hover .icon-container[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%]:hover .icon-container[_ngcontent-%COMP%]{opacity:1}.container.has-bg-color[_ngcontent-%COMP%]{border-radius:4px;padding-left:4px}.container.expanded[_ngcontent-%COMP%] .one-line-text[_ngcontent-%COMP%]{position:absolute;inset:0;visibility:hidden}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%]{display:block;flex-grow:1;cursor:text}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .info-msg[_ngcontent-%COMP%]{margin-bottom:2px;color:#999;font-size:12px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .info-msg[_ngcontent-%COMP%] .underline[_ngcontent-%COMP%]{text-decoration:underline dashed}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .monospace-content[_ngcontent-%COMP%]{font-size:11px;white-space:pre-wrap;font-family:monospace;max-height:500px;overflow:auto}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .text-content[_ngcontent-%COMP%]{white-space:pre-wrap;max-height:500px;overflow:auto}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%]{font-size:12px;line-height:14px;display:flex;align-items:flex-start}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{width:16px;color:#999;flex-shrink:0;line-height:14px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .namespace[_ngcontent-%COMP%]{line-height:14px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .namespace.hidden[_ngcontent-%COMP%]{color:#999}.container.expanded[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{background-color:#eee;border:1px solid #999}.container.expanded[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#999}.container[_ngcontent-%COMP%] .one-line-text[_ngcontent-%COMP%]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:12px;height:12px;flex-shrink:0;display:none;background-color:#d7f1ff;border-radius:2px;margin-left:2px;cursor:pointer;align-items:center;justify-content:center;border:1px solid #4e90b5;opacity:.75}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00639b;font-size:11px;width:11px;height:11px;font-weight:700} +`)}updateHasOverflow(){if(!this.oneLineText){this.hasOverflowInternal=!1;return}this.hasOverflowInternal=this.oneLineText.nativeElement.scrollWidth>this.oneLineText.nativeElement.offsetWidth,this.expanded&&(this.type==="namespace"||this.type==="values")&&(this.hasOverflowInternal=!0)}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["expandable-info-text"]],viewQuery:function(n,r){if(n&1&&(Ie(Lfe,5),Ie(Ffe,5)),n&2){let o;be(o=ye())&&(r.container=o.first),be(o=ye())&&(r.oneLineText=o.first)}},hostVars:2,hostBindings:function(n,r){n&2&&se("expanded",r.hostExpanded)},inputs:{text:"text",type:"type",bgColor:"bgColor",textColor:"textColor"},standalone:!0,features:[dn,ce],decls:13,vars:15,consts:[["container",""],["oneLineText",""],[1,"container",3,"click"],[1,"expanded-text"],[1,"monospace-content"],[1,"text-content"],[1,"one-line-text"],[1,"icon-container","toggle",3,"click"],[1,"info-msg"],["matTooltip","configurable in Settings in homepage","matTooltipPosition","above",1,"underline",3,"matTooltipShowDelay"],[1,"namespace-content"],[1,"namespace-row"],[1,"index"],[1,"namespace"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",2,0),H("click",function(a){return V(o),z(r.handleToggleExpand(a,!0))}),v(2,"div",3),W(3,zfe,4,2,"div",4)(4,Hfe,5,0)(5,Gfe,2,1,"div",4)(6,jfe,2,1,"div",5),y(),v(7,"div",6,1),S(9),y(),v(10,"div",7),H("click",function(a){return V(o),z(r.handleToggleExpand(a))}),v(11,"mat-icon"),S(12),y()()()}n&2&&(tn("background-color",r.bgColor)("color",r.textColor),se("has-bg-color",r.hasBgColor)("has-overflow",r.hasOverflow)("has-multiple-lines",r.hasMultipleLines)("expanded",r.expanded),w(3),ae(r.type==="values"?3:r.type==="namespace"?4:r.type==="quantization"?5:6),w(6),Me(" ",r.text," "),w(3),nt(r.iconName))},dependencies:[Ae,it,gt,Jt,Wn],styles:[`[_nghost-%COMP%]{overflow:hidden}.container[_ngcontent-%COMP%]{overflow:hidden;display:flex;align-items:flex-start;position:relative}.container.has-overflow[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%]{cursor:pointer}.container.has-overflow[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex}.container.has-overflow[_ngcontent-%COMP%]:hover .icon-container[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%]:hover .icon-container[_ngcontent-%COMP%]{opacity:1}.container.has-bg-color[_ngcontent-%COMP%]{border-radius:4px;padding-left:4px}.container.expanded[_ngcontent-%COMP%] .one-line-text[_ngcontent-%COMP%]{position:absolute;inset:0;visibility:hidden}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%]{display:block;flex-grow:1;cursor:text}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .info-msg[_ngcontent-%COMP%]{margin-bottom:2px;color:#999;font-size:12px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .info-msg[_ngcontent-%COMP%] .underline[_ngcontent-%COMP%]{text-decoration:underline dashed}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .monospace-content[_ngcontent-%COMP%]{font-size:11px;white-space:pre-wrap;font-family:monospace;max-height:500px;overflow:auto}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .text-content[_ngcontent-%COMP%]{white-space:pre-wrap;max-height:500px;overflow:auto}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%]{font-size:12px;line-height:14px;display:flex;align-items:flex-start}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{width:16px;color:#999;flex-shrink:0;line-height:14px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .namespace[_ngcontent-%COMP%]{line-height:14px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .namespace.hidden[_ngcontent-%COMP%]{color:#999}.container.expanded[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{background-color:#eee;border:1px solid #999}.container.expanded[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#999}.container[_ngcontent-%COMP%] .one-line-text[_ngcontent-%COMP%]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:12px;height:12px;flex-shrink:0;display:none;background-color:#d7f1ff;border-radius:2px;margin-left:2px;cursor:pointer;align-items:center;justify-content:center;border:1px solid #4e90b5;opacity:.75}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00639b;font-size:11px;width:11px;height:11px;font-weight:700} @@ -3890,8 +3890,8 @@ void main() { -`],changeDetection:0})}return i})();var $fe=["container"];function qfe(i,e){if(i&1&&(v(0,"div",3),S(1),y()),i&2){let t=I();w(),Me(" ",t.label," ")}}var vj=(()=>{class i{changeDetectorRef;label="";container;showPopup=!1;popupSize={minWidth:0,minHeight:0};popupPosition=[{originX:"end",originY:"top",overlayX:"end",overlayY:"top",offsetY:-1}];constructor(t){this.changeDetectorRef=t}ngAfterViewInit(){setTimeout(()=>{let t=this.container.nativeElement;this.showPopup=t.scrollWidth>t.offsetWidth,this.changeDetectorRef.markForCheck()})}static \u0275fac=function(n){return new(n||i)(M(Fe))};static \u0275cmp=le({type:i,selectors:[["hoverable-label"]],viewQuery:function(n,r){if(n&1&&Ie($fe,5),n&2){let o;be(o=ye())&&(r.container=o.first)}},inputs:{label:"label"},standalone:!0,features:[ce],decls:5,vars:6,consts:[["container",""],["popup",""],[1,"container",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled"],[1,"model-explorer-hoverable-label-popup"]],template:function(n,r){if(n&1&&(v(0,"div",2,0),S(2),y(),W(3,qfe,2,1,"ng-template",null,1,kt)),n&2){let o=ve(4);N("bubble",o)("overlaySize",r.popupSize)("overlayPositions",r.popupPosition)("hoverDelayMs",10)("bubbleDisabled",!r.showPopup),w(2),Me(" ",r.label,` -`)}},dependencies:[$n],styles:["[_nghost-%COMP%]{overflow:hidden}.container[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis} bubble-container:has(.model-explorer-hoverable-label-popup){width:100%;box-shadow:none;border:1px solid #ccc;border-radius:4px} .model-explorer-hoverable-label-popup{padding:2px;font-size:12px;line-height:12px;background-color:#fff;color:#999;font-family:Google Sans Text,Arial,Helvetica,sans-serif}"],changeDetection:0})}return i})();var af=(()=>{class i{curSortingRunIndex=-2;curSortingDirection="asc";curChildrenStatSortingColIndex=-2;curChildrenStatSortingDirection="asc";statsTableCollapsed=!1;childrenStatsTableCollapsed=!1;nodeDataTableCollapsed=!1;collapsedSectionNames=new Set;static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var Yfe=["paginator"],Xfe=["childrenStatsPaginator"],yj=i=>({$implicit:i});function Zfe(i,e){if(i&1&&(v(0,"div",28),S(1),y()),i&2){let t=I().index;w(),nt(t+1)}}function Qfe(i,e){i&1&&J(0,"mat-spinner",29)}function Kfe(i,e){if(i&1&&(v(0,"div",30)(1,"mat-icon"),S(2,"error"),y()()),i&2){let t=I().$implicit;N("matTooltip",t.error)("matTooltipDisabled",!t.error)}}function Jfe(i,e){if(i&1){let t=ie();v(0,"div",31),H("click",function(r){V(t);let o=I().$implicit,s=I();return z(s.handleClickToggleVisibility(o,r))}),v(1,"mat-icon"),S(2),y()()}if(i&2){let t=I().$implicit,n=I();se("selected",n.isRunItemSelected(t))("hide",!t.done),N("matTooltip",n.getVisibleToggleTooltip(t)),w(2),nt(n.getIconName(t))}}function eme(i,e){if(i&1){let t=ie();v(0,"div",32),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClickDelete(r))}),v(1,"mat-icon"),S(2,"delete"),y()()}i&2&&N("matTooltip","Delete")}function tme(i,e){if(i&1&&(v(0,"div",19)(1,"div",20),W(2,Zfe,2,1,"div",21)(3,Qfe,1,0,"mat-spinner",22),y(),v(4,"div",23),S(5),y(),v(6,"div",24),W(7,Kfe,3,2,"div",25)(8,Jfe,3,6,"div",26)(9,eme,3,1,"div",27),y()()),i&2){let t=e.$implicit,n=I();se("selected",n.isRunItemSelected(t)),w(2),N("ngIf",t.done),w(),N("ngIf",!t.done),w(2),nt(t.runName),w(2),N("ngIf",t.error),w(),N("ngIf",!t.error),w(),N("ngIf",t.done)}}function nme(i,e){if(i&1&&(v(0,"th",37)(1,"div",38)(2,"div",28),S(3),y(),v(4,"div",39),S(5),y()()()),i&2){let t=e.$implicit,n=e.index;w(3),nt(n+1),w(2),nt(t.runName)}}function ime(i,e){if(i&1&&(v(0,"td",37),S(1),y()),i&2){let t=e.$implicit,n=I(3);w(),Me(" ",n.getStatValue(t)," ")}}function rme(i,e){if(i&1&&(v(0,"tr")(1,"td"),S(2),y(),W(3,ime,2,1,"td",35),y()),i&2){let t=e.$implicit;w(2),nt(t.stat),w(),N("ngForOf",t.values)}}function ome(i,e){if(i&1&&(v(0,"table",33)(1,"thead")(2,"tr")(3,"th",34),S(4," Stat "),y(),W(5,nme,6,2,"th",35),y()(),v(6,"tbody"),W(7,rme,4,2,"tr",36),y()()),i&2){let t=I();w(5),N("ngForOf",t.runItems),w(2),N("ngForOf",t.curStatRows)("ngForTrackBy",t.trackByStat)}}function sme(i,e){if(i&1){let t=ie();v(0,"paginator",40,4),H("change",function(r){V(t);let o=I();return z(o.handleChildrenStatsTablePaginatorChanged(r))}),y()}if(i&2){let t=I();N("pageSize",t.tablePageSize)("itemsCount",t.childrenStatRowsCount)}}function ame(i,e){i&1&&Zi(0)}function lme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(2);w(),Me(" ",t.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function cme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(2);w(),Me(" ",t.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function dme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(3);w(),Me(" ",t.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function ume(i,e){if(i&1){let t=ie();v(0,"th",47),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleClickChildrenStatsHeader(r.colIndex))}),v(1,"div",38)(2,"div",28),S(3),y(),v(4,"div",39),S(5),y(),W(6,dme,2,1,"mat-icon",43),y()()}if(i&2){let t=e.$implicit,n=I(2);w(3),nt(t.runIndex+1),w(2),nt(t.label),w(),N("ngIf",t.colIndex===n.curChildrenStatSortingColIndex)}}function hme(i,e){if(i&1&&(v(0,"td",37),S(1),y()),i&2){let t=e.$implicit;w(),Me(" ",t," ")}}function pme(i,e){if(i&1){let t=ie();v(0,"tr")(1,"td"),S(2),y(),v(3,"td",48),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleClickNodeLabel(r.id))}),S(4),y(),W(5,hme,2,1,"td",35),y()}if(i&2){let t=e.$implicit;w(2),nt(t.index),w(2),Me(" ",t.label," "),w(),N("ngForOf",t.colStrs)}}function fme(i,e){if(i&1){let t=ie();v(0,"table",41)(1,"thead")(2,"tr")(3,"th",42),H("click",function(){V(t);let r=I();return z(r.handleClickChildrenStatsHeader(-2))}),v(4,"div",38),S(5," # "),W(6,lme,2,1,"mat-icon",43),y()(),v(7,"th",44),H("click",function(){V(t);let r=I();return z(r.handleClickChildrenStatsHeader(-1))}),v(8,"div",38),S(9," Node "),W(10,cme,2,1,"mat-icon",43),y()(),W(11,ume,7,3,"th",45),y()(),v(12,"tbody"),W(13,pme,6,3,"tr",36),y()()}if(i&2){let t=I();w(6),N("ngIf",t.curChildrenStatSortingColIndex===-2),w(4),N("ngIf",t.curChildrenStatSortingColIndex===-1),w(),N("ngForOf",t.childrenStatsCols),w(2),N("ngForOf",t.curPageChildrenStatRows)("ngForTrackBy",t.trackByNodeId)}}function mme(i,e){if(i&1){let t=ie();v(0,"paginator",40,5),H("change",function(r){V(t);let o=I();return z(o.handleTablePaginatorChanged(r))}),y()}if(i&2){let t=I();N("pageSize",t.tablePageSize)("itemsCount",t.rowsCount)}}function gme(i,e){i&1&&Zi(0)}function _me(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(2);w(),Me(" ",t.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function vme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(2);w(),Me(" ",t.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function bme(i,e){if(i&1){let t=ie();v(0,"div",51),H("click",function(r){V(t);let o=I().$implicit,s=I(2);return z(s.handleClickToggleVisibility(o,r))}),v(1,"mat-icon"),S(2),y()()}if(i&2){let t=I().$implicit,n=I(2);se("selected",n.isRunItemSelected(t))("hide",!t.done),N("matTooltip",n.getVisibleToggleTooltip(t)),w(2),nt(n.getIconName(t))}}function yme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(3);w(),Me(" ",t.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function xme(i,e){if(i&1){let t=ie();v(0,"th",47),H("click",function(){let r=V(t).index,o=I(2);return z(o.handleClickHeader(r))}),v(1,"div",38)(2,"div",28),S(3),y(),v(4,"div",39),S(5),y(),W(6,bme,3,6,"div",50)(7,yme,2,1,"mat-icon",43),y()()}if(i&2){let t=e.$implicit,n=e.index,r=I(2);w(3),nt(n+1),w(2),nt(t.runName),w(),N("ngIf",!t.error),w(),N("ngIf",n===r.curSortingRunIndex)}}function wme(i,e){if(i&1&&(v(0,"td",37),S(1),y()),i&2){let t=e.$implicit;tn("background-color",t.bgColor)("color",t.textColor),w(),Me(" ",t.strValue," ")}}function Cme(i,e){if(i&1){let t=ie();v(0,"tr")(1,"td"),S(2),y(),v(3,"td",48),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleClickNodeLabel(r.id))}),S(4),y(),W(5,wme,2,5,"td",52),y()}if(i&2){let t=e.$implicit;w(2),nt(t.index),w(),se("input",t.isInput)("output",t.isOutput),w(),Me(" ",t.label," "),w(),N("ngForOf",t.cols)}}function Sme(i,e){if(i&1){let t=ie();v(0,"table",49)(1,"thead")(2,"tr")(3,"th",42),H("click",function(){V(t);let r=I();return z(r.handleClickHeader(-2))}),v(4,"div",38),S(5," # "),W(6,_me,2,1,"mat-icon",43),y()(),v(7,"th",44),H("click",function(){V(t);let r=I();return z(r.handleClickHeader(-1))}),v(8,"div",38),S(9," Node "),W(10,vme,2,1,"mat-icon",43),y()(),W(11,xme,8,4,"th",45),y()(),v(12,"tbody"),W(13,Cme,6,7,"tr",36),y()()}if(i&2){let t=I();w(6),N("ngIf",t.curSortingRunIndex===-2),w(4),N("ngIf",t.curSortingRunIndex===-1),w(),N("ngForOf",t.runItems),w(2),N("ngForOf",t.curPageRows)("ngForTrackBy",t.trackByNodeId)}}function Mme(i,e){if(i&1){let t=ie();v(0,"div",57),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClearStatsTableFilter(r))}),v(1,"mat-icon",58),S(2,"close"),y()()}}function Eme(i,e){if(i&1&&(v(0,"div",53),J(1,"input",54),v(2,"mat-icon",55),S(3,"filter_alt"),y(),W(4,Mme,3,0,"div",56),y()),i&2){let t=e.$implicit;w(),N("formControl",t),w(3),ae(t.value?4:-1)}}var Ime=["Sum %"],xj=(()=>{class i{appService;destroyRef;infoPanelService;nodeDataProviderExtensionService;changeDetectorRef;paneId;rootGroupNodeId;paginator;childrenStatsPaginator;childrenStatsTableNodeFilter=new gr("");resultsTableNodeFilter=new gr("");curRows;curPageRows=[];savedCurRows;curStatRows=[];curChildrenStatRows=[];curPageChildrenStatRows=[];savedChildrenStatRows=[];runItems=[];curSelectedRunId="";orderedNodes=[];childrenStatsCols=[];tablePageSize=50;curModelGraph;prevModelGraph;prevRunsKey="";orderedNodesCache={};constructor(t,n,r,o,s){this.appService=t,this.destroyRef=n,this.infoPanelService=r,this.nodeDataProviderExtensionService=o,this.changeDetectorRef=s;let a=new URLSearchParams(document.location.search);a.has("nodeDataProviderDataSummaryTablePageSize")&&(this.tablePageSize=Number(a.get("nodeDataProviderDataSummaryTablePageSize"))),mt(()=>{let l=this.appService.getPaneById(this.paneId)?.modelGraph;if(!l)return;let c=this.nodeDataProviderExtensionService.getSelectedRunForModelGraph(this.paneId,l);this.curSelectedRunId=c?.runId||"",this.changeDetectorRef.markForCheck()}),mt(()=>{this.curModelGraph=this.appService.getPaneById(this.paneId)?.modelGraph;let l=this.curModelGraph?this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph):[],c=!1,d=!1;this.prevModelGraph!==this.curModelGraph&&(this.prevModelGraph=this.curModelGraph,c=!0);let u=this.getRunsKey(l);if(this.prevRunsKey!==u&&(this.prevRunsKey=u,d=!0),this.curModelGraph&&(c||d)){this.runItems=[];let h=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);for(let p of h)this.runItems.push({runId:p.runId,runName:p.runName,done:p.done,error:p.error});this.changeDetectorRef.markForCheck(),this.infoPanelService.curSortingRunIndex=Math.min(this.infoPanelService.curSortingRunIndex,h.length-1),this.paginator?.reset(),this.genOrderedNodes(),this.populateResultsTable(),this.infoPanelService.curChildrenStatSortingColIndex=Math.min(this.infoPanelService.curChildrenStatSortingColIndex,this.childrenStatsCols.length-1),this.childrenStatsPaginator?.reset()}}),this.childrenStatsTableNodeFilter.valueChanges.pipe(To(150),Vi(this.destroyRef)).subscribe(l=>{this.handleChildrenStatsTableFilterChanged()}),this.resultsTableNodeFilter.valueChanges.pipe(To(150),Vi(this.destroyRef)).subscribe(l=>{this.handleResultsTableFilterChanged()})}ngOnChanges(t){t.rootGroupNodeId&&(this.paginator?.reset(),this.childrenStatsPaginator?.reset(),this.genOrderedNodes(),this.populateResultsTable())}getIconName(t){return this.isRunItemSelected(t)?"visibility":"visibility_off"}getVisibleToggleTooltip(t){return this.isRunItemSelected(t)?"Visualizing in graph":"Click to visualize in graph"}isRunItemSelected(t){return t.runId===this.curSelectedRunId}handleChildrenStatsTablePaginatorChanged(t){this.curPageChildrenStatRows=this.curChildrenStatRows.slice(t*this.tablePageSize,(t+1)*this.tablePageSize),this.changeDetectorRef.markForCheck()}handleTablePaginatorChanged(t){this.curRows==null?this.curPageRows=[]:this.curPageRows=this.curRows.slice(t*this.tablePageSize,(t+1)*this.tablePageSize),this.changeDetectorRef.markForCheck()}handleClickHeader(t){this.infoPanelService.curSortingRunIndex===t?this.infoPanelService.curSortingDirection=this.nextSortingDirection(this.curSortingDirection):this.infoPanelService.curSortingDirection=t<0?"asc":"desc",this.infoPanelService.curSortingRunIndex=t,this.sortAndFiltertRows(),this.paginator?.reset(),this.handleTablePaginatorChanged(0)}handleClickChildrenStatsHeader(t){this.infoPanelService.curChildrenStatSortingColIndex===t?this.infoPanelService.curChildrenStatSortingDirection=this.nextSortingDirection(this.infoPanelService.curChildrenStatSortingDirection):this.infoPanelService.curChildrenStatSortingDirection=t<0?"asc":"desc",this.infoPanelService.curChildrenStatSortingColIndex=t,this.sortAndFilterChildrenStatsRows(),this.childrenStatsPaginator?.reset(),this.handleChildrenStatsTablePaginatorChanged(0)}handleClickToggleVisibility(t,n){n.stopPropagation(),!this.isRunItemSelected(t)&&this.appService.setSelectedNodeDataProviderRunId(this.paneId,t.runId)}handleClickDelete(t){this.curModelGraph&&(this.nodeDataProviderExtensionService.deleteRun(t.runId),this.appService.deleteShowOnNodeItemType([`${Na}${t.runName}`]))}handleClickNodeLabel(t){this.appService.curToLocateNodeInfo.set({nodeId:t,rendererId:this.paneId,isGroupNode:!1})}handleToggleExpandCollapseStatsTable(t){this.infoPanelService.statsTableCollapsed?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=`${t.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.statsTableCollapsed=!this.infoPanelService.statsTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.statsTableCollapsed||setTimeout(()=>{t.style.maxHeight="fit-content"},150)})}handleToggleExpandCollapseChildrenStatsTable(t){this.infoPanelService.childrenStatsTableCollapsed?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=`${t.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.childrenStatsTableCollapsed=!this.infoPanelService.childrenStatsTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.childrenStatsTableCollapsed||setTimeout(()=>{t.style.maxHeight="fit-content"},150)})}handleToggleExpandCollapseNodeDataTable(t){this.infoPanelService.nodeDataTableCollapsed?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=`${t.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.nodeDataTableCollapsed=!this.infoPanelService.nodeDataTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.nodeDataTableCollapsed||setTimeout(()=>{t.style.maxHeight="fit-content"},150)})}handleChildrenStatsTableFilterChanged(){this.childrenStatsPaginator?.reset(),this.sortAndFilterChildrenStatsRows(),this.handleChildrenStatsTablePaginatorChanged(0)}handleResultsTableFilterChanged(){this.paginator?.reset(),this.sortAndFiltertRows(),this.handleTablePaginatorChanged(0)}handleClearStatsTableFilter(t){t===this.childrenStatsTableNodeFilter?this.childrenStatsPaginator?.reset():t===this.resultsTableNodeFilter&&this.paginator?.reset(),t.reset()}getStatValue(t){return t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||isNaN(t)?"-":`${t}`}trackByRunId(t,n){return n.runId}trackByNodeId(t,n){return n.id}trackByStat(t,n){return n.stat}get showResults(){return this.runItems.some(t=>t.done)}get rowsCount(){return this.curRows==null?0:this.curRows.length}get childrenStatRowsCount(){return this.curChildrenStatRows.length}get statsTableTitleIcon(){return this.statsTableCollapsed?"arrow_right":"arrow_drop_down"}get statsTableTitle(){return this.rootGroupNodeId==null?"Aggregated stats":"Aggregated stats in selected layer"}get statsTableCollapsed(){return this.infoPanelService.statsTableCollapsed}get childrenStatsTableTitleIcon(){return this.childrenStatsTableCollapsed?"arrow_right":"arrow_drop_down"}get childrenStatsTableTitle(){return this.rootGroupNodeId==null?"Root-level nodes stats":"Child nodes stats in selected layer"}get childrenStatsTableCollapsed(){return this.infoPanelService.childrenStatsTableCollapsed}get nodeDataTableTitleIcon(){return this.nodeDataTableCollapsed?"arrow_right":"arrow_drop_down"}get nodeDataTableTitle(){return this.rootGroupNodeId==null?"Node data":"Node data in selected layer"}get nodeDataTableCollapsed(){return this.infoPanelService.nodeDataTableCollapsed}get curSortingDirection(){return this.infoPanelService.curSortingDirection}get curSortingRunIndex(){return this.infoPanelService.curSortingRunIndex}get curChildrenStatSortingDirection(){return this.infoPanelService.curChildrenStatSortingDirection}get curChildrenStatSortingColIndex(){return this.infoPanelService.curChildrenStatSortingColIndex}genOrderedNodes(){if(!this.curModelGraph)return;let t=this.getOrderedNodesCacheKey(),n=this.orderedNodesCache[t];if(n!=null)this.orderedNodes=n;else{let r=this.rootGroupNodeId==null?void 0:this.curModelGraph.nodesById[this.rootGroupNodeId],o=new Set;r!=null&&(o=new Set(r.descendantsOpNodeIds||[])),this.orderedNodes=this.curModelGraph.nodes.filter(s=>Et(s)&&!s.hideInLayout&&s.id!=="GraphInputs"&&s.id!=="GraphOutputs"&&(r==null||o.has(s.id))),this.orderedNodesCache[t]=this.orderedNodes}}populateResultsTable(){if(!this.curModelGraph||this.orderedNodes.length===0)return;let t=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);this.curStatRows=[{stat:"Min",values:[]},{stat:"Max",values:[]},{stat:"Sum",values:[]},{stat:"Avg",values:[]}];let n=[];for(let s=0;sf.sourceNodeId==="GraphInputs"),h=a.outgoingEdges||[],p=h.length===0||h.some(f=>f.targetNodeId==="GraphOutputs");this.curRows.push({id:l,index:s,isInput:u,isOutput:p,label:this.curModelGraph.nodesById[l].label||"?",cols:c})}this.savedCurRows=[...this.curRows],this.sortAndFiltertRows(),this.handleTablePaginatorChanged(0),this.curStatRows[0].values=n.map(s=>s.min),this.curStatRows[1].values=n.map(s=>s.max),this.curStatRows[2].values=n.map(s=>s.sum),this.curStatRows[3].values=n.map(s=>s.sum/s.count),this.childrenStatsCols=[];let r=0;for(let s=0;ss.id);for(let s=0;sn.test(r.label))}catch{return}this.curRows.sort((n,r)=>{let o=this.getCellValue(n,this.infoPanelService.curSortingRunIndex),s=this.getCellValue(r,this.infoPanelService.curSortingRunIndex);return this.compareValue(o,s,this.infoPanelService.curSortingDirection)})}sortAndFilterChildrenStatsRows(){this.curChildrenStatRows=[...this.savedChildrenStatRows||[]];let t=(this.childrenStatsTableNodeFilter.value||"").trim();if(t!=="")try{let n=new RegExp(t,"i");this.curChildrenStatRows=this.curChildrenStatRows.filter(r=>n.test(r.label))}catch{return}this.curChildrenStatRows.sort((n,r)=>{let o=this.getChildrenStatsColValue(n,this.infoPanelService.curChildrenStatSortingColIndex),s=this.getChildrenStatsColValue(r,this.infoPanelService.curChildrenStatSortingColIndex);return this.compareValue(o,s,this.infoPanelService.curChildrenStatSortingDirection)})}compareValue(t,n,r){if(t==null&&n==null)return 0;if(t==null&&n!=null)return r==="asc"?-1:1;if(t!=null&&n==null)return r==="asc"?1:-1;if(typeof t=="number"&&typeof n=="number")return r==="asc"?t-n:n-t;{let o=JSON.stringify(t),s=JSON.stringify(n);return r==="asc"?o.localeCompare(s):s.localeCompare(o)}}getCellValue(t,n){switch(n){case-2:return t.index;case-1:return t.label;default:return t.cols[n].value}}getChildrenStatsColValue(t,n){switch(n){case-2:return t.index;case-1:return t.label;default:return t.colValues[n]}}getOrderedNodesCacheKey(){return`${this.curModelGraph?.collectionLabel}___${this.curModelGraph?.id}___${this.rootGroupNodeId}`}getRunsKey(t){return t.map(n=>{let r=[];r.push(n.runId),r.push(String(n.done));let o=n.results||{};return r.push(String(Object.keys(o).length)),r.join("__")}).join(",")}static \u0275fac=function(n){return new(n||i)(M(st),M(Ni),M(af),M(Cr),M(Fe))};static \u0275cmp=le({type:i,selectors:[["node-data-provider-summary-panel"]],viewQuery:function(n,r){if(n&1&&(Ie(Yfe,5),Ie(Xfe,5)),n&2){let o;be(o=ye())&&(r.paginator=o.first),be(o=ye())&&(r.childrenStatsPaginator=o.first)}},inputs:{paneId:"paneId",rootGroupNodeId:"rootGroupNodeId"},standalone:!0,features:[dn,ce],decls:33,vars:27,consts:[["statsTableContainer",""],["childrenStatsTableContainer",""],["nodeDataTableContainer",""],["nodeFilter",""],["childrenStatsPaginator",""],["paginator",""],[1,"container"],[1,"index-container"],["class","index-row",3,"selected",4,"ngFor","ngForOf","ngForTrackBy"],[1,"table-container"],[1,"table-title-container"],[1,"title-label-container",3,"click"],["border","0","cellspacing","0","cellpadding","0",4,"ngIf"],[1,"table-container","children-stats"],[3,"pageSize","itemsCount"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","children-stats-results","border","0","cellspacing","0","cellpadding","0",4,"ngIf"],[1,"table-container","results"],["class","results","border","0","cellspacing","0","cellpadding","0",4,"ngIf"],[1,"index-row"],[1,"index-number-container"],["class","index-number",4,"ngIf"],["color","primary","diameter","16",4,"ngIf"],[1,"run-name"],[1,"action-icons-container"],["class","error",3,"matTooltip","matTooltipDisabled",4,"ngIf"],["class","icon-container visibility",3,"selected","hide","matTooltip","click",4,"ngIf"],["class","icon-container action",3,"matTooltip","click",4,"ngIf"],[1,"index-number"],["color","primary","diameter","16"],[1,"error",3,"matTooltip","matTooltipDisabled"],[1,"icon-container","visibility",3,"click","matTooltip"],[1,"icon-container","action",3,"click","matTooltip"],["border","0","cellspacing","0","cellpadding","0"],[1,"stats"],["class","value-col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"value-col"],[1,"header-content"],[1,"stat-label"],[3,"change","pageSize","itemsCount"],["border","0","cellspacing","0","cellpadding","0",1,"children-stats-results"],[1,"index",3,"click"],["class","sort",4,"ngIf"],[1,"header","node-label",3,"click"],["class","value-col",3,"click",4,"ngFor","ngForOf"],[1,"sort"],[1,"value-col",3,"click"],[1,"node-label",3,"click"],["border","0","cellspacing","0","cellpadding","0",1,"results"],["class","icon-container visibility","matTooltipPosition","above",3,"selected","hide","matTooltip","click",4,"ngIf"],["matTooltipPosition","above",1,"icon-container","visibility",3,"click","matTooltip"],["class","value-col",3,"background-color","color",4,"ngFor","ngForOf"],[1,"node-filter"],["placeholder","regex to filter nodes",3,"formControl"],[1,"filter"],[1,"clear-container"],[1,"clear-container",3,"click"],[1,"clear"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",6)(1,"div",7),W(2,tme,10,8,"div",8),y(),v(3,"div",9,0)(5,"div",10)(6,"div",11),H("click",function(){V(o);let a=ve(4);return z(r.handleToggleExpandCollapseStatsTable(a))}),v(7,"mat-icon"),S(8),y(),S(9),y()(),W(10,ome,8,3,"table",12),y(),v(11,"div",13,1)(13,"div",10)(14,"div",11),H("click",function(){V(o);let a=ve(12);return z(r.handleToggleExpandCollapseChildrenStatsTable(a))}),v(15,"mat-icon"),S(16),y(),S(17),y(),W(18,sme,2,2,"paginator",14),y(),W(19,ame,1,0,"ng-container",15)(20,fme,14,5,"table",16),y(),v(21,"div",17,2)(23,"div",10)(24,"div",11),H("click",function(){V(o);let a=ve(22);return z(r.handleToggleExpandCollapseNodeDataTable(a))}),v(25,"mat-icon"),S(26),y(),S(27),y(),W(28,mme,2,2,"paginator",14),y(),W(29,gme,1,0,"ng-container",15)(30,Sme,14,5,"table",18),y()(),W(31,Eme,5,2,"ng-template",null,3,kt)}if(n&2){let o=ve(32);w(2),N("ngForOf",r.runItems)("ngForTrackBy",r.trackByRunId),w(),se("collapsed",r.statsTableCollapsed),w(5),nt(r.statsTableTitleIcon),w(),Me(" ",r.statsTableTitle," "),w(),N("ngIf",r.showResults),w(),se("collapsed",r.childrenStatsTableCollapsed),w(5),nt(r.childrenStatsTableTitleIcon),w(),Me(" ",r.childrenStatsTableTitle," "),w(),ae(r.childrenStatRowsCount>r.tablePageSize&&!r.childrenStatsTableCollapsed?18:-1),w(),N("ngTemplateOutlet",o)("ngTemplateOutletContext",Pl(23,yj,r.childrenStatsTableNodeFilter)),w(),N("ngIf",r.showResults),w(),se("collapsed",r.nodeDataTableCollapsed),w(5),nt(r.nodeDataTableTitleIcon),w(),Me(" ",r.nodeDataTableTitle," "),w(),ae(r.rowsCount>r.tablePageSize&&!r.nodeDataTableCollapsed?28:-1),w(),N("ngTemplateOutlet",o)("ngTemplateOutletContext",Pl(25,yj,r.resultsTableNodeFilter)),w(),N("ngIf",r.showResults)}},dependencies:[Ae,Ci,Mn,Bs,it,gt,ns,ca,Jt,Wn,sf,_r,js,zo,ho],styles:[`.container[_ngcontent-%COMP%]{padding-top:12px;box-sizing:border-box;display:flex;flex-direction:column;height:100%}.container[_ngcontent-%COMP%] .index-number[_ngcontent-%COMP%]{font-size:10px;width:16px;height:16px;border-radius:8px;box-sizing:border-box;border:1px solid #999;background-color:#eee;display:flex;align-items:center;justify-content:center;flex-shrink:0}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%]{margin-bottom:4px;position:relative}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;border:1px solid #ccc;padding:3px 4px 3px 19px;border-radius:4px;box-sizing:border-box}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#999}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] mat-icon.filter[_ngcontent-%COMP%]{position:absolute;top:6px;left:3px}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] .clear-container[_ngcontent-%COMP%]{position:absolute;top:6px;right:3px;cursor:pointer;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] .clear-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:#555}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:16px;height:16px;opacity:.3;cursor:pointer}.container[_ngcontent-%COMP%] .icon-container.selected[_ngcontent-%COMP%]{opacity:1;cursor:default}.container[_ngcontent-%COMP%] .icon-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#e1a011}.container[_ngcontent-%COMP%] .icon-container.hide[_ngcontent-%COMP%]{visibility:hidden}.container[_ngcontent-%COMP%] .icon-container.action[_ngcontent-%COMP%]{opacity:.7;margin-left:4px}.container[_ngcontent-%COMP%] .icon-container.action[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .icon-container.visibility[_ngcontent-%COMP%]{margin-left:4px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;line-height:16px;color:#000}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;padding:2px 8px}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row.selected[_ngcontent-%COMP%]{background-color:#fff2d5}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .index-number-container[_ngcontent-%COMP%]{width:16px;height:16px;flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-right:6px}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .run-name[_ngcontent-%COMP%]{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .action-icons-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0}.container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:16px}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#777}.container[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{width:16px;height:16px}.container[_ngcontent-%COMP%] .error[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;color:#a00}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:8px;margin-top:2px;display:flex;flex-direction:column;transition:max-height .15s ease-out;overflow:hidden}.container[_ngcontent-%COMP%] .table-container.collapsed[_ngcontent-%COMP%]{max-height:30px!important}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;line-height:22px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%] .title-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;line-height:15px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%] .title-label-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-left:-4px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] paginator[_ngcontent-%COMP%]{align-self:flex-end}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid #ccc;border-radius:4px;width:100%;box-sizing:border-box;-webkit-user-select:none;user-select:none;background-color:#fdfdfd;overflow:hidden}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{height:24px;background-color:#f2f2f2;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{font-size:11px;font-family:Arial,Helvetica,sans-serif}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{outline:1px solid #999}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:1px 4px;text-align:left}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.node-label[_ngcontent-%COMP%]{border-left:1px solid #ddd}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.value-col[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.value-col[_ngcontent-%COMP%]{border-left:1px solid #ddd;max-width:80px;text-overflow:ellipsis;overflow:hidden}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] mat-icon.sort[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#999;margin-left:4px;flex-shrink:0}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] .stat-label[_ngcontent-%COMP%]{margin-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%]:hover{text-decoration:underline dotted #0085f2}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.input[_ngcontent-%COMP%]{color:#009e73;font-weight:500}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.output[_ngcontent-%COMP%]{color:#d55e00;font-weight:500} +`],changeDetection:0})}return i})();var Wfe=["container"];function $fe(i,e){if(i&1&&(v(0,"div",3),S(1),y()),i&2){let t=I();w(),Me(" ",t.label," ")}}var gj=(()=>{class i{changeDetectorRef;label="";container;showPopup=!1;popupSize={minWidth:0,minHeight:0};popupPosition=[{originX:"end",originY:"top",overlayX:"end",overlayY:"top",offsetY:-1}];constructor(t){this.changeDetectorRef=t}ngAfterViewInit(){setTimeout(()=>{let t=this.container.nativeElement;this.showPopup=t.scrollWidth>t.offsetWidth,this.changeDetectorRef.markForCheck()})}static \u0275fac=function(n){return new(n||i)(M(Fe))};static \u0275cmp=le({type:i,selectors:[["hoverable-label"]],viewQuery:function(n,r){if(n&1&&Ie(Wfe,5),n&2){let o;be(o=ye())&&(r.container=o.first)}},inputs:{label:"label"},standalone:!0,features:[ce],decls:5,vars:6,consts:[["container",""],["popup",""],[1,"container",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled"],[1,"model-explorer-hoverable-label-popup"]],template:function(n,r){if(n&1&&(v(0,"div",2,0),S(2),y(),W(3,$fe,2,1,"ng-template",null,1,kt)),n&2){let o=ve(4);N("bubble",o)("overlaySize",r.popupSize)("overlayPositions",r.popupPosition)("hoverDelayMs",10)("bubbleDisabled",!r.showPopup),w(2),Me(" ",r.label,` +`)}},dependencies:[$n],styles:["[_nghost-%COMP%]{overflow:hidden}.container[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis} bubble-container:has(.model-explorer-hoverable-label-popup){width:100%;box-shadow:none;border:1px solid #ccc;border-radius:4px} .model-explorer-hoverable-label-popup{padding:2px;font-size:12px;line-height:12px;background-color:#fff;color:#999;font-family:Google Sans Text,Arial,Helvetica,sans-serif}"],changeDetection:0})}return i})();var af=(()=>{class i{curSortingRunIndex=-2;curSortingDirection="asc";curChildrenStatSortingColIndex=-2;curChildrenStatSortingDirection="asc";statsTableCollapsed=!1;childrenStatsTableCollapsed=!1;nodeDataTableCollapsed=!1;collapsedSectionNames=new Set;static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac})}return i})();var qfe=["paginator"],Yfe=["childrenStatsPaginator"],vj=i=>({$implicit:i});function Xfe(i,e){if(i&1&&(v(0,"div",28),S(1),y()),i&2){let t=I().index;w(),nt(t+1)}}function Zfe(i,e){i&1&&J(0,"mat-spinner",29)}function Qfe(i,e){if(i&1&&(v(0,"div",30)(1,"mat-icon"),S(2,"error"),y()()),i&2){let t=I().$implicit;N("matTooltip",t.error)("matTooltipDisabled",!t.error)}}function Kfe(i,e){if(i&1){let t=ie();v(0,"div",31),H("click",function(r){V(t);let o=I().$implicit,s=I();return z(s.handleClickToggleVisibility(o,r))}),v(1,"mat-icon"),S(2),y()()}if(i&2){let t=I().$implicit,n=I();se("selected",n.isRunItemSelected(t))("hide",!t.done),N("matTooltip",n.getVisibleToggleTooltip(t)),w(2),nt(n.getIconName(t))}}function Jfe(i,e){if(i&1){let t=ie();v(0,"div",32),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClickDelete(r))}),v(1,"mat-icon"),S(2,"delete"),y()()}i&2&&N("matTooltip","Delete")}function eme(i,e){if(i&1&&(v(0,"div",19)(1,"div",20),W(2,Xfe,2,1,"div",21)(3,Zfe,1,0,"mat-spinner",22),y(),v(4,"div",23),S(5),y(),v(6,"div",24),W(7,Qfe,3,2,"div",25)(8,Kfe,3,6,"div",26)(9,Jfe,3,1,"div",27),y()()),i&2){let t=e.$implicit,n=I();se("selected",n.isRunItemSelected(t)),w(2),N("ngIf",t.done),w(),N("ngIf",!t.done),w(2),nt(t.runName),w(2),N("ngIf",t.error),w(),N("ngIf",!t.error),w(),N("ngIf",t.done)}}function tme(i,e){if(i&1&&(v(0,"th",37)(1,"div",38)(2,"div",28),S(3),y(),v(4,"div",39),S(5),y()()()),i&2){let t=e.$implicit,n=e.index;w(3),nt(n+1),w(2),nt(t.runName)}}function nme(i,e){if(i&1&&(v(0,"td",37),S(1),y()),i&2){let t=e.$implicit,n=I(3);w(),Me(" ",n.getStatValue(t)," ")}}function ime(i,e){if(i&1&&(v(0,"tr")(1,"td"),S(2),y(),W(3,nme,2,1,"td",35),y()),i&2){let t=e.$implicit;w(2),nt(t.stat),w(),N("ngForOf",t.values)}}function rme(i,e){if(i&1&&(v(0,"table",33)(1,"thead")(2,"tr")(3,"th",34),S(4," Stat "),y(),W(5,tme,6,2,"th",35),y()(),v(6,"tbody"),W(7,ime,4,2,"tr",36),y()()),i&2){let t=I();w(5),N("ngForOf",t.runItems),w(2),N("ngForOf",t.curStatRows)("ngForTrackBy",t.trackByStat)}}function ome(i,e){if(i&1){let t=ie();v(0,"paginator",40,4),H("change",function(r){V(t);let o=I();return z(o.handleChildrenStatsTablePaginatorChanged(r))}),y()}if(i&2){let t=I();N("pageSize",t.tablePageSize)("itemsCount",t.childrenStatRowsCount)}}function sme(i,e){i&1&&Zi(0)}function ame(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(2);w(),Me(" ",t.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function lme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(2);w(),Me(" ",t.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function cme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(3);w(),Me(" ",t.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function dme(i,e){if(i&1){let t=ie();v(0,"th",47),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleClickChildrenStatsHeader(r.colIndex))}),v(1,"div",38)(2,"div",28),S(3),y(),v(4,"div",39),S(5),y(),W(6,cme,2,1,"mat-icon",43),y()()}if(i&2){let t=e.$implicit,n=I(2);w(3),nt(t.runIndex+1),w(2),nt(t.label),w(),N("ngIf",t.colIndex===n.curChildrenStatSortingColIndex)}}function ume(i,e){if(i&1&&(v(0,"td",37),S(1),y()),i&2){let t=e.$implicit;w(),Me(" ",t," ")}}function hme(i,e){if(i&1){let t=ie();v(0,"tr")(1,"td"),S(2),y(),v(3,"td",48),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleClickNodeLabel(r.id))}),S(4),y(),W(5,ume,2,1,"td",35),y()}if(i&2){let t=e.$implicit;w(2),nt(t.index),w(2),Me(" ",t.label," "),w(),N("ngForOf",t.colStrs)}}function pme(i,e){if(i&1){let t=ie();v(0,"table",41)(1,"thead")(2,"tr")(3,"th",42),H("click",function(){V(t);let r=I();return z(r.handleClickChildrenStatsHeader(-2))}),v(4,"div",38),S(5," # "),W(6,ame,2,1,"mat-icon",43),y()(),v(7,"th",44),H("click",function(){V(t);let r=I();return z(r.handleClickChildrenStatsHeader(-1))}),v(8,"div",38),S(9," Node "),W(10,lme,2,1,"mat-icon",43),y()(),W(11,dme,7,3,"th",45),y()(),v(12,"tbody"),W(13,hme,6,3,"tr",36),y()()}if(i&2){let t=I();w(6),N("ngIf",t.curChildrenStatSortingColIndex===-2),w(4),N("ngIf",t.curChildrenStatSortingColIndex===-1),w(),N("ngForOf",t.childrenStatsCols),w(2),N("ngForOf",t.curPageChildrenStatRows)("ngForTrackBy",t.trackByNodeId)}}function fme(i,e){if(i&1){let t=ie();v(0,"paginator",40,5),H("change",function(r){V(t);let o=I();return z(o.handleTablePaginatorChanged(r))}),y()}if(i&2){let t=I();N("pageSize",t.tablePageSize)("itemsCount",t.rowsCount)}}function mme(i,e){i&1&&Zi(0)}function gme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(2);w(),Me(" ",t.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function _me(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(2);w(),Me(" ",t.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function vme(i,e){if(i&1){let t=ie();v(0,"div",51),H("click",function(r){V(t);let o=I().$implicit,s=I(2);return z(s.handleClickToggleVisibility(o,r))}),v(1,"mat-icon"),S(2),y()()}if(i&2){let t=I().$implicit,n=I(2);se("selected",n.isRunItemSelected(t))("hide",!t.done),N("matTooltip",n.getVisibleToggleTooltip(t)),w(2),nt(n.getIconName(t))}}function bme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),y()),i&2){let t=I(3);w(),Me(" ",t.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function yme(i,e){if(i&1){let t=ie();v(0,"th",47),H("click",function(){let r=V(t).index,o=I(2);return z(o.handleClickHeader(r))}),v(1,"div",38)(2,"div",28),S(3),y(),v(4,"div",39),S(5),y(),W(6,vme,3,6,"div",50)(7,bme,2,1,"mat-icon",43),y()()}if(i&2){let t=e.$implicit,n=e.index,r=I(2);w(3),nt(n+1),w(2),nt(t.runName),w(),N("ngIf",!t.error),w(),N("ngIf",n===r.curSortingRunIndex)}}function xme(i,e){if(i&1&&(v(0,"td",37),S(1),y()),i&2){let t=e.$implicit;tn("background-color",t.bgColor)("color",t.textColor),w(),Me(" ",t.strValue," ")}}function wme(i,e){if(i&1){let t=ie();v(0,"tr")(1,"td"),S(2),y(),v(3,"td",48),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleClickNodeLabel(r.id))}),S(4),y(),W(5,xme,2,5,"td",52),y()}if(i&2){let t=e.$implicit;w(2),nt(t.index),w(),se("input",t.isInput)("output",t.isOutput),w(),Me(" ",t.label," "),w(),N("ngForOf",t.cols)}}function Cme(i,e){if(i&1){let t=ie();v(0,"table",49)(1,"thead")(2,"tr")(3,"th",42),H("click",function(){V(t);let r=I();return z(r.handleClickHeader(-2))}),v(4,"div",38),S(5," # "),W(6,gme,2,1,"mat-icon",43),y()(),v(7,"th",44),H("click",function(){V(t);let r=I();return z(r.handleClickHeader(-1))}),v(8,"div",38),S(9," Node "),W(10,_me,2,1,"mat-icon",43),y()(),W(11,yme,8,4,"th",45),y()(),v(12,"tbody"),W(13,wme,6,7,"tr",36),y()()}if(i&2){let t=I();w(6),N("ngIf",t.curSortingRunIndex===-2),w(4),N("ngIf",t.curSortingRunIndex===-1),w(),N("ngForOf",t.runItems),w(2),N("ngForOf",t.curPageRows)("ngForTrackBy",t.trackByNodeId)}}function Sme(i,e){if(i&1){let t=ie();v(0,"div",57),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClearStatsTableFilter(r))}),v(1,"mat-icon",58),S(2,"close"),y()()}}function Mme(i,e){if(i&1&&(v(0,"div",53),J(1,"input",54),v(2,"mat-icon",55),S(3,"filter_alt"),y(),W(4,Sme,3,0,"div",56),y()),i&2){let t=e.$implicit;w(),N("formControl",t),w(3),ae(t.value?4:-1)}}var Eme=["Sum %"],bj=(()=>{class i{appService;destroyRef;infoPanelService;nodeDataProviderExtensionService;changeDetectorRef;paneId;rootGroupNodeId;paginator;childrenStatsPaginator;childrenStatsTableNodeFilter=new gr("");resultsTableNodeFilter=new gr("");curRows;curPageRows=[];savedCurRows;curStatRows=[];curChildrenStatRows=[];curPageChildrenStatRows=[];savedChildrenStatRows=[];runItems=[];curSelectedRunId="";orderedNodes=[];childrenStatsCols=[];tablePageSize=50;curModelGraph;prevModelGraph;prevRunsKey="";orderedNodesCache={};constructor(t,n,r,o,s){this.appService=t,this.destroyRef=n,this.infoPanelService=r,this.nodeDataProviderExtensionService=o,this.changeDetectorRef=s;let a=new URLSearchParams(document.location.search);a.has("nodeDataProviderDataSummaryTablePageSize")&&(this.tablePageSize=Number(a.get("nodeDataProviderDataSummaryTablePageSize"))),mt(()=>{let l=this.appService.getPaneById(this.paneId)?.modelGraph;if(!l)return;let c=this.nodeDataProviderExtensionService.getSelectedRunForModelGraph(this.paneId,l);this.curSelectedRunId=c?.runId||"",this.changeDetectorRef.markForCheck()}),mt(()=>{this.curModelGraph=this.appService.getPaneById(this.paneId)?.modelGraph;let l=this.curModelGraph?this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph):[],c=!1,d=!1;this.prevModelGraph!==this.curModelGraph&&(this.prevModelGraph=this.curModelGraph,c=!0);let u=this.getRunsKey(l);if(this.prevRunsKey!==u&&(this.prevRunsKey=u,d=!0),this.curModelGraph&&(c||d)){this.runItems=[];let h=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);for(let p of h)this.runItems.push({runId:p.runId,runName:p.runName,done:p.done,error:p.error});this.changeDetectorRef.markForCheck(),this.infoPanelService.curSortingRunIndex=Math.min(this.infoPanelService.curSortingRunIndex,h.length-1),this.paginator?.reset(),this.genOrderedNodes(),this.populateResultsTable(),this.infoPanelService.curChildrenStatSortingColIndex=Math.min(this.infoPanelService.curChildrenStatSortingColIndex,this.childrenStatsCols.length-1),this.childrenStatsPaginator?.reset()}}),this.childrenStatsTableNodeFilter.valueChanges.pipe(To(150),Vi(this.destroyRef)).subscribe(l=>{this.handleChildrenStatsTableFilterChanged()}),this.resultsTableNodeFilter.valueChanges.pipe(To(150),Vi(this.destroyRef)).subscribe(l=>{this.handleResultsTableFilterChanged()})}ngOnChanges(t){t.rootGroupNodeId&&(this.paginator?.reset(),this.childrenStatsPaginator?.reset(),this.genOrderedNodes(),this.populateResultsTable())}getIconName(t){return this.isRunItemSelected(t)?"visibility":"visibility_off"}getVisibleToggleTooltip(t){return this.isRunItemSelected(t)?"Visualizing in graph":"Click to visualize in graph"}isRunItemSelected(t){return t.runId===this.curSelectedRunId}handleChildrenStatsTablePaginatorChanged(t){this.curPageChildrenStatRows=this.curChildrenStatRows.slice(t*this.tablePageSize,(t+1)*this.tablePageSize),this.changeDetectorRef.markForCheck()}handleTablePaginatorChanged(t){this.curRows==null?this.curPageRows=[]:this.curPageRows=this.curRows.slice(t*this.tablePageSize,(t+1)*this.tablePageSize),this.changeDetectorRef.markForCheck()}handleClickHeader(t){this.infoPanelService.curSortingRunIndex===t?this.infoPanelService.curSortingDirection=this.nextSortingDirection(this.curSortingDirection):this.infoPanelService.curSortingDirection=t<0?"asc":"desc",this.infoPanelService.curSortingRunIndex=t,this.sortAndFiltertRows(),this.paginator?.reset(),this.handleTablePaginatorChanged(0)}handleClickChildrenStatsHeader(t){this.infoPanelService.curChildrenStatSortingColIndex===t?this.infoPanelService.curChildrenStatSortingDirection=this.nextSortingDirection(this.infoPanelService.curChildrenStatSortingDirection):this.infoPanelService.curChildrenStatSortingDirection=t<0?"asc":"desc",this.infoPanelService.curChildrenStatSortingColIndex=t,this.sortAndFilterChildrenStatsRows(),this.childrenStatsPaginator?.reset(),this.handleChildrenStatsTablePaginatorChanged(0)}handleClickToggleVisibility(t,n){n.stopPropagation(),!this.isRunItemSelected(t)&&this.appService.setSelectedNodeDataProviderRunId(this.paneId,t.runId)}handleClickDelete(t){this.curModelGraph&&(this.nodeDataProviderExtensionService.deleteRun(t.runId),this.appService.deleteShowOnNodeItemType([`${Na}${t.runName}`]))}handleClickNodeLabel(t){this.appService.curToLocateNodeInfo.set({nodeId:t,rendererId:this.paneId,isGroupNode:!1})}handleToggleExpandCollapseStatsTable(t){this.infoPanelService.statsTableCollapsed?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=`${t.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.statsTableCollapsed=!this.infoPanelService.statsTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.statsTableCollapsed||setTimeout(()=>{t.style.maxHeight="fit-content"},150)})}handleToggleExpandCollapseChildrenStatsTable(t){this.infoPanelService.childrenStatsTableCollapsed?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=`${t.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.childrenStatsTableCollapsed=!this.infoPanelService.childrenStatsTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.childrenStatsTableCollapsed||setTimeout(()=>{t.style.maxHeight="fit-content"},150)})}handleToggleExpandCollapseNodeDataTable(t){this.infoPanelService.nodeDataTableCollapsed?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=`${t.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.nodeDataTableCollapsed=!this.infoPanelService.nodeDataTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.nodeDataTableCollapsed||setTimeout(()=>{t.style.maxHeight="fit-content"},150)})}handleChildrenStatsTableFilterChanged(){this.childrenStatsPaginator?.reset(),this.sortAndFilterChildrenStatsRows(),this.handleChildrenStatsTablePaginatorChanged(0)}handleResultsTableFilterChanged(){this.paginator?.reset(),this.sortAndFiltertRows(),this.handleTablePaginatorChanged(0)}handleClearStatsTableFilter(t){t===this.childrenStatsTableNodeFilter?this.childrenStatsPaginator?.reset():t===this.resultsTableNodeFilter&&this.paginator?.reset(),t.reset()}getStatValue(t){return t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||isNaN(t)?"-":`${t}`}trackByRunId(t,n){return n.runId}trackByNodeId(t,n){return n.id}trackByStat(t,n){return n.stat}get showResults(){return this.runItems.some(t=>t.done)}get rowsCount(){return this.curRows==null?0:this.curRows.length}get childrenStatRowsCount(){return this.curChildrenStatRows.length}get statsTableTitleIcon(){return this.statsTableCollapsed?"arrow_right":"arrow_drop_down"}get statsTableTitle(){return this.rootGroupNodeId==null?"Aggregated stats":"Aggregated stats in selected layer"}get statsTableCollapsed(){return this.infoPanelService.statsTableCollapsed}get childrenStatsTableTitleIcon(){return this.childrenStatsTableCollapsed?"arrow_right":"arrow_drop_down"}get childrenStatsTableTitle(){return this.rootGroupNodeId==null?"Root-level nodes stats":"Child nodes stats in selected layer"}get childrenStatsTableCollapsed(){return this.infoPanelService.childrenStatsTableCollapsed}get nodeDataTableTitleIcon(){return this.nodeDataTableCollapsed?"arrow_right":"arrow_drop_down"}get nodeDataTableTitle(){return this.rootGroupNodeId==null?"Node data":"Node data in selected layer"}get nodeDataTableCollapsed(){return this.infoPanelService.nodeDataTableCollapsed}get curSortingDirection(){return this.infoPanelService.curSortingDirection}get curSortingRunIndex(){return this.infoPanelService.curSortingRunIndex}get curChildrenStatSortingDirection(){return this.infoPanelService.curChildrenStatSortingDirection}get curChildrenStatSortingColIndex(){return this.infoPanelService.curChildrenStatSortingColIndex}genOrderedNodes(){if(!this.curModelGraph)return;let t=this.getOrderedNodesCacheKey(),n=this.orderedNodesCache[t];if(n!=null)this.orderedNodes=n;else{let r=this.rootGroupNodeId==null?void 0:this.curModelGraph.nodesById[this.rootGroupNodeId],o=new Set;r!=null&&(o=new Set(r.descendantsOpNodeIds||[])),this.orderedNodes=this.curModelGraph.nodes.filter(s=>Et(s)&&!s.hideInLayout&&s.id!=="GraphInputs"&&s.id!=="GraphOutputs"&&(r==null||o.has(s.id))),this.orderedNodesCache[t]=this.orderedNodes}}populateResultsTable(){if(!this.curModelGraph||this.orderedNodes.length===0)return;let t=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);this.curStatRows=[{stat:"Min",values:[]},{stat:"Max",values:[]},{stat:"Sum",values:[]},{stat:"Avg",values:[]}];let n=[];for(let s=0;sf.sourceNodeId==="GraphInputs"),h=a.outgoingEdges||[],p=h.length===0||h.some(f=>f.targetNodeId==="GraphOutputs");this.curRows.push({id:l,index:s,isInput:u,isOutput:p,label:this.curModelGraph.nodesById[l].label||"?",cols:c})}this.savedCurRows=[...this.curRows],this.sortAndFiltertRows(),this.handleTablePaginatorChanged(0),this.curStatRows[0].values=n.map(s=>s.min),this.curStatRows[1].values=n.map(s=>s.max),this.curStatRows[2].values=n.map(s=>s.sum),this.curStatRows[3].values=n.map(s=>s.sum/s.count),this.childrenStatsCols=[];let r=0;for(let s=0;ss.id);for(let s=0;sn.test(r.label))}catch{return}this.curRows.sort((n,r)=>{let o=this.getCellValue(n,this.infoPanelService.curSortingRunIndex),s=this.getCellValue(r,this.infoPanelService.curSortingRunIndex);return this.compareValue(o,s,this.infoPanelService.curSortingDirection)})}sortAndFilterChildrenStatsRows(){this.curChildrenStatRows=[...this.savedChildrenStatRows||[]];let t=(this.childrenStatsTableNodeFilter.value||"").trim();if(t!=="")try{let n=new RegExp(t,"i");this.curChildrenStatRows=this.curChildrenStatRows.filter(r=>n.test(r.label))}catch{return}this.curChildrenStatRows.sort((n,r)=>{let o=this.getChildrenStatsColValue(n,this.infoPanelService.curChildrenStatSortingColIndex),s=this.getChildrenStatsColValue(r,this.infoPanelService.curChildrenStatSortingColIndex);return this.compareValue(o,s,this.infoPanelService.curChildrenStatSortingDirection)})}compareValue(t,n,r){if(t==null&&n==null)return 0;if(t==null&&n!=null)return r==="asc"?-1:1;if(t!=null&&n==null)return r==="asc"?1:-1;if(typeof t=="number"&&typeof n=="number")return r==="asc"?t-n:n-t;{let o=JSON.stringify(t),s=JSON.stringify(n);return r==="asc"?o.localeCompare(s):s.localeCompare(o)}}getCellValue(t,n){switch(n){case-2:return t.index;case-1:return t.label;default:return t.cols[n].value}}getChildrenStatsColValue(t,n){switch(n){case-2:return t.index;case-1:return t.label;default:return t.colValues[n]}}getOrderedNodesCacheKey(){return`${this.curModelGraph?.collectionLabel}___${this.curModelGraph?.id}___${this.rootGroupNodeId}`}getRunsKey(t){return t.map(n=>{let r=[];r.push(n.runId),r.push(String(n.done));let o=n.results||{};return r.push(String(Object.keys(o).length)),r.join("__")}).join(",")}static \u0275fac=function(n){return new(n||i)(M(st),M(Ni),M(af),M(Cr),M(Fe))};static \u0275cmp=le({type:i,selectors:[["node-data-provider-summary-panel"]],viewQuery:function(n,r){if(n&1&&(Ie(qfe,5),Ie(Yfe,5)),n&2){let o;be(o=ye())&&(r.paginator=o.first),be(o=ye())&&(r.childrenStatsPaginator=o.first)}},inputs:{paneId:"paneId",rootGroupNodeId:"rootGroupNodeId"},standalone:!0,features:[dn,ce],decls:33,vars:27,consts:[["statsTableContainer",""],["childrenStatsTableContainer",""],["nodeDataTableContainer",""],["nodeFilter",""],["childrenStatsPaginator",""],["paginator",""],[1,"container"],[1,"index-container"],["class","index-row",3,"selected",4,"ngFor","ngForOf","ngForTrackBy"],[1,"table-container"],[1,"table-title-container"],[1,"title-label-container",3,"click"],["border","0","cellspacing","0","cellpadding","0",4,"ngIf"],[1,"table-container","children-stats"],[3,"pageSize","itemsCount"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","children-stats-results","border","0","cellspacing","0","cellpadding","0",4,"ngIf"],[1,"table-container","results"],["class","results","border","0","cellspacing","0","cellpadding","0",4,"ngIf"],[1,"index-row"],[1,"index-number-container"],["class","index-number",4,"ngIf"],["color","primary","diameter","16",4,"ngIf"],[1,"run-name"],[1,"action-icons-container"],["class","error",3,"matTooltip","matTooltipDisabled",4,"ngIf"],["class","icon-container visibility",3,"selected","hide","matTooltip","click",4,"ngIf"],["class","icon-container action",3,"matTooltip","click",4,"ngIf"],[1,"index-number"],["color","primary","diameter","16"],[1,"error",3,"matTooltip","matTooltipDisabled"],[1,"icon-container","visibility",3,"click","matTooltip"],[1,"icon-container","action",3,"click","matTooltip"],["border","0","cellspacing","0","cellpadding","0"],[1,"stats"],["class","value-col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"value-col"],[1,"header-content"],[1,"stat-label"],[3,"change","pageSize","itemsCount"],["border","0","cellspacing","0","cellpadding","0",1,"children-stats-results"],[1,"index",3,"click"],["class","sort",4,"ngIf"],[1,"header","node-label",3,"click"],["class","value-col",3,"click",4,"ngFor","ngForOf"],[1,"sort"],[1,"value-col",3,"click"],[1,"node-label",3,"click"],["border","0","cellspacing","0","cellpadding","0",1,"results"],["class","icon-container visibility","matTooltipPosition","above",3,"selected","hide","matTooltip","click",4,"ngIf"],["matTooltipPosition","above",1,"icon-container","visibility",3,"click","matTooltip"],["class","value-col",3,"background-color","color",4,"ngFor","ngForOf"],[1,"node-filter"],["placeholder","regex to filter nodes",3,"formControl"],[1,"filter"],[1,"clear-container"],[1,"clear-container",3,"click"],[1,"clear"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",6)(1,"div",7),W(2,eme,10,8,"div",8),y(),v(3,"div",9,0)(5,"div",10)(6,"div",11),H("click",function(){V(o);let a=ve(4);return z(r.handleToggleExpandCollapseStatsTable(a))}),v(7,"mat-icon"),S(8),y(),S(9),y()(),W(10,rme,8,3,"table",12),y(),v(11,"div",13,1)(13,"div",10)(14,"div",11),H("click",function(){V(o);let a=ve(12);return z(r.handleToggleExpandCollapseChildrenStatsTable(a))}),v(15,"mat-icon"),S(16),y(),S(17),y(),W(18,ome,2,2,"paginator",14),y(),W(19,sme,1,0,"ng-container",15)(20,pme,14,5,"table",16),y(),v(21,"div",17,2)(23,"div",10)(24,"div",11),H("click",function(){V(o);let a=ve(22);return z(r.handleToggleExpandCollapseNodeDataTable(a))}),v(25,"mat-icon"),S(26),y(),S(27),y(),W(28,fme,2,2,"paginator",14),y(),W(29,mme,1,0,"ng-container",15)(30,Cme,14,5,"table",18),y()(),W(31,Mme,5,2,"ng-template",null,3,kt)}if(n&2){let o=ve(32);w(2),N("ngForOf",r.runItems)("ngForTrackBy",r.trackByRunId),w(),se("collapsed",r.statsTableCollapsed),w(5),nt(r.statsTableTitleIcon),w(),Me(" ",r.statsTableTitle," "),w(),N("ngIf",r.showResults),w(),se("collapsed",r.childrenStatsTableCollapsed),w(5),nt(r.childrenStatsTableTitleIcon),w(),Me(" ",r.childrenStatsTableTitle," "),w(),ae(r.childrenStatRowsCount>r.tablePageSize&&!r.childrenStatsTableCollapsed?18:-1),w(),N("ngTemplateOutlet",o)("ngTemplateOutletContext",Pl(23,vj,r.childrenStatsTableNodeFilter)),w(),N("ngIf",r.showResults),w(),se("collapsed",r.nodeDataTableCollapsed),w(5),nt(r.nodeDataTableTitleIcon),w(),Me(" ",r.nodeDataTableTitle," "),w(),ae(r.rowsCount>r.tablePageSize&&!r.nodeDataTableCollapsed?28:-1),w(),N("ngTemplateOutlet",o)("ngTemplateOutletContext",Pl(25,vj,r.resultsTableNodeFilter)),w(),N("ngIf",r.showResults)}},dependencies:[Ae,Ci,Mn,Bs,it,gt,ns,ca,Jt,Wn,sf,_r,js,zo,ho],styles:[`.container[_ngcontent-%COMP%]{padding-top:12px;box-sizing:border-box;display:flex;flex-direction:column;height:100%}.container[_ngcontent-%COMP%] .index-number[_ngcontent-%COMP%]{font-size:10px;width:16px;height:16px;border-radius:8px;box-sizing:border-box;border:1px solid #999;background-color:#eee;display:flex;align-items:center;justify-content:center;flex-shrink:0}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%]{margin-bottom:4px;position:relative}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;border:1px solid #ccc;padding:3px 4px 3px 19px;border-radius:4px;box-sizing:border-box}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#999}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] mat-icon.filter[_ngcontent-%COMP%]{position:absolute;top:6px;left:3px}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] .clear-container[_ngcontent-%COMP%]{position:absolute;top:6px;right:3px;cursor:pointer;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] .clear-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:#555}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:16px;height:16px;opacity:.3;cursor:pointer}.container[_ngcontent-%COMP%] .icon-container.selected[_ngcontent-%COMP%]{opacity:1;cursor:default}.container[_ngcontent-%COMP%] .icon-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#e1a011}.container[_ngcontent-%COMP%] .icon-container.hide[_ngcontent-%COMP%]{visibility:hidden}.container[_ngcontent-%COMP%] .icon-container.action[_ngcontent-%COMP%]{opacity:.7;margin-left:4px}.container[_ngcontent-%COMP%] .icon-container.action[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .icon-container.visibility[_ngcontent-%COMP%]{margin-left:4px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;line-height:16px;color:#000}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;padding:2px 8px}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row.selected[_ngcontent-%COMP%]{background-color:#fff2d5}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .index-number-container[_ngcontent-%COMP%]{width:16px;height:16px;flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-right:6px}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .run-name[_ngcontent-%COMP%]{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .action-icons-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0}.container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:16px}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#777}.container[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{width:16px;height:16px}.container[_ngcontent-%COMP%] .error[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;color:#a00}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:8px;margin-top:2px;display:flex;flex-direction:column;transition:max-height .15s ease-out;overflow:hidden}.container[_ngcontent-%COMP%] .table-container.collapsed[_ngcontent-%COMP%]{max-height:30px!important}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;line-height:22px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%] .title-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;line-height:15px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%] .title-label-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-left:-4px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] paginator[_ngcontent-%COMP%]{align-self:flex-end}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid #ccc;border-radius:4px;width:100%;box-sizing:border-box;-webkit-user-select:none;user-select:none;background-color:#fdfdfd;overflow:hidden}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{height:24px;background-color:#f2f2f2;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{font-size:11px;font-family:Arial,Helvetica,sans-serif}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{outline:1px solid #999}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:1px 4px;text-align:left}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.node-label[_ngcontent-%COMP%]{border-left:1px solid #ddd}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.value-col[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.value-col[_ngcontent-%COMP%]{border-left:1px solid #ddd;max-width:80px;text-overflow:ellipsis;overflow:hidden}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] mat-icon.sort[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#999;margin-left:4px;flex-shrink:0}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] .stat-label[_ngcontent-%COMP%]{margin-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%]:hover{text-decoration:underline dotted #0085f2}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.input[_ngcontent-%COMP%]{color:#009e73;font-weight:500}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.output[_ngcontent-%COMP%]{color:#d55e00;font-weight:500} @@ -3909,8 +3909,8 @@ void main() { -`],changeDetection:0})}return i})();var Tme=["inputValueContent"],Dme=(i,e)=>e.id||e.label,Pme=(i,e)=>e.opNode.id,Cj=(i,e)=>e.key,Ome=(i,e)=>e.outputId,Rme=(i,e)=>e.id,Ame=i=>({value:i});function Nme(i,e){if(i&1&&(v(0,"tr")(1,"td",21),J(2,"hoverable-label",22),y(),v(3,"td",23),J(4,"expandable-info-text",24),y()()),i&2){let t=e.$implicit,n=I(2);se("search-match",n.isSearchMatchedAttrId(t.label)),w(2),N("label",t.label),w(2),N("text",t.value)("type",t.label)("bgColor",t.bgColor||"transparent")("textColor",t.textColor||"black")}}function kme(i,e){if(i&1){let t=ie();v(0,"div",15,1)(2,"div",16)(3,"button",17),H("click",function(){let r=V(t).$implicit,o=ve(1),s=I();return z(s.handleToggleSection(r.label,o))}),v(4,"mat-icon"),S(5),y()(),S(6),y(),v(7,"div",18)(8,"table",19),ln(9,Nme,5,7,"tr",20,Dme),y()()()}if(i&2){let t=e.$implicit,n=I();se("collapsed",n.isSectionCollapsed(t.label)),w(5),nt(n.getSectionToggleIcon(t.label)),w(),Me(" ",t.label," "),w(3),cn(t.items)}}function Lme(i,e){if(i&1){let t=ie();v(0,"div",15,2)(2,"div",16)(3,"button",17),H("click",function(){V(t);let r=ve(1),o=I();return z(o.handleToggleSection(o.SectionLabel.NODE_DATA_PROVIDERS,r))}),v(4,"mat-icon"),S(5),y()(),S(6," Node data providers "),y(),J(7,"node-data-provider-summary-panel",25),y()}if(i&2){let t=I();se("collapsed",t.isSectionCollapsed(t.SectionLabel.NODE_DATA_PROVIDERS)),w(5),nt(t.getSectionToggleIcon(t.SectionLabel.NODE_DATA_PROVIDERS)),w(2),N("paneId",t.paneId)("rootGroupNodeId",t.curSelectedNodeId)}}function Fme(i,e){if(i&1){let t=ie();v(0,"paginator",32),H("change",function(r){V(t);let o=I(2);return z(o.handleInputPaginatorChanged(r))}),y()}if(i&2){let t=I(2);N("pageSize",t.ioPageSize)("itemsCount",t.curInputsCount)}}function Bme(i,e){if(i&1&&(v(0,"div",35),S(1),y()),i&2){let t=I().$implicit,n=I(2);w(),nt(n.getInputName(t))}}function Vme(i,e){if(i&1){let t=ie();v(0,"div",43),H("click",function(r){V(t);let o=I(2).$implicit,s=I(2);return z(s.handleToggleInputOpNodeVisibility(o.opNode.id,s.flatInputItems,r))}),v(1,"mat-icon"),S(2),y()()}if(i&2){let t=I(2).$implicit,n=I(2);se("visible",n.getInputOpNodeToggleVisible(t.opNode.id)),N("matTooltip",n.getInputOpNodeToggleVisibilityTooltip(t.opNode.id)),w(2),Me(" ",n.getInputOpNodeToggleVisibilityIcon(t.opNode.id)," ")}}function zme(i,e){if(i&1){let t=ie();v(0,"div",38),H("click",function(r){V(t);let o=I().$implicit,s=I(2);return z(s.handleLocateNode(o.opNode.id,r))}),S(1),v(2,"div",39)(3,"mat-icon",40),S(4,"my_location"),y()(),J(5,"div",41),W(6,Vme,3,4,"div",42),y()}if(i&2){let t=I().$implicit,n=I(2);Ze("data-id",t.opNode.id),w(),Me(" ",n.getInputName(t)," "),w(),N("matTooltip",n.locatorTooltip),w(4),ae(t.opNode.hideInLayout?-1:6)}}function Ume(i,e){if(i&1&&(v(0,"tr",null,4)(2,"td",21)(3,"div",44)(4,"mat-icon",45),S(5,"circle"),y(),J(6,"hoverable-label",22),y()(),v(7,"td",23),J(8,"expandable-info-text",46),y()()),i&2){let t=I().$implicit,n=I(3);se("search-match",n.isSearchMatchedInputValue(t.value)),w(6),N("label",t.key),w(2),N("text",t.value)("type",t.key)}}function Hme(i,e){if(i&1&&W(0,Ume,9,5,"tr",20),i&2){let t=e.$implicit,n=I(3);ae(n.getShowMetadata(t)?0:-1)}}function Gme(i,e){if(i&1&&(v(0,"div",31)(1,"div",33)(2,"div",34),S(3),y(),W(4,Bme,2,1,"div",35)(5,zme,7,4,"div",36),y(),v(6,"table",37),ln(7,Hme,1,1,null,null,Cj),y()()),i&2){let t=e.$implicit,n=I(2);w(),se("search-match",n.isSearchMatchedInputValue(n.getInputTensorTag(t))||n.isSearchMatchedInputValue(t.opNode.label)),w(2),nt(t.index),w(),ae(t.opNode.hideInLayout?4:5),w(3),cn(t.metadataList)}}function jme(i,e){if(i&1){let t=ie();v(0,"div",26,3)(2,"div",27)(3,"div",28)(4,"button",17),H("click",function(){V(t);let r=ve(1),o=I();return z(o.handleToggleSection(o.SectionLabel.INPUTS,r))}),v(5,"mat-icon"),S(6),y()(),S(7),y(),W(8,Fme,1,2,"paginator",29),y(),v(9,"div",30),ln(10,Gme,9,4,"div",31,Pme),y()()}if(i&2){let t=I();se("collapsed",t.isSectionCollapsed(t.SectionLabel.INPUTS)),w(6),nt(t.getSectionToggleIcon(t.SectionLabel.INPUTS)),w(),Me(" inputs (",t.curInputsCount,") "),w(),ae(t.showInputPaginator?8:-1),w(2),cn(t.flatInputItems)}}function Wme(i,e){if(i&1){let t=ie();v(0,"paginator",32),H("change",function(r){V(t);let o=I(2);return z(o.handleOutputPaginatorChanged(r))}),y()}if(i&2){let t=I(2);N("pageSize",t.ioPageSize)("itemsCount",t.outputItems.length)}}function $me(i,e){if(i&1){let t=ie();v(0,"div",50),H("click",function(r){V(t);let o=I().$implicit,s=I(2);return z(s.handleToggleOutputVisibility(o.outputId,s.outputItemsForCurPage,r))}),v(1,"mat-icon"),S(2),y()()}if(i&2){let t=I().$implicit,n=I(2);se("visible",n.getOutputToggleVisible(t.outputId)),N("matTooltip",n.getOutputToggleVisibilityTooltip(t.outputId)),w(2),Me(" ",n.getOutputToggleVisibilityIcon(t.outputId)," ")}}function qme(i,e){i&1&&Zi(0)}function Yme(i,e){if(i&1&&(v(0,"div",53),W(1,qme,1,0,"ng-container",54),y()),i&2){let t=I().$implicit,n=I(6),r=ve(11);w(),N("ngTemplateOutlet",r)("ngTemplateOutletContext",Pl(2,Ame,n.getNamespaceLabel(t)))}}function Xme(i,e){if(i&1){let t=ie();v(0,"div",52),H("click",function(r){let o=V(t).$implicit,s=I(6);return z(s.handleLocateNode(o.id,r))}),S(1),v(2,"div",39)(3,"mat-icon",40),S(4,"my_location"),y()()(),W(5,Yme,2,4,"ng-template",null,6,kt)}if(i&2){let t=e.$implicit,n=ve(6),r=I(6);se("search-match",r.isSearchMatchedOutputValue(t.label)),N("bubble",n)("overlaySize",r.constValuesPopupSize)("overlayPositions",r.outputConnectsToNamespacePopupPosition)("hoverDelayMs",50),Ze("data-id",t.id),w(),Me(" ",t.label," "),w(),N("matTooltip",r.locatorTooltip)}}function Zme(i,e){if(i&1&&ln(0,Xme,7,9,null,null,Rme),i&2){let t=I().$implicit;cn(t.connectedNodes)}}function Qme(i,e){if(i&1&&J(0,"expandable-info-text",51),i&2){let t=I().$implicit;N("text",t.value)}}function Kme(i,e){if(i&1&&(v(0,"tr")(1,"td",21)(2,"div",44)(3,"mat-icon",45),S(4,"circle"),y(),J(5,"hoverable-label",22),y()(),v(6,"td",23),W(7,Zme,2,0)(8,Qme,1,1,"expandable-info-text",51),y()()),i&2){let t=e.$implicit,n=I(4);se("search-match",n.isSearchMatchedOutputValue(t.value)),w(5),N("label",t.key),w(2),ae(t.key===n.outputMetadataConnectedTo?7:8)}}function Jme(i,e){if(i&1&&(v(0,"table",37),ln(1,Kme,9,4,"tr",20,Cj),y()),i&2){let t=I().$implicit;w(),cn(t.metadataList)}}function ege(i,e){if(i&1&&(v(0,"div",31)(1,"div",33)(2,"div",34),S(3),y(),v(4,"div",35),S(5),y(),J(6,"div",41),W(7,$me,3,4,"div",49),y(),W(8,Jme,3,0,"table",37),y()),i&2){let t=e.$implicit,n=I(2);w(),se("search-match",n.isSearchMatchedOutputValue(t.tensorTag)),w(2),nt(t.index),w(2),nt(n.getOutputName(t)),w(2),ae(n.getHasConnectedToNodes(t)?7:-1),w(),ae(t.metadataList.length>0?8:-1)}}function tge(i,e){if(i&1){let t=ie();v(0,"div",47,5)(2,"div",48)(3,"div",28)(4,"button",17),H("click",function(){V(t);let r=ve(1),o=I();return z(o.handleToggleSection(o.SectionLabel.OUTPUTS,r))}),v(5,"mat-icon"),S(6),y()(),S(7),y(),W(8,Wme,1,2,"paginator",29),y(),v(9,"div",30),ln(10,ege,9,6,"div",31,Ome),y()()}if(i&2){let t=I();se("collapsed",t.isSectionCollapsed(t.SectionLabel.OUTPUTS)),w(6),nt(t.getSectionToggleIcon(t.SectionLabel.OUTPUTS)),w(),Me(" outputs (",t.curOutputsCount,") "),w(),ae(t.showOutputPaginator?8:-1),w(2),cn(t.outputItemsForCurPage)}}function nge(i,e){if(i&1){let t=ie();v(0,"paginator",32),H("change",function(r){V(t);let o=I(2);return z(o.handleIdenticalGroupsPaginatorChanged(r))}),y()}if(i&2){let t=I(2);N("pageSize",t.ioPageSize)("itemsCount",t.identicalGroupNodes.length)}}function ige(i,e){if(i&1){let t=ie();v(0,"div",15,7)(2,"div",55)(3,"div",28)(4,"button",17),H("click",function(){V(t);let r=ve(1),o=I();return z(o.handleToggleSection(o.SectionLabel.IDENTICAL_GROUPS,r))}),v(5,"mat-icon"),S(6),y()(),S(7),y(),W(8,nge,1,2,"paginator",29),y(),J(9,"io-tree",56),y()}if(i&2){let t=I();se("collapsed",t.isSectionCollapsed(t.SectionLabel.IDENTICAL_GROUPS)),w(6),nt(t.getSectionToggleIcon(t.SectionLabel.IDENTICAL_GROUPS)),w(),Me(" Identical layers (",t.identicalGroupNodes.length,") "),w(),ae(t.showIdenticalGroupsPaginator?8:-1),w(),N("data",t.identicalGroupsData)("rendererId",t.curRendererId)}}function rge(i,e){if(i&1&&(v(0,"div",59),S(1),y()),i&2){let t=e.$implicit;w(),Me(" ",t," ")}}function oge(i,e){if(i&1&&(v(0,"div",57),S(1," Namespace hierarchy "),y(),v(2,"div",58),ln(3,rge,2,1,"div",59,X0),y()),i&2){let t=e.value;w(3),cn(t.split("/"))}}var Es=function(i){return i.GRAPH_INFO="Graph info",i.NODE_INFO="Node info",i.LAYER_INFO="Layer info",i.LAYER_ATTRS="Layer attributes",i.ATTRIBUTES="Attributes",i.NODE_DATA_PROVIDERS="Node data providers",i.IDENTICAL_GROUPS="Identical groups",i.INPUTS="inputs",i.OUTPUTS="outputs",i}(Es||{}),sge=64,age=150,wj=370,Sj=(()=>{class i{appService;nodeDataProviderExtensionService;changeDetectorRef;infoPanelService;splitPaneService;paneId;inputValueContents=new Yi;curModelGraph;curSelectedNode;curShowOnOpNodeInfoIds=new Set;curShowOnOpNodeAttrIds=new Set;curShowOnGroupNodeInfoIds=new Set;curShowOnNodeDataProviderRuns={};curSearchResults=void 0;width=wj;minWidth=wj;sections=[];flatInputItems=[];outputItems=[];outputItemsForCurPage=[];identicalGroupNodes=[];identicalGroupsData;curRendererId="";curInputsCount=0;curOutputsCount=0;resizing=!1;hide=!1;ioPageSize;SectionLabel=Es;outputMetadataConnectedTo="connects to";inputMetadataValuesKey="values";inputMetadataNamespaceKey="namespace";locatorTooltip=`Click: locate -Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHeight:0,maxWidth:600};constValuesPopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top",offsetX:-32}];outputConnectsToNamespacePopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top",offsetX:-4}];curSearchAttrMatches=[];curSearchInputMatches=[];curSearchOutputMatches=[];inputSourceNodes=[];inputMetadataList=[];savedWidth=0;constructor(t,n,r,o,s){this.appService=t,this.nodeDataProviderExtensionService=n,this.changeDetectorRef=r,this.infoPanelService=o,this.splitPaneService=s,this.ioPageSize=this.appService.testMode?5:25,mt(()=>{let a=this.appService.getPaneById(this.paneId);if(!a||!a.modelGraph)return;this.curModelGraph=a.modelGraph,this.curRendererId=a.selectedNodeInfo?.rendererId||"";let l=a.selectedNodeInfo?.nodeId||"";this.curSelectedNodeId!==l&&(this.handleNodeSelected(l),setTimeout(()=>{this.splitPaneService.resetInputOutputHiddenIds(),this.handleSearchResultsChanged()}))}),mt(()=>{let a=this.appService.getPaneById(this.paneId);!a||!a.modelGraph||this.curSearchResults!==a.searchResults&&(this.curSearchResults=a.searchResults,this.handleSearchResultsChanged())}),mt(()=>{this.nodeDataProviderExtensionService.runs(),this.genInfoData(),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})})}isSearchMatchedAttrId(t){return this.curSearchAttrMatches.find(n=>n.matchedAttrId===t)!=null}isSearchMatchedInputValue(t){return this.curSearchInputMatches?this.curSearchInputMatches.find(n=>n.matchedText===t)!=null:!1}isSearchMatchedOutputValue(t){return this.curSearchOutputMatches?this.curSearchOutputMatches.find(n=>n.matchedText===t)!=null:!1}handleMouseDownResizer(t){t.preventDefault(),document.body.style.cursor="ew-resize";let n=yn(document,"mousemove"),r=yn(window,"mouseup"),o=this.width,s=t.clientX;this.resizing=!0,this.changeDetectorRef.markForCheck(),qr([n]).pipe(Xe(r)).subscribe({next:([a])=>{let l=a.clientX-s;this.width=Math.max(sge,o-l),this.minWidth=this.width,this.changeDetectorRef.markForCheck()},complete:()=>{document.body.style.cursor="default",this.resizing=!1,this.changeDetectorRef.markForCheck()}})}handleInputPaginatorChanged(t){let n=this.inputSourceNodes.slice(t*this.ioPageSize,(t+1)*this.ioPageSize),r=this.inputMetadataList.slice(t*this.ioPageSize,(t+1)*this.ioPageSize);this.flatInputItems=this.genInputFlatItems(t*this.ioPageSize,n,r),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})}handleOutputPaginatorChanged(t){this.outputItemsForCurPage=this.outputItems.slice(t*this.ioPageSize,(t+1)*this.ioPageSize),this.changeDetectorRef.markForCheck()}handleIdenticalGroupsPaginatorChanged(t){this.identicalGroupsData=cl(this.identicalGroupNodes.slice(t*this.ioPageSize,(t+1)*this.ioPageSize),[],"incoming",this.curSelectedNode?.id||"")}toggleHideInfoPanel(){this.hide=!this.hide;let t=0;this.hide?this.savedWidth=this.width:t=this.savedWidth,this.animateSidePanelWidth(t)}handleToggleSection(t,n){if(!n)return;this.isSectionCollapsed(t)?n.style.maxHeight=`${n.scrollHeight}px`:(n.style.maxHeight=`${n.offsetHeight}px`,n.style.overflow="hidden"),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.collapsedSectionNames.has(t)?this.infoPanelService.collapsedSectionNames.delete(t):this.infoPanelService.collapsedSectionNames.add(t),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.isSectionCollapsed(t)?n.style.overflow="hidden":(n.style.overflow="visible",n.style.maxHeight="fit-content")},150)})}isSectionCollapsed(t){return this.infoPanelService.collapsedSectionNames.has(t)}getSectionToggleIcon(t){return this.isSectionCollapsed(t)?"chevron_right":"expand_more"}handleLocateNode(t,n){this.appService.curToLocateNodeInfo.set({nodeId:t,rendererId:this.curRendererId,isGroupNode:!1,select:n.altKey})}handleToggleInputOpNodeVisibility(t,n,r){r.stopPropagation(),r.altKey?this.splitPaneService.setInputOpNodeVisible(t,n.map(o=>o.opNode.id)):this.splitPaneService.toggleInputOpNodeVisibility(t)}getInputOpNodeToggleVisible(t){return this.splitPaneService.getInputOpNodeVisible(t)}getInputOpNodeToggleVisibilityIcon(t){return this.getInputOpNodeToggleVisible(t)?"visibility":"visibility_off"}getInputOpNodeToggleVisibilityTooltip(t){return this.getInputOpNodeToggleVisible(t)?"Click to hide highlight":"Click to show highlight"}handleToggleOutputVisibility(t,n,r){r.stopPropagation(),r.altKey?this.splitPaneService.setOutputVisible(t,n.map(o=>o.outputId)):this.splitPaneService.toggleOutputVisibility(t)}getOutputToggleVisible(t){return this.splitPaneService.getOutputVisible(t)}getOutputToggleVisibilityIcon(t){return this.getOutputToggleVisible(t)?"visibility":"visibility_off"}getOutputToggleVisibilityTooltip(t){return this.getOutputToggleVisible(t)?"Click to hide highlight":"Click to show highlight"}getInputName(t){let n=t.metadataList.find(r=>r.key===Bo);return n?`${n.value} (${t.opNode.label})`:t.opNode.label}getInputTensorTag(t){return t.metadataList.find(r=>r.key===Bo)?.value??""}getOutputName(t){return t.tensorTag===""?"output":t.tensorTag}getShowMetadata(t){return!t.key.startsWith("__")}getHasConnectedToNodes(t){return(t.metadataList.find(r=>r.key===this.outputMetadataConnectedTo)?.connectedNodes||[]).length>0}trackBySectionLabel(t,n){return n.label}trackByItemIdOrLabel(t,n){return n.id||n.label}get canShowGraphInfo(){return this.curModelGraph!=null&&this.curSelectedNode==null}get showNodeDataProviderSummary(){return this.curModelGraph?(this.curSelectedNode==null||xt(this.curSelectedNode))&&this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph).length>0:!1}get curSelectedNodeId(){return this.curSelectedNode?this.curSelectedNode.id:void 0}get showInputPaginator(){return this.inputSourceNodes.length>this.ioPageSize&&!this.isSectionCollapsed(Es.INPUTS)}get showOutputPaginator(){return this.outputItems.length>this.ioPageSize&&!this.isSectionCollapsed(Es.OUTPUTS)}get showIdenticalGroupsPaginator(){return this.identicalGroupNodes.length>this.ioPageSize&&!this.isSectionCollapsed(Es.IDENTICAL_GROUPS)}get hideToggleTooltip(){return this.hide?"Show info panel":"Hide info panel"}get hideToggleIconName(){return this.hide?"chevron_left":"chevron_right"}handleNodeSelected(t){!this.curModelGraph||!t?this.curSelectedNode=void 0:this.curSelectedNode=this.curModelGraph.nodesById[t],this.genInfoData(),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})}genInfoData(){this.sections=[],this.flatInputItems=[],this.inputSourceNodes=[],this.inputMetadataList=[],this.outputItems=[],this.identicalGroupNodes=[],this.identicalGroupsData=void 0,this.canShowGraphInfo?this.genInfoDataForGraph():this.curSelectedNode&&(Et(this.curSelectedNode)?(this.genInfoDataForSelectedOpNode(),this.genInputsOutputsData()):xt(this.curSelectedNode)&&this.genInfoDataForSelectedGroupNode())}genInfoDataForGraph(){if(!this.curModelGraph)return;let t={label:Es.GRAPH_INFO,sectionType:"graph",items:[]};this.sections.push(t);let n=this.curModelGraph.groupNodeAttributes?.[""];if(n)for(let s of Object.keys(n))t.items.push({section:t,label:s,value:n[s]});let r=0,o=0;for(let s of this.curModelGraph.nodes)Et(s)&&!s.hideInLayout?r++:xt(s)&&o++;t.items.push({section:t,label:"op node count",value:String(r)},{section:t,label:"layer count",value:String(o)})}genInfoDataForSelectedOpNode(){if(!this.curModelGraph||!this.curSelectedNode)return;let t=this.curSelectedNode,n={label:Es.NODE_INFO,sectionType:"op",items:[]};this.sections.push(n),n.items.push({section:n,label:"op name",value:`${t.label}`});let r="id";if(n.items.push({section:n,label:r,value:t.id,canShowOnNode:!0,showOnNode:this.curShowOnOpNodeInfoIds.has(r)}),r="namespace",n.items.push({section:n,label:r,value:ad(t),canShowOnNode:!0,showOnNode:this.curShowOnOpNodeInfoIds.has(r)}),Object.keys(t.attrs||{}).length>0){let s={label:Es.ATTRIBUTES,sectionType:"op",items:[]},a=t.attrs||{};for(let l of Object.keys(a))l.startsWith("__")||s.items.push({section:s,label:l,value:a[l],canShowOnNode:!0,showOnNode:this.curShowOnOpNodeAttrIds.has(l)});s.items.length>0&&this.sections.push(s)}let o=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);if(o.length>0){let s={label:Es.NODE_DATA_PROVIDERS,sectionType:"op",items:[]};this.sections.push(s);for(let a of o){let l=((a.results||{})[this.curModelGraph.id]||{})[t.id],c=l?.strValue||"-",d=l?.bgColor||"transparent",u=l?.textColor||"black";s.items.push({id:a.runId,section:s,label:a.runName,value:c,canShowOnNode:a.done,showOnNode:this.curShowOnNodeDataProviderRuns[a.runId]!=null,bgColor:d,textColor:u,loading:!a.done})}}}genInputsOutputsData(){if(!this.curModelGraph||!this.curSelectedNode)return;let t=this.curSelectedNode,n=t.incomingEdges||[];this.inputMetadataList=[],this.inputSourceNodes=[],this.flatInputItems=[];for(let a of n){let l=this.curModelGraph?.nodesById[a.sourceNodeId];this.inputSourceNodes.push(l);let c=(t.inputsMetadata||{})[a.targetNodeInputId]||{},d=Z({},(l.outputsMetadata||{})[a.sourceNodeOutputId]||{});for(let u of Object.keys(d))c[u]==null&&u!==Bo&&(c[u]=d[u]);this.inputMetadataList.push(c)}if(this.curInputsCount=this.inputSourceNodes.length,n.length>0){let a=this.inputSourceNodes.slice(0,this.ioPageSize),l=this.inputMetadataList.slice(0,this.ioPageSize);this.flatInputItems=this.genInputFlatItems(0,a,l)}this.outputItems=[];let r=t.outputsMetadata||{},o=t.outgoingEdges||[],s=0;for(let a of Object.keys(r)){let l=[],c="";for(let u of Object.keys(r[a])){let h=r[a][u];u===Bo&&(c=h),!u.startsWith("__")&&l.push({key:u,value:h})}l.sort((u,h)=>u.key.localeCompare(h.key));let d=o.filter(u=>u.sourceNodeOutputId===a).map(u=>this.curModelGraph.nodesById[u.targetNodeId]);l.push({key:this.outputMetadataConnectedTo,value:"",connectedNodes:d}),this.outputItems.push({index:s,tensorTag:c,outputId:a,metadataList:l}),s++}this.curOutputsCount=this.outputItems.length,this.outputItemsForCurPage=this.outputItems.slice(0,this.ioPageSize)}genInfoDataForSelectedGroupNode(){if(!this.curModelGraph||!this.curSelectedNode)return;let t=this.curSelectedNode,n={label:Es.LAYER_INFO,sectionType:"group",items:[]};this.sections.push(n),n.items.push({section:n,label:"name",value:t.label});let r="namespace";n.items.push({section:n,label:r,value:ad(t),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)}),r="#children",n.items.push({section:n,label:r,value:String((t.nsChildrenIds||[]).length),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)}),r="#descendants",n.items.push({section:n,label:r,value:String((t.descendantsNodeIds||[]).length),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)});let o=this.curModelGraph.groupNodeAttributes?.[t.id.replace("___group___","")];if(o){let s={label:Es.LAYER_ATTRS,sectionType:"group",items:[]};this.sections.push(s);for(let a of Object.keys(o))s.items.push({section:n,label:a,value:o[a]})}t.identicalGroupIndex!=null&&(this.identicalGroupNodes=this.curModelGraph.nodes.filter(s=>xt(s)&&s.identicalGroupIndex===t.identicalGroupIndex),this.identicalGroupsData=cl(this.identicalGroupNodes.slice(0,this.ioPageSize),[],"incoming",t.id))}handleSearchResultsChanged(){if(!this.curSelectedNode||!this.curSearchResults)return;let t=this.curSelectedNode.id,n=this.curSearchResults.results[t]||[],r=[],o=[],s=[];for(let a of n)switch(a.type){case vt.INPUT_METADATA:r.push(a);break;case vt.OUTPUT_METADATA:o.push(a);break;case vt.ATTRIBUTE:s.push(a);break;default:break}this.curSearchAttrMatches=s,this.curSearchOutputMatches=o,this.curSearchInputMatches=r,this.changeDetectorRef.markForCheck()}animateSidePanelWidth(t){let n=Date.now(),r=this.width,o=()=>{let s=Date.now()-n,a=this.appService.testMode?1:Math.min(1,s/age);a=Math.sin(a*Math.PI/2);let l=r+(t-r)*a;if(this.width=l,this.minWidth=l,this.changeDetectorRef.markForCheck(),a>=1){this.width=t,this.minWidth=t,this.changeDetectorRef.markForCheck();return}requestAnimationFrame(o)};o()}genInputFlatItems(t,n,r){let o=[];for(let s=0;s{l.push({key:d,value:u})}),l.sort((d,u)=>d.key.localeCompare(u.key)),l.push({key:this.inputMetadataNamespaceKey,value:ad(n[s])});let c=a.attrs||{};c[ka]&&l.push({key:this.inputMetadataValuesKey,value:c[ka]}),o.push({index:s+t,opNode:a,metadataList:l})}return o}updateInputValueContentsExpandable(){for(let t=0;tn.offsetHeight&&n.classList.add("expandable")}}static \u0275fac=function(n){return new(n||i)(M(st),M(Cr),M(Fe),M(af),M(_c))};static \u0275cmp=le({type:i,selectors:[["info-panel"]],viewQuery:function(n,r){if(n&1&&Ie(Tme,5),n&2){let o;be(o=ye())&&(r.inputValueContents=o)}},hostVars:4,hostBindings:function(n,r){n&2&&tn("width",r.width,"px")("min-width",r.minWidth,"px")},inputs:{paneId:"paneId"},standalone:!0,features:[Bt([af]),ce],decls:12,vars:12,consts:[["namespaceHierarchy",""],["sectionEle",""],["ndpSectionEle",""],["inputsSectionEle",""],["rowEle",""],["outputsSectionEle",""],["namespacePopup",""],["identicalGroupsSectionEle",""],[1,"container"],["class","section",3,"collapsed",4,"ngFor","ngForOf","ngForTrackBy"],["class","section",3,"collapsed",4,"ngIf"],["class","section inputs",3,"collapsed",4,"ngIf"],["class","section outputs",3,"collapsed",4,"ngIf"],[1,"resizer",3,"mousedown"],[1,"hide-toggle",3,"click","matTooltip"],[1,"section"],[1,"header"],["mat-icon-button","",1,"toggle",3,"click"],[1,"items-container"],[1,"metadata-table","info-attrs"],[3,"search-match"],[1,"key"],[3,"label"],[1,"value"],[3,"text","type","bgColor","textColor"],[3,"paneId","rootGroupNodeId"],[1,"section","inputs"],[1,"header","input"],[1,"header-label-container"],[3,"pageSize","itemsCount"],[1,"flat-items-container"],[1,"flat-item"],[3,"change","pageSize","itemsCount"],[1,"name-row"],[1,"index"],[1,"name"],[1,"name","locator"],[1,"metadata-table"],[1,"name","locator",3,"click"],["matTooltipClass","multiline-tooltip-left","matTooltipPosition","right",1,"locator-icon-container",3,"matTooltip"],[1,"locator-icon"],[1,"filler"],["matTooltipPosition","left",1,"visibility-icon-container","input",3,"matTooltip","visible"],["matTooltipPosition","left",1,"visibility-icon-container","input",3,"click","matTooltip"],[1,"key-container"],[1,"bullet"],[3,"text","type"],[1,"section","outputs"],[1,"header","output"],["matTooltipPosition","left",1,"visibility-icon-container","output",3,"visible","matTooltip"],["matTooltipPosition","left",1,"visibility-icon-container","output",3,"click","matTooltip"],[3,"text"],[1,"target-node-container",3,"click","bubble","overlaySize","overlayPositions","hoverDelayMs"],[1,"model-explorer-const-values-popup"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"header","identical-groups"],[3,"data","rendererId"],[1,"values-count-msg"],[1,"namespace-content"],[1,"namespace-row"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",8),W(1,kme,11,4,"div",9)(2,Lme,8,5,"div",10)(3,jme,12,5,"div",11)(4,tge,12,5,"div",12)(5,ige,10,7,"div",10),y(),v(6,"div",13),H("mousedown",function(a){return V(o),z(r.handleMouseDownResizer(a))}),y(),v(7,"div",14),H("click",function(){return V(o),z(r.toggleHideInfoPanel())}),v(8,"mat-icon"),S(9),y()(),W(10,oge,5,0,"ng-template",null,0,kt)}n&2&&(se("graph-info",r.showNodeDataProviderSummary),w(),N("ngForOf",r.sections)("ngForTrackBy",r.trackBySectionLabel),w(),N("ngIf",r.showNodeDataProviderSummary),w(),N("ngIf",r.flatInputItems.length>0),w(),N("ngIf",r.outputItems.length>0),w(),N("ngIf",r.identicalGroupsData),w(),se("resizing",r.resizing),w(),N("matTooltip",r.hideToggleTooltip),w(2),nt(r.hideToggleIconName))},dependencies:[$n,Ae,Ci,Mn,Bs,_j,vj,In,Ho,it,gt,ns,UC,Jt,Wn,sf,xc,xj],styles:[`[_nghost-%COMP%]{position:relative;width:370px;min-width:370px}.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;border-left:1px solid #e1e3e1;background-color:#fff;font-size:12px;overflow-y:auto;position:relative}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{transition:max-height .15s ease-out;padding-bottom:8px;box-sizing:border-box}.container[_ngcontent-%COMP%] .section.collapsed[_ngcontent-%COMP%]{max-height:32px!important;overflow:hidden}.container[_ngcontent-%COMP%] .section.inputs[_ngcontent-%COMP%]{padding-bottom:16px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-items-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:10px;gap:8px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2px 0 12px;font-size:12px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{color:#999;min-width:14px;margin-right:2px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{color:#00639b;font-weight:500;display:flex;align-items:center}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]{flex-grow:1;display:flex;align-items:center;cursor:pointer}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]:hover{background-color:#f6f6f6}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]:hover .locator-icon-container[_ngcontent-%COMP%]{opacity:.8}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{margin-top:3px;margin-left:18px;margin-right:0}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(:first-child){border-top:1px solid #dadce0}.container[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:11px;font-weight:700;padding:4px 12px 0;text-transform:uppercase;letter-spacing:.0327em;position:sticky;top:0;z-index:100;flex-shrink:0;box-sizing:border-box;background-color:#fff;-webkit-user-select:none;user-select:none;color:#000000de}.container[_ngcontent-%COMP%] .header.input[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .header.output[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .header.identical-groups[_ngcontent-%COMP%]{justify-content:space-between}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-label-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%]{padding:0;width:24px;height:24px;margin-left:-8px;margin-right:2px;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit;font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%] .mat-mdc-button-touch-target{display:none}.container[_ngcontent-%COMP%] .output-item-container[_ngcontent-%COMP%]{font-family:Roboto,sans-serif}.container[_ngcontent-%COMP%] .output-item-container[_ngcontent-%COMP%]:not(.last){margin-top:8px}.container[_ngcontent-%COMP%] .output-item-label[_ngcontent-%COMP%]{font-size:13px;padding:4px 12px;color:#00639b;font-weight:500}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;font-size:12px;margin:0 12px;word-break:break-all;max-width:calc(100% - 28px)}.container[_ngcontent-%COMP%] .metadata-table.info-attrs[_ngcontent-%COMP%]{margin-left:30px}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{vertical-align:text-top}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover.has-hover-values{cursor:pointer;background-color:#f6f6f6}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] mat-icon.bullet[_ngcontent-%COMP%]{flex-shrink:0;font-size:4px;width:5px;height:5px;color:#bbb;margin-right:4px;margin-top:6px}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%]{color:#999;padding-right:6px;white-space:nowrap;min-width:100px;width:100px;max-width:100px;overflow:hidden;text-overflow:ellipsis;position:relative}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%] .key-container[_ngcontent-%COMP%]{display:flex;align-items:flex-start;overflow:hidden;position:absolute;inset:0}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]{max-width:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]:has(expandable-info-text.expanded){white-space:normal;max-width:inherit}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container[_ngcontent-%COMP%]:hover .locator-icon-container[_ngcontent-%COMP%]{opacity:.8}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .values-hover-trigger[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:99px;display:flex;align-items:center;background-color:#d7f1ff;color:#00639b;width:fit-content;height:16px;padding:0 6px;font-size:10px}.container[_ngcontent-%COMP%] .items-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;margin-top:10px;margin-bottom:6px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 12px}.container[_ngcontent-%COMP%] .item-container.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .label-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:500;color:#aaa;font-size:12px;margin-bottom:1px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .show-on-node-toggle[_ngcontent-%COMP%]{height:16px;display:flex;font-size:11px;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;-webkit-user-select:none;user-select:none;transform:scale(.7);margin-right:-6px;margin-top:-1px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:13px;word-break:break-word}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value.big-text[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value.has-bg-color[_ngcontent-%COMP%]{padding:2px 4px;border-radius:4px;margin-top:2px}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;opacity:.5;margin-left:4px}.container[_ngcontent-%COMP%] .locator-icon-container.left[_ngcontent-%COMP%]{margin-right:4px;margin-left:0;display:inline-block}.container[_ngcontent-%COMP%] .locator-icon-container.left[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-bottom:-2px}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#333;font-size:12px;width:12px;height:12px}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;opacity:.5;padding:0 11px 0 20px;cursor:pointer}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#333;font-size:14px;width:14px;height:14px}.container[_ngcontent-%COMP%] .visibility-icon-container.input.visible[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#009e73}.container[_ngcontent-%COMP%] .visibility-icon-container.output.visible[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#d55e00}.resizer[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;left:0;width:6px;cursor:ew-resize;background-color:transparent;z-index:200}.resizer[_ngcontent-%COMP%]:hover, .resizer.resizing[_ngcontent-%COMP%]{background-color:#0000000a}.hide-toggle[_ngcontent-%COMP%]{position:absolute;right:100%;bottom:2px;width:16px;height:20px;border:1px solid #ccc;border-right:none;box-sizing:border-box;border-radius:99px 0 0 99px;cursor:pointer;background-color:#fff}.hide-toggle[_ngcontent-%COMP%]:hover{background-color:#eee}.hide-toggle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px;color:#999} bubble-container:has(.model-explorer-const-values-popup){width:100%} .model-explorer-const-values-popup{padding:8px;line-height:12px;background-color:#fff} .model-explorer-const-values-popup .values-count-msg{margin-bottom:8px;color:#999;font-size:12px} .model-explorer-const-values-popup .content{font-size:11px;white-space:pre-wrap;font-family:monospace} .model-explorer-const-values-popup .namespace-row{font-size:12px;padding:3px 0} +`],changeDetection:0})}return i})();var Ime=["inputValueContent"],Tme=(i,e)=>e.id||e.label,Dme=(i,e)=>e.opNode.id,xj=(i,e)=>e.key,Pme=(i,e)=>e.outputId,Ome=(i,e)=>e.id,Rme=i=>({value:i});function Ame(i,e){if(i&1&&(v(0,"tr")(1,"td",21),J(2,"hoverable-label",22),y(),v(3,"td",23),J(4,"expandable-info-text",24),y()()),i&2){let t=e.$implicit,n=I(2);se("search-match",n.isSearchMatchedAttrId(t.label)),w(2),N("label",t.label),w(2),N("text",t.value)("type",t.label)("bgColor",t.bgColor||"transparent")("textColor",t.textColor||"black")}}function Nme(i,e){if(i&1){let t=ie();v(0,"div",15,1)(2,"div",16)(3,"button",17),H("click",function(){let r=V(t).$implicit,o=ve(1),s=I();return z(s.handleToggleSection(r.label,o))}),v(4,"mat-icon"),S(5),y()(),S(6),y(),v(7,"div",18)(8,"table",19),ln(9,Ame,5,7,"tr",20,Tme),y()()()}if(i&2){let t=e.$implicit,n=I();se("collapsed",n.isSectionCollapsed(t.label)),w(5),nt(n.getSectionToggleIcon(t.label)),w(),Me(" ",t.label," "),w(3),cn(t.items)}}function kme(i,e){if(i&1){let t=ie();v(0,"div",15,2)(2,"div",16)(3,"button",17),H("click",function(){V(t);let r=ve(1),o=I();return z(o.handleToggleSection(o.SectionLabel.NODE_DATA_PROVIDERS,r))}),v(4,"mat-icon"),S(5),y()(),S(6," Node data providers "),y(),J(7,"node-data-provider-summary-panel",25),y()}if(i&2){let t=I();se("collapsed",t.isSectionCollapsed(t.SectionLabel.NODE_DATA_PROVIDERS)),w(5),nt(t.getSectionToggleIcon(t.SectionLabel.NODE_DATA_PROVIDERS)),w(2),N("paneId",t.paneId)("rootGroupNodeId",t.curSelectedNodeId)}}function Lme(i,e){if(i&1){let t=ie();v(0,"paginator",32),H("change",function(r){V(t);let o=I(2);return z(o.handleInputPaginatorChanged(r))}),y()}if(i&2){let t=I(2);N("pageSize",t.ioPageSize)("itemsCount",t.curInputsCount)}}function Fme(i,e){if(i&1&&(v(0,"div",35),S(1),y()),i&2){let t=I().$implicit,n=I(2);w(),nt(n.getInputName(t))}}function Bme(i,e){if(i&1){let t=ie();v(0,"div",43),H("click",function(r){V(t);let o=I(2).$implicit,s=I(2);return z(s.handleToggleInputOpNodeVisibility(o.opNode.id,s.flatInputItems,r))}),v(1,"mat-icon"),S(2),y()()}if(i&2){let t=I(2).$implicit,n=I(2);se("visible",n.getInputOpNodeToggleVisible(t.opNode.id)),N("matTooltip",n.getInputOpNodeToggleVisibilityTooltip(t.opNode.id)),w(2),Me(" ",n.getInputOpNodeToggleVisibilityIcon(t.opNode.id)," ")}}function Vme(i,e){if(i&1){let t=ie();v(0,"div",38),H("click",function(r){V(t);let o=I().$implicit,s=I(2);return z(s.handleLocateNode(o.opNode.id,r))}),S(1),v(2,"div",39)(3,"mat-icon",40),S(4,"my_location"),y()(),J(5,"div",41),W(6,Bme,3,4,"div",42),y()}if(i&2){let t=I().$implicit,n=I(2);Ze("data-id",t.opNode.id),w(),Me(" ",n.getInputName(t)," "),w(),N("matTooltip",n.locatorTooltip),w(4),ae(t.opNode.hideInLayout?-1:6)}}function zme(i,e){if(i&1&&(v(0,"tr",null,4)(2,"td",21)(3,"div",44)(4,"mat-icon",45),S(5,"circle"),y(),J(6,"hoverable-label",22),y()(),v(7,"td",23),J(8,"expandable-info-text",46),y()()),i&2){let t=I().$implicit,n=I(3);se("search-match",n.isSearchMatchedInputValue(t.value)),w(6),N("label",t.key),w(2),N("text",t.value)("type",t.key)}}function Ume(i,e){if(i&1&&W(0,zme,9,5,"tr",20),i&2){let t=e.$implicit,n=I(3);ae(n.getShowMetadata(t)?0:-1)}}function Hme(i,e){if(i&1&&(v(0,"div",31)(1,"div",33)(2,"div",34),S(3),y(),W(4,Fme,2,1,"div",35)(5,Vme,7,4,"div",36),y(),v(6,"table",37),ln(7,Ume,1,1,null,null,xj),y()()),i&2){let t=e.$implicit,n=I(2);w(),se("search-match",n.isSearchMatchedInputValue(n.getInputTensorTag(t))||n.isSearchMatchedInputValue(t.opNode.label)),w(2),nt(t.index),w(),ae(t.opNode.hideInLayout?4:5),w(3),cn(t.metadataList)}}function Gme(i,e){if(i&1){let t=ie();v(0,"div",26,3)(2,"div",27)(3,"div",28)(4,"button",17),H("click",function(){V(t);let r=ve(1),o=I();return z(o.handleToggleSection(o.SectionLabel.INPUTS,r))}),v(5,"mat-icon"),S(6),y()(),S(7),y(),W(8,Lme,1,2,"paginator",29),y(),v(9,"div",30),ln(10,Hme,9,4,"div",31,Dme),y()()}if(i&2){let t=I();se("collapsed",t.isSectionCollapsed(t.SectionLabel.INPUTS)),w(6),nt(t.getSectionToggleIcon(t.SectionLabel.INPUTS)),w(),Me(" inputs (",t.curInputsCount,") "),w(),ae(t.showInputPaginator?8:-1),w(2),cn(t.flatInputItems)}}function jme(i,e){if(i&1){let t=ie();v(0,"paginator",32),H("change",function(r){V(t);let o=I(2);return z(o.handleOutputPaginatorChanged(r))}),y()}if(i&2){let t=I(2);N("pageSize",t.ioPageSize)("itemsCount",t.outputItems.length)}}function Wme(i,e){if(i&1){let t=ie();v(0,"div",50),H("click",function(r){V(t);let o=I().$implicit,s=I(2);return z(s.handleToggleOutputVisibility(o.outputId,s.outputItemsForCurPage,r))}),v(1,"mat-icon"),S(2),y()()}if(i&2){let t=I().$implicit,n=I(2);se("visible",n.getOutputToggleVisible(t.outputId)),N("matTooltip",n.getOutputToggleVisibilityTooltip(t.outputId)),w(2),Me(" ",n.getOutputToggleVisibilityIcon(t.outputId)," ")}}function $me(i,e){i&1&&Zi(0)}function qme(i,e){if(i&1&&(v(0,"div",53),W(1,$me,1,0,"ng-container",54),y()),i&2){let t=I().$implicit,n=I(6),r=ve(11);w(),N("ngTemplateOutlet",r)("ngTemplateOutletContext",Pl(2,Rme,n.getNamespaceLabel(t)))}}function Yme(i,e){if(i&1){let t=ie();v(0,"div",52),H("click",function(r){let o=V(t).$implicit,s=I(6);return z(s.handleLocateNode(o.id,r))}),S(1),v(2,"div",39)(3,"mat-icon",40),S(4,"my_location"),y()()(),W(5,qme,2,4,"ng-template",null,6,kt)}if(i&2){let t=e.$implicit,n=ve(6),r=I(6);se("search-match",r.isSearchMatchedOutputValue(t.label)),N("bubble",n)("overlaySize",r.constValuesPopupSize)("overlayPositions",r.outputConnectsToNamespacePopupPosition)("hoverDelayMs",50),Ze("data-id",t.id),w(),Me(" ",t.label," "),w(),N("matTooltip",r.locatorTooltip)}}function Xme(i,e){if(i&1&&ln(0,Yme,7,9,null,null,Ome),i&2){let t=I().$implicit;cn(t.connectedNodes)}}function Zme(i,e){if(i&1&&J(0,"expandable-info-text",51),i&2){let t=I().$implicit;N("text",t.value)}}function Qme(i,e){if(i&1&&(v(0,"tr")(1,"td",21)(2,"div",44)(3,"mat-icon",45),S(4,"circle"),y(),J(5,"hoverable-label",22),y()(),v(6,"td",23),W(7,Xme,2,0)(8,Zme,1,1,"expandable-info-text",51),y()()),i&2){let t=e.$implicit,n=I(4);se("search-match",n.isSearchMatchedOutputValue(t.value)),w(5),N("label",t.key),w(2),ae(t.key===n.outputMetadataConnectedTo?7:8)}}function Kme(i,e){if(i&1&&(v(0,"table",37),ln(1,Qme,9,4,"tr",20,xj),y()),i&2){let t=I().$implicit;w(),cn(t.metadataList)}}function Jme(i,e){if(i&1&&(v(0,"div",31)(1,"div",33)(2,"div",34),S(3),y(),v(4,"div",35),S(5),y(),J(6,"div",41),W(7,Wme,3,4,"div",49),y(),W(8,Kme,3,0,"table",37),y()),i&2){let t=e.$implicit,n=I(2);w(),se("search-match",n.isSearchMatchedOutputValue(t.tensorTag)),w(2),nt(t.index),w(2),nt(n.getOutputName(t)),w(2),ae(n.getHasConnectedToNodes(t)?7:-1),w(),ae(t.metadataList.length>0?8:-1)}}function ege(i,e){if(i&1){let t=ie();v(0,"div",47,5)(2,"div",48)(3,"div",28)(4,"button",17),H("click",function(){V(t);let r=ve(1),o=I();return z(o.handleToggleSection(o.SectionLabel.OUTPUTS,r))}),v(5,"mat-icon"),S(6),y()(),S(7),y(),W(8,jme,1,2,"paginator",29),y(),v(9,"div",30),ln(10,Jme,9,6,"div",31,Pme),y()()}if(i&2){let t=I();se("collapsed",t.isSectionCollapsed(t.SectionLabel.OUTPUTS)),w(6),nt(t.getSectionToggleIcon(t.SectionLabel.OUTPUTS)),w(),Me(" outputs (",t.curOutputsCount,") "),w(),ae(t.showOutputPaginator?8:-1),w(2),cn(t.outputItemsForCurPage)}}function tge(i,e){if(i&1){let t=ie();v(0,"paginator",32),H("change",function(r){V(t);let o=I(2);return z(o.handleIdenticalGroupsPaginatorChanged(r))}),y()}if(i&2){let t=I(2);N("pageSize",t.ioPageSize)("itemsCount",t.identicalGroupNodes.length)}}function nge(i,e){if(i&1){let t=ie();v(0,"div",15,7)(2,"div",55)(3,"div",28)(4,"button",17),H("click",function(){V(t);let r=ve(1),o=I();return z(o.handleToggleSection(o.SectionLabel.IDENTICAL_GROUPS,r))}),v(5,"mat-icon"),S(6),y()(),S(7),y(),W(8,tge,1,2,"paginator",29),y(),J(9,"io-tree",56),y()}if(i&2){let t=I();se("collapsed",t.isSectionCollapsed(t.SectionLabel.IDENTICAL_GROUPS)),w(6),nt(t.getSectionToggleIcon(t.SectionLabel.IDENTICAL_GROUPS)),w(),Me(" Identical layers (",t.identicalGroupNodes.length,") "),w(),ae(t.showIdenticalGroupsPaginator?8:-1),w(),N("data",t.identicalGroupsData)("rendererId",t.curRendererId)}}function ige(i,e){if(i&1&&(v(0,"div",59),S(1),y()),i&2){let t=e.$implicit;w(),Me(" ",t," ")}}function rge(i,e){if(i&1&&(v(0,"div",57),S(1," Namespace hierarchy "),y(),v(2,"div",58),ln(3,ige,2,1,"div",59,Z0),y()),i&2){let t=e.value;w(3),cn(t.split("/"))}}var Es=function(i){return i.GRAPH_INFO="Graph info",i.NODE_INFO="Node info",i.LAYER_INFO="Layer info",i.LAYER_ATTRS="Layer attributes",i.ATTRIBUTES="Attributes",i.NODE_DATA_PROVIDERS="Node data providers",i.IDENTICAL_GROUPS="Identical groups",i.INPUTS="inputs",i.OUTPUTS="outputs",i}(Es||{}),oge=64,sge=150,yj=370,wj=(()=>{class i{appService;nodeDataProviderExtensionService;changeDetectorRef;infoPanelService;splitPaneService;paneId;inputValueContents=new Yi;curModelGraph;curSelectedNode;curShowOnOpNodeInfoIds=new Set;curShowOnOpNodeAttrIds=new Set;curShowOnGroupNodeInfoIds=new Set;curShowOnNodeDataProviderRuns={};curSearchResults=void 0;width=yj;minWidth=yj;sections=[];flatInputItems=[];outputItems=[];outputItemsForCurPage=[];identicalGroupNodes=[];identicalGroupsData;curRendererId="";curInputsCount=0;curOutputsCount=0;resizing=!1;hide=!1;ioPageSize;SectionLabel=Es;outputMetadataConnectedTo="connects to";inputMetadataValuesKey="values";inputMetadataNamespaceKey="namespace";locatorTooltip=`Click: locate +Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHeight:0,maxWidth:600};constValuesPopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top",offsetX:-32}];outputConnectsToNamespacePopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top",offsetX:-4}];curSearchAttrMatches=[];curSearchInputMatches=[];curSearchOutputMatches=[];inputSourceNodes=[];inputMetadataList=[];savedWidth=0;constructor(t,n,r,o,s){this.appService=t,this.nodeDataProviderExtensionService=n,this.changeDetectorRef=r,this.infoPanelService=o,this.splitPaneService=s,this.ioPageSize=this.appService.testMode?5:25,mt(()=>{let a=this.appService.getPaneById(this.paneId);if(!a||!a.modelGraph)return;this.curModelGraph=a.modelGraph,this.curRendererId=a.selectedNodeInfo?.rendererId||"";let l=a.selectedNodeInfo?.nodeId||"";this.curSelectedNodeId!==l&&(this.handleNodeSelected(l),setTimeout(()=>{this.splitPaneService.resetInputOutputHiddenIds(),this.handleSearchResultsChanged()}))}),mt(()=>{let a=this.appService.getPaneById(this.paneId);!a||!a.modelGraph||this.curSearchResults!==a.searchResults&&(this.curSearchResults=a.searchResults,this.handleSearchResultsChanged())}),mt(()=>{this.nodeDataProviderExtensionService.runs(),this.genInfoData(),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})})}isSearchMatchedAttrId(t){return this.curSearchAttrMatches.find(n=>n.matchedAttrId===t)!=null}isSearchMatchedInputValue(t){return this.curSearchInputMatches?this.curSearchInputMatches.find(n=>n.matchedText===t)!=null:!1}isSearchMatchedOutputValue(t){return this.curSearchOutputMatches?this.curSearchOutputMatches.find(n=>n.matchedText===t)!=null:!1}handleMouseDownResizer(t){t.preventDefault(),document.body.style.cursor="ew-resize";let n=yn(document,"mousemove"),r=yn(window,"mouseup"),o=this.width,s=t.clientX;this.resizing=!0,this.changeDetectorRef.markForCheck(),qr([n]).pipe(Xe(r)).subscribe({next:([a])=>{let l=a.clientX-s;this.width=Math.max(oge,o-l),this.minWidth=this.width,this.changeDetectorRef.markForCheck()},complete:()=>{document.body.style.cursor="default",this.resizing=!1,this.changeDetectorRef.markForCheck()}})}handleInputPaginatorChanged(t){let n=this.inputSourceNodes.slice(t*this.ioPageSize,(t+1)*this.ioPageSize),r=this.inputMetadataList.slice(t*this.ioPageSize,(t+1)*this.ioPageSize);this.flatInputItems=this.genInputFlatItems(t*this.ioPageSize,n,r),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})}handleOutputPaginatorChanged(t){this.outputItemsForCurPage=this.outputItems.slice(t*this.ioPageSize,(t+1)*this.ioPageSize),this.changeDetectorRef.markForCheck()}handleIdenticalGroupsPaginatorChanged(t){this.identicalGroupsData=cl(this.identicalGroupNodes.slice(t*this.ioPageSize,(t+1)*this.ioPageSize),[],"incoming",this.curSelectedNode?.id||"")}toggleHideInfoPanel(){this.hide=!this.hide;let t=0;this.hide?this.savedWidth=this.width:t=this.savedWidth,this.animateSidePanelWidth(t)}handleToggleSection(t,n){if(!n)return;this.isSectionCollapsed(t)?n.style.maxHeight=`${n.scrollHeight}px`:(n.style.maxHeight=`${n.offsetHeight}px`,n.style.overflow="hidden"),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.collapsedSectionNames.has(t)?this.infoPanelService.collapsedSectionNames.delete(t):this.infoPanelService.collapsedSectionNames.add(t),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.isSectionCollapsed(t)?n.style.overflow="hidden":(n.style.overflow="visible",n.style.maxHeight="fit-content")},150)})}isSectionCollapsed(t){return this.infoPanelService.collapsedSectionNames.has(t)}getSectionToggleIcon(t){return this.isSectionCollapsed(t)?"chevron_right":"expand_more"}handleLocateNode(t,n){this.appService.curToLocateNodeInfo.set({nodeId:t,rendererId:this.curRendererId,isGroupNode:!1,select:n.altKey})}handleToggleInputOpNodeVisibility(t,n,r){r.stopPropagation(),r.altKey?this.splitPaneService.setInputOpNodeVisible(t,n.map(o=>o.opNode.id)):this.splitPaneService.toggleInputOpNodeVisibility(t)}getInputOpNodeToggleVisible(t){return this.splitPaneService.getInputOpNodeVisible(t)}getInputOpNodeToggleVisibilityIcon(t){return this.getInputOpNodeToggleVisible(t)?"visibility":"visibility_off"}getInputOpNodeToggleVisibilityTooltip(t){return this.getInputOpNodeToggleVisible(t)?"Click to hide highlight":"Click to show highlight"}handleToggleOutputVisibility(t,n,r){r.stopPropagation(),r.altKey?this.splitPaneService.setOutputVisible(t,n.map(o=>o.outputId)):this.splitPaneService.toggleOutputVisibility(t)}getOutputToggleVisible(t){return this.splitPaneService.getOutputVisible(t)}getOutputToggleVisibilityIcon(t){return this.getOutputToggleVisible(t)?"visibility":"visibility_off"}getOutputToggleVisibilityTooltip(t){return this.getOutputToggleVisible(t)?"Click to hide highlight":"Click to show highlight"}getInputName(t){let n=t.metadataList.find(r=>r.key===Bo);return n?`${n.value} (${t.opNode.label})`:t.opNode.label}getInputTensorTag(t){return t.metadataList.find(r=>r.key===Bo)?.value??""}getOutputName(t){return t.tensorTag===""?"output":t.tensorTag}getShowMetadata(t){return!t.key.startsWith("__")}getHasConnectedToNodes(t){return(t.metadataList.find(r=>r.key===this.outputMetadataConnectedTo)?.connectedNodes||[]).length>0}trackBySectionLabel(t,n){return n.label}trackByItemIdOrLabel(t,n){return n.id||n.label}get canShowGraphInfo(){return this.curModelGraph!=null&&this.curSelectedNode==null}get showNodeDataProviderSummary(){return this.curModelGraph?(this.curSelectedNode==null||bt(this.curSelectedNode))&&this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph).length>0:!1}get curSelectedNodeId(){return this.curSelectedNode?this.curSelectedNode.id:void 0}get showInputPaginator(){return this.inputSourceNodes.length>this.ioPageSize&&!this.isSectionCollapsed(Es.INPUTS)}get showOutputPaginator(){return this.outputItems.length>this.ioPageSize&&!this.isSectionCollapsed(Es.OUTPUTS)}get showIdenticalGroupsPaginator(){return this.identicalGroupNodes.length>this.ioPageSize&&!this.isSectionCollapsed(Es.IDENTICAL_GROUPS)}get hideToggleTooltip(){return this.hide?"Show info panel":"Hide info panel"}get hideToggleIconName(){return this.hide?"chevron_left":"chevron_right"}handleNodeSelected(t){!this.curModelGraph||!t?this.curSelectedNode=void 0:this.curSelectedNode=this.curModelGraph.nodesById[t],this.genInfoData(),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})}genInfoData(){this.sections=[],this.flatInputItems=[],this.inputSourceNodes=[],this.inputMetadataList=[],this.outputItems=[],this.identicalGroupNodes=[],this.identicalGroupsData=void 0,this.canShowGraphInfo?this.genInfoDataForGraph():this.curSelectedNode&&(Et(this.curSelectedNode)?(this.genInfoDataForSelectedOpNode(),this.genInputsOutputsData()):bt(this.curSelectedNode)&&this.genInfoDataForSelectedGroupNode())}genInfoDataForGraph(){if(!this.curModelGraph)return;let t={label:Es.GRAPH_INFO,sectionType:"graph",items:[]};this.sections.push(t);let n=this.curModelGraph.groupNodeAttributes?.[""];if(n)for(let s of Object.keys(n))t.items.push({section:t,label:s,value:n[s]});let r=0,o=0;for(let s of this.curModelGraph.nodes)Et(s)&&!s.hideInLayout?r++:bt(s)&&o++;t.items.push({section:t,label:"op node count",value:String(r)},{section:t,label:"layer count",value:String(o)})}genInfoDataForSelectedOpNode(){if(!this.curModelGraph||!this.curSelectedNode)return;let t=this.curSelectedNode,n={label:Es.NODE_INFO,sectionType:"op",items:[]};this.sections.push(n),n.items.push({section:n,label:"op name",value:`${t.label}`});let r="id";if(n.items.push({section:n,label:r,value:t.id,canShowOnNode:!0,showOnNode:this.curShowOnOpNodeInfoIds.has(r)}),r="namespace",n.items.push({section:n,label:r,value:ad(t),canShowOnNode:!0,showOnNode:this.curShowOnOpNodeInfoIds.has(r)}),Object.keys(t.attrs||{}).length>0){let s={label:Es.ATTRIBUTES,sectionType:"op",items:[]},a=t.attrs||{};for(let l of Object.keys(a))l.startsWith("__")||s.items.push({section:s,label:l,value:a[l],canShowOnNode:!0,showOnNode:this.curShowOnOpNodeAttrIds.has(l)});s.items.length>0&&this.sections.push(s)}let o=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);if(o.length>0){let s={label:Es.NODE_DATA_PROVIDERS,sectionType:"op",items:[]};this.sections.push(s);for(let a of o){let l=((a.results||{})[this.curModelGraph.id]||{})[t.id],c=l?.strValue||"-",d=l?.bgColor||"transparent",u=l?.textColor||"black";s.items.push({id:a.runId,section:s,label:a.runName,value:c,canShowOnNode:a.done,showOnNode:this.curShowOnNodeDataProviderRuns[a.runId]!=null,bgColor:d,textColor:u,loading:!a.done})}}}genInputsOutputsData(){if(!this.curModelGraph||!this.curSelectedNode)return;let t=this.curSelectedNode,n=t.incomingEdges||[];this.inputMetadataList=[],this.inputSourceNodes=[],this.flatInputItems=[];for(let a of n){let l=this.curModelGraph?.nodesById[a.sourceNodeId];this.inputSourceNodes.push(l);let c=(t.inputsMetadata||{})[a.targetNodeInputId]||{},d=Z({},(l.outputsMetadata||{})[a.sourceNodeOutputId]||{});for(let u of Object.keys(d))c[u]==null&&u!==Bo&&(c[u]=d[u]);this.inputMetadataList.push(c)}if(this.curInputsCount=this.inputSourceNodes.length,n.length>0){let a=this.inputSourceNodes.slice(0,this.ioPageSize),l=this.inputMetadataList.slice(0,this.ioPageSize);this.flatInputItems=this.genInputFlatItems(0,a,l)}this.outputItems=[];let r=t.outputsMetadata||{},o=t.outgoingEdges||[],s=0;for(let a of Object.keys(r)){let l=[],c="";for(let u of Object.keys(r[a])){let h=r[a][u];u===Bo&&(c=h),!u.startsWith("__")&&l.push({key:u,value:h})}l.sort((u,h)=>u.key.localeCompare(h.key));let d=o.filter(u=>u.sourceNodeOutputId===a).map(u=>this.curModelGraph.nodesById[u.targetNodeId]);l.push({key:this.outputMetadataConnectedTo,value:"",connectedNodes:d}),this.outputItems.push({index:s,tensorTag:c,outputId:a,metadataList:l}),s++}this.curOutputsCount=this.outputItems.length,this.outputItemsForCurPage=this.outputItems.slice(0,this.ioPageSize)}genInfoDataForSelectedGroupNode(){if(!this.curModelGraph||!this.curSelectedNode)return;let t=this.curSelectedNode,n={label:Es.LAYER_INFO,sectionType:"group",items:[]};this.sections.push(n),n.items.push({section:n,label:"name",value:t.label});let r="namespace";n.items.push({section:n,label:r,value:ad(t),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)}),r="#children",n.items.push({section:n,label:r,value:String((t.nsChildrenIds||[]).length),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)}),r="#descendants",n.items.push({section:n,label:r,value:String((t.descendantsNodeIds||[]).length),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)});let o=this.curModelGraph.groupNodeAttributes?.[t.id.replace("___group___","")];if(o){let s={label:Es.LAYER_ATTRS,sectionType:"group",items:[]};this.sections.push(s);for(let a of Object.keys(o))s.items.push({section:n,label:a,value:o[a]})}t.identicalGroupIndex!=null&&(this.identicalGroupNodes=this.curModelGraph.nodes.filter(s=>bt(s)&&s.identicalGroupIndex===t.identicalGroupIndex),this.identicalGroupsData=cl(this.identicalGroupNodes.slice(0,this.ioPageSize),[],"incoming",t.id))}handleSearchResultsChanged(){if(!this.curSelectedNode||!this.curSearchResults)return;let t=this.curSelectedNode.id,n=this.curSearchResults.results[t]||[],r=[],o=[],s=[];for(let a of n)switch(a.type){case vt.INPUT_METADATA:r.push(a);break;case vt.OUTPUT_METADATA:o.push(a);break;case vt.ATTRIBUTE:s.push(a);break;default:break}this.curSearchAttrMatches=s,this.curSearchOutputMatches=o,this.curSearchInputMatches=r,this.changeDetectorRef.markForCheck()}animateSidePanelWidth(t){let n=Date.now(),r=this.width,o=()=>{let s=Date.now()-n,a=this.appService.testMode?1:Math.min(1,s/sge);a=Math.sin(a*Math.PI/2);let l=r+(t-r)*a;if(this.width=l,this.minWidth=l,this.changeDetectorRef.markForCheck(),a>=1){this.width=t,this.minWidth=t,this.changeDetectorRef.markForCheck();return}requestAnimationFrame(o)};o()}genInputFlatItems(t,n,r){let o=[];for(let s=0;s{l.push({key:d,value:u})}),l.sort((d,u)=>d.key.localeCompare(u.key)),l.push({key:this.inputMetadataNamespaceKey,value:ad(n[s])});let c=a.attrs||{};c[ka]&&l.push({key:this.inputMetadataValuesKey,value:c[ka]}),o.push({index:s+t,opNode:a,metadataList:l})}return o}updateInputValueContentsExpandable(){for(let t=0;tn.offsetHeight&&n.classList.add("expandable")}}static \u0275fac=function(n){return new(n||i)(M(st),M(Cr),M(Fe),M(af),M(_c))};static \u0275cmp=le({type:i,selectors:[["info-panel"]],viewQuery:function(n,r){if(n&1&&Ie(Ime,5),n&2){let o;be(o=ye())&&(r.inputValueContents=o)}},hostVars:4,hostBindings:function(n,r){n&2&&tn("width",r.width,"px")("min-width",r.minWidth,"px")},inputs:{paneId:"paneId"},standalone:!0,features:[Bt([af]),ce],decls:12,vars:12,consts:[["namespaceHierarchy",""],["sectionEle",""],["ndpSectionEle",""],["inputsSectionEle",""],["rowEle",""],["outputsSectionEle",""],["namespacePopup",""],["identicalGroupsSectionEle",""],[1,"container"],["class","section",3,"collapsed",4,"ngFor","ngForOf","ngForTrackBy"],["class","section",3,"collapsed",4,"ngIf"],["class","section inputs",3,"collapsed",4,"ngIf"],["class","section outputs",3,"collapsed",4,"ngIf"],[1,"resizer",3,"mousedown"],[1,"hide-toggle",3,"click","matTooltip"],[1,"section"],[1,"header"],["mat-icon-button","",1,"toggle",3,"click"],[1,"items-container"],[1,"metadata-table","info-attrs"],[3,"search-match"],[1,"key"],[3,"label"],[1,"value"],[3,"text","type","bgColor","textColor"],[3,"paneId","rootGroupNodeId"],[1,"section","inputs"],[1,"header","input"],[1,"header-label-container"],[3,"pageSize","itemsCount"],[1,"flat-items-container"],[1,"flat-item"],[3,"change","pageSize","itemsCount"],[1,"name-row"],[1,"index"],[1,"name"],[1,"name","locator"],[1,"metadata-table"],[1,"name","locator",3,"click"],["matTooltipClass","multiline-tooltip-left","matTooltipPosition","right",1,"locator-icon-container",3,"matTooltip"],[1,"locator-icon"],[1,"filler"],["matTooltipPosition","left",1,"visibility-icon-container","input",3,"matTooltip","visible"],["matTooltipPosition","left",1,"visibility-icon-container","input",3,"click","matTooltip"],[1,"key-container"],[1,"bullet"],[3,"text","type"],[1,"section","outputs"],[1,"header","output"],["matTooltipPosition","left",1,"visibility-icon-container","output",3,"visible","matTooltip"],["matTooltipPosition","left",1,"visibility-icon-container","output",3,"click","matTooltip"],[3,"text"],[1,"target-node-container",3,"click","bubble","overlaySize","overlayPositions","hoverDelayMs"],[1,"model-explorer-const-values-popup"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"header","identical-groups"],[3,"data","rendererId"],[1,"values-count-msg"],[1,"namespace-content"],[1,"namespace-row"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",8),W(1,Nme,11,4,"div",9)(2,kme,8,5,"div",10)(3,Gme,12,5,"div",11)(4,ege,12,5,"div",12)(5,nge,10,7,"div",10),y(),v(6,"div",13),H("mousedown",function(a){return V(o),z(r.handleMouseDownResizer(a))}),y(),v(7,"div",14),H("click",function(){return V(o),z(r.toggleHideInfoPanel())}),v(8,"mat-icon"),S(9),y()(),W(10,rge,5,0,"ng-template",null,0,kt)}n&2&&(se("graph-info",r.showNodeDataProviderSummary),w(),N("ngForOf",r.sections)("ngForTrackBy",r.trackBySectionLabel),w(),N("ngIf",r.showNodeDataProviderSummary),w(),N("ngIf",r.flatInputItems.length>0),w(),N("ngIf",r.outputItems.length>0),w(),N("ngIf",r.identicalGroupsData),w(),se("resizing",r.resizing),w(),N("matTooltip",r.hideToggleTooltip),w(2),nt(r.hideToggleIconName))},dependencies:[$n,Ae,Ci,Mn,Bs,mj,gj,In,Ho,it,gt,ns,UC,Jt,Wn,sf,xc,bj],styles:[`[_nghost-%COMP%]{position:relative;width:370px;min-width:370px}.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;border-left:1px solid #e1e3e1;background-color:#fff;font-size:12px;overflow-y:auto;position:relative}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{transition:max-height .15s ease-out;padding-bottom:8px;box-sizing:border-box}.container[_ngcontent-%COMP%] .section.collapsed[_ngcontent-%COMP%]{max-height:32px!important;overflow:hidden}.container[_ngcontent-%COMP%] .section.inputs[_ngcontent-%COMP%]{padding-bottom:16px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-items-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:10px;gap:8px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2px 0 12px;font-size:12px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{color:#999;min-width:14px;margin-right:2px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{color:#00639b;font-weight:500;display:flex;align-items:center}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]{flex-grow:1;display:flex;align-items:center;cursor:pointer}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]:hover{background-color:#f6f6f6}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]:hover .locator-icon-container[_ngcontent-%COMP%]{opacity:.8}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{margin-top:3px;margin-left:18px;margin-right:0}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(:first-child){border-top:1px solid #dadce0}.container[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:11px;font-weight:700;padding:4px 12px 0;text-transform:uppercase;letter-spacing:.0327em;position:sticky;top:0;z-index:100;flex-shrink:0;box-sizing:border-box;background-color:#fff;-webkit-user-select:none;user-select:none;color:#000000de}.container[_ngcontent-%COMP%] .header.input[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .header.output[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .header.identical-groups[_ngcontent-%COMP%]{justify-content:space-between}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-label-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%]{padding:0;width:24px;height:24px;margin-left:-8px;margin-right:2px;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit;font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%] .mat-mdc-button-touch-target{display:none}.container[_ngcontent-%COMP%] .output-item-container[_ngcontent-%COMP%]{font-family:Roboto,sans-serif}.container[_ngcontent-%COMP%] .output-item-container[_ngcontent-%COMP%]:not(.last){margin-top:8px}.container[_ngcontent-%COMP%] .output-item-label[_ngcontent-%COMP%]{font-size:13px;padding:4px 12px;color:#00639b;font-weight:500}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;font-size:12px;margin:0 12px;word-break:break-all;max-width:calc(100% - 28px)}.container[_ngcontent-%COMP%] .metadata-table.info-attrs[_ngcontent-%COMP%]{margin-left:30px}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{vertical-align:text-top}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover.has-hover-values{cursor:pointer;background-color:#f6f6f6}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] mat-icon.bullet[_ngcontent-%COMP%]{flex-shrink:0;font-size:4px;width:5px;height:5px;color:#bbb;margin-right:4px;margin-top:6px}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%]{color:#999;padding-right:6px;white-space:nowrap;min-width:100px;width:100px;max-width:100px;overflow:hidden;text-overflow:ellipsis;position:relative}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%] .key-container[_ngcontent-%COMP%]{display:flex;align-items:flex-start;overflow:hidden;position:absolute;inset:0}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]{max-width:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]:has(expandable-info-text.expanded){white-space:normal;max-width:inherit}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container[_ngcontent-%COMP%]:hover .locator-icon-container[_ngcontent-%COMP%]{opacity:.8}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .values-hover-trigger[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:99px;display:flex;align-items:center;background-color:#d7f1ff;color:#00639b;width:fit-content;height:16px;padding:0 6px;font-size:10px}.container[_ngcontent-%COMP%] .items-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;margin-top:10px;margin-bottom:6px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 12px}.container[_ngcontent-%COMP%] .item-container.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .label-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:500;color:#aaa;font-size:12px;margin-bottom:1px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .show-on-node-toggle[_ngcontent-%COMP%]{height:16px;display:flex;font-size:11px;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;-webkit-user-select:none;user-select:none;transform:scale(.7);margin-right:-6px;margin-top:-1px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:13px;word-break:break-word}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value.big-text[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value.has-bg-color[_ngcontent-%COMP%]{padding:2px 4px;border-radius:4px;margin-top:2px}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;opacity:.5;margin-left:4px}.container[_ngcontent-%COMP%] .locator-icon-container.left[_ngcontent-%COMP%]{margin-right:4px;margin-left:0;display:inline-block}.container[_ngcontent-%COMP%] .locator-icon-container.left[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-bottom:-2px}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#333;font-size:12px;width:12px;height:12px}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;opacity:.5;padding:0 11px 0 20px;cursor:pointer}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#333;font-size:14px;width:14px;height:14px}.container[_ngcontent-%COMP%] .visibility-icon-container.input.visible[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#009e73}.container[_ngcontent-%COMP%] .visibility-icon-container.output.visible[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#d55e00}.resizer[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;left:0;width:6px;cursor:ew-resize;background-color:transparent;z-index:200}.resizer[_ngcontent-%COMP%]:hover, .resizer.resizing[_ngcontent-%COMP%]{background-color:#0000000a}.hide-toggle[_ngcontent-%COMP%]{position:absolute;right:100%;bottom:2px;width:16px;height:20px;border:1px solid #ccc;border-right:none;box-sizing:border-box;border-radius:99px 0 0 99px;cursor:pointer;background-color:#fff}.hide-toggle[_ngcontent-%COMP%]:hover{background-color:#eee}.hide-toggle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px;color:#999} bubble-container:has(.model-explorer-const-values-popup){width:100%} .model-explorer-const-values-popup{padding:8px;line-height:12px;background-color:#fff} .model-explorer-const-values-popup .values-count-msg{margin-bottom:8px;color:#999;font-size:12px} .model-explorer-const-values-popup .content{font-size:11px;white-space:pre-wrap;font-family:monospace} .model-explorer-const-values-popup .namespace-row{font-size:12px;padding:3px 0} @@ -3928,7 +3928,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],changeDetection:0})}return i})();function lge(i,e){if(i&1&&J(0,"graph-panel",3),i&2){let t=I();N("@showModelGraph",void 0)("@.disabled",t.disableAnimation)("modelGraph",t.pane.modelGraph)("paneId",t.pane.id)("rendererId",t.pane.id)}}function cge(i,e){if(i&1&&J(0,"info-panel",2),i&2){let t=I();N("paneId",t.pane.id)}}var Mj=(()=>{class i{appService;changeDetectorRef;pane;constructor(t,n){this.appService=t,this.changeDetectorRef=n}refresh(){this.changeDetectorRef.markForCheck()}get disableAnimation(){return this.appService.testMode}get showInfoPanel(){return!this.appService.config()?.hideInfoPanel}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["split-pane"]],inputs:{pane:"pane"},standalone:!0,features:[Bt([Xo,_c]),ce],decls:3,vars:2,consts:[[1,"container"],[3,"modelGraph","paneId","rendererId",4,"ngIf"],[3,"paneId"],[3,"modelGraph","paneId","rendererId"]],template:function(n,r){n&1&&(v(0,"div",0),W(1,lge,1,5,"graph-panel",1)(2,cge,1,1,"info-panel",2),y()),n&2&&(w(),N("ngIf",r.pane.modelGraph),w(),ae(r.showInfoPanel?2:-1))},dependencies:[Ae,Mn,gj,Sj],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;overflow:hidden}.container[_ngcontent-%COMP%] graph-panel[_ngcontent-%COMP%]{flex-grow:1} +`],changeDetection:0})}return i})();function age(i,e){if(i&1&&J(0,"graph-panel",3),i&2){let t=I();N("@showModelGraph",void 0)("@.disabled",t.disableAnimation)("modelGraph",t.pane.modelGraph)("paneId",t.pane.id)("rendererId",t.pane.id)}}function lge(i,e){if(i&1&&J(0,"info-panel",2),i&2){let t=I();N("paneId",t.pane.id)}}var Cj=(()=>{class i{appService;changeDetectorRef;pane;constructor(t,n){this.appService=t,this.changeDetectorRef=n}refresh(){this.changeDetectorRef.markForCheck()}get disableAnimation(){return this.appService.testMode}get showInfoPanel(){return!this.appService.config()?.hideInfoPanel}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe))};static \u0275cmp=le({type:i,selectors:[["split-pane"]],inputs:{pane:"pane"},standalone:!0,features:[Bt([Xo,_c]),ce],decls:3,vars:2,consts:[[1,"container"],[3,"modelGraph","paneId","rendererId",4,"ngIf"],[3,"paneId"],[3,"modelGraph","paneId","rendererId"]],template:function(n,r){n&1&&(v(0,"div",0),W(1,age,1,5,"graph-panel",1)(2,lge,1,1,"info-panel",2),y()),n&2&&(w(),N("ngIf",r.pane.modelGraph),w(),ae(r.showInfoPanel?2:-1))},dependencies:[Ae,Mn,fj,wj],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;overflow:hidden}.container[_ngcontent-%COMP%] graph-panel[_ngcontent-%COMP%]{flex-grow:1} @@ -3946,7 +3946,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],data:{animation:[si("showModelGraph",[fi("void",Qt({opacity:0,transform:"scale(1.03, 1.03)"})),On("void => *",Pn("150ms 100ms ease-out",Qt({opacity:1,transform:"scale(1, 1)"})))])]},changeDetection:0})}return i})();var dge=["panesContainer"],uge=["splitPane"],hge=(i,e)=>e.label;function pge(i,e){i&1&&(v(0,"div",10),S(1),y()),i&2&&(w(),Me(" ",e," "))}function fge(i,e){i&1&&(v(0,"mat-icon"),S(1,"error"),y())}function mge(i,e){i&1&&J(0,"mat-spinner",12)}function gge(i,e){i&1&&J(0,"mat-spinner",20)}function _ge(i,e){i&1&&(v(0,"mat-icon"),S(1,"check_circle"),y())}function vge(i,e){if(i&1&&(v(0,"div",19),W(1,gge,1,0,"mat-spinner",20)(2,_ge,2,0,"mat-icon"),v(3,"div",21),S(4),y()()),i&2){let t=e.$implicit;w(),ae(t.processing?1:2),w(3),Me(" ",t.label," ")}}function bge(i,e){if(i&1&&(v(0,"div",18),ln(1,vge,5,2,"div",19,hge),y()),i&2){let t=I(3).$implicit,n=I();w(),cn(n.getProcessingTasksForPane(t.id))}}function yge(i,e){if(i&1&&(v(0,"div",11),W(1,fge,2,0,"mat-icon")(2,mge,1,0,"mat-spinner",12),S(3," Processing graph... "),y(),v(4,"div",13),S(5," Please remain on this page while the model is being processed "),y(),v(6,"div",14)(7,"div",15),J(8,"div",16),y(),v(9,"div",17)(10,"mat-icon"),S(11,"info"),y()(),W(12,bge,3,0,"ng-template",null,2,kt),y()),i&2){let t=ve(13),n=I(2).$implicit,r=I();w(),ae(r.getProcessingError(n)?1:2),w(7),tn("width",r.getProgressPct(n.id),"%"),w(),N("bubble",t)("hoverDelayMs",100)}}function xge(i,e){if(i&1&&(v(0,"div",7),W(1,pge,2,1,"div",10)(2,yge,14,5),y()),i&2){let t,n=I().$implicit,r=I();N("@hideProcessingPanel",void 0)("@.disabled",r.disableAnimation),w(),ae((t=r.getProcessingError(n))?1:2,t)}}function wge(i,e){if(i&1){let t=ie();v(0,"div",22)(1,"div",23),S(2),y(),v(3,"div",24)(4,"div",25),H("click",function(){V(t);let r=I(2);return z(r.handleClickSwapPane())})("mousedown",function(r){return V(t),z(r.stopPropagation())}),v(5,"mat-icon"),S(6,"swap_horiz"),y()(),v(7,"div",26),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClickClosePane(r))})("mousedown",function(r){return V(t),z(r.stopPropagation())}),v(8,"mat-icon"),S(9,"close"),y()()()()}if(i&2){let t=I().$implicit,n=I();w(2),Me(" ",n.getPaneTitle(t)," ")}}function Cge(i,e){if(i&1&&(v(0,"div",6),W(1,xge,3,3,"div",7)(2,wge,10,1,"div",8),J(3,"split-pane",9,1),y()),i&2){let t=e.$implicit,n=e.index,r=I();tn("width",r.getPaneWidthPct(n),"%"),se("selected",r.isPaneSelected(t)),Ze("data-pane-id",t.id),w(),ae(r.getShowLoading(t)?1:-1),w(),N("ngIf",r.hasSplitPane),w(),N("pane",t)}}function Sge(i,e){if(i&1){let t=ie();v(0,"div",27),H("mousedown",function(r){V(t);let o=I(),s=ve(1);return z(o.handleMouseDownResizer(r,s))}),J(1,"div",28),y()}if(i&2){let t=I();tn("left",t.resizerLeft)}}var Ej=(()=>{class i{changeDetectorRef;appService;workerService;panesContainer;splitPanes=new Yi;processingTasks={};resizingSplitPane=!1;curLeftWidthFraction=1;panes;curUpdateProcessingProgressReq;constructor(t,n,r){this.changeDetectorRef=t,this.appService=n,this.workerService=r,this.panes=this.appService.panes,mt(()=>{let o=this.panes();o.length>=1&&(this.curLeftWidthFraction=o[0].widthFraction);for(let s of o)s.modelGraph||(this.processingTasks[s.id]=XF.map(a=>({label:a,processing:!0})));this.changeDetectorRef.detectChanges();for(let s=0;s{switch(o.data.eventType){case Ji.UPDATE_PROCESSING_PROGRESS:this.handleUpdateProcessingProgressRequest(o.data);break;default:break}})}ngAfterViewInit(){this.panesContainer.nativeElement.addEventListener("mousedown",t=>{let n=t.target.closest(".pane-container");if(!n)return;let r=n.dataset.paneId||"";this.appService.selectPane(r)},!0)}handleClickSwapPane(){this.appService.swapPane()}handleClickClosePane(t){this.appService.closePane(t.id)}getPaneTitle(t){let n=t.modelGraph;return n?`${n.collectionLabel} | ${n.id}`:"-"}handleMouseDownResizer(t,n){t.preventDefault(),document.body.style.cursor="ew-resize";let r=yn(document,"mousemove"),o=yn(window,"mouseup"),a=this.appService.panes()[0].widthFraction,l=n.offsetWidth,c=l*a,d=t.clientX;this.resizingSplitPane=!0,this.changeDetectorRef.markForCheck(),qr([r]).pipe(Xe(o)).subscribe({next:([u])=>{let h=u.clientX-d,p=Math.min(l-200,Math.max(200,c+h));this.curLeftWidthFraction=p/l,this.changeDetectorRef.markForCheck()},complete:()=>{document.body.style.cursor="default",this.resizingSplitPane=!1,this.appService.setPaneWidthFraction(this.curLeftWidthFraction),this.changeDetectorRef.markForCheck()}})}isPaneSelected(t){return t.id===this.appService.selectedPaneId()}getPaneWidthPct(t){return(t===0?this.curLeftWidthFraction:1-this.curLeftWidthFraction)*100}trackByPaneId(t,n){return n.id}getProcessingTasksForPane(t){return this.processingTasks[t]||[]}getProgressPct(t){let n=this.processingTasks[t];return n?n.filter(o=>!o.processing).length/n.length*100:0}getShowLoading(t){return t.modelGraph==null||this.getProcessingTasksForPane(t.id).some(n=>n.error!=null&&n.error!=="")}getProcessingError(t){return this.getProcessingTasksForPane(t.id).find(n=>n.error!=null&&n.error!=="")?.error??""}get hasSplitPane(){return this.appService.panes().length>1}get resizerLeft(){return`calc(${this.curLeftWidthFraction*100}% - 5px)`}get disableAnimation(){return this.appService.testMode}handleUpdateProcessingProgressRequest(t){let n=t.paneId;if(!this.appService.getPaneById(n))return;let s=this.processingTasks[n].find(a=>a.label===t.label);s!=null&&(s.processing=!1,s.error=t.error,this.changeDetectorRef.detectChanges())}static \u0275fac=function(n){return new(n||i)(M(Fe),M(st),M(Ul))};static \u0275cmp=le({type:i,selectors:[["split-panes-container"]],viewQuery:function(n,r){if(n&1&&(Ie(dge,5),Ie(uge,5)),n&2){let o;be(o=ye())&&(r.panesContainer=o.first),be(o=ye())&&(r.splitPanes=o)}},standalone:!0,features:[ce],decls:4,vars:3,consts:[["panesContainer",""],["splitPane",""],["progressPopup",""],[1,"container"],["class","pane-container",3,"selected","width",4,"ngFor","ngForOf","ngForTrackBy"],["class","resizer split-pane",3,"left","mousedown",4,"ngIf"],[1,"pane-container"],[1,"loading"],["class","pane-title-container",4,"ngIf"],[3,"pane"],[1,"error-msg"],[1,"processing-msg-container"],["color","primary","diameter","18"],[1,"stay-on-page-info"],[1,"progress-bar-wrapper"],[1,"progress-bar-container"],[1,"progress-bar-body"],[1,"icon-container",3,"bubble","hoverDelayMs"],[1,"model-explorer-processing-tasks-container"],[1,"processing-task-container"],["color","primary","diameter","16"],[1,"task-label"],[1,"pane-title-container"],[1,"pane-title"],[1,"buttons-container"],["matTooltip","Swap pane",1,"icon-container","swap",3,"click","mousedown"],["matTooltip","Close pane",1,"icon-container","close",3,"click","mousedown"],[1,"resizer","split-pane",3,"mousedown"],[1,"resizer-line"]],template:function(n,r){n&1&&(v(0,"div",3,0),W(2,Cge,5,8,"div",4)(3,Sge,2,2,"div",5),y()),n&2&&(w(2),N("ngForOf",r.panes())("ngForTrackBy",r.trackByPaneId),w(),N("ngIf",r.hasSplitPane))},dependencies:[$n,Ae,Ci,Mn,it,gt,ns,ca,Jt,Wn,Mj],styles:[`.container[_ngcontent-%COMP%]{flex-grow:1;display:flex;position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%]{height:24px;box-sizing:border-box;background-color:#eee;padding:0 12px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#999;cursor:pointer;flex-shrink:0}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#999;opacity:.8;margin-left:6px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;height:18px;width:18px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] split-pane[_ngcontent-%COMP%]{width:100%;flex-grow:1;display:flex;overflow:hidden}.container[_ngcontent-%COMP%] .pane-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff}.container[_ngcontent-%COMP%] .pane-container.selected[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%]{background-color:#ea8600;color:#fff}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:150;color:#999;background-color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .processing-msg-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .processing-msg-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:8px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:18px;margin-right:-30px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{cursor:pointer;opacity:.8;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#ccc;font-size:18px;width:18px;height:18px;margin-left:6px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%]{height:7px;width:280px;border:1px solid #ccc;border-radius:99px;box-sizing:border-box;overflow:hidden}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%] .progress-bar-body[_ngcontent-%COMP%]{height:100%;transition:width .1s;background-color:#ccc}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .stay-on-page-info[_ngcontent-%COMP%]{font-size:12px;width:100%;display:flex;justify-content:center;margin-top:4px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .error-msg[_ngcontent-%COMP%]{font-size:13px;padding:16px;color:#a00}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]{height:100%;width:10px;top:0;left:50%;display:flex;align-items:center;justify-content:center;position:absolute;padding-left:1px;cursor:ew-resize;z-index:200}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]:hover{background-color:#0000000a}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]:hover .resizer-line[_ngcontent-%COMP%]{border-color:#fcc986}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%] .resizer-line[_ngcontent-%COMP%]{height:100%;width:1px;border-left:1px solid #999} .model-explorer-processing-tasks-container{display:flex;flex-direction:column;padding:12px} .model-explorer-processing-tasks-container .processing-task-container{display:flex;align-items:center;font-size:13px;margin:2px 0} .model-explorer-processing-tasks-container .processing-task-container mat-spinner{margin-right:8px;width:16px} .model-explorer-processing-tasks-container .processing-task-container mat-icon{color:#0a0;font-size:16px;width:16px;height:16px;margin-right:8px} +`],data:{animation:[si("showModelGraph",[fi("void",Qt({opacity:0,transform:"scale(1.03, 1.03)"})),On("void => *",Pn("150ms 100ms ease-out",Qt({opacity:1,transform:"scale(1, 1)"})))])]},changeDetection:0})}return i})();var cge=["panesContainer"],dge=["splitPane"],uge=(i,e)=>e.label;function hge(i,e){i&1&&(v(0,"div",10),S(1),y()),i&2&&(w(),Me(" ",e," "))}function pge(i,e){i&1&&(v(0,"mat-icon"),S(1,"error"),y())}function fge(i,e){i&1&&J(0,"mat-spinner",12)}function mge(i,e){i&1&&J(0,"mat-spinner",20)}function gge(i,e){i&1&&(v(0,"mat-icon"),S(1,"check_circle"),y())}function _ge(i,e){if(i&1&&(v(0,"div",19),W(1,mge,1,0,"mat-spinner",20)(2,gge,2,0,"mat-icon"),v(3,"div",21),S(4),y()()),i&2){let t=e.$implicit;w(),ae(t.processing?1:2),w(3),Me(" ",t.label," ")}}function vge(i,e){if(i&1&&(v(0,"div",18),ln(1,_ge,5,2,"div",19,uge),y()),i&2){let t=I(3).$implicit,n=I();w(),cn(n.getProcessingTasksForPane(t.id))}}function bge(i,e){if(i&1&&(v(0,"div",11),W(1,pge,2,0,"mat-icon")(2,fge,1,0,"mat-spinner",12),S(3," Processing graph... "),y(),v(4,"div",13),S(5," Please remain on this page while the model is being processed "),y(),v(6,"div",14)(7,"div",15),J(8,"div",16),y(),v(9,"div",17)(10,"mat-icon"),S(11,"info"),y()(),W(12,vge,3,0,"ng-template",null,2,kt),y()),i&2){let t=ve(13),n=I(2).$implicit,r=I();w(),ae(r.getProcessingError(n)?1:2),w(7),tn("width",r.getProgressPct(n.id),"%"),w(),N("bubble",t)("hoverDelayMs",100)}}function yge(i,e){if(i&1&&(v(0,"div",7),W(1,hge,2,1,"div",10)(2,bge,14,5),y()),i&2){let t,n=I().$implicit,r=I();N("@hideProcessingPanel",void 0)("@.disabled",r.disableAnimation),w(),ae((t=r.getProcessingError(n))?1:2,t)}}function xge(i,e){if(i&1){let t=ie();v(0,"div",22)(1,"div",23),S(2),y(),v(3,"div",24)(4,"div",25),H("click",function(){V(t);let r=I(2);return z(r.handleClickSwapPane())})("mousedown",function(r){return V(t),z(r.stopPropagation())}),v(5,"mat-icon"),S(6,"swap_horiz"),y()(),v(7,"div",26),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClickClosePane(r))})("mousedown",function(r){return V(t),z(r.stopPropagation())}),v(8,"mat-icon"),S(9,"close"),y()()()()}if(i&2){let t=I().$implicit,n=I();w(2),Me(" ",n.getPaneTitle(t)," ")}}function wge(i,e){if(i&1&&(v(0,"div",6),W(1,yge,3,3,"div",7)(2,xge,10,1,"div",8),J(3,"split-pane",9,1),y()),i&2){let t=e.$implicit,n=e.index,r=I();tn("width",r.getPaneWidthPct(n),"%"),se("selected",r.isPaneSelected(t)),Ze("data-pane-id",t.id),w(),ae(r.getShowLoading(t)?1:-1),w(),N("ngIf",r.hasSplitPane),w(),N("pane",t)}}function Cge(i,e){if(i&1){let t=ie();v(0,"div",27),H("mousedown",function(r){V(t);let o=I(),s=ve(1);return z(o.handleMouseDownResizer(r,s))}),J(1,"div",28),y()}if(i&2){let t=I();tn("left",t.resizerLeft)}}var Sj=(()=>{class i{changeDetectorRef;appService;workerService;panesContainer;splitPanes=new Yi;processingTasks={};resizingSplitPane=!1;curLeftWidthFraction=1;panes;curUpdateProcessingProgressReq;constructor(t,n,r){this.changeDetectorRef=t,this.appService=n,this.workerService=r,this.panes=this.appService.panes,mt(()=>{let o=this.panes();o.length>=1&&(this.curLeftWidthFraction=o[0].widthFraction);for(let s of o)s.modelGraph||(this.processingTasks[s.id]=YF.map(a=>({label:a,processing:!0})));this.changeDetectorRef.detectChanges();for(let s=0;s{switch(o.data.eventType){case Ji.UPDATE_PROCESSING_PROGRESS:this.handleUpdateProcessingProgressRequest(o.data);break;default:break}})}ngAfterViewInit(){this.panesContainer.nativeElement.addEventListener("mousedown",t=>{let n=t.target.closest(".pane-container");if(!n)return;let r=n.dataset.paneId||"";this.appService.selectPane(r)},!0)}handleClickSwapPane(){this.appService.swapPane()}handleClickClosePane(t){this.appService.closePane(t.id)}getPaneTitle(t){let n=t.modelGraph;return n?`${n.collectionLabel} | ${n.id}`:"-"}handleMouseDownResizer(t,n){t.preventDefault(),document.body.style.cursor="ew-resize";let r=yn(document,"mousemove"),o=yn(window,"mouseup"),a=this.appService.panes()[0].widthFraction,l=n.offsetWidth,c=l*a,d=t.clientX;this.resizingSplitPane=!0,this.changeDetectorRef.markForCheck(),qr([r]).pipe(Xe(o)).subscribe({next:([u])=>{let h=u.clientX-d,p=Math.min(l-200,Math.max(200,c+h));this.curLeftWidthFraction=p/l,this.changeDetectorRef.markForCheck()},complete:()=>{document.body.style.cursor="default",this.resizingSplitPane=!1,this.appService.setPaneWidthFraction(this.curLeftWidthFraction),this.changeDetectorRef.markForCheck()}})}isPaneSelected(t){return t.id===this.appService.selectedPaneId()}getPaneWidthPct(t){return(t===0?this.curLeftWidthFraction:1-this.curLeftWidthFraction)*100}trackByPaneId(t,n){return n.id}getProcessingTasksForPane(t){return this.processingTasks[t]||[]}getProgressPct(t){let n=this.processingTasks[t];return n?n.filter(o=>!o.processing).length/n.length*100:0}getShowLoading(t){return t.modelGraph==null||this.getProcessingTasksForPane(t.id).some(n=>n.error!=null&&n.error!=="")}getProcessingError(t){return this.getProcessingTasksForPane(t.id).find(n=>n.error!=null&&n.error!=="")?.error??""}get hasSplitPane(){return this.appService.panes().length>1}get resizerLeft(){return`calc(${this.curLeftWidthFraction*100}% - 5px)`}get disableAnimation(){return this.appService.testMode}handleUpdateProcessingProgressRequest(t){let n=t.paneId;if(!this.appService.getPaneById(n))return;let s=this.processingTasks[n].find(a=>a.label===t.label);s!=null&&(s.processing=!1,s.error=t.error,this.changeDetectorRef.detectChanges())}static \u0275fac=function(n){return new(n||i)(M(Fe),M(st),M(Ul))};static \u0275cmp=le({type:i,selectors:[["split-panes-container"]],viewQuery:function(n,r){if(n&1&&(Ie(cge,5),Ie(dge,5)),n&2){let o;be(o=ye())&&(r.panesContainer=o.first),be(o=ye())&&(r.splitPanes=o)}},standalone:!0,features:[ce],decls:4,vars:3,consts:[["panesContainer",""],["splitPane",""],["progressPopup",""],[1,"container"],["class","pane-container",3,"selected","width",4,"ngFor","ngForOf","ngForTrackBy"],["class","resizer split-pane",3,"left","mousedown",4,"ngIf"],[1,"pane-container"],[1,"loading"],["class","pane-title-container",4,"ngIf"],[3,"pane"],[1,"error-msg"],[1,"processing-msg-container"],["color","primary","diameter","18"],[1,"stay-on-page-info"],[1,"progress-bar-wrapper"],[1,"progress-bar-container"],[1,"progress-bar-body"],[1,"icon-container",3,"bubble","hoverDelayMs"],[1,"model-explorer-processing-tasks-container"],[1,"processing-task-container"],["color","primary","diameter","16"],[1,"task-label"],[1,"pane-title-container"],[1,"pane-title"],[1,"buttons-container"],["matTooltip","Swap pane",1,"icon-container","swap",3,"click","mousedown"],["matTooltip","Close pane",1,"icon-container","close",3,"click","mousedown"],[1,"resizer","split-pane",3,"mousedown"],[1,"resizer-line"]],template:function(n,r){n&1&&(v(0,"div",3,0),W(2,wge,5,8,"div",4)(3,Cge,2,2,"div",5),y()),n&2&&(w(2),N("ngForOf",r.panes())("ngForTrackBy",r.trackByPaneId),w(),N("ngIf",r.hasSplitPane))},dependencies:[$n,Ae,Ci,Mn,it,gt,ns,ca,Jt,Wn,Cj],styles:[`.container[_ngcontent-%COMP%]{flex-grow:1;display:flex;position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%]{height:24px;box-sizing:border-box;background-color:#eee;padding:0 12px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#999;cursor:pointer;flex-shrink:0}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#999;opacity:.8;margin-left:6px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;height:18px;width:18px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] split-pane[_ngcontent-%COMP%]{width:100%;flex-grow:1;display:flex;overflow:hidden}.container[_ngcontent-%COMP%] .pane-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff}.container[_ngcontent-%COMP%] .pane-container.selected[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%]{background-color:#ea8600;color:#fff}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:150;color:#999;background-color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .processing-msg-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .processing-msg-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:8px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:18px;margin-right:-30px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{cursor:pointer;opacity:.8;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#ccc;font-size:18px;width:18px;height:18px;margin-left:6px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%]{height:7px;width:280px;border:1px solid #ccc;border-radius:99px;box-sizing:border-box;overflow:hidden}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%] .progress-bar-body[_ngcontent-%COMP%]{height:100%;transition:width .1s;background-color:#ccc}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .stay-on-page-info[_ngcontent-%COMP%]{font-size:12px;width:100%;display:flex;justify-content:center;margin-top:4px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .error-msg[_ngcontent-%COMP%]{font-size:13px;padding:16px;color:#a00}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]{height:100%;width:10px;top:0;left:50%;display:flex;align-items:center;justify-content:center;position:absolute;padding-left:1px;cursor:ew-resize;z-index:200}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]:hover{background-color:#0000000a}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]:hover .resizer-line[_ngcontent-%COMP%]{border-color:#fcc986}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%] .resizer-line[_ngcontent-%COMP%]{height:100%;width:1px;border-left:1px solid #999} .model-explorer-processing-tasks-container{display:flex;flex-direction:column;padding:12px} .model-explorer-processing-tasks-container .processing-task-container{display:flex;align-items:center;font-size:13px;margin:2px 0} .model-explorer-processing-tasks-container .processing-task-container mat-spinner{margin-right:8px;width:16px} .model-explorer-processing-tasks-container .processing-task-container mat-icon{color:#0a0;font-size:16px;width:16px;height:16px;margin-right:8px} @@ -3964,7 +3964,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],data:{animation:[si("hideProcessingPanel",[On("* => void",Pn("150ms 100ms ease-out",Qt({opacity:0,transform:"scale(0.95, 0.95)"})))])]},changeDetection:0})}return i})();function Mge(i,e){if(i&1){let t=ie();v(0,"button",1),H("click",function(){V(t);let r=I();return z(r.handleClickOpenInNewTab())}),v(1,"mat-icon"),S(2,"open_in_new"),y(),S(3," Open in new tab "),y()}}var HC=(()=>{class i{showOpenInNewTab;isChrome=/Chrome/.test(navigator.userAgent);constructor(){let t=new URLSearchParams(window.location.search);this.showOpenInNewTab=t.get("show_open_in_new_tab")==="1"&&this.isChrome}handleClickOpenInNewTab(){let t=new URL(window.location.href),n=new URLSearchParams(t.search);n.delete("show_open_in_new_tab"),t.search=n.toString(),window.open(t.toString(),"_blank")}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["open-in-new-tab-button"]],standalone:!0,features:[ce],decls:1,vars:1,consts:[["mat-flat-button","","color","primary",1,"btn-open-in-tab"],["mat-flat-button","","color","primary",1,"btn-open-in-tab",3,"click"]],template:function(n,r){n&1&&W(0,Mge,4,0,"button",0),n&2&&ae(r.showOpenInNewTab?0:-1)},dependencies:[Ae,In,zi,it,gt]})}return i})();function Ege(i,e){i&1&&(v(0,"mat-icon",15),S(1," turn_left "),y())}function Ige(i,e){if(i&1){let t=ie();v(0,"div",16),H("click",function(r){V(t);let o=I().$implicit,s=I(2);return z(s.handleClickOpenInSplitPane(r,o))}),v(1,"div",17),J(2,"div",18),y()()}}function Tge(i,e){if(i&1){let t=ie();v(0,"div",7)(1,"div",8)(2,"div",9),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleSelectGraph(r))}),v(3,"div",10),W(4,Ege,2,0,"mat-icon",11),v(5,"div",12),S(6),y()(),v(7,"div",13),S(8),y()(),W(9,Ige,3,0,"div",14),y()()}if(i&2){let t=e.$implicit,n=I(2);Ze("data-id",t.id),w(),tn("padding-left",n.getGraphItemPaddingLeft(t),"px"),se("selected",t.id===n.selectedGraphId()),w(3),N("ngIf",n.showIndentSymbol(t)),w(2),Me(" ",t.id," "),w(2),Me(" ",n.getGraphNonHiddenNodeCountLabel(t.nonHiddenNodeCount)," "),w(),N("ngIf",n.showOpenInSplitPane)}}function Dge(i,e){if(i&1&&(v(0,"div",4)(1,"div",5),S(2),y(),W(3,Tge,10,9,"div",6),y()),i&2){let t=e.$implicit,n=I();w(2),Me(" ",t.label," "),w(),N("ngForOf",t.graphs)("ngForTrackBy",n.trackByGraph)}}var Ij=24,Tj=(()=>{class i{appService;graphCollectionItems=[];onClose=new Pe;hasFilteredOutGraphs=!1;selectedGraphId=Xt(()=>{let t=this.appService.getSelectedPane();return!t||!t.modelGraph?"":t.modelGraph.id});curFilterText="";constructor(t){this.appService=t}getGraphNonHiddenNodeCountLabel(t){return`${t} node${t===1?"":"s"}`}handleSelectGraph(t){this.onClose.next({}),this.resetFilter(),this.appService.selectGraphInCurrentPane(t.graph),this.appService.curInitialUiState.set(void 0),this.appService.selectNode(this.appService.selectedPaneId(),void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setFlattenLayersInCurrentPane(!1)}handleFilterTextChanged(t){this.curFilterText=t.toLowerCase()}handleClickOpenInSplitPane(t,n){t.stopPropagation(),this.onClose.next({}),this.resetFilter(),this.appService.openGraphInSplitPane(n.graph)}showIndentSymbol(t){return!this.hasFilteredOutGraphs&&(t.graph.level??0)>0}getGraphItemPaddingLeft(t){return this.hasFilteredOutGraphs?Ij:Ij+(t.graph.level??0)*12}trackByCollection(t,n){return`${t}`}trackByGraph(t,n){return`${n.graph.collectionLabel}___${n.graph.id}`}get curGraphCollectionItems(){let t=[];this.hasFilteredOutGraphs=!1;for(let{label:n,collection:r,graphs:o}of this.graphCollectionItems){let s={label:n,collection:r,graphs:[]};for(let a of o){if(this.curFilterText!==""&&!a.id.toLowerCase().includes(this.curFilterText)){this.hasFilteredOutGraphs=!0;continue}s.graphs.push(a)}s.graphs.length>0&&t.push(s)}return t}get showOpenInSplitPane(){return this.appService.panes().length===1}resetFilter(){this.curFilterText="",this.hasFilteredOutGraphs=!1}static \u0275fac=function(n){return new(n||i)(M(st))};static \u0275cmp=le({type:i,selectors:[["graph-selector-panel"]],inputs:{graphCollectionItems:"graphCollectionItems"},outputs:{onClose:"onClose"},standalone:!0,features:[ce],decls:4,vars:3,consts:[["input",""],[1,"container"],["placeholder","Filter graphs",3,"input"],["class","collection-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"collection-container"],[1,"collection-label"],["class","graph-item-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"graph-item-container"],[1,"graph-item"],[1,"graph-info-wrapper",3,"click"],[1,"graph-label-wrapper"],["class","indent-symbol",4,"ngIf"],[1,"graph-label"],[1,"node-count-label"],["class","action-button","matTooltip","Open in split pane","matTooltipPosition","right",3,"click",4,"ngIf"],[1,"indent-symbol"],["matTooltip","Open in split pane","matTooltipPosition","right",1,"action-button",3,"click"],[1,"block-container"],[1,"right-block"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",1)(1,"input",2,0),H("input",function(){V(o);let a=ve(2);return z(r.handleFilterTextChanged(a.value))}),y(),W(3,Dge,4,3,"div",3),y()}n&2&&(N("@transformPanel","showing"),w(3),N("ngForOf",r.curGraphCollectionItems)("ngForTrackBy",r.trackByCollection))},dependencies:[Ae,Ci,Mn,da,it,gt,ua,Jt,Wn,_r],styles:[`.container[_ngcontent-%COMP%]{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;transform-origin:top center;font-size:12px;padding:8px 0;border-radius:0 0 4px 4px;max-height:100%;overflow-y:auto}.container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:12px;margin:4px 10px;width:calc(100% - 20px);box-sizing:border-box;pointer-events:all;border:1px solid #ccc;height:20px;border-radius:4px;padding:0 2px}.container[_ngcontent-%COMP%] .collection-container[_ngcontent-%COMP%] .collection-label[_ngcontent-%COMP%]{font-weight:700;padding:4px 12px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:4px 12px 4px 24px;cursor:pointer}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%]:hover{background-color:#0000000a}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item.selected[_ngcontent-%COMP%]{background-color:#c2e7ff}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-info-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-label-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .indent-symbol[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#999;margin-right:4px;transform:rotate(-180deg)}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-label[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .node-count-label[_ngcontent-%COMP%]{color:#999;margin-left:12px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{flex-shrink:0;width:16px;height:16px;display:flex;align-items:center;margin-left:6px;opacity:.8;cursor:pointer}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] .block-container[_ngcontent-%COMP%]{border-radius:3px;border:1px solid #999;height:100%;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;padding:1px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] .block-container[_ngcontent-%COMP%] .right-block[_ngcontent-%COMP%]{height:100%;width:50%;background-color:#999;border-top-right-radius:2px;border-bottom-right-radius:2px} +`],data:{animation:[si("hideProcessingPanel",[On("* => void",Pn("150ms 100ms ease-out",Qt({opacity:0,transform:"scale(0.95, 0.95)"})))])]},changeDetection:0})}return i})();function Sge(i,e){if(i&1){let t=ie();v(0,"button",1),H("click",function(){V(t);let r=I();return z(r.handleClickOpenInNewTab())}),v(1,"mat-icon"),S(2,"open_in_new"),y(),S(3," Open in new tab "),y()}}var HC=(()=>{class i{showOpenInNewTab;isChrome=/Chrome/.test(navigator.userAgent);constructor(){let t=new URLSearchParams(window.location.search);this.showOpenInNewTab=t.get("show_open_in_new_tab")==="1"&&this.isChrome}handleClickOpenInNewTab(){let t=new URL(window.location.href),n=new URLSearchParams(t.search);n.delete("show_open_in_new_tab"),t.search=n.toString(),window.open(t.toString(),"_blank")}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["open-in-new-tab-button"]],standalone:!0,features:[ce],decls:1,vars:1,consts:[["mat-flat-button","","color","primary",1,"btn-open-in-tab"],["mat-flat-button","","color","primary",1,"btn-open-in-tab",3,"click"]],template:function(n,r){n&1&&W(0,Sge,4,0,"button",0),n&2&&ae(r.showOpenInNewTab?0:-1)},dependencies:[Ae,In,zi,it,gt]})}return i})();function Mge(i,e){i&1&&(v(0,"mat-icon",15),S(1," turn_left "),y())}function Ege(i,e){if(i&1){let t=ie();v(0,"div",16),H("click",function(r){V(t);let o=I().$implicit,s=I(2);return z(s.handleClickOpenInSplitPane(r,o))}),v(1,"div",17),J(2,"div",18),y()()}}function Ige(i,e){if(i&1){let t=ie();v(0,"div",7)(1,"div",8)(2,"div",9),H("click",function(){let r=V(t).$implicit,o=I(2);return z(o.handleSelectGraph(r))}),v(3,"div",10),W(4,Mge,2,0,"mat-icon",11),v(5,"div",12),S(6),y()(),v(7,"div",13),S(8),y()(),W(9,Ege,3,0,"div",14),y()()}if(i&2){let t=e.$implicit,n=I(2);Ze("data-id",t.id),w(),tn("padding-left",n.getGraphItemPaddingLeft(t),"px"),se("selected",t.id===n.selectedGraphId()),w(3),N("ngIf",n.showIndentSymbol(t)),w(2),Me(" ",t.id," "),w(2),Me(" ",n.getGraphNonHiddenNodeCountLabel(t.nonHiddenNodeCount)," "),w(),N("ngIf",n.showOpenInSplitPane)}}function Tge(i,e){if(i&1&&(v(0,"div",4)(1,"div",5),S(2),y(),W(3,Ige,10,9,"div",6),y()),i&2){let t=e.$implicit,n=I();w(2),Me(" ",t.label," "),w(),N("ngForOf",t.graphs)("ngForTrackBy",n.trackByGraph)}}var Mj=24,Ej=(()=>{class i{appService;graphCollectionItems=[];onClose=new Pe;hasFilteredOutGraphs=!1;selectedGraphId=Xt(()=>{let t=this.appService.getSelectedPane();return!t||!t.modelGraph?"":t.modelGraph.id});curFilterText="";constructor(t){this.appService=t}getGraphNonHiddenNodeCountLabel(t){return`${t} node${t===1?"":"s"}`}handleSelectGraph(t){this.onClose.next({}),this.resetFilter(),this.appService.selectGraphInCurrentPane(t.graph),this.appService.curInitialUiState.set(void 0),this.appService.selectNode(this.appService.selectedPaneId(),void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setFlattenLayersInCurrentPane(!1)}handleFilterTextChanged(t){this.curFilterText=t.toLowerCase()}handleClickOpenInSplitPane(t,n){t.stopPropagation(),this.onClose.next({}),this.resetFilter(),this.appService.openGraphInSplitPane(n.graph)}showIndentSymbol(t){return!this.hasFilteredOutGraphs&&(t.graph.level??0)>0}getGraphItemPaddingLeft(t){return this.hasFilteredOutGraphs?Mj:Mj+(t.graph.level??0)*12}trackByCollection(t,n){return`${t}`}trackByGraph(t,n){return`${n.graph.collectionLabel}___${n.graph.id}`}get curGraphCollectionItems(){let t=[];this.hasFilteredOutGraphs=!1;for(let{label:n,collection:r,graphs:o}of this.graphCollectionItems){let s={label:n,collection:r,graphs:[]};for(let a of o){if(this.curFilterText!==""&&!a.id.toLowerCase().includes(this.curFilterText)){this.hasFilteredOutGraphs=!0;continue}s.graphs.push(a)}s.graphs.length>0&&t.push(s)}return t}get showOpenInSplitPane(){return this.appService.panes().length===1}resetFilter(){this.curFilterText="",this.hasFilteredOutGraphs=!1}static \u0275fac=function(n){return new(n||i)(M(st))};static \u0275cmp=le({type:i,selectors:[["graph-selector-panel"]],inputs:{graphCollectionItems:"graphCollectionItems"},outputs:{onClose:"onClose"},standalone:!0,features:[ce],decls:4,vars:3,consts:[["input",""],[1,"container"],["placeholder","Filter graphs",3,"input"],["class","collection-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"collection-container"],[1,"collection-label"],["class","graph-item-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"graph-item-container"],[1,"graph-item"],[1,"graph-info-wrapper",3,"click"],[1,"graph-label-wrapper"],["class","indent-symbol",4,"ngIf"],[1,"graph-label"],[1,"node-count-label"],["class","action-button","matTooltip","Open in split pane","matTooltipPosition","right",3,"click",4,"ngIf"],[1,"indent-symbol"],["matTooltip","Open in split pane","matTooltipPosition","right",1,"action-button",3,"click"],[1,"block-container"],[1,"right-block"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",1)(1,"input",2,0),H("input",function(){V(o);let a=ve(2);return z(r.handleFilterTextChanged(a.value))}),y(),W(3,Tge,4,3,"div",3),y()}n&2&&(N("@transformPanel","showing"),w(3),N("ngForOf",r.curGraphCollectionItems)("ngForTrackBy",r.trackByCollection))},dependencies:[Ae,Ci,Mn,da,it,gt,ua,Jt,Wn,_r],styles:[`.container[_ngcontent-%COMP%]{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;transform-origin:top center;font-size:12px;padding:8px 0;border-radius:0 0 4px 4px;max-height:100%;overflow-y:auto}.container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:12px;margin:4px 10px;width:calc(100% - 20px);box-sizing:border-box;pointer-events:all;border:1px solid #ccc;height:20px;border-radius:4px;padding:0 2px}.container[_ngcontent-%COMP%] .collection-container[_ngcontent-%COMP%] .collection-label[_ngcontent-%COMP%]{font-weight:700;padding:4px 12px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:4px 12px 4px 24px;cursor:pointer}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%]:hover{background-color:#0000000a}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item.selected[_ngcontent-%COMP%]{background-color:#c2e7ff}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-info-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-label-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .indent-symbol[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#999;margin-right:4px;transform:rotate(-180deg)}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-label[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .node-count-label[_ngcontent-%COMP%]{color:#999;margin-left:12px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{flex-shrink:0;width:16px;height:16px;display:flex;align-items:center;margin-left:6px;opacity:.8;cursor:pointer}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] .block-container[_ngcontent-%COMP%]{border-radius:3px;border:1px solid #999;height:100%;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;padding:1px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] .block-container[_ngcontent-%COMP%] .right-block[_ngcontent-%COMP%]{height:100%;width:50%;background-color:#999;border-top-right-radius:2px;border-bottom-right-radius:2px} @@ -3982,7 +3982,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],data:{animation:mC},changeDetection:0})}return i})();var Pge=["input"];function Oge(i,e){if(i&1&&(v(0,"div",16),S(1),y()),i&2){let t=I();w(),Me(" ",t.selectedGraphNodeCount," nodes ")}}function Rge(i,e){if(i&1){let t=ie();v(0,"div",17),H("click",function(){V(t);let r=I();return z(r.handleClickExportGraphJsonToResource())}),v(1,"mat-icon"),S(2,"drive_folder_upload"),y()()}}function Age(i,e){if(i&1){let t=ie();v(0,"mat-optgroup",18)(1,"mat-option")(2,"input",19,1),H("click",function(r){return V(t),z(r.stopPropagation())})("keydown.space",function(r){return V(t),z(r.stopPropagation())})("input",function(){V(t);let r=ve(3),o=I();return z(o.handleFilterTextChanged(r.value))}),y()()()}}function Nge(i,e){if(i&1){let t=ie();v(0,"div",26),H("click",function(r){V(t);let o=I().$implicit,s=I(2);return z(s.handleClickOpenInSplitPane(r,o))}),v(1,"div",27),J(2,"div",28),y()()}}function kge(i,e){if(i&1&&(v(0,"mat-option",22)(1,"div",23)(2,"div",24)(3,"div",7),S(4),y(),v(5,"div",16),S(6),y()(),W(7,Nge,3,0,"div",25),y()()),i&2){let t=e.$implicit,n=I(2);se("selected",t.graph===n.selectedGraph.value),N("value",t.graph),Ze("data-id",t.id),w(4),nt(t.id),w(2),Me(" ",t.nonHiddenNodeCount," nodes "),w(),N("ngIf",n.showOpenInSplitPane)}}function Lge(i,e){if(i&1&&(v(0,"mat-optgroup",20),W(1,kge,8,7,"mat-option",21),y()),i&2){let t=e.$implicit;N("label",t.label),w(),N("ngForOf",t.graphs)}}var Fge=new OffscreenCanvas(500,300),Dj={},Pj=(()=>{class i{appService;overlay;viewContainerRef;mySelector;filterInput;selectedGraph=new gr(void 0);selectedGraphNodeCount=0;selectedGraphCollectionLabel="";selectedCollection;maxGraphItemIdWidth=0;graphCollectionItems=Xt(()=>{let t=this.appService.config();if(!t)return[];let n=this.appService.curGraphCollections();this.nodeLabelsToHide=new Set((t.nodeLabelsToHide||[]).map(s=>s.toLowerCase()));let r=[],o=this.curFilterText().toLowerCase();for(let s of n){let a={label:s.label,collection:s,graphs:[]};for(let l of s.graphs){if(o!==""&&!l.id.toLowerCase().includes(o))continue;let c=l.nodes.filter(u=>!this.nodeLabelsToHide.has(u.label.toLowerCase())).length,d=this.getLabelWidth(` ${l.id} ${c} nodes`)+30;a.graphs.push({id:l.id,graph:l,nonHiddenNodeCount:c,width:d}),this.maxGraphItemIdWidth=Math.max(d+30,this.maxGraphItemIdWidth)}if(a.graphs.length>0){r.push(a);let l=this.getLabelWidth(s.label,12,!0)+30;this.maxGraphItemIdWidth=Math.max(l,this.maxGraphItemIdWidth)}}return r});graphsCount=Xt(()=>{let t=0,n=this.appService.curGraphCollections();for(let r of n)t+=r.graphs.length;return t});nodeLabelsToHide=new Set;curFilterText=yt("");portal=null;selectedGraphId=Xt(()=>{let t=this.appService.getSelectedPane();return!t||!t.modelGraph?"":t.modelGraph.id});constructor(t,n,r){this.appService=t,this.overlay=n,this.viewContainerRef=r,mt(()=>{let o=this.selectedGraphId();o&&this.updateSelectedGraphInfo(o)})}handleFilterTextChanged(t){this.curFilterText.set(t)}handleClickOpenGraphDropdown(t){let n=this.createOverlay(t),r=n.attach(this.portal);r.instance.graphCollectionItems=this.graphCollectionItems(),r.instance.onClose.subscribe(()=>{n.dispose()})}handleGraphSelectorOpenedChanged(t){t||(this.filterInput.nativeElement.value="",this.curFilterText.set(""))}handleGraphSelected(){this.selectedGraph.value&&(this.updateSelectedGraphInfo(this.selectedGraph.value.id),this.appService.selectGraphInCurrentPane(this.selectedGraph.value),this.appService.curInitialUiState.set(void 0),this.appService.selectNode(this.appService.selectedPaneId(),void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setFlattenLayersInCurrentPane(!1))}handleClickOpenInSplitPane(t,n){t.stopPropagation(),this.mySelector.close(),this.appService.openGraphInSplitPane(n.graph)}handleClickDownloadGraphJson(){if(this.selectedCollection==null)return;let t=document.createElement("a");t.download=`${this.selectedGraphCollectionLabel}.json`;let n=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify(this.selectedCollection,null,2))}`;aa.setHref(t,n),t.click()}handleClickExportGraphJsonToResource(){!this.selectedCollection!=null&&Qb(`${this.selectedGraphCollectionLabel}.json`,this.selectedCollection)}getGraphLabel(t){return`${t.id} (${t.nodes.length} nodes)`}get graphSelectorDropdownWidth(){return this.maxGraphItemIdWidth}get showOpenInSplitPane(){return this.appService.panes().length===1}get enableExportToResource(){return this.appService.config()?.enableExportToResource===!0}getLabelWidth(t,n=12,r=!1){let o=t,s=Dj[o];if(s==null){let a=Fge.getContext("2d");a.font=`${n}px "Google Sans Text", Arial, Helvetica, sans-serif`,r&&(a.font=`bold ${a.font}`);let c=a.measureText(t).width;Dj[o]=c,s=c}return s}updateSelectedGraphInfo(t){let n=!1;for(let r of this.graphCollectionItems()){for(let o of r.graphs)if(o.graph.id===t){this.selectedGraphNodeCount=o.nonHiddenNodeCount,this.selectedGraphCollectionLabel=r.label,this.selectedCollection=r.collection,this.selectedGraph.setValue(o.graph),n=!0;break}if(n)break}}createOverlay(t){let n=new ui({positionStrategy:this.overlay.position().flexibleConnectedTo(t).withPositions([{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}]),maxHeight:"calc(100% - 70px)",hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),panelClass:"graph-selector-panel"}),r=this.overlay.create(n);return this.portal=new Di(Tj,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}static \u0275fac=function(n){return new(n||i)(M(st),M(Ht),M(Yt))};static \u0275cmp=le({type:i,selectors:[["graph-selector"]],viewQuery:function(n,r){if(n&1&&(Ie(FC,5),Ie(Pge,5)),n&2){let o;be(o=ye())&&(r.mySelector=o.first),be(o=ye())&&(r.filterInput=o.first)}},standalone:!0,features:[ce],decls:22,vars:7,consts:[["selector",""],["input",""],[1,"container"],[1,"collection-label"],[1,"graph-selector-label",3,"click"],[1,"selector-label-container"],[1,"selector-label-content"],[1,"option-label"],["class","node-count-label",4,"ngIf"],[1,"triangle"],["matTooltip","Download processed graphs json",1,"mat-icon-container",3,"click"],["matTooltip","Export to resource",1,"mat-icon-container"],[1,"select-form"],["color","primary","panelClass","graph-selector-panel",3,"selectionChange","openedChange","formControl"],["class","graph-search-optgroup",4,"ngIf"],[3,"label",4,"ngFor","ngForOf"],[1,"node-count-label"],["matTooltip","Export to resource",1,"mat-icon-container",3,"click"],[1,"graph-search-optgroup"],["placeholder","Filter graphs",3,"click","keydown.space","input"],[3,"label"],[3,"selected","value",4,"ngFor","ngForOf"],[3,"value"],[1,"option-wrapper"],[1,"option-container"],["class","action-button","matTooltip","Open in split pane","matTooltipPosition","right",3,"click",4,"ngIf"],["matTooltip","Open in split pane","matTooltipPosition","right",1,"action-button",3,"click"],[1,"block-container"],[1,"right-block"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",2)(1,"div",3),S(2),y(),v(3,"div",4,0),H("click",function(){V(o);let a=ve(4);return z(r.handleClickOpenGraphDropdown(a))}),v(5,"div",5)(6,"div",6)(7,"div",7),S(8),y(),W(9,Oge,2,1,"div",8),y(),v(10,"div",9),S(11,"\u25BC"),y()()(),v(12,"div",10),H("click",function(){return V(o),z(r.handleClickDownloadGraphJson())}),v(13,"mat-icon"),S(14,"download"),y()(),W(15,Rge,3,0,"div",11),v(16,"mat-form-field",12)(17,"mat-label"),S(18,"Select an option"),y(),v(19,"mat-select",13),H("selectionChange",function(){return V(o),z(r.handleGraphSelected())})("openedChange",function(a){return V(o),z(r.handleGraphSelectorOpenedChanged(a))}),W(20,Age,4,0,"mat-optgroup",14)(21,Lge,2,2,"mat-optgroup",15),y()()()}n&2&&(w(2),Me(" ",r.selectedGraphCollectionLabel," "),w(6),nt((r.selectedGraph.value==null?null:r.selectedGraph.value.id)||"-"),w(),N("ngIf",r.selectedGraph.value),w(6),ae(r.enableExportToResource?15:-1),w(4),N("formControl",r.selectedGraph),w(),N("ngIf",r.graphsCount()>1),w(),N("ngForOf",r.graphCollectionItems()))},dependencies:[Ae,Ci,Mn,da,sj,LC,it,gt,ua,FC,ql,U3,Jt,Wn,_r,zo,ho],styles:[`.container[_ngcontent-%COMP%]{font-size:12px;display:flex;align-items:center;line-height:14px;position:relative}.container[_ngcontent-%COMP%] .collection-label[_ngcontent-%COMP%]{font-weight:700;margin-right:6px}.container[_ngcontent-%COMP%] .select-form[_ngcontent-%COMP%]{height:0;max-height:0;position:absolute;top:26px;right:28px}.container[_ngcontent-%COMP%] .select-form[_ngcontent-%COMP%] >*{height:0}.container[_ngcontent-%COMP%] .selector-label-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:2px}.container[_ngcontent-%COMP%] .node-count-label[_ngcontent-%COMP%]{color:#999;margin-left:12px}.container[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{font-size:10px;margin-left:8px}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%]{font-size:12px;border:1px solid #aaa;border-radius:3px;padding:2px 4px;cursor:pointer;flex-grow:1;height:24px;display:flex;box-sizing:border-box}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%] .selector-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%]:hover{border-color:#ea8600}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-left:4px;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:1} .graph-selector-panel{background-color:#fff} .graph-selector-panel mat-option{height:24px;font-size:12px;min-height:unset;padding:1px 0;padding-left:20px!important;background-color:none!important} .graph-selector-panel mat-option .option-wrapper{display:flex;align-items:center} .graph-selector-panel mat-option .option-container{display:flex;align-items:center;justify-content:space-between;letter-spacing:normal;font-family:Google Sans Text,Arial,Helvetica,sans-serif;flex-grow:1} .graph-selector-panel mat-option .option-container .option-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#000!important} .graph-selector-panel mat-option .option-container .node-count-label{color:#999} .graph-selector-panel mat-option .action-button{flex-shrink:0;width:16px;height:16px;display:flex;align-items:center;margin-left:4px;opacity:.8;cursor:pointer} .graph-selector-panel mat-option .action-button:hover{opacity:1} .graph-selector-panel mat-option .action-button .block-container{border-radius:3px;border:1px solid #999;height:100%;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;padding:1px} .graph-selector-panel mat-option .action-button .block-container .right-block{height:100%;width:50%;background-color:#999;border-top-right-radius:2px;border-bottom-right-radius:2px} .graph-selector-panel mat-option span{white-space:break-spaces!important;word-break:break-all;line-height:14px!important;width:100%;box-sizing:border-box;padding-right:10px} .graph-selector-panel mat-option mat-pseudo-checkbox{display:none} .graph-selector-panel mat-option.selected{background-color:#fff1de!important} .graph-selector-panel mat-optgroup span{min-height:unset;font-size:12px;font-weight:700;padding-left:8px} .graph-selector-panel mat-optgroup.graph-search-optgroup{pointer-events:none} .graph-selector-panel mat-optgroup.graph-search-optgroup span{padding:0} .graph-selector-panel mat-optgroup.graph-search-optgroup mat-option{padding-left:16px!important;padding-right:12px!important;height:28px} .graph-selector-panel mat-optgroup.graph-search-optgroup input{font-size:12px;width:100%;box-sizing:border-box;pointer-events:all;border:1px solid #ccc;height:20px;border-radius:4px;padding:0 2px} +`],data:{animation:gC},changeDetection:0})}return i})();var Dge=["input"];function Pge(i,e){if(i&1&&(v(0,"div",16),S(1),y()),i&2){let t=I();w(),Me(" ",t.selectedGraphNodeCount," nodes ")}}function Oge(i,e){if(i&1){let t=ie();v(0,"div",17),H("click",function(){V(t);let r=I();return z(r.handleClickExportGraphJsonToResource())}),v(1,"mat-icon"),S(2,"drive_folder_upload"),y()()}}function Rge(i,e){if(i&1){let t=ie();v(0,"mat-optgroup",18)(1,"mat-option")(2,"input",19,1),H("click",function(r){return V(t),z(r.stopPropagation())})("keydown.space",function(r){return V(t),z(r.stopPropagation())})("input",function(){V(t);let r=ve(3),o=I();return z(o.handleFilterTextChanged(r.value))}),y()()()}}function Age(i,e){if(i&1){let t=ie();v(0,"div",26),H("click",function(r){V(t);let o=I().$implicit,s=I(2);return z(s.handleClickOpenInSplitPane(r,o))}),v(1,"div",27),J(2,"div",28),y()()}}function Nge(i,e){if(i&1&&(v(0,"mat-option",22)(1,"div",23)(2,"div",24)(3,"div",7),S(4),y(),v(5,"div",16),S(6),y()(),W(7,Age,3,0,"div",25),y()()),i&2){let t=e.$implicit,n=I(2);se("selected",t.graph===n.selectedGraph.value),N("value",t.graph),Ze("data-id",t.id),w(4),nt(t.id),w(2),Me(" ",t.nonHiddenNodeCount," nodes "),w(),N("ngIf",n.showOpenInSplitPane)}}function kge(i,e){if(i&1&&(v(0,"mat-optgroup",20),W(1,Nge,8,7,"mat-option",21),y()),i&2){let t=e.$implicit;N("label",t.label),w(),N("ngForOf",t.graphs)}}var Lge=new OffscreenCanvas(500,300),Ij={},Tj=(()=>{class i{appService;overlay;viewContainerRef;mySelector;filterInput;selectedGraph=new gr(void 0);selectedGraphNodeCount=0;selectedGraphCollectionLabel="";selectedCollection;maxGraphItemIdWidth=0;graphCollectionItems=Xt(()=>{let t=this.appService.config();if(!t)return[];let n=this.appService.curGraphCollections();this.nodeLabelsToHide=new Set((t.nodeLabelsToHide||[]).map(s=>s.toLowerCase()));let r=[],o=this.curFilterText().toLowerCase();for(let s of n){let a={label:s.label,collection:s,graphs:[]};for(let l of s.graphs){if(o!==""&&!l.id.toLowerCase().includes(o))continue;let c=l.nodes.filter(u=>!this.nodeLabelsToHide.has(u.label.toLowerCase())).length,d=this.getLabelWidth(` ${l.id} ${c} nodes`)+30;a.graphs.push({id:l.id,graph:l,nonHiddenNodeCount:c,width:d}),this.maxGraphItemIdWidth=Math.max(d+30,this.maxGraphItemIdWidth)}if(a.graphs.length>0){r.push(a);let l=this.getLabelWidth(s.label,12,!0)+30;this.maxGraphItemIdWidth=Math.max(l,this.maxGraphItemIdWidth)}}return r});graphsCount=Xt(()=>{let t=0,n=this.appService.curGraphCollections();for(let r of n)t+=r.graphs.length;return t});nodeLabelsToHide=new Set;curFilterText=xt("");portal=null;selectedGraphId=Xt(()=>{let t=this.appService.getSelectedPane();return!t||!t.modelGraph?"":t.modelGraph.id});constructor(t,n,r){this.appService=t,this.overlay=n,this.viewContainerRef=r,mt(()=>{let o=this.selectedGraphId();o&&this.updateSelectedGraphInfo(o)})}handleFilterTextChanged(t){this.curFilterText.set(t)}handleClickOpenGraphDropdown(t){let n=this.createOverlay(t),r=n.attach(this.portal);r.instance.graphCollectionItems=this.graphCollectionItems(),r.instance.onClose.subscribe(()=>{n.dispose()})}handleGraphSelectorOpenedChanged(t){t||(this.filterInput.nativeElement.value="",this.curFilterText.set(""))}handleGraphSelected(){this.selectedGraph.value&&(this.updateSelectedGraphInfo(this.selectedGraph.value.id),this.appService.selectGraphInCurrentPane(this.selectedGraph.value),this.appService.curInitialUiState.set(void 0),this.appService.selectNode(this.appService.selectedPaneId(),void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setFlattenLayersInCurrentPane(!1))}handleClickOpenInSplitPane(t,n){t.stopPropagation(),this.mySelector.close(),this.appService.openGraphInSplitPane(n.graph)}handleClickDownloadGraphJson(){if(this.selectedCollection==null)return;let t=document.createElement("a");t.download=`${this.selectedGraphCollectionLabel}.json`;let n=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify(this.selectedCollection,null,2))}`;aa.setHref(t,n),t.click()}handleClickExportGraphJsonToResource(){!this.selectedCollection!=null&&Kb(`${this.selectedGraphCollectionLabel}.json`,this.selectedCollection)}getGraphLabel(t){return`${t.id} (${t.nodes.length} nodes)`}get graphSelectorDropdownWidth(){return this.maxGraphItemIdWidth}get showOpenInSplitPane(){return this.appService.panes().length===1}get enableExportToResource(){return this.appService.config()?.enableExportToResource===!0}getLabelWidth(t,n=12,r=!1){let o=t,s=Ij[o];if(s==null){let a=Lge.getContext("2d");a.font=`${n}px "Google Sans Text", Arial, Helvetica, sans-serif`,r&&(a.font=`bold ${a.font}`);let c=a.measureText(t).width;Ij[o]=c,s=c}return s}updateSelectedGraphInfo(t){let n=!1;for(let r of this.graphCollectionItems()){for(let o of r.graphs)if(o.graph.id===t){this.selectedGraphNodeCount=o.nonHiddenNodeCount,this.selectedGraphCollectionLabel=r.label,this.selectedCollection=r.collection,this.selectedGraph.setValue(o.graph),n=!0;break}if(n)break}}createOverlay(t){let n=new ui({positionStrategy:this.overlay.position().flexibleConnectedTo(t).withPositions([{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}]),maxHeight:"calc(100% - 70px)",hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),panelClass:"graph-selector-panel"}),r=this.overlay.create(n);return this.portal=new Di(Ej,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}static \u0275fac=function(n){return new(n||i)(M(st),M(Ht),M(Yt))};static \u0275cmp=le({type:i,selectors:[["graph-selector"]],viewQuery:function(n,r){if(n&1&&(Ie(FC,5),Ie(Dge,5)),n&2){let o;be(o=ye())&&(r.mySelector=o.first),be(o=ye())&&(r.filterInput=o.first)}},standalone:!0,features:[ce],decls:22,vars:7,consts:[["selector",""],["input",""],[1,"container"],[1,"collection-label"],[1,"graph-selector-label",3,"click"],[1,"selector-label-container"],[1,"selector-label-content"],[1,"option-label"],["class","node-count-label",4,"ngIf"],[1,"triangle"],["matTooltip","Download processed graphs json",1,"mat-icon-container",3,"click"],["matTooltip","Export to resource",1,"mat-icon-container"],[1,"select-form"],["color","primary","panelClass","graph-selector-panel",3,"selectionChange","openedChange","formControl"],["class","graph-search-optgroup",4,"ngIf"],[3,"label",4,"ngFor","ngForOf"],[1,"node-count-label"],["matTooltip","Export to resource",1,"mat-icon-container",3,"click"],[1,"graph-search-optgroup"],["placeholder","Filter graphs",3,"click","keydown.space","input"],[3,"label"],[3,"selected","value",4,"ngFor","ngForOf"],[3,"value"],[1,"option-wrapper"],[1,"option-container"],["class","action-button","matTooltip","Open in split pane","matTooltipPosition","right",3,"click",4,"ngIf"],["matTooltip","Open in split pane","matTooltipPosition","right",1,"action-button",3,"click"],[1,"block-container"],[1,"right-block"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",2)(1,"div",3),S(2),y(),v(3,"div",4,0),H("click",function(){V(o);let a=ve(4);return z(r.handleClickOpenGraphDropdown(a))}),v(5,"div",5)(6,"div",6)(7,"div",7),S(8),y(),W(9,Pge,2,1,"div",8),y(),v(10,"div",9),S(11,"\u25BC"),y()()(),v(12,"div",10),H("click",function(){return V(o),z(r.handleClickDownloadGraphJson())}),v(13,"mat-icon"),S(14,"download"),y()(),W(15,Oge,3,0,"div",11),v(16,"mat-form-field",12)(17,"mat-label"),S(18,"Select an option"),y(),v(19,"mat-select",13),H("selectionChange",function(){return V(o),z(r.handleGraphSelected())})("openedChange",function(a){return V(o),z(r.handleGraphSelectorOpenedChanged(a))}),W(20,Rge,4,0,"mat-optgroup",14)(21,kge,2,2,"mat-optgroup",15),y()()()}n&2&&(w(2),Me(" ",r.selectedGraphCollectionLabel," "),w(6),nt((r.selectedGraph.value==null?null:r.selectedGraph.value.id)||"-"),w(),N("ngIf",r.selectedGraph.value),w(6),ae(r.enableExportToResource?15:-1),w(4),N("formControl",r.selectedGraph),w(),N("ngIf",r.graphsCount()>1),w(),N("ngForOf",r.graphCollectionItems()))},dependencies:[Ae,Ci,Mn,da,rj,LC,it,gt,ua,FC,ql,z3,Jt,Wn,_r,zo,ho],styles:[`.container[_ngcontent-%COMP%]{font-size:12px;display:flex;align-items:center;line-height:14px;position:relative}.container[_ngcontent-%COMP%] .collection-label[_ngcontent-%COMP%]{font-weight:700;margin-right:6px}.container[_ngcontent-%COMP%] .select-form[_ngcontent-%COMP%]{height:0;max-height:0;position:absolute;top:26px;right:28px}.container[_ngcontent-%COMP%] .select-form[_ngcontent-%COMP%] >*{height:0}.container[_ngcontent-%COMP%] .selector-label-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:2px}.container[_ngcontent-%COMP%] .node-count-label[_ngcontent-%COMP%]{color:#999;margin-left:12px}.container[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{font-size:10px;margin-left:8px}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%]{font-size:12px;border:1px solid #aaa;border-radius:3px;padding:2px 4px;cursor:pointer;flex-grow:1;height:24px;display:flex;box-sizing:border-box}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%] .selector-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%]:hover{border-color:#ea8600}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-left:4px;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:1} .graph-selector-panel{background-color:#fff} .graph-selector-panel mat-option{height:24px;font-size:12px;min-height:unset;padding:1px 0;padding-left:20px!important;background-color:none!important} .graph-selector-panel mat-option .option-wrapper{display:flex;align-items:center} .graph-selector-panel mat-option .option-container{display:flex;align-items:center;justify-content:space-between;letter-spacing:normal;font-family:Google Sans Text,Arial,Helvetica,sans-serif;flex-grow:1} .graph-selector-panel mat-option .option-container .option-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#000!important} .graph-selector-panel mat-option .option-container .node-count-label{color:#999} .graph-selector-panel mat-option .action-button{flex-shrink:0;width:16px;height:16px;display:flex;align-items:center;margin-left:4px;opacity:.8;cursor:pointer} .graph-selector-panel mat-option .action-button:hover{opacity:1} .graph-selector-panel mat-option .action-button .block-container{border-radius:3px;border:1px solid #999;height:100%;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;padding:1px} .graph-selector-panel mat-option .action-button .block-container .right-block{height:100%;width:50%;background-color:#999;border-top-right-radius:2px;border-bottom-right-radius:2px} .graph-selector-panel mat-option span{white-space:break-spaces!important;word-break:break-all;line-height:14px!important;width:100%;box-sizing:border-box;padding-right:10px} .graph-selector-panel mat-option mat-pseudo-checkbox{display:none} .graph-selector-panel mat-option.selected{background-color:#fff1de!important} .graph-selector-panel mat-optgroup span{min-height:unset;font-size:12px;font-weight:700;padding-left:8px} .graph-selector-panel mat-optgroup.graph-search-optgroup{pointer-events:none} .graph-selector-panel mat-optgroup.graph-search-optgroup span{padding:0} .graph-selector-panel mat-optgroup.graph-search-optgroup mat-option{padding-left:16px!important;padding-right:12px!important;height:28px} .graph-selector-panel mat-optgroup.graph-search-optgroup input{font-size:12px;width:100%;box-sizing:border-box;pointer-events:all;border:1px solid #ccc;height:20px;border-radius:4px;padding:0 2px} @@ -4000,7 +4000,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],changeDetection:0})}return i})();function Bge(i,e){if(i&1&&(v(0,"div",2),S(1," Model Explorer "),v(2,"span",3),S(3),y(),S(4," is available. You are running "),v(5,"span",3),S(6),y(),S(7,". "),J(8,"br")(9,"br"),S(10," Run the following command in your console to upgrade: "),v(11,"div",4),S(12," pip install -U ai-edge-model-explorer "),y()()),i&2){let t=I(2);w(3),Me("v",t.info().version,""),w(3),Me("v",t.info().runningVersion,"")}}function Vge(i,e){if(i&1&&(v(0,"div",1)(1,"mat-icon"),S(2,"upgrade"),y(),S(3," New version available "),y(),W(4,Bge,13,2,"ng-template",null,0,kt)),i&2){let t=ve(5);N("bubble",t)("hoverDelayMs",100)}}var zge="/api/v1/check_new_version",kO=(()=>{class i{info=yt({version:"",runningVersion:""});constructor(){this.checkNewVersion()}checkNewVersion(){return At(this,null,function*(){try{let t=yield fetch(zge);if(t.ok){let n=yield t.json();this.info.set(n)}}catch{}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),GC=(()=>{class i{newVersionService;info;constructor(t){this.newVersionService=t,this.info=this.newVersionService.info}static \u0275fac=function(n){return new(n||i)(M(kO))};static \u0275cmp=le({type:i,selectors:[["new-version-chip"]],standalone:!0,features:[ce],decls:1,vars:1,consts:[["upgrade",""],[1,"container",3,"bubble","hoverDelayMs"],[1,"model-explorer-upgrade-popup"],[1,"bold"],[1,"code"]],template:function(n,r){n&1&&W(0,Vge,6,2),n&2&&ae(r.info().version!==""?0:-1)},dependencies:[$n,Ae,it,gt],styles:[".container[_ngcontent-%COMP%]{font-size:12px;display:flex;align-items:center;color:#ab6c17;background-color:#ffefd9;line-height:18px;border-radius:99px;font-weight:500;padding:2px 10px 2px 4px;cursor:pointer}.container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px} .model-explorer-upgrade-popup{padding:8px;font-size:12px;background-color:#fff;line-height:normal} .model-explorer-upgrade-popup .bold{font-weight:500} .model-explorer-upgrade-popup .code{background-color:#f1f1f1;font-family:monospace;margin-top:8px;padding:4px;font-size:11px}"]})}return i})();function Hge(i,e){i&1&&J(0,"mat-spinner",5)}function Gge(i,e){i&1&&(v(0,"mat-icon"),S(1,"add_circle_outline"),y())}function jge(i,e){i&1&&(v(0,"div",7),S(1," Add custom data and styles to the nodes in the current model "),y())}function Wge(i,e){if(i&1){let t=ie();v(0,"div",8)(1,"div",9)(2,"div"),S(3,"Load json data file"),y(),v(4,"a",10),S(5," Guide "),y()(),v(6,"div",11)(7,"div",12),S(8,"From computer"),y(),v(9,"button",13),H("click",function(){V(t);let r=ve(12);return z(r.click())}),S(10," Upload "),y()(),v(11,"input",14,2),H("change",function(){V(t);let r=ve(12),o=I();return z(o.handleClickUpload(r))}),y()()}}var Oj=(()=>{class i{appService;changeDetectorRef;localStorageService;nodeDataProviderExtensionService;dropdown;extensions=[];loadingExtensions=!0;helpPopupSize={minWidth:0,minHeight:0};dropdownSize={minWidth:0,minHeight:0,maxHeight:500};remoteSourceLoading;constructor(t,n,r,o){this.appService=t,this.changeDetectorRef=n,this.localStorageService=r,this.nodeDataProviderExtensionService=o,this.remoteSourceLoading=this.nodeDataProviderExtensionService.remoteSourceLoading}handleClickUpload(t){let n=t.files;if(!n)return;let r=this.appService.getModelGraphFromSelectedPane();if(r){for(let o of Array.from(n)){let s=new FileReader;s.onload=a=>{let l=Lr();try{let c=this.getNodeDataProviderData(a.target?.result,r);this.nodeDataProviderExtensionService.addRun(l,o.name,"",r,c)}catch(c){this.nodeDataProviderExtensionService.addRun(l,o.name,"",r),this.nodeDataProviderExtensionService.updateRunResults(l,{[r.id]:{results:{}}},r,`Failed to process JSON file. ${c}`)}finally{this.dropdown?.closeDialog()}},s.readAsText(o)}t.value=""}}getNodeDataProviderData(t,n){let r=JSON.parse(t),o={};return r.results!=null&&r.results.results==null?n&&(o[n.id]=r):o=r,o}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe),M(Vo),M(Cr))};static \u0275cmp=le({type:i,selectors:[["node-data-provider-dropdown"]],viewQuery:function(n,r){if(n&1&&Ie(wc,5),n&2){let o;be(o=ye())&&(r.dropdown=o.first)}},standalone:!0,features:[ce],decls:10,vars:6,consts:[["help",""],["dropdown",""],["input",""],[1,"container",3,"bubble","overlaySize","hoverDelayMs"],[1,"icon-container",3,"bubbleClick","overlaySize"],["color","primary","diameter","18"],[1,"label"],[1,"model-explorer-help-popup"],[1,"model-explorer-node-data-provider-dropdown"],[1,"section-label","upload"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#custom-node-data","target","_blank"],[1,"upload-container"],[1,"description"],["mat-flat-button","","color","primary",1,"upload-json-file-button","upload",3,"click"],["type","file","multiple","","accept",".json",1,"upload-per-node-data-input",3,"change"]],template:function(n,r){if(n&1&&(v(0,"div",3)(1,"div",4),W(2,Hge,1,0,"mat-spinner",5)(3,Gge,2,0,"mat-icon"),v(4,"span",6),S(5,"Add per-node data"),y()()(),W(6,jge,2,0,"ng-template",null,0,kt)(8,Wge,13,0,"ng-template",null,1,kt)),n&2){let o=ve(7),s=ve(9);N("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(),N("bubbleClick",s)("overlaySize",r.dropdownSize),w(),ae(r.remoteSourceLoading()?2:3)}},dependencies:[$n,wc,Ae,In,zi,it,gt,ns,ca,Jt],styles:[`.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#666;padding-bottom:12px;margin-bottom:-12px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:13px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{color:#444} .model-explorer-node-data-provider-dropdown{font-size:12px;background-color:#fff;display:flex;flex-direction:column;padding-bottom:8px} .model-explorer-node-data-provider-dropdown .section-label{padding:8px 12px;font-size:11px;background:#f1f1f1;font-weight:500;text-transform:uppercase} .model-explorer-node-data-provider-dropdown .section-label .address-container{text-transform:none;font-weight:400;letter-spacing:normal;color:#777;line-height:12px;padding-bottom:5px;display:flex;align-items:flex-start;margin-top:-4px;margin-left:-2px} .model-explorer-node-data-provider-dropdown .section-label .address-container .address-label{overflow:hidden;line-break:anywhere;line-height:12px;flex-grow:1;padding-top:3px} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container{display:flex;align-items:center;justify-content:center;margin-right:4px;pointer-events:all;cursor:pointer;opacity:.7} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container:hover{opacity:1} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container mat-icon{font-size:16px;width:16px;height:16px} .model-explorer-node-data-provider-dropdown .section-label.upload{display:flex;align-items:center;justify-content:space-between;min-width:180px} .model-explorer-node-data-provider-dropdown .section-label.upload a{font-size:11px;letter-spacing:normal;text-transform:none;pointer-events:all} .model-explorer-node-data-provider-dropdown .description{font-size:12px;color:#777;line-height:18px;letter-spacing:normal} .model-explorer-node-data-provider-dropdown .upload-container{display:flex;flex-direction:column;align-items:flex-start;padding:0 16px;margin-top:12px} .model-explorer-node-data-provider-dropdown .upload-json-file-button{margin:4px 0;width:90px;height:30px;font-size:12px!important;letter-spacing:normal!important} .model-explorer-node-data-provider-dropdown .upload-json-file-button.upload{margin-top:2px} .model-explorer-node-data-provider-dropdown .upload-json-file-button .mat-mdc-button-touch-target{display:none} .model-explorer-node-data-provider-dropdown .or-divider{height:1px;border-top:1px solid #eee;position:relative;margin-top:12px} .model-explorer-node-data-provider-dropdown .or-divider .or-label{font-size:10px;top:-9px;color:#aaa;position:absolute;padding:2px;background-color:#fff;display:flex;align-items:center;justify-content:center;width:16px;left:calc(50% - 8px)} .model-explorer-node-data-provider-dropdown .upload-per-node-data-input{display:none} .model-explorer-node-data-provider-dropdown .no-extension, .model-explorer-node-data-provider-dropdown .loading-extension{padding:12px 0 4px 16px;color:#999;font-size:13px;letter-spacing:normal} +`],changeDetection:0})}return i})();function Fge(i,e){if(i&1&&(v(0,"div",2),S(1," Model Explorer "),v(2,"span",3),S(3),y(),S(4," is available. You are running "),v(5,"span",3),S(6),y(),S(7,". "),J(8,"br")(9,"br"),S(10," Run the following command in your console to upgrade: "),v(11,"div",4),S(12," pip install -U ai-edge-model-explorer "),y()()),i&2){let t=I(2);w(3),Me("v",t.info().version,""),w(3),Me("v",t.info().runningVersion,"")}}function Bge(i,e){if(i&1&&(v(0,"div",1)(1,"mat-icon"),S(2,"upgrade"),y(),S(3," New version available "),y(),W(4,Fge,13,2,"ng-template",null,0,kt)),i&2){let t=ve(5);N("bubble",t)("hoverDelayMs",100)}}var Vge="/api/v1/check_new_version",NO=(()=>{class i{info=xt({version:"",runningVersion:""});constructor(){this.checkNewVersion()}checkNewVersion(){return At(this,null,function*(){try{let t=yield fetch(Vge);if(t.ok){let n=yield t.json();this.info.set(n)}}catch{}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),GC=(()=>{class i{newVersionService;info;constructor(t){this.newVersionService=t,this.info=this.newVersionService.info}static \u0275fac=function(n){return new(n||i)(M(NO))};static \u0275cmp=le({type:i,selectors:[["new-version-chip"]],standalone:!0,features:[ce],decls:1,vars:1,consts:[["upgrade",""],[1,"container",3,"bubble","hoverDelayMs"],[1,"model-explorer-upgrade-popup"],[1,"bold"],[1,"code"]],template:function(n,r){n&1&&W(0,Bge,6,2),n&2&&ae(r.info().version!==""?0:-1)},dependencies:[$n,Ae,it,gt],styles:[".container[_ngcontent-%COMP%]{font-size:12px;display:flex;align-items:center;color:#ab6c17;background-color:#ffefd9;line-height:18px;border-radius:99px;font-weight:500;padding:2px 10px 2px 4px;cursor:pointer}.container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px} .model-explorer-upgrade-popup{padding:8px;font-size:12px;background-color:#fff;line-height:normal} .model-explorer-upgrade-popup .bold{font-weight:500} .model-explorer-upgrade-popup .code{background-color:#f1f1f1;font-family:monospace;margin-top:8px;padding:4px;font-size:11px}"]})}return i})();function Uge(i,e){i&1&&J(0,"mat-spinner",5)}function Hge(i,e){i&1&&(v(0,"mat-icon"),S(1,"add_circle_outline"),y())}function Gge(i,e){i&1&&(v(0,"div",7),S(1," Add custom data and styles to the nodes in the current model "),y())}function jge(i,e){if(i&1){let t=ie();v(0,"div",8)(1,"div",9)(2,"div"),S(3,"Load json data file"),y(),v(4,"a",10),S(5," Guide "),y()(),v(6,"div",11)(7,"div",12),S(8,"From computer"),y(),v(9,"button",13),H("click",function(){V(t);let r=ve(12);return z(r.click())}),S(10," Upload "),y()(),v(11,"input",14,2),H("change",function(){V(t);let r=ve(12),o=I();return z(o.handleClickUpload(r))}),y()()}}var Dj=(()=>{class i{appService;changeDetectorRef;localStorageService;nodeDataProviderExtensionService;dropdown;extensions=[];loadingExtensions=!0;helpPopupSize={minWidth:0,minHeight:0};dropdownSize={minWidth:0,minHeight:0,maxHeight:500};remoteSourceLoading;constructor(t,n,r,o){this.appService=t,this.changeDetectorRef=n,this.localStorageService=r,this.nodeDataProviderExtensionService=o,this.remoteSourceLoading=this.nodeDataProviderExtensionService.remoteSourceLoading}handleClickUpload(t){let n=t.files;if(!n)return;let r=this.appService.getModelGraphFromSelectedPane();if(r){for(let o of Array.from(n)){let s=new FileReader;s.onload=a=>{let l=Lr();try{let c=this.getNodeDataProviderData(a.target?.result,r);this.nodeDataProviderExtensionService.addRun(l,o.name,"",r,c)}catch(c){this.nodeDataProviderExtensionService.addRun(l,o.name,"",r),this.nodeDataProviderExtensionService.updateRunResults(l,{[r.id]:{results:{}}},r,`Failed to process JSON file. ${c}`)}finally{this.dropdown?.closeDialog()}},s.readAsText(o)}t.value=""}}getNodeDataProviderData(t,n){let r=JSON.parse(t),o={};return r.results!=null&&r.results.results==null?n&&(o[n.id]=r):o=r,o}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe),M(Vo),M(Cr))};static \u0275cmp=le({type:i,selectors:[["node-data-provider-dropdown"]],viewQuery:function(n,r){if(n&1&&Ie(wc,5),n&2){let o;be(o=ye())&&(r.dropdown=o.first)}},standalone:!0,features:[ce],decls:10,vars:6,consts:[["help",""],["dropdown",""],["input",""],[1,"container",3,"bubble","overlaySize","hoverDelayMs"],[1,"icon-container",3,"bubbleClick","overlaySize"],["color","primary","diameter","18"],[1,"label"],[1,"model-explorer-help-popup"],[1,"model-explorer-node-data-provider-dropdown"],[1,"section-label","upload"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#custom-node-data","target","_blank"],[1,"upload-container"],[1,"description"],["mat-flat-button","","color","primary",1,"upload-json-file-button","upload",3,"click"],["type","file","multiple","","accept",".json",1,"upload-per-node-data-input",3,"change"]],template:function(n,r){if(n&1&&(v(0,"div",3)(1,"div",4),W(2,Uge,1,0,"mat-spinner",5)(3,Hge,2,0,"mat-icon"),v(4,"span",6),S(5,"Add per-node data"),y()()(),W(6,Gge,2,0,"ng-template",null,0,kt)(8,jge,13,0,"ng-template",null,1,kt)),n&2){let o=ve(7),s=ve(9);N("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(),N("bubbleClick",s)("overlaySize",r.dropdownSize),w(),ae(r.remoteSourceLoading()?2:3)}},dependencies:[$n,wc,Ae,In,zi,it,gt,ns,ca,Jt],styles:[`.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#666;padding-bottom:12px;margin-bottom:-12px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:13px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{color:#444} .model-explorer-node-data-provider-dropdown{font-size:12px;background-color:#fff;display:flex;flex-direction:column;padding-bottom:8px} .model-explorer-node-data-provider-dropdown .section-label{padding:8px 12px;font-size:11px;background:#f1f1f1;font-weight:500;text-transform:uppercase} .model-explorer-node-data-provider-dropdown .section-label .address-container{text-transform:none;font-weight:400;letter-spacing:normal;color:#777;line-height:12px;padding-bottom:5px;display:flex;align-items:flex-start;margin-top:-4px;margin-left:-2px} .model-explorer-node-data-provider-dropdown .section-label .address-container .address-label{overflow:hidden;line-break:anywhere;line-height:12px;flex-grow:1;padding-top:3px} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container{display:flex;align-items:center;justify-content:center;margin-right:4px;pointer-events:all;cursor:pointer;opacity:.7} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container:hover{opacity:1} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container mat-icon{font-size:16px;width:16px;height:16px} .model-explorer-node-data-provider-dropdown .section-label.upload{display:flex;align-items:center;justify-content:space-between;min-width:180px} .model-explorer-node-data-provider-dropdown .section-label.upload a{font-size:11px;letter-spacing:normal;text-transform:none;pointer-events:all} .model-explorer-node-data-provider-dropdown .description{font-size:12px;color:#777;line-height:18px;letter-spacing:normal} .model-explorer-node-data-provider-dropdown .upload-container{display:flex;flex-direction:column;align-items:flex-start;padding:0 16px;margin-top:12px} .model-explorer-node-data-provider-dropdown .upload-json-file-button{margin:4px 0;width:90px;height:30px;font-size:12px!important;letter-spacing:normal!important} .model-explorer-node-data-provider-dropdown .upload-json-file-button.upload{margin-top:2px} .model-explorer-node-data-provider-dropdown .upload-json-file-button .mat-mdc-button-touch-target{display:none} .model-explorer-node-data-provider-dropdown .or-divider{height:1px;border-top:1px solid #eee;position:relative;margin-top:12px} .model-explorer-node-data-provider-dropdown .or-divider .or-label{font-size:10px;top:-9px;color:#aaa;position:absolute;padding:2px;background-color:#fff;display:flex;align-items:center;justify-content:center;width:16px;left:calc(50% - 8px)} .model-explorer-node-data-provider-dropdown .upload-per-node-data-input{display:none} .model-explorer-node-data-provider-dropdown .no-extension, .model-explorer-node-data-provider-dropdown .loading-extension{padding:12px 0 4px 16px;color:#999;font-size:13px;letter-spacing:normal} @@ -4018,7 +4018,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],changeDetection:0})}return i})();function $ge(i,e){}var xu=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}};var FO=(()=>{let e=class e extends oa{constructor(n,r,o,s,a,l,c,d){super(),this._elementRef=n,this._focusTrapFactory=r,this._config=s,this._interactivityChecker=a,this._ngZone=l,this._overlayRef=c,this._focusMonitor=d,this._platform=te(gn),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=te(Fe),this._injector=te(bt),this._isDestroyed=!1,this.attachDomPortal=u=>{this._portalOutlet.hasAttached();let h=this._portalOutlet.attachDomPortal(u);return this._contentAttached(),h},this._document=o,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{n.removeEventListener("blur",o),n.removeEventListener("mousedown",o),n.removeAttribute("tabindex")};n.addEventListener("blur",o),n.addEventListener("mousedown",o)})),n.focus(r)}_focusByCssSelector(n,r){let o=this._elementRef.nativeElement.querySelector(n);o&&this._forceFocus(o,r)}_trapFocus(){this._isDestroyed||fr(()=>{let n=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||n.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement()||this._focusDialogContainer();break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let o=Fm(),s=this._elementRef.nativeElement;(!o||o===this._document.body||o===s||s.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let n=this._elementRef.nativeElement,r=Fm();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Fm()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(wy),M(Ye,8),M(xu),M(Nh),M(Le),M(al),M(po))},e.\u0275cmp=le({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(r,o){if(r&1&&Ie(Qo,7),r&2){let s;be(s=ye())&&(o._portalOutlet=s.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,o){r&2&&Ze("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},standalone:!0,features:[nn,ce],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,o){r&1&&W(0,$ge,0,0,"ng-template",0)},dependencies:[Qo],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2});let i=e;return i})(),X_=class{constructor(e,t){this.overlayRef=e,this.config=t,this.closed=new me,this.disableClose=t.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!mi(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(e,t){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(e),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",t=""){return this.overlayRef.updateSize({width:e,height:t}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},qge=new ge("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.block()}}),Yge=new ge("DialogData"),Xge=new ge("DefaultDialogConfig");var Zge=0,BO=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(n,r,o,s,a,l){this._overlay=n,this._injector=r,this._defaultOptions=o,this._parentDialog=s,this._overlayContainer=a,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new me,this._afterOpenedAtThisLevel=new me,this._ariaHiddenElements=new Map,this.afterAllClosed=Io(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(pi(void 0))),this._scrollStrategy=l}open(n,r){let o=this._defaultOptions||new xu;r=Z(Z({},o),r),r.id=r.id||`cdk-dialog-${Zge++}`,r.id&&this.getDialogById(r.id);let s=this._getOverlayConfig(r),a=this._overlay.create(s),l=new X_(a,r),c=this._attachContainer(a,l,r);return l.containerInstance=c,this._attachDialogContent(n,l,c,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(l),l.closed.subscribe(()=>this._removeOpenDialog(l,!0)),this.afterOpened.next(l),l}closeAll(){LO(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){LO(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),LO(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new ui({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,o){let s=o.injector||o.viewContainerRef?.injector,a=[{provide:xu,useValue:o},{provide:X_,useValue:r},{provide:al,useValue:n}],l;o.container?typeof o.container=="function"?l=o.container:(l=o.container.type,a.push(...o.container.providers(o))):l=FO;let c=new Di(l,o.viewContainerRef,bt.create({parent:s||this._injector,providers:a}),o.componentFactoryResolver);return n.attach(c).instance}_attachDialogContent(n,r,o,s){if(n instanceof Hn){let a=this._createInjector(s,r,o,void 0),l={$implicit:s.data,dialogRef:r};s.templateContext&&(l=Z(Z({},l),typeof s.templateContext=="function"?s.templateContext():s.templateContext)),o.attachTemplatePortal(new jr(n,null,l,a))}else{let a=this._createInjector(s,r,o,this._injector),l=o.attachComponentPortal(new Di(n,s.viewContainerRef,a,s.componentFactoryResolver));r.componentRef=l,r.componentInstance=l.instance}}_createInjector(n,r,o,s){let a=n.injector||n.viewContainerRef?.injector,l=[{provide:Yge,useValue:n.data},{provide:X_,useValue:r}];return n.providers&&(typeof n.providers=="function"?l.push(...n.providers(r,n,o)):l.push(...n.providers)),n.direction&&(!a||!a.get(ai,null,{optional:!0}))&&l.push({provide:ai,useValue:{value:n.direction,change:Ke()}}),bt.create({parent:a||s,providers:l})}_removeOpenDialog(n,r){let o=this.openDialogs.indexOf(n);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,a)=>{s?a.setAttribute("aria-hidden",s):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let o=r.length-1;o>-1;o--){let s=r[o];s!==n&&s.nodeName!=="SCRIPT"&&s.nodeName!=="STYLE"&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}};e.\u0275fac=function(r){return new(r||e)(X(Ht),X(bt),X(Xge,8),X(e,12),X(tf),X(qge))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function LO(i,e){let t=i.length;for(;t--;)e(i[t])}var Rj=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[BO],imports:[Jr,Ms,Sy,Ms]});let i=e;return i})();function Qge(i,e){}var Z_=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},VO="mdc-dialog--open",Aj="mdc-dialog--opening",Nj="mdc-dialog--closing",Kge=150,Jge=75,e_e=(()=>{let e=class e extends FO{constructor(n,r,o,s,a,l,c,d,u){super(n,r,o,s,a,l,c,u),this._animationMode=d,this._animationStateChanged=new Pe,this._animationsEnabled=this._animationMode!=="NoopAnimations",this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?Lj(this._config.enterAnimationDuration)??Kge:0,this._exitAnimationDuration=this._animationsEnabled?Lj(this._config.exitAnimationDuration)??Jge:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(kj,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Aj,VO)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(VO),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(VO),this._animationsEnabled?(this._hostElement.style.setProperty(kj,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Nj)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(n){this._actionSectionCount+=n,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(Aj,Nj)}_waitForAnimationToComplete(n,r){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(r,n)}_requestAnimationFrame(n){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(n):n()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(n){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:n})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(n){let r=super.attachComponentPortal(n);return r.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),r}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(wy),M(Ye,8),M(Z_),M(Nh),M(Le),M(al),M(Zn,8),M(po))},e.\u0275cmp=le({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(r,o){r&2&&(No("id",o._config.id),Ze("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),se("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},standalone:!0,features:[nn,ce],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(r,o){r&1&&(v(0,"div",0)(1,"div",1),W(2,Qge,0,0,"ng-template",2),y()())},dependencies:[Qo],styles:['.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));border-radius:var(--mdc-dialog-container-shape, 4px);background-color:var(--mdc-dialog-container-color, white)}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, rgba(0, 0, 0, 0.87));font-family:var(--mdc-dialog-subhead-font, Roboto, sans-serif);line-height:var(--mdc-dialog-subhead-line-height, 1.5rem);font-size:var(--mdc-dialog-subhead-size, 1rem);font-weight:var(--mdc-dialog-subhead-weight, 400);letter-spacing:var(--mdc-dialog-subhead-tracking, 0.03125em)}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, rgba(0, 0, 0, 0.6));font-family:var(--mdc-dialog-supporting-text-font, Roboto, sans-serif);line-height:var(--mdc-dialog-supporting-text-line-height, 1.5rem);font-size:var(--mdc-dialog-supporting-text-size, 1rem);font-weight:var(--mdc-dialog-supporting-text-weight, 400);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 0.03125em)}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.cdk-high-contrast-active .mat-mdc-dialog-actions{border-top-color:CanvasText}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}'],encapsulation:2});let i=e;return i})(),kj="--mat-dialog-transition-duration";function Lj(i){return i==null?null:typeof i=="number"?i:i.endsWith("ms")?$s(i.substring(0,i.length-2)):i.endsWith("s")?$s(i.substring(0,i.length-1))*1e3:i==="0"?0:null}var jC=function(i){return i[i.OPEN=0]="OPEN",i[i.CLOSING=1]="CLOSING",i[i.CLOSED=2]="CLOSED",i}(jC||{}),Q_=class{constructor(e,t,n){this._ref=e,this._containerInstance=n,this._afterOpened=new me,this._beforeClosed=new me,this._state=jC.OPEN,this.disableClose=t.disableClose,this.id=e.id,e.addPanelClass("mat-mdc-dialog-panel"),n._animationStateChanged.pipe(Gt(r=>r.state==="opened"),_n(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(Gt(r=>r.state==="closed"),_n(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),e.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Yn(this.backdropClick(),this.keydownEvents().pipe(Gt(r=>r.keyCode===27&&!this.disableClose&&!mi(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),Fj(this,r.type==="keydown"?"keyboard":"mouse"))})}close(e){this._result=e,this._containerInstance._animationStateChanged.pipe(Gt(t=>t.state==="closing"),_n(1)).subscribe(t=>{this._beforeClosed.next(e),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=jC.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(e){let t=this._ref.config.positionStrategy;return e&&(e.left||e.right)?e.left?t.left(e.left):t.right(e.right):t.centerHorizontally(),e&&(e.top||e.bottom)?e.top?t.top(e.top):t.bottom(e.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(e="",t=""){return this._ref.updateSize(e,t),this}addPanelClass(e){return this._ref.addPanelClass(e),this}removePanelClass(e){return this._ref.removePanelClass(e),this}getState(){return this._state}_finishDialogClose(){this._state=jC.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function Fj(i,e,t){return i._closeInteractionType=e,i.close(t)}var t_e=new ge("MatMdcDialogData"),n_e=new ge("mat-mdc-dialog-default-options"),i_e=new ge("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.block()}});var r_e=0,wu=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(n,r,o,s,a,l,c,d){this._overlay=n,this._defaultOptions=s,this._scrollStrategy=a,this._parentDialog=l,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new me,this._afterOpenedAtThisLevel=new me,this.dialogConfigClass=Z_,this.afterAllClosed=Io(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(pi(void 0))),this._dialog=r.get(BO),this._dialogRefConstructor=Q_,this._dialogContainerType=e_e,this._dialogDataToken=t_e}open(n,r){let o;r=Z(Z({},this._defaultOptions||new Z_),r),r.id=r.id||`mat-mdc-dialog-${r_e++}`,r.scrollStrategy=r.scrollStrategy||this._scrollStrategy();let s=this._dialog.open(n,wt(Z({},r),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:r},{provide:xu,useValue:r}]},templateContext:()=>({dialogRef:o}),providers:(a,l,c)=>(o=new this._dialogRefConstructor(a,r,c),o.updatePosition(r?.position),[{provide:this._dialogContainerType,useValue:c},{provide:this._dialogDataToken,useValue:l.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=s.componentRef,o.componentInstance=s.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let a=this.openDialogs.indexOf(o);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(n){let r=n.length;for(;r--;)n[r].close()}};e.\u0275fac=function(r){return new(r||e)(X(Ht),X(bt),X(Pa,8),X(n_e,8),X(i_e),X(e,12),X(tf),X(Zn,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),o_e=0,lf=(()=>{let e=class e{constructor(n,r,o){this.dialogRef=n,this._elementRef=r,this._dialog=o,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=Vj(this._elementRef,this._dialog.openDialogs))}ngOnChanges(n){let r=n._matDialogClose||n._matDialogCloseResult;r&&(this.dialogResult=r.currentValue)}_onButtonClick(n){Fj(this.dialogRef,n.screenX===0&&n.screenY===0?"keyboard":"mouse",this.dialogResult)}};e.\u0275fac=function(r){return new(r||e)(M(Q_,8),M(Re),M(wu))},e.\u0275dir=ze({type:e,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(r,o){r&1&&H("click",function(a){return o._onButtonClick(a)}),r&2&&Ze("aria-label",o.ariaLabel||null)("type",o.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[dn]});let i=e;return i})(),Bj=(()=>{let e=class e{constructor(n,r,o){this._dialogRef=n,this._elementRef=r,this._dialog=o}ngOnInit(){this._dialogRef||(this._dialogRef=Vj(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}};e.\u0275fac=function(r){return new(r||e)(M(Q_,8),M(Re),M(wu))},e.\u0275dir=ze({type:e,standalone:!0});let i=e;return i})(),cf=(()=>{let e=class e extends Bj{constructor(){super(...arguments),this.id=`mat-mdc-dialog-title-${o_e++}`}_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(r,o){r&2&&No("id",o.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],standalone:!0,features:[nn]});let i=e;return i})(),df=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0,features:[w2([oO])]});let i=e;return i})(),uf=(()=>{let e=class e extends Bj{_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(r,o){r&2&&se("mat-mdc-dialog-actions-align-start",o.align==="start")("mat-mdc-dialog-actions-align-center",o.align==="center")("mat-mdc-dialog-actions-align-end",o.align==="end")},inputs:{align:"align"},standalone:!0,features:[nn]});let i=e;return i})();function Vj(i,e){let t=i.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?e.find(n=>n.id===t.id):null}var ha=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[wu],imports:[Rj,Jr,Ms,qt,qt]});let i=e;return i})();function e5(i){let e=i.cloneNode(!0),t=e.querySelectorAll("[id]"),n=i.nodeName.toLowerCase();e.removeAttribute("id");for(let r=0;r=n&&t<=r&&e>=o&&e<=s}function ev(i,e,t){i.top+=e,i.bottom=i.top+i.height,i.left+=t,i.right=i.left+i.width}function Gj(i,e,t,n){let{top:r,right:o,bottom:s,left:a,width:l,height:c}=i,d=l*e,u=c*e;return n>r-u&&na-d&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:qO(t)})})}handleScroll(e){let t=Si(e),n=this.positions.get(t);if(!n)return null;let r=n.scrollPosition,o,s;if(t===this._document){let c=this.getViewportScrollPosition();o=c.top,s=c.left}else o=t.scrollTop,s=t.scrollLeft;let a=r.top-o,l=r.left-s;return this.positions.forEach((c,d)=>{c.clientRect&&t!==d&&t.contains(d)&&ev(c.clientRect,a,l)}),r.top=o,r.left=s,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function t5(i,e){let t=i.rootNodes;if(t.length===1&&t[0].nodeType===e.ELEMENT_NODE)return t[0];let n=e.createElement("div");return t.forEach(r=>n.appendChild(r)),n}function YO(i,e,t){for(let n in e)if(e.hasOwnProperty(n)){let r=e[n];r?i.setProperty(n,r,t?.has(n)?"important":""):i.removeProperty(n)}return i}function hf(i,e){let t=e?"":"none";YO(i.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function jj(i,e,t){YO(i.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function XC(i,e){return e&&e!="none"?i+" "+e:i}function Wj(i,e){i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.transform=ZC(e.left,e.top)}function ZC(i,e){return`translate3d(${Math.round(i)}px, ${Math.round(e)}px, 0)`}function $j(i){let e=i.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(i)*e}function a_e(i){let e=getComputedStyle(i),t=zO(e,"transition-property"),n=t.find(a=>a==="transform"||a==="all");if(!n)return 0;let r=t.indexOf(n),o=zO(e,"transition-duration"),s=zO(e,"transition-delay");return $j(o[r])+$j(s[r])}function zO(i,e){return i.getPropertyValue(e).split(",").map(n=>n.trim())}var l_e=new Set(["position"]),HO=class{get element(){return this._preview}constructor(e,t,n,r,o,s,a,l,c){this._document=e,this._rootElement=t,this._direction=n,this._initialDomRect=r,this._previewTemplate=o,this._previewClass=s,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),"showPopover"in this._preview&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return a_e(this._preview)}addEventListener(e,t){this._preview.addEventListener(e,t)}removeEventListener(e,t){this._preview.removeEventListener(e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,n=e?e.template:null,r;if(n&&e){let o=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(n,e.context);s.detectChanges(),r=t5(s,this._document),this._previewEmbeddedView=s,e.matchSize?Wj(r,o):r.style.transform=ZC(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=e5(this._rootElement),Wj(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return YO(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},l_e),hf(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(o=>r.classList.add(o)):r.classList.add(t)),r}},qj=Fr({passive:!0}),WC=Fr({passive:!1}),Yj=Fr({passive:!1,capture:!0}),c_e=800,Xj=new Set(["position"]),GO=class{get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>hf(t,e)))}constructor(e,t,n,r,o,s){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=yt(!1),this._moveEvents=new me,this._pointerMoveSubscription=Ct.EMPTY,this._pointerUpSubscription=Ct.EMPTY,this._scrollSubscription=Ct.EMPTY,this._resizeSubscription=Ct.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new me,this.started=new me,this.released=new me,this.ended=new me,this.entered=new me,this.exited=new me,this.dropped=new me,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{let l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging()){let d=Math.abs(l.x-this._pickupPositionOnPage.x),u=Math.abs(l.y-this._pickupPositionOnPage.y);if(d+u>=this._config.dragStartThreshold){let p=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),f=this._dropContainer;if(!p){this._endDragSequence(a);return}(!f||!f.isDragging()&&!f.isReceiving())&&(a.cancelable&&a.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(a)))}return}a.cancelable&&a.preventDefault();let c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{let d=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,u=this._activeTransform;u.x=c.x-d.x+this._passiveTransform.x,u.y=c.y-d.y+this._passiveTransform.y,this._applyRootElementTransform(u.x,u.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new YC(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(n=>er(n)),this._handles.forEach(n=>hf(n,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=er(e);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,WC),t.addEventListener("touchstart",this._pointerDown,qj),t.addEventListener("dragstart",this._nativeDragStart,WC)}),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?er(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),hf(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),hf(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",Qj,Yj)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){J_(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{t.addEventListener("selectstart",Qj,Yj)}),n){let r=this._rootElement,o=r.parentNode,s=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");o.insertBefore(a,r),this._initialTransform=r.style.transform||"",this._preview=new HO(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3),this._preview.attach(this._getPreviewInsertionPoint(o,t)),jj(r,!1,Xj),this._document.body.appendChild(o.replaceChild(s,r)),this.started.next({source:this,event:e}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let n=this.isDragging(),r=J_(t),o=!r&&t.button!==0,s=this._rootElement,a=Si(t),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+c_e>Date.now(),c=r?yd(t):bd(t);if(a&&a.draggable&&t.type==="mousedown"&&t.preventDefault(),n||o||l||c)return;if(this._handles.length){let h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=qO(this._boundaryElement));let d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){jj(this._rootElement,!0,Xj),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),o=this._getDragDistance(r),s=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:e}),t.drop(this,n,this._initialIndex,this._initialContainer,s,o,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:n,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,t,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=s=>{(!s||this._preview&&Si(s)===this._preview.element&&s.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",r),n(),clearTimeout(o))},o=setTimeout(r,t*1.5);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,n;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),n=t5(this._placeholderRef,this._document)):n=e5(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,t,n){let r=t===this._rootElement?null:t,o=r?r.getBoundingClientRect():e,s=J_(n)?n.targetTouches[0]:n,a=this._getViewportScrollPosition(),l=s.pageX-o.left-a.left,c=s.pageY-o.top-a.top;return{x:o.left-e.left+l,y:o.top-e.top+c}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),n=J_(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=n.pageX-t.left,o=n.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=o,a.matrixTransform(s.inverse())}}return{x:r,y:o}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:o,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),d=a.top+s,u=a.bottom-(c-s),h=a.left+o,p=a.right-(l-o);n=Zj(n,h,p),r=Zj(r,d,u)}return{x:n,y:r}}_updatePointerDirectionDelta(e){let{x:t,y:n}=e,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-o.x),a=Math.abs(n-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=t>o.x?1:-1,o.x=t),a>this._config.pointerDirectionChangeThreshold&&(r.y=n>o.y?1:-1,o.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,hf(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,WC),e.removeEventListener("touchstart",this._pointerDown,qj),e.removeEventListener("dragstart",this._nativeDragStart,WC)}_applyRootElementTransform(e,t){let n=ZC(e,t),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=XC(n,this._initialTransform)}_applyPreviewTransform(e,t){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=ZC(e,t);this._preview.setTransform(XC(r,n))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let o=r.left-n.left,s=n.right-r.right,a=r.top-n.top,l=n.bottom-r.bottom;r.width>n.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,r.height>n.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:J_(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let n=Si(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&ev(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=Eh(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let n=this._previewContainer||"global";if(n==="parent")return e;if(n==="global"){let r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return er(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function Zj(i,e,t){return Math.max(e,Math.min(t,i))}function J_(i){return i.type[0]==="t"}function Qj(i){i.preventDefault()}function n5(i,e,t){let n=Kj(e,i.length-1),r=Kj(t,i.length-1);if(n===r)return;let o=i[n],s=r0)return null;let a=this.orientation==="horizontal",l=o.findIndex(b=>b.drag===e),c=o[s],d=o[l].clientRect,u=c.clientRect,h=l>s?1:-1,p=this._getItemOffsetPx(d,u,h),f=this._getSiblingOffsetPx(l,o,h),m=o.slice();return n5(o,l,s),o.forEach((b,g)=>{if(m[g]===b)return;let _=b.drag===e,x=_?p:f,C=_?e.getPlaceholderElement():b.drag.getRootElement();b.offset+=x,a?(C.style.transform=XC(`translate3d(${Math.round(b.offset)}px, 0, 0)`,b.initialTransform),ev(b.clientRect,0,x)):(C.style.transform=XC(`translate3d(0, ${Math.round(b.offset)}px, 0)`,b.initialTransform),ev(b.clientRect,x,0))}),this._previousSwap.overlaps=UO(u,t,n),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:l,currentIndex:s}}enter(e,t,n,r){let o=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r,s=this._activeDraggables,a=s.indexOf(e),l=e.getPlaceholderElement(),c=s[o];if(c===e&&(c=s[o+1]),!c&&(o==null||o===-1||o-1&&s.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){let d=c.getRootElement();d.parentElement.insertBefore(l,d),s.splice(o,0,e)}else this._element.appendChild(l),s.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let n=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(n=>n.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:n})=>{ev(n,e,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:qO(n)}}).sort((t,n)=>e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(e,t,n){let r=this.orientation==="horizontal",o=r?t.left-e.left:t.top-e.top;return n===-1&&(o+=r?t.width-e.width:t.height-e.height),o}_getSiblingOffsetPx(e,t,n){let r=this.orientation==="horizontal",o=t[e].clientRect,s=t[e+n*-1],a=o[r?"width":"height"]*n;if(s){let l=r?"left":"top",c=r?"right":"bottom";n===-1?a-=s.clientRect[l]-o[c]:a+=o[l]-s.clientRect[c]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let s=n[n.length-1].clientRect;return r?e>=s.right:t>=s.bottom}else{let s=n[0].clientRect;return r?e<=s.left:t<=s.top}}_getItemIndexFromPointerPosition(e,t,n,r){let o=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(r){let c=o?r.x:r.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return o?t>=Math.floor(l.left)&&t=Math.floor(l.top)&&nl?d.after(c):d.before(c),n5(this._activeItems,l,o);let u=this._getRootNode().elementFromPoint(t,n);return s.deltaX=r.x,s.deltaY=r.y,s.drag=a,s.overlaps=d===u||d.contains(u),{previousIndex:l,currentIndex:o}}enter(e,t,n,r){let o=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r;o===-1&&(o=this._getClosestItemIndexToPointer(e,t,n));let s=this._activeItems[o],a=this._activeItems.indexOf(e);a>-1&&this._activeItems.splice(a,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(o,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,o]=this._relatedNodes[n];r.parentNode===e&&r.nextSibling!==o&&(o===null?e.appendChild(r):o.parentNode===e&&e.insertBefore(r,o))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,n){let r=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(n)),o=r?this._activeItems.findIndex(s=>{let a=s.getRootElement();return r===a||a.contains(r)}):-1;return o===-1||!this._sortPredicate(o,e)?-1:o}_getRootNode(){return this._rootNode||(this._rootNode=Eh(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,o=-1;for(let s=0;s!0,this.sortPredicate=()=>!0,this.beforeStarted=new me,this.entered=new me,this.exited=new me,this.dropped=new me,this.sorted=new me,this.receivingStarted=new me,this.receivingStopped=new me,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=Ct.EMPTY,this._verticalScrollDirection=is.NONE,this._horizontalScrollDirection=Wr.NONE,this._stopScrollTimers=new me,this._cachedShadowRoot=null,this._scrollableElements=[],this._direction="ltr",this._startScrollInterval=()=>{this._stopScrolling(),ES(0,Cv).pipe(Xe(this._stopScrollTimers)).subscribe(()=>{let a=this._scrollNode,l=this.autoScrollStep;this._verticalScrollDirection===is.UP?a.scrollBy(0,-l):this._verticalScrollDirection===is.DOWN&&a.scrollBy(0,l),this._horizontalScrollDirection===Wr.LEFT?a.scrollBy(-l,0):this._horizontalScrollDirection===Wr.RIGHT&&a.scrollBy(l,0)})};let s=this.element=er(e);this._document=n,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new YC(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,n,r,o,s,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:l})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>e.indexOf(r)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof QC&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new jO(this._document,this._dragDropRegistry);else{let t=new QC(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,n)=>this.sortPredicate(t,n,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=er(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(e);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,n,r){if(this.sortingDisabled||!this._domRect||!Gj(this._domRect,Jj,t,n))return;let o=this._sortStrategy.sort(e,t,n,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let n,r=is.NONE,o=Wr.NONE;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||n||Gj(s.clientRect,Jj,e,t)&&([r,o]=d_e(a,s.clientRect,this._direction,e,t),(r||o)&&(n=a))}),!r&&!o){let{width:s,height:a}=this._viewportRuler.getViewportSize(),l={width:s,height:a,top:0,right:s,bottom:a,left:0};r=r5(l,t),o=o5(l,e),n=window}n&&(r!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=o,this._scrollNode=n,(r||o)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(e,t){return this._domRect!=null&&UO(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,n){return this._siblings.find(r=>r._canReceive(e,t,n))}_canReceive(e,t,n){if(!this._domRect||!UO(this._domRect,t,n)||!this.enterPredicate(e,this))return!1;let r=this._getShadowRoot().elementFromPoint(t,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(e,t){let n=this._activeSiblings;!n.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=Eh(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function r5(i,e){let{top:t,bottom:n,height:r}=i,o=r*i5;return e>=t-o&&e<=t+o?is.UP:e>=n-o&&e<=n+o?is.DOWN:is.NONE}function o5(i,e){let{left:t,right:n,width:r}=i,o=r*i5;return e>=t-o&&e<=t+o?Wr.LEFT:e>=n-o&&e<=n+o?Wr.RIGHT:Wr.NONE}function d_e(i,e,t,n,r){let o=r5(e,r),s=o5(e,n),a=is.NONE,l=Wr.NONE;if(o){let c=i.scrollTop;o===is.UP?c>0&&(a=is.UP):i.scrollHeight-c>i.clientHeight&&(a=is.DOWN)}if(s){let c=i.scrollLeft;t==="rtl"?s===Wr.RIGHT?c<0&&(l=Wr.RIGHT):i.scrollWidth+c>i.clientWidth&&(l=Wr.LEFT):s===Wr.LEFT?c>0&&(l=Wr.LEFT):i.scrollWidth-c>i.clientWidth&&(l=Wr.RIGHT)}return[a,l]}var $C=Fr({passive:!1,capture:!0}),qC=new Set,u_e=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=le({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],standalone:!0,features:[ce],decls:0,vars:0,template:function(r,o){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0});let i=e;return i})(),h_e=(()=>{let e=class e{constructor(n,r){this._ngZone=n,this._appRef=te(us),this._environmentInjector=te(qi),this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=yt([]),this._globalListeners=new Map,this._draggingPredicate=o=>o.isDragging(),this.pointerMove=new me,this.pointerUp=new me,this.scroll=new me,this._preventDefaultWhileDragging=o=>{this._activeDragInstances().length>0&&o.preventDefault()},this._persistentTouchmoveListener=o=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&o.preventDefault(),this.pointerMove.next(o))},this._document=r}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,$C)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,$C)}startDragging(n,r){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._loadResets(),this._activeDragInstances.update(o=>[...o,n]),this._activeDragInstances().length===1)){let o=r.type.startsWith("touch");this._globalListeners.set(o?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:$C}),o||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:$C}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,a)=>{this._document.addEventListener(a,s.handler,s.options)})})}}stopDragging(n){this._activeDragInstances.update(r=>{let o=r.indexOf(n);return o>-1?(r.splice(o,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let r=[this.scroll];return n&&n!==this._document&&r.push(new Mt(o=>this._ngZone.runOutsideAngular(()=>{let a=l=>{this._activeDragInstances().length&&o.next(l)};return n.addEventListener("scroll",a,!0),()=>{n.removeEventListener("scroll",a,!0)}}))),Yn(...r)}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((n,r)=>{this._document.removeEventListener(r,n.handler,n.options)}),this._globalListeners.clear()}_loadResets(){if(!qC.has(this._appRef)){qC.add(this._appRef);let n=K2(u_e,{environmentInjector:this._environmentInjector});this._appRef.onDestroy(()=>{qC.delete(this._appRef),qC.size===0&&n.destroy()})}}};e.\u0275fac=function(r){return new(r||e)(X(Le),X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),p_e={dragStartThreshold:5,pointerDirectionChangeThreshold:5},s5=(()=>{let e=class e{constructor(n,r,o,s){this._document=n,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s}createDrag(n,r=p_e){return new GO(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(n){return new WO(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(Le),X(ra),X(h_e))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),$O=new ge("CDK_DRAG_PARENT");var a5=new ge("CdkDragHandle"),l5=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(n){this._disabled=n,this._stateChanges.next(this)}constructor(n,r){this.element=n,this._parentDrag=r,this._stateChanges=new me,this._disabled=!1,r?._addHandle(this)}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}};e.\u0275fac=function(r){return new(r||e)(M(Re),M($O,12))},e.\u0275dir=ze({type:e,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[2,"cdkDragHandleDisabled","disabled",at]},standalone:!0,features:[Bt([{provide:a5,useExisting:e}]),an]});let i=e;return i})(),f_e=new ge("CDK_DRAG_CONFIG"),m_e="cdk-drag",g_e=new ge("CdkDropList"),c5=(()=>{let e=class e{get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}constructor(n,r,o,s,a,l,c,d,u,h,p){this.element=n,this.dropContainer=r,this._ngZone=s,this._viewContainerRef=a,this._dir=c,this._changeDetectorRef=u,this._selfHandle=h,this._parentDrag=p,this._destroyed=new me,this._handles=new Dn([]),this.started=new Pe,this.released=new Pe,this.ended=new Pe,this.entered=new Pe,this.exited=new Pe,this.dropped=new Pe,this.moved=new Mt(f=>{let m=this._dragRef.moved.pipe(Je(b=>({source:this,pointerPosition:b.pointerPosition,event:b.event,delta:b.delta,distance:b.distance}))).subscribe(f);return()=>{m.unsubscribe()}}),this._injector=te(bt),this._dragRef=d.createDrag(n,{dragStartThreshold:l&&l.dragStartThreshold!=null?l.dragStartThreshold:5,pointerDirectionChangeThreshold:l&&l.pointerDirectionChangeThreshold!=null?l.pointerDirectionChangeThreshold:5,zIndex:l?.zIndex}),this._dragRef.data=this,e._dragInstances.push(this),l&&this._assignDefaults(l),r&&(this._dragRef._withDropContainer(r._dropListRef),r.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){fr(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let r=n.rootElementSelector,o=n.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),o&&!o.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);let n=e._dragInstances.indexOf(this);n>-1&&e._dragInstances.splice(n,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(n){let r=this._handles.getValue();r.push(n),this._handles.next(r)}_removeHandle(n){let r=this._handles.getValue(),o=r.indexOf(n);o>-1&&(r.splice(o,1),this._handles.next(r))}_setPreviewTemplate(n){this._previewTemplate=n}_resetPreviewTemplate(n){n===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(n){this._placeholderTemplate=n}_resetPlaceholderTemplate(n){n===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let n=this.element.nativeElement,r=n;this.rootElementSelector&&(r=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):er(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,o=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.dragStartDelay=typeof o=="object"&&o?o:$s(o),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(a).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(_n(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){if(r.classList.contains(m_e)){n.withParent(e._dragInstances.find(o=>o.element.nativeElement===r)?._dragRef||null);break}r=r.parentElement}})}_handleEvents(n){n.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),n.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),n.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),n.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(n){let{lockAxis:r,dragStartDelay:o,constrainPosition:s,previewClass:a,boundaryElement:l,draggingDisabled:c,rootElementSelector:d,previewContainer:u}=n;this.disabled=c??!1,this.dragStartDelay=o||0,r&&(this.lockAxis=r),s&&(this.constrainPosition=s),a&&(this.previewClass=a),l&&(this.boundaryElement=l),d&&(this.rootElementSelector=d),u&&(this.previewContainer=u)}_setupHandlesListener(){this._handles.pipe(Sn(n=>{let r=n.map(o=>o.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),Xn(n=>Yn(...n.map(r=>r._stateChanges.pipe(pi(r))))),Xe(this._destroyed)).subscribe(n=>{let r=this._dragRef,o=n.element.nativeElement;n.disabled?r.disableHandle(o):r.enableHandle(o)})}};e._dragInstances=[],e.\u0275fac=function(r){return new(r||e)(M(Re),M(g_e,12),M(Ye),M(Le),M(Yt),M(f_e,8),M(ai,8),M(s5),M(Fe),M(a5,10),M($O,12))},e.\u0275dir=ze({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(r,o){r&2&&se("cdk-drag-disabled",o.disabled)("cdk-drag-dragging",o._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",at],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[Bt([{provide:$O,useExisting:e}]),an,dn]});let i=e;return i})();var d5=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[s5],imports:[Zo]});let i=e;return i})();var XO=(i,e)=>e.type;function v_e(i,e){if(i&1){let t=ie();v(0,"div",18),H("click",function(){let r=V(t).$implicit,o=I(2).$index,s=I();return z(s.handleToggleMatchType(o,r.type))}),v(1,"mat-icon"),S(2),y()()}if(i&2){let t=e.$implicit,n=I(2).$implicit,r=I();se("selected",r.getIsMatchTypeSelected(n,t.type))("disabled",r.getDisableMatchType(n,t.type)),N("matTooltip",t.tooltip),w(2),nt(t.type)}}function b_e(i,e){if(i&1){let t=ie();v(0,"div",12)(1,"div",13),S(2,"R"),y(),v(3,"div",14),S(4,"E"),y()(),v(5,"input",15,1),H("change",function(){V(t);let r=ve(6),o=I().$index,s=I();return z(s.handleRegexQueryChanged(o,r.value))}),y(),v(7,"div",16),ln(8,v_e,3,6,"div",17,XO),y()}if(i&2){let t=I().$implicit,n=I();w(5),N("value",t.queryRegex),w(3),cn(n.allSearchMatchTypeOptions)}}function y_e(i,e){if(i&1){let t=ie();v(0,"div",19),S(1," [\xB7\xB7] "),y(),v(2,"div",20)(3,"input",21,2),H("change",function(){V(t);let r=ve(4),o=ve(8),s=ve(12),a=I().$index,l=I();return z(l.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),y(),v(5,"div",22),S(6,":"),y(),v(7,"input",23,3),H("change",function(){V(t);let r=ve(4),o=ve(8),s=ve(12),a=I().$index,l=I();return z(l.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),y(),v(9,"div",24),S(10,","),y(),v(11,"input",25,4),H("change",function(){V(t);let r=ve(4),o=ve(8),s=ve(12),a=I().$index,l=I();return z(l.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),y()()}if(i&2){let t=I().$implicit,n=I();w(3),N("value",t.attrName),w(4),N("value",n.getAttrValueRangeString(t.min)),w(4),N("value",n.getAttrValueRangeString(t.max))}}function x_e(i,e){if(i&1&&(v(0,"option",28),S(1),y()),i&2){let t=e.$implicit,n=I(2).$implicit;N("value",t.type)("selected",t.type===n.nodeType),w(),Me(" ",t.label," ")}}function w_e(i,e){if(i&1){let t=ie();v(0,"div",26)(1,"mat-icon"),S(2,"device_hub"),y()(),v(3,"select",27,5),H("change",function(){V(t);let r=ve(4),o=I().$index,s=I();return z(s.handleNodeTypeChanged(o,r.value))}),ln(5,x_e,2,3,"option",28,XO),y()}if(i&2){let t=I(2);w(5),cn(t.allSearchNodeTypes)}}function C_e(i,e){if(i&1){let t=ie();v(0,"div",29),H("click",function(){V(t);let r=I().$index,o=I();return z(o.handleDeleteQuery(r))}),v(1,"mat-icon"),S(2,"delete"),y()()}}function S_e(i,e){if(i&1&&(v(0,"div",7),W(1,b_e,10,1)(2,y_e,13,3)(3,w_e,7,0)(4,C_e,3,0,"div",11),y()),i&2){let t,n=e.$implicit,r=I();w(),ae((t=n.type)===r.NodeQueryType.REGEX?1:t===r.NodeQueryType.ATTR_VALUE_RANGE?2:t===r.NodeQueryType.NODE_TYPE?3:-1),w(3),ae(r.getShowDeleteQueryButton(n)?4:-1)}}function M_e(i,e){i&1&&(v(0,"div",31)(1,"div",13),S(2,"R"),y(),v(3,"div",14),S(4,"E"),y()())}function E_e(i,e){i&1&&(v(0,"div",32),S(1," [\xB7\xB7] "),y())}function I_e(i,e){if(i&1){let t=ie();v(0,"div",30),H("click",function(){let r=V(t).$implicit,o=I();return z(o.handleAddQuery(r.type))}),W(1,M_e,5,0,"div",31)(2,E_e,2,0,"div",32),v(3,"div",33),S(4),y()()}if(i&2){let t,n=e.$implicit,r=I();w(),ae((t=n.type)===r.NodeQueryType.REGEX?1:t===r.NodeQueryType.ATTR_VALUE_RANGE?2:-1),w(3),nt(n.label)}}var u5=(()=>{class i{changeDetectorRef;queries=[];queriesUpdated=new Pe;NodeQueryType=Ln;allSearchMatchTypeOptions=[{type:vt.NODE_LABEL,tooltip:"Match label"},{type:vt.ATTRIBUTE,tooltip:"Match attributes"},{type:vt.INPUT_METADATA,tooltip:"Match inputs (op node only)"},{type:vt.OUTPUT_METADATA,tooltip:"Match outputs (op node only)"}];allSearchNodeTypes=[{type:mr.OP_NODES,label:"Op nodes only"},{type:mr.LAYER_NODES,label:"Layer nodes only"},{type:mr.OP_AND_LAYER_NODES,label:"Op and layer nodes"}];allQueryTypes=[{type:Ln.REGEX,label:"Regex"},{type:Ln.ATTR_VALUE_RANGE,label:"Attribute value range"}];curQueries=[];curMatchedNodes={};constructor(t){this.changeDetectorRef=t}ngOnInit(){this.curQueries=JSON.parse(JSON.stringify(this.queries))}setMatchedNodes(t){this.curMatchedNodes=t,this.changeDetectorRef.markForCheck()}handleRegexQueryChanged(t,n){let r=this.curQueries[t];r.queryRegex=n.trim(),this.queriesUpdated.emit([...this.curQueries])}handleAttrValueRangeQueryChanged(t,n,r,o){let s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;r!==""&&!isNaN(Number(r))&&(s=Number(r)),o!==""&&!isNaN(Number(o))&&(a=Number(o));let l=this.curQueries[t];l.attrName=n,l.min=s,l.max=a,this.queriesUpdated.emit([...this.curQueries])}handleNodeTypeChanged(t,n){let r=this.curQueries[t];r.nodeType=n,this.queriesUpdated.emit([...this.curQueries])}handleToggleMatchType(t,n){if(this.getDisableMatchType(this.curQueries[t],n))return;let r=this.curQueries[t],o=r.matchTypes.indexOf(n);o>=0?r.matchTypes.splice(o,1):r.matchTypes.push(n),this.queriesUpdated.emit([...this.curQueries])}handleDeleteQuery(t){this.curQueries.splice(t,1),this.queriesUpdated.emit([...this.curQueries])}handleAddQuery(t){switch(t){case Ln.REGEX:this.curQueries.push({type:t,queryRegex:"",matchTypes:[vt.NODE_LABEL]});break;case Ln.ATTR_VALUE_RANGE:this.curQueries.push({type:t,attrName:"",min:Number.NEGATIVE_INFINITY,max:Number.POSITIVE_INFINITY});break;case Ln.NODE_TYPE:this.curQueries.push({type:t,nodeType:mr.OP_NODES});break;default:break}this.queriesUpdated.emit([...this.curQueries])}getIsMatchTypeSelected(t,n){return t.matchTypes.includes(n)}getDisableMatchType(t,n){return t.matchTypes.length===1&&t.matchTypes[0]===n}getAttrValueRangeString(t){return t==null||t===Number.NEGATIVE_INFINITY||t===Number.POSITIVE_INFINITY?"":`${t}`}getShowDeleteQueryButton(t){return t.type!==Ln.NODE_TYPE}static \u0275fac=function(n){return new(n||i)(M(Fe))};static \u0275cmp=le({type:i,selectors:[["complex-queries"]],inputs:{queries:"queries"},outputs:{queriesUpdated:"queriesUpdated"},standalone:!0,features:[ce],decls:11,vars:1,consts:[["menu","matMenu"],["queryInput",""],["inputAttrName",""],["inputMin",""],["inputMax",""],["select",""],[1,"container"],[1,"query-container"],[1,"btn-add-query",3,"matMenuTriggerFor"],[1,"model-explorer-add-query-menu"],[1,"menu-item"],["matTooltip","Delete query","matTooltipPosition","right",1,"icon-container","delete"],["matTooltip","Regex","n","","matTooltipPosition","left",1,"model-explorer-regex-icon"],[1,"r"],[1,"e"],["placeholder","Regex",1,"regex","common-input",3,"change","value"],[1,"targets-container"],[1,"icon-container","match-type",3,"matTooltip","selected","disabled"],[1,"icon-container","match-type",3,"click","matTooltip"],["matTooltip","Attribute value range","matTooltipPosition","left",1,"model-explorer-attr-value-range-icon"],[1,"attrs-value-range-container"],["placeholder","Attr name",1,"common-input","attr-name",3,"change","value"],[1,"colon"],["placeholder","min",1,"common-input","min",3,"change","value"],[1,"to"],["placeholder","max",1,"common-input","max",3,"change","value"],["matTooltip","Node type","matTooltipPosition","left",1,"model-explorer-node-type-icon"],[1,"node-type-selector",3,"change"],[3,"value","selected"],["matTooltip","Delete query","matTooltipPosition","right",1,"icon-container","delete",3,"click"],[1,"menu-item",3,"click"],[1,"model-explorer-regex-icon"],[1,"model-explorer-attr-value-range-icon"],[1,"label"]],template:function(n,r){if(n&1&&(v(0,"div",6),ln(1,S_e,5,2,"div",7,Qr),v(3,"div",8)(4,"mat-icon"),S(5,"add"),y(),S(6," Add query "),y(),v(7,"mat-menu",9,0),ln(9,I_e,5,2,"div",10,XO),y()()),n&2){let o=ve(8);w(),cn(r.curQueries),w(2),N("matMenuTriggerFor",o),w(6),cn(r.allQueryTypes)}},dependencies:[Ae,it,gt,sa,Jo,vc,Jt,Wn],styles:[`.query-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-bottom:4px;position:relative;padding-right:36px}.query-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:22px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;padding:0 4px;outline:none}.query-container[_ngcontent-%COMP%] input.regex[_ngcontent-%COMP%]{flex-grow:1}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:240px}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] .colon[_ngcontent-%COMP%], .query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] .to[_ngcontent-%COMP%]{font-weight:700;margin:0 2px;height:22px}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:0}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.attr-name[_ngcontent-%COMP%]{flex-grow:1}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.min[_ngcontent-%COMP%], .query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.max[_ngcontent-%COMP%]{width:50px}.query-container[_ngcontent-%COMP%] .node-type-selector[_ngcontent-%COMP%]{border:1px solid #ccc;border-radius:4px;outline:none;height:23px;cursor:pointer;box-sizing:border-box;width:160px}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%]{display:flex;position:absolute;right:0;top:4px;cursor:pointer;opacity:.6}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%]:hover{opacity:1}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.targets-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2px}.targets-container[_ngcontent-%COMP%] .icon-container.match-type[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;background-color:#ddd;border-radius:4px;cursor:pointer;padding:4px}.targets-container[_ngcontent-%COMP%] .icon-container.match-type.selected[_ngcontent-%COMP%]{background-color:#a3c9ff}.targets-container[_ngcontent-%COMP%] .icon-container.match-type.disabled[_ngcontent-%COMP%]{cursor:default}.targets-container[_ngcontent-%COMP%] .icon-container.match-type[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:#333}.btn-add-query[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;width:fit-content;line-height:16px;opacity:.6;white-space:nowrap;margin-top:2px;-webkit-user-select:none;user-select:none;margin-left:19px}.btn-add-query[_ngcontent-%COMP%]:hover{opacity:1}.btn-add-query[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;margin-right:2px} .model-explorer-add-query-menu .menu-item{letter-spacing:normal!important;font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;font-size:12px;padding:0 8px;cursor:pointer;display:flex;align-items:center} .model-explorer-add-query-menu .menu-item .label{margin-left:6px} .model-explorer-add-query-menu .menu-item:hover{background-color:#eee} .model-explorer-regex-icon{display:flex;width:16px;height:16px;align-items:center;justify-content:center;font-weight:700;-webkit-user-select:none;user-select:none;color:#aaa} .model-explorer-regex-icon .r{font-size:12px} .model-explorer-regex-icon .e{font-size:8px;margin-top:2px} .model-explorer-attr-value-range-icon{display:flex;width:16px;height:16px;align-items:center;justify-content:center;font-size:10px;font-weight:700;-webkit-user-select:none;user-select:none;color:#aaa} .model-explorer-node-type-icon{width:16px;height:16px} .model-explorer-node-type-icon mat-icon{font-size:16px;width:16px;height:16px;color:#aaa} +`],changeDetection:0})}return i})();function Wge(i,e){}var xu=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}};var LO=(()=>{let e=class e extends oa{constructor(n,r,o,s,a,l,c,d){super(),this._elementRef=n,this._focusTrapFactory=r,this._config=s,this._interactivityChecker=a,this._ngZone=l,this._overlayRef=c,this._focusMonitor=d,this._platform=te(gn),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=te(Fe),this._injector=te(yt),this._isDestroyed=!1,this.attachDomPortal=u=>{this._portalOutlet.hasAttached();let h=this._portalOutlet.attachDomPortal(u);return this._contentAttached(),h},this._document=o,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{n.removeEventListener("blur",o),n.removeEventListener("mousedown",o),n.removeAttribute("tabindex")};n.addEventListener("blur",o),n.addEventListener("mousedown",o)})),n.focus(r)}_focusByCssSelector(n,r){let o=this._elementRef.nativeElement.querySelector(n);o&&this._forceFocus(o,r)}_trapFocus(){this._isDestroyed||fr(()=>{let n=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||n.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement()||this._focusDialogContainer();break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let o=Bm(),s=this._elementRef.nativeElement;(!o||o===this._document.body||o===s||s.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let n=this._elementRef.nativeElement,r=Bm();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Bm()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Cy),M(Ye,8),M(xu),M(Nh),M(Le),M(al),M(po))},e.\u0275cmp=le({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(r,o){if(r&1&&Ie(Qo,7),r&2){let s;be(s=ye())&&(o._portalOutlet=s.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,o){r&2&&Ze("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},standalone:!0,features:[nn,ce],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,o){r&1&&W(0,Wge,0,0,"ng-template",0)},dependencies:[Qo],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2});let i=e;return i})(),Z_=class{constructor(e,t){this.overlayRef=e,this.config=t,this.closed=new me,this.disableClose=t.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!mi(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(e,t){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(e),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",t=""){return this.overlayRef.updateSize({width:e,height:t}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},$ge=new ge("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.block()}}),qge=new ge("DialogData"),Yge=new ge("DefaultDialogConfig");var Xge=0,FO=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(n,r,o,s,a,l){this._overlay=n,this._injector=r,this._defaultOptions=o,this._parentDialog=s,this._overlayContainer=a,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new me,this._afterOpenedAtThisLevel=new me,this._ariaHiddenElements=new Map,this.afterAllClosed=Io(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(pi(void 0))),this._scrollStrategy=l}open(n,r){let o=this._defaultOptions||new xu;r=Z(Z({},o),r),r.id=r.id||`cdk-dialog-${Xge++}`,r.id&&this.getDialogById(r.id);let s=this._getOverlayConfig(r),a=this._overlay.create(s),l=new Z_(a,r),c=this._attachContainer(a,l,r);return l.containerInstance=c,this._attachDialogContent(n,l,c,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(l),l.closed.subscribe(()=>this._removeOpenDialog(l,!0)),this.afterOpened.next(l),l}closeAll(){kO(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){kO(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),kO(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new ui({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,o){let s=o.injector||o.viewContainerRef?.injector,a=[{provide:xu,useValue:o},{provide:Z_,useValue:r},{provide:al,useValue:n}],l;o.container?typeof o.container=="function"?l=o.container:(l=o.container.type,a.push(...o.container.providers(o))):l=LO;let c=new Di(l,o.viewContainerRef,yt.create({parent:s||this._injector,providers:a}),o.componentFactoryResolver);return n.attach(c).instance}_attachDialogContent(n,r,o,s){if(n instanceof Hn){let a=this._createInjector(s,r,o,void 0),l={$implicit:s.data,dialogRef:r};s.templateContext&&(l=Z(Z({},l),typeof s.templateContext=="function"?s.templateContext():s.templateContext)),o.attachTemplatePortal(new jr(n,null,l,a))}else{let a=this._createInjector(s,r,o,this._injector),l=o.attachComponentPortal(new Di(n,s.viewContainerRef,a,s.componentFactoryResolver));r.componentRef=l,r.componentInstance=l.instance}}_createInjector(n,r,o,s){let a=n.injector||n.viewContainerRef?.injector,l=[{provide:qge,useValue:n.data},{provide:Z_,useValue:r}];return n.providers&&(typeof n.providers=="function"?l.push(...n.providers(r,n,o)):l.push(...n.providers)),n.direction&&(!a||!a.get(ai,null,{optional:!0}))&&l.push({provide:ai,useValue:{value:n.direction,change:Ke()}}),yt.create({parent:a||s,providers:l})}_removeOpenDialog(n,r){let o=this.openDialogs.indexOf(n);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,a)=>{s?a.setAttribute("aria-hidden",s):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let o=r.length-1;o>-1;o--){let s=r[o];s!==n&&s.nodeName!=="SCRIPT"&&s.nodeName!=="STYLE"&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}};e.\u0275fac=function(r){return new(r||e)(X(Ht),X(yt),X(Yge,8),X(e,12),X(tf),X($ge))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function kO(i,e){let t=i.length;for(;t--;)e(i[t])}var Pj=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[FO],imports:[Jr,Ms,My,Ms]});let i=e;return i})();function Zge(i,e){}var Q_=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},BO="mdc-dialog--open",Oj="mdc-dialog--opening",Rj="mdc-dialog--closing",Qge=150,Kge=75,Jge=(()=>{let e=class e extends LO{constructor(n,r,o,s,a,l,c,d,u){super(n,r,o,s,a,l,c,u),this._animationMode=d,this._animationStateChanged=new Pe,this._animationsEnabled=this._animationMode!=="NoopAnimations",this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?Nj(this._config.enterAnimationDuration)??Qge:0,this._exitAnimationDuration=this._animationsEnabled?Nj(this._config.exitAnimationDuration)??Kge:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Aj,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Oj,BO)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(BO),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(BO),this._animationsEnabled?(this._hostElement.style.setProperty(Aj,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Rj)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(n){this._actionSectionCount+=n,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(Oj,Rj)}_waitForAnimationToComplete(n,r){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(r,n)}_requestAnimationFrame(n){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(n):n()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(n){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:n})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(n){let r=super.attachComponentPortal(n);return r.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),r}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Cy),M(Ye,8),M(Q_),M(Nh),M(Le),M(al),M(Zn,8),M(po))},e.\u0275cmp=le({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(r,o){r&2&&(No("id",o._config.id),Ze("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),se("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},standalone:!0,features:[nn,ce],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(r,o){r&1&&(v(0,"div",0)(1,"div",1),W(2,Zge,0,0,"ng-template",2),y()())},dependencies:[Qo],styles:['.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));border-radius:var(--mdc-dialog-container-shape, 4px);background-color:var(--mdc-dialog-container-color, white)}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, rgba(0, 0, 0, 0.87));font-family:var(--mdc-dialog-subhead-font, Roboto, sans-serif);line-height:var(--mdc-dialog-subhead-line-height, 1.5rem);font-size:var(--mdc-dialog-subhead-size, 1rem);font-weight:var(--mdc-dialog-subhead-weight, 400);letter-spacing:var(--mdc-dialog-subhead-tracking, 0.03125em)}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, rgba(0, 0, 0, 0.6));font-family:var(--mdc-dialog-supporting-text-font, Roboto, sans-serif);line-height:var(--mdc-dialog-supporting-text-line-height, 1.5rem);font-size:var(--mdc-dialog-supporting-text-size, 1rem);font-weight:var(--mdc-dialog-supporting-text-weight, 400);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 0.03125em)}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.cdk-high-contrast-active .mat-mdc-dialog-actions{border-top-color:CanvasText}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}'],encapsulation:2});let i=e;return i})(),Aj="--mat-dialog-transition-duration";function Nj(i){return i==null?null:typeof i=="number"?i:i.endsWith("ms")?$s(i.substring(0,i.length-2)):i.endsWith("s")?$s(i.substring(0,i.length-1))*1e3:i==="0"?0:null}var jC=function(i){return i[i.OPEN=0]="OPEN",i[i.CLOSING=1]="CLOSING",i[i.CLOSED=2]="CLOSED",i}(jC||{}),K_=class{constructor(e,t,n){this._ref=e,this._containerInstance=n,this._afterOpened=new me,this._beforeClosed=new me,this._state=jC.OPEN,this.disableClose=t.disableClose,this.id=e.id,e.addPanelClass("mat-mdc-dialog-panel"),n._animationStateChanged.pipe(Gt(r=>r.state==="opened"),_n(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(Gt(r=>r.state==="closed"),_n(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),e.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Yn(this.backdropClick(),this.keydownEvents().pipe(Gt(r=>r.keyCode===27&&!this.disableClose&&!mi(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),kj(this,r.type==="keydown"?"keyboard":"mouse"))})}close(e){this._result=e,this._containerInstance._animationStateChanged.pipe(Gt(t=>t.state==="closing"),_n(1)).subscribe(t=>{this._beforeClosed.next(e),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=jC.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(e){let t=this._ref.config.positionStrategy;return e&&(e.left||e.right)?e.left?t.left(e.left):t.right(e.right):t.centerHorizontally(),e&&(e.top||e.bottom)?e.top?t.top(e.top):t.bottom(e.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(e="",t=""){return this._ref.updateSize(e,t),this}addPanelClass(e){return this._ref.addPanelClass(e),this}removePanelClass(e){return this._ref.removePanelClass(e),this}getState(){return this._state}_finishDialogClose(){this._state=jC.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function kj(i,e,t){return i._closeInteractionType=e,i.close(t)}var e_e=new ge("MatMdcDialogData"),t_e=new ge("mat-mdc-dialog-default-options"),n_e=new ge("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.block()}});var i_e=0,wu=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(n,r,o,s,a,l,c,d){this._overlay=n,this._defaultOptions=s,this._scrollStrategy=a,this._parentDialog=l,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new me,this._afterOpenedAtThisLevel=new me,this.dialogConfigClass=Q_,this.afterAllClosed=Io(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(pi(void 0))),this._dialog=r.get(FO),this._dialogRefConstructor=K_,this._dialogContainerType=Jge,this._dialogDataToken=e_e}open(n,r){let o;r=Z(Z({},this._defaultOptions||new Q_),r),r.id=r.id||`mat-mdc-dialog-${i_e++}`,r.scrollStrategy=r.scrollStrategy||this._scrollStrategy();let s=this._dialog.open(n,wt(Z({},r),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:r},{provide:xu,useValue:r}]},templateContext:()=>({dialogRef:o}),providers:(a,l,c)=>(o=new this._dialogRefConstructor(a,r,c),o.updatePosition(r?.position),[{provide:this._dialogContainerType,useValue:c},{provide:this._dialogDataToken,useValue:l.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=s.componentRef,o.componentInstance=s.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let a=this.openDialogs.indexOf(o);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(n){let r=n.length;for(;r--;)n[r].close()}};e.\u0275fac=function(r){return new(r||e)(X(Ht),X(yt),X(Pa,8),X(t_e,8),X(n_e),X(e,12),X(tf),X(Zn,8))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),r_e=0,lf=(()=>{let e=class e{constructor(n,r,o){this.dialogRef=n,this._elementRef=r,this._dialog=o,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=Fj(this._elementRef,this._dialog.openDialogs))}ngOnChanges(n){let r=n._matDialogClose||n._matDialogCloseResult;r&&(this.dialogResult=r.currentValue)}_onButtonClick(n){kj(this.dialogRef,n.screenX===0&&n.screenY===0?"keyboard":"mouse",this.dialogResult)}};e.\u0275fac=function(r){return new(r||e)(M(K_,8),M(Re),M(wu))},e.\u0275dir=ze({type:e,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(r,o){r&1&&H("click",function(a){return o._onButtonClick(a)}),r&2&&Ze("aria-label",o.ariaLabel||null)("type",o.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[dn]});let i=e;return i})(),Lj=(()=>{let e=class e{constructor(n,r,o){this._dialogRef=n,this._elementRef=r,this._dialog=o}ngOnInit(){this._dialogRef||(this._dialogRef=Fj(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}};e.\u0275fac=function(r){return new(r||e)(M(K_,8),M(Re),M(wu))},e.\u0275dir=ze({type:e,standalone:!0});let i=e;return i})(),cf=(()=>{let e=class e extends Lj{constructor(){super(...arguments),this.id=`mat-mdc-dialog-title-${r_e++}`}_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(r,o){r&2&&No("id",o.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],standalone:!0,features:[nn]});let i=e;return i})(),df=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=ze({type:e,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0,features:[x2([rO])]});let i=e;return i})(),uf=(()=>{let e=class e extends Lj{_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Ai(e)))(o||e)}})(),e.\u0275dir=ze({type:e,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(r,o){r&2&&se("mat-mdc-dialog-actions-align-start",o.align==="start")("mat-mdc-dialog-actions-align-center",o.align==="center")("mat-mdc-dialog-actions-align-end",o.align==="end")},inputs:{align:"align"},standalone:!0,features:[nn]});let i=e;return i})();function Fj(i,e){let t=i.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?e.find(n=>n.id===t.id):null}var ha=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[wu],imports:[Pj,Jr,Ms,qt,qt]});let i=e;return i})();function Kj(i){let e=i.cloneNode(!0),t=e.querySelectorAll("[id]"),n=i.nodeName.toLowerCase();e.removeAttribute("id");for(let r=0;r=n&&t<=r&&e>=o&&e<=s}function tv(i,e,t){i.top+=e,i.bottom=i.top+i.height,i.left+=t,i.right=i.left+i.width}function Uj(i,e,t,n){let{top:r,right:o,bottom:s,left:a,width:l,height:c}=i,d=l*e,u=c*e;return n>r-u&&na-d&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:$O(t)})})}handleScroll(e){let t=Si(e),n=this.positions.get(t);if(!n)return null;let r=n.scrollPosition,o,s;if(t===this._document){let c=this.getViewportScrollPosition();o=c.top,s=c.left}else o=t.scrollTop,s=t.scrollLeft;let a=r.top-o,l=r.left-s;return this.positions.forEach((c,d)=>{c.clientRect&&t!==d&&t.contains(d)&&tv(c.clientRect,a,l)}),r.top=o,r.left=s,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Jj(i,e){let t=i.rootNodes;if(t.length===1&&t[0].nodeType===e.ELEMENT_NODE)return t[0];let n=e.createElement("div");return t.forEach(r=>n.appendChild(r)),n}function qO(i,e,t){for(let n in e)if(e.hasOwnProperty(n)){let r=e[n];r?i.setProperty(n,r,t?.has(n)?"important":""):i.removeProperty(n)}return i}function hf(i,e){let t=e?"":"none";qO(i.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function Hj(i,e,t){qO(i.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function XC(i,e){return e&&e!="none"?i+" "+e:i}function Gj(i,e){i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.transform=ZC(e.left,e.top)}function ZC(i,e){return`translate3d(${Math.round(i)}px, ${Math.round(e)}px, 0)`}function jj(i){let e=i.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(i)*e}function s_e(i){let e=getComputedStyle(i),t=VO(e,"transition-property"),n=t.find(a=>a==="transform"||a==="all");if(!n)return 0;let r=t.indexOf(n),o=VO(e,"transition-duration"),s=VO(e,"transition-delay");return jj(o[r])+jj(s[r])}function VO(i,e){return i.getPropertyValue(e).split(",").map(n=>n.trim())}var a_e=new Set(["position"]),UO=class{get element(){return this._preview}constructor(e,t,n,r,o,s,a,l,c){this._document=e,this._rootElement=t,this._direction=n,this._initialDomRect=r,this._previewTemplate=o,this._previewClass=s,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),"showPopover"in this._preview&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return s_e(this._preview)}addEventListener(e,t){this._preview.addEventListener(e,t)}removeEventListener(e,t){this._preview.removeEventListener(e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,n=e?e.template:null,r;if(n&&e){let o=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(n,e.context);s.detectChanges(),r=Jj(s,this._document),this._previewEmbeddedView=s,e.matchSize?Gj(r,o):r.style.transform=ZC(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=Kj(this._rootElement),Gj(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return qO(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},a_e),hf(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(o=>r.classList.add(o)):r.classList.add(t)),r}},Wj=Fr({passive:!0}),WC=Fr({passive:!1}),$j=Fr({passive:!1,capture:!0}),l_e=800,qj=new Set(["position"]),HO=class{get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>hf(t,e)))}constructor(e,t,n,r,o,s){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=xt(!1),this._moveEvents=new me,this._pointerMoveSubscription=Ct.EMPTY,this._pointerUpSubscription=Ct.EMPTY,this._scrollSubscription=Ct.EMPTY,this._resizeSubscription=Ct.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new me,this.started=new me,this.released=new me,this.ended=new me,this.entered=new me,this.exited=new me,this.dropped=new me,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{let l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging()){let d=Math.abs(l.x-this._pickupPositionOnPage.x),u=Math.abs(l.y-this._pickupPositionOnPage.y);if(d+u>=this._config.dragStartThreshold){let p=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),f=this._dropContainer;if(!p){this._endDragSequence(a);return}(!f||!f.isDragging()&&!f.isReceiving())&&(a.cancelable&&a.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(a)))}return}a.cancelable&&a.preventDefault();let c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{let d=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,u=this._activeTransform;u.x=c.x-d.x+this._passiveTransform.x,u.y=c.y-d.y+this._passiveTransform.y,this._applyRootElementTransform(u.x,u.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new YC(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(n=>er(n)),this._handles.forEach(n=>hf(n,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=er(e);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,WC),t.addEventListener("touchstart",this._pointerDown,Wj),t.addEventListener("dragstart",this._nativeDragStart,WC)}),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?er(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),hf(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),hf(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",Xj,$j)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){ev(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{t.addEventListener("selectstart",Xj,$j)}),n){let r=this._rootElement,o=r.parentNode,s=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");o.insertBefore(a,r),this._initialTransform=r.style.transform||"",this._preview=new UO(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3),this._preview.attach(this._getPreviewInsertionPoint(o,t)),Hj(r,!1,qj),this._document.body.appendChild(o.replaceChild(s,r)),this.started.next({source:this,event:e}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let n=this.isDragging(),r=ev(t),o=!r&&t.button!==0,s=this._rootElement,a=Si(t),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+l_e>Date.now(),c=r?yd(t):bd(t);if(a&&a.draggable&&t.type==="mousedown"&&t.preventDefault(),n||o||l||c)return;if(this._handles.length){let h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=$O(this._boundaryElement));let d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){Hj(this._rootElement,!0,qj),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),o=this._getDragDistance(r),s=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:e}),t.drop(this,n,this._initialIndex,this._initialContainer,s,o,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:n,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,t,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=s=>{(!s||this._preview&&Si(s)===this._preview.element&&s.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",r),n(),clearTimeout(o))},o=setTimeout(r,t*1.5);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,n;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),n=Jj(this._placeholderRef,this._document)):n=Kj(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,t,n){let r=t===this._rootElement?null:t,o=r?r.getBoundingClientRect():e,s=ev(n)?n.targetTouches[0]:n,a=this._getViewportScrollPosition(),l=s.pageX-o.left-a.left,c=s.pageY-o.top-a.top;return{x:o.left-e.left+l,y:o.top-e.top+c}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),n=ev(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=n.pageX-t.left,o=n.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=o,a.matrixTransform(s.inverse())}}return{x:r,y:o}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:o,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),d=a.top+s,u=a.bottom-(c-s),h=a.left+o,p=a.right-(l-o);n=Yj(n,h,p),r=Yj(r,d,u)}return{x:n,y:r}}_updatePointerDirectionDelta(e){let{x:t,y:n}=e,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-o.x),a=Math.abs(n-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=t>o.x?1:-1,o.x=t),a>this._config.pointerDirectionChangeThreshold&&(r.y=n>o.y?1:-1,o.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,hf(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,WC),e.removeEventListener("touchstart",this._pointerDown,Wj),e.removeEventListener("dragstart",this._nativeDragStart,WC)}_applyRootElementTransform(e,t){let n=ZC(e,t),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=XC(n,this._initialTransform)}_applyPreviewTransform(e,t){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=ZC(e,t);this._preview.setTransform(XC(r,n))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let o=r.left-n.left,s=n.right-r.right,a=r.top-n.top,l=n.bottom-r.bottom;r.width>n.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,r.height>n.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:ev(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let n=Si(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&tv(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=Eh(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let n=this._previewContainer||"global";if(n==="parent")return e;if(n==="global"){let r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return er(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function Yj(i,e,t){return Math.max(e,Math.min(t,i))}function ev(i){return i.type[0]==="t"}function Xj(i){i.preventDefault()}function e5(i,e,t){let n=Zj(e,i.length-1),r=Zj(t,i.length-1);if(n===r)return;let o=i[n],s=r0)return null;let a=this.orientation==="horizontal",l=o.findIndex(b=>b.drag===e),c=o[s],d=o[l].clientRect,u=c.clientRect,h=l>s?1:-1,p=this._getItemOffsetPx(d,u,h),f=this._getSiblingOffsetPx(l,o,h),m=o.slice();return e5(o,l,s),o.forEach((b,g)=>{if(m[g]===b)return;let _=b.drag===e,x=_?p:f,C=_?e.getPlaceholderElement():b.drag.getRootElement();b.offset+=x,a?(C.style.transform=XC(`translate3d(${Math.round(b.offset)}px, 0, 0)`,b.initialTransform),tv(b.clientRect,0,x)):(C.style.transform=XC(`translate3d(0, ${Math.round(b.offset)}px, 0)`,b.initialTransform),tv(b.clientRect,x,0))}),this._previousSwap.overlaps=zO(u,t,n),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:l,currentIndex:s}}enter(e,t,n,r){let o=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r,s=this._activeDraggables,a=s.indexOf(e),l=e.getPlaceholderElement(),c=s[o];if(c===e&&(c=s[o+1]),!c&&(o==null||o===-1||o-1&&s.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){let d=c.getRootElement();d.parentElement.insertBefore(l,d),s.splice(o,0,e)}else this._element.appendChild(l),s.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let n=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(n=>n.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:n})=>{tv(n,e,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:$O(n)}}).sort((t,n)=>e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(e,t,n){let r=this.orientation==="horizontal",o=r?t.left-e.left:t.top-e.top;return n===-1&&(o+=r?t.width-e.width:t.height-e.height),o}_getSiblingOffsetPx(e,t,n){let r=this.orientation==="horizontal",o=t[e].clientRect,s=t[e+n*-1],a=o[r?"width":"height"]*n;if(s){let l=r?"left":"top",c=r?"right":"bottom";n===-1?a-=s.clientRect[l]-o[c]:a+=o[l]-s.clientRect[c]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let s=n[n.length-1].clientRect;return r?e>=s.right:t>=s.bottom}else{let s=n[0].clientRect;return r?e<=s.left:t<=s.top}}_getItemIndexFromPointerPosition(e,t,n,r){let o=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(r){let c=o?r.x:r.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return o?t>=Math.floor(l.left)&&t=Math.floor(l.top)&&nl?d.after(c):d.before(c),e5(this._activeItems,l,o);let u=this._getRootNode().elementFromPoint(t,n);return s.deltaX=r.x,s.deltaY=r.y,s.drag=a,s.overlaps=d===u||d.contains(u),{previousIndex:l,currentIndex:o}}enter(e,t,n,r){let o=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r;o===-1&&(o=this._getClosestItemIndexToPointer(e,t,n));let s=this._activeItems[o],a=this._activeItems.indexOf(e);a>-1&&this._activeItems.splice(a,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(o,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,o]=this._relatedNodes[n];r.parentNode===e&&r.nextSibling!==o&&(o===null?e.appendChild(r):o.parentNode===e&&e.insertBefore(r,o))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,n){let r=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(n)),o=r?this._activeItems.findIndex(s=>{let a=s.getRootElement();return r===a||a.contains(r)}):-1;return o===-1||!this._sortPredicate(o,e)?-1:o}_getRootNode(){return this._rootNode||(this._rootNode=Eh(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,o=-1;for(let s=0;s!0,this.sortPredicate=()=>!0,this.beforeStarted=new me,this.entered=new me,this.exited=new me,this.dropped=new me,this.sorted=new me,this.receivingStarted=new me,this.receivingStopped=new me,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=Ct.EMPTY,this._verticalScrollDirection=is.NONE,this._horizontalScrollDirection=Wr.NONE,this._stopScrollTimers=new me,this._cachedShadowRoot=null,this._scrollableElements=[],this._direction="ltr",this._startScrollInterval=()=>{this._stopScrolling(),ES(0,Sv).pipe(Xe(this._stopScrollTimers)).subscribe(()=>{let a=this._scrollNode,l=this.autoScrollStep;this._verticalScrollDirection===is.UP?a.scrollBy(0,-l):this._verticalScrollDirection===is.DOWN&&a.scrollBy(0,l),this._horizontalScrollDirection===Wr.LEFT?a.scrollBy(-l,0):this._horizontalScrollDirection===Wr.RIGHT&&a.scrollBy(l,0)})};let s=this.element=er(e);this._document=n,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new YC(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,n,r,o,s,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:l})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>e.indexOf(r)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof QC&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new GO(this._document,this._dragDropRegistry);else{let t=new QC(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,n)=>this.sortPredicate(t,n,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=er(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(e);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,n,r){if(this.sortingDisabled||!this._domRect||!Uj(this._domRect,Qj,t,n))return;let o=this._sortStrategy.sort(e,t,n,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let n,r=is.NONE,o=Wr.NONE;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||n||Uj(s.clientRect,Qj,e,t)&&([r,o]=c_e(a,s.clientRect,this._direction,e,t),(r||o)&&(n=a))}),!r&&!o){let{width:s,height:a}=this._viewportRuler.getViewportSize(),l={width:s,height:a,top:0,right:s,bottom:a,left:0};r=n5(l,t),o=i5(l,e),n=window}n&&(r!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=o,this._scrollNode=n,(r||o)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(e,t){return this._domRect!=null&&zO(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,n){return this._siblings.find(r=>r._canReceive(e,t,n))}_canReceive(e,t,n){if(!this._domRect||!zO(this._domRect,t,n)||!this.enterPredicate(e,this))return!1;let r=this._getShadowRoot().elementFromPoint(t,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(e,t){let n=this._activeSiblings;!n.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=Eh(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function n5(i,e){let{top:t,bottom:n,height:r}=i,o=r*t5;return e>=t-o&&e<=t+o?is.UP:e>=n-o&&e<=n+o?is.DOWN:is.NONE}function i5(i,e){let{left:t,right:n,width:r}=i,o=r*t5;return e>=t-o&&e<=t+o?Wr.LEFT:e>=n-o&&e<=n+o?Wr.RIGHT:Wr.NONE}function c_e(i,e,t,n,r){let o=n5(e,r),s=i5(e,n),a=is.NONE,l=Wr.NONE;if(o){let c=i.scrollTop;o===is.UP?c>0&&(a=is.UP):i.scrollHeight-c>i.clientHeight&&(a=is.DOWN)}if(s){let c=i.scrollLeft;t==="rtl"?s===Wr.RIGHT?c<0&&(l=Wr.RIGHT):i.scrollWidth+c>i.clientWidth&&(l=Wr.LEFT):s===Wr.LEFT?c>0&&(l=Wr.LEFT):i.scrollWidth-c>i.clientWidth&&(l=Wr.RIGHT)}return[a,l]}var $C=Fr({passive:!1,capture:!0}),qC=new Set,d_e=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=le({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],standalone:!0,features:[ce],decls:0,vars:0,template:function(r,o){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0});let i=e;return i})(),u_e=(()=>{let e=class e{constructor(n,r){this._ngZone=n,this._appRef=te(us),this._environmentInjector=te(qi),this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=xt([]),this._globalListeners=new Map,this._draggingPredicate=o=>o.isDragging(),this.pointerMove=new me,this.pointerUp=new me,this.scroll=new me,this._preventDefaultWhileDragging=o=>{this._activeDragInstances().length>0&&o.preventDefault()},this._persistentTouchmoveListener=o=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&o.preventDefault(),this.pointerMove.next(o))},this._document=r}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,$C)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,$C)}startDragging(n,r){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._loadResets(),this._activeDragInstances.update(o=>[...o,n]),this._activeDragInstances().length===1)){let o=r.type.startsWith("touch");this._globalListeners.set(o?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:$C}),o||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:$C}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,a)=>{this._document.addEventListener(a,s.handler,s.options)})})}}stopDragging(n){this._activeDragInstances.update(r=>{let o=r.indexOf(n);return o>-1?(r.splice(o,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let r=[this.scroll];return n&&n!==this._document&&r.push(new Mt(o=>this._ngZone.runOutsideAngular(()=>{let a=l=>{this._activeDragInstances().length&&o.next(l)};return n.addEventListener("scroll",a,!0),()=>{n.removeEventListener("scroll",a,!0)}}))),Yn(...r)}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((n,r)=>{this._document.removeEventListener(r,n.handler,n.options)}),this._globalListeners.clear()}_loadResets(){if(!qC.has(this._appRef)){qC.add(this._appRef);let n=Q2(d_e,{environmentInjector:this._environmentInjector});this._appRef.onDestroy(()=>{qC.delete(this._appRef),qC.size===0&&n.destroy()})}}};e.\u0275fac=function(r){return new(r||e)(X(Le),X(Ye))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),h_e={dragStartThreshold:5,pointerDirectionChangeThreshold:5},r5=(()=>{let e=class e{constructor(n,r,o,s){this._document=n,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s}createDrag(n,r=h_e){return new HO(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(n){return new jO(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}};e.\u0275fac=function(r){return new(r||e)(X(Ye),X(Le),X(ra),X(u_e))},e.\u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),WO=new ge("CDK_DRAG_PARENT");var o5=new ge("CdkDragHandle"),s5=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(n){this._disabled=n,this._stateChanges.next(this)}constructor(n,r){this.element=n,this._parentDrag=r,this._stateChanges=new me,this._disabled=!1,r?._addHandle(this)}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(WO,12))},e.\u0275dir=ze({type:e,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[2,"cdkDragHandleDisabled","disabled",at]},standalone:!0,features:[Bt([{provide:o5,useExisting:e}]),an]});let i=e;return i})(),p_e=new ge("CDK_DRAG_CONFIG"),f_e="cdk-drag",m_e=new ge("CdkDropList"),a5=(()=>{let e=class e{get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}constructor(n,r,o,s,a,l,c,d,u,h,p){this.element=n,this.dropContainer=r,this._ngZone=s,this._viewContainerRef=a,this._dir=c,this._changeDetectorRef=u,this._selfHandle=h,this._parentDrag=p,this._destroyed=new me,this._handles=new Dn([]),this.started=new Pe,this.released=new Pe,this.ended=new Pe,this.entered=new Pe,this.exited=new Pe,this.dropped=new Pe,this.moved=new Mt(f=>{let m=this._dragRef.moved.pipe(Je(b=>({source:this,pointerPosition:b.pointerPosition,event:b.event,delta:b.delta,distance:b.distance}))).subscribe(f);return()=>{m.unsubscribe()}}),this._injector=te(yt),this._dragRef=d.createDrag(n,{dragStartThreshold:l&&l.dragStartThreshold!=null?l.dragStartThreshold:5,pointerDirectionChangeThreshold:l&&l.pointerDirectionChangeThreshold!=null?l.pointerDirectionChangeThreshold:5,zIndex:l?.zIndex}),this._dragRef.data=this,e._dragInstances.push(this),l&&this._assignDefaults(l),r&&(this._dragRef._withDropContainer(r._dropListRef),r.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){fr(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let r=n.rootElementSelector,o=n.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),o&&!o.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);let n=e._dragInstances.indexOf(this);n>-1&&e._dragInstances.splice(n,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(n){let r=this._handles.getValue();r.push(n),this._handles.next(r)}_removeHandle(n){let r=this._handles.getValue(),o=r.indexOf(n);o>-1&&(r.splice(o,1),this._handles.next(r))}_setPreviewTemplate(n){this._previewTemplate=n}_resetPreviewTemplate(n){n===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(n){this._placeholderTemplate=n}_resetPlaceholderTemplate(n){n===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let n=this.element.nativeElement,r=n;this.rootElementSelector&&(r=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):er(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,o=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.dragStartDelay=typeof o=="object"&&o?o:$s(o),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(a).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(_n(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){if(r.classList.contains(f_e)){n.withParent(e._dragInstances.find(o=>o.element.nativeElement===r)?._dragRef||null);break}r=r.parentElement}})}_handleEvents(n){n.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),n.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),n.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),n.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(n){let{lockAxis:r,dragStartDelay:o,constrainPosition:s,previewClass:a,boundaryElement:l,draggingDisabled:c,rootElementSelector:d,previewContainer:u}=n;this.disabled=c??!1,this.dragStartDelay=o||0,r&&(this.lockAxis=r),s&&(this.constrainPosition=s),a&&(this.previewClass=a),l&&(this.boundaryElement=l),d&&(this.rootElementSelector=d),u&&(this.previewContainer=u)}_setupHandlesListener(){this._handles.pipe(Sn(n=>{let r=n.map(o=>o.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),Xn(n=>Yn(...n.map(r=>r._stateChanges.pipe(pi(r))))),Xe(this._destroyed)).subscribe(n=>{let r=this._dragRef,o=n.element.nativeElement;n.disabled?r.disableHandle(o):r.enableHandle(o)})}};e._dragInstances=[],e.\u0275fac=function(r){return new(r||e)(M(Re),M(m_e,12),M(Ye),M(Le),M(Yt),M(p_e,8),M(ai,8),M(r5),M(Fe),M(o5,10),M(WO,12))},e.\u0275dir=ze({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(r,o){r&2&&se("cdk-drag-disabled",o.disabled)("cdk-drag-dragging",o._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",at],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[Bt([{provide:WO,useExisting:e}]),an,dn]});let i=e;return i})();var l5=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[r5],imports:[Zo]});let i=e;return i})();var YO=(i,e)=>e.type;function __e(i,e){if(i&1){let t=ie();v(0,"div",18),H("click",function(){let r=V(t).$implicit,o=I(2).$index,s=I();return z(s.handleToggleMatchType(o,r.type))}),v(1,"mat-icon"),S(2),y()()}if(i&2){let t=e.$implicit,n=I(2).$implicit,r=I();se("selected",r.getIsMatchTypeSelected(n,t.type))("disabled",r.getDisableMatchType(n,t.type)),N("matTooltip",t.tooltip),w(2),nt(t.type)}}function v_e(i,e){if(i&1){let t=ie();v(0,"div",12)(1,"div",13),S(2,"R"),y(),v(3,"div",14),S(4,"E"),y()(),v(5,"input",15,1),H("change",function(){V(t);let r=ve(6),o=I().$index,s=I();return z(s.handleRegexQueryChanged(o,r.value))}),y(),v(7,"div",16),ln(8,__e,3,6,"div",17,YO),y()}if(i&2){let t=I().$implicit,n=I();w(5),N("value",t.queryRegex),w(3),cn(n.allSearchMatchTypeOptions)}}function b_e(i,e){if(i&1){let t=ie();v(0,"div",19),S(1," [\xB7\xB7] "),y(),v(2,"div",20)(3,"input",21,2),H("change",function(){V(t);let r=ve(4),o=ve(8),s=ve(12),a=I().$index,l=I();return z(l.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),y(),v(5,"div",22),S(6,":"),y(),v(7,"input",23,3),H("change",function(){V(t);let r=ve(4),o=ve(8),s=ve(12),a=I().$index,l=I();return z(l.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),y(),v(9,"div",24),S(10,","),y(),v(11,"input",25,4),H("change",function(){V(t);let r=ve(4),o=ve(8),s=ve(12),a=I().$index,l=I();return z(l.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),y()()}if(i&2){let t=I().$implicit,n=I();w(3),N("value",t.attrName),w(4),N("value",n.getAttrValueRangeString(t.min)),w(4),N("value",n.getAttrValueRangeString(t.max))}}function y_e(i,e){if(i&1&&(v(0,"option",28),S(1),y()),i&2){let t=e.$implicit,n=I(2).$implicit;N("value",t.type)("selected",t.type===n.nodeType),w(),Me(" ",t.label," ")}}function x_e(i,e){if(i&1){let t=ie();v(0,"div",26)(1,"mat-icon"),S(2,"device_hub"),y()(),v(3,"select",27,5),H("change",function(){V(t);let r=ve(4),o=I().$index,s=I();return z(s.handleNodeTypeChanged(o,r.value))}),ln(5,y_e,2,3,"option",28,YO),y()}if(i&2){let t=I(2);w(5),cn(t.allSearchNodeTypes)}}function w_e(i,e){if(i&1){let t=ie();v(0,"div",29),H("click",function(){V(t);let r=I().$index,o=I();return z(o.handleDeleteQuery(r))}),v(1,"mat-icon"),S(2,"delete"),y()()}}function C_e(i,e){if(i&1&&(v(0,"div",7),W(1,v_e,10,1)(2,b_e,13,3)(3,x_e,7,0)(4,w_e,3,0,"div",11),y()),i&2){let t,n=e.$implicit,r=I();w(),ae((t=n.type)===r.NodeQueryType.REGEX?1:t===r.NodeQueryType.ATTR_VALUE_RANGE?2:t===r.NodeQueryType.NODE_TYPE?3:-1),w(3),ae(r.getShowDeleteQueryButton(n)?4:-1)}}function S_e(i,e){i&1&&(v(0,"div",31)(1,"div",13),S(2,"R"),y(),v(3,"div",14),S(4,"E"),y()())}function M_e(i,e){i&1&&(v(0,"div",32),S(1," [\xB7\xB7] "),y())}function E_e(i,e){if(i&1){let t=ie();v(0,"div",30),H("click",function(){let r=V(t).$implicit,o=I();return z(o.handleAddQuery(r.type))}),W(1,S_e,5,0,"div",31)(2,M_e,2,0,"div",32),v(3,"div",33),S(4),y()()}if(i&2){let t,n=e.$implicit,r=I();w(),ae((t=n.type)===r.NodeQueryType.REGEX?1:t===r.NodeQueryType.ATTR_VALUE_RANGE?2:-1),w(3),nt(n.label)}}var c5=(()=>{class i{changeDetectorRef;queries=[];queriesUpdated=new Pe;NodeQueryType=Ln;allSearchMatchTypeOptions=[{type:vt.NODE_LABEL,tooltip:"Match label"},{type:vt.ATTRIBUTE,tooltip:"Match attributes"},{type:vt.INPUT_METADATA,tooltip:"Match inputs (op node only)"},{type:vt.OUTPUT_METADATA,tooltip:"Match outputs (op node only)"}];allSearchNodeTypes=[{type:mr.OP_NODES,label:"Op nodes only"},{type:mr.LAYER_NODES,label:"Layer nodes only"},{type:mr.OP_AND_LAYER_NODES,label:"Op and layer nodes"}];allQueryTypes=[{type:Ln.REGEX,label:"Regex"},{type:Ln.ATTR_VALUE_RANGE,label:"Attribute value range"}];curQueries=[];curMatchedNodes={};constructor(t){this.changeDetectorRef=t}ngOnInit(){this.curQueries=JSON.parse(JSON.stringify(this.queries))}setMatchedNodes(t){this.curMatchedNodes=t,this.changeDetectorRef.markForCheck()}handleRegexQueryChanged(t,n){let r=this.curQueries[t];r.queryRegex=n.trim(),this.queriesUpdated.emit([...this.curQueries])}handleAttrValueRangeQueryChanged(t,n,r,o){let s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;r!==""&&!isNaN(Number(r))&&(s=Number(r)),o!==""&&!isNaN(Number(o))&&(a=Number(o));let l=this.curQueries[t];l.attrName=n,l.min=s,l.max=a,this.queriesUpdated.emit([...this.curQueries])}handleNodeTypeChanged(t,n){let r=this.curQueries[t];r.nodeType=n,this.queriesUpdated.emit([...this.curQueries])}handleToggleMatchType(t,n){if(this.getDisableMatchType(this.curQueries[t],n))return;let r=this.curQueries[t],o=r.matchTypes.indexOf(n);o>=0?r.matchTypes.splice(o,1):r.matchTypes.push(n),this.queriesUpdated.emit([...this.curQueries])}handleDeleteQuery(t){this.curQueries.splice(t,1),this.queriesUpdated.emit([...this.curQueries])}handleAddQuery(t){switch(t){case Ln.REGEX:this.curQueries.push({type:t,queryRegex:"",matchTypes:[vt.NODE_LABEL]});break;case Ln.ATTR_VALUE_RANGE:this.curQueries.push({type:t,attrName:"",min:Number.NEGATIVE_INFINITY,max:Number.POSITIVE_INFINITY});break;case Ln.NODE_TYPE:this.curQueries.push({type:t,nodeType:mr.OP_NODES});break;default:break}this.queriesUpdated.emit([...this.curQueries])}getIsMatchTypeSelected(t,n){return t.matchTypes.includes(n)}getDisableMatchType(t,n){return t.matchTypes.length===1&&t.matchTypes[0]===n}getAttrValueRangeString(t){return t==null||t===Number.NEGATIVE_INFINITY||t===Number.POSITIVE_INFINITY?"":`${t}`}getShowDeleteQueryButton(t){return t.type!==Ln.NODE_TYPE}static \u0275fac=function(n){return new(n||i)(M(Fe))};static \u0275cmp=le({type:i,selectors:[["complex-queries"]],inputs:{queries:"queries"},outputs:{queriesUpdated:"queriesUpdated"},standalone:!0,features:[ce],decls:11,vars:1,consts:[["menu","matMenu"],["queryInput",""],["inputAttrName",""],["inputMin",""],["inputMax",""],["select",""],[1,"container"],[1,"query-container"],[1,"btn-add-query",3,"matMenuTriggerFor"],[1,"model-explorer-add-query-menu"],[1,"menu-item"],["matTooltip","Delete query","matTooltipPosition","right",1,"icon-container","delete"],["matTooltip","Regex","n","","matTooltipPosition","left",1,"model-explorer-regex-icon"],[1,"r"],[1,"e"],["placeholder","Regex",1,"regex","common-input",3,"change","value"],[1,"targets-container"],[1,"icon-container","match-type",3,"matTooltip","selected","disabled"],[1,"icon-container","match-type",3,"click","matTooltip"],["matTooltip","Attribute value range","matTooltipPosition","left",1,"model-explorer-attr-value-range-icon"],[1,"attrs-value-range-container"],["placeholder","Attr name",1,"common-input","attr-name",3,"change","value"],[1,"colon"],["placeholder","min",1,"common-input","min",3,"change","value"],[1,"to"],["placeholder","max",1,"common-input","max",3,"change","value"],["matTooltip","Node type","matTooltipPosition","left",1,"model-explorer-node-type-icon"],[1,"node-type-selector",3,"change"],[3,"value","selected"],["matTooltip","Delete query","matTooltipPosition","right",1,"icon-container","delete",3,"click"],[1,"menu-item",3,"click"],[1,"model-explorer-regex-icon"],[1,"model-explorer-attr-value-range-icon"],[1,"label"]],template:function(n,r){if(n&1&&(v(0,"div",6),ln(1,C_e,5,2,"div",7,Qr),v(3,"div",8)(4,"mat-icon"),S(5,"add"),y(),S(6," Add query "),y(),v(7,"mat-menu",9,0),ln(9,E_e,5,2,"div",10,YO),y()()),n&2){let o=ve(8);w(),cn(r.curQueries),w(2),N("matMenuTriggerFor",o),w(6),cn(r.allQueryTypes)}},dependencies:[Ae,it,gt,sa,Jo,vc,Jt,Wn],styles:[`.query-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-bottom:4px;position:relative;padding-right:36px}.query-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:22px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;padding:0 4px;outline:none}.query-container[_ngcontent-%COMP%] input.regex[_ngcontent-%COMP%]{flex-grow:1}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:240px}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] .colon[_ngcontent-%COMP%], .query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] .to[_ngcontent-%COMP%]{font-weight:700;margin:0 2px;height:22px}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:0}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.attr-name[_ngcontent-%COMP%]{flex-grow:1}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.min[_ngcontent-%COMP%], .query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.max[_ngcontent-%COMP%]{width:50px}.query-container[_ngcontent-%COMP%] .node-type-selector[_ngcontent-%COMP%]{border:1px solid #ccc;border-radius:4px;outline:none;height:23px;cursor:pointer;box-sizing:border-box;width:160px}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%]{display:flex;position:absolute;right:0;top:4px;cursor:pointer;opacity:.6}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%]:hover{opacity:1}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.targets-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2px}.targets-container[_ngcontent-%COMP%] .icon-container.match-type[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;background-color:#ddd;border-radius:4px;cursor:pointer;padding:4px}.targets-container[_ngcontent-%COMP%] .icon-container.match-type.selected[_ngcontent-%COMP%]{background-color:#a3c9ff}.targets-container[_ngcontent-%COMP%] .icon-container.match-type.disabled[_ngcontent-%COMP%]{cursor:default}.targets-container[_ngcontent-%COMP%] .icon-container.match-type[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:#333}.btn-add-query[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;width:fit-content;line-height:16px;opacity:.6;white-space:nowrap;margin-top:2px;-webkit-user-select:none;user-select:none;margin-left:19px}.btn-add-query[_ngcontent-%COMP%]:hover{opacity:1}.btn-add-query[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;margin-right:2px} .model-explorer-add-query-menu .menu-item{letter-spacing:normal!important;font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;font-size:12px;padding:0 8px;cursor:pointer;display:flex;align-items:center} .model-explorer-add-query-menu .menu-item .label{margin-left:6px} .model-explorer-add-query-menu .menu-item:hover{background-color:#eee} .model-explorer-regex-icon{display:flex;width:16px;height:16px;align-items:center;justify-content:center;font-weight:700;-webkit-user-select:none;user-select:none;color:#aaa} .model-explorer-regex-icon .r{font-size:12px} .model-explorer-regex-icon .e{font-size:8px;margin-top:2px} .model-explorer-attr-value-range-icon{display:flex;width:16px;height:16px;align-items:center;justify-content:center;font-size:10px;font-weight:700;-webkit-user-select:none;user-select:none;color:#aaa} .model-explorer-node-type-icon{width:16px;height:16px} .model-explorer-node-type-icon mat-icon{font-size:16px;width:16px;height:16px;color:#aaa} @@ -4036,7 +4036,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],changeDetection:0})}return i})();function T_e(i,e){if(i&1&&(v(0,"div",3),J(1,"io-tree",4),y()),i&2){let t=I();w(),N("data",t.curIoTreeData)("rendererId",t.rendererId)("tooltipPosition","right")}}var h5=(()=>{class i{nodes=[];rendererId="";labelSuffix="node";popupSize={minWidth:320,maxWidth:640,minHeight:0};curIoTreeData=[];ngOnChanges(t){t.nodes&&(this.curIoTreeData=cl(this.nodes,[],"incoming"))}get label(){let t=this.nodes.length;return`${t} ${this.labelSuffix}${t===1?"":"s"}`}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["node-list-viewer"]],inputs:{nodes:"nodes",rendererId:"rendererId",labelSuffix:"labelSuffix"},standalone:!0,features:[dn,ce],decls:5,vars:5,consts:[["nodeList",""],[1,"container"],["panelClass","model-explorer-node-list-panel",1,"label-container",3,"bubbleClick","overlaySize"],[1,"model-explorer-node-list"],[3,"data","rendererId","tooltipPosition"]],template:function(n,r){if(n&1&&(v(0,"div",1)(1,"div",2),S(2),y(),W(3,T_e,2,3,"ng-template",null,0,kt),y()),n&2){let o=ve(4);w(),se("disabled",r.nodes.length===0),N("bubbleClick",o)("overlaySize",r.popupSize),w(),Me(" ",r.label," ")}},dependencies:[wc,Ae,xc,it],styles:[`.container[_ngcontent-%COMP%]{display:flex;position:relative}.label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:4px 6px;border-radius:4px;background-color:#a3c9ff;line-height:14px;cursor:pointer;-webkit-user-select:none;user-select:none;opacity:.8}.label-container[_ngcontent-%COMP%]:hover{opacity:1}.label-container.disabled[_ngcontent-%COMP%]{pointer-events:none;background-color:#ddd} .model-explorer-node-list{font-size:12px;background-color:#fff;line-height:normal} .model-explorer-node-list-panel bubble-container{width:100%} +`],changeDetection:0})}return i})();function I_e(i,e){if(i&1&&(v(0,"div",3),J(1,"io-tree",4),y()),i&2){let t=I();w(),N("data",t.curIoTreeData)("rendererId",t.rendererId)("tooltipPosition","right")}}var d5=(()=>{class i{nodes=[];rendererId="";labelSuffix="node";popupSize={minWidth:320,maxWidth:640,minHeight:0};curIoTreeData=[];ngOnChanges(t){t.nodes&&(this.curIoTreeData=cl(this.nodes,[],"incoming"))}get label(){let t=this.nodes.length;return`${t} ${this.labelSuffix}${t===1?"":"s"}`}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["node-list-viewer"]],inputs:{nodes:"nodes",rendererId:"rendererId",labelSuffix:"labelSuffix"},standalone:!0,features:[dn,ce],decls:5,vars:5,consts:[["nodeList",""],[1,"container"],["panelClass","model-explorer-node-list-panel",1,"label-container",3,"bubbleClick","overlaySize"],[1,"model-explorer-node-list"],[3,"data","rendererId","tooltipPosition"]],template:function(n,r){if(n&1&&(v(0,"div",1)(1,"div",2),S(2),y(),W(3,I_e,2,3,"ng-template",null,0,kt),y()),n&2){let o=ve(4);w(),se("disabled",r.nodes.length===0),N("bubbleClick",o)("overlaySize",r.popupSize),w(),Me(" ",r.label," ")}},dependencies:[wc,Ae,xc,it],styles:[`.container[_ngcontent-%COMP%]{display:flex;position:relative}.label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:4px 6px;border-radius:4px;background-color:#a3c9ff;line-height:14px;cursor:pointer;-webkit-user-select:none;user-select:none;opacity:.8}.label-container[_ngcontent-%COMP%]:hover{opacity:1}.label-container.disabled[_ngcontent-%COMP%]{pointer-events:none;background-color:#ddd} .model-explorer-node-list{font-size:12px;background-color:#fff;line-height:normal} .model-explorer-node-list-panel bubble-container{width:100%} @@ -4054,7 +4054,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],changeDetection:0})}return i})();var D_e=(i,e)=>e.id;function P_e(i,e){i&1&&(v(0,"div",24),S(1," Rules use your defined queries to match nodes for styling. All queries within a rule are connected with "),v(2,"span",25),S(3,"AND"),y(),S(4," logic. "),y())}function O_e(i,e){if(i&1&&(v(0,"div",28),J(1,"node-list-viewer",36),y()),i&2){let t=I().$index,n=I(2);w(),N("nodes",n.getMatchedNodes(t,0))("rendererId",n.leftPaneRendererId)}}function R_e(i,e){if(i&1&&(v(0,"div",28)(1,"div",37),S(2,"Left pane"),y(),J(3,"node-list-viewer",36),y(),v(4,"div",28)(5,"div",37),S(6,"Right pane"),y(),J(7,"node-list-viewer",36),y()),i&2){let t=I().$index,n=I(2);w(3),N("nodes",n.getMatchedNodes(t,0))("rendererId",n.leftPaneRendererId),w(4),N("nodes",n.getMatchedNodes(t,1))("rendererId",n.rightPaneRendererId)}}function A_e(i,e){if(i&1){let t=ie();v(0,"div",41)(1,"label")(2,"input",42,3),H("change",function(){V(t);let r=ve(3),o=I(2).$implicit,s=I().$index,a=I(2);return z(a.handleStyleColorChanged(s,o,r.value))}),y()(),v(4,"input",43,4),H("change",function(){V(t);let r=ve(5),o=I(2).$implicit,s=I().$index,a=I(2);return z(a.handleStyleColorChanged(s,o,r.value))}),y()()}if(i&2){let t=I(2).$implicit,n=I().$implicit,r=I(2);w(),tn("background-color",r.getSerializedStyleValue(n,t)),w(),N("value",r.getSerializedStyleValue(n,t)),w(2),N("value",r.getSerializedStyleValue(n,t))}}function N_e(i,e){if(i&1&&W(0,A_e,6,4,"div",41),i&2){let t=I().$implicit,n=I().$implicit,r=I(2);ae(r.getIsStyleEnabled(n,t)?0:-1)}}function k_e(i,e){if(i&1){let t=ie();v(0,"div",44)(1,"input",45,5),H("change",function(){V(t);let r=ve(2),o=I(2).$implicit,s=I().$index,a=I(2);return z(a.handleStyleColorChanged(s,o,r.value))}),y()()}if(i&2){let t=I(2).$implicit,n=I().$implicit,r=I(2);w(),N("value",r.getSerializedStyleValue(n,t))}}function L_e(i,e){if(i&1&&W(0,k_e,3,1,"div",44),i&2){let t=I().$implicit,n=I().$implicit,r=I(2);ae(r.getIsStyleEnabled(n,t)?0:-1)}}function F_e(i,e){if(i&1){let t=ie();v(0,"div",30)(1,"div",38)(2,"input",39,2),H("change",function(){let r=V(t).$implicit,o=ve(3),s=I().$index,a=I(2);return z(a.handleToggleStyle(s,r,o.checked))}),y(),v(4,"div",40),H("click",function(){let r=V(t).$implicit,o=I().$index,s=I(2);return z(s.handleToggleStyle(o,r))}),S(5),y()(),W(6,N_e,1,1)(7,L_e,1,1),y()}if(i&2){let t,n=e.$implicit,r=I().$implicit,o=I(2);w(2),N("checked",o.getIsStyleEnabled(r,n)),w(3),Me(" ",n.label," "),w(),ae((t=n.type)===o.StyleType.COLOR?6:t===o.StyleType.NUMBER?7:-1)}}function B_e(i,e){if(i&1){let t=ie();v(0,"div",46),H("click",function(){V(t);let r=I().$index,o=I(2);return z(o.handleMoveUpRule(r))}),v(1,"mat-icon"),S(2,"arrow_upward_alt"),y()()}}function V_e(i,e){if(i&1){let t=ie();v(0,"div",47),H("click",function(){V(t);let r=I().$index,o=I(2);return z(o.handleMoveDownRule(r))}),v(1,"mat-icon"),S(2,"arrow_downward_alt"),y()()}}function z_e(i,e){if(i&1){let t=ie();v(0,"tr")(1,"td",19)(2,"complex-queries",26),H("queriesUpdated",function(r){let o=V(t).$index,s=I(2);return z(s.handleQueriesUpdated(o,r))}),y(),v(3,"div",27),W(4,O_e,2,2,"div",28)(5,R_e,8,4),y()(),v(6,"td",22)(7,"div",29),ln(8,F_e,8,3,"div",30,D_e),y()(),v(10,"td",23)(11,"div",31),W(12,B_e,3,0,"div",32)(13,V_e,3,0,"div",33),v(14,"div",34),H("click",function(){let r=V(t).$index,o=I(2);return z(o.handleDuplicateRule(r))}),v(15,"mat-icon"),S(16,"content_copy"),y()(),v(17,"div",35),H("click",function(){let r=V(t).$index,o=I(2);return z(o.handleDeleteRule(r))}),v(18,"mat-icon"),S(19,"delete"),y()()()()()}if(i&2){let t=e.$implicit,n=e.$index,r=e.$count,o=I(2);w(2),N("queries",t.queries),w(2),ae(o.panesCount===1?4:o.panesCount===2?5:-1),w(4),cn(o.allStyles),w(4),ae(n!==0?12:-1),w(),ae(n!==r-1?13:-1)}}function U_e(i,e){if(i&1&&(v(0,"table",10)(1,"thead")(2,"th",19)(3,"div",20),S(4," Queries to match nodes "),v(5,"div",21)(6,"mat-icon"),S(7,"help_outline"),y()(),W(8,P_e,5,0,"ng-template",null,1,kt),y()(),v(10,"th",22),S(11,"Styles to apply"),y(),J(12,"th",23),y(),v(13,"tbody"),ln(14,z_e,20,4,"tr",null,Qr),y()()),i&2){let t=ve(9),n=I();w(5),N("bubble",t)("overlaySize",n.helpPopupSize)("hoverDelayMs",10),w(9),cn(n.rules())}}function H_e(i,e){i&1&&(v(0,"div",11),S(1,' No rules configured. Click the "Add rule" button below to get started. '),y())}var p5=(()=>{class i{appService;changeDetectorRef;nodeStylerService;rules;hasNonEmptyNodeStylerRules;hasRules=Xt(()=>this.rules().length>0);StyleType=rf;NodeStylerQueryType=Ln;allStyles=NG;allSearchMatchTypeOptions=[{type:vt.NODE_LABEL,tooltip:"Match label"},{type:vt.ATTRIBUTE,tooltip:"Match attributes"},{type:vt.INPUT_METADATA,tooltip:"Match inputs (op node only)"},{type:vt.OUTPUT_METADATA,tooltip:"Match outputs (op node only)"}];allSearchNodeTypes=[{type:mr.OP_NODES,label:"Ops only"},{type:mr.LAYER_NODES,label:"Layers only"},{type:mr.OP_AND_LAYER_NODES,label:"Ops & layers"}];allQueryTypes=[{type:Ln.REGEX,label:"Regex"},{type:Ln.ATTR_VALUE_RANGE,label:"Attribute value range"}];helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};curMatchedNodes={};constructor(t,n,r){this.appService=t,this.changeDetectorRef=n,this.nodeStylerService=r,this.rules=this.nodeStylerService.rules,this.hasNonEmptyNodeStylerRules=this.nodeStylerService.hasNonEmptyNodeStylerRules,mt(()=>{this.curMatchedNodes=this.nodeStylerService.matchedNodes(),this.changeDetectorRef.markForCheck()})}handleClickAddRule(){this.nodeStylerService.addNewRule()}handleClickExportRules(){let t=document.createElement("a");t.download="node_styler_rules.json";let n=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify(this.rules(),null,2))}`;aa.setHref(t,n),t.click()}handleClickImportRules(t){if(!t.files||t.files.length===0)return;let n=new FileReader;n.onload=r=>{let o=JSON.parse(r.target?.result);this.nodeStylerService.updateRules(o)},n.readAsText(t.files[0])}handleQueriesUpdated(t,n){this.nodeStylerService.updateQueries(t,n)}handleToggleStyle(t,n,r){this.nodeStylerService.toggleStyle(t,n,r)}handleStyleColorChanged(t,n,r){let o=r;r.startsWith("rgb")?o=this.rgbToHex(r):r.startsWith("#")||(o=qb[r]||r),this.nodeStylerService.updateStyleValue(t,n,o)}handleNumberChanged(t,n,r){let o=Number(r);isNaN(o)||(o=Math.min(10,Math.max(.001,o)),this.nodeStylerService.updateStyleValue(t,n,`${o}`))}handleMoveUpRule(t){this.nodeStylerService.moveUpRule(t)}handleMoveDownRule(t){this.nodeStylerService.moveDownRule(t)}handleDuplicateRule(t){this.nodeStylerService.duplicateRule(t)}handleDeleteRule(t){this.nodeStylerService.deleteRule(t)}getIsStyleEnabled(t,n){return t.styles[n.id]!=null}getSerializedStyleValue(t,n){return cd(t,n.id)}getMatchedNodes(t,n){return(this.curMatchedNodes[t]||{})[n]||[]}get panesCount(){return this.appService.panes().length}get leftPaneRendererId(){return this.appService.panes()[0].id}get rightPaneRendererId(){return this.appService.panes()[1].id}rgbToHex(t){let n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+\.{0,1}\d*))?\)$/);if(n){let r=n.slice(1,4).map(o=>Number(o).toString(16).padStart(2,"0")).join("");return r[0]===r[1]&&r[2]===r[3]&&r[4]===r[5]?`#${r[0]}${r[2]}${r[4]}`:`#${r}`}return"unknown"}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe),M(la))};static \u0275cmp=le({type:i,selectors:[["node-styler-dialog"]],standalone:!0,features:[ce],decls:26,vars:1,consts:[["input",""],["helpQuery",""],["cb",""],["colorPicker",""],["colorInput",""],["numberInput",""],["mat-dialog-title","","cdkDrag","","cdkDragRootElement",".cdk-overlay-pane","cdkDragHandle","",1,"title-container"],[1,"title"],[1,"description"],["mat-dialog-content","",1,"dialog-content"],["border","0","cellspacing","0","cellpadding","0",1,"rules-table"],[1,"no-rules-message"],["mat-dialog-actions","",1,"btns-container"],[1,"left-btns"],["mat-flat-button","","color","primary",1,"action-button","add-rule",3,"click"],["mat-flat-button","","color","primary",1,"action-button","load-rules",3,"click"],["mat-flat-button","","color","primary",1,"action-button","save-rules",3,"click"],["type","file","accept","application/JSON",1,"import-rules-input",3,"change"],["mat-button","","mat-dialog-close","",1,"close"],[1,"query"],[1,"query-header-container"],[1,"icon-container",3,"bubble","overlaySize","hoverDelayMs"],[1,"styles"],[1,"action-btns"],[1,"model-explorer-help-popup"],[1,"bold"],[3,"queriesUpdated","queries"],[1,"node-list-viewers-container"],[1,"node-list-viewer-container"],[1,"styles-container"],[1,"color-style-container"],[1,"action-buttons-container"],["matTooltip","Move up",1,"icon-container","move-up"],["matTooltip","Move down",1,"icon-container","move-down"],["matTooltip","Duplicate rule",1,"icon-container","duplicate-rule",3,"click"],["matTooltip","Delete rule",1,"icon-container","delete-rule",3,"click"],["labelSuffix","matched node",3,"nodes","rendererId"],[1,"label"],[1,"style-name-container"],["type","checkbox",3,"change","checked"],[3,"click"],[1,"color-picker-container"],["type","color",3,"change","value"],["type","text",3,"change","value"],[1,"number-editor-container"],[3,"change","value"],["matTooltip","Move up",1,"icon-container","move-up",3,"click"],["matTooltip","Move down",1,"icon-container","move-down",3,"click"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",6)(1,"div",7),S(2,"Node styler"),y(),v(3,"div",8),S(4," Use the buttons below to apply styling rules to this graph "),y()(),v(5,"div",9),W(6,U_e,16,3,"table",10)(7,H_e,2,0,"div",11),y(),v(8,"div",12)(9,"div",13)(10,"button",14),H("click",function(){return V(o),z(r.handleClickAddRule())}),v(11,"mat-icon"),S(12,"add"),y(),S(13," Add rule "),y(),v(14,"button",15),H("click",function(){V(o);let a=ve(23);return z(a.click())}),v(15,"mat-icon"),S(16,"file_upload"),y(),S(17," Import rules "),y(),v(18,"button",16),H("click",function(){return V(o),z(r.handleClickExportRules())}),v(19,"mat-icon"),S(20,"file_download"),y(),S(21," Export rules "),y(),v(22,"input",17,0),H("change",function(){V(o);let a=ve(23);return z(r.handleClickImportRules(a))}),y()(),v(24,"button",18),S(25,"Done"),y()()}n&2&&(w(6),ae(r.hasRules()?6:7))},dependencies:[$n,Ae,u5,d5,c5,l5,In,zi,ha,lf,cf,uf,df,it,gt,sa,Jt,Wn,h5],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;letter-spacing:normal!important}.title-container[_ngcontent-%COMP%]{position:relative}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-30px}.description[_ngcontent-%COMP%]{line-height:14px;font-size:12px;color:#777;margin-top:6px;margin-bottom:4px;font-weight:400}.btns-container[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between;padding:0 24px}.action-button[_ngcontent-%COMP%]{height:30px;padding:0 10px;font-size:13px}.action-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:2px}.import-rules-input[_ngcontent-%COMP%]{display:none}.dialog-content[_ngcontent-%COMP%]{padding:0;box-sizing:border-box;border-top:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6;background-color:#f9f9f9;overflow:hidden auto}.dialog-content[_ngcontent-%COMP%] .no-rules-message[_ngcontent-%COMP%]{padding:12px 24px;font-size:12px;color:#777}.common-input[_ngcontent-%COMP%]{padding:0 4px;border:1px solid #ccc;border-radius:4px;height:22px;box-sizing:border-box;outline:none}.common-input[_ngcontent-%COMP%]:focus{border-color:#1a73e8;outline:1px solid #1a73e8}.rules-table[_ngcontent-%COMP%]{width:100%;font-size:12px}.rules-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:not(.action-btns), .rules-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:not(.action-btns){border-right:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{text-align:left;height:32px;position:sticky;top:0;background-color:#f1f1f1;z-index:100}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;border-bottom:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%]{padding-left:24px;width:410px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%]{display:flex;align-items:center}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:16px;height:16px;opacity:.6;cursor:pointer;margin-left:4px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.target[_ngcontent-%COMP%]{padding-left:12px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.styles[_ngcontent-%COMP%]{padding-left:12px;min-width:254px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%]{padding-left:24px;padding-right:12px;vertical-align:top}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewers-container[_ngcontent-%COMP%]{display:flex;gap:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:fit-content;margin-top:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewer-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{line-height:18px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.target[_ngcontent-%COMP%]{vertical-align:top;padding-left:12px;padding-right:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.styles[_ngcontent-%COMP%]{padding-left:12px;padding-right:18px;vertical-align:top}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.styles[_ngcontent-%COMP%] .styles-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%]{vertical-align:top;padding-right:12px;width:80px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .action-buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;opacity:.6;cursor:pointer;margin-top:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%]{display:flex;align-items:center}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .style-name-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;width:100px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .style-name-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{cursor:pointer}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;border-radius:4px;border:1px solid #ccc;margin-left:4px;width:fit-content;background-color:#fff;box-sizing:border-box;height:24px;position:relative}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%]:focus-within{border-color:#1a73e8;outline:1px solid #1a73e8}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;width:16px;height:16px;margin:2px;background-color:red;border-radius:4px;cursor:pointer;border:1px solid #ddd}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{visibility:hidden}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{width:100px;border:none;height:100%;background-color:transparent;outline:none}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .number-editor-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;margin-left:4px;width:fit-content}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .number-editor-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:80px;height:28px;border:1px solid #ccc;border-radius:4px;background-color:transparent;box-sizing:border-box;padding:0 4px;outline:none} +`],changeDetection:0})}return i})();var T_e=(i,e)=>e.id;function D_e(i,e){i&1&&(v(0,"div",24),S(1," Rules use your defined queries to match nodes for styling. All queries within a rule are connected with "),v(2,"span",25),S(3,"AND"),y(),S(4," logic. "),y())}function P_e(i,e){if(i&1&&(v(0,"div",28),J(1,"node-list-viewer",36),y()),i&2){let t=I().$index,n=I(2);w(),N("nodes",n.getMatchedNodes(t,0))("rendererId",n.leftPaneRendererId)}}function O_e(i,e){if(i&1&&(v(0,"div",28)(1,"div",37),S(2,"Left pane"),y(),J(3,"node-list-viewer",36),y(),v(4,"div",28)(5,"div",37),S(6,"Right pane"),y(),J(7,"node-list-viewer",36),y()),i&2){let t=I().$index,n=I(2);w(3),N("nodes",n.getMatchedNodes(t,0))("rendererId",n.leftPaneRendererId),w(4),N("nodes",n.getMatchedNodes(t,1))("rendererId",n.rightPaneRendererId)}}function R_e(i,e){if(i&1){let t=ie();v(0,"div",41)(1,"label")(2,"input",42,3),H("change",function(){V(t);let r=ve(3),o=I(2).$implicit,s=I().$index,a=I(2);return z(a.handleStyleColorChanged(s,o,r.value))}),y()(),v(4,"input",43,4),H("change",function(){V(t);let r=ve(5),o=I(2).$implicit,s=I().$index,a=I(2);return z(a.handleStyleColorChanged(s,o,r.value))}),y()()}if(i&2){let t=I(2).$implicit,n=I().$implicit,r=I(2);w(),tn("background-color",r.getSerializedStyleValue(n,t)),w(),N("value",r.getSerializedStyleValue(n,t)),w(2),N("value",r.getSerializedStyleValue(n,t))}}function A_e(i,e){if(i&1&&W(0,R_e,6,4,"div",41),i&2){let t=I().$implicit,n=I().$implicit,r=I(2);ae(r.getIsStyleEnabled(n,t)?0:-1)}}function N_e(i,e){if(i&1){let t=ie();v(0,"div",44)(1,"input",45,5),H("change",function(){V(t);let r=ve(2),o=I(2).$implicit,s=I().$index,a=I(2);return z(a.handleStyleColorChanged(s,o,r.value))}),y()()}if(i&2){let t=I(2).$implicit,n=I().$implicit,r=I(2);w(),N("value",r.getSerializedStyleValue(n,t))}}function k_e(i,e){if(i&1&&W(0,N_e,3,1,"div",44),i&2){let t=I().$implicit,n=I().$implicit,r=I(2);ae(r.getIsStyleEnabled(n,t)?0:-1)}}function L_e(i,e){if(i&1){let t=ie();v(0,"div",30)(1,"div",38)(2,"input",39,2),H("change",function(){let r=V(t).$implicit,o=ve(3),s=I().$index,a=I(2);return z(a.handleToggleStyle(s,r,o.checked))}),y(),v(4,"div",40),H("click",function(){let r=V(t).$implicit,o=I().$index,s=I(2);return z(s.handleToggleStyle(o,r))}),S(5),y()(),W(6,A_e,1,1)(7,k_e,1,1),y()}if(i&2){let t,n=e.$implicit,r=I().$implicit,o=I(2);w(2),N("checked",o.getIsStyleEnabled(r,n)),w(3),Me(" ",n.label," "),w(),ae((t=n.type)===o.StyleType.COLOR?6:t===o.StyleType.NUMBER?7:-1)}}function F_e(i,e){if(i&1){let t=ie();v(0,"div",46),H("click",function(){V(t);let r=I().$index,o=I(2);return z(o.handleMoveUpRule(r))}),v(1,"mat-icon"),S(2,"arrow_upward_alt"),y()()}}function B_e(i,e){if(i&1){let t=ie();v(0,"div",47),H("click",function(){V(t);let r=I().$index,o=I(2);return z(o.handleMoveDownRule(r))}),v(1,"mat-icon"),S(2,"arrow_downward_alt"),y()()}}function V_e(i,e){if(i&1){let t=ie();v(0,"tr")(1,"td",19)(2,"complex-queries",26),H("queriesUpdated",function(r){let o=V(t).$index,s=I(2);return z(s.handleQueriesUpdated(o,r))}),y(),v(3,"div",27),W(4,P_e,2,2,"div",28)(5,O_e,8,4),y()(),v(6,"td",22)(7,"div",29),ln(8,L_e,8,3,"div",30,T_e),y()(),v(10,"td",23)(11,"div",31),W(12,F_e,3,0,"div",32)(13,B_e,3,0,"div",33),v(14,"div",34),H("click",function(){let r=V(t).$index,o=I(2);return z(o.handleDuplicateRule(r))}),v(15,"mat-icon"),S(16,"content_copy"),y()(),v(17,"div",35),H("click",function(){let r=V(t).$index,o=I(2);return z(o.handleDeleteRule(r))}),v(18,"mat-icon"),S(19,"delete"),y()()()()()}if(i&2){let t=e.$implicit,n=e.$index,r=e.$count,o=I(2);w(2),N("queries",t.queries),w(2),ae(o.panesCount===1?4:o.panesCount===2?5:-1),w(4),cn(o.allStyles),w(4),ae(n!==0?12:-1),w(),ae(n!==r-1?13:-1)}}function z_e(i,e){if(i&1&&(v(0,"table",10)(1,"thead")(2,"th",19)(3,"div",20),S(4," Queries to match nodes "),v(5,"div",21)(6,"mat-icon"),S(7,"help_outline"),y()(),W(8,D_e,5,0,"ng-template",null,1,kt),y()(),v(10,"th",22),S(11,"Styles to apply"),y(),J(12,"th",23),y(),v(13,"tbody"),ln(14,V_e,20,4,"tr",null,Qr),y()()),i&2){let t=ve(9),n=I();w(5),N("bubble",t)("overlaySize",n.helpPopupSize)("hoverDelayMs",10),w(9),cn(n.rules())}}function U_e(i,e){i&1&&(v(0,"div",11),S(1,' No rules configured. Click the "Add rule" button below to get started. '),y())}var u5=(()=>{class i{appService;changeDetectorRef;nodeStylerService;rules;hasNonEmptyNodeStylerRules;hasRules=Xt(()=>this.rules().length>0);StyleType=rf;NodeStylerQueryType=Ln;allStyles=AG;allSearchMatchTypeOptions=[{type:vt.NODE_LABEL,tooltip:"Match label"},{type:vt.ATTRIBUTE,tooltip:"Match attributes"},{type:vt.INPUT_METADATA,tooltip:"Match inputs (op node only)"},{type:vt.OUTPUT_METADATA,tooltip:"Match outputs (op node only)"}];allSearchNodeTypes=[{type:mr.OP_NODES,label:"Ops only"},{type:mr.LAYER_NODES,label:"Layers only"},{type:mr.OP_AND_LAYER_NODES,label:"Ops & layers"}];allQueryTypes=[{type:Ln.REGEX,label:"Regex"},{type:Ln.ATTR_VALUE_RANGE,label:"Attribute value range"}];helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};curMatchedNodes={};constructor(t,n,r){this.appService=t,this.changeDetectorRef=n,this.nodeStylerService=r,this.rules=this.nodeStylerService.rules,this.hasNonEmptyNodeStylerRules=this.nodeStylerService.hasNonEmptyNodeStylerRules,mt(()=>{this.curMatchedNodes=this.nodeStylerService.matchedNodes(),this.changeDetectorRef.markForCheck()})}handleClickAddRule(){this.nodeStylerService.addNewRule()}handleClickExportRules(){let t=document.createElement("a");t.download="node_styler_rules.json";let n=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify(this.rules(),null,2))}`;aa.setHref(t,n),t.click()}handleClickImportRules(t){if(!t.files||t.files.length===0)return;let n=new FileReader;n.onload=r=>{let o=JSON.parse(r.target?.result);this.nodeStylerService.updateRules(o)},n.readAsText(t.files[0])}handleQueriesUpdated(t,n){this.nodeStylerService.updateQueries(t,n)}handleToggleStyle(t,n,r){this.nodeStylerService.toggleStyle(t,n,r)}handleStyleColorChanged(t,n,r){let o=r;r.startsWith("rgb")?o=this.rgbToHex(r):r.startsWith("#")||(o=Yb[r]||r),this.nodeStylerService.updateStyleValue(t,n,o)}handleNumberChanged(t,n,r){let o=Number(r);isNaN(o)||(o=Math.min(10,Math.max(.001,o)),this.nodeStylerService.updateStyleValue(t,n,`${o}`))}handleMoveUpRule(t){this.nodeStylerService.moveUpRule(t)}handleMoveDownRule(t){this.nodeStylerService.moveDownRule(t)}handleDuplicateRule(t){this.nodeStylerService.duplicateRule(t)}handleDeleteRule(t){this.nodeStylerService.deleteRule(t)}getIsStyleEnabled(t,n){return t.styles[n.id]!=null}getSerializedStyleValue(t,n){return cd(t,n.id)}getMatchedNodes(t,n){return(this.curMatchedNodes[t]||{})[n]||[]}get panesCount(){return this.appService.panes().length}get leftPaneRendererId(){return this.appService.panes()[0].id}get rightPaneRendererId(){return this.appService.panes()[1].id}rgbToHex(t){let n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+\.{0,1}\d*))?\)$/);if(n){let r=n.slice(1,4).map(o=>Number(o).toString(16).padStart(2,"0")).join("");return r[0]===r[1]&&r[2]===r[3]&&r[4]===r[5]?`#${r[0]}${r[2]}${r[4]}`:`#${r}`}return"unknown"}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe),M(la))};static \u0275cmp=le({type:i,selectors:[["node-styler-dialog"]],standalone:!0,features:[ce],decls:26,vars:1,consts:[["input",""],["helpQuery",""],["cb",""],["colorPicker",""],["colorInput",""],["numberInput",""],["mat-dialog-title","","cdkDrag","","cdkDragRootElement",".cdk-overlay-pane","cdkDragHandle","",1,"title-container"],[1,"title"],[1,"description"],["mat-dialog-content","",1,"dialog-content"],["border","0","cellspacing","0","cellpadding","0",1,"rules-table"],[1,"no-rules-message"],["mat-dialog-actions","",1,"btns-container"],[1,"left-btns"],["mat-flat-button","","color","primary",1,"action-button","add-rule",3,"click"],["mat-flat-button","","color","primary",1,"action-button","load-rules",3,"click"],["mat-flat-button","","color","primary",1,"action-button","save-rules",3,"click"],["type","file","accept","application/JSON",1,"import-rules-input",3,"change"],["mat-button","","mat-dialog-close","",1,"close"],[1,"query"],[1,"query-header-container"],[1,"icon-container",3,"bubble","overlaySize","hoverDelayMs"],[1,"styles"],[1,"action-btns"],[1,"model-explorer-help-popup"],[1,"bold"],[3,"queriesUpdated","queries"],[1,"node-list-viewers-container"],[1,"node-list-viewer-container"],[1,"styles-container"],[1,"color-style-container"],[1,"action-buttons-container"],["matTooltip","Move up",1,"icon-container","move-up"],["matTooltip","Move down",1,"icon-container","move-down"],["matTooltip","Duplicate rule",1,"icon-container","duplicate-rule",3,"click"],["matTooltip","Delete rule",1,"icon-container","delete-rule",3,"click"],["labelSuffix","matched node",3,"nodes","rendererId"],[1,"label"],[1,"style-name-container"],["type","checkbox",3,"change","checked"],[3,"click"],[1,"color-picker-container"],["type","color",3,"change","value"],["type","text",3,"change","value"],[1,"number-editor-container"],[3,"change","value"],["matTooltip","Move up",1,"icon-container","move-up",3,"click"],["matTooltip","Move down",1,"icon-container","move-down",3,"click"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",6)(1,"div",7),S(2,"Node styler"),y(),v(3,"div",8),S(4," Use the buttons below to apply styling rules to this graph "),y()(),v(5,"div",9),W(6,z_e,16,3,"table",10)(7,U_e,2,0,"div",11),y(),v(8,"div",12)(9,"div",13)(10,"button",14),H("click",function(){return V(o),z(r.handleClickAddRule())}),v(11,"mat-icon"),S(12,"add"),y(),S(13," Add rule "),y(),v(14,"button",15),H("click",function(){V(o);let a=ve(23);return z(a.click())}),v(15,"mat-icon"),S(16,"file_upload"),y(),S(17," Import rules "),y(),v(18,"button",16),H("click",function(){return V(o),z(r.handleClickExportRules())}),v(19,"mat-icon"),S(20,"file_download"),y(),S(21," Export rules "),y(),v(22,"input",17,0),H("change",function(){V(o);let a=ve(23);return z(r.handleClickImportRules(a))}),y()(),v(24,"button",18),S(25,"Done"),y()()}n&2&&(w(6),ae(r.hasRules()?6:7))},dependencies:[$n,Ae,c5,l5,a5,s5,In,zi,ha,lf,cf,uf,df,it,gt,sa,Jt,Wn,d5],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;letter-spacing:normal!important}.title-container[_ngcontent-%COMP%]{position:relative}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-30px}.description[_ngcontent-%COMP%]{line-height:14px;font-size:12px;color:#777;margin-top:6px;margin-bottom:4px;font-weight:400}.btns-container[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between;padding:0 24px}.action-button[_ngcontent-%COMP%]{height:30px;padding:0 10px;font-size:13px}.action-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:2px}.import-rules-input[_ngcontent-%COMP%]{display:none}.dialog-content[_ngcontent-%COMP%]{padding:0;box-sizing:border-box;border-top:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6;background-color:#f9f9f9;overflow:hidden auto}.dialog-content[_ngcontent-%COMP%] .no-rules-message[_ngcontent-%COMP%]{padding:12px 24px;font-size:12px;color:#777}.common-input[_ngcontent-%COMP%]{padding:0 4px;border:1px solid #ccc;border-radius:4px;height:22px;box-sizing:border-box;outline:none}.common-input[_ngcontent-%COMP%]:focus{border-color:#1a73e8;outline:1px solid #1a73e8}.rules-table[_ngcontent-%COMP%]{width:100%;font-size:12px}.rules-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:not(.action-btns), .rules-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:not(.action-btns){border-right:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{text-align:left;height:32px;position:sticky;top:0;background-color:#f1f1f1;z-index:100}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;border-bottom:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%]{padding-left:24px;width:410px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%]{display:flex;align-items:center}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:16px;height:16px;opacity:.6;cursor:pointer;margin-left:4px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.target[_ngcontent-%COMP%]{padding-left:12px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.styles[_ngcontent-%COMP%]{padding-left:12px;min-width:254px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%]{padding-left:24px;padding-right:12px;vertical-align:top}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewers-container[_ngcontent-%COMP%]{display:flex;gap:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:fit-content;margin-top:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewer-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{line-height:18px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.target[_ngcontent-%COMP%]{vertical-align:top;padding-left:12px;padding-right:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.styles[_ngcontent-%COMP%]{padding-left:12px;padding-right:18px;vertical-align:top}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.styles[_ngcontent-%COMP%] .styles-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%]{vertical-align:top;padding-right:12px;width:80px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .action-buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;opacity:.6;cursor:pointer;margin-top:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%]{display:flex;align-items:center}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .style-name-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;width:100px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .style-name-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{cursor:pointer}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;border-radius:4px;border:1px solid #ccc;margin-left:4px;width:fit-content;background-color:#fff;box-sizing:border-box;height:24px;position:relative}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%]:focus-within{border-color:#1a73e8;outline:1px solid #1a73e8}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;width:16px;height:16px;margin:2px;background-color:red;border-radius:4px;cursor:pointer;border:1px solid #ddd}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{visibility:hidden}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{width:100px;border:none;height:100%;background-color:transparent;outline:none}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .number-editor-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;margin-left:4px;width:fit-content}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .number-editor-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:80px;height:28px;border:1px solid #ccc;border-radius:4px;background-color:transparent;box-sizing:border-box;padding:0 4px;outline:none} @@ -4072,7 +4072,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],changeDetection:0})}return i})();var f5=(()=>{class i{dialog;nodeStylerService;viewContainerRef;hasNonEmptyNodeStylerRules;constructor(t,n,r){this.dialog=t,this.nodeStylerService=n,this.viewContainerRef=r,this.hasNonEmptyNodeStylerRules=this.nodeStylerService.hasNonEmptyNodeStylerRules}handleClickOpenDialog(){this.dialog.open(p5,{width:"800px",height:"600px",viewContainerRef:this.viewContainerRef,hasBackdrop:!1,autoFocus:!1})}static \u0275fac=function(n){return new(n||i)(M(wu),M(la),M(Yt))};static \u0275cmp=le({type:i,selectors:[["node-styler"]],standalone:!0,features:[ce],decls:3,vars:2,consts:[["mat-icon-button","","aria-label","node-styler","matTooltip","Style nodes with custom rules",3,"click"]],template:function(n,r){n&1&&(v(0,"button",0),H("click",function(){return r.handleClickOpenDialog()}),v(1,"mat-icon"),S(2,"palette"),y()()),n&2&&(w(),se("highlight",r.hasNonEmptyNodeStylerRules()))},dependencies:[Ae,In,Ho,ha,it,gt,Jt,Wn],styles:[`button[_ngcontent-%COMP%] mat-icon.highlight[_ngcontent-%COMP%]{background:linear-gradient(45deg,#0089ff 0 30%,#f1af00 70% 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent} +`],changeDetection:0})}return i})();var h5=(()=>{class i{dialog;nodeStylerService;viewContainerRef;hasNonEmptyNodeStylerRules;constructor(t,n,r){this.dialog=t,this.nodeStylerService=n,this.viewContainerRef=r,this.hasNonEmptyNodeStylerRules=this.nodeStylerService.hasNonEmptyNodeStylerRules}handleClickOpenDialog(){this.dialog.open(u5,{width:"800px",height:"600px",viewContainerRef:this.viewContainerRef,hasBackdrop:!1,autoFocus:!1})}static \u0275fac=function(n){return new(n||i)(M(wu),M(la),M(Yt))};static \u0275cmp=le({type:i,selectors:[["node-styler"]],standalone:!0,features:[ce],decls:3,vars:2,consts:[["mat-icon-button","","aria-label","node-styler","matTooltip","Style nodes with custom rules",3,"click"]],template:function(n,r){n&1&&(v(0,"button",0),H("click",function(){return r.handleClickOpenDialog()}),v(1,"mat-icon"),S(2,"palette"),y()()),n&2&&(w(),se("highlight",r.hasNonEmptyNodeStylerRules()))},dependencies:[Ae,In,Ho,ha,it,gt,Jt,Wn],styles:[`button[_ngcontent-%COMP%] mat-icon.highlight[_ngcontent-%COMP%]{background:linear-gradient(45deg,#0089ff 0 30%,#f1af00 70% 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent} @@ -4090,7 +4090,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],changeDetection:0})}return i})();var G_e=["*"],m5=(()=>{class i{appService;titleClicked=new Pe;constructor(t){this.appService=t}get disableTitleTooltip(){return this.appService.testMode}static \u0275fac=function(n){return new(n||i)(M(st))};static \u0275cmp=le({type:i,selectors:[["title-bar"]],outputs:{titleClicked:"titleClicked"},standalone:!0,features:[ce],ngContentSelectors:G_e,decls:22,vars:1,consts:[[1,"container"],["matTooltip","Back home",1,"title",3,"click","matTooltipDisabled"],[1,"right-container"],[1,"divider"],[1,"divider","tighter-right"],[1,"icons-container"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],["mat-icon-button","","aria-label","doc","matTooltip","GitHub"],["href","https://github.com/google-ai-edge/model-explorer/issues","target","_blank"],["mat-icon-button","","aria-label","bug","matTooltip","File issue or feature request"]],template:function(n,r){n&1&&(kn(),v(0,"div",0)(1,"div",1),H("click",function(){return r.titleClicked.emit()}),J(2,"me-logo"),S(3," Model Explorer "),J(4,"new-version-chip"),y(),v(5,"div",2),J(6,"node-data-provider-dropdown")(7,"div",3)(8,"graph-selector")(9,"div",4)(10,"node-styler"),v(11,"div",5)(12,"a",6)(13,"button",7)(14,"mat-icon"),S(15,"article"),y()()(),v(16,"a",8)(17,"button",9)(18,"mat-icon"),S(19,"bug_report"),y()()()(),J(20,"open-in-new-tab-button"),$t(21),y()()),n&2&&(w(),N("matTooltipDisabled",r.disableTitleTooltip))},dependencies:[Ae,Pj,Jp,In,Ho,it,gt,Jt,Wn,GC,Oj,f5,HC],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;padding:8px 8px 8px 12px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ddd}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:400;cursor:pointer;color:#444746;font-size:20px;display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] me-logo[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] new-version-chip[_ngcontent-%COMP%]{margin-left:16px}.container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:1px;height:28px;border-left:1px solid #ccc;margin:0 16px}.container[_ngcontent-%COMP%] .divider.tighter-right[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:#000}.container[_ngcontent-%COMP%] open-in-new-tab-button[_ngcontent-%COMP%]{margin-left:8px} +`],changeDetection:0})}return i})();var H_e=["*"],p5=(()=>{class i{appService;titleClicked=new Pe;constructor(t){this.appService=t}get disableTitleTooltip(){return this.appService.testMode}static \u0275fac=function(n){return new(n||i)(M(st))};static \u0275cmp=le({type:i,selectors:[["title-bar"]],outputs:{titleClicked:"titleClicked"},standalone:!0,features:[ce],ngContentSelectors:H_e,decls:22,vars:1,consts:[[1,"container"],["matTooltip","Back home",1,"title",3,"click","matTooltipDisabled"],[1,"right-container"],[1,"divider"],[1,"divider","tighter-right"],[1,"icons-container"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],["mat-icon-button","","aria-label","doc","matTooltip","GitHub"],["href","https://github.com/google-ai-edge/model-explorer/issues","target","_blank"],["mat-icon-button","","aria-label","bug","matTooltip","File issue or feature request"]],template:function(n,r){n&1&&(kn(),v(0,"div",0)(1,"div",1),H("click",function(){return r.titleClicked.emit()}),J(2,"me-logo"),S(3," Model Explorer "),J(4,"new-version-chip"),y(),v(5,"div",2),J(6,"node-data-provider-dropdown")(7,"div",3)(8,"graph-selector")(9,"div",4)(10,"node-styler"),v(11,"div",5)(12,"a",6)(13,"button",7)(14,"mat-icon"),S(15,"article"),y()()(),v(16,"a",8)(17,"button",9)(18,"mat-icon"),S(19,"bug_report"),y()()()(),J(20,"open-in-new-tab-button"),$t(21),y()()),n&2&&(w(),N("matTooltipDisabled",r.disableTitleTooltip))},dependencies:[Ae,Tj,Jp,In,Ho,it,gt,Jt,Wn,GC,Dj,h5,HC],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;padding:8px 8px 8px 12px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ddd}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:400;cursor:pointer;color:#444746;font-size:20px;display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] me-logo[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] new-version-chip[_ngcontent-%COMP%]{margin-left:16px}.container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:1px;height:28px;border-left:1px solid #ccc;margin:0 16px}.container[_ngcontent-%COMP%] .divider.tighter-right[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:#000}.container[_ngcontent-%COMP%] open-in-new-tab-button[_ngcontent-%COMP%]{margin-left:8px} @@ -4108,7 +4108,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],changeDetection:0})}return i})();var j_e=["*"];function W_e(i,e){i&1&&J(0,"benchmark-runner")}function $_e(i,e){if(i&1){let t=ie();v(0,"title-bar",4),H("titleClicked",function(){V(t);let r=I(3);return z(r.titleClicked.emit())}),$t(1),y()}}function q_e(i,e){i&1&&(v(0,"div",3),S(1,"No graphs"),y())}function Y_e(i,e){i&1&&J(0,"split-panes-container")}function X_e(i,e){if(i&1&&(W(0,$_e,2,0,"title-bar"),v(1,"div",2),W(2,q_e,2,0,"div",3)(3,Y_e,1,0,"split-panes-container"),y()),i&2){let t=I(2);ae(t.showTitleBar?0:-1),w(2),ae(t.hasNoGraphs?2:3)}}function Z_e(i,e){if(i&1){let t=ie();v(0,"div",1),H("dragover",function(r){V(t);let o=I();return z(o.handleDragOver(r))})("drop",function(r){V(t);let o=I();return z(o.handleDrop(r))}),W(1,W_e,1,0,"benchmark-runner")(2,X_e,4,2,"div",2),y()}if(i&2){let t=I();w(),ae(t.benchmark?1:2)}}var KC=(()=>{class i{appService;changeDetectorRef;destroyRef;el;snackBar;threejsService;uiStateService;nodeDataProviderExtensionService;nodeStylerService;serverDirectorService;graphCollections;config;initialUiState;benchmark=!1;nodeDataSources=[];titleClicked=new Pe;uiStateChanged=new Pe;modelGraphProcessed=new Pe;remoteNodeDataPathsChanged=new Pe;curProcessedModelGraph;ready=!1;mouseDownHandler=t=>{window.parent.postMessage({cmd:"model-explorer-mousedown"},"*")};constructor(t,n,r,o,s,a,l,c,d,u){this.appService=t,this.changeDetectorRef=n,this.destroyRef=r,this.el=o,this.snackBar=s,this.threejsService=a,this.uiStateService=l,this.nodeDataProviderExtensionService=c,this.nodeStylerService=d,this.serverDirectorService=u,this.serverDirectorService.init(),mt(()=>{let h=this.uiStateService.curUiState();h&&this.uiStateChanged.emit(h)}),mt(()=>{this.remoteNodeDataPathsChanged.emit(this.appService.remoteNodeDataPaths())}),window.addEventListener("message",h=>{let p=h.data;switch(p.cmd){case"model-explorer-load-node-data-file":let f=p.path;f&&this.handleGetNodeDataPathFromPostMessage(f);break;case"model-explorer-select-node-by-output-tensor-name":let m=p.tensorName;m&&this.handleSelectNodeByOutputTensorNameFromPostMessage(m);break;case"model-explorer-select-node-by-node-id":let b=p.nodeId;b&&this.handleSelectNodeByNodeIdFromPostMessage(b);break;default:break}}),this.appService.modelGraphProcessed$.pipe(Vi(this.destroyRef)).subscribe(h=>{this.modelGraphProcessed.next(h)}),this.initThreejs()}ngOnInit(){if(this.appService.config.set(this.config||{}),this.appService.addGraphCollections(this.graphCollections),this.appService.curInitialUiState.set(this.initialUiState),this.config?.nodeStylerRules&&this.nodeStylerService.rules.set(this.config.nodeStylerRules),!this.initialUiState||this.initialUiState.paneStates.length===0){if(this.graphCollections.length>0&&this.graphCollections[0].graphs.length>0){let n=[...this.graphCollections[0].graphs].sort((r,o)=>o.nodes.length-r.nodes.length)[0];this.appService.selectGraphInCurrentPane(n)}}else if(this.initialUiState.paneStates.length===1){let t=this.initialUiState.paneStates[0],n=this.findGraphFromCollections(t.selectedCollectionLabel,t.selectedGraphId),r=t.flattenLayers===!0;if(n)this.appService.selectGraphInCurrentPane(n,r);else{let o=this.graphCollections[0].graphs[0];this.appService.selectGraphInCurrentPane(o,r)}this.appService.setFlattenLayersInCurrentPane(r)}else if(this.initialUiState.paneStates.length===2){let t=this.initialUiState.paneStates[0],n=this.findGraphFromCollections(t.selectedCollectionLabel,t.selectedGraphId),r=t.flattenLayers===!0;if(n)this.appService.selectGraphInCurrentPane(n,r);else{let l=this.graphCollections[0].graphs[0];this.appService.selectGraphInCurrentPane(l,r)}this.appService.setFlattenLayersInCurrentPane(r);let o=this.initialUiState.paneStates[1],s=o.flattenLayers===!0,a=this.findGraphFromCollections(o.selectedCollectionLabel,o.selectedGraphId);if(a)this.appService.openGraphInSplitPane(a,s);else{let l=this.graphCollections[0].graphs[0];this.appService.openGraphInSplitPane(l,s)}t.selected?this.appService.selectPaneByIndex(0):o.selected&&this.appService.selectPaneByIndex(1),this.appService.setPaneWidthFraction(t.widthFraction)}this.el.nativeElement.addEventListener("mousedown",this.mouseDownHandler,!0)}ngOnChanges(t){t.graphCollections&&(t.graphCollections.isFirstChange()||(this.appService.reset(),this.uiStateService.reset(),this.cleanUp(),this.ngOnInit()))}ngOnDestroy(){this.cleanUp()}handleKeyboardEvent(t){t.key===" "?Xb()||this.appService.spaceKeyToZoomFitClicked.next({}):t.key==="f"&&(t.ctrlKey||t.metaKey)&&(this.config?.hideTitleBar||t.preventDefault(),this.appService.searchKeyClicked.next({}))}handleDragOver(t){t.preventDefault()}handleDrop(t){return At(this,null,function*(){if(!t.dataTransfer)return;t.stopPropagation(),t.preventDefault();let n=[];t.dataTransfer?.items?Array.from(t.dataTransfer.items).forEach((o,s)=>{if(o.kind==="file"){let a=o.getAsFile();a&&n.push(a)}}):n.push(...Array.from(t.dataTransfer?.files||[]));let r=!1;if(n.length!==0)for(let o of n){if(!o.name.endsWith(".json"))continue;let s=new FileReader,a=yield new Promise(l=>{s.onload=c=>{let d=JSON.parse(c.target?.result);l(d)},s.readAsText(o)});a.results!=null&&a.results.results==null?(this.addNodeDataProviderData(o.name,a),r=!0):Object.values(a).some(l=>l.results!=null)&&(this.addNodeDataProviderDataWithGraphIndex(o.name,a),r=!0)}r||this.snackBar.open("File(s) not supported","Dismiss")})}selectNode(t,n,r,o=0){let s=this.graphCollections;if(r){let c=this.appService.curGraphCollections().find(d=>d.label.toLowerCase()===r.toLowerCase());if(!c){console.warn(`Failed to locate collection with label "${r}"`);return}s=[c]}let a;for(let c of s){let d=c.graphs.find(u=>u.id===n);if(d){a=d;break}}if(!a){console.warn(`Failed to locate graph with id "${n}"`);return}this.appService.selectGraphInPane(a,o);let l=this.appService.panes()[o].id;this.appService.curInitialUiState.set(void 0),this.appService.selectNode(l,void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setNodeToReveal(l,t)}addNodeDataProviderData(t,n,r=0,o=!1){let s=this.appService.getModelGraphFromPaneIndex(r);if(!s){console.warn(`Model graph in pane with index ${r} doesn't exist`);return}this.nodeDataProviderExtensionService.addRun(Lr(),t,"",s,{[s.id]:n},o)}addNodeDataProviderDataWithGraphIndex(t,n,r=0,o=!1){let s=this.appService.getModelGraphFromPaneIndex(r);if(!s){console.warn(`Model graph in pane with index ${r} doesn't exist`);return}this.nodeDataProviderExtensionService.addRun(Lr(),t,"",s,n,o)}loadRemoteNodeDataPaths(t,n){return At(this,null,function*(){yield Promise.all(t.map(r=>this.nodeDataProviderExtensionService.addRunFromRemoteSource(r,n)))})}get hasNoGraphs(){return this.graphCollections.reduce((t,n)=>t+n.graphs.length,0)===0}get showTitleBar(){return!this.config?.hideTitleBar}findGraphFromCollections(t,n){for(let r of this.graphCollections)for(let o of r.graphs)if(o.id===n&&(t===""||o.collectionLabel===t))return o}handleGetNodeDataPathFromPostMessage(t){let n=this.appService.getModelGraphFromPaneIndex(0);if(!n){console.warn("Model graph in pane with index 0 doesn't exist");return}this.loadRemoteNodeDataPaths([t],n)}handleSelectNodeByOutputTensorNameFromPostMessage(t){let n=this.appService.getModelGraphFromSelectedPane();if(!n)return;let r;for(let o of n.nodes)if(Et(o)){let s=o.outputsMetadata||{};for(let a of Object.keys(s)){let l=s[a];if(t===l.tensor_name){r=o;break}}if(r)break}r&&this.selectNode(r.id,n.id)}handleSelectNodeByNodeIdFromPostMessage(t){let n=this.appService.getModelGraphFromSelectedPane();if(!n)return;let r=n.nodesById[t];r&&this.selectNode(r.id,n.id)}initThreejs(){return At(this,null,function*(){yield this.threejsService.depsLoadedPromise,this.ready=!0,this.changeDetectorRef.markForCheck()})}cleanUp(){this.el.nativeElement.removeEventListener("mousedown",this.mouseDownHandler,!0)}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe),M(Ni),M(Re),M(yu),M(wr),M(zl),M(Cr),M(la),M(OC))};static \u0275cmp=le({type:i,selectors:[["model-graph-visualizer"]],hostBindings:function(n,r){n&1&&H("keydown",function(s){return r.handleKeyboardEvent(s)},!1,H0)},inputs:{graphCollections:"graphCollections",config:"config",initialUiState:"initialUiState",benchmark:"benchmark",nodeDataSources:"nodeDataSources"},outputs:{titleClicked:"titleClicked",uiStateChanged:"uiStateChanged",modelGraphProcessed:"modelGraphProcessed",remoteNodeDataPathsChanged:"remoteNodeDataPathsChanged"},standalone:!0,features:[Bt([st,HG,Cr,la,OC,zl,Ul]),dn,ce],ngContentSelectors:j_e,decls:1,vars:1,consts:[["class","container",3,"dragover","drop",4,"ngIf"],[1,"container",3,"dragover","drop"],[1,"main"],[1,"no-graphs-message"],[3,"titleClicked"]],template:function(n,r){n&1&&(kn(),W(0,Z_e,3,1,"div",0)),n&2&&N("ngIf",r.ready)},dependencies:[UG,Ae,Mn,m5,Ej],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;position:relative}.container[_ngcontent-%COMP%] benchmark-runner[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] title-bar[_ngcontent-%COMP%]{height:48px;min-height:48px}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%]{flex-grow:1;display:flex;position:relative;overflow:hidden}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .no-graphs-message[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:200;display:flex;align-items:center;justify-content:center;color:#999}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] split-panes-container[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] graph-selector[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;z-index:100} .model-explorer-help-popup{font-size:12px;padding:8px;background-color:#fff;line-height:normal} .model-explorer-help-popup .bold{font-weight:700} .model-explorer-help-popup .shortcut{display:flex;align-items:center;color:#777;margin-top:8px} .model-explorer-help-popup .shortcut mat-icon{font-size:20px;width:20px;height:20px;margin-right:2px;color:#777} .model-explorer-help-popup .description{color:#777;margin-top:8px} +`],changeDetection:0})}return i})();var G_e=["*"];function j_e(i,e){i&1&&J(0,"benchmark-runner")}function W_e(i,e){if(i&1){let t=ie();v(0,"title-bar",4),H("titleClicked",function(){V(t);let r=I(3);return z(r.titleClicked.emit())}),$t(1),y()}}function $_e(i,e){i&1&&(v(0,"div",3),S(1,"No graphs"),y())}function q_e(i,e){i&1&&J(0,"split-panes-container")}function Y_e(i,e){if(i&1&&(W(0,W_e,2,0,"title-bar"),v(1,"div",2),W(2,$_e,2,0,"div",3)(3,q_e,1,0,"split-panes-container"),y()),i&2){let t=I(2);ae(t.showTitleBar?0:-1),w(2),ae(t.hasNoGraphs?2:3)}}function X_e(i,e){if(i&1){let t=ie();v(0,"div",1),H("dragover",function(r){V(t);let o=I();return z(o.handleDragOver(r))})("drop",function(r){V(t);let o=I();return z(o.handleDrop(r))}),W(1,j_e,1,0,"benchmark-runner")(2,Y_e,4,2,"div",2),y()}if(i&2){let t=I();w(),ae(t.benchmark?1:2)}}var KC=(()=>{class i{appService;changeDetectorRef;destroyRef;el;snackBar;threejsService;uiStateService;nodeDataProviderExtensionService;nodeStylerService;graphCollections;config;initialUiState;benchmark=!1;nodeDataSources=[];titleClicked=new Pe;uiStateChanged=new Pe;modelGraphProcessed=new Pe;remoteNodeDataPathsChanged=new Pe;curProcessedModelGraph;ready=!1;mouseDownHandler=t=>{window.parent.postMessage({cmd:"model-explorer-mousedown"},"*")};constructor(t,n,r,o,s,a,l,c,d){this.appService=t,this.changeDetectorRef=n,this.destroyRef=r,this.el=o,this.snackBar=s,this.threejsService=a,this.uiStateService=l,this.nodeDataProviderExtensionService=c,this.nodeStylerService=d,mt(()=>{let u=this.uiStateService.curUiState();u&&this.uiStateChanged.emit(u)}),mt(()=>{this.remoteNodeDataPathsChanged.emit(this.appService.remoteNodeDataPaths())}),window.addEventListener("message",u=>{let h=u.data;switch(h.cmd){case"model-explorer-load-node-data-file":let p=h.path;p&&this.handleGetNodeDataPathFromPostMessage(p);break;case"model-explorer-select-node-by-output-tensor-name":let f=h.tensorName;f&&this.handleSelectNodeByOutputTensorNameFromPostMessage(f);break;case"model-explorer-select-node-by-node-id":let m=h.nodeId;m&&this.handleSelectNodeByNodeIdFromPostMessage(m);break;default:break}}),this.appService.modelGraphProcessed$.pipe(Vi(this.destroyRef)).subscribe(u=>{this.modelGraphProcessed.next(u)}),this.initThreejs()}ngOnInit(){if(this.appService.config.set(this.config||{}),this.appService.addGraphCollections(this.graphCollections),this.appService.curInitialUiState.set(this.initialUiState),this.config?.nodeStylerRules&&this.nodeStylerService.rules.set(this.config.nodeStylerRules),!this.initialUiState||this.initialUiState.paneStates.length===0){if(this.graphCollections.length>0&&this.graphCollections[0].graphs.length>0){let n=[...this.graphCollections[0].graphs].sort((r,o)=>o.nodes.length-r.nodes.length)[0];this.appService.selectGraphInCurrentPane(n)}}else if(this.initialUiState.paneStates.length===1){let t=this.initialUiState.paneStates[0],n=this.findGraphFromCollections(t.selectedCollectionLabel,t.selectedGraphId),r=t.flattenLayers===!0;if(n)this.appService.selectGraphInCurrentPane(n,r);else{let o=this.graphCollections[0].graphs[0];this.appService.selectGraphInCurrentPane(o,r)}this.appService.setFlattenLayersInCurrentPane(r)}else if(this.initialUiState.paneStates.length===2){let t=this.initialUiState.paneStates[0],n=this.findGraphFromCollections(t.selectedCollectionLabel,t.selectedGraphId),r=t.flattenLayers===!0;if(n)this.appService.selectGraphInCurrentPane(n,r);else{let l=this.graphCollections[0].graphs[0];this.appService.selectGraphInCurrentPane(l,r)}this.appService.setFlattenLayersInCurrentPane(r);let o=this.initialUiState.paneStates[1],s=o.flattenLayers===!0,a=this.findGraphFromCollections(o.selectedCollectionLabel,o.selectedGraphId);if(a)this.appService.openGraphInSplitPane(a,s);else{let l=this.graphCollections[0].graphs[0];this.appService.openGraphInSplitPane(l,s)}t.selected?this.appService.selectPaneByIndex(0):o.selected&&this.appService.selectPaneByIndex(1),this.appService.setPaneWidthFraction(t.widthFraction)}this.el.nativeElement.addEventListener("mousedown",this.mouseDownHandler,!0)}ngOnChanges(t){t.graphCollections&&(t.graphCollections.isFirstChange()||(this.appService.reset(),this.uiStateService.reset(),this.cleanUp(),this.ngOnInit()))}ngOnDestroy(){this.cleanUp()}handleKeyboardEvent(t){t.key===" "?Zb()||this.appService.spaceKeyToZoomFitClicked.next({}):t.key==="f"&&(t.ctrlKey||t.metaKey)&&(this.config?.hideTitleBar||t.preventDefault(),this.appService.searchKeyClicked.next({}))}handleDragOver(t){t.preventDefault()}handleDrop(t){return At(this,null,function*(){if(!t.dataTransfer)return;t.stopPropagation(),t.preventDefault();let n=[];t.dataTransfer?.items?Array.from(t.dataTransfer.items).forEach((o,s)=>{if(o.kind==="file"){let a=o.getAsFile();a&&n.push(a)}}):n.push(...Array.from(t.dataTransfer?.files||[]));let r=!1;if(n.length!==0)for(let o of n){if(!o.name.endsWith(".json"))continue;let s=new FileReader,a=yield new Promise(l=>{s.onload=c=>{let d=JSON.parse(c.target?.result);l(d)},s.readAsText(o)});a.results!=null&&a.results.results==null?(this.addNodeDataProviderData(o.name,a),r=!0):Object.values(a).some(l=>l.results!=null)&&(this.addNodeDataProviderDataWithGraphIndex(o.name,a),r=!0)}r||this.snackBar.open("File(s) not supported","Dismiss")})}selectNode(t,n,r,o=0){let s=this.graphCollections;if(r){let c=this.appService.curGraphCollections().find(d=>d.label.toLowerCase()===r.toLowerCase());if(!c){console.warn(`Failed to locate collection with label "${r}"`);return}s=[c]}let a;for(let c of s){let d=c.graphs.find(u=>u.id===n);if(d){a=d;break}}if(!a){console.warn(`Failed to locate graph with id "${n}"`);return}this.appService.selectGraphInPane(a,o);let l=this.appService.panes()[o].id;this.appService.curInitialUiState.set(void 0),this.appService.selectNode(l,void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setNodeToReveal(l,t)}addNodeDataProviderData(t,n,r=0,o=!1){let s=this.appService.getModelGraphFromPaneIndex(r);if(!s){console.warn(`Model graph in pane with index ${r} doesn't exist`);return}this.nodeDataProviderExtensionService.addRun(Lr(),t,"",s,{[s.id]:n},o)}addNodeDataProviderDataWithGraphIndex(t,n,r=0,o=!1){let s=this.appService.getModelGraphFromPaneIndex(r);if(!s){console.warn(`Model graph in pane with index ${r} doesn't exist`);return}this.nodeDataProviderExtensionService.addRun(Lr(),t,"",s,n,o)}loadRemoteNodeDataPaths(t,n){return At(this,null,function*(){yield Promise.all(t.map(r=>this.nodeDataProviderExtensionService.addRunFromRemoteSource(r,n)))})}get hasNoGraphs(){return this.graphCollections.reduce((t,n)=>t+n.graphs.length,0)===0}get showTitleBar(){return!this.config?.hideTitleBar}findGraphFromCollections(t,n){for(let r of this.graphCollections)for(let o of r.graphs)if(o.id===n&&(t===""||o.collectionLabel===t))return o}handleGetNodeDataPathFromPostMessage(t){let n=this.appService.getModelGraphFromPaneIndex(0);if(!n){console.warn("Model graph in pane with index 0 doesn't exist");return}this.loadRemoteNodeDataPaths([t],n)}handleSelectNodeByOutputTensorNameFromPostMessage(t){let n=this.appService.getModelGraphFromSelectedPane();if(!n)return;let r;for(let o of n.nodes)if(Et(o)){let s=o.outputsMetadata||{};for(let a of Object.keys(s)){let l=s[a];if(t===l.tensor_name){r=o;break}}if(r)break}r&&this.selectNode(r.id,n.id)}handleSelectNodeByNodeIdFromPostMessage(t){let n=this.appService.getModelGraphFromSelectedPane();if(!n)return;let r=n.nodesById[t];r&&this.selectNode(r.id,n.id)}initThreejs(){return At(this,null,function*(){yield this.threejsService.depsLoadedPromise,this.ready=!0,this.changeDetectorRef.markForCheck()})}cleanUp(){this.el.nativeElement.removeEventListener("mousedown",this.mouseDownHandler,!0)}static \u0275fac=function(n){return new(n||i)(M(st),M(Fe),M(Ni),M(Re),M(yu),M(wr),M(zl),M(Cr),M(la))};static \u0275cmp=le({type:i,selectors:[["model-graph-visualizer"]],hostBindings:function(n,r){n&1&&H("keydown",function(s){return r.handleKeyboardEvent(s)},!1,G0)},inputs:{graphCollections:"graphCollections",config:"config",initialUiState:"initialUiState",benchmark:"benchmark",nodeDataSources:"nodeDataSources"},outputs:{titleClicked:"titleClicked",uiStateChanged:"uiStateChanged",modelGraphProcessed:"modelGraphProcessed",remoteNodeDataPathsChanged:"remoteNodeDataPathsChanged"},standalone:!0,features:[Bt([st,UG,Cr,la,zl,Ul]),dn,ce],ngContentSelectors:G_e,decls:1,vars:1,consts:[["class","container",3,"dragover","drop",4,"ngIf"],[1,"container",3,"dragover","drop"],[1,"main"],[1,"no-graphs-message"],[3,"titleClicked"]],template:function(n,r){n&1&&(kn(),W(0,X_e,3,1,"div",0)),n&2&&N("ngIf",r.ready)},dependencies:[zG,Ae,Mn,p5,Sj],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;position:relative}.container[_ngcontent-%COMP%] benchmark-runner[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] title-bar[_ngcontent-%COMP%]{height:48px;min-height:48px}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%]{flex-grow:1;display:flex;position:relative;overflow:hidden}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .no-graphs-message[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:200;display:flex;align-items:center;justify-content:center;color:#999}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] split-panes-container[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] graph-selector[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;z-index:100} .model-explorer-help-popup{font-size:12px;padding:8px;background-color:#fff;line-height:normal} .model-explorer-help-popup .bold{font-weight:700} .model-explorer-help-popup .shortcut{display:flex;align-items:center;color:#777;margin-top:8px} .model-explorer-help-popup .shortcut mat-icon{font-size:20px;width:20px;height:20px;margin-right:2px;color:#777} .model-explorer-help-popup .description{color:#777;margin-top:8px} @@ -4126,7 +4126,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],changeDetection:0})}return i})();function Q_e(i,e){if(i&1&&J(0,"model-graph-visualizer",1),i&2){let t=I();N("graphCollections",t.graphCollections)("config",t.config)}}var K_e="https://storage.googleapis.com/tfweb/model-graph-vis-v2-test-models/coco-ssd.tflite%20(10).json",J_e="https://storage.googleapis.com/tfweb/model-graph-vis-v2-test-models/coco-ssd-tf.json",g5=(()=>{class i{graphCollections=[];config={nodeLabelsToHide:["Const","pseudo_const","ReadVariableOp"],defaultRenderer:RI.WEBGL,maxConstValueCount:16,enableSubgraphSelection:!0,enableExportToResource:!0};ngOnInit(){Promise.all([this.fetch(K_e),this.fetch(J_e)]).then(t=>{this.graphCollections=t})}fetch(t){return new Promise(n=>{fetch(t).then(r=>{r.json().then(o=>{o.label==null&&o.graphs==null?n({label:"unnamed collection",graphs:o}):n(o)})})})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["demo-page"]],standalone:!0,features:[ce],decls:2,vars:1,consts:[[1,"container"],[3,"graphCollections","config"]],template:function(n,r){n&1&&(v(0,"div",0),W(1,Q_e,1,2,"model-graph-visualizer",1),y()),n&2&&(w(),ae(r.graphCollections.length>0?1:-1))},dependencies:[Ae,KC],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;display:flex}.container[_ngcontent-%COMP%] model-graph-visualizer[_ngcontent-%COMP%]{width:100%;height:100%} +`],changeDetection:0})}return i})();function Z_e(i,e){if(i&1&&J(0,"model-graph-visualizer",1),i&2){let t=I();N("graphCollections",t.graphCollections)("config",t.config)}}var Q_e="https://storage.googleapis.com/tfweb/model-graph-vis-v2-test-models/coco-ssd.tflite%20(10).json",K_e="https://storage.googleapis.com/tfweb/model-graph-vis-v2-test-models/coco-ssd-tf.json",f5=(()=>{class i{graphCollections=[];config={nodeLabelsToHide:["Const","pseudo_const","ReadVariableOp"],defaultRenderer:RI.WEBGL,maxConstValueCount:16,enableSubgraphSelection:!0,enableExportToResource:!0};ngOnInit(){Promise.all([this.fetch(Q_e),this.fetch(K_e)]).then(t=>{this.graphCollections=t})}fetch(t){return new Promise(n=>{fetch(t).then(r=>{r.json().then(o=>{o.label==null&&o.graphs==null?n({label:"unnamed collection",graphs:o}):n(o)})})})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["demo-page"]],standalone:!0,features:[ce],decls:2,vars:1,consts:[[1,"container"],[3,"graphCollections","config"]],template:function(n,r){n&1&&(v(0,"div",0),W(1,Z_e,1,2,"model-graph-visualizer",1),y()),n&2&&(w(),ae(r.graphCollections.length>0?1:-1))},dependencies:[Ae,KC],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;display:flex}.container[_ngcontent-%COMP%] model-graph-visualizer[_ngcontent-%COMP%]{width:100%;height:100%} @@ -4144,7 +4144,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`]})}return i})();var So=function(i){return i.CONST_ELEMENT_COUNT_LIMIT="const_element_count_limit",i.SHOW_WELCOME_CARD="show_welcome_card",i.HIDE_OP_NODES_WITH_LABELS="hide_op_nodes_with_labels",i.ARTIFICIAL_LAYER_NODE_COUNT_THRESHOLD="artificial_layer_node_count_threshold",i.EDGE_LABEL_FONT_SIZE="edge_label_font_size",i.EDGE_COLOR="edge_color",i.DISALLOW_VERTICAL_EDGE_LABELS="disallow_vertical_edge_labels",i.KEEP_LAYERS_WITH_A_SINGLE_CHILD="keep_layers_with_a_single_child",i.SHOW_OP_NODE_OUT_OF_LAYER_EDGES_WITHOUT_SELECTING="show_op_node_out_of_layer_edges_without_selecting",i}(So||{}),to=function(i){return i[i.BOOLEAN=0]="BOOLEAN",i[i.NUMBER=1]="NUMBER",i[i.TEXT_MULTILINE=2]="TEXT_MULTILINE",i[i.COLOR=3]="COLOR",i}(to||{}),ZO={label:"Maximum element count for constant tensor values",key:So.CONST_ELEMENT_COUNT_LIMIT,type:to.NUMBER,defaultValue:16,help:"Controls the number of values extracted from the constant tensors during model processing. Increasing this number may impact performance due to larger payload sizes."},eve={label:"Show welcome card",key:So.SHOW_WELCOME_CARD,type:to.BOOLEAN,defaultValue:!0},QO={label:"Hide op nodes with labels below (comma separated)",key:So.HIDE_OP_NODES_WITH_LABELS,type:to.TEXT_MULTILINE,defaultValue:"Const,pseudo_const,pseudo_qconst,ReadVariableOp",help:"Removes op nodes from model graphs if their label matches any of the labels entered below."},KO={label:"Maximum number of nodes in an artificial layer",key:So.ARTIFICIAL_LAYER_NODE_COUNT_THRESHOLD,type:to.NUMBER,defaultValue:Im,help:"Controls the maximum number of immediate child nodes displayed under a layer. When the number of child nodes exceeds this limit, Model Explorer automatically groups them into smaller, more manageable artificial layers to improve layout performance and readability."},JO={label:"Edge label font size",key:So.EDGE_LABEL_FONT_SIZE,type:to.NUMBER,defaultValue:$b},eR={label:"Edge color",key:So.EDGE_COLOR,type:to.COLOR,defaultValue:"#aaaaaa"},tR={label:"Disallow vertical edge labels",key:So.DISALLOW_VERTICAL_EDGE_LABELS,type:to.BOOLEAN,defaultValue:!1,help:"-"},nR={label:"Keep layers with a single op node child",key:So.KEEP_LAYERS_WITH_A_SINGLE_CHILD,type:to.BOOLEAN,defaultValue:!1,help:"By default, layers with a single op node as its child are automatically removed to improve graph readability. Turn this toggle on to keep those layers."},iR={label:"Show op node out-of-layer edges without selecting",key:So.SHOW_OP_NODE_OUT_OF_LAYER_EDGES_WITHOUT_SELECTING,type:to.BOOLEAN,defaultValue:!1,help:"By default, an op node's edges that go out of the layer is only visible when the op node is selected. Turn this toggle on to see those edges without needing to select the node. \u26A0\uFE0F This feature will make the model graph look more noisy and harder to read especially for larger models."},JC="model_explorer_settings",eS=[ZO,QO,KO,JO,eR,nR,eve,tR,iR],pf=(()=>{class i{localStorageService;savedSettings;constructor(t){this.localStorageService=t;let n=this.localStorageService.getItem(JC)||"";this.savedSettings=n===""?{}:JSON.parse(n)}getBooleanValue(t){return this.savedSettings[t.key]==null?t.defaultValue===!0:this.savedSettings[t.key]===!0}getNumberValue(t){let n=this.savedSettings[t.key];return n!=null?Number(n):t.defaultValue||0}getStringValue(t){let n=this.savedSettings[t.key];return n??(t.defaultValue||"")}saveBooleanValue(t,n){this.savedSettings[n]=t,this.localStorageService.setItem(JC,JSON.stringify(this.savedSettings))}saveNumberValue(t,n){isNaN(t)||(this.savedSettings[n]=t,this.localStorageService.setItem(JC,JSON.stringify(this.savedSettings)))}saveStringValue(t,n){this.savedSettings[n]=t,this.localStorageService.setItem(JC,JSON.stringify(this.savedSettings))}getAllSettingsValues(){let t={};for(let n of eS)switch(n.type){case to.BOOLEAN:t[n.key]=this.getBooleanValue(n);break;case to.NUMBER:t[n.key]=this.getNumberValue(n);break;default:break}return t}getSettingByKey(t){return eS.find(n=>n.key===t)}static \u0275fac=function(n){return new(n||i)(X(Vo))};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var tve=["panel"],nve=["*"];function ive(i,e){if(i&1){let t=ie();v(0,"div",1,0),H("@panelAnimation.done",function(r){V(t);let o=I();return z(o._animationDone.next(r))}),$t(2),y()}if(i&2){let t=e.id,n=I();Nr(n._classList),se("mat-mdc-autocomplete-visible",n.showPanel)("mat-mdc-autocomplete-hidden",!n.showPanel)("mat-primary",n._color==="primary")("mat-accent",n._color==="accent")("mat-warn",n._color==="warn"),N("id",n.id)("@panelAnimation",n.isOpen?"visible":"hidden"),Ze("aria-label",n.ariaLabel||null)("aria-labelledby",n._getPanelAriaLabelledby(t))}}var rve=si("panelAnimation",[fi("void, hidden",Qt({opacity:0,transform:"scaleY(0.8)"})),On(":enter, hidden => visible",[dF([Pn("0.03s linear",Qt({opacity:1})),Pn("0.12s cubic-bezier(0, 0, 0.2, 1)",Qt({transform:"scaleY(1)"}))])]),On(":leave, visible => hidden",[Pn("0.075s linear",Qt({opacity:0}))])]),ove=0,oR=class{constructor(e,t){this.source=e,this.option=t}},_5=new ge("mat-autocomplete-default-options",{providedIn:"root",factory:sve});function sve(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}var v5=(()=>{let e=class e{get isOpen(){return this._isOpen&&this.showPanel}_setColor(n){this._color=n,this._changeDetectorRef.markForCheck()}set classList(n){this._classList=n,this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(n){this._hideSingleSelectionIndicator=n,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let n of this.options)n._changeDetectorRef.markForCheck()}constructor(n,r,o,s){this._changeDetectorRef=n,this._elementRef=r,this._defaults=o,this._activeOptionChanges=Ct.EMPTY,this._animationDone=new Pe,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new Pe,this.opened=new Pe,this.closed=new Pe,this.optionActivated=new Pe,this.id=`mat-autocomplete-${ove++}`,this.inertGroups=s?.SAFARI||!1,this.autoActiveFirstOption=!!o.autoActiveFirstOption,this.autoSelectActiveOption=!!o.autoSelectActiveOption,this.requireSelection=!!o.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new Ph(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(n=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[n]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(n){this.panel&&(this.panel.nativeElement.scrollTop=n)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(n){let r=new oR(this,n);this.optionSelected.emit(r)}_getPanelAriaLabelledby(n){if(this.ariaLabel)return null;let r=n?n+" ":"";return this.ariaLabelledby?r+this.ariaLabelledby:n}_skipPredicate(){return!1}};e.\u0275fac=function(r){return new(r||e)(M(Fe),M(Re),M(_5),M(gn))},e.\u0275cmp=le({type:e,selectors:[["mat-autocomplete"]],contentQueries:function(r,o,s){if(r&1&&(xi(s,ql,5),xi(s,Fh,5)),r&2){let a;be(a=ye())&&(o.options=a),be(a=ye())&&(o.optionGroups=a)}},viewQuery:function(r,o){if(r&1&&(Ie(Hn,7),Ie(tve,5)),r&2){let s;be(s=ye())&&(o.template=s.first),be(s=ye())&&(o.panel=s.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",at],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",at],requireSelection:[2,"requireSelection","requireSelection",at],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",at],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",at]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[Bt([{provide:Lh,useExisting:e}]),an,ce],ngContentSelectors:nve,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(r,o){r&1&&(kn(),W(0,ive,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape);box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color)}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[rve]},changeDetection:0});let i=e;return i})();var ave={provide:La,useExisting:Yr(()=>tv),multi:!0};var b5=new ge("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.reposition()}});function lve(i){return()=>i.scrollStrategies.reposition()}var cve={provide:b5,deps:[Ht],useFactory:lve},tv=(()=>{let e=class e{constructor(n,r,o,s,a,l,c,d,u,h,p){this._element=n,this._overlay=r,this._viewContainerRef=o,this._zone=s,this._changeDetectorRef=a,this._dir=c,this._formField=d,this._document=u,this._viewportRuler=h,this._defaults=p,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=Ct.EMPTY,this._breakpointObserver=te(Th),this._handsetLandscapeSubscription=Ct.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new me,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._initialized=new me,this._injector=te(bt),this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=Io(()=>{let f=this.autocomplete?this.autocomplete.options:null;return f?f.changes.pipe(pi(f),Xn(()=>Yn(...f.map(m=>m.onSelectionChange)))):this._initialized.pipe(Xn(()=>this.optionSelections))}),this._handlePanelKeydown=f=>{(f.keyCode===27&&!mi(f)||f.keyCode===38&&mi(f,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),f.stopPropagation(),f.preventDefault())},this._trackedModal=null,this._scrollStrategy=l}ngAfterViewInit(){this._initialized.next(),this._initialized.complete();let n=this._getWindow();typeof n<"u"&&this._zone.runOutsideAngular(()=>n.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(n){n.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let n=this._getWindow();typeof n<"u"&&n.removeEventListener("blur",this._windowBlurHandler),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&Wl(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Yn(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Gt(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Gt(()=>this._overlayAttached)):Ke()).pipe(Je(n=>n instanceof zm?n:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Yn(yn(this._document,"click"),yn(this._document,"auxclick"),yn(this._document,"touchend")).pipe(Gt(n=>{let r=Si(n),o=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,s=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&r!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!o||!o.contains(r))&&(!s||!s.contains(r))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(r)}))}writeValue(n){Promise.resolve(null).then(()=>this._assignOptionValue(n))}registerOnChange(n){this._onChange=n}registerOnTouched(n){this._onTouched=n}setDisabledState(n){this._element.nativeElement.disabled=n}_handleKeydown(n){let r=n.keyCode,o=mi(n);if(r===27&&!o&&n.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&r===13&&this.panelOpen&&!o)this.activeOption._selectViaInteraction(),this._resetActiveItem(),n.preventDefault();else if(this.autocomplete){let s=this.autocomplete._keyManager.activeItem,a=r===38||r===40;r===9||a&&!o&&this.panelOpen?this.autocomplete._keyManager.onKeydown(n):a&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(a||this.autocomplete._keyManager.activeItem!==s)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(n){let r=n.target,o=r.value;if(r.type==="number"&&(o=o==""?null:parseFloat(o)),this._previousValue!==o){if(this._previousValue=o,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(o),!o)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let s=this.autocomplete.options?.find(a=>a.selected);if(s){let a=this._getDisplayValue(s.value);o!==a&&s.deselect(!1)}}if(this._canOpen()&&this._document.activeElement===n.target){let s=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(s)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(n=!1){this._formField&&this._formField.floatLabel==="auto"&&(n?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let n=new Mt(o=>{fr(()=>{o.next()},{injector:this._injector})}),r=this.autocomplete.options.changes.pipe(Sn(()=>this._positionStrategy.reapplyLastPosition()),ku(0));return Yn(n,r).pipe(Xn(()=>this._zone.run(()=>{let o=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),o!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),_n(1)).subscribe(o=>this._setValueAndClose(o))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(n){let r=this.autocomplete;return r&&r.displayWith?r.displayWith(n):n}_assignOptionValue(n){let r=this._getDisplayValue(n);n==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(r??"")}_updateNativeInputValue(n){this._formField?this._formField._control.value=n:this._element.nativeElement.value=n,this._previousValue=n}_setValueAndClose(n){let r=this.autocomplete,o=n?n.source:this._pendingAutoselectedOption;o?(this._clearPreviousSelectedOption(o),this._assignOptionValue(o.value),this._onChange(o.value),r._emitSelectEvent(o),this._element.nativeElement.focus()):r.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),r._animationDone?r._animationDone.pipe(_n(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(n,r){this.autocomplete?.options?.forEach(o=>{o!==n&&o.selected&&o.deselect(r)})}_openPanelInternal(n=this._element.nativeElement.value){if(this._attachOverlay(n),this._floatLabel(),this._trackedModal){let r=this.autocomplete.id;Ah(this._trackedModal,"aria-owns",r)}}_attachOverlay(n){this.autocomplete;let r=this._overlayRef;r?(this._positionStrategy.setOrigin(this._getConnectedElement()),r.updateSize({width:this._getPanelWidth()})):(this._portal=new jr(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),r=this._overlay.create(this._getOverlayConfig()),this._overlayRef=r,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&r&&r.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(fy.HandsetLandscape).subscribe(s=>{s.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),r&&!r.hasAttached()&&(r.attach(this._portal),this._valueOnAttach=n,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let o=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&o!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let n=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=n.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=n.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new ui({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let n=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(n),this._positionStrategy=n,n}_setStrategyPositions(n){let r=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],o=this._aboveClass,s=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:o},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:o}],a;this.position==="above"?a=s:this.position==="below"?a=r:a=[...r,...s],n.withPositions(a)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let n=this.autocomplete;if(n.autoActiveFirstOption){let r=-1;for(let o=0;o .cdk-overlay-container [aria-modal="true"]');if(!n)return;let r=this.autocomplete.id;this._trackedModal&&Wl(this._trackedModal,"aria-owns",r),Ah(n,"aria-owns",r),this._trackedModal=n}_clearFromModal(){if(this._trackedModal){let n=this.autocomplete.id;Wl(this._trackedModal,"aria-owns",n),this._trackedModal=null}}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Ht),M(Yt),M(Le),M(Fe),M(b5),M(ai,8),M(Y_,9),M(Ye,8),M(ra),M(_5,8))},e.\u0275dir=ze({type:e,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(r,o){r&1&&H("focusin",function(){return o._handleFocus()})("blur",function(){return o._onTouched()})("input",function(a){return o._handleInput(a)})("keydown",function(a){return o._handleKeydown(a)})("click",function(){return o._handleClick()}),r&2&&Ze("autocomplete",o.autocompleteAttribute)("role",o.autocompleteDisabled?null:"combobox")("aria-autocomplete",o.autocompleteDisabled?null:"list")("aria-activedescendant",o.panelOpen&&o.activeOption?o.activeOption.id:null)("aria-expanded",o.autocompleteDisabled?null:o.panelOpen.toString())("aria-controls",o.autocompleteDisabled||!o.panelOpen||o.autocomplete==null?null:o.autocomplete.id)("aria-haspopup",o.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",at]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[Bt([ave]),an,dn]});let i=e;return i})(),y5=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[cve],imports:[Jr,Bh,qt,Ae,Zo,Bh,qt]});let i=e;return i})();var tS="graphs://";var Cu=function(i){return i.TFLITE_MLIR="builtin_tflite_mlir",i.TFLITE_FLATBUFFER="builtin_tflite_flatbuffer",i.TF_MLIR="builtin_tf_mlir",i.TF_DIRECT="builtin_tf_direct",i.GRAPHDEF="builtin_graphdef",i.MLIR="builtin_mlir",i.JSON_LOADER="builtin_json",i}(Cu||{}),sR=function(i){return i.ADAPTER="adapter",i.NODE_DATA_PROVIDER="node_data_provider",i}(sR||{}),Oi=function(i){return i.LOCAL="local",i.REMOTE="remote",i.GRAPH_JSONS_FROM_SERVER="graphs_json_from_server",i.FILE_PATH="file_path",i}(Oi||{}),Un=function(i){return i.NOT_STARTED="Not started",i.PROCESSING="Converting",i.UPLOADING="Uploading",i.DONE="Done",i.ERROR="Error",i}(Un||{});var Jn=function(i){return i[i.DT_INVALID=0]="DT_INVALID",i[i.DT_FLOAT=1]="DT_FLOAT",i[i.DT_DOUBLE=2]="DT_DOUBLE",i[i.DT_INT32=3]="DT_INT32",i[i.DT_UINT8=4]="DT_UINT8",i[i.DT_INT16=5]="DT_INT16",i[i.DT_INT8=6]="DT_INT8",i[i.DT_STRING=7]="DT_STRING",i[i.DT_COMPLEX64=8]="DT_COMPLEX64",i[i.DT_INT64=9]="DT_INT64",i[i.DT_BOOL=10]="DT_BOOL",i[i.DT_QINT8=11]="DT_QINT8",i[i.DT_QUINT8=12]="DT_QUINT8",i[i.DT_QINT32=13]="DT_QINT32",i[i.DT_BFLOAT16=14]="DT_BFLOAT16",i[i.DT_QINT16=15]="DT_QINT16",i[i.DT_QUINT16=16]="DT_QUINT16",i[i.DT_UINT16=17]="DT_UINT16",i[i.DT_COMPLEX128=18]="DT_COMPLEX128",i[i.DT_HALF=19]="DT_HALF",i[i.DT_RESOURCE=20]="DT_RESOURCE",i[i.DT_VARIANT=21]="DT_VARIANT",i[i.DT_UINT32=22]="DT_UINT32",i[i.DT_UINT64=23]="DT_UINT64",i}(Jn||{}),uve=new Map([[Jn.DT_FLOAT,"float"],[Jn.DT_DOUBLE,"double"],[Jn.DT_INT32,"int32"],[Jn.DT_UINT8,"uint8"],[Jn.DT_INT16,"int16"],[Jn.DT_INT8,"int8"],[Jn.DT_STRING,"string"],[Jn.DT_COMPLEX64,"complex64"],[Jn.DT_INT64,"int64"],[Jn.DT_BOOL,"bool"],[Jn.DT_QINT8,"qint8"],[Jn.DT_QUINT8,"qint8"],[Jn.DT_QINT32,"qint32"],[Jn.DT_BFLOAT16,"bfloat16"],[Jn.DT_QINT16,"qint16"],[Jn.DT_QUINT16,"qint16"],[Jn.DT_UINT16,"uint16"],[Jn.DT_COMPLEX128,"complex128"],[Jn.DT_HALF,"half"],[Jn.DT_RESOURCE,"resource"],[Jn.DT_VARIANT,"variant"],[Jn.DT_UINT32,"uint32"],[Jn.DT_UINT64,"uint64"]]);function x5(i,e){let t={};if(e.weightsManifest!=null)for(let s of e.weightsManifest)for(let a of s.weights)t[a.name]=a;let n={},r=e.modelTopology.node.map(s=>{let a={id:s.name,label:s.op,namespace:s.name,incomingEdges:hve(s),attrs:pve(s)};return n[a.id]=a,a});for(let s of e.modelTopology.node){if(!n[s.name])continue;let l=s.input||[];for(let c=0;c{let n=e.split(":");return{sourceNodeId:n.length===2?n[0]:e,sourceNodeOutputId:n.length===2?n[1]:"0",targetNodeInputId:`${t}`}})}function pve(i){let e=i.attr||{},t=[];for(let n of Object.keys(e)){let r=e[n],o="";r.list!=null?(r.list.s||[]).length>0?o=(r.list.s||[]).map(s=>nv({s})).join(", "):(r.list.b||[]).length>0?o=(r.list.b||[]).map(s=>nv({b:s})).join(", "):(r.list.f||[]).length>0?o=(r.list.f||[]).map(s=>nv({f:s})).join(", "):(r.list.i||[]).length>0?o=(r.list.i||[]).map(s=>nv({i:s})).join(", "):o="[]":o=nv(r),t.push({key:n,value:o})}return t}function nv(i){let e="";return i.s!=null?Array.isArray(i.s)?e=`${i.s.map(t=>typeof t=="number"?String.fromCharCode(t):`${t}`).join("")}`:e=atob(i.s):i.i!=null?e=`${i.i}`:i.f!=null?e=`${i.f}`:i.b!=null?e=i?"true":"false":i.type!=null&&(e=uve.get(i.type)||"unknown"),e}function nS(i){return!1}function w5(i){return At(this,null,function*(){return new Promise((e,t)=>{let n=new FileReader;n.onload=r=>{let o=JSON.parse(n.result),{graphCollections:s,error:a}=aR(i.name,o);a?t(a):s&&e(s)},n.readAsText(i)})})}function aR(i,e){return e.modelTopology==null?fve(e,i):{graphCollections:[x5(i,e)]}}function fve(i,e){return i.label!=null&&i.graphs!=null?{graphCollections:[i]}:Array.isArray(i)&&i[0].subgraphs!=null?{graphCollections:mve(i,e)}:Array.isArray(i)&&(i.length===0||i.length>0&&i[0].id!=null&&i[0].nodes!=null)?{graphCollections:[{label:e,graphs:i}]}:{error:"Unsupported JSON format"}}function mve(i,e){return i.map(t=>({label:t.label===""?e:`${e} (${t.label})`,graphs:t.subgraphs}))}var gve=(i,e)=>e.id;function _ve(i,e){i&1&&(v(0,"span",4),S(1,"Default"),y())}function vve(i,e){if(i&1){let t=ie();v(0,"div",2),H("click",function(){let r=V(t).$implicit,o=I();return z(o.handleSelectCandidate(r))}),v(1,"div",3),S(2),W(3,_ve,2,0,"span",4),y(),v(4,"div",5),S(5),y()()}if(i&2){let t=e.$implicit,n=e.$index,r=I();se("selected",(r.selectedAdapter==null?null:r.selectedAdapter.id)===t.id),w(2),Me(" ",t.name||t.id," "),w(),ae(n===0?3:-1),w(2),Me(" ",t.description||"-"," ")}}var C5=(()=>{class i{candidates=[];selectedAdapter;onClose=new Pe;handleSelectCandidate(t){this.onClose.next(t)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["adapter-selector-panel"]],inputs:{candidates:"candidates",selectedAdapter:"selectedAdapter"},outputs:{onClose:"onClose"},standalone:!0,features:[ce],decls:3,vars:1,consts:[[1,"container"],[1,"candidate-container",3,"selected"],[1,"candidate-container",3,"click"],[1,"name"],[1,"default-label"],[1,"description"]],template:function(n,r){n&1&&(v(0,"div",0),ln(1,vve,6,5,"div",1,gve),y()),n&2&&(N("@transformPanel","showing"),w(),cn(r.candidates))},dependencies:[Ae,da,it,ua,Jt,_r],styles:[`.container[_ngcontent-%COMP%]{box-shadow:0 2px 6px 2px #00000026,0 1px 2px #0000004d;transform-origin:top center;font-size:13px;padding:8px 0;border-radius:8px;background-color:#fff}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%]{padding:8px 16px}.container[_ngcontent-%COMP%] .candidate-container.selected[_ngcontent-%COMP%]{background-color:#c2e7ff}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%]:hover:not(.selected){background-color:#f2f2f2;cursor:pointer}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:14px;color:#1f1f1f;line-height:20px;margin-bottom:2px;display:flex;align-items:center}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .default-label[_ngcontent-%COMP%]{display:inline-block;padding:0 10px;box-sizing:border-box;background-color:#f3e0b4;color:#70571e;border:1px solid #dbac41;font-size:11px;line-height:14px;border-radius:99px;margin-left:8px}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:12px;color:#444746} +`]})}return i})();var So=function(i){return i.CONST_ELEMENT_COUNT_LIMIT="const_element_count_limit",i.SHOW_WELCOME_CARD="show_welcome_card",i.HIDE_OP_NODES_WITH_LABELS="hide_op_nodes_with_labels",i.ARTIFICIAL_LAYER_NODE_COUNT_THRESHOLD="artificial_layer_node_count_threshold",i.EDGE_LABEL_FONT_SIZE="edge_label_font_size",i.EDGE_COLOR="edge_color",i.DISALLOW_VERTICAL_EDGE_LABELS="disallow_vertical_edge_labels",i.KEEP_LAYERS_WITH_A_SINGLE_CHILD="keep_layers_with_a_single_child",i.SHOW_OP_NODE_OUT_OF_LAYER_EDGES_WITHOUT_SELECTING="show_op_node_out_of_layer_edges_without_selecting",i}(So||{}),to=function(i){return i[i.BOOLEAN=0]="BOOLEAN",i[i.NUMBER=1]="NUMBER",i[i.TEXT_MULTILINE=2]="TEXT_MULTILINE",i[i.COLOR=3]="COLOR",i}(to||{}),XO={label:"Maximum element count for constant tensor values",key:So.CONST_ELEMENT_COUNT_LIMIT,type:to.NUMBER,defaultValue:16,help:"Controls the number of values extracted from the constant tensors during model processing. Increasing this number may impact performance due to larger payload sizes."},J_e={label:"Show welcome card",key:So.SHOW_WELCOME_CARD,type:to.BOOLEAN,defaultValue:!0},ZO={label:"Hide op nodes with labels below (comma separated)",key:So.HIDE_OP_NODES_WITH_LABELS,type:to.TEXT_MULTILINE,defaultValue:"Const,pseudo_const,pseudo_qconst,ReadVariableOp",help:"Removes op nodes from model graphs if their label matches any of the labels entered below."},QO={label:"Maximum number of nodes in an artificial layer",key:So.ARTIFICIAL_LAYER_NODE_COUNT_THRESHOLD,type:to.NUMBER,defaultValue:Im,help:"Controls the maximum number of immediate child nodes displayed under a layer. When the number of child nodes exceeds this limit, Model Explorer automatically groups them into smaller, more manageable artificial layers to improve layout performance and readability."},KO={label:"Edge label font size",key:So.EDGE_LABEL_FONT_SIZE,type:to.NUMBER,defaultValue:qb},JO={label:"Edge color",key:So.EDGE_COLOR,type:to.COLOR,defaultValue:"#aaaaaa"},eR={label:"Disallow vertical edge labels",key:So.DISALLOW_VERTICAL_EDGE_LABELS,type:to.BOOLEAN,defaultValue:!1,help:"-"},tR={label:"Keep layers with a single op node child",key:So.KEEP_LAYERS_WITH_A_SINGLE_CHILD,type:to.BOOLEAN,defaultValue:!1,help:"By default, layers with a single op node as its child are automatically removed to improve graph readability. Turn this toggle on to keep those layers."},nR={label:"Show op node out-of-layer edges without selecting",key:So.SHOW_OP_NODE_OUT_OF_LAYER_EDGES_WITHOUT_SELECTING,type:to.BOOLEAN,defaultValue:!1,help:"By default, an op node's edges that go out of the layer is only visible when the op node is selected. Turn this toggle on to see those edges without needing to select the node. \u26A0\uFE0F This feature will make the model graph look more noisy and harder to read especially for larger models."},JC="model_explorer_settings",eS=[XO,ZO,QO,KO,JO,tR,J_e,eR,nR],pf=(()=>{class i{localStorageService;savedSettings;constructor(t){this.localStorageService=t;let n=this.localStorageService.getItem(JC)||"";this.savedSettings=n===""?{}:JSON.parse(n)}getBooleanValue(t){return this.savedSettings[t.key]==null?t.defaultValue===!0:this.savedSettings[t.key]===!0}getNumberValue(t){let n=this.savedSettings[t.key];return n!=null?Number(n):t.defaultValue||0}getStringValue(t){let n=this.savedSettings[t.key];return n??(t.defaultValue||"")}saveBooleanValue(t,n){this.savedSettings[n]=t,this.localStorageService.setItem(JC,JSON.stringify(this.savedSettings))}saveNumberValue(t,n){isNaN(t)||(this.savedSettings[n]=t,this.localStorageService.setItem(JC,JSON.stringify(this.savedSettings)))}saveStringValue(t,n){this.savedSettings[n]=t,this.localStorageService.setItem(JC,JSON.stringify(this.savedSettings))}getAllSettingsValues(){let t={};for(let n of eS)switch(n.type){case to.BOOLEAN:t[n.key]=this.getBooleanValue(n);break;case to.NUMBER:t[n.key]=this.getNumberValue(n);break;default:break}return t}getSettingByKey(t){return eS.find(n=>n.key===t)}static \u0275fac=function(n){return new(n||i)(X(Vo))};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var eve=["panel"],tve=["*"];function nve(i,e){if(i&1){let t=ie();v(0,"div",1,0),H("@panelAnimation.done",function(r){V(t);let o=I();return z(o._animationDone.next(r))}),$t(2),y()}if(i&2){let t=e.id,n=I();Nr(n._classList),se("mat-mdc-autocomplete-visible",n.showPanel)("mat-mdc-autocomplete-hidden",!n.showPanel)("mat-primary",n._color==="primary")("mat-accent",n._color==="accent")("mat-warn",n._color==="warn"),N("id",n.id)("@panelAnimation",n.isOpen?"visible":"hidden"),Ze("aria-label",n.ariaLabel||null)("aria-labelledby",n._getPanelAriaLabelledby(t))}}var ive=si("panelAnimation",[fi("void, hidden",Qt({opacity:0,transform:"scaleY(0.8)"})),On(":enter, hidden => visible",[cF([Pn("0.03s linear",Qt({opacity:1})),Pn("0.12s cubic-bezier(0, 0, 0.2, 1)",Qt({transform:"scaleY(1)"}))])]),On(":leave, visible => hidden",[Pn("0.075s linear",Qt({opacity:0}))])]),rve=0,rR=class{constructor(e,t){this.source=e,this.option=t}},m5=new ge("mat-autocomplete-default-options",{providedIn:"root",factory:ove});function ove(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}var g5=(()=>{let e=class e{get isOpen(){return this._isOpen&&this.showPanel}_setColor(n){this._color=n,this._changeDetectorRef.markForCheck()}set classList(n){this._classList=n,this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(n){this._hideSingleSelectionIndicator=n,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let n of this.options)n._changeDetectorRef.markForCheck()}constructor(n,r,o,s){this._changeDetectorRef=n,this._elementRef=r,this._defaults=o,this._activeOptionChanges=Ct.EMPTY,this._animationDone=new Pe,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new Pe,this.opened=new Pe,this.closed=new Pe,this.optionActivated=new Pe,this.id=`mat-autocomplete-${rve++}`,this.inertGroups=s?.SAFARI||!1,this.autoActiveFirstOption=!!o.autoActiveFirstOption,this.autoSelectActiveOption=!!o.autoSelectActiveOption,this.requireSelection=!!o.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new Ph(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(n=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[n]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(n){this.panel&&(this.panel.nativeElement.scrollTop=n)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(n){let r=new rR(this,n);this.optionSelected.emit(r)}_getPanelAriaLabelledby(n){if(this.ariaLabel)return null;let r=n?n+" ":"";return this.ariaLabelledby?r+this.ariaLabelledby:n}_skipPredicate(){return!1}};e.\u0275fac=function(r){return new(r||e)(M(Fe),M(Re),M(m5),M(gn))},e.\u0275cmp=le({type:e,selectors:[["mat-autocomplete"]],contentQueries:function(r,o,s){if(r&1&&(xi(s,ql,5),xi(s,Fh,5)),r&2){let a;be(a=ye())&&(o.options=a),be(a=ye())&&(o.optionGroups=a)}},viewQuery:function(r,o){if(r&1&&(Ie(Hn,7),Ie(eve,5)),r&2){let s;be(s=ye())&&(o.template=s.first),be(s=ye())&&(o.panel=s.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",at],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",at],requireSelection:[2,"requireSelection","requireSelection",at],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",at],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",at]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[Bt([{provide:Lh,useExisting:e}]),an,ce],ngContentSelectors:tve,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(r,o){r&1&&(kn(),W(0,nve,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape);box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color)}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[ive]},changeDetection:0});let i=e;return i})();var sve={provide:La,useExisting:Yr(()=>nv),multi:!0};var _5=new ge("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=te(Ht);return()=>i.scrollStrategies.reposition()}});function ave(i){return()=>i.scrollStrategies.reposition()}var lve={provide:_5,deps:[Ht],useFactory:ave},nv=(()=>{let e=class e{constructor(n,r,o,s,a,l,c,d,u,h,p){this._element=n,this._overlay=r,this._viewContainerRef=o,this._zone=s,this._changeDetectorRef=a,this._dir=c,this._formField=d,this._document=u,this._viewportRuler=h,this._defaults=p,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=Ct.EMPTY,this._breakpointObserver=te(Th),this._handsetLandscapeSubscription=Ct.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new me,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._initialized=new me,this._injector=te(yt),this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=Io(()=>{let f=this.autocomplete?this.autocomplete.options:null;return f?f.changes.pipe(pi(f),Xn(()=>Yn(...f.map(m=>m.onSelectionChange)))):this._initialized.pipe(Xn(()=>this.optionSelections))}),this._handlePanelKeydown=f=>{(f.keyCode===27&&!mi(f)||f.keyCode===38&&mi(f,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),f.stopPropagation(),f.preventDefault())},this._trackedModal=null,this._scrollStrategy=l}ngAfterViewInit(){this._initialized.next(),this._initialized.complete();let n=this._getWindow();typeof n<"u"&&this._zone.runOutsideAngular(()=>n.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(n){n.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let n=this._getWindow();typeof n<"u"&&n.removeEventListener("blur",this._windowBlurHandler),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&Wl(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Yn(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Gt(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Gt(()=>this._overlayAttached)):Ke()).pipe(Je(n=>n instanceof Um?n:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Yn(yn(this._document,"click"),yn(this._document,"auxclick"),yn(this._document,"touchend")).pipe(Gt(n=>{let r=Si(n),o=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,s=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&r!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!o||!o.contains(r))&&(!s||!s.contains(r))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(r)}))}writeValue(n){Promise.resolve(null).then(()=>this._assignOptionValue(n))}registerOnChange(n){this._onChange=n}registerOnTouched(n){this._onTouched=n}setDisabledState(n){this._element.nativeElement.disabled=n}_handleKeydown(n){let r=n.keyCode,o=mi(n);if(r===27&&!o&&n.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&r===13&&this.panelOpen&&!o)this.activeOption._selectViaInteraction(),this._resetActiveItem(),n.preventDefault();else if(this.autocomplete){let s=this.autocomplete._keyManager.activeItem,a=r===38||r===40;r===9||a&&!o&&this.panelOpen?this.autocomplete._keyManager.onKeydown(n):a&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(a||this.autocomplete._keyManager.activeItem!==s)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(n){let r=n.target,o=r.value;if(r.type==="number"&&(o=o==""?null:parseFloat(o)),this._previousValue!==o){if(this._previousValue=o,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(o),!o)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let s=this.autocomplete.options?.find(a=>a.selected);if(s){let a=this._getDisplayValue(s.value);o!==a&&s.deselect(!1)}}if(this._canOpen()&&this._document.activeElement===n.target){let s=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(s)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(n=!1){this._formField&&this._formField.floatLabel==="auto"&&(n?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let n=new Mt(o=>{fr(()=>{o.next()},{injector:this._injector})}),r=this.autocomplete.options.changes.pipe(Sn(()=>this._positionStrategy.reapplyLastPosition()),ku(0));return Yn(n,r).pipe(Xn(()=>this._zone.run(()=>{let o=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),o!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),_n(1)).subscribe(o=>this._setValueAndClose(o))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(n){let r=this.autocomplete;return r&&r.displayWith?r.displayWith(n):n}_assignOptionValue(n){let r=this._getDisplayValue(n);n==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(r??"")}_updateNativeInputValue(n){this._formField?this._formField._control.value=n:this._element.nativeElement.value=n,this._previousValue=n}_setValueAndClose(n){let r=this.autocomplete,o=n?n.source:this._pendingAutoselectedOption;o?(this._clearPreviousSelectedOption(o),this._assignOptionValue(o.value),this._onChange(o.value),r._emitSelectEvent(o),this._element.nativeElement.focus()):r.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),r._animationDone?r._animationDone.pipe(_n(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(n,r){this.autocomplete?.options?.forEach(o=>{o!==n&&o.selected&&o.deselect(r)})}_openPanelInternal(n=this._element.nativeElement.value){if(this._attachOverlay(n),this._floatLabel(),this._trackedModal){let r=this.autocomplete.id;Ah(this._trackedModal,"aria-owns",r)}}_attachOverlay(n){this.autocomplete;let r=this._overlayRef;r?(this._positionStrategy.setOrigin(this._getConnectedElement()),r.updateSize({width:this._getPanelWidth()})):(this._portal=new jr(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),r=this._overlay.create(this._getOverlayConfig()),this._overlayRef=r,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&r&&r.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(my.HandsetLandscape).subscribe(s=>{s.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),r&&!r.hasAttached()&&(r.attach(this._portal),this._valueOnAttach=n,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let o=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&o!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let n=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=n.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=n.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new ui({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let n=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(n),this._positionStrategy=n,n}_setStrategyPositions(n){let r=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],o=this._aboveClass,s=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:o},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:o}],a;this.position==="above"?a=s:this.position==="below"?a=r:a=[...r,...s],n.withPositions(a)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let n=this.autocomplete;if(n.autoActiveFirstOption){let r=-1;for(let o=0;o .cdk-overlay-container [aria-modal="true"]');if(!n)return;let r=this.autocomplete.id;this._trackedModal&&Wl(this._trackedModal,"aria-owns",r),Ah(n,"aria-owns",r),this._trackedModal=n}_clearFromModal(){if(this._trackedModal){let n=this.autocomplete.id;Wl(this._trackedModal,"aria-owns",n),this._trackedModal=null}}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Ht),M(Yt),M(Le),M(Fe),M(_5),M(ai,8),M(X_,9),M(Ye,8),M(ra),M(m5,8))},e.\u0275dir=ze({type:e,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(r,o){r&1&&H("focusin",function(){return o._handleFocus()})("blur",function(){return o._onTouched()})("input",function(a){return o._handleInput(a)})("keydown",function(a){return o._handleKeydown(a)})("click",function(){return o._handleClick()}),r&2&&Ze("autocomplete",o.autocompleteAttribute)("role",o.autocompleteDisabled?null:"combobox")("aria-autocomplete",o.autocompleteDisabled?null:"list")("aria-activedescendant",o.panelOpen&&o.activeOption?o.activeOption.id:null)("aria-expanded",o.autocompleteDisabled?null:o.panelOpen.toString())("aria-controls",o.autocompleteDisabled||!o.panelOpen||o.autocomplete==null?null:o.autocomplete.id)("aria-haspopup",o.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",at]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[Bt([sve]),an,dn]});let i=e;return i})(),v5=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=ot({type:e}),e.\u0275inj=rt({providers:[lve],imports:[Jr,Bh,qt,Ae,Zo,Bh,qt]});let i=e;return i})();var tS="graphs://";var Cu=function(i){return i.TFLITE_MLIR="builtin_tflite_mlir",i.TFLITE_FLATBUFFER="builtin_tflite_flatbuffer",i.TF_MLIR="builtin_tf_mlir",i.TF_DIRECT="builtin_tf_direct",i.GRAPHDEF="builtin_graphdef",i.MLIR="builtin_mlir",i.JSON_LOADER="builtin_json",i}(Cu||{}),oR=function(i){return i.ADAPTER="adapter",i.NODE_DATA_PROVIDER="node_data_provider",i}(oR||{}),Oi=function(i){return i.LOCAL="local",i.REMOTE="remote",i.GRAPH_JSONS_FROM_SERVER="graphs_json_from_server",i.FILE_PATH="file_path",i}(Oi||{}),Un=function(i){return i.NOT_STARTED="Not started",i.PROCESSING="Converting",i.UPLOADING="Uploading",i.DONE="Done",i.ERROR="Error",i}(Un||{});var Jn=function(i){return i[i.DT_INVALID=0]="DT_INVALID",i[i.DT_FLOAT=1]="DT_FLOAT",i[i.DT_DOUBLE=2]="DT_DOUBLE",i[i.DT_INT32=3]="DT_INT32",i[i.DT_UINT8=4]="DT_UINT8",i[i.DT_INT16=5]="DT_INT16",i[i.DT_INT8=6]="DT_INT8",i[i.DT_STRING=7]="DT_STRING",i[i.DT_COMPLEX64=8]="DT_COMPLEX64",i[i.DT_INT64=9]="DT_INT64",i[i.DT_BOOL=10]="DT_BOOL",i[i.DT_QINT8=11]="DT_QINT8",i[i.DT_QUINT8=12]="DT_QUINT8",i[i.DT_QINT32=13]="DT_QINT32",i[i.DT_BFLOAT16=14]="DT_BFLOAT16",i[i.DT_QINT16=15]="DT_QINT16",i[i.DT_QUINT16=16]="DT_QUINT16",i[i.DT_UINT16=17]="DT_UINT16",i[i.DT_COMPLEX128=18]="DT_COMPLEX128",i[i.DT_HALF=19]="DT_HALF",i[i.DT_RESOURCE=20]="DT_RESOURCE",i[i.DT_VARIANT=21]="DT_VARIANT",i[i.DT_UINT32=22]="DT_UINT32",i[i.DT_UINT64=23]="DT_UINT64",i}(Jn||{}),dve=new Map([[Jn.DT_FLOAT,"float"],[Jn.DT_DOUBLE,"double"],[Jn.DT_INT32,"int32"],[Jn.DT_UINT8,"uint8"],[Jn.DT_INT16,"int16"],[Jn.DT_INT8,"int8"],[Jn.DT_STRING,"string"],[Jn.DT_COMPLEX64,"complex64"],[Jn.DT_INT64,"int64"],[Jn.DT_BOOL,"bool"],[Jn.DT_QINT8,"qint8"],[Jn.DT_QUINT8,"qint8"],[Jn.DT_QINT32,"qint32"],[Jn.DT_BFLOAT16,"bfloat16"],[Jn.DT_QINT16,"qint16"],[Jn.DT_QUINT16,"qint16"],[Jn.DT_UINT16,"uint16"],[Jn.DT_COMPLEX128,"complex128"],[Jn.DT_HALF,"half"],[Jn.DT_RESOURCE,"resource"],[Jn.DT_VARIANT,"variant"],[Jn.DT_UINT32,"uint32"],[Jn.DT_UINT64,"uint64"]]);function b5(i,e){let t={};if(e.weightsManifest!=null)for(let s of e.weightsManifest)for(let a of s.weights)t[a.name]=a;let n={},r=e.modelTopology.node.map(s=>{let a={id:s.name,label:s.op,namespace:s.name,incomingEdges:uve(s),attrs:hve(s)};return n[a.id]=a,a});for(let s of e.modelTopology.node){if(!n[s.name])continue;let l=s.input||[];for(let c=0;c{let n=e.split(":");return{sourceNodeId:n.length===2?n[0]:e,sourceNodeOutputId:n.length===2?n[1]:"0",targetNodeInputId:`${t}`}})}function hve(i){let e=i.attr||{},t=[];for(let n of Object.keys(e)){let r=e[n],o="";r.list!=null?(r.list.s||[]).length>0?o=(r.list.s||[]).map(s=>iv({s})).join(", "):(r.list.b||[]).length>0?o=(r.list.b||[]).map(s=>iv({b:s})).join(", "):(r.list.f||[]).length>0?o=(r.list.f||[]).map(s=>iv({f:s})).join(", "):(r.list.i||[]).length>0?o=(r.list.i||[]).map(s=>iv({i:s})).join(", "):o="[]":o=iv(r),t.push({key:n,value:o})}return t}function iv(i){let e="";return i.s!=null?Array.isArray(i.s)?e=`${i.s.map(t=>typeof t=="number"?String.fromCharCode(t):`${t}`).join("")}`:e=atob(i.s):i.i!=null?e=`${i.i}`:i.f!=null?e=`${i.f}`:i.b!=null?e=i?"true":"false":i.type!=null&&(e=dve.get(i.type)||"unknown"),e}function nS(i){return!1}function y5(i){return At(this,null,function*(){return new Promise((e,t)=>{let n=new FileReader;n.onload=r=>{let o=JSON.parse(n.result),{graphCollections:s,error:a}=sR(i.name,o);a?t(a):s&&e(s)},n.readAsText(i)})})}function sR(i,e){return e.modelTopology==null?pve(e,i):{graphCollections:[b5(i,e)]}}function pve(i,e){return i.label!=null&&i.graphs!=null?{graphCollections:[i]}:Array.isArray(i)&&i[0].subgraphs!=null?{graphCollections:fve(i,e)}:Array.isArray(i)&&(i.length===0||i.length>0&&i[0].id!=null&&i[0].nodes!=null)?{graphCollections:[{label:e,graphs:i}]}:{error:"Unsupported JSON format"}}function fve(i,e){return i.map(t=>({label:t.label===""?e:`${e} (${t.label})`,graphs:t.subgraphs}))}var mve=(i,e)=>e.id;function gve(i,e){i&1&&(v(0,"span",4),S(1,"Default"),y())}function _ve(i,e){if(i&1){let t=ie();v(0,"div",2),H("click",function(){let r=V(t).$implicit,o=I();return z(o.handleSelectCandidate(r))}),v(1,"div",3),S(2),W(3,gve,2,0,"span",4),y(),v(4,"div",5),S(5),y()()}if(i&2){let t=e.$implicit,n=e.$index,r=I();se("selected",(r.selectedAdapter==null?null:r.selectedAdapter.id)===t.id),w(2),Me(" ",t.name||t.id," "),w(),ae(n===0?3:-1),w(2),Me(" ",t.description||"-"," ")}}var x5=(()=>{class i{candidates=[];selectedAdapter;onClose=new Pe;handleSelectCandidate(t){this.onClose.next(t)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["adapter-selector-panel"]],inputs:{candidates:"candidates",selectedAdapter:"selectedAdapter"},outputs:{onClose:"onClose"},standalone:!0,features:[ce],decls:3,vars:1,consts:[[1,"container"],[1,"candidate-container",3,"selected"],[1,"candidate-container",3,"click"],[1,"name"],[1,"default-label"],[1,"description"]],template:function(n,r){n&1&&(v(0,"div",0),ln(1,_ve,6,5,"div",1,mve),y()),n&2&&(N("@transformPanel","showing"),w(),cn(r.candidates))},dependencies:[Ae,da,it,ua,Jt,_r],styles:[`.container[_ngcontent-%COMP%]{box-shadow:0 2px 6px 2px #00000026,0 1px 2px #0000004d;transform-origin:top center;font-size:13px;padding:8px 0;border-radius:8px;background-color:#fff}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%]{padding:8px 16px}.container[_ngcontent-%COMP%] .candidate-container.selected[_ngcontent-%COMP%]{background-color:#c2e7ff}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%]:hover:not(.selected){background-color:#f2f2f2;cursor:pointer}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:14px;color:#1f1f1f;line-height:20px;margin-bottom:2px;display:flex;align-items:center}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .default-label[_ngcontent-%COMP%]{display:inline-block;padding:0 10px;box-sizing:border-box;background-color:#f3e0b4;color:#70571e;border:1px solid #dbac41;font-size:11px;line-height:14px;border-radius:99px;margin-left:8px}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:12px;color:#444746} @@ -4162,7 +4162,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],data:{animation:[si("transformPanel",[fi("void",Qt({opacity:0,transform:"scale(1, 0.8)"})),On("void => showing",Pn("120ms cubic-bezier(0, 0, 0.2, 1)",Qt({opacity:1,transform:"scale(1, 1)"}))),On("* => void",Pn("100ms linear",Qt({opacity:0})))])]},changeDetection:0})}return i})();function iv(i,e,t){let n=i.split("/").filter(s=>s!==""),o=n[n.length-1].split(".");if(!t&&i.startsWith("http"))return e.getExtensionsForHttpUrls();if(o.length>1){let s=o[o.length-1];return e.getExtensionsByFileExt(s)}return!t&&nS(i)?e.getExtensionsForGoogleStorageDir():[]}var bve="/api/v1/get_extensions",yve="/apipost/v1/send_command",ff=(()=>{class i{loading=yt(!0);extensions=[];constructor(){this.loadExtensions()}sendCommandToExtension(t){return At(this,null,function*(){let n={method:"POST",headers:{"Content-Type":"application/json"}};n.body=JSON.stringify(t);try{let r=yield fetch(yve,n);return r.ok?{cmdResp:yield r.json()}:{otherError:`Failed to convert model. ${r.status}`}}catch(r){return{otherError:r}}})}loadExtensions(){return At(this,null,function*(){let t=[];t=yield this.getExtensionsForExternal(),this.extensions=t,this.loading.set(!1)})}getExtensionsForExternal(){return At(this,null,function*(){try{let t=yield fetch(bve,{credentials:"include"});return t.ok?yield t.json():(console.error(`Failed to get extensions: ${t.status}`),[])}catch(t){return console.error("Failed to get extensions.",t),[]}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var cR=class{registry={};getExtensionsByFileExt(e){return this.registry[e]||[]}getExtensionById(e){for(let t of Object.values(this.registry))for(let n of t)if(n.id===e)return n}getExtensionsForGoogleStorageDir(){let e=[];for(let t of Object.values(this.registry))for(let n of t)n.matchGoogleStorageDir&&!e.includes(n)&&e.push(n);return e}getExtensionsForHttpUrls(){let e=[];for(let t of Object.values(this.registry))for(let n of t)n.matchHttpUrl&&e.push(n);return e}register(e){for(let t of e.fileExts){this.registry[t]==null&&(this.registry[t]=[]);let n=this.registry[t];if(n.find(r=>r.id===e.id)!=null){console.warn("Adapter extension exists",e);continue}n.push(e)}}},S5=(()=>{class i extends cR{extensionService;constructor(t){super(),this.extensionService=t,mt(()=>{if(!this.extensionService.loading())for(let n of this.extensionService.extensions)n.type===sR.ADAPTER&&this.register(n)})}static \u0275fac=function(n){return new(n||i)(X(ff))};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Mo=function(i){return i.DATA="data",i.RENDERER="renderer",i.SHOW_OPEN_IN_NEW_TAB="show_open_in_new_tab",i.BENCHMARK="benchmark",i.ENABLE_SUBGRAPH_SELECTION="ess",i.ENABLE_EXPORT_TO_RESOURCE="eetr",i}(Mo||{}),iS=(()=>{class i{router;models=[];nodeData=[];nodeDataTargets=[];uiState;prevQueryParamStr="";renderer="webgl";showOpenInNewTab=!1;benchmark=!1;enableSubgraphSelection=!1;enableExportToResource=!1;constructor(t){this.router=t,this.decodeUrl()}setModels(t){this.models=t,this.updateUrl()}getModels(){return this.models}setUiState(t){this.uiState=t,this.updateUrl()}getUiState(){return this.uiState}getNodeDataSources(){return this.nodeData||[]}setNodeDataSources(t){this.nodeData=t,this.updateUrl()}getNodeDataTargets(){return this.nodeDataTargets||[]}setNodeDataTargets(t){this.nodeDataTargets=t,this.updateUrl()}updateUrl(){let t={};if(this.benchmark)t[Mo.BENCHMARK]="1";else{let r={models:this.models,nodeData:this.nodeData,nodeDataTargets:this.nodeDataTargets,uiState:this.uiState};t[Mo.DATA]=JSON.stringify(r),t[Mo.RENDERER]=this.renderer,t[Mo.SHOW_OPEN_IN_NEW_TAB]=this.showOpenInNewTab?"1":"0",t[Mo.ENABLE_SUBGRAPH_SELECTION]=this.enableSubgraphSelection?"1":"0",t[Mo.ENABLE_EXPORT_TO_RESOURCE]=this.enableExportToResource?"1":"0"}let n=JSON.stringify(t);n!==this.prevQueryParamStr&&(this.prevQueryParamStr=n,this.router.navigate([],{queryParams:t,queryParamsHandling:"",replaceUrl:!1}))}decodeUrl(){let t=new URLSearchParams(document.location.search),n=t.get(Mo.DATA);if(n){let o=JSON.parse(n),s=o,a=o;a.modelUrl!=null&&(s={models:[{url:a.modelUrl}],uiState:{paneStates:[{deepestExpandedGroupNodeIds:a.deepestExpandedGroupNodeIds||[],selectedNodeId:a.selectedNodeId||"",selectedGraphId:a.selectedGraphId||"",selectedCollectionLabel:"",widthFraction:1}]}}),this.models=s.models,this.uiState=s.uiState,this.nodeData=s.nodeData,this.nodeDataTargets=s.nodeDataTargets}let r=t.get(Mo.RENDERER);this.renderer=r||"webgl",this.showOpenInNewTab=t.get(Mo.SHOW_OPEN_IN_NEW_TAB)==="1",this.enableSubgraphSelection=t.get(Mo.ENABLE_SUBGRAPH_SELECTION)==="1",this.enableExportToResource=t.get(Mo.ENABLE_EXPORT_TO_RESOURCE)==="1",this.benchmark=t.get(Mo.BENCHMARK)==="1"}static \u0275fac=function(n){return new(n||i)(X(fh))};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var wve=["modelPathInput"];function Cve(i,e){if(i&1){let t=ie();v(0,"mat-option",22)(1,"div",31),S(2),v(3,"div",32)(4,"div",33),H("click",function(r){let o=V(t).$index,s=I();return z(s.handleEditAutocompleteModelPath(r,o))}),v(5,"mat-icon"),S(6,"edit"),y()(),v(7,"div",33),H("click",function(r){let o=V(t).$index,s=I();return z(s.handleClickDeleteAutocompleteModelPath(r,o))}),v(8,"mat-icon"),S(9,"delete"),y()()()()()}if(i&2){let t=e.$implicit;N("value",t),w(2),Me(" ",t," ")}}function Sve(i,e){i&1&&(v(0,"div",28),S(1," You have selected maximum number of models "),y())}function Mve(i,e){i&1&&J(0,"mat-spinner",43)}function Eve(i,e){if(i&1&&(v(0,"div",49),S(1),y()),i&2){let t=I(2).$implicit;w(),Me(" ",t.errorMessage," ")}}function Ive(i,e){if(i&1&&(v(0,"div",48)(1,"mat-icon"),S(2,"info"),y()(),W(3,Eve,2,1,"ng-template",null,6,kt)),i&2){let t=ve(4),n=I(3);N("bubble",t)("overlaySize",n.errorInfoPopupSize)("hoverDelayMs",50)}}function Tve(i,e){if(i&1){let t=ie();v(0,"div",50,7),H("click",function(){V(t);let r=ve(1),o=I().$implicit,s=I(2);return z(s.handleClickOpenAdapterDropdown(o,r))}),v(2,"div",51),S(3),y(),v(4,"mat-icon"),S(5,"arrow_drop_down"),y()()}if(i&2){let t=I().$implicit,n=I(2);se("disabled",n.loading()),w(3),Me(" ",n.getSelectedAdapterName(t)," ")}}function Dve(i,e){i&1&&(v(0,"div",46),S(1," No supported adapter "),y())}function Pve(i,e){if(i&1){let t=ie();v(0,"tr")(1,"td")(2,"div",39)(3,"mat-checkbox",40,5),H("change",function(r){let o=V(t).$implicit,s=I(2);return z(s.handleModelSelectionChanged(o,r.checked))}),y(),v(5,"div",41),H("click",function(){let r=V(t).$implicit,o=ve(4),s=I(2);return z(s.handleModelSelectionChanged(r,!o.checked))}),S(6),y()()(),v(7,"td")(8,"div",42),W(9,Mve,1,0,"mat-spinner",43),v(10,"div",44),S(11),y(),W(12,Ive,5,3),y()(),v(13,"td"),W(14,Tve,6,3,"div",45)(15,Dve,2,0,"div",46),y(),v(16,"td")(17,"button",47),H("click",function(){let r=V(t).index,o=I(2);return z(o.handleDeleteModel(r))}),v(18,"mat-icon"),S(19,"delete"),y()()()()}if(i&2){let t=e.$implicit,n=I(2);w(2),se("disabled",!n.hasSupportedAdapter(t)),w(),N("checked",t.selected)("disabled",!n.hasSupportedAdapter(t)||n.loading()),w(2),se("disabled",!n.hasSupportedAdapter(t)||n.loading()),w(),Me(" ",t.path," "),w(3),ae(n.showSpinner(t)?9:-1),w(),se("done",t.status()===n.ModelItemStatus.DONE)("error",n.hasError(t)),w(),Me(" ",n.getModelItemStatusString(t)," "),w(),ae(n.hasError(t)?12:-1),w(2),ae(n.hasSupportedAdapter(t)?14:15),w(3),N("disabled",n.loading())}}function Ove(i,e){if(i&1&&(v(0,"div",29)(1,"table")(2,"thead")(3,"tr")(4,"th",34),S(5,"Model name"),y(),v(6,"th"),S(7,"Status"),y(),v(8,"th")(9,"div",35),S(10," Adapter "),v(11,"div",36)(12,"mat-icon",37),S(13,"help_outline"),y()()()(),v(14,"th"),S(15,"Delete"),y()()(),v(16,"tbody"),W(17,Pve,20,16,"tr",38),y()()()),i&2){let t=I(),n=ve(49);w(11),N("bubble",n)("overlayPositions",t.adapterHelpPopupPosition)("hoverDelayMs",100),w(6),N("ngForOf",t.modelItems)("ngForTrackBy",t.trackByModelData)}}function Rve(i,e){if(i&1){let t=ie();v(0,"div",30)(1,"div",52)(2,"button",53),H("click",function(){V(t);let r=I();return z(r.handleDeselectAllModels())}),v(3,"mat-icon"),S(4,"close"),y()(),S(5),y(),v(6,"button",54),H("click",function(){V(t);let r=I();return z(r.handleClickViewSelectedModels())}),S(7," View selected models "),y()()}if(i&2){let t=I();w(),se("hide",t.selectedModelsCount===0),w(),N("disabled",t.loading()),w(3),Me(" ",t.selectedModelsCount," selected "),w(),N("disabled",t.selectedModelsCount===0||t.loading())}}function Ave(i,e){i&1&&(v(0,"div",55)(1,"div"),S(2," Support TF, TFL and StableHLO dialect. "),y()())}function Nve(i,e){i&1&&(v(0,"div",56)(1,"span",57),S(2,"Adapters"),y(),S(3,' transform model files into an intermediate format that Model Explorer can understand and visualize. For certain model types, multiple adapters may exist, offering different transformation approaches. The "default" adapter should cover the majority of common scenarios. '),J(4,"br")(5,"br"),S(6," You can also create your own "),v(7,"span",57),S(8,"adapter extensions"),y(),S(9," to add support for more model formats. See "),v(10,"a",58),S(11,"this guide"),y(),S(12," for instructions. "),y())}var dR=10,uR="model_explorer_model_paths",E5=50,I5=(()=>{class i{changeDetectorRef;adapterExtensionService;destroyRef;localStorageService;modelLoaderService;overlay;urlService;viewContainerRef;modelPathInput;matAutocompleteTrigger;curFilePath=new gr("");modelItems=[];modelInputAutocompleteOptions=[];filteredModelInputAutocompleteOptions=[];ModelItemStatus=Un;modelFormatHelpPopupSize={maxWidth:400,minHeight:0};errorInfoPopupSize={minHeight:0};adapterHelpPopupPosition=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",offsetY:-4}];loading=yt(!1);hasUploadedModels=yt(!1);portal=null;constructor(t,n,r,o,s,a,l,c){this.changeDetectorRef=t,this.adapterExtensionService=n,this.destroyRef=r,this.localStorageService=o,this.modelLoaderService=s,this.overlay=a,this.urlService=l,this.viewContainerRef=c,this.curFilePath.valueChanges.pipe(Vi(this.destroyRef)).subscribe(d=>{this.updateFilteredAutocompleteOptions()}),this.modelInputAutocompleteOptions=this.loadSavedModelPathsForAutocomplete(),this.updateFilteredAutocompleteOptions()}startProcessingModelSource(t){this.modelItems=t.map(n=>{if(n.url.startsWith(tS)){let r=this.adapterExtensionService.getExtensionById(Cu.JSON_LOADER),o=r==null?[]:[r];return{path:n.url,type:Oi.GRAPH_JSONS_FROM_SERVER,status:yt(Un.NOT_STARTED),selected:o.length>0,adapterCandidates:o,selectedAdapter:r}}else{let r=iv(n.url,this.adapterExtensionService,!0),o=this.adapterExtensionService.getExtensionById(n.converterId||n.adapterId||"");return o||(o=r.length>0?r[0]:void 0),{path:n.url,type:Oi.FILE_PATH,status:yt(Un.NOT_STARTED),selected:r.length>0,adapterCandidates:r,selectedAdapter:o}}}),this.changeDetectorRef.detectChanges(),this.modelItems.some(n=>n.selected)&&this.handleClickViewSelectedModels()}startWithUrlEncodedData(t,n){if(t){let r=this.adapterExtensionService.getExtensionById(Cu.JSON_LOADER);if(!r)return;this.addModelItems([{path:"",type:Oi.GRAPH_JSONS_FROM_SERVER,status:yt(Un.NOT_STARTED),selected:!0,adapterCandidates:[r],selectedAdapter:r}])}if(n.length>0){let r=n.map(o=>{let s=iv(o,this.adapterExtensionService,!0);return{path:o,type:Oi.FILE_PATH,status:yt(Un.NOT_STARTED),selected:s.length>0,adapterCandidates:s,selectedAdapter:s.length>0?s[0]:void 0}});this.addModelItems(r),this.addPathsToAutocompleteHistory(n),this.updateFilteredAutocompleteOptions()}this.changeDetectorRef.detectChanges(),t&&n.length===0&&this.handleClickViewSelectedModels()}handleClickAddEnteredModelPath(){return At(this,null,function*(){yield new Promise(r=>{setTimeout(r)});let t=this.curFilePath.value;if(t==null)return;let n=t.trim().split(",").filter(r=>r.trim()!=="").map(r=>{let o=iv(r,this.adapterExtensionService,!0);return{path:r,type:this.isInternal?Oi.REMOTE:Oi.FILE_PATH,status:yt(Un.NOT_STARTED),selected:o.length>0,adapterCandidates:o,selectedAdapter:o.length>0?o[0]:void 0}});this.addModelItems(n),this.addPathsToAutocompleteHistory(n.map(r=>r.path)),this.curFilePath.setValue(""),setTimeout(()=>{this.matAutocompleteTrigger?.closePanel(),this.modelPathInput.nativeElement.blur()})})}handleAutocompleteOptionSelected(t){this.disableAddEnteredModelPathButton||(t.option.deselect(),this.handleClickAddEnteredModelPath())}handleModelSelectionChanged(t,n){t.selected=n}handleDeleteModel(t){this.modelItems.splice(t,1),this.changeDetectorRef.markForCheck()}handleDeselectAllModels(){for(let t of this.modelItems)t.selected=!1}handleEditAutocompleteModelPath(t,n){t.stopPropagation(),this.curFilePath.setValue(this.modelInputAutocompleteOptions[n].path),this.modelPathInput.nativeElement.focus()}handleClickDeleteAutocompleteModelPath(t,n){t.stopPropagation(),this.modelInputAutocompleteOptions.splice(n,1),this.updateFilteredAutocompleteOptions(),this.localStorageService.setItem(uR,JSON.stringify(this.modelInputAutocompleteOptions))}handleClickUpload(t){let n=t.files;if(!n)return;let r=[];for(let o=0;o0,file:o,adapterCandidates:s,selectedAdapter:s.length>0?s[0]:void 0})}this.addModelItems(n)}handleClickOpenAdapterDropdown(t,n){let r=t.selectedAdapter?.id,o=this.createOverlay(n),s=o.attach(this.portal);s.instance.selectedAdapter=t.selectedAdapter,s.instance.candidates=t.adapterCandidates||[],s.instance.onClose.subscribe(a=>{o.dispose(),a?.id!==r&&t.errorMessage!=null&&(t.status.set(Un.NOT_STARTED),t.errorMessage=void 0,t.selected=!0),t.selectedAdapter=a,this.changeDetectorRef.markForCheck()})}handleClickViewSelectedModels(){this.loading.set(!0);let t=this.modelItems.filter(n=>n.selected);this.modelLoaderService.loadModels(t).then(()=>{this.loading.set(!1)}),this.urlService.setUiState(void 0),this.urlService.setModels(t.filter(n=>n.type===Oi.REMOTE||n.type===Oi.GRAPH_JSONS_FROM_SERVER||n.type===Oi.FILE_PATH).map(n=>({url:n.path,adapterId:n.selectedAdapter?.id}))),this.hasUploadedModels.set(t.some(n=>n.type===Oi.LOCAL))}trackByModelData(t,n){return`${n.path}_${n.file?.size}_${n.file?.lastModified}`}isNotStarted(t){return t.status()===Un.NOT_STARTED}getSelectedAdapterName(t){return t.selectedAdapter==null?"?":(t.adapterCandidates||[]).indexOf(t.selectedAdapter)===0?"Default":t.selectedAdapter?.name||"?"}hasSupportedAdapter(t){return(t.adapterCandidates||[]).length>0}hasMultipleSupportedAdapters(t){return(t.adapterCandidates||[]).length>1}showSpinner(t){return t.status()===Un.PROCESSING||t.status()===Un.UPLOADING}hasError(t){return t.status()===Un.ERROR}getModelItemStatusString(t){let n=t.status();return n===Un.UPLOADING?"Processing":n}get disableAddEnteredModelPathButton(){if(this.hasReachedMaxModelsCount)return!0;if(this.isInternal){let t=(this.curFilePath.value||"").toLowerCase().trim();return t!==""&&!nS(t)&&!t.startsWith("http")||t===""}else{let t=(this.curFilePath.value||"").trim();return t===""||t!==""&&!t.startsWith("/")&&!t.startsWith("~")}}get isInternal(){return!!0}get isExternal(){return!0}get selectedModelsCount(){return this.modelItems.filter(t=>t.selected).length}get hasReachedMaxModelsCount(){return this.modelItems.length===dR}get modelPathInputPlaceholder(){return"Absolute file paths (recommended for large models)"}updateFilteredAutocompleteOptions(){let n=(this.curFilePath.value||"").toLowerCase();this.filteredModelInputAutocompleteOptions=this.modelInputAutocompleteOptions.filter(r=>r.path.toLowerCase().includes(n)).map(r=>r.path),this.changeDetectorRef.markForCheck()}addPathsToAutocompleteHistory(t){let n=this.loadSavedModelPathsForAutocomplete();for(let r of t){let o=n.findIndex(s=>s.path===r);if(o>=0){let s=n.splice(o,1);s&&s.length>0&&(s[0].ts=Date.now(),n.unshift(s[0]))}else n.unshift({path:r,ts:Date.now()})}n.length>E5&&n.splice(E5),this.localStorageService.setItem(uR,JSON.stringify(n)),this.modelInputAutocompleteOptions=n}addModelItems(t){let n=t.filter(r=>this.modelItems.find(o=>o.path===r.path&&o.file?.size===r.file?.size&&o.file?.lastModified===r.file?.lastModified)==null);this.modelItems.push(...n),this.modelItems.length>dR&&this.modelItems.splice(dR),this.changeDetectorRef.markForCheck()}loadSavedModelPathsForAutocomplete(){return JSON.parse(this.localStorageService.getItem(uR)||"[]")}createOverlay(t){let n=new ui({positionStrategy:this.overlay.position().flexibleConnectedTo(t).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"}]),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),maxWidth:"380px",panelClass:"graph-selector-panel"}),r=this.overlay.create(n);return this.portal=new Di(C5,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}static \u0275fac=function(n){return new(n||i)(M(Fe),M(S5),M(Ni),M(Vo),M("ModelLoaderService"),M(Ht),M(iS),M(Yt))};static \u0275cmp=le({type:i,selectors:[["model-source-input"]],viewQuery:function(n,r){if(n&1&&(Ie(wve,5),Ie(tv,5)),n&2){let o;be(o=ye())&&(r.modelPathInput=o.first),be(o=ye())&&(r.matAutocompleteTrigger=o.first)}},standalone:!0,features:[ce],decls:50,vars:15,consts:[["auto","matAutocomplete"],["modelPathInput",""],["uploadInput",""],["externalMlirHelp",""],["adapterHelp",""],["checkbox",""],["errorInfo",""],["selector",""],[1,"container"],[1,"content"],[1,"title"],[1,"description-container"],[1,"description"],["href","https://www.tensorflow.org/","target","_blank"],["href","https://www.tensorflow.org/lite","target","_blank"],["href","https://www.tensorflow.org/js","target","_blank"],["href","https://www.tensorflow.org/guide/jax2tf","target","_blank"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#how-to-select-pytorch-models","target","_blank"],[1,"help-trigger","external",3,"bubble","overlaySize","hoverDelayMs"],[1,"source-input-container"],[1,"input-container"],[1,"model-path-autocomplete",3,"optionSelected"],[3,"value"],[3,"keydown.enter","placeholder","formControl","matAutocomplete"],["mat-raised-button","",1,"btn-add-model-path",3,"click","disabled"],[1,"or-label"],["mat-flat-button","",1,"btn-upload",3,"click","disabled"],["type","file","multiple","",1,"upload-input",3,"change"],[1,"model-count-warning"],[1,"models-table"],[1,"table-action-bar"],[1,"option-container"],[1,"icons-container"],[1,"mat-icon-container",3,"click"],[1,"model-name-col"],[1,"adapter-header"],[1,"icon-container",3,"bubble","overlayPositions","hoverDelayMs"],["fontSet","google-material-icons"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"model-name-container"],[3,"change","checked","disabled"],[1,"model-path",3,"click"],[1,"model-status-container"],["color","primary","diameter","16"],[1,"model-status-label-container"],[1,"selected-adapter-container",3,"disabled"],[1,"no-supported-adapter-msg"],["mat-icon-button","",1,"btn-delete-model-item",3,"click","disabled"],[1,"error-info-container",3,"bubble","overlaySize","hoverDelayMs"],[1,"model-explorer-error-info-popup"],[1,"selected-adapter-container",3,"click"],[1,"selected-adapter-label"],[1,"selection-status"],["mat-icon-button","",1,"btn-deselect-all",3,"click","disabled"],["mat-flat-button","","color","primary",1,"btn-view-models",3,"click","disabled"],[1,"model-explorer-model-format-help-popup"],[1,"model-explorer-adapter-help-popup"],[1,"bold"],["href","https://github.com/google-ai-edge/model-explorer/wiki/6.-Develop-Adapter-Extension","target","_blank"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",8)(1,"div",9)(2,"div",10),S(3," Select Models "),y(),v(4,"div",11)(5,"div",12),S(6," Select models from your comupter or enter the file paths directly (up to 10 in total)."),J(7,"br"),S(8," Supported model formats: "),v(9,"a",13),S(10,"TF"),y(),S(11," (.pb, .pbtxt, .graphdef), "),v(12,"a",14),S(13,"TFLite"),y(),S(14," (.tflite), "),v(15,"a",15),S(16,"TFJS"),y(),S(17," (.json), "),v(18,"a",16),S(19,"JAX"),y(),S(20," (.pb), "),v(21,"a",17),S(22,"PyTorch ExportedProgram"),y(),S(23," (.pt2), "),v(24,"span",18),S(25," MLIR "),y(),S(26," (.mlir, .mlirbc). "),y()(),v(27,"div",19)(28,"div",20)(29,"mat-autocomplete",21,0),H("optionSelected",function(a){return V(o),z(r.handleAutocompleteOptionSelected(a))}),ln(31,Cve,10,2,"mat-option",22,Qr),y(),v(33,"input",23,1),H("keydown.enter",function(){return V(o),z(!r.disableAddEnteredModelPathButton&&r.handleClickAddEnteredModelPath())}),y(),v(35,"button",24),H("click",function(){return V(o),z(r.handleClickAddEnteredModelPath())}),S(36," Add "),y()(),v(37,"div",25),S(38,"or"),y(),v(39,"button",26),H("click",function(){V(o);let a=ve(42);return z(a.click())}),S(40," Select from your computer "),y(),v(41,"input",27,2),H("change",function(){V(o);let a=ve(42);return z(r.handleClickUpload(a))}),y()(),W(43,Sve,2,0,"div",28)(44,Ove,18,5,"div",29),y(),W(45,Rve,8,5,"div",30),y(),W(46,Ave,3,0,"ng-template",null,3,kt)(48,Nve,13,0,"ng-template",null,4,kt)}if(n&2){let o=ve(30),s=ve(47);w(),se("no-models",r.modelItems.length===0),w(23),N("bubble",s)("overlaySize",r.modelFormatHelpPopupSize)("hoverDelayMs",50),w(3),se("reverse",r.isExternal),w(4),cn(r.filteredModelInputAutocompleteOptions),w(2),N("placeholder",r.modelPathInputPlaceholder)("formControl",r.curFilePath)("matAutocomplete",o),w(2),N("disabled",r.disableAddEnteredModelPathButton||r.loading()),w(4),N("disabled",r.hasReachedMaxModelsCount||r.loading()),w(4),ae(r.hasReachedMaxModelsCount?43:-1),w(),ae(r.modelItems.length>0?44:-1),w(),ae(r.modelItems.length>0?45:-1)}},dependencies:[$n,Ae,Ci,y5,v5,ql,tv,In,zi,Ho,NC,AC,da,ns,ca,ua,Jt,it,gt,_r,js,zo,ho],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;display:flex;align-items:flex-start;flex-direction:column;border:1px solid #dadce0;border-radius:8px;overflow:hidden}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:24px 24px 0;overflow:hidden;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] .content.no-models[_ngcontent-%COMP%]{padding-bottom:24px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#1f1f1f;font-size:24px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%]{color:#444746;font-size:14px;margin-top:8px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:20px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .tfhub[_ngcontent-%COMP%]{display:inline-block;text-decoration:underline;text-decoration-color:#aaa;cursor:help}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .help-trigger[_ngcontent-%COMP%]{display:inline-block;margin-right:6px;text-decoration:underline;text-decoration-color:#aaa;cursor:help}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .help-trigger.external[_ngcontent-%COMP%]{margin-right:0}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:inherit}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%]{display:flex;height:56px;box-sizing:border-box;width:100%;margin-top:8px;padding:8px 0;align-items:center;flex-shrink:0}.container[_ngcontent-%COMP%] .source-input-container.reverse[_ngcontent-%COMP%]{flex-direction:row-reverse}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{height:100%;box-sizing:border-box;background-color:#f0f4f9;border-radius:99px;flex-grow:1;display:flex;align-items:center;padding-left:18px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:100%;flex-grow:1;border:none;outline:none;background-color:transparent;color:#444746;font-size:14px;margin-right:16px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-add-model-path[_ngcontent-%COMP%]{background-color:#fff;border-radius:99px;color:#0b57d0;height:40px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-add-model-path[disabled][_ngcontent-%COMP%]{background-color:#1f1f1f1f;color:#1f1f1f61}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .or-label[_ngcontent-%COMP%]{font-size:14px;margin:0 20px;color:#5f6368}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .btn-upload[_ngcontent-%COMP%]{height:100%;background-color:#c2e7ff;border-radius:99px;color:#001d35}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .btn-upload[disabled][_ngcontent-%COMP%]{background-color:#1f1f1f1f;color:#1f1f1f61}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .upload-input[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .model-count-warning[_ngcontent-%COMP%]{color:#ab6c17;background-color:#ffefd9;margin:4px 0;width:fit-content;padding:2px 9px;border-radius:4px;font-size:13px;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%]{width:100%;color:#1f1f1f;font-size:14px;margin-top:18px;overflow:hidden auto}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-spacing:0;border-collapse:collapse;padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:sticky;top:0;z-index:100;box-shadow:inset 0 -1px #c4c7c5;background-color:#fff}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .model-name-col[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;opacity:.8}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:#777}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{height:49px;text-align:left;padding:0;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:49px;text-align:left;padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid #c4c7c5}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding-left:12px;margin-right:12px;word-break:break-all}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-right:2px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] .model-path[_ngcontent-%COMP%]{cursor:pointer;line-height:16px;padding:8px 0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] .model-path.disabled[_ngcontent-%COMP%]{pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;cursor:pointer;height:48px;margin-right:24px;white-space:nowrap}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container.disabled[_ngcontent-%COMP%]{opacity:.5;pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{opacity:1}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.7}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .no-supported-adapter-msg[_ngcontent-%COMP%]{color:#ab6c17;background-color:#ffefd9;padding:2px 8px;width:fit-content;border-radius:4px;font-size:12px;margin-right:24px;white-space:nowrap;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:32px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container[_ngcontent-%COMP%]{font-size:12px;padding:2px 8px;background-color:#f1f3f4;display:flex;align-items:center;justify-content:center;color:#3c4043;width:fit-content;border-radius:4px;white-space:nowrap;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container.done[_ngcontent-%COMP%]{color:#0d652d;background-color:#e6f4ea}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container.error[_ngcontent-%COMP%]{color:#a50e0e;background-color:#fce8e6}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .error-info-container[_ngcontent-%COMP%]{width:20px;display:flex;align-items:center;justify-content:center;margin-left:4px;cursor:pointer}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .error-info-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:20px;height:20px;font-size:20px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[_ngcontent-%COMP%]{width:36px;height:36px;padding:0;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[disabled][_ngcontent-%COMP%]{opacity:.5}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[_ngcontent-%COMP%] mat-icon{font-size:20px;width:20px;height:20px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%]{flex-shrink:0;height:60px;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;background-color:#f0f4f9;padding:0 24px 0 38px}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .selection-status[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:14px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .selection-status.hide[_ngcontent-%COMP%]{visibility:hidden}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-deselect-all[_ngcontent-%COMP%]{width:36px;height:36px;padding:0;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-deselect-all[_ngcontent-%COMP%] mat-icon{font-size:20px;width:20px;height:20px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-view-models[_ngcontent-%COMP%]{height:40px;border-radius:99px}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%]{font-size:13px;color:#555;margin-top:24px;display:none}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;margin-right:4px}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%] .model-format[_ngcontent-%COMP%]{color:#333;margin-right:4px;margin-left:4px;border:1px solid #ccc;border-radius:4px;padding:2px 4px;cursor:pointer}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%] .model-format[_ngcontent-%COMP%]:hover{background-color:#eee} .model-explorer-upload-help-popup{padding:12px;font-weight:400;color:#555;line-height:14px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-explorer-adapter-help-popup{padding:12px;font-weight:400;color:#555;line-height:15px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-explorer-adapter-help-popup .bold{font-weight:700} .model-explorer-model-format-help-popup{padding:12px;font-weight:400;color:#555;line-height:15px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif;letter-spacing:normal} .model-explorer-model-format-help-popup a{color:inherit} .model-explorer-model-format-help-popup .example{margin-top:8px;color:#aaa} .model-explorer-model-format-help-popup .example ul{margin:4px 0;padding-inline-start:28px} .model-explorer-model-format-help-popup .example li{margin-top:4px} .model-explorer-model-format-help-popup .info{display:inline-block;background-color:#ffd1a8} .model-explorer-error-info-popup{padding:12px;font-weight:400;background-color:#f0f4f9;line-height:14px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-path-autocomplete mat-option{min-height:13px;font-size:13px;line-height:13px;padding-top:5px;padding-bottom:5px} .model-path-autocomplete mat-option:hover .option-container .mat-icon-container{visibility:visible} .model-path-autocomplete mat-option>span{width:100%} .model-path-autocomplete mat-option .option-container{width:100%;display:flex;align-items:center;justify-content:space-between;word-break:break-all} .model-path-autocomplete mat-option .option-container .icons-container{display:flex;align-items:center;gap:4px;min-width:50px;justify-content:flex-end} .model-path-autocomplete mat-option .option-container .mat-icon-container{visibility:hidden;display:flex;align-items:center;justify-content:center;opacity:.6;width:18px} .model-path-autocomplete mat-option .option-container .mat-icon-container:hover{opacity:1} .model-path-autocomplete mat-option .option-container .mat-icon-container mat-icon{font-size:18px;width:18px;height:18px} +`],data:{animation:[si("transformPanel",[fi("void",Qt({opacity:0,transform:"scale(1, 0.8)"})),On("void => showing",Pn("120ms cubic-bezier(0, 0, 0.2, 1)",Qt({opacity:1,transform:"scale(1, 1)"}))),On("* => void",Pn("100ms linear",Qt({opacity:0})))])]},changeDetection:0})}return i})();function rv(i,e,t){let n=i.split("/").filter(s=>s!==""),o=n[n.length-1].split(".");if(!t&&i.startsWith("http"))return e.getExtensionsForHttpUrls();if(o.length>1){let s=o[o.length-1];return e.getExtensionsByFileExt(s)}return!t&&nS(i)?e.getExtensionsForGoogleStorageDir():[]}var vve="/api/v1/get_extensions",bve="/apipost/v1/send_command",ff=(()=>{class i{loading=xt(!0);extensions=[];constructor(){this.loadExtensions()}sendCommandToExtension(t){return At(this,null,function*(){let n={method:"POST",headers:{"Content-Type":"application/json"}};n.body=JSON.stringify(t);try{let r=yield fetch(bve,n);return r.ok?{cmdResp:yield r.json()}:{otherError:`Failed to convert model. ${r.status}`}}catch(r){return{otherError:r}}})}loadExtensions(){return At(this,null,function*(){let t=[];t=yield this.getExtensionsForExternal(),this.extensions=t,this.loading.set(!1)})}getExtensionsForExternal(){return At(this,null,function*(){try{let t=yield fetch(vve,{credentials:"include"});return t.ok?yield t.json():(console.error(`Failed to get extensions: ${t.status}`),[])}catch(t){return console.error("Failed to get extensions.",t),[]}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var lR=class{registry={};getExtensionsByFileExt(e){return this.registry[e]||[]}getExtensionById(e){for(let t of Object.values(this.registry))for(let n of t)if(n.id===e)return n}getExtensionsForGoogleStorageDir(){let e=[];for(let t of Object.values(this.registry))for(let n of t)n.matchGoogleStorageDir&&!e.includes(n)&&e.push(n);return e}getExtensionsForHttpUrls(){let e=[];for(let t of Object.values(this.registry))for(let n of t)n.matchHttpUrl&&e.push(n);return e}register(e){for(let t of e.fileExts){this.registry[t]==null&&(this.registry[t]=[]);let n=this.registry[t];if(n.find(r=>r.id===e.id)!=null){console.warn("Adapter extension exists",e);continue}n.push(e)}}},w5=(()=>{class i extends lR{extensionService;constructor(t){super(),this.extensionService=t,mt(()=>{if(!this.extensionService.loading())for(let n of this.extensionService.extensions)n.type===oR.ADAPTER&&this.register(n)})}static \u0275fac=function(n){return new(n||i)(X(ff))};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Mo=function(i){return i.DATA="data",i.RENDERER="renderer",i.SHOW_OPEN_IN_NEW_TAB="show_open_in_new_tab",i.BENCHMARK="benchmark",i.ENABLE_SUBGRAPH_SELECTION="ess",i.ENABLE_EXPORT_TO_RESOURCE="eetr",i}(Mo||{}),iS=(()=>{class i{router;models=[];nodeData=[];nodeDataTargets=[];uiState;prevQueryParamStr="";renderer="webgl";showOpenInNewTab=!1;benchmark=!1;enableSubgraphSelection=!1;enableExportToResource=!1;constructor(t){this.router=t,this.decodeUrl()}setModels(t){this.models=t,this.updateUrl()}getModels(){return this.models}setUiState(t){this.uiState=t,this.updateUrl()}getUiState(){return this.uiState}getNodeDataSources(){return this.nodeData||[]}setNodeDataSources(t){this.nodeData=t,this.updateUrl()}getNodeDataTargets(){return this.nodeDataTargets||[]}setNodeDataTargets(t){this.nodeDataTargets=t,this.updateUrl()}updateUrl(){let t={};if(this.benchmark)t[Mo.BENCHMARK]="1";else{let r={models:this.models,nodeData:this.nodeData,nodeDataTargets:this.nodeDataTargets,uiState:this.uiState};t[Mo.DATA]=JSON.stringify(r),t[Mo.RENDERER]=this.renderer,t[Mo.SHOW_OPEN_IN_NEW_TAB]=this.showOpenInNewTab?"1":"0",t[Mo.ENABLE_SUBGRAPH_SELECTION]=this.enableSubgraphSelection?"1":"0",t[Mo.ENABLE_EXPORT_TO_RESOURCE]=this.enableExportToResource?"1":"0"}let n=JSON.stringify(t);n!==this.prevQueryParamStr&&(this.prevQueryParamStr=n,this.router.navigate([],{queryParams:t,queryParamsHandling:"",replaceUrl:!1}))}decodeUrl(){let t=new URLSearchParams(document.location.search),n=t.get(Mo.DATA);if(n){let o=JSON.parse(n),s=o,a=o;a.modelUrl!=null&&(s={models:[{url:a.modelUrl}],uiState:{paneStates:[{deepestExpandedGroupNodeIds:a.deepestExpandedGroupNodeIds||[],selectedNodeId:a.selectedNodeId||"",selectedGraphId:a.selectedGraphId||"",selectedCollectionLabel:"",widthFraction:1}]}}),this.models=s.models,this.uiState=s.uiState,this.nodeData=s.nodeData,this.nodeDataTargets=s.nodeDataTargets}let r=t.get(Mo.RENDERER);this.renderer=r||"webgl",this.showOpenInNewTab=t.get(Mo.SHOW_OPEN_IN_NEW_TAB)==="1",this.enableSubgraphSelection=t.get(Mo.ENABLE_SUBGRAPH_SELECTION)==="1",this.enableExportToResource=t.get(Mo.ENABLE_EXPORT_TO_RESOURCE)==="1",this.benchmark=t.get(Mo.BENCHMARK)==="1"}static \u0275fac=function(n){return new(n||i)(X(fh))};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var xve=["modelPathInput"];function wve(i,e){if(i&1){let t=ie();v(0,"mat-option",22)(1,"div",31),S(2),v(3,"div",32)(4,"div",33),H("click",function(r){let o=V(t).$index,s=I();return z(s.handleEditAutocompleteModelPath(r,o))}),v(5,"mat-icon"),S(6,"edit"),y()(),v(7,"div",33),H("click",function(r){let o=V(t).$index,s=I();return z(s.handleClickDeleteAutocompleteModelPath(r,o))}),v(8,"mat-icon"),S(9,"delete"),y()()()()()}if(i&2){let t=e.$implicit;N("value",t),w(2),Me(" ",t," ")}}function Cve(i,e){i&1&&(v(0,"div",28),S(1," You have selected maximum number of models "),y())}function Sve(i,e){i&1&&J(0,"mat-spinner",43)}function Mve(i,e){if(i&1&&(v(0,"div",49),S(1),y()),i&2){let t=I(2).$implicit;w(),Me(" ",t.errorMessage," ")}}function Eve(i,e){if(i&1&&(v(0,"div",48)(1,"mat-icon"),S(2,"info"),y()(),W(3,Mve,2,1,"ng-template",null,6,kt)),i&2){let t=ve(4),n=I(3);N("bubble",t)("overlaySize",n.errorInfoPopupSize)("hoverDelayMs",50)}}function Ive(i,e){if(i&1){let t=ie();v(0,"div",50,7),H("click",function(){V(t);let r=ve(1),o=I().$implicit,s=I(2);return z(s.handleClickOpenAdapterDropdown(o,r))}),v(2,"div",51),S(3),y(),v(4,"mat-icon"),S(5,"arrow_drop_down"),y()()}if(i&2){let t=I().$implicit,n=I(2);se("disabled",n.loading()),w(3),Me(" ",n.getSelectedAdapterName(t)," ")}}function Tve(i,e){i&1&&(v(0,"div",46),S(1," No supported adapter "),y())}function Dve(i,e){if(i&1){let t=ie();v(0,"tr")(1,"td")(2,"div",39)(3,"mat-checkbox",40,5),H("change",function(r){let o=V(t).$implicit,s=I(2);return z(s.handleModelSelectionChanged(o,r.checked))}),y(),v(5,"div",41),H("click",function(){let r=V(t).$implicit,o=ve(4),s=I(2);return z(s.handleModelSelectionChanged(r,!o.checked))}),S(6),y()()(),v(7,"td")(8,"div",42),W(9,Sve,1,0,"mat-spinner",43),v(10,"div",44),S(11),y(),W(12,Eve,5,3),y()(),v(13,"td"),W(14,Ive,6,3,"div",45)(15,Tve,2,0,"div",46),y(),v(16,"td")(17,"button",47),H("click",function(){let r=V(t).index,o=I(2);return z(o.handleDeleteModel(r))}),v(18,"mat-icon"),S(19,"delete"),y()()()()}if(i&2){let t=e.$implicit,n=I(2);w(2),se("disabled",!n.hasSupportedAdapter(t)),w(),N("checked",t.selected)("disabled",!n.hasSupportedAdapter(t)||n.loading()),w(2),se("disabled",!n.hasSupportedAdapter(t)||n.loading()),w(),Me(" ",t.path," "),w(3),ae(n.showSpinner(t)?9:-1),w(),se("done",t.status()===n.ModelItemStatus.DONE)("error",n.hasError(t)),w(),Me(" ",n.getModelItemStatusString(t)," "),w(),ae(n.hasError(t)?12:-1),w(2),ae(n.hasSupportedAdapter(t)?14:15),w(3),N("disabled",n.loading())}}function Pve(i,e){if(i&1&&(v(0,"div",29)(1,"table")(2,"thead")(3,"tr")(4,"th",34),S(5,"Model name"),y(),v(6,"th"),S(7,"Status"),y(),v(8,"th")(9,"div",35),S(10," Adapter "),v(11,"div",36)(12,"mat-icon",37),S(13,"help_outline"),y()()()(),v(14,"th"),S(15,"Delete"),y()()(),v(16,"tbody"),W(17,Dve,20,16,"tr",38),y()()()),i&2){let t=I(),n=ve(49);w(11),N("bubble",n)("overlayPositions",t.adapterHelpPopupPosition)("hoverDelayMs",100),w(6),N("ngForOf",t.modelItems)("ngForTrackBy",t.trackByModelData)}}function Ove(i,e){if(i&1){let t=ie();v(0,"div",30)(1,"div",52)(2,"button",53),H("click",function(){V(t);let r=I();return z(r.handleDeselectAllModels())}),v(3,"mat-icon"),S(4,"close"),y()(),S(5),y(),v(6,"button",54),H("click",function(){V(t);let r=I();return z(r.handleClickViewSelectedModels())}),S(7," View selected models "),y()()}if(i&2){let t=I();w(),se("hide",t.selectedModelsCount===0),w(),N("disabled",t.loading()),w(3),Me(" ",t.selectedModelsCount," selected "),w(),N("disabled",t.selectedModelsCount===0||t.loading())}}function Rve(i,e){i&1&&(v(0,"div",55)(1,"div"),S(2," Support TF, TFL and StableHLO dialect. "),y()())}function Ave(i,e){i&1&&(v(0,"div",56)(1,"span",57),S(2,"Adapters"),y(),S(3,' transform model files into an intermediate format that Model Explorer can understand and visualize. For certain model types, multiple adapters may exist, offering different transformation approaches. The "default" adapter should cover the majority of common scenarios. '),J(4,"br")(5,"br"),S(6," You can also create your own "),v(7,"span",57),S(8,"adapter extensions"),y(),S(9," to add support for more model formats. See "),v(10,"a",58),S(11,"this guide"),y(),S(12," for instructions. "),y())}var cR=10,dR="model_explorer_model_paths",S5=50,M5=(()=>{class i{changeDetectorRef;adapterExtensionService;destroyRef;localStorageService;modelLoaderService;overlay;urlService;viewContainerRef;modelPathInput;matAutocompleteTrigger;curFilePath=new gr("");modelItems=[];modelInputAutocompleteOptions=[];filteredModelInputAutocompleteOptions=[];ModelItemStatus=Un;modelFormatHelpPopupSize={maxWidth:400,minHeight:0};errorInfoPopupSize={minHeight:0};adapterHelpPopupPosition=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",offsetY:-4}];loading=xt(!1);hasUploadedModels=xt(!1);portal=null;constructor(t,n,r,o,s,a,l,c){this.changeDetectorRef=t,this.adapterExtensionService=n,this.destroyRef=r,this.localStorageService=o,this.modelLoaderService=s,this.overlay=a,this.urlService=l,this.viewContainerRef=c,this.curFilePath.valueChanges.pipe(Vi(this.destroyRef)).subscribe(d=>{this.updateFilteredAutocompleteOptions()}),this.modelInputAutocompleteOptions=this.loadSavedModelPathsForAutocomplete(),this.updateFilteredAutocompleteOptions()}startProcessingModelSource(t){this.modelItems=t.map(n=>{if(n.url.startsWith(tS)){let r=this.adapterExtensionService.getExtensionById(Cu.JSON_LOADER),o=r==null?[]:[r];return{path:n.url,type:Oi.GRAPH_JSONS_FROM_SERVER,status:xt(Un.NOT_STARTED),selected:o.length>0,adapterCandidates:o,selectedAdapter:r}}else{let r=rv(n.url,this.adapterExtensionService,!0),o=this.adapterExtensionService.getExtensionById(n.converterId||n.adapterId||"");return o||(o=r.length>0?r[0]:void 0),{path:n.url,type:Oi.FILE_PATH,status:xt(Un.NOT_STARTED),selected:r.length>0,adapterCandidates:r,selectedAdapter:o}}}),this.changeDetectorRef.detectChanges(),this.modelItems.some(n=>n.selected)&&this.handleClickViewSelectedModels()}startWithUrlEncodedData(t,n){if(t){let r=this.adapterExtensionService.getExtensionById(Cu.JSON_LOADER);if(!r)return;this.addModelItems([{path:"",type:Oi.GRAPH_JSONS_FROM_SERVER,status:xt(Un.NOT_STARTED),selected:!0,adapterCandidates:[r],selectedAdapter:r}])}if(n.length>0){let r=n.map(o=>{let s=rv(o,this.adapterExtensionService,!0);return{path:o,type:Oi.FILE_PATH,status:xt(Un.NOT_STARTED),selected:s.length>0,adapterCandidates:s,selectedAdapter:s.length>0?s[0]:void 0}});this.addModelItems(r),this.addPathsToAutocompleteHistory(n),this.updateFilteredAutocompleteOptions()}this.changeDetectorRef.detectChanges(),t&&n.length===0&&this.handleClickViewSelectedModels()}handleClickAddEnteredModelPath(){return At(this,null,function*(){yield new Promise(r=>{setTimeout(r)});let t=this.curFilePath.value;if(t==null)return;let n=t.trim().split(",").filter(r=>r.trim()!=="").map(r=>{let o=rv(r,this.adapterExtensionService,!0);return{path:r,type:this.isInternal?Oi.REMOTE:Oi.FILE_PATH,status:xt(Un.NOT_STARTED),selected:o.length>0,adapterCandidates:o,selectedAdapter:o.length>0?o[0]:void 0}});this.addModelItems(n),this.addPathsToAutocompleteHistory(n.map(r=>r.path)),this.curFilePath.setValue(""),setTimeout(()=>{this.matAutocompleteTrigger?.closePanel(),this.modelPathInput.nativeElement.blur()})})}handleAutocompleteOptionSelected(t){this.disableAddEnteredModelPathButton||(t.option.deselect(),this.handleClickAddEnteredModelPath())}handleModelSelectionChanged(t,n){t.selected=n}handleDeleteModel(t){this.modelItems.splice(t,1),this.changeDetectorRef.markForCheck()}handleDeselectAllModels(){for(let t of this.modelItems)t.selected=!1}handleEditAutocompleteModelPath(t,n){t.stopPropagation(),this.curFilePath.setValue(this.modelInputAutocompleteOptions[n].path),this.modelPathInput.nativeElement.focus()}handleClickDeleteAutocompleteModelPath(t,n){t.stopPropagation(),this.modelInputAutocompleteOptions.splice(n,1),this.updateFilteredAutocompleteOptions(),this.localStorageService.setItem(dR,JSON.stringify(this.modelInputAutocompleteOptions))}handleClickUpload(t){let n=t.files;if(!n)return;let r=[];for(let o=0;o0,file:o,adapterCandidates:s,selectedAdapter:s.length>0?s[0]:void 0})}this.addModelItems(n)}handleClickOpenAdapterDropdown(t,n){let r=t.selectedAdapter?.id,o=this.createOverlay(n),s=o.attach(this.portal);s.instance.selectedAdapter=t.selectedAdapter,s.instance.candidates=t.adapterCandidates||[],s.instance.onClose.subscribe(a=>{o.dispose(),a?.id!==r&&t.errorMessage!=null&&(t.status.set(Un.NOT_STARTED),t.errorMessage=void 0,t.selected=!0),t.selectedAdapter=a,this.changeDetectorRef.markForCheck()})}handleClickViewSelectedModels(){this.loading.set(!0);let t=this.modelItems.filter(n=>n.selected);this.modelLoaderService.loadModels(t).then(()=>{this.loading.set(!1)}),this.urlService.setUiState(void 0),this.urlService.setModels(t.filter(n=>n.type===Oi.REMOTE||n.type===Oi.GRAPH_JSONS_FROM_SERVER||n.type===Oi.FILE_PATH).map(n=>({url:n.path,adapterId:n.selectedAdapter?.id}))),this.hasUploadedModels.set(t.some(n=>n.type===Oi.LOCAL))}trackByModelData(t,n){return`${n.path}_${n.file?.size}_${n.file?.lastModified}`}isNotStarted(t){return t.status()===Un.NOT_STARTED}getSelectedAdapterName(t){return t.selectedAdapter==null?"?":(t.adapterCandidates||[]).indexOf(t.selectedAdapter)===0?"Default":t.selectedAdapter?.name||"?"}hasSupportedAdapter(t){return(t.adapterCandidates||[]).length>0}hasMultipleSupportedAdapters(t){return(t.adapterCandidates||[]).length>1}showSpinner(t){return t.status()===Un.PROCESSING||t.status()===Un.UPLOADING}hasError(t){return t.status()===Un.ERROR}getModelItemStatusString(t){let n=t.status();return n===Un.UPLOADING?"Processing":n}get disableAddEnteredModelPathButton(){if(this.hasReachedMaxModelsCount)return!0;if(this.isInternal){let t=(this.curFilePath.value||"").toLowerCase().trim();return t!==""&&!nS(t)&&!t.startsWith("http")||t===""}else{let t=(this.curFilePath.value||"").trim();return t===""||t!==""&&!t.startsWith("/")&&!t.startsWith("~")}}get isInternal(){return!!0}get isExternal(){return!0}get selectedModelsCount(){return this.modelItems.filter(t=>t.selected).length}get hasReachedMaxModelsCount(){return this.modelItems.length===cR}get modelPathInputPlaceholder(){return"Absolute file paths (recommended for large models)"}updateFilteredAutocompleteOptions(){let n=(this.curFilePath.value||"").toLowerCase();this.filteredModelInputAutocompleteOptions=this.modelInputAutocompleteOptions.filter(r=>r.path.toLowerCase().includes(n)).map(r=>r.path),this.changeDetectorRef.markForCheck()}addPathsToAutocompleteHistory(t){let n=this.loadSavedModelPathsForAutocomplete();for(let r of t){let o=n.findIndex(s=>s.path===r);if(o>=0){let s=n.splice(o,1);s&&s.length>0&&(s[0].ts=Date.now(),n.unshift(s[0]))}else n.unshift({path:r,ts:Date.now()})}n.length>S5&&n.splice(S5),this.localStorageService.setItem(dR,JSON.stringify(n)),this.modelInputAutocompleteOptions=n}addModelItems(t){let n=t.filter(r=>this.modelItems.find(o=>o.path===r.path&&o.file?.size===r.file?.size&&o.file?.lastModified===r.file?.lastModified)==null);this.modelItems.push(...n),this.modelItems.length>cR&&this.modelItems.splice(cR),this.changeDetectorRef.markForCheck()}loadSavedModelPathsForAutocomplete(){return JSON.parse(this.localStorageService.getItem(dR)||"[]")}createOverlay(t){let n=new ui({positionStrategy:this.overlay.position().flexibleConnectedTo(t).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"}]),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),maxWidth:"380px",panelClass:"graph-selector-panel"}),r=this.overlay.create(n);return this.portal=new Di(x5,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}static \u0275fac=function(n){return new(n||i)(M(Fe),M(w5),M(Ni),M(Vo),M("ModelLoaderService"),M(Ht),M(iS),M(Yt))};static \u0275cmp=le({type:i,selectors:[["model-source-input"]],viewQuery:function(n,r){if(n&1&&(Ie(xve,5),Ie(nv,5)),n&2){let o;be(o=ye())&&(r.modelPathInput=o.first),be(o=ye())&&(r.matAutocompleteTrigger=o.first)}},standalone:!0,features:[ce],decls:50,vars:15,consts:[["auto","matAutocomplete"],["modelPathInput",""],["uploadInput",""],["externalMlirHelp",""],["adapterHelp",""],["checkbox",""],["errorInfo",""],["selector",""],[1,"container"],[1,"content"],[1,"title"],[1,"description-container"],[1,"description"],["href","https://www.tensorflow.org/","target","_blank"],["href","https://www.tensorflow.org/lite","target","_blank"],["href","https://www.tensorflow.org/js","target","_blank"],["href","https://www.tensorflow.org/guide/jax2tf","target","_blank"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#how-to-select-pytorch-models","target","_blank"],[1,"help-trigger","external",3,"bubble","overlaySize","hoverDelayMs"],[1,"source-input-container"],[1,"input-container"],[1,"model-path-autocomplete",3,"optionSelected"],[3,"value"],[3,"keydown.enter","placeholder","formControl","matAutocomplete"],["mat-raised-button","",1,"btn-add-model-path",3,"click","disabled"],[1,"or-label"],["mat-flat-button","",1,"btn-upload",3,"click","disabled"],["type","file","multiple","",1,"upload-input",3,"change"],[1,"model-count-warning"],[1,"models-table"],[1,"table-action-bar"],[1,"option-container"],[1,"icons-container"],[1,"mat-icon-container",3,"click"],[1,"model-name-col"],[1,"adapter-header"],[1,"icon-container",3,"bubble","overlayPositions","hoverDelayMs"],["fontSet","google-material-icons"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"model-name-container"],[3,"change","checked","disabled"],[1,"model-path",3,"click"],[1,"model-status-container"],["color","primary","diameter","16"],[1,"model-status-label-container"],[1,"selected-adapter-container",3,"disabled"],[1,"no-supported-adapter-msg"],["mat-icon-button","",1,"btn-delete-model-item",3,"click","disabled"],[1,"error-info-container",3,"bubble","overlaySize","hoverDelayMs"],[1,"model-explorer-error-info-popup"],[1,"selected-adapter-container",3,"click"],[1,"selected-adapter-label"],[1,"selection-status"],["mat-icon-button","",1,"btn-deselect-all",3,"click","disabled"],["mat-flat-button","","color","primary",1,"btn-view-models",3,"click","disabled"],[1,"model-explorer-model-format-help-popup"],[1,"model-explorer-adapter-help-popup"],[1,"bold"],["href","https://github.com/google-ai-edge/model-explorer/wiki/6.-Develop-Adapter-Extension","target","_blank"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",8)(1,"div",9)(2,"div",10),S(3," Select Models "),y(),v(4,"div",11)(5,"div",12),S(6," Select models from your comupter or enter the file paths directly (up to 10 in total)."),J(7,"br"),S(8," Supported model formats: "),v(9,"a",13),S(10,"TF"),y(),S(11," (.pb, .pbtxt, .graphdef), "),v(12,"a",14),S(13,"TFLite"),y(),S(14," (.tflite), "),v(15,"a",15),S(16,"TFJS"),y(),S(17," (.json), "),v(18,"a",16),S(19,"JAX"),y(),S(20," (.pb), "),v(21,"a",17),S(22,"PyTorch ExportedProgram"),y(),S(23," (.pt2), "),v(24,"span",18),S(25," MLIR "),y(),S(26," (.mlir, .mlirbc). "),y()(),v(27,"div",19)(28,"div",20)(29,"mat-autocomplete",21,0),H("optionSelected",function(a){return V(o),z(r.handleAutocompleteOptionSelected(a))}),ln(31,wve,10,2,"mat-option",22,Qr),y(),v(33,"input",23,1),H("keydown.enter",function(){return V(o),z(!r.disableAddEnteredModelPathButton&&r.handleClickAddEnteredModelPath())}),y(),v(35,"button",24),H("click",function(){return V(o),z(r.handleClickAddEnteredModelPath())}),S(36," Add "),y()(),v(37,"div",25),S(38,"or"),y(),v(39,"button",26),H("click",function(){V(o);let a=ve(42);return z(a.click())}),S(40," Select from your computer "),y(),v(41,"input",27,2),H("change",function(){V(o);let a=ve(42);return z(r.handleClickUpload(a))}),y()(),W(43,Cve,2,0,"div",28)(44,Pve,18,5,"div",29),y(),W(45,Ove,8,5,"div",30),y(),W(46,Rve,3,0,"ng-template",null,3,kt)(48,Ave,13,0,"ng-template",null,4,kt)}if(n&2){let o=ve(30),s=ve(47);w(),se("no-models",r.modelItems.length===0),w(23),N("bubble",s)("overlaySize",r.modelFormatHelpPopupSize)("hoverDelayMs",50),w(3),se("reverse",r.isExternal),w(4),cn(r.filteredModelInputAutocompleteOptions),w(2),N("placeholder",r.modelPathInputPlaceholder)("formControl",r.curFilePath)("matAutocomplete",o),w(2),N("disabled",r.disableAddEnteredModelPathButton||r.loading()),w(4),N("disabled",r.hasReachedMaxModelsCount||r.loading()),w(4),ae(r.hasReachedMaxModelsCount?43:-1),w(),ae(r.modelItems.length>0?44:-1),w(),ae(r.modelItems.length>0?45:-1)}},dependencies:[$n,Ae,Ci,v5,g5,ql,nv,In,zi,Ho,NC,AC,da,ns,ca,ua,Jt,it,gt,_r,js,zo,ho],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;display:flex;align-items:flex-start;flex-direction:column;border:1px solid #dadce0;border-radius:8px;overflow:hidden}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:24px 24px 0;overflow:hidden;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] .content.no-models[_ngcontent-%COMP%]{padding-bottom:24px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#1f1f1f;font-size:24px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%]{color:#444746;font-size:14px;margin-top:8px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:20px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .tfhub[_ngcontent-%COMP%]{display:inline-block;text-decoration:underline;text-decoration-color:#aaa;cursor:help}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .help-trigger[_ngcontent-%COMP%]{display:inline-block;margin-right:6px;text-decoration:underline;text-decoration-color:#aaa;cursor:help}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .help-trigger.external[_ngcontent-%COMP%]{margin-right:0}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:inherit}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%]{display:flex;height:56px;box-sizing:border-box;width:100%;margin-top:8px;padding:8px 0;align-items:center;flex-shrink:0}.container[_ngcontent-%COMP%] .source-input-container.reverse[_ngcontent-%COMP%]{flex-direction:row-reverse}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{height:100%;box-sizing:border-box;background-color:#f0f4f9;border-radius:99px;flex-grow:1;display:flex;align-items:center;padding-left:18px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:100%;flex-grow:1;border:none;outline:none;background-color:transparent;color:#444746;font-size:14px;margin-right:16px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-add-model-path[_ngcontent-%COMP%]{background-color:#fff;border-radius:99px;color:#0b57d0;height:40px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-add-model-path[disabled][_ngcontent-%COMP%]{background-color:#1f1f1f1f;color:#1f1f1f61}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .or-label[_ngcontent-%COMP%]{font-size:14px;margin:0 20px;color:#5f6368}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .btn-upload[_ngcontent-%COMP%]{height:100%;background-color:#c2e7ff;border-radius:99px;color:#001d35}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .btn-upload[disabled][_ngcontent-%COMP%]{background-color:#1f1f1f1f;color:#1f1f1f61}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .upload-input[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .model-count-warning[_ngcontent-%COMP%]{color:#ab6c17;background-color:#ffefd9;margin:4px 0;width:fit-content;padding:2px 9px;border-radius:4px;font-size:13px;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%]{width:100%;color:#1f1f1f;font-size:14px;margin-top:18px;overflow:hidden auto}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-spacing:0;border-collapse:collapse;padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:sticky;top:0;z-index:100;box-shadow:inset 0 -1px #c4c7c5;background-color:#fff}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .model-name-col[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;opacity:.8}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:#777}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{height:49px;text-align:left;padding:0;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:49px;text-align:left;padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid #c4c7c5}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding-left:12px;margin-right:12px;word-break:break-all}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-right:2px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] .model-path[_ngcontent-%COMP%]{cursor:pointer;line-height:16px;padding:8px 0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] .model-path.disabled[_ngcontent-%COMP%]{pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;cursor:pointer;height:48px;margin-right:24px;white-space:nowrap}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container.disabled[_ngcontent-%COMP%]{opacity:.5;pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{opacity:1}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.7}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .no-supported-adapter-msg[_ngcontent-%COMP%]{color:#ab6c17;background-color:#ffefd9;padding:2px 8px;width:fit-content;border-radius:4px;font-size:12px;margin-right:24px;white-space:nowrap;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:32px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container[_ngcontent-%COMP%]{font-size:12px;padding:2px 8px;background-color:#f1f3f4;display:flex;align-items:center;justify-content:center;color:#3c4043;width:fit-content;border-radius:4px;white-space:nowrap;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container.done[_ngcontent-%COMP%]{color:#0d652d;background-color:#e6f4ea}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container.error[_ngcontent-%COMP%]{color:#a50e0e;background-color:#fce8e6}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .error-info-container[_ngcontent-%COMP%]{width:20px;display:flex;align-items:center;justify-content:center;margin-left:4px;cursor:pointer}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .error-info-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:20px;height:20px;font-size:20px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[_ngcontent-%COMP%]{width:36px;height:36px;padding:0;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[disabled][_ngcontent-%COMP%]{opacity:.5}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[_ngcontent-%COMP%] mat-icon{font-size:20px;width:20px;height:20px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%]{flex-shrink:0;height:60px;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;background-color:#f0f4f9;padding:0 24px 0 38px}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .selection-status[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:14px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .selection-status.hide[_ngcontent-%COMP%]{visibility:hidden}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-deselect-all[_ngcontent-%COMP%]{width:36px;height:36px;padding:0;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-deselect-all[_ngcontent-%COMP%] mat-icon{font-size:20px;width:20px;height:20px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-view-models[_ngcontent-%COMP%]{height:40px;border-radius:99px}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%]{font-size:13px;color:#555;margin-top:24px;display:none}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;margin-right:4px}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%] .model-format[_ngcontent-%COMP%]{color:#333;margin-right:4px;margin-left:4px;border:1px solid #ccc;border-radius:4px;padding:2px 4px;cursor:pointer}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%] .model-format[_ngcontent-%COMP%]:hover{background-color:#eee} .model-explorer-upload-help-popup{padding:12px;font-weight:400;color:#555;line-height:14px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-explorer-adapter-help-popup{padding:12px;font-weight:400;color:#555;line-height:15px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-explorer-adapter-help-popup .bold{font-weight:700} .model-explorer-model-format-help-popup{padding:12px;font-weight:400;color:#555;line-height:15px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif;letter-spacing:normal} .model-explorer-model-format-help-popup a{color:inherit} .model-explorer-model-format-help-popup .example{margin-top:8px;color:#aaa} .model-explorer-model-format-help-popup .example ul{margin:4px 0;padding-inline-start:28px} .model-explorer-model-format-help-popup .example li{margin-top:4px} .model-explorer-model-format-help-popup .info{display:inline-block;background-color:#ffd1a8} .model-explorer-error-info-popup{padding:12px;font-weight:400;background-color:#f0f4f9;line-height:14px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-path-autocomplete mat-option{min-height:13px;font-size:13px;line-height:13px;padding-top:5px;padding-bottom:5px} .model-path-autocomplete mat-option:hover .option-container .mat-icon-container{visibility:visible} .model-path-autocomplete mat-option>span{width:100%} .model-path-autocomplete mat-option .option-container{width:100%;display:flex;align-items:center;justify-content:space-between;word-break:break-all} .model-path-autocomplete mat-option .option-container .icons-container{display:flex;align-items:center;gap:4px;min-width:50px;justify-content:flex-end} .model-path-autocomplete mat-option .option-container .mat-icon-container{visibility:hidden;display:flex;align-items:center;justify-content:center;opacity:.6;width:18px} .model-path-autocomplete mat-option .option-container .mat-icon-container:hover{opacity:1} .model-path-autocomplete mat-option .option-container .mat-icon-container mat-icon{font-size:18px;width:18px;height:18px} @@ -4180,7 +4180,7 @@ Alt+click: select`;getNamespaceLabel=ad;constValuesPopupSize={minWidth:100,minHe -`],changeDetection:0})}return i})();var kve=(i,e)=>e.name;function Lve(i,e){if(i&1){let t=ie();v(0,"div",11),H("click",function(){V(t);let r=I().$implicit;return z(r.expanded=!r.expanded)}),v(1,"mat-icon"),S(2,"unfold_more"),y()()}}function Fve(i,e){if(i&1&&(v(0,"div",3)(1,"div",6),S(2),y(),v(3,"div",7),S(4),y(),v(5,"div",8)(6,"div",9),S(7),y(),W(8,Lve,3,0,"div",10),y()()),i&2){let t=e.$implicit;w(2),nt(t.name),w(2),nt(t.copyright),w(),se("expanded",t.expanded),w(2),nt(t.license),w(),ae(t.expanded?-1:8)}}var T5=(()=>{class i{libs=[{name:"Angular",copyright:"Copyright (c) 2010-2024 Google LLC.",license:`The MIT License +`],changeDetection:0})}return i})();var Nve=(i,e)=>e.name;function kve(i,e){if(i&1){let t=ie();v(0,"div",11),H("click",function(){V(t);let r=I().$implicit;return z(r.expanded=!r.expanded)}),v(1,"mat-icon"),S(2,"unfold_more"),y()()}}function Lve(i,e){if(i&1&&(v(0,"div",3)(1,"div",6),S(2),y(),v(3,"div",7),S(4),y(),v(5,"div",8)(6,"div",9),S(7),y(),W(8,kve,3,0,"div",10),y()()),i&2){let t=e.$implicit;w(2),nt(t.name),w(2),nt(t.copyright),w(),se("expanded",t.expanded),w(2),nt(t.license),w(),ae(t.expanded?-1:8)}}var E5=(()=>{class i{libs=[{name:"Angular",copyright:"Copyright (c) 2010-2024 Google LLC.",license:`The MIT License Copyright (c) 2010-2024 Google LLC. https://angular.io/license @@ -4264,7 +4264,7 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE.`}];static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["open-source-libs-dialog"]],standalone:!0,features:[ce],decls:9,vars:0,consts:[["mat-dialog-title",""],[1,"title"],["mat-dialog-content","",1,"dialog-content"],[1,"lib-container"],["mat-dialog-actions","","align","end"],["mat-button","","mat-dialog-close",""],[1,"name"],[1,"copyright"],[1,"license-container"],[1,"license-content"],[1,"icon-container"],[1,"icon-container",3,"click"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1),S(2,"Open source libraries"),y()(),v(3,"div",2),ln(4,Fve,9,6,"div",3,kve),y(),v(6,"div",4)(7,"button",5),S(8,"Close"),y()()),n&2&&(w(4),cn(r.libs))},dependencies:[Ae,In,zi,ha,lf,cf,uf,df,it,gt],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;letter-spacing:normal!important}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-16px}.dialog-content[_ngcontent-%COMP%]{padding-bottom:0}.lib-container[_ngcontent-%COMP%]{margin:18px 0}.lib-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#333}.lib-container[_ngcontent-%COMP%] .copyright[_ngcontent-%COMP%]{font-size:12px;color:#777}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%]{width:520px;font-size:11px;border:1px solid #ccc;margin-top:8px;background-color:#f9f9f9;height:100px;overflow:hidden;position:relative}.lib-container[_ngcontent-%COMP%] .license-container.expanded[_ngcontent-%COMP%]{height:fit-content}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .license-content[_ngcontent-%COMP%]{white-space:pre-wrap;line-height:14px;padding:8px;overflow:hidden;height:100%;box-sizing:border-box}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{position:absolute;right:8px;top:8px;cursor:pointer;opacity:.8}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1} +THE SOFTWARE.`}];static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["open-source-libs-dialog"]],standalone:!0,features:[ce],decls:9,vars:0,consts:[["mat-dialog-title",""],[1,"title"],["mat-dialog-content","",1,"dialog-content"],[1,"lib-container"],["mat-dialog-actions","","align","end"],["mat-button","","mat-dialog-close",""],[1,"name"],[1,"copyright"],[1,"license-container"],[1,"license-content"],[1,"icon-container"],[1,"icon-container",3,"click"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1),S(2,"Open source libraries"),y()(),v(3,"div",2),ln(4,Lve,9,6,"div",3,Nve),y(),v(6,"div",4)(7,"button",5),S(8,"Close"),y()()),n&2&&(w(4),cn(r.libs))},dependencies:[Ae,In,zi,ha,lf,cf,uf,df,it,gt],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;letter-spacing:normal!important}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-16px}.dialog-content[_ngcontent-%COMP%]{padding-bottom:0}.lib-container[_ngcontent-%COMP%]{margin:18px 0}.lib-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#333}.lib-container[_ngcontent-%COMP%] .copyright[_ngcontent-%COMP%]{font-size:12px;color:#777}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%]{width:520px;font-size:11px;border:1px solid #ccc;margin-top:8px;background-color:#f9f9f9;height:100px;overflow:hidden;position:relative}.lib-container[_ngcontent-%COMP%] .license-container.expanded[_ngcontent-%COMP%]{height:fit-content}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .license-content[_ngcontent-%COMP%]{white-space:pre-wrap;line-height:14px;padding:8px;overflow:hidden;height:100%;box-sizing:border-box}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{position:absolute;right:8px;top:8px;cursor:pointer;opacity:.8}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1} @@ -4282,7 +4282,7 @@ THE SOFTWARE.`}];static \u0275fac=function(n){return new(n||i)};static \u0275cmp -`]})}return i})();function Bve(i,e){i&1&&(S(0," When "),v(1,"a",19),S(2,"View tensor shape on edge"),y(),S(3," is turned on, Model Explorer will try to position the shape along the edge curve. When the edge is close to vertical, the shape may be hard to read. Enabling this option will force the shapes to be rendered horizontally in such situations to improve readbility. "))}function Vve(i,e){if(i&1&&S(0),i&2){let t=I(3).$implicit;Me(" ",t.help," ")}}function zve(i,e){if(i&1&&(v(0,"div",18),W(1,Bve,4,0)(2,Vve,1,1),y()),i&2){let t=I(2).$implicit;w(),ae(t.key==="disallow_vertical_edge_labels"?1:2)}}function Uve(i,e){if(i&1&&(v(0,"div",16)(1,"mat-icon",17),S(2,"help_outline"),y()(),W(3,zve,3,1,"ng-template",null,0,kt)),i&2){let t=ve(4),n=I(2);N("bubble",t)("overlaySize",n.helpPopupSize)("overlayPositions",n.helpPopupPosition)("hoverDelayMs",100)}}function Hve(i,e){if(i&1){let t=ie();oo(0),v(1,"mat-slide-toggle",20),H("change",function(r){V(t);let o=I().$implicit,s=I();return z(s.settingsService.saveBooleanValue(r.checked,o.key))}),y(),so()}if(i&2){let t=I().$implicit,n=I();w(),N("checked",n.settingsService.getBooleanValue(t))}}function Gve(i,e){if(i&1){let t=ie();oo(0),v(1,"input",21,1),H("focus",function(){V(t);let r=ve(2);return z(r.select())})("change",function(){V(t);let r=ve(2),o=I().$implicit,s=I();return z(s.settingsService.saveNumberValue(r.valueAsNumber,o.key))}),y(),v(3,"div",22),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClickResetToDefaultNumber(r))}),S(4,"Reset to default"),y(),so()}if(i&2){let t=I().$implicit,n=I();w(),N("value",n.settingsService.getNumberValue(t))}}function jve(i,e){if(i&1){let t=ie();oo(0),v(1,"textarea",21,1),H("focus",function(){V(t);let r=ve(2);return z(r.select())})("change",function(){V(t);let r=ve(2),o=I().$implicit,s=I();return z(s.settingsService.saveStringValue(r.value,o.key))}),y(),v(3,"div",22),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClickResetToDefaultText(r))}),S(4,"Reset to default"),y(),so()}if(i&2){let t=I().$implicit,n=I();w(),N("value",n.settingsService.getStringValue(t))}}function Wve(i,e){if(i&1){let t=ie();oo(0),v(1,"div",23)(2,"label")(3,"input",24,2),H("change",function(){V(t);let r=ve(4),o=I().$implicit,s=I();return z(s.settingsService.saveStringValue(r.value,o.key))}),y()(),v(5,"input",25,3),H("change",function(){V(t);let r=ve(4),o=I().$implicit,s=I();return z(s.settingsService.saveStringValue(r.value,o.key))}),y()(),v(7,"div",22),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClickResetToDefaultText(r))}),S(8,"Reset to default"),y(),so()}if(i&2){let t=I().$implicit,n=I();w(2),tn("background-color",n.settingsService.getStringValue(t)),w(),N("value",n.settingsService.getStringValue(t)),w(2),N("value",n.settingsService.getStringValue(t))}}function $ve(i,e){if(i&1&&(v(0,"div",12),oo(1,13),v(2,"div",14),S(3),W(4,Uve,5,4),y(),W(5,Hve,2,1,"ng-container",15)(6,Gve,5,1,"ng-container",15)(7,jve,5,1,"ng-container",15)(8,Wve,9,4,"ng-container",15),so(),y()),i&2){let t=e.$implicit,n=I();w(),N("ngSwitch",t.type),w(2),Me(" ",t.label," "),w(),ae(t.help?4:-1),w(),N("ngSwitchCase",n.SettingType.BOOLEAN),w(),N("ngSwitchCase",n.SettingType.NUMBER),w(),N("ngSwitchCase",n.SettingType.TEXT_MULTILINE),w(),N("ngSwitchCase",n.SettingType.COLOR)}}var D5=(()=>{class i{settingsService;SettingType=to;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};helpPopupPosition=[{originX:"end",originY:"top",overlayX:"start",overlayY:"top",offsetX:4}];constructor(t){this.settingsService=t}allSettings=eS;handleClickResetToDefaultText(t){this.settingsService.saveStringValue(t.defaultValue,t.key)}handleClickResetToDefaultNumber(t){this.settingsService.saveNumberValue(t.defaultValue,t.key)}static \u0275fac=function(n){return new(n||i)(M(pf))};static \u0275cmp=le({type:i,selectors:[["settings-dialog"]],standalone:!0,features:[ce],decls:11,vars:1,consts:[["helpPopup",""],["input",""],["colorPicker",""],["colorInput",""],["mat-dialog-title","",1,"title-container"],[1,"title"],[1,"local-storage-info"],["mat-dialog-content","",1,"dialog-content"],[1,"settings-container"],["class","setting-item",4,"ngFor","ngForOf"],["mat-dialog-actions","","align","end",1,"buttons-container"],["mat-button","","mat-dialog-close",""],[1,"setting-item"],[3,"ngSwitch"],[1,"setting-label"],[4,"ngSwitchCase"],[1,"icon-container",3,"bubble","overlaySize","overlayPositions","hoverDelayMs"],["fontSet","google-material-icons"],[1,"model-explorer-settings-help-popup"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#overlay-data-on-nodesedges","target","_blank"],[3,"change","checked"],["type","number",3,"focus","change","value"],[1,"reset",3,"click"],[1,"color-picker-container"],["type","color",3,"change","value"],["type","text",3,"change","value"]],template:function(n,r){n&1&&(v(0,"div",4)(1,"div",5),S(2,"Advanced settings"),y(),v(3,"div",6),S(4," Settings are stored in current browser's local storage "),y()(),v(5,"div",7)(6,"div",8),W(7,$ve,9,7,"div",9),y()(),v(8,"div",10)(9,"button",11),S(10,"Close"),y()()),n&2&&(w(7),N("ngForOf",r.allSettings))},dependencies:[$n,Ae,Ci,e1,dL,In,zi,ha,lf,cf,uf,df,it,gt,UC,zC],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif}.title-container[_ngcontent-%COMP%]{border-bottom:1px solid #ddd}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-16px}.local-storage-info[_ngcontent-%COMP%]{font-size:12px;color:#777;margin-top:6px}.dialog-content[_ngcontent-%COMP%]{padding-bottom:0}.settings-container[_ngcontent-%COMP%]{font-size:13px;color:#000;margin-top:20px;margin-bottom:10px}.setting-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:24px}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%]{line-height:16px;margin-bottom:4px;width:100%;display:flex;align-items:center;justify-content:space-between}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:16px;height:16px;margin-left:12px;opacity:.4;cursor:pointer}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:.6}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .setting-item[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{box-sizing:border-box;width:100%}.setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-outer-spin-button, .setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.setting-item[_ngcontent-%COMP%] .reset[_ngcontent-%COMP%]{color:#999;cursor:pointer;margin-top:2px;text-decoration:underline;-webkit-user-select:none;user-select:none}.setting-item[_ngcontent-%COMP%] .reset[_ngcontent-%COMP%]:hover{color:#777}.color-picker-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;border-radius:2px;border:1px solid rgb(118,118,118);width:100%;background-color:#fff;box-sizing:border-box;height:24px;position:relative}.color-picker-container[_ngcontent-%COMP%]:focus-within{border-color:#1a73e8;outline:1px solid #1a73e8}.color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;width:16px;height:16px;margin:2px;background-color:red;border-radius:4px;cursor:pointer;border:1px solid #ddd}.color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{visibility:hidden}.color-picker-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{border:none;height:100%;background-color:transparent;outline:none}.buttons-container[_ngcontent-%COMP%]{border-top:1px solid #ddd} .model-explorer-settings-help-popup{font-size:12px;padding:8px;background-color:#fff;line-height:normal} .model-explorer-settings-help-popup .bold{font-weight:700} +`]})}return i})();function Fve(i,e){i&1&&(S(0," When "),v(1,"a",19),S(2,"View tensor shape on edge"),y(),S(3," is turned on, Model Explorer will try to position the shape along the edge curve. When the edge is close to vertical, the shape may be hard to read. Enabling this option will force the shapes to be rendered horizontally in such situations to improve readbility. "))}function Bve(i,e){if(i&1&&S(0),i&2){let t=I(3).$implicit;Me(" ",t.help," ")}}function Vve(i,e){if(i&1&&(v(0,"div",18),W(1,Fve,4,0)(2,Bve,1,1),y()),i&2){let t=I(2).$implicit;w(),ae(t.key==="disallow_vertical_edge_labels"?1:2)}}function zve(i,e){if(i&1&&(v(0,"div",16)(1,"mat-icon",17),S(2,"help_outline"),y()(),W(3,Vve,3,1,"ng-template",null,0,kt)),i&2){let t=ve(4),n=I(2);N("bubble",t)("overlaySize",n.helpPopupSize)("overlayPositions",n.helpPopupPosition)("hoverDelayMs",100)}}function Uve(i,e){if(i&1){let t=ie();oo(0),v(1,"mat-slide-toggle",20),H("change",function(r){V(t);let o=I().$implicit,s=I();return z(s.settingsService.saveBooleanValue(r.checked,o.key))}),y(),so()}if(i&2){let t=I().$implicit,n=I();w(),N("checked",n.settingsService.getBooleanValue(t))}}function Hve(i,e){if(i&1){let t=ie();oo(0),v(1,"input",21,1),H("focus",function(){V(t);let r=ve(2);return z(r.select())})("change",function(){V(t);let r=ve(2),o=I().$implicit,s=I();return z(s.settingsService.saveNumberValue(r.valueAsNumber,o.key))}),y(),v(3,"div",22),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClickResetToDefaultNumber(r))}),S(4,"Reset to default"),y(),so()}if(i&2){let t=I().$implicit,n=I();w(),N("value",n.settingsService.getNumberValue(t))}}function Gve(i,e){if(i&1){let t=ie();oo(0),v(1,"textarea",21,1),H("focus",function(){V(t);let r=ve(2);return z(r.select())})("change",function(){V(t);let r=ve(2),o=I().$implicit,s=I();return z(s.settingsService.saveStringValue(r.value,o.key))}),y(),v(3,"div",22),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClickResetToDefaultText(r))}),S(4,"Reset to default"),y(),so()}if(i&2){let t=I().$implicit,n=I();w(),N("value",n.settingsService.getStringValue(t))}}function jve(i,e){if(i&1){let t=ie();oo(0),v(1,"div",23)(2,"label")(3,"input",24,2),H("change",function(){V(t);let r=ve(4),o=I().$implicit,s=I();return z(s.settingsService.saveStringValue(r.value,o.key))}),y()(),v(5,"input",25,3),H("change",function(){V(t);let r=ve(4),o=I().$implicit,s=I();return z(s.settingsService.saveStringValue(r.value,o.key))}),y()(),v(7,"div",22),H("click",function(){V(t);let r=I().$implicit,o=I();return z(o.handleClickResetToDefaultText(r))}),S(8,"Reset to default"),y(),so()}if(i&2){let t=I().$implicit,n=I();w(2),tn("background-color",n.settingsService.getStringValue(t)),w(),N("value",n.settingsService.getStringValue(t)),w(2),N("value",n.settingsService.getStringValue(t))}}function Wve(i,e){if(i&1&&(v(0,"div",12),oo(1,13),v(2,"div",14),S(3),W(4,zve,5,4),y(),W(5,Uve,2,1,"ng-container",15)(6,Hve,5,1,"ng-container",15)(7,Gve,5,1,"ng-container",15)(8,jve,9,4,"ng-container",15),so(),y()),i&2){let t=e.$implicit,n=I();w(),N("ngSwitch",t.type),w(2),Me(" ",t.label," "),w(),ae(t.help?4:-1),w(),N("ngSwitchCase",n.SettingType.BOOLEAN),w(),N("ngSwitchCase",n.SettingType.NUMBER),w(),N("ngSwitchCase",n.SettingType.TEXT_MULTILINE),w(),N("ngSwitchCase",n.SettingType.COLOR)}}var I5=(()=>{class i{settingsService;SettingType=to;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};helpPopupPosition=[{originX:"end",originY:"top",overlayX:"start",overlayY:"top",offsetX:4}];constructor(t){this.settingsService=t}allSettings=eS;handleClickResetToDefaultText(t){this.settingsService.saveStringValue(t.defaultValue,t.key)}handleClickResetToDefaultNumber(t){this.settingsService.saveNumberValue(t.defaultValue,t.key)}static \u0275fac=function(n){return new(n||i)(M(pf))};static \u0275cmp=le({type:i,selectors:[["settings-dialog"]],standalone:!0,features:[ce],decls:11,vars:1,consts:[["helpPopup",""],["input",""],["colorPicker",""],["colorInput",""],["mat-dialog-title","",1,"title-container"],[1,"title"],[1,"local-storage-info"],["mat-dialog-content","",1,"dialog-content"],[1,"settings-container"],["class","setting-item",4,"ngFor","ngForOf"],["mat-dialog-actions","","align","end",1,"buttons-container"],["mat-button","","mat-dialog-close",""],[1,"setting-item"],[3,"ngSwitch"],[1,"setting-label"],[4,"ngSwitchCase"],[1,"icon-container",3,"bubble","overlaySize","overlayPositions","hoverDelayMs"],["fontSet","google-material-icons"],[1,"model-explorer-settings-help-popup"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#overlay-data-on-nodesedges","target","_blank"],[3,"change","checked"],["type","number",3,"focus","change","value"],[1,"reset",3,"click"],[1,"color-picker-container"],["type","color",3,"change","value"],["type","text",3,"change","value"]],template:function(n,r){n&1&&(v(0,"div",4)(1,"div",5),S(2,"Advanced settings"),y(),v(3,"div",6),S(4," Settings are stored in current browser's local storage "),y()(),v(5,"div",7)(6,"div",8),W(7,Wve,9,7,"div",9),y()(),v(8,"div",10)(9,"button",11),S(10,"Close"),y()()),n&2&&(w(7),N("ngForOf",r.allSettings))},dependencies:[$n,Ae,Ci,e1,cL,In,zi,ha,lf,cf,uf,df,it,gt,UC,zC],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif}.title-container[_ngcontent-%COMP%]{border-bottom:1px solid #ddd}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-16px}.local-storage-info[_ngcontent-%COMP%]{font-size:12px;color:#777;margin-top:6px}.dialog-content[_ngcontent-%COMP%]{padding-bottom:0}.settings-container[_ngcontent-%COMP%]{font-size:13px;color:#000;margin-top:20px;margin-bottom:10px}.setting-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:24px}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%]{line-height:16px;margin-bottom:4px;width:100%;display:flex;align-items:center;justify-content:space-between}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:16px;height:16px;margin-left:12px;opacity:.4;cursor:pointer}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:.6}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .setting-item[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{box-sizing:border-box;width:100%}.setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-outer-spin-button, .setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.setting-item[_ngcontent-%COMP%] .reset[_ngcontent-%COMP%]{color:#999;cursor:pointer;margin-top:2px;text-decoration:underline;-webkit-user-select:none;user-select:none}.setting-item[_ngcontent-%COMP%] .reset[_ngcontent-%COMP%]:hover{color:#777}.color-picker-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;border-radius:2px;border:1px solid rgb(118,118,118);width:100%;background-color:#fff;box-sizing:border-box;height:24px;position:relative}.color-picker-container[_ngcontent-%COMP%]:focus-within{border-color:#1a73e8;outline:1px solid #1a73e8}.color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;width:16px;height:16px;margin:2px;background-color:red;border-radius:4px;cursor:pointer;border:1px solid #ddd}.color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{visibility:hidden}.color-picker-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{border:none;height:100%;background-color:transparent;outline:none}.buttons-container[_ngcontent-%COMP%]{border-top:1px solid #ddd} .model-explorer-settings-help-popup{font-size:12px;padding:8px;background-color:#fff;line-height:normal} .model-explorer-settings-help-popup .bold{font-weight:700} @@ -4300,7 +4300,7 @@ THE SOFTWARE.`}];static \u0275fac=function(n){return new(n||i)};static \u0275cmp -`]})}return i})();var P5=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["welcome-card"]],standalone:!0,features:[ce],decls:13,vars:0,consts:[[1,"container"],[1,"left"],[1,"title"],[1,"description"],[1,"doc-links-container"],[1,"doc-link"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],[1,"doc-text"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1)(2,"div",2),S(3," Welcome to Model Explorer "),y(),v(4,"div",3),S(5," A modern model graph visualizer and debugger "),y(),v(6,"div",4)(7,"div",5)(8,"a",6)(9,"mat-icon"),S(10,"open_in_new"),y(),v(11,"span",7),S(12,"Learn more from GitHub"),y()()()()()())},dependencies:[Ae,it,gt],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;border:1px solid #dadce0;border-radius:8px;padding:24px;display:flex;justify-content:space-between}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#1f1f1f;font-size:24px}.container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:#3c4043;margin-top:8px;font-size:14px}.container[_ngcontent-%COMP%] .doc-links-container[_ngcontent-%COMP%]{margin-top:24px}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%]{font-size:14px;color:#0b57d0;cursor:pointer;opacity:.8;margin-bottom:8px}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] .doc-text[_ngcontent-%COMP%]{color:#0b57d0}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;text-decoration:none}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover .doc-text[_ngcontent-%COMP%]{text-decoration:underline}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;margin-right:8px;color:#0b57d0}.container[_ngcontent-%COMP%] .video-container[_ngcontent-%COMP%]{width:430px;height:100%;border-radius:8px;background-color:#f1f1f1;display:flex;align-items:center;justify-content:center;color:#999;font-size:13px} +`]})}return i})();var T5=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=le({type:i,selectors:[["welcome-card"]],standalone:!0,features:[ce],decls:13,vars:0,consts:[[1,"container"],[1,"left"],[1,"title"],[1,"description"],[1,"doc-links-container"],[1,"doc-link"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],[1,"doc-text"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1)(2,"div",2),S(3," Welcome to Model Explorer "),y(),v(4,"div",3),S(5," A modern model graph visualizer and debugger "),y(),v(6,"div",4)(7,"div",5)(8,"a",6)(9,"mat-icon"),S(10,"open_in_new"),y(),v(11,"span",7),S(12,"Learn more from GitHub"),y()()()()()())},dependencies:[Ae,it,gt],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;border:1px solid #dadce0;border-radius:8px;padding:24px;display:flex;justify-content:space-between}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#1f1f1f;font-size:24px}.container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:#3c4043;margin-top:8px;font-size:14px}.container[_ngcontent-%COMP%] .doc-links-container[_ngcontent-%COMP%]{margin-top:24px}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%]{font-size:14px;color:#0b57d0;cursor:pointer;opacity:.8;margin-bottom:8px}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] .doc-text[_ngcontent-%COMP%]{color:#0b57d0}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;text-decoration:none}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover .doc-text[_ngcontent-%COMP%]{text-decoration:underline}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;margin-right:8px;color:#0b57d0}.container[_ngcontent-%COMP%] .video-container[_ngcontent-%COMP%]{width:430px;height:100%;border-radius:8px;background-color:#f1f1f1;display:flex;align-items:center;justify-content:center;color:#999;font-size:13px} @@ -4318,7 +4318,7 @@ THE SOFTWARE.`}];static \u0275fac=function(n){return new(n||i)};static \u0275cmp -`]})}return i})();var rS=new ge("Inject:Window");var O5=(()=>{class i{window;gtag;constructor(t){this.window=t,this.gtag=this.window.gtag}trackEvent(t,n="",r,o,s){let a=this.getPath(this.window.location.href);r=r??a,o=o??t,s=s??1;let l={event_category:n,event_label:r,description:o,value:s,page_path:a};this.trackEventInternal(t,l)}trackNumeric(t,n){this.trackEvent(t,"",void 0,void 0,n)}getPath(t){return"/"+t.split("/").slice(3).join("/")}trackEventInternal(t,n){this.gtag&&this.gtag("event",t,Z({},n))}static \u0275fac=function(n){return new(n||i)(X(rS))};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Yve=["modelSourceInput"],Xve=["modelGraphVisualizer"],Zve=()=>[];function Qve(i,e){if(i&1){let t=ie();v(0,"div",16),J(1,"welcome-card"),v(2,"div",24),H("click",function(){V(t);let r=I();return z(r.handleClickDismissWelcomeCard())}),v(3,"mat-icon"),S(4,"close"),y()()()}}function Kve(i,e){i&1&&(v(0,"div",17),J(1,"mat-spinner",25),y())}function Jve(i,e){i&1&&(v(0,"div",18),J(1,"model-source-input",null,1),y())}function e0e(i,e){i&1&&(v(0,"div",20),S(1,"The "),v(2,"a",26),S(3," Google Terms of Service "),y(),S(4," apply to your use of this offering "),y())}function t0e(i,e){if(i&1){let t=ie();v(0,"model-graph-visualizer",27,2),H("titleClicked",function(){V(t);let r=I();return z(r.handleClickTitle())})("modelGraphProcessed",function(r){V(t);let o=I();return z(o.handleModelGraphProcessed(r))})("uiStateChanged",function(r){V(t);let o=I();return z(o.handleUiStateChanged(r))})("remoteNodeDataPathsChanged",function(r){V(t);let o=I();return z(o.handleRemoteNodeDataPathsChanged(r))}),y()}if(i&2){let t=I();N("graphCollections",t.benchmark?U2(5,Zve):t.loadedGraphCollections())("benchmark",t.benchmark)("config",t.curConfig)("initialUiState",t.initialUiState)("nodeDataSources",t.remoteNodeDataPaths)}}var R5=(()=>{class i{dialog;extensionService;gaService;modelLoaderService;newVersionService;route;router;settingsService;snackBar;threejsService;urlService;modelSourceInput;modelGraphVisualizer;loadingExtensions;loadedGraphCollections;runningVersion=Xt(()=>this.newVersionService.info().runningVersion);initialUiState;dismissWelcomeCard=!1;dragOver=!1;benchmark=!1;remoteNodeDataPaths=[];remoteNodeDataTargetModels=[];hasUploadedModels=yt(!1);shareButtonTooltip=yt("");remoteProcessedNodeDataTargetModels=new Set;constructor(t,n,r,o,s,a,l,c,d,u,h){this.dialog=t,this.extensionService=n,this.gaService=r,this.modelLoaderService=o,this.newVersionService=s,this.route=a,this.router=l,this.settingsService=c,this.snackBar=d,this.threejsService=u,this.urlService=h,this.loadingExtensions=this.extensionService.loading,this.loadedGraphCollections=this.modelLoaderService.loadedGraphCollections,this.initialUiState=this.urlService.getUiState(),mt(()=>{this.extensionService.loading()||setTimeout(()=>{this.handleExtensionLoaded()})}),mt(()=>{this.loadedGraphCollections()!=null&&window.history.pushState({ts:Date.now()},"")});let p=new URLSearchParams(document.location.search);this.benchmark=p.get("benchmark")==="1",this.remoteNodeDataPaths=this.urlService.getNodeDataSources(),this.remoteNodeDataTargetModels=this.urlService.getNodeDataTargets()}ngAfterViewInit(){this.modelSourceInput&&(this.hasUploadedModels=this.modelSourceInput.hasUploadedModels,this.shareButtonTooltip=Xt(()=>this.hasUploadedModels()?"Share is not available for uploaded models":"Share"))}handlePopState(t){this.loadedGraphCollections.set(void 0),this.initialUiState=void 0,setTimeout(()=>{this.router.navigate([],{queryParams:{},queryParamsHandling:"",replaceUrl:!0})})}handleDragOver(t){this.loadedGraphCollections()==null&&(this.dragOver=!0),t.preventDefault()}handleDragLeave(){this.dragOver=!1}handleDrop(t){t.preventDefault(),this.dragOver=!1;let n=[];t.dataTransfer?.items?Array.from(t.dataTransfer.items).forEach((r,o)=>{if(r.kind==="file"){let s=r.getAsFile();s&&n.push(s)}}):n.push(...Array.from(t.dataTransfer?.files||[])),this.modelSourceInput.addFiles(n)}handleClickTitle(t=!1){t?this.router.navigate(["/"]).then(()=>{window.location.reload()}):window.history.back()}handleClickSettings(){this.dialog.open(D5,{})}handleClickDismissWelcomeCard(){this.settingsService.saveBooleanValue(!1,So.SHOW_WELCOME_CARD)}handleUiStateChanged(t){this.urlService.setUiState(t)}handleModelGraphProcessed(t){let n=t.modelGraph.collectionLabel,r=this.remoteProcessedNodeDataTargetModels.has(n);if(this.remoteNodeDataPaths&&this.remoteNodeDataPaths.length>0&&!r){let o=[];for(let s=0;sn.trim()).filter(n=>n!==""&&(!t||t&&n!=="pseudo_const"&&n!=="pseudo_qconst")),artificialLayerNodeCountThreshold:this.settingsService.getNumberValue(KO),edgeLabelFontSize:this.settingsService.getNumberValue(JO),edgeColor:this.settingsService.getStringValue(eR),maxConstValueCount:this.settingsService.getNumberValue(ZO),disallowVerticalEdgeLabels:this.settingsService.getBooleanValue(tR),enableSubgraphSelection:this.urlService.enableSubgraphSelection,enableExportToResource:this.urlService.enableExportToResource,keepLayersWithASingleChild:this.settingsService.getBooleanValue(nR),showOpNodeOutOfLayerEdgesWithoutSelecting:this.settingsService.getBooleanValue(iR)}}handleExtensionLoaded(){let t=this.urlService.getModels();t!=null&&t.length>0?this.modelSourceInput.startProcessingModelSource(t):this.initialUiState=void 0}static \u0275fac=function(n){return new(n||i)(M(wu),M(ff),M(O5),M("ModelLoaderService"),M(kO),M(Rl),M(fh),M(pf),M(yu),M(wr),M(iS))};static \u0275cmp=le({type:i,selectors:[["home-page"]],viewQuery:function(n,r){if(n&1&&(Ie(Yve,5),Ie(Xve,5)),n&2){let o;be(o=ye())&&(r.modelSourceInput=o.first),be(o=ye())&&(r.modelGraphVisualizer=o.first)}},hostBindings:function(n,r){n&1&&H("popstate",function(s){return r.handlePopState(s)},!1,Tk)},standalone:!0,features:[ce],decls:38,vars:12,consts:[["menu","matMenu"],["modelSourceInput",""],["modelGraphVisualizer",""],[1,"container",3,"dragover","dragleave","dragend","drop"],[1,"title"],[1,"name",3,"click"],[1,"icons-container"],["mat-icon-button","","aria-label","settings","matTooltip","Advanced settings",3,"click"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],["mat-icon-button","","aria-label","doc","matTooltip","GitHub"],["href","https://github.com/google-ai-edge/model-explorer/issues","target","_blank"],["mat-icon-button","","aria-label","bug","matTooltip","File issue or feature request"],["mat-icon-button","","aria-label","about","matTooltip","About",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],[1,"model-explorer-version"],[1,"content"],[1,"welcome-card-container"],[1,"loading-adapter-extension-container"],[1,"model-source-input-container"],[1,"padding"],[1,"utos"],[3,"graphCollections","benchmark","config","initialUiState","nodeDataSources","titleClicked","modelGraphProcessed","uiStateChanged","remoteNodeDataPathsChanged",4,"ngIf"],[1,"dragover-overlay"],[1,"msg"],["matTooltip","Dismiss",1,"icon-container",3,"click"],["color","primary","diameter","24"],["href","https://policies.google.com/terms?hl=en-US#toc-intro","target","_blank"],[3,"titleClicked","modelGraphProcessed","uiStateChanged","remoteNodeDataPathsChanged","graphCollections","benchmark","config","initialUiState","nodeDataSources"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",3),H("dragover",function(a){return V(o),z(r.handleDragOver(a))})("dragleave",function(){return V(o),z(r.handleDragLeave())})("dragend",function(){return V(o),z(r.handleDragLeave())})("drop",function(a){return V(o),z(r.handleDrop(a))}),v(1,"div",4)(2,"div",5),H("click",function(){return V(o),z(r.handleClickTitle(!0))}),J(3,"me-logo"),S(4," Model Explorer "),J(5,"new-version-chip"),y(),v(6,"div",6)(7,"button",7),H("click",function(){return V(o),z(r.handleClickSettings())}),v(8,"mat-icon"),S(9,"settings"),y()(),v(10,"a",8)(11,"button",9)(12,"mat-icon"),S(13,"article"),y()()(),v(14,"a",10)(15,"button",11)(16,"mat-icon"),S(17,"bug_report"),y()()(),v(18,"button",12)(19,"mat-icon"),S(20,"info_outline"),y()(),v(21,"mat-menu",null,0)(23,"button",13),H("click",function(){return V(o),z(r.handleClickShowThirdPartyLibraries())}),S(24," Open source libraries "),y(),v(25,"div",14),S(26),y()(),J(27,"open-in-new-tab-button"),y()(),v(28,"div",15),W(29,Qve,5,0,"div",16)(30,Kve,2,0,"div",17)(31,Jve,3,0,"div",18),J(32,"div",19),y(),W(33,e0e,5,0,"div",20)(34,t0e,2,6,"model-graph-visualizer",21),v(35,"div",22)(36,"div",23),S(37,"Drop to add model files"),y()()()}if(n&2){let o=ve(22);se("dragover",r.dragOver),w(),se("hide",r.loadedGraphCollections()!=null||r.benchmark),w(17),N("matMenuTriggerFor",o),w(8),Me("v",r.runningVersion(),""),w(2),se("hide",r.loadedGraphCollections()!=null||r.benchmark),w(),ae(r.showWelcomeCard?29:-1),w(),ae(r.loadingExtensions()?30:31),w(3),ae(r.loadedGraphCollections()==null&&!r.benchmark?33:-1),w(),N("ngIf",r.loadedGraphCollections()!=null||r.benchmark)}},dependencies:[Ae,Mn,Jp,In,Ho,ha,it,gt,sa,Jo,G_,vc,ns,ca,FG,Jt,Wn,KC,I5,GC,HC,P5],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;display:flex;flex-direction:column;position:relative}.container.dragover[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%]{display:flex}.container[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%]{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#0000001a;pointer-events:none;flex-direction:column;align-items:center;justify-content:flex-end;z-index:500}.container[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%] .msg[_ngcontent-%COMP%]{margin-bottom:16px;color:#fff;padding:4px 12px;border-radius:99px;background-color:#4285f4}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}30%{transform:rotate(180deg)}60%{transform:rotate(360deg)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_goUp{0%{transform:translateY(10%);opacity:0}30%{transform:translate(0);opacity:1}to{transform:translateY(-25%);opacity:0}}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:8px 12px;box-sizing:border-box;height:48px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;color:#444746;border-bottom:1px solid transparent}.container[_ngcontent-%COMP%] .title.hide[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:20px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] me-logo[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] new-version-chip[_ngcontent-%COMP%]{margin-left:16px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:#000}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] open-in-new-tab-button[_ngcontent-%COMP%]{margin-left:8px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex-grow:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;position:relative;margin-top:16px;overflow:hidden}.container[_ngcontent-%COMP%] .content.hide[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%]{width:1016px;flex-shrink:0;position:relative}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px;cursor:pointer;opacity:.5}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .loading-adapter-extension-container[_ngcontent-%COMP%]{margin-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .model-source-input-container[_ngcontent-%COMP%]{width:1016px;margin-top:20px;overflow:hidden;z-index:100;background-color:#fff}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .padding[_ngcontent-%COMP%]{width:100%;flex-grow:1;min-height:12px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .cover[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:5000;color:#333;background-color:#ffffffe6;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);display:flex;flex-direction:column;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .cover[_ngcontent-%COMP%] .loading-subtitle[_ngcontent-%COMP%]{font-size:14px;color:#999;margin-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .wait-icon[_ngcontent-%COMP%]{display:inline-block;margin:0 8px;animation:_ngcontent-%COMP%_rotate 2s ease-in-out 0s infinite}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .uploading[_ngcontent-%COMP%] .upload-icon[_ngcontent-%COMP%]{display:inline-block;margin:0 8px;animation:_ngcontent-%COMP%_goUp 1s ease-in-out 0s infinite}.container[_ngcontent-%COMP%] .utos[_ngcontent-%COMP%]{position:absolute;right:12px;bottom:12px;font-size:12px;color:#999}.container[_ngcontent-%COMP%] .utos[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#999}.container[_ngcontent-%COMP%] model-graph-visualizer[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] .bug-report[_ngcontent-%COMP%]{position:absolute;bottom:8px;left:8px;display:inline-block;display:flex;align-items:center;justify-content:center;color:#000;opacity:.5}.container[_ngcontent-%COMP%] .bug-report[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] .share-button-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #ccc;height:28px;box-sizing:border-box;margin-left:8px;margin-right:8px} .model-explorer-version{font-size:12px;text-align:right;padding:8px 16px 0;color:#999} +`]})}return i})();var rS=new ge("Inject:Window");var D5=(()=>{class i{window;gtag;constructor(t){this.window=t,this.gtag=this.window.gtag}trackEvent(t,n="",r,o,s){let a=this.getPath(this.window.location.href);r=r??a,o=o??t,s=s??1;let l={event_category:n,event_label:r,description:o,value:s,page_path:a};this.trackEventInternal(t,l)}trackNumeric(t,n){this.trackEvent(t,"",void 0,void 0,n)}getPath(t){return"/"+t.split("/").slice(3).join("/")}trackEventInternal(t,n){this.gtag&&this.gtag("event",t,Z({},n))}static \u0275fac=function(n){return new(n||i)(X(rS))};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var P5=function(i){return i.RefreshPage="refreshPage",i}(P5||{}),O5=(()=>{class i{init(){new EventSource("/apistream/server_director").addEventListener("message",n=>{if(!n.data)return;let r=JSON.parse(n.data);switch(r.name){case P5.RefreshPage:cC.setHref(window.location,r.url);break;default:break}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Yve=["modelSourceInput"],Xve=["modelGraphVisualizer"],Zve=()=>[];function Qve(i,e){if(i&1){let t=ie();v(0,"div",16),J(1,"welcome-card"),v(2,"div",24),H("click",function(){V(t);let r=I();return z(r.handleClickDismissWelcomeCard())}),v(3,"mat-icon"),S(4,"close"),y()()()}}function Kve(i,e){i&1&&(v(0,"div",17),J(1,"mat-spinner",25),y())}function Jve(i,e){i&1&&(v(0,"div",18),J(1,"model-source-input",null,1),y())}function e0e(i,e){i&1&&(v(0,"div",20),S(1,"The "),v(2,"a",26),S(3," Google Terms of Service "),y(),S(4," apply to your use of this offering "),y())}function t0e(i,e){if(i&1){let t=ie();v(0,"model-graph-visualizer",27,2),H("titleClicked",function(){V(t);let r=I();return z(r.handleClickTitle())})("modelGraphProcessed",function(r){V(t);let o=I();return z(o.handleModelGraphProcessed(r))})("uiStateChanged",function(r){V(t);let o=I();return z(o.handleUiStateChanged(r))})("remoteNodeDataPathsChanged",function(r){V(t);let o=I();return z(o.handleRemoteNodeDataPathsChanged(r))}),y()}if(i&2){let t=I();N("graphCollections",t.benchmark?z2(5,Zve):t.loadedGraphCollections())("benchmark",t.benchmark)("config",t.curConfig)("initialUiState",t.initialUiState)("nodeDataSources",t.remoteNodeDataPaths)}}var R5=(()=>{class i{dialog;extensionService;gaService;modelLoaderService;newVersionService;route;router;serverDirectorService;settingsService;snackBar;threejsService;urlService;modelSourceInput;modelGraphVisualizer;loadingExtensions;loadedGraphCollections;runningVersion=Xt(()=>this.newVersionService.info().runningVersion);initialUiState;dismissWelcomeCard=!1;dragOver=!1;benchmark=!1;remoteNodeDataPaths=[];remoteNodeDataTargetModels=[];hasUploadedModels=xt(!1);shareButtonTooltip=xt("");remoteProcessedNodeDataTargetModels=new Set;constructor(t,n,r,o,s,a,l,c,d,u,h,p){this.dialog=t,this.extensionService=n,this.gaService=r,this.modelLoaderService=o,this.newVersionService=s,this.route=a,this.router=l,this.serverDirectorService=c,this.settingsService=d,this.snackBar=u,this.threejsService=h,this.urlService=p,this.serverDirectorService.init(),this.loadingExtensions=this.extensionService.loading,this.loadedGraphCollections=this.modelLoaderService.loadedGraphCollections,this.initialUiState=this.urlService.getUiState(),mt(()=>{this.extensionService.loading()||setTimeout(()=>{this.handleExtensionLoaded()})}),mt(()=>{this.loadedGraphCollections()!=null&&window.history.pushState({ts:Date.now()},"")});let f=new URLSearchParams(document.location.search);this.benchmark=f.get("benchmark")==="1",this.remoteNodeDataPaths=this.urlService.getNodeDataSources(),this.remoteNodeDataTargetModels=this.urlService.getNodeDataTargets()}ngAfterViewInit(){this.modelSourceInput&&(this.hasUploadedModels=this.modelSourceInput.hasUploadedModels,this.shareButtonTooltip=Xt(()=>this.hasUploadedModels()?"Share is not available for uploaded models":"Share"))}handlePopState(t){this.loadedGraphCollections.set(void 0),this.initialUiState=void 0,setTimeout(()=>{this.router.navigate([],{queryParams:{},queryParamsHandling:"",replaceUrl:!0})})}handleDragOver(t){this.loadedGraphCollections()==null&&(this.dragOver=!0),t.preventDefault()}handleDragLeave(){this.dragOver=!1}handleDrop(t){t.preventDefault(),this.dragOver=!1;let n=[];t.dataTransfer?.items?Array.from(t.dataTransfer.items).forEach((r,o)=>{if(r.kind==="file"){let s=r.getAsFile();s&&n.push(s)}}):n.push(...Array.from(t.dataTransfer?.files||[])),this.modelSourceInput.addFiles(n)}handleClickTitle(t=!1){t?this.router.navigate(["/"]).then(()=>{window.location.reload()}):window.history.back()}handleClickSettings(){this.dialog.open(I5,{})}handleClickDismissWelcomeCard(){this.settingsService.saveBooleanValue(!1,So.SHOW_WELCOME_CARD)}handleUiStateChanged(t){this.urlService.setUiState(t)}handleModelGraphProcessed(t){let n=t.modelGraph.collectionLabel,r=this.remoteProcessedNodeDataTargetModels.has(n);if(this.remoteNodeDataPaths&&this.remoteNodeDataPaths.length>0&&!r){let o=[];for(let s=0;sn.trim()).filter(n=>n!==""&&(!t||t&&n!=="pseudo_const"&&n!=="pseudo_qconst")),artificialLayerNodeCountThreshold:this.settingsService.getNumberValue(QO),edgeLabelFontSize:this.settingsService.getNumberValue(KO),edgeColor:this.settingsService.getStringValue(JO),maxConstValueCount:this.settingsService.getNumberValue(XO),disallowVerticalEdgeLabels:this.settingsService.getBooleanValue(eR),enableSubgraphSelection:this.urlService.enableSubgraphSelection,enableExportToResource:this.urlService.enableExportToResource,keepLayersWithASingleChild:this.settingsService.getBooleanValue(tR),showOpNodeOutOfLayerEdgesWithoutSelecting:this.settingsService.getBooleanValue(nR)}}handleExtensionLoaded(){let t=this.urlService.getModels();t!=null&&t.length>0?this.modelSourceInput.startProcessingModelSource(t):this.initialUiState=void 0}static \u0275fac=function(n){return new(n||i)(M(wu),M(ff),M(D5),M("ModelLoaderService"),M(NO),M(Rl),M(fh),M(O5),M(pf),M(yu),M(wr),M(iS))};static \u0275cmp=le({type:i,selectors:[["home-page"]],viewQuery:function(n,r){if(n&1&&(Ie(Yve,5),Ie(Xve,5)),n&2){let o;be(o=ye())&&(r.modelSourceInput=o.first),be(o=ye())&&(r.modelGraphVisualizer=o.first)}},hostBindings:function(n,r){n&1&&H("popstate",function(s){return r.handlePopState(s)},!1,Ik)},standalone:!0,features:[ce],decls:38,vars:12,consts:[["menu","matMenu"],["modelSourceInput",""],["modelGraphVisualizer",""],[1,"container",3,"dragover","dragleave","dragend","drop"],[1,"title"],[1,"name",3,"click"],[1,"icons-container"],["mat-icon-button","","aria-label","settings","matTooltip","Advanced settings",3,"click"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],["mat-icon-button","","aria-label","doc","matTooltip","GitHub"],["href","https://github.com/google-ai-edge/model-explorer/issues","target","_blank"],["mat-icon-button","","aria-label","bug","matTooltip","File issue or feature request"],["mat-icon-button","","aria-label","about","matTooltip","About",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],[1,"model-explorer-version"],[1,"content"],[1,"welcome-card-container"],[1,"loading-adapter-extension-container"],[1,"model-source-input-container"],[1,"padding"],[1,"utos"],[3,"graphCollections","benchmark","config","initialUiState","nodeDataSources","titleClicked","modelGraphProcessed","uiStateChanged","remoteNodeDataPathsChanged",4,"ngIf"],[1,"dragover-overlay"],[1,"msg"],["matTooltip","Dismiss",1,"icon-container",3,"click"],["color","primary","diameter","24"],["href","https://policies.google.com/terms?hl=en-US#toc-intro","target","_blank"],[3,"titleClicked","modelGraphProcessed","uiStateChanged","remoteNodeDataPathsChanged","graphCollections","benchmark","config","initialUiState","nodeDataSources"]],template:function(n,r){if(n&1){let o=ie();v(0,"div",3),H("dragover",function(a){return V(o),z(r.handleDragOver(a))})("dragleave",function(){return V(o),z(r.handleDragLeave())})("dragend",function(){return V(o),z(r.handleDragLeave())})("drop",function(a){return V(o),z(r.handleDrop(a))}),v(1,"div",4)(2,"div",5),H("click",function(){return V(o),z(r.handleClickTitle(!0))}),J(3,"me-logo"),S(4," Model Explorer "),J(5,"new-version-chip"),y(),v(6,"div",6)(7,"button",7),H("click",function(){return V(o),z(r.handleClickSettings())}),v(8,"mat-icon"),S(9,"settings"),y()(),v(10,"a",8)(11,"button",9)(12,"mat-icon"),S(13,"article"),y()()(),v(14,"a",10)(15,"button",11)(16,"mat-icon"),S(17,"bug_report"),y()()(),v(18,"button",12)(19,"mat-icon"),S(20,"info_outline"),y()(),v(21,"mat-menu",null,0)(23,"button",13),H("click",function(){return V(o),z(r.handleClickShowThirdPartyLibraries())}),S(24," Open source libraries "),y(),v(25,"div",14),S(26),y()(),J(27,"open-in-new-tab-button"),y()(),v(28,"div",15),W(29,Qve,5,0,"div",16)(30,Kve,2,0,"div",17)(31,Jve,3,0,"div",18),J(32,"div",19),y(),W(33,e0e,5,0,"div",20)(34,t0e,2,6,"model-graph-visualizer",21),v(35,"div",22)(36,"div",23),S(37,"Drop to add model files"),y()()()}if(n&2){let o=ve(22);se("dragover",r.dragOver),w(),se("hide",r.loadedGraphCollections()!=null||r.benchmark),w(17),N("matMenuTriggerFor",o),w(8),Me("v",r.runningVersion(),""),w(2),se("hide",r.loadedGraphCollections()!=null||r.benchmark),w(),ae(r.showWelcomeCard?29:-1),w(),ae(r.loadingExtensions()?30:31),w(3),ae(r.loadedGraphCollections()==null&&!r.benchmark?33:-1),w(),N("ngIf",r.loadedGraphCollections()!=null||r.benchmark)}},dependencies:[Ae,Mn,Jp,In,Ho,ha,it,gt,sa,Jo,j_,vc,ns,ca,LG,Jt,Wn,KC,M5,GC,HC,T5],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;display:flex;flex-direction:column;position:relative}.container.dragover[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%]{display:flex}.container[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%]{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#0000001a;pointer-events:none;flex-direction:column;align-items:center;justify-content:flex-end;z-index:500}.container[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%] .msg[_ngcontent-%COMP%]{margin-bottom:16px;color:#fff;padding:4px 12px;border-radius:99px;background-color:#4285f4}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}30%{transform:rotate(180deg)}60%{transform:rotate(360deg)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_goUp{0%{transform:translateY(10%);opacity:0}30%{transform:translate(0);opacity:1}to{transform:translateY(-25%);opacity:0}}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:8px 12px;box-sizing:border-box;height:48px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;color:#444746;border-bottom:1px solid transparent}.container[_ngcontent-%COMP%] .title.hide[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:20px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] me-logo[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] new-version-chip[_ngcontent-%COMP%]{margin-left:16px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:#000}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] open-in-new-tab-button[_ngcontent-%COMP%]{margin-left:8px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex-grow:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;position:relative;margin-top:16px;overflow:hidden}.container[_ngcontent-%COMP%] .content.hide[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%]{width:1016px;flex-shrink:0;position:relative}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px;cursor:pointer;opacity:.5}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .loading-adapter-extension-container[_ngcontent-%COMP%]{margin-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .model-source-input-container[_ngcontent-%COMP%]{width:1016px;margin-top:20px;overflow:hidden;z-index:100;background-color:#fff}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .padding[_ngcontent-%COMP%]{width:100%;flex-grow:1;min-height:12px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .cover[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:5000;color:#333;background-color:#ffffffe6;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);display:flex;flex-direction:column;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .cover[_ngcontent-%COMP%] .loading-subtitle[_ngcontent-%COMP%]{font-size:14px;color:#999;margin-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .wait-icon[_ngcontent-%COMP%]{display:inline-block;margin:0 8px;animation:_ngcontent-%COMP%_rotate 2s ease-in-out 0s infinite}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .uploading[_ngcontent-%COMP%] .upload-icon[_ngcontent-%COMP%]{display:inline-block;margin:0 8px;animation:_ngcontent-%COMP%_goUp 1s ease-in-out 0s infinite}.container[_ngcontent-%COMP%] .utos[_ngcontent-%COMP%]{position:absolute;right:12px;bottom:12px;font-size:12px;color:#999}.container[_ngcontent-%COMP%] .utos[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#999}.container[_ngcontent-%COMP%] model-graph-visualizer[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] .bug-report[_ngcontent-%COMP%]{position:absolute;bottom:8px;left:8px;display:inline-block;display:flex;align-items:center;justify-content:center;color:#000;opacity:.5}.container[_ngcontent-%COMP%] .bug-report[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] .share-button-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #ccc;height:28px;box-sizing:border-box;margin-left:8px;margin-right:8px} .model-explorer-version{font-size:12px;text-align:right;padding:8px 16px 0;color:#999} @@ -4336,4 +4336,4 @@ THE SOFTWARE.`}];static \u0275fac=function(n){return new(n||i)};static \u0275cmp -`]})}return i})();var n0e="/apipost/v1/upload",i0e="/api/v1/load_graphs_json",r0e="/api/v1/read_text_file",A5=(()=>{class i{settingsService;extensionService;loadedGraphCollections=yt(void 0);constructor(t,n){this.settingsService=t,this.extensionService=n}loadModels(t){return At(this,null,function*(){let n=[];for(let o of t)(o.type===Oi.LOCAL||o.type===Oi.GRAPH_JSONS_FROM_SERVER||o.type===Oi.FILE_PATH)&&n.push(this.loadModel(o));let r=yield Promise.all(n);for(let o of t)o.errorMessage!=null&&(o.errorMessage=qF(o.errorMessage));r.find(o=>o.length===0)==null&&this.loadedGraphCollections.set(r.flat())})}loadModel(t){return At(this,null,function*(){t.status.set(Un.PROCESSING);let n=[];if(t.type===Oi.FILE_PATH)switch(t.selectedAdapter?.id){case Cu.JSON_LOADER:try{let s=yield this.readTextFile(t.path),a=t.path.split("/").pop()||"untitled",l=JSON.parse(s),c=aR(a,l);if(c.error)throw new Error(`Failed to process file: ${c.error})`);c.graphCollections&&(n=c.graphCollections),t.status.set(Un.DONE)}catch(s){t.selected=!1,t.status.set(Un.ERROR),t.errorMessage=s}break;default:let r=t.path,o=r.split("/").pop()||"untitled";n=yield this.sendConvertRequest(t,r,o,!1);break}else{let r=t.file;switch(t.selectedAdapter?.id){case Cu.JSON_LOADER:try{t.type===Oi.GRAPH_JSONS_FROM_SERVER?(n=yield this.loadGraphsFromBackendGraphsJson(t.path),t.status.set(Un.DONE)):(n=yield w5(r),t.status.set(Un.DONE))}catch(a){t.selected=!1,t.status.set(Un.ERROR),t.errorMessage=a}break;default:t.status.set(Un.UPLOADING);let{path:o,error:s}=yield this.uploadModelFile(r);if(s)return t.selected=!1,t.status.set(Un.ERROR),t.errorMessage=s,[];n=yield this.sendConvertRequest(t,o,r.name,!0);break}}return n})}readTextFile(t){return At(this,null,function*(){let r=yield(yield fetch(`${r0e}?path=${t}`)).json();if(r.error)throw new Error(`Failed to read file: ${r.error}`);return r.content})}loadGraphsFromBackendGraphsJson(t){return At(this,null,function*(){let n=t.replace(tS,""),r=n.lastIndexOf("/"),o=n.substring(0,r),s=Number(n.substring(r+1)),l=yield(yield fetch(`${i0e}?graph_index=${s}`)).json();return this.processAdapterConvertResponse(l,o)})}uploadModelFile(t){return At(this,null,function*(){let n=new FormData;n.append("file",t,t.name);let r=yield fetch(n0e,{method:"POST",body:n});return r.ok?{path:JSON.parse(yield r.text()).path}:(console.error(yield r.text()),{path:"",error:"Failed to upload model. Check console for details"})})}sendConvertRequest(t,n,r,o){return At(this,null,function*(){let s=[];t.status.set(Un.PROCESSING);let a={cmdId:"convert",extensionId:t.selectedAdapter?.id||"",modelPath:n,settings:this.settingsService.getAllSettingsValues(),deleteAfterConversion:o},{cmdResp:l,otherError:c}=yield this.extensionService.sendCommandToExtension(a),d=l?.error||c;return d?(t.selected=!1,t.status.set(Un.ERROR),t.errorMessage=d,[]):(l&&(s=this.processAdapterConvertResponse(l,r)),t.status.set(Un.DONE),s)})}processAdapterConvertResponse(t,n){return t.graphs?[{label:n,graphs:t.graphs}]:t.graphCollections?t.graphCollections.map(r=>({label:r.label===""?n:`${n} (${r.label})`,graphs:r.graphs})):[]}static \u0275fac=function(n){return new(n||i)(X(pf),X(ff))};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var o0e=[{path:"",component:R5},{path:"demo",component:g5}],N5={providers:[q2({eventCoalescing:!0}),aF(o0e),HF(),{provide:"ModelLoaderService",useClass:A5},{provide:rS,useValue:window}]};SL(cF,N5).catch(i=>console.error(i)); +`]})}return i})();var n0e="/apipost/v1/upload",i0e="/api/v1/load_graphs_json",r0e="/api/v1/read_text_file",A5=(()=>{class i{settingsService;extensionService;loadedGraphCollections=xt(void 0);constructor(t,n){this.settingsService=t,this.extensionService=n}loadModels(t){return At(this,null,function*(){let n=[];for(let o of t)(o.type===Oi.LOCAL||o.type===Oi.GRAPH_JSONS_FROM_SERVER||o.type===Oi.FILE_PATH)&&n.push(this.loadModel(o));let r=yield Promise.all(n);for(let o of t)o.errorMessage!=null&&(o.errorMessage=$F(o.errorMessage));r.find(o=>o.length===0)==null&&this.loadedGraphCollections.set(r.flat())})}loadModel(t){return At(this,null,function*(){t.status.set(Un.PROCESSING);let n=[];if(t.type===Oi.FILE_PATH)switch(t.selectedAdapter?.id){case Cu.JSON_LOADER:try{let s=yield this.readTextFile(t.path),a=t.path.split("/").pop()||"untitled",l=JSON.parse(s),c=sR(a,l);if(c.error)throw new Error(`Failed to process file: ${c.error})`);c.graphCollections&&(n=c.graphCollections),t.status.set(Un.DONE)}catch(s){t.selected=!1,t.status.set(Un.ERROR),t.errorMessage=s}break;default:let r=t.path,o=r.split("/").pop()||"untitled";n=yield this.sendConvertRequest(t,r,o,!1);break}else{let r=t.file;switch(t.selectedAdapter?.id){case Cu.JSON_LOADER:try{t.type===Oi.GRAPH_JSONS_FROM_SERVER?(n=yield this.loadGraphsFromBackendGraphsJson(t.path),t.status.set(Un.DONE)):(n=yield y5(r),t.status.set(Un.DONE))}catch(a){t.selected=!1,t.status.set(Un.ERROR),t.errorMessage=a}break;default:t.status.set(Un.UPLOADING);let{path:o,error:s}=yield this.uploadModelFile(r);if(s)return t.selected=!1,t.status.set(Un.ERROR),t.errorMessage=s,[];n=yield this.sendConvertRequest(t,o,r.name,!0);break}}return n})}readTextFile(t){return At(this,null,function*(){let r=yield(yield fetch(`${r0e}?path=${t}`)).json();if(r.error)throw new Error(`Failed to read file: ${r.error}`);return r.content})}loadGraphsFromBackendGraphsJson(t){return At(this,null,function*(){let n=t.replace(tS,""),r=n.lastIndexOf("/"),o=n.substring(0,r),s=Number(n.substring(r+1)),l=yield(yield fetch(`${i0e}?graph_index=${s}`)).json();return this.processAdapterConvertResponse(l,o)})}uploadModelFile(t){return At(this,null,function*(){let n=new FormData;n.append("file",t,t.name);let r=yield fetch(n0e,{method:"POST",body:n});return r.ok?{path:JSON.parse(yield r.text()).path}:(console.error(yield r.text()),{path:"",error:"Failed to upload model. Check console for details"})})}sendConvertRequest(t,n,r,o){return At(this,null,function*(){let s=[];t.status.set(Un.PROCESSING);let a={cmdId:"convert",extensionId:t.selectedAdapter?.id||"",modelPath:n,settings:this.settingsService.getAllSettingsValues(),deleteAfterConversion:o},{cmdResp:l,otherError:c}=yield this.extensionService.sendCommandToExtension(a),d=l?.error||c;return d?(t.selected=!1,t.status.set(Un.ERROR),t.errorMessage=d,[]):(l&&(s=this.processAdapterConvertResponse(l,r)),t.status.set(Un.DONE),s)})}processAdapterConvertResponse(t,n){return t.graphs?[{label:n,graphs:t.graphs}]:t.graphCollections?t.graphCollections.map(r=>({label:r.label===""?n:`${n} (${r.label})`,graphs:r.graphs})):[]}static \u0275fac=function(n){return new(n||i)(X(pf),X(ff))};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var o0e=[{path:"",component:R5},{path:"demo",component:f5}],N5={providers:[$2({eventCoalescing:!0}),sF(o0e),UF(),{provide:"ModelLoaderService",useClass:A5},{provide:rS,useValue:window}]};CL(lF,N5).catch(i=>console.error(i)); diff --git a/src/server/package/src/model_explorer/web_app/worker-GU535CTX.js b/src/server/package/src/model_explorer/web_app/worker-OXAJQWPP.js similarity index 85% rename from src/server/package/src/model_explorer/web_app/worker-GU535CTX.js rename to src/server/package/src/model_explorer/web_app/worker-OXAJQWPP.js index 7f2cc32b..7e2d20a0 100644 --- a/src/server/package/src/model_explorer/web_app/worker-GU535CTX.js +++ b/src/server/package/src/model_explorer/web_app/worker-OXAJQWPP.js @@ -1,3 +1,3 @@ -var Q=4,ie=4,D=9,le=16,ce=200,q=12,pe=1e3;var j=25;var ue=.1;var M="Node data provider: ",R=10;var k="__value",z="__tensor_tag",P=20;var H=14;var be=new OffscreenCanvas(300,300),he={},Tt=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function T(n){return n?.nodeType===0}function N(n){return n?.nodeType===1}function Z(n){let e=[];for(let[o,t]of Object.entries(n))switch(o){case"Op node id":t.selected&&e.push("id");break;default:break}return e}function J(n){let e=[];for(let[o,t]of Object.entries(n))switch(o){case"Layer node children count":t.selected&&e.push("#children");break;case"Layer node descendants count":t.selected&&e.push("#descendants");break;default:break}return e}function ee(n,e){if(T(n))switch(e.toLowerCase()){case"id":return n.id;case"namespace":return ge(n);default:break}else if(N(n))switch(e.toLowerCase()){case"namespace":return ge(n);case"#children":return String((n.nsChildrenIds||[]).length);case"#descendants":return String((n.descendantsNodeIds||[]).length);default:break}return""}function ge(n){return n.savedNamespace||n.namespace||""}function A(n,e,o){let t=[];n==null?t=e.rootNodes.map(r=>r.id):t=n.nsChildrenIds||[];for(let r of t){let s=e.nodesById[r];s&&N(s)&&s.expanded&&((s.nsChildrenIds||[]).filter(a=>N(e.nodesById[a])).every(a=>!e.nodesById[a].expanded)&&o.push(s.id),A(s,e,o))}}function fe(n,e,o,t){let r=[];if(n.length===2)r=n;else if(n.length===3&&n[0].x===n[1].x&&n[1].x===n[2].x)r=n;else{let s=!0,d=0;for(let i=0;il?1:-1;if(d!==0&&d!==g){s=!1;break}d=g}let a=t.Vector3;if(s){let l=e().x(p=>p.x).y(p=>p.y).curve(o)(n).split(/M|C/).filter(p=>p!=="").map(p=>p.split(",").map(h=>Number(h))),c=new a(l[0][0],l[0][1],0),g=new t.CurvePath;for(let p=1;pnew a(c.x,c.y,0));r=new t.CatmullRomCurve3(i,!1,"catmullrom",ue).getPoints(j)}}return r}function G(n,e,o,t=!0){let r=`${n}___${e}___${o}`,s=he[r];if(s==null){let d=be.getContext("2d");d.font=`${e}px "Google Sans Text", Arial, Helvetica, sans-serif`,o&&(d.font=`bold ${d.font}`);let i=d.measureText(n).width;t&&(he[r]=i),s=i}return s}function De(n,e,o){let t=o[z];return t?`Input${n}:${t} (${e.label})`:`Input${n} (${e.label})`}function Se(n,e,o){let t=`Output${n}`;if(o.label==="GraphInputs"){let r=e.tensor_name;r!=null&&(t=`${t} (${r})`)}else{let r=e[z];r&&(t=`Output${n}:${r}`)}return t}function Ne(n){let e=((n||{}).shape||"").replace(/ /g,"").replace(/×/g,"x");return e===""&&(e="?"),e}function te(n,e=""){let o=n.attrs||{},t=[],r=new RegExp(e,"i");for(let s of Object.keys(o)){let d=s,a=o[s],i=[`${d}:${a}`,`${d}=${a}`];if(e.trim()===""||i.some(l=>r.test(l))){let l=a;d===k?l=a.replace(/\s/gm,""):l=a.replace(/(\r\n|\n|\r)/gm," "),t.push({key:d,value:l})}}return t}function oe(n,e,o=""){let t=e.groupNodeAttributes?.[n.id.replace("___group___","")]||{},r=[],s=new RegExp(o,"i");for(let d of Object.keys(t)){let a=d,i=t[d],l=[`${a}:${i}`,`${a}=${i}`];if(o.trim()===""||l.some(c=>s.test(c))){let c=i.replace(/(\r\n|\n|\r)/gm," ");r.push({key:a,value:c})}}return r}function me(n,e){let o=n.incomingEdges||[],t=[];for(let r=0;rR){let r=o.length-R;t.push({key:`(${r} more input${r===1?"":"s"} omitted)`,value:"..."})}return t}function Ee(n){let e=[],o=n.outputsMetadata||{},t=Object.values(o);for(let r=0;rR){let r=t.length-R;e.push({key:`(${r} more output${r===1?"":"s"} omitted)`,value:"..."})}return e}function Ie(n,e,o,t){let r=[],s=Object.keys(o).filter(a=>o[a].selected).filter(a=>a.startsWith(M)).map(a=>a.replace(M,"")),d=Object.values(t).filter(a=>s.includes(a.runName));for(let a of d){let i=(a.results||{})?.[e][n.id]?.strValue||"-";r.push({key:a.runName,value:i})}return r}function _e(n,e){let o=n.split("/"),t=e.split("/"),r="";for(let s=Math.min(o.length,t.length);s>0;s--){let d=o.slice(0,s).join("/"),a=t.slice(0,s).join("/");if(d===a){r=a;break}}return r}function re(n,e){if(n===e)return"";let o=n.split("/").filter(r=>r!==""),t=e.split("/").filter(r=>r!=="");return t.length===0?"":t[o.length]}function w(n){return n.split(` -`).map(e=>e.trim()).filter(e=>e!=="")}function Y(n){return(w(n).length-1)*H}var ne=36,ye=16,Te=26,Le=50,Me=24,ve=80,Ce=8,y=class{constructor(e,o,t,r,s=!1){this.modelGraph=e;this.dagre=o;this.showOnNodeItemTypes=t;this.nodeDataProviderRuns=r;this.testMode=s;this.dagreGraph=new this.dagre.graphlib.Graph}dagreGraph;layout(e){let o,t=[];e==null?t=this.modelGraph.rootNodes:(o=this.modelGraph.nodesById[e],t=(o.nsChildrenIds||[]).map(u=>this.modelGraph.nodesById[u])),this.configLayout(this.dagreGraph);let r=ae(o?.id||"",t,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode);for(let u of Object.keys(r.nodes)){let m=r.nodes[u];m.config?.pinToGroupTop||this.dagreGraph.setNode(u,m)}for(let u of Object.keys(r.outgoingEdges))for(let m of r.outgoingEdges[u])this.dagreGraph.setEdge(u,m);this.dagre.layout(this.dagreGraph);let s=Number.MAX_VALUE,d=Number.MAX_VALUE,a=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(let u of t){let m=r.nodes[u.id];if(!m){console.warn(`Node "${u.id}" is not in the dagre layout result`);continue}u.x=(m.x||0)-m.width/2,u.y=(m.y||0)-m.height/2,u.width=m.width,u.height=m.height,u.localOffsetX=0,u.localOffsetY=0,m.config?.pinToGroupTop||(s=Math.min(s,u.x),d=Math.min(d,u.y),a=Math.max(a,u.x+u.width),i=Math.max(i,u.y+u.height))}let l=Number.MAX_VALUE,c=Number.MAX_VALUE,g=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY,h=this.dagreGraph.edges(),E=[];for(let u of h){let m=this.dagreGraph.edge(u).points,_=globalThis.d3,v=globalThis.THREE,V=typeof v>"u"?[]:fe(m,_.line,_.curveMonotoneY,v),f=this.modelGraph.nodesById[u.v],b=this.modelGraph.nodesById[u.w];if(f==null){console.warn(`Edge from node not found: "${u.v}"`);continue}if(b==null){console.warn(`Edge to node not found: "${u.w}"`);continue}let C=`${f.id}|${b.id}`;E.push({id:C,fromNodeId:f.id,toNodeId:b.id,points:m,curvePoints:V});for(let O of m)l=Math.min(l,O.x),c=Math.min(c,O.y),g=Math.max(g,O.x),p=Math.max(p,O.y)}if(this.modelGraph.edgesByGroupNodeIds[e||""]=E,l0){let m=u*q+16;for(let _ of t)_.localOffsetY=m;i+=m}}return{x:s,y:d,width:I-P*2,height:i-d}}configLayout(e){e.setGraph({nodesep:20,ranksep:50,edgesep:20,marginx:P,marginy:ne}),e.setDefaultEdgeLabel(()=>({}))}};function $(n,e,o,t,r=!1){if(r)return Le;let s=n.label,d=w(s),a=0;for(let g of d)a=Math.max(G(g,11,N(n))+Me,a);N(n)&&(a+=28);let i=0,l=0;if(T(n)){let g=Z(o);for(let E of g){let I=G(`${E}:`,D,!0),u=ee(n,E),m=G(u,D,!1);i=Math.max(i,I),l=Math.max(l,m)}if(o["Op node attributes"]?.selected){let E=te(n,o["Op node attributes"]?.filterRegex||""),I=B(E);i=Math.max(i,I.maxAttrLabelWidth),l=Math.max(l,I.maxAttrValueWidth)}if(o["Op node inputs"]?.selected){let E=me(n,e),I=B(E);i=Math.max(i,I.maxAttrLabelWidth),l=Math.max(l,I.maxAttrValueWidth)}if(o["Op node outputs"]?.selected){let E=Ee(n),I=B(E);i=Math.max(i,I.maxAttrLabelWidth),l=Math.max(l,I.maxAttrValueWidth)}let p=Ie(n,e.id,o,t),h=B(p);i=Math.max(i,h.maxAttrLabelWidth),l=Math.max(l,h.maxAttrValueWidth)}else if(N(n)){let g=J(o);for(let p of g){let h=G(`${p}:`,D,!0),E=ee(n,p),I=G(E,D,!1);i=Math.max(i,h),l=Math.max(l,I)}if(o["Layer node attributes"]?.selected){let p=oe(n,e,o["Layer node attributes"]?.filterRegex||""),h=B(p);i=Math.max(i,h.maxAttrLabelWidth),l=Math.max(l,h.maxAttrValueWidth)}}l=Math.min(l,ce);let c=i+l+ie*2+Q;return c!==Q&&(c+=Ce*2),Math.max(ve,Math.max(a,c))}function se(n,e,o,t,r=!1,s=!1){if(r)return Te;if(n.height!=null&&!s)return n.height;let d=Y(n.label),a=0;return T(n)?a=we(o,n,t):N(n)&&(a=Re(n,e,o)),Te+d+a*q+(a>0?le-4:0)}function ae(n,e,o,t,r,s=!1,d=!1){let a={nodes:{},incomingEdges:{},outgoingEdges:{}};for(let l of e){if(T(l)&&l.hideInLayout)continue;let c={id:l.id,width:l.width||(d?10:$(l,o,t,r,s)),height:d?10:se(l,o,t,r,s),config:T(l)?l.config:void 0};a.nodes[l.id]=c}let i=o.layoutGraphEdges[n]||{};for(let[l,c]of Object.entries(i))for(let g of Object.keys(c)){let p=o.nodesById[l],h=o.nodesById[g];p&&T(p)&&p.config?.pinToGroupTop||h&&T(h)&&h.config?.pinToGroupTop||Be(a,l,g)}return a}function we(n,e,o){let t=Z(n),r=n["Op node attributes"]?.selected?te(e,n["Op node attributes"]?.filterRegex||"").length:0,s=n["Op node inputs"]?.selected?Object.keys(e.incomingEdges||[]).length:0;s>R&&(s=R+1);let d=n["Op node outputs"]?.selected?Object.keys(e.outputsMetadata||{}).length:0;d>R&&(d=R+1);let a=Object.keys(n).filter(i=>n[i].selected).filter(i=>i.startsWith(M)&&Object.values(o).some(l=>l.runName===i.replace(M,""))).length;return t.length+r+s+d+a}function Re(n,e,o){let t=J(o),r=o["Layer node attributes"]?.selected?oe(n,e,o["Layer node attributes"]?.filterRegex||"").length:0;return t.length+r}function Be(n,e,o){n.outgoingEdges[e]==null&&(n.outgoingEdges[e]=[]),n.outgoingEdges[e].push(o),n.incomingEdges[o]==null&&(n.incomingEdges[o]=[]),n.incomingEdges[o].push(e)}function B(n){let e=0,o=0;for(let{key:t,value:r}of n){let s=G(t,D,!0);e=Math.max(e,s);let d=G(r,D,!1);o=Math.max(o,d)}return{maxAttrLabelWidth:e,maxAttrValueWidth:o}}var S=class{constructor(e,o,t,r,s=!1){this.modelGraph=e;this.dagre=o;this.showOnNodeItemTypes=t;this.nodeDataProviderRuns=r;this.testMode=s}dagreGraphs=[];expandGroupNode(e){let o=this.modelGraph.nodesById[e];if(o&&N(o)){if(o.expanded)return;o.expanded=!0}let t=e;for(;t!=null;){let s=this.modelGraph.nodesById[t];if(!s)break;s.expanded=!0;let d=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),a=d.layout(t);this.testMode&&this.dagreGraphs.push(d.dagreGraph);let i=a.width+P*2,l=this.getTargetGroupNodeHeight(a,s);s.width=i,s.height=l,t=s.nsParentId}let r=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);r.layout(),this.testMode&&this.dagreGraphs.push(r.dagreGraph);for(let s of this.modelGraph.rootNodes)N(s)&&this.updateNodeOffset(s)}expandFromDeepestGroupNodes(e){let o=new Set,t=[...e];for(;t.length>0;){let d=t.shift();if(o.has(d))continue;o.add(d);let i=this.modelGraph.nodesById[d]?.nsParentId;i&&t.push(i)}let r=Array.from(o).sort((d,a)=>{let i=this.modelGraph.nodesById[d];return this.modelGraph.nodesById[a].level-i.level});for(let d of r){let a=this.modelGraph.nodesById[d];a.expanded=!0;let i=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),l=i.layout(d);this.testMode&&this.dagreGraphs.push(i.dagreGraph);let c=l.width+P*2,g=this.getTargetGroupNodeHeight(l,a);a.width=c,a.height=g}let s=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);s.layout(),this.testMode&&this.dagreGraphs.push(s.dagreGraph);for(let d of this.modelGraph.rootNodes)N(d)&&this.updateNodeOffset(d)}expandToRevealNode(e){let o=this.modelGraph.nodesById[e],t=[],r=o;for(;;){let d=this.modelGraph.nodesById[r.nsParentId||""];if(!d)break;t.unshift(d),r=d}for(let d of t)this.expandGroupNode(d.id);let s=[];return A(void 0,this.modelGraph,s),s}collapseGroupNode(e){let o=this.modelGraph.nodesById[e];if(!o)return[];o.expanded=!1,delete this.modelGraph.edgesByGroupNodeIds[e],o.width=$(o,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns),o.height=se(o,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode,!0);let t=o.nsParentId;for(;t!=null;){let d=this.modelGraph.nodesById[t];if(!d)break;let a=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),i=a.layout(t);this.testMode&&this.dagreGraphs.push(a.dagreGraph);let l=i.width+P*2,c=this.getTargetGroupNodeHeight(i,d);d.width=l,d.height=c,t=d.nsParentId}let r=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);r.layout(),this.testMode&&this.dagreGraphs.push(r.dagreGraph);for(let d of this.modelGraph.rootNodes)N(d)&&this.updateNodeOffset(d);let s=[];return A(void 0,this.modelGraph,s),s}reLayoutGraph(e,o){let t=e;if(t)o&&this.clearLayoutData(void 0,!0);else{let r=[];this.clearLayoutData(void 0),A(void 0,this.modelGraph,r),t=r}return t.length>0?this.expandFromDeepestGroupNodes(t):new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns).layout(),t}expandAllGroups(){this.clearLayoutData(void 0,!0);let e=this.modelGraph.nodes.filter(o=>N(o)&&(o.nsChildrenIds||[]).filter(t=>N(this.modelGraph.nodesById[t])).length===0).map(o=>o.id);return e.length>0&&this.expandFromDeepestGroupNodes(e),e}collapseAllGroup(){this.clearLayoutData(void 0,!0),new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns).layout();for(let o of this.modelGraph.rootNodes)N(o)&&this.updateNodeOffset(o);return[]}updateNodeOffset(e){for(let o of e.nsChildrenIds||[]){let t=this.modelGraph.nodesById[o];if(t.x!=null&&t.y!=null){t.globalX=(e.x||0)+(e.globalX||0)+(t.localOffsetX||0),t.globalY=(e.y||0)+(e.globalY||0)+(t.localOffsetY||0);let r=(w(e.label).length-1)*H;r>0&&(t.globalY+=r),e.pinToTopOpNode&&t.id!==e.pinToTopOpNode.id&&(t.globalY+=this.getPinToTopNodeVerticalSpace(e.pinToTopOpNode)),e.pinToTopOpNode?.id===t.id&&(t.globalX=(e.x||0)+(e.globalX||0)+(e.width||0)/2,t.globalY=(e.y||0)+(e.globalY||0)+(t.localOffsetY||0)+this.getPinToTopNodeVerticalSpace(t)-(t.height||0)/2+10)}N(t)&&this.updateNodeOffset(t)}}clearLayoutData(e,o){let t=[];e==null?t=this.modelGraph.rootNodes.map(r=>r.id):t=e.nsChildrenIds||[],o&&e!=null&&(e.expanded=!1,delete this.modelGraph.edgesByGroupNodeIds[e.id]);for(let r of t){let s=this.modelGraph.nodesById[r];s&&(s.width=void 0,s.height=void 0,N(s)&&s.expanded&&this.clearLayoutData(s,o))}}getPinToTopNodeVerticalSpace(e){return(e.height||0)+20}getTargetGroupNodeHeight(e,o){let t=Y(o.label),r=e.height+ne+ye+t;return o.pinToTopOpNode&&(r+=this.getPinToTopNodeVerticalSpace(o.pinToTopOpNode)),r}};function x(n,e,o){let t={eventType:8,paneId:n,label:e,error:o};postMessage(t)}var ke=/dense<([^>]*)>/,F=class{constructor(e,o,t,r={},s={},d=pe,a=!1,i=!1,l=!1){this.paneId=e;this.graph=o;this.config=t;this.showOnNodeItemTypes=r;this.nodeDataProviderRuns=s;this.groupNodeChildrenCountThreshold=d;this.testMode=a;this.flattenLayers=i;this.keepLayersWithASingleChild=l;this.nodeLabelsToHide=new Set((this.config?.nodeLabelsToHide||[]).map(c=>c.toLowerCase()))}nodeLabelsToHide;process(){let e=this.createEmptyModelGraph();return this.processNodes(e),this.processEdgeRelationships(e),x(this.paneId,"Processing nodes and edges"),this.processNamespaceRelationships(e),x(this.paneId,"Processing layer namespaces"),this.generateLayoutGraphConnections(e),x(this.paneId,"Processing layout data"),this.splitLargeGroupNodes(e),x(this.paneId,"Splitting large layers (if any)"),this.populateDescendantsAndCounts(e),e}processNodes(e){let o=new Set;for(let t of this.graph.nodes){let s=t.namespace.split(";").filter(a=>a!=="");s.length>1&&(t.namespace=s[s.length-1]);let d={nodeType:0,id:t.id,namespace:this.flattenLayers?"":t.namespace,savedNamespace:t.namespace,label:t.label,level:this.getNonEmptyNamespaceComponents(t.namespace).length};if(t.subgraphIds&&t.subgraphIds.length>0&&(d.subgraphIds=t.subgraphIds),this.nodeLabelsToHide.has(t.label.toLowerCase())&&(d.hideInLayout=!0),t.attrs){let a={};for(let i of t.attrs)a[i.key]=this.processAttrValue(i.key,i.value);d.attrs=a}if(t.inputsMetadata&&(d.inputsMetadata=this.processMetadataList(t.inputsMetadata)),t.outputsMetadata&&(d.outputsMetadata=this.processMetadataList(t.outputsMetadata)),t.style&&(d.style=t.style),t.config&&(d.config=t.config),e.nodes.push(d),e.nodesById[d.id]=d,!d.hideInLayout&&!this.flattenLayers){let a=this.getAncestorNamespaces(d.namespace);for(let i of a){if(o.has(i))continue;o.add(i);let l=i.split("/"),c=l.splice(-1)[0],g=l.join("/"),p={nodeType:1,id:this.getGroupNodeIdFromNamespace(i),namespace:g,label:c,level:l.length,expanded:!1};e.nodes.push(p),e.nodesById[p.id]=p}}}}processEdgeRelationships(e){for(let o of this.graph.nodes){let t=e.nodesById[o.id];if(t)for(let r of o.incomingEdges||[]){let s=r.sourceNodeId,d=e.nodesById[s];d&&(t.incomingEdges==null&&(t.incomingEdges=[]),t.incomingEdges.find(a=>a.sourceNodeId===s&&a.sourceNodeOutputId===r.sourceNodeOutputId&&a.targetNodeInputId===r.targetNodeInputId)==null&&t.incomingEdges.push({...r}),d.outgoingEdges==null&&(d.outgoingEdges=[]),d.outgoingEdges.find(a=>a.targetNodeId===t.id&&a.sourceNodeOutputId===r.sourceNodeOutputId&&a.targetNodeInputId===r.targetNodeInputId)==null&&d.outgoingEdges.push({targetNodeId:t.id,sourceNodeOutputId:r.sourceNodeOutputId,targetNodeInputId:r.targetNodeInputId}))}}}processNamespaceRelationships(e){for(let o of e.nodes){if(T(o)&&o.hideInLayout)continue;let t=o.namespace;if(t===""){e.rootNodes.push(o);continue}let r=this.getGroupNodeIdFromNamespace(t),s=e.nodesById[r];s?o.nsParentId=s.id:console.warn(`Failed to find the NS parent of node "${o.id}": "${r}"`),s&&(s.nsChildrenIds==null&&(s.nsChildrenIds=[]),s.nsChildrenIds.includes(o.id)||(s.nsChildrenIds.push(o.id),T(o)&&o.config?.pinToGroupTop&&(s.pinToTopOpNode=o)))}if(!this.keepLayersWithASingleChild)for(;;){let o=0;for(let t of e.nodes)if(N(t)&&t.nsChildrenIds!=null&&t.nsChildrenIds.length===1){let r=e.nodesById[t.nsChildrenIds[0]];if(T(r)){o++;let s=e.nodes.indexOf(t);s>=0&&e.nodes.splice(s,1),delete e.nodesById[t.id];let d=r.namespace,a=this.getNonEmptyNamespaceComponents(d);a.pop(),r.namespace=a.join("/"),r.savedNamespace=r.namespace,r.level=a.length,r.nsParentId=t.nsParentId;let i=e.rootNodes.indexOf(t);if(i>=0&&(e.rootNodes.splice(i,1),e.rootNodes.push(r)),t.nsParentId){let l=e.nodesById[t.nsParentId],c=l.nsChildrenIds.indexOf(t.id);l.nsChildrenIds.splice(c,1),l.nsChildrenIds.push(r.id)}}}if(o===0)break}}generateLayoutGraphConnections(e){e.layoutGraphEdges={};let o=[];for(let s of e.nodes){if(!T(s)||s.hideInLayout)continue;(s.incomingEdges||[]).filter(a=>!e.nodesById[a.sourceNodeId].hideInLayout).length===0&&o.push(s)}let t=[...o],r=new Set;for(;t.length>0;){let s=t.shift();if(s==null||s.hideInLayout||r.has(s.id))continue;r.add(s.id);let d=s.outgoingEdges||[];for(let a of d){let i=e.nodesById[a.targetNodeId];if(i.hideInLayout)continue;let l=_e(s.namespace,i.namespace),c=re(l,s.namespace),g=c===""?s.id:`${l}${l===""?"":"/"}${c}___group___`,p=re(l,i.namespace),h=p===""?i.id:`${l}${l===""?"":"/"}${p}___group___`,E=l===""?"":`${l}___group___`;e.layoutGraphEdges[E]==null&&(e.layoutGraphEdges[E]={}),e.layoutGraphEdges[E][g]==null&&(e.layoutGraphEdges[E][g]={}),e.layoutGraphEdges[E][g][h]=!0}for(let a of d){let i=e.nodesById[a.targetNodeId];t.push(i)}}}splitLargeGroupNodes(e){let o=[void 0],t=!1;for(;o.length>0;){let r=o.shift(),s=r==null?e.rootNodes:(r.nsChildrenIds||[]).map(d=>e.nodesById[d]);if(s.length>this.groupNodeChildrenCountThreshold){t=!0;let d=ae(r?.id||"",s,e,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode,!0),a=[];for(let h of Object.keys(d.nodes))d.incomingEdges[h]==null&&a.push(e.nodesById[h]);let i=[],l=[],c=new Set,g=h=>{if(c.has(h))return;c.add(h);let E=e.nodesById[h];l.push(E),l.length===this.groupNodeChildrenCountThreshold&&(i.push(l),l=[]);for(let I of d.outgoingEdges[E.id]||[])g(I)};for(let h of a)g(h.id);l.length0&&i.push(l);let p=[];for(let h=0;hf!=="").length,nsParentId:r?.id,nsChildrenIds:E.map(f=>f.id),expanded:!1,sectionContainer:!0};p.push(_),e.nodes.push(_),e.nodesById[_.id]=_,e.artificialGroupNodeIds==null&&(e.artificialGroupNodeIds=[]),e.artificialGroupNodeIds.push(_.id);for(let f of E)f.nsParentId=_.id;let v=m.replace("___group___",""),V=f=>{if(f.namespace===""?f.namespace=v:r==null?f.namespace=`${v}/${f.namespace}`:f.namespace=(f.nsParentId||"").replace("___group___",""),f.level=f.namespace.split("/").filter(C=>C!=="").length,N(f)){let C=f.id;if(delete e.nodesById[f.id],f.id=`${f.namespace}/${f.label}___group___`,e.nodesById[f.id]=f,f.nsParentId){let O=e.nodesById[f.nsParentId],L=(O.nsChildrenIds||[]).indexOf(C);L>=0&&((O.nsChildrenIds||[])[L]=f.id)}for(let O of f.nsChildrenIds||[]){let L=e.nodesById[O];L!=null&&(L.nsParentId=f.id,V(L))}}};for(let f of E)V(f);if(r==null){for(let f of E){let b=e.rootNodes.indexOf(f);b>=0&&e.rootNodes.splice(b,1)}_.namespace===""&&e.rootNodes.push(_)}s=p}r!=null&&(r.nsChildrenIds=p.map(h=>h.id))}for(let d of s)N(d)&&o.push(d)}t&&this.generateLayoutGraphConnections(e)}populateDescendantsAndCounts(e){let o=Number.MAX_VALUE,t=Number.NEGATIVE_INFINITY;for(let r of e.nodes)if(N(r)){let s=[];this.gatherDescendants(e,r,s),r.descendantsNodeIds=s.map(a=>a.id),r.descendantsOpNodeIds=s.filter(a=>a.nodeType===0).map(a=>a.id);let d=(r.descendantsOpNodeIds||[]).length;o=Math.min(d,o),t=Math.max(d,t)}e.minDescendantOpNodeCount=o,e.maxDescendantOpNodeCount=t}createEmptyModelGraph(){let e={id:this.graph.id,collectionLabel:this.graph.collectionLabel||"",nodes:[],nodesById:{},rootNodes:[],edgesByGroupNodeIds:{},layoutGraphEdges:{},minDescendantOpNodeCount:-1,maxDescendantOpNodeCount:-1};return this.graph.groupNodeAttributes&&(e.groupNodeAttributes=this.graph.groupNodeAttributes),e}getAncestorNamespaces(e){let o=this.getNonEmptyNamespaceComponents(e),t=[];for(;o.length>0;)t.push(o.join("/")),o.pop();return t}getNonEmptyNamespaceComponents(e){return e.split("/").filter(o=>o!=="")}getGroupNodeIdFromNamespace(e){return`${e}___group___`}gatherDescendants(e,o,t){for(let r of o.nsChildrenIds||[]){let s=e.nodesById[r];(N(s)||T(s)&&!s.hideInLayout)&&t.push(s),N(s)&&this.gatherDescendants(e,s,t)}}processAttrValue(e,o){if(o.startsWith("dense<")){let t=o.match(ke);if(t!=null&&t.length>1){let r=t[1];return Oe(r)}}else if(e===k)return Oe(o);return o.replaceAll('"',"")||""}processMetadataList(e){let o={};for(let t of e){let r={};for(let s of t.attrs){let d=s.key,a=s.value;d==="tensor_shape"&&(d="shape",a=a.replace("tensor<","").replace(">","").replace("*","\u2217").split("x").join(" x ")),r[d]=a}o[t.id]=r}return o}};function Oe(n){try{return JSON.stringify(JSON.parse(n),null,2).replaceAll("\\n",` -`).trim()}catch{return n}}var W=10000019,X=class{constructor(e){this.modelGraph=e}markIdenticalGroups(){let e={};for(let t of this.modelGraph.nodes){if(!N(t))continue;let r=0,s=(t.descendantsOpNodeIds||[]).map(a=>this.modelGraph.nodesById[a]).filter(a=>!a.hideInLayout),d=new Set(s.map(a=>a.id));for(let a of s)r=(r+this.getNodeHash(a,d))%W;for(let a of s)for(let i of a.outgoingEdges||[]){let l=i.targetNodeId;if(!d.has(l))continue;let c=this.modelGraph.nodesById[l];r=(r+this.getEdgeHash(a,c))%W}e[r]||(e[r]=[]),e[r].push(t)}let o=0;for(let t of Object.values(e))if(!(t.length<=1)&&!(t.length===2&&(t[0].nsParentId===t[1].id||t[1].nsParentId===t[0].id))){for(let r of t)r.identicalGroupIndex=o;o++}}getNodeHash(e,o){let t=0;t=this.addToHash(t,e.label);let r=0;for(let d of e.incomingEdges||[]){let a=d.sourceNodeId;if(o.has(a)){let i=this.modelGraph.nodesById[a];t=this.addToHash(t,`in ${i.label}`),r++}}let s=0;for(let d of e.outgoingEdges||[]){let a=d.targetNodeInputId;if(o.has(a)){let i=this.modelGraph.nodesById[a];t=this.addToHash(t,`out ${i.label}`),s++}}return t=this.addToHash(t,`${r}`),t=this.addToHash(t,`${s}`),t}getEdgeHash(e,o){return this.genHash(e.label+o.label)%W}genHash(e){let o=5381;e=e||"";for(let t=0,r=e.length;t{let e=n.data;switch(e.eventType){case 0:{let o=He(e.paneId,e.graph,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.config,e.groupNodeChildrenCountThreshold,e.flattenLayers,e.keepLayersWithASingleChild);U(o,e.paneId);let t={eventType:1,modelGraph:o,paneId:e.paneId};postMessage(t);break}case 9:{let o=K(e.modelGraphId,e.paneId),t=JSON.parse(JSON.stringify(o));U(t,e.rendererId);let r={eventType:10,modelGraph:o,paneId:e.paneId,rendererId:e.rendererId,groupNodeId:e.groupNodeId,initialPosition:e.initialPosition};postMessage(r);break}case 2:{let o=K(e.modelGraphId,e.rendererId),t=[];e.expand?t=Ye(o,e.groupNodeId,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.all===!0):t=$e(o,e.groupNodeId,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.all===!0),U(o,e.rendererId);let r={eventType:3,modelGraph:o,expanded:e.expand,groupNodeId:e.groupNodeId,rendererId:e.rendererId,deepestExpandedGroupNodeIds:t};postMessage(r);break}case 4:{let o=K(e.modelGraphId,e.rendererId);Fe(o,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.targetDeepestGroupNodeIdsToExpand,e.clearAllExpandStates),U(o,e.rendererId);let t={eventType:5,modelGraph:o,selectedNodeId:e.selectedNodeId,rendererId:e.rendererId,forRestoringUiState:e.forRestoringUiState,rectToZoomFit:e.rectToZoomFit,forRestoringSnapshotAfterTogglingFlattenLayers:e.forRestoringSnapshotAfterTogglingFlattenLayers,targetDeepestGroupNodeIdsToExpand:e.targetDeepestGroupNodeIdsToExpand};postMessage(t);break}case 6:{let o=K(e.modelGraphId,e.rendererId),t=We(o,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.nodeId);U(o,e.rendererId);let r={eventType:7,modelGraph:o,nodeId:e.nodeId,rendererId:e.rendererId,deepestExpandedGroupNodeIds:t,noNodeShake:e.noNodeShake,select:e.select};postMessage(r);break}case 11:{de={};break}default:break}});function He(n,e,o,t,r,s,d,a){let i,c=new F(n,e,r,o,{},s,!1,d,a).process();if(c.nodesById[""]!=null&&(i="Some nodes have empty strings as ids which will cause layout failures. See console for details.",console.warn("Nodes with empty ids",c.nodesById[""])),!i){let p=new y(c,dagre,o,t);try{p.layout()}catch(h){i=`Failed to layout graph: ${h}`}}return x(n,"Laying out root layer",i),new X(c).markIdenticalGroups(),x(n,"Finding identical layers"),c}function Ye(n,e,o,t,r){let s=new S(n,dagre,o,t);if(e!=null){let d,a=n.nodesById[e];if(a&&N(a)){a.expanded=!0;let l=a;for(;;){let g=l.nsChildrenIds||[];if(g.length===1){let p=n.nodesById[g[0]];if(p&&N(p))p.expanded=!0,l=p;else break}else break}let c=[];A(l,n,c),d=c.length===0?[l.id]:c;for(let g of l.descendantsNodeIds||[]){let p=n.nodesById[g];p.width=void 0,p.height=void 0}}if(r){for(let l of a.descendantsNodeIds||[]){let c=n.nodesById[l];N(c)&&(c.expanded=!0)}d=void 0}s.reLayoutGraph(d);let i=[];return A(void 0,n,i),i}else return s.expandAllGroups()}function $e(n,e,o,t,r){let s=new S(n,dagre,o,t);if(e!=null){if(r){let d=n.nodesById[e];for(let a of d.descendantsNodeIds||[]){let i=n.nodesById[a];N(i)&&(i.expanded=!1,i.width=void 0,i.height=void 0,delete n.edgesByGroupNodeIds[i.id])}}return s.collapseGroupNode(e)}else return s.collapseAllGroup()}function Fe(n,e,o,t,r){new S(n,dagre,e,o).reLayoutGraph(t,r)}function We(n,e,o,t){return new S(n,dagre,e,o).expandToRevealNode(t)}function U(n,e){de[Pe(n.id,e)]=n}function K(n,e){let o=de[Pe(n,e)];if(o==null)throw new Error(`ModelGraph with id "${n}" not found for rendererId "${e}"`);return o}function Pe(n,e){return`${n}___${e}`} +var Q=4,ie=4,D=9,le=16,ce=200,q=12,pe=1e3;var j=25;var ue=.1;var M="Node data provider: ",R=10;var k="__value",z="__tensor_tag",P=20;var H=14;var be=new OffscreenCanvas(300,300),he={},Tt=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function T(n){return n?.nodeType===0}function N(n){return n?.nodeType===1}function Z(n){let e=[];for(let[o,t]of Object.entries(n))switch(o){case"Op node id":t.selected&&e.push("id");break;default:break}return e}function J(n){let e=[];for(let[o,t]of Object.entries(n))switch(o){case"Layer node children count":t.selected&&e.push("#children");break;case"Layer node descendants count":t.selected&&e.push("#descendants");break;default:break}return e}function ee(n,e){if(T(n))switch(e.toLowerCase()){case"id":return n.id;case"namespace":return ge(n);default:break}else if(N(n))switch(e.toLowerCase()){case"namespace":return ge(n);case"#children":return String((n.nsChildrenIds||[]).length);case"#descendants":return String((n.descendantsNodeIds||[]).length);default:break}return""}function ge(n){return n.savedNamespace||n.namespace||""}function A(n,e,o,t=!1){let r=[];n==null?r=e.rootNodes.map(s=>s.id):r=n.nsChildrenIds||[];for(let s of r){let d=e.nodesById[s];if(d&&N(d)&&(t||!t&&d.expanded)){let a=d.nsChildrenIds||[];(t?a.filter(l=>N(e.nodesById[l])).length===0:a.filter(l=>N(e.nodesById[l])).every(l=>!e.nodesById[l].expanded))&&o.push(d.id),A(d,e,o,t)}}}function fe(n,e,o,t){let r=[];if(n.length===2)r=n;else if(n.length===3&&n[0].x===n[1].x&&n[1].x===n[2].x)r=n;else{let s=!0,d=0;for(let i=0;il?1:-1;if(d!==0&&d!==g){s=!1;break}d=g}let a=t.Vector3;if(s){let l=e().x(p=>p.x).y(p=>p.y).curve(o)(n).split(/M|C/).filter(p=>p!=="").map(p=>p.split(",").map(h=>Number(h))),c=new a(l[0][0],l[0][1],0),g=new t.CurvePath;for(let p=1;pnew a(c.x,c.y,0));r=new t.CatmullRomCurve3(i,!1,"catmullrom",ue).getPoints(j)}}return r}function G(n,e,o,t=!0){let r=`${n}___${e}___${o}`,s=he[r];if(s==null){let d=be.getContext("2d");d.font=`${e}px "Google Sans Text", Arial, Helvetica, sans-serif`,o&&(d.font=`bold ${d.font}`);let i=d.measureText(n).width;t&&(he[r]=i),s=i}return s}function De(n,e,o){let t=o[z];return t?`Input${n}:${t} (${e.label})`:`Input${n} (${e.label})`}function Le(n,e,o){let t=`Output${n}`;if(o.label==="GraphInputs"){let r=e.tensor_name;r!=null&&(t=`${t} (${r})`)}else{let r=e[z];r&&(t=`Output${n}:${r}`)}return t}function Ne(n){let e=((n||{}).shape||"").replace(/ /g,"").replace(/×/g,"x");return e===""&&(e="?"),e}function te(n,e=""){let o=n.attrs||{},t=[],r=new RegExp(e,"i");for(let s of Object.keys(o)){let d=s,a=o[s],i=[`${d}:${a}`,`${d}=${a}`];if(e.trim()===""||i.some(l=>r.test(l))){let l=a;d===k?l=a.replace(/\s/gm,""):l=a.replace(/(\r\n|\n|\r)/gm," "),t.push({key:d,value:l})}}return t}function oe(n,e,o=""){let t=e.groupNodeAttributes?.[n.id.replace("___group___","")]||{},r=[],s=new RegExp(o,"i");for(let d of Object.keys(t)){let a=d,i=t[d],l=[`${a}:${i}`,`${a}=${i}`];if(o.trim()===""||l.some(c=>s.test(c))){let c=i.replace(/(\r\n|\n|\r)/gm," ");r.push({key:a,value:c})}}return r}function me(n,e){let o=n.incomingEdges||[],t=[];for(let r=0;rR){let r=o.length-R;t.push({key:`(${r} more input${r===1?"":"s"} omitted)`,value:"..."})}return t}function Ee(n){let e=[],o=n.outputsMetadata||{},t=Object.values(o);for(let r=0;rR){let r=t.length-R;e.push({key:`(${r} more output${r===1?"":"s"} omitted)`,value:"..."})}return e}function Ie(n,e,o,t){let r=[],s=Object.keys(o).filter(a=>o[a].selected).filter(a=>a.startsWith(M)).map(a=>a.replace(M,"")),d=Object.values(t).filter(a=>s.includes(a.runName));for(let a of d){let i=(a.results||{})?.[e][n.id]?.strValue||"-";r.push({key:a.runName,value:i})}return r}function _e(n,e){let o=n.split("/"),t=e.split("/"),r="";for(let s=Math.min(o.length,t.length);s>0;s--){let d=o.slice(0,s).join("/"),a=t.slice(0,s).join("/");if(d===a){r=a;break}}return r}function re(n,e){if(n===e)return"";let o=n.split("/").filter(r=>r!==""),t=e.split("/").filter(r=>r!=="");return t.length===0?"":t[o.length]}function w(n){return n.split(` +`).map(e=>e.trim()).filter(e=>e!=="")}function Y(n){return(w(n).length-1)*H}var ne=36,ye=16,Te=26,Se=50,Me=24,ve=80,Ce=8,y=class{constructor(e,o,t,r,s=!1){this.modelGraph=e;this.dagre=o;this.showOnNodeItemTypes=t;this.nodeDataProviderRuns=r;this.testMode=s;this.dagreGraph=new this.dagre.graphlib.Graph}dagreGraph;layout(e){let o,t=[];e==null?t=this.modelGraph.rootNodes:(o=this.modelGraph.nodesById[e],t=(o.nsChildrenIds||[]).map(u=>this.modelGraph.nodesById[u])),this.configLayout(this.dagreGraph);let r=ae(o?.id||"",t,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode);for(let u of Object.keys(r.nodes)){let m=r.nodes[u];m.config?.pinToGroupTop||this.dagreGraph.setNode(u,m)}for(let u of Object.keys(r.outgoingEdges))for(let m of r.outgoingEdges[u])this.dagreGraph.setEdge(u,m);this.dagre.layout(this.dagreGraph);let s=Number.MAX_VALUE,d=Number.MAX_VALUE,a=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(let u of t){let m=r.nodes[u.id];if(!m){console.warn(`Node "${u.id}" is not in the dagre layout result`);continue}u.x=(m.x||0)-m.width/2,u.y=(m.y||0)-m.height/2,u.width=m.width,u.height=m.height,u.localOffsetX=0,u.localOffsetY=0,m.config?.pinToGroupTop||(s=Math.min(s,u.x),d=Math.min(d,u.y),a=Math.max(a,u.x+u.width),i=Math.max(i,u.y+u.height))}let l=Number.MAX_VALUE,c=Number.MAX_VALUE,g=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY,h=this.dagreGraph.edges(),E=[];for(let u of h){let m=this.dagreGraph.edge(u).points,_=globalThis.d3,v=globalThis.THREE,V=typeof v>"u"?[]:fe(m,_.line,_.curveMonotoneY,v),f=this.modelGraph.nodesById[u.v],b=this.modelGraph.nodesById[u.w];if(f==null){console.warn(`Edge from node not found: "${u.v}"`);continue}if(b==null){console.warn(`Edge to node not found: "${u.w}"`);continue}let C=`${f.id}|${b.id}`;E.push({id:C,fromNodeId:f.id,toNodeId:b.id,points:m,curvePoints:V});for(let O of m)l=Math.min(l,O.x),c=Math.min(c,O.y),g=Math.max(g,O.x),p=Math.max(p,O.y)}if(this.modelGraph.edgesByGroupNodeIds[e||""]=E,l0){let m=u*q+16;for(let _ of t)_.localOffsetY=m;i+=m}}return{x:s,y:d,width:I-P*2,height:i-d}}configLayout(e){e.setGraph({nodesep:20,ranksep:50,edgesep:20,marginx:P,marginy:ne}),e.setDefaultEdgeLabel(()=>({}))}};function $(n,e,o,t,r=!1){if(r)return Se;let s=n.label,d=w(s),a=0;for(let g of d)a=Math.max(G(g,11,N(n))+Me,a);N(n)&&(a+=28);let i=0,l=0;if(T(n)){let g=Z(o);for(let E of g){let I=G(`${E}:`,D,!0),u=ee(n,E),m=G(u,D,!1);i=Math.max(i,I),l=Math.max(l,m)}if(o["Op node attributes"]?.selected){let E=te(n,o["Op node attributes"]?.filterRegex||""),I=B(E);i=Math.max(i,I.maxAttrLabelWidth),l=Math.max(l,I.maxAttrValueWidth)}if(o["Op node inputs"]?.selected){let E=me(n,e),I=B(E);i=Math.max(i,I.maxAttrLabelWidth),l=Math.max(l,I.maxAttrValueWidth)}if(o["Op node outputs"]?.selected){let E=Ee(n),I=B(E);i=Math.max(i,I.maxAttrLabelWidth),l=Math.max(l,I.maxAttrValueWidth)}let p=Ie(n,e.id,o,t),h=B(p);i=Math.max(i,h.maxAttrLabelWidth),l=Math.max(l,h.maxAttrValueWidth)}else if(N(n)){let g=J(o);for(let p of g){let h=G(`${p}:`,D,!0),E=ee(n,p),I=G(E,D,!1);i=Math.max(i,h),l=Math.max(l,I)}if(o["Layer node attributes"]?.selected){let p=oe(n,e,o["Layer node attributes"]?.filterRegex||""),h=B(p);i=Math.max(i,h.maxAttrLabelWidth),l=Math.max(l,h.maxAttrValueWidth)}}l=Math.min(l,ce);let c=i+l+ie*2+Q;return c!==Q&&(c+=Ce*2),Math.max(ve,Math.max(a,c))}function se(n,e,o,t,r=!1,s=!1){if(r)return Te;if(n.height!=null&&!s)return n.height;let d=Y(n.label),a=0;return T(n)?a=we(o,n,t):N(n)&&(a=Re(n,e,o)),Te+d+a*q+(a>0?le-4:0)}function ae(n,e,o,t,r,s=!1,d=!1){let a={nodes:{},incomingEdges:{},outgoingEdges:{}};for(let l of e){if(T(l)&&l.hideInLayout)continue;let c={id:l.id,width:l.width||(d?10:$(l,o,t,r,s)),height:d?10:se(l,o,t,r,s),config:T(l)?l.config:void 0};a.nodes[l.id]=c}let i=o.layoutGraphEdges[n]||{};for(let[l,c]of Object.entries(i))for(let g of Object.keys(c)){let p=o.nodesById[l],h=o.nodesById[g];p&&T(p)&&p.config?.pinToGroupTop||h&&T(h)&&h.config?.pinToGroupTop||Be(a,l,g)}return a}function we(n,e,o){let t=Z(n),r=n["Op node attributes"]?.selected?te(e,n["Op node attributes"]?.filterRegex||"").length:0,s=n["Op node inputs"]?.selected?Object.keys(e.incomingEdges||[]).length:0;s>R&&(s=R+1);let d=n["Op node outputs"]?.selected?Object.keys(e.outputsMetadata||{}).length:0;d>R&&(d=R+1);let a=Object.keys(n).filter(i=>n[i].selected).filter(i=>i.startsWith(M)&&Object.values(o).some(l=>l.runName===i.replace(M,""))).length;return t.length+r+s+d+a}function Re(n,e,o){let t=J(o),r=o["Layer node attributes"]?.selected?oe(n,e,o["Layer node attributes"]?.filterRegex||"").length:0;return t.length+r}function Be(n,e,o){n.outgoingEdges[e]==null&&(n.outgoingEdges[e]=[]),n.outgoingEdges[e].push(o),n.incomingEdges[o]==null&&(n.incomingEdges[o]=[]),n.incomingEdges[o].push(e)}function B(n){let e=0,o=0;for(let{key:t,value:r}of n){let s=G(t,D,!0);e=Math.max(e,s);let d=G(r,D,!1);o=Math.max(o,d)}return{maxAttrLabelWidth:e,maxAttrValueWidth:o}}var L=class{constructor(e,o,t,r,s=!1){this.modelGraph=e;this.dagre=o;this.showOnNodeItemTypes=t;this.nodeDataProviderRuns=r;this.testMode=s}dagreGraphs=[];expandGroupNode(e){let o=this.modelGraph.nodesById[e];if(o&&N(o)){if(o.expanded)return;o.expanded=!0}let t=e;for(;t!=null;){let s=this.modelGraph.nodesById[t];if(!s)break;s.expanded=!0;let d=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),a=d.layout(t);this.testMode&&this.dagreGraphs.push(d.dagreGraph);let i=a.width+P*2,l=this.getTargetGroupNodeHeight(a,s);s.width=i,s.height=l,t=s.nsParentId}let r=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);r.layout(),this.testMode&&this.dagreGraphs.push(r.dagreGraph);for(let s of this.modelGraph.rootNodes)N(s)&&this.updateNodeOffset(s)}expandFromDeepestGroupNodes(e){let o=new Set,t=[...e];for(;t.length>0;){let d=t.shift();if(o.has(d))continue;o.add(d);let i=this.modelGraph.nodesById[d]?.nsParentId;i&&t.push(i)}let r=Array.from(o).sort((d,a)=>{let i=this.modelGraph.nodesById[d];return this.modelGraph.nodesById[a].level-i.level});for(let d of r){let a=this.modelGraph.nodesById[d];a.expanded=!0;let i=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),l=i.layout(d);this.testMode&&this.dagreGraphs.push(i.dagreGraph);let c=l.width+P*2,g=this.getTargetGroupNodeHeight(l,a);a.width=c,a.height=g}let s=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);s.layout(),this.testMode&&this.dagreGraphs.push(s.dagreGraph);for(let d of this.modelGraph.rootNodes)N(d)&&this.updateNodeOffset(d)}expandToRevealNode(e){let o=this.modelGraph.nodesById[e],t=[],r=o;for(;;){let d=this.modelGraph.nodesById[r.nsParentId||""];if(!d)break;t.unshift(d),r=d}for(let d of t)this.expandGroupNode(d.id);let s=[];return A(void 0,this.modelGraph,s),s}collapseGroupNode(e){let o=this.modelGraph.nodesById[e];if(!o)return[];o.expanded=!1,delete this.modelGraph.edgesByGroupNodeIds[e],o.width=$(o,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns),o.height=se(o,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode,!0);let t=o.nsParentId;for(;t!=null;){let d=this.modelGraph.nodesById[t];if(!d)break;let a=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),i=a.layout(t);this.testMode&&this.dagreGraphs.push(a.dagreGraph);let l=i.width+P*2,c=this.getTargetGroupNodeHeight(i,d);d.width=l,d.height=c,t=d.nsParentId}let r=new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);r.layout(),this.testMode&&this.dagreGraphs.push(r.dagreGraph);for(let d of this.modelGraph.rootNodes)N(d)&&this.updateNodeOffset(d);let s=[];return A(void 0,this.modelGraph,s),s}reLayoutGraph(e,o){let t=e;if(t)o&&this.clearLayoutData(void 0,!0);else{let r=[];this.clearLayoutData(void 0),A(void 0,this.modelGraph,r),t=r}return t.length>0?this.expandFromDeepestGroupNodes(t):new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns).layout(),t}expandAllGroups(){this.clearLayoutData(void 0,!0);let e=this.modelGraph.nodes.filter(o=>N(o)&&(o.nsChildrenIds||[]).filter(t=>N(this.modelGraph.nodesById[t])).length===0).map(o=>o.id);return e.length>0&&this.expandFromDeepestGroupNodes(e),e}collapseAllGroup(){this.clearLayoutData(void 0,!0),new y(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns).layout();for(let o of this.modelGraph.rootNodes)N(o)&&this.updateNodeOffset(o);return[]}updateNodeOffset(e){for(let o of e.nsChildrenIds||[]){let t=this.modelGraph.nodesById[o];if(t.x!=null&&t.y!=null){t.globalX=(e.x||0)+(e.globalX||0)+(t.localOffsetX||0),t.globalY=(e.y||0)+(e.globalY||0)+(t.localOffsetY||0);let r=(w(e.label).length-1)*H;r>0&&(t.globalY+=r),e.pinToTopOpNode&&t.id!==e.pinToTopOpNode.id&&(t.globalY+=this.getPinToTopNodeVerticalSpace(e.pinToTopOpNode)),e.pinToTopOpNode?.id===t.id&&(t.globalX=(e.x||0)+(e.globalX||0)+(e.width||0)/2,t.globalY=(e.y||0)+(e.globalY||0)+(t.localOffsetY||0)+this.getPinToTopNodeVerticalSpace(t)-(t.height||0)/2+10)}N(t)&&this.updateNodeOffset(t)}}clearLayoutData(e,o){let t=[];e==null?t=this.modelGraph.rootNodes.map(r=>r.id):t=e.nsChildrenIds||[],o&&e!=null&&(e.expanded=!1,delete this.modelGraph.edgesByGroupNodeIds[e.id]);for(let r of t){let s=this.modelGraph.nodesById[r];s&&(s.width=void 0,s.height=void 0,N(s)&&s.expanded&&this.clearLayoutData(s,o))}}getPinToTopNodeVerticalSpace(e){return(e.height||0)+20}getTargetGroupNodeHeight(e,o){let t=Y(o.label),r=e.height+ne+ye+t;return o.pinToTopOpNode&&(r+=this.getPinToTopNodeVerticalSpace(o.pinToTopOpNode)),r}};function x(n,e,o){let t={eventType:8,paneId:n,label:e,error:o};postMessage(t)}var ke=/dense<([^>]*)>/,F=class{constructor(e,o,t,r={},s={},d=pe,a=!1,i=!1,l=!1){this.paneId=e;this.graph=o;this.config=t;this.showOnNodeItemTypes=r;this.nodeDataProviderRuns=s;this.groupNodeChildrenCountThreshold=d;this.testMode=a;this.flattenLayers=i;this.keepLayersWithASingleChild=l;this.nodeLabelsToHide=new Set((this.config?.nodeLabelsToHide||[]).map(c=>c.toLowerCase()))}nodeLabelsToHide;process(){let e=this.createEmptyModelGraph();return this.processNodes(e),this.processEdgeRelationships(e),x(this.paneId,"Processing nodes and edges"),this.processNamespaceRelationships(e),x(this.paneId,"Processing layer namespaces"),this.generateLayoutGraphConnections(e),x(this.paneId,"Processing layout data"),this.splitLargeGroupNodes(e),x(this.paneId,"Splitting large layers (if any)"),this.populateDescendantsAndCounts(e),e}processNodes(e){let o=new Set;for(let t of this.graph.nodes){let s=t.namespace.split(";").filter(a=>a!=="");s.length>1&&(t.namespace=s[s.length-1]);let d={nodeType:0,id:t.id,namespace:this.flattenLayers?"":t.namespace,savedNamespace:t.namespace,label:t.label,level:this.getNonEmptyNamespaceComponents(t.namespace).length};if(t.subgraphIds&&t.subgraphIds.length>0&&(d.subgraphIds=t.subgraphIds),this.nodeLabelsToHide.has(t.label.toLowerCase())&&(d.hideInLayout=!0),t.attrs){let a={};for(let i of t.attrs)a[i.key]=this.processAttrValue(i.key,i.value);d.attrs=a}if(t.inputsMetadata&&(d.inputsMetadata=this.processMetadataList(t.inputsMetadata)),t.outputsMetadata&&(d.outputsMetadata=this.processMetadataList(t.outputsMetadata)),t.style&&(d.style=t.style),t.config&&(d.config=t.config),e.nodes.push(d),e.nodesById[d.id]=d,!d.hideInLayout&&!this.flattenLayers){let a=this.getAncestorNamespaces(d.namespace);for(let i of a){if(o.has(i))continue;o.add(i);let l=i.split("/"),c=l.splice(-1)[0],g=l.join("/"),p={nodeType:1,id:this.getGroupNodeIdFromNamespace(i),namespace:g,label:c,level:l.length,expanded:!1};e.nodes.push(p),e.nodesById[p.id]=p}}}}processEdgeRelationships(e){for(let o of this.graph.nodes){let t=e.nodesById[o.id];if(t)for(let r of o.incomingEdges||[]){let s=r.sourceNodeId,d=e.nodesById[s];d&&(t.incomingEdges==null&&(t.incomingEdges=[]),t.incomingEdges.find(a=>a.sourceNodeId===s&&a.sourceNodeOutputId===r.sourceNodeOutputId&&a.targetNodeInputId===r.targetNodeInputId)==null&&t.incomingEdges.push({...r}),d.outgoingEdges==null&&(d.outgoingEdges=[]),d.outgoingEdges.find(a=>a.targetNodeId===t.id&&a.sourceNodeOutputId===r.sourceNodeOutputId&&a.targetNodeInputId===r.targetNodeInputId)==null&&d.outgoingEdges.push({targetNodeId:t.id,sourceNodeOutputId:r.sourceNodeOutputId,targetNodeInputId:r.targetNodeInputId}))}}}processNamespaceRelationships(e){for(let o of e.nodes){if(T(o)&&o.hideInLayout)continue;let t=o.namespace;if(t===""){e.rootNodes.push(o);continue}let r=this.getGroupNodeIdFromNamespace(t),s=e.nodesById[r];s?o.nsParentId=s.id:console.warn(`Failed to find the NS parent of node "${o.id}": "${r}"`),s&&(s.nsChildrenIds==null&&(s.nsChildrenIds=[]),s.nsChildrenIds.includes(o.id)||(s.nsChildrenIds.push(o.id),T(o)&&o.config?.pinToGroupTop&&(s.pinToTopOpNode=o)))}if(!this.keepLayersWithASingleChild)for(;;){let o=0;for(let t of e.nodes)if(N(t)&&t.nsChildrenIds!=null&&t.nsChildrenIds.length===1){let r=e.nodesById[t.nsChildrenIds[0]];if(T(r)){o++;let s=e.nodes.indexOf(t);s>=0&&e.nodes.splice(s,1),delete e.nodesById[t.id];let d=r.namespace,a=this.getNonEmptyNamespaceComponents(d);a.pop(),r.namespace=a.join("/"),r.savedNamespace=r.namespace,r.level=a.length,r.nsParentId=t.nsParentId;let i=e.rootNodes.indexOf(t);if(i>=0&&(e.rootNodes.splice(i,1),e.rootNodes.push(r)),t.nsParentId){let l=e.nodesById[t.nsParentId],c=l.nsChildrenIds.indexOf(t.id);l.nsChildrenIds.splice(c,1),l.nsChildrenIds.push(r.id)}}}if(o===0)break}}generateLayoutGraphConnections(e){e.layoutGraphEdges={};let o=[];for(let s of e.nodes){if(!T(s)||s.hideInLayout)continue;(s.incomingEdges||[]).filter(a=>!e.nodesById[a.sourceNodeId].hideInLayout).length===0&&o.push(s)}let t=[...o],r=new Set;for(;t.length>0;){let s=t.shift();if(s==null||s.hideInLayout||r.has(s.id))continue;r.add(s.id);let d=s.outgoingEdges||[];for(let a of d){let i=e.nodesById[a.targetNodeId];if(i.hideInLayout)continue;let l=_e(s.namespace,i.namespace),c=re(l,s.namespace),g=c===""?s.id:`${l}${l===""?"":"/"}${c}___group___`,p=re(l,i.namespace),h=p===""?i.id:`${l}${l===""?"":"/"}${p}___group___`,E=l===""?"":`${l}___group___`;e.layoutGraphEdges[E]==null&&(e.layoutGraphEdges[E]={}),e.layoutGraphEdges[E][g]==null&&(e.layoutGraphEdges[E][g]={}),e.layoutGraphEdges[E][g][h]=!0}for(let a of d){let i=e.nodesById[a.targetNodeId];t.push(i)}}}splitLargeGroupNodes(e){let o=[void 0],t=!1;for(;o.length>0;){let r=o.shift(),s=r==null?e.rootNodes:(r.nsChildrenIds||[]).map(d=>e.nodesById[d]);if(s.length>this.groupNodeChildrenCountThreshold){t=!0;let d=ae(r?.id||"",s,e,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode,!0),a=[];for(let h of Object.keys(d.nodes))d.incomingEdges[h]==null&&a.push(e.nodesById[h]);let i=[],l=[],c=new Set,g=h=>{if(c.has(h))return;c.add(h);let E=e.nodesById[h];l.push(E),l.length===this.groupNodeChildrenCountThreshold&&(i.push(l),l=[]);for(let I of d.outgoingEdges[E.id]||[])g(I)};for(let h of a)g(h.id);l.length0&&i.push(l);let p=[];for(let h=0;hf!=="").length,nsParentId:r?.id,nsChildrenIds:E.map(f=>f.id),expanded:!1,sectionContainer:!0};p.push(_),e.nodes.push(_),e.nodesById[_.id]=_,e.artificialGroupNodeIds==null&&(e.artificialGroupNodeIds=[]),e.artificialGroupNodeIds.push(_.id);for(let f of E)f.nsParentId=_.id;let v=m.replace("___group___",""),V=f=>{if(f.namespace===""?f.namespace=v:r==null?f.namespace=`${v}/${f.namespace}`:f.namespace=(f.nsParentId||"").replace("___group___",""),f.level=f.namespace.split("/").filter(C=>C!=="").length,N(f)){let C=f.id;if(delete e.nodesById[f.id],f.id=`${f.namespace}/${f.label}___group___`,e.nodesById[f.id]=f,f.nsParentId){let O=e.nodesById[f.nsParentId],S=(O.nsChildrenIds||[]).indexOf(C);S>=0&&((O.nsChildrenIds||[])[S]=f.id)}for(let O of f.nsChildrenIds||[]){let S=e.nodesById[O];S!=null&&(S.nsParentId=f.id,V(S))}}};for(let f of E)V(f);if(r==null){for(let f of E){let b=e.rootNodes.indexOf(f);b>=0&&e.rootNodes.splice(b,1)}_.namespace===""&&e.rootNodes.push(_)}s=p}r!=null&&(r.nsChildrenIds=p.map(h=>h.id))}for(let d of s)N(d)&&o.push(d)}t&&this.generateLayoutGraphConnections(e)}populateDescendantsAndCounts(e){let o=Number.MAX_VALUE,t=Number.NEGATIVE_INFINITY;for(let r of e.nodes)if(N(r)){let s=[];this.gatherDescendants(e,r,s),r.descendantsNodeIds=s.map(a=>a.id),r.descendantsOpNodeIds=s.filter(a=>a.nodeType===0).map(a=>a.id);let d=(r.descendantsOpNodeIds||[]).length;o=Math.min(d,o),t=Math.max(d,t)}e.minDescendantOpNodeCount=o,e.maxDescendantOpNodeCount=t}createEmptyModelGraph(){let e={id:this.graph.id,collectionLabel:this.graph.collectionLabel||"",nodes:[],nodesById:{},rootNodes:[],edgesByGroupNodeIds:{},layoutGraphEdges:{},minDescendantOpNodeCount:-1,maxDescendantOpNodeCount:-1};return this.graph.groupNodeAttributes&&(e.groupNodeAttributes=this.graph.groupNodeAttributes),e}getAncestorNamespaces(e){let o=this.getNonEmptyNamespaceComponents(e),t=[];for(;o.length>0;)t.push(o.join("/")),o.pop();return t}getNonEmptyNamespaceComponents(e){return e.split("/").filter(o=>o!=="")}getGroupNodeIdFromNamespace(e){return`${e}___group___`}gatherDescendants(e,o,t){for(let r of o.nsChildrenIds||[]){let s=e.nodesById[r];(N(s)||T(s)&&!s.hideInLayout)&&t.push(s),N(s)&&this.gatherDescendants(e,s,t)}}processAttrValue(e,o){if(o.startsWith("dense<")){let t=o.match(ke);if(t!=null&&t.length>1){let r=t[1];return Oe(r)}}else if(e===k)return Oe(o);return o.replaceAll('"',"")||""}processMetadataList(e){let o={};for(let t of e){let r={};for(let s of t.attrs){let d=s.key,a=s.value;d==="tensor_shape"&&(d="shape",a=a.replace("tensor<","").replace(">","").replace("*","\u2217").split("x").join(" x ")),r[d]=a}o[t.id]=r}return o}};function Oe(n){try{return JSON.stringify(JSON.parse(n),null,2).replaceAll("\\n",` +`).trim()}catch{return n}}var W=10000019,X=class{constructor(e){this.modelGraph=e}markIdenticalGroups(){let e={};for(let t of this.modelGraph.nodes){if(!N(t))continue;let r=0,s=(t.descendantsOpNodeIds||[]).map(a=>this.modelGraph.nodesById[a]).filter(a=>!a.hideInLayout),d=new Set(s.map(a=>a.id));for(let a of s)r=(r+this.getNodeHash(a,d))%W;for(let a of s)for(let i of a.outgoingEdges||[]){let l=i.targetNodeId;if(!d.has(l))continue;let c=this.modelGraph.nodesById[l];r=(r+this.getEdgeHash(a,c))%W}e[r]||(e[r]=[]),e[r].push(t)}let o=0;for(let t of Object.values(e))if(!(t.length<=1)&&!(t.length===2&&(t[0].nsParentId===t[1].id||t[1].nsParentId===t[0].id))){for(let r of t)r.identicalGroupIndex=o;o++}}getNodeHash(e,o){let t=0;t=this.addToHash(t,e.label);let r=0;for(let d of e.incomingEdges||[]){let a=d.sourceNodeId;if(o.has(a)){let i=this.modelGraph.nodesById[a];t=this.addToHash(t,`in ${i.label}`),r++}}let s=0;for(let d of e.outgoingEdges||[]){let a=d.targetNodeInputId;if(o.has(a)){let i=this.modelGraph.nodesById[a];t=this.addToHash(t,`out ${i.label}`),s++}}return t=this.addToHash(t,`${r}`),t=this.addToHash(t,`${s}`),t}getEdgeHash(e,o){return this.genHash(e.label+o.label)%W}genHash(e){let o=5381;e=e||"";for(let t=0,r=e.length;t{let e=n.data;switch(e.eventType){case 0:{let o=He(e.paneId,e.graph,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.config,e.groupNodeChildrenCountThreshold,e.flattenLayers,e.keepLayersWithASingleChild);U(o,e.paneId);let t={eventType:1,modelGraph:o,paneId:e.paneId};postMessage(t);break}case 9:{let o=K(e.modelGraphId,e.paneId),t=JSON.parse(JSON.stringify(o));U(t,e.rendererId);let r={eventType:10,modelGraph:o,paneId:e.paneId,rendererId:e.rendererId,groupNodeId:e.groupNodeId,initialPosition:e.initialPosition};postMessage(r);break}case 2:{let o=K(e.modelGraphId,e.rendererId),t=[];e.expand?t=Ye(o,e.groupNodeId,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.all===!0):t=$e(o,e.groupNodeId,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.all===!0),U(o,e.rendererId);let r={eventType:3,modelGraph:o,expanded:e.expand,groupNodeId:e.groupNodeId,rendererId:e.rendererId,deepestExpandedGroupNodeIds:t};postMessage(r);break}case 4:{let o=K(e.modelGraphId,e.rendererId);Fe(o,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.targetDeepestGroupNodeIdsToExpand,e.clearAllExpandStates),U(o,e.rendererId);let t={eventType:5,modelGraph:o,selectedNodeId:e.selectedNodeId,rendererId:e.rendererId,forRestoringUiState:e.forRestoringUiState,rectToZoomFit:e.rectToZoomFit,forRestoringSnapshotAfterTogglingFlattenLayers:e.forRestoringSnapshotAfterTogglingFlattenLayers,targetDeepestGroupNodeIdsToExpand:e.targetDeepestGroupNodeIdsToExpand};postMessage(t);break}case 6:{let o=K(e.modelGraphId,e.rendererId),t=We(o,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.nodeId);U(o,e.rendererId);let r={eventType:7,modelGraph:o,nodeId:e.nodeId,rendererId:e.rendererId,deepestExpandedGroupNodeIds:t,noNodeShake:e.noNodeShake,select:e.select};postMessage(r);break}case 11:{de={};break}default:break}});function He(n,e,o,t,r,s,d,a){let i,c=new F(n,e,r,o,{},s,!1,d,a).process();if(c.nodesById[""]!=null&&(i="Some nodes have empty strings as ids which will cause layout failures. See console for details.",console.warn("Nodes with empty ids",c.nodesById[""])),!i){let p=new y(c,dagre,o,t);try{p.layout()}catch(h){i=`Failed to layout graph: ${h}`}}return x(n,"Laying out root layer",i),new X(c).markIdenticalGroups(),x(n,"Finding identical layers"),c}function Ye(n,e,o,t,r){let s=new L(n,dagre,o,t);if(e!=null){let d,a=n.nodesById[e];if(a&&N(a)){a.expanded=!0;let l=a;for(;;){let g=l.nsChildrenIds||[];if(g.length===1){let p=n.nodesById[g[0]];if(p&&N(p))p.expanded=!0,l=p;else break}else break}let c=[];A(l,n,c),d=c.length===0?[l.id]:c;for(let g of l.descendantsNodeIds||[]){let p=n.nodesById[g];p.width=void 0,p.height=void 0}}if(r){for(let l of a.descendantsNodeIds||[]){let c=n.nodesById[l];N(c)&&(c.expanded=!0)}d=void 0}s.reLayoutGraph(d);let i=[];return A(void 0,n,i),i}else return s.expandAllGroups()}function $e(n,e,o,t,r){let s=new L(n,dagre,o,t);if(e!=null){if(r){let d=n.nodesById[e];for(let a of d.descendantsNodeIds||[]){let i=n.nodesById[a];N(i)&&(i.expanded=!1,i.width=void 0,i.height=void 0,delete n.edgesByGroupNodeIds[i.id])}}return s.collapseGroupNode(e)}else return s.collapseAllGroup()}function Fe(n,e,o,t,r){new L(n,dagre,e,o).reLayoutGraph(t,r)}function We(n,e,o,t){return new L(n,dagre,e,o).expandToRevealNode(t)}function U(n,e){de[Pe(n.id,e)]=n}function K(n,e){let o=de[Pe(n,e)];if(o==null)throw new Error(`ModelGraph with id "${n}" not found for rendererId "${e}"`);return o}function Pe(n,e){return`${n}___${e}`}