@pixeasy/customizer 0.0.26-beta.stage → 0.0.27-beta.uat
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 C4=Object.defineProperty,w4=Object.defineProperties;var E4=Object.getOwnProp
|
|
|
2
2
|
${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
|
|
3
3
|
`)}`:"",this.name="UnsubscriptionError",this.errors=t});function fh(i,e){if(i){let t=i.indexOf(e);0<=t&&i.splice(t,1)}}var Ui=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(Ft(n))try{n()}catch(o){e=o instanceof Zm?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{zD(o)}catch(s){e=e??[],s instanceof Zm?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Zm(e)}}add(e){var t;if(e&&e!==this)if(this.closed)zD(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)&&fh(t,e)}remove(e){let{_finalizers:t}=this;t&&fh(t,e),e instanceof i&&e._removeParent(this)}};Ui.EMPTY=(()=>{let i=new Ui;return i.closed=!0,i})();var X_=Ui.EMPTY;function Jm(i){return i instanceof Ui||i&&"closed"in i&&Ft(i.remove)&&Ft(i.add)&&Ft(i.unsubscribe)}function zD(i){Ft(i)?i():i.unsubscribe()}var wo={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var $d={setTimeout(i,e,...t){let{delegate:n}=$d;return n?.setTimeout?n.setTimeout(i,e,...t):setTimeout(i,e,...t)},clearTimeout(i){let{delegate:e}=$d;return(e?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Qm(i){$d.setTimeout(()=>{let{onUnhandledError:e}=wo;if(e)e(i);else throw i})}function Y_(){}var VD=q_("C",void 0,void 0);function GD(i){return q_("E",void 0,i)}function HD(i){return q_("N",i,void 0)}function q_(i,e,t){return{kind:i,value:e,error:t}}var ac=null;function Xd(i){if(wo.useDeprecatedSynchronousErrorHandling){let e=!ac;if(e&&(ac={errorThrown:!1,error:null}),i(),e){let{errorThrown:t,error:n}=ac;if(ac=null,t)throw n}}else i()}function jD(i){wo.useDeprecatedSynchronousErrorHandling&&ac&&(ac.errorThrown=!0,ac.error=i)}var lc=class extends Ui{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Jm(e)&&e.add(this)):this.destination=N4}static create(e,t,n){return new Ua(e,t,n)}next(e){this.isStopped?Z_(HD(e),this):this._next(e)}error(e){this.isStopped?Z_(GD(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Z_(VD,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()}}},k4=Function.prototype.bind;function K_(i,e){return k4.call(i,e)}var J_=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){eg(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){eg(n)}else eg(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){eg(t)}}},Ua=class extends lc{constructor(e,t,n){super();let r;if(Ft(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let o;this&&wo.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&K_(e.next,o),error:e.error&&K_(e.error,o),complete:e.complete&&K_(e.complete,o)}):r=e}this.destination=new J_(r)}};function eg(i){wo.useDeprecatedSynchronousErrorHandling?jD(i):Qm(i)}function F4(i){throw i}function Z_(i,e){let{onStoppedNotification:t}=wo;t&&$d.setTimeout(()=>t(i,e))}var N4={closed:!0,next:Y_,error:F4,complete:Y_};var Yd=typeof Symbol=="function"&&Symbol.observable||"@@observable";function tg(i){return i}function WD(i){return i.length===0?tg:i.length===1?i[0]:function(t){return i.reduce((n,r)=>r(n),t)}}var En=(()=>{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=U4(t)?t:new Ua(t,n,r);return Xd(()=>{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=$D(n),new n((r,o)=>{let s=new Ua({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)}[Yd](){return this}pipe(...t){return WD(t)(this)}toPromise(t){return t=$D(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 $D(i){var e;return(e=i??wo.Promise)!==null&&e!==void 0?e:Promise}function L4(i){return i&&Ft(i.next)&&Ft(i.error)&&Ft(i.complete)}function U4(i){return i&&i instanceof lc||L4(i)&&Jm(i)}function B4(i){return Ft(i?.lift)}function ai(i){return e=>{if(B4(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 li(i,e,t,n,r){return new Q_(i,e,t,n,r)}var Q_=class extends lc{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 XD=Wd(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Eo=(()=>{class i extends En{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new ng(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new XD}next(t){Xd(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){Xd(()=>{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(){Xd(()=>{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?X_:(this.currentObservers=null,o.push(t),new Ui(()=>{this.currentObservers=null,fh(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new En;return t.source=this,t}}return i.create=(e,t)=>new ng(e,t),i})(),ng=class extends Eo{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:X_}};var hh=class extends Eo{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 YD(i){return i&&Ft(i.schedule)}function qD(i){return i[i.length-1]}function KD(i){return Ft(qD(i))?i.pop():void 0}function ZD(i){return YD(qD(i))?i.pop():void 0}function QD(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 JD(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 cc(i){return this instanceof cc?(this.v=i,this):new cc(i)}function eI(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 cc?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 tI(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 JD=="function"?JD(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 ig=i=>i&&typeof i.length=="number"&&typeof i!="function";function rg(i){return Ft(i?.then)}function og(i){return Ft(i[Yd])}function sg(i){return Symbol.asyncIterator&&Ft(i?.[Symbol.asyncIterator])}function ag(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 z4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var lg=z4();function cg(i){return Ft(i?.[lg])}function dg(i){return eI(this,arguments,function*(){let t=i.getReader();try{for(;;){let{value:n,done:r}=yield cc(t.read());if(r)return yield cc(void 0);yield yield cc(n)}}finally{t.releaseLock()}})}function ug(i){return Ft(i?.getReader)}function Ei(i){if(i instanceof En)return i;if(i!=null){if(og(i))return V4(i);if(ig(i))return G4(i);if(rg(i))return H4(i);if(sg(i))return nI(i);if(cg(i))return j4(i);if(ug(i))return W4(i)}throw ag(i)}function V4(i){return new En(e=>{let t=i[Yd]();if(Ft(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function G4(i){return new En(e=>{for(let t=0;t<i.length&&!e.closed;t++)e.next(i[t]);e.complete()})}function H4(i){return new En(e=>{i.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,Qm)})}function j4(i){return new En(e=>{for(let t of i)if(e.next(t),e.closed)return;e.complete()})}function nI(i){return new En(e=>{$4(i,e).catch(t=>e.error(t))})}function W4(i){return nI(dg(i))}function $4(i,e){var t,n,r,o;return QD(this,void 0,void 0,function*(){try{for(t=tI(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 Kr(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 fg(i,e=0){return ai((t,n)=>{t.subscribe(li(n,r=>Kr(n,i,()=>n.next(r),e),()=>Kr(n,i,()=>n.complete(),e),r=>Kr(n,i,()=>n.error(r),e)))})}function hg(i,e=0){return ai((t,n)=>{n.add(i.schedule(()=>t.subscribe(n),e))})}function iI(i,e){return Ei(i).pipe(hg(e),fg(e))}function rI(i,e){return Ei(i).pipe(hg(e),fg(e))}function oI(i,e){return new En(t=>{let n=0;return e.schedule(function(){n===i.length?t.complete():(t.next(i[n++]),t.closed||this.schedule())})})}function sI(i,e){return new En(t=>{let n;return Kr(t,e,()=>{n=i[lg](),Kr(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)}),()=>Ft(n?.return)&&n.return()})}function pg(i,e){if(!i)throw new Error("Iterable cannot be null");return new En(t=>{Kr(t,e,()=>{let n=i[Symbol.asyncIterator]();Kr(t,e,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function aI(i,e){return pg(dg(i),e)}function lI(i,e){if(i!=null){if(og(i))return iI(i,e);if(ig(i))return oI(i,e);if(rg(i))return rI(i,e);if(sg(i))return pg(i,e);if(cg(i))return sI(i,e);if(ug(i))return aI(i,e)}throw ag(i)}function ph(i,e){return e?lI(i,e):Ei(i)}function ss(...i){let e=ZD(i);return ph(i,e)}function Ba(i,e){let t=Ft(i)?i:()=>i,n=r=>r.error(t());return new En(e?r=>e.schedule(n,0,r):n)}var cI=Wd(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"});function dc(i,e){let t=typeof e=="object";return new Promise((n,r)=>{let o=new Ua({next:s=>{n(s),o.unsubscribe()},error:r,complete:()=>{t?n(e.defaultValue):r(new cI)}});i.subscribe(o)})}function rr(i,e){return ai((t,n)=>{let r=0;t.subscribe(li(n,o=>{n.next(i.call(e,o,r++))}))})}var{isArray:X4}=Array;function Y4(i,e){return X4(e)?i(...e):i(e)}function dI(i){return rr(e=>Y4(i,e))}var{isArray:q4}=Array,{getPrototypeOf:K4,prototype:Z4,keys:J4}=Object;function uI(i){if(i.length===1){let e=i[0];if(q4(e))return{args:e,keys:null};if(Q4(e)){let t=J4(e);return{args:t.map(n=>e[n]),keys:t}}}return{args:i,keys:null}}function Q4(i){return i&&typeof i=="object"&&K4(i)===Z4}function fI(i,e){return i.reduce((t,n,r)=>(t[n]=e[r],t),{})}function hI(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;Ei(t(v,d++)).subscribe(li(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?Kr(e,s,()=>p(m)):p(m)}f()}catch(m){e.error(m)}}))};return i.subscribe(li(e,h,()=>{u=!0,f()})),()=>{a?.()}}function mg(i,e,t=1/0){return Ft(e)?mg((n,r)=>rr((o,s)=>e(n,o,r,s))(Ei(i(n,r))),t):(typeof e=="number"&&(t=e),ai((n,r)=>hI(n,r,i,t)))}function eS(...i){let e=KD(i),{args:t,keys:n}=uI(i),r=new En(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;Ei(t[d]).subscribe(li(o,f=>{u||(u=!0,c--),a[d]=f},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(n?fI(n,a):a),o.complete())}))}});return e?r.pipe(dI(e)):r}function tS(i,e){return ai((t,n)=>{let r=0;t.subscribe(li(n,o=>i.call(e,o,r++)&&n.next(o)))})}function uc(i){return ai((e,t)=>{let n=null,r=!1,o;n=e.subscribe(li(t,void 0,void 0,s=>{o=Ei(i(s,uc(i)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(t))})}function nS(i,e){return Ft(e)?mg(i,e,1):mg(i,1)}function mh(i){return ai((e,t)=>{try{e.subscribe(t)}finally{t.add(i)}})}function iS(i,e){return ai((t,n)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&n.complete();t.subscribe(li(n,l=>{r?.unsubscribe();let c=0,d=o++;Ei(i(l,d)).subscribe(r=li(n,u=>n.next(e?e(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function rS(i,e,t){let n=Ft(i)||e||t?{next:i,error:e,complete:t}:i;return n?ai((r,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;r.subscribe(li(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)}))}):tg}var oS;function gg(){return oS}function as(i){let e=oS;return oS=i,e}var pI=Symbol("NotFound");function qd(i){return i===pI||i?.name==="\u0275NotFound"}function mI(i){let e=lt(null);try{return i()}finally{lt(e)}}var Cg="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Ke=class extends Error{code;constructor(e,t){super(qs(e,t)),this.code=e}};function e5(i){return`NG0${Math.abs(i)}`}function qs(i,e){return`${e5(i)}${e?": "+e:""}`}var Jr=globalThis;function fn(i){for(let e in i)if(i[e]===fn)return e;throw Error("")}function xI(i,e){for(let t in e)e.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&(i[t]=e[t])}function wg(i){if(typeof i=="string")return i;if(Array.isArray(i))return`[${i.map(wg).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 Eg(i,e){return i?e?`${i} ${e}`:i:e||""}var t5=fn({__forward_ref__:fn});function zi(i){return i.__forward_ref__=zi,i}function yi(i){return bS(i)?i():i}function bS(i){return typeof i=="function"&&i.hasOwnProperty(t5)&&i.__forward_ref__===zi}function _e(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function cs(i){return{providers:i.providers||[],imports:i.imports||[]}}function Mg(i){return n5(i,Tg)}function n5(i,e){return i.hasOwnProperty(e)&&i[e]||null}function i5(i){let e=i?.[Tg]??null;return e||null}function aS(i){return i&&i.hasOwnProperty(bg)?i[bg]:null}var Tg=fn({\u0275prov:fn}),bg=fn({\u0275inj:fn}),qe=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 yS(i){return i&&!!i.\u0275providers}var xS=fn({\u0275cmp:fn}),_S=fn({\u0275dir:fn}),SS=fn({\u0275pipe:fn});var vh=fn({\u0275fac:fn}),gc=fn({__NG_ELEMENT_ID__:fn}),gI=fn({__NG_ENV_ID__:fn});function Ks(i){return wS(i,"@Component"),i[xS]||null}function Dg(i){return wS(i,"@Directive"),i[_S]||null}function CS(i){return wS(i,"@Pipe"),i[SS]||null}function wS(i,e){if(i==null)throw new Ke(-919,!1)}function Sh(i){return typeof i=="string"?i:i==null?"":String(i)}var _I=fn({ngErrorCode:fn}),r5=fn({ngErrorMessage:fn}),o5=fn({ngTokenPath:fn});function ES(i,e){return SI("",-200,e)}function Ig(i,e){throw new Ke(-201,!1)}function SI(i,e,t){let n=new Ke(e,i);return n[_I]=e,n[r5]=i,t&&(n[o5]=t),n}function s5(i){return i[_I]}var lS;function CI(){return lS}function Bi(i){let e=lS;return lS=i,e}function MS(i,e,t){let n=Mg(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;Ig(i,"")}var a5={},fc=a5,l5="__NG_DI_FLAG__",cS=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=hc(t)||0;try{return this.injector.get(e,n&8?null:fc,n)}catch(r){if(qd(r))return r;throw r}}};function c5(i,e=0){let t=gg();if(t===void 0)throw new Ke(-203,!1);if(t===null)return MS(i,void 0,e);{let n=d5(e),r=t.retrieve(i,n);if(qd(r)){if(n.optional)return null;throw r}return r}}function Xe(i,e=0){return(CI()||c5)(yi(i),e)}function Q(i,e){return Xe(i,hc(e))}function hc(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function d5(i){return{optional:!!(i&8),host:!!(i&1),self:!!(i&2),skipSelf:!!(i&4)}}function dS(i){let e=[];for(let t=0;t<i.length;t++){let n=yi(i[t]);if(Array.isArray(n)){if(n.length===0)throw new Ke(900,!1);let r,o=0;for(let s=0;s<n.length;s++){let a=n[s],l=u5(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(Xe(r,o))}else e.push(Xe(n))}return e}function u5(i){return i[l5]}function za(i,e){let t=i.hasOwnProperty(vh);return t?i[vh]:null}function wI(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 EI(i){return i.flat(Number.POSITIVE_INFINITY)}function Pg(i,e){i.forEach(t=>Array.isArray(t)?Pg(t,e):e(t))}function TS(i,e,t){e>=i.length?i.push(t):i.splice(e,0,t)}function Ch(i,e){return e>=i.length-1?i.pop():i.splice(e,1)[0]}function MI(i,e){let t=[];for(let n=0;n<i;n++)t.push(e);return t}function TI(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 Ag(i,e,t){let n=Zd(i,e);return n>=0?i[n|1]=t:(n=~n,TI(i,n,e,t)),n}function Og(i,e){let t=Zd(i,e);if(t>=0)return i[t|1]}function Zd(i,e){return f5(i,e,1)}function f5(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 Ha={},Mi=[],Zs=new qe(""),DS=new qe("",-1),IS=new qe(""),bh=class{get(e,t=fc){if(t===fc){let r=SI("",-201);throw r.name="\u0275NotFound",r}return t}};function Js(i){return{\u0275providers:i}}function DI(i){return Js([{provide:Zs,multi:!0,useValue:i}])}function II(...i){return{\u0275providers:Rg(!0,i),\u0275fromNgModule:!0}}function Rg(i,...e){let t=[],n=new Set,r,o=s=>{t.push(s)};return Pg(e,s=>{let a=s;yg(a,o,[],n)&&(r||=[],r.push(a))}),r!==void 0&&PI(r,o),t}function PI(i,e){for(let t=0;t<i.length;t++){let{ngModule:n,providers:r}=i[t];PS(r,o=>{e(o,n)})}}function yg(i,e,t,n){if(i=yi(i),!i)return!1;let r=null,o=aS(i),s=!o&&Ks(i);if(!o&&!s){let l=i.ngModule;if(o=aS(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)yg(c,e,t,n)}}else if(o){if(o.imports!=null&&!a){n.add(r);let c;Pg(o.imports,d=>{yg(d,e,t,n)&&(c||=[],c.push(d))}),c!==void 0&&PI(c,e)}if(!a){let c=za(r)||(()=>new r);e({provide:r,useFactory:c,deps:Mi},r),e({provide:IS,useValue:r,multi:!0},r),e({provide:Zs,useValue:()=>Xe(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=i;PS(l,d=>{e(d,c)})}}else return!1;return r!==i&&i.providers!==void 0}function PS(i,e){for(let t of i)yS(t)&&(t=t.\u0275providers),Array.isArray(t)?PS(t,e):e(t)}var h5=fn({provide:String,useValue:fn});function AI(i){return i!==null&&typeof i=="object"&&h5 in i}function p5(i){return!!(i&&i.useExisting)}function m5(i){return!!(i&&i.useFactory)}function pc(i){return typeof i=="function"}function OI(i){return!!i.useClass}var wh=new qe(""),vg={},vI={},sS;function Jd(){return sS===void 0&&(sS=new bh),sS}var Ti=class{},mc=class extends Ti{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,fS(e,s=>this.processProvider(s)),this.records.set(DS,Kd(void 0,this)),r.has("environment")&&this.records.set(Ti,Kd(void 0,this));let o=this.records.get(wh);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(IS,Mi,{self:!0}))}retrieve(e,t){let n=hc(t)||0;try{return this.get(e,fc,n)}catch(r){if(qd(r))return r;throw r}}destroy(){gh(this),this._destroyed=!0;let e=lt(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(),lt(e)}}onDestroy(e){return gh(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){gh(this);let t=as(this),n=Bi(void 0),r;try{return e()}finally{as(t),Bi(n)}}get(e,t=fc,n){if(gh(this),e.hasOwnProperty(gI))return e[gI](this);let r=hc(n),o,s=as(this),a=Bi(void 0);try{if(!(r&4)){let c=this.records.get(e);if(c===void 0){let d=x5(e)&&Mg(e);d&&this.injectableDefInScope(d)?c=Kd(uS(e),vg):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?Jd():this.parent;return t=r&8&&t===fc?null:t,l.get(e,t)}catch(l){let c=s5(l);throw c===-200||c===-201?new Ke(c,null):l}finally{Bi(a),as(s)}}resolveInjectorInitializers(){let e=lt(null),t=as(this),n=Bi(void 0),r;try{let o=this.get(Zs,Mi,{self:!0});for(let s of o)s()}finally{as(t),Bi(n),lt(e)}}toString(){return"R3Injector[...]"}processProvider(e){e=yi(e);let t=pc(e)?e:yi(e&&e.provide),n=v5(e);if(!pc(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Kd(void 0,vg,!0),r.factory=()=>dS(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=lt(null);try{if(t.value===vI)throw ES("");return t.value===vg&&(t.value=vI,t.value=t.factory(void 0,n)),typeof t.value=="object"&&t.value&&y5(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{lt(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=yi(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 uS(i){let e=Mg(i),t=e!==null?e.factory:za(i);if(t!==null)return t;if(i instanceof qe)throw new Ke(-204,!1);if(i instanceof Function)return g5(i);throw new Ke(-204,!1)}function g5(i){if(i.length>0)throw new Ke(-204,!1);let t=i5(i);return t!==null?()=>t.factory(i):()=>new i}function v5(i){if(AI(i))return Kd(void 0,i.useValue);{let e=AS(i);return Kd(e,vg)}}function AS(i,e,t){let n;if(pc(i)){let r=yi(i);return za(r)||uS(r)}else if(AI(i))n=()=>yi(i.useValue);else if(m5(i))n=()=>i.useFactory(...dS(i.deps||[]));else if(p5(i))n=(r,o)=>Xe(yi(i.useExisting),o!==void 0&&o&8?8:void 0);else{let r=yi(i&&(i.useClass||i.provide));if(b5(i))n=()=>new r(...dS(i.deps));else return za(r)||uS(r)}return n}function gh(i){if(i.destroyed)throw new Ke(-205,!1)}function Kd(i,e,t=!1){return{factory:i,value:e,multi:t?[]:void 0}}function b5(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 fS(i,e){for(let t of i)Array.isArray(t)?fS(t,e):t&&yS(t)?fS(t.\u0275providers,e):e(t)}function Qd(i,e){let t;i instanceof mc?(gh(i),t=i):t=new cS(i);let n,r=as(t),o=Bi(void 0);try{return e()}finally{as(r),Bi(o)}}function RI(){return CI()!==void 0||gg()!=null}var Vi=0,tt=1,wt=2,Vn=3,Qr=4,Gi=5,Hi=6,eu=7,kn=8,yr=9,Mo=10,Zt=11,tu=12,OS=13,vc=14,ci=15,ja=16,bc=17,ds=18,Qs=19,RS=20,Ys=21,kg=22,Va=23,xr=24,yc=25,Wa=26,Xt=27,kI=1,To=6,us=7,Eh=8,xc=9,Dn=10;function eo(i){return Array.isArray(i)&&typeof i[kI]=="object"}function _r(i){return Array.isArray(i)&&i[kI]===!0}function kS(i){return(i.flags&4)!==0}function fs(i){return i.componentOffset>-1}function nu(i){return(i.flags&1)===1}function hs(i){return!!i.template}function _c(i){return(i[wt]&512)!==0}function $a(i){return(i[wt]&256)===256}var FS="svg",FI="math";function Sr(i){for(;Array.isArray(i);)i=i[Vi];return i}function NS(i,e){return Sr(e[i])}function to(i,e){return Sr(e[i.index])}function iu(i,e){return i.data[e]}function Fg(i,e){return i[e]}function LS(i,e,t,n){t>=i.data.length&&(i.data[t]=null,i.blueprint[t]=null),e[t]=n}function no(i,e){let t=e[i];return eo(t)?t:t[Vi]}function Ng(i){return(i[wt]&128)===128}function NI(i){return _r(i[Vn])}function io(i,e){return e==null?null:i[e]}function US(i){i[bc]=0}function BS(i){i[wt]&1024||(i[wt]|=1024,Ng(i)&&Sc(i))}function LI(i,e){for(;i>0;)e=e[vc],i--;return e}function Mh(i){return!!(i[wt]&9216||i[xr]?.dirty)}function Lg(i){i[Mo].changeDetectionScheduler?.notify(8),i[wt]&64&&(i[wt]|=1024),Mh(i)&&Sc(i)}function Sc(i){i[Mo].changeDetectionScheduler?.notify(0);let e=Ga(i);for(;e!==null&&!(e[wt]&8192||(e[wt]|=8192,!Ng(e)));)e=Ga(e)}function zS(i,e){if($a(i))throw new Ke(911,!1);i[Ys]===null&&(i[Ys]=[]),i[Ys].push(e)}function UI(i,e){if(i[Ys]===null)return;let t=i[Ys].indexOf(e);t!==-1&&i[Ys].splice(t,1)}function Ga(i){let e=i[Vn];return _r(e)?e[Vn]:e}function VS(i){return i[eu]??=[]}function GS(i){return i.cleanup??=[]}function BI(i,e,t,n){let r=VS(e);r.push(t),i.firstCreatePass&&GS(i).push(n,r.length-1)}var Pt={lFrame:JI(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var hS=!1;function zI(){return Pt.lFrame.elementDepthCount}function VI(){Pt.lFrame.elementDepthCount++}function HS(){Pt.lFrame.elementDepthCount--}function Ug(){return Pt.bindingsEnabled}function Bg(){return Pt.skipHydrationRootTNode!==null}function jS(i){return Pt.skipHydrationRootTNode===i}function GI(i){Pt.skipHydrationRootTNode=i}function WS(){Pt.skipHydrationRootTNode=null}function pt(){return Pt.lFrame.lView}function In(){return Pt.lFrame.tView}function Z(i){return Pt.lFrame.contextLView=i,i[kn]}function J(i){return Pt.lFrame.contextLView=null,i}function xi(){let i=$S();for(;i!==null&&i.type===64;)i=i.parent;return i}function $S(){return Pt.lFrame.currentTNode}function HI(){let i=Pt.lFrame,e=i.currentTNode;return i.isParent?e:e.parent}function ru(i,e){let t=Pt.lFrame;t.currentTNode=i,t.isParent=e}function XS(){return Pt.lFrame.isParent}function YS(){Pt.lFrame.isParent=!1}function jI(){return Pt.lFrame.contextLView}function qS(){return hS}function yh(i){let e=hS;return hS=i,e}function ou(){let i=Pt.lFrame,e=i.bindingRootIndex;return e===-1&&(e=i.bindingRootIndex=i.tView.bindingStartIndex),e}function WI(i){return Pt.lFrame.bindingIndex=i}function Xa(){return Pt.lFrame.bindingIndex++}function KS(i){let e=Pt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+i,t}function $I(){return Pt.lFrame.inI18n}function XI(i,e){let t=Pt.lFrame;t.bindingIndex=t.bindingRootIndex=i,zg(e)}function YI(){return Pt.lFrame.currentDirectiveIndex}function zg(i){Pt.lFrame.currentDirectiveIndex=i}function qI(i){let e=Pt.lFrame.currentDirectiveIndex;return e===-1?null:i[e]}function KI(){return Pt.lFrame.currentQueryIndex}function Vg(i){Pt.lFrame.currentQueryIndex=i}function _5(i){let e=i[tt];return e.type===2?e.declTNode:e.type===1?i[Gi]:null}function ZS(i,e,t){if(t&4){let r=e,o=i;for(;r=r.parent,r===null&&!(t&1);)if(r=_5(o),r===null||(o=o[vc],r.type&10))break;if(r===null)return!1;e=r,i=o}let n=Pt.lFrame=ZI();return n.currentTNode=e,n.lView=i,!0}function Gg(i){let e=ZI(),t=i[tt];Pt.lFrame=e,e.currentTNode=t.firstChild,e.lView=i,e.tView=t,e.contextLView=i,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function ZI(){let i=Pt.lFrame,e=i===null?null:i.child;return e===null?JI(i):e}function JI(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 QI(){let i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var JS=QI;function Hg(){let i=QI();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 e2(i){return(Pt.lFrame.contextLView=LI(i,Pt.lFrame.contextLView))[kn]}function ea(){return Pt.lFrame.selectedIndex}function Ya(i){Pt.lFrame.selectedIndex=i}function Th(){let i=Pt.lFrame;return iu(i.tView,i.selectedIndex)}function qa(){Pt.lFrame.currentNamespace=FS}function su(){S5()}function S5(){Pt.lFrame.currentNamespace=null}function QS(){return Pt.lFrame.currentNamespace}var t2=!0;function jg(){return t2}function ta(i){t2=i}function pS(i,e=null,t=null,n){let r=n2(i,e,t,n);return r.resolveInjectorInitializers(),r}function n2(i,e=null,t=null,n,r=new Set){let o=[t||Mi,II(i)],s;return new mc(o,e||Jd(),s||null,r)}var Di=class i{static THROW_IF_NOT_FOUND=fc;static NULL=new bh;static create(e,t){if(Array.isArray(e))return pS({name:""},t,e,"");{let n=e.name??"";return pS({name:n},e.parent,e.providers,n)}}static \u0275prov=_e({token:i,providedIn:"any",factory:()=>Xe(DS)});static __NG_ELEMENT_ID__=-1},wn=new qe(""),sr=(()=>{class i{static __NG_ELEMENT_ID__=C5;static __NG_ENV_ID__=t=>t}return i})(),xg=class extends sr{_lView;constructor(e){super(),this._lView=e}get destroyed(){return $a(this._lView)}onDestroy(e){let t=this._lView;return zS(t,e),()=>UI(t,e)}};function C5(){return new xg(pt())}var i2=!1,r2=new qe(""),Ka=(()=>{class i{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new hh(!1);debugTaskTracker=Q(r2,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new En(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})(),mS=class extends Eo{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,RI()&&(this.destroyRef=Q(sr,{optional:!0})??void 0,this.pendingTasks=Q(Ka,{optional:!0})??void 0)}emit(e){let t=lt(null);try{super.next(e)}finally{lt(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 Ui&&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)}})}}},br=mS;function _g(...i){}function e1(i){let e,t;function n(){i=_g;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 o2(i){return queueMicrotask(()=>i()),()=>{i=_g}}var t1="isAngularZone",xh=t1+"_ID",w5=0,or=class i{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new br(!1);onMicrotaskEmpty=new br(!1);onStable=new br(!1);onError=new br(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=i2}=e;if(typeof Zone>"u")throw new Ke(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,T5(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(t1)===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new Ke(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new Ke(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,E5,_g,_g);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)}},E5={};function n1(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 M5(i){if(i.isCheckStableRunning||i.callbackScheduled)return;i.callbackScheduled=!0;function e(){e1(()=>{i.callbackScheduled=!1,gS(i),i.isCheckStableRunning=!0,n1(i),i.isCheckStableRunning=!1})}i.scheduleInRootZone?Zone.root.run(()=>{e()}):i._outer.run(()=>{e()}),gS(i)}function T5(i){let e=()=>{M5(i)},t=w5++;i._inner=i._inner.fork({name:"angular",properties:{[t1]:!0,[xh]:t,[xh+t]:!0},onInvokeTask:(n,r,o,s,a,l)=>{if(D5(l))return n.invokeTask(o,s,a,l);try{return bI(i),n.invokeTask(o,s,a,l)}finally{(i.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&e(),yI(i)}},onInvoke:(n,r,o,s,a,l,c)=>{try{return bI(i),n.invoke(o,s,a,l,c)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!I5(l)&&e(),yI(i)}},onHasTask:(n,r,o,s)=>{n.hasTask(o,s),r===o&&(s.change=="microTask"?(i._hasPendingMicrotasks=s.microTask,gS(i),n1(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 gS(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function bI(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function yI(i){i._nesting--,n1(i)}var _h=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new br;onMicrotaskEmpty=new br;onStable=new br;onError=new br;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 D5(i){return s2(i,"__ignore_ng_zone__")}function I5(i){return s2(i,"__scheduler_tick__")}function s2(i,e){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[e]===!0}var Zr=class{_console=console;handleError(e){this._console.error("ERROR",e)}},na=new qe("",{factory:()=>{let i=Q(or),e=Q(Ti),t;return n=>{i.runOutsideAngular(()=>{e.destroyed&&!t?setTimeout(()=>{throw n}):(t??=e.get(Zr),t.handleError(n))})}}}),a2={provide:Zs,useValue:()=>{let i=Q(Zr,{optional:!0})},multi:!0},P5=new qe("",{factory:()=>{let i=Q(wn).defaultView;if(!i)return;let e=Q(na),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(),Q(sr).onDestroy(()=>{i.removeEventListener("error",n),i.removeEventListener("unhandledrejection",t)})}});function i1(){return Js([DI(()=>{Q(P5)})])}function N(i,e){let[t,n,r]=H_(i,e?.equal),o=t,s=o[Qn];return o.set=n,o.update=r,o.asReadonly=Wg.bind(o),o}function Wg(){let i=this[Qn];if(i.readonlyFn===void 0){let e=()=>this();e[Qn]=i,i.readonlyFn=e}return i.readonlyFn}var Dh=(()=>{class i{view;node;constructor(t,n){this.view=t,this.node=n}static __NG_ELEMENT_ID__=A5}return i})();function A5(){return new Dh(pt(),xi())}var ls=class{},Ih=new qe("",{factory:()=>!0});var r1=new qe(""),au=(()=>{class i{internalPendingTasks=Q(Ka);scheduler=Q(ls);errorHandler=Q(na);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})(),$g=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new vS})}return i})(),vS=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}},Sg=class{[Qn];constructor(e){this[Qn]=e}destroy(){this[Qn].destroy()}};function Yt(i,e){let t=e?.injector??Q(Di),n=e?.manualCleanup!==!0?t.get(sr):null,r,o=t.get(Dh,null,{optional:!0}),s=t.get(ls);return o!==null?(r=k5(o.view,s,i),n instanceof xg&&n._lView===o.view&&(n=null)):r=F5(i,t.get($g),s),r.injector=t,n!==null&&(r.onDestroyFns=[n.onDestroy(()=>r.destroy())]),new Sg(r)}var l2=ue(R({},W_),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let i=yh(!1);try{$_(this)}finally{yh(i)}},cleanup(){if(!this.cleanupFns?.length)return;let i=lt(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],lt(i)}}}),O5=ue(R({},l2),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(oc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.scheduler.remove(this)}}),R5=ue(R({},l2),{consumerMarkedDirty(){this.view[wt]|=8192,Sc(this.view),this.notifier.notify(13)},destroy(){if(oc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.view[Va]?.delete(this)}});function k5(i,e,t){let n=Object.create(R5);return n.view=i,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=e,n.fn=c2(n,t),i[Va]??=new Set,i[Va].add(n),n.consumerMarkedDirty(n),n}function F5(i,e,t){let n=Object.create(O5);return n.fn=c2(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 c2(i,e){return()=>{e(t=>(i.cleanupFns??=[]).push(t))}}var Xg={JSACTION:"jsaction"};function Gh(i){return{toString:i}.toString()}function H5(i){return typeof i=="function"}function J2(i,e,t,n){e!==null?e.applyValueToInputSignal(e,n):i[t]=n}var o0=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}},vu=(()=>{let i=()=>Q2;return i.ngInherit=!0,i})();function Q2(i){return i.type.prototype.ngOnChanges&&(i.setInput=W5),j5}function j5(){let i=tP(this),e=i?.current;if(e){let t=i.previous;if(t===Ha)i.previous=e;else for(let n in e)t[n]=e[n];i.current=null,this.ngOnChanges(e)}}function W5(i,e,t,n,r){let o=this.declaredInputs[n],s=tP(i)||$5(i,{previous:Ha,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new o0(c&&c.currentValue,t,l===Ha),J2(i,e,r,t)}var eP="__ngSimpleChanges__";function tP(i){return i[eP]||null}function $5(i,e){return i[eP]=e}var d2=[];var tn=function(i,e=null,t){for(let n=0;n<d2.length;n++){let r=d2[n];r(i,e,t)}},Wt=(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})(Wt||{});function X5(i,e,t){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(n){let s=Q2(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 nP(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 Jg(i,e,t){iP(i,e,3,t)}function Qg(i,e,t,n){(i[wt]&3)===t&&iP(i,e,t,n)}function o1(i,e){let t=i[wt];(t&3)===e&&(t&=16383,t+=1,i[wt]=t)}function iP(i,e,t,n){let r=n!==void 0?i[bc]&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[bc]+=65536),(a<o||o==-1)&&(Y5(i,t,e,l),i[bc]=(i[bc]&4294901760)+l+2),l++}function u2(i,e){tn(Wt.LifecycleHookStart,i,e);let t=lt(null);try{e.call(i)}finally{lt(t),tn(Wt.LifecycleHookEnd,i,e)}}function Y5(i,e,t,n){let r=t[n]<0,o=t[n+1],s=r?-t[n]:t[n],a=i[s];r?i[wt]>>14<i[bc]>>16&&(i[wt]&3)===e&&(i[wt]+=16384,u2(a,o)):u2(a,o)}var cu=-1,Ec=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 q5(i){return(i.flags&8)!==0}function K5(i){return(i.flags&16)!==0}function Z5(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];Q5(o)?i.setProperty(e,o,s):i.setAttribute(e,o,s),n++}}return n}function J5(i){return i===3||i===4||i===6}function Q5(i){return i.charCodeAt(0)===64}function fu(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?f2(i,t,r,null,e[++n]):f2(i,t,r,null,null))}}return i}function f2(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 rP(i){return i!==cu}function s0(i){return i&32767}function ez(i){return i>>16}function a0(i,e){let t=ez(i),n=e;for(;t>0;)n=n[vc],t--;return n}var y1=!0;function l0(i){let e=y1;return y1=i,e}var tz=256,oP=tz-1,sP=5,nz=0,ps={};function iz(i,e,t){let n;typeof t=="string"?n=t.charCodeAt(0)||0:t.hasOwnProperty(gc)&&(n=t[gc]),n==null&&(n=t[gc]=nz++);let r=n&oP,o=1<<r;e.data[i+(r>>sP)]|=o}function c0(i,e){let t=aP(i,e);if(t!==-1)return t;let n=e[tt];n.firstCreatePass&&(i.injectorIndex=e.length,s1(n.data,i),s1(e,null),s1(n.blueprint,null));let r=sC(i,e),o=i.injectorIndex;if(rP(r)){let s=s0(r),a=a0(r,e),l=a[tt].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function s1(i,e){i.push(0,0,0,0,0,0,0,0,e)}function aP(i,e){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||e[i.injectorIndex+8]===null?-1:i.injectorIndex}function sC(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=fP(r),n===null)return cu;if(t++,r=r[vc],n.injectorIndex!==-1)return n.injectorIndex|t<<16}return cu}function x1(i,e,t){iz(i,e,t)}function lP(i,e,t){if(t&8||i!==void 0)return i;Ig(e,"NodeInjector")}function cP(i,e,t,n){if(t&8&&n===void 0&&(n=null),(t&3)===0){let r=i[yr],o=Bi(void 0);try{return r?r.get(e,n,t&8):MS(e,n,t&8)}finally{Bi(o)}}return lP(n,e,t)}function dP(i,e,t,n=0,r){if(i!==null){if(e[wt]&2048&&!(n&2)){let s=az(i,e,t,n,ps);if(s!==ps)return s}let o=uP(i,e,t,n,ps);if(o!==ps)return o}return cP(e,t,n,r)}function uP(i,e,t,n,r){let o=oz(t);if(typeof o=="function"){if(!ZS(e,i,n))return n&1?lP(r,t,n):cP(e,t,n,r);try{let s;if(s=o(n),s==null&&!(n&8))Ig(t);else return s}finally{JS()}}else if(typeof o=="number"){let s=null,a=aP(i,e),l=cu,c=n&1?e[ci][Gi]:null;for((a===-1||n&4)&&(l=a===-1?sC(i,e):e[a+8],l===cu||!p2(n,!1)?a=-1:(s=e[tt],a=s0(l),e=a0(l,e)));a!==-1;){let d=e[tt];if(h2(o,a,d.data)){let u=rz(a,e,t,s,n,c);if(u!==ps)return u}l=e[a+8],l!==cu&&p2(n,e[tt].data[a+8]===c)&&h2(o,a,e)?(s=d,a=s0(l),e=a0(l,e)):a=-1}}return r}function rz(i,e,t,n,r,o){let s=e[tt],a=s.data[i+8],l=n==null?fs(a)&&y1:n!=s&&(a.type&3)!==0,c=r&1&&o===a,d=e0(a,s,t,l,c);return d!==null?Rh(e,s,d,a,r):ps}function e0(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&&hs(h)&&h.type===t)return l}return null}function Rh(i,e,t,n,r){let o=i[t],s=e.data;if(o instanceof Ec){let a=o;if(a.resolving)throw ES("");let l=l0(a.canSeeViewProviders);a.resolving=!0;let c=s[t].type||s[t],d,u=a.injectImpl?Bi(a.injectImpl):null,f=ZS(i,n,0);try{o=i[t]=a.factory(void 0,r,s,i,n),e.firstCreatePass&&t>=n.directiveStart&&X5(t,s[t],e)}finally{u!==null&&Bi(u),l0(l),a.resolving=!1,JS()}}return o}function oz(i){if(typeof i=="string")return i.charCodeAt(0)||0;let e=i.hasOwnProperty(gc)?i[gc]:void 0;return typeof e=="number"?e>=0?e&oP:sz:e}function h2(i,e,t){let n=1<<i;return!!(t[e+(i>>sP)]&n)}function p2(i,e){return!(i&2)&&!(i&1&&e)}var wc=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return dP(this._tNode,this._lView,e,hc(n),t)}};function sz(){return new wc(xi(),pt())}function ra(i){return Gh(()=>{let e=i.prototype.constructor,t=e[vh]||_1(e),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let o=r[vh]||_1(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function _1(i){return bS(i)?()=>{let e=_1(yi(i));return e&&e()}:za(i)}function az(i,e,t,n,r){let o=i,s=e;for(;o!==null&&s!==null&&s[wt]&2048&&!_c(s);){let a=uP(o,s,t,n|2,ps);if(a!==ps)return a;let l=o.parent;if(!l){let c=s[RS];if(c){let d=c.get(t,ps,n&-5);if(d!==ps)return d}l=fP(s),s=s[vc]}o=l}return r}function fP(i){let e=i[tt],t=e.type;return t===2?e.declTNode:t===1?i[Gi]:null}function lz(){return bu(xi(),pt())}function bu(i,e){return new Er(to(i,e))}var Er=(()=>{class i{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=lz}return i})();function cz(i){return i instanceof Er?i.nativeElement:i}function dz(){return this._results[Symbol.iterator]()}var d0=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 Eo}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=EI(e);(this._changesDetected=!wI(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]=dz},hP="ngSkipHydration",uz="ngskiphydration";function pP(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()===uz)return!0}return!1}function mP(i){return i.hasAttribute(hP)}function u0(i){return(i.flags&128)===128}function gP(i){if(u0(i))return!0;let e=i.parent;for(;e;){if(u0(i)||pP(e))return!0;e=e.parent}return!1}var aC=(function(i){return i[i.OnPush=0]="OnPush",i[i.Eager=1]="Eager",i[i.Default=1]="Default",i})(aC||{}),vP=new Map,fz=0;function hz(){return fz++}function pz(i){vP.set(i[Qs],i)}function S1(i){vP.delete(i[Qs])}var m2="__ngContext__";function hu(i,e){eo(e)?(i[m2]=e[Qs],pz(e)):i[m2]=e}function bP(i){return xP(i[tu])}function yP(i){return xP(i[Qr])}function xP(i){for(;i!==null&&!_r(i);)i=i[Qr];return i}var C1;function lC(i){C1=i}function cC(){if(C1!==void 0)return C1;if(typeof document<"u")return document;throw new Ke(210,!1)}var gs=new qe("",{factory:()=>mz}),mz="ng";var x0=new qe(""),Hh=new qe("",{providedIn:"platform",factory:()=>"unknown"});var _0=new qe("",{factory:()=>Q(wn).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var yu=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>{let t=new i;return t.store=gz(Q(wn),Q(gs)),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 gz(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 _P="h",SP="b",vz="f",bz="n",CP="e",wP="t",S0="c",dC="x",kh="r",EP="i",MP="n",uC="d";var TP="di",DP="s",IP="p";var jh=new qe(""),PP=!1,fC=new qe("",{factory:()=>PP});var hC=new qe(""),AP=!1,OP=new qe("",{factory:()=>[]}),RP=new qe(""),pC=new qe("",{factory:()=>new Map});var Wh="ngb";var kP=(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},FP=(i,e)=>{let t=i,n=t.getAttribute(Wh)??"",r=e.get(n)??new Set;r.has(t)||r.add(t),e.set(n,r)};var NP=i=>{i.removeAttribute(Xg.JSACTION),i.removeAttribute(Wh),i.__jsaction_fns=void 0},LP=new qe("",{factory:()=>({})});function mC(i,e){let t=e?.__jsaction_fns?.get(i.type);if(!(!t||!e?.isConnected))for(let n of t)n(i)}var w1=new Map;function UP(i,e){return w1.set(i,e),()=>w1.delete(i)}var g2=!1,BP=(i,e,t,n)=>{};function yz(i,e,t,n){BP(i,e,t,n)}function zP(){g2||(BP=(i,e,t,n)=>{let r=i[yr].get(gs);w1.get(r)?.(e,t,n)},g2=!0)}var C0=new qe("");function $h(i){return(i.flags&32)===32}var xz="__nghData__",gC=xz,_z="__nghDeferData__",VP=_z;var t0="ngh",GP="nghm",HP=()=>null;function Sz(i,e,t=!1){let n=i.getAttribute(t0);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(yu,null,{optional:!0});d!==null&&(l=d.get(gC,[])[Number(n)])}let c={data:l,firstChild:i.firstChild??null};return t&&(c.firstChild=i,w0(c,0,i.nextSibling)),a?i.setAttribute(t0,a):i.removeAttribute(t0),c}function jP(){HP=Sz}function WP(i,e,t=!1){return HP(i,e,t)}function $P(i){let e=i._lView;return e[tt].type===2?null:(_c(e)&&(e=e[Xt]),e)}function Cz(i){return i.textContent?.replace(/\s/gm,"")}function wz(i){let e=cC(),t=e.createNodeIterator(i,NodeFilter.SHOW_COMMENT,{acceptNode(o){let s=Cz(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 w0(i,e,t){i.segmentHeads??={},i.segmentHeads[e]=t}function E1(i,e){return i.segmentHeads?.[e]??null}function XP(i){return i.get(RP,!1,{optional:!0})}function Ez(i,e){let t=i.data,n=t[CP]?.[e]??null;return n===null&&t[S0]?.[e]&&(n=vC(i,e)),n}function YP(i,e){return i.data[S0]?.[e]??null}function vC(i,e){let t=YP(i,e)??[],n=0;for(let r of t)n+=r[kh]*(r[dC]??1);return n}function Mz(i){if(typeof i.disconnectedNodes>"u"){let e=i.data[uC];i.disconnectedNodes=e?new Set(e):null}return i.disconnectedNodes}function qP(i,e){if(typeof i.disconnectedNodes>"u"){let t=i.data[uC];i.disconnectedNodes=t?new Set(t):null}return!!Mz(i)?.has(e)}function E0(i,e){let t=i[Hi];return t!==null&&!Bg()&&!$h(e)&&!qP(t,e.index-Xt)}function Tz(i,e){let t=e.get(C0),r=e.get(yu).get(VP,{}),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][IP]}return{parentBlockPromise:a,hydrationQueue:l}}function a1(i){return!!i&&i.nodeType===Node.COMMENT_NODE&&i.textContent?.trim()===GP}function v2(i){for(;i&&i.nodeType===Node.TEXT_NODE;)i=i.previousSibling;return i}function KP(i){for(let n of i.body.childNodes)if(a1(n))return;let e=v2(i.body.previousSibling);if(a1(e))return;let t=v2(i.head.lastChild);if(!a1(t))throw new Ke(-507,!1)}function ZP(i,e){let t=i.contentQueries;if(t!==null){let n=lt(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];Vg(o),a.contentQueries(2,e[s],s)}}}finally{lt(n)}}}function M1(i,e,t){Vg(0);let n=lt(null);try{e(i,t)}finally{lt(n)}}function bC(i,e,t){if(kS(e)){let n=lt(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{lt(n)}}}var Po=(function(i){return i[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",i[i.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",i})(Po||{});var Yg;function Dz(){if(Yg===void 0&&(Yg=null,Jr.trustedTypes))try{Yg=Jr.trustedTypes.createPolicy("angular",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Yg}function M0(i){return Dz()?.createHTML(i)||i}var qg;function Iz(){if(qg===void 0&&(qg=null,Jr.trustedTypes))try{qg=Jr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return qg}function b2(i){return Iz()?.createHTML(i)||i}var ia=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Cg})`}},T1=class extends ia{getTypeName(){return"HTML"}},D1=class extends ia{getTypeName(){return"Style"}},I1=class extends ia{getTypeName(){return"Script"}},P1=class extends ia{getTypeName(){return"URL"}},A1=class extends ia{getTypeName(){return"ResourceURL"}};function Ao(i){return i instanceof ia?i.changingThisBreaksApplicationSecurity:i}function oa(i,e){let t=JP(i);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${Cg})`)}return t===e}function JP(i){return i instanceof ia&&i.getTypeName()||null}function yC(i){return new T1(i)}function xC(i){return new D1(i)}function _C(i){return new I1(i)}function SC(i){return new P1(i)}function CC(i){return new A1(i)}function Pz(i){let e=new R1(i);return Az()?new O1(e):e}var O1=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(M0(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},R1=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=M0(e),t}};function Az(){try{return!!new window.DOMParser().parseFromString(M0(""),"text/html")}catch{return!1}}var Oz=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Xh(i){return i=String(i),i.match(Oz)?i:"unsafe:"+i}function sa(i){let e={};for(let t of i.split(","))e[t]=!0;return e}function Yh(...i){let e={};for(let t of i)for(let n in t)t.hasOwnProperty(n)&&(e[n]=!0);return e}var QP=sa("area,br,col,hr,img,wbr"),eA=sa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),tA=sa("rp,rt"),Rz=Yh(tA,eA),kz=Yh(eA,sa("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")),Fz=Yh(tA,sa("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")),y2=Yh(QP,kz,Fz,Rz),nA=sa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Nz=sa("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"),Lz=sa("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"),Uz=Yh(nA,Nz,Lz),Bz=sa("script,style,template");var k1=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=Gz(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=Vz(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=x2(e).toLowerCase();if(!y2.hasOwnProperty(t))return this.sanitizedSomething=!0,!Bz.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(!Uz.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;nA[a]&&(l=Xh(l)),this.buf.push(" ",s,'="',_2(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=x2(e).toLowerCase();y2.hasOwnProperty(t)&&!QP.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(_2(e))}};function zz(i,e){return(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function Vz(i){let e=i.nextSibling;if(e&&i!==e.previousSibling)throw iA(e);return e}function Gz(i){let e=i.firstChild;if(e&&zz(i,e))throw iA(e);return e}function x2(i){let e=i.nodeName;return typeof e=="string"?e:"FORM"}function iA(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var Hz=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,jz=/([^\#-~ |!])/g;function _2(i){return i.replace(/&/g,"&").replace(Hz,function(e){let t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((t-55296)*1024+(n-56320)+65536)+";"}).replace(jz,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var Kg;function T0(i,e){let t=null;try{Kg=Kg||Pz(i);let n=e?String(e):"";t=Kg.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=Kg.getInertBodyElement(n)}while(n!==o);let a=new k1().sanitizeChildren(S2(t)||t);return M0(a)}finally{if(t){let n=S2(t)||t;for(;n.firstChild;)n.firstChild.remove()}}}function S2(i){return"content"in i&&Wz(i)?i.content:null}function Wz(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var $z=/^>|^->|<!--|-->|--!>|<!-$/g,Xz=/(<|>)/g,Yz="\u200B$1\u200B";function qz(i){return i.replace($z,e=>e.replace(Xz,Yz))}function rA(i,e){return i.createText(e)}function Kz(i,e,t){i.setValue(e,t)}function oA(i,e){return i.createComment(qz(e))}function wC(i,e,t){return i.createElement(e,t)}function f0(i,e,t,n,r){i.insertBefore(e,t,n,r)}function sA(i,e,t){i.appendChild(e,t)}function C2(i,e,t,n,r){n!==null?f0(i,e,t,n,r):sA(i,e,t)}function EC(i,e,t,n){i.removeChild(null,e,t,n)}function aA(i){i.textContent=""}function Zz(i,e,t){i.setAttribute(e,"style",t)}function Jz(i,e,t){t===""?i.removeAttribute(e,"class"):i.setAttribute(e,"class",t)}function lA(i,e,t){let{mergedAttrs:n,classes:r,styles:o}=t;n!==null&&Z5(i,e,n),r!==null&&Jz(i,e,r),o!==null&&Zz(i,e,o)}var Oo=(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})(Oo||{});function D0(i){let e=cA();return e?b2(e.sanitize(Oo.HTML,i)||""):oa(i,"HTML")?b2(Ao(i)):T0(cC(),Sh(i))}function ji(i){let e=cA();return e?e.sanitize(Oo.URL,i)||"":oa(i,"URL")?Ao(i):Xh(Sh(i))}function cA(){let i=pt();return i&&i[Mo].sanitizer}function MC(i){return i.ownerDocument.defaultView}function TC(i){return i.ownerDocument}function dA(i){return i.ownerDocument.body}function Qz(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 uA="ng-template";function eV(i,e,t,n){let r=0;if(n){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&Qz(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(DC(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 DC(i){return i.type===4&&i.value!==uA}function tV(i,e,t){let n=i.type===4&&!t?uA:i.value;return e===n}function nV(i,e,t){let n=4,r=i.attrs,o=r!==null?oV(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!Do(n)&&!Do(l))return!1;if(s&&Do(l))continue;s=!1,n=l|n&1;continue}if(!s)if(n&4){if(n=2|n&1,l!==""&&!tV(i,l,t)||l===""&&e.length===1){if(Do(n))return!1;s=!0}}else if(n&8){if(r===null||!eV(i,r,l,t)){if(Do(n))return!1;s=!0}}else{let c=e[++a],d=iV(l,r,DC(i),t);if(d===-1){if(Do(n))return!1;s=!0;continue}if(c!==""){let u;if(d>o?u="":u=r[d+1].toLowerCase(),n&2&&c!==u){if(Do(n))return!1;s=!0}}}}return Do(n)||s}function Do(i){return(i&1)===0}function iV(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 sV(e,i)}function fA(i,e,t=!1){for(let n=0;n<e.length;n++)if(nV(i,e[n],t))return!0;return!1}function rV(i){let e=i.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function oV(i){for(let e=0;e<i.length;e++){let t=i[e];if(J5(t))return e}return i.length}function sV(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 aV(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 w2(i,e){return i?":not("+e.trim()+")":e}function lV(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!==""&&!Do(s)&&(e+=w2(o,r),r=""),n=s,o=o||!Do(n);t++}return r!==""&&(e+=w2(o,r)),e}function cV(i){return i.map(lV).join(",")}function dV(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(!Do(r))break;r=o}n++}return t.length&&e.push(1,...t),e}var Mr={};function IC(i,e,t,n,r,o,s,a,l,c,d){let u=Xt+n,f=u+r,h=uV(u,f),p=typeof c=="function"?c():c;return h[tt]={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 uV(i,e){let t=[];for(let n=0;n<e;n++)t.push(n<i?null:Mr);return t}function fV(i){let e=i.tView;return e===null||e.incompleteFirstPass?i.tView=IC(1,null,i.template,i.decls,i.vars,i.directiveDefs,i.pipeDefs,i.viewQuery,i.schemas,i.consts,i.id):e}function PC(i,e,t,n,r,o,s,a,l,c,d){let u=e.blueprint.slice();return u[Vi]=r,u[wt]=n|4|128|8|64|1024,(c!==null||i&&i[wt]&2048)&&(u[wt]|=2048),US(u),u[Vn]=u[vc]=i,u[kn]=t,u[Mo]=s||i&&i[Mo],u[Zt]=a||i&&i[Zt],u[yr]=l||i&&i[yr]||null,u[Gi]=o,u[Qs]=hz(),u[Hi]=d,u[RS]=c,u[ci]=e.type==2?i[ci]:u,u}function hV(i,e,t){let n=to(e,i),r=fV(t),o=i[Mo].rendererFactory,s=AC(i,PC(i,r,null,hA(t),n,e,null,o.createRenderer(n,t),null,null,null));return i[e.index]=s}function hA(i){let e=16;return i.signals?e=4096:i.onPush&&(e=64),e}function pA(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 AC(i,e){return i[tu]?i[OS][Qr]=e:i[tu]=e,i[OS]=e,e}function P(i=1){mA(In(),pt(),ea()+i,!1)}function mA(i,e,t,n){if(!n)if((e[wt]&3)===3){let o=i.preOrderCheckHooks;o!==null&&Jg(e,o,t)}else{let o=i.preOrderHooks;o!==null&&Qg(e,o,0,t)}Ya(t)}var I0=(function(i){return i[i.None=0]="None",i[i.SignalBased=1]="SignalBased",i[i.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",i})(I0||{});function F1(i,e,t,n){let r=lt(null);try{let[o,s,a]=i.inputs[t],l=null;(s&I0.SignalBased)!==0&&(l=e[o][Qn]),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):J2(e,l,o,n)}finally{lt(r)}}var ms=(function(i){return i[i.Important=1]="Important",i[i.DashCase=2]="DashCase",i})(ms||{}),pV;function OC(i,e){return pV(i,e)}var Uue=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var N1=new WeakMap,L1=new WeakSet;function mV(i,e){let t=N1.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),L1.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 gV(i,e){let t=N1.get(i);t?t.includes(e)||t.push(e):N1.set(i,[e])}var Mc=new Set,P0=(function(i){return i[i.CHANGE_DETECTION=0]="CHANGE_DETECTION",i[i.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",i})(P0||{}),vs=new qe(""),E2=new Set;function Ro(i){E2.has(i)||(E2.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}var RC=(()=>{class i{impl=null;execute(){this.impl?.execute()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),gA=[0,1,2,3],vA=(()=>{class i{ngZone=Q(or);scheduler=Q(ls);errorHandler=Q(Zr,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){Q(vs,{optional:!0})}execute(){let t=this.sequences.size>0;t&&tn(Wt.AfterRenderHooksStart),this.executing=!0;for(let n of gA)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&&tn(Wt.AfterRenderHooksEnd)}register(t){let{view:n}=t;n!==void 0?((n[yc]??=[]).push(t),Sc(n),n[wt]|=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(P0.AFTER_NEXT_RENDER,t):t()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),h0=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?.[yc];e&&(this.view[yc]=e.filter(t=>t!==this))}};function A0(i,e){let t=e?.injector??Q(Di);return Ro("NgAfterNextRender"),bV(i,t,e,!0)}function vV(i){return i instanceof Function?[void 0,void 0,i,void 0]:[i.earlyRead,i.write,i.mixedReadWrite,i.read]}function bV(i,e,t,n){let r=e.get(RC);r.impl??=e.get(vA);let o=e.get(vs,null,{optional:!0}),s=t?.manualCleanup!==!0?e.get(sr):null,a=e.get(Dh,null,{optional:!0}),l=new h0(r.impl,vV(i),a?.view,n,s,o?.snapshot(null));return r.impl.register(l),l}var bA=new qe("",{factory:()=>({queue:new Set,isScheduled:!1,scheduler:null,injector:Q(Ti)})});function yA(i,e,t){let n=i.get(bA);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(bA);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)yA(i,n.animateFns)}function M2(i,e,t,n){let r=i?.[Wa]?.enter;e!==null&&r&&r.has(t.index)&&xV(n,r)}function lu(i,e,t,n,r,o,s,a){if(r!=null){let l,c=!1;_r(r)?l=r:eo(r)&&(c=!0,r=r[Vi]);let d=Sr(r);i===0&&n!==null?(M2(a,n,o,t),s==null?sA(e,n,d):f0(e,n,d,s||null,!0)):i===1&&n!==null?(M2(a,n,o,t),f0(e,n,d,s||null,!0),mV(o,d)):i===2?(a?.[Wa]?.leave?.has(o.index)&&gV(o,d),T2(a,o,t,u=>{if(L1.has(d)){L1.delete(d);return}EC(e,d,c,u)})):i===3&&T2(a,o,t,()=>{e.destroyNode(d)}),l!=null&&AV(e,i,t,l,o,n,s)}}function _V(i,e){xA(i,e),e[Vi]=null,e[Gi]=null}function SV(i,e,t,n,r,o){n[Vi]=r,n[Gi]=e,R0(i,n,t,1,r,o)}function xA(i,e){e[Mo].changeDetectionScheduler?.notify(9),R0(i,e,e[Zt],2,null,null)}function CV(i){let e=i[tu];if(!e)return l1(i[tt],i);for(;e;){let t=null;if(eo(e))t=e[tu];else{let n=e[Dn];n&&(t=n)}if(!t){for(;e&&!e[Qr]&&e!==i;)eo(e)&&l1(e[tt],e),e=e[Vn];e===null&&(e=i),eo(e)&&l1(e[tt],e),t=e&&e[Qr]}e=t}}function kC(i,e){let t=i[xc],n=t.indexOf(e);t.splice(n,1)}function O0(i,e){if($a(e))return;let t=e[Zt];t.destroyNode&&R0(i,e,t,3,null,null),CV(e)}function l1(i,e){if($a(e))return;let t=lt(null);try{e[wt]&=-129,e[wt]|=256,e[xr]&&oc(e[xr]),MV(i,e),EV(i,e),e[tt].type===1&&e[Zt].destroy();let n=e[ja];if(n!==null&&_r(e[Vn])){n!==e[Vn]&&kC(n,e);let r=e[ds];r!==null&&r.detachView(i)}S1(e)}finally{lt(t)}}function T2(i,e,t,n){let r=i?.[Wa];if(r==null||r.leave==null||!r.leave.has(e.index))return n(!1);i&&Mc.add(i[Qs]),yA(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),wV(i,n)}else i&&Mc.delete(i[Qs]),n(!1)},r)}function wV(i,e){let t=i[Wa]?.running;if(t){t.then(()=>{i[Wa].running=void 0,Mc.delete(i[Qs]),e(!0)});return}e(!1)}function EV(i,e){let t=i.cleanup,n=e[eu];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[eu]=null);let r=e[Ys];if(r!==null){e[Ys]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=e[Va];if(o!==null){e[Va]=null;for(let s of o)s.destroy()}}function MV(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 Ec)){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];tn(Wt.LifecycleHookStart,a,l);try{l.call(a)}finally{tn(Wt.LifecycleHookEnd,a,l)}}else{tn(Wt.LifecycleHookStart,r,o);try{o.call(r)}finally{tn(Wt.LifecycleHookEnd,r,o)}}}}}function _A(i,e,t){return TV(i,e.parent,t)}function TV(i,e,t){let n=e;for(;n!==null&&n.type&168;)e=n,n=e.parent;if(n===null)return t[Vi];if(fs(n)){let{encapsulation:r}=i.data[n.directiveStart+n.componentOffset];if(r===Po.None||r===Po.Emulated)return null}return to(n,t)}function SA(i,e,t){return IV(i,e,t)}function DV(i,e,t){return i.type&40?to(i,t):null}var IV=DV,D2;function FC(i,e,t,n){let r=_A(i,n,e),o=e[Zt],s=n.parent||e[Gi],a=SA(s,n,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)C2(o,r,t[l],a,!1);else C2(o,r,t,a,!1);D2!==void 0&&D2(o,n,e,t,r)}function Ah(i,e){if(e!==null){let t=e.type;if(t&3)return to(e,i);if(t&4)return U1(-1,i[e.index]);if(t&8){let n=e.child;if(n!==null)return Ah(i,n);{let r=i[e.index];return _r(r)?U1(-1,r):Sr(r)}}else{if(t&128)return Ah(i,e.next);if(t&32)return OC(e,i)()||Sr(i[e.index]);{let n=CA(i,e);if(n!==null){if(Array.isArray(n))return n[0];let r=Ga(i[ci]);return Ah(r,n)}else return Ah(i,e.next)}}}return null}function CA(i,e){if(e!==null){let n=i[ci][Gi],r=e.projection;return n.projection[r]}return null}function U1(i,e){let t=Dn+i+1;if(t<e.length){let n=e[t],r=n[tt].firstChild;if(r!==null)return Ah(n,r)}return e[us]}function NC(i,e,t,n,r,o,s){for(;t!=null;){let a=n[yr];if(t.type===128){t=t.next;continue}let l=n[t.index],c=t.type;if(s&&e===0&&(l&&hu(Sr(l),n),t.flags|=2),!$h(t))if(c&8)NC(i,e,t.child,n,r,o,!1),lu(e,i,a,r,l,t,o,n);else if(c&32){let d=OC(t,n),u;for(;u=d();)lu(e,i,a,r,u,t,o,n);lu(e,i,a,r,l,t,o,n)}else c&16?wA(i,e,n,t,r,o):lu(e,i,a,r,l,t,o,n);t=s?t.projectionNext:t.next}}function R0(i,e,t,n,r,o){NC(t,n,i.firstChild,e,r,o,!1)}function PV(i,e,t){let n=e[Zt],r=_A(i,t,e),o=t.parent||e[Gi],s=SA(o,t,e);wA(n,0,e,t,r,s)}function wA(i,e,t,n,r,o){let s=t[ci],l=s[Gi].projection[n.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];lu(e,i,t[yr],r,d,n,o,t)}else{let c=l,d=s[Vn];u0(n)&&(c.flags|=128),NC(i,e,c,d,r,o,!0)}}function AV(i,e,t,n,r,o,s){let a=n[us],l=Sr(n);a!==l&&lu(e,i,t,o,a,r,s);for(let c=Dn;c<n.length;c++){let d=n[c];R0(d[tt],d,i,e,o,a)}}function OV(i,e,t,n,r){if(e)r?i.addClass(t,n):i.removeClass(t,n);else{let o=n.indexOf("-")===-1?void 0:ms.DashCase;r==null?i.removeStyle(t,n,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=ms.Important),i.setStyle(t,n,r,o))}}function EA(i,e,t,n,r){let o=ea(),s=n&2;try{Ya(-1),s&&e.length>Xt&&mA(i,e,Xt,!1);let a=s?Wt.TemplateUpdateStart:Wt.TemplateCreateStart;tn(a,r,t),t(n,r)}finally{Ya(o);let a=s?Wt.TemplateUpdateEnd:Wt.TemplateCreateEnd;tn(a,r,t)}}function k0(i,e,t){UV(i,e,t),(t.flags&64)===64&&BV(i,e,t)}function qh(i,e,t=to){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 RV(i,e,t,n){let o=n.get(fC,PP)||t===Po.ShadowDom||t===Po.ExperimentalIsolatedShadowDom,s=i.selectRootElement(e,o);return kV(s),s}function kV(i){MA(i)}var MA=()=>null;function FV(i){mP(i)?aA(i):wz(i)}function TA(){MA=FV}function NV(i){return i==="class"?"className":i==="for"?"htmlFor":i==="formaction"?"formAction":i==="innerHtml"?"innerHTML":i==="readonly"?"readOnly":i==="tabindex"?"tabIndex":i}function DA(i,e,t,n,r,o){let s=e[tt];if(VC(i,s,e,t,n)){fs(i)&&LV(e,i.index);return}i.type&3&&(t=NV(t)),IA(i,e,t,n,r,o)}function IA(i,e,t,n,r,o){if(i.type&3){let s=to(i,e);n=o!=null?o(n,i.value||"",t):n,r.setProperty(s,t,n)}else i.type&12}function LV(i,e){let t=no(e,i);t[wt]&16||(t[wt]|=64)}function UV(i,e,t){let n=t.directiveStart,r=t.directiveEnd;fs(t)&&hV(e,t,i.data[n+t.componentOffset]),i.firstCreatePass||c0(t,e);let o=t.initialInputs;for(let s=n;s<r;s++){let a=i.data[s],l=Rh(e,i,s,t);if(hu(l,e),o!==null&&HV(e,s-n,l,a,t,o),hs(a)){let c=no(t.index,e);c[kn]=Rh(e,i,s,t)}}}function BV(i,e,t){let n=t.directiveStart,r=t.directiveEnd,o=t.index,s=YI();try{Ya(o);for(let a=n;a<r;a++){let l=i.data[a],c=e[a];zg(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&zV(l,c)}}finally{Ya(-1),zg(s)}}function zV(i,e){i.hostBindings!==null&&i.hostBindings(1,e)}function LC(i,e){let t=i.directiveRegistry,n=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];fA(e,o.selectors,!1)&&(n??=[],hs(o)?n.unshift(o):n.push(o))}return n}function VV(i,e,t,n,r,o){let s=to(i,e);GV(e[Zt],s,o,i.value,t,n,r)}function GV(i,e,t,n,r,o,s){if(o==null)i.removeAttribute(e,r,t);else{let a=s==null?Sh(o):s(o,n||"",r);i.setAttribute(e,r,a,t)}}function HV(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];F1(n,t,l,c)}}function UC(i,e,t,n,r){let o=Xt+t,s=e[tt],a=r(s,e,i,n,t);e[o]=a,ru(i,!0);let l=i.type===2;return l?(lA(e[Zt],a,i),(zI()===0||nu(i))&&hu(a,e),VI()):hu(a,e),jg()&&(!l||!$h(i))&&FC(s,e,a,i),i}function BC(i){let e=i;return XS()?YS():(e=e.parent,ru(e,!1)),e}function zC(i,e){let t=i[yr];if(!t)return;let n;try{n=t.get(na,null)}catch{n=null}n?.(e)}function VC(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];F1(u,t[c],d,r),a=!0}if(o)for(let l of o){let c=t[l],d=e.data[l];F1(d,c,n,r),a=!0}return a}function jV(i,e){let t=no(e,i),n=t[tt];WV(n,t);let r=t[Vi];r!==null&&t[Hi]===null&&(t[Hi]=WP(r,t[yr])),tn(Wt.ComponentStart);try{GC(n,t,t[kn])}finally{tn(Wt.ComponentEnd,t[kn])}}function WV(i,e){for(let t=e.length;t<i.blueprint.length;t++)e.push(i.blueprint[t])}function GC(i,e,t){Gg(e);try{let n=i.viewQuery;n!==null&&M1(1,n,t);let r=i.template;r!==null&&EA(i,e,r,1,t),i.firstCreatePass&&(i.firstCreatePass=!1),e[ds]?.finishViewCreation(i),i.staticContentQueries&&ZP(i,e),i.staticViewQueries&&M1(2,i.viewQuery,t);let o=i.components;o!==null&&$V(e,o)}catch(n){throw i.firstCreatePass&&(i.incompleteFirstPass=!0,i.firstCreatePass=!1),n}finally{e[wt]&=-5,Hg()}}function $V(i,e){for(let t=0;t<e.length;t++)jV(i,e[t])}function xu(i,e,t,n){let r=lt(null);try{let o=e.tView,a=i[wt]&4096?4096:16,l=PC(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[ds];return d!==null&&(l[ds]=d.createEmbeddedView(o)),GC(o,l,t),l}finally{lt(r)}}function Tc(i,e){return!e||e.firstChild===null||u0(i)}function Fh(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(Sr(o)),_r(o)&&PA(o,n);let s=t.type;if(s&8)Fh(i,e,t.child,n);else if(s&32){let a=OC(t,e),l;for(;l=a();)n.push(l)}else if(s&16){let a=CA(e,t);if(Array.isArray(a))n.push(...a);else{let l=Ga(e[ci]);Fh(l[tt],l,a,n,!0)}}t=r?t.projectionNext:t.next}return n}function PA(i,e){for(let t=Dn;t<i.length;t++){let n=i[t],r=n[tt].firstChild;r!==null&&Fh(n[tt],n,r,e)}i[us]!==i[Vi]&&e.push(i[us])}function AA(i){if(i[yc]!==null){for(let e of i[yc])e.impl.addSequence(e);i[yc].length=0}}var OA=[];function XV(i){return i[xr]??YV(i)}function YV(i){let e=OA.pop()??Object.create(KV);return e.lView=i,e}function qV(i){i.lView[xr]!==i&&(i.lView=null,OA.push(i))}var KV=ue(R({},nc),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{Sc(i.lView)},consumerOnSignalRead(){this.lView[xr]=this}});function ZV(i){let e=i[xr]??Object.create(JV);return e.lView=i,e}var JV=ue(R({},nc),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{let e=Ga(i.lView);for(;e&&!RA(e[tt]);)e=Ga(e);e&&BS(e)},consumerOnSignalRead(){this.lView[xr]=this}});function RA(i){return i.type!==2}function kA(i){if(i[Va]===null)return;let e=!0;for(;e;){let t=!1;for(let n of i[Va])n.dirty&&(t=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));e=t&&!!(i[wt]&8192)}}var QV=100;function FA(i,e=0){let n=i[Mo].rendererFactory,r=!1;r||n.begin?.();try{eG(i,e)}finally{r||n.end?.()}}function eG(i,e){let t=qS();try{yh(!0),B1(i,e);let n=0;for(;Mh(i);){if(n===QV)throw new Ke(103,!1);n++,B1(i,1)}}finally{yh(t)}}function tG(i,e,t,n){if($a(e))return;let r=e[wt],o=!1,s=!1;Gg(e);let a=!0,l=null,c=null;o||(RA(i)?(c=XV(e),l=rc(c)):$m()===null?(a=!1,c=ZV(e),l=rc(c)):e[xr]&&(oc(e[xr]),e[xr]=null));try{US(e),WI(i.bindingStartIndex),t!==null&&EA(i,e,t,2,n);let d=(r&3)===3;if(!o)if(d){let h=i.preOrderCheckHooks;h!==null&&Jg(e,h,null)}else{let h=i.preOrderHooks;h!==null&&Qg(e,h,0,null),o1(e,0)}if(s||nG(e),kA(e),NA(e,0),i.contentQueries!==null&&ZP(i,e),!o)if(d){let h=i.contentCheckHooks;h!==null&&Jg(e,h)}else{let h=i.contentHooks;h!==null&&Qg(e,h,1),o1(e,1)}rG(i,e);let u=i.components;u!==null&&UA(e,u,0);let f=i.viewQuery;if(f!==null&&M1(2,f,n),!o)if(d){let h=i.viewCheckHooks;h!==null&&Jg(e,h)}else{let h=i.viewHooks;h!==null&&Qg(e,h,2),o1(e,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),e[kg]){for(let h of e[kg])h();e[kg]=null}o||(AA(e),e[wt]&=-73)}catch(d){throw o||Sc(e),d}finally{c!==null&&(Hd(c,l),a&&qV(c)),Hg()}}function NA(i,e){for(let t=bP(i);t!==null;t=yP(t))for(let n=Dn;n<t.length;n++){let r=t[n];LA(r,e)}}function nG(i){for(let e=bP(i);e!==null;e=yP(e)){if(!(e[wt]&2))continue;let t=e[xc];for(let n=0;n<t.length;n++){let r=t[n];BS(r)}}}function iG(i,e,t){tn(Wt.ComponentStart);let n=no(e,i);try{LA(n,t)}finally{tn(Wt.ComponentEnd,n[kn])}}function LA(i,e){Ng(i)&&B1(i,e)}function B1(i,e){let n=i[tt],r=i[wt],o=i[xr],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&dh(o)),s||=!1,o&&(o.dirty=!1),i[wt]&=-9217,s)tG(n,i,n.template,i[kn]);else if(r&8192){let a=lt(null);try{kA(i),NA(i,1);let l=n.components;l!==null&&UA(i,l,1),AA(i)}finally{lt(a)}}}function UA(i,e,t){for(let n=0;n<e.length;n++)iG(i,e[n],t)}function rG(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)Ya(~r);else{let o=r,s=t[++n],a=t[++n];XI(s,o);let l=e[o];tn(Wt.HostBindingsUpdateStart,l);try{a(2,l)}finally{tn(Wt.HostBindingsUpdateEnd,l)}}}}finally{Ya(-1)}}function F0(i,e){let t=qS()?64:1088;for(i[Mo].changeDetectionScheduler?.notify(e);i;){i[wt]|=t;let n=Ga(i);if(_c(i)&&!n)return i;i=n}return null}function BA(i,e,t,n){return[i,!0,0,e,null,n,null,t,null,null]}function zA(i,e){let t=Dn+e;if(t<i.length)return i[t]}function _u(i,e,t,n=!0){let r=e[tt];if(oG(r,e,i,t),n){let s=U1(t,i),a=e[Zt],l=a.parentNode(i[us]);l!==null&&SV(r,i[Gi],a,e,l,s)}let o=e[Hi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function HC(i,e){let t=Nh(i,e);return t!==void 0&&O0(t[tt],t),t}function Nh(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t];if(n){let r=n[ja];r!==null&&r!==i&&kC(r,n),e>0&&(i[t-1][Qr]=n[Qr]);let o=Ch(i,Dn+e);_V(n[tt],n);let s=o[ds];s!==null&&s.detachView(o[tt]),n[Vn]=null,n[Qr]=null,n[wt]&=-129}return n}function oG(i,e,t,n){let r=Dn+n,o=t.length;n>0&&(t[r-1][Qr]=e),n<o-Dn?(e[Qr]=t[r],TS(t,Dn+n,e)):(t.push(e),e[Qr]=null),e[Vn]=t;let s=e[ja];s!==null&&t!==s&&VA(s,e);let a=e[ds];a!==null&&a.insertView(i),Lg(e),e[wt]|=128}function VA(i,e){let t=i[xc],n=e[Vn];if(eo(n))i[wt]|=2;else{let r=n[Vn][ci];e[ci]!==r&&(i[wt]|=2)}t===null?i[xc]=[e]:t.push(e)}var Za=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[tt];return Fh(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[kn]}set context(e){this._lView[kn]=e}get destroyed(){return $a(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Vn];if(_r(e)){let t=e[Eh],n=t?t.indexOf(this):-1;n>-1&&(Nh(e,n),Ch(t,n))}this._attachedToViewContainer=!1}O0(this._lView[tt],this._lView)}onDestroy(e){zS(this._lView,e)}markForCheck(){F0(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[wt]&=-129}reattach(){Lg(this._lView),this._lView[wt]|=128}detectChanges(){this._lView[wt]|=1024,FA(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ke(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=_c(this._lView),t=this._lView[ja];t!==null&&!e&&kC(t,this._lView),xA(this._lView[tt],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Ke(902,!1);this._appRef=e;let t=_c(this._lView),n=this._lView[ja];n!==null&&!t&&VA(n,this._lView),Lg(this._lView)}};var pu=(()=>{class i{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=sG;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=xu(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new Za(o)}}return i})();function sG(){return N0(xi(),pt())}function N0(i,e){return i.type&4?new pu(e,i,bu(i,e)):null}function Su(i,e,t,n,r){let o=i.data[e];if(o===null)o=aG(i,e,t,n,r),$I()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=n,o.attrs=r;let s=HI();o.injectorIndex=s===null?-1:s.injectorIndex}return ru(o,!0),o}function aG(i,e,t,n,r){let o=$S(),s=XS(),a=s?o:o&&o.parent,l=i.data[e]=cG(i,a,t,e,n,r);return lG(i,l,o,s),l}function lG(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 cG(i,e,t,n,r,o){let s=e?e.injectorIndex:-1,a=0;return Bg()&&(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 dG=new RegExp(`^(\\d+)*(${SP}|${_P})*(.*)`);function uG(i){let e=i.match(dG),[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 fG(i){return!i.prev&&i.parent?.type===8}function c1(i){return i.index-Xt}function hG(i,e){let t=i.i18nNodes;if(t)return t.get(e)}function L0(i,e,t,n){let r=c1(n),o=hG(i,r);if(o===void 0){let s=i.data[MP];if(s?.[r])o=mG(s[r],t);else if(e.firstChild===n)o=i.firstChild;else{let a=n.prev===null,l=n.prev??n.parent;if(fG(n)){let c=c1(n.parent);o=E1(i,c)}else{let c=to(l,t);if(a)o=c.firstChild;else{let d=c1(l),u=E1(i,d);if(l.type===2&&u){let h=vC(i,d)+1;o=U0(h,u)}else o=c.nextSibling}}}}return o}function U0(i,e){let t=e;for(let n=0;n<i;n++)t=t.nextSibling;return t}function pG(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 vz:t=t.firstChild;break;case bz:t=t.nextSibling;break}}return t}function mG(i,e){let[t,...n]=uG(i),r;if(t===_P)r=e[ci][Vi];else if(t===SP)r=dA(e[ci][Vi]);else{let o=Number(t);r=Sr(e[o+Xt])}return pG(r,n)}var gG=!1;function GA(i){gG=i}function vG(i){let e=i[Hi];if(e){let{i18nNodes:t,dehydratedIcuData:n}=e;if(t&&n){let r=i[Zt];for(let o of n.values())bG(r,t,o)}e.i18nNodes=void 0,e.dehydratedIcuData=void 0}}function bG(i,e,t){for(let n of t.node.cases[t.case]){let r=e.get(n.index-Xt);r&&EC(i,r,!1)}}function B0(i){let e=i[To]??[],n=i[Vn][Zt],r=[];for(let o of e)o.data[TP]!==void 0?r.push(o):HA(o,n);i[To]=r}function yG(i){let{lContainer:e}=i,t=e[To];if(t===null)return;let r=e[Vn][Zt];for(let o of t)HA(o,r)}function HA(i,e){let t=0,n=i.firstChild;if(n){let r=i.data[kh];for(;t<r;){let o=n.nextSibling;EC(e,n,!1),n=o,t++}}}function z0(i){B0(i);let e=i[Vi];eo(e)&&p0(e);for(let t=Dn;t<i.length;t++)p0(i[t])}function p0(i){vG(i);let e=i[tt];for(let t=Xt;t<e.bindingStartIndex;t++)if(_r(i[t])){let n=i[t];z0(n)}else eo(i[t])&&p0(i[t])}function jC(i){let e=i._views;for(let t of e){let n=$P(t);n!==null&&n[Vi]!==null&&(eo(n)?p0(n):z0(n))}}function xG(i,e,t,n){i!==null&&(t.cleanup(e),z0(i.lContainer),jC(n))}function _G(i,e){let t=[];for(let n of e)for(let r=0;r<(n[dC]??1);r++){let o={data:n,firstChild:null};n[kh]>0&&(o.firstChild=i,i=U0(n[kh],i)),t.push(o)}return[i,t]}var jA=()=>null,WA=()=>null;function $A(){jA=SG,WA=CG}function SG(i,e){return YA(i,e)?i[To].shift():(B0(i),null)}function Lh(i,e){return jA(i,e)}function CG(i,e,t){if(e.tView.ssrId===null)return null;let n=Lh(i,e.tView.ssrId);return t[tt].firstUpdatePass&&n===null&&wG(t,e),n}function XA(i,e,t){return WA(i,e,t)}function wG(i,e){let t=e;for(;t;){if(I2(i,t))return;if((t.flags&256)===256)break;t=t.prev}for(t=e.next;t&&(t.flags&512)===512;){if(I2(i,t))return;t=t.next}}function YA(i,e){let t=i[To];return!e||t===null||t.length===0?!1:t[0].data[EP]===e}function I2(i,e){let t=e.tView?.ssrId;if(t==null)return!1;let n=i[e.index];return _r(n)&&YA(n,t)?(B0(n),!0):!1}var qA=class{},V0=class{},z1=class{resolveComponentFactory(e){throw new Ke(917,!1)}},G0=class{static NULL=new z1},Dc=class{},aa=(()=>{class i{destroyNode=null;static __NG_ELEMENT_ID__=()=>EG()}return i})();function EG(){let i=pt(),e=xi(),t=no(e.index,i);return(eo(t)?t:i)[Zt]}var KA=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>null})}return i})();var n0={},du=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,n0,n);return r!==n0||t===n0?r:this.parentInjector.get(e,t,n)}};function m0(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=Eg(r,a);else if(o==2){let l=a,c=e[++s];n=Eg(n,l+": "+c+";")}}t?i.styles=n:i.stylesWithoutHost=n,t?i.classes=r:i.classesWithoutHost=r}function $t(i,e=0){let t=pt();if(t===null)return Xe(i,e);let n=xi();return dP(n,t,yi(i),e)}function ZA(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}DG(i,e,t,a,o,l,c)}o!==null&&n!==null&&MG(t,n,o)}function MG(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 Ke(-301,!1);n.push(e[r],o)}}function TG(i,e,t){e.componentOffset=t,(i.components??=[]).push(e.index)}function DG(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&&hs(h)&&(l=h,TG(i,t,f)),x1(c0(t,e),i,h.type)}kG(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=pA(i,e,a,null);a>0&&(t.directiveToIndex=new Map);for(let f=0;f<a;f++){let h=n[f];if(t.mergedAttrs=fu(t.mergedAttrs,h.hostAttrs),PG(i,t,e,u,h),RG(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++}IG(i,t,o)}function IG(i,e,t){for(let n=e.directiveStart;n<e.directiveEnd;n++){let r=i.data[n];if(t===null||!t.has(r))P2(0,e,r,n),P2(1,e,r,n),O2(e,n,!1);else{let o=t.get(r);A2(0,e,o,n),A2(1,e,o,n),O2(e,n,!0)}}}function P2(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),JA(e,o)}}function A2(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),JA(e,s)}}function JA(i,e){e==="class"?i.flags|=8:e==="style"&&(i.flags|=16)}function O2(i,e,t){let{attrs:n,inputs:r,hostDirectiveInputs:o}=i;if(n===null||!t&&r===null||t&&o===null||DC(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 PG(i,e,t,n,r){i.data[n]=r;let o=r.factory||(r.factory=za(r.type,!0)),s=new Ec(o,hs(r),$t,null);i.blueprint[n]=s,t[n]=s,AG(i,e,n,pA(i,t,r.hostVars,Mr),r)}function AG(i,e,t,n,r){let o=r.hostBindings;if(o){let s=i.hostBindingOpCodes;s===null&&(s=i.hostBindingOpCodes=[]);let a=~e.index;OG(s)!=a&&s.push(a),s.push(t,n,o)}}function OG(i){let e=i.length;for(;e>0;){let t=i[--e];if(typeof t=="number"&&t<0)return t}return 0}function RG(i,e,t){if(t){if(e.exportAs)for(let n=0;n<e.exportAs.length;n++)t[e.exportAs[n]]=i;hs(e)&&(t[""]=i)}}function kG(i,e,t){i.flags|=1,i.directiveStart=e,i.directiveEnd=e+t,i.providerIndexes=e}function WC(i,e,t,n,r,o,s,a){let l=e[tt],c=l.consts,d=io(c,s),u=Su(l,i,t,n,d);return o&&ZA(l,e,u,io(c,a),r),u.mergedAttrs=fu(u.mergedAttrs,u.attrs),u.attrs!==null&&m0(u,u.attrs,!1),u.mergedAttrs!==null&&m0(u,u.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,u),u}function $C(i,e){nP(i,e),kS(e)&&i.queries.elementEnd(e)}function FG(i,e,t,n,r,o){let s=e.consts,a=io(s,r),l=Su(e,i,t,n,a);if(l.mergedAttrs=fu(l.mergedAttrs,l.attrs),o!=null){let c=io(s,o);l.localNames=[];for(let d=0;d<c.length;d+=2)l.localNames.push(c[d],-1)}return l.attrs!==null&&m0(l,l.attrs,!1),l.mergedAttrs!==null&&m0(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function H0(i,e,t){return i[e]=t}function NG(i,e){return i[e]}function wr(i,e,t){if(t===Mr)return!1;let n=i[e];return Object.is(n,t)?!1:(i[e]=t,!0)}function QA(i,e,t,n){let r=wr(i,e,t);return wr(i,e+1,n)||r}function LG(i,e,t,n,r){let o=QA(i,e,t,n);return wr(i,e+2,r)||o}function i0(i,e,t){return function n(r){let o=fs(i)?no(i.index,e):e;F0(o,5);let s=e[kn],a=R2(e,s,t,r),l=n.__ngNextListenerFn__;for(;l;)a=R2(e,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function R2(i,e,t,n){let r=lt(null);try{return tn(Wt.OutputStart,e,t),t(n)!==!1}catch(o){return zC(i,o),!1}finally{tn(Wt.OutputEnd,e,t),lt(r)}}function eO(i,e,t,n,r,o,s,a){let l=nu(i),c=!1,d=null;if(!n&&l&&(d=BG(e,t,o,i.index)),d!==null){let u=d.__ngLastListenerFn__||d;u.__ngNextListenerFn__=s,d.__ngLastListenerFn__=s,c=!0}else{let u=to(i,t),f=n?n(u):u;yz(t,f,o,a);let h=r.listen(f,o,a);if(!UG(o)){let p=n?v=>n(Sr(v[i.index])):i.index;tO(p,e,t,o,a,h,!1)}}return c}function UG(i){return i.startsWith("animation")||i.startsWith("transition")}function BG(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[eu],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function tO(i,e,t,n,r,o,s){let a=e.firstCreatePass?GS(e):null,l=VS(t),c=l.length;l.push(r,o),a&&a.push(n,i,c,(c+1)*(s?-1:1))}function k2(i,e,t,n,r,o){let s=e[t],a=e[tt],c=a.data[t].outputs[n],u=s[c].subscribe(o);tO(i.index,a,e,r,o,u,!0)}var V1=Symbol("BINDING");function nO(i){return i.debugInfo?.className||i.type.name||null}var G1=class extends G0{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Ks(e);return new mu(t,this.ngModule)}};function zG(i){return Object.keys(i).map(e=>{let[t,n,r]=i[e],o={propName:t,templateName:e,isSignal:(n&I0.SignalBased)!==0};return r&&(o.transform=r),o})}function VG(i){return Object.keys(i).map(e=>({propName:i[e],templateName:e}))}function GG(i,e,t){let n=e instanceof Ti?e:e?.injector;return n&&i.getStandaloneInjector!==null&&(n=i.getStandaloneInjector(n)||n),n?new du(t,n):t}function HG(i){let e=i.get(Dc,null);if(e===null)throw new Ke(407,!1);let t=i.get(KA,null),n=i.get(ls,null),r=i.get(vs,null,{optional:!0});return{rendererFactory:e,sanitizer:t,changeDetectionScheduler:n,ngReflect:!1,tracingService:r}}function jG(i,e){let t=iO(i);return wC(e,t,t==="svg"?FS:t==="math"?FI:null)}function iO(i){return(i.selectors[0][0]||"div").toLowerCase()}var mu=class extends V0{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=zG(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=VG(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=cV(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,o,s){tn(Wt.DynamicComponentStart);let a=lt(null);try{let l=this.componentDef,c=GG(l,r||this.ngModule,e),d=HG(c),u=d.tracingService;return u&&u.componentCreate?u.componentCreate(nO(l),()=>this.createComponentRef(d,c,t,n,o,s)):this.createComponentRef(d,c,t,n,o,s)}finally{lt(a)}}createComponentRef(e,t,n,r,o,s){let a=this.componentDef,l=WG(r,a,s,o),c=e.rendererFactory.createRenderer(null,a),d=r?RV(c,r,a.encapsulation,t):jG(a,c),u=s?.some(F2)||o?.some(p=>typeof p!="function"&&p.bindings.some(F2)),f=PC(null,l,null,512|hA(a),null,null,e,c,t,null,WP(d,t,!0));f[Xt]=d,Gg(f);let h=null;try{let p=WC(Xt,f,2,"#host",()=>l.directiveRegistry,!0,0);lA(c,d,p),hu(d,f),k0(l,f,p),bC(l,p,f),$C(l,p),n!==void 0&&XG(p,this.ngContentSelectors,n),h=no(p.index,f),f[kn]=h[kn],GC(l,f,null)}catch(p){throw h!==null&&S1(h),S1(f),p}finally{tn(Wt.DynamicComponentEnd),Hg()}return new g0(this.componentType,f,!!u)}};function WG(i,e,t,n){let r=i?["ng-version","21.2.4"]:dV(e.selectors[0]),o=null,s=null,a=0;if(t)for(let d of t)a+=d[V1].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[V1].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=Dg(u);l.push(f)}return IC(0,null,$G(o,s),1,a,l,null,null,null,[r],null)}function $G(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 F2(i){let e=i[V1].kind;return e==="input"||e==="twoWay"}var g0=class extends qA{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=iu(t[tt],Xt),this.location=bu(this._tNode,t),this.instance=no(this._tNode.index,t)[kn],this.hostView=this.changeDetectorRef=new Za(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=VC(n,r[tt],r,e,t);this.previousInputValues.set(e,t);let s=no(n.index,r);F0(s,1)}get injector(){return new wc(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function XG(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 Cu=(()=>{class i{static __NG_ELEMENT_ID__=YG}return i})();function YG(){let i=xi();return rO(i,pt())}var H1=class i extends Cu{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return bu(this._hostTNode,this._hostLView)}get injector(){return new wc(this._hostTNode,this._hostLView)}get parentInjector(){let e=sC(this._hostTNode,this._hostLView);if(rP(e)){let t=a0(e,this._hostLView),n=s0(e),r=t[tt].data[n+8];return new wc(r,t)}else return new wc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=N2(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Dn}createEmbeddedView(e,t,n){let r,o;typeof n=="number"?r=n:n!=null&&(r=n.index,o=n.injector);let s=Lh(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,Tc(this._hostTNode,s)),a}createComponent(e,t,n,r,o,s,a){let l=e&&!H5(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(Ks(e)),u=n||this.parentInjector;if(!o&&d.ngModule==null){let m=(l?u:this.parentInjector).get(Ti,null);m&&(o=m)}let f=Ks(d.componentType??{}),h=Lh(this._lContainer,f?.id??null),p=h?.firstChild??null,v=d.create(u,r,p,o,s,a);return this.insertImpl(v.hostView,c,Tc(this._hostTNode,h)),v}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(NI(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[Vn],c=new i(l,l[Gi],l[Vn]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return _u(s,r,o,n),e.attachToViewContainerRef(),TS(d1(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=N2(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=Nh(this._lContainer,t);n&&(Ch(d1(this._lContainer),t),O0(n[tt],n))}detach(e){let t=this._adjustIndex(e,-1),n=Nh(this._lContainer,t);return n&&Ch(d1(this._lContainer),t)!=null?new Za(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function N2(i){return i[Eh]}function d1(i){return i[Eh]||(i[Eh]=[])}function rO(i,e){let t,n=e[i.index];return _r(n)?t=n:(t=BA(n,e,null,i),e[i.index]=t,AC(e,t)),oO(t,e,i,n),new H1(t,i,e)}function qG(i,e){let t=i[Zt],n=t.createComment(""),r=to(e,i),o=t.parentNode(r);return f0(t,o,n,t.nextSibling(r),!1),n}var oO=sO,XC=()=>!1;function KG(i,e,t){return XC(i,e,t)}function sO(i,e,t,n){if(i[us])return;let r;t.type&8?r=Sr(n):r=qG(e,t),i[us]=r}function ZG(i,e,t){if(i[us]&&i[To])return!0;let n=t[Hi],r=e.index-Xt;if(!n||gP(e)||qP(n,r))return!1;let s=E1(n,r),a=n.data[S0]?.[r],[l,c]=_G(s,a);return i[us]=l,i[To]=c,!0}function JG(i,e,t,n){XC(i,t,e)||sO(i,e,t,n)}function aO(){oO=JG,XC=ZG}var j1=class i{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},W1=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++)dO(e,t).matches!==null&&this.queries[t].setDirty()}},$1=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=o6(e):this.predicate=e}},X1=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)}},Y1=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,QG(t,o)),this.matchTNodeWithReadOption(e,t,e0(t,e,o,!1,!1))}else n===pu?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,e0(t,e,n,!1,!1))}matchTNodeWithReadOption(e,t,n){if(n!==null){let r=this.metadata.read;if(r!==null)if(r===Er||r===Cu||r===pu&&t.type&4)this.addMatch(t.index,-2);else{let o=e0(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 QG(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 e6(i,e){return i.type&11?bu(i,e):i.type&4?N0(i,e):null}function t6(i,e,t,n){return t===-1?e6(e,i):t===-2?n6(i,e,n):Rh(i,i[tt],t,e)}function n6(i,e,t){if(t===Er)return bu(e,i);if(t===pu)return N0(e,i);if(t===Cu)return rO(e,i)}function lO(i,e,t,n){let r=e[ds].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(t6(e,d,s[l+1],t.metadata.read))}}r.matches=a}return r.matches}function q1(i,e,t,n){let r=i.queries.getByIndex(t),o=r.matches;if(o!==null){let s=lO(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=Dn;u<d.length;u++){let f=d[u];f[ja]===f[Vn]&&q1(f[tt],f,c,n)}if(d[xc]!==null){let u=d[xc];for(let f=0;f<u.length;f++){let h=u[f];q1(h[tt],h,c,n)}}}}}return n}function cO(i,e){return i[ds].queries[e].queryList}function i6(i,e,t){let n=new d0((t&4)===4);return BI(i,e,n,n.destroy),(e[ds]??=new W1).queries.push(new j1(n))-1}function r6(i,e,t){let n=In();return n.firstCreatePass&&(s6(n,new $1(i,e,t),-1),(e&2)===2&&(n.staticViewQueries=!0)),i6(n,pt(),e)}function o6(i){return i.split(",").map(e=>e.trim())}function s6(i,e,t){i.queries===null&&(i.queries=new X1),i.queries.track(new Y1(e,t))}function dO(i,e){return i.queries.getByIndex(e)}function a6(i,e){let t=i[tt],n=dO(t,e);return n.crossesNgTemplate?q1(t,i,e,[]):lO(t,i,n,e)}function uO(i,e,t){let n,r=uh(()=>{n._dirtyCounter();let o=c6(n,i);if(e&&o===void 0)throw new Ke(-951,!1);return o});return n=r[Qn],n._dirtyCounter=N(0),n._flatValue=void 0,r}function fO(i){return uO(!0,!1,i)}function hO(i){return uO(!0,!0,i)}function l6(i,e){let t=i[Qn];t._lView=pt(),t._queryIndex=e,t._queryList=cO(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(n=>n+1))}function c6(i,e){let t=i._lView,n=i._queryIndex;if(t===void 0||n===void 0||t[wt]&4)return e?void 0:Mi;let r=cO(t,n),o=a6(t,n);return r.reset(o,cz),e?r.first:r._changesDetected||i._flatValue===void 0?i._flatValue=r.toArray():i._flatValue}var Uh=class{};var Bh=class extends Uh{injector;componentFactoryResolver=new G1(this);instance=null;constructor(e){super();let t=new mc([...e.providers,{provide:Uh,useValue:this},{provide:G0,useValue:this.componentFactoryResolver}],e.parent||Jd(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function YC(i,e,t=null){return new Bh({providers:i,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var d6=(()=>{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=Rg(!1,t.type),r=n.length>0?YC([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(Xe(Ti))})}return i})();function at(i){return Gh(()=>{let e=pO(i),t=ue(R({},e),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===aC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&i.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(d6).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||Po.Emulated,styles:i.styles||Mi,_:null,schemas:i.schemas||null,tView:null,id:""});e.standalone&&Ro("NgStandalone"),mO(t);let n=i.dependencies;return t.directiveDefs=L2(n,u6),t.pipeDefs=L2(n,CS),t.id=p6(t),t})}function u6(i){return Ks(i)||Dg(i)}function la(i){return Gh(()=>({type:i.type,bootstrap:i.bootstrap||Mi,declarations:i.declarations||Mi,imports:i.imports||Mi,exports:i.exports||Mi,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function f6(i,e){if(i==null)return Ha;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=I0.None,l=null),t[o]=[n,a,l],e[o]=s}return t}function h6(i){if(i==null)return Ha;let e={};for(let t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function Zn(i){return Gh(()=>{let e=pO(i);return mO(e),e})}function j0(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 pO(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||Ha,exportAs:i.exportAs||null,standalone:i.standalone??!0,signals:i.signals===!0,selectors:i.selectors||Mi,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:f6(i.inputs,e),outputs:h6(i.outputs),debugInfo:null}}function mO(i){i.features?.forEach(e=>e(i))}function L2(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 p6(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 m6(i){return Object.getPrototypeOf(i.prototype).constructor}function Tr(i){let e=m6(i.type),t=!0,n=[i];for(;e;){let r;if(hs(i))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Ke(903,!1);r=e.\u0275dir}if(r){if(t){n.push(r);let s=i;s.inputs=u1(i.inputs),s.declaredInputs=u1(i.declaredInputs),s.outputs=u1(i.outputs);let a=r.hostBindings;a&&x6(i,a);let l=r.viewQuery,c=r.contentQueries;if(l&&b6(i,l),c&&y6(i,c),g6(i,r),xI(i.outputs,r.outputs),hs(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===Tr&&(t=!1)}}e=Object.getPrototypeOf(e)}v6(n)}function g6(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 v6(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=fu(r.hostAttrs,t=fu(t,r.hostAttrs))}}function u1(i){return i===Ha?{}:i===Mi?[]:i}function b6(i,e){let t=i.viewQuery;t?i.viewQuery=(n,r)=>{e(n,r),t(n,r)}:i.viewQuery=e}function y6(i,e){let t=i.contentQueries;t?i.contentQueries=(n,r,o)=>{e(n,r,o),t(n,r,o)}:i.contentQueries=e}function x6(i,e){let t=i.hostBindings;t?i.hostBindings=(n,r)=>{e(n,r),t(n,r)}:i.hostBindings=e}function gO(i,e,t,n,r,o,s,a){if(t.firstCreatePass){i.mergedAttrs=fu(i.mergedAttrs,i.attrs);let d=i.tView=IC(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),ru(i,!1);let l=vO(t,e,i,n);jg()&&FC(t,e,l,i),hu(l,e);let c=BA(l,e,l,i);e[n+Xt]=c,AC(e,c),KG(c,i,e)}function _6(i,e,t,n,r,o,s,a,l,c,d){let u=t+Xt,f;return e.firstCreatePass?(f=Su(e,u,4,s||null,a||null),Ug()&&ZA(e,i,f,io(e.consts,c),LC),nP(e,f)):f=e.data[u],gO(f,i,e,t,n,r,o,l),nu(f)&&k0(e,i,f),c!=null&&qh(i,f,d),f}function zh(i,e,t,n,r,o,s,a,l,c,d){let u=t+Xt,f;if(e.firstCreatePass){if(f=Su(e,u,4,s||null,a||null),c!=null){let h=io(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 gO(f,i,e,t,n,r,o,l),c!=null&&qh(i,f,d),f}function Ja(i,e,t,n,r,o,s,a){let l=pt(),c=In(),d=io(c.consts,o);return _6(l,c,i,e,t,n,r,d,void 0,s,a),Ja}var vO=bO;function bO(i,e,t,n){return ta(!0),e[Zt].createComment("")}function S6(i,e,t,n){let r=!E0(e,t);ta(r);let o=e[Hi]?.data[wP]?.[n]??null;if(o!==null&&t.tView!==null&&t.tView.ssrId===null&&(t.tView.ssrId=o),r)return bO(i,e);let s=e[Hi],a=L0(s,i,e,t);w0(s,n,a);let l=vC(s,n);return U0(l,a)}function yO(){vO=S6}var Cr=(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})(Cr||{}),U2=0,C6=1,Kn=(function(i){return i[i.Placeholder=0]="Placeholder",i[i.Loading=1]="Loading",i[i.Complete=2]="Complete",i[i.Error=3]="Error",i})(Kn||{});var w6=0,Kh=1;var E6=4,M6=5;var T6=7,uu=8,D6=9,qC=(function(i){return i[i.Manual=0]="Manual",i[i.Playthrough=1]="Playthrough",i})(qC||{});function r0(i,e){let t=P6(i),n=e[t];if(n!==null){for(let r of n)r();e[t]=null}}function I6(i){r0(1,i),r0(0,i),r0(2,i)}function P6(i){let e=E6;return i===1?e=M6:i===2&&(e=D6),e}function xO(i){return i+1}function wu(i,e){let t=i[tt],n=xO(e.index);return i[n]}function Zh(i,e){let t=xO(e.index);return i.data[t]}function A6(i,e,t){let n=e[tt],r=Zh(n,t);switch(i){case Kn.Complete:return r.primaryTmplIndex;case Kn.Loading:return r.loadingTmplIndex;case Kn.Error:return r.errorTmplIndex;case Kn.Placeholder:return r.placeholderTmplIndex;default:return null}}function B2(i,e){return e===Kn.Placeholder?i.placeholderBlockConfig?.[U2]??null:e===Kn.Loading?i.loadingBlockConfig?.[U2]??null:null}function O6(i){return i.loadingBlockConfig?.[C6]??null}function z2(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 R6(i,e){let t=e.primaryTmplIndex+Xt;return iu(i,t)}var k6=(()=>{class i{cachedInjectors=new Map;getOrCreateInjector(t,n,r,o){if(!this.cachedInjectors.has(t)){let s=r.length>0?YC(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 _O=new qe("");function f1(i,e,t){return i.get(k6).getOrCreateInjector(e,i,t,"")}function F6(i,e,t){if(i instanceof du){let r=i.injector,o=i.parentInjector,s=f1(o,e,t);return new du(r,s)}let n=i.get(Ti);if(n!==i){let r=f1(n,e,t);return new du(i,r)}return f1(i,e,t)}function Cc(i,e,t,n=!1){let r=t[Vn],o=r[tt];if($a(r))return;let s=wu(r,e),a=s[Kh],l=s[T6];if(!(l!==null&&i<l)&&V2(a,i)&&V2(s[w6]??-1,i)){let c=Zh(o,e),u=!n&&!0&&(O6(c)!==null||B2(c,Kn.Loading)!==null||B2(c,Kn.Placeholder))?U6:L6;try{u(i,s,t,e,r)}catch(f){zC(r,f)}}}function N6(i,e){let t=i[To]?.findIndex(r=>r.data[DP]===e[Kh])??-1;return{dehydratedView:t>-1?i[To][t]:null,dehydratedViewIx:t}}function L6(i,e,t,n,r){tn(Wt.DeferBlockStateStart);let o=A6(i,r,n);if(o!==null){e[Kh]=i;let s=r[tt],a=o+Xt,l=iu(s,a),c=0;HC(t,c);let d;if(i===Kn.Complete){let p=Zh(s,n),v=p.providers;v&&v.length>0&&(d=F6(r[yr],p,v))}let{dehydratedView:u,dehydratedViewIx:f}=N6(t,e),h=xu(r,l,null,{injector:d,dehydratedView:u});if(_u(t,h,c,Tc(l,u)),F0(h,2),f>-1&&t[To]?.splice(f,1),(i===Kn.Complete||i===Kn.Error)&&Array.isArray(e[uu])){for(let p of e[uu])p();e[uu]=null}}tn(Wt.DeferBlockStateEnd)}function V2(i,e){return i<e}function G2(i,e,t){i.loadingPromise.then(()=>{i.loadingState===Cr.COMPLETE?Cc(Kn.Complete,e,t):i.loadingState===Cr.FAILED&&Cc(Kn.Error,e,t)})}var U6=null;function KC(i){return typeof i=="function"&&i[Qn]!==void 0}function ZC(i){return KC(i)&&typeof i.set=="function"}var JC=new qe("");function Eu(i){return!!i&&typeof i.then=="function"}function QC(i){return!!i&&typeof i.subscribe=="function"}var SO=new qe("");var ew=(()=>{class i{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,n)=>{this.resolve=t,this.reject=n});appInits=Q(SO,{optional:!0})??[];injector=Q(Di);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=Qd(this.injector,r);if(Eu(o))t.push(o);else if(QC(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})(),Mu=new qe("");function CO(){G_(()=>{let i="";throw new Ke(600,i)})}function wO(i){return i.isBoundToModule}var B6=10;var Dr=(()=>{class i{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=Q(na);afterRenderManager=Q(RC);zonelessEnabled=Q(Ih);rootEffectScheduler=Q($g);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Eo;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=Q(Ka);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(rr(t=>!t))}constructor(){Q(vs,{optional:!0})}whenStable(){let t;return new Promise(n=>{t=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{t.unsubscribe()})}_injector=Q(Ti);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,n){return this.bootstrapImpl(t,n)}bootstrapImpl(t,n,r=Di.NULL){return this._injector.get(or).run(()=>{tn(Wt.BootstrapComponentStart);let s=t instanceof V0;if(!this._injector.get(ew).done){let p="";throw new Ke(405,p)}let l;s?l=t:l=this._injector.get(G0).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=wO(l)?void 0:this._injector.get(Uh),d=n||l.selector,u=l.create(r,[],d,c),f=u.location.nativeElement,h=u.injector.get(JC,null);return h?.registerApplication(f),u.onDestroy(()=>{this.detachView(u.hostView),Oh(this.components,u),h?.unregisterApplication(f)}),this._loadComponent(u),tn(Wt.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){tn(Wt.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(P0.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw tn(Wt.ChangeDetectionEnd),new Ke(101,!1);let t=lt(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,lt(t),this.afterTick.next(),tn(Wt.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Dc,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<B6;){tn(Wt.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{tn(Wt.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&&!Mh(r))continue;let o=n&&!this.zonelessEnabled?0:1;FA(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})=>Mh(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;Oh(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(Mu,[]).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),()=>Oh(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new Ke(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 Oh(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function EO(){let i,e;return{promise:new Promise((n,r)=>{i=n,e=r}),resolve:i,reject:e}}function MO(i,e,t){let n=e[yr],r=e[tt];if(i.loadingState!==Cr.NOT_STARTED)return i.loadingPromise??Promise.resolve();let o=wu(e,t),s=R6(r,i);i.loadingState=Cr.IN_PROGRESS,r0(1,o);let a=i.dependencyResolverFn,l=n.get(au).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=Ks(p)||Dg(p);if(v)u.push(v);else{let g=CS(p);g&&f.push(g)}}else{d=!0;break}if(d){if(i.loadingState=Cr.FAILED,i.errorTmplIndex===null){let p=new Ke(-750,!1);zC(e,p)}}else{i.loadingState=Cr.COMPLETE;let h=s.tView;if(u.length>0){h.directiveRegistry=z2(h.directiveRegistry,u);let p=u.map(g=>g.type),v=Rg(!1,...p);i.providers=v}f.length>0&&(h.pipeRegistry=z2(h.pipeRegistry,f))}}),i.loadingPromise.finally(()=>{i.loadingPromise=null,l()})):(i.loadingPromise=Promise.resolve().then(()=>{i.loadingPromise=null,i.loadingState=Cr.COMPLETE,l()}),i.loadingPromise)}function z6(i,e){return e[yr].get(_O,null,{optional:!0})?.behavior!==qC.Manual}function V6(i,e,t){let n=e[tt],r=e[t.index];if(!z6(i,e))return;let o=wu(e,t),s=Zh(n,t);switch(I6(o),s.loadingState){case Cr.NOT_STARTED:Cc(Kn.Loading,t,r),MO(s,e,t),s.loadingState===Cr.IN_PROGRESS&&G2(s,t,r);break;case Cr.IN_PROGRESS:Cc(Kn.Loading,t,r),G2(s,t,r);break;case Cr.COMPLETE:Cc(Kn.Complete,t,r);break;case Cr.FAILED:Cc(Kn.Error,t,r);break;default:}}async function TO(i,e,t){let n=i.get(C0);if(n.hydrating.has(e))return;let{parentBlockPromise:o,hydrationQueue:s}=Tz(e,i);if(s.length===0)return;o!==null&&s.shift(),j6(n,s),o!==null&&await o;let a=s[0];n.has(a)?await H2(i,s,t):n.awaitParentBlock(a,async()=>await H2(i,s,t))}async function H2(i,e,t){let n=i.get(C0),r=n.hydrating,o=i.get(Ka),s=o.add();for(let l=0;l<e.length;l++){let c=e[l],d=n.get(c);if(d!=null){if(await $6(d),await W6(i),G6(d)){yG(d),j2(e.slice(l),n);break}r.get(c).resolve()}else{H6(l,e,n),j2(e.slice(l),n);break}}let a=e[e.length-1];await r.get(a)?.promise,o.remove(s),t&&t(e),xG(n.get(a),e,n,i.get(Dr))}function G6(i){return wu(i.lView,i.tNode)[Kh]===Kn.Error}function H6(i,e,t){let n=i-1,r=n>-1?t.get(e[n]):null;r&&z0(r.lContainer)}function j2(i,e){let t=e.hydrating;for(let n in i)t.get(n)?.reject();e.cleanup(i)}function j6(i,e){for(let t of e)i.hydrating.set(t,EO())}function W6(i){return new Promise(e=>A0(e,{injector:i}))}async function $6(i){let{tNode:e,lView:t}=i,n=wu(t,e);return new Promise(r=>{X6(n,r),V6(2,t,e)})}function X6(i,e){Array.isArray(i[uu])||(i[uu]=[]),i[uu].push(e)}function Pn(i,e,t,n){let r=pt(),o=Xa();if(wr(r,o,e)){let s=In(),a=Th();VV(a,r,i,e,t,n)}return Pn}function Qa(){return pt()[ci][kn]}var K1=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 h1(i,e,t,n,r){return i===t&&Object.is(e,n)?1:Object.is(r(i,e),r(t,n))?-1:0}function Y6(i,e,t,n){let r,o,s=0,a=i.length-1,l=void 0;if(Array.isArray(e)){lt(n);let c=e.length-1;for(lt(null);s<=a&&s<=c;){let d=i.at(s),u=e[s],f=h1(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=h1(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 v0,o??=$2(i,s,a,t),Z1(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;)W2(i,r,t,s,e[s]),s++}else if(e!=null){lt(n);let c=e[Symbol.iterator]();lt(null);let d=c.next();for(;!d.done&&s<=a;){let u=i.at(s),f=d.value,h=h1(s,u,s,f,t);if(h!==0)h<0&&i.updateValue(s,f),s++,d=c.next();else{r??=new v0,o??=$2(i,s,a,t);let p=t(s,f);if(Z1(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;)W2(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 Z1(i,e,t,n){return e!==void 0&&e.has(n)?(i.attach(t,e.get(n)),e.delete(n),!0):!1}function W2(i,e,t,n,r){if(Z1(i,e,n,t(n,r)))i.updateValue(n,r);else{let o=i.create(n,r);i.attach(n,o)}}function $2(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 v0=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 pe(i,e,t,n,r,o,s,a){Ro("NgControlFlow");let l=pt(),c=In(),d=io(c.consts,o);return zh(l,c,i,e,t,n,r,d,256,s,a),tw}function tw(i,e,t,n,r,o,s,a){Ro("NgControlFlow");let l=pt(),c=In(),d=io(c.consts,o);return zh(l,c,i,e,t,n,r,d,512,s,a),tw}function me(i,e){Ro("NgControlFlow");let t=pt(),n=Xa(),r=t[n]!==Mr?t[n]:-1,o=r!==-1?b0(t,Xt+r):void 0,s=0;if(wr(t,n,i)){let a=lt(null);try{if(o!==void 0&&HC(o,s),i!==-1){let l=Xt+i,c=b0(t,l),d=tC(t[tt],l),u=XA(c,d,t),f=xu(t,d,e,{dehydratedView:u});_u(c,f,s,Tc(d,u))}}finally{lt(a)}}else if(o!==void 0){let a=zA(o,s);a!==void 0&&(a[kn]=e)}}var J1=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Dn}};function Tu(i){return i}function nw(i,e){return e}var Q1=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Dt(i,e,t,n,r,o,s,a,l,c,d,u,f){Ro("NgControlFlow");let h=pt(),p=In(),v=l!==void 0,g=pt(),m=a?s.bind(g[ci][kn]):s,b=new Q1(v,m);g[Xt+i]=b,zh(h,p,i+1,e,t,n,r,io(p.consts,o),256),v&&zh(h,p,i+2,l,c,d,u,io(p.consts,f),512)}var eC=class extends K1{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-Dn}at(e){return this.getLView(e)[kn].$implicit}attach(e,t){let n=t[Hi];this.needsIndexUpdate||=e!==this.length,_u(this.lContainer,t,e,Tc(this.templateTNode,n)),q6(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,K6(this.lContainer,e),Z6(this.lContainer,e)}create(e,t){let n=Lh(this.lContainer,this.templateTNode.tView.ssrId);return xu(this.hostLView,this.templateTNode,new J1(this.lContainer,t,e),{dehydratedView:n})}destroy(e){O0(e[tt],e)}updateValue(e,t){this.getLView(e)[kn].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[kn].$index=e}getLView(e){return J6(this.lContainer,e)}};function It(i){let e=lt(null),t=ea();try{let n=pt(),r=n[tt],o=n[t],s=t+1,a=b0(n,s);if(o.liveCollection===void 0){let c=tC(r,s);o.liveCollection=new eC(a,n,c)}else o.liveCollection.reset();let l=o.liveCollection;if(Y6(l,i,o.trackByFn,e),l.updateIndexes(),o.hasEmptyBlock){let c=Xa(),d=l.length===0;if(wr(n,c,d)){let u=t+2,f=b0(n,u);if(d){let h=tC(r,u),p=XA(f,h,n),v=xu(n,h,void 0,{dehydratedView:p});_u(f,v,0,Tc(h,p))}else r.firstUpdatePass&&B0(f),HC(f,0)}}}finally{lt(e)}}function b0(i,e){return i[e]}function q6(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t],r=n?n[Wa]:void 0;if(n&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=n[yr];yV(o,r),Mc.delete(n[Qs]),r.detachedLeaveAnimationFns=void 0}}function K6(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t],r=n?n[Wa]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function Z6(i,e){return Nh(i,e)}function J6(i,e){return zA(i,e)}function tC(i,e){return iu(i,e)}function ne(i,e,t){let n=pt(),r=Xa();if(wr(n,r,e)){let o=In(),s=Th();DA(s,n,i,e,n[Zt],t)}return ne}function nC(i,e,t,n,r){VC(e,i,t,r?"class":"style",n)}function w(i,e,t,n){let r=pt(),o=r[tt],s=i+Xt,a=o.firstCreatePass?WC(s,r,2,e,LC,Ug(),t,n):o.data[s];if(fs(a)){let l=r[Mo].tracingService;if(l&&l.componentCreate){let c=o.data[a.directiveStart+a.componentOffset];return l.componentCreate(nO(c),()=>(X2(i,e,r,a,n),w))}}return X2(i,e,r,a,n),w}function X2(i,e,t,n,r){if(UC(n,t,i,e,iw),nu(n)){let o=t[tt];k0(o,t,n),bC(o,n,t)}r!=null&&qh(t,n)}function T(){let i=In(),e=xi(),t=BC(e);return i.firstCreatePass&&$C(i,t),jS(t)&&WS(),HS(),t.classesWithoutHost!=null&&q5(t)&&nC(i,t,pt(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&K5(t)&&nC(i,t,pt(),t.stylesWithoutHost,!1),T}function Y(i,e,t,n){return w(i,e,t,n),T(),Y}function re(i,e,t,n){let r=pt(),o=r[tt],s=i+Xt,a=o.firstCreatePass?FG(s,o,2,e,t,n):o.data[s];return UC(a,r,i,e,iw),n!=null&&qh(r,a),re}function he(){let i=xi(),e=BC(i);return jS(e)&&WS(),HS(),he}function gt(i,e,t,n){return re(i,e,t,n),he(),gt}var iw=(i,e,t,n,r)=>(ta(!0),wC(e[Zt],n,QS()));function Q6(i,e,t,n,r){let o=!E0(e,t);if(ta(o),o)return wC(e[Zt],n,QS());let s=e[Hi],a=L0(s,i,e,t);return YP(s,r)&&w0(s,r,a.nextSibling),s&&(pP(t)||mP(a))&&fs(t)&&(GI(t),aA(a)),a}function DO(){iw=Q6}function rw(i,e,t){let n=pt(),r=n[tt],o=i+Xt,s=r.firstCreatePass?WC(o,n,8,"ng-container",LC,Ug(),e,t):r.data[o];if(UC(s,n,i,"ng-container",IO),nu(s)){let a=n[tt];k0(a,n,s),bC(a,s,n)}return t!=null&&qh(n,s),rw}function ow(){let i=In(),e=xi(),t=BC(e);return i.firstCreatePass&&$C(i,t),ow}function Ir(i,e,t){return rw(i,e,t),ow(),Ir}var IO=(i,e,t,n,r)=>(ta(!0),oA(e[Zt],""));function eH(i,e,t,n,r){let o,s=!E0(e,t);if(ta(s),s)return oA(e[Zt],"");let a=e[Hi],l=L0(a,i,e,t),c=Ez(a,r);return w0(a,r,l),o=U0(c,l),o}function PO(){IO=eH}function Ne(){return pt()}function di(i,e,t){let n=pt(),r=Xa();if(wr(n,r,e)){let o=In(),s=Th();IA(s,n,i,e,n[Zt],t)}return di}var Ph=void 0;function tH(i){let e=Math.floor(Math.abs(i)),t=i.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var nH=["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"]],Ph,[["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"]],Ph,[["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}",Ph,Ph,Ph],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",tH],p1={};function W0(i){let e=iH(i),t=Y2(e);if(t)return t;let n=e.split("-")[0];if(t=Y2(n),t)return t;if(n==="en")return nH;throw new Ke(701,!1)}function Y2(i){return i in p1||(p1[i]=Jr.ng&&Jr.ng.common&&Jr.ng.common.locales&&Jr.ng.common.locales[i]),p1[i]}var Pc=(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})(Pc||{});function iH(i){return i.toLowerCase().replace(/_/g,"-")}var Jh="en-US";var rH=Jh;function AO(i){typeof i=="string"&&(rH=i.toLowerCase().replace(/_/g,"-"))}function ie(i,e,t){let n=pt(),r=In(),o=xi();return OO(r,n,n[Zt],o,i,e,t),ie}function Gn(i,e,t){let n=pt(),r=In(),o=xi();return(o.type&3||t)&&eO(o,r,n,t,n[Zt],i,e,i0(o,n,e)),Gn}function OO(i,e,t,n,r,o,s){let a=!0,l=null;if((n.type&3||s)&&(l??=i0(n,e,o),eO(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??=i0(n,e,o),k2(n,e,f,h,r,l)}if(c&&c.length)for(let u of c)l??=i0(n,e,o),k2(n,e,u,r,r,l)}}function M(i=1){return e2(i)}function oH(i,e){let t=null,n=rV(i);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(n===null?fA(i,o,!0):aV(n,o))return r}return t}function _i(i){let e=pt()[ci][Gi];if(!e.projection){let t=i?i.length:1,n=e.projection=MI(t,null),r=n.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=i?oH(o,i):0;s!==null&&(r[s]?r[s].projectionNext=o:n[s]=o,r[s]=o)}o=o.next}}}function Si(i,e=0,t,n,r,o){let s=pt(),a=In(),l=n?i+1:null;l!==null&&zh(s,a,l,n,r,o,null,t);let c=Su(a,Xt+i,16,null,t||null);c.projection===null&&(c.projection=e),YS();let u=!s[Hi]||Bg();s[ci][Gi].projection[c.projection]===null&&l!==null?sH(s,a,l):u&&!$h(c)&&PV(a,s,c)}function sH(i,e,t){let n=Xt+t,r=e.data[n],o=i[n],s=Lh(o,r.tView.ssrId),a=xu(i,r,void 0,{dehydratedView:s});_u(o,a,0,Tc(r,s))}function el(i,e,t,n){return l6(i,r6(e,t,n)),el}function Ac(i=1){Vg(KI()+i)}function ro(i){let e=jI();return Fg(e,Xt+i)}function Zg(i,e){return i<<17|e<<2}function Ic(i){return i>>17&32767}function aH(i){return(i&2)==2}function lH(i,e){return i&131071|e<<17}function iC(i){return i|2}function gu(i){return(i&131068)>>2}function m1(i,e){return i&-131069|e<<2}function cH(i){return(i&1)===1}function rC(i){return i|1}function dH(i,e,t,n,r,o){let s=o?e.classBindings:e.styleBindings,a=Ic(s),l=gu(s);i[n]=t;let c=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||Zd(u,d)>0)&&(c=!0)}else d=t;if(r)if(l!==0){let f=Ic(i[a+1]);i[n+1]=Zg(f,a),f!==0&&(i[f+1]=m1(i[f+1],n)),i[a+1]=lH(i[a+1],n)}else i[n+1]=Zg(a,0),a!==0&&(i[a+1]=m1(i[a+1],n)),a=n;else i[n+1]=Zg(l,0),a===0?a=n:i[l+1]=m1(i[l+1],n),l=n;c&&(i[n+1]=iC(i[n+1])),q2(i,d,n,!0),q2(i,d,n,!1),uH(e,d,i,n,o),s=Zg(a,l),o?e.classBindings=s:e.styleBindings=s}function uH(i,e,t,n,r){let o=r?i.residualClasses:i.residualStyles;o!=null&&typeof e=="string"&&Zd(o,e)>=0&&(t[n+1]=rC(t[n+1]))}function q2(i,e,t,n){let r=i[t+1],o=e===null,s=n?Ic(r):gu(r),a=!1;for(;s!==0&&(a===!1||o);){let l=i[s],c=i[s+1];fH(l,e)&&(a=!0,i[s+1]=n?rC(c):iC(c)),s=n?Ic(c):gu(c)}a&&(i[t+1]=n?iC(r):rC(r))}function fH(i,e){return i===null||e==null||(Array.isArray(i)?i[1]:i)===e?!0:Array.isArray(i)&&typeof e=="string"?Zd(i,e)>=0:!1}var Io={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function hH(i){return i.substring(Io.key,Io.keyEnd)}function pH(i){return mH(i),RO(i,kO(i,0,Io.textEnd))}function RO(i,e){let t=Io.textEnd;return t===e?-1:(e=Io.keyEnd=gH(i,Io.key=e,t),kO(i,e,t))}function mH(i){Io.key=0,Io.keyEnd=0,Io.value=0,Io.valueEnd=0,Io.textEnd=i.length}function kO(i,e,t){for(;e<t&&i.charCodeAt(e)<=32;)e++;return e}function gH(i,e,t){for(;e<t&&i.charCodeAt(e)>32;)e++;return e}function oo(i,e,t){return FO(i,e,t,!1),oo}function ht(i,e){return FO(i,e,null,!0),ht}function so(i){bH(wH,vH,i,!0)}function vH(i,e){for(let t=pH(e);t>=0;t=RO(e,t))Ag(i,hH(e),!0)}function FO(i,e,t,n){let r=pt(),o=In(),s=KS(2);if(o.firstUpdatePass&&LO(o,i,s,n),e!==Mr&&wr(r,s,e)){let a=o.data[ea()];UO(o,a,r,r[Zt],i,r[s+1]=MH(e,t),n,s)}}function bH(i,e,t,n){let r=In(),o=KS(2);r.firstUpdatePass&&LO(r,null,o,n);let s=pt();if(t!==Mr&&wr(s,o,t)){let a=r.data[ea()];if(BO(a,n)&&!NO(r,o)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=Eg(l,t||"")),nC(r,a,s,t,n)}else EH(r,a,s,s[Zt],s[o+1],s[o+1]=CH(i,e,t),n,o)}}function NO(i,e){return e>=i.expandoStartIndex}function LO(i,e,t,n){let r=i.data;if(r[t+1]===null){let o=r[ea()],s=NO(i,t);BO(o,n)&&e===null&&!s&&(e=!1),e=yH(r,o,e,n),dH(r,o,e,t,s,n)}}function yH(i,e,t,n){let r=qI(i),o=n?e.residualClasses:e.residualStyles;if(r===null)(n?e.classBindings:e.styleBindings)===0&&(t=g1(null,i,e,t,n),t=Vh(t,e.attrs,n),o=null);else{let s=e.directiveStylingLast;if(s===-1||i[s]!==r)if(t=g1(r,i,e,t,n),o===null){let l=xH(i,e,n);l!==void 0&&Array.isArray(l)&&(l=g1(null,i,e,l[1],n),l=Vh(l,e.attrs,n),_H(i,e,n,l))}else o=SH(i,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),t}function xH(i,e,t){let n=t?e.classBindings:e.styleBindings;if(gu(n)!==0)return i[Ic(n)]}function _H(i,e,t,n){let r=t?e.classBindings:e.styleBindings;i[Ic(r)]=n}function SH(i,e,t){let n,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=i[o].hostAttrs;n=Vh(n,s,t)}return Vh(n,e.attrs,t)}function g1(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=Vh(n,o.hostAttrs,r),o!==i);)a++;return i!==null&&(t.directiveStylingLast=a),n}function Vh(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]),Ag(i,s,t?!0:e[++o]))}return i===void 0?null:i}function CH(i,e,t){if(t==null||t==="")return Mi;let n=[],r=Ao(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 wH(i,e,t){let n=String(e);n!==""&&!n.includes(" ")&&Ag(i,n,t)}function EH(i,e,t,n,r,o,s,a){r===Mr&&(r=Mi);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&&UO(i,e,t,n,p,v,s,a),d=l<r.length?r[l]:null,u=c<o.length?o[c]:null}}function UO(i,e,t,n,r,o,s,a){if(!(e.type&3))return;let l=i.data,c=l[a+1],d=cH(c)?K2(l,e,t,r,gu(c),s):void 0;if(!y0(d)){y0(o)||aH(c)&&(o=K2(l,null,t,r,a,s));let u=NS(ea(),t);OV(n,s,u,r,o)}}function K2(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===Mr&&(f=u?Mi:void 0);let h=u?Og(f,n):d===n?f:void 0;if(c&&!y0(h)&&(h=Og(l,n)),y0(h)&&(a=h,s))return a;let p=i[r+1];r=s?Ic(p):gu(p)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=Og(l,n))}return a}function y0(i){return i!==void 0}function MH(i,e){return i==null||i===""||(typeof e=="string"?i=i+e:typeof i=="object"&&(i=wg(Ao(i)))),i}function BO(i,e){return(i.flags&(e?8:16))!==0}function k(i,e=""){let t=pt(),n=In(),r=i+Xt,o=n.firstCreatePass?Su(n,r,1,e,null):n.data[r],s=zO(n,t,o,e);t[r]=s,jg()&&FC(n,t,s,o),ru(o,!1)}var zO=(i,e,t,n)=>(ta(!0),rA(e[Zt],n));function TH(i,e,t,n){let r=!E0(e,t);if(ta(r),r)return rA(e[Zt],n);let o=e[Hi];return L0(o,i,e,t)}function VO(){zO=TH}function GO(i,e,t,n=""){return wr(i,Xa(),t)?e+Sh(t)+n:Mr}function Ye(i){return zt("",i),Ye}function zt(i,e,t){let n=pt(),r=GO(n,i,e,t);return r!==Mr&&DH(n,ea(),r),zt}function DH(i,e,t){let n=NS(e,i);Kz(i[Zt],n,t)}function Oc(i,e,t){ZC(e)&&(e=e());let n=pt(),r=Xa();if(wr(n,r,e)){let o=In(),s=Th();DA(s,n,i,e,n[Zt],t)}return Oc}function bs(i,e){let t=ZC(i);return t&&i.set(e),t}function Qh(i,e){let t=pt(),n=In(),r=xi();return OO(n,t,t[Zt],r,i,e),Qh}function $0(i,e,t=""){return GO(pt(),i,e,t)}function Z2(i,e,t){let n=In();n.firstCreatePass&&HO(e,n.data,n.blueprint,hs(i),t)}function HO(i,e,t,n,r){if(i=yi(i),Array.isArray(i))for(let o=0;o<i.length;o++)HO(i[o],e,t,n,r);else{let o=In(),s=pt(),a=xi(),l=pc(i)?i:yi(i.provide),c=AS(i),d=a.providerIndexes&1048575,u=a.directiveStart,f=a.providerIndexes>>20;if(pc(i)||!i.multi){let h=new Ec(c,r,$t,null),p=b1(l,e,r?d:d+f,u);p===-1?(x1(c0(a,s),o,l),v1(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=b1(l,e,d+f,u),p=b1(l,e,d,d+f),v=h>=0&&t[h],g=p>=0&&t[p];if(r&&!g||!r&&!v){x1(c0(a,s),o,l);let m=AH(r?PH:IH,t.length,r,n,c,i);!r&&g&&(t[p].providerFactory=m),v1(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=jO(t[r?p:h],c,!r&&n);v1(o,i,h>-1?h:p,m)}!r&&n&&g&&t[p].componentProviders++}}}function v1(i,e,t,n){let r=pc(e),o=OI(e);if(r||o){let l=(o?yi(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 jO(i,e,t){return t&&i.componentProviders++,i.multi.push(e)-1}function b1(i,e,t,n){for(let r=t;r<n;r++)if(e[r]===i)return r;return-1}function IH(i,e,t,n,r){return oC(this.multi,[])}function PH(i,e,t,n,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=Rh(n,n[tt],this.providerFactory.index,r);s=l.slice(0,a),oC(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],oC(o,s);return s}function oC(i,e){for(let t=0;t<i.length;t++){let n=i[t];e.push(n())}return e}function AH(i,e,t,n,r,o){let s=new Ec(i,t,$t,null);return s.multi=[],s.index=e,s.componentProviders=0,jO(s,r,n&&!t),s}function ao(i,e){return t=>{t.providersResolver=(n,r)=>Z2(n,r?r(i):i,!1),e&&(t.viewProvidersResolver=(n,r)=>Z2(n,r?r(e):e,!0))}}function sw(i,e){let t=ou()+i,n=pt();return n[t]===Mr?H0(n,t,e()):NG(n,t)}function ys(i,e,t){return OH(pt(),ou(),i,e,t)}function X0(i,e,t,n){return WO(pt(),ou(),i,e,t,n)}function aw(i,e){let t=i[e];return t===Mr?void 0:t}function OH(i,e,t,n,r,o){let s=e+t;return wr(i,s,r)?H0(i,s+1,o?n.call(o,r):n(r)):aw(i,s+1)}function WO(i,e,t,n,r,o,s){let a=e+t;return QA(i,a,r,o)?H0(i,a+2,s?n.call(s,r,o):n(r,o)):aw(i,a+2)}function RH(i,e,t,n,r,o,s,a){let l=e+t;return LG(i,l,r,o,s)?H0(i,l+3,a?n.call(a,r,o,s):n(r,o,s)):aw(i,l+3)}function Ii(i,e){let t=In(),n,r=i+Xt;t.firstCreatePass?(n=kH(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=za(n.type,!0)),s,a=Bi($t);try{let l=l0(!1),c=o();return l0(l),LS(t,pt(),r,c),c}finally{Bi(a)}}function kH(i,e){if(e)for(let t=e.length-1;t>=0;t--){let n=e[t];if(i===n.name)return n}}function Wi(i,e,t,n){let r=i+Xt,o=pt(),s=Fg(o,r);return $O(o,r)?WO(o,ou(),e,s.transform,t,n,s):s.transform(t,n)}function lw(i,e,t,n,r){let o=i+Xt,s=pt(),a=Fg(s,o);return $O(s,o)?RH(s,ou(),e,a.transform,t,n,r,a):a.transform(t,n,r)}function $O(i,e){return i[tt].data[e].pure}function tl(i,e){return N0(i,e)}var XO=(()=>{class i{applicationErrorHandler=Q(na);appRef=Q(Dr);taskService=Q(Ka);ngZone=Q(or);zonelessEnabled=Q(Ih);tracing=Q(vs,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ui;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(xh):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(Q(r1,{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?o2:e1;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(xh+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 YO(){return[{provide:ls,useExisting:XO},{provide:or,useClass:_h},{provide:Ih,useValue:!0}]}function FH(){return typeof $localize<"u"&&$localize.locale||Jh}var ep=new qe("",{factory:()=>Q(ep,{optional:!0,skipSelf:!0})||FH()});var tp=class{destroyed=!1;listeners=null;errorHandler=Q(Zr,{optional:!0});destroyRef=Q(sr);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new Ke(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(qs(953,!1));return}if(this.listeners===null)return;let t=lt(null);try{for(let n of this.listeners)try{n(e)}catch(r){this.errorHandler?.handleError(r)}}finally{lt(t)}}};function gn(i){return mI(i)}function De(i,e){return uh(i,e?.equal)}var hw={JSACTION:"__jsaction",OWNER:"__owner"},JO={};function NH(i){return i[hw.JSACTION]}function qO(i,e){i[hw.JSACTION]=e}function LH(i){return JO[i]}function UH(i,e){JO[i]=e}var ut={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"},BH=[ut.MOUSEENTER,ut.MOUSELEAVE,"pointerenter","pointerleave"],efe=[ut.CLICK,ut.DBLCLICK,ut.FOCUSIN,ut.FOCUSOUT,ut.KEYDOWN,ut.KEYUP,ut.KEYPRESS,ut.MOUSEOVER,ut.MOUSEOUT,ut.SUBMIT,ut.TOUCHSTART,ut.TOUCHEND,ut.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"],zH=[ut.FOCUS,ut.BLUR,ut.ERROR,ut.LOAD,ut.TOGGLE],pw=i=>zH.indexOf(i)>=0;function VH(i){return i===ut.MOUSEENTER?ut.MOUSEOVER:i===ut.MOUSELEAVE?ut.MOUSEOUT:i===ut.POINTERENTER?ut.POINTEROVER:i===ut.POINTERLEAVE?ut.POINTEROUT:i}function GH(i,e,t,n){let r=!1;pw(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 HH(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 jH(i){i.preventDefault?i.preventDefault():i.returnValue=!1}var KO=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function WH(i){return i.which===2||i.which==null&&i.button===4}function $H(i){return KO&&i.metaKey||!KO&&i.ctrlKey||WH(i)||i.shiftKey}function XH(i,e,t){let n=i.relatedTarget;return(i.type===ut.MOUSEOVER&&e===ut.MOUSEENTER||i.type===ut.MOUSEOUT&&e===ut.MOUSELEAVE||i.type===ut.POINTEROVER&&e===ut.POINTERENTER||i.type===ut.POINTEROUT&&e===ut.POINTERLEAVE)&&(!n||n!==t&&!t.contains(n))}function YH(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===ut.MOUSEOVER?t.type=ut.MOUSEENTER:i.type===ut.MOUSEOUT?t.type=ut.MOUSELEAVE:i.type===ut.POINTEROVER?t.type=ut.POINTERENTER:t.type=ut.POINTERLEAVE,t.target=t.srcElement=e,t.bubbles=!1,t._originalEvent=i,t}var qH=typeof navigator<"u"&&/iPhone|iPad|iPod/.test(navigator.userAgent),Z0=class{element;handlerInfos=[];constructor(e){this.element=e}addEventListener(e,t,n){qH&&(this.element.style.cursor="pointer"),this.handlerInfos.push(GH(this.element,e,t(this.element),n))}cleanUp(){for(let e=0;e<this.handlerInfos.length;e++)HH(this.element,this.handlerInfos[e]);this.handlerInfos=[]}},KH={NAMESPACE_ACTION_SEPARATOR:".",EVENT_ACTION_SEPARATOR:":"};function nl(i){return i.eventType}function mw(i,e){i.eventType=e}function q0(i){return i.event}function QO(i,e){i.event=e}function eR(i){return i.targetElement}function tR(i,e){i.targetElement=e}function nR(i){return i.eic}function ZH(i,e){i.eic=e}function JH(i){return i.timeStamp}function QH(i,e){i.timeStamp=e}function K0(i){return i.eia}function iR(i,e,t){i.eia=[e,t]}function cw(i){i.eia=void 0}function Y0(i){return i[1]}function e8(i){return i.eirp}function rR(i,e){i.eirp=e}function oR(i){return i.eir}function sR(i,e){i.eir=e}function aR(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 t8(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 dw=class i{eventInfo;constructor(e){this.eventInfo=e}getEventType(){return nl(this.eventInfo)}setEventType(e){mw(this.eventInfo,e)}getEvent(){return q0(this.eventInfo)}setEvent(e){QO(this.eventInfo,e)}getTargetElement(){return eR(this.eventInfo)}setTargetElement(e){tR(this.eventInfo,e)}getContainer(){return nR(this.eventInfo)}setContainer(e){ZH(this.eventInfo,e)}getTimestamp(){return JH(this.eventInfo)}setTimestamp(e){QH(this.eventInfo,e)}getAction(){let e=K0(this.eventInfo);if(e)return{name:e[0],element:e[1]}}setAction(e){if(!e){cw(this.eventInfo);return}iR(this.eventInfo,e.name,e.element)}getIsReplay(){return e8(this.eventInfo)}setIsReplay(e){rR(this.eventInfo,e)}getResolved(){return oR(this.eventInfo)}setResolved(e){sR(this.eventInfo,e)}clone(){return new i(aR(this.eventInfo))}},n8={},i8=/\s*;\s*/,r8=ut.CLICK,uw=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&&nl(e)===ut.CLICK&&$H(q0(e))?mw(e,ut.CLICKMOD):this.a11yClickSupport&&this.updateEventInfoForA11yClick(e)}resolveAction(e){oR(e)||(this.populateAction(e,eR(e)),sR(e,!0))}resolveParentAction(e){let t=K0(e),n=t&&Y0(t);cw(e);let r=n&&this.getParentNode(n);r&&this.populateAction(e,r)}populateAction(e,t){let n=t;for(;n&&n!==nR(e)&&(n.nodeType===Node.ELEMENT_NODE&&this.populateActionOnElement(n,e),!K0(e));)n=this.getParentNode(n);let r=K0(e);if(r&&(this.a11yClickSupport&&this.preventDefaultForA11yClick(e),this.syntheticMouseEventSupport&&(nl(e)===ut.MOUSEENTER||nl(e)===ut.MOUSELEAVE||nl(e)===ut.POINTERENTER||nl(e)===ut.POINTERLEAVE)))if(XH(q0(e),nl(e),Y0(r))){let o=YH(q0(e),Y0(r));QO(e,o),tR(e,Y0(r))}else cw(e)}getParentNode(e){let t=e[hw.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[nl(t)];r!==void 0&&iR(t,r,e),this.a11yClickSupport&&this.populateClickOnlyAction(e,t,n)}parseActions(e){let t=NH(e);if(!t){let n=e.getAttribute(Xg.JSACTION);if(!n)t=n8,qO(e,t);else{if(t=LH(n),!t){t={};let r=n.split(i8);for(let o=0;o<r.length;o++){let s=r[o];if(!s)continue;let a=s.indexOf(KH.EVENT_ACTION_SEPARATOR),l=a!==-1,c=l?s.substr(0,a).trim():r8,d=l?s.substr(a+1).trim():s;t[c]=d}UH(n,t)}qO(e,t)}}return t}addA11yClickSupport(e,t,n){this.a11yClickSupport=!0,this.updateEventInfoForA11yClick=e,this.preventDefaultForA11yClick=t,this.populateClickOnlyAction=n}},lR=(function(i){return i[i.I_AM_THE_JSACTION_FRAMEWORK=0]="I_AM_THE_JSACTION_FRAMEWORK",i})(lR||{}),fw=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 dw(e);this.actionResolver?.resolveEventType(e),this.actionResolver?.resolveAction(e);let n=t.getAction();if(n&&o8(n.element,t)&&jH(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 o8(i,e){return i.tagName==="A"&&(e.getEventType()===ut.CLICK||e.getEventType()===ut.CLICKMOD)}var cR=Symbol.for("propagationStopped"),gw={REPLAY:101};var s8="`preventDefault` called during event replay.";var a8="`composedPath` called during event replay.",J0=class{dispatchDelegate;clickModSupport;actionResolver;dispatcher;constructor(e,t=!0){this.dispatchDelegate=e,this.clickModSupport=t,this.actionResolver=new uw({clickModSupport:t}),this.dispatcher=new fw(n=>{this.dispatchToDelegate(n)},{actionResolver:this.actionResolver})}dispatch(e){this.dispatcher.dispatch(e)}dispatchToDelegate(e){for(e.getIsReplay()&&d8(e),l8(e);e.getAction();){if(u8(e),pw(e.getEventType())&&e.getAction().element!==e.getTargetElement()||(this.dispatchDelegate(e.getEvent(),e.getAction().name),c8(e)))return;this.actionResolver.resolveParentAction(e.eventInfo)}}};function l8(i){let e=i.getEvent(),t=i.getEvent().stopPropagation.bind(e),n=()=>{e[cR]=!0,t()};Rc(e,"stopPropagation",n),Rc(e,"stopImmediatePropagation",n)}function c8(i){return!!i.getEvent()[cR]}function d8(i){let e=i.getEvent(),t=i.getTargetElement(),n=e.preventDefault.bind(e);Rc(e,"target",t),Rc(e,"eventPhase",gw.REPLAY),Rc(e,"preventDefault",()=>{throw n(),new Error(s8+"")}),Rc(e,"composedPath",()=>{throw new Error(a8+"")})}function u8(i){let e=i.getEvent(),t=i.getAction()?.element;t&&Rc(e,"currentTarget",t,{configurable:!0})}function Rc(i,e,t,{configurable:n=!1}={}){Object.defineProperty(i,e,{value:t,configurable:n})}function dR(i,e){i.ecrd(t=>{e.dispatch(t)},lR.I_AM_THE_JSACTION_FRAMEWORK)}function f8(i){return i?.q??[]}function h8(i){i&&(ZO(i.c,i.et,i.h),ZO(i.c,i.etc,i.h,!0))}function ZO(i,e,t,n){for(let r=0;r<e.length;r++)i.removeEventListener(e[r],t,n)}var p8=!1,uR=(()=>{class i{static MOUSE_SPECIAL_SUPPORT=p8;containerManager;eventHandlers={};browserEventTypeToExtraEventTypes={};dispatcher=null;queuedEventInfos=[];constructor(t){this.containerManager=t}handleEvent(t,n,r){let o=t8(t,n,n.target,r,Date.now());this.handleEventInfo(o)}handleEventInfo(t){if(!this.dispatcher){rR(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&&BH.indexOf(t)>=0)return;let o=(a,l,c)=>{this.handleEvent(a,l,c)};this.eventHandlers[t]=o;let s=VH(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),h8(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=aR(r);mw(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 f8(e._ejsas?.[i])}function vw(i,e=window){e._ejsas&&(e._ejsas[i]=void 0)}var tv=Symbol("InputSignalNode#UNSET"),_R=ue(R({},Km),{transformFn:void 0,applyValueToInputSignal(i,e){sc(i,e)}});function SR(i,e){let t=Object.create(_R);t.value=i,t.transformFn=e?.transform;function n(){if(ic(t),t.value===tv){let r=null;throw new Ke(-950,r)}return t.value}return n[Qn]=t,n}function kt(i){return new tp}function hR(i,e){return SR(i,e)}function O8(i){return SR(tv,i)}var Me=(hR.required=O8,hR);function pR(i,e){return fO(e)}function R8(i,e){return hO(e)}var Du=(pR.required=R8,pR);function CR(i,e){let t=Object.create(_R),n=new tp;t.value=i;function r(){return ic(t),mR(t.value),t.value}return r[Qn]=t,r.asReadonly=Wg.bind(r),r.set=o=>{t.equal(t.value,o)||(sc(t,o),n.emit(o))},r.update=o=>{mR(t.value),r.set(o(t.value))},r.subscribe=n.subscribe.bind(n),r.destroyRef=n.destroyRef,r}function mR(i){if(i===tv)throw new Ke(952,!1)}function gR(i,e){return CR(i,e)}function k8(i){return CR(tv,i)}var xs=(gR.required=k8,gR);var bw=new qe(""),F8=new qe("");function np(i){return!i.moduleRef}function N8(i){let e=np(i)?i.r3Injector:i.moduleRef.injector,t=e.get(or);return t.run(()=>{np(i)?i.r3Injector.resolveInjectorInitializers():i.moduleRef.resolveInjectorInitializers();let n=e.get(na),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:n})}),np(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(()=>{Oh(i.allPlatformModules,i.moduleRef),r.unsubscribe(),s.delete(o)})}return U8(n,t,()=>{let o=e.get(Ka),s=o.add(),a=e.get(ew);return a.runInitializers(),a.donePromise.then(()=>{let l=e.get(ep,Jh);if(AO(l||Jh),!e.get(F8,!0))return np(i)?e.get(Dr):(i.allPlatformModules.push(i.moduleRef),i.moduleRef);if(np(i)){let d=e.get(Dr);return i.rootComponent!==void 0&&d.bootstrap(i.rootComponent),d}else return L8?.(i.moduleRef,i.allPlatformModules),i.moduleRef}).finally(()=>{o.remove(s)})})})}var L8;function U8(i,e,t){try{let n=t();return Eu(n)?n.catch(r=>{throw e.runOutsideAngular(()=>i(r)),r}):n}catch(n){throw e.runOutsideAngular(()=>i(n)),n}}var ev=null;function B8(i=[],e){return Di.create({name:e,providers:[{provide:wh,useValue:"platform"},{provide:bw,useValue:new Set([()=>ev=null])},...i]})}function z8(i=[]){if(ev)return ev;let e=B8(i);return ev=e,CO(),V8(e),e}function V8(i){let e=i.get(x0,null);Qd(i,()=>{e?.forEach(t=>t())})}var Q0=new WeakSet,vR="";function bR(i){return i.get(hC,AP)}function wR(){let i=[{provide:hC,useFactory:()=>{let e=!0;{let t=Q(gs);e=!!window._ejsas?.[t]}return e&&Ro("NgEventReplay"),e}}];return i.push({provide:Zs,useValue:()=>{let e=Q(Dr),{injector:t}=e;if(!Q0.has(e)){let n=Q(pC);if(bR(t)){zP();let r=t.get(gs),o=UP(r,(s,a,l)=>{s.nodeType===Node.ELEMENT_NODE&&(kP(s,a,l),FP(s,n))});e.onDestroy(o)}}},multi:!0},{provide:Mu,useFactory:()=>{let e=Q(Dr),{injector:t}=e;return()=>{if(!bR(t)||Q0.has(e))return;Q0.add(e);let n=t.get(gs);e.onDestroy(()=>{Q0.delete(e),vw(n)}),e.whenStable().then(()=>{if(e.destroyed)return;let r=t.get(LP);G8(r,t);let o=t.get(pC);o.get(vR)?.forEach(NP),o.delete(vR);let s=r.instance;XP(t)?e.onDestroy(()=>s.cleanUp()):s.cleanUp()})}},multi:!0}),i}var G8=(i,e)=>{let t=e.get(gs),n=window._ejsas[t],r=i.instance=new uR(new Z0(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),vw(t);let s=new J0(a=>{H8(e,a,a.currentTarget)});dR(r,s)};function H8(i,e,t){let n=(t&&t.getAttribute(Wh))??"";/d\d+/.test(n)?j8(n,i,e,t):e.eventPhase===gw.REPLAY&&mC(e,t)}function j8(i,e,t,n){let r=e.get(OP);r.push({event:t,currentTarget:n}),TO(e,i,W8(r))}function W8(i){return e=>{let t=new Set(e),n=[];for(let{event:r,currentTarget:o}of i){let s=o.getAttribute(Wh);t.has(s)?mC(r,o):n.push({event:r,currentTarget:o})}i.length=0,i.push(...n)}}var yR=!1;var $8=1e4;function X8(){yR||(yR=!0,jP(),DO(),VO(),PO(),yO(),aO(),$A(),TA())}function Y8(i){return i.whenStable()}function ER(){let i=[{provide:jh,useFactory:()=>{let e=!0;return e=!!Q(yu,{optional:!0})?.get(gC,null),e&&Ro("NgHydration"),e}},{provide:Zs,useValue:()=>{GA(!1);let e=Q(wn);Q(jh)&&(KP(e),X8())},multi:!0}];return i.push({provide:fC,useFactory:()=>Q(jh)},{provide:Mu,useFactory:()=>{let e=Q(ls);if(Q(jh)){let t=Q(Dr);return()=>{Y8(t).then(()=>{t.destroyed||(jC(t),e.notify(7))})}}return()=>{}},multi:!0}),Js(i)}var Xge=$8-1e3;var nv=(()=>{class i{static __NG_ELEMENT_ID__=q8}return i})();function q8(i){return K8(xi(),pt(),(i&16)===16)}function K8(i,e,t){if(fs(i)&&!t){let n=no(i.index,e);return new Za(n,n)}else if(i.type&175){let n=e[ci];return new Za(n,e)}return null}function MR(i){let{rootComponent:e,appProviders:t,platformProviders:n,platformRef:r}=i;tn(Wt.BootstrapApplicationStart);try{let o=r?.injector??z8(n),s=[YO(),a2,...t||[]],a=new Bh({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return N8({r3Injector:a.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{tn(Wt.BootstrapApplicationEnd)}}function iv(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function TR(i,e){let t=Ks(i),n=e.elementInjector||Jd();return new mu(t).create(n,e.projectableNodes,e.hostElement,e.environmentInjector,e.directives,e.bindings)}var DR=null;function lo(){return DR}function yw(i){DR??=i}var ip=class{},rv=(()=>{class i{historyGo(t){throw new Error("")}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:()=>Q(IR),providedIn:"platform"})}return i})();var IR=(()=>{class i extends rv{_location;_history;_doc=Q(wn);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return lo().getBaseHref(this._doc)}onPopState(t){let n=lo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",t,!1),()=>n.removeEventListener("popstate",t)}onHashChange(t){let n=lo().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 Sw=(function(i){return i[i.Decimal=0]="Decimal",i[i.Percent=1]="Percent",i[i.Currency=2]="Currency",i[i.Scientific=3]="Scientific",i})(Sw||{});var _s={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 Iu(i,e){let t=W0(i),n=t[Pc.NumberSymbols][e];if(typeof n>"u"){if(e===_s.CurrencyDecimal)return t[Pc.NumberSymbols][_s.Decimal];if(e===_s.CurrencyGroup)return t[Pc.NumberSymbols][_s.Group]}return n}function AR(i,e){return W0(i)[Pc.NumberFormats][e]}var Z8=/^(\d+)?\.((\d+)(-(\d+))?)?$/,PR=22,ov=".",rp="0",J8=";",Q8=",",xw="#";function ej(i,e,t,n,r,o,s=!1){let a="",l=!1;if(!isFinite(i))a=Iu(t,_s.Infinity);else{let c=ij(i);s&&(c=nj(c));let d=e.minInt,u=e.minFrac,f=e.maxFrac;if(o){let b=o.match(Z8);if(b===null)throw new Ke(2306,!1);let y=b[1],x=b[3],_=b[5];y!=null&&(d=_w(y)),x!=null&&(u=_w(x)),_!=null?f=_w(_):x!=null&&u>f&&(f=u)}rj(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(Iu(t,n)),g.length&&(a+=Iu(t,r)+g.join("")),v&&(a+=Iu(t,_s.Exponential)+"+"+v)}return i<0&&!l?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function OR(i,e,t){let n=AR(e,Sw.Decimal),r=tj(n,Iu(e,_s.MinusSign));return ej(i,r,e,_s.Group,_s.Decimal,t)}function tj(i,e="-"){let t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(J8),r=n[0],o=n[1],s=r.indexOf(ov)!==-1?r.split(ov):[r.substring(0,r.lastIndexOf(rp)+1),r.substring(r.lastIndexOf(rp)+1)],a=s[0],l=s[1]||"";t.posPre=a.substring(0,a.indexOf(xw));for(let d=0;d<l.length;d++){let u=l.charAt(d);u===rp?t.minFrac=t.maxFrac=d+1:u===xw?t.maxFrac=d+1:t.posSuf+=u}let c=a.split(Q8);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(xw);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 nj(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 ij(i){let e=Math.abs(i)+"",t=0,n,r,o,s,a;for((r=e.indexOf(ov))>-1&&(e=e.replace(ov,"")),(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)===rp;o++);if(o===(a=e.length))n=[0],r=1;else{for(a--;e.charAt(a)===rp;)a--;for(r-=o,n=[],s=0;o<=a;o++,s++)n[s]=Number(e.charAt(o))}return r>PR&&(n=n.splice(0,PR-1),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}function rj(i,e,t){if(e>t)throw new Ke(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 _w(i){let e=parseInt(i);if(isNaN(e))throw new Ke(2305,!1);return e}var kc=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=Q(Di);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)($t(Cu))};static \u0275dir=Zn({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[vu]})}return i})();function RR(i,e){return new Ke(2100,!1)}var Fc=(()=>{class i{_locale;constructor(t){this._locale=t}transform(t,n,r){if(!oj(t))return null;r||=this._locale;try{let o=sj(t);return OR(o,r,n)}catch(o){throw RR(i,o.message)}}static \u0275fac=function(n){return new(n||i)($t(ep,16))};static \u0275pipe=j0({name:"number",type:i,pure:!0})}return i})();function oj(i){return!(i==null||i===""||i!==i)}function sj(i){if(typeof i=="string"&&!isNaN(Number(i)-parseFloat(i)))return Number(i);if(typeof i!="number")throw new Ke(2309,!1);return i}var Cw=(()=>{class i{transform(t,n,r){if(t==null)return null;if(!(typeof t=="string"||Array.isArray(t)))throw RR(i,t);return t.slice(n,r)}static \u0275fac=function(n){return new(n||i)};static \u0275pipe=j0({name:"slice",type:i,pure:!1})}return i})();var qt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=la({type:i});static \u0275inj=cs({})}return i})();function op(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 Nc=class{};var kR="browser";var sp=class{_doc;constructor(e){this._doc=e}manager},av=(()=>{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)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),dv=new qe(""),Tw=(()=>{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 av));this._plugins=r.slice().reverse();let o=t.find(s=>s instanceof av);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 Ke(5101,!1);return this._eventNameToPlugin.set(t,n),n}static \u0275fac=function(n){return new(n||i)(Xe(dv),Xe(or))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),ww="ng-app-id";function FR(i){for(let e of i)e.remove()}function NR(i,e){let t=e.createElement("style");return t.textContent=i,t}function lj(i,e,t,n){let r=i.head?.querySelectorAll(`style[${ww}="${e}"],link[${ww}="${e}"]`);if(r)for(let o of r)o.removeAttribute(ww),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 Mw(i,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),t}var Dw=(()=>{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,lj(t,n,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,n){for(let r of t)this.addUsage(r,this.inline,NR);n?.forEach(r=>this.addUsage(r,this.external,Mw))}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&&(FR(r.elements),n.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])FR(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[n,{elements:r}]of this.inline)r.push(this.addElement(t,NR(n,this.doc)));for(let[n,{elements:r}]of this.external)r.push(this.addElement(t,Mw(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)(Xe(wn),Xe(gs),Xe(_0,8),Xe(Hh))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),Ew={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"},Iw=/%COMP%/g;var UR="%COMP%",cj=`_nghost-${UR}`,dj=`_ngcontent-${UR}`,uj=!0,fj=new qe("",{factory:()=>uj});function hj(i){return dj.replace(Iw,i)}function pj(i){return cj.replace(Iw,i)}function BR(i,e){return e.map(t=>t.replace(Iw,i))}var Pw=(()=>{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 ap(t,s,a,this.tracingService)}createRenderer(t,n){if(!t||!n)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,n);return r instanceof cv?r.applyToHost(t):r instanceof lp&&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 Po.Emulated:o=new cv(l,c,n,this.appId,d,s,a,u);break;case Po.ShadowDom:return new lv(l,t,n,s,a,this.nonce,u,c);case Po.ExperimentalIsolatedShadowDom:return new lv(l,t,n,s,a,this.nonce,u);default:o=new lp(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)(Xe(Tw),Xe(Dw),Xe(gs),Xe(fj),Xe(wn),Xe(or),Xe(_0),Xe(vs,8))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),ap=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(Ew[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(LR(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(LR(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 Ke(-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=Ew[r];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Ew[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&(ms.DashCase|ms.Important)?e.style.setProperty(t,n,r&ms.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&ms.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=lo().getGlobalEventTarget(this.doc,e),!e))throw new Ke(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 LR(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var lv=class extends ap{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=BR(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=Mw(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)}},lp=class extends ap{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?BR(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Mc.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},cv=class extends lp{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=hj(c),this.hostAttr=pj(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 uv=class i extends ip{supportsDOMEvents=!0;static makeCurrent(){yw(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=mj();return t==null?null:gj(t)}resetBaseElement(){cp=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return op(document.cookie,e)}},cp=null;function mj(){return cp=cp||document.head.querySelector("base"),cp?cp.getAttribute("href"):null}function gj(i){return new URL(i,document.baseURI).pathname}var vj=(()=>{class i{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),zR=["alt","control","meta","shift"],bj={"\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"},yj={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},VR=(()=>{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(()=>lo().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."),zR.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=bj[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"),zR.forEach(s=>{if(s!==r){let a=yj[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)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})();async function Aw(i,e){return MR(xj(i,e))}function xj(i,e){return{platformRef:e?.platformRef,appProviders:[...Ej,...i?.providers??[]],platformProviders:wj}}function _j(){uv.makeCurrent()}function Sj(){return new Zr}function Cj(){return lC(document),document}var wj=[{provide:Hh,useValue:kR},{provide:x0,useValue:_j,multi:!0},{provide:wn,useFactory:Cj}];var Ej=[{provide:wh,useValue:"root"},{provide:Zr,useFactory:Sj},{provide:dv,useClass:av,multi:!0},{provide:dv,useClass:VR,multi:!0},Pw,Dw,Tw,{provide:Dc,useExisting:Pw},{provide:Nc,useClass:vj},[]];var uo=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 hv=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()}},pv=class{encodeKey(e){return GR(e)}encodeValue(e){return GR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Mj(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 Tj=/%(\d[a-f0-9])/gi,Dj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function GR(i){return encodeURIComponent(i).replace(Tj,(e,t)=>Dj[t]??e)}function fv(i){return`${i}`}var co=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new pv,e.fromString){if(e.fromObject)throw new Ke(2805,!1);this.map=Mj(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(fv):[fv(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(fv(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(fv(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 Ij(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function HR(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function jR(i){return typeof Blob<"u"&&i instanceof Blob}function WR(i){return typeof FormData<"u"&&i instanceof FormData}function Pj(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var $R="Content-Type",XR="Accept",YR="text/plain",qR="application/json",Aj=`${qR}, ${YR}, */*`,Pu=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(Ij(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 Ke(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 uo,this.context??=new hv,!this.params)this.params=new co,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"||HR(this.body)||jR(this.body)||WR(this.body)||Pj(this.body)?this.body:this.body instanceof co?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||WR(this.body)?null:jR(this.body)?this.body.type||null:HR(this.body)?null:typeof this.body=="string"?YR:this.body instanceof co?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?qR: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,x=e.params||this.params,_=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((E,D)=>E.set(D,e.setHeaders[D]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((E,D)=>E.set(D,e.setParams[D]),x)),new i(t,n,g,{params:x,headers:y,context:_,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})}},Lc=(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})(Lc||{}),Au=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new uo,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}},mv=class i extends Au{constructor(e={}){super(e)}type=Lc.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})}},Ou=class i extends Au{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Lc.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})}},il=class extends Au{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}},Oj=200,Rj=204;var kj=new qe("");var Fj=/^\)\]\}',?\n/;var Rw=(()=>{class i{xhrFactory;tracingService=Q(vs,{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 Ke(-2800,!1);let n=this.xhrFactory;return ss(null).pipe(iS(()=>new En(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(XR)||s.setRequestHeader(XR,Aj),!t.headers.has($R)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader($R,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 uo(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new mv({headers:m,status:s.status,statusText:g,url:b}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:b,url:y}=c(),x=null;m!==Rj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Oj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let E=x;x=x.replace(Fj,"");try{x=x!==""?JSON.parse(x):null}catch(D){x=E,_&&(_=!1,x={error:D,text:x})}}_?(o.next(new Ou({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new il({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new il({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 il({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:Lc.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:Lc.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:Lc.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)(Xe(Nc))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Nj(i,e){return e(i)}function Lj(i,e,t){return(n,r)=>Qd(t,()=>e(n,o=>i(o,r)))}var kw=new qe("",{factory:()=>[]}),Fw=new qe(""),KR=new qe("",{factory:()=>!0});var Nw=(()=>{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=Xe(Rw),r},providedIn:"root"})}return i})();var gv=(()=>{class i{backend;injector;chain=null;pendingTasks=Q(au);contributeToStability=Q(KR);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(kw),...this.injector.get(Fw,[])]));this.chain=n.reduceRight((r,o)=>Lj(r,o,this.injector),Nj)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(mh(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(Xe(Nw),Xe(Ti))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Lw=(()=>{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=Xe(gv),r},providedIn:"root"})}return i})();function Ow(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 vv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof Pu)o=t;else{let l;r.headers instanceof uo?l=r.headers:l=new uo(r.headers);let c;r.params&&(r.params instanceof co?c=r.params:c=new co({fromObject:r.params})),o=new Pu(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=ss(o).pipe(nS(l=>this.handler.handle(l)));if(t instanceof Pu||r.observe==="events")return s;let a=s.pipe(tS(l=>l instanceof Ou));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Ke(2806,!1);return l.body}));case"blob":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Ke(2807,!1);return l.body}));case"text":return a.pipe(rr(l=>{if(l.body!==null&&typeof l.body!="string")throw new Ke(2808,!1);return l.body}));default:return a.pipe(rr(l=>l.body))}case"response":return a;default:throw new Ke(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 co().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,Ow(r,n))}post(t,n,r={}){return this.request("POST",t,Ow(r,n))}put(t,n,r={}){return this.request("PUT",t,Ow(r,n))}static \u0275fac=function(n){return new(n||i)(Xe(Lw))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Uj=new qe("",{factory:()=>!0}),Bj="XSRF-TOKEN",zj=new qe("",{factory:()=>Bj}),Vj="X-XSRF-TOKEN",Gj=new qe("",{factory:()=>Vj}),Hj=(()=>{class i{cookieName=Q(zj);doc=Q(wn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=op(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})(),ZR=(()=>{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=Xe(Hj),r},providedIn:"root"})}return i})();function jj(i,e){if(!Q(Uj)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Q(rv).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=Q(ZR).getToken(),n=Q(Gj);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var Uw=(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})(Uw||{});function Wj(i,e){return{\u0275kind:i,\u0275providers:e}}function Bw(...i){let e=[vv,gv,{provide:Lw,useExisting:gv},{provide:Nw,useFactory:()=>Q(kj,{optional:!0})??Q(Rw)},{provide:kw,useValue:jj,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Js(e)}function zw(i){return Wj(Uw.Interceptors,i.map(e=>({provide:kw,useValue:e,multi:!0})))}var $j=new qe(""),Xj="b",Yj="h",qj="s",Kj="st",Zj="u",Jj="rt",Vw=new qe(""),Qj=["GET","HEAD"];function ek(i,e){let s=e,{isCacheActive:t}=s,n=en(s,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!Qj.includes(o)||!n.includeRequestsWithAuthHeaders&&nW(i)||n.filter?.(i)===!1)}function tk(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function eW(i,e,t,n){let{transferCache:r}=i;if(!ek(i,e))return null;if(n)throw new Ke(2803,!1);let o=i.url,s=nk(i,o),a=t.get(s,null),l=tk(e,r);if(a){let{[Xj]:c,[Jj]:d,[Yj]:u,[qj]:f,[Kj]:h,[Zj]:p}=a,v=c;switch(d){case"arraybuffer":v=QR(c);break;case"blob":v=new Blob([QR(c)]);break}let g=new uo(u);return new Ou({body:v,headers:g,status:f,statusText:h,url:p})}return null}function tW(i,e){let t=Q(Vw),n=Q(yu),r=Q($j,{optional:!0}),o=eW(i,t,n,r);if(o)return ss(o);let{transferCache:s}=i,a=tk(t,s),l=i.url,c=nk(i,l);return ek(i,t),e(i)}function nW(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function JR(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function nk(i,e){let{params:t,method:n,responseType:r}=i,o=JR(t),s=i.serializeBody();s instanceof URLSearchParams?s=JR(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=iW(a);return l}function iW(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function QR(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function ik(i){return[{provide:Vw,useFactory:()=>(Ro("NgHttpTransferCache"),R({isCacheActive:!0},i))},{provide:Fw,useValue:tW,multi:!0},{provide:Mu,multi:!0,useFactory:()=>{let e=Q(Dr),t=Q(Vw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var dp=(()=>{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=Xe(rW),r},providedIn:"root"})}return i})(),rW=(()=>{class i extends dp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Oo.NONE:return n;case Oo.HTML:return oa(n,"HTML")?Ao(n):T0(this._doc,String(n)).toString();case Oo.STYLE:return oa(n,"Style")?Ao(n):n;case Oo.SCRIPT:if(oa(n,"Script"))return Ao(n);throw new Ke(5200,!1);case Oo.URL:return oa(n,"URL")?Ao(n):Xh(String(n));case Oo.RESOURCE_URL:if(oa(n,"ResourceURL"))return Ao(n);throw new Ke(5201,!1);default:throw new Ke(5202,!1)}}bypassSecurityTrustHtml(t){return yC(t)}bypassSecurityTrustStyle(t){return xC(t)}bypassSecurityTrustScript(t){return _C(t)}bypassSecurityTrustUrl(t){return SC(t)}bypassSecurityTrustResourceUrl(t){return CC(t)}static \u0275fac=function(n){return new(n||i)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bv=(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})(bv||{});function oW(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function rk(){return oW(bv.EventReplay,wR())}function ok(...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(bv.HttpTransferCacheOptions);return Js([[],[],ER(),t.has(bv.NoHttpTransferCache)||n?[]:ik({}),e])}var Ru=class i{loadingCount=N(0);isLoading=De(()=>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 yv(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 ca=class i{toastsSignal=N([]);toasts=De(()=>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 up=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof il&&this.showError(e)}showError(e){return this.toasterService.showError(yv(e)),Ba(()=>e)}static \u0275fac=function(t){return new(t||i)(Xe(ca))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var sk=(i,e)=>{let t=Q(up),n=Q(Ru),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(uc(s=>(r||t.handleError(s),r?ss(null):Ba(()=>s))),mh(()=>{o&&n.hide()}))};var ak=[sk];var lk={apiUrl:"https://pixeasy-stage-api-htapefcta9c3arfd.westus3-01.azurewebsites.net/api/"};var xv=new qe("ENV"),sye=new qe("LOADER_DELAY");var ck={provide:xv,useValue:lk};function dk(){return[i1(),ok(rk()),Bw(zw(ak)),ck,Ru]}var xk=(()=>{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)($t(aa),$t(Er))};static \u0275dir=Zn({type:i})}return i})(),vp=(()=>{class i extends xk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,features:[Tr]})}return i})(),rl=new qe(""),lW={provide:rl,useExisting:zi(()=>Xw),multi:!0},Xw=(()=>{class i extends vp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([lW]),Tr]})}return i})(),cW={provide:rl,useExisting:zi(()=>Nu),multi:!0};function dW(){let i=lo()?lo().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var uW=new qe(""),Nu=(()=>{class i extends xk{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!dW())}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)($t(aa),$t(Er),$t(uW,8))};static \u0275dir=Zn({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&&ie("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:[ao([cW]),Tr]})}return i})();var Yw=new qe(""),fW=new qe("");function hW(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 pW(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 uk(i){return null}function _k(i){return i!=null}function Sk(i){return Eu(i)?ph(i):i}function Ck(i){let e={};return i.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function wk(i,e){return e.map(t=>t(i))}function mW(i){return!i.validate}function Ek(i){return i.map(e=>mW(e)?e:t=>e.validate(t))}function gW(i){if(!i)return null;let e=i.filter(_k);return e.length==0?null:function(t){return Ck(wk(t,e))}}function Mk(i){return i!=null?gW(Ek(i)):null}function vW(i){if(!i)return null;let e=i.filter(_k);return e.length==0?null:function(t){let n=wk(t,e).map(Sk);return eS(n).pipe(rr(Ck))}}function Tk(i){return i!=null?vW(Ek(i)):null}function fk(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function bW(i){return i._rawValidators}function yW(i){return i._rawAsyncValidators}function Gw(i){return i?Array.isArray(i)?i:[i]:[]}function Sv(i,e){return Array.isArray(i)?i.includes(e):i===e}function hk(i,e){let t=Gw(e);return Gw(i).forEach(r=>{Sv(t,r)||t.push(r)}),t}function pk(i,e){return Gw(e).filter(t=>!Sv(i,t))}var Cv=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=Mk(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Tk(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}},Hw=class extends Cv{name;get formDirective(){return null}get path(){return null}},gp=class extends Cv{_parent=null;name=null;valueAccessor=null},jw=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 ol=(()=>{class i extends jw{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)($t(gp,2))};static \u0275dir=Zn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&ht("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:[Tr]})}return i})();var fp="VALID",_v="INVALID",ku="PENDING",hp="DISABLED",Uc=class{},wv=class extends Uc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},pp=class extends Uc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},mp=class extends Uc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Fu=class extends Uc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var Ww=class extends Uc{source;constructor(e){super(),this.source=e}};function xW(i){return(Ev(i)?i.validators:i)||null}function _W(i){return Array.isArray(i)?Mk(i):i||null}function SW(i,e){return(Ev(e)?e.asyncValidators:i)||null}function CW(i){return Array.isArray(i)?Tk(i):i||null}function Ev(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var $w=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 gn(this.statusReactive)}set status(e){gn(()=>this.statusReactive.set(e))}_status=De(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===fp}get invalid(){return this.status===_v}get pending(){return this.status==ku}get disabled(){return this.status===hp}get enabled(){return this.status!==hp}errors;get pristine(){return gn(this.pristineReactive)}set pristine(e){gn(()=>this.pristineReactive.set(e))}_pristine=De(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return gn(this.touchedReactive)}set touched(e){gn(()=>this.touchedReactive.set(e))}_touched=De(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new Eo;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(hk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(hk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(pk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(pk(e,this._rawAsyncValidators))}hasValidator(e){return Sv(this._rawValidators,e)}hasAsyncValidator(e){return Sv(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(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new mp(!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 mp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new pp(!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 pp(!0,n))}markAsPending(e={}){this.status=ku;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Fu(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(ue(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=hp,this.errors=null,this._forEachChild(r=>{r.disable(ue(R({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new wv(this.value,n)),this._events.next(new Fu(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=fp,this._forEachChild(n=>{n.enable(ue(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(ue(R({},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===fp||this.status===ku)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new wv(this.value,t)),this._events.next(new Fu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(ue(R({},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()?hp:fp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=ku,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=Sk(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 Fu(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new br,this.statusChanges=new br}_calculateStatus(){return this._allControlsDisabled()?hp:this.errors?_v:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ku)?ku:this._anyControlsHaveStatus(_v)?_v:fp}_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 pp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new mp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Ev(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=_W(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=CW(this._rawAsyncValidators)}};var Dk=new qe("",{factory:()=>qw}),qw="always";function wW(i,e){return[...e.path,i]}function EW(i,e,t=qw){TW(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),DW(i,e),PW(i,e),IW(i,e),MW(i,e)}function mk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function MW(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function TW(i,e){let t=bW(i);e.validator!==null?i.setValidators(fk(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=yW(i);e.asyncValidator!==null?i.setAsyncValidators(fk(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();mk(e._rawValidators,r),mk(e._rawAsyncValidators,r)}function DW(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Ik(i,e)})}function IW(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Ik(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Ik(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function PW(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 OW(i){return Object.getPrototypeOf(i.constructor)===vp}function RW(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===Nu?t=o:OW(o)?n=o:r=o}),r||n||t||null}function gk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function vk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var kW=class extends $w{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(xW(t),SW(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ev(t)&&(t.nonNullable||t.initialValueIsDefault)&&(vk(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 Ww(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){gk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){gk(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){vk(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 FW={provide:gp,useExisting:zi(()=>da)},bk=Promise.resolve(),da=(()=>{class i extends gp{_changeDetectorRef;callSetDisabledState;control=new kW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new br;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=RW(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(){EW(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){bk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&iv(n);bk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?wW(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)($t(Hw,9),$t(Yw,10),$t(fW,10),$t(rl,10),$t(nv,8),$t(Dk,8))};static \u0275dir=Zn({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:[ao([FW]),Tr,vu]})}return i})();var NW={provide:rl,useExisting:zi(()=>bp),multi:!0},bp=(()=>{class i extends vp{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=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&ie("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([NW]),Tr]})}return i})();var LW={provide:rl,useExisting:zi(()=>Mv),multi:!0};function Pk(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function UW(i){return i.split(":")[0]}var Mv=(()=>{class i extends vp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Q(Dr).injector;destroyRef=Q(sr);cdr=Q(nv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,A0({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=Pk(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=UW(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([LW]),Tr]})}return i})(),Ak=(()=>{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(Pk(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)($t(Er),$t(aa),$t(Mv,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),BW={provide:rl,useExisting:zi(()=>Ok),multi:!0};function yk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function zW(i){return i.split(":")[0]}var Ok=(()=>{class i extends vp{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=zW(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([BW]),Tr]})}return i})(),Rk=(()=>{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(yk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(yk(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)($t(Er),$t(aa),$t(Ok,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function kk(i){return typeof i=="number"?i:parseFloat(i)}var Fk=(()=>{class i{_validator=uk;_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):uk,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=Zn({type:i,features:[vu]})}return i})(),VW={provide:Yw,useExisting:zi(()=>yp),multi:!0},yp=(()=>{class i extends Fk{max;inputName="max";normalizeInput=t=>kk(t);createValidator=t=>pW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({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&&Pn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[ao([VW]),Tr]})}return i})(),GW={provide:Yw,useExisting:zi(()=>xp),multi:!0},xp=(()=>{class i extends Fk{min;inputName="min";normalizeInput=t=>kk(t);createValidator=t=>hW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({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&&Pn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[ao([GW]),Tr]})}return i})();var HW=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=la({type:i});static \u0275inj=cs({})}return i})();var fo=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Dk,useValue:t.callSetDisabledState??qw}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=la({type:i});static \u0275inj=cs({imports:[HW]})}return i})();var xl={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},_l={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},dF=0,AE=1,uF=2;var Wp=1,fF=2,pf=3,Xi=0,Ki=1,ws=2,Es=0,jc=1,OE=2,RE=3,kE=4,hF=5,hl=100,pF=101,mF=102,gF=103,vF=104,bF=200,yF=201,xF=202,_F=203,Zv=204,Jv=205,SF=206,CF=207,wF=208,EF=209,MF=210,TF=211,DF=212,IF=213,PF=214,Cb=0,wb=1,Eb=2,Wc=3,Mb=4,Tb=5,Db=6,Ib=7,Pb=0,AF=1,OF=2,Bo=0,FE=1,NE=2,LE=3,ed=4,UE=5,BE=6,zE=7;var yE=300,Sl=301,td=302,Ab=303,Ob=304,$p=306,Qu=1e3,Oi=1001,Qv=1002,hi=1003,RF=1004;var Xp=1005;var jn=1006,Rb=1007;var go=1008;var ar=1009,VE=1010,GE=1011,mf=1012,kb=1013,zo=1014,Vo=1015,Ms=1016,Fb=1017,Nb=1018,gf=1020,HE=35902,jE=35899,WE=1021,$E=1022,vo=1023,Ss=1026,Cl=1027,XE=1028,Lb=1029,nd=1030,Ub=1031;var Bb=1033,Yp=33776,qp=33777,Kp=33778,Zp=33779,zb=35840,Vb=35841,Gb=35842,Hb=35843,jb=36196,Wb=37492,$b=37496,Xb=37488,Yb=37489,qb=37490,Kb=37491,Zb=37808,Jb=37809,Qb=37810,ey=37811,ty=37812,ny=37813,iy=37814,ry=37815,oy=37816,sy=37817,ay=37818,ly=37819,cy=37820,dy=37821,uy=36492,fy=36494,hy=36495,py=36283,my=36284,gy=36285,vy=36286;var Dp=2300,eb=2301,Kv=2302,xE=2400,_E=2401,SE=2402;var kF=3200;var YE=0,FF=1,Sa="",bn="srgb",$c="srgb-linear",Ip="linear",on="srgb";var Hc=7680;var CE=519,NF=512,LF=513,UF=514,by=515,BF=516,zF=517,yy=518,VF=519,wE=35044;var qE="300 es",Lo=2e3,Pp=2001;function KE(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function jW(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function ef(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function GF(){let i=ef("canvas");return i.style.display="block",i}var Nk={},tf=null;function ZE(...i){let e="THREE."+i.shift();tf?tf("log",e,...i):console.log(e,...i)}function ft(...i){let e="THREE."+i.shift();tf?tf("warn",e,...i):console.warn(e,...i)}function vt(...i){let e="THREE."+i.shift();tf?tf("error",e,...i):console.error(e,...i)}function nf(...i){let e=i.join(" ");e in Nk||(Nk[e]=!0,ft(...i))}function HF(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 Cs=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}}},Pi=["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"],Lk=1234567,Mp=Math.PI/180,rf=180/Math.PI;function vf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Pi[i&255]+Pi[i>>8&255]+Pi[i>>16&255]+Pi[i>>24&255]+"-"+Pi[e&255]+Pi[e>>8&255]+"-"+Pi[e>>16&15|64]+Pi[e>>24&255]+"-"+Pi[t&63|128]+Pi[t>>8&255]+"-"+Pi[t>>16&255]+Pi[t>>24&255]+Pi[n&255]+Pi[n>>8&255]+Pi[n>>16&255]+Pi[n>>24&255]).toLowerCase()}function Ht(i,e,t){return Math.max(e,Math.min(t,i))}function JE(i,e){return(i%e+e)%e}function WW(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function $W(i,e,t){return i!==e?(t-i)/(e-i):0}function Tp(i,e,t){return(1-t)*i+t*e}function XW(i,e,t,n){return Tp(i,e,1-Math.exp(-t*n))}function YW(i,e=1){return e-Math.abs(JE(i,e*2)-e)}function qW(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function KW(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function ZW(i,e){return i+Math.floor(Math.random()*(e-i+1))}function JW(i,e){return i+Math.random()*(e-i)}function QW(i){return i*(.5-Math.random())}function e9(i){i!==void 0&&(Lk=i);let e=Lk+=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 t9(i){return i*Mp}function n9(i){return i*rf}function i9(i){return(i&i-1)===0&&i!==0}function r9(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function o9(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function s9(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:ft("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Ku(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 $i(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 nn={DEG2RAD:Mp,RAD2DEG:rf,generateUUID:vf,clamp:Ht,euclideanModulo:JE,mapLinear:WW,inverseLerp:$W,lerp:Tp,damp:XW,pingpong:YW,smoothstep:qW,smootherstep:KW,randInt:ZW,randFloat:JW,randFloatSpread:QW,seededRandom:e9,degToRad:t9,radToDeg:n9,isPowerOfTwo:i9,ceilPowerOfTwo:r9,floorPowerOfTwo:o9,setQuaternionFromProperEuler:s9,normalize:$i,denormalize:Ku},bt=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=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(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(Ht(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}},mo=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:ft("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(Ht(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}},G=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(Uk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Uk.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=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(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 Kw.copy(this).projectOnVector(e),this.sub(Kw)}reflect(e){return this.sub(Kw.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(Ht(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}},Kw=new G,Uk=new mo,At=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],x=r[7],_=r[2],E=r[5],D=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*E,o[6]=s*m+a*x+l*D,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*E,o[7]=c*m+d*x+u*D,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*E,o[8]=f*m+h*x+p*D,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(Zw.makeScale(e,t)),this}rotate(e){return this.premultiply(Zw.makeRotation(-e)),this}translate(e,t){return this.premultiply(Zw.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)}},Zw=new At,Bk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),zk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function a9(){let i={enabled:!0,workingColorSpace:$c,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=ba(r.r),r.g=ba(r.g),r.b=ba(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===on&&(r.r=Zu(r.r),r.g=Zu(r.g),r.b=Zu(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===Sa?Ip: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 nf("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return nf("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({[$c]:{primaries:e,whitePoint:n,transfer:Ip,toXYZ:Bk,fromXYZ:zk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:bn},outputColorSpaceConfig:{drawingBufferColorSpace:bn}},[bn]:{primaries:e,whitePoint:n,transfer:on,toXYZ:Bk,fromXYZ:zk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:bn}}}),i}var Gt=a9();function ba(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Zu(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Lu,tb=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{Lu===void 0&&(Lu=ef("canvas")),Lu.width=e.width,Lu.height=e.height;let r=Lu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Lu}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=ef("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]=ba(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(ba(t[n]/255)*255):t[n]=ba(t[n]);return{data:t,width:e.width,height:e.height}}else return ft("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},l9=0,of=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:l9++}),this.uuid=vf(),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(Jw(r[s].image)):o.push(Jw(r[s]))}else o=Jw(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function Jw(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?tb.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(ft("Texture: Unable to serialize Texture."),{})}var c9=0,Qw=new G,Go=(()=>{class i extends Cs{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Oi,o=Oi,s=jn,a=go,l=vo,c=ar,d=i.DEFAULT_ANISOTROPY,u=Sa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:c9++}),this.uuid=vf(),this.name="",this.source=new of(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 bt(0,0),this.repeat=new bt(1,1),this.center=new bt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new At,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(Qw).x}get height(){return this.source.getSize(Qw).y}get depth(){return this.source.getSize(Qw).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){ft(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){ft(`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!==yE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Qu:t.x=t.x-Math.floor(t.x);break;case Oi:t.x=t.x<0?0:1;break;case Qv: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 Qu:t.y=t.y-Math.floor(t.y);break;case Oi:t.y=t.y<0?0:1;break;case Qv: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=yE,i.DEFAULT_ANISOTROPY=1,i})(),An=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,x=(h+1)/2,_=(m+1)/2,E=(d+f)/4,D=(u+v)/4,A=(p+g)/4;return y>x&&y>_?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=E/n,o=D/n):x>_?x<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),n=E/r,o=A/r):_<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),n=D/o,r=A/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=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this.w=Ht(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this.w=Ht(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(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}},nb=class extends Cs{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,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 An(0,0,e,t),this.scissorTest=!1,this.viewport=new An(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new Go(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:jn,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 of(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"})}},Rr=class extends nb{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Ap=class extends Go{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=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var ib=class extends Go{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=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yi=class{constructor(e=new G(1/0,1/0,1/0),t=new G(-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(ko.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ko.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=ko.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,ko):ko.fromBufferAttribute(o,s),ko.applyMatrix4(e.matrixWorld),this.expandByPoint(ko);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Dv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Dv.copy(n.boundingBox)),Dv.applyMatrix4(e.matrixWorld),this.union(Dv)}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,ko),ko.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(_p),Iv.subVectors(this.max,_p),Uu.subVectors(e.a,_p),Bu.subVectors(e.b,_p),zu.subVectors(e.c,_p),sl.subVectors(Bu,Uu),al.subVectors(zu,Bu),Bc.subVectors(Uu,zu);let t=[0,-sl.z,sl.y,0,-al.z,al.y,0,-Bc.z,Bc.y,sl.z,0,-sl.x,al.z,0,-al.x,Bc.z,0,-Bc.x,-sl.y,sl.x,0,-al.y,al.x,0,-Bc.y,Bc.x,0];return!eE(t,Uu,Bu,zu,Iv)||(t=[1,0,0,0,1,0,0,0,1],!eE(t,Uu,Bu,zu,Iv))?!1:(Pv.crossVectors(sl,al),t=[Pv.x,Pv.y,Pv.z],eE(t,Uu,Bu,zu,Iv))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ko).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ko).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:(ua[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ua[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ua[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ua[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ua[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ua[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ua[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ua[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ua),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}},ua=[new G,new G,new G,new G,new G,new G,new G,new G],ko=new G,Dv=new Yi,Uu=new G,Bu=new G,zu=new G,sl=new G,al=new G,Bc=new G,_p=new G,Iv=new G,Pv=new G,zc=new G;function eE(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){zc.fromArray(i,o);let a=r.x*Math.abs(zc.x)+r.y*Math.abs(zc.y)+r.z*Math.abs(zc.z),l=e.dot(zc),c=t.dot(zc),d=n.dot(zc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var d9=new Yi,Sp=new G,tE=new G,pl=class{constructor(e=new G,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):d9.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;Sp.subVectors(e,this.center);let t=Sp.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(Sp,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):(tE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Sp.copy(e.center).add(tE)),this.expandByPoint(Sp.copy(e.center).sub(tE))),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}},fa=new G,nE=new G,Av=new G,ll=new G,iE=new G,Ov=new G,rE=new G,ya=class{constructor(e=new G,t=new G(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,fa)),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=fa.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(fa.copy(this.origin).addScaledVector(this.direction,t),fa.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){nE.copy(e).add(t).multiplyScalar(.5),Av.copy(t).sub(e).normalize(),ll.copy(this.origin).sub(nE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Av),a=ll.dot(this.direction),l=-ll.dot(Av),c=ll.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(nE).addScaledVector(Av,f),h}intersectSphere(e,t){fa.subVectors(e.center,this.origin);let n=fa.dot(this.direction),r=fa.dot(fa)-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,fa)!==null}intersectTriangle(e,t,n,r,o){iE.subVectors(t,e),Ov.subVectors(n,e),rE.crossVectors(iE,Ov);let s=this.direction.dot(rE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;ll.subVectors(this.origin,e);let l=a*this.direction.dot(Ov.crossVectors(ll,Ov));if(l<0)return null;let c=a*this.direction.dot(iE.cross(ll));if(c<0||l+c>s)return null;let d=-a*ll.dot(rE);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)}},Mn=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/Vu.setFromMatrixColumn(e,0).length(),o=1/Vu.setFromMatrixColumn(e,1).length(),s=1/Vu.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(u9,e,f9)}lookAt(e,t,n){let r=this.elements;return Pr.subVectors(e,t),Pr.lengthSq()===0&&(Pr.z=1),Pr.normalize(),cl.crossVectors(n,Pr),cl.lengthSq()===0&&(Math.abs(n.z)===1?Pr.x+=1e-4:Pr.z+=1e-4,Pr.normalize(),cl.crossVectors(n,Pr)),cl.normalize(),Rv.crossVectors(Pr,cl),r[0]=cl.x,r[4]=Rv.x,r[8]=Pr.x,r[1]=cl.y,r[5]=Rv.y,r[9]=Pr.y,r[2]=cl.z,r[6]=Rv.z,r[10]=Pr.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],x=n[11],_=n[15],E=r[0],D=r[4],A=r[8],S=r[12],I=r[1],L=r[5],H=r[9],z=r[13],X=r[2],q=r[6],K=r[10],j=r[14],te=r[3],ye=r[7],xe=r[11],Ce=r[15];return o[0]=s*E+a*I+l*X+c*te,o[4]=s*D+a*L+l*q+c*ye,o[8]=s*A+a*H+l*K+c*xe,o[12]=s*S+a*z+l*j+c*Ce,o[1]=d*E+u*I+f*X+h*te,o[5]=d*D+u*L+f*q+h*ye,o[9]=d*A+u*H+f*K+h*xe,o[13]=d*S+u*z+f*j+h*Ce,o[2]=p*E+v*I+g*X+m*te,o[6]=p*D+v*L+g*q+m*ye,o[10]=p*A+v*H+g*K+m*xe,o[14]=p*S+v*z+g*j+m*Ce,o[3]=b*E+y*I+x*X+_*te,o[7]=b*D+y*L+x*q+_*ye,o[11]=b*A+y*H+x*K+_*xe,o[15]=b*S+y*z+x*j+_*Ce,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,x=a*f-l*u,_=s*h-c*d,E=s*f-l*d,D=s*u-a*d;return t*(v*b-g*y+m*x)-n*(p*b-g*_+m*E)+r*(p*y-v*_+m*D)-o*(p*x-v*E+g*D)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],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,x=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,_=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,E=t*b+n*y+r*x+o*_;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/E;return e[0]=b*D,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*D,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*D,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*D,e[4]=y*D,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*D,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*D,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*D,e[8]=x*D,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*D,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*D,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*D,e[12]=_*D,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*D,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*D,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*D,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,x=l*u,_=n.x,E=n.y,D=n.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*E,r[5]=(1-(f+m))*E,r[6]=(g+b)*E,r[7]=0,r[8]=(p+y)*D,r[9]=(g-b)*D,r[10]=(1-(f+v))*D,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=Vu.set(r[0],r[1],r[2]).length(),s=Vu.set(r[4],r[5],r[6]).length(),a=Vu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Fo.copy(this);let c=1/o,d=1/s,u=1/a;return Fo.elements[0]*=c,Fo.elements[1]*=c,Fo.elements[2]*=c,Fo.elements[4]*=d,Fo.elements[5]*=d,Fo.elements[6]*=d,Fo.elements[8]*=u,Fo.elements[9]*=u,Fo.elements[10]*=u,t.setFromRotationMatrix(Fo),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=Lo,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===Lo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Pp)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=Lo,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===Lo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Pp)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}},Vu=new G,Fo=new Mn,u9=new G(0,0,0),f9=new G(1,1,1),cl=new G,Rv=new G,Pr=new G,Vk=new Mn,Gk=new mo,ml=(()=>{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(Ht(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(-Ht(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(Ht(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(-Ht(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(Ht(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(-Ht(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:ft("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return Vk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Vk,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return Gk.setFromEuler(this),this.setFromQuaternion(Gk,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})(),sf=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}},h9=0,Hk=new G,Gu=new mo,ha=new Mn,kv=new G,Cp=new G,p9=new G,m9=new mo,jk=new G(1,0,0),Wk=new G(0,1,0),$k=new G(0,0,1),Xk={type:"added"},g9={type:"removed"},Hu={type:"childadded",child:null},oE={type:"childremoved",child:null},kr=(()=>{class i extends Cs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:h9++}),this.uuid=vf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new G,n=new ml,r=new mo,o=new G(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 Mn},normalMatrix:{value:new At}}),this.matrix=new Mn,this.matrixWorld=new Mn,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new sf,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 Gu.setFromAxisAngle(t,n),this.quaternion.multiply(Gu),this}rotateOnWorldAxis(t,n){return Gu.setFromAxisAngle(t,n),this.quaternion.premultiply(Gu),this}rotateX(t){return this.rotateOnAxis(jk,t)}rotateY(t){return this.rotateOnAxis(Wk,t)}rotateZ(t){return this.rotateOnAxis($k,t)}translateOnAxis(t,n){return Hk.copy(t).applyQuaternion(this.quaternion),this.position.add(Hk.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(jk,t)}translateY(t){return this.translateOnAxis(Wk,t)}translateZ(t){return this.translateOnAxis($k,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ha.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?kv.copy(t):kv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Cp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ha.lookAt(Cp,kv,this.up):ha.lookAt(kv,Cp,this.up),this.quaternion.setFromRotationMatrix(ha),o&&(ha.extractRotation(o.matrixWorld),Gu.setFromRotationMatrix(ha),this.quaternion.premultiply(Gu.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(vt("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(Xk),Hu.child=t,this.dispatchEvent(Hu),Hu.child=null):vt("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(g9),oE.child=t,this.dispatchEvent(oE),oE.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),ha.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ha.multiply(t.parent.matrixWorld)),t.applyMatrix4(ha),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Xk),Hu.child=t,this.dispatchEvent(Hu),Hu.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(Cp,t,p9),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Cp,m9,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=>ue(R({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>R({},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 G(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),No=new G,pa=new G,sE=new G,ma=new G,ju=new G,Wu=new G,Yk=new G,aE=new G,lE=new G,cE=new G,dE=new An,uE=new An,fE=new An,fl=class i{constructor(e=new G,t=new G,n=new G){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),No.subVectors(e,t),r.cross(No);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){No.subVectors(r,t),pa.subVectors(n,t),sE.subVectors(e,t);let s=No.dot(No),a=No.dot(pa),l=No.dot(sE),c=pa.dot(pa),d=pa.dot(sE),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,ma)===null?!1:ma.x>=0&&ma.y>=0&&ma.x+ma.y<=1}static getInterpolation(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,ma)===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,ma.x),l.addScaledVector(s,ma.y),l.addScaledVector(a,ma.z),l)}static getInterpolatedAttribute(e,t,n,r,o,s){return dE.setScalar(0),uE.setScalar(0),fE.setScalar(0),dE.fromBufferAttribute(e,t),uE.fromBufferAttribute(e,n),fE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(dE,o.x),s.addScaledVector(uE,o.y),s.addScaledVector(fE,o.z),s}static isFrontFacing(e,t,n,r){return No.subVectors(n,t),pa.subVectors(e,t),No.cross(pa).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 No.subVectors(this.c,this.b),pa.subVectors(this.a,this.b),No.cross(pa).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;ju.subVectors(r,n),Wu.subVectors(o,n),aE.subVectors(e,n);let l=ju.dot(aE),c=Wu.dot(aE);if(l<=0&&c<=0)return t.copy(n);lE.subVectors(e,r);let d=ju.dot(lE),u=Wu.dot(lE);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(ju,s);cE.subVectors(e,o);let h=ju.dot(cE),p=Wu.dot(cE);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(Wu,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Yk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Yk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector(ju,s).addScaledVector(Wu,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},jF={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},dl={h:0,s:0,l:0},Fv={h:0,s:0,l:0};function hE(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 St=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=bn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=Gt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Gt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=Gt.workingColorSpace){if(e=JE(e,1),t=Ht(t,0,1),n=Ht(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=hE(s,o,e+1/3),this.g=hE(s,o,e),this.b=hE(s,o,e-1/3)}return Gt.colorSpaceToWorking(this,r),this}setStyle(e,t=bn){function n(o){o!==void 0&&parseFloat(o)<1&&ft("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:ft("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);ft("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=bn){let n=jF[e.toLowerCase()];return n!==void 0?this.setHex(n,t):ft("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=ba(e.r),this.g=ba(e.g),this.b=ba(e.b),this}copyLinearToSRGB(e){return this.r=Zu(e.r),this.g=Zu(e.g),this.b=Zu(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=bn){return Gt.workingToColorSpace(Ai.copy(this),e),Math.round(Ht(Ai.r*255,0,255))*65536+Math.round(Ht(Ai.g*255,0,255))*256+Math.round(Ht(Ai.b*255,0,255))}getHexString(e=bn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Gt.workingColorSpace){Gt.workingToColorSpace(Ai.copy(this),t);let n=Ai.r,r=Ai.g,o=Ai.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=Gt.workingColorSpace){return Gt.workingToColorSpace(Ai.copy(this),t),e.r=Ai.r,e.g=Ai.g,e.b=Ai.b,e}getStyle(e=bn){Gt.workingToColorSpace(Ai.copy(this),e);let t=Ai.r,n=Ai.g,r=Ai.b;return e!==bn?`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(dl),this.setHSL(dl.h+e,dl.s+t,dl.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(dl),e.getHSL(Fv);let n=Tp(dl.h,Fv.h,t),r=Tp(dl.s,Fv.s,t),o=Tp(dl.l,Fv.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}},Ai=new St;St.NAMES=jF;var v9=0,Fr=class extends Cs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:v9++}),this.uuid=vf(),this.name="",this.type="Material",this.blending=jc,this.side=Xi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Zv,this.blendDst=Jv,this.blendEquation=hl,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new St(0,0,0),this.blendAlpha=0,this.depthFunc=Wc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=CE,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Hc,this.stencilZFail=Hc,this.stencilZPass=Hc,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){ft(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ft(`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!==jc&&(n.blending=this.blending),this.side!==Xi&&(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!==Zv&&(n.blendSrc=this.blendSrc),this.blendDst!==Jv&&(n.blendDst=this.blendDst),this.blendEquation!==hl&&(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!==Wc&&(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!==CE&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Hc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Hc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Hc&&(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++}},Op=class extends Fr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new St(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 ml,this.combine=Pb,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 Jn=new G,Nv=new bt,b9=0,Or=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:b9++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=wE,this.updateRanges=[],this.gpuType=Vo,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++)Nv.fromBufferAttribute(this,t),Nv.applyMatrix3(e),this.setXY(t,Nv.x,Nv.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix3(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix4(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyNormalMatrix(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.transformDirection(e),this.setXYZ(t,Jn.x,Jn.y,Jn.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=Ku(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=$i(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Ku(t,this.array)),t}setX(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Ku(t,this.array)),t}setY(e,t){return this.normalized&&(t=$i(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=Ku(t,this.array)),t}setZ(e,t){return this.normalized&&(t=$i(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=Ku(t,this.array)),t}setW(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(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=$i(t,this.array),n=$i(n,this.array),r=$i(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=$i(t,this.array),n=$i(n,this.array),r=$i(r,this.array),o=$i(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!==wE&&(e.usage=this.usage),e}};var Rp=class extends Or{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var kp=class extends Or{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var Hn=class extends Or{constructor(e,t,n){super(new Float32Array(e),t,n)}},y9=0,ho=new Mn,pE=new kr,$u=new G,Ar=new Yi,wp=new Yi,ui=new G,ei=class i extends Cs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:y9++}),this.uuid=vf(),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(KE(e)?kp:Rp)(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 At().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 ho.makeRotationFromQuaternion(e),this.applyMatrix4(ho),this}rotateX(e){return ho.makeRotationX(e),this.applyMatrix4(ho),this}rotateY(e){return ho.makeRotationY(e),this.applyMatrix4(ho),this}rotateZ(e){return ho.makeRotationZ(e),this.applyMatrix4(ho),this}translate(e,t,n){return ho.makeTranslation(e,t,n),this.applyMatrix4(ho),this}scale(e,t,n){return ho.makeScale(e,t,n),this.applyMatrix4(ho),this}lookAt(e){return pE.lookAt(e),pE.updateMatrix(),this.applyMatrix4(pE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter($u).negate(),this.translate($u.x,$u.y,$u.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 Hn(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&&ft("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 Yi);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){vt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new G(-1/0,-1/0,-1/0),new G(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];Ar.setFromBufferAttribute(o),this.morphTargetsRelative?(ui.addVectors(this.boundingBox.min,Ar.min),this.boundingBox.expandByPoint(ui),ui.addVectors(this.boundingBox.max,Ar.max),this.boundingBox.expandByPoint(ui)):(this.boundingBox.expandByPoint(Ar.min),this.boundingBox.expandByPoint(Ar.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&vt('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 pl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){vt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new G,1/0);return}if(e){let n=this.boundingSphere.center;if(Ar.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];wp.setFromBufferAttribute(a),this.morphTargetsRelative?(ui.addVectors(Ar.min,wp.min),Ar.expandByPoint(ui),ui.addVectors(Ar.max,wp.max),Ar.expandByPoint(ui)):(Ar.expandByPoint(wp.min),Ar.expandByPoint(wp.max))}Ar.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)ui.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(ui));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++)ui.fromBufferAttribute(a,c),l&&($u.fromBufferAttribute(e,c),ui.add($u)),r=Math.max(r,n.distanceToSquared(ui))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&vt('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){vt("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 Or(new Float32Array(4*n.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let A=0;A<n.count;A++)a[A]=new G,l[A]=new G;let c=new G,d=new G,u=new G,f=new bt,h=new bt,p=new bt,v=new G,g=new G;function m(A,S,I){c.fromBufferAttribute(n,A),d.fromBufferAttribute(n,S),u.fromBufferAttribute(n,I),f.fromBufferAttribute(o,A),h.fromBufferAttribute(o,S),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[A].add(v),a[S].add(v),a[I].add(v),l[A].add(g),l[S].add(g),l[I].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)m(e.getX(z+0),e.getX(z+1),e.getX(z+2))}let y=new G,x=new G,_=new G,E=new G;function D(A){_.fromBufferAttribute(r,A),E.copy(_);let S=a[A];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(E,S);let L=x.dot(l[A])<0?-1:1;s.setXYZW(A,y.x,y.y,y.z,L)}for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)D(e.getX(z+0)),D(e.getX(z+1)),D(e.getX(z+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 Or(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 G,o=new G,s=new G,a=new G,l=new G,c=new G,d=new G,u=new G;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++)ui.fromBufferAttribute(e,t),ui.normalize(),e.setXYZ(t,ui.x,ui.y,ui.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 Or(f,d,u)}if(this.index===null)return ft("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"})}},qk=new Mn,Vc=new ya,Lv=new pl,Kk=new G,Uv=new G,Bv=new G,zv=new G,mE=new G,Vv=new G,Zk=new G,Gv=new G,qi=class extends kr{constructor(e=new ei,t=new Op){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){Vv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(mE.fromBufferAttribute(u,e),s?Vv.addScaledVector(mE,d):Vv.addScaledVector(mE.sub(t),d))}t.add(Vv)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Lv.copy(n.boundingSphere),Lv.applyMatrix4(o),Vc.copy(e.ray).recast(e.near),!(Lv.containsPoint(Vc.origin)===!1&&(Vc.intersectSphere(Lv,Kk)===null||Vc.origin.distanceToSquared(Kk)>(e.far-e.near)**2))&&(qk.copy(o).invert(),Vc.copy(e.ray).applyMatrix4(qk),!(n.boundingBox!==null&&Vc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Vc)))}_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 x=b,_=y;x<_;x+=3){let E=a.getX(x),D=a.getX(x+1),A=a.getX(x+2);r=Hv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/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),x=a.getX(g+2);r=Hv(this,s,e,n,c,d,u,b,y,x),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 x=b,_=y;x<_;x+=3){let E=x,D=x+1,A=x+2;r=Hv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/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,x=g+2;r=Hv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function x9(i,e,t,n,r,o,s,a){let l;if(e.side===Ki?l=n.intersectTriangle(s,o,r,!0,a):l=n.intersectTriangle(r,o,s,e.side===Xi,a),l===null)return null;Gv.copy(a),Gv.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(Gv);return c<t.near||c>t.far?null:{distance:c,point:Gv.clone(),object:i}}function Hv(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,Uv),i.getVertexPosition(l,Bv),i.getVertexPosition(c,zv);let d=x9(i,e,t,n,Uv,Bv,zv,Zk);if(d){let u=new G;fl.getBarycoord(Zk,Uv,Bv,zv,u),r&&(d.uv=fl.getInterpolatedAttribute(r,a,l,c,u,new bt)),o&&(d.uv1=fl.getInterpolatedAttribute(o,a,l,c,u,new bt)),s&&(d.normal=fl.getInterpolatedAttribute(s,a,l,c,u,new G),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new G,materialIndex:0};fl.getNormal(Uv,Bv,zv,f.normal),d.face=f,d.barycoord=u}return d}var af=class i extends ei{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 Hn(c,3)),this.setAttribute("normal",new Hn(d,3)),this.setAttribute("uv",new Hn(u,2));function p(v,g,m,b,y,x,_,E,D,A,S){let I=x/D,L=_/A,H=x/2,z=_/2,X=E/2,q=D+1,K=A+1,j=0,te=0,ye=new G;for(let xe=0;xe<K;xe++){let Ce=xe*L-z;for(let ce=0;ce<q;ce++){let Ie=ce*I-H;ye[v]=Ie*b,ye[g]=Ce*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=E>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(ce/D),u.push(1-xe/A),j+=1}}for(let xe=0;xe<A;xe++)for(let Ce=0;Ce<D;Ce++){let ce=f+Ce+q*xe,Ie=f+Ce+q*(xe+1),Mt=f+(Ce+1)+q*(xe+1),Lt=f+(Ce+1)+q*xe;l.push(ce,Ie,Lt),l.push(Ie,Mt,Lt),te+=6}a.addGroup(h,te,S),h+=te,f+=j}}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 id(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?(ft("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 Ri(i){let e={};for(let t=0;t<i.length;t++){let n=id(i[t]);for(let r in n)e[r]=n[r]}return e}function _9(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function QE(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Gt.workingColorSpace}var WF={clone:id,merge:Ri},S9=`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 hv=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()}},pv=class{encodeKey(e){return GR(e)}encodeValue(e){return GR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Mj(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 Tj=/%(\d[a-f0-9])/gi,Dj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function GR(i){return encodeURIComponent(i).replace(Tj,(e,t)=>Dj[t]??e)}function fv(i){return`${i}`}var co=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new pv,e.fromString){if(e.fromObject)throw new Ke(2805,!1);this.map=Mj(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(fv):[fv(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(fv(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(fv(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 Ij(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function HR(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function jR(i){return typeof Blob<"u"&&i instanceof Blob}function WR(i){return typeof FormData<"u"&&i instanceof FormData}function Pj(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var $R="Content-Type",XR="Accept",YR="text/plain",qR="application/json",Aj=`${qR}, ${YR}, */*`,Pu=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(Ij(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 Ke(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 uo,this.context??=new hv,!this.params)this.params=new co,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"||HR(this.body)||jR(this.body)||WR(this.body)||Pj(this.body)?this.body:this.body instanceof co?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||WR(this.body)?null:jR(this.body)?this.body.type||null:HR(this.body)?null:typeof this.body=="string"?YR:this.body instanceof co?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?qR: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,x=e.params||this.params,_=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((E,D)=>E.set(D,e.setHeaders[D]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((E,D)=>E.set(D,e.setParams[D]),x)),new i(t,n,g,{params:x,headers:y,context:_,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})}},Lc=(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})(Lc||{}),Au=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new uo,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}},mv=class i extends Au{constructor(e={}){super(e)}type=Lc.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})}},Ou=class i extends Au{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Lc.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})}},il=class extends Au{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}},Oj=200,Rj=204;var kj=new qe("");var Fj=/^\)\]\}',?\n/;var Rw=(()=>{class i{xhrFactory;tracingService=Q(vs,{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 Ke(-2800,!1);let n=this.xhrFactory;return ss(null).pipe(iS(()=>new En(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(XR)||s.setRequestHeader(XR,Aj),!t.headers.has($R)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader($R,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 uo(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new mv({headers:m,status:s.status,statusText:g,url:b}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:b,url:y}=c(),x=null;m!==Rj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Oj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let E=x;x=x.replace(Fj,"");try{x=x!==""?JSON.parse(x):null}catch(D){x=E,_&&(_=!1,x={error:D,text:x})}}_?(o.next(new Ou({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new il({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new il({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 il({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:Lc.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:Lc.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:Lc.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)(Xe(Nc))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Nj(i,e){return e(i)}function Lj(i,e,t){return(n,r)=>Qd(t,()=>e(n,o=>i(o,r)))}var kw=new qe("",{factory:()=>[]}),Fw=new qe(""),KR=new qe("",{factory:()=>!0});var Nw=(()=>{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=Xe(Rw),r},providedIn:"root"})}return i})();var gv=(()=>{class i{backend;injector;chain=null;pendingTasks=Q(au);contributeToStability=Q(KR);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(kw),...this.injector.get(Fw,[])]));this.chain=n.reduceRight((r,o)=>Lj(r,o,this.injector),Nj)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(mh(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(Xe(Nw),Xe(Ti))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Lw=(()=>{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=Xe(gv),r},providedIn:"root"})}return i})();function Ow(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 vv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof Pu)o=t;else{let l;r.headers instanceof uo?l=r.headers:l=new uo(r.headers);let c;r.params&&(r.params instanceof co?c=r.params:c=new co({fromObject:r.params})),o=new Pu(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=ss(o).pipe(nS(l=>this.handler.handle(l)));if(t instanceof Pu||r.observe==="events")return s;let a=s.pipe(tS(l=>l instanceof Ou));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Ke(2806,!1);return l.body}));case"blob":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Ke(2807,!1);return l.body}));case"text":return a.pipe(rr(l=>{if(l.body!==null&&typeof l.body!="string")throw new Ke(2808,!1);return l.body}));default:return a.pipe(rr(l=>l.body))}case"response":return a;default:throw new Ke(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 co().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,Ow(r,n))}post(t,n,r={}){return this.request("POST",t,Ow(r,n))}put(t,n,r={}){return this.request("PUT",t,Ow(r,n))}static \u0275fac=function(n){return new(n||i)(Xe(Lw))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Uj=new qe("",{factory:()=>!0}),Bj="XSRF-TOKEN",zj=new qe("",{factory:()=>Bj}),Vj="X-XSRF-TOKEN",Gj=new qe("",{factory:()=>Vj}),Hj=(()=>{class i{cookieName=Q(zj);doc=Q(wn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=op(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})(),ZR=(()=>{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=Xe(Hj),r},providedIn:"root"})}return i})();function jj(i,e){if(!Q(Uj)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Q(rv).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=Q(ZR).getToken(),n=Q(Gj);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var Uw=(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})(Uw||{});function Wj(i,e){return{\u0275kind:i,\u0275providers:e}}function Bw(...i){let e=[vv,gv,{provide:Lw,useExisting:gv},{provide:Nw,useFactory:()=>Q(kj,{optional:!0})??Q(Rw)},{provide:kw,useValue:jj,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Js(e)}function zw(i){return Wj(Uw.Interceptors,i.map(e=>({provide:kw,useValue:e,multi:!0})))}var $j=new qe(""),Xj="b",Yj="h",qj="s",Kj="st",Zj="u",Jj="rt",Vw=new qe(""),Qj=["GET","HEAD"];function ek(i,e){let s=e,{isCacheActive:t}=s,n=en(s,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!Qj.includes(o)||!n.includeRequestsWithAuthHeaders&&nW(i)||n.filter?.(i)===!1)}function tk(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function eW(i,e,t,n){let{transferCache:r}=i;if(!ek(i,e))return null;if(n)throw new Ke(2803,!1);let o=i.url,s=nk(i,o),a=t.get(s,null),l=tk(e,r);if(a){let{[Xj]:c,[Jj]:d,[Yj]:u,[qj]:f,[Kj]:h,[Zj]:p}=a,v=c;switch(d){case"arraybuffer":v=QR(c);break;case"blob":v=new Blob([QR(c)]);break}let g=new uo(u);return new Ou({body:v,headers:g,status:f,statusText:h,url:p})}return null}function tW(i,e){let t=Q(Vw),n=Q(yu),r=Q($j,{optional:!0}),o=eW(i,t,n,r);if(o)return ss(o);let{transferCache:s}=i,a=tk(t,s),l=i.url,c=nk(i,l);return ek(i,t),e(i)}function nW(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function JR(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function nk(i,e){let{params:t,method:n,responseType:r}=i,o=JR(t),s=i.serializeBody();s instanceof URLSearchParams?s=JR(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=iW(a);return l}function iW(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function QR(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function ik(i){return[{provide:Vw,useFactory:()=>(Ro("NgHttpTransferCache"),R({isCacheActive:!0},i))},{provide:Fw,useValue:tW,multi:!0},{provide:Mu,multi:!0,useFactory:()=>{let e=Q(Dr),t=Q(Vw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var dp=(()=>{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=Xe(rW),r},providedIn:"root"})}return i})(),rW=(()=>{class i extends dp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Oo.NONE:return n;case Oo.HTML:return oa(n,"HTML")?Ao(n):T0(this._doc,String(n)).toString();case Oo.STYLE:return oa(n,"Style")?Ao(n):n;case Oo.SCRIPT:if(oa(n,"Script"))return Ao(n);throw new Ke(5200,!1);case Oo.URL:return oa(n,"URL")?Ao(n):Xh(String(n));case Oo.RESOURCE_URL:if(oa(n,"ResourceURL"))return Ao(n);throw new Ke(5201,!1);default:throw new Ke(5202,!1)}}bypassSecurityTrustHtml(t){return yC(t)}bypassSecurityTrustStyle(t){return xC(t)}bypassSecurityTrustScript(t){return _C(t)}bypassSecurityTrustUrl(t){return SC(t)}bypassSecurityTrustResourceUrl(t){return CC(t)}static \u0275fac=function(n){return new(n||i)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bv=(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})(bv||{});function oW(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function rk(){return oW(bv.EventReplay,wR())}function ok(...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(bv.HttpTransferCacheOptions);return Js([[],[],ER(),t.has(bv.NoHttpTransferCache)||n?[]:ik({}),e])}var Ru=class i{loadingCount=N(0);isLoading=De(()=>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 yv(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 ca=class i{toastsSignal=N([]);toasts=De(()=>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 up=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof il&&this.showError(e)}showError(e){return this.toasterService.showError(yv(e)),Ba(()=>e)}static \u0275fac=function(t){return new(t||i)(Xe(ca))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var sk=(i,e)=>{let t=Q(up),n=Q(Ru),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(uc(s=>(r||t.handleError(s),r?ss(null):Ba(()=>s))),mh(()=>{o&&n.hide()}))};var ak=[sk];var lk={apiUrl:"https://pixeasy-api-esaca7hvgdfxgmcn.westus3-01.azurewebsites.net/api/"};var xv=new qe("ENV"),sye=new qe("LOADER_DELAY");var ck={provide:xv,useValue:lk};function dk(){return[i1(),ok(rk()),Bw(zw(ak)),ck,Ru]}var xk=(()=>{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)($t(aa),$t(Er))};static \u0275dir=Zn({type:i})}return i})(),vp=(()=>{class i extends xk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,features:[Tr]})}return i})(),rl=new qe(""),lW={provide:rl,useExisting:zi(()=>Xw),multi:!0},Xw=(()=>{class i extends vp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([lW]),Tr]})}return i})(),cW={provide:rl,useExisting:zi(()=>Nu),multi:!0};function dW(){let i=lo()?lo().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var uW=new qe(""),Nu=(()=>{class i extends xk{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!dW())}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)($t(aa),$t(Er),$t(uW,8))};static \u0275dir=Zn({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&&ie("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:[ao([cW]),Tr]})}return i})();var Yw=new qe(""),fW=new qe("");function hW(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 pW(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 uk(i){return null}function _k(i){return i!=null}function Sk(i){return Eu(i)?ph(i):i}function Ck(i){let e={};return i.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function wk(i,e){return e.map(t=>t(i))}function mW(i){return!i.validate}function Ek(i){return i.map(e=>mW(e)?e:t=>e.validate(t))}function gW(i){if(!i)return null;let e=i.filter(_k);return e.length==0?null:function(t){return Ck(wk(t,e))}}function Mk(i){return i!=null?gW(Ek(i)):null}function vW(i){if(!i)return null;let e=i.filter(_k);return e.length==0?null:function(t){let n=wk(t,e).map(Sk);return eS(n).pipe(rr(Ck))}}function Tk(i){return i!=null?vW(Ek(i)):null}function fk(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function bW(i){return i._rawValidators}function yW(i){return i._rawAsyncValidators}function Gw(i){return i?Array.isArray(i)?i:[i]:[]}function Sv(i,e){return Array.isArray(i)?i.includes(e):i===e}function hk(i,e){let t=Gw(e);return Gw(i).forEach(r=>{Sv(t,r)||t.push(r)}),t}function pk(i,e){return Gw(e).filter(t=>!Sv(i,t))}var Cv=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=Mk(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Tk(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}},Hw=class extends Cv{name;get formDirective(){return null}get path(){return null}},gp=class extends Cv{_parent=null;name=null;valueAccessor=null},jw=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 ol=(()=>{class i extends jw{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)($t(gp,2))};static \u0275dir=Zn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&ht("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:[Tr]})}return i})();var fp="VALID",_v="INVALID",ku="PENDING",hp="DISABLED",Uc=class{},wv=class extends Uc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},pp=class extends Uc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},mp=class extends Uc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Fu=class extends Uc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var Ww=class extends Uc{source;constructor(e){super(),this.source=e}};function xW(i){return(Ev(i)?i.validators:i)||null}function _W(i){return Array.isArray(i)?Mk(i):i||null}function SW(i,e){return(Ev(e)?e.asyncValidators:i)||null}function CW(i){return Array.isArray(i)?Tk(i):i||null}function Ev(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var $w=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 gn(this.statusReactive)}set status(e){gn(()=>this.statusReactive.set(e))}_status=De(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===fp}get invalid(){return this.status===_v}get pending(){return this.status==ku}get disabled(){return this.status===hp}get enabled(){return this.status!==hp}errors;get pristine(){return gn(this.pristineReactive)}set pristine(e){gn(()=>this.pristineReactive.set(e))}_pristine=De(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return gn(this.touchedReactive)}set touched(e){gn(()=>this.touchedReactive.set(e))}_touched=De(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new Eo;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(hk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(hk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(pk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(pk(e,this._rawAsyncValidators))}hasValidator(e){return Sv(this._rawValidators,e)}hasAsyncValidator(e){return Sv(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(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new mp(!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 mp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new pp(!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 pp(!0,n))}markAsPending(e={}){this.status=ku;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Fu(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(ue(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=hp,this.errors=null,this._forEachChild(r=>{r.disable(ue(R({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new wv(this.value,n)),this._events.next(new Fu(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=fp,this._forEachChild(n=>{n.enable(ue(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(ue(R({},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===fp||this.status===ku)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new wv(this.value,t)),this._events.next(new Fu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(ue(R({},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()?hp:fp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=ku,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=Sk(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 Fu(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new br,this.statusChanges=new br}_calculateStatus(){return this._allControlsDisabled()?hp:this.errors?_v:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ku)?ku:this._anyControlsHaveStatus(_v)?_v:fp}_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 pp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new mp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Ev(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=_W(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=CW(this._rawAsyncValidators)}};var Dk=new qe("",{factory:()=>qw}),qw="always";function wW(i,e){return[...e.path,i]}function EW(i,e,t=qw){TW(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),DW(i,e),PW(i,e),IW(i,e),MW(i,e)}function mk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function MW(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function TW(i,e){let t=bW(i);e.validator!==null?i.setValidators(fk(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=yW(i);e.asyncValidator!==null?i.setAsyncValidators(fk(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();mk(e._rawValidators,r),mk(e._rawAsyncValidators,r)}function DW(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Ik(i,e)})}function IW(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Ik(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Ik(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function PW(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 OW(i){return Object.getPrototypeOf(i.constructor)===vp}function RW(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===Nu?t=o:OW(o)?n=o:r=o}),r||n||t||null}function gk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function vk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var kW=class extends $w{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(xW(t),SW(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ev(t)&&(t.nonNullable||t.initialValueIsDefault)&&(vk(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 Ww(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){gk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){gk(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){vk(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 FW={provide:gp,useExisting:zi(()=>da)},bk=Promise.resolve(),da=(()=>{class i extends gp{_changeDetectorRef;callSetDisabledState;control=new kW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new br;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=RW(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(){EW(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){bk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&iv(n);bk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?wW(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)($t(Hw,9),$t(Yw,10),$t(fW,10),$t(rl,10),$t(nv,8),$t(Dk,8))};static \u0275dir=Zn({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:[ao([FW]),Tr,vu]})}return i})();var NW={provide:rl,useExisting:zi(()=>bp),multi:!0},bp=(()=>{class i extends vp{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=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&ie("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([NW]),Tr]})}return i})();var LW={provide:rl,useExisting:zi(()=>Mv),multi:!0};function Pk(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function UW(i){return i.split(":")[0]}var Mv=(()=>{class i extends vp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Q(Dr).injector;destroyRef=Q(sr);cdr=Q(nv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,A0({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=Pk(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=UW(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([LW]),Tr]})}return i})(),Ak=(()=>{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(Pk(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)($t(Er),$t(aa),$t(Mv,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),BW={provide:rl,useExisting:zi(()=>Ok),multi:!0};function yk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function zW(i){return i.split(":")[0]}var Ok=(()=>{class i extends vp{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=zW(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([BW]),Tr]})}return i})(),Rk=(()=>{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(yk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(yk(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)($t(Er),$t(aa),$t(Ok,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function kk(i){return typeof i=="number"?i:parseFloat(i)}var Fk=(()=>{class i{_validator=uk;_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):uk,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=Zn({type:i,features:[vu]})}return i})(),VW={provide:Yw,useExisting:zi(()=>yp),multi:!0},yp=(()=>{class i extends Fk{max;inputName="max";normalizeInput=t=>kk(t);createValidator=t=>pW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({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&&Pn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[ao([VW]),Tr]})}return i})(),GW={provide:Yw,useExisting:zi(()=>xp),multi:!0},xp=(()=>{class i extends Fk{min;inputName="min";normalizeInput=t=>kk(t);createValidator=t=>hW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({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&&Pn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[ao([GW]),Tr]})}return i})();var HW=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=la({type:i});static \u0275inj=cs({})}return i})();var fo=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Dk,useValue:t.callSetDisabledState??qw}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=la({type:i});static \u0275inj=cs({imports:[HW]})}return i})();var xl={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},_l={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},dF=0,AE=1,uF=2;var Wp=1,fF=2,pf=3,Xi=0,Ki=1,ws=2,Es=0,jc=1,OE=2,RE=3,kE=4,hF=5,hl=100,pF=101,mF=102,gF=103,vF=104,bF=200,yF=201,xF=202,_F=203,Zv=204,Jv=205,SF=206,CF=207,wF=208,EF=209,MF=210,TF=211,DF=212,IF=213,PF=214,Cb=0,wb=1,Eb=2,Wc=3,Mb=4,Tb=5,Db=6,Ib=7,Pb=0,AF=1,OF=2,Bo=0,FE=1,NE=2,LE=3,ed=4,UE=5,BE=6,zE=7;var yE=300,Sl=301,td=302,Ab=303,Ob=304,$p=306,Qu=1e3,Oi=1001,Qv=1002,hi=1003,RF=1004;var Xp=1005;var jn=1006,Rb=1007;var go=1008;var ar=1009,VE=1010,GE=1011,mf=1012,kb=1013,zo=1014,Vo=1015,Ms=1016,Fb=1017,Nb=1018,gf=1020,HE=35902,jE=35899,WE=1021,$E=1022,vo=1023,Ss=1026,Cl=1027,XE=1028,Lb=1029,nd=1030,Ub=1031;var Bb=1033,Yp=33776,qp=33777,Kp=33778,Zp=33779,zb=35840,Vb=35841,Gb=35842,Hb=35843,jb=36196,Wb=37492,$b=37496,Xb=37488,Yb=37489,qb=37490,Kb=37491,Zb=37808,Jb=37809,Qb=37810,ey=37811,ty=37812,ny=37813,iy=37814,ry=37815,oy=37816,sy=37817,ay=37818,ly=37819,cy=37820,dy=37821,uy=36492,fy=36494,hy=36495,py=36283,my=36284,gy=36285,vy=36286;var Dp=2300,eb=2301,Kv=2302,xE=2400,_E=2401,SE=2402;var kF=3200;var YE=0,FF=1,Sa="",bn="srgb",$c="srgb-linear",Ip="linear",on="srgb";var Hc=7680;var CE=519,NF=512,LF=513,UF=514,by=515,BF=516,zF=517,yy=518,VF=519,wE=35044;var qE="300 es",Lo=2e3,Pp=2001;function KE(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function jW(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function ef(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function GF(){let i=ef("canvas");return i.style.display="block",i}var Nk={},tf=null;function ZE(...i){let e="THREE."+i.shift();tf?tf("log",e,...i):console.log(e,...i)}function ft(...i){let e="THREE."+i.shift();tf?tf("warn",e,...i):console.warn(e,...i)}function vt(...i){let e="THREE."+i.shift();tf?tf("error",e,...i):console.error(e,...i)}function nf(...i){let e=i.join(" ");e in Nk||(Nk[e]=!0,ft(...i))}function HF(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 Cs=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}}},Pi=["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"],Lk=1234567,Mp=Math.PI/180,rf=180/Math.PI;function vf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Pi[i&255]+Pi[i>>8&255]+Pi[i>>16&255]+Pi[i>>24&255]+"-"+Pi[e&255]+Pi[e>>8&255]+"-"+Pi[e>>16&15|64]+Pi[e>>24&255]+"-"+Pi[t&63|128]+Pi[t>>8&255]+"-"+Pi[t>>16&255]+Pi[t>>24&255]+Pi[n&255]+Pi[n>>8&255]+Pi[n>>16&255]+Pi[n>>24&255]).toLowerCase()}function Ht(i,e,t){return Math.max(e,Math.min(t,i))}function JE(i,e){return(i%e+e)%e}function WW(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function $W(i,e,t){return i!==e?(t-i)/(e-i):0}function Tp(i,e,t){return(1-t)*i+t*e}function XW(i,e,t,n){return Tp(i,e,1-Math.exp(-t*n))}function YW(i,e=1){return e-Math.abs(JE(i,e*2)-e)}function qW(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function KW(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function ZW(i,e){return i+Math.floor(Math.random()*(e-i+1))}function JW(i,e){return i+Math.random()*(e-i)}function QW(i){return i*(.5-Math.random())}function e9(i){i!==void 0&&(Lk=i);let e=Lk+=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 t9(i){return i*Mp}function n9(i){return i*rf}function i9(i){return(i&i-1)===0&&i!==0}function r9(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function o9(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function s9(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:ft("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Ku(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 $i(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 nn={DEG2RAD:Mp,RAD2DEG:rf,generateUUID:vf,clamp:Ht,euclideanModulo:JE,mapLinear:WW,inverseLerp:$W,lerp:Tp,damp:XW,pingpong:YW,smoothstep:qW,smootherstep:KW,randInt:ZW,randFloat:JW,randFloatSpread:QW,seededRandom:e9,degToRad:t9,radToDeg:n9,isPowerOfTwo:i9,ceilPowerOfTwo:r9,floorPowerOfTwo:o9,setQuaternionFromProperEuler:s9,normalize:$i,denormalize:Ku},bt=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=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(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(Ht(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}},mo=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:ft("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(Ht(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}},G=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(Uk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Uk.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=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(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 Kw.copy(this).projectOnVector(e),this.sub(Kw)}reflect(e){return this.sub(Kw.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(Ht(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}},Kw=new G,Uk=new mo,At=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],x=r[7],_=r[2],E=r[5],D=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*E,o[6]=s*m+a*x+l*D,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*E,o[7]=c*m+d*x+u*D,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*E,o[8]=f*m+h*x+p*D,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(Zw.makeScale(e,t)),this}rotate(e){return this.premultiply(Zw.makeRotation(-e)),this}translate(e,t){return this.premultiply(Zw.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)}},Zw=new At,Bk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),zk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function a9(){let i={enabled:!0,workingColorSpace:$c,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=ba(r.r),r.g=ba(r.g),r.b=ba(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===on&&(r.r=Zu(r.r),r.g=Zu(r.g),r.b=Zu(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===Sa?Ip: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 nf("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return nf("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({[$c]:{primaries:e,whitePoint:n,transfer:Ip,toXYZ:Bk,fromXYZ:zk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:bn},outputColorSpaceConfig:{drawingBufferColorSpace:bn}},[bn]:{primaries:e,whitePoint:n,transfer:on,toXYZ:Bk,fromXYZ:zk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:bn}}}),i}var Gt=a9();function ba(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Zu(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Lu,tb=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{Lu===void 0&&(Lu=ef("canvas")),Lu.width=e.width,Lu.height=e.height;let r=Lu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Lu}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=ef("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]=ba(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(ba(t[n]/255)*255):t[n]=ba(t[n]);return{data:t,width:e.width,height:e.height}}else return ft("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},l9=0,of=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:l9++}),this.uuid=vf(),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(Jw(r[s].image)):o.push(Jw(r[s]))}else o=Jw(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function Jw(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?tb.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(ft("Texture: Unable to serialize Texture."),{})}var c9=0,Qw=new G,Go=(()=>{class i extends Cs{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Oi,o=Oi,s=jn,a=go,l=vo,c=ar,d=i.DEFAULT_ANISOTROPY,u=Sa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:c9++}),this.uuid=vf(),this.name="",this.source=new of(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 bt(0,0),this.repeat=new bt(1,1),this.center=new bt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new At,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(Qw).x}get height(){return this.source.getSize(Qw).y}get depth(){return this.source.getSize(Qw).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){ft(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){ft(`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!==yE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Qu:t.x=t.x-Math.floor(t.x);break;case Oi:t.x=t.x<0?0:1;break;case Qv: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 Qu:t.y=t.y-Math.floor(t.y);break;case Oi:t.y=t.y<0?0:1;break;case Qv: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=yE,i.DEFAULT_ANISOTROPY=1,i})(),An=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,x=(h+1)/2,_=(m+1)/2,E=(d+f)/4,D=(u+v)/4,A=(p+g)/4;return y>x&&y>_?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=E/n,o=D/n):x>_?x<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),n=E/r,o=A/r):_<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),n=D/o,r=A/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=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this.w=Ht(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this.w=Ht(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(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}},nb=class extends Cs{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,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 An(0,0,e,t),this.scissorTest=!1,this.viewport=new An(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new Go(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:jn,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 of(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"})}},Rr=class extends nb{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Ap=class extends Go{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=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var ib=class extends Go{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=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yi=class{constructor(e=new G(1/0,1/0,1/0),t=new G(-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(ko.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ko.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=ko.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,ko):ko.fromBufferAttribute(o,s),ko.applyMatrix4(e.matrixWorld),this.expandByPoint(ko);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Dv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Dv.copy(n.boundingBox)),Dv.applyMatrix4(e.matrixWorld),this.union(Dv)}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,ko),ko.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(_p),Iv.subVectors(this.max,_p),Uu.subVectors(e.a,_p),Bu.subVectors(e.b,_p),zu.subVectors(e.c,_p),sl.subVectors(Bu,Uu),al.subVectors(zu,Bu),Bc.subVectors(Uu,zu);let t=[0,-sl.z,sl.y,0,-al.z,al.y,0,-Bc.z,Bc.y,sl.z,0,-sl.x,al.z,0,-al.x,Bc.z,0,-Bc.x,-sl.y,sl.x,0,-al.y,al.x,0,-Bc.y,Bc.x,0];return!eE(t,Uu,Bu,zu,Iv)||(t=[1,0,0,0,1,0,0,0,1],!eE(t,Uu,Bu,zu,Iv))?!1:(Pv.crossVectors(sl,al),t=[Pv.x,Pv.y,Pv.z],eE(t,Uu,Bu,zu,Iv))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ko).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ko).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:(ua[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ua[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ua[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ua[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ua[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ua[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ua[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ua[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ua),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}},ua=[new G,new G,new G,new G,new G,new G,new G,new G],ko=new G,Dv=new Yi,Uu=new G,Bu=new G,zu=new G,sl=new G,al=new G,Bc=new G,_p=new G,Iv=new G,Pv=new G,zc=new G;function eE(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){zc.fromArray(i,o);let a=r.x*Math.abs(zc.x)+r.y*Math.abs(zc.y)+r.z*Math.abs(zc.z),l=e.dot(zc),c=t.dot(zc),d=n.dot(zc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var d9=new Yi,Sp=new G,tE=new G,pl=class{constructor(e=new G,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):d9.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;Sp.subVectors(e,this.center);let t=Sp.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(Sp,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):(tE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Sp.copy(e.center).add(tE)),this.expandByPoint(Sp.copy(e.center).sub(tE))),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}},fa=new G,nE=new G,Av=new G,ll=new G,iE=new G,Ov=new G,rE=new G,ya=class{constructor(e=new G,t=new G(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,fa)),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=fa.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(fa.copy(this.origin).addScaledVector(this.direction,t),fa.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){nE.copy(e).add(t).multiplyScalar(.5),Av.copy(t).sub(e).normalize(),ll.copy(this.origin).sub(nE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Av),a=ll.dot(this.direction),l=-ll.dot(Av),c=ll.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(nE).addScaledVector(Av,f),h}intersectSphere(e,t){fa.subVectors(e.center,this.origin);let n=fa.dot(this.direction),r=fa.dot(fa)-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,fa)!==null}intersectTriangle(e,t,n,r,o){iE.subVectors(t,e),Ov.subVectors(n,e),rE.crossVectors(iE,Ov);let s=this.direction.dot(rE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;ll.subVectors(this.origin,e);let l=a*this.direction.dot(Ov.crossVectors(ll,Ov));if(l<0)return null;let c=a*this.direction.dot(iE.cross(ll));if(c<0||l+c>s)return null;let d=-a*ll.dot(rE);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)}},Mn=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/Vu.setFromMatrixColumn(e,0).length(),o=1/Vu.setFromMatrixColumn(e,1).length(),s=1/Vu.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(u9,e,f9)}lookAt(e,t,n){let r=this.elements;return Pr.subVectors(e,t),Pr.lengthSq()===0&&(Pr.z=1),Pr.normalize(),cl.crossVectors(n,Pr),cl.lengthSq()===0&&(Math.abs(n.z)===1?Pr.x+=1e-4:Pr.z+=1e-4,Pr.normalize(),cl.crossVectors(n,Pr)),cl.normalize(),Rv.crossVectors(Pr,cl),r[0]=cl.x,r[4]=Rv.x,r[8]=Pr.x,r[1]=cl.y,r[5]=Rv.y,r[9]=Pr.y,r[2]=cl.z,r[6]=Rv.z,r[10]=Pr.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],x=n[11],_=n[15],E=r[0],D=r[4],A=r[8],S=r[12],I=r[1],L=r[5],H=r[9],z=r[13],X=r[2],q=r[6],K=r[10],j=r[14],te=r[3],ye=r[7],xe=r[11],Ce=r[15];return o[0]=s*E+a*I+l*X+c*te,o[4]=s*D+a*L+l*q+c*ye,o[8]=s*A+a*H+l*K+c*xe,o[12]=s*S+a*z+l*j+c*Ce,o[1]=d*E+u*I+f*X+h*te,o[5]=d*D+u*L+f*q+h*ye,o[9]=d*A+u*H+f*K+h*xe,o[13]=d*S+u*z+f*j+h*Ce,o[2]=p*E+v*I+g*X+m*te,o[6]=p*D+v*L+g*q+m*ye,o[10]=p*A+v*H+g*K+m*xe,o[14]=p*S+v*z+g*j+m*Ce,o[3]=b*E+y*I+x*X+_*te,o[7]=b*D+y*L+x*q+_*ye,o[11]=b*A+y*H+x*K+_*xe,o[15]=b*S+y*z+x*j+_*Ce,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,x=a*f-l*u,_=s*h-c*d,E=s*f-l*d,D=s*u-a*d;return t*(v*b-g*y+m*x)-n*(p*b-g*_+m*E)+r*(p*y-v*_+m*D)-o*(p*x-v*E+g*D)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],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,x=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,_=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,E=t*b+n*y+r*x+o*_;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/E;return e[0]=b*D,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*D,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*D,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*D,e[4]=y*D,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*D,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*D,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*D,e[8]=x*D,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*D,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*D,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*D,e[12]=_*D,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*D,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*D,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*D,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,x=l*u,_=n.x,E=n.y,D=n.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*E,r[5]=(1-(f+m))*E,r[6]=(g+b)*E,r[7]=0,r[8]=(p+y)*D,r[9]=(g-b)*D,r[10]=(1-(f+v))*D,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=Vu.set(r[0],r[1],r[2]).length(),s=Vu.set(r[4],r[5],r[6]).length(),a=Vu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Fo.copy(this);let c=1/o,d=1/s,u=1/a;return Fo.elements[0]*=c,Fo.elements[1]*=c,Fo.elements[2]*=c,Fo.elements[4]*=d,Fo.elements[5]*=d,Fo.elements[6]*=d,Fo.elements[8]*=u,Fo.elements[9]*=u,Fo.elements[10]*=u,t.setFromRotationMatrix(Fo),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=Lo,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===Lo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Pp)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=Lo,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===Lo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Pp)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}},Vu=new G,Fo=new Mn,u9=new G(0,0,0),f9=new G(1,1,1),cl=new G,Rv=new G,Pr=new G,Vk=new Mn,Gk=new mo,ml=(()=>{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(Ht(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(-Ht(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(Ht(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(-Ht(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(Ht(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(-Ht(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:ft("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return Vk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Vk,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return Gk.setFromEuler(this),this.setFromQuaternion(Gk,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})(),sf=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}},h9=0,Hk=new G,Gu=new mo,ha=new Mn,kv=new G,Cp=new G,p9=new G,m9=new mo,jk=new G(1,0,0),Wk=new G(0,1,0),$k=new G(0,0,1),Xk={type:"added"},g9={type:"removed"},Hu={type:"childadded",child:null},oE={type:"childremoved",child:null},kr=(()=>{class i extends Cs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:h9++}),this.uuid=vf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new G,n=new ml,r=new mo,o=new G(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 Mn},normalMatrix:{value:new At}}),this.matrix=new Mn,this.matrixWorld=new Mn,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new sf,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 Gu.setFromAxisAngle(t,n),this.quaternion.multiply(Gu),this}rotateOnWorldAxis(t,n){return Gu.setFromAxisAngle(t,n),this.quaternion.premultiply(Gu),this}rotateX(t){return this.rotateOnAxis(jk,t)}rotateY(t){return this.rotateOnAxis(Wk,t)}rotateZ(t){return this.rotateOnAxis($k,t)}translateOnAxis(t,n){return Hk.copy(t).applyQuaternion(this.quaternion),this.position.add(Hk.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(jk,t)}translateY(t){return this.translateOnAxis(Wk,t)}translateZ(t){return this.translateOnAxis($k,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ha.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?kv.copy(t):kv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Cp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ha.lookAt(Cp,kv,this.up):ha.lookAt(kv,Cp,this.up),this.quaternion.setFromRotationMatrix(ha),o&&(ha.extractRotation(o.matrixWorld),Gu.setFromRotationMatrix(ha),this.quaternion.premultiply(Gu.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(vt("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(Xk),Hu.child=t,this.dispatchEvent(Hu),Hu.child=null):vt("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(g9),oE.child=t,this.dispatchEvent(oE),oE.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),ha.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ha.multiply(t.parent.matrixWorld)),t.applyMatrix4(ha),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Xk),Hu.child=t,this.dispatchEvent(Hu),Hu.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(Cp,t,p9),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Cp,m9,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=>ue(R({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>R({},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 G(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),No=new G,pa=new G,sE=new G,ma=new G,ju=new G,Wu=new G,Yk=new G,aE=new G,lE=new G,cE=new G,dE=new An,uE=new An,fE=new An,fl=class i{constructor(e=new G,t=new G,n=new G){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),No.subVectors(e,t),r.cross(No);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){No.subVectors(r,t),pa.subVectors(n,t),sE.subVectors(e,t);let s=No.dot(No),a=No.dot(pa),l=No.dot(sE),c=pa.dot(pa),d=pa.dot(sE),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,ma)===null?!1:ma.x>=0&&ma.y>=0&&ma.x+ma.y<=1}static getInterpolation(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,ma)===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,ma.x),l.addScaledVector(s,ma.y),l.addScaledVector(a,ma.z),l)}static getInterpolatedAttribute(e,t,n,r,o,s){return dE.setScalar(0),uE.setScalar(0),fE.setScalar(0),dE.fromBufferAttribute(e,t),uE.fromBufferAttribute(e,n),fE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(dE,o.x),s.addScaledVector(uE,o.y),s.addScaledVector(fE,o.z),s}static isFrontFacing(e,t,n,r){return No.subVectors(n,t),pa.subVectors(e,t),No.cross(pa).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 No.subVectors(this.c,this.b),pa.subVectors(this.a,this.b),No.cross(pa).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;ju.subVectors(r,n),Wu.subVectors(o,n),aE.subVectors(e,n);let l=ju.dot(aE),c=Wu.dot(aE);if(l<=0&&c<=0)return t.copy(n);lE.subVectors(e,r);let d=ju.dot(lE),u=Wu.dot(lE);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(ju,s);cE.subVectors(e,o);let h=ju.dot(cE),p=Wu.dot(cE);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(Wu,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Yk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Yk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector(ju,s).addScaledVector(Wu,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},jF={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},dl={h:0,s:0,l:0},Fv={h:0,s:0,l:0};function hE(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 St=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=bn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=Gt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Gt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=Gt.workingColorSpace){if(e=JE(e,1),t=Ht(t,0,1),n=Ht(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=hE(s,o,e+1/3),this.g=hE(s,o,e),this.b=hE(s,o,e-1/3)}return Gt.colorSpaceToWorking(this,r),this}setStyle(e,t=bn){function n(o){o!==void 0&&parseFloat(o)<1&&ft("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:ft("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);ft("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=bn){let n=jF[e.toLowerCase()];return n!==void 0?this.setHex(n,t):ft("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=ba(e.r),this.g=ba(e.g),this.b=ba(e.b),this}copyLinearToSRGB(e){return this.r=Zu(e.r),this.g=Zu(e.g),this.b=Zu(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=bn){return Gt.workingToColorSpace(Ai.copy(this),e),Math.round(Ht(Ai.r*255,0,255))*65536+Math.round(Ht(Ai.g*255,0,255))*256+Math.round(Ht(Ai.b*255,0,255))}getHexString(e=bn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Gt.workingColorSpace){Gt.workingToColorSpace(Ai.copy(this),t);let n=Ai.r,r=Ai.g,o=Ai.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=Gt.workingColorSpace){return Gt.workingToColorSpace(Ai.copy(this),t),e.r=Ai.r,e.g=Ai.g,e.b=Ai.b,e}getStyle(e=bn){Gt.workingToColorSpace(Ai.copy(this),e);let t=Ai.r,n=Ai.g,r=Ai.b;return e!==bn?`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(dl),this.setHSL(dl.h+e,dl.s+t,dl.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(dl),e.getHSL(Fv);let n=Tp(dl.h,Fv.h,t),r=Tp(dl.s,Fv.s,t),o=Tp(dl.l,Fv.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}},Ai=new St;St.NAMES=jF;var v9=0,Fr=class extends Cs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:v9++}),this.uuid=vf(),this.name="",this.type="Material",this.blending=jc,this.side=Xi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Zv,this.blendDst=Jv,this.blendEquation=hl,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new St(0,0,0),this.blendAlpha=0,this.depthFunc=Wc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=CE,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Hc,this.stencilZFail=Hc,this.stencilZPass=Hc,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){ft(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ft(`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!==jc&&(n.blending=this.blending),this.side!==Xi&&(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!==Zv&&(n.blendSrc=this.blendSrc),this.blendDst!==Jv&&(n.blendDst=this.blendDst),this.blendEquation!==hl&&(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!==Wc&&(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!==CE&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Hc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Hc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Hc&&(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++}},Op=class extends Fr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new St(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 ml,this.combine=Pb,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 Jn=new G,Nv=new bt,b9=0,Or=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:b9++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=wE,this.updateRanges=[],this.gpuType=Vo,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++)Nv.fromBufferAttribute(this,t),Nv.applyMatrix3(e),this.setXY(t,Nv.x,Nv.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix3(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix4(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyNormalMatrix(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.transformDirection(e),this.setXYZ(t,Jn.x,Jn.y,Jn.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=Ku(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=$i(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Ku(t,this.array)),t}setX(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Ku(t,this.array)),t}setY(e,t){return this.normalized&&(t=$i(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=Ku(t,this.array)),t}setZ(e,t){return this.normalized&&(t=$i(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=Ku(t,this.array)),t}setW(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(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=$i(t,this.array),n=$i(n,this.array),r=$i(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=$i(t,this.array),n=$i(n,this.array),r=$i(r,this.array),o=$i(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!==wE&&(e.usage=this.usage),e}};var Rp=class extends Or{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var kp=class extends Or{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var Hn=class extends Or{constructor(e,t,n){super(new Float32Array(e),t,n)}},y9=0,ho=new Mn,pE=new kr,$u=new G,Ar=new Yi,wp=new Yi,ui=new G,ei=class i extends Cs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:y9++}),this.uuid=vf(),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(KE(e)?kp:Rp)(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 At().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 ho.makeRotationFromQuaternion(e),this.applyMatrix4(ho),this}rotateX(e){return ho.makeRotationX(e),this.applyMatrix4(ho),this}rotateY(e){return ho.makeRotationY(e),this.applyMatrix4(ho),this}rotateZ(e){return ho.makeRotationZ(e),this.applyMatrix4(ho),this}translate(e,t,n){return ho.makeTranslation(e,t,n),this.applyMatrix4(ho),this}scale(e,t,n){return ho.makeScale(e,t,n),this.applyMatrix4(ho),this}lookAt(e){return pE.lookAt(e),pE.updateMatrix(),this.applyMatrix4(pE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter($u).negate(),this.translate($u.x,$u.y,$u.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 Hn(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&&ft("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 Yi);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){vt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new G(-1/0,-1/0,-1/0),new G(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];Ar.setFromBufferAttribute(o),this.morphTargetsRelative?(ui.addVectors(this.boundingBox.min,Ar.min),this.boundingBox.expandByPoint(ui),ui.addVectors(this.boundingBox.max,Ar.max),this.boundingBox.expandByPoint(ui)):(this.boundingBox.expandByPoint(Ar.min),this.boundingBox.expandByPoint(Ar.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&vt('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 pl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){vt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new G,1/0);return}if(e){let n=this.boundingSphere.center;if(Ar.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];wp.setFromBufferAttribute(a),this.morphTargetsRelative?(ui.addVectors(Ar.min,wp.min),Ar.expandByPoint(ui),ui.addVectors(Ar.max,wp.max),Ar.expandByPoint(ui)):(Ar.expandByPoint(wp.min),Ar.expandByPoint(wp.max))}Ar.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)ui.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(ui));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++)ui.fromBufferAttribute(a,c),l&&($u.fromBufferAttribute(e,c),ui.add($u)),r=Math.max(r,n.distanceToSquared(ui))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&vt('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){vt("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 Or(new Float32Array(4*n.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let A=0;A<n.count;A++)a[A]=new G,l[A]=new G;let c=new G,d=new G,u=new G,f=new bt,h=new bt,p=new bt,v=new G,g=new G;function m(A,S,I){c.fromBufferAttribute(n,A),d.fromBufferAttribute(n,S),u.fromBufferAttribute(n,I),f.fromBufferAttribute(o,A),h.fromBufferAttribute(o,S),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[A].add(v),a[S].add(v),a[I].add(v),l[A].add(g),l[S].add(g),l[I].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)m(e.getX(z+0),e.getX(z+1),e.getX(z+2))}let y=new G,x=new G,_=new G,E=new G;function D(A){_.fromBufferAttribute(r,A),E.copy(_);let S=a[A];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(E,S);let L=x.dot(l[A])<0?-1:1;s.setXYZW(A,y.x,y.y,y.z,L)}for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)D(e.getX(z+0)),D(e.getX(z+1)),D(e.getX(z+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 Or(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 G,o=new G,s=new G,a=new G,l=new G,c=new G,d=new G,u=new G;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++)ui.fromBufferAttribute(e,t),ui.normalize(),e.setXYZ(t,ui.x,ui.y,ui.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 Or(f,d,u)}if(this.index===null)return ft("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"})}},qk=new Mn,Vc=new ya,Lv=new pl,Kk=new G,Uv=new G,Bv=new G,zv=new G,mE=new G,Vv=new G,Zk=new G,Gv=new G,qi=class extends kr{constructor(e=new ei,t=new Op){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){Vv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(mE.fromBufferAttribute(u,e),s?Vv.addScaledVector(mE,d):Vv.addScaledVector(mE.sub(t),d))}t.add(Vv)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Lv.copy(n.boundingSphere),Lv.applyMatrix4(o),Vc.copy(e.ray).recast(e.near),!(Lv.containsPoint(Vc.origin)===!1&&(Vc.intersectSphere(Lv,Kk)===null||Vc.origin.distanceToSquared(Kk)>(e.far-e.near)**2))&&(qk.copy(o).invert(),Vc.copy(e.ray).applyMatrix4(qk),!(n.boundingBox!==null&&Vc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Vc)))}_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 x=b,_=y;x<_;x+=3){let E=a.getX(x),D=a.getX(x+1),A=a.getX(x+2);r=Hv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/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),x=a.getX(g+2);r=Hv(this,s,e,n,c,d,u,b,y,x),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 x=b,_=y;x<_;x+=3){let E=x,D=x+1,A=x+2;r=Hv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/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,x=g+2;r=Hv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function x9(i,e,t,n,r,o,s,a){let l;if(e.side===Ki?l=n.intersectTriangle(s,o,r,!0,a):l=n.intersectTriangle(r,o,s,e.side===Xi,a),l===null)return null;Gv.copy(a),Gv.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(Gv);return c<t.near||c>t.far?null:{distance:c,point:Gv.clone(),object:i}}function Hv(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,Uv),i.getVertexPosition(l,Bv),i.getVertexPosition(c,zv);let d=x9(i,e,t,n,Uv,Bv,zv,Zk);if(d){let u=new G;fl.getBarycoord(Zk,Uv,Bv,zv,u),r&&(d.uv=fl.getInterpolatedAttribute(r,a,l,c,u,new bt)),o&&(d.uv1=fl.getInterpolatedAttribute(o,a,l,c,u,new bt)),s&&(d.normal=fl.getInterpolatedAttribute(s,a,l,c,u,new G),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new G,materialIndex:0};fl.getNormal(Uv,Bv,zv,f.normal),d.face=f,d.barycoord=u}return d}var af=class i extends ei{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 Hn(c,3)),this.setAttribute("normal",new Hn(d,3)),this.setAttribute("uv",new Hn(u,2));function p(v,g,m,b,y,x,_,E,D,A,S){let I=x/D,L=_/A,H=x/2,z=_/2,X=E/2,q=D+1,K=A+1,j=0,te=0,ye=new G;for(let xe=0;xe<K;xe++){let Ce=xe*L-z;for(let ce=0;ce<q;ce++){let Ie=ce*I-H;ye[v]=Ie*b,ye[g]=Ce*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=E>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(ce/D),u.push(1-xe/A),j+=1}}for(let xe=0;xe<A;xe++)for(let Ce=0;Ce<D;Ce++){let ce=f+Ce+q*xe,Ie=f+Ce+q*(xe+1),Mt=f+(Ce+1)+q*(xe+1),Lt=f+(Ce+1)+q*xe;l.push(ce,Ie,Lt),l.push(Ie,Mt,Lt),te+=6}a.addGroup(h,te,S),h+=te,f+=j}}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 id(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?(ft("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 Ri(i){let e={};for(let t=0;t<i.length;t++){let n=id(i[t]);for(let r in n)e[r]=n[r]}return e}function _9(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function QE(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Gt.workingColorSpace}var WF={clone:id,merge:Ri},S9=`void main() {
|
|
6
6
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
7
7
|
}`,C9=`void main() {
|
|
8
8
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|