@pixeasy/customizer 0.0.35-beta.stage → 0.0.36-beta.prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ var Z4=Object.defineProperty,J4=Object.defineProperties;var Q4=Object.getOwnProp
2
2
  ${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
3
3
  `)}`:"",this.name="UnsubscriptionError",this.errors=t});function wh(i,e){if(i){let t=i.indexOf(e);0<=t&&i.splice(t,1)}}var Gi=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(Lt(n))try{n()}catch(o){e=o instanceof pg?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{dA(o)}catch(s){e=e??[],s instanceof pg?e=[...e,...s.errors]:e.push(s)}}if(e)throw new pg(e)}}add(e){var t;if(e&&e!==this)if(this.closed)dA(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)&&wh(t,e)}remove(e){let{_finalizers:t}=this;t&&wh(t,e),e instanceof i&&e._removeParent(this)}};Gi.EMPTY=(()=>{let i=new Gi;return i.closed=!0,i})();var p1=Gi.EMPTY;function mg(i){return i instanceof Gi||i&&"closed"in i&&Lt(i.remove)&&Lt(i.add)&&Lt(i.unsubscribe)}function dA(i){Lt(i)?i():i.unsubscribe()}var To={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var ou={setTimeout(i,e,...t){let{delegate:n}=ou;return n?.setTimeout?n.setTimeout(i,e,...t):setTimeout(i,e,...t)},clearTimeout(i){let{delegate:e}=ou;return(e?.clearTimeout||clearTimeout)(i)},delegate:void 0};function gg(i){ou.setTimeout(()=>{let{onUnhandledError:e}=To;if(e)e(i);else throw i})}function Eh(){}var uA=m1("C",void 0,void 0);function fA(i){return m1("E",void 0,i)}function hA(i){return m1("N",i,void 0)}function m1(i,e,t){return{kind:i,value:e,error:t}}var pc=null;function su(i){if(To.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 pA(i){To.useDeprecatedSynchronousErrorHandling&&pc&&(pc.errorThrown=!0,pc.error=i)}var mc=class extends Gi{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,mg(e)&&e.add(this)):this.destination=d5}static create(e,t,n){return new $a(e,t,n)}next(e){this.isStopped?v1(hA(e),this):this._next(e)}error(e){this.isStopped?v1(fA(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?v1(uA,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()}}},l5=Function.prototype.bind;function g1(i,e){return l5.call(i,e)}var b1=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){vg(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){vg(n)}else vg(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){vg(t)}}},$a=class extends mc{constructor(e,t,n){super();let r;if(Lt(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let o;this&&To.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&g1(e.next,o),error:e.error&&g1(e.error,o),complete:e.complete&&g1(e.complete,o)}):r=e}this.destination=new b1(r)}};function vg(i){To.useDeprecatedSynchronousErrorHandling?pA(i):gg(i)}function c5(i){throw i}function v1(i,e){let{onStoppedNotification:t}=To;t&&ou.setTimeout(()=>t(i,e))}var d5={closed:!0,next:Eh,error:c5,complete:Eh};var au=typeof Symbol=="function"&&Symbol.observable||"@@observable";function bg(i){return i}function mA(i){return i.length===0?bg:i.length===1?i[0]:function(t){return i.reduce((n,r)=>r(n),t)}}var xn=(()=>{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=f5(t)?t:new $a(t,n,r);return su(()=>{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=gA(n),new n((r,o)=>{let s=new $a({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)}[au](){return this}pipe(...t){return mA(t)(this)}toPromise(t){return t=gA(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 gA(i){var e;return(e=i??To.Promise)!==null&&e!==void 0?e:Promise}function u5(i){return i&&Lt(i.next)&&Lt(i.error)&&Lt(i.complete)}function f5(i){return i&&i instanceof mc||u5(i)&&mg(i)}function h5(i){return Lt(i?.lift)}function Zn(i){return e=>{if(h5(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 Jn(i,e,t,n,r){return new y1(i,e,t,n,r)}var y1=class extends mc{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))}}};var vA=ru(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Do=(()=>{class i extends xn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new yg(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new vA}next(t){su(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){su(()=>{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(){su(()=>{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?p1:(this.currentObservers=null,o.push(t),new Gi(()=>{this.currentObservers=null,wh(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new xn;return t.source=this,t}}return i.create=(e,t)=>new yg(e,t),i})(),yg=class extends Do{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:p1}};var Mh=class extends Do{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)}};function bA(i){return i&&Lt(i.schedule)}function yA(i){return i[i.length-1]}function xA(i){return Lt(yA(i))?i.pop():void 0}function _A(i){return bA(yA(i))?i.pop():void 0}function CA(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 SA(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 gc(i){return this instanceof gc?(this.v=i,this):new gc(i)}function wA(i,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(i,e||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(h){return function(p){return Promise.resolve(p).then(h,u)}}function a(h,p){n[h]&&(r[h]=function(v){return new Promise(function(g,m){o.push([h,v,g,m])>1||l(h,v)})},p&&(r[h]=p(r[h])))}function l(h,p){try{c(n[h](p))}catch(v){f(o[0][3],v)}}function c(h){h.value instanceof gc?Promise.resolve(h.value.v).then(d,u):f(o[0][2],h)}function d(h){l("next",h)}function u(h){l("throw",h)}function f(h,p){h(p),o.shift(),o.length&&l(o[0][0],o[0][1])}}function EA(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 SA=="function"?SA(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 xg=i=>i&&typeof i.length=="number"&&typeof i!="function";function _g(i){return Lt(i?.then)}function Sg(i){return Lt(i[au])}function Cg(i){return Symbol.asyncIterator&&Lt(i?.[Symbol.asyncIterator])}function wg(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 p5(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Eg=p5();function Mg(i){return Lt(i?.[Eg])}function Tg(i){return wA(this,arguments,function*(){let t=i.getReader();try{for(;;){let{value:n,done:r}=yield gc(t.read());if(r)return yield gc(void 0);yield yield gc(n)}}finally{t.releaseLock()}})}function Dg(i){return Lt(i?.getReader)}function ci(i){if(i instanceof xn)return i;if(i!=null){if(Sg(i))return m5(i);if(xg(i))return g5(i);if(_g(i))return v5(i);if(Cg(i))return MA(i);if(Mg(i))return b5(i);if(Dg(i))return y5(i)}throw wg(i)}function m5(i){return new xn(e=>{let t=i[au]();if(Lt(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function g5(i){return new xn(e=>{for(let t=0;t<i.length&&!e.closed;t++)e.next(i[t]);e.complete()})}function v5(i){return new xn(e=>{i.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,gg)})}function b5(i){return new xn(e=>{for(let t of i)if(e.next(t),e.closed)return;e.complete()})}function MA(i){return new xn(e=>{x5(i,e).catch(t=>e.error(t))})}function y5(i){return MA(Tg(i))}function x5(i,e){var t,n,r,o;return CA(this,void 0,void 0,function*(){try{for(t=EA(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 to(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 Ag(i,e=0){return Zn((t,n)=>{t.subscribe(Jn(n,r=>to(n,i,()=>n.next(r),e),()=>to(n,i,()=>n.complete(),e),r=>to(n,i,()=>n.error(r),e)))})}function Ig(i,e=0){return Zn((t,n)=>{n.add(i.schedule(()=>t.subscribe(n),e))})}function TA(i,e){return ci(i).pipe(Ig(e),Ag(e))}function DA(i,e){return ci(i).pipe(Ig(e),Ag(e))}function AA(i,e){return new xn(t=>{let n=0;return e.schedule(function(){n===i.length?t.complete():(t.next(i[n++]),t.closed||this.schedule())})})}function IA(i,e){return new xn(t=>{let n;return to(t,e,()=>{n=i[Eg](),to(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)}),()=>Lt(n?.return)&&n.return()})}function Pg(i,e){if(!i)throw new Error("Iterable cannot be null");return new xn(t=>{to(t,e,()=>{let n=i[Symbol.asyncIterator]();to(t,e,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function PA(i,e){return Pg(Tg(i),e)}function OA(i,e){if(i!=null){if(Sg(i))return TA(i,e);if(xg(i))return AA(i,e);if(_g(i))return DA(i,e);if(Cg(i))return Pg(i,e);if(Mg(i))return IA(i,e);if(Dg(i))return PA(i,e)}throw wg(i)}function Th(i,e){return e?OA(i,e):ci(i)}function hs(...i){let e=_A(i);return Th(i,e)}function Ya(i,e){let t=Lt(i)?i:()=>i,n=r=>r.error(t());return new xn(e?r=>e.schedule(n,0,r):n)}var RA=ru(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"});function vc(i,e){let t=typeof e=="object";return new Promise((n,r)=>{let o=new $a({next:s=>{n(s),o.unsubscribe()},error:r,complete:()=>{t?n(e.defaultValue):r(new RA)}});i.subscribe(o)})}function lr(i,e){return Zn((t,n)=>{let r=0;t.subscribe(Jn(n,o=>{n.next(i.call(e,o,r++))}))})}var{isArray:_5}=Array;function S5(i,e){return _5(e)?i(...e):i(e)}function kA(i){return lr(e=>S5(i,e))}var{isArray:C5}=Array,{getPrototypeOf:w5,prototype:E5,keys:M5}=Object;function FA(i){if(i.length===1){let e=i[0];if(C5(e))return{args:e,keys:null};if(T5(e)){let t=M5(e);return{args:t.map(n=>e[n]),keys:t}}}return{args:i,keys:null}}function T5(i){return i&&typeof i=="object"&&w5(i)===E5}function NA(i,e){return i.reduce((t,n,r)=>(t[n]=e[r],t),{})}function LA(i,e,t,n,r,o,s,a){let l=[],c=0,d=0,u=!1,f=()=>{u&&!l.length&&!c&&e.complete()},h=v=>c<n?p(v):l.push(v),p=v=>{o&&e.next(v),c++;let g=!1;ci(t(v,d++)).subscribe(Jn(e,m=>{r?.(m),o?h(m):e.next(m)},()=>{g=!0},void 0,()=>{if(g)try{for(c--;l.length&&c<n;){let m=l.shift();s?to(e,s,()=>p(m)):p(m)}f()}catch(m){e.error(m)}}))};return i.subscribe(Jn(e,h,()=>{u=!0,f()})),()=>{a?.()}}function Og(i,e,t=1/0){return Lt(e)?Og((n,r)=>lr((o,s)=>e(n,o,r,s))(ci(i(n,r))),t):(typeof e=="number"&&(t=e),Zn((n,r)=>LA(n,r,i,t)))}function x1(...i){let e=xA(i),{args:t,keys:n}=FA(i),r=new xn(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let d=0;d<s;d++){let u=!1;ci(t[d]).subscribe(Jn(o,f=>{u||(u=!0,c--),a[d]=f},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(n?NA(n,a):a),o.complete())}))}});return e?r.pipe(kA(e)):r}function _1(i,e){return Zn((t,n)=>{let r=0;t.subscribe(Jn(n,o=>i.call(e,o,r++)&&n.next(o)))})}function bc(i){return Zn((e,t)=>{let n=null,r=!1,o;n=e.subscribe(Jn(t,void 0,void 0,s=>{o=ci(i(s,bc(i)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(t))})}function S1(i,e){return Lt(e)?Og(i,e,1):Og(i,1)}function Dh(i){return Zn((e,t)=>{try{e.subscribe(t)}finally{t.add(i)}})}function C1(i,e){return Zn((t,n)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&n.complete();t.subscribe(Jn(n,l=>{r?.unsubscribe();let c=0,d=o++;ci(i(l,d)).subscribe(r=Jn(n,u=>n.next(e?e(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function w1(i){return Zn((e,t)=>{ci(i).subscribe(Jn(t,()=>t.complete(),Eh)),!t.closed&&e.subscribe(t)})}function E1(i,e,t){let n=Lt(i)||e||t?{next:i,error:e,complete:t}:i;return n?Zn((r,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;r.subscribe(Jn(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)}))}):bg}var M1;function Rg(){return M1}function ps(i){let e=M1;return M1=i,e}var UA=Symbol("NotFound");function lu(i){return i===UA||i?.name==="\u0275NotFound"}function BA(i){let e=ct(null);try{return i()}finally{ct(e)}}var zg="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",qe=class extends Error{code;constructor(e,t){super(oa(e,t)),this.code=e}};function D5(i){return`NG0${Math.abs(i)}`}function oa(i,e){return`${D5(i)}${e?": "+e:""}`}var io=globalThis;function gn(i){for(let e in i)if(i[e]===gn)return e;throw Error("")}function jA(i,e){for(let t in e)e.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&(i[t]=e[t])}function Vg(i){if(typeof i=="string")return i;if(Array.isArray(i))return`[${i.map(Vg).join(", ")}]`;if(i==null)return""+i;let e=i.overriddenName||i.name;if(e)return`${e}`;let t=i.toString();if(t==null)return""+t;let n=t.indexOf(`
4
4
  `);return n>=0?t.slice(0,n):t}function Hg(i,e){return i?e?`${i} ${e}`:i:e||""}var A5=gn({__forward_ref__:gn});function Wi(i){return i.__forward_ref__=Wi,i}function Si(i){return B1(i)?i():i}function B1(i){return typeof i=="function"&&i.hasOwnProperty(A5)&&i.__forward_ref__===Wi}function _e(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function gs(i){return{providers:i.providers||[],imports:i.imports||[]}}function Gg(i){return I5(i,jg)}function I5(i,e){return i.hasOwnProperty(e)&&i[e]||null}function P5(i){let e=i?.[jg]??null;return e||null}function D1(i){return i&&i.hasOwnProperty(Fg)?i[Fg]:null}var jg=gn({\u0275prov:gn}),Fg=gn({\u0275inj:gn}),Ze=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=_e({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function z1(i){return i&&!!i.\u0275providers}var V1=gn({\u0275cmp:gn}),H1=gn({\u0275dir:gn}),G1=gn({\u0275pipe:gn});var Ih=gn({\u0275fac:gn}),Cc=gn({__NG_ELEMENT_ID__:gn}),zA=gn({__NG_ENV_ID__:gn});function sa(i){return W1(i,"@Component"),i[V1]||null}function Wg(i){return W1(i,"@Directive"),i[H1]||null}function j1(i){return W1(i,"@Pipe"),i[G1]||null}function W1(i,e){if(i==null)throw new qe(-919,!1)}function Ao(i){return typeof i=="string"?i:i==null?"":String(i)}var WA=gn({ngErrorCode:gn}),O5=gn({ngErrorMessage:gn}),R5=gn({ngTokenPath:gn});function $1(i,e){return $A("",-200,e)}function $g(i,e){throw new qe(-201,!1)}function $A(i,e,t){let n=new qe(e,i);return n[WA]=e,n[O5]=i,t&&(n[R5]=t),n}function k5(i){return i[WA]}var A1;function YA(){return A1}function ji(i){let e=A1;return A1=i,e}function Y1(i,e,t){let n=Gg(i);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(t&8)return null;if(e!==void 0)return e;$g(i,"")}var F5={},yc=F5,N5="__NG_DI_FLAG__",I1=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=xc(t)||0;try{return this.injector.get(e,n&8?null:yc,n)}catch(r){if(lu(r))return r;throw r}}};function L5(i,e=0){let t=Rg();if(t===void 0)throw new qe(-203,!1);if(t===null)return Y1(i,void 0,e);{let n=U5(e),r=t.retrieve(i,n);if(lu(r)){if(n.optional)return null;throw r}return r}}function Ke(i,e=0){return(YA()||L5)(Si(i),e)}function Z(i,e){return Ke(i,xc(e))}function xc(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function U5(i){return{optional:!!(i&8),host:!!(i&1),self:!!(i&2),skipSelf:!!(i&4)}}function P1(i){let e=[];for(let t=0;t<i.length;t++){let n=Si(i[t]);if(Array.isArray(n)){if(n.length===0)throw new qe(900,!1);let r,o=0;for(let s=0;s<n.length;s++){let a=n[s],l=B5(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(Ke(r,o))}else e.push(Ke(n))}return e}function B5(i){return i[N5]}function Xa(i,e){let t=i.hasOwnProperty(Ih);return t?i[Ih]:null}function XA(i,e,t){if(i.length!==e.length)return!1;for(let n=0;n<i.length;n++){let r=i[n],o=e[n];if(t&&(r=t(r),o=t(o)),o!==r)return!1}return!0}function qA(i){return i.flat(Number.POSITIVE_INFINITY)}function Yg(i,e){i.forEach(t=>Array.isArray(t)?Yg(t,e):e(t))}function X1(i,e,t){e>=i.length?i.push(t):i.splice(e,0,t)}function Fh(i,e){return e>=i.length-1?i.pop():i.splice(e,1)[0]}function KA(i,e){let t=[];for(let n=0;n<i;n++)t.push(e);return t}function ZA(i,e,t,n){let r=i.length;if(r==e)i.push(t,n);else if(r===1)i.push(n,i[0]),i[0]=t;else{for(r--,i.push(i[r-1],i[r]);r>e;){let o=r-2;i[r]=i[o],r--}i[e]=t,i[e+1]=n}}function Xg(i,e,t){let n=du(i,e);return n>=0?i[n|1]=t:(n=~n,ZA(i,n,e,t)),n}function qg(i,e){let t=du(i,e);if(t>=0)return i[t|1]}function du(i,e){return z5(i,e,1)}function z5(i,e,t){let n=0,r=i.length>>t;for(;r!==n;){let o=n+(r-n>>1),s=i[o<<t];if(e===s)return o<<t;s>e?r=o:n=o+1}return~(r<<t)}var Za={},Ii=[],aa=new Ze(""),q1=new Ze("",-1),K1=new Ze(""),Ph=class{get(e,t=yc){if(t===yc){let r=$A("",-201);throw r.name="\u0275NotFound",r}return t}};function la(i){return{\u0275providers:i}}function JA(i){return la([{provide:aa,multi:!0,useValue:i}])}function QA(...i){return{\u0275providers:Kg(!0,i),\u0275fromNgModule:!0}}function Kg(i,...e){let t=[],n=new Set,r,o=s=>{t.push(s)};return Yg(e,s=>{let a=s;Ng(a,o,[],n)&&(r||=[],r.push(a))}),r!==void 0&&e2(r,o),t}function e2(i,e){for(let t=0;t<i.length;t++){let{ngModule:n,providers:r}=i[t];Z1(r,o=>{e(o,n)})}}function Ng(i,e,t,n){if(i=Si(i),!i)return!1;let r=null,o=D1(i),s=!o&&sa(i);if(!o&&!s){let l=i.ngModule;if(o=D1(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)Ng(c,e,t,n)}}else if(o){if(o.imports!=null&&!a){n.add(r);let c;Yg(o.imports,d=>{Ng(d,e,t,n)&&(c||=[],c.push(d))}),c!==void 0&&e2(c,e)}if(!a){let c=Xa(r)||(()=>new r);e({provide:r,useFactory:c,deps:Ii},r),e({provide:K1,useValue:r,multi:!0},r),e({provide:aa,useValue:()=>Ke(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=i;Z1(l,d=>{e(d,c)})}}else return!1;return r!==i&&i.providers!==void 0}function Z1(i,e){for(let t of i)z1(t)&&(t=t.\u0275providers),Array.isArray(t)?Z1(t,e):e(t)}var V5=gn({provide:String,useValue:gn});function t2(i){return i!==null&&typeof i=="object"&&V5 in i}function H5(i){return!!(i&&i.useExisting)}function G5(i){return!!(i&&i.useFactory)}function _c(i){return typeof i=="function"}function n2(i){return!!i.useClass}var Nh=new Ze(""),kg={},VA={},T1;function uu(){return T1===void 0&&(T1=new Ph),T1}var Pi=class{},Sc=class extends Pi{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,R1(e,s=>this.processProvider(s)),this.records.set(q1,cu(void 0,this)),r.has("environment")&&this.records.set(Pi,cu(void 0,this));let o=this.records.get(Nh);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(K1,Ii,{self:!0}))}retrieve(e,t){let n=xc(t)||0;try{return this.get(e,yc,n)}catch(r){if(lu(r))return r;throw r}}destroy(){Ah(this),this._destroyed=!0;let e=ct(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(),ct(e)}}onDestroy(e){return Ah(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){Ah(this);let t=ps(this),n=ji(void 0),r;try{return e()}finally{ps(t),ji(n)}}get(e,t=yc,n){if(Ah(this),e.hasOwnProperty(zA))return e[zA](this);let r=xc(n),o,s=ps(this),a=ji(void 0);try{if(!(r&4)){let c=this.records.get(e);if(c===void 0){let d=X5(e)&&Gg(e);d&&this.injectableDefInScope(d)?c=cu(O1(e),kg):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?uu():this.parent;return t=r&8&&t===yc?null:t,l.get(e,t)}catch(l){let c=k5(l);throw c===-200||c===-201?new qe(c,null):l}finally{ji(a),ps(s)}}resolveInjectorInitializers(){let e=ct(null),t=ps(this),n=ji(void 0),r;try{let o=this.get(aa,Ii,{self:!0});for(let s of o)s()}finally{ps(t),ji(n),ct(e)}}toString(){return"R3Injector[...]"}processProvider(e){e=Si(e);let t=_c(e)?e:Si(e&&e.provide),n=W5(e);if(!_c(e)&&e.multi===!0){let r=this.records.get(t);r||(r=cu(void 0,kg,!0),r.factory=()=>P1(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=ct(null);try{if(t.value===VA)throw $1("");return t.value===kg&&(t.value=VA,t.value=t.factory(void 0,n)),typeof t.value=="object"&&t.value&&Y5(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{ct(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Si(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 O1(i){let e=Gg(i),t=e!==null?e.factory:Xa(i);if(t!==null)return t;if(i instanceof Ze)throw new qe(-204,!1);if(i instanceof Function)return j5(i);throw new qe(-204,!1)}function j5(i){if(i.length>0)throw new qe(-204,!1);let t=P5(i);return t!==null?()=>t.factory(i):()=>new i}function W5(i){if(t2(i))return cu(void 0,i.useValue);{let e=J1(i);return cu(e,kg)}}function J1(i,e,t){let n;if(_c(i)){let r=Si(i);return Xa(r)||O1(r)}else if(t2(i))n=()=>Si(i.useValue);else if(G5(i))n=()=>i.useFactory(...P1(i.deps||[]));else if(H5(i))n=(r,o)=>Ke(Si(i.useExisting),o!==void 0&&o&8?8:void 0);else{let r=Si(i&&(i.useClass||i.provide));if($5(i))n=()=>new r(...P1(i.deps));else return Xa(r)||O1(r)}return n}function Ah(i){if(i.destroyed)throw new qe(-205,!1)}function cu(i,e,t=!1){return{factory:i,value:e,multi:t?[]:void 0}}function $5(i){return!!i.deps}function Y5(i){return i!==null&&typeof i=="object"&&typeof i.ngOnDestroy=="function"}function X5(i){return typeof i=="function"||typeof i=="object"&&i.ngMetadataName==="InjectionToken"}function R1(i,e){for(let t of i)Array.isArray(t)?R1(t,e):t&&z1(t)?R1(t.\u0275providers,e):e(t)}function fu(i,e){let t;i instanceof Sc?(Ah(i),t=i):t=new I1(i);let n,r=ps(t),o=ji(void 0);try{return e()}finally{ps(r),ji(o)}}function i2(){return YA()!==void 0||Rg()!=null}var $i=0,nt=1,Tt=2,Gn=3,ro=4,Yi=5,Xi=6,hu=7,Ln=8,Er=9,Io=10,Jt=11,pu=12,Q1=13,wc=14,di=15,Ja=16,Ec=17,vs=18,ca=19,eS=20,ra=21,Zg=22,qa=23,Mr=24,Mc=25,Qa=26,Kt=27,r2=1,Po=6,bs=7,Lh=8,Tc=9,On=10;function oo(i){return Array.isArray(i)&&typeof i[r2]=="object"}function Tr(i){return Array.isArray(i)&&i[r2]===!0}function tS(i){return(i.flags&4)!==0}function ys(i){return i.componentOffset>-1}function mu(i){return(i.flags&1)===1}function xs(i){return!!i.template}function Dc(i){return(i[Tt]&512)!==0}function el(i){return(i[Tt]&256)===256}var nS="svg",o2="math";function Dr(i){for(;Array.isArray(i);)i=i[$i];return i}function iS(i,e){return Dr(e[i])}function so(i,e){return Dr(e[i.index])}function gu(i,e){return i.data[e]}function Jg(i,e){return i[e]}function rS(i,e,t,n){t>=i.data.length&&(i.data[t]=null,i.blueprint[t]=null),e[t]=n}function ao(i,e){let t=e[i];return oo(t)?t:t[$i]}function Qg(i){return(i[Tt]&128)===128}function s2(i){return Tr(i[Gn])}function lo(i,e){return e==null?null:i[e]}function oS(i){i[Ec]=0}function sS(i){i[Tt]&1024||(i[Tt]|=1024,Qg(i)&&Ac(i))}function a2(i,e){for(;i>0;)e=e[wc],i--;return e}function Uh(i){return!!(i[Tt]&9216||i[Mr]?.dirty)}function e0(i){i[Io].changeDetectionScheduler?.notify(8),i[Tt]&64&&(i[Tt]|=1024),Uh(i)&&Ac(i)}function Ac(i){i[Io].changeDetectionScheduler?.notify(0);let e=Ka(i);for(;e!==null&&!(e[Tt]&8192||(e[Tt]|=8192,!Qg(e)));)e=Ka(e)}function aS(i,e){if(el(i))throw new qe(911,!1);i[ra]===null&&(i[ra]=[]),i[ra].push(e)}function l2(i,e){if(i[ra]===null)return;let t=i[ra].indexOf(e);t!==-1&&i[ra].splice(t,1)}function Ka(i){let e=i[Gn];return Tr(e)?e[Gn]:e}function lS(i){return i[hu]??=[]}function cS(i){return i.cleanup??=[]}function c2(i,e,t,n){let r=lS(e);r.push(t),i.firstCreatePass&&cS(i).push(n,r.length-1)}var Rt={lFrame:S2(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var k1=!1;function d2(){return Rt.lFrame.elementDepthCount}function u2(){Rt.lFrame.elementDepthCount++}function dS(){Rt.lFrame.elementDepthCount--}function t0(){return Rt.bindingsEnabled}function n0(){return Rt.skipHydrationRootTNode!==null}function uS(i){return Rt.skipHydrationRootTNode===i}function f2(i){Rt.skipHydrationRootTNode=i}function fS(){Rt.skipHydrationRootTNode=null}function pt(){return Rt.lFrame.lView}function Rn(){return Rt.lFrame.tView}function z(i){return Rt.lFrame.contextLView=i,i[Ln]}function V(i){return Rt.lFrame.contextLView=null,i}function wi(){let i=hS();for(;i!==null&&i.type===64;)i=i.parent;return i}function hS(){return Rt.lFrame.currentTNode}function h2(){let i=Rt.lFrame,e=i.currentTNode;return i.isParent?e:e.parent}function vu(i,e){let t=Rt.lFrame;t.currentTNode=i,t.isParent=e}function pS(){return Rt.lFrame.isParent}function mS(){Rt.lFrame.isParent=!1}function p2(){return Rt.lFrame.contextLView}function gS(){return k1}function Oh(i){let e=k1;return k1=i,e}function bu(){let i=Rt.lFrame,e=i.bindingRootIndex;return e===-1&&(e=i.bindingRootIndex=i.tView.bindingStartIndex),e}function vS(){return Rt.lFrame.bindingIndex}function m2(i){return Rt.lFrame.bindingIndex=i}function tl(){return Rt.lFrame.bindingIndex++}function Bh(i){let e=Rt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+i,t}function g2(){return Rt.lFrame.inI18n}function v2(i,e){let t=Rt.lFrame;t.bindingIndex=t.bindingRootIndex=i,i0(e)}function b2(){return Rt.lFrame.currentDirectiveIndex}function i0(i){Rt.lFrame.currentDirectiveIndex=i}function y2(i){let e=Rt.lFrame.currentDirectiveIndex;return e===-1?null:i[e]}function x2(){return Rt.lFrame.currentQueryIndex}function r0(i){Rt.lFrame.currentQueryIndex=i}function q5(i){let e=i[nt];return e.type===2?e.declTNode:e.type===1?i[Yi]:null}function bS(i,e,t){if(t&4){let r=e,o=i;for(;r=r.parent,r===null&&!(t&1);)if(r=q5(o),r===null||(o=o[wc],r.type&10))break;if(r===null)return!1;e=r,i=o}let n=Rt.lFrame=_2();return n.currentTNode=e,n.lView=i,!0}function o0(i){let e=_2(),t=i[nt];Rt.lFrame=e,e.currentTNode=t.firstChild,e.lView=i,e.tView=t,e.contextLView=i,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function _2(){let i=Rt.lFrame,e=i===null?null:i.child;return e===null?S2(i):e}function S2(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 C2(){let i=Rt.lFrame;return Rt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var yS=C2;function s0(){let i=C2();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 w2(i){return(Rt.lFrame.contextLView=a2(i,Rt.lFrame.contextLView))[Ln]}function Oo(){return Rt.lFrame.selectedIndex}function nl(i){Rt.lFrame.selectedIndex=i}function zh(){let i=Rt.lFrame;return gu(i.tView,i.selectedIndex)}function il(){Rt.lFrame.currentNamespace=nS}function yu(){K5()}function K5(){Rt.lFrame.currentNamespace=null}function xS(){return Rt.lFrame.currentNamespace}var E2=!0;function a0(){return E2}function da(i){E2=i}function F1(i,e=null,t=null,n){let r=M2(i,e,t,n);return r.resolveInjectorInitializers(),r}function M2(i,e=null,t=null,n,r=new Set){let o=[t||Ii,QA(i)],s;return new Sc(o,e||uu(),s||null,r)}var Ci=class i{static THROW_IF_NOT_FOUND=yc;static NULL=new Ph;static create(e,t){if(Array.isArray(e))return F1({name:""},t,e,"");{let n=e.name??"";return F1({name:n},e.parent,e.providers,n)}}static \u0275prov=_e({token:i,providedIn:"any",factory:()=>Ke(q1)});static __NG_ELEMENT_ID__=-1},Tn=new Ze(""),ui=(()=>{class i{static __NG_ELEMENT_ID__=Z5;static __NG_ENV_ID__=t=>t}return i})(),Lg=class extends ui{_lView;constructor(e){super(),this._lView=e}get destroyed(){return el(this._lView)}onDestroy(e){let t=this._lView;return aS(t,e),()=>l2(t,e)}};function Z5(){return new Lg(pt())}var T2=!1,D2=new Ze(""),rl=(()=>{class i{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Mh(!1);debugTaskTracker=Z(D2,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new xn(t=>{t.next(!1),t.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let t=this.taskId++;return this.pendingTasks.add(t),this.debugTaskTracker?.add(t),t}has(t){return this.pendingTasks.has(t)}remove(t){this.pendingTasks.delete(t),this.debugTaskTracker?.remove(t),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),N1=class extends Do{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,i2()&&(this.destroyRef=Z(ui,{optional:!0})??void 0,this.pendingTasks=Z(rl,{optional:!0})??void 0)}emit(e){let t=ct(null);try{super.next(e)}finally{ct(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 Gi&&e.add(a),a}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}},wr=N1;function Ug(...i){}function _S(i){let e,t;function n(){i=Ug;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{i(),n()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{i(),n()})),()=>n()}function A2(i){return queueMicrotask(()=>i()),()=>{i=Ug}}var SS="isAngularZone",Rh=SS+"_ID",J5=0,cr=class i{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new wr(!1);onMicrotaskEmpty=new wr(!1);onStable=new wr(!1);onError=new wr(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=T2}=e;if(typeof Zone>"u")throw new qe(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&n,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,tz(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(SS)===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new qe(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new qe(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,Q5,Ug,Ug);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)}},Q5={};function CS(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 ez(i){if(i.isCheckStableRunning||i.callbackScheduled)return;i.callbackScheduled=!0;function e(){_S(()=>{i.callbackScheduled=!1,L1(i),i.isCheckStableRunning=!0,CS(i),i.isCheckStableRunning=!1})}i.scheduleInRootZone?Zone.root.run(()=>{e()}):i._outer.run(()=>{e()}),L1(i)}function tz(i){let e=()=>{ez(i)},t=J5++;i._inner=i._inner.fork({name:"angular",properties:{[SS]:!0,[Rh]:t,[Rh+t]:!0},onInvokeTask:(n,r,o,s,a,l)=>{if(nz(l))return n.invokeTask(o,s,a,l);try{return HA(i),n.invokeTask(o,s,a,l)}finally{(i.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&e(),GA(i)}},onInvoke:(n,r,o,s,a,l,c)=>{try{return HA(i),n.invoke(o,s,a,l,c)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!iz(l)&&e(),GA(i)}},onHasTask:(n,r,o,s)=>{n.hasTask(o,s),r===o&&(s.change=="microTask"?(i._hasPendingMicrotasks=s.microTask,L1(i),CS(i)):s.change=="macroTask"&&(i.hasPendingMacrotasks=s.macroTask))},onHandleError:(n,r,o,s)=>(n.handleError(o,s),i.runOutsideAngular(()=>i.onError.emit(s)),!1)})}function L1(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function HA(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function GA(i){i._nesting--,CS(i)}var kh=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new wr;onMicrotaskEmpty=new wr;onStable=new wr;onError=new wr;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 nz(i){return I2(i,"__ignore_ng_zone__")}function iz(i){return I2(i,"__scheduler_tick__")}function I2(i,e){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[e]===!0}var no=class{_console=console;handleError(e){this._console.error("ERROR",e)}},ua=new Ze("",{factory:()=>{let i=Z(cr),e=Z(Pi),t;return n=>{i.runOutsideAngular(()=>{e.destroyed&&!t?setTimeout(()=>{throw n}):(t??=e.get(no),t.handleError(n))})}}}),P2={provide:aa,useValue:()=>{let i=Z(no,{optional:!0})},multi:!0},rz=new Ze("",{factory:()=>{let i=Z(Tn).defaultView;if(!i)return;let e=Z(ua),t=o=>{e(o.reason),o.preventDefault()},n=o=>{o.error?e(o.error):e(new Error(o.message,{cause:o})),o.preventDefault()},r=()=>{i.addEventListener("unhandledrejection",t),i.addEventListener("error",n)};typeof Zone<"u"?Zone.root.run(r):r(),Z(ui).onDestroy(()=>{i.removeEventListener("error",n),i.removeEventListener("unhandledrejection",t)})}});function wS(){return la([JA(()=>{Z(rz)})])}function F(i,e){let[t,n,r]=d1(i,e?.equal),o=t,s=o[ti];return o.set=n,o.update=r,o.asReadonly=l0.bind(o),o}function l0(){let i=this[ti];if(i.readonlyFn===void 0){let e=()=>this();e[ti]=i,i.readonlyFn=e}return i.readonlyFn}var Vh=(()=>{class i{view;node;constructor(t,n){this.view=t,this.node=n}static __NG_ELEMENT_ID__=oz}return i})();function oz(){return new Vh(pt(),wi())}var ms=class{},Hh=new Ze("",{factory:()=>!0});var ES=new Ze(""),Ic=(()=>{class i{internalPendingTasks=Z(rl);scheduler=Z(ms);errorHandler=Z(ua);add(){let t=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(t)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(t))}}run(t){let n=this.add();t().catch(this.errorHandler).finally(n)}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),c0=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new U1})}return i})(),U1=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||n.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,n]of this.queues)t===null?e||=this.flushQueue(n):e||=t.run(()=>this.flushQueue(n));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let n of e)n.dirty&&(this.dirtyEffectCount--,t=!0,n.run());return t}},Bg=class{[ti];constructor(e){this[ti]=e}destroy(){this[ti].destroy()}};function Yt(i,e){let t=e?.injector??Z(Ci),n=e?.manualCleanup!==!0?t.get(ui):null,r,o=t.get(Vh,null,{optional:!0}),s=t.get(ms);return o!==null?(r=lz(o.view,s,i),n instanceof Lg&&n._lView===o.view&&(n=null)):r=cz(i,t.get(c0),s),r.injector=t,n!==null&&(r.onDestroyFns=[n.onDestroy(()=>r.destroy())]),new Bg(r)}var O2=he(k({},f1),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let i=Oh(!1);try{h1(this)}finally{Oh(i)}},cleanup(){if(!this.cleanupFns?.length)return;let i=ct(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],ct(i)}}}),sz=he(k({},O2),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(fc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.scheduler.remove(this)}}),az=he(k({},O2),{consumerMarkedDirty(){this.view[Tt]|=8192,Ac(this.view),this.notifier.notify(13)},destroy(){if(fc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.view[qa]?.delete(this)}});function lz(i,e,t){let n=Object.create(az);return n.view=i,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=e,n.fn=R2(n,t),i[qa]??=new Set,i[qa].add(n),n.consumerMarkedDirty(n),n}function cz(i,e,t){let n=Object.create(sz);return n.fn=R2(n,i),n.scheduler=e,n.notifier=t,n.zone=typeof Zone<"u"?Zone.current:null,n.scheduler.add(n),n.notifier.notify(12),n}function R2(i,e){return()=>{e(t=>(i.cleanupFns??=[]).push(t))}}var d0={JSACTION:"jsaction"};function np(i){return{toString:i}.toString()}function vz(i){return typeof i=="function"}function SI(i,e,t,n){e!==null?e.applyValueToInputSignal(e,n):i[t]=n}var S0=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}},Du=(()=>{let i=()=>CI;return i.ngInherit=!0,i})();function CI(i){return i.type.prototype.ngOnChanges&&(i.setInput=yz),bz}function bz(){let i=EI(this),e=i?.current;if(e){let t=i.previous;if(t===Za)i.previous=e;else for(let n in e)t[n]=e[n];i.current=null,this.ngOnChanges(e)}}function yz(i,e,t,n,r){let o=this.declaredInputs[n],s=EI(i)||xz(i,{previous:Za,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new S0(c&&c.currentValue,t,l===Za),SI(i,e,r,t)}var wI="__ngSimpleChanges__";function EI(i){return i[wI]||null}function xz(i,e){return i[wI]=e}var k2=[];var rn=function(i,e=null,t){for(let n=0;n<k2.length;n++){let r=k2[n];r(i,e,t)}},qt=(function(i){return i[i.TemplateCreateStart=0]="TemplateCreateStart",i[i.TemplateCreateEnd=1]="TemplateCreateEnd",i[i.TemplateUpdateStart=2]="TemplateUpdateStart",i[i.TemplateUpdateEnd=3]="TemplateUpdateEnd",i[i.LifecycleHookStart=4]="LifecycleHookStart",i[i.LifecycleHookEnd=5]="LifecycleHookEnd",i[i.OutputStart=6]="OutputStart",i[i.OutputEnd=7]="OutputEnd",i[i.BootstrapApplicationStart=8]="BootstrapApplicationStart",i[i.BootstrapApplicationEnd=9]="BootstrapApplicationEnd",i[i.BootstrapComponentStart=10]="BootstrapComponentStart",i[i.BootstrapComponentEnd=11]="BootstrapComponentEnd",i[i.ChangeDetectionStart=12]="ChangeDetectionStart",i[i.ChangeDetectionEnd=13]="ChangeDetectionEnd",i[i.ChangeDetectionSyncStart=14]="ChangeDetectionSyncStart",i[i.ChangeDetectionSyncEnd=15]="ChangeDetectionSyncEnd",i[i.AfterRenderHooksStart=16]="AfterRenderHooksStart",i[i.AfterRenderHooksEnd=17]="AfterRenderHooksEnd",i[i.ComponentStart=18]="ComponentStart",i[i.ComponentEnd=19]="ComponentEnd",i[i.DeferBlockStateStart=20]="DeferBlockStateStart",i[i.DeferBlockStateEnd=21]="DeferBlockStateEnd",i[i.DynamicComponentStart=22]="DynamicComponentStart",i[i.DynamicComponentEnd=23]="DynamicComponentEnd",i[i.HostBindingsUpdateStart=24]="HostBindingsUpdateStart",i[i.HostBindingsUpdateEnd=25]="HostBindingsUpdateEnd",i})(qt||{});function _z(i,e,t){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(n){let s=CI(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 MI(i,e){for(let t=e.directiveStart,n=e.directiveEnd;t<n;t++){let o=i.data[t].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:d}=o;s&&(i.contentHooks??=[]).push(-t,s),a&&((i.contentHooks??=[]).push(t,a),(i.contentCheckHooks??=[]).push(t,a)),l&&(i.viewHooks??=[]).push(-t,l),c&&((i.viewHooks??=[]).push(t,c),(i.viewCheckHooks??=[]).push(t,c)),d!=null&&(i.destroyHooks??=[]).push(t,d)}}function m0(i,e,t){TI(i,e,3,t)}function g0(i,e,t,n){(i[Tt]&3)===t&&TI(i,e,t,n)}function MS(i,e){let t=i[Tt];(t&3)===e&&(t&=16383,t+=1,i[Tt]=t)}function TI(i,e,t,n){let r=n!==void 0?i[Ec]&65535:0,o=n??-1,s=e.length-1,a=0;for(let l=r;l<s;l++)if(typeof e[l+1]=="number"){if(a=e[l],n!=null&&a>=n)break}else e[l]<0&&(i[Ec]+=65536),(a<o||o==-1)&&(Sz(i,t,e,l),i[Ec]=(i[Ec]&4294901760)+l+2),l++}function F2(i,e){rn(qt.LifecycleHookStart,i,e);let t=ct(null);try{e.call(i)}finally{ct(t),rn(qt.LifecycleHookEnd,i,e)}}function Sz(i,e,t,n){let r=t[n]<0,o=t[n+1],s=r?-t[n]:t[n],a=i[s];r?i[Tt]>>14<i[Ec]>>16&&(i[Tt]&3)===e&&(i[Tt]+=16384,F2(a,o)):F2(a,o)}var _u=-1,Rc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=n}};function Cz(i){return(i.flags&8)!==0}function wz(i){return(i.flags&16)!==0}function Ez(i,e,t){let n=0;for(;n<t.length;){let r=t[n];if(typeof r=="number"){if(r!==0)break;n++;let o=t[n++],s=t[n++],a=t[n++];i.setAttribute(e,s,a,o)}else{let o=r,s=t[++n];Tz(o)?i.setProperty(e,o,s):i.setAttribute(e,o,s),n++}}return n}function Mz(i){return i===3||i===4||i===6}function Tz(i){return i.charCodeAt(0)===64}function wu(i,e){if(!(e===null||e.length===0))if(i===null||i.length===0)i=e.slice();else{let t=-1;for(let n=0;n<e.length;n++){let r=e[n];typeof r=="number"?t=r:t===0||(t===-1||t===2?N2(i,t,r,null,e[++n]):N2(i,t,r,null,null))}}return i}function N2(i,e,t,n,r){let o=0,s=i.length;if(e===-1)s=-1;else for(;o<i.length;){let a=i[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<i.length;){let a=i[o];if(typeof a=="number")break;if(a===t){r!==null&&(i[o+1]=r);return}o++,r!==null&&o++}s!==-1&&(i.splice(s,0,e),o=s+1),i.splice(o++,0,t),r!==null&&i.splice(o++,0,r)}function DI(i){return i!==_u}function C0(i){return i&32767}function Dz(i){return i>>16}function w0(i,e){let t=Dz(i),n=e;for(;t>0;)n=n[wc],t--;return n}var zS=!0;function E0(i){let e=zS;return zS=i,e}var Az=256,AI=Az-1,II=5,Iz=0,_s={};function Pz(i,e,t){let n;typeof t=="string"?n=t.charCodeAt(0)||0:t.hasOwnProperty(Cc)&&(n=t[Cc]),n==null&&(n=t[Cc]=Iz++);let r=n&AI,o=1<<r;e.data[i+(r>>II)]|=o}function M0(i,e){let t=PI(i,e);if(t!==-1)return t;let n=e[nt];n.firstCreatePass&&(i.injectorIndex=e.length,TS(n.data,i),TS(e,null),TS(n.blueprint,null));let r=TC(i,e),o=i.injectorIndex;if(DI(r)){let s=C0(r),a=w0(r,e),l=a[nt].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function TS(i,e){i.push(0,0,0,0,0,0,0,0,e)}function PI(i,e){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||e[i.injectorIndex+8]===null?-1:i.injectorIndex}function TC(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=NI(r),n===null)return _u;if(t++,r=r[wc],n.injectorIndex!==-1)return n.injectorIndex|t<<16}return _u}function VS(i,e,t){Pz(i,e,t)}function OI(i,e,t){if(t&8||i!==void 0)return i;$g(e,"NodeInjector")}function RI(i,e,t,n){if(t&8&&n===void 0&&(n=null),(t&3)===0){let r=i[Er],o=ji(void 0);try{return r?r.get(e,n,t&8):Y1(e,n,t&8)}finally{ji(o)}}return OI(n,e,t)}function kI(i,e,t,n=0,r){if(i!==null){if(e[Tt]&2048&&!(n&2)){let s=Fz(i,e,t,n,_s);if(s!==_s)return s}let o=FI(i,e,t,n,_s);if(o!==_s)return o}return RI(e,t,n,r)}function FI(i,e,t,n,r){let o=Rz(t);if(typeof o=="function"){if(!bS(e,i,n))return n&1?OI(r,t,n):RI(e,t,n,r);try{let s;if(s=o(n),s==null&&!(n&8))$g(t);else return s}finally{yS()}}else if(typeof o=="number"){let s=null,a=PI(i,e),l=_u,c=n&1?e[di][Yi]:null;for((a===-1||n&4)&&(l=a===-1?TC(i,e):e[a+8],l===_u||!U2(n,!1)?a=-1:(s=e[nt],a=C0(l),e=w0(l,e)));a!==-1;){let d=e[nt];if(L2(o,a,d.data)){let u=Oz(a,e,t,s,n,c);if(u!==_s)return u}l=e[a+8],l!==_u&&U2(n,e[nt].data[a+8]===c)&&L2(o,a,e)?(s=d,a=C0(l),e=w0(l,e)):a=-1}}return r}function Oz(i,e,t,n,r,o){let s=e[nt],a=s.data[i+8],l=n==null?ys(a)&&zS:n!=s&&(a.type&3)!==0,c=r&1&&o===a,d=v0(a,s,t,l,c);return d!==null?$h(e,s,d,a,r):_s}function v0(i,e,t,n,r){let o=i.providerIndexes,s=e.data,a=o&1048575,l=i.directiveStart,c=i.directiveEnd,d=o>>20,u=n?a:a+d,f=r?a+d:c;for(let h=u;h<f;h++){let p=s[h];if(h<l&&t===p||h>=l&&p.type===t)return h}if(r){let h=s[l];if(h&&xs(h)&&h.type===t)return l}return null}function $h(i,e,t,n,r){let o=i[t],s=e.data;if(o instanceof Rc){let a=o;if(a.resolving)throw $1("");let l=E0(a.canSeeViewProviders);a.resolving=!0;let c=s[t].type||s[t],d,u=a.injectImpl?ji(a.injectImpl):null,f=bS(i,n,0);try{o=i[t]=a.factory(void 0,r,s,i,n),e.firstCreatePass&&t>=n.directiveStart&&_z(t,s[t],e)}finally{u!==null&&ji(u),E0(l),a.resolving=!1,yS()}}return o}function Rz(i){if(typeof i=="string")return i.charCodeAt(0)||0;let e=i.hasOwnProperty(Cc)?i[Cc]:void 0;return typeof e=="number"?e>=0?e&AI:kz:e}function L2(i,e,t){let n=1<<i;return!!(t[e+(i>>II)]&n)}function U2(i,e){return!(i&2)&&!(i&1&&e)}var Oc=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return kI(this._tNode,this._lView,e,xc(n),t)}};function kz(){return new Oc(wi(),pt())}function ha(i){return np(()=>{let e=i.prototype.constructor,t=e[Ih]||HS(e),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let o=r[Ih]||HS(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function HS(i){return B1(i)?()=>{let e=HS(Si(i));return e&&e()}:Xa(i)}function Fz(i,e,t,n,r){let o=i,s=e;for(;o!==null&&s!==null&&s[Tt]&2048&&!Dc(s);){let a=FI(o,s,t,n|2,_s);if(a!==_s)return a;let l=o.parent;if(!l){let c=s[eS];if(c){let d=c.get(t,_s,n&-5);if(d!==_s)return d}l=NI(s),s=s[wc]}o=l}return r}function NI(i){let e=i[nt],t=e.type;return t===2?e.declTNode:t===1?i[Yi]:null}function Nz(){return Au(wi(),pt())}function Au(i,e){return new Oi(so(i,e))}var Oi=(()=>{class i{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=Nz}return i})();function Lz(i){return i instanceof Oi?i.nativeElement:i}function Uz(){return this._results[Symbol.iterator]()}var T0=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Do}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,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=qA(e);(this._changesDetected=!XA(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.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Uz},LI="ngSkipHydration",Bz="ngskiphydration";function UI(i){let e=i.mergedAttrs;if(e===null)return!1;for(let t=0;t<e.length;t+=2){let n=e[t];if(typeof n=="number")return!1;if(typeof n=="string"&&n.toLowerCase()===Bz)return!0}return!1}function BI(i){return i.hasAttribute(LI)}function D0(i){return(i.flags&128)===128}function zI(i){if(D0(i))return!0;let e=i.parent;for(;e;){if(D0(i)||UI(e))return!0;e=e.parent}return!1}var DC=(function(i){return i[i.OnPush=0]="OnPush",i[i.Eager=1]="Eager",i[i.Default=1]="Default",i})(DC||{}),VI=new Map,zz=0;function Vz(){return zz++}function Hz(i){VI.set(i[ca],i)}function GS(i){VI.delete(i[ca])}var B2="__ngContext__";function Eu(i,e){oo(e)?(i[B2]=e[ca],Hz(e)):i[B2]=e}function HI(i){return jI(i[pu])}function GI(i){return jI(i[ro])}function jI(i){for(;i!==null&&!Tr(i);)i=i[ro];return i}var jS;function AC(i){jS=i}function IC(){if(jS!==void 0)return jS;if(typeof document<"u")return document;throw new qe(210,!1)}var Cs=new Ze("",{factory:()=>Gz}),Gz="ng";var L0=new Ze(""),ip=new Ze("",{providedIn:"platform",factory:()=>"unknown"});var U0=new Ze("",{factory:()=>Z(Tn).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var Iu=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>{let t=new i;return t.store=jz(Z(Tn),Z(Cs)),t}});store={};onSerializeCallbacks={};get(t,n){return this.store[t]!==void 0?this.store[t]:n}set(t,n){this.store[t]=n}remove(t){delete this.store[t]}hasKey(t){return this.store.hasOwnProperty(t)}get isEmpty(){return Object.keys(this.store).length===0}onSerialize(t,n){this.onSerializeCallbacks[t]=n}toJson(){for(let t in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(t))try{this.store[t]=this.onSerializeCallbacks[t]()}catch(n){console.warn("Exception in onSerialize callback: ",n)}return JSON.stringify(this.store).replace(/</g,"\\u003C")}}return i})();function jz(i,e){let t=i.getElementById(e+"-state");if(t?.textContent)try{return JSON.parse(t.textContent)}catch(n){console.warn("Exception while restoring TransferState for app "+e,n)}return{}}var WI="h",$I="b",Wz="f",$z="n",YI="e",XI="t",B0="c",PC="x",Yh="r",qI="i",KI="n",OC="d";var ZI="di",JI="s",QI="p";var rp=new Ze(""),eP=!1,RC=new Ze("",{factory:()=>eP});var kC=new Ze(""),tP=!1,nP=new Ze("",{factory:()=>[]}),iP=new Ze(""),FC=new Ze("",{factory:()=>new Map});var op="ngb";var rP=(i,e,t)=>{let n=i,r=n.__jsaction_fns??new Map,o=r.get(e)??[];o.push(t),r.set(e,o),n.__jsaction_fns=r},oP=(i,e)=>{let t=i,n=t.getAttribute(op)??"",r=e.get(n)??new Set;r.has(t)||r.add(t),e.set(n,r)};var sP=i=>{i.removeAttribute(d0.JSACTION),i.removeAttribute(op),i.__jsaction_fns=void 0},aP=new Ze("",{factory:()=>({})});function NC(i,e){let t=e?.__jsaction_fns?.get(i.type);if(!(!t||!e?.isConnected))for(let n of t)n(i)}var WS=new Map;function lP(i,e){return WS.set(i,e),()=>WS.delete(i)}var z2=!1,cP=(i,e,t,n)=>{};function Yz(i,e,t,n){cP(i,e,t,n)}function dP(){z2||(cP=(i,e,t,n)=>{let r=i[Er].get(Cs);WS.get(r)?.(e,t,n)},z2=!0)}var z0=new Ze("");function sp(i){return(i.flags&32)===32}var Xz="__nghData__",LC=Xz,qz="__nghDeferData__",uP=qz;var b0="ngh",fP="nghm",hP=()=>null;function Kz(i,e,t=!1){let n=i.getAttribute(b0);if(n==null)return null;let[r,o]=n.split("|");if(n=t?o:r,!n)return null;let s=o?`|${o}`:"",a=t?r:s,l={};if(n!==""){let d=e.get(Iu,null,{optional:!0});d!==null&&(l=d.get(LC,[])[Number(n)])}let c={data:l,firstChild:i.firstChild??null};return t&&(c.firstChild=i,V0(c,0,i.nextSibling)),a?i.setAttribute(b0,a):i.removeAttribute(b0),c}function pP(){hP=Kz}function mP(i,e,t=!1){return hP(i,e,t)}function gP(i){let e=i._lView;return e[nt].type===2?null:(Dc(e)&&(e=e[Kt]),e)}function Zz(i){return i.textContent?.replace(/\s/gm,"")}function Jz(i){let e=IC(),t=e.createNodeIterator(i,NodeFilter.SHOW_COMMENT,{acceptNode(o){let s=Zz(o);return s==="ngetn"||s==="ngtns"?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),n,r=[];for(;n=t.nextNode();)r.push(n);for(let o of r)o.textContent==="ngetn"?o.replaceWith(e.createTextNode("")):o.remove()}function V0(i,e,t){i.segmentHeads??={},i.segmentHeads[e]=t}function $S(i,e){return i.segmentHeads?.[e]??null}function vP(i){return i.get(iP,!1,{optional:!0})}function Qz(i,e){let t=i.data,n=t[YI]?.[e]??null;return n===null&&t[B0]?.[e]&&(n=UC(i,e)),n}function bP(i,e){return i.data[B0]?.[e]??null}function UC(i,e){let t=bP(i,e)??[],n=0;for(let r of t)n+=r[Yh]*(r[PC]??1);return n}function eV(i){if(typeof i.disconnectedNodes>"u"){let e=i.data[OC];i.disconnectedNodes=e?new Set(e):null}return i.disconnectedNodes}function yP(i,e){if(typeof i.disconnectedNodes>"u"){let t=i.data[OC];i.disconnectedNodes=t?new Set(t):null}return!!eV(i)?.has(e)}function H0(i,e){let t=i[Xi];return t!==null&&!n0()&&!sp(e)&&!yP(t,e.index-Kt)}function tV(i,e){let t=e.get(z0),r=e.get(Iu).get(uP,{}),o=!1,s=i,a=null,l=[];for(;!o&&s;){o=t.has(s);let c=t.hydrating.get(s);if(a===null&&c!=null){a=c.promise;break}l.unshift(s),s=r[s][QI]}return{parentBlockPromise:a,hydrationQueue:l}}function DS(i){return!!i&&i.nodeType===Node.COMMENT_NODE&&i.textContent?.trim()===fP}function V2(i){for(;i&&i.nodeType===Node.TEXT_NODE;)i=i.previousSibling;return i}function xP(i){for(let n of i.body.childNodes)if(DS(n))return;let e=V2(i.body.previousSibling);if(DS(e))return;let t=V2(i.head.lastChild);if(!DS(t))throw new qe(-507,!1)}function _P(i,e){let t=i.contentQueries;if(t!==null){let n=ct(null);try{for(let r=0;r<t.length;r+=2){let o=t[r],s=t[r+1];if(s!==-1){let a=i.data[s];r0(o),a.contentQueries(2,e[s],s)}}}finally{ct(n)}}}function YS(i,e,t){r0(0);let n=ct(null);try{e(i,t)}finally{ct(n)}}function BC(i,e,t){if(tS(e)){let n=ct(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;s<o;s++){let a=i.data[s];if(a.contentQueries){let l=t[s];a.contentQueries(1,l,s)}}}finally{ct(n)}}}var Fo=(function(i){return i[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",i[i.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",i})(Fo||{});var u0;function nV(){if(u0===void 0&&(u0=null,io.trustedTypes))try{u0=io.trustedTypes.createPolicy("angular",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return u0}function G0(i){return nV()?.createHTML(i)||i}var f0;function iV(){if(f0===void 0&&(f0=null,io.trustedTypes))try{f0=io.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return f0}function H2(i){return iV()?.createHTML(i)||i}var fa=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${zg})`}},XS=class extends fa{getTypeName(){return"HTML"}},qS=class extends fa{getTypeName(){return"Style"}},KS=class extends fa{getTypeName(){return"Script"}},ZS=class extends fa{getTypeName(){return"URL"}},JS=class extends fa{getTypeName(){return"ResourceURL"}};function No(i){return i instanceof fa?i.changingThisBreaksApplicationSecurity:i}function pa(i,e){let t=SP(i);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${zg})`)}return t===e}function SP(i){return i instanceof fa&&i.getTypeName()||null}function zC(i){return new XS(i)}function VC(i){return new qS(i)}function HC(i){return new KS(i)}function GC(i){return new ZS(i)}function jC(i){return new JS(i)}function rV(i){let e=new eC(i);return oV()?new QS(e):e}var QS=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(G0(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},eC=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=G0(e),t}};function oV(){try{return!!new window.DOMParser().parseFromString(G0(""),"text/html")}catch{return!1}}var sV=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function ap(i){return i=String(i),i.match(sV)?i:"unsafe:"+i}function ma(i){let e={};for(let t of i.split(","))e[t]=!0;return e}function lp(...i){let e={};for(let t of i)for(let n in t)t.hasOwnProperty(n)&&(e[n]=!0);return e}var CP=ma("area,br,col,hr,img,wbr"),wP=ma("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),EP=ma("rp,rt"),aV=lp(EP,wP),lV=lp(wP,ma("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")),cV=lp(EP,ma("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")),G2=lp(CP,lV,cV,aV),MP=ma("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),dV=ma("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"),uV=ma("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"),fV=lp(MP,dV,uV),hV=ma("script,style,template");var tC=class{sanitizedSomething=!1;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=gV(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=mV(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=j2(e).toLowerCase();if(!G2.hasOwnProperty(t))return this.sanitizedSomething=!0,!hV.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let o=n.item(r),s=o.name,a=s.toLowerCase();if(!fV.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;MP[a]&&(l=ap(l)),this.buf.push(" ",s,'="',W2(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=j2(e).toLowerCase();G2.hasOwnProperty(t)&&!CP.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(W2(e))}};function pV(i,e){return(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function mV(i){let e=i.nextSibling;if(e&&i!==e.previousSibling)throw TP(e);return e}function gV(i){let e=i.firstChild;if(e&&pV(i,e))throw TP(e);return e}function j2(i){let e=i.nodeName;return typeof e=="string"?e:"FORM"}function TP(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var vV=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,bV=/([^\#-~ |!])/g;function W2(i){return i.replace(/&/g,"&amp;").replace(vV,function(e){let t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((t-55296)*1024+(n-56320)+65536)+";"}).replace(bV,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var h0;function j0(i,e){let t=null;try{h0=h0||rV(i);let n=e?String(e):"";t=h0.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=h0.getInertBodyElement(n)}while(n!==o);let a=new tC().sanitizeChildren($2(t)||t);return G0(a)}finally{if(t){let n=$2(t)||t;for(;n.firstChild;)n.firstChild.remove()}}}function $2(i){return"content"in i&&yV(i)?i.content:null}function yV(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var xV=/^>|^->|<!--|-->|--!>|<!-$/g,_V=/(<|>)/g,SV="\u200B$1\u200B";function CV(i){return i.replace(xV,e=>e.replace(_V,SV))}function DP(i,e){return i.createText(e)}function wV(i,e,t){i.setValue(e,t)}function AP(i,e){return i.createComment(CV(e))}function WC(i,e,t){return i.createElement(e,t)}function A0(i,e,t,n,r){i.insertBefore(e,t,n,r)}function IP(i,e,t){i.appendChild(e,t)}function Y2(i,e,t,n,r){n!==null?A0(i,e,t,n,r):IP(i,e,t)}function $C(i,e,t,n){i.removeChild(null,e,t,n)}function PP(i){i.textContent=""}function EV(i,e,t){i.setAttribute(e,"style",t)}function MV(i,e,t){t===""?i.removeAttribute(e,"class"):i.setAttribute(e,"class",t)}function OP(i,e,t){let{mergedAttrs:n,classes:r,styles:o}=t;n!==null&&Ez(i,e,n),r!==null&&MV(i,e,r),o!==null&&EV(i,e,o)}var Lo=(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})(Lo||{});function W0(i){let e=RP();return e?H2(e.sanitize(Lo.HTML,i)||""):pa(i,"HTML")?H2(No(i)):j0(IC(),Ao(i))}function fi(i){let e=RP();return e?e.sanitize(Lo.URL,i)||"":pa(i,"URL")?No(i):ap(Ao(i))}function RP(){let i=pt();return i&&i[Io].sanitizer}function YC(i){return i.ownerDocument.defaultView}function XC(i){return i.ownerDocument}function kP(i){return i.ownerDocument.body}function TV(i,e,t){let n=i.length;for(;;){let r=i.indexOf(e,t);if(r===-1)return r;if(r===0||i.charCodeAt(r-1)<=32){let o=e.length;if(r+o===n||i.charCodeAt(r+o)<=32)return r}t=r+1}}var FP="ng-template";function DV(i,e,t,n){let r=0;if(n){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&TV(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(qC(i))return!1;if(r=e.indexOf(1,r),r>-1){let o;for(;++r<e.length&&typeof(o=e[r])=="string";)if(o.toLowerCase()===t)return!0}return!1}function qC(i){return i.type===4&&i.value!==FP}function AV(i,e,t){let n=i.type===4&&!t?FP:i.value;return e===n}function IV(i,e,t){let n=4,r=i.attrs,o=r!==null?RV(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!Ro(n)&&!Ro(l))return!1;if(s&&Ro(l))continue;s=!1,n=l|n&1;continue}if(!s)if(n&4){if(n=2|n&1,l!==""&&!AV(i,l,t)||l===""&&e.length===1){if(Ro(n))return!1;s=!0}}else if(n&8){if(r===null||!DV(i,r,l,t)){if(Ro(n))return!1;s=!0}}else{let c=e[++a],d=PV(l,r,qC(i),t);if(d===-1){if(Ro(n))return!1;s=!0;continue}if(c!==""){let u;if(d>o?u="":u=r[d+1].toLowerCase(),n&2&&c!==u){if(Ro(n))return!1;s=!0}}}}return Ro(n)||s}function Ro(i){return(i&1)===0}function PV(i,e,t,n){if(e===null)return-1;let r=0;if(n||!t){let o=!1;for(;r<e.length;){let s=e[r];if(s===i)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=e[++r];for(;typeof a=="string";)a=e[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return kV(e,i)}function NP(i,e,t=!1){for(let n=0;n<e.length;n++)if(IV(i,e[n],t))return!0;return!1}function OV(i){let e=i.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function RV(i){for(let e=0;e<i.length;e++){let t=i[e];if(Mz(t))return e}return i.length}function kV(i,e){let t=i.indexOf(4);if(t>-1)for(t++;t<i.length;){let n=i[t];if(typeof n=="number")return-1;if(n===e)return t;t++}return-1}function FV(i,e){e:for(let t=0;t<e.length;t++){let n=e[t];if(i.length===n.length){for(let r=0;r<i.length;r++)if(i[r]!==n[r])continue e;return!0}}return!1}function X2(i,e){return i?":not("+e.trim()+")":e}function NV(i){let e=i[0],t=1,n=2,r="",o=!1;for(;t<i.length;){let s=i[t];if(typeof s=="string")if(n&2){let a=i[++t];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else n&8?r+="."+s:n&4&&(r+=" "+s);else r!==""&&!Ro(s)&&(e+=X2(o,r),r=""),n=s,o=o||!Ro(n);t++}return r!==""&&(e+=X2(o,r)),e}function LV(i){return i.map(NV).join(",")}function UV(i){let e=[],t=[],n=1,r=2;for(;n<i.length;){let o=i[n];if(typeof o=="string")r===2?o!==""&&e.push(o,i[++n]):r===8&&t.push(o);else{if(!Ro(r))break;r=o}n++}return t.length&&e.push(1,...t),e}var Ei={};function KC(i,e,t,n,r,o,s,a,l,c,d){let u=Kt+n,f=u+r,h=BV(u,f),p=typeof c=="function"?c():c;return h[nt]={type:i,blueprint:h,template:t,queries:null,viewQuery:a,declTNode:e,data:h.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:p,incompleteFirstPass:!1,ssrId:d}}function BV(i,e){let t=[];for(let n=0;n<e;n++)t.push(n<i?null:Ei);return t}function zV(i){let e=i.tView;return e===null||e.incompleteFirstPass?i.tView=KC(1,null,i.template,i.decls,i.vars,i.directiveDefs,i.pipeDefs,i.viewQuery,i.schemas,i.consts,i.id):e}function ZC(i,e,t,n,r,o,s,a,l,c,d){let u=e.blueprint.slice();return u[$i]=r,u[Tt]=n|4|128|8|64|1024,(c!==null||i&&i[Tt]&2048)&&(u[Tt]|=2048),oS(u),u[Gn]=u[wc]=i,u[Ln]=t,u[Io]=s||i&&i[Io],u[Jt]=a||i&&i[Jt],u[Er]=l||i&&i[Er]||null,u[Yi]=o,u[ca]=Vz(),u[Xi]=d,u[eS]=c,u[di]=e.type==2?i[di]:u,u}function VV(i,e,t){let n=so(e,i),r=zV(t),o=i[Io].rendererFactory,s=JC(i,ZC(i,r,null,LP(t),n,e,null,o.createRenderer(n,t),null,null,null));return i[e.index]=s}function LP(i){let e=16;return i.signals?e=4096:i.onPush&&(e=64),e}function UP(i,e,t,n){if(t===0)return-1;let r=e.length;for(let o=0;o<t;o++)e.push(n),i.blueprint.push(n),i.data.push(null);return r}function JC(i,e){return i[pu]?i[Q1][ro]=e:i[pu]=e,i[Q1]=e,e}function T(i=1){BP(Rn(),pt(),Oo()+i,!1)}function BP(i,e,t,n){if(!n)if((e[Tt]&3)===3){let o=i.preOrderCheckHooks;o!==null&&m0(e,o,t)}else{let o=i.preOrderHooks;o!==null&&g0(e,o,0,t)}nl(t)}var $0=(function(i){return i[i.None=0]="None",i[i.SignalBased=1]="SignalBased",i[i.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",i})($0||{});function nC(i,e,t,n){let r=ct(null);try{let[o,s,a]=i.inputs[t],l=null;(s&$0.SignalBased)!==0&&(l=e[o][ti]),l!==null&&l.transformFn!==void 0?n=l.transformFn(n):a!==null&&(n=a.call(e,n)),i.setInput!==null?i.setInput(e,l,n,t,o):SI(e,l,o,n)}finally{ct(r)}}var Ss=(function(i){return i[i.Important=1]="Important",i[i.DashCase=2]="DashCase",i})(Ss||{}),HV;function QC(i,e){return HV(i,e)}var ahe=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var iC=new WeakMap,rC=new WeakSet;function GV(i,e){let t=iC.get(i);if(!t||t.length===0)return;let n=e.parentNode,r=e.previousSibling;for(let o=t.length-1;o>=0;o--){let s=t[o],a=s.parentNode;s===e?(t.splice(o,1),rC.add(s),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))):(r&&s===r||a&&n&&a!==n)&&(t.splice(o,1),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),s.parentNode?.removeChild(s))}}function jV(i,e){let t=iC.get(i);t?t.includes(e)||t.push(e):iC.set(i,[e])}var kc=new Set,Y0=(function(i){return i[i.CHANGE_DETECTION=0]="CHANGE_DETECTION",i[i.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",i})(Y0||{}),ws=new Ze(""),q2=new Set;function Uo(i){q2.has(i)||(q2.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}var ew=(()=>{class i{impl=null;execute(){this.impl?.execute()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),zP=[0,1,2,3],VP=(()=>{class i{ngZone=Z(cr);scheduler=Z(ms);errorHandler=Z(no,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){Z(ws,{optional:!0})}execute(){let t=this.sequences.size>0;t&&rn(qt.AfterRenderHooksStart),this.executing=!0;for(let n of zP)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[n]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[n];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),t&&rn(qt.AfterRenderHooksEnd)}register(t){let{view:n}=t;n!==void 0?((n[Mc]??=[]).push(t),Ac(n),n[Tt]|=8192):this.executing?this.deferredRegistrations.add(t):this.addSequence(t)}addSequence(t){this.sequences.add(t),this.scheduler.notify(7)}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}maybeTrace(t,n){return n?n.run(Y0.AFTER_NEXT_RENDER,t):t()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),I0=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,o,s=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[Mc];e&&(this.view[Mc]=e.filter(t=>t!==this))}};function X0(i,e){let t=e?.injector??Z(Ci);return Uo("NgAfterNextRender"),$V(i,t,e,!0)}function WV(i){return i instanceof Function?[void 0,void 0,i,void 0]:[i.earlyRead,i.write,i.mixedReadWrite,i.read]}function $V(i,e,t,n){let r=e.get(ew);r.impl??=e.get(VP);let o=e.get(ws,null,{optional:!0}),s=t?.manualCleanup!==!0?e.get(ui):null,a=e.get(Vh,null,{optional:!0}),l=new I0(r.impl,WV(i),a?.view,n,s,o?.snapshot(null));return r.impl.register(l),l}var HP=new Ze("",{factory:()=>({queue:new Set,isScheduled:!1,scheduler:null,injector:Z(Pi)})});function GP(i,e,t){let n=i.get(HP);if(Array.isArray(e))for(let r of e)n.queue.add(r),t?.detachedLeaveAnimationFns?.push(r);else n.queue.add(e),t?.detachedLeaveAnimationFns?.push(e);n.scheduler&&n.scheduler(i)}function YV(i,e){let t=i.get(HP);if(e.detachedLeaveAnimationFns){for(let n of e.detachedLeaveAnimationFns)t.queue.delete(n);e.detachedLeaveAnimationFns=void 0}}function XV(i,e){for(let[t,n]of e)GP(i,n.animateFns)}function K2(i,e,t,n){let r=i?.[Qa]?.enter;e!==null&&r&&r.has(t.index)&&XV(n,r)}function xu(i,e,t,n,r,o,s,a){if(r!=null){let l,c=!1;Tr(r)?l=r:oo(r)&&(c=!0,r=r[$i]);let d=Dr(r);i===0&&n!==null?(K2(a,n,o,t),s==null?IP(e,n,d):A0(e,n,d,s||null,!0)):i===1&&n!==null?(K2(a,n,o,t),A0(e,n,d,s||null,!0),GV(o,d)):i===2?(a?.[Qa]?.leave?.has(o.index)&&jV(o,d),Z2(a,o,t,u=>{if(rC.has(d)){rC.delete(d);return}$C(e,d,c,u)})):i===3&&Z2(a,o,t,()=>{e.destroyNode(d)}),l!=null&&o6(e,i,t,l,o,n,s)}}function qV(i,e){jP(i,e),e[$i]=null,e[Yi]=null}function KV(i,e,t,n,r,o){n[$i]=r,n[Yi]=e,K0(i,n,t,1,r,o)}function jP(i,e){e[Io].changeDetectionScheduler?.notify(9),K0(i,e,e[Jt],2,null,null)}function ZV(i){let e=i[pu];if(!e)return AS(i[nt],i);for(;e;){let t=null;if(oo(e))t=e[pu];else{let n=e[On];n&&(t=n)}if(!t){for(;e&&!e[ro]&&e!==i;)oo(e)&&AS(e[nt],e),e=e[Gn];e===null&&(e=i),oo(e)&&AS(e[nt],e),t=e&&e[ro]}e=t}}function tw(i,e){let t=i[Tc],n=t.indexOf(e);t.splice(n,1)}function q0(i,e){if(el(e))return;let t=e[Jt];t.destroyNode&&K0(i,e,t,3,null,null),ZV(e)}function AS(i,e){if(el(e))return;let t=ct(null);try{e[Tt]&=-129,e[Tt]|=256,e[Mr]&&fc(e[Mr]),e6(i,e),QV(i,e),e[nt].type===1&&e[Jt].destroy();let n=e[Ja];if(n!==null&&Tr(e[Gn])){n!==e[Gn]&&tw(n,e);let r=e[vs];r!==null&&r.detachView(i)}GS(e)}finally{ct(t)}}function Z2(i,e,t,n){let r=i?.[Qa];if(r==null||r.leave==null||!r.leave.has(e.index))return n(!1);i&&kc.add(i[ca]),GP(t,()=>{if(r.leave&&r.leave.has(e.index)){let s=r.leave.get(e.index),a=[];if(s){for(let l=0;l<s.animateFns.length;l++){let c=s.animateFns[l],{promise:d}=c();a.push(d)}r.detachedLeaveAnimationFns=void 0}r.running=Promise.allSettled(a),JV(i,n)}else i&&kc.delete(i[ca]),n(!1)},r)}function JV(i,e){let t=i[Qa]?.running;if(t){t.then(()=>{i[Qa].running=void 0,kc.delete(i[ca]),e(!0)});return}e(!1)}function QV(i,e){let t=i.cleanup,n=e[hu];if(t!==null)for(let s=0;s<t.length-1;s+=2)if(typeof t[s]=="string"){let a=t[s+3];a>=0?n[a]():n[-a].unsubscribe(),s+=2}else{let a=n[t[s+1]];t[s].call(a)}n!==null&&(e[hu]=null);let r=e[ra];if(r!==null){e[ra]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=e[qa];if(o!==null){e[qa]=null;for(let s of o)s.destroy()}}function e6(i,e){let t;if(i!=null&&(t=i.destroyHooks)!=null)for(let n=0;n<t.length;n+=2){let r=e[t[n]];if(!(r instanceof Rc)){let o=t[n+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];rn(qt.LifecycleHookStart,a,l);try{l.call(a)}finally{rn(qt.LifecycleHookEnd,a,l)}}else{rn(qt.LifecycleHookStart,r,o);try{o.call(r)}finally{rn(qt.LifecycleHookEnd,r,o)}}}}}function WP(i,e,t){return t6(i,e.parent,t)}function t6(i,e,t){let n=e;for(;n!==null&&n.type&168;)e=n,n=e.parent;if(n===null)return t[$i];if(ys(n)){let{encapsulation:r}=i.data[n.directiveStart+n.componentOffset];if(r===Fo.None||r===Fo.Emulated)return null}return so(n,t)}function $P(i,e,t){return i6(i,e,t)}function n6(i,e,t){return i.type&40?so(i,t):null}var i6=n6,J2;function nw(i,e,t,n){let r=WP(i,n,e),o=e[Jt],s=n.parent||e[Yi],a=$P(s,n,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)Y2(o,r,t[l],a,!1);else Y2(o,r,t,a,!1);J2!==void 0&&J2(o,n,e,t,r)}function jh(i,e){if(e!==null){let t=e.type;if(t&3)return so(e,i);if(t&4)return oC(-1,i[e.index]);if(t&8){let n=e.child;if(n!==null)return jh(i,n);{let r=i[e.index];return Tr(r)?oC(-1,r):Dr(r)}}else{if(t&128)return jh(i,e.next);if(t&32)return QC(e,i)()||Dr(i[e.index]);{let n=YP(i,e);if(n!==null){if(Array.isArray(n))return n[0];let r=Ka(i[di]);return jh(r,n)}else return jh(i,e.next)}}}return null}function YP(i,e){if(e!==null){let n=i[di][Yi],r=e.projection;return n.projection[r]}return null}function oC(i,e){let t=On+i+1;if(t<e.length){let n=e[t],r=n[nt].firstChild;if(r!==null)return jh(n,r)}return e[bs]}function iw(i,e,t,n,r,o,s){for(;t!=null;){let a=n[Er];if(t.type===128){t=t.next;continue}let l=n[t.index],c=t.type;if(s&&e===0&&(l&&Eu(Dr(l),n),t.flags|=2),!sp(t))if(c&8)iw(i,e,t.child,n,r,o,!1),xu(e,i,a,r,l,t,o,n);else if(c&32){let d=QC(t,n),u;for(;u=d();)xu(e,i,a,r,u,t,o,n);xu(e,i,a,r,l,t,o,n)}else c&16?XP(i,e,n,t,r,o):xu(e,i,a,r,l,t,o,n);t=s?t.projectionNext:t.next}}function K0(i,e,t,n,r,o){iw(t,n,i.firstChild,e,r,o,!1)}function r6(i,e,t){let n=e[Jt],r=WP(i,t,e),o=t.parent||e[Yi],s=$P(o,t,e);XP(n,0,e,t,r,s)}function XP(i,e,t,n,r,o){let s=t[di],l=s[Yi].projection[n.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];xu(e,i,t[Er],r,d,n,o,t)}else{let c=l,d=s[Gn];D0(n)&&(c.flags|=128),iw(i,e,c,d,r,o,!0)}}function o6(i,e,t,n,r,o,s){let a=n[bs],l=Dr(n);a!==l&&xu(e,i,t,o,a,r,s);for(let c=On;c<n.length;c++){let d=n[c];K0(d[nt],d,i,e,o,a)}}function s6(i,e,t,n,r){if(e)r?i.addClass(t,n):i.removeClass(t,n);else{let o=n.indexOf("-")===-1?void 0:Ss.DashCase;r==null?i.removeStyle(t,n,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=Ss.Important),i.setStyle(t,n,r,o))}}function qP(i,e,t,n,r){let o=Oo(),s=n&2;try{nl(-1),s&&e.length>Kt&&BP(i,e,Kt,!1);let a=s?qt.TemplateUpdateStart:qt.TemplateCreateStart;rn(a,r,t),t(n,r)}finally{nl(o);let a=s?qt.TemplateUpdateEnd:qt.TemplateCreateEnd;rn(a,r,t)}}function Z0(i,e,t){f6(i,e,t),(t.flags&64)===64&&h6(i,e,t)}function cp(i,e,t=so){let n=e.localNames;if(n!==null){let r=e.index+1;for(let o=0;o<n.length;o+=2){let s=n[o+1],a=s===-1?t(e,i):i[s];i[r++]=a}}}function a6(i,e,t,n){let o=n.get(RC,eP)||t===Fo.ShadowDom||t===Fo.ExperimentalIsolatedShadowDom,s=i.selectRootElement(e,o);return l6(s),s}function l6(i){KP(i)}var KP=()=>null;function c6(i){BI(i)?PP(i):Jz(i)}function ZP(){KP=c6}function d6(i){return i==="class"?"className":i==="for"?"htmlFor":i==="formaction"?"formAction":i==="innerHtml"?"innerHTML":i==="readonly"?"readOnly":i==="tabindex"?"tabIndex":i}function JP(i,e,t,n,r,o){let s=e[nt];if(lw(i,s,e,t,n)){ys(i)&&u6(e,i.index);return}i.type&3&&(t=d6(t)),QP(i,e,t,n,r,o)}function QP(i,e,t,n,r,o){if(i.type&3){let s=so(i,e);n=o!=null?o(n,i.value||"",t):n,r.setProperty(s,t,n)}else i.type&12}function u6(i,e){let t=ao(e,i);t[Tt]&16||(t[Tt]|=64)}function f6(i,e,t){let n=t.directiveStart,r=t.directiveEnd;ys(t)&&VV(e,t,i.data[n+t.componentOffset]),i.firstCreatePass||M0(t,e);let o=t.initialInputs;for(let s=n;s<r;s++){let a=i.data[s],l=$h(e,i,s,t);if(Eu(l,e),o!==null&&v6(e,s-n,l,a,t,o),xs(a)){let c=ao(t.index,e);c[Ln]=$h(e,i,s,t)}}}function h6(i,e,t){let n=t.directiveStart,r=t.directiveEnd,o=t.index,s=b2();try{nl(o);for(let a=n;a<r;a++){let l=i.data[a],c=e[a];i0(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&p6(l,c)}}finally{nl(-1),i0(s)}}function p6(i,e){i.hostBindings!==null&&i.hostBindings(1,e)}function rw(i,e){let t=i.directiveRegistry,n=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];NP(e,o.selectors,!1)&&(n??=[],xs(o)?n.unshift(o):n.push(o))}return n}function m6(i,e,t,n,r,o){let s=so(i,e);g6(e[Jt],s,o,i.value,t,n,r)}function g6(i,e,t,n,r,o,s){if(o==null)i.removeAttribute(e,r,t);else{let a=s==null?Ao(o):s(o,n||"",r);i.setAttribute(e,r,a,t)}}function v6(i,e,t,n,r,o){let s=o[e];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],c=s[a+1];nC(n,t,l,c)}}function ow(i,e,t,n,r){let o=Kt+t,s=e[nt],a=r(s,e,i,n,t);e[o]=a,vu(i,!0);let l=i.type===2;return l?(OP(e[Jt],a,i),(d2()===0||mu(i))&&Eu(a,e),u2()):Eu(a,e),a0()&&(!l||!sp(i))&&nw(s,e,a,i),i}function sw(i){let e=i;return pS()?mS():(e=e.parent,vu(e,!1)),e}function aw(i,e){let t=i[Er];if(!t)return;let n;try{n=t.get(ua,null)}catch{n=null}n?.(e)}function lw(i,e,t,n,r){let o=i.inputs?.[n],s=i.hostDirectiveInputs?.[n],a=!1;if(s)for(let l=0;l<s.length;l+=2){let c=s[l],d=s[l+1],u=e.data[c];nC(u,t[c],d,r),a=!0}if(o)for(let l of o){let c=t[l],d=e.data[l];nC(d,c,n,r),a=!0}return a}function b6(i,e){let t=ao(e,i),n=t[nt];y6(n,t);let r=t[$i];r!==null&&t[Xi]===null&&(t[Xi]=mP(r,t[Er])),rn(qt.ComponentStart);try{cw(n,t,t[Ln])}finally{rn(qt.ComponentEnd,t[Ln])}}function y6(i,e){for(let t=e.length;t<i.blueprint.length;t++)e.push(i.blueprint[t])}function cw(i,e,t){o0(e);try{let n=i.viewQuery;n!==null&&YS(1,n,t);let r=i.template;r!==null&&qP(i,e,r,1,t),i.firstCreatePass&&(i.firstCreatePass=!1),e[vs]?.finishViewCreation(i),i.staticContentQueries&&_P(i,e),i.staticViewQueries&&YS(2,i.viewQuery,t);let o=i.components;o!==null&&x6(e,o)}catch(n){throw i.firstCreatePass&&(i.incompleteFirstPass=!0,i.firstCreatePass=!1),n}finally{e[Tt]&=-5,s0()}}function x6(i,e){for(let t=0;t<e.length;t++)b6(i,e[t])}function Pu(i,e,t,n){let r=ct(null);try{let o=e.tView,a=i[Tt]&4096?4096:16,l=ZC(i,o,t,a,null,e,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),c=i[e.index];l[Ja]=c;let d=i[vs];return d!==null&&(l[vs]=d.createEmbeddedView(o)),cw(o,l,t),l}finally{ct(r)}}function Fc(i,e){return!e||e.firstChild===null||D0(i)}function Xh(i,e,t,n,r=!1){for(;t!==null;){if(t.type===128){t=r?t.projectionNext:t.next;continue}let o=e[t.index];o!==null&&n.push(Dr(o)),Tr(o)&&eO(o,n);let s=t.type;if(s&8)Xh(i,e,t.child,n);else if(s&32){let a=QC(t,e),l;for(;l=a();)n.push(l)}else if(s&16){let a=YP(e,t);if(Array.isArray(a))n.push(...a);else{let l=Ka(e[di]);Xh(l[nt],l,a,n,!0)}}t=r?t.projectionNext:t.next}return n}function eO(i,e){for(let t=On;t<i.length;t++){let n=i[t],r=n[nt].firstChild;r!==null&&Xh(n[nt],n,r,e)}i[bs]!==i[$i]&&e.push(i[bs])}function tO(i){if(i[Mc]!==null){for(let e of i[Mc])e.impl.addSequence(e);i[Mc].length=0}}var nO=[];function _6(i){return i[Mr]??S6(i)}function S6(i){let e=nO.pop()??Object.create(w6);return e.lView=i,e}function C6(i){i.lView[Mr]!==i&&(i.lView=null,nO.push(i))}var w6=he(k({},cc),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{Ac(i.lView)},consumerOnSignalRead(){this.lView[Mr]=this}});function E6(i){let e=i[Mr]??Object.create(M6);return e.lView=i,e}var M6=he(k({},cc),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{let e=Ka(i.lView);for(;e&&!iO(e[nt]);)e=Ka(e);e&&sS(e)},consumerOnSignalRead(){this.lView[Mr]=this}});function iO(i){return i.type!==2}function rO(i){if(i[qa]===null)return;let e=!0;for(;e;){let t=!1;for(let n of i[qa])n.dirty&&(t=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));e=t&&!!(i[Tt]&8192)}}var T6=100;function oO(i,e=0){let n=i[Io].rendererFactory,r=!1;r||n.begin?.();try{D6(i,e)}finally{r||n.end?.()}}function D6(i,e){let t=gS();try{Oh(!0),sC(i,e);let n=0;for(;Uh(i);){if(n===T6)throw new qe(103,!1);n++,sC(i,1)}}finally{Oh(t)}}function A6(i,e,t,n){if(el(e))return;let r=e[Tt],o=!1,s=!1;o0(e);let a=!0,l=null,c=null;o||(iO(i)?(c=_6(e),l=uc(c)):cg()===null?(a=!1,c=E6(e),l=uc(c)):e[Mr]&&(fc(e[Mr]),e[Mr]=null));try{oS(e),m2(i.bindingStartIndex),t!==null&&qP(i,e,t,2,n);let d=(r&3)===3;if(!o)if(d){let h=i.preOrderCheckHooks;h!==null&&m0(e,h,null)}else{let h=i.preOrderHooks;h!==null&&g0(e,h,0,null),MS(e,0)}if(s||I6(e),rO(e),sO(e,0),i.contentQueries!==null&&_P(i,e),!o)if(d){let h=i.contentCheckHooks;h!==null&&m0(e,h)}else{let h=i.contentHooks;h!==null&&g0(e,h,1),MS(e,1)}O6(i,e);let u=i.components;u!==null&&lO(e,u,0);let f=i.viewQuery;if(f!==null&&YS(2,f,n),!o)if(d){let h=i.viewCheckHooks;h!==null&&m0(e,h)}else{let h=i.viewHooks;h!==null&&g0(e,h,2),MS(e,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),e[Zg]){for(let h of e[Zg])h();e[Zg]=null}o||(tO(e),e[Tt]&=-73)}catch(d){throw o||Ac(e),d}finally{c!==null&&(nu(c,l),a&&C6(c)),s0()}}function sO(i,e){for(let t=HI(i);t!==null;t=GI(t))for(let n=On;n<t.length;n++){let r=t[n];aO(r,e)}}function I6(i){for(let e=HI(i);e!==null;e=GI(e)){if(!(e[Tt]&2))continue;let t=e[Tc];for(let n=0;n<t.length;n++){let r=t[n];sS(r)}}}function P6(i,e,t){rn(qt.ComponentStart);let n=ao(e,i);try{aO(n,t)}finally{rn(qt.ComponentEnd,n[Ln])}}function aO(i,e){Qg(i)&&sC(i,e)}function sC(i,e){let n=i[nt],r=i[Tt],o=i[Mr],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&Sh(o)),s||=!1,o&&(o.dirty=!1),i[Tt]&=-9217,s)A6(n,i,n.template,i[Ln]);else if(r&8192){let a=ct(null);try{rO(i),sO(i,1);let l=n.components;l!==null&&lO(i,l,1),tO(i)}finally{ct(a)}}}function lO(i,e,t){for(let n=0;n<e.length;n++)P6(i,e[n],t)}function O6(i,e){let t=i.hostBindingOpCodes;if(t!==null)try{for(let n=0;n<t.length;n++){let r=t[n];if(r<0)nl(~r);else{let o=r,s=t[++n],a=t[++n];v2(s,o);let l=e[o];rn(qt.HostBindingsUpdateStart,l);try{a(2,l)}finally{rn(qt.HostBindingsUpdateEnd,l)}}}}finally{nl(-1)}}function J0(i,e){let t=gS()?64:1088;for(i[Io].changeDetectionScheduler?.notify(e);i;){i[Tt]|=t;let n=Ka(i);if(Dc(i)&&!n)return i;i=n}return null}function cO(i,e,t,n){return[i,!0,0,e,null,n,null,t,null,null]}function dO(i,e){let t=On+e;if(t<i.length)return i[t]}function Ou(i,e,t,n=!0){let r=e[nt];if(R6(r,e,i,t),n){let s=oC(t,i),a=e[Jt],l=a.parentNode(i[bs]);l!==null&&KV(r,i[Yi],a,e,l,s)}let o=e[Xi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function dw(i,e){let t=qh(i,e);return t!==void 0&&q0(t[nt],t),t}function qh(i,e){if(i.length<=On)return;let t=On+e,n=i[t];if(n){let r=n[Ja];r!==null&&r!==i&&tw(r,n),e>0&&(i[t-1][ro]=n[ro]);let o=Fh(i,On+e);qV(n[nt],n);let s=o[vs];s!==null&&s.detachView(o[nt]),n[Gn]=null,n[ro]=null,n[Tt]&=-129}return n}function R6(i,e,t,n){let r=On+n,o=t.length;n>0&&(t[r-1][ro]=e),n<o-On?(e[ro]=t[r],X1(t,On+n,e)):(t.push(e),e[ro]=null),e[Gn]=t;let s=e[Ja];s!==null&&t!==s&&uO(s,e);let a=e[vs];a!==null&&a.insertView(i),e0(e),e[Tt]|=128}function uO(i,e){let t=i[Tc],n=e[Gn];if(oo(n))i[Tt]|=2;else{let r=n[Gn][di];e[di]!==r&&(i[Tt]|=2)}t===null?i[Tc]=[e]:t.push(e)}var ol=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[nt];return Xh(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[Ln]}set context(e){this._lView[Ln]=e}get destroyed(){return el(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Gn];if(Tr(e)){let t=e[Lh],n=t?t.indexOf(this):-1;n>-1&&(qh(e,n),Fh(t,n))}this._attachedToViewContainer=!1}q0(this._lView[nt],this._lView)}onDestroy(e){aS(this._lView,e)}markForCheck(){J0(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Tt]&=-129}reattach(){e0(this._lView),this._lView[Tt]|=128}detectChanges(){this._lView[Tt]|=1024,oO(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new qe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Dc(this._lView),t=this._lView[Ja];t!==null&&!e&&tw(t,this._lView),jP(this._lView[nt],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new qe(902,!1);this._appRef=e;let t=Dc(this._lView),n=this._lView[Ja];n!==null&&!t&&uO(n,this._lView),e0(this._lView)}};var Nc=(()=>{class i{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=k6;constructor(t,n,r){this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){let o=Pu(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new ol(o)}}return i})();function k6(){return Q0(wi(),pt())}function Q0(i,e){return i.type&4?new Nc(e,i,Au(i,e)):null}function Ru(i,e,t,n,r){let o=i.data[e];if(o===null)o=F6(i,e,t,n,r),g2()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=n,o.attrs=r;let s=h2();o.injectorIndex=s===null?-1:s.injectorIndex}return vu(o,!0),o}function F6(i,e,t,n,r){let o=hS(),s=pS(),a=s?o:o&&o.parent,l=i.data[e]=L6(i,a,t,e,n,r);return N6(i,l,o,s),l}function N6(i,e,t,n){i.firstChild===null&&(i.firstChild=e),t!==null&&(n?t.child==null&&e.parent!==null&&(t.child=e):t.next===null&&(t.next=e,e.prev=t))}function L6(i,e,t,n,r,o){let s=e?e.injectorIndex:-1,a=0;return n0()&&(a|=128),{type:t,index:n,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var U6=new RegExp(`^(\\d+)*(${$I}|${WI})*(.*)`);function B6(i){let e=i.match(U6),[t,n,r,o]=e,s=n?parseInt(n,10):r,a=[];for(let[l,c,d]of o.matchAll(/(f|n)(\d*)/g)){let u=parseInt(d,10)||1;a.push(c,u)}return[s,...a]}function z6(i){return!i.prev&&i.parent?.type===8}function IS(i){return i.index-Kt}function V6(i,e){let t=i.i18nNodes;if(t)return t.get(e)}function ev(i,e,t,n){let r=IS(n),o=V6(i,r);if(o===void 0){let s=i.data[KI];if(s?.[r])o=G6(s[r],t);else if(e.firstChild===n)o=i.firstChild;else{let a=n.prev===null,l=n.prev??n.parent;if(z6(n)){let c=IS(n.parent);o=$S(i,c)}else{let c=so(l,t);if(a)o=c.firstChild;else{let d=IS(l),u=$S(i,d);if(l.type===2&&u){let h=UC(i,d)+1;o=tv(h,u)}else o=c.nextSibling}}}}return o}function tv(i,e){let t=e;for(let n=0;n<i;n++)t=t.nextSibling;return t}function H6(i,e){let t=i;for(let n=0;n<e.length;n+=2){let r=e[n],o=e[n+1];for(let s=0;s<o;s++)switch(r){case Wz:t=t.firstChild;break;case $z:t=t.nextSibling;break}}return t}function G6(i,e){let[t,...n]=B6(i),r;if(t===WI)r=e[di][$i];else if(t===$I)r=kP(e[di][$i]);else{let o=Number(t);r=Dr(e[o+Kt])}return H6(r,n)}var j6=!1;function fO(i){j6=i}function W6(i){let e=i[Xi];if(e){let{i18nNodes:t,dehydratedIcuData:n}=e;if(t&&n){let r=i[Jt];for(let o of n.values())$6(r,t,o)}e.i18nNodes=void 0,e.dehydratedIcuData=void 0}}function $6(i,e,t){for(let n of t.node.cases[t.case]){let r=e.get(n.index-Kt);r&&$C(i,r,!1)}}function nv(i){let e=i[Po]??[],n=i[Gn][Jt],r=[];for(let o of e)o.data[ZI]!==void 0?r.push(o):hO(o,n);i[Po]=r}function Y6(i){let{lContainer:e}=i,t=e[Po];if(t===null)return;let r=e[Gn][Jt];for(let o of t)hO(o,r)}function hO(i,e){let t=0,n=i.firstChild;if(n){let r=i.data[Yh];for(;t<r;){let o=n.nextSibling;$C(e,n,!1),n=o,t++}}}function iv(i){nv(i);let e=i[$i];oo(e)&&P0(e);for(let t=On;t<i.length;t++)P0(i[t])}function P0(i){W6(i);let e=i[nt];for(let t=Kt;t<e.bindingStartIndex;t++)if(Tr(i[t])){let n=i[t];iv(n)}else oo(i[t])&&P0(i[t])}function uw(i){let e=i._views;for(let t of e){let n=gP(t);n!==null&&n[$i]!==null&&(oo(n)?P0(n):iv(n))}}function X6(i,e,t,n){i!==null&&(t.cleanup(e),iv(i.lContainer),uw(n))}function q6(i,e){let t=[];for(let n of e)for(let r=0;r<(n[PC]??1);r++){let o={data:n,firstChild:null};n[Yh]>0&&(o.firstChild=i,i=tv(n[Yh],i)),t.push(o)}return[i,t]}var pO=()=>null,mO=()=>null;function gO(){pO=K6,mO=Z6}function K6(i,e){return bO(i,e)?i[Po].shift():(nv(i),null)}function Kh(i,e){return pO(i,e)}function Z6(i,e,t){if(e.tView.ssrId===null)return null;let n=Kh(i,e.tView.ssrId);return t[nt].firstUpdatePass&&n===null&&J6(t,e),n}function vO(i,e,t){return mO(i,e,t)}function J6(i,e){let t=e;for(;t;){if(Q2(i,t))return;if((t.flags&256)===256)break;t=t.prev}for(t=e.next;t&&(t.flags&512)===512;){if(Q2(i,t))return;t=t.next}}function bO(i,e){let t=i[Po];return!e||t===null||t.length===0?!1:t[0].data[qI]===e}function Q2(i,e){let t=e.tView?.ssrId;if(t==null)return!1;let n=i[e.index];return Tr(n)&&bO(n,t)?(nv(n),!0):!1}var yO=class{},rv=class{},aC=class{resolveComponentFactory(e){throw new qe(917,!1)}},ov=class{static NULL=new aC},Lc=class{},Es=(()=>{class i{destroyNode=null;static __NG_ELEMENT_ID__=()=>Q6()}return i})();function Q6(){let i=pt(),e=wi(),t=ao(e.index,i);return(oo(t)?t:i)[Jt]}var xO=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>null})}return i})();var y0={},Su=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,y0,n);return r!==y0||t===y0?r:this.parentInjector.get(e,t,n)}};function O0(i,e,t){let n=t?i.styles:null,r=t?i.classes:null,o=0;if(e!==null)for(let s=0;s<e.length;s++){let a=e[s];if(typeof a=="number")o=a;else if(o==1)r=Hg(r,a);else if(o==2){let l=a,c=e[++s];n=Hg(n,l+": "+c+";")}}t?i.styles=n:i.stylesWithoutHost=n,t?i.classes=r:i.classesWithoutHost=r}function Gt(i,e=0){let t=pt();if(t===null)return Ke(i,e);let n=wi();return kI(n,t,Si(i),e)}function _O(i,e,t,n,r){let o=n===null?null:{"":-1},s=r(i,t);if(s!==null){let a=s,l=null,c=null;for(let d of s)if(d.resolveHostDirectives!==null){[a,l,c]=d.resolveHostDirectives(s);break}n8(i,e,t,a,o,l,c)}o!==null&&n!==null&&e8(t,n,o)}function e8(i,e,t){let n=i.localNames=[];for(let r=0;r<e.length;r+=2){let o=t[e[r+1]];if(o==null)throw new qe(-301,!1);n.push(e[r],o)}}function t8(i,e,t){e.componentOffset=t,(i.components??=[]).push(e.index)}function n8(i,e,t,n,r,o,s){let a=n.length,l=null;for(let f=0;f<a;f++){let h=n[f];l===null&&xs(h)&&(l=h,t8(i,t,f)),VS(M0(t,e),i,h.type)}l8(t,i.data.length,a),l?.viewProvidersResolver&&l.viewProvidersResolver(l);for(let f=0;f<a;f++){let h=n[f];h.providersResolver&&h.providersResolver(h)}let c=!1,d=!1,u=UP(i,e,a,null);a>0&&(t.directiveToIndex=new Map);for(let f=0;f<a;f++){let h=n[f];if(t.mergedAttrs=wu(t.mergedAttrs,h.hostAttrs),r8(i,t,e,u,h),a8(u,h,r),s!==null&&s.has(h)){let[v,g]=s.get(h);t.directiveToIndex.set(h.type,[u,v+t.directiveStart,g+t.directiveStart])}else(o===null||!o.has(h))&&t.directiveToIndex.set(h.type,u);h.contentQueries!==null&&(t.flags|=4),(h.hostBindings!==null||h.hostAttrs!==null||h.hostVars!==0)&&(t.flags|=64);let p=h.type.prototype;!c&&(p.ngOnChanges||p.ngOnInit||p.ngDoCheck)&&((i.preOrderHooks??=[]).push(t.index),c=!0),!d&&(p.ngOnChanges||p.ngDoCheck)&&((i.preOrderCheckHooks??=[]).push(t.index),d=!0),u++}i8(i,t,o)}function i8(i,e,t){for(let n=e.directiveStart;n<e.directiveEnd;n++){let r=i.data[n];if(t===null||!t.has(r))eI(0,e,r,n),eI(1,e,r,n),nI(e,n,!1);else{let o=t.get(r);tI(0,e,o,n),tI(1,e,o,n),nI(e,n,!0)}}}function eI(i,e,t,n){let r=i===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s;i===0?s=e.inputs??={}:s=e.outputs??={},s[o]??=[],s[o].push(n),SO(e,o)}}function tI(i,e,t,n){let r=i===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s=r[o],a;i===0?a=e.hostDirectiveInputs??={}:a=e.hostDirectiveOutputs??={},a[s]??=[],a[s].push(n,o),SO(e,s)}}function SO(i,e){e==="class"?i.flags|=8:e==="style"&&(i.flags|=16)}function nI(i,e,t){let{attrs:n,inputs:r,hostDirectiveInputs:o}=i;if(n===null||!t&&r===null||t&&o===null||qC(i)){i.initialInputs??=[],i.initialInputs.push(null);return}let s=null,a=0;for(;a<n.length;){let l=n[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!t&&r.hasOwnProperty(l)){let c=r[l];for(let d of c)if(d===e){s??=[],s.push(l,n[a+1]);break}}else if(t&&o.hasOwnProperty(l)){let c=o[l];for(let d=0;d<c.length;d+=2)if(c[d]===e){s??=[],s.push(c[d+1],n[a+1]);break}}a+=2}i.initialInputs??=[],i.initialInputs.push(s)}function r8(i,e,t,n,r){i.data[n]=r;let o=r.factory||(r.factory=Xa(r.type,!0)),s=new Rc(o,xs(r),Gt,null);i.blueprint[n]=s,t[n]=s,o8(i,e,n,UP(i,t,r.hostVars,Ei),r)}function o8(i,e,t,n,r){let o=r.hostBindings;if(o){let s=i.hostBindingOpCodes;s===null&&(s=i.hostBindingOpCodes=[]);let a=~e.index;s8(s)!=a&&s.push(a),s.push(t,n,o)}}function s8(i){let e=i.length;for(;e>0;){let t=i[--e];if(typeof t=="number"&&t<0)return t}return 0}function a8(i,e,t){if(t){if(e.exportAs)for(let n=0;n<e.exportAs.length;n++)t[e.exportAs[n]]=i;xs(e)&&(t[""]=i)}}function l8(i,e,t){i.flags|=1,i.directiveStart=e,i.directiveEnd=e+t,i.providerIndexes=e}function fw(i,e,t,n,r,o,s,a){let l=e[nt],c=l.consts,d=lo(c,s),u=Ru(l,i,t,n,d);return o&&_O(l,e,u,lo(c,a),r),u.mergedAttrs=wu(u.mergedAttrs,u.attrs),u.attrs!==null&&O0(u,u.attrs,!1),u.mergedAttrs!==null&&O0(u,u.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,u),u}function hw(i,e){MI(i,e),tS(e)&&i.queries.elementEnd(e)}function c8(i,e,t,n,r,o){let s=e.consts,a=lo(s,r),l=Ru(e,i,t,n,a);if(l.mergedAttrs=wu(l.mergedAttrs,l.attrs),o!=null){let c=lo(s,o);l.localNames=[];for(let d=0;d<c.length;d+=2)l.localNames.push(c[d],-1)}return l.attrs!==null&&O0(l,l.attrs,!1),l.mergedAttrs!==null&&O0(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function sv(i,e,t){return i[e]=t}function d8(i,e){return i[e]}function Ir(i,e,t){if(t===Ei)return!1;let n=i[e];return Object.is(n,t)?!1:(i[e]=t,!0)}function Zh(i,e,t,n){let r=Ir(i,e,t);return Ir(i,e+1,n)||r}function u8(i,e,t,n,r){let o=Zh(i,e,t,n);return Ir(i,e+2,r)||o}function f8(i,e,t,n,r,o){let s=Zh(i,e,t,n);return Zh(i,e+2,r,o)||s}function x0(i,e,t){return function n(r){let o=ys(i)?ao(i.index,e):e;J0(o,5);let s=e[Ln],a=iI(e,s,t,r),l=n.__ngNextListenerFn__;for(;l;)a=iI(e,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function iI(i,e,t,n){let r=ct(null);try{return rn(qt.OutputStart,e,t),t(n)!==!1}catch(o){return aw(i,o),!1}finally{rn(qt.OutputEnd,e,t),ct(r)}}function CO(i,e,t,n,r,o,s,a){let l=mu(i),c=!1,d=null;if(!n&&l&&(d=p8(e,t,o,i.index)),d!==null){let u=d.__ngLastListenerFn__||d;u.__ngNextListenerFn__=s,d.__ngLastListenerFn__=s,c=!0}else{let u=so(i,t),f=n?n(u):u;Yz(t,f,o,a);let h=r.listen(f,o,a);if(!h8(o)){let p=n?v=>n(Dr(v[i.index])):i.index;wO(p,e,t,o,a,h,!1)}}return c}function h8(i){return i.startsWith("animation")||i.startsWith("transition")}function p8(i,e,t,n){let r=i.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===t&&r[o+1]===n){let a=e[hu],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function wO(i,e,t,n,r,o,s){let a=e.firstCreatePass?cS(e):null,l=lS(t),c=l.length;l.push(r,o),a&&a.push(n,i,c,(c+1)*(s?-1:1))}function rI(i,e,t,n,r,o){let s=e[t],a=e[nt],c=a.data[t].outputs[n],u=s[c].subscribe(o);wO(i.index,a,e,r,o,u,!0)}var lC=Symbol("BINDING");function EO(i){return i.debugInfo?.className||i.type.name||null}var cC=class extends ov{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=sa(e);return new Mu(t,this.ngModule)}};function m8(i){return Object.keys(i).map(e=>{let[t,n,r]=i[e],o={propName:t,templateName:e,isSignal:(n&$0.SignalBased)!==0};return r&&(o.transform=r),o})}function g8(i){return Object.keys(i).map(e=>({propName:i[e],templateName:e}))}function v8(i,e,t){let n=e instanceof Pi?e:e?.injector;return n&&i.getStandaloneInjector!==null&&(n=i.getStandaloneInjector(n)||n),n?new Su(t,n):t}function b8(i){let e=i.get(Lc,null);if(e===null)throw new qe(407,!1);let t=i.get(xO,null),n=i.get(ms,null),r=i.get(ws,null,{optional:!0});return{rendererFactory:e,sanitizer:t,changeDetectionScheduler:n,ngReflect:!1,tracingService:r}}function y8(i,e){let t=MO(i);return WC(e,t,t==="svg"?nS:t==="math"?o2:null)}function MO(i){return(i.selectors[0][0]||"div").toLowerCase()}var Mu=class extends rv{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=m8(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=g8(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=LV(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,o,s){rn(qt.DynamicComponentStart);let a=ct(null);try{let l=this.componentDef,c=v8(l,r||this.ngModule,e),d=b8(c),u=d.tracingService;return u&&u.componentCreate?u.componentCreate(EO(l),()=>this.createComponentRef(d,c,t,n,o,s)):this.createComponentRef(d,c,t,n,o,s)}finally{ct(a)}}createComponentRef(e,t,n,r,o,s){let a=this.componentDef,l=x8(r,a,s,o),c=e.rendererFactory.createRenderer(null,a),d=r?a6(c,r,a.encapsulation,t):y8(a,c),u=s?.some(oI)||o?.some(p=>typeof p!="function"&&p.bindings.some(oI)),f=ZC(null,l,null,512|LP(a),null,null,e,c,t,null,mP(d,t,!0));f[Kt]=d,o0(f);let h=null;try{let p=fw(Kt,f,2,"#host",()=>l.directiveRegistry,!0,0);OP(c,d,p),Eu(d,f),Z0(l,f,p),BC(l,p,f),hw(l,p),n!==void 0&&S8(p,this.ngContentSelectors,n),h=ao(p.index,f),f[Ln]=h[Ln],cw(l,f,null)}catch(p){throw h!==null&&GS(h),GS(f),p}finally{rn(qt.DynamicComponentEnd),s0()}return new R0(this.componentType,f,!!u)}};function x8(i,e,t,n){let r=i?["ng-version","21.2.4"]:UV(e.selectors[0]),o=null,s=null,a=0;if(t)for(let d of t)a+=d[lC].requiredVars,d.create&&(d.targetIdx=0,(o??=[]).push(d)),d.update&&(d.targetIdx=0,(s??=[]).push(d));if(n)for(let d=0;d<n.length;d++){let u=n[d];if(typeof u!="function")for(let f of u.bindings){a+=f[lC].requiredVars;let h=d+1;f.create&&(f.targetIdx=h,(o??=[]).push(f)),f.update&&(f.targetIdx=h,(s??=[]).push(f))}}let l=[e];if(n)for(let d of n){let u=typeof d=="function"?d:d.type,f=Wg(u);l.push(f)}return KC(0,null,_8(o,s),1,a,l,null,null,null,[r],null)}function _8(i,e){return!i&&!e?null:t=>{if(t&1&&i)for(let n of i)n.create();if(t&2&&e)for(let n of e)n.update()}}function oI(i){let e=i[lC].kind;return e==="input"||e==="twoWay"}var R0=class extends yO{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=gu(t[nt],Kt),this.location=Au(this._tNode,t),this.instance=ao(this._tNode.index,t)[Ln],this.hostView=this.changeDetectorRef=new ol(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,o=lw(n,r[nt],r,e,t);this.previousInputValues.set(e,t);let s=ao(n.index,r);J0(s,1)}get injector(){return new Oc(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function S8(i,e,t){let n=i.projection=[];for(let r=0;r<e.length;r++){let o=t[r];n.push(o!=null&&o.length?Array.from(o):null)}}var Bc=(()=>{class i{static __NG_ELEMENT_ID__=C8}return i})();function C8(){let i=wi();return TO(i,pt())}var dC=class i extends Bc{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return Au(this._hostTNode,this._hostLView)}get injector(){return new Oc(this._hostTNode,this._hostLView)}get parentInjector(){let e=TC(this._hostTNode,this._hostLView);if(DI(e)){let t=w0(e,this._hostLView),n=C0(e),r=t[nt].data[n+8];return new Oc(r,t)}else return new Oc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=sI(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-On}createEmbeddedView(e,t,n){let r,o;typeof n=="number"?r=n:n!=null&&(r=n.index,o=n.injector);let s=Kh(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,Fc(this._hostTNode,s)),a}createComponent(e,t,n,r,o,s,a){let l=e&&!vz(e),c;if(l)c=t;else{let g=t||{};c=g.index,n=g.injector,r=g.projectableNodes,o=g.environmentInjector||g.ngModuleRef,s=g.directives,a=g.bindings}let d=l?e:new Mu(sa(e)),u=n||this.parentInjector;if(!o&&d.ngModule==null){let m=(l?u:this.parentInjector).get(Pi,null);m&&(o=m)}let f=sa(d.componentType??{}),h=Kh(this._lContainer,f?.id??null),p=h?.firstChild??null,v=d.create(u,r,p,o,s,a);return this.insertImpl(v.hostView,c,Fc(this._hostTNode,h)),v}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(s2(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[Gn],c=new i(l,l[Yi],l[Gn]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return Ou(s,r,o,n),e.attachToViewContainerRef(),X1(PS(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=sI(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=qh(this._lContainer,t);n&&(Fh(PS(this._lContainer),t),q0(n[nt],n))}detach(e){let t=this._adjustIndex(e,-1),n=qh(this._lContainer,t);return n&&Fh(PS(this._lContainer),t)!=null?new ol(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function sI(i){return i[Lh]}function PS(i){return i[Lh]||(i[Lh]=[])}function TO(i,e){let t,n=e[i.index];return Tr(n)?t=n:(t=cO(n,e,null,i),e[i.index]=t,JC(e,t)),DO(t,e,i,n),new dC(t,i,e)}function w8(i,e){let t=i[Jt],n=t.createComment(""),r=so(e,i),o=t.parentNode(r);return A0(t,o,n,t.nextSibling(r),!1),n}var DO=AO,pw=()=>!1;function E8(i,e,t){return pw(i,e,t)}function AO(i,e,t,n){if(i[bs])return;let r;t.type&8?r=Dr(n):r=w8(e,t),i[bs]=r}function M8(i,e,t){if(i[bs]&&i[Po])return!0;let n=t[Xi],r=e.index-Kt;if(!n||zI(e)||yP(n,r))return!1;let s=$S(n,r),a=n.data[B0]?.[r],[l,c]=q6(s,a);return i[bs]=l,i[Po]=c,!0}function T8(i,e,t,n){pw(i,t,e)||AO(i,e,t,n)}function IO(){DO=T8,pw=M8}var uC=class i{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},fC=class i{queries;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;o<n;o++){let s=t.getByIndex(o),a=this.queries[s.indexInDeclarationView];r.push(a.clone())}return new i(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)RO(e,t).matches!==null&&this.queries[t].setDirty()}},hC=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=k8(e):this.predicate=e}},pC=class i{queries;constructor(e=[]){this.queries=e}elementStart(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let n=0;n<this.length;n++){let r=t!==null?t.length:0,o=this.getByIndex(n).embeddedTView(e,r);o&&(o.indexInDeclarationView=n,t!==null?t.push(o):t=[o])}return t!==null?new i(t):null}template(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},mC=class i{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,t=-1){this.metadata=e,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new i(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let t=this._declarationNodeIndex,n=e.parent;for(;n!==null&&n.type&8&&n.index!==t;)n=n.parent;return t===(n!==null?n.index:-1)}return this._appliesToNextNode}matchTNode(e,t){let n=this.metadata.predicate;if(Array.isArray(n))for(let r=0;r<n.length;r++){let o=n[r];this.matchTNodeWithReadOption(e,t,D8(t,o)),this.matchTNodeWithReadOption(e,t,v0(t,e,o,!1,!1))}else n===Nc?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,v0(t,e,n,!1,!1))}matchTNodeWithReadOption(e,t,n){if(n!==null){let r=this.metadata.read;if(r!==null)if(r===Oi||r===Bc||r===Nc&&t.type&4)this.addMatch(t.index,-2);else{let o=v0(t,e,r,!1,!1);o!==null&&this.addMatch(t.index,o)}else this.addMatch(t.index,n)}}addMatch(e,t){this.matches===null?this.matches=[e,t]:this.matches.push(e,t)}};function D8(i,e){let t=i.localNames;if(t!==null){for(let n=0;n<t.length;n+=2)if(t[n]===e)return t[n+1]}return null}function A8(i,e){return i.type&11?Au(i,e):i.type&4?Q0(i,e):null}function I8(i,e,t,n){return t===-1?A8(e,i):t===-2?P8(i,e,n):$h(i,i[nt],t,e)}function P8(i,e,t){if(t===Oi)return Au(e,i);if(t===Nc)return Q0(e,i);if(t===Bc)return TO(e,i)}function PO(i,e,t,n){let r=e[vs].queries[n];if(r.matches===null){let o=i.data,s=t.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let c=s[l];if(c<0)a.push(null);else{let d=o[c];a.push(I8(e,d,s[l+1],t.metadata.read))}}r.matches=a}return r.matches}function gC(i,e,t,n){let r=i.queries.getByIndex(t),o=r.matches;if(o!==null){let s=PO(i,e,r,t);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)n.push(s[a/2]);else{let c=o[a+1],d=e[-l];for(let u=On;u<d.length;u++){let f=d[u];f[Ja]===f[Gn]&&gC(f[nt],f,c,n)}if(d[Tc]!==null){let u=d[Tc];for(let f=0;f<u.length;f++){let h=u[f];gC(h[nt],h,c,n)}}}}}return n}function OO(i,e){return i[vs].queries[e].queryList}function O8(i,e,t){let n=new T0((t&4)===4);return c2(i,e,n,n.destroy),(e[vs]??=new fC).queries.push(new uC(n))-1}function R8(i,e,t){let n=Rn();return n.firstCreatePass&&(F8(n,new hC(i,e,t),-1),(e&2)===2&&(n.staticViewQueries=!0)),O8(n,pt(),e)}function k8(i){return i.split(",").map(e=>e.trim())}function F8(i,e,t){i.queries===null&&(i.queries=new pC),i.queries.track(new mC(e,t))}function RO(i,e){return i.queries.getByIndex(e)}function N8(i,e){let t=i[nt],n=RO(t,e);return n.crossesNgTemplate?gC(t,i,e,[]):PO(t,i,n,e)}function kO(i,e,t){let n,r=Ch(()=>{n._dirtyCounter();let o=U8(n,i);if(e&&o===void 0)throw new qe(-951,!1);return o});return n=r[ti],n._dirtyCounter=F(0),n._flatValue=void 0,r}function FO(i){return kO(!0,!1,i)}function NO(i){return kO(!0,!0,i)}function L8(i,e){let t=i[ti];t._lView=pt(),t._queryIndex=e,t._queryList=OO(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(n=>n+1))}function U8(i,e){let t=i._lView,n=i._queryIndex;if(t===void 0||n===void 0||t[Tt]&4)return e?void 0:Ii;let r=OO(t,n),o=N8(t,n);return r.reset(o,Lz),e?r.first:r._changesDetected||i._flatValue===void 0?i._flatValue=r.toArray():i._flatValue}var Jh=class{};var Qh=class extends Jh{injector;componentFactoryResolver=new cC(this);instance=null;constructor(e){super();let t=new Sc([...e.providers,{provide:Jh,useValue:this},{provide:ov,useValue:this.componentFactoryResolver}],e.parent||uu(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function mw(i,e,t=null){return new Qh({providers:i,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var B8=(()=>{class i{_injector;cachedInjectors=new Map;constructor(t){this._injector=t}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){let n=Kg(!1,t.type),r=n.length>0?mw([n],this._injector,""):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=_e({token:i,providedIn:"environment",factory:()=>new i(Ke(Pi))})}return i})();function it(i){return np(()=>{let e=LO(i),t=he(k({},e),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===DC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&i.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(B8).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||Fo.Emulated,styles:i.styles||Ii,_:null,schemas:i.schemas||null,tView:null,id:""});e.standalone&&Uo("NgStandalone"),UO(t);let n=i.dependencies;return t.directiveDefs=aI(n,z8),t.pipeDefs=aI(n,j1),t.id=G8(t),t})}function z8(i){return sa(i)||Wg(i)}function ga(i){return np(()=>({type:i.type,bootstrap:i.bootstrap||Ii,declarations:i.declarations||Ii,imports:i.imports||Ii,exports:i.exports||Ii,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function V8(i,e){if(i==null)return Za;let t={};for(let n in i)if(i.hasOwnProperty(n)){let r=i[n],o,s,a,l;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o,l=r[3]||null):(o=r,s=r,a=$0.None,l=null),t[o]=[n,a,l],e[o]=s}return t}function H8(i){if(i==null)return Za;let e={};for(let t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function In(i){return np(()=>{let e=LO(i);return UO(e),e})}function av(i){return{type:i.type,name:i.name,factory:null,pure:i.pure!==!1,standalone:i.standalone??!0,onDestroy:i.type.prototype.ngOnDestroy||null}}function LO(i){let e={};return{type:i.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:i.hostBindings||null,hostVars:i.hostVars||0,hostAttrs:i.hostAttrs||null,contentQueries:i.contentQueries||null,declaredInputs:e,inputConfig:i.inputs||Za,exportAs:i.exportAs||null,standalone:i.standalone??!0,signals:i.signals===!0,selectors:i.selectors||Ii,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:V8(i.inputs,e),outputs:H8(i.outputs),debugInfo:null}}function UO(i){i.features?.forEach(e=>e(i))}function aI(i,e){return i?()=>{let t=typeof i=="function"?i():i,n=[];for(let r of t){let o=e(r);o!==null&&n.push(o)}return n}:null}function G8(i){let e=0,t=typeof i.consts=="function"?"":i.consts,n=[i.selectors,i.ngContentSelectors,i.hostVars,i.hostAttrs,t,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];for(let o of n.join("|"))e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function j8(i){return Object.getPrototypeOf(i.prototype).constructor}function Pr(i){let e=j8(i.type),t=!0,n=[i];for(;e;){let r;if(xs(i))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new qe(903,!1);r=e.\u0275dir}if(r){if(t){n.push(r);let s=i;s.inputs=OS(i.inputs),s.declaredInputs=OS(i.declaredInputs),s.outputs=OS(i.outputs);let a=r.hostBindings;a&&q8(i,a);let l=r.viewQuery,c=r.contentQueries;if(l&&Y8(i,l),c&&X8(i,c),W8(i,r),jA(i.outputs,r.outputs),xs(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<o.length;s++){let a=o[s];a&&a.ngInherit&&a(i),a===Pr&&(t=!1)}}e=Object.getPrototypeOf(e)}$8(n)}function W8(i,e){for(let t in e.inputs){if(!e.inputs.hasOwnProperty(t)||i.inputs.hasOwnProperty(t))continue;let n=e.inputs[t];n!==void 0&&(i.inputs[t]=n,i.declaredInputs[t]=e.declaredInputs[t])}}function $8(i){let e=0,t=null;for(let n=i.length-1;n>=0;n--){let r=i[n];r.hostVars=e+=r.hostVars,r.hostAttrs=wu(r.hostAttrs,t=wu(t,r.hostAttrs))}}function OS(i){return i===Za?{}:i===Ii?[]:i}function Y8(i,e){let t=i.viewQuery;t?i.viewQuery=(n,r)=>{e(n,r),t(n,r)}:i.viewQuery=e}function X8(i,e){let t=i.contentQueries;t?i.contentQueries=(n,r,o)=>{e(n,r,o),t(n,r,o)}:i.contentQueries=e}function q8(i,e){let t=i.hostBindings;t?i.hostBindings=(n,r)=>{e(n,r),t(n,r)}:i.hostBindings=e}function BO(i,e,t,n,r,o,s,a){if(t.firstCreatePass){i.mergedAttrs=wu(i.mergedAttrs,i.attrs);let d=i.tView=KC(2,i,r,o,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,t.consts,null);t.queries!==null&&(t.queries.template(t,i),d.queries=t.queries.embeddedTView(i))}a&&(i.flags|=a),vu(i,!1);let l=zO(t,e,i,n);a0()&&nw(t,e,l,i),Eu(l,e);let c=cO(l,e,l,i);e[n+Kt]=c,JC(e,c),E8(c,i,e)}function K8(i,e,t,n,r,o,s,a,l,c,d){let u=t+Kt,f;return e.firstCreatePass?(f=Ru(e,u,4,s||null,a||null),t0()&&_O(e,i,f,lo(e.consts,c),rw),MI(e,f)):f=e.data[u],BO(f,i,e,t,n,r,o,l),mu(f)&&Z0(e,i,f),c!=null&&cp(i,f,d),f}function ep(i,e,t,n,r,o,s,a,l,c,d){let u=t+Kt,f;if(e.firstCreatePass){if(f=Ru(e,u,4,s||null,a||null),c!=null){let h=lo(e.consts,c);f.localNames=[];for(let p=0;p<h.length;p+=2)f.localNames.push(h[p],-1)}}else f=e.data[u];return BO(f,i,e,t,n,r,o,l),c!=null&&cp(i,f,d),f}function Bo(i,e,t,n,r,o,s,a){let l=pt(),c=Rn(),d=lo(c.consts,o);return K8(l,c,i,e,t,n,r,d,void 0,s,a),Bo}var zO=VO;function VO(i,e,t,n){return da(!0),e[Jt].createComment("")}function Z8(i,e,t,n){let r=!H0(e,t);da(r);let o=e[Xi]?.data[XI]?.[n]??null;if(o!==null&&t.tView!==null&&t.tView.ssrId===null&&(t.tView.ssrId=o),r)return VO(i,e);let s=e[Xi],a=ev(s,i,e,t);V0(s,n,a);let l=UC(s,n);return tv(l,a)}function HO(){zO=Z8}var Ar=(function(i){return i[i.NOT_STARTED=0]="NOT_STARTED",i[i.IN_PROGRESS=1]="IN_PROGRESS",i[i.COMPLETE=2]="COMPLETE",i[i.FAILED=3]="FAILED",i})(Ar||{}),lI=0,J8=1,Qn=(function(i){return i[i.Placeholder=0]="Placeholder",i[i.Loading=1]="Loading",i[i.Complete=2]="Complete",i[i.Error=3]="Error",i})(Qn||{});var Q8=0,dp=1;var eH=4,tH=5;var nH=7,Cu=8,iH=9,gw=(function(i){return i[i.Manual=0]="Manual",i[i.Playthrough=1]="Playthrough",i})(gw||{});function _0(i,e){let t=oH(i),n=e[t];if(n!==null){for(let r of n)r();e[t]=null}}function rH(i){_0(1,i),_0(0,i),_0(2,i)}function oH(i){let e=eH;return i===1?e=tH:i===2&&(e=iH),e}function GO(i){return i+1}function ku(i,e){let t=i[nt],n=GO(e.index);return i[n]}function up(i,e){let t=GO(e.index);return i.data[t]}function sH(i,e,t){let n=e[nt],r=up(n,t);switch(i){case Qn.Complete:return r.primaryTmplIndex;case Qn.Loading:return r.loadingTmplIndex;case Qn.Error:return r.errorTmplIndex;case Qn.Placeholder:return r.placeholderTmplIndex;default:return null}}function cI(i,e){return e===Qn.Placeholder?i.placeholderBlockConfig?.[lI]??null:e===Qn.Loading?i.loadingBlockConfig?.[lI]??null:null}function aH(i){return i.loadingBlockConfig?.[J8]??null}function dI(i,e){if(!i||i.length===0)return e;let t=new Set(i);for(let n of e)t.add(n);return i.length===t.size?i:Array.from(t)}function lH(i,e){let t=e.primaryTmplIndex+Kt;return gu(i,t)}var cH=(()=>{class i{cachedInjectors=new Map;getOrCreateInjector(t,n,r,o){if(!this.cachedInjectors.has(t)){let s=r.length>0?mw(r,n,o):null;this.cachedInjectors.set(t,s)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=_e({token:i,providedIn:"environment",factory:()=>new i})}return i})();var jO=new Ze("");function RS(i,e,t){return i.get(cH).getOrCreateInjector(e,i,t,"")}function dH(i,e,t){if(i instanceof Su){let r=i.injector,o=i.parentInjector,s=RS(o,e,t);return new Su(r,s)}let n=i.get(Pi);if(n!==i){let r=RS(n,e,t);return new Su(i,r)}return RS(i,e,t)}function Pc(i,e,t,n=!1){let r=t[Gn],o=r[nt];if(el(r))return;let s=ku(r,e),a=s[dp],l=s[nH];if(!(l!==null&&i<l)&&uI(a,i)&&uI(s[Q8]??-1,i)){let c=up(o,e),u=!n&&!0&&(aH(c)!==null||cI(c,Qn.Loading)!==null||cI(c,Qn.Placeholder))?hH:fH;try{u(i,s,t,e,r)}catch(f){aw(r,f)}}}function uH(i,e){let t=i[Po]?.findIndex(r=>r.data[JI]===e[dp])??-1;return{dehydratedView:t>-1?i[Po][t]:null,dehydratedViewIx:t}}function fH(i,e,t,n,r){rn(qt.DeferBlockStateStart);let o=sH(i,r,n);if(o!==null){e[dp]=i;let s=r[nt],a=o+Kt,l=gu(s,a),c=0;dw(t,c);let d;if(i===Qn.Complete){let p=up(s,n),v=p.providers;v&&v.length>0&&(d=dH(r[Er],p,v))}let{dehydratedView:u,dehydratedViewIx:f}=uH(t,e),h=Pu(r,l,null,{injector:d,dehydratedView:u});if(Ou(t,h,c,Fc(l,u)),J0(h,2),f>-1&&t[Po]?.splice(f,1),(i===Qn.Complete||i===Qn.Error)&&Array.isArray(e[Cu])){for(let p of e[Cu])p();e[Cu]=null}}rn(qt.DeferBlockStateEnd)}function uI(i,e){return i<e}function fI(i,e,t){i.loadingPromise.then(()=>{i.loadingState===Ar.COMPLETE?Pc(Qn.Complete,e,t):i.loadingState===Ar.FAILED&&Pc(Qn.Error,e,t)})}var hH=null;function vw(i){return typeof i=="function"&&i[ti]!==void 0}function bw(i){return vw(i)&&typeof i.set=="function"}var yw=new Ze("");function Fu(i){return!!i&&typeof i.then=="function"}function xw(i){return!!i&&typeof i.subscribe=="function"}var WO=new Ze("");var _w=(()=>{class i{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,n)=>{this.resolve=t,this.reject=n});appInits=Z(WO,{optional:!0})??[];injector=Z(Ci);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=fu(this.injector,r);if(Fu(o))t.push(o);else if(xw(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});t.push(s)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{n()}).catch(r=>{this.reject(r)}),t.length===0&&n(),this.initialized=!0}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Nu=new Ze("");function $O(){c1(()=>{let i="";throw new qe(600,i)})}function YO(i){return i.isBoundToModule}var pH=10;var Or=(()=>{class i{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=Z(ua);afterRenderManager=Z(ew);zonelessEnabled=Z(Hh);rootEffectScheduler=Z(c0);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Do;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=Z(rl);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(lr(t=>!t))}constructor(){Z(ws,{optional:!0})}whenStable(){let t;return new Promise(n=>{t=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{t.unsubscribe()})}_injector=Z(Pi);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,n){return this.bootstrapImpl(t,n)}bootstrapImpl(t,n,r=Ci.NULL){return this._injector.get(cr).run(()=>{rn(qt.BootstrapComponentStart);let s=t instanceof rv;if(!this._injector.get(_w).done){let p="";throw new qe(405,p)}let l;s?l=t:l=this._injector.get(ov).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=YO(l)?void 0:this._injector.get(Jh),d=n||l.selector,u=l.create(r,[],d,c),f=u.location.nativeElement,h=u.injector.get(yw,null);return h?.registerApplication(f),u.onDestroy(()=>{this.detachView(u.hostView),Wh(this.components,u),h?.unregisterApplication(f)}),this._loadComponent(u),rn(qt.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){rn(qt.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(Y0.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw rn(qt.ChangeDetectionEnd),new qe(101,!1);let t=ct(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,ct(t),this.afterTick.next(),rn(qt.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Lc,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<pH;){rn(qt.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{rn(qt.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let t=!1;if(this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r}of this.allViews){if(!n&&!Uh(r))continue;let o=n&&!this.zonelessEnabled?0:1;oO(r,o),t=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}t||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:t})=>Uh(t))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(t){let n=t;this._views.push(n),n.attachToAppRef(this)}detachView(t){let n=t;Wh(this._views,n),n.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(t),this._injector.get(Nu,[]).forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>Wh(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new qe(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Wh(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function XO(){let i,e;return{promise:new Promise((n,r)=>{i=n,e=r}),resolve:i,reject:e}}function qO(i,e,t){let n=e[Er],r=e[nt];if(i.loadingState!==Ar.NOT_STARTED)return i.loadingPromise??Promise.resolve();let o=ku(e,t),s=lH(r,i);i.loadingState=Ar.IN_PROGRESS,_0(1,o);let a=i.dependencyResolverFn,l=n.get(Ic).add();return a?(i.loadingPromise=Promise.allSettled(a()).then(c=>{let d=!1,u=[],f=[];for(let h of c)if(h.status==="fulfilled"){let p=h.value,v=sa(p)||Wg(p);if(v)u.push(v);else{let g=j1(p);g&&f.push(g)}}else{d=!0;break}if(d){if(i.loadingState=Ar.FAILED,i.errorTmplIndex===null){let p=new qe(-750,!1);aw(e,p)}}else{i.loadingState=Ar.COMPLETE;let h=s.tView;if(u.length>0){h.directiveRegistry=dI(h.directiveRegistry,u);let p=u.map(g=>g.type),v=Kg(!1,...p);i.providers=v}f.length>0&&(h.pipeRegistry=dI(h.pipeRegistry,f))}}),i.loadingPromise.finally(()=>{i.loadingPromise=null,l()})):(i.loadingPromise=Promise.resolve().then(()=>{i.loadingPromise=null,i.loadingState=Ar.COMPLETE,l()}),i.loadingPromise)}function mH(i,e){return e[Er].get(jO,null,{optional:!0})?.behavior!==gw.Manual}function gH(i,e,t){let n=e[nt],r=e[t.index];if(!mH(i,e))return;let o=ku(e,t),s=up(n,t);switch(rH(o),s.loadingState){case Ar.NOT_STARTED:Pc(Qn.Loading,t,r),qO(s,e,t),s.loadingState===Ar.IN_PROGRESS&&fI(s,t,r);break;case Ar.IN_PROGRESS:Pc(Qn.Loading,t,r),fI(s,t,r);break;case Ar.COMPLETE:Pc(Qn.Complete,t,r);break;case Ar.FAILED:Pc(Qn.Error,t,r);break;default:}}async function KO(i,e,t){let n=i.get(z0);if(n.hydrating.has(e))return;let{parentBlockPromise:o,hydrationQueue:s}=tV(e,i);if(s.length===0)return;o!==null&&s.shift(),yH(n,s),o!==null&&await o;let a=s[0];n.has(a)?await hI(i,s,t):n.awaitParentBlock(a,async()=>await hI(i,s,t))}async function hI(i,e,t){let n=i.get(z0),r=n.hydrating,o=i.get(rl),s=o.add();for(let l=0;l<e.length;l++){let c=e[l],d=n.get(c);if(d!=null){if(await _H(d),await xH(i),vH(d)){Y6(d),pI(e.slice(l),n);break}r.get(c).resolve()}else{bH(l,e,n),pI(e.slice(l),n);break}}let a=e[e.length-1];await r.get(a)?.promise,o.remove(s),t&&t(e),X6(n.get(a),e,n,i.get(Or))}function vH(i){return ku(i.lView,i.tNode)[dp]===Qn.Error}function bH(i,e,t){let n=i-1,r=n>-1?t.get(e[n]):null;r&&iv(r.lContainer)}function pI(i,e){let t=e.hydrating;for(let n in i)t.get(n)?.reject();e.cleanup(i)}function yH(i,e){for(let t of e)i.hydrating.set(t,XO())}function xH(i){return new Promise(e=>X0(e,{injector:i}))}async function _H(i){let{tNode:e,lView:t}=i,n=ku(t,e);return new Promise(r=>{SH(n,r),gH(2,t,e)})}function SH(i,e){Array.isArray(i[Cu])||(i[Cu]=[]),i[Cu].push(e)}function fn(i,e,t,n){let r=pt(),o=tl();if(Ir(r,o,e)){let s=Rn(),a=zh();m6(a,r,i,e,t,n)}return fn}function sl(){return pt()[di][Ln]}var vC=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 kS(i,e,t,n,r){return i===t&&Object.is(e,n)?1:Object.is(r(i,e),r(t,n))?-1:0}function CH(i,e,t,n){let r,o,s=0,a=i.length-1,l=void 0;if(Array.isArray(e)){ct(n);let c=e.length-1;for(ct(null);s<=a&&s<=c;){let d=i.at(s),u=e[s],f=kS(s,d,s,u,t);if(f!==0){f<0&&i.updateValue(s,u),s++;continue}let h=i.at(a),p=e[c],v=kS(a,h,c,p,t);if(v!==0){v<0&&i.updateValue(a,p),a--,c--;continue}let g=t(s,d),m=t(a,h),b=t(s,u);if(Object.is(b,m)){let y=t(c,p);Object.is(y,g)?(i.swap(s,a),i.updateValue(a,p),c--,a--):i.move(a,s),i.updateValue(s,u),s++;continue}if(r??=new k0,o??=gI(i,s,a,t),bC(i,r,s,b))i.updateValue(s,u),s++,a++;else if(o.has(b))r.set(g,i.detach(s)),a--;else{let y=i.create(s,e[s]);i.attach(s,y),s++,a++}}for(;s<=c;)mI(i,r,t,s,e[s]),s++}else if(e!=null){ct(n);let c=e[Symbol.iterator]();ct(null);let d=c.next();for(;!d.done&&s<=a;){let u=i.at(s),f=d.value,h=kS(s,u,s,f,t);if(h!==0)h<0&&i.updateValue(s,f),s++,d=c.next();else{r??=new k0,o??=gI(i,s,a,t);let p=t(s,f);if(bC(i,r,s,p))i.updateValue(s,f),s++,a++,d=c.next();else if(!o.has(p))i.attach(s,i.create(s,f)),s++,a++,d=c.next();else{let v=t(s,u);r.set(v,i.detach(s)),a--}}}for(;!d.done;)mI(i,r,t,i.length,d.value),d=c.next()}for(;s<=a;)i.destroy(i.detach(a--));r?.forEach(c=>{i.destroy(c)})}function bC(i,e,t,n){return e!==void 0&&e.has(n)?(i.attach(t,e.get(n)),e.delete(n),!0):!1}function mI(i,e,t,n,r){if(bC(i,e,n,t(n,r)))i.updateValue(n,r);else{let o=i.create(n,r);i.attach(n,o)}}function gI(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 k0=class{kvMap=new Map;_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,t,n,r,o,s,a){Uo("NgControlFlow");let l=pt(),c=Rn(),d=lo(c.consts,o);return ep(l,c,i,e,t,n,r,d,256,s,a),Sw}function Sw(i,e,t,n,r,o,s,a){Uo("NgControlFlow");let l=pt(),c=Rn(),d=lo(c.consts,o);return ep(l,c,i,e,t,n,r,d,512,s,a),Sw}function le(i,e){Uo("NgControlFlow");let t=pt(),n=tl(),r=t[n]!==Ei?t[n]:-1,o=r!==-1?F0(t,Kt+r):void 0,s=0;if(Ir(t,n,i)){let a=ct(null);try{if(o!==void 0&&dw(o,s),i!==-1){let l=Kt+i,c=F0(t,l),d=SC(t[nt],l),u=vO(c,d,t),f=Pu(t,d,e,{dehydratedView:u});Ou(c,f,s,Fc(d,u))}}finally{ct(a)}}else if(o!==void 0){let a=dO(o,s);a!==void 0&&(a[Ln]=e)}}var yC=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-On}};function al(i){return i}function fp(i,e){return e}var xC=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function mt(i,e,t,n,r,o,s,a,l,c,d,u,f){Uo("NgControlFlow");let h=pt(),p=Rn(),v=l!==void 0,g=pt(),m=a?s.bind(g[di][Ln]):s,b=new xC(v,m);g[Kt+i]=b,ep(h,p,i+1,e,t,n,r,lo(p.consts,o),256),v&&ep(h,p,i+2,l,c,d,u,lo(p.consts,f),512)}var _C=class extends vC{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-On}at(e){return this.getLView(e)[Ln].$implicit}attach(e,t){let n=t[Xi];this.needsIndexUpdate||=e!==this.length,Ou(this.lContainer,t,e,Fc(this.templateTNode,n)),wH(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,EH(this.lContainer,e),MH(this.lContainer,e)}create(e,t){let n=Kh(this.lContainer,this.templateTNode.tView.ssrId);return Pu(this.hostLView,this.templateTNode,new yC(this.lContainer,t,e),{dehydratedView:n})}destroy(e){q0(e[nt],e)}updateValue(e,t){this.getLView(e)[Ln].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[Ln].$index=e}getLView(e){return TH(this.lContainer,e)}};function gt(i){let e=ct(null),t=Oo();try{let n=pt(),r=n[nt],o=n[t],s=t+1,a=F0(n,s);if(o.liveCollection===void 0){let c=SC(r,s);o.liveCollection=new _C(a,n,c)}else o.liveCollection.reset();let l=o.liveCollection;if(CH(l,i,o.trackByFn,e),l.updateIndexes(),o.hasEmptyBlock){let c=tl(),d=l.length===0;if(Ir(n,c,d)){let u=t+2,f=F0(n,u);if(d){let h=SC(r,u),p=vO(f,h,n),v=Pu(n,h,void 0,{dehydratedView:p});Ou(f,v,0,Fc(h,p))}else r.firstUpdatePass&&nv(f),dw(f,0)}}}finally{ct(e)}}function F0(i,e){return i[e]}function wH(i,e){if(i.length<=On)return;let t=On+e,n=i[t],r=n?n[Qa]:void 0;if(n&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=n[Er];YV(o,r),kc.delete(n[ca]),r.detachedLeaveAnimationFns=void 0}}function EH(i,e){if(i.length<=On)return;let t=On+e,n=i[t],r=n?n[Qa]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function MH(i,e){return qh(i,e)}function TH(i,e){return dO(i,e)}function SC(i,e){return gu(i,e)}function q(i,e,t){let n=pt(),r=tl();if(Ir(n,r,e)){let o=Rn(),s=zh();JP(s,n,i,e,n[Jt],t)}return q}function CC(i,e,t,n,r){lw(e,i,t,r?"class":"style",n)}function x(i,e,t,n){let r=pt(),o=r[nt],s=i+Kt,a=o.firstCreatePass?fw(s,r,2,e,rw,t0(),t,n):o.data[s];if(ys(a)){let l=r[Io].tracingService;if(l&&l.componentCreate){let c=o.data[a.directiveStart+a.componentOffset];return l.componentCreate(EO(c),()=>(vI(i,e,r,a,n),x))}}return vI(i,e,r,a,n),x}function vI(i,e,t,n,r){if(ow(n,t,i,e,Cw),mu(n)){let o=t[nt];Z0(o,t,n),BC(o,n,t)}r!=null&&cp(t,n)}function C(){let i=Rn(),e=wi(),t=sw(e);return i.firstCreatePass&&hw(i,t),uS(t)&&fS(),dS(),t.classesWithoutHost!=null&&Cz(t)&&CC(i,t,pt(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&wz(t)&&CC(i,t,pt(),t.stylesWithoutHost,!1),C}function U(i,e,t,n){return x(i,e,t,n),C(),U}function ue(i,e,t,n){let r=pt(),o=r[nt],s=i+Kt,a=o.firstCreatePass?c8(s,o,2,e,t,n):o.data[s];return ow(a,r,i,e,Cw),n!=null&&cp(r,a),ue}function ve(){let i=wi(),e=sw(i);return uS(e)&&fS(),dS(),ve}function kt(i,e,t,n){return ue(i,e,t,n),ve(),kt}var Cw=(i,e,t,n,r)=>(da(!0),WC(e[Jt],n,xS()));function DH(i,e,t,n,r){let o=!H0(e,t);if(da(o),o)return WC(e[Jt],n,xS());let s=e[Xi],a=ev(s,i,e,t);return bP(s,r)&&V0(s,r,a.nextSibling),s&&(UI(t)||BI(a))&&ys(t)&&(f2(t),PP(a)),a}function ZO(){Cw=DH}function ww(i,e,t){let n=pt(),r=n[nt],o=i+Kt,s=r.firstCreatePass?fw(o,n,8,"ng-container",rw,t0(),e,t):r.data[o];if(ow(s,n,i,"ng-container",JO),mu(s)){let a=n[nt];Z0(a,n,s),BC(a,s,n)}return t!=null&&cp(n,s),ww}function Ew(){let i=Rn(),e=wi(),t=sw(e);return i.firstCreatePass&&hw(i,t),Ew}function Rr(i,e,t){return ww(i,e,t),Ew(),Rr}var JO=(i,e,t,n,r)=>(da(!0),AP(e[Jt],""));function AH(i,e,t,n,r){let o,s=!H0(e,t);if(da(s),s)return AP(e[Jt],"");let a=e[Xi],l=ev(a,i,e,t),c=Qz(a,r);return V0(a,r,l),o=tv(c,l),o}function QO(){JO=AH}function Ae(){return pt()}function kr(i,e,t){let n=pt(),r=tl();if(Ir(n,r,e)){let o=Rn(),s=zh();QP(s,n,i,e,n[Jt],t)}return kr}var Gh=void 0;function IH(i){let e=Math.floor(Math.abs(i)),t=i.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var PH=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Gh,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Gh,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",Gh,Gh,Gh],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",IH],FS={};function lv(i){let e=OH(i),t=bI(e);if(t)return t;let n=e.split("-")[0];if(t=bI(n),t)return t;if(n==="en")return PH;throw new qe(701,!1)}function bI(i){return i in FS||(FS[i]=io.ng&&io.ng.common&&io.ng.common.locales&&io.ng.common.locales[i]),FS[i]}var zc=(function(i){return i[i.LocaleId=0]="LocaleId",i[i.DayPeriodsFormat=1]="DayPeriodsFormat",i[i.DayPeriodsStandalone=2]="DayPeriodsStandalone",i[i.DaysFormat=3]="DaysFormat",i[i.DaysStandalone=4]="DaysStandalone",i[i.MonthsFormat=5]="MonthsFormat",i[i.MonthsStandalone=6]="MonthsStandalone",i[i.Eras=7]="Eras",i[i.FirstDayOfWeek=8]="FirstDayOfWeek",i[i.WeekendRange=9]="WeekendRange",i[i.DateFormat=10]="DateFormat",i[i.TimeFormat=11]="TimeFormat",i[i.DateTimeFormat=12]="DateTimeFormat",i[i.NumberSymbols=13]="NumberSymbols",i[i.NumberFormats=14]="NumberFormats",i[i.CurrencyCode=15]="CurrencyCode",i[i.CurrencySymbol=16]="CurrencySymbol",i[i.CurrencyName=17]="CurrencyName",i[i.Currencies=18]="Currencies",i[i.Directionality=19]="Directionality",i[i.PluralCase=20]="PluralCase",i[i.ExtraData=21]="ExtraData",i})(zc||{});function OH(i){return i.toLowerCase().replace(/_/g,"-")}var hp="en-US";var RH=hp;function eR(i){typeof i=="string"&&(RH=i.toLowerCase().replace(/_/g,"-"))}function W(i,e,t){let n=pt(),r=Rn(),o=wi();return tR(r,n,n[Jt],o,i,e,t),W}function Ri(i,e,t){let n=pt(),r=Rn(),o=wi();return(o.type&3||t)&&CO(o,r,n,t,n[Jt],i,e,x0(o,n,e)),Ri}function tR(i,e,t,n,r,o,s){let a=!0,l=null;if((n.type&3||s)&&(l??=x0(n,e,o),CO(n,i,e,s,t,r,o,l)&&(a=!1)),a){let c=n.outputs?.[r],d=n.hostDirectiveOutputs?.[r];if(d&&d.length)for(let u=0;u<d.length;u+=2){let f=d[u],h=d[u+1];l??=x0(n,e,o),rI(n,e,f,h,r,l)}if(c&&c.length)for(let u of c)l??=x0(n,e,o),rI(n,e,u,r,r,l)}}function S(i=1){return w2(i)}function kH(i,e){let t=null,n=OV(i);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(n===null?NP(i,o,!0):FV(n,o))return r}return t}function Mi(i){let e=pt()[di][Yi];if(!e.projection){let t=i?i.length:1,n=e.projection=KA(t,null),r=n.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=i?kH(o,i):0;s!==null&&(r[s]?r[s].projectionNext=o:n[s]=o,r[s]=o)}o=o.next}}}function Ti(i,e=0,t,n,r,o){let s=pt(),a=Rn(),l=n?i+1:null;l!==null&&ep(s,a,l,n,r,o,null,t);let c=Ru(a,Kt+i,16,null,t||null);c.projection===null&&(c.projection=e),mS();let u=!s[Xi]||n0();s[di][Yi].projection[c.projection]===null&&l!==null?FH(s,a,l):u&&!sp(c)&&r6(a,s,c)}function FH(i,e,t){let n=Kt+t,r=e.data[n],o=i[n],s=Kh(o,r.tView.ssrId),a=Pu(i,r,void 0,{dehydratedView:s});Ou(o,a,0,Fc(r,s))}function ll(i,e,t,n){return L8(i,R8(e,t,n)),ll}function Vc(i=1){r0(x2()+i)}function dr(i){let e=p2();return Jg(e,Kt+i)}function p0(i,e){return i<<17|e<<2}function Uc(i){return i>>17&32767}function NH(i){return(i&2)==2}function LH(i,e){return i&131071|e<<17}function wC(i){return i|2}function Tu(i){return(i&131068)>>2}function NS(i,e){return i&-131069|e<<2}function UH(i){return(i&1)===1}function EC(i){return i|1}function BH(i,e,t,n,r,o){let s=o?e.classBindings:e.styleBindings,a=Uc(s),l=Tu(s);i[n]=t;let c=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||du(u,d)>0)&&(c=!0)}else d=t;if(r)if(l!==0){let f=Uc(i[a+1]);i[n+1]=p0(f,a),f!==0&&(i[f+1]=NS(i[f+1],n)),i[a+1]=LH(i[a+1],n)}else i[n+1]=p0(a,0),a!==0&&(i[a+1]=NS(i[a+1],n)),a=n;else i[n+1]=p0(l,0),a===0?a=n:i[l+1]=NS(i[l+1],n),l=n;c&&(i[n+1]=wC(i[n+1])),yI(i,d,n,!0),yI(i,d,n,!1),zH(e,d,i,n,o),s=p0(a,l),o?e.classBindings=s:e.styleBindings=s}function zH(i,e,t,n,r){let o=r?i.residualClasses:i.residualStyles;o!=null&&typeof e=="string"&&du(o,e)>=0&&(t[n+1]=EC(t[n+1]))}function yI(i,e,t,n){let r=i[t+1],o=e===null,s=n?Uc(r):Tu(r),a=!1;for(;s!==0&&(a===!1||o);){let l=i[s],c=i[s+1];VH(l,e)&&(a=!0,i[s+1]=n?EC(c):wC(c)),s=n?Uc(c):Tu(c)}a&&(i[t+1]=n?wC(r):EC(r))}function VH(i,e){return i===null||e==null||(Array.isArray(i)?i[1]:i)===e?!0:Array.isArray(i)&&typeof e=="string"?du(i,e)>=0:!1}var ko={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function HH(i){return i.substring(ko.key,ko.keyEnd)}function GH(i){return jH(i),nR(i,iR(i,0,ko.textEnd))}function nR(i,e){let t=ko.textEnd;return t===e?-1:(e=ko.keyEnd=WH(i,ko.key=e,t),iR(i,e,t))}function jH(i){ko.key=0,ko.keyEnd=0,ko.value=0,ko.valueEnd=0,ko.textEnd=i.length}function iR(i,e,t){for(;e<t&&i.charCodeAt(e)<=32;)e++;return e}function WH(i,e,t){for(;e<t&&i.charCodeAt(e)>32;)e++;return e}function co(i,e,t){return rR(i,e,t,!1),co}function dt(i,e){return rR(i,e,null,!0),dt}function ur(i){YH(QH,$H,i,!0)}function $H(i,e){for(let t=GH(e);t>=0;t=nR(e,t))Xg(i,HH(e),!0)}function rR(i,e,t,n){let r=pt(),o=Rn(),s=Bh(2);if(o.firstUpdatePass&&sR(o,i,s,n),e!==Ei&&Ir(r,s,e)){let a=o.data[Oo()];aR(o,a,r,r[Jt],i,r[s+1]=tG(e,t),n,s)}}function YH(i,e,t,n){let r=Rn(),o=Bh(2);r.firstUpdatePass&&sR(r,null,o,n);let s=pt();if(t!==Ei&&Ir(s,o,t)){let a=r.data[Oo()];if(lR(a,n)&&!oR(r,o)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=Hg(l,t||"")),CC(r,a,s,t,n)}else eG(r,a,s,s[Jt],s[o+1],s[o+1]=JH(i,e,t),n,o)}}function oR(i,e){return e>=i.expandoStartIndex}function sR(i,e,t,n){let r=i.data;if(r[t+1]===null){let o=r[Oo()],s=oR(i,t);lR(o,n)&&e===null&&!s&&(e=!1),e=XH(r,o,e,n),BH(r,o,e,t,s,n)}}function XH(i,e,t,n){let r=y2(i),o=n?e.residualClasses:e.residualStyles;if(r===null)(n?e.classBindings:e.styleBindings)===0&&(t=LS(null,i,e,t,n),t=tp(t,e.attrs,n),o=null);else{let s=e.directiveStylingLast;if(s===-1||i[s]!==r)if(t=LS(r,i,e,t,n),o===null){let l=qH(i,e,n);l!==void 0&&Array.isArray(l)&&(l=LS(null,i,e,l[1],n),l=tp(l,e.attrs,n),KH(i,e,n,l))}else o=ZH(i,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),t}function qH(i,e,t){let n=t?e.classBindings:e.styleBindings;if(Tu(n)!==0)return i[Uc(n)]}function KH(i,e,t,n){let r=t?e.classBindings:e.styleBindings;i[Uc(r)]=n}function ZH(i,e,t){let n,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=i[o].hostAttrs;n=tp(n,s,t)}return tp(n,e.attrs,t)}function LS(i,e,t,n,r){let o=null,s=t.directiveEnd,a=t.directiveStylingLast;for(a===-1?a=t.directiveStart:a++;a<s&&(o=e[a],n=tp(n,o.hostAttrs,r),o!==i);)a++;return i!==null&&(t.directiveStylingLast=a),n}function tp(i,e,t){let n=t?1:2,r=-1;if(e!==null)for(let o=0;o<e.length;o++){let s=e[o];typeof s=="number"?r=s:r===n&&(Array.isArray(i)||(i=i===void 0?[]:["",i]),Xg(i,s,t?!0:e[++o]))}return i===void 0?null:i}function JH(i,e,t){if(t==null||t==="")return Ii;let n=[],r=No(t);if(Array.isArray(r))for(let o=0;o<r.length;o++)i(n,r[o],!0);else if(r instanceof Set)for(let o of r)i(n,o,!0);else if(typeof r=="object")for(let o in r)r.hasOwnProperty(o)&&i(n,o,r[o]);else typeof r=="string"&&e(n,r);return n}function QH(i,e,t){let n=String(e);n!==""&&!n.includes(" ")&&Xg(i,n,t)}function eG(i,e,t,n,r,o,s,a){r===Ei&&(r=Ii);let l=0,c=0,d=0<r.length?r[0]:null,u=0<o.length?o[0]:null;for(;d!==null||u!==null;){let f=l<r.length?r[l+1]:void 0,h=c<o.length?o[c+1]:void 0,p=null,v;d===u?(l+=2,c+=2,f!==h&&(p=u,v=h)):u===null||d!==null&&d<u?(l+=2,p=d):(c+=2,p=u,v=h),p!==null&&aR(i,e,t,n,p,v,s,a),d=l<r.length?r[l]:null,u=c<o.length?o[c]:null}}function aR(i,e,t,n,r,o,s,a){if(!(e.type&3))return;let l=i.data,c=l[a+1],d=UH(c)?xI(l,e,t,r,Tu(c),s):void 0;if(!N0(d)){N0(o)||NH(c)&&(o=xI(l,null,t,r,a,s));let u=iS(Oo(),t);s6(n,s,u,r,o)}}function xI(i,e,t,n,r,o){let s=e===null,a;for(;r>0;){let l=i[r],c=Array.isArray(l),d=c?l[1]:l,u=d===null,f=t[r+1];f===Ei&&(f=u?Ii:void 0);let h=u?qg(f,n):d===n?f:void 0;if(c&&!N0(h)&&(h=qg(l,n)),N0(h)&&(a=h,s))return a;let p=i[r+1];r=s?Uc(p):Tu(p)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=qg(l,n))}return a}function N0(i){return i!==void 0}function tG(i,e){return i==null||i===""||(typeof e=="string"?i=i+e:typeof i=="object"&&(i=Vg(No(i)))),i}function lR(i,e){return(i.flags&(e?8:16))!==0}function R(i,e=""){let t=pt(),n=Rn(),r=i+Kt,o=n.firstCreatePass?Ru(n,r,1,e,null):n.data[r],s=cR(n,t,o,e);t[r]=s,a0()&&nw(n,t,s,o),vu(o,!1)}var cR=(i,e,t,n)=>(da(!0),DP(e[Jt],n));function nG(i,e,t,n){let r=!H0(e,t);if(da(r),r)return DP(e[Jt],n);let o=e[Xi];return ev(o,i,e,t)}function dR(){cR=nG}function uR(i,e,t,n=""){return Ir(i,tl(),t)?e+Ao(t)+n:Ei}function iG(i,e,t,n,r,o=""){let s=vS(),a=Zh(i,s,t,r);return Bh(2),a?e+Ao(t)+n+Ao(r)+o:Ei}function rG(i,e,t,n,r,o,s,a,l,c=""){let d=vS(),u=f8(i,d,t,r,s,l);return Bh(4),u?e+Ao(t)+n+Ao(r)+o+Ao(s)+a+Ao(l)+c:Ei}function ze(i){return wt("",i),ze}function wt(i,e,t){let n=pt(),r=uR(n,i,e,t);return r!==Ei&&Mw(n,Oo(),r),wt}function pp(i,e,t,n,r){let o=pt(),s=iG(o,i,e,t,n,r);return s!==Ei&&Mw(o,Oo(),s),pp}function cv(i,e,t,n,r,o,s,a,l){let c=pt(),d=rG(c,i,e,t,n,r,o,s,a,l);return d!==Ei&&Mw(c,Oo(),d),cv}function Mw(i,e,t){let n=iS(e,i);wV(i[Jt],n,t)}function Hc(i,e,t){bw(e)&&(e=e());let n=pt(),r=tl();if(Ir(n,r,e)){let o=Rn(),s=zh();JP(s,n,i,e,n[Jt],t)}return Hc}function Ms(i,e){let t=bw(i);return t&&i.set(e),t}function mp(i,e){let t=pt(),n=Rn(),r=wi();return tR(n,t,t[Jt],r,i,e),mp}function dv(i,e,t=""){return uR(pt(),i,e,t)}function _I(i,e,t){let n=Rn();n.firstCreatePass&&fR(e,n.data,n.blueprint,xs(i),t)}function fR(i,e,t,n,r){if(i=Si(i),Array.isArray(i))for(let o=0;o<i.length;o++)fR(i[o],e,t,n,r);else{let o=Rn(),s=pt(),a=wi(),l=_c(i)?i:Si(i.provide),c=J1(i),d=a.providerIndexes&1048575,u=a.directiveStart,f=a.providerIndexes>>20;if(_c(i)||!i.multi){let h=new Rc(c,r,Gt,null),p=BS(l,e,r?d:d+f,u);p===-1?(VS(M0(a,s),o,l),US(o,i,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(h),s.push(h)):(t[p]=h,s[p]=h)}else{let h=BS(l,e,d+f,u),p=BS(l,e,d,d+f),v=h>=0&&t[h],g=p>=0&&t[p];if(r&&!g||!r&&!v){VS(M0(a,s),o,l);let m=aG(r?sG:oG,t.length,r,n,c,i);!r&&g&&(t[p].providerFactory=m),US(o,i,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(m),s.push(m)}else{let m=hR(t[r?p:h],c,!r&&n);US(o,i,h>-1?h:p,m)}!r&&n&&g&&t[p].componentProviders++}}}function US(i,e,t,n){let r=_c(e),o=n2(e);if(r||o){let l=(o?Si(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 hR(i,e,t){return t&&i.componentProviders++,i.multi.push(e)-1}function BS(i,e,t,n){for(let r=t;r<n;r++)if(e[r]===i)return r;return-1}function oG(i,e,t,n,r){return MC(this.multi,[])}function sG(i,e,t,n,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=$h(n,n[nt],this.providerFactory.index,r);s=l.slice(0,a),MC(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],MC(o,s);return s}function MC(i,e){for(let t=0;t<i.length;t++){let n=i[t];e.push(n())}return e}function aG(i,e,t,n,r,o){let s=new Rc(i,t,Gt,null);return s.multi=[],s.index=e,s.componentProviders=0,hR(s,r,n&&!t),s}function uo(i,e){return t=>{t.providersResolver=(n,r)=>_I(n,r?r(i):i,!1),e&&(t.viewProvidersResolver=(n,r)=>_I(n,r?r(e):e,!0))}}function Tw(i,e){let t=bu()+i,n=pt();return n[t]===Ei?sv(n,t,e()):d8(n,t)}function Ts(i,e,t){return lG(pt(),bu(),i,e,t)}function uv(i,e,t,n){return pR(pt(),bu(),i,e,t,n)}function Dw(i,e){let t=i[e];return t===Ei?void 0:t}function lG(i,e,t,n,r,o){let s=e+t;return Ir(i,s,r)?sv(i,s+1,o?n.call(o,r):n(r)):Dw(i,s+1)}function pR(i,e,t,n,r,o,s){let a=e+t;return Zh(i,a,r,o)?sv(i,a+2,s?n.call(s,r,o):n(r,o)):Dw(i,a+2)}function cG(i,e,t,n,r,o,s,a){let l=e+t;return u8(i,l,r,o,s)?sv(i,l+3,a?n.call(a,r,o,s):n(r,o,s)):Dw(i,l+3)}function ki(i,e){let t=Rn(),n,r=i+Kt;t.firstCreatePass?(n=dG(e,t.pipeRegistry),t.data[r]=n,n.onDestroy&&(t.destroyHooks??=[]).push(r,n.onDestroy)):n=t.data[r];let o=n.factory||(n.factory=Xa(n.type,!0)),s,a=ji(Gt);try{let l=E0(!1),c=o();return E0(l),rS(t,pt(),r,c),c}finally{ji(a)}}function dG(i,e){if(e)for(let t=e.length-1;t>=0;t--){let n=e[t];if(i===n.name)return n}}function qi(i,e,t,n){let r=i+Kt,o=pt(),s=Jg(o,r);return mR(o,r)?pR(o,bu(),e,s.transform,t,n,s):s.transform(t,n)}function Aw(i,e,t,n,r){let o=i+Kt,s=pt(),a=Jg(s,o);return mR(s,o)?cG(s,bu(),e,a.transform,t,n,r,a):a.transform(t,n,r)}function mR(i,e){return i[nt].data[e].pure}function cl(i,e){return Q0(i,e)}var gR=(()=>{class i{applicationErrorHandler=Z(ua);appRef=Z(Or);taskService=Z(rl);ngZone=Z(cr);zonelessEnabled=Z(Hh);tracing=Z(ws,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Gi;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Rh):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(Z(ES,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let t=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(t);return}this.switchToMicrotaskScheduler(),this.taskService.remove(t)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let t=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(t)})})}notify(t){if(!this.zonelessEnabled&&t===5)return;switch(t){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;break}case 12:{this.appRef.dirtyFlags|=16;break}case 13:{this.appRef.dirtyFlags|=2;break}case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let n=this.useMicrotaskScheduler?A2:_S;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>n(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>n(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Rh+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let t=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){this.applicationErrorHandler(n)}finally{this.taskService.remove(t),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function vR(){return[{provide:ms,useExisting:gR},{provide:cr,useClass:kh},{provide:Hh,useValue:!0}]}function uG(){return typeof $localize<"u"&&$localize.locale||hp}var gp=new Ze("",{factory:()=>Z(gp,{optional:!0,skipSelf:!0})||uG()});var vp=class{destroyed=!1;listeners=null;errorHandler=Z(no,{optional:!0});destroyRef=Z(ui);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new qe(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?.indexOf(e);t!==void 0&&t!==-1&&this.listeners?.splice(t,1)}}}emit(e){if(this.destroyed){console.warn(oa(953,!1));return}if(this.listeners===null)return;let t=ct(null);try{for(let n of this.listeners)try{n(e)}catch(r){this.errorHandler?.handleError(r)}}finally{ct(t)}}};function hn(i){return BA(i)}function Me(i,e){return Ch(i,e?.equal)}var kw={JSACTION:"__jsaction",OWNER:"__owner"},_R={};function fG(i){return i[kw.JSACTION]}function bR(i,e){i[kw.JSACTION]=e}function hG(i){return _R[i]}function pG(i,e){_R[i]=e}var vt={AUXCLICK:"auxclick",CHANGE:"change",CLICK:"click",CLICKMOD:"clickmod",CLICKONLY:"clickonly",DBLCLICK:"dblclick",FOCUS:"focus",FOCUSIN:"focusin",BLUR:"blur",FOCUSOUT:"focusout",SUBMIT:"submit",KEYDOWN:"keydown",KEYPRESS:"keypress",KEYUP:"keyup",MOUSEUP:"mouseup",MOUSEDOWN:"mousedown",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",MOUSEMOVE:"mousemove",POINTERUP:"pointerup",POINTERDOWN:"pointerdown",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERMOVE:"pointermove",POINTERCANCEL:"pointercancel",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",ERROR:"error",LOAD:"load",UNLOAD:"unload",TOUCHSTART:"touchstart",TOUCHEND:"touchend",TOUCHMOVE:"touchmove",INPUT:"input",SCROLL:"scroll",TOGGLE:"toggle",CUSTOM:"_custom"},mG=[vt.MOUSEENTER,vt.MOUSELEAVE,"pointerenter","pointerleave"],Che=[vt.CLICK,vt.DBLCLICK,vt.FOCUSIN,vt.FOCUSOUT,vt.KEYDOWN,vt.KEYUP,vt.KEYPRESS,vt.MOUSEOVER,vt.MOUSEOUT,vt.SUBMIT,vt.TOUCHSTART,vt.TOUCHEND,vt.TOUCHMOVE,"touchcancel","auxclick","change","compositionstart","compositionupdate","compositionend","beforeinput","input","select","copy","cut","paste","mousedown","mouseup","wheel","contextmenu","dragover","dragenter","dragleave","drop","dragstart","dragend","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","gotpointercapture","lostpointercapture","ended","loadedmetadata","pagehide","pageshow","visibilitychange","beforematch"],gG=[vt.FOCUS,vt.BLUR,vt.ERROR,vt.LOAD,vt.TOGGLE],Fw=i=>gG.indexOf(i)>=0;function vG(i){return i===vt.MOUSEENTER?vt.MOUSEOVER:i===vt.MOUSELEAVE?vt.MOUSEOUT:i===vt.POINTERENTER?vt.POINTEROVER:i===vt.POINTERLEAVE?vt.POINTEROUT:i}function bG(i,e,t,n){let r=!1;Fw(e)&&(r=!0);let o=typeof n=="boolean"?{capture:r,passive:n}:r;return i.addEventListener(e,t,o),{eventType:e,handler:t,capture:r,passive:n}}function yG(i,e){if(i.removeEventListener){let t=typeof e.passive=="boolean"?{capture:e.capture}:e.capture;i.removeEventListener(e.eventType,e.handler,t)}else i.detachEvent&&i.detachEvent(`on${e.eventType}`,e.handler)}function xG(i){i.preventDefault?i.preventDefault():i.returnValue=!1}var yR=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function _G(i){return i.which===2||i.which==null&&i.button===4}function SG(i){return yR&&i.metaKey||!yR&&i.ctrlKey||_G(i)||i.shiftKey}function CG(i,e,t){let n=i.relatedTarget;return(i.type===vt.MOUSEOVER&&e===vt.MOUSEENTER||i.type===vt.MOUSEOUT&&e===vt.MOUSELEAVE||i.type===vt.POINTEROVER&&e===vt.POINTERENTER||i.type===vt.POINTEROUT&&e===vt.POINTERLEAVE)&&(!n||n!==t&&!t.contains(n))}function wG(i,e){let t={};for(let n in i){if(n==="srcElement"||n==="target")continue;let r=n,o=i[r];typeof o!="function"&&(t[r]=o)}return i.type===vt.MOUSEOVER?t.type=vt.MOUSEENTER:i.type===vt.MOUSEOUT?t.type=vt.MOUSELEAVE:i.type===vt.POINTEROVER?t.type=vt.POINTERENTER:t.type=vt.POINTERLEAVE,t.target=t.srcElement=e,t.bubbles=!1,t._originalEvent=i,t}var EG=typeof navigator<"u"&&/iPhone|iPad|iPod/.test(navigator.userAgent),mv=class{element;handlerInfos=[];constructor(e){this.element=e}addEventListener(e,t,n){EG&&(this.element.style.cursor="pointer"),this.handlerInfos.push(bG(this.element,e,t(this.element),n))}cleanUp(){for(let e=0;e<this.handlerInfos.length;e++)yG(this.element,this.handlerInfos[e]);this.handlerInfos=[]}},MG={NAMESPACE_ACTION_SEPARATOR:".",EVENT_ACTION_SEPARATOR:":"};function dl(i){return i.eventType}function Nw(i,e){i.eventType=e}function hv(i){return i.event}function SR(i,e){i.event=e}function CR(i){return i.targetElement}function wR(i,e){i.targetElement=e}function ER(i){return i.eic}function TG(i,e){i.eic=e}function DG(i){return i.timeStamp}function AG(i,e){i.timeStamp=e}function pv(i){return i.eia}function MR(i,e,t){i.eia=[e,t]}function Iw(i){i.eia=void 0}function fv(i){return i[1]}function IG(i){return i.eirp}function TR(i,e){i.eirp=e}function DR(i){return i.eir}function AR(i,e){i.eir=e}function IR(i){return{eventType:i.eventType,event:i.event,targetElement:i.targetElement,eic:i.eic,eia:i.eia,timeStamp:i.timeStamp,eirp:i.eirp,eiack:i.eiack,eir:i.eir}}function PG(i,e,t,n,r,o,s,a){return{eventType:i,event:e,targetElement:t,eic:n,timeStamp:r,eia:o,eirp:s,eiack:a}}var Pw=class i{eventInfo;constructor(e){this.eventInfo=e}getEventType(){return dl(this.eventInfo)}setEventType(e){Nw(this.eventInfo,e)}getEvent(){return hv(this.eventInfo)}setEvent(e){SR(this.eventInfo,e)}getTargetElement(){return CR(this.eventInfo)}setTargetElement(e){wR(this.eventInfo,e)}getContainer(){return ER(this.eventInfo)}setContainer(e){TG(this.eventInfo,e)}getTimestamp(){return DG(this.eventInfo)}setTimestamp(e){AG(this.eventInfo,e)}getAction(){let e=pv(this.eventInfo);if(e)return{name:e[0],element:e[1]}}setAction(e){if(!e){Iw(this.eventInfo);return}MR(this.eventInfo,e.name,e.element)}getIsReplay(){return IG(this.eventInfo)}setIsReplay(e){TR(this.eventInfo,e)}getResolved(){return DR(this.eventInfo)}setResolved(e){AR(this.eventInfo,e)}clone(){return new i(IR(this.eventInfo))}},OG={},RG=/\s*;\s*/,kG=vt.CLICK,Ow=class{a11yClickSupport=!1;clickModSupport=!0;syntheticMouseEventSupport;updateEventInfoForA11yClick=void 0;preventDefaultForA11yClick=void 0;populateClickOnlyAction=void 0;constructor({syntheticMouseEventSupport:e=!1,clickModSupport:t=!0}={}){this.syntheticMouseEventSupport=e,this.clickModSupport=t}resolveEventType(e){this.clickModSupport&&dl(e)===vt.CLICK&&SG(hv(e))?Nw(e,vt.CLICKMOD):this.a11yClickSupport&&this.updateEventInfoForA11yClick(e)}resolveAction(e){DR(e)||(this.populateAction(e,CR(e)),AR(e,!0))}resolveParentAction(e){let t=pv(e),n=t&&fv(t);Iw(e);let r=n&&this.getParentNode(n);r&&this.populateAction(e,r)}populateAction(e,t){let n=t;for(;n&&n!==ER(e)&&(n.nodeType===Node.ELEMENT_NODE&&this.populateActionOnElement(n,e),!pv(e));)n=this.getParentNode(n);let r=pv(e);if(r&&(this.a11yClickSupport&&this.preventDefaultForA11yClick(e),this.syntheticMouseEventSupport&&(dl(e)===vt.MOUSEENTER||dl(e)===vt.MOUSELEAVE||dl(e)===vt.POINTERENTER||dl(e)===vt.POINTERLEAVE)))if(CG(hv(e),dl(e),fv(r))){let o=wG(hv(e),fv(r));SR(e,o),wR(e,fv(r))}else Iw(e)}getParentNode(e){let t=e[kw.OWNER];if(t)return t;let n=e.parentNode;return n?.nodeName==="#document-fragment"?n?.host??null:n}populateActionOnElement(e,t){let n=this.parseActions(e),r=n[dl(t)];r!==void 0&&MR(t,r,e),this.a11yClickSupport&&this.populateClickOnlyAction(e,t,n)}parseActions(e){let t=fG(e);if(!t){let n=e.getAttribute(d0.JSACTION);if(!n)t=OG,bR(e,t);else{if(t=hG(n),!t){t={};let r=n.split(RG);for(let o=0;o<r.length;o++){let s=r[o];if(!s)continue;let a=s.indexOf(MG.EVENT_ACTION_SEPARATOR),l=a!==-1,c=l?s.substr(0,a).trim():kG,d=l?s.substr(a+1).trim():s;t[c]=d}pG(n,t)}bR(e,t)}}return t}addA11yClickSupport(e,t,n){this.a11yClickSupport=!0,this.updateEventInfoForA11yClick=e,this.preventDefaultForA11yClick=t,this.populateClickOnlyAction=n}},PR=(function(i){return i[i.I_AM_THE_JSACTION_FRAMEWORK=0]="I_AM_THE_JSACTION_FRAMEWORK",i})(PR||{}),Rw=class{dispatchDelegate;actionResolver;eventReplayer;eventReplayScheduled=!1;replayEventInfoWrappers=[];constructor(e,{actionResolver:t,eventReplayer:n}={}){this.dispatchDelegate=e,this.actionResolver=t,this.eventReplayer=n}dispatch(e){let t=new Pw(e);this.actionResolver?.resolveEventType(e),this.actionResolver?.resolveAction(e);let n=t.getAction();if(n&&FG(n.element,t)&&xG(t.getEvent()),this.eventReplayer&&t.getIsReplay()){this.scheduleEventInfoWrapperReplay(t);return}this.dispatchDelegate(t)}scheduleEventInfoWrapperReplay(e){this.replayEventInfoWrappers.push(e),!this.eventReplayScheduled&&(this.eventReplayScheduled=!0,Promise.resolve().then(()=>{this.eventReplayScheduled=!1,this.eventReplayer(this.replayEventInfoWrappers)}))}};function FG(i,e){return i.tagName==="A"&&(e.getEventType()===vt.CLICK||e.getEventType()===vt.CLICKMOD)}var OR=Symbol.for("propagationStopped"),Lw={REPLAY:101};var NG="`preventDefault` called during event replay.";var LG="`composedPath` called during event replay.",gv=class{dispatchDelegate;clickModSupport;actionResolver;dispatcher;constructor(e,t=!0){this.dispatchDelegate=e,this.clickModSupport=t,this.actionResolver=new Ow({clickModSupport:t}),this.dispatcher=new Rw(n=>{this.dispatchToDelegate(n)},{actionResolver:this.actionResolver})}dispatch(e){this.dispatcher.dispatch(e)}dispatchToDelegate(e){for(e.getIsReplay()&&zG(e),UG(e);e.getAction();){if(VG(e),Fw(e.getEventType())&&e.getAction().element!==e.getTargetElement()||(this.dispatchDelegate(e.getEvent(),e.getAction().name),BG(e)))return;this.actionResolver.resolveParentAction(e.eventInfo)}}};function UG(i){let e=i.getEvent(),t=i.getEvent().stopPropagation.bind(e),n=()=>{e[OR]=!0,t()};Gc(e,"stopPropagation",n),Gc(e,"stopImmediatePropagation",n)}function BG(i){return!!i.getEvent()[OR]}function zG(i){let e=i.getEvent(),t=i.getTargetElement(),n=e.preventDefault.bind(e);Gc(e,"target",t),Gc(e,"eventPhase",Lw.REPLAY),Gc(e,"preventDefault",()=>{throw n(),new Error(NG+"")}),Gc(e,"composedPath",()=>{throw new Error(LG+"")})}function VG(i){let e=i.getEvent(),t=i.getAction()?.element;t&&Gc(e,"currentTarget",t,{configurable:!0})}function Gc(i,e,t,{configurable:n=!1}={}){Object.defineProperty(i,e,{value:t,configurable:n})}function RR(i,e){i.ecrd(t=>{e.dispatch(t)},PR.I_AM_THE_JSACTION_FRAMEWORK)}function HG(i){return i?.q??[]}function GG(i){i&&(xR(i.c,i.et,i.h),xR(i.c,i.etc,i.h,!0))}function xR(i,e,t,n){for(let r=0;r<e.length;r++)i.removeEventListener(e[r],t,n)}var jG=!1,kR=(()=>{class i{static MOUSE_SPECIAL_SUPPORT=jG;containerManager;eventHandlers={};browserEventTypeToExtraEventTypes={};dispatcher=null;queuedEventInfos=[];constructor(t){this.containerManager=t}handleEvent(t,n,r){let o=PG(t,n,n.target,r,Date.now());this.handleEventInfo(o)}handleEventInfo(t){if(!this.dispatcher){TR(t,!0),this.queuedEventInfos?.push(t);return}this.dispatcher(t)}addEvent(t,n,r){if(t in this.eventHandlers||!this.containerManager||!i.MOUSE_SPECIAL_SUPPORT&&mG.indexOf(t)>=0)return;let o=(a,l,c)=>{this.handleEvent(a,l,c)};this.eventHandlers[t]=o;let s=vG(n||t);if(s!==t){let a=this.browserEventTypeToExtraEventTypes[s]||[];a.push(t),this.browserEventTypeToExtraEventTypes[s]=a}this.containerManager.addEventListener(s,a=>l=>{o(t,l,a)},r)}replayEarlyEvents(t=window._ejsa){t&&(this.replayEarlyEventInfos(t.q),GG(t),delete window._ejsa)}replayEarlyEventInfos(t){for(let n=0;n<t.length;n++){let r=t[n],o=this.getEventTypesForBrowserEventType(r.eventType);for(let s=0;s<o.length;s++){let a=IR(r);Nw(a,o[s]),this.handleEventInfo(a)}}}getEventTypesForBrowserEventType(t){let n=[];return this.eventHandlers[t]&&n.push(t),this.browserEventTypeToExtraEventTypes[t]&&n.push(...this.browserEventTypeToExtraEventTypes[t]),n}handler(t){return this.eventHandlers[t]}cleanUp(){this.containerManager?.cleanUp(),this.containerManager=null,this.eventHandlers={},this.browserEventTypeToExtraEventTypes={},this.dispatcher=null,this.queuedEventInfos=[]}registerDispatcher(t,n){this.ecrd(t,n)}ecrd(t,n){if(this.dispatcher=t,this.queuedEventInfos?.length){for(let r=0;r<this.queuedEventInfos.length;r++)this.handleEventInfo(this.queuedEventInfos[r]);this.queuedEventInfos=null}}}return i})();function FR(i,e=window){return HG(e._ejsas?.[i])}function Uw(i,e=window){e._ejsas&&(e._ejsas[i]=void 0)}var yv=Symbol("InputSignalNode#UNSET"),jR=he(k({},hg),{transformFn:void 0,applyValueToInputSignal(i,e){hc(i,e)}});function WR(i,e){let t=Object.create(jR);t.value=i,t.transformFn=e?.transform;function n(){if(dc(t),t.value===yv){let r=null;throw new qe(-950,r)}return t.value}return n[ti]=t,n}function Pt(i){return new vp}function NR(i,e){return WR(i,e)}function lj(i){return WR(yv,i)}var ye=(NR.required=lj,NR);function LR(i,e){return FO(e)}function cj(i,e){return NO(e)}var Lu=(LR.required=cj,LR);function $R(i,e){let t=Object.create(jR),n=new vp;t.value=i;function r(){return dc(t),UR(t.value),t.value}return r[ti]=t,r.asReadonly=l0.bind(r),r.set=o=>{t.equal(t.value,o)||(hc(t,o),n.emit(o))},r.update=o=>{UR(t.value),r.set(o(t.value))},r.subscribe=n.subscribe.bind(n),r.destroyRef=n.destroyRef,r}function UR(i){if(i===yv)throw new qe(952,!1)}function BR(i,e){return $R(i,e)}function dj(i){return $R(yv,i)}var Ds=(BR.required=dj,BR);var Bw=new Ze(""),uj=new Ze("");function bp(i){return!i.moduleRef}function fj(i){let e=bp(i)?i.r3Injector:i.moduleRef.injector,t=e.get(cr);return t.run(()=>{bp(i)?i.r3Injector.resolveInjectorInitializers():i.moduleRef.resolveInjectorInitializers();let n=e.get(ua),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:n})}),bp(i)){let o=()=>e.destroy(),s=i.platformInjector.get(Bw);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>i.moduleRef.destroy(),s=i.platformInjector.get(Bw);s.add(o),i.moduleRef.onDestroy(()=>{Wh(i.allPlatformModules,i.moduleRef),r.unsubscribe(),s.delete(o)})}return pj(n,t,()=>{let o=e.get(rl),s=o.add(),a=e.get(_w);return a.runInitializers(),a.donePromise.then(()=>{let l=e.get(gp,hp);if(eR(l||hp),!e.get(uj,!0))return bp(i)?e.get(Or):(i.allPlatformModules.push(i.moduleRef),i.moduleRef);if(bp(i)){let d=e.get(Or);return i.rootComponent!==void 0&&d.bootstrap(i.rootComponent),d}else return hj?.(i.moduleRef,i.allPlatformModules),i.moduleRef}).finally(()=>{o.remove(s)})})})}var hj;function pj(i,e,t){try{let n=t();return Fu(n)?n.catch(r=>{throw e.runOutsideAngular(()=>i(r)),r}):n}catch(n){throw e.runOutsideAngular(()=>i(n)),n}}var bv=null;function mj(i=[],e){return Ci.create({name:e,providers:[{provide:Nh,useValue:"platform"},{provide:Bw,useValue:new Set([()=>bv=null])},...i]})}function gj(i=[]){if(bv)return bv;let e=mj(i);return bv=e,$O(),vj(e),e}function vj(i){let e=i.get(L0,null);fu(i,()=>{e?.forEach(t=>t())})}var vv=new WeakSet,zR="";function VR(i){return i.get(kC,tP)}function YR(){let i=[{provide:kC,useFactory:()=>{let e=!0;{let t=Z(Cs);e=!!window._ejsas?.[t]}return e&&Uo("NgEventReplay"),e}}];return i.push({provide:aa,useValue:()=>{let e=Z(Or),{injector:t}=e;if(!vv.has(e)){let n=Z(FC);if(VR(t)){dP();let r=t.get(Cs),o=lP(r,(s,a,l)=>{s.nodeType===Node.ELEMENT_NODE&&(rP(s,a,l),oP(s,n))});e.onDestroy(o)}}},multi:!0},{provide:Nu,useFactory:()=>{let e=Z(Or),{injector:t}=e;return()=>{if(!VR(t)||vv.has(e))return;vv.add(e);let n=t.get(Cs);e.onDestroy(()=>{vv.delete(e),Uw(n)}),e.whenStable().then(()=>{if(e.destroyed)return;let r=t.get(aP);bj(r,t);let o=t.get(FC);o.get(zR)?.forEach(sP),o.delete(zR);let s=r.instance;vP(t)?e.onDestroy(()=>s.cleanUp()):s.cleanUp()})}},multi:!0}),i}var bj=(i,e)=>{let t=e.get(Cs),n=window._ejsas[t],r=i.instance=new kR(new mv(n.c));for(let a of n.et)r.addEvent(a);for(let a of n.etc)r.addEvent(a);let o=FR(t);r.replayEarlyEventInfos(o),Uw(t);let s=new gv(a=>{yj(e,a,a.currentTarget)});RR(r,s)};function yj(i,e,t){let n=(t&&t.getAttribute(op))??"";/d\d+/.test(n)?xj(n,i,e,t):e.eventPhase===Lw.REPLAY&&NC(e,t)}function xj(i,e,t,n){let r=e.get(nP);r.push({event:t,currentTarget:n}),KO(e,i,_j(r))}function _j(i){return e=>{let t=new Set(e),n=[];for(let{event:r,currentTarget:o}of i){let s=o.getAttribute(op);t.has(s)?NC(r,o):n.push({event:r,currentTarget:o})}i.length=0,i.push(...n)}}var HR=!1;var Sj=1e4;function Cj(){HR||(HR=!0,pP(),ZO(),dR(),QO(),HO(),IO(),gO(),ZP())}function wj(i){return i.whenStable()}function XR(){let i=[{provide:rp,useFactory:()=>{let e=!0;return e=!!Z(Iu,{optional:!0})?.get(LC,null),e&&Uo("NgHydration"),e}},{provide:aa,useValue:()=>{fO(!1);let e=Z(Tn);Z(rp)&&(xP(e),Cj())},multi:!0}];return i.push({provide:RC,useFactory:()=>Z(rp)},{provide:Nu,useFactory:()=>{let e=Z(ms);if(Z(rp)){let t=Z(Or);return()=>{wj(t).then(()=>{t.destroyed||(uw(t),e.notify(7))})}}return()=>{}},multi:!0}),la(i)}var pve=Sj-1e3;var xv=(()=>{class i{static __NG_ELEMENT_ID__=Ej}return i})();function Ej(i){return Mj(wi(),pt(),(i&16)===16)}function Mj(i,e,t){if(ys(i)&&!t){let n=ao(i.index,e);return new ol(n,n)}else if(i.type&175){let n=e[di];return new ol(n,e)}return null}function qR(i){let{rootComponent:e,appProviders:t,platformProviders:n,platformRef:r}=i;rn(qt.BootstrapApplicationStart);try{let o=r?.injector??gj(n),s=[vR(),P2,...t||[]],a=new Qh({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return fj({r3Injector:a.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{rn(qt.BootstrapApplicationEnd)}}function _v(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function KR(i,e){let t=sa(i),n=e.elementInjector||uu();return new Mu(t).create(n,e.projectableNodes,e.hostElement,e.environmentInjector,e.directives,e.bindings)}var ZR=null;function fo(){return ZR}function zw(i){ZR??=i}var yp=class{},Sv=(()=>{class i{historyGo(t){throw new Error("")}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:()=>Z(JR),providedIn:"platform"})}return i})();var JR=(()=>{class i extends Sv{_location;_history;_doc=Z(Tn);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return fo().getBaseHref(this._doc)}onPopState(t){let n=fo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",t,!1),()=>n.removeEventListener("popstate",t)}onHashChange(t){let n=fo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",t,!1),()=>n.removeEventListener("hashchange",t)}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(t){this._location.pathname=t}pushState(t,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:()=>new i,providedIn:"platform"})}return i})();var jw=(function(i){return i[i.Decimal=0]="Decimal",i[i.Percent=1]="Percent",i[i.Currency=2]="Currency",i[i.Scientific=3]="Scientific",i})(jw||{});var As={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Uu(i,e){let t=lv(i),n=t[zc.NumberSymbols][e];if(typeof n>"u"){if(e===As.CurrencyDecimal)return t[zc.NumberSymbols][As.Decimal];if(e===As.CurrencyGroup)return t[zc.NumberSymbols][As.Group]}return n}function nk(i,e){return lv(i)[zc.NumberFormats][e]}var Tj=/^(\d+)?\.((\d+)(-(\d+))?)?$/,QR=22,Cv=".",xp="0",Dj=";",Aj=",",Vw="#";function Ij(i,e,t,n,r,o,s=!1){let a="",l=!1;if(!isFinite(i))a=Uu(t,As.Infinity);else{let c=Rj(i);s&&(c=Oj(c));let d=e.minInt,u=e.minFrac,f=e.maxFrac;if(o){let b=o.match(Tj);if(b===null)throw new qe(2306,!1);let y=b[1],_=b[3],w=b[5];y!=null&&(d=Hw(y)),_!=null&&(u=Hw(_)),w!=null?f=Hw(w):_!=null&&u>f&&(f=u)}kj(c,u,f);let h=c.digits,p=c.integerLen,v=c.exponent,g=[];for(l=h.every(b=>!b);p<d;p++)h.unshift(0);for(;p<0;p++)h.unshift(0);p>0?g=h.splice(p,h.length):(g=h,h=[0]);let m=[];for(h.length>=e.lgSize&&m.unshift(h.splice(-e.lgSize,h.length).join(""));h.length>e.gSize;)m.unshift(h.splice(-e.gSize,h.length).join(""));h.length&&m.unshift(h.join("")),a=m.join(Uu(t,n)),g.length&&(a+=Uu(t,r)+g.join("")),v&&(a+=Uu(t,As.Exponential)+"+"+v)}return i<0&&!l?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function ik(i,e,t){let n=nk(e,jw.Decimal),r=Pj(n,Uu(e,As.MinusSign));return Ij(i,r,e,As.Group,As.Decimal,t)}function Pj(i,e="-"){let t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(Dj),r=n[0],o=n[1],s=r.indexOf(Cv)!==-1?r.split(Cv):[r.substring(0,r.lastIndexOf(xp)+1),r.substring(r.lastIndexOf(xp)+1)],a=s[0],l=s[1]||"";t.posPre=a.substring(0,a.indexOf(Vw));for(let d=0;d<l.length;d++){let u=l.charAt(d);u===xp?t.minFrac=t.maxFrac=d+1:u===Vw?t.maxFrac=d+1:t.posSuf+=u}let c=a.split(Aj);if(t.gSize=c[1]?c[1].length:0,t.lgSize=c[2]||c[1]?(c[2]||c[1]).length:0,o){let d=r.length-t.posPre.length-t.posSuf.length,u=o.indexOf(Vw);t.negPre=o.substring(0,u).replace(/'/g,""),t.negSuf=o.slice(u+d).replace(/'/g,"")}else t.negPre=e+t.posPre,t.negSuf=t.posSuf;return t}function Oj(i){if(i.digits[0]===0)return i;let e=i.digits.length-i.integerLen;return i.exponent?i.exponent+=2:(e===0?i.digits.push(0,0):e===1&&i.digits.push(0),i.integerLen+=2),i}function Rj(i){let e=Math.abs(i)+"",t=0,n,r,o,s,a;for((r=e.indexOf(Cv))>-1&&(e=e.replace(Cv,"")),(o=e.search(/e/i))>0?(r<0&&(r=o),r+=+e.slice(o+1),e=e.substring(0,o)):r<0&&(r=e.length),o=0;e.charAt(o)===xp;o++);if(o===(a=e.length))n=[0],r=1;else{for(a--;e.charAt(a)===xp;)a--;for(r-=o,n=[],s=0;o<=a;o++,s++)n[s]=Number(e.charAt(o))}return r>QR&&(n=n.splice(0,QR-1),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}function kj(i,e,t){if(e>t)throw new qe(2307,!1);let n=i.digits,r=n.length-i.integerLen,o=Math.min(Math.max(e,r),t),s=o+i.integerLen,a=n[s];if(s>0){n.splice(Math.max(i.integerLen,s));for(let u=s;u<n.length;u++)n[u]=0}else{r=Math.max(0,r),i.integerLen=1,n.length=Math.max(1,s=o+1),n[0]=0;for(let u=1;u<s;u++)n[u]=0}if(a>=5)if(s-1<0){for(let u=0;u>s;u--)n.unshift(0),i.integerLen++;n.unshift(1),i.integerLen++}else n[s-1]++;for(;r<Math.max(0,o);r++)n.push(0);let l=o!==0,c=e+i.integerLen,d=n.reduceRight(function(u,f,h,p){return f=f+u,p[h]=f<10?f:f-10,l&&(p[h]===0&&h>=c?p.pop():l=!1),f>=10?1:0},0);d&&(n.unshift(d),i.integerLen++)}function Hw(i){let e=parseInt(i);if(isNaN(e))throw new qe(2305,!1);return e}var Gw=/\s+/,ek=[],Ww=(()=>{class i{_ngEl;_renderer;initialClasses=ek;rawClass;stateMap=new Map;constructor(t,n){this._ngEl=t,this._renderer=n}set klass(t){this.initialClasses=t!=null?t.trim().split(Gw):ek}set ngClass(t){this.rawClass=typeof t=="string"?t.trim().split(Gw):t}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(let n of t)this._updateState(n,!0);else if(t!=null)for(let n of Object.keys(t))this._updateState(n,!!t[n]);this._applyStateDiff()}_updateState(t,n){let r=this.stateMap.get(t);r!==void 0?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(t,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let t of this.stateMap){let n=t[0],r=t[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(t,n){t=t.trim(),t.length>0&&t.split(Gw).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static \u0275fac=function(n){return new(n||i)(Gt(Oi),Gt(Es))};static \u0275dir=In({type:i,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return i})();var $w=(()=>{class i{_viewContainer;_context=new wv;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(t,n){this._viewContainer=t,this._thenTemplateRef=n}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){tk(t,!1),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){tk(t,!1),this._elseTemplateRef=t,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 ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(t,n){return!0}static \u0275fac=function(n){return new(n||i)(Gt(Bc),Gt(Nc))};static \u0275dir=In({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return i})(),wv=class{$implicit=null;ngIf=null};function tk(i,e){if(i&&!i.createEmbeddedView)throw new qe(2020,!1)}var jc=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=Z(Ci);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static \u0275fac=function(n){return new(n||i)(Gt(Bc))};static \u0275dir=In({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Du]})}return i})();function rk(i,e){return new qe(2100,!1)}var Wc=(()=>{class i{_locale;constructor(t){this._locale=t}transform(t,n,r){if(!Fj(t))return null;r||=this._locale;try{let o=Nj(t);return ik(o,r,n)}catch(o){throw rk(i,o.message)}}static \u0275fac=function(n){return new(n||i)(Gt(gp,16))};static \u0275pipe=av({name:"number",type:i,pure:!0})}return i})();function Fj(i){return!(i==null||i===""||i!==i)}function Nj(i){if(typeof i=="string"&&!isNaN(Number(i)-parseFloat(i)))return Number(i);if(typeof i!="number")throw new qe(2309,!1);return i}var Yw=(()=>{class i{transform(t,n,r){if(t==null)return null;if(!(typeof t=="string"||Array.isArray(t)))throw rk(i,t);return t.slice(n,r)}static \u0275fac=function(n){return new(n||i)};static \u0275pipe=av({name:"slice",type:i,pure:!1})}return i})();var Ut=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ga({type:i});static \u0275inj=gs({})}return i})();function _p(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 $c=class{};var ok="browser";var Sp=class{_doc;constructor(e){this._doc=e}manager},Ev=(()=>{class i extends Sp{constructor(t){super(t)}supports(t){return!0}addEventListener(t,n,r,o){return t.addEventListener(n,r,o),()=>this.removeEventListener(t,n,r,o)}removeEventListener(t,n,r,o){return t.removeEventListener(n,r,o)}static \u0275fac=function(n){return new(n||i)(Ke(Tn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),Dv=new Ze(""),Zw=(()=>{class i{_zone;_plugins;_eventNameToPlugin=new Map;constructor(t,n){this._zone=n,t.forEach(s=>{s.manager=this});let r=t.filter(s=>!(s instanceof Ev));this._plugins=r.slice().reverse();let o=t.find(s=>s instanceof Ev);o&&this._plugins.push(o)}addEventListener(t,n,r,o){return this._findPluginFor(n).addEventListener(t,n,r,o)}getZone(){return this._zone}_findPluginFor(t){let n=this._eventNameToPlugin.get(t);if(n)return n;if(n=this._plugins.find(o=>o.supports(t)),!n)throw new qe(5101,!1);return this._eventNameToPlugin.set(t,n),n}static \u0275fac=function(n){return new(n||i)(Ke(Dv),Ke(cr))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),Xw="ng-app-id";function sk(i){for(let e of i)e.remove()}function ak(i,e){let t=e.createElement("style");return t.textContent=i,t}function Uj(i,e,t,n){let r=i.head?.querySelectorAll(`style[${Xw}="${e}"],link[${Xw}="${e}"]`);if(r)for(let o of r)o.removeAttribute(Xw),o instanceof HTMLLinkElement?n.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&t.set(o.textContent,{usage:0,elements:[o]})}function Kw(i,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),t}var Jw=(()=>{class i{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(t,n,r,o={}){this.doc=t,this.appId=n,this.nonce=r,Uj(t,n,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,n){for(let r of t)this.addUsage(r,this.inline,ak);n?.forEach(r=>this.addUsage(r,this.external,Kw))}removeStyles(t,n){for(let r of t)this.removeUsage(r,this.inline);n?.forEach(r=>this.removeUsage(r,this.external))}addUsage(t,n,r){let o=n.get(t);o?o.usage++:n.set(t,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(t,this.doc)))})}removeUsage(t,n){let r=n.get(t);r&&(r.usage--,r.usage<=0&&(sk(r.elements),n.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])sk(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[n,{elements:r}]of this.inline)r.push(this.addElement(t,ak(n,this.doc)));for(let[n,{elements:r}]of this.external)r.push(this.addElement(t,Kw(n,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,n){return this.nonce&&n.setAttribute("nonce",this.nonce),t.appendChild(n)}static \u0275fac=function(n){return new(n||i)(Ke(Tn),Ke(Cs),Ke(U0,8),Ke(ip))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),qw={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"},Qw=/%COMP%/g;var ck="%COMP%",Bj=`_nghost-${ck}`,zj=`_ngcontent-${ck}`,Vj=!0,Hj=new Ze("",{factory:()=>Vj});function Gj(i){return zj.replace(Qw,i)}function jj(i){return Bj.replace(Qw,i)}function dk(i,e){return e.map(t=>t.replace(Qw,i))}var eE=(()=>{class i{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(t,n,r,o,s,a,l=null,c=null){this.eventManager=t,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=c,this.defaultRenderer=new Cp(t,s,a,this.tracingService)}createRenderer(t,n){if(!t||!n)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,n);return r instanceof Tv?r.applyToHost(t):r instanceof wp&&r.applyStyles(),r}getOrCreateRenderer(t,n){let r=this.rendererByCompId,o=r.get(n.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,u=this.tracingService;switch(n.encapsulation){case Fo.Emulated:o=new Tv(l,c,n,this.appId,d,s,a,u);break;case Fo.ShadowDom:return new Mv(l,t,n,s,a,this.nonce,u,c);case Fo.ExperimentalIsolatedShadowDom:return new Mv(l,t,n,s,a,this.nonce,u);default:o=new wp(l,c,n,d,s,a,u);break}r.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(n){return new(n||i)(Ke(Zw),Ke(Jw),Ke(Cs),Ke(Hj),Ke(Tn),Ke(cr),Ke(U0),Ke(ws,8))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),Cp=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(qw[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(lk(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(lk(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new qe(-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=qw[r];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=qw[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&(Ss.DashCase|Ss.Important)?e.style.setProperty(t,n,r&Ss.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Ss.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,r){if(typeof e=="string"&&(e=fo().getGlobalEventTarget(this.doc,e),!e))throw new qe(5102,!1);let o=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(e,t,o)),this.eventManager.addEventListener(e,t,o,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;e(t)===!1&&t.preventDefault()}}};function lk(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var Mv=class extends Cp{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,o,s,a,l){super(e,r,o,a),this.hostEl=t,this.sharedStylesHost=l,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let c=n.styles;c=dk(n.id,c);for(let u of c){let f=document.createElement("style");s&&f.setAttribute("nonce",s),f.textContent=u,this.shadowRoot.appendChild(f)}let d=n.getExternalStyles?.();if(d)for(let u of d){let f=Kw(u,r);s&&f.setAttribute("nonce",s),this.shadowRoot.appendChild(f)}}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(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},wp=class extends Cp{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,o,s,a,l){super(e,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?dk(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&kc.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Tv=class extends wp{contentAttr;hostAttr;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=Gj(c),this.hostAttr=jj(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}};var Av=class i extends yp{supportsDOMEvents=!0;static makeCurrent(){zw(new i)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}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=Wj();return t==null?null:$j(t)}resetBaseElement(){Ep=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return _p(document.cookie,e)}},Ep=null;function Wj(){return Ep=Ep||document.head.querySelector("base"),Ep?Ep.getAttribute("href"):null}function $j(i){return new URL(i,document.baseURI).pathname}var Yj=(()=>{class i{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),uk=["alt","control","meta","shift"],Xj={"\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"},qj={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},fk=(()=>{class i extends Sp{constructor(t){super(t)}supports(t){return i.parseEventName(t)!=null}addEventListener(t,n,r,o){let s=i.parseEventName(n),a=i.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>fo().onAndCancel(t,s.domEventName,a,o))}static parseEventName(t){let n=t.toLowerCase().split("."),r=n.shift();if(n.length===0||!(r==="keydown"||r==="keyup"))return null;let o=i._normalizeKey(n.pop()),s="",a=n.indexOf("code");if(a>-1&&(n.splice(a,1),s="code."),uk.forEach(c=>{let d=n.indexOf(c);d>-1&&(n.splice(d,1),s+=c+".")}),s+=o,n.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(t,n){let r=Xj[t.key]||t.key,o="";return n.indexOf("code.")>-1&&(r=t.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),uk.forEach(s=>{if(s!==r){let a=qj[s];a(t)&&(o+=s+".")}}),o+=r,o===n)}static eventCallback(t,n,r){return o=>{i.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>n(o))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(n){return new(n||i)(Ke(Tn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})();async function tE(i,e){return qR(Kj(i,e))}function Kj(i,e){return{platformRef:e?.platformRef,appProviders:[...t9,...i?.providers??[]],platformProviders:e9}}function Zj(){Av.makeCurrent()}function Jj(){return new no}function Qj(){return AC(document),document}var e9=[{provide:ip,useValue:ok},{provide:L0,useValue:Zj,multi:!0},{provide:Tn,useFactory:Qj}];var t9=[{provide:Nh,useValue:"root"},{provide:no,useFactory:Jj},{provide:Dv,useClass:Ev,multi:!0},{provide:Dv,useClass:fk,multi:!0},eE,Jw,Zw,{provide:Lc,useExisting:eE},{provide:$c,useClass:Yj},[]];var po=class i{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
5
- `).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=t.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(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}}addHeaderEntry(e,t){let n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}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 Pv=class{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()}},Ov=class{encodeKey(e){return hk(e)}encodeValue(e){return hk(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function n9(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 i9=/%(\d[a-f0-9])/gi,r9={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function hk(i){return encodeURIComponent(i).replace(i9,(e,t)=>r9[t]??e)}function Iv(i){return`${i}`}var ho=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new Ov,e.fromString){if(e.fromObject)throw new qe(2805,!1);this.map=n9(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(Iv):[Iv(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(Iv(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(Iv(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)}};function o9(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function pk(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function mk(i){return typeof Blob<"u"&&i instanceof Blob}function gk(i){return typeof FormData<"u"&&i instanceof FormData}function s9(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var vk="Content-Type",bk="Accept",yk="text/plain",xk="application/json",a9=`${xk}, ${yk}, */*`,zu=class i{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,n,r){this.url=t,this.method=e.toUpperCase();let o;if(o9(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new qe(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new po,this.context??=new Pv,!this.params)this.params=new ho,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||pk(this.body)||mk(this.body)||gk(this.body)||s9(this.body)?this.body:this.body instanceof ho?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||gk(this.body)?null:mk(this.body)?this.body.type||null:pk(this.body)?null:typeof this.body=="string"?yk:this.body instanceof ho?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?xk:null}clone(e={}){let t=e.method||this.method,n=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,v=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,m=e.withCredentials??this.withCredentials,b=e.reportProgress??this.reportProgress,y=e.headers||this.headers,_=e.params||this.params,w=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((D,A)=>D.set(A,e.setHeaders[A]),y)),e.setParams&&(_=Object.keys(e.setParams).reduce((D,A)=>D.set(A,e.setParams[A]),_)),new i(t,n,g,{params:_,headers:y,context:w,reportProgress:b,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},Yc=(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})(Yc||{}),Vu=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new po,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},Rv=class i extends Vu{constructor(e={}){super(e)}type=Yc.ResponseHeader;clone(e={}){return new i({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})}},Hu=class i extends Vu{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Yc.Response;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,redirected:e.redirected??this.redirected,responseType:e.responseType??this.responseType})}},ul=class extends Vu{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},l9=200,c9=204;var d9=new Ze("");var u9=/^\)\]\}',?\n/;var iE=(()=>{class i{xhrFactory;tracingService=Z(ws,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new qe(-2800,!1);let n=this.xhrFactory;return hs(null).pipe(C1(()=>new xn(o=>{let s=n.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),t.headers.has(bk)||s.setRequestHeader(bk,a9),!t.headers.has(vk)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(vk,g)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=s.statusText||"OK",m=new po(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new Rv({headers:m,status:s.status,statusText:g,url:b}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:b,url:y}=c(),_=null;m!==c9&&(_=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=_?l9:0);let w=m>=200&&m<300;if(t.responseType==="json"&&typeof _=="string"){let D=_;_=_.replace(u9,"");try{_=_!==""?JSON.parse(_):null}catch(A){_=D,w&&(w=!1,_={error:A,text:_})}}w?(o.next(new Hu({body:_,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new ul({error:_,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new ul({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(b)}),f=u;t.timeout&&(f=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new ul({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:m||void 0});o.error(b)}));let h=!1,p=this.maybePropagateTrace(g=>{h||(o.next(c()),h=!0);let m={type:Yc.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),t.responseType==="text"&&s.responseText&&(m.partialText=s.responseText),o.next(m)}),v=this.maybePropagateTrace(g=>{let m={type:Yc.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)});return s.addEventListener("load",d),s.addEventListener("error",u),s.addEventListener("timeout",f),s.addEventListener("abort",u),t.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",v)),s.send(a),o.next({type:Yc.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",f),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(n){return new(n||i)(Ke($c))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function f9(i,e){return e(i)}function h9(i,e,t){return(n,r)=>fu(t,()=>e(n,o=>i(o,r)))}var rE=new Ze("",{factory:()=>[]}),oE=new Ze(""),_k=new Ze("",{factory:()=>!0});var sE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Ke(iE),r},providedIn:"root"})}return i})();var kv=(()=>{class i{backend;injector;chain=null;pendingTasks=Z(Ic);contributeToStability=Z(_k);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(rE),...this.injector.get(oE,[])]));this.chain=n.reduceRight((r,o)=>h9(r,o,this.injector),f9)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(Dh(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(Ke(sE),Ke(Pi))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),aE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Ke(kv),r},providedIn:"root"})}return i})();function nE(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,credentials:i.credentials,transferCache:i.transferCache,timeout:i.timeout,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,integrity:i.integrity,referrer:i.referrer,referrerPolicy:i.referrerPolicy}}var Fv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof zu)o=t;else{let l;r.headers instanceof po?l=r.headers:l=new po(r.headers);let c;r.params&&(r.params instanceof ho?c=r.params:c=new ho({fromObject:r.params})),o=new zu(t,n,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,timeout:r.timeout})}let s=hs(o).pipe(S1(l=>this.handler.handle(l)));if(t instanceof zu||r.observe==="events")return s;let a=s.pipe(_1(l=>l instanceof Hu));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(lr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new qe(2806,!1);return l.body}));case"blob":return a.pipe(lr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new qe(2807,!1);return l.body}));case"text":return a.pipe(lr(l=>{if(l.body!==null&&typeof l.body!="string")throw new qe(2808,!1);return l.body}));default:return a.pipe(lr(l=>l.body))}case"response":return a;default:throw new qe(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new ho().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,nE(r,n))}post(t,n,r={}){return this.request("POST",t,nE(r,n))}put(t,n,r={}){return this.request("PUT",t,nE(r,n))}static \u0275fac=function(n){return new(n||i)(Ke(aE))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var p9=new Ze("",{factory:()=>!0}),m9="XSRF-TOKEN",g9=new Ze("",{factory:()=>m9}),v9="X-XSRF-TOKEN",b9=new Ze("",{factory:()=>v9}),y9=(()=>{class i{cookieName=Z(g9);doc=Z(Tn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=_p(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Sk=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Ke(y9),r},providedIn:"root"})}return i})();function x9(i,e){if(!Z(p9)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Z(Sv).href,{origin:o}=new URL(r),{origin:s}=new URL(i.url,o);if(o!==s)return e(i)}catch{return e(i)}let t=Z(Sk).getToken(),n=Z(b9);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var lE=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i})(lE||{});function _9(i,e){return{\u0275kind:i,\u0275providers:e}}function cE(...i){let e=[Fv,kv,{provide:aE,useExisting:kv},{provide:sE,useFactory:()=>Z(d9,{optional:!0})??Z(iE)},{provide:rE,useValue:x9,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return la(e)}function dE(i){return _9(lE.Interceptors,i.map(e=>({provide:rE,useValue:e,multi:!0})))}var S9=new Ze(""),C9="b",w9="h",E9="s",M9="st",T9="u",D9="rt",uE=new Ze(""),A9=["GET","HEAD"];function Ek(i,e){let s=e,{isCacheActive:t}=s,n=nn(s,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!A9.includes(o)||!n.includeRequestsWithAuthHeaders&&O9(i)||n.filter?.(i)===!1)}function Mk(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function I9(i,e,t,n){let{transferCache:r}=i;if(!Ek(i,e))return null;if(n)throw new qe(2803,!1);let o=i.url,s=Tk(i,o),a=t.get(s,null),l=Mk(e,r);if(a){let{[C9]:c,[D9]:d,[w9]:u,[E9]:f,[M9]:h,[T9]:p}=a,v=c;switch(d){case"arraybuffer":v=wk(c);break;case"blob":v=new Blob([wk(c)]);break}let g=new po(u);return new Hu({body:v,headers:g,status:f,statusText:h,url:p})}return null}function P9(i,e){let t=Z(uE),n=Z(Iu),r=Z(S9,{optional:!0}),o=I9(i,t,n,r);if(o)return hs(o);let{transferCache:s}=i,a=Mk(t,s),l=i.url,c=Tk(i,l);return Ek(i,t),e(i)}function O9(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function Ck(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function Tk(i,e){let{params:t,method:n,responseType:r}=i,o=Ck(t),s=i.serializeBody();s instanceof URLSearchParams?s=Ck(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=R9(a);return l}function R9(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function wk(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function Dk(i){return[{provide:uE,useFactory:()=>(Uo("NgHttpTransferCache"),k({isCacheActive:!0},i))},{provide:oE,useValue:P9,multi:!0},{provide:Nu,multi:!0,useFactory:()=>{let e=Z(Or),t=Z(uE);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var Mp=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Ke(k9),r},providedIn:"root"})}return i})(),k9=(()=>{class i extends Mp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Lo.NONE:return n;case Lo.HTML:return pa(n,"HTML")?No(n):j0(this._doc,String(n)).toString();case Lo.STYLE:return pa(n,"Style")?No(n):n;case Lo.SCRIPT:if(pa(n,"Script"))return No(n);throw new qe(5200,!1);case Lo.URL:return pa(n,"URL")?No(n):ap(String(n));case Lo.RESOURCE_URL:if(pa(n,"ResourceURL"))return No(n);throw new qe(5201,!1);default:throw new qe(5202,!1)}}bypassSecurityTrustHtml(t){return zC(t)}bypassSecurityTrustStyle(t){return VC(t)}bypassSecurityTrustScript(t){return HC(t)}bypassSecurityTrustUrl(t){return GC(t)}bypassSecurityTrustResourceUrl(t){return jC(t)}static \u0275fac=function(n){return new(n||i)(Ke(Tn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Nv=(function(i){return i[i.NoHttpTransferCache=0]="NoHttpTransferCache",i[i.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",i[i.I18nSupport=2]="I18nSupport",i[i.EventReplay=3]="EventReplay",i[i.IncrementalHydration=4]="IncrementalHydration",i})(Nv||{});function F9(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function Ak(){return F9(Nv.EventReplay,YR())}function Ik(...i){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of i)t.add(o),r.length&&e.push(r);let n=t.has(Nv.HttpTransferCacheOptions);return la([[],[],XR(),t.has(Nv.NoHttpTransferCache)||n?[]:Dk({}),e])}var Gu=class i{loadingCount=F(0);isLoading=Me(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function Lv(i){let e=s=>Array.isArray(s)?s.filter(a=>typeof a=="string").join(", "):"";if(!i)return"Unhandled error";let t=i?.error,n=e(t?.errors);if(n)return n;let r=e(t?.message??t?.Messages);if(r)return r;if(Array.isArray(t)&&t.length>0)return e(t)||"Unhandled error";if(typeof t=="string"&&t.trim())return t;if(Array.isArray(i)&&i.length>0)return e(i)||"Unhandled error";let o=e(i?.messages);if(o)return o;if(typeof i?.messages=="string"&&i.messages.trim())return i.messages;if(typeof i?.message=="string"&&i.message.trim())return i.message;if(t?.errors&&typeof t.errors=="object"&&!Array.isArray(t.errors)){let s=[];for(let a in t.errors)Object.prototype.hasOwnProperty.call(t.errors,a)&&s.push(...t.errors[a]??[]);if(s.length)return s.join(", ")}return i?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var Fr=class i{toastsSignal=F([]);toasts=Me(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(n=>n.id!==e))}pushToast(e,t,n){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:n,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${n}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Tp=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof ul&&this.showError(e)}showError(e){return this.toasterService.showError(Lv(e)),Ya(()=>e)}static \u0275fac=function(t){return new(t||i)(Ke(Fr))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Pk=(i,e)=>{let t=Z(Tp),n=Z(Gu),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(bc(s=>(r||t.handleError(s),r?hs(null):Ya(()=>s))),Dh(()=>{o&&n.hide()}))};var Ok=[Pk];var Rk={apiUrl:"https://pixeasy-stage-api-htapefcta9c3arfd.westus3-01.azurewebsites.net/api/"};var Uv=new Ze("ENV"),wxe=new Ze("LOADER_DELAY");var kk={provide:Uv,useValue:Rk};function Fk(){return[wS(),Ik(Ak()),cE(dE(Ok)),kk,Gu]}var Wk=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)(Gt(Es),Gt(Oi))};static \u0275dir=In({type:i})}return i})(),Rp=(()=>{class i extends Wk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,features:[Pr]})}return i})(),fl=new Ze(""),U9={provide:fl,useExisting:Wi(()=>vE),multi:!0},vE=(()=>{class i extends Rp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&W("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[uo([U9]),Pr]})}return i})(),B9={provide:fl,useExisting:Wi(()=>hl),multi:!0};function z9(){let i=fo()?fo().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var V9=new Ze(""),hl=(()=>{class i extends Wk{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!z9())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||i)(Gt(Es),Gt(Oi),Gt(V9,8))};static \u0275dir=In({type:i,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(n,r){n&1&&W("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[uo([B9]),Pr]})}return i})();var bE=new Ze(""),H9=new Ze("");function G9(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<i?{min:{min:i,actual:e.value}}:null}}function j9(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function Nk(i){return null}function $k(i){return i!=null}function Yk(i){return Fu(i)?Th(i):i}function Xk(i){let e={};return i.forEach(t=>{e=t!=null?k(k({},e),t):e}),Object.keys(e).length===0?null:e}function qk(i,e){return e.map(t=>t(i))}function W9(i){return!i.validate}function Kk(i){return i.map(e=>W9(e)?e:t=>e.validate(t))}function $9(i){if(!i)return null;let e=i.filter($k);return e.length==0?null:function(t){return Xk(qk(t,e))}}function Zk(i){return i!=null?$9(Kk(i)):null}function Y9(i){if(!i)return null;let e=i.filter($k);return e.length==0?null:function(t){let n=qk(t,e).map(Yk);return x1(n).pipe(lr(Xk))}}function Jk(i){return i!=null?Y9(Kk(i)):null}function Lk(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function X9(i){return i._rawValidators}function q9(i){return i._rawAsyncValidators}function fE(i){return i?Array.isArray(i)?i:[i]:[]}function zv(i,e){return Array.isArray(i)?i.includes(e):i===e}function Uk(i,e){let t=fE(e);return fE(i).forEach(r=>{zv(t,r)||t.push(r)}),t}function Bk(i,e){return fE(e).filter(t=>!zv(i,t))}var Vv=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Zk(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Jk(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.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}},hE=class extends Vv{name;get formDirective(){return null}get path(){return null}},Op=class extends Vv{_parent=null;name=null;valueAccessor=null},pE=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Is=(()=>{class i extends pE{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(Gt(Op,2))};static \u0275dir=In({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&dt("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[Pr]})}return i})();var Dp="VALID",Bv="INVALID",ju="PENDING",Ap="DISABLED",Xc=class{},Hv=class extends Xc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},Ip=class extends Xc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},Pp=class extends Xc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Wu=class extends Xc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var mE=class extends Xc{source;constructor(e){super(),this.source=e}};function K9(i){return(Gv(i)?i.validators:i)||null}function Z9(i){return Array.isArray(i)?Zk(i):i||null}function J9(i,e){return(Gv(e)?e.asyncValidators:i)||null}function Q9(i){return Array.isArray(i)?Jk(i):i||null}function Gv(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var gE=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){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 hn(this.statusReactive)}set status(e){hn(()=>this.statusReactive.set(e))}_status=Me(()=>this.statusReactive());statusReactive=F(void 0);get valid(){return this.status===Dp}get invalid(){return this.status===Bv}get pending(){return this.status==ju}get disabled(){return this.status===Ap}get enabled(){return this.status!==Ap}errors;get pristine(){return hn(this.pristineReactive)}set pristine(e){hn(()=>this.pristineReactive.set(e))}_pristine=Me(()=>this.pristineReactive());pristineReactive=F(!0);get dirty(){return!this.pristine}get touched(){return hn(this.touchedReactive)}set touched(e){hn(()=>this.touchedReactive.set(e))}_touched=Me(()=>this.touchedReactive());touchedReactive=F(!1);get untouched(){return!this.touched}_events=new Do;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(Uk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(Uk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(Bk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(Bk(e,this._rawAsyncValidators))}hasValidator(e){return zv(this._rawValidators,e)}hasAsyncValidator(e){return zv(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;e.onlySelf||this._parent?.markAsTouched(he(k({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Pp(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}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})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new Pp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(he(k({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Ip(!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})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new Ip(!0,n))}markAsPending(e={}){this.status=ju;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Wu(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(he(k({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Ap,this.errors=null,this._forEachChild(r=>{r.disable(he(k({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Hv(this.value,n)),this._events.next(new Wu(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(he(k({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Dp,this._forEachChild(n=>{n.enable(he(k({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(he(k({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){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===Dp||this.status===ju)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Hv(this.value,t)),this._events.next(new Wu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(he(k({},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()?Ap:Dp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=ju,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=Yk(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||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!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?.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 Wu(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new wr,this.statusChanges=new wr}_calculateStatus(){return this._allControlsDisabled()?Ap:this.errors?Bv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ju)?ju:this._anyControlsHaveStatus(Bv)?Bv:Dp}_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,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new Ip(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new Pp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Gv(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=Z9(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=Q9(this._rawAsyncValidators)}};var Qk=new Ze("",{factory:()=>yE}),yE="always";function eW(i,e){return[...e.path,i]}function tW(i,e,t=yE){iW(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),rW(i,e),sW(i,e),oW(i,e),nW(i,e)}function zk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function nW(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function iW(i,e){let t=X9(i);e.validator!==null?i.setValidators(Lk(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=q9(i);e.asyncValidator!==null?i.setAsyncValidators(Lk(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();zk(e._rawValidators,r),zk(e._rawAsyncValidators,r)}function rW(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&eF(i,e)})}function oW(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&eF(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function eF(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function sW(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function aW(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function lW(i){return Object.getPrototypeOf(i.constructor)===Rp}function cW(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===hl?t=o:lW(o)?n=o:r=o}),r||n||t||null}function Vk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function Hk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var dW=class extends gE{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(K9(t),J9(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Gv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(Hk(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),t.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new mE(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Vk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Vk(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){Hk(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 uW={provide:Op,useExisting:Wi(()=>zo)},Gk=Promise.resolve(),zo=(()=>{class i extends Op{_changeDetectorRef;callSetDisabledState;control=new dW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new wr;constructor(t,n,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=cW(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),aW(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){tW(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){Gk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&_v(n);Gk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?eW(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)(Gt(hE,9),Gt(bE,10),Gt(H9,10),Gt(fl,10),Gt(xv,8),Gt(Qk,8))};static \u0275dir=In({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[uo([uW]),Pr,Du]})}return i})();var fW={provide:fl,useExisting:Wi(()=>kp),multi:!0},kp=(()=>{class i extends Rp{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&W("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[uo([fW]),Pr]})}return i})();var hW={provide:fl,useExisting:Wi(()=>jv),multi:!0};function tF(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function pW(i){return i.split(":")[0]}var jv=(()=>{class i extends Rp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(Or).injector;destroyRef=Z(ui);cdr=Z(xv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,X0({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let n=this._getOptionId(t),r=tF(n,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=pW(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&W("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[uo([hW]),Pr]})}return i})(),Wv=(()=>{class i{_element;_renderer;_select;id;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(tF(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(n){return new(n||i)(Gt(Oi),Gt(Es),Gt(jv,9))};static \u0275dir=In({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),mW={provide:fl,useExisting:Wi(()=>nF),multi:!0};function jk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function gW(i){return i.split(":")[0]}var nF=(()=>{class i extends Rp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));n=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else n=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let r=[],o=n.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a<s.length;a++){let l=s[a],c=this._getOptionValue(l.value);r.push(c)}}else{let s=n.options;for(let a=0;a<s.length;a++){let l=s[a];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,t(r)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=gW(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&W("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[uo([mW]),Pr]})}return i})(),$v=(()=>{class i{_element;_renderer;_select;id;_value;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(jk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(jk(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||i)(Gt(Oi),Gt(Es),Gt(nF,9))};static \u0275dir=In({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function iF(i){return typeof i=="number"?i:parseFloat(i)}var rF=(()=>{class i{_validator=Nk;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):Nk,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(n){return new(n||i)};static \u0275dir=In({type:i,features:[Du]})}return i})(),vW={provide:bE,useExisting:Wi(()=>Fp),multi:!0},Fp=(()=>{class i extends rF{max;inputName="max";normalizeInput=t=>iF(t);createValidator=t=>j9(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&fn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[uo([vW]),Pr]})}return i})(),bW={provide:bE,useExisting:Wi(()=>Np),multi:!0},Np=(()=>{class i extends rF{min;inputName="min";normalizeInput=t=>iF(t);createValidator=t=>G9(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&fn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[uo([bW]),Pr]})}return i})();var yW=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ga({type:i});static \u0275inj=gs({})}return i})();var fr=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Qk,useValue:t.callSetDisabledState??yE}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=ga({type:i});static \u0275inj=gs({imports:[yW]})}return i})();var Tl={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Dl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},RF=0,tM=1,kF=2;var lm=1,FF=2,Cf=3,Zi=0,er=1,ks=2,Fs=0,ed=1,nM=2,iM=3,rM=4,NF=5,_l=100,LF=101,UF=102,BF=103,zF=104,VF=200,HF=201,GF=202,jF=203,gb=204,vb=205,WF=206,$F=207,YF=208,XF=209,qF=210,KF=211,ZF=212,JF=213,QF=214,Hb=0,Gb=1,jb=2,td=3,Wb=4,$b=5,Yb=6,Xb=7,qb=0,eN=1,tN=2,$o=0,oM=1,sM=2,aM=3,dd=4,lM=5,cM=6,dM=7;var GE=300,Al=301,ud=302,Kb=303,Zb=304,cm=306,cf=1e3,Li=1001,bb=1002,mi=1003,nN=1004;var dm=1005;var Wn=1006,Jb=1007;var bo=1008;var pr=1009,uM=1010,fM=1011,wf=1012,Qb=1013,Yo=1014,Xo=1015,Ns=1016,ey=1017,ty=1018,Ef=1020,hM=35902,pM=35899,mM=1021,gM=1022,yo=1023,Ps=1026,Il=1027,vM=1028,ny=1029,fd=1030,iy=1031;var ry=1033,um=33776,fm=33777,hm=33778,pm=33779,oy=35840,sy=35841,ay=35842,ly=35843,cy=36196,dy=37492,uy=37496,fy=37488,hy=37489,py=37490,my=37491,gy=37808,vy=37809,by=37810,yy=37811,xy=37812,_y=37813,Sy=37814,Cy=37815,wy=37816,Ey=37817,My=37818,Ty=37819,Dy=37820,Ay=37821,Iy=36492,Py=36494,Oy=36495,Ry=36283,ky=36284,Fy=36285,Ny=36286;var Wp=2300,yb=2301,mb=2302,jE=2400,WE=2401,$E=2402;var iN=3200;var Ly=0,rN=1,Aa="",_n="srgb",nd="srgb-linear",$p="linear",an="srgb";var Qc=7680;var YE=519,oN=512,sN=513,aN=514,Uy=515,lN=516,cN=517,By=518,dN=519,XE=35044;var bM="300 es",jo=2e3,Yp=2001;function yM(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function xW(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function df(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function uN(){let i=df("canvas");return i.style.display="block",i}var oF={},uf=null;function xM(...i){let e="THREE."+i.shift();uf?uf("log",e,...i):console.log(e,...i)}function bt(...i){let e="THREE."+i.shift();uf?uf("warn",e,...i):console.warn(e,...i)}function _t(...i){let e="THREE."+i.shift();uf?uf("error",e,...i):console.error(e,...i)}function ff(...i){let e=i.join(" ");e in oF||(oF[e]=!0,bt(...i))}function fN(i,e,t){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}var Os=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){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Fi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],sF=1234567,Gp=Math.PI/180,hf=180/Math.PI;function Mf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Fi[i&255]+Fi[i>>8&255]+Fi[i>>16&255]+Fi[i>>24&255]+"-"+Fi[e&255]+Fi[e>>8&255]+"-"+Fi[e>>16&15|64]+Fi[e>>24&255]+"-"+Fi[t&63|128]+Fi[t>>8&255]+"-"+Fi[t>>16&255]+Fi[t>>24&255]+Fi[n&255]+Fi[n>>8&255]+Fi[n>>16&255]+Fi[n>>24&255]).toLowerCase()}function $t(i,e,t){return Math.max(e,Math.min(t,i))}function _M(i,e){return(i%e+e)%e}function _W(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function SW(i,e,t){return i!==e?(t-i)/(e-i):0}function jp(i,e,t){return(1-t)*i+t*e}function CW(i,e,t,n){return jp(i,e,1-Math.exp(-t*n))}function wW(i,e=1){return e-Math.abs(_M(i,e*2)-e)}function EW(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function MW(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function TW(i,e){return i+Math.floor(Math.random()*(e-i+1))}function DW(i,e){return i+Math.random()*(e-i)}function AW(i){return i*(.5-Math.random())}function IW(i){i!==void 0&&(sF=i);let e=sF+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function PW(i){return i*Gp}function OW(i){return i*hf}function RW(i){return(i&i-1)===0&&i!==0}function kW(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function FW(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function NW(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),f=s((e-n)/2),h=o((n-e)/2),p=s((n-e)/2);switch(r){case"XYX":i.set(a*d,l*u,l*f,a*c);break;case"YZY":i.set(l*f,a*d,l*u,a*c);break;case"ZXZ":i.set(l*u,l*f,a*d,a*c);break;case"XZX":i.set(a*d,l*p,l*h,a*c);break;case"YXY":i.set(l*h,a*d,l*p,a*c);break;case"ZYZ":i.set(l*p,l*h,a*d,a*c);break;default:bt("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function sf(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Ki(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var Qt={DEG2RAD:Gp,RAD2DEG:hf,generateUUID:Mf,clamp:$t,euclideanModulo:_M,mapLinear:_W,inverseLerp:SW,lerp:jp,damp:CW,pingpong:wW,smoothstep:EW,smootherstep:MW,randInt:TW,randFloat:DW,randFloatSpread:AW,seededRandom:IW,degToRad:PW,radToDeg:OW,isPowerOfTwo:RW,ceilPowerOfTwo:kW,floorPowerOfTwo:FW,setQuaternionFromProperEuler:NW,normalize:Ki,denormalize:sf},yt=class i{constructor(e=0,t=0){i.prototype.isVector2=!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){return 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){return 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=$t(this.x,e.x,t.x),this.y=$t(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=$t(this.x,e,t),this.y=$t(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar($t(n,e,t))}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=Math.trunc(this.x),this.y=Math.trunc(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}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($t(n,-1,1))}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){return 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}},vo=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,o,s,a){let l=n[r+0],c=n[r+1],d=n[r+2],u=n[r+3],f=o[s+0],h=o[s+1],p=o[s+2],v=o[s+3];if(a<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(a>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=v;return}if(u!==v||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*v;g<0&&(f=-f,h=-h,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let b=Math.acos(g),y=Math.sin(b);m=Math.sin(m*b)/y,a=Math.sin(a*b)/y,l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a}else{l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a;let b=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=b,c*=b,d*=b,u*=b}}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],f=o[s+1],h=o[s+2],p=o[s+3];return e[t]=a*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-a*h,e[t+2]=c*p+d*h+a*f-l*u,e[t+3]=d*p-a*u-l*f-c*h,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=!0){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),f=l(n/2),h=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:bt("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&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],f=n+a+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(s-r)*h}else if(n>a&&n>u){let h=2*Math.sqrt(1+n-a-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+s)/h,this._z=(o+c)/h}else if(a>u){let h=2*Math.sqrt(1+a-n-u);this._w=(o-c)/h,this._x=(r+s)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-n-a);this._w=(s-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.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($t(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){return 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=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(n=-n,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}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._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},$=class i{constructor(e=0,t=0,n=0){i.prototype.isVector3=!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){return 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){return 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){return 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 this.applyQuaternion(aF.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(aF.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=2*(s*r-a*n),d=2*(a*t-o*r),u=2*(o*n-s*t);return this.x=t+l*c+s*u-a*d,this.y=n+l*d+a*c-o*u,this.z=r+l*u+o*d-s*c,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=$t(this.x,e.x,t.x),this.y=$t(this.y,e.y,t.y),this.z=$t(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=$t(this.x,e,t),this.y=$t(this.y,e,t),this.z=$t(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar($t(n,e,t))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(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){return 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 xE.copy(this).projectOnVector(e),this.sub(xE)}reflect(e){return this.sub(xE.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($t(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)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}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){return 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()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},xE=new $,aF=new vo,Ft=class i{constructor(e,t,n,r,o,s,a,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c)}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],f=n[2],h=n[5],p=n[8],v=r[0],g=r[3],m=r[6],b=r[1],y=r[4],_=r[7],w=r[2],D=r[5],A=r[8];return o[0]=s*v+a*b+l*w,o[3]=s*g+a*y+l*D,o[6]=s*m+a*_+l*A,o[1]=c*v+d*b+u*w,o[4]=c*g+d*y+u*D,o[7]=c*m+d*_+u*A,o[2]=f*v+h*b+p*w,o[5]=f*g+h*y+p*D,o[8]=f*m+h*_+p*A,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,f=a*l-d*o,h=c*o-s*l,p=t*u+n*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=u*v,e[1]=(r*c-d*n)*v,e[2]=(a*n-r*s)*v,e[3]=f*v,e[4]=(d*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=h*v,e[7]=(n*l-c*t)*v,e[8]=(s*t-n*o)*v,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){return this.premultiply(_E.makeScale(e,t)),this}rotate(e){return this.premultiply(_E.makeRotation(-e)),this}translate(e,t){return this.premultiply(_E.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),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)}},_E=new Ft,lF=new Ft().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),cF=new Ft().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function LW(){let i={enabled:!0,workingColorSpace:nd,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===an&&(r.r=wa(r.r),r.g=wa(r.g),r.b=wa(r.b)),this.spaces[o].primaries!==this.spaces[s].primaries&&(r.applyMatrix3(this.spaces[o].toXYZ),r.applyMatrix3(this.spaces[s].fromXYZ)),this.spaces[s].transfer===an&&(r.r=af(r.r),r.g=af(r.g),r.b=af(r.b))),r},workingToColorSpace:function(r,o){return this.convert(r,this.workingColorSpace,o)},colorSpaceToWorking:function(r,o){return this.convert(r,o,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===Aa?$p:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,o=this.workingColorSpace){return r.fromArray(this.spaces[o].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,o,s){return r.copy(this.spaces[o].toXYZ).multiply(this.spaces[s].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,o){return ff("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return ff("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[nd]:{primaries:e,whitePoint:n,transfer:$p,toXYZ:lF,fromXYZ:cF,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:_n},outputColorSpaceConfig:{drawingBufferColorSpace:_n}},[_n]:{primaries:e,whitePoint:n,transfer:an,toXYZ:lF,fromXYZ:cF,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:_n}}}),i}var Wt=LW();function wa(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function af(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var $u,xb=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{$u===void 0&&($u=df("canvas")),$u.width=e.width,$u.height=e.height;let r=$u.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=$u}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=df("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),o=r.data;for(let s=0;s<o.length;s++)o[s]=wa(o[s]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(wa(t[n]/255)*255):t[n]=wa(t[n]);return{data:t,width:e.width,height:e.height}}else return bt("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},UW=0,pf=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:UW++}),this.uuid=Mf(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let n={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s<a;s++)r[s].isDataTexture?o.push(SE(r[s].image)):o.push(SE(r[s]))}else o=SE(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function SE(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?xb.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(bt("Texture: Unable to serialize Texture."),{})}var BW=0,CE=new $,qo=(()=>{class i extends Os{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Li,o=Li,s=Wn,a=bo,l=yo,c=pr,d=i.DEFAULT_ANISOTROPY,u=Aa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:BW++}),this.uuid=Mf(),this.name="",this.source=new pf(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=s,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new yt(0,0),this.repeat=new yt(1,1),this.center=new yt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ft,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(CE).x}get height(){return this.source.getSize(CE).y}get depth(){return this.source.getSize(CE).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,n){this.updateRanges.push({start:t,count:n})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(let n in t){let r=t[n];if(r===void 0){bt(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){bt(`Texture.setValues(): property '${n}' does not exist.`);continue}o&&r&&o.isVector2&&r.isVector2||o&&r&&o.isVector3&&r.isVector3||o&&r&&o.isMatrix3&&r.isMatrix3?o.copy(r):this[n]=r}}toJSON(t){let n=t===void 0||typeof t=="string";if(!n&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,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,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),n||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==GE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case cf:t.x=t.x-Math.floor(t.x);break;case Li:t.x=t.x<0?0:1;break;case bb:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case cf:t.y=t.y-Math.floor(t.y);break;case Li:t.y=t.y<0?0:1;break;case bb:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}return i.DEFAULT_IMAGE=null,i.DEFAULT_MAPPING=GE,i.DEFAULT_ANISOTROPY=1,i})(),kn=class i{constructor(e=0,t=0,n=0,r=1){i.prototype.isVector4=!0,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){return 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){return 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}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,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],f=l[1],h=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(c+1)/2,_=(h+1)/2,w=(m+1)/2,D=(d+f)/4,A=(u+v)/4,P=(p+g)/4;return y>_&&y>w?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=D/n,o=A/n):_>w?_<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(_),n=D/r,o=P/r):w<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(w),n=A/o,r=P/o),this.set(n,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],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=$t(this.x,e.x,t.x),this.y=$t(this.y,e.y,t.y),this.z=$t(this.z,e.z,t.z),this.w=$t(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=$t(this.x,e,t),this.y=$t(this.y,e,t),this.z=$t(this.z,e,t),this.w=$t(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar($t(n,e,t))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(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){return 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}},_b=class extends Os{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Wn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new kn(0,0,e,t),this.scissorTest=!1,this.viewport=new kn(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new qo(r);this.textures=[];let s=n.count;for(let a=0;a<s;a++)this.textures[a]=o.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:Wn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);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){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new pf(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Br=class extends _b{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Xp=class extends qo{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=mi,this.minFilter=mi,this.wrapR=Li,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var Sb=class extends qo{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=mi,this.minFilter=mi,this.wrapR=Li,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Ji=class{constructor(e=new $(1/0,1/0,1/0),t=new $(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Vo.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Vo.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=Vo.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let o=n.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let s=0,a=o.count;s<a;s++)e.isMesh===!0?e.getVertexPosition(s,Vo):Vo.fromBufferAttribute(o,s),Vo.applyMatrix4(e.matrixWorld),this.expandByPoint(Vo);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Yv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Yv.copy(n.boundingBox)),Yv.applyMatrix4(e.matrixWorld),this.union(Yv)}let r=e.children;for(let o=0,s=r.length;o<s;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.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.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Vo),Vo.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(Up),Xv.subVectors(this.max,Up),Yu.subVectors(e.a,Up),Xu.subVectors(e.b,Up),qu.subVectors(e.c,Up),pl.subVectors(Xu,Yu),ml.subVectors(qu,Xu),qc.subVectors(Yu,qu);let t=[0,-pl.z,pl.y,0,-ml.z,ml.y,0,-qc.z,qc.y,pl.z,0,-pl.x,ml.z,0,-ml.x,qc.z,0,-qc.x,-pl.y,pl.x,0,-ml.y,ml.x,0,-qc.y,qc.x,0];return!wE(t,Yu,Xu,qu,Xv)||(t=[1,0,0,0,1,0,0,0,1],!wE(t,Yu,Xu,qu,Xv))?!1:(qv.crossVectors(pl,ml),t=[qv.x,qv.y,qv.z],wE(t,Yu,Xu,qu,Xv))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Vo).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Vo).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:(va[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),va[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),va[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),va[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),va[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),va[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),va[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),va[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(va),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)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},va=[new $,new $,new $,new $,new $,new $,new $,new $],Vo=new $,Yv=new Ji,Yu=new $,Xu=new $,qu=new $,pl=new $,ml=new $,qc=new $,Up=new $,Xv=new $,qv=new $,Kc=new $;function wE(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){Kc.fromArray(i,o);let a=r.x*Math.abs(Kc.x)+r.y*Math.abs(Kc.y)+r.z*Math.abs(Kc.z),l=e.dot(Kc),c=t.dot(Kc),d=n.dot(Kc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var zW=new Ji,Bp=new $,EE=new $,Sl=class{constructor(e=new $,t=-1){this.isSphere=!0,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):zW.setFromPoints(e).getCenter(n);let r=0;for(let o=0,s=e.length;o<s;o++)r=Math.max(r,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.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){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Bp.subVectors(e,this.center);let t=Bp.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(Bp,r/n),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(EE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Bp.copy(e.center).add(EE)),this.expandByPoint(Bp.copy(e.center).sub(EE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},ba=new $,ME=new $,Kv=new $,gl=new $,TE=new $,Zv=new $,DE=new $,Ea=class{constructor(e=new $,t=new $(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.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ba)),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.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=ba.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ba.copy(this.origin).addScaledVector(this.direction,t),ba.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){ME.copy(e).add(t).multiplyScalar(.5),Kv.copy(t).sub(e).normalize(),gl.copy(this.origin).sub(ME);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Kv),a=gl.dot(this.direction),l=-gl.dot(Kv),c=gl.lengthSq(),d=Math.abs(1-s*s),u,f,h,p;if(d>0)if(u=s*l-a,f=s*a-l,p=o*d,u>=0)if(f>=-p)if(f<=p){let v=1/d;u*=v,f*=v,h=u*(u+s*f+2*a)+f*(s*u+f+2*l)+c}else f=o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f=-o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f<=-p?(u=Math.max(0,-(-s*o+a)),f=u>0?-o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c):f<=p?(u=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(u=Math.max(0,-(s*o+a)),f=u>0?o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c);else f=s>0?-o:o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(ME).addScaledVector(Kv,f),h}intersectSphere(e,t){ba.subVectors(e.center,this.origin);let n=ba.dot(this.direction),r=ba.dot(ba)-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 l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1: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,f=this.origin;return c>=0?(n=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(n=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),d>=0?(o=(e.min.y-f.y)*d,s=(e.max.y-f.y)*d):(o=(e.max.y-f.y)*d,s=(e.min.y-f.y)*d),n>s||o>r||((o>n||isNaN(n))&&(n=o),(s<r||isNaN(r))&&(r=s),u>=0?(a=(e.min.z-f.z)*u,l=(e.max.z-f.z)*u):(a=(e.max.z-f.z)*u,l=(e.min.z-f.z)*u),n>l||a>r)||((a>n||n!==n)&&(n=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,ba)!==null}intersectTriangle(e,t,n,r,o){TE.subVectors(t,e),Zv.subVectors(n,e),DE.crossVectors(TE,Zv);let s=this.direction.dot(DE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;gl.subVectors(this.origin,e);let l=a*this.direction.dot(Zv.crossVectors(gl,Zv));if(l<0)return null;let c=a*this.direction.dot(TE.cross(gl));if(c<0||l+c>s)return null;let d=-a*gl.dot(DE);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)}},An=class i{constructor(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){i.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g)}set(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){let m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=o,m[5]=s,m[9]=a,m[13]=l,m[2]=c,m[6]=d,m[10]=u,m[14]=f,m[3]=h,m[7]=p,m[11]=v,m[15]=g,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 this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(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){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,r=1/Ku.setFromMatrixColumn(e,0).length(),o=1/Ku.setFromMatrixColumn(e,1).length(),s=1/Ku.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){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 f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=h+p*c,t[5]=f-v*c,t[9]=-a*l,t[2]=v-f*c,t[6]=p+h*c,t[10]=s*l}else if(e.order==="YXZ"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f+v*a,t[4]=p*a-h,t[8]=s*c,t[1]=s*u,t[5]=s*d,t[9]=-a,t[2]=h*a-p,t[6]=v+f*a,t[10]=s*l}else if(e.order==="ZXY"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f-v*a,t[4]=-s*u,t[8]=p+h*a,t[1]=h+p*a,t[5]=s*d,t[9]=v-f*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=p*c-h,t[8]=f*c+v,t[1]=l*u,t[5]=v*c+f,t[9]=h*c-p,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=v-f*u,t[8]=p*u+h,t[1]=u,t[5]=s*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*u+p,t[10]=f-v*u}else if(e.order==="XZY"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=f*u+v,t[5]=s*d,t[9]=h*u-p,t[2]=p*u-h,t[6]=a*d,t[10]=v*u+f}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(VW,e,HW)}lookAt(e,t,n){let r=this.elements;return Nr.subVectors(e,t),Nr.lengthSq()===0&&(Nr.z=1),Nr.normalize(),vl.crossVectors(n,Nr),vl.lengthSq()===0&&(Math.abs(n.z)===1?Nr.x+=1e-4:Nr.z+=1e-4,Nr.normalize(),vl.crossVectors(n,Nr)),vl.normalize(),Jv.crossVectors(Nr,vl),r[0]=vl.x,r[4]=Jv.x,r[8]=Nr.x,r[1]=vl.y,r[5]=Jv.y,r[9]=Nr.y,r[2]=vl.z,r[6]=Jv.z,r[10]=Nr.z,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[4],l=n[8],c=n[12],d=n[1],u=n[5],f=n[9],h=n[13],p=n[2],v=n[6],g=n[10],m=n[14],b=n[3],y=n[7],_=n[11],w=n[15],D=r[0],A=r[4],P=r[8],E=r[12],I=r[1],L=r[5],Y=r[9],G=r[13],Q=r[2],ee=r[6],te=r[10],X=r[14],ie=r[3],Se=r[7],Ce=r[11],Ee=r[15];return o[0]=s*D+a*I+l*Q+c*ie,o[4]=s*A+a*L+l*ee+c*Se,o[8]=s*P+a*Y+l*te+c*Ce,o[12]=s*E+a*G+l*X+c*Ee,o[1]=d*D+u*I+f*Q+h*ie,o[5]=d*A+u*L+f*ee+h*Se,o[9]=d*P+u*Y+f*te+h*Ce,o[13]=d*E+u*G+f*X+h*Ee,o[2]=p*D+v*I+g*Q+m*ie,o[6]=p*A+v*L+g*ee+m*Se,o[10]=p*P+v*Y+g*te+m*Ce,o[14]=p*E+v*G+g*X+m*Ee,o[3]=b*D+y*I+_*Q+w*ie,o[7]=b*A+y*L+_*ee+w*Se,o[11]=b*P+y*Y+_*te+w*Ce,o[15]=b*E+y*G+_*X+w*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],f=e[10],h=e[14],p=e[3],v=e[7],g=e[11],m=e[15],b=l*h-c*f,y=a*h-c*u,_=a*f-l*u,w=s*h-c*d,D=s*f-l*d,A=s*u-a*d;return t*(v*b-g*y+m*_)-n*(p*b-g*w+m*D)+r*(p*y-v*w+m*A)-o*(p*_-v*D+g*A)}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],f=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],b=u*g*c-v*f*c+v*l*h-a*g*h-u*l*m+a*f*m,y=p*f*c-d*g*c-p*l*h+s*g*h+d*l*m-s*f*m,_=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,w=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,D=t*b+n*y+r*_+o*w;if(D===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let A=1/D;return e[0]=b*A,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*A,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*A,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*A,e[4]=y*A,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*A,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*A,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*A,e[8]=_*A,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*A,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*A,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*A,e[12]=w*A,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*A,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*A,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*A,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 e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):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,f=o*c,h=o*d,p=o*u,v=s*d,g=s*u,m=a*u,b=l*c,y=l*d,_=l*u,w=n.x,D=n.y,A=n.z;return r[0]=(1-(v+m))*w,r[1]=(h+_)*w,r[2]=(p-y)*w,r[3]=0,r[4]=(h-_)*D,r[5]=(1-(f+m))*D,r[6]=(g+b)*D,r[7]=0,r[8]=(p+y)*A,r[9]=(g-b)*A,r[10]=(1-(f+v))*A,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;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let o=Ku.set(r[0],r[1],r[2]).length(),s=Ku.set(r[4],r[5],r[6]).length(),a=Ku.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Ho.copy(this);let c=1/o,d=1/s,u=1/a;return Ho.elements[0]*=c,Ho.elements[1]*=c,Ho.elements[2]*=c,Ho.elements[4]*=d,Ho.elements[5]*=d,Ho.elements[6]*=d,Ho.elements[8]*=u,Ho.elements[9]*=u,Ho.elements[10]*=u,t.setFromRotationMatrix(Ho),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=jo,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(n-r),f=(t+e)/(t-e),h=(n+r)/(n-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===jo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Yp)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,o,s,a=jo,l=!1){let c=this.elements,d=2/(t-e),u=2/(n-r),f=-(t+e)/(t-e),h=-(n+r)/(n-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===jo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Yp)p=-1/(s-o),v=-o/(s-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=0,c[12]=f,c[1]=0,c[5]=u,c[9]=0,c[13]=h,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=0,c[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}},Ku=new $,Ho=new An,VW=new $(0,0,0),HW=new $(1,1,1),vl=new $,Jv=new $,Nr=new $,dF=new An,uF=new vo,Ma=(()=>{class i{constructor(t=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,n,r,o=this._order){return this._x=t,this._y=n,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,n=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(n){case"XYZ":this._y=Math.asin($t(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-$t(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin($t(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-$t(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin($t(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-$t(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:bt("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return dF.makeRotationFromQuaternion(t),this.setFromRotationMatrix(dF,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return uF.setFromEuler(this),this.setFromQuaternion(uF,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return i.DEFAULT_ORDER="XYZ",i})(),mf=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},GW=0,fF=new $,Zu=new vo,ya=new An,Qv=new $,zp=new $,jW=new $,WW=new vo,hF=new $(1,0,0),pF=new $(0,1,0),mF=new $(0,0,1),gF={type:"added"},$W={type:"removed"},Ju={type:"childadded",child:null},AE={type:"childremoved",child:null},zr=(()=>{class i extends Os{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:GW++}),this.uuid=Mf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new $,n=new Ma,r=new vo,o=new $(1,1,1);function s(){r.setFromEuler(n,!1)}function a(){n.setFromQuaternion(r,void 0,!1)}n._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new An},normalMatrix:{value:new Ft}}),this.matrix=new An,this.matrixWorld=new An,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new mf,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,n){this.quaternion.setFromAxisAngle(t,n)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,n){return Zu.setFromAxisAngle(t,n),this.quaternion.multiply(Zu),this}rotateOnWorldAxis(t,n){return Zu.setFromAxisAngle(t,n),this.quaternion.premultiply(Zu),this}rotateX(t){return this.rotateOnAxis(hF,t)}rotateY(t){return this.rotateOnAxis(pF,t)}rotateZ(t){return this.rotateOnAxis(mF,t)}translateOnAxis(t,n){return fF.copy(t).applyQuaternion(this.quaternion),this.position.add(fF.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(hF,t)}translateY(t){return this.translateOnAxis(pF,t)}translateZ(t){return this.translateOnAxis(mF,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ya.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?Qv.copy(t):Qv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),zp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ya.lookAt(zp,Qv,this.up):ya.lookAt(Qv,zp,this.up),this.quaternion.setFromRotationMatrix(ya),o&&(ya.extractRotation(o.matrixWorld),Zu.setFromRotationMatrix(ya),this.quaternion.premultiply(Zu.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(_t("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(gF),Ju.child=t,this.dispatchEvent(Ju),Ju.child=null):_t("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let n=this.children.indexOf(t);return n!==-1&&(t.parent=null,this.children.splice(n,1),t.dispatchEvent($W),AE.child=t,this.dispatchEvent(AE),AE.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),ya.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ya.multiply(t.parent.matrixWorld)),t.applyMatrix4(ya),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(gF),Ju.child=t,this.dispatchEvent(Ju),Ju.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,n){if(this[t]===n)return this;for(let r=0,o=this.children.length;r<o;r++){let a=this.children[r].getObjectByProperty(t,n);if(a!==void 0)return a}}getObjectsByProperty(t,n,r=[]){this[t]===n&&r.push(this);let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].getObjectsByProperty(t,n,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zp,t,jW),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zp,WW,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(t)}traverseAncestors(t){let n=this.parent;n!==null&&(t(n),n.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(t)}updateWorldMatrix(t,n){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>he(k({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>k({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function s(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=s(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d<u;d++){let f=c[d];s(t.shapes,f)}else s(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(s(t.materials,this.material[c]));o.material=l}else o.material=s(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(s(t.animations,c))}}if(n){let l=a(t.geometries),c=a(t.materials),d=a(t.textures),u=a(t.images),f=a(t.shapes),h=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),n===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new $(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),Go=new $,xa=new $,IE=new $,_a=new $,Qu=new $,ef=new $,vF=new $,PE=new $,OE=new $,RE=new $,kE=new kn,FE=new kn,NE=new kn,xl=class i{constructor(e=new $,t=new $,n=new $){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Go.subVectors(e,t),r.cross(Go);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){Go.subVectors(r,t),xa.subVectors(n,t),IE.subVectors(e,t);let s=Go.dot(Go),a=Go.dot(xa),l=Go.dot(IE),c=xa.dot(xa),d=xa.dot(IE),u=s*c-a*a;if(u===0)return o.set(0,0,0),null;let f=1/u,h=(c*l-a*d)*f,p=(s*d-a*l)*f;return o.set(1-h-p,p,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,_a)===null?!1:_a.x>=0&&_a.y>=0&&_a.x+_a.y<=1}static getInterpolation(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,_a)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,_a.x),l.addScaledVector(s,_a.y),l.addScaledVector(a,_a.z),l)}static getInterpolatedAttribute(e,t,n,r,o,s){return kE.setScalar(0),FE.setScalar(0),NE.setScalar(0),kE.fromBufferAttribute(e,t),FE.fromBufferAttribute(e,n),NE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(kE,o.x),s.addScaledVector(FE,o.y),s.addScaledVector(NE,o.z),s}static isFrontFacing(e,t,n,r){return Go.subVectors(n,t),xa.subVectors(e,t),Go.cross(xa).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 Go.subVectors(this.c,this.b),xa.subVectors(this.a,this.b),Go.cross(xa).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)}getInterpolation(e,t,n,r,o){return i.getInterpolation(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;Qu.subVectors(r,n),ef.subVectors(o,n),PE.subVectors(e,n);let l=Qu.dot(PE),c=ef.dot(PE);if(l<=0&&c<=0)return t.copy(n);OE.subVectors(e,r);let d=Qu.dot(OE),u=ef.dot(OE);if(d>=0&&u<=d)return t.copy(r);let f=l*u-d*c;if(f<=0&&l>=0&&d<=0)return s=l/(l-d),t.copy(n).addScaledVector(Qu,s);RE.subVectors(e,o);let h=Qu.dot(RE),p=ef.dot(RE);if(p>=0&&h<=p)return t.copy(o);let v=h*c-l*p;if(v<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(n).addScaledVector(ef,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return vF.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(vF,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector(Qu,s).addScaledVector(ef,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},hN={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},bl={h:0,s:0,l:0},eb={h:0,s:0,l:0};function LE(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}var ut=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=_n){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Wt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=Wt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Wt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=Wt.workingColorSpace){if(e=_M(e,1),t=$t(t,0,1),n=$t(n,0,1),t===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o;this.r=LE(s,o,e+1/3),this.g=LE(s,o,e),this.b=LE(s,o,e-1/3)}return Wt.colorSpaceToWorking(this,r),this}setStyle(e,t=_n){function n(o){o!==void 0&&parseFloat(o)<1&&bt("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){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 n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:bt("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(s===6)return this.setHex(parseInt(o,16),t);bt("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=_n){let n=hN[e.toLowerCase()];return n!==void 0?this.setHex(n,t):bt("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=wa(e.r),this.g=wa(e.g),this.b=wa(e.b),this}copyLinearToSRGB(e){return this.r=af(e.r),this.g=af(e.g),this.b=af(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=_n){return Wt.workingToColorSpace(Ni.copy(this),e),Math.round($t(Ni.r*255,0,255))*65536+Math.round($t(Ni.g*255,0,255))*256+Math.round($t(Ni.b*255,0,255))}getHexString(e=_n){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Wt.workingColorSpace){Wt.workingToColorSpace(Ni.copy(this),t);let n=Ni.r,r=Ni.g,o=Ni.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+(r<o?6:0);break;case r:l=(o-n)/u+2;break;case o:l=(n-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=Wt.workingColorSpace){return Wt.workingToColorSpace(Ni.copy(this),t),e.r=Ni.r,e.g=Ni.g,e.b=Ni.b,e}getStyle(e=_n){Wt.workingToColorSpace(Ni.copy(this),e);let t=Ni.r,n=Ni.g,r=Ni.b;return e!==_n?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(bl),this.setHSL(bl.h+e,bl.s+t,bl.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(bl),e.getHSL(eb);let n=jp(bl.h,eb.h,t),r=jp(bl.s,eb.s,t),o=jp(bl.l,eb.l,t);return this.setHSL(n,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*r,this.g=o[1]*t+o[4]*n+o[7]*r,this.b=o[2]*t+o[5]*n+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Ni=new ut;ut.NAMES=hN;var YW=0,hr=class extends Os{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:YW++}),this.uuid=Mf(),this.name="",this.type="Material",this.blending=ed,this.side=Zi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=gb,this.blendDst=vb,this.blendEquation=_l,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ut(0,0,0),this.blendAlpha=0,this.depthFunc=td,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=YE,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Qc,this.stencilZFail=Qc,this.stencilZPass=Qc,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.forceSinglePass=!1,this.allowOverride=!0,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}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){bt(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){bt(`Material: '${t}' is not a property of THREE.${this.type}.`);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.7,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!==void 0&&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.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),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.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),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&&this.attenuationDistance!==1/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!==ed&&(n.blending=this.blending),this.side!==Zi&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==gb&&(n.blendSrc=this.blendSrc),this.blendDst!==vb&&(n.blendDst=this.blendDst),this.blendEquation!==_l&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==td&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==YE&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Qc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Qc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Qc&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&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!==void 0&&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.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),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=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(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.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,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.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,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.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,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++}},qp=class extends hr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ut(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Ma,this.combine=qb,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,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.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),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.fog=e.fog,this}};var ei=new $,tb=new yt,XW=0,Ur=class{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:XW++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=XE,this.updateRanges=[],this.gpuType=Xo,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)tb.fromBufferAttribute(this,t),tb.applyMatrix3(e),this.setXY(t,tb.x,tb.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyMatrix3(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyMatrix4(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyNormalMatrix(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.transformDirection(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=sf(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Ki(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=sf(t,this.array)),t}setX(e,t){return this.normalized&&(t=Ki(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=sf(t,this.array)),t}setY(e,t){return this.normalized&&(t=Ki(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=sf(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Ki(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=sf(t,this.array)),t}setW(e,t){return this.normalized&&(t=Ki(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Ki(t,this.array),n=Ki(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=Ki(t,this.array),n=Ki(n,this.array),r=Ki(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,o){return e*=this.itemSize,this.normalized&&(t=Ki(t,this.array),n=Ki(n,this.array),r=Ki(r,this.array),o=Ki(o,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==XE&&(e.usage=this.usage),e}};var Kp=class extends Ur{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var Zp=class extends Ur{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var jn=class extends Ur{constructor(e,t,n){super(new Float32Array(e),t,n)}},qW=0,mo=new An,UE=new zr,tf=new $,Lr=new Ji,Vp=new Ji,hi=new $,ni=class i extends Os{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:qW++}),this.uuid=Mf(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(yM(e)?Zp:Kp)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}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 Ft().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 mo.makeRotationFromQuaternion(e),this.applyMatrix4(mo),this}rotateX(e){return mo.makeRotationX(e),this.applyMatrix4(mo),this}rotateY(e){return mo.makeRotationY(e),this.applyMatrix4(mo),this}rotateZ(e){return mo.makeRotationZ(e),this.applyMatrix4(mo),this}translate(e,t,n){return mo.makeTranslation(e,t,n),this.applyMatrix4(mo),this}scale(e,t,n){return mo.makeScale(e,t,n),this.applyMatrix4(mo),this}lookAt(e){return UE.lookAt(e),UE.updateMatrix(),this.applyMatrix4(UE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(tf).negate(),this.translate(tf.x,tf.y,tf.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let n=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];n.push(s.x,s.y,s.z||0)}this.setAttribute("position",new jn(n,3))}else{let n=Math.min(e.length,t.count);for(let r=0;r<n;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&bt("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ji);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){_t("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new $(-1/0,-1/0,-1/0),new $(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){let o=t[n];Lr.setFromBufferAttribute(o),this.morphTargetsRelative?(hi.addVectors(this.boundingBox.min,Lr.min),this.boundingBox.expandByPoint(hi),hi.addVectors(this.boundingBox.max,Lr.max),this.boundingBox.expandByPoint(hi)):(this.boundingBox.expandByPoint(Lr.min),this.boundingBox.expandByPoint(Lr.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&_t('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Sl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){_t("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new $,1/0);return}if(e){let n=this.boundingSphere.center;if(Lr.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];Vp.setFromBufferAttribute(a),this.morphTargetsRelative?(hi.addVectors(Lr.min,Vp.min),Lr.expandByPoint(hi),hi.addVectors(Lr.max,Vp.max),Lr.expandByPoint(hi)):(Lr.expandByPoint(Vp.min),Lr.expandByPoint(Vp.max))}Lr.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)hi.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(hi));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)hi.fromBufferAttribute(a,c),l&&(tf.fromBufferAttribute(e,c),hi.add(tf)),r=Math.max(r,n.distanceToSquared(hi))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&_t('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){_t("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Ur(new Float32Array(4*n.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<n.count;P++)a[P]=new $,l[P]=new $;let c=new $,d=new $,u=new $,f=new yt,h=new yt,p=new yt,v=new $,g=new $;function m(P,E,I){c.fromBufferAttribute(n,P),d.fromBufferAttribute(n,E),u.fromBufferAttribute(n,I),f.fromBufferAttribute(o,P),h.fromBufferAttribute(o,E),p.fromBufferAttribute(o,I),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[P].add(v),a[E].add(v),a[I].add(v),l[P].add(g),l[E].add(g),l[I].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let P=0,E=b.length;P<E;++P){let I=b[P],L=I.start,Y=I.count;for(let G=L,Q=L+Y;G<Q;G+=3)m(e.getX(G+0),e.getX(G+1),e.getX(G+2))}let y=new $,_=new $,w=new $,D=new $;function A(P){w.fromBufferAttribute(r,P),D.copy(w);let E=a[P];y.copy(E),y.sub(w.multiplyScalar(w.dot(E))).normalize(),_.crossVectors(D,E);let L=_.dot(l[P])<0?-1:1;s.setXYZW(P,y.x,y.y,y.z,L)}for(let P=0,E=b.length;P<E;++P){let I=b[P],L=I.start,Y=I.count;for(let G=L,Q=L+Y;G<Q;G+=3)A(e.getX(G+0)),A(e.getX(G+1)),A(e.getX(G+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Ur(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let f=0,h=n.count;f<h;f++)n.setXYZ(f,0,0,0);let r=new $,o=new $,s=new $,a=new $,l=new $,c=new $,d=new $,u=new $;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),v=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,v),c.fromBufferAttribute(n,g),a.add(d),l.add(d),c.add(d),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(v,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),n.setXYZ(f+0,d.x,d.y,d.z),n.setXYZ(f+1,d.x,d.y,d.z),n.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)hi.fromBufferAttribute(e,t),hi.normalize(),e.setXYZ(t,hi.x,hi.y,hi.z)}toNonIndexed(){function e(a,l){let c=a.array,d=a.itemSize,u=a.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?h=l[v]*a.data.stride+a.offset:h=l[v]*d;for(let m=0;m<d;m++)f[p++]=c[h++]}return new Ur(f,d,u)}if(this.index===null)return bt("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new i,n=this.index.array,r=this.attributes;for(let a in r){let l=r[a],c=e(l,n);t.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let d=0,u=c.length;d<u;d++){let f=c[d],h=e(f,n);l.push(h)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;let s=this.groups;for(let a=0,l=s.length;a<l;a++){let c=s[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(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,f=c.length;u<f;u++){let h=c[u];d.push(h.toJSON(e.data))}d.length>0&&(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=a.toJSON()),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());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 f=0,h=u.length;f<h;f++)d.push(u[f].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;let s=e.groups;for(let c=0,d=s.length;c<d;c++){let u=s[c];this.addGroup(u.start,u.count,u.materialIndex)}let a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},bF=new An,Zc=new Ea,nb=new Sl,yF=new $,ib=new $,rb=new $,ob=new $,BE=new $,sb=new $,xF=new $,ab=new $,Qi=class extends zr{constructor(e=new ni,t=new qp){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.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;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}getVertexPosition(e,t){let n=this.geometry,r=n.attributes.position,o=n.morphAttributes.position,s=n.morphTargetsRelative;t.fromBufferAttribute(r,e);let a=this.morphTargetInfluences;if(o&&a){sb.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(BE.fromBufferAttribute(u,e),s?sb.addScaledVector(BE,d):sb.addScaledVector(BE.sub(t),d))}t.add(sb)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),nb.copy(n.boundingSphere),nb.applyMatrix4(o),Zc.copy(e.ray).recast(e.near),!(nb.containsPoint(Zc.origin)===!1&&(Zc.intersectSphere(nb,yF)===null||Zc.origin.distanceToSquared(yF)>(e.far-e.near)**2))&&(bF.copy(o).invert(),Zc.copy(e.ray).applyMatrix4(bF),!(n.boundingBox!==null&&Zc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Zc)))}_computeIntersections(e,t,n){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let _=b,w=y;_<w;_+=3){let D=a.getX(_),A=a.getX(_+1),P=a.getX(_+2);r=lb(this,m,e,n,c,d,u,D,A,P),r&&(r.faceIndex=Math.floor(_/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(a.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=a.getX(g),y=a.getX(g+1),_=a.getX(g+2);r=lb(this,s,e,n,c,d,u,b,y,_),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let _=b,w=y;_<w;_+=3){let D=_,A=_+1,P=_+2;r=lb(this,m,e,n,c,d,u,D,A,P),r&&(r.faceIndex=Math.floor(_/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(l.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=g,y=g+1,_=g+2;r=lb(this,s,e,n,c,d,u,b,y,_),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function KW(i,e,t,n,r,o,s,a){let l;if(e.side===er?l=n.intersectTriangle(s,o,r,!0,a):l=n.intersectTriangle(r,o,s,e.side===Zi,a),l===null)return null;ab.copy(a),ab.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(ab);return c<t.near||c>t.far?null:{distance:c,point:ab.clone(),object:i}}function lb(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,ib),i.getVertexPosition(l,rb),i.getVertexPosition(c,ob);let d=KW(i,e,t,n,ib,rb,ob,xF);if(d){let u=new $;xl.getBarycoord(xF,ib,rb,ob,u),r&&(d.uv=xl.getInterpolatedAttribute(r,a,l,c,u,new yt)),o&&(d.uv1=xl.getInterpolatedAttribute(o,a,l,c,u,new yt)),s&&(d.normal=xl.getInterpolatedAttribute(s,a,l,c,u,new $),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new $,materialIndex:0};xl.getNormal(ib,rb,ob,f.normal),d.face=f,d.barycoord=u}return d}var gf=class i extends ni{constructor(e=1,t=1,n=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,n,t,e,s,o,0),p("z","y","x",1,-1,n,t,-e,s,o,1),p("x","z","y",1,1,e,n,t,r,s,2),p("x","z","y",1,-1,e,n,-t,r,s,3),p("x","y","z",1,-1,e,t,n,r,o,4),p("x","y","z",-1,-1,e,t,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new jn(c,3)),this.setAttribute("normal",new jn(d,3)),this.setAttribute("uv",new jn(u,2));function p(v,g,m,b,y,_,w,D,A,P,E){let I=_/A,L=w/P,Y=_/2,G=w/2,Q=D/2,ee=A+1,te=P+1,X=0,ie=0,Se=new $;for(let Ce=0;Ce<te;Ce++){let Ee=Ce*L-G;for(let de=0;de<ee;de++){let Pe=de*I-Y;Se[v]=Pe*b,Se[g]=Ee*y,Se[m]=Q,c.push(Se.x,Se.y,Se.z),Se[v]=0,Se[g]=0,Se[m]=D>0?1:-1,d.push(Se.x,Se.y,Se.z),u.push(de/A),u.push(1-Ce/P),X+=1}}for(let Ce=0;Ce<P;Ce++)for(let Ee=0;Ee<A;Ee++){let de=f+Ee+ee*Ce,Pe=f+Ee+ee*(Ce+1),At=f+(Ee+1)+ee*(Ce+1),zt=f+(Ee+1)+ee*Ce;l.push(de,Pe,zt),l.push(Pe,At,zt),ie+=6}a.addGroup(h,ie,E),h+=ie,f+=X}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function hd(i){let e={};for(let t in i){e[t]={};for(let n in i[t]){let r=i[t][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(bt("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function Ui(i){let e={};for(let t=0;t<i.length;t++){let n=hd(i[t]);for(let r in n)e[r]=n[r]}return e}function ZW(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function SM(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Wt.workingColorSpace}var pN={clone:hd,merge:Ui},JW=`void main() {
5
+ `).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=t.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(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}}addHeaderEntry(e,t){let n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}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 Pv=class{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()}},Ov=class{encodeKey(e){return hk(e)}encodeValue(e){return hk(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function n9(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 i9=/%(\d[a-f0-9])/gi,r9={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function hk(i){return encodeURIComponent(i).replace(i9,(e,t)=>r9[t]??e)}function Iv(i){return`${i}`}var ho=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new Ov,e.fromString){if(e.fromObject)throw new qe(2805,!1);this.map=n9(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(Iv):[Iv(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(Iv(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(Iv(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)}};function o9(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function pk(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function mk(i){return typeof Blob<"u"&&i instanceof Blob}function gk(i){return typeof FormData<"u"&&i instanceof FormData}function s9(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var vk="Content-Type",bk="Accept",yk="text/plain",xk="application/json",a9=`${xk}, ${yk}, */*`,zu=class i{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,n,r){this.url=t,this.method=e.toUpperCase();let o;if(o9(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new qe(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new po,this.context??=new Pv,!this.params)this.params=new ho,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||pk(this.body)||mk(this.body)||gk(this.body)||s9(this.body)?this.body:this.body instanceof ho?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||gk(this.body)?null:mk(this.body)?this.body.type||null:pk(this.body)?null:typeof this.body=="string"?yk:this.body instanceof ho?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?xk:null}clone(e={}){let t=e.method||this.method,n=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,v=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,m=e.withCredentials??this.withCredentials,b=e.reportProgress??this.reportProgress,y=e.headers||this.headers,_=e.params||this.params,w=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((D,A)=>D.set(A,e.setHeaders[A]),y)),e.setParams&&(_=Object.keys(e.setParams).reduce((D,A)=>D.set(A,e.setParams[A]),_)),new i(t,n,g,{params:_,headers:y,context:w,reportProgress:b,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},Yc=(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})(Yc||{}),Vu=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new po,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},Rv=class i extends Vu{constructor(e={}){super(e)}type=Yc.ResponseHeader;clone(e={}){return new i({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})}},Hu=class i extends Vu{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Yc.Response;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,redirected:e.redirected??this.redirected,responseType:e.responseType??this.responseType})}},ul=class extends Vu{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},l9=200,c9=204;var d9=new Ze("");var u9=/^\)\]\}',?\n/;var iE=(()=>{class i{xhrFactory;tracingService=Z(ws,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new qe(-2800,!1);let n=this.xhrFactory;return hs(null).pipe(C1(()=>new xn(o=>{let s=n.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),t.headers.has(bk)||s.setRequestHeader(bk,a9),!t.headers.has(vk)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(vk,g)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=s.statusText||"OK",m=new po(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new Rv({headers:m,status:s.status,statusText:g,url:b}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:b,url:y}=c(),_=null;m!==c9&&(_=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=_?l9:0);let w=m>=200&&m<300;if(t.responseType==="json"&&typeof _=="string"){let D=_;_=_.replace(u9,"");try{_=_!==""?JSON.parse(_):null}catch(A){_=D,w&&(w=!1,_={error:A,text:_})}}w?(o.next(new Hu({body:_,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new ul({error:_,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new ul({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(b)}),f=u;t.timeout&&(f=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new ul({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:m||void 0});o.error(b)}));let h=!1,p=this.maybePropagateTrace(g=>{h||(o.next(c()),h=!0);let m={type:Yc.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),t.responseType==="text"&&s.responseText&&(m.partialText=s.responseText),o.next(m)}),v=this.maybePropagateTrace(g=>{let m={type:Yc.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)});return s.addEventListener("load",d),s.addEventListener("error",u),s.addEventListener("timeout",f),s.addEventListener("abort",u),t.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",v)),s.send(a),o.next({type:Yc.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",f),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(n){return new(n||i)(Ke($c))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function f9(i,e){return e(i)}function h9(i,e,t){return(n,r)=>fu(t,()=>e(n,o=>i(o,r)))}var rE=new Ze("",{factory:()=>[]}),oE=new Ze(""),_k=new Ze("",{factory:()=>!0});var sE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Ke(iE),r},providedIn:"root"})}return i})();var kv=(()=>{class i{backend;injector;chain=null;pendingTasks=Z(Ic);contributeToStability=Z(_k);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(rE),...this.injector.get(oE,[])]));this.chain=n.reduceRight((r,o)=>h9(r,o,this.injector),f9)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(Dh(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(Ke(sE),Ke(Pi))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),aE=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Ke(kv),r},providedIn:"root"})}return i})();function nE(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,credentials:i.credentials,transferCache:i.transferCache,timeout:i.timeout,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,integrity:i.integrity,referrer:i.referrer,referrerPolicy:i.referrerPolicy}}var Fv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof zu)o=t;else{let l;r.headers instanceof po?l=r.headers:l=new po(r.headers);let c;r.params&&(r.params instanceof ho?c=r.params:c=new ho({fromObject:r.params})),o=new zu(t,n,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,timeout:r.timeout})}let s=hs(o).pipe(S1(l=>this.handler.handle(l)));if(t instanceof zu||r.observe==="events")return s;let a=s.pipe(_1(l=>l instanceof Hu));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(lr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new qe(2806,!1);return l.body}));case"blob":return a.pipe(lr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new qe(2807,!1);return l.body}));case"text":return a.pipe(lr(l=>{if(l.body!==null&&typeof l.body!="string")throw new qe(2808,!1);return l.body}));default:return a.pipe(lr(l=>l.body))}case"response":return a;default:throw new qe(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new ho().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,nE(r,n))}post(t,n,r={}){return this.request("POST",t,nE(r,n))}put(t,n,r={}){return this.request("PUT",t,nE(r,n))}static \u0275fac=function(n){return new(n||i)(Ke(aE))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var p9=new Ze("",{factory:()=>!0}),m9="XSRF-TOKEN",g9=new Ze("",{factory:()=>m9}),v9="X-XSRF-TOKEN",b9=new Ze("",{factory:()=>v9}),y9=(()=>{class i{cookieName=Z(g9);doc=Z(Tn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=_p(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Sk=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Ke(y9),r},providedIn:"root"})}return i})();function x9(i,e){if(!Z(p9)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Z(Sv).href,{origin:o}=new URL(r),{origin:s}=new URL(i.url,o);if(o!==s)return e(i)}catch{return e(i)}let t=Z(Sk).getToken(),n=Z(b9);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var lE=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i})(lE||{});function _9(i,e){return{\u0275kind:i,\u0275providers:e}}function cE(...i){let e=[Fv,kv,{provide:aE,useExisting:kv},{provide:sE,useFactory:()=>Z(d9,{optional:!0})??Z(iE)},{provide:rE,useValue:x9,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return la(e)}function dE(i){return _9(lE.Interceptors,i.map(e=>({provide:rE,useValue:e,multi:!0})))}var S9=new Ze(""),C9="b",w9="h",E9="s",M9="st",T9="u",D9="rt",uE=new Ze(""),A9=["GET","HEAD"];function Ek(i,e){let s=e,{isCacheActive:t}=s,n=nn(s,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!A9.includes(o)||!n.includeRequestsWithAuthHeaders&&O9(i)||n.filter?.(i)===!1)}function Mk(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function I9(i,e,t,n){let{transferCache:r}=i;if(!Ek(i,e))return null;if(n)throw new qe(2803,!1);let o=i.url,s=Tk(i,o),a=t.get(s,null),l=Mk(e,r);if(a){let{[C9]:c,[D9]:d,[w9]:u,[E9]:f,[M9]:h,[T9]:p}=a,v=c;switch(d){case"arraybuffer":v=wk(c);break;case"blob":v=new Blob([wk(c)]);break}let g=new po(u);return new Hu({body:v,headers:g,status:f,statusText:h,url:p})}return null}function P9(i,e){let t=Z(uE),n=Z(Iu),r=Z(S9,{optional:!0}),o=I9(i,t,n,r);if(o)return hs(o);let{transferCache:s}=i,a=Mk(t,s),l=i.url,c=Tk(i,l);return Ek(i,t),e(i)}function O9(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function Ck(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function Tk(i,e){let{params:t,method:n,responseType:r}=i,o=Ck(t),s=i.serializeBody();s instanceof URLSearchParams?s=Ck(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=R9(a);return l}function R9(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function wk(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function Dk(i){return[{provide:uE,useFactory:()=>(Uo("NgHttpTransferCache"),k({isCacheActive:!0},i))},{provide:oE,useValue:P9,multi:!0},{provide:Nu,multi:!0,useFactory:()=>{let e=Z(Or),t=Z(uE);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var Mp=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Ke(k9),r},providedIn:"root"})}return i})(),k9=(()=>{class i extends Mp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Lo.NONE:return n;case Lo.HTML:return pa(n,"HTML")?No(n):j0(this._doc,String(n)).toString();case Lo.STYLE:return pa(n,"Style")?No(n):n;case Lo.SCRIPT:if(pa(n,"Script"))return No(n);throw new qe(5200,!1);case Lo.URL:return pa(n,"URL")?No(n):ap(String(n));case Lo.RESOURCE_URL:if(pa(n,"ResourceURL"))return No(n);throw new qe(5201,!1);default:throw new qe(5202,!1)}}bypassSecurityTrustHtml(t){return zC(t)}bypassSecurityTrustStyle(t){return VC(t)}bypassSecurityTrustScript(t){return HC(t)}bypassSecurityTrustUrl(t){return GC(t)}bypassSecurityTrustResourceUrl(t){return jC(t)}static \u0275fac=function(n){return new(n||i)(Ke(Tn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Nv=(function(i){return i[i.NoHttpTransferCache=0]="NoHttpTransferCache",i[i.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",i[i.I18nSupport=2]="I18nSupport",i[i.EventReplay=3]="EventReplay",i[i.IncrementalHydration=4]="IncrementalHydration",i})(Nv||{});function F9(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function Ak(){return F9(Nv.EventReplay,YR())}function Ik(...i){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of i)t.add(o),r.length&&e.push(r);let n=t.has(Nv.HttpTransferCacheOptions);return la([[],[],XR(),t.has(Nv.NoHttpTransferCache)||n?[]:Dk({}),e])}var Gu=class i{loadingCount=F(0);isLoading=Me(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function Lv(i){let e=s=>Array.isArray(s)?s.filter(a=>typeof a=="string").join(", "):"";if(!i)return"Unhandled error";let t=i?.error,n=e(t?.errors);if(n)return n;let r=e(t?.message??t?.Messages);if(r)return r;if(Array.isArray(t)&&t.length>0)return e(t)||"Unhandled error";if(typeof t=="string"&&t.trim())return t;if(Array.isArray(i)&&i.length>0)return e(i)||"Unhandled error";let o=e(i?.messages);if(o)return o;if(typeof i?.messages=="string"&&i.messages.trim())return i.messages;if(typeof i?.message=="string"&&i.message.trim())return i.message;if(t?.errors&&typeof t.errors=="object"&&!Array.isArray(t.errors)){let s=[];for(let a in t.errors)Object.prototype.hasOwnProperty.call(t.errors,a)&&s.push(...t.errors[a]??[]);if(s.length)return s.join(", ")}return i?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var Fr=class i{toastsSignal=F([]);toasts=Me(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(n=>n.id!==e))}pushToast(e,t,n){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:n,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${n}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Tp=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof ul&&this.showError(e)}showError(e){return this.toasterService.showError(Lv(e)),Ya(()=>e)}static \u0275fac=function(t){return new(t||i)(Ke(Fr))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Pk=(i,e)=>{let t=Z(Tp),n=Z(Gu),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(bc(s=>(r||t.handleError(s),r?hs(null):Ya(()=>s))),Dh(()=>{o&&n.hide()}))};var Ok=[Pk];var Rk={apiUrl:"https://pixeasy-api-stage-cpe7dbf2f2gtg9bp.westus3-01.azurewebsites.net/api/"};var Uv=new Ze("ENV"),wxe=new Ze("LOADER_DELAY");var kk={provide:Uv,useValue:Rk};function Fk(){return[wS(),Ik(Ak()),cE(dE(Ok)),kk,Gu]}var Wk=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)(Gt(Es),Gt(Oi))};static \u0275dir=In({type:i})}return i})(),Rp=(()=>{class i extends Wk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,features:[Pr]})}return i})(),fl=new Ze(""),U9={provide:fl,useExisting:Wi(()=>vE),multi:!0},vE=(()=>{class i extends Rp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&W("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[uo([U9]),Pr]})}return i})(),B9={provide:fl,useExisting:Wi(()=>hl),multi:!0};function z9(){let i=fo()?fo().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var V9=new Ze(""),hl=(()=>{class i extends Wk{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!z9())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||i)(Gt(Es),Gt(Oi),Gt(V9,8))};static \u0275dir=In({type:i,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(n,r){n&1&&W("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[uo([B9]),Pr]})}return i})();var bE=new Ze(""),H9=new Ze("");function G9(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<i?{min:{min:i,actual:e.value}}:null}}function j9(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function Nk(i){return null}function $k(i){return i!=null}function Yk(i){return Fu(i)?Th(i):i}function Xk(i){let e={};return i.forEach(t=>{e=t!=null?k(k({},e),t):e}),Object.keys(e).length===0?null:e}function qk(i,e){return e.map(t=>t(i))}function W9(i){return!i.validate}function Kk(i){return i.map(e=>W9(e)?e:t=>e.validate(t))}function $9(i){if(!i)return null;let e=i.filter($k);return e.length==0?null:function(t){return Xk(qk(t,e))}}function Zk(i){return i!=null?$9(Kk(i)):null}function Y9(i){if(!i)return null;let e=i.filter($k);return e.length==0?null:function(t){let n=qk(t,e).map(Yk);return x1(n).pipe(lr(Xk))}}function Jk(i){return i!=null?Y9(Kk(i)):null}function Lk(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function X9(i){return i._rawValidators}function q9(i){return i._rawAsyncValidators}function fE(i){return i?Array.isArray(i)?i:[i]:[]}function zv(i,e){return Array.isArray(i)?i.includes(e):i===e}function Uk(i,e){let t=fE(e);return fE(i).forEach(r=>{zv(t,r)||t.push(r)}),t}function Bk(i,e){return fE(e).filter(t=>!zv(i,t))}var Vv=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Zk(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Jk(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.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}},hE=class extends Vv{name;get formDirective(){return null}get path(){return null}},Op=class extends Vv{_parent=null;name=null;valueAccessor=null},pE=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Is=(()=>{class i extends pE{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(Gt(Op,2))};static \u0275dir=In({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&dt("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[Pr]})}return i})();var Dp="VALID",Bv="INVALID",ju="PENDING",Ap="DISABLED",Xc=class{},Hv=class extends Xc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},Ip=class extends Xc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},Pp=class extends Xc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Wu=class extends Xc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var mE=class extends Xc{source;constructor(e){super(),this.source=e}};function K9(i){return(Gv(i)?i.validators:i)||null}function Z9(i){return Array.isArray(i)?Zk(i):i||null}function J9(i,e){return(Gv(e)?e.asyncValidators:i)||null}function Q9(i){return Array.isArray(i)?Jk(i):i||null}function Gv(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var gE=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){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 hn(this.statusReactive)}set status(e){hn(()=>this.statusReactive.set(e))}_status=Me(()=>this.statusReactive());statusReactive=F(void 0);get valid(){return this.status===Dp}get invalid(){return this.status===Bv}get pending(){return this.status==ju}get disabled(){return this.status===Ap}get enabled(){return this.status!==Ap}errors;get pristine(){return hn(this.pristineReactive)}set pristine(e){hn(()=>this.pristineReactive.set(e))}_pristine=Me(()=>this.pristineReactive());pristineReactive=F(!0);get dirty(){return!this.pristine}get touched(){return hn(this.touchedReactive)}set touched(e){hn(()=>this.touchedReactive.set(e))}_touched=Me(()=>this.touchedReactive());touchedReactive=F(!1);get untouched(){return!this.touched}_events=new Do;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(Uk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(Uk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(Bk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(Bk(e,this._rawAsyncValidators))}hasValidator(e){return zv(this._rawValidators,e)}hasAsyncValidator(e){return zv(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;e.onlySelf||this._parent?.markAsTouched(he(k({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Pp(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}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})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new Pp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(he(k({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Ip(!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})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new Ip(!0,n))}markAsPending(e={}){this.status=ju;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Wu(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(he(k({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Ap,this.errors=null,this._forEachChild(r=>{r.disable(he(k({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Hv(this.value,n)),this._events.next(new Wu(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(he(k({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Dp,this._forEachChild(n=>{n.enable(he(k({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(he(k({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){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===Dp||this.status===ju)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Hv(this.value,t)),this._events.next(new Wu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(he(k({},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()?Ap:Dp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=ju,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=Yk(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||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!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?.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 Wu(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new wr,this.statusChanges=new wr}_calculateStatus(){return this._allControlsDisabled()?Ap:this.errors?Bv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ju)?ju:this._anyControlsHaveStatus(Bv)?Bv:Dp}_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,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new Ip(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new Pp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Gv(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=Z9(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=Q9(this._rawAsyncValidators)}};var Qk=new Ze("",{factory:()=>yE}),yE="always";function eW(i,e){return[...e.path,i]}function tW(i,e,t=yE){iW(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),rW(i,e),sW(i,e),oW(i,e),nW(i,e)}function zk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function nW(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function iW(i,e){let t=X9(i);e.validator!==null?i.setValidators(Lk(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=q9(i);e.asyncValidator!==null?i.setAsyncValidators(Lk(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();zk(e._rawValidators,r),zk(e._rawAsyncValidators,r)}function rW(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&eF(i,e)})}function oW(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&eF(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function eF(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function sW(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function aW(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function lW(i){return Object.getPrototypeOf(i.constructor)===Rp}function cW(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===hl?t=o:lW(o)?n=o:r=o}),r||n||t||null}function Vk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function Hk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var dW=class extends gE{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(K9(t),J9(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Gv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(Hk(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),t.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new mE(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Vk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Vk(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){Hk(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 uW={provide:Op,useExisting:Wi(()=>zo)},Gk=Promise.resolve(),zo=(()=>{class i extends Op{_changeDetectorRef;callSetDisabledState;control=new dW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new wr;constructor(t,n,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=cW(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),aW(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){tW(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){Gk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&_v(n);Gk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?eW(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)(Gt(hE,9),Gt(bE,10),Gt(H9,10),Gt(fl,10),Gt(xv,8),Gt(Qk,8))};static \u0275dir=In({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[uo([uW]),Pr,Du]})}return i})();var fW={provide:fl,useExisting:Wi(()=>kp),multi:!0},kp=(()=>{class i extends Rp{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&W("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[uo([fW]),Pr]})}return i})();var hW={provide:fl,useExisting:Wi(()=>jv),multi:!0};function tF(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function pW(i){return i.split(":")[0]}var jv=(()=>{class i extends Rp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(Or).injector;destroyRef=Z(ui);cdr=Z(xv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,X0({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let n=this._getOptionId(t),r=tF(n,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=pW(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&W("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[uo([hW]),Pr]})}return i})(),Wv=(()=>{class i{_element;_renderer;_select;id;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(tF(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(n){return new(n||i)(Gt(Oi),Gt(Es),Gt(jv,9))};static \u0275dir=In({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),mW={provide:fl,useExisting:Wi(()=>nF),multi:!0};function jk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function gW(i){return i.split(":")[0]}var nF=(()=>{class i extends Rp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));n=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else n=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let r=[],o=n.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a<s.length;a++){let l=s[a],c=this._getOptionValue(l.value);r.push(c)}}else{let s=n.options;for(let a=0;a<s.length;a++){let l=s[a];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,t(r)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=gW(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&W("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[uo([mW]),Pr]})}return i})(),$v=(()=>{class i{_element;_renderer;_select;id;_value;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(jk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(jk(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||i)(Gt(Oi),Gt(Es),Gt(nF,9))};static \u0275dir=In({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function iF(i){return typeof i=="number"?i:parseFloat(i)}var rF=(()=>{class i{_validator=Nk;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):Nk,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(n){return new(n||i)};static \u0275dir=In({type:i,features:[Du]})}return i})(),vW={provide:bE,useExisting:Wi(()=>Fp),multi:!0},Fp=(()=>{class i extends rF{max;inputName="max";normalizeInput=t=>iF(t);createValidator=t=>j9(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&fn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[uo([vW]),Pr]})}return i})(),bW={provide:bE,useExisting:Wi(()=>Np),multi:!0},Np=(()=>{class i extends rF{min;inputName="min";normalizeInput=t=>iF(t);createValidator=t=>G9(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ha(i)))(r||i)}})();static \u0275dir=In({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&fn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[uo([bW]),Pr]})}return i})();var yW=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ga({type:i});static \u0275inj=gs({})}return i})();var fr=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Qk,useValue:t.callSetDisabledState??yE}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=ga({type:i});static \u0275inj=gs({imports:[yW]})}return i})();var Tl={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Dl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},RF=0,tM=1,kF=2;var lm=1,FF=2,Cf=3,Zi=0,er=1,ks=2,Fs=0,ed=1,nM=2,iM=3,rM=4,NF=5,_l=100,LF=101,UF=102,BF=103,zF=104,VF=200,HF=201,GF=202,jF=203,gb=204,vb=205,WF=206,$F=207,YF=208,XF=209,qF=210,KF=211,ZF=212,JF=213,QF=214,Hb=0,Gb=1,jb=2,td=3,Wb=4,$b=5,Yb=6,Xb=7,qb=0,eN=1,tN=2,$o=0,oM=1,sM=2,aM=3,dd=4,lM=5,cM=6,dM=7;var GE=300,Al=301,ud=302,Kb=303,Zb=304,cm=306,cf=1e3,Li=1001,bb=1002,mi=1003,nN=1004;var dm=1005;var Wn=1006,Jb=1007;var bo=1008;var pr=1009,uM=1010,fM=1011,wf=1012,Qb=1013,Yo=1014,Xo=1015,Ns=1016,ey=1017,ty=1018,Ef=1020,hM=35902,pM=35899,mM=1021,gM=1022,yo=1023,Ps=1026,Il=1027,vM=1028,ny=1029,fd=1030,iy=1031;var ry=1033,um=33776,fm=33777,hm=33778,pm=33779,oy=35840,sy=35841,ay=35842,ly=35843,cy=36196,dy=37492,uy=37496,fy=37488,hy=37489,py=37490,my=37491,gy=37808,vy=37809,by=37810,yy=37811,xy=37812,_y=37813,Sy=37814,Cy=37815,wy=37816,Ey=37817,My=37818,Ty=37819,Dy=37820,Ay=37821,Iy=36492,Py=36494,Oy=36495,Ry=36283,ky=36284,Fy=36285,Ny=36286;var Wp=2300,yb=2301,mb=2302,jE=2400,WE=2401,$E=2402;var iN=3200;var Ly=0,rN=1,Aa="",_n="srgb",nd="srgb-linear",$p="linear",an="srgb";var Qc=7680;var YE=519,oN=512,sN=513,aN=514,Uy=515,lN=516,cN=517,By=518,dN=519,XE=35044;var bM="300 es",jo=2e3,Yp=2001;function yM(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function xW(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function df(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function uN(){let i=df("canvas");return i.style.display="block",i}var oF={},uf=null;function xM(...i){let e="THREE."+i.shift();uf?uf("log",e,...i):console.log(e,...i)}function bt(...i){let e="THREE."+i.shift();uf?uf("warn",e,...i):console.warn(e,...i)}function _t(...i){let e="THREE."+i.shift();uf?uf("error",e,...i):console.error(e,...i)}function ff(...i){let e=i.join(" ");e in oF||(oF[e]=!0,bt(...i))}function fN(i,e,t){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}var Os=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){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Fi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],sF=1234567,Gp=Math.PI/180,hf=180/Math.PI;function Mf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Fi[i&255]+Fi[i>>8&255]+Fi[i>>16&255]+Fi[i>>24&255]+"-"+Fi[e&255]+Fi[e>>8&255]+"-"+Fi[e>>16&15|64]+Fi[e>>24&255]+"-"+Fi[t&63|128]+Fi[t>>8&255]+"-"+Fi[t>>16&255]+Fi[t>>24&255]+Fi[n&255]+Fi[n>>8&255]+Fi[n>>16&255]+Fi[n>>24&255]).toLowerCase()}function $t(i,e,t){return Math.max(e,Math.min(t,i))}function _M(i,e){return(i%e+e)%e}function _W(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function SW(i,e,t){return i!==e?(t-i)/(e-i):0}function jp(i,e,t){return(1-t)*i+t*e}function CW(i,e,t,n){return jp(i,e,1-Math.exp(-t*n))}function wW(i,e=1){return e-Math.abs(_M(i,e*2)-e)}function EW(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function MW(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function TW(i,e){return i+Math.floor(Math.random()*(e-i+1))}function DW(i,e){return i+Math.random()*(e-i)}function AW(i){return i*(.5-Math.random())}function IW(i){i!==void 0&&(sF=i);let e=sF+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function PW(i){return i*Gp}function OW(i){return i*hf}function RW(i){return(i&i-1)===0&&i!==0}function kW(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function FW(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function NW(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),f=s((e-n)/2),h=o((n-e)/2),p=s((n-e)/2);switch(r){case"XYX":i.set(a*d,l*u,l*f,a*c);break;case"YZY":i.set(l*f,a*d,l*u,a*c);break;case"ZXZ":i.set(l*u,l*f,a*d,a*c);break;case"XZX":i.set(a*d,l*p,l*h,a*c);break;case"YXY":i.set(l*h,a*d,l*p,a*c);break;case"ZYZ":i.set(l*p,l*h,a*d,a*c);break;default:bt("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function sf(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Ki(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var Qt={DEG2RAD:Gp,RAD2DEG:hf,generateUUID:Mf,clamp:$t,euclideanModulo:_M,mapLinear:_W,inverseLerp:SW,lerp:jp,damp:CW,pingpong:wW,smoothstep:EW,smootherstep:MW,randInt:TW,randFloat:DW,randFloatSpread:AW,seededRandom:IW,degToRad:PW,radToDeg:OW,isPowerOfTwo:RW,ceilPowerOfTwo:kW,floorPowerOfTwo:FW,setQuaternionFromProperEuler:NW,normalize:Ki,denormalize:sf},yt=class i{constructor(e=0,t=0){i.prototype.isVector2=!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){return 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){return 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=$t(this.x,e.x,t.x),this.y=$t(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=$t(this.x,e,t),this.y=$t(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar($t(n,e,t))}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=Math.trunc(this.x),this.y=Math.trunc(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}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($t(n,-1,1))}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){return 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}},vo=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,o,s,a){let l=n[r+0],c=n[r+1],d=n[r+2],u=n[r+3],f=o[s+0],h=o[s+1],p=o[s+2],v=o[s+3];if(a<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(a>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=v;return}if(u!==v||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*v;g<0&&(f=-f,h=-h,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let b=Math.acos(g),y=Math.sin(b);m=Math.sin(m*b)/y,a=Math.sin(a*b)/y,l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a}else{l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a;let b=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=b,c*=b,d*=b,u*=b}}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],f=o[s+1],h=o[s+2],p=o[s+3];return e[t]=a*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-a*h,e[t+2]=c*p+d*h+a*f-l*u,e[t+3]=d*p-a*u-l*f-c*h,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=!0){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),f=l(n/2),h=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:bt("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&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],f=n+a+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(s-r)*h}else if(n>a&&n>u){let h=2*Math.sqrt(1+n-a-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+s)/h,this._z=(o+c)/h}else if(a>u){let h=2*Math.sqrt(1+a-n-u);this._w=(o-c)/h,this._x=(r+s)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-n-a);this._w=(s-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.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($t(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){return 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=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(n=-n,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}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._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},$=class i{constructor(e=0,t=0,n=0){i.prototype.isVector3=!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){return 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){return 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){return 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 this.applyQuaternion(aF.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(aF.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=2*(s*r-a*n),d=2*(a*t-o*r),u=2*(o*n-s*t);return this.x=t+l*c+s*u-a*d,this.y=n+l*d+a*c-o*u,this.z=r+l*u+o*d-s*c,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=$t(this.x,e.x,t.x),this.y=$t(this.y,e.y,t.y),this.z=$t(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=$t(this.x,e,t),this.y=$t(this.y,e,t),this.z=$t(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar($t(n,e,t))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(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){return 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 xE.copy(this).projectOnVector(e),this.sub(xE)}reflect(e){return this.sub(xE.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($t(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)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}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){return 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()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},xE=new $,aF=new vo,Ft=class i{constructor(e,t,n,r,o,s,a,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c)}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],f=n[2],h=n[5],p=n[8],v=r[0],g=r[3],m=r[6],b=r[1],y=r[4],_=r[7],w=r[2],D=r[5],A=r[8];return o[0]=s*v+a*b+l*w,o[3]=s*g+a*y+l*D,o[6]=s*m+a*_+l*A,o[1]=c*v+d*b+u*w,o[4]=c*g+d*y+u*D,o[7]=c*m+d*_+u*A,o[2]=f*v+h*b+p*w,o[5]=f*g+h*y+p*D,o[8]=f*m+h*_+p*A,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,f=a*l-d*o,h=c*o-s*l,p=t*u+n*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=u*v,e[1]=(r*c-d*n)*v,e[2]=(a*n-r*s)*v,e[3]=f*v,e[4]=(d*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=h*v,e[7]=(n*l-c*t)*v,e[8]=(s*t-n*o)*v,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){return this.premultiply(_E.makeScale(e,t)),this}rotate(e){return this.premultiply(_E.makeRotation(-e)),this}translate(e,t){return this.premultiply(_E.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),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)}},_E=new Ft,lF=new Ft().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),cF=new Ft().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function LW(){let i={enabled:!0,workingColorSpace:nd,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===an&&(r.r=wa(r.r),r.g=wa(r.g),r.b=wa(r.b)),this.spaces[o].primaries!==this.spaces[s].primaries&&(r.applyMatrix3(this.spaces[o].toXYZ),r.applyMatrix3(this.spaces[s].fromXYZ)),this.spaces[s].transfer===an&&(r.r=af(r.r),r.g=af(r.g),r.b=af(r.b))),r},workingToColorSpace:function(r,o){return this.convert(r,this.workingColorSpace,o)},colorSpaceToWorking:function(r,o){return this.convert(r,o,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===Aa?$p:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,o=this.workingColorSpace){return r.fromArray(this.spaces[o].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,o,s){return r.copy(this.spaces[o].toXYZ).multiply(this.spaces[s].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,o){return ff("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return ff("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[nd]:{primaries:e,whitePoint:n,transfer:$p,toXYZ:lF,fromXYZ:cF,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:_n},outputColorSpaceConfig:{drawingBufferColorSpace:_n}},[_n]:{primaries:e,whitePoint:n,transfer:an,toXYZ:lF,fromXYZ:cF,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:_n}}}),i}var Wt=LW();function wa(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function af(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var $u,xb=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{$u===void 0&&($u=df("canvas")),$u.width=e.width,$u.height=e.height;let r=$u.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=$u}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=df("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),o=r.data;for(let s=0;s<o.length;s++)o[s]=wa(o[s]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(wa(t[n]/255)*255):t[n]=wa(t[n]);return{data:t,width:e.width,height:e.height}}else return bt("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},UW=0,pf=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:UW++}),this.uuid=Mf(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let n={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s<a;s++)r[s].isDataTexture?o.push(SE(r[s].image)):o.push(SE(r[s]))}else o=SE(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function SE(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?xb.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(bt("Texture: Unable to serialize Texture."),{})}var BW=0,CE=new $,qo=(()=>{class i extends Os{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Li,o=Li,s=Wn,a=bo,l=yo,c=pr,d=i.DEFAULT_ANISOTROPY,u=Aa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:BW++}),this.uuid=Mf(),this.name="",this.source=new pf(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=s,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new yt(0,0),this.repeat=new yt(1,1),this.center=new yt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ft,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(CE).x}get height(){return this.source.getSize(CE).y}get depth(){return this.source.getSize(CE).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,n){this.updateRanges.push({start:t,count:n})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(let n in t){let r=t[n];if(r===void 0){bt(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){bt(`Texture.setValues(): property '${n}' does not exist.`);continue}o&&r&&o.isVector2&&r.isVector2||o&&r&&o.isVector3&&r.isVector3||o&&r&&o.isMatrix3&&r.isMatrix3?o.copy(r):this[n]=r}}toJSON(t){let n=t===void 0||typeof t=="string";if(!n&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,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,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),n||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==GE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case cf:t.x=t.x-Math.floor(t.x);break;case Li:t.x=t.x<0?0:1;break;case bb:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case cf:t.y=t.y-Math.floor(t.y);break;case Li:t.y=t.y<0?0:1;break;case bb:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}return i.DEFAULT_IMAGE=null,i.DEFAULT_MAPPING=GE,i.DEFAULT_ANISOTROPY=1,i})(),kn=class i{constructor(e=0,t=0,n=0,r=1){i.prototype.isVector4=!0,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){return 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){return 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}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,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],f=l[1],h=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(c+1)/2,_=(h+1)/2,w=(m+1)/2,D=(d+f)/4,A=(u+v)/4,P=(p+g)/4;return y>_&&y>w?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=D/n,o=A/n):_>w?_<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(_),n=D/r,o=P/r):w<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(w),n=A/o,r=P/o),this.set(n,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],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=$t(this.x,e.x,t.x),this.y=$t(this.y,e.y,t.y),this.z=$t(this.z,e.z,t.z),this.w=$t(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=$t(this.x,e,t),this.y=$t(this.y,e,t),this.z=$t(this.z,e,t),this.w=$t(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar($t(n,e,t))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(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){return 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}},_b=class extends Os{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Wn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new kn(0,0,e,t),this.scissorTest=!1,this.viewport=new kn(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new qo(r);this.textures=[];let s=n.count;for(let a=0;a<s;a++)this.textures[a]=o.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:Wn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);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){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new pf(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},Br=class extends _b{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Xp=class extends qo{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=mi,this.minFilter=mi,this.wrapR=Li,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var Sb=class extends qo{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=mi,this.minFilter=mi,this.wrapR=Li,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Ji=class{constructor(e=new $(1/0,1/0,1/0),t=new $(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Vo.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Vo.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=Vo.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let o=n.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let s=0,a=o.count;s<a;s++)e.isMesh===!0?e.getVertexPosition(s,Vo):Vo.fromBufferAttribute(o,s),Vo.applyMatrix4(e.matrixWorld),this.expandByPoint(Vo);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Yv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Yv.copy(n.boundingBox)),Yv.applyMatrix4(e.matrixWorld),this.union(Yv)}let r=e.children;for(let o=0,s=r.length;o<s;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.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.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Vo),Vo.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(Up),Xv.subVectors(this.max,Up),Yu.subVectors(e.a,Up),Xu.subVectors(e.b,Up),qu.subVectors(e.c,Up),pl.subVectors(Xu,Yu),ml.subVectors(qu,Xu),qc.subVectors(Yu,qu);let t=[0,-pl.z,pl.y,0,-ml.z,ml.y,0,-qc.z,qc.y,pl.z,0,-pl.x,ml.z,0,-ml.x,qc.z,0,-qc.x,-pl.y,pl.x,0,-ml.y,ml.x,0,-qc.y,qc.x,0];return!wE(t,Yu,Xu,qu,Xv)||(t=[1,0,0,0,1,0,0,0,1],!wE(t,Yu,Xu,qu,Xv))?!1:(qv.crossVectors(pl,ml),t=[qv.x,qv.y,qv.z],wE(t,Yu,Xu,qu,Xv))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Vo).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Vo).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:(va[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),va[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),va[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),va[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),va[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),va[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),va[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),va[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(va),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)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},va=[new $,new $,new $,new $,new $,new $,new $,new $],Vo=new $,Yv=new Ji,Yu=new $,Xu=new $,qu=new $,pl=new $,ml=new $,qc=new $,Up=new $,Xv=new $,qv=new $,Kc=new $;function wE(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){Kc.fromArray(i,o);let a=r.x*Math.abs(Kc.x)+r.y*Math.abs(Kc.y)+r.z*Math.abs(Kc.z),l=e.dot(Kc),c=t.dot(Kc),d=n.dot(Kc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var zW=new Ji,Bp=new $,EE=new $,Sl=class{constructor(e=new $,t=-1){this.isSphere=!0,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):zW.setFromPoints(e).getCenter(n);let r=0;for(let o=0,s=e.length;o<s;o++)r=Math.max(r,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.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){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Bp.subVectors(e,this.center);let t=Bp.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(Bp,r/n),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(EE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Bp.copy(e.center).add(EE)),this.expandByPoint(Bp.copy(e.center).sub(EE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},ba=new $,ME=new $,Kv=new $,gl=new $,TE=new $,Zv=new $,DE=new $,Ea=class{constructor(e=new $,t=new $(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.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ba)),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.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=ba.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ba.copy(this.origin).addScaledVector(this.direction,t),ba.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){ME.copy(e).add(t).multiplyScalar(.5),Kv.copy(t).sub(e).normalize(),gl.copy(this.origin).sub(ME);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Kv),a=gl.dot(this.direction),l=-gl.dot(Kv),c=gl.lengthSq(),d=Math.abs(1-s*s),u,f,h,p;if(d>0)if(u=s*l-a,f=s*a-l,p=o*d,u>=0)if(f>=-p)if(f<=p){let v=1/d;u*=v,f*=v,h=u*(u+s*f+2*a)+f*(s*u+f+2*l)+c}else f=o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f=-o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f<=-p?(u=Math.max(0,-(-s*o+a)),f=u>0?-o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c):f<=p?(u=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(u=Math.max(0,-(s*o+a)),f=u>0?o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c);else f=s>0?-o:o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(ME).addScaledVector(Kv,f),h}intersectSphere(e,t){ba.subVectors(e.center,this.origin);let n=ba.dot(this.direction),r=ba.dot(ba)-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 l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1: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,f=this.origin;return c>=0?(n=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(n=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),d>=0?(o=(e.min.y-f.y)*d,s=(e.max.y-f.y)*d):(o=(e.max.y-f.y)*d,s=(e.min.y-f.y)*d),n>s||o>r||((o>n||isNaN(n))&&(n=o),(s<r||isNaN(r))&&(r=s),u>=0?(a=(e.min.z-f.z)*u,l=(e.max.z-f.z)*u):(a=(e.max.z-f.z)*u,l=(e.min.z-f.z)*u),n>l||a>r)||((a>n||n!==n)&&(n=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,ba)!==null}intersectTriangle(e,t,n,r,o){TE.subVectors(t,e),Zv.subVectors(n,e),DE.crossVectors(TE,Zv);let s=this.direction.dot(DE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;gl.subVectors(this.origin,e);let l=a*this.direction.dot(Zv.crossVectors(gl,Zv));if(l<0)return null;let c=a*this.direction.dot(TE.cross(gl));if(c<0||l+c>s)return null;let d=-a*gl.dot(DE);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)}},An=class i{constructor(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){i.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g)}set(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){let m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=o,m[5]=s,m[9]=a,m[13]=l,m[2]=c,m[6]=d,m[10]=u,m[14]=f,m[3]=h,m[7]=p,m[11]=v,m[15]=g,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 this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(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){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,r=1/Ku.setFromMatrixColumn(e,0).length(),o=1/Ku.setFromMatrixColumn(e,1).length(),s=1/Ku.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){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 f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=h+p*c,t[5]=f-v*c,t[9]=-a*l,t[2]=v-f*c,t[6]=p+h*c,t[10]=s*l}else if(e.order==="YXZ"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f+v*a,t[4]=p*a-h,t[8]=s*c,t[1]=s*u,t[5]=s*d,t[9]=-a,t[2]=h*a-p,t[6]=v+f*a,t[10]=s*l}else if(e.order==="ZXY"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f-v*a,t[4]=-s*u,t[8]=p+h*a,t[1]=h+p*a,t[5]=s*d,t[9]=v-f*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=p*c-h,t[8]=f*c+v,t[1]=l*u,t[5]=v*c+f,t[9]=h*c-p,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=v-f*u,t[8]=p*u+h,t[1]=u,t[5]=s*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*u+p,t[10]=f-v*u}else if(e.order==="XZY"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=f*u+v,t[5]=s*d,t[9]=h*u-p,t[2]=p*u-h,t[6]=a*d,t[10]=v*u+f}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(VW,e,HW)}lookAt(e,t,n){let r=this.elements;return Nr.subVectors(e,t),Nr.lengthSq()===0&&(Nr.z=1),Nr.normalize(),vl.crossVectors(n,Nr),vl.lengthSq()===0&&(Math.abs(n.z)===1?Nr.x+=1e-4:Nr.z+=1e-4,Nr.normalize(),vl.crossVectors(n,Nr)),vl.normalize(),Jv.crossVectors(Nr,vl),r[0]=vl.x,r[4]=Jv.x,r[8]=Nr.x,r[1]=vl.y,r[5]=Jv.y,r[9]=Nr.y,r[2]=vl.z,r[6]=Jv.z,r[10]=Nr.z,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[4],l=n[8],c=n[12],d=n[1],u=n[5],f=n[9],h=n[13],p=n[2],v=n[6],g=n[10],m=n[14],b=n[3],y=n[7],_=n[11],w=n[15],D=r[0],A=r[4],P=r[8],E=r[12],I=r[1],L=r[5],Y=r[9],G=r[13],Q=r[2],ee=r[6],te=r[10],X=r[14],ie=r[3],Se=r[7],Ce=r[11],Ee=r[15];return o[0]=s*D+a*I+l*Q+c*ie,o[4]=s*A+a*L+l*ee+c*Se,o[8]=s*P+a*Y+l*te+c*Ce,o[12]=s*E+a*G+l*X+c*Ee,o[1]=d*D+u*I+f*Q+h*ie,o[5]=d*A+u*L+f*ee+h*Se,o[9]=d*P+u*Y+f*te+h*Ce,o[13]=d*E+u*G+f*X+h*Ee,o[2]=p*D+v*I+g*Q+m*ie,o[6]=p*A+v*L+g*ee+m*Se,o[10]=p*P+v*Y+g*te+m*Ce,o[14]=p*E+v*G+g*X+m*Ee,o[3]=b*D+y*I+_*Q+w*ie,o[7]=b*A+y*L+_*ee+w*Se,o[11]=b*P+y*Y+_*te+w*Ce,o[15]=b*E+y*G+_*X+w*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],f=e[10],h=e[14],p=e[3],v=e[7],g=e[11],m=e[15],b=l*h-c*f,y=a*h-c*u,_=a*f-l*u,w=s*h-c*d,D=s*f-l*d,A=s*u-a*d;return t*(v*b-g*y+m*_)-n*(p*b-g*w+m*D)+r*(p*y-v*w+m*A)-o*(p*_-v*D+g*A)}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],f=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],b=u*g*c-v*f*c+v*l*h-a*g*h-u*l*m+a*f*m,y=p*f*c-d*g*c-p*l*h+s*g*h+d*l*m-s*f*m,_=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,w=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,D=t*b+n*y+r*_+o*w;if(D===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let A=1/D;return e[0]=b*A,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*A,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*A,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*A,e[4]=y*A,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*A,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*A,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*A,e[8]=_*A,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*A,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*A,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*A,e[12]=w*A,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*A,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*A,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*A,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 e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):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,f=o*c,h=o*d,p=o*u,v=s*d,g=s*u,m=a*u,b=l*c,y=l*d,_=l*u,w=n.x,D=n.y,A=n.z;return r[0]=(1-(v+m))*w,r[1]=(h+_)*w,r[2]=(p-y)*w,r[3]=0,r[4]=(h-_)*D,r[5]=(1-(f+m))*D,r[6]=(g+b)*D,r[7]=0,r[8]=(p+y)*A,r[9]=(g-b)*A,r[10]=(1-(f+v))*A,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;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let o=Ku.set(r[0],r[1],r[2]).length(),s=Ku.set(r[4],r[5],r[6]).length(),a=Ku.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Ho.copy(this);let c=1/o,d=1/s,u=1/a;return Ho.elements[0]*=c,Ho.elements[1]*=c,Ho.elements[2]*=c,Ho.elements[4]*=d,Ho.elements[5]*=d,Ho.elements[6]*=d,Ho.elements[8]*=u,Ho.elements[9]*=u,Ho.elements[10]*=u,t.setFromRotationMatrix(Ho),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=jo,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(n-r),f=(t+e)/(t-e),h=(n+r)/(n-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===jo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Yp)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,o,s,a=jo,l=!1){let c=this.elements,d=2/(t-e),u=2/(n-r),f=-(t+e)/(t-e),h=-(n+r)/(n-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===jo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Yp)p=-1/(s-o),v=-o/(s-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=0,c[12]=f,c[1]=0,c[5]=u,c[9]=0,c[13]=h,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=0,c[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}},Ku=new $,Ho=new An,VW=new $(0,0,0),HW=new $(1,1,1),vl=new $,Jv=new $,Nr=new $,dF=new An,uF=new vo,Ma=(()=>{class i{constructor(t=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,n,r,o=this._order){return this._x=t,this._y=n,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,n=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(n){case"XYZ":this._y=Math.asin($t(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-$t(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin($t(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-$t(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin($t(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-$t(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:bt("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return dF.makeRotationFromQuaternion(t),this.setFromRotationMatrix(dF,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return uF.setFromEuler(this),this.setFromQuaternion(uF,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return i.DEFAULT_ORDER="XYZ",i})(),mf=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},GW=0,fF=new $,Zu=new vo,ya=new An,Qv=new $,zp=new $,jW=new $,WW=new vo,hF=new $(1,0,0),pF=new $(0,1,0),mF=new $(0,0,1),gF={type:"added"},$W={type:"removed"},Ju={type:"childadded",child:null},AE={type:"childremoved",child:null},zr=(()=>{class i extends Os{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:GW++}),this.uuid=Mf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new $,n=new Ma,r=new vo,o=new $(1,1,1);function s(){r.setFromEuler(n,!1)}function a(){n.setFromQuaternion(r,void 0,!1)}n._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new An},normalMatrix:{value:new Ft}}),this.matrix=new An,this.matrixWorld=new An,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new mf,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,n){this.quaternion.setFromAxisAngle(t,n)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,n){return Zu.setFromAxisAngle(t,n),this.quaternion.multiply(Zu),this}rotateOnWorldAxis(t,n){return Zu.setFromAxisAngle(t,n),this.quaternion.premultiply(Zu),this}rotateX(t){return this.rotateOnAxis(hF,t)}rotateY(t){return this.rotateOnAxis(pF,t)}rotateZ(t){return this.rotateOnAxis(mF,t)}translateOnAxis(t,n){return fF.copy(t).applyQuaternion(this.quaternion),this.position.add(fF.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(hF,t)}translateY(t){return this.translateOnAxis(pF,t)}translateZ(t){return this.translateOnAxis(mF,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ya.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?Qv.copy(t):Qv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),zp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ya.lookAt(zp,Qv,this.up):ya.lookAt(Qv,zp,this.up),this.quaternion.setFromRotationMatrix(ya),o&&(ya.extractRotation(o.matrixWorld),Zu.setFromRotationMatrix(ya),this.quaternion.premultiply(Zu.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(_t("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(gF),Ju.child=t,this.dispatchEvent(Ju),Ju.child=null):_t("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let n=this.children.indexOf(t);return n!==-1&&(t.parent=null,this.children.splice(n,1),t.dispatchEvent($W),AE.child=t,this.dispatchEvent(AE),AE.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),ya.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ya.multiply(t.parent.matrixWorld)),t.applyMatrix4(ya),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(gF),Ju.child=t,this.dispatchEvent(Ju),Ju.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,n){if(this[t]===n)return this;for(let r=0,o=this.children.length;r<o;r++){let a=this.children[r].getObjectByProperty(t,n);if(a!==void 0)return a}}getObjectsByProperty(t,n,r=[]){this[t]===n&&r.push(this);let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].getObjectsByProperty(t,n,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zp,t,jW),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(zp,WW,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(t)}traverseAncestors(t){let n=this.parent;n!==null&&(t(n),n.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(t)}updateWorldMatrix(t,n){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>he(k({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>k({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function s(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=s(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d<u;d++){let f=c[d];s(t.shapes,f)}else s(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(s(t.materials,this.material[c]));o.material=l}else o.material=s(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(s(t.animations,c))}}if(n){let l=a(t.geometries),c=a(t.materials),d=a(t.textures),u=a(t.images),f=a(t.shapes),h=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),n===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new $(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),Go=new $,xa=new $,IE=new $,_a=new $,Qu=new $,ef=new $,vF=new $,PE=new $,OE=new $,RE=new $,kE=new kn,FE=new kn,NE=new kn,xl=class i{constructor(e=new $,t=new $,n=new $){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Go.subVectors(e,t),r.cross(Go);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){Go.subVectors(r,t),xa.subVectors(n,t),IE.subVectors(e,t);let s=Go.dot(Go),a=Go.dot(xa),l=Go.dot(IE),c=xa.dot(xa),d=xa.dot(IE),u=s*c-a*a;if(u===0)return o.set(0,0,0),null;let f=1/u,h=(c*l-a*d)*f,p=(s*d-a*l)*f;return o.set(1-h-p,p,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,_a)===null?!1:_a.x>=0&&_a.y>=0&&_a.x+_a.y<=1}static getInterpolation(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,_a)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,_a.x),l.addScaledVector(s,_a.y),l.addScaledVector(a,_a.z),l)}static getInterpolatedAttribute(e,t,n,r,o,s){return kE.setScalar(0),FE.setScalar(0),NE.setScalar(0),kE.fromBufferAttribute(e,t),FE.fromBufferAttribute(e,n),NE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(kE,o.x),s.addScaledVector(FE,o.y),s.addScaledVector(NE,o.z),s}static isFrontFacing(e,t,n,r){return Go.subVectors(n,t),xa.subVectors(e,t),Go.cross(xa).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 Go.subVectors(this.c,this.b),xa.subVectors(this.a,this.b),Go.cross(xa).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)}getInterpolation(e,t,n,r,o){return i.getInterpolation(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;Qu.subVectors(r,n),ef.subVectors(o,n),PE.subVectors(e,n);let l=Qu.dot(PE),c=ef.dot(PE);if(l<=0&&c<=0)return t.copy(n);OE.subVectors(e,r);let d=Qu.dot(OE),u=ef.dot(OE);if(d>=0&&u<=d)return t.copy(r);let f=l*u-d*c;if(f<=0&&l>=0&&d<=0)return s=l/(l-d),t.copy(n).addScaledVector(Qu,s);RE.subVectors(e,o);let h=Qu.dot(RE),p=ef.dot(RE);if(p>=0&&h<=p)return t.copy(o);let v=h*c-l*p;if(v<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(n).addScaledVector(ef,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return vF.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(vF,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector(Qu,s).addScaledVector(ef,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},hN={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},bl={h:0,s:0,l:0},eb={h:0,s:0,l:0};function LE(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}var ut=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=_n){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Wt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=Wt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Wt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=Wt.workingColorSpace){if(e=_M(e,1),t=$t(t,0,1),n=$t(n,0,1),t===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o;this.r=LE(s,o,e+1/3),this.g=LE(s,o,e),this.b=LE(s,o,e-1/3)}return Wt.colorSpaceToWorking(this,r),this}setStyle(e,t=_n){function n(o){o!==void 0&&parseFloat(o)<1&&bt("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){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 n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:bt("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(s===6)return this.setHex(parseInt(o,16),t);bt("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=_n){let n=hN[e.toLowerCase()];return n!==void 0?this.setHex(n,t):bt("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=wa(e.r),this.g=wa(e.g),this.b=wa(e.b),this}copyLinearToSRGB(e){return this.r=af(e.r),this.g=af(e.g),this.b=af(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=_n){return Wt.workingToColorSpace(Ni.copy(this),e),Math.round($t(Ni.r*255,0,255))*65536+Math.round($t(Ni.g*255,0,255))*256+Math.round($t(Ni.b*255,0,255))}getHexString(e=_n){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Wt.workingColorSpace){Wt.workingToColorSpace(Ni.copy(this),t);let n=Ni.r,r=Ni.g,o=Ni.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+(r<o?6:0);break;case r:l=(o-n)/u+2;break;case o:l=(n-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=Wt.workingColorSpace){return Wt.workingToColorSpace(Ni.copy(this),t),e.r=Ni.r,e.g=Ni.g,e.b=Ni.b,e}getStyle(e=_n){Wt.workingToColorSpace(Ni.copy(this),e);let t=Ni.r,n=Ni.g,r=Ni.b;return e!==_n?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(bl),this.setHSL(bl.h+e,bl.s+t,bl.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(bl),e.getHSL(eb);let n=jp(bl.h,eb.h,t),r=jp(bl.s,eb.s,t),o=jp(bl.l,eb.l,t);return this.setHSL(n,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*r,this.g=o[1]*t+o[4]*n+o[7]*r,this.b=o[2]*t+o[5]*n+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Ni=new ut;ut.NAMES=hN;var YW=0,hr=class extends Os{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:YW++}),this.uuid=Mf(),this.name="",this.type="Material",this.blending=ed,this.side=Zi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=gb,this.blendDst=vb,this.blendEquation=_l,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ut(0,0,0),this.blendAlpha=0,this.depthFunc=td,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=YE,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Qc,this.stencilZFail=Qc,this.stencilZPass=Qc,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.forceSinglePass=!1,this.allowOverride=!0,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}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){bt(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){bt(`Material: '${t}' is not a property of THREE.${this.type}.`);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.7,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!==void 0&&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.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),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.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),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&&this.attenuationDistance!==1/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!==ed&&(n.blending=this.blending),this.side!==Zi&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==gb&&(n.blendSrc=this.blendSrc),this.blendDst!==vb&&(n.blendDst=this.blendDst),this.blendEquation!==_l&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==td&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==YE&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Qc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Qc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Qc&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&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!==void 0&&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.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),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=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(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.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,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.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,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.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,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++}},qp=class extends hr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ut(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Ma,this.combine=qb,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,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.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),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.fog=e.fog,this}};var ei=new $,tb=new yt,XW=0,Ur=class{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:XW++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=XE,this.updateRanges=[],this.gpuType=Xo,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)tb.fromBufferAttribute(this,t),tb.applyMatrix3(e),this.setXY(t,tb.x,tb.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyMatrix3(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyMatrix4(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.applyNormalMatrix(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)ei.fromBufferAttribute(this,t),ei.transformDirection(e),this.setXYZ(t,ei.x,ei.y,ei.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=sf(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=Ki(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=sf(t,this.array)),t}setX(e,t){return this.normalized&&(t=Ki(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=sf(t,this.array)),t}setY(e,t){return this.normalized&&(t=Ki(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=sf(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Ki(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=sf(t,this.array)),t}setW(e,t){return this.normalized&&(t=Ki(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Ki(t,this.array),n=Ki(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=Ki(t,this.array),n=Ki(n,this.array),r=Ki(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,o){return e*=this.itemSize,this.normalized&&(t=Ki(t,this.array),n=Ki(n,this.array),r=Ki(r,this.array),o=Ki(o,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==XE&&(e.usage=this.usage),e}};var Kp=class extends Ur{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var Zp=class extends Ur{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var jn=class extends Ur{constructor(e,t,n){super(new Float32Array(e),t,n)}},qW=0,mo=new An,UE=new zr,tf=new $,Lr=new Ji,Vp=new Ji,hi=new $,ni=class i extends Os{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:qW++}),this.uuid=Mf(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(yM(e)?Zp:Kp)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}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 Ft().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 mo.makeRotationFromQuaternion(e),this.applyMatrix4(mo),this}rotateX(e){return mo.makeRotationX(e),this.applyMatrix4(mo),this}rotateY(e){return mo.makeRotationY(e),this.applyMatrix4(mo),this}rotateZ(e){return mo.makeRotationZ(e),this.applyMatrix4(mo),this}translate(e,t,n){return mo.makeTranslation(e,t,n),this.applyMatrix4(mo),this}scale(e,t,n){return mo.makeScale(e,t,n),this.applyMatrix4(mo),this}lookAt(e){return UE.lookAt(e),UE.updateMatrix(),this.applyMatrix4(UE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(tf).negate(),this.translate(tf.x,tf.y,tf.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let n=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];n.push(s.x,s.y,s.z||0)}this.setAttribute("position",new jn(n,3))}else{let n=Math.min(e.length,t.count);for(let r=0;r<n;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&bt("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ji);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){_t("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new $(-1/0,-1/0,-1/0),new $(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){let o=t[n];Lr.setFromBufferAttribute(o),this.morphTargetsRelative?(hi.addVectors(this.boundingBox.min,Lr.min),this.boundingBox.expandByPoint(hi),hi.addVectors(this.boundingBox.max,Lr.max),this.boundingBox.expandByPoint(hi)):(this.boundingBox.expandByPoint(Lr.min),this.boundingBox.expandByPoint(Lr.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&_t('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Sl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){_t("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new $,1/0);return}if(e){let n=this.boundingSphere.center;if(Lr.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];Vp.setFromBufferAttribute(a),this.morphTargetsRelative?(hi.addVectors(Lr.min,Vp.min),Lr.expandByPoint(hi),hi.addVectors(Lr.max,Vp.max),Lr.expandByPoint(hi)):(Lr.expandByPoint(Vp.min),Lr.expandByPoint(Vp.max))}Lr.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)hi.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(hi));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)hi.fromBufferAttribute(a,c),l&&(tf.fromBufferAttribute(e,c),hi.add(tf)),r=Math.max(r,n.distanceToSquared(hi))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&_t('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){_t("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Ur(new Float32Array(4*n.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<n.count;P++)a[P]=new $,l[P]=new $;let c=new $,d=new $,u=new $,f=new yt,h=new yt,p=new yt,v=new $,g=new $;function m(P,E,I){c.fromBufferAttribute(n,P),d.fromBufferAttribute(n,E),u.fromBufferAttribute(n,I),f.fromBufferAttribute(o,P),h.fromBufferAttribute(o,E),p.fromBufferAttribute(o,I),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[P].add(v),a[E].add(v),a[I].add(v),l[P].add(g),l[E].add(g),l[I].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let P=0,E=b.length;P<E;++P){let I=b[P],L=I.start,Y=I.count;for(let G=L,Q=L+Y;G<Q;G+=3)m(e.getX(G+0),e.getX(G+1),e.getX(G+2))}let y=new $,_=new $,w=new $,D=new $;function A(P){w.fromBufferAttribute(r,P),D.copy(w);let E=a[P];y.copy(E),y.sub(w.multiplyScalar(w.dot(E))).normalize(),_.crossVectors(D,E);let L=_.dot(l[P])<0?-1:1;s.setXYZW(P,y.x,y.y,y.z,L)}for(let P=0,E=b.length;P<E;++P){let I=b[P],L=I.start,Y=I.count;for(let G=L,Q=L+Y;G<Q;G+=3)A(e.getX(G+0)),A(e.getX(G+1)),A(e.getX(G+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Ur(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let f=0,h=n.count;f<h;f++)n.setXYZ(f,0,0,0);let r=new $,o=new $,s=new $,a=new $,l=new $,c=new $,d=new $,u=new $;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),v=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,v),c.fromBufferAttribute(n,g),a.add(d),l.add(d),c.add(d),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(v,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),n.setXYZ(f+0,d.x,d.y,d.z),n.setXYZ(f+1,d.x,d.y,d.z),n.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)hi.fromBufferAttribute(e,t),hi.normalize(),e.setXYZ(t,hi.x,hi.y,hi.z)}toNonIndexed(){function e(a,l){let c=a.array,d=a.itemSize,u=a.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?h=l[v]*a.data.stride+a.offset:h=l[v]*d;for(let m=0;m<d;m++)f[p++]=c[h++]}return new Ur(f,d,u)}if(this.index===null)return bt("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new i,n=this.index.array,r=this.attributes;for(let a in r){let l=r[a],c=e(l,n);t.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let d=0,u=c.length;d<u;d++){let f=c[d],h=e(f,n);l.push(h)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;let s=this.groups;for(let a=0,l=s.length;a<l;a++){let c=s[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(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,f=c.length;u<f;u++){let h=c[u];d.push(h.toJSON(e.data))}d.length>0&&(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=a.toJSON()),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());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 f=0,h=u.length;f<h;f++)d.push(u[f].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;let s=e.groups;for(let c=0,d=s.length;c<d;c++){let u=s[c];this.addGroup(u.start,u.count,u.materialIndex)}let a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},bF=new An,Zc=new Ea,nb=new Sl,yF=new $,ib=new $,rb=new $,ob=new $,BE=new $,sb=new $,xF=new $,ab=new $,Qi=class extends zr{constructor(e=new ni,t=new qp){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.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;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}getVertexPosition(e,t){let n=this.geometry,r=n.attributes.position,o=n.morphAttributes.position,s=n.morphTargetsRelative;t.fromBufferAttribute(r,e);let a=this.morphTargetInfluences;if(o&&a){sb.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(BE.fromBufferAttribute(u,e),s?sb.addScaledVector(BE,d):sb.addScaledVector(BE.sub(t),d))}t.add(sb)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),nb.copy(n.boundingSphere),nb.applyMatrix4(o),Zc.copy(e.ray).recast(e.near),!(nb.containsPoint(Zc.origin)===!1&&(Zc.intersectSphere(nb,yF)===null||Zc.origin.distanceToSquared(yF)>(e.far-e.near)**2))&&(bF.copy(o).invert(),Zc.copy(e.ray).applyMatrix4(bF),!(n.boundingBox!==null&&Zc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Zc)))}_computeIntersections(e,t,n){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let _=b,w=y;_<w;_+=3){let D=a.getX(_),A=a.getX(_+1),P=a.getX(_+2);r=lb(this,m,e,n,c,d,u,D,A,P),r&&(r.faceIndex=Math.floor(_/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(a.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=a.getX(g),y=a.getX(g+1),_=a.getX(g+2);r=lb(this,s,e,n,c,d,u,b,y,_),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let _=b,w=y;_<w;_+=3){let D=_,A=_+1,P=_+2;r=lb(this,m,e,n,c,d,u,D,A,P),r&&(r.faceIndex=Math.floor(_/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(l.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=g,y=g+1,_=g+2;r=lb(this,s,e,n,c,d,u,b,y,_),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function KW(i,e,t,n,r,o,s,a){let l;if(e.side===er?l=n.intersectTriangle(s,o,r,!0,a):l=n.intersectTriangle(r,o,s,e.side===Zi,a),l===null)return null;ab.copy(a),ab.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(ab);return c<t.near||c>t.far?null:{distance:c,point:ab.clone(),object:i}}function lb(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,ib),i.getVertexPosition(l,rb),i.getVertexPosition(c,ob);let d=KW(i,e,t,n,ib,rb,ob,xF);if(d){let u=new $;xl.getBarycoord(xF,ib,rb,ob,u),r&&(d.uv=xl.getInterpolatedAttribute(r,a,l,c,u,new yt)),o&&(d.uv1=xl.getInterpolatedAttribute(o,a,l,c,u,new yt)),s&&(d.normal=xl.getInterpolatedAttribute(s,a,l,c,u,new $),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new $,materialIndex:0};xl.getNormal(ib,rb,ob,f.normal),d.face=f,d.barycoord=u}return d}var gf=class i extends ni{constructor(e=1,t=1,n=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,n,t,e,s,o,0),p("z","y","x",1,-1,n,t,-e,s,o,1),p("x","z","y",1,1,e,n,t,r,s,2),p("x","z","y",1,-1,e,n,-t,r,s,3),p("x","y","z",1,-1,e,t,n,r,o,4),p("x","y","z",-1,-1,e,t,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new jn(c,3)),this.setAttribute("normal",new jn(d,3)),this.setAttribute("uv",new jn(u,2));function p(v,g,m,b,y,_,w,D,A,P,E){let I=_/A,L=w/P,Y=_/2,G=w/2,Q=D/2,ee=A+1,te=P+1,X=0,ie=0,Se=new $;for(let Ce=0;Ce<te;Ce++){let Ee=Ce*L-G;for(let de=0;de<ee;de++){let Pe=de*I-Y;Se[v]=Pe*b,Se[g]=Ee*y,Se[m]=Q,c.push(Se.x,Se.y,Se.z),Se[v]=0,Se[g]=0,Se[m]=D>0?1:-1,d.push(Se.x,Se.y,Se.z),u.push(de/A),u.push(1-Ce/P),X+=1}}for(let Ce=0;Ce<P;Ce++)for(let Ee=0;Ee<A;Ee++){let de=f+Ee+ee*Ce,Pe=f+Ee+ee*(Ce+1),At=f+(Ee+1)+ee*(Ce+1),zt=f+(Ee+1)+ee*Ce;l.push(de,Pe,zt),l.push(Pe,At,zt),ie+=6}a.addGroup(h,ie,E),h+=ie,f+=X}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function hd(i){let e={};for(let t in i){e[t]={};for(let n in i[t]){let r=i[t][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(bt("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function Ui(i){let e={};for(let t=0;t<i.length;t++){let n=hd(i[t]);for(let r in n)e[r]=n[r]}return e}function ZW(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function SM(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Wt.workingColorSpace}var pN={clone:hd,merge:Ui},JW=`void main() {
6
6
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
7
7
  }`,QW=`void main() {
8
8
  gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );