@pixeasy/customizer 0.0.23-beta.stage → 0.0.23-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 S4=Object.defineProperty,C4=Object.defineProperties;var w4=Object.getOwnProp
2
2
  ${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
3
3
  `)}`:"",this.name="UnsubscriptionError",this.errors=t});function uh(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(kt(n))try{n()}catch(o){e=o instanceof Km?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{BD(o)}catch(s){e=e??[],s instanceof Km?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Km(e)}}add(e){var t;if(e&&e!==this)if(this.closed)BD(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)&&uh(t,e)}remove(e){let{_finalizers:t}=this;t&&uh(t,e),e instanceof i&&e._removeParent(this)}};Ui.EMPTY=(()=>{let i=new Ui;return i.closed=!0,i})();var $_=Ui.EMPTY;function Zm(i){return i instanceof Ui||i&&"closed"in i&&kt(i.remove)&&kt(i.add)&&kt(i.unsubscribe)}function BD(i){kt(i)?i():i.unsubscribe()}var Co={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Wd={setTimeout(i,e,...t){let{delegate:n}=Wd;return n?.setTimeout?n.setTimeout(i,e,...t):setTimeout(i,e,...t)},clearTimeout(i){let{delegate:e}=Wd;return(e?.clearTimeout||clearTimeout)(i)},delegate:void 0};function Jm(i){Wd.setTimeout(()=>{let{onUnhandledError:e}=Co;if(e)e(i);else throw i})}function X_(){}var zD=Y_("C",void 0,void 0);function VD(i){return Y_("E",void 0,i)}function GD(i){return Y_("N",i,void 0)}function Y_(i,e,t){return{kind:i,value:e,error:t}}var sc=null;function $d(i){if(Co.useDeprecatedSynchronousErrorHandling){let e=!sc;if(e&&(sc={errorThrown:!1,error:null}),i(),e){let{errorThrown:t,error:n}=sc;if(sc=null,t)throw n}}else i()}function HD(i){Co.useDeprecatedSynchronousErrorHandling&&sc&&(sc.errorThrown=!0,sc.error=i)}var ac=class extends Ui{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Zm(e)&&e.add(this)):this.destination=F4}static create(e,t,n){return new La(e,t,n)}next(e){this.isStopped?K_(GD(e),this):this._next(e)}error(e){this.isStopped?K_(VD(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?K_(zD,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()}}},R4=Function.prototype.bind;function q_(i,e){return R4.call(i,e)}var Z_=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){Qm(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){Qm(n)}else Qm(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){Qm(t)}}},La=class extends ac{constructor(e,t,n){super();let r;if(kt(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let o;this&&Co.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&q_(e.next,o),error:e.error&&q_(e.error,o),complete:e.complete&&q_(e.complete,o)}):r=e}this.destination=new Z_(r)}};function Qm(i){Co.useDeprecatedSynchronousErrorHandling?HD(i):Jm(i)}function k4(i){throw i}function K_(i,e){let{onStoppedNotification:t}=Co;t&&Wd.setTimeout(()=>t(i,e))}var F4={closed:!0,next:X_,error:k4,complete:X_};var Xd=typeof Symbol=="function"&&Symbol.observable||"@@observable";function eg(i){return i}function jD(i){return i.length===0?eg:i.length===1?i[0]:function(t){return i.reduce((n,r)=>r(n),t)}}var wn=(()=>{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=L4(t)?t:new La(t,n,r);return $d(()=>{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=WD(n),new n((r,o)=>{let s=new La({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)}[Xd](){return this}pipe(...t){return jD(t)(this)}toPromise(t){return t=WD(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 WD(i){var e;return(e=i??Co.Promise)!==null&&e!==void 0?e:Promise}function N4(i){return i&&kt(i.next)&&kt(i.error)&&kt(i.complete)}function L4(i){return i&&i instanceof ac||N4(i)&&Zm(i)}function U4(i){return kt(i?.lift)}function si(i){return e=>{if(U4(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 ai(i,e,t,n,r){return new J_(i,e,t,n,r)}var J_=class extends ac{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 $D=jd(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var wo=(()=>{class i extends wn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new tg(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new $D}next(t){$d(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){$d(()=>{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(){$d(()=>{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?$_:(this.currentObservers=null,o.push(t),new Ui(()=>{this.currentObservers=null,uh(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new wn;return t.source=this,t}}return i.create=(e,t)=>new tg(e,t),i})(),tg=class extends wo{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:$_}};var fh=class extends wo{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 XD(i){return i&&kt(i.schedule)}function YD(i){return i[i.length-1]}function qD(i){return kt(YD(i))?i.pop():void 0}function KD(i){return XD(YD(i))?i.pop():void 0}function JD(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 ZD(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 lc(i){return this instanceof lc?(this.v=i,this):new lc(i)}function QD(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 lc?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 eI(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 ZD=="function"?ZD(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 ng=i=>i&&typeof i.length=="number"&&typeof i!="function";function ig(i){return kt(i?.then)}function rg(i){return kt(i[Xd])}function og(i){return Symbol.asyncIterator&&kt(i?.[Symbol.asyncIterator])}function sg(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 B4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ag=B4();function lg(i){return kt(i?.[ag])}function cg(i){return QD(this,arguments,function*(){let t=i.getReader();try{for(;;){let{value:n,done:r}=yield lc(t.read());if(r)return yield lc(void 0);yield yield lc(n)}}finally{t.releaseLock()}})}function dg(i){return kt(i?.getReader)}function wi(i){if(i instanceof wn)return i;if(i!=null){if(rg(i))return z4(i);if(ng(i))return V4(i);if(ig(i))return G4(i);if(og(i))return tI(i);if(lg(i))return H4(i);if(dg(i))return j4(i)}throw sg(i)}function z4(i){return new wn(e=>{let t=i[Xd]();if(kt(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function V4(i){return new wn(e=>{for(let t=0;t<i.length&&!e.closed;t++)e.next(i[t]);e.complete()})}function G4(i){return new wn(e=>{i.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,Jm)})}function H4(i){return new wn(e=>{for(let t of i)if(e.next(t),e.closed)return;e.complete()})}function tI(i){return new wn(e=>{W4(i,e).catch(t=>e.error(t))})}function j4(i){return tI(cg(i))}function W4(i,e){var t,n,r,o;return JD(this,void 0,void 0,function*(){try{for(t=eI(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 qr(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 ug(i,e=0){return si((t,n)=>{t.subscribe(ai(n,r=>qr(n,i,()=>n.next(r),e),()=>qr(n,i,()=>n.complete(),e),r=>qr(n,i,()=>n.error(r),e)))})}function fg(i,e=0){return si((t,n)=>{n.add(i.schedule(()=>t.subscribe(n),e))})}function nI(i,e){return wi(i).pipe(fg(e),ug(e))}function iI(i,e){return wi(i).pipe(fg(e),ug(e))}function rI(i,e){return new wn(t=>{let n=0;return e.schedule(function(){n===i.length?t.complete():(t.next(i[n++]),t.closed||this.schedule())})})}function oI(i,e){return new wn(t=>{let n;return qr(t,e,()=>{n=i[ag](),qr(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)}),()=>kt(n?.return)&&n.return()})}function hg(i,e){if(!i)throw new Error("Iterable cannot be null");return new wn(t=>{qr(t,e,()=>{let n=i[Symbol.asyncIterator]();qr(t,e,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function sI(i,e){return hg(cg(i),e)}function aI(i,e){if(i!=null){if(rg(i))return nI(i,e);if(ng(i))return rI(i,e);if(ig(i))return iI(i,e);if(og(i))return hg(i,e);if(lg(i))return oI(i,e);if(dg(i))return sI(i,e)}throw sg(i)}function hh(i,e){return e?aI(i,e):wi(i)}function ss(...i){let e=KD(i);return hh(i,e)}function Ua(i,e){let t=kt(i)?i:()=>i,n=r=>r.error(t());return new wn(e?r=>e.schedule(n,0,r):n)}var lI=jd(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"});function cc(i,e){let t=typeof e=="object";return new Promise((n,r)=>{let o=new La({next:s=>{n(s),o.unsubscribe()},error:r,complete:()=>{t?n(e.defaultValue):r(new lI)}});i.subscribe(o)})}function rr(i,e){return si((t,n)=>{let r=0;t.subscribe(ai(n,o=>{n.next(i.call(e,o,r++))}))})}var{isArray:$4}=Array;function X4(i,e){return $4(e)?i(...e):i(e)}function cI(i){return rr(e=>X4(i,e))}var{isArray:Y4}=Array,{getPrototypeOf:q4,prototype:K4,keys:Z4}=Object;function dI(i){if(i.length===1){let e=i[0];if(Y4(e))return{args:e,keys:null};if(J4(e)){let t=Z4(e);return{args:t.map(n=>e[n]),keys:t}}}return{args:i,keys:null}}function J4(i){return i&&typeof i=="object"&&q4(i)===K4}function uI(i,e){return i.reduce((t,n,r)=>(t[n]=e[r],t),{})}function fI(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;wi(t(v,d++)).subscribe(ai(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?qr(e,s,()=>p(m)):p(m)}f()}catch(m){e.error(m)}}))};return i.subscribe(ai(e,h,()=>{u=!0,f()})),()=>{a?.()}}function pg(i,e,t=1/0){return kt(e)?pg((n,r)=>rr((o,s)=>e(n,o,r,s))(wi(i(n,r))),t):(typeof e=="number"&&(t=e),si((n,r)=>fI(n,r,i,t)))}function Q_(...i){let e=qD(i),{args:t,keys:n}=dI(i),r=new wn(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;wi(t[d]).subscribe(ai(o,f=>{u||(u=!0,c--),a[d]=f},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(n?uI(n,a):a),o.complete())}))}});return e?r.pipe(cI(e)):r}function eS(i,e){return si((t,n)=>{let r=0;t.subscribe(ai(n,o=>i.call(e,o,r++)&&n.next(o)))})}function dc(i){return si((e,t)=>{let n=null,r=!1,o;n=e.subscribe(ai(t,void 0,void 0,s=>{o=wi(i(s,dc(i)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(t))})}function tS(i,e){return kt(e)?pg(i,e,1):pg(i,1)}function ph(i){return si((e,t)=>{try{e.subscribe(t)}finally{t.add(i)}})}function nS(i,e){return si((t,n)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&n.complete();t.subscribe(ai(n,l=>{r?.unsubscribe();let c=0,d=o++;wi(i(l,d)).subscribe(r=ai(n,u=>n.next(e?e(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function iS(i,e,t){let n=kt(i)||e||t?{next:i,error:e,complete:t}:i;return n?si((r,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;r.subscribe(ai(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)}))}):eg}var rS;function mg(){return rS}function as(i){let e=rS;return rS=i,e}var hI=Symbol("NotFound");function Yd(i){return i===hI||i?.name==="\u0275NotFound"}function pI(i){let e=at(null);try{return i()}finally{at(e)}}var Sg="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Ye=class extends Error{code;constructor(e,t){super(qs(e,t)),this.code=e}};function Q4(i){return`NG0${Math.abs(i)}`}function qs(i,e){return`${Q4(i)}${e?": "+e:""}`}var Zr=globalThis;function fn(i){for(let e in i)if(i[e]===fn)return e;throw Error("")}function yI(i,e){for(let t in e)e.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&(i[t]=e[t])}function Cg(i){if(typeof i=="string")return i;if(Array.isArray(i))return`[${i.map(Cg).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 wg(i,e){return i?e?`${i} ${e}`:i:e||""}var e5=fn({__forward_ref__:fn});function zi(i){return i.__forward_ref__=zi,i}function bi(i){return vS(i)?i():i}function vS(i){return typeof i=="function"&&i.hasOwnProperty(e5)&&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 Eg(i){return t5(i,Mg)}function t5(i,e){return i.hasOwnProperty(e)&&i[e]||null}function n5(i){let e=i?.[Mg]??null;return e||null}function sS(i){return i&&i.hasOwnProperty(vg)?i[vg]:null}var Mg=fn({\u0275prov:fn}),vg=fn({\u0275inj:fn}),Xe=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 bS(i){return i&&!!i.\u0275providers}var yS=fn({\u0275cmp:fn}),xS=fn({\u0275dir:fn}),_S=fn({\u0275pipe:fn});var gh=fn({\u0275fac:fn}),mc=fn({__NG_ELEMENT_ID__:fn}),mI=fn({__NG_ENV_ID__:fn});function Ks(i){return CS(i,"@Component"),i[yS]||null}function Tg(i){return CS(i,"@Directive"),i[xS]||null}function SS(i){return CS(i,"@Pipe"),i[_S]||null}function CS(i,e){if(i==null)throw new Ye(-919,!1)}function _h(i){return typeof i=="string"?i:i==null?"":String(i)}var xI=fn({ngErrorCode:fn}),i5=fn({ngErrorMessage:fn}),r5=fn({ngTokenPath:fn});function wS(i,e){return _I("",-200,e)}function Dg(i,e){throw new Ye(-201,!1)}function _I(i,e,t){let n=new Ye(e,i);return n[xI]=e,n[i5]=i,t&&(n[r5]=t),n}function o5(i){return i[xI]}var aS;function SI(){return aS}function Bi(i){let e=aS;return aS=i,e}function ES(i,e,t){let n=Eg(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;Dg(i,"")}var s5={},uc=s5,a5="__NG_DI_FLAG__",lS=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=fc(t)||0;try{return this.injector.get(e,n&8?null:uc,n)}catch(r){if(Yd(r))return r;throw r}}};function l5(i,e=0){let t=mg();if(t===void 0)throw new Ye(-203,!1);if(t===null)return ES(i,void 0,e);{let n=c5(e),r=t.retrieve(i,n);if(Yd(r)){if(n.optional)return null;throw r}return r}}function We(i,e=0){return(SI()||l5)(bi(i),e)}function Z(i,e){return We(i,fc(e))}function fc(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function c5(i){return{optional:!!(i&8),host:!!(i&1),self:!!(i&2),skipSelf:!!(i&4)}}function cS(i){let e=[];for(let t=0;t<i.length;t++){let n=bi(i[t]);if(Array.isArray(n)){if(n.length===0)throw new Ye(900,!1);let r,o=0;for(let s=0;s<n.length;s++){let a=n[s],l=d5(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(We(r,o))}else e.push(We(n))}return e}function d5(i){return i[a5]}function Ba(i,e){let t=i.hasOwnProperty(gh);return t?i[gh]:null}function CI(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 wI(i){return i.flat(Number.POSITIVE_INFINITY)}function Ig(i,e){i.forEach(t=>Array.isArray(t)?Ig(t,e):e(t))}function MS(i,e,t){e>=i.length?i.push(t):i.splice(e,0,t)}function Sh(i,e){return e>=i.length-1?i.pop():i.splice(e,1)[0]}function EI(i,e){let t=[];for(let n=0;n<i;n++)t.push(e);return t}function MI(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 Pg(i,e,t){let n=Kd(i,e);return n>=0?i[n|1]=t:(n=~n,MI(i,n,e,t)),n}function Ag(i,e){let t=Kd(i,e);if(t>=0)return i[t|1]}function Kd(i,e){return u5(i,e,1)}function u5(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 Ga={},Ei=[],Zs=new Xe(""),TS=new Xe("",-1),DS=new Xe(""),vh=class{get(e,t=uc){if(t===uc){let r=_I("",-201);throw r.name="\u0275NotFound",r}return t}};function Js(i){return{\u0275providers:i}}function TI(i){return Js([{provide:Zs,multi:!0,useValue:i}])}function DI(...i){return{\u0275providers:Og(!0,i),\u0275fromNgModule:!0}}function Og(i,...e){let t=[],n=new Set,r,o=s=>{t.push(s)};return Ig(e,s=>{let a=s;bg(a,o,[],n)&&(r||=[],r.push(a))}),r!==void 0&&II(r,o),t}function II(i,e){for(let t=0;t<i.length;t++){let{ngModule:n,providers:r}=i[t];IS(r,o=>{e(o,n)})}}function bg(i,e,t,n){if(i=bi(i),!i)return!1;let r=null,o=sS(i),s=!o&&Ks(i);if(!o&&!s){let l=i.ngModule;if(o=sS(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)bg(c,e,t,n)}}else if(o){if(o.imports!=null&&!a){n.add(r);let c;Ig(o.imports,d=>{bg(d,e,t,n)&&(c||=[],c.push(d))}),c!==void 0&&II(c,e)}if(!a){let c=Ba(r)||(()=>new r);e({provide:r,useFactory:c,deps:Ei},r),e({provide:DS,useValue:r,multi:!0},r),e({provide:Zs,useValue:()=>We(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=i;IS(l,d=>{e(d,c)})}}else return!1;return r!==i&&i.providers!==void 0}function IS(i,e){for(let t of i)bS(t)&&(t=t.\u0275providers),Array.isArray(t)?IS(t,e):e(t)}var f5=fn({provide:String,useValue:fn});function PI(i){return i!==null&&typeof i=="object"&&f5 in i}function h5(i){return!!(i&&i.useExisting)}function p5(i){return!!(i&&i.useFactory)}function hc(i){return typeof i=="function"}function AI(i){return!!i.useClass}var Ch=new Xe(""),gg={},gI={},oS;function Zd(){return oS===void 0&&(oS=new vh),oS}var Mi=class{},pc=class extends Mi{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,uS(e,s=>this.processProvider(s)),this.records.set(TS,qd(void 0,this)),r.has("environment")&&this.records.set(Mi,qd(void 0,this));let o=this.records.get(Ch);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(DS,Ei,{self:!0}))}retrieve(e,t){let n=fc(t)||0;try{return this.get(e,uc,n)}catch(r){if(Yd(r))return r;throw r}}destroy(){mh(this),this._destroyed=!0;let e=at(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(),at(e)}}onDestroy(e){return mh(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){mh(this);let t=as(this),n=Bi(void 0),r;try{return e()}finally{as(t),Bi(n)}}get(e,t=uc,n){if(mh(this),e.hasOwnProperty(mI))return e[mI](this);let r=fc(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=y5(e)&&Eg(e);d&&this.injectableDefInScope(d)?c=qd(dS(e),gg):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?Zd():this.parent;return t=r&8&&t===uc?null:t,l.get(e,t)}catch(l){let c=o5(l);throw c===-200||c===-201?new Ye(c,null):l}finally{Bi(a),as(s)}}resolveInjectorInitializers(){let e=at(null),t=as(this),n=Bi(void 0),r;try{let o=this.get(Zs,Ei,{self:!0});for(let s of o)s()}finally{as(t),Bi(n),at(e)}}toString(){return"R3Injector[...]"}processProvider(e){e=bi(e);let t=hc(e)?e:bi(e&&e.provide),n=g5(e);if(!hc(e)&&e.multi===!0){let r=this.records.get(t);r||(r=qd(void 0,gg,!0),r.factory=()=>cS(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=at(null);try{if(t.value===gI)throw wS("");return t.value===gg&&(t.value=gI,t.value=t.factory(void 0,n)),typeof t.value=="object"&&t.value&&b5(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{at(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=bi(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 dS(i){let e=Eg(i),t=e!==null?e.factory:Ba(i);if(t!==null)return t;if(i instanceof Xe)throw new Ye(-204,!1);if(i instanceof Function)return m5(i);throw new Ye(-204,!1)}function m5(i){if(i.length>0)throw new Ye(-204,!1);let t=n5(i);return t!==null?()=>t.factory(i):()=>new i}function g5(i){if(PI(i))return qd(void 0,i.useValue);{let e=PS(i);return qd(e,gg)}}function PS(i,e,t){let n;if(hc(i)){let r=bi(i);return Ba(r)||dS(r)}else if(PI(i))n=()=>bi(i.useValue);else if(p5(i))n=()=>i.useFactory(...cS(i.deps||[]));else if(h5(i))n=(r,o)=>We(bi(i.useExisting),o!==void 0&&o&8?8:void 0);else{let r=bi(i&&(i.useClass||i.provide));if(v5(i))n=()=>new r(...cS(i.deps));else return Ba(r)||dS(r)}return n}function mh(i){if(i.destroyed)throw new Ye(-205,!1)}function qd(i,e,t=!1){return{factory:i,value:e,multi:t?[]:void 0}}function v5(i){return!!i.deps}function b5(i){return i!==null&&typeof i=="object"&&typeof i.ngOnDestroy=="function"}function y5(i){return typeof i=="function"||typeof i=="object"&&i.ngMetadataName==="InjectionToken"}function uS(i,e){for(let t of i)Array.isArray(t)?uS(t,e):t&&bS(t)?uS(t.\u0275providers,e):e(t)}function Jd(i,e){let t;i instanceof pc?(mh(i),t=i):t=new lS(i);let n,r=as(t),o=Bi(void 0);try{return e()}finally{as(r),Bi(o)}}function OI(){return SI()!==void 0||mg()!=null}var Vi=0,Qe=1,Ct=2,Vn=3,Jr=4,Gi=5,Hi=6,Qd=7,kn=8,yr=9,Eo=10,qt=11,eu=12,AS=13,gc=14,li=15,Ha=16,vc=17,ds=18,Qs=19,OS=20,Ys=21,Rg=22,za=23,xr=24,bc=25,ja=26,$t=27,RI=1,Mo=6,us=7,wh=8,yc=9,Dn=10;function Qr(i){return Array.isArray(i)&&typeof i[RI]=="object"}function _r(i){return Array.isArray(i)&&i[RI]===!0}function RS(i){return(i.flags&4)!==0}function fs(i){return i.componentOffset>-1}function tu(i){return(i.flags&1)===1}function hs(i){return!!i.template}function xc(i){return(i[Ct]&512)!==0}function Wa(i){return(i[Ct]&256)===256}var kS="svg",kI="math";function Sr(i){for(;Array.isArray(i);)i=i[Vi];return i}function FS(i,e){return Sr(e[i])}function eo(i,e){return Sr(e[i.index])}function nu(i,e){return i.data[e]}function kg(i,e){return i[e]}function NS(i,e,t,n){t>=i.data.length&&(i.data[t]=null,i.blueprint[t]=null),e[t]=n}function to(i,e){let t=e[i];return Qr(t)?t:t[Vi]}function Fg(i){return(i[Ct]&128)===128}function FI(i){return _r(i[Vn])}function no(i,e){return e==null?null:i[e]}function LS(i){i[vc]=0}function US(i){i[Ct]&1024||(i[Ct]|=1024,Fg(i)&&_c(i))}function NI(i,e){for(;i>0;)e=e[gc],i--;return e}function Eh(i){return!!(i[Ct]&9216||i[xr]?.dirty)}function Ng(i){i[Eo].changeDetectionScheduler?.notify(8),i[Ct]&64&&(i[Ct]|=1024),Eh(i)&&_c(i)}function _c(i){i[Eo].changeDetectionScheduler?.notify(0);let e=Va(i);for(;e!==null&&!(e[Ct]&8192||(e[Ct]|=8192,!Fg(e)));)e=Va(e)}function BS(i,e){if(Wa(i))throw new Ye(911,!1);i[Ys]===null&&(i[Ys]=[]),i[Ys].push(e)}function LI(i,e){if(i[Ys]===null)return;let t=i[Ys].indexOf(e);t!==-1&&i[Ys].splice(t,1)}function Va(i){let e=i[Vn];return _r(e)?e[Vn]:e}function zS(i){return i[Qd]??=[]}function VS(i){return i.cleanup??=[]}function UI(i,e,t,n){let r=zS(e);r.push(t),i.firstCreatePass&&VS(i).push(n,r.length-1)}var It={lFrame:ZI(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var fS=!1;function BI(){return It.lFrame.elementDepthCount}function zI(){It.lFrame.elementDepthCount++}function GS(){It.lFrame.elementDepthCount--}function Lg(){return It.bindingsEnabled}function Ug(){return It.skipHydrationRootTNode!==null}function HS(i){return It.skipHydrationRootTNode===i}function VI(i){It.skipHydrationRootTNode=i}function jS(){It.skipHydrationRootTNode=null}function ht(){return It.lFrame.lView}function In(){return It.lFrame.tView}function J(i){return It.lFrame.contextLView=i,i[kn]}function Q(i){return It.lFrame.contextLView=null,i}function yi(){let i=WS();for(;i!==null&&i.type===64;)i=i.parent;return i}function WS(){return It.lFrame.currentTNode}function GI(){let i=It.lFrame,e=i.currentTNode;return i.isParent?e:e.parent}function iu(i,e){let t=It.lFrame;t.currentTNode=i,t.isParent=e}function $S(){return It.lFrame.isParent}function XS(){It.lFrame.isParent=!1}function HI(){return It.lFrame.contextLView}function YS(){return fS}function bh(i){let e=fS;return fS=i,e}function ru(){let i=It.lFrame,e=i.bindingRootIndex;return e===-1&&(e=i.bindingRootIndex=i.tView.bindingStartIndex),e}function jI(i){return It.lFrame.bindingIndex=i}function $a(){return It.lFrame.bindingIndex++}function qS(i){let e=It.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+i,t}function WI(){return It.lFrame.inI18n}function $I(i,e){let t=It.lFrame;t.bindingIndex=t.bindingRootIndex=i,Bg(e)}function XI(){return It.lFrame.currentDirectiveIndex}function Bg(i){It.lFrame.currentDirectiveIndex=i}function YI(i){let e=It.lFrame.currentDirectiveIndex;return e===-1?null:i[e]}function qI(){return It.lFrame.currentQueryIndex}function zg(i){It.lFrame.currentQueryIndex=i}function x5(i){let e=i[Qe];return e.type===2?e.declTNode:e.type===1?i[Gi]:null}function KS(i,e,t){if(t&4){let r=e,o=i;for(;r=r.parent,r===null&&!(t&1);)if(r=x5(o),r===null||(o=o[gc],r.type&10))break;if(r===null)return!1;e=r,i=o}let n=It.lFrame=KI();return n.currentTNode=e,n.lView=i,!0}function Vg(i){let e=KI(),t=i[Qe];It.lFrame=e,e.currentTNode=t.firstChild,e.lView=i,e.tView=t,e.contextLView=i,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function KI(){let i=It.lFrame,e=i===null?null:i.child;return e===null?ZI(i):e}function ZI(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 JI(){let i=It.lFrame;return It.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var ZS=JI;function Gg(){let i=JI();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 QI(i){return(It.lFrame.contextLView=NI(i,It.lFrame.contextLView))[kn]}function ea(){return It.lFrame.selectedIndex}function Xa(i){It.lFrame.selectedIndex=i}function Mh(){let i=It.lFrame;return nu(i.tView,i.selectedIndex)}function Ya(){It.lFrame.currentNamespace=kS}function ou(){_5()}function _5(){It.lFrame.currentNamespace=null}function JS(){return It.lFrame.currentNamespace}var eP=!0;function Hg(){return eP}function ta(i){eP=i}function hS(i,e=null,t=null,n){let r=tP(i,e,t,n);return r.resolveInjectorInitializers(),r}function tP(i,e=null,t=null,n,r=new Set){let o=[t||Ei,DI(i)],s;return new pc(o,e||Zd(),s||null,r)}var Ti=class i{static THROW_IF_NOT_FOUND=uc;static NULL=new vh;static create(e,t){if(Array.isArray(e))return hS({name:""},t,e,"");{let n=e.name??"";return hS({name:n},e.parent,e.providers,n)}}static \u0275prov=_e({token:i,providedIn:"any",factory:()=>We(TS)});static __NG_ELEMENT_ID__=-1},Cn=new Xe(""),sr=(()=>{class i{static __NG_ELEMENT_ID__=S5;static __NG_ENV_ID__=t=>t}return i})(),yg=class extends sr{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Wa(this._lView)}onDestroy(e){let t=this._lView;return BS(t,e),()=>LI(t,e)}};function S5(){return new yg(ht())}var nP=!1,iP=new Xe(""),qa=(()=>{class i{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new fh(!1);debugTaskTracker=Z(iP,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new wn(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})(),pS=class extends wo{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,OI()&&(this.destroyRef=Z(sr,{optional:!0})??void 0,this.pendingTasks=Z(qa,{optional:!0})??void 0)}emit(e){let t=at(null);try{super.next(e)}finally{at(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=pS;function xg(...i){}function QS(i){let e,t;function n(){i=xg;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 rP(i){return queueMicrotask(()=>i()),()=>{i=xg}}var e1="isAngularZone",yh=e1+"_ID",C5=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=nP}=e;if(typeof Zone>"u")throw new Ye(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,M5(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(e1)===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new Ye(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new Ye(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,w5,xg,xg);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)}},w5={};function t1(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 E5(i){if(i.isCheckStableRunning||i.callbackScheduled)return;i.callbackScheduled=!0;function e(){QS(()=>{i.callbackScheduled=!1,mS(i),i.isCheckStableRunning=!0,t1(i),i.isCheckStableRunning=!1})}i.scheduleInRootZone?Zone.root.run(()=>{e()}):i._outer.run(()=>{e()}),mS(i)}function M5(i){let e=()=>{E5(i)},t=C5++;i._inner=i._inner.fork({name:"angular",properties:{[e1]:!0,[yh]:t,[yh+t]:!0},onInvokeTask:(n,r,o,s,a,l)=>{if(T5(l))return n.invokeTask(o,s,a,l);try{return vI(i),n.invokeTask(o,s,a,l)}finally{(i.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&e(),bI(i)}},onInvoke:(n,r,o,s,a,l,c)=>{try{return vI(i),n.invoke(o,s,a,l,c)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!D5(l)&&e(),bI(i)}},onHasTask:(n,r,o,s)=>{n.hasTask(o,s),r===o&&(s.change=="microTask"?(i._hasPendingMicrotasks=s.microTask,mS(i),t1(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 mS(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function vI(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function bI(i){i._nesting--,t1(i)}var xh=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 T5(i){return oP(i,"__ignore_ng_zone__")}function D5(i){return oP(i,"__scheduler_tick__")}function oP(i,e){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[e]===!0}var Kr=class{_console=console;handleError(e){this._console.error("ERROR",e)}},na=new Xe("",{factory:()=>{let i=Z(or),e=Z(Mi),t;return n=>{i.runOutsideAngular(()=>{e.destroyed&&!t?setTimeout(()=>{throw n}):(t??=e.get(Kr),t.handleError(n))})}}}),sP={provide:Zs,useValue:()=>{let i=Z(Kr,{optional:!0})},multi:!0},I5=new Xe("",{factory:()=>{let i=Z(Cn).defaultView;if(!i)return;let e=Z(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(),Z(sr).onDestroy(()=>{i.removeEventListener("error",n),i.removeEventListener("unhandledrejection",t)})}});function n1(){return Js([TI(()=>{Z(I5)})])}function N(i,e){let[t,n,r]=G_(i,e?.equal),o=t,s=o[Qn];return o.set=n,o.update=r,o.asReadonly=jg.bind(o),o}function jg(){let i=this[Qn];if(i.readonlyFn===void 0){let e=()=>this();e[Qn]=i,i.readonlyFn=e}return i.readonlyFn}var Th=(()=>{class i{view;node;constructor(t,n){this.view=t,this.node=n}static __NG_ELEMENT_ID__=P5}return i})();function P5(){return new Th(ht(),yi())}var ls=class{},Dh=new Xe("",{factory:()=>!0});var i1=new Xe(""),su=(()=>{class i{internalPendingTasks=Z(qa);scheduler=Z(ls);errorHandler=Z(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})(),Wg=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new gS})}return i})(),gS=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}},_g=class{[Qn];constructor(e){this[Qn]=e}destroy(){this[Qn].destroy()}};function rn(i,e){let t=e?.injector??Z(Ti),n=e?.manualCleanup!==!0?t.get(sr):null,r,o=t.get(Th,null,{optional:!0}),s=t.get(ls);return o!==null?(r=R5(o.view,s,i),n instanceof yg&&n._lView===o.view&&(n=null)):r=k5(i,t.get(Wg),s),r.injector=t,n!==null&&(r.onDestroyFns=[n.onDestroy(()=>r.destroy())]),new _g(r)}var aP=fe(R({},j_),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let i=bh(!1);try{W_(this)}finally{bh(i)}},cleanup(){if(!this.cleanupFns?.length)return;let i=at(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],at(i)}}}),A5=fe(R({},aP),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(rc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.scheduler.remove(this)}}),O5=fe(R({},aP),{consumerMarkedDirty(){this.view[Ct]|=8192,_c(this.view),this.notifier.notify(13)},destroy(){if(rc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.view[za]?.delete(this)}});function R5(i,e,t){let n=Object.create(O5);return n.view=i,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=e,n.fn=lP(n,t),i[za]??=new Set,i[za].add(n),n.consumerMarkedDirty(n),n}function k5(i,e,t){let n=Object.create(A5);return n.fn=lP(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 lP(i,e){return()=>{e(t=>(i.cleanupFns??=[]).push(t))}}var $g={JSACTION:"jsaction"};function Vh(i){return{toString:i}.toString()}function G5(i){return typeof i=="function"}function ZP(i,e,t,n){e!==null?e.applyValueToInputSignal(e,n):i[t]=n}var r0=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}},gu=(()=>{let i=()=>JP;return i.ngInherit=!0,i})();function JP(i){return i.type.prototype.ngOnChanges&&(i.setInput=j5),H5}function H5(){let i=e2(this),e=i?.current;if(e){let t=i.previous;if(t===Ga)i.previous=e;else for(let n in e)t[n]=e[n];i.current=null,this.ngOnChanges(e)}}function j5(i,e,t,n,r){let o=this.declaredInputs[n],s=e2(i)||W5(i,{previous:Ga,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new r0(c&&c.currentValue,t,l===Ga),ZP(i,e,r,t)}var QP="__ngSimpleChanges__";function e2(i){return i[QP]||null}function W5(i,e){return i[QP]=e}var cP=[];var en=function(i,e=null,t){for(let n=0;n<cP.length;n++){let r=cP[n];r(i,e,t)}},Ht=(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})(Ht||{});function $5(i,e,t){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(n){let s=JP(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 t2(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 Zg(i,e,t){n2(i,e,3,t)}function Jg(i,e,t,n){(i[Ct]&3)===t&&n2(i,e,t,n)}function r1(i,e){let t=i[Ct];(t&3)===e&&(t&=16383,t+=1,i[Ct]=t)}function n2(i,e,t,n){let r=n!==void 0?i[vc]&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[vc]+=65536),(a<o||o==-1)&&(X5(i,t,e,l),i[vc]=(i[vc]&4294901760)+l+2),l++}function dP(i,e){en(Ht.LifecycleHookStart,i,e);let t=at(null);try{e.call(i)}finally{at(t),en(Ht.LifecycleHookEnd,i,e)}}function X5(i,e,t,n){let r=t[n]<0,o=t[n+1],s=r?-t[n]:t[n],a=i[s];r?i[Ct]>>14<i[vc]>>16&&(i[Ct]&3)===e&&(i[Ct]+=16384,dP(a,o)):dP(a,o)}var lu=-1,wc=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 Y5(i){return(i.flags&8)!==0}function q5(i){return(i.flags&16)!==0}function K5(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];J5(o)?i.setProperty(e,o,s):i.setAttribute(e,o,s),n++}}return n}function Z5(i){return i===3||i===4||i===6}function J5(i){return i.charCodeAt(0)===64}function uu(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?uP(i,t,r,null,e[++n]):uP(i,t,r,null,null))}}return i}function uP(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 i2(i){return i!==lu}function o0(i){return i&32767}function Q5(i){return i>>16}function s0(i,e){let t=Q5(i),n=e;for(;t>0;)n=n[gc],t--;return n}var b1=!0;function a0(i){let e=b1;return b1=i,e}var ez=256,r2=ez-1,o2=5,tz=0,ps={};function nz(i,e,t){let n;typeof t=="string"?n=t.charCodeAt(0)||0:t.hasOwnProperty(mc)&&(n=t[mc]),n==null&&(n=t[mc]=tz++);let r=n&r2,o=1<<r;e.data[i+(r>>o2)]|=o}function l0(i,e){let t=s2(i,e);if(t!==-1)return t;let n=e[Qe];n.firstCreatePass&&(i.injectorIndex=e.length,o1(n.data,i),o1(e,null),o1(n.blueprint,null));let r=oC(i,e),o=i.injectorIndex;if(i2(r)){let s=o0(r),a=s0(r,e),l=a[Qe].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function o1(i,e){i.push(0,0,0,0,0,0,0,0,e)}function s2(i,e){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||e[i.injectorIndex+8]===null?-1:i.injectorIndex}function oC(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=u2(r),n===null)return lu;if(t++,r=r[gc],n.injectorIndex!==-1)return n.injectorIndex|t<<16}return lu}function y1(i,e,t){nz(i,e,t)}function a2(i,e,t){if(t&8||i!==void 0)return i;Dg(e,"NodeInjector")}function l2(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):ES(e,n,t&8)}finally{Bi(o)}}return a2(n,e,t)}function c2(i,e,t,n=0,r){if(i!==null){if(e[Ct]&2048&&!(n&2)){let s=sz(i,e,t,n,ps);if(s!==ps)return s}let o=d2(i,e,t,n,ps);if(o!==ps)return o}return l2(e,t,n,r)}function d2(i,e,t,n,r){let o=rz(t);if(typeof o=="function"){if(!KS(e,i,n))return n&1?a2(r,t,n):l2(e,t,n,r);try{let s;if(s=o(n),s==null&&!(n&8))Dg(t);else return s}finally{ZS()}}else if(typeof o=="number"){let s=null,a=s2(i,e),l=lu,c=n&1?e[li][Gi]:null;for((a===-1||n&4)&&(l=a===-1?oC(i,e):e[a+8],l===lu||!hP(n,!1)?a=-1:(s=e[Qe],a=o0(l),e=s0(l,e)));a!==-1;){let d=e[Qe];if(fP(o,a,d.data)){let u=iz(a,e,t,s,n,c);if(u!==ps)return u}l=e[a+8],l!==lu&&hP(n,e[Qe].data[a+8]===c)&&fP(o,a,e)?(s=d,a=o0(l),e=s0(l,e)):a=-1}}return r}function iz(i,e,t,n,r,o){let s=e[Qe],a=s.data[i+8],l=n==null?fs(a)&&b1:n!=s&&(a.type&3)!==0,c=r&1&&o===a,d=Qg(a,s,t,l,c);return d!==null?Oh(e,s,d,a,r):ps}function Qg(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 Oh(i,e,t,n,r){let o=i[t],s=e.data;if(o instanceof wc){let a=o;if(a.resolving)throw wS("");let l=a0(a.canSeeViewProviders);a.resolving=!0;let c=s[t].type||s[t],d,u=a.injectImpl?Bi(a.injectImpl):null,f=KS(i,n,0);try{o=i[t]=a.factory(void 0,r,s,i,n),e.firstCreatePass&&t>=n.directiveStart&&$5(t,s[t],e)}finally{u!==null&&Bi(u),a0(l),a.resolving=!1,ZS()}}return o}function rz(i){if(typeof i=="string")return i.charCodeAt(0)||0;let e=i.hasOwnProperty(mc)?i[mc]:void 0;return typeof e=="number"?e>=0?e&r2:oz:e}function fP(i,e,t){let n=1<<i;return!!(t[e+(i>>o2)]&n)}function hP(i,e){return!(i&2)&&!(i&1&&e)}var Cc=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return c2(this._tNode,this._lView,e,fc(n),t)}};function oz(){return new Cc(yi(),ht())}function ra(i){return Vh(()=>{let e=i.prototype.constructor,t=e[gh]||x1(e),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let o=r[gh]||x1(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function x1(i){return vS(i)?()=>{let e=x1(bi(i));return e&&e()}:Ba(i)}function sz(i,e,t,n,r){let o=i,s=e;for(;o!==null&&s!==null&&s[Ct]&2048&&!xc(s);){let a=d2(o,s,t,n|2,ps);if(a!==ps)return a;let l=o.parent;if(!l){let c=s[OS];if(c){let d=c.get(t,ps,n&-5);if(d!==ps)return d}l=u2(s),s=s[gc]}o=l}return r}function u2(i){let e=i[Qe],t=e.type;return t===2?e.declTNode:t===1?i[Gi]:null}function az(){return vu(yi(),ht())}function vu(i,e){return new Er(eo(i,e))}var Er=(()=>{class i{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=az}return i})();function lz(i){return i instanceof Er?i.nativeElement:i}function cz(){return this._results[Symbol.iterator]()}var c0=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 wo}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=wI(e);(this._changesDetected=!CI(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]=cz},f2="ngSkipHydration",dz="ngskiphydration";function h2(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()===dz)return!0}return!1}function p2(i){return i.hasAttribute(f2)}function d0(i){return(i.flags&128)===128}function m2(i){if(d0(i))return!0;let e=i.parent;for(;e;){if(d0(i)||h2(e))return!0;e=e.parent}return!1}var sC=(function(i){return i[i.OnPush=0]="OnPush",i[i.Eager=1]="Eager",i[i.Default=1]="Default",i})(sC||{}),g2=new Map,uz=0;function fz(){return uz++}function hz(i){g2.set(i[Qs],i)}function _1(i){g2.delete(i[Qs])}var pP="__ngContext__";function fu(i,e){Qr(e)?(i[pP]=e[Qs],hz(e)):i[pP]=e}function v2(i){return y2(i[eu])}function b2(i){return y2(i[Jr])}function y2(i){for(;i!==null&&!_r(i);)i=i[Jr];return i}var S1;function aC(i){S1=i}function lC(){if(S1!==void 0)return S1;if(typeof document<"u")return document;throw new Ye(210,!1)}var gs=new Xe("",{factory:()=>pz}),pz="ng";var y0=new Xe(""),Gh=new Xe("",{providedIn:"platform",factory:()=>"unknown"});var x0=new Xe("",{factory:()=>Z(Cn).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var bu=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>{let t=new i;return t.store=mz(Z(Cn),Z(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 mz(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 x2="h",_2="b",gz="f",vz="n",S2="e",C2="t",_0="c",cC="x",Rh="r",w2="i",E2="n",dC="d";var M2="di",T2="s",D2="p";var Hh=new Xe(""),I2=!1,uC=new Xe("",{factory:()=>I2});var fC=new Xe(""),P2=!1,A2=new Xe("",{factory:()=>[]}),O2=new Xe(""),hC=new Xe("",{factory:()=>new Map});var jh="ngb";var R2=(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},k2=(i,e)=>{let t=i,n=t.getAttribute(jh)??"",r=e.get(n)??new Set;r.has(t)||r.add(t),e.set(n,r)};var F2=i=>{i.removeAttribute($g.JSACTION),i.removeAttribute(jh),i.__jsaction_fns=void 0},N2=new Xe("",{factory:()=>({})});function pC(i,e){let t=e?.__jsaction_fns?.get(i.type);if(!(!t||!e?.isConnected))for(let n of t)n(i)}var C1=new Map;function L2(i,e){return C1.set(i,e),()=>C1.delete(i)}var mP=!1,U2=(i,e,t,n)=>{};function bz(i,e,t,n){U2(i,e,t,n)}function B2(){mP||(U2=(i,e,t,n)=>{let r=i[yr].get(gs);C1.get(r)?.(e,t,n)},mP=!0)}var S0=new Xe("");function Wh(i){return(i.flags&32)===32}var yz="__nghData__",mC=yz,xz="__nghDeferData__",z2=xz;var e0="ngh",V2="nghm",G2=()=>null;function _z(i,e,t=!1){let n=i.getAttribute(e0);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(bu,null,{optional:!0});d!==null&&(l=d.get(mC,[])[Number(n)])}let c={data:l,firstChild:i.firstChild??null};return t&&(c.firstChild=i,C0(c,0,i.nextSibling)),a?i.setAttribute(e0,a):i.removeAttribute(e0),c}function H2(){G2=_z}function j2(i,e,t=!1){return G2(i,e,t)}function W2(i){let e=i._lView;return e[Qe].type===2?null:(xc(e)&&(e=e[$t]),e)}function Sz(i){return i.textContent?.replace(/\s/gm,"")}function Cz(i){let e=lC(),t=e.createNodeIterator(i,NodeFilter.SHOW_COMMENT,{acceptNode(o){let s=Sz(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 C0(i,e,t){i.segmentHeads??={},i.segmentHeads[e]=t}function w1(i,e){return i.segmentHeads?.[e]??null}function $2(i){return i.get(O2,!1,{optional:!0})}function wz(i,e){let t=i.data,n=t[S2]?.[e]??null;return n===null&&t[_0]?.[e]&&(n=gC(i,e)),n}function X2(i,e){return i.data[_0]?.[e]??null}function gC(i,e){let t=X2(i,e)??[],n=0;for(let r of t)n+=r[Rh]*(r[cC]??1);return n}function Ez(i){if(typeof i.disconnectedNodes>"u"){let e=i.data[dC];i.disconnectedNodes=e?new Set(e):null}return i.disconnectedNodes}function Y2(i,e){if(typeof i.disconnectedNodes>"u"){let t=i.data[dC];i.disconnectedNodes=t?new Set(t):null}return!!Ez(i)?.has(e)}function w0(i,e){let t=i[Hi];return t!==null&&!Ug()&&!Wh(e)&&!Y2(t,e.index-$t)}function Mz(i,e){let t=e.get(S0),r=e.get(bu).get(z2,{}),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][D2]}return{parentBlockPromise:a,hydrationQueue:l}}function s1(i){return!!i&&i.nodeType===Node.COMMENT_NODE&&i.textContent?.trim()===V2}function gP(i){for(;i&&i.nodeType===Node.TEXT_NODE;)i=i.previousSibling;return i}function q2(i){for(let n of i.body.childNodes)if(s1(n))return;let e=gP(i.body.previousSibling);if(s1(e))return;let t=gP(i.head.lastChild);if(!s1(t))throw new Ye(-507,!1)}function K2(i,e){let t=i.contentQueries;if(t!==null){let n=at(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];zg(o),a.contentQueries(2,e[s],s)}}}finally{at(n)}}}function E1(i,e,t){zg(0);let n=at(null);try{e(i,t)}finally{at(n)}}function vC(i,e,t){if(RS(e)){let n=at(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{at(n)}}}var Io=(function(i){return i[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",i[i.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",i})(Io||{});var Xg;function Tz(){if(Xg===void 0&&(Xg=null,Zr.trustedTypes))try{Xg=Zr.trustedTypes.createPolicy("angular",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Xg}function E0(i){return Tz()?.createHTML(i)||i}var Yg;function Dz(){if(Yg===void 0&&(Yg=null,Zr.trustedTypes))try{Yg=Zr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Yg}function vP(i){return Dz()?.createHTML(i)||i}var ia=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Sg})`}},M1=class extends ia{getTypeName(){return"HTML"}},T1=class extends ia{getTypeName(){return"Style"}},D1=class extends ia{getTypeName(){return"Script"}},I1=class extends ia{getTypeName(){return"URL"}},P1=class extends ia{getTypeName(){return"ResourceURL"}};function Po(i){return i instanceof ia?i.changingThisBreaksApplicationSecurity:i}function oa(i,e){let t=Z2(i);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${Sg})`)}return t===e}function Z2(i){return i instanceof ia&&i.getTypeName()||null}function bC(i){return new M1(i)}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 Iz(i){let e=new O1(i);return Pz()?new A1(e):e}var A1=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(E0(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},O1=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=E0(e),t}};function Pz(){try{return!!new window.DOMParser().parseFromString(E0(""),"text/html")}catch{return!1}}var Az=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function $h(i){return i=String(i),i.match(Az)?i:"unsafe:"+i}function sa(i){let e={};for(let t of i.split(","))e[t]=!0;return e}function Xh(...i){let e={};for(let t of i)for(let n in t)t.hasOwnProperty(n)&&(e[n]=!0);return e}var J2=sa("area,br,col,hr,img,wbr"),Q2=sa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),eA=sa("rp,rt"),Oz=Xh(eA,Q2),Rz=Xh(Q2,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")),kz=Xh(eA,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")),bP=Xh(J2,Rz,kz,Oz),tA=sa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Fz=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"),Nz=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"),Lz=Xh(tA,Fz,Nz),Uz=sa("script,style,template");var R1=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=Vz(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=zz(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=yP(e).toLowerCase();if(!bP.hasOwnProperty(t))return this.sanitizedSomething=!0,!Uz.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(!Lz.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;tA[a]&&(l=$h(l)),this.buf.push(" ",s,'="',xP(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=yP(e).toLowerCase();bP.hasOwnProperty(t)&&!J2.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(xP(e))}};function Bz(i,e){return(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function zz(i){let e=i.nextSibling;if(e&&i!==e.previousSibling)throw nA(e);return e}function Vz(i){let e=i.firstChild;if(e&&Bz(i,e))throw nA(e);return e}function yP(i){let e=i.nodeName;return typeof e=="string"?e:"FORM"}function nA(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var Gz=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Hz=/([^\#-~ |!])/g;function xP(i){return i.replace(/&/g,"&amp;").replace(Gz,function(e){let t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((t-55296)*1024+(n-56320)+65536)+";"}).replace(Hz,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var qg;function M0(i,e){let t=null;try{qg=qg||Iz(i);let n=e?String(e):"";t=qg.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=qg.getInertBodyElement(n)}while(n!==o);let a=new R1().sanitizeChildren(_P(t)||t);return E0(a)}finally{if(t){let n=_P(t)||t;for(;n.firstChild;)n.firstChild.remove()}}}function _P(i){return"content"in i&&jz(i)?i.content:null}function jz(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var Wz=/^>|^->|<!--|-->|--!>|<!-$/g,$z=/(<|>)/g,Xz="\u200B$1\u200B";function Yz(i){return i.replace(Wz,e=>e.replace($z,Xz))}function iA(i,e){return i.createText(e)}function qz(i,e,t){i.setValue(e,t)}function rA(i,e){return i.createComment(Yz(e))}function CC(i,e,t){return i.createElement(e,t)}function u0(i,e,t,n,r){i.insertBefore(e,t,n,r)}function oA(i,e,t){i.appendChild(e,t)}function SP(i,e,t,n,r){n!==null?u0(i,e,t,n,r):oA(i,e,t)}function wC(i,e,t,n){i.removeChild(null,e,t,n)}function sA(i){i.textContent=""}function Kz(i,e,t){i.setAttribute(e,"style",t)}function Zz(i,e,t){t===""?i.removeAttribute(e,"class"):i.setAttribute(e,"class",t)}function aA(i,e,t){let{mergedAttrs:n,classes:r,styles:o}=t;n!==null&&K5(i,e,n),r!==null&&Zz(i,e,r),o!==null&&Kz(i,e,o)}var Ao=(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})(Ao||{});function T0(i){let e=lA();return e?vP(e.sanitize(Ao.HTML,i)||""):oa(i,"HTML")?vP(Po(i)):M0(lC(),_h(i))}function ji(i){let e=lA();return e?e.sanitize(Ao.URL,i)||"":oa(i,"URL")?Po(i):$h(_h(i))}function lA(){let i=ht();return i&&i[Eo].sanitizer}function EC(i){return i.ownerDocument.defaultView}function MC(i){return i.ownerDocument}function cA(i){return i.ownerDocument.body}function Jz(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 dA="ng-template";function Qz(i,e,t,n){let r=0;if(n){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&Jz(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(TC(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 TC(i){return i.type===4&&i.value!==dA}function eV(i,e,t){let n=i.type===4&&!t?dA:i.value;return e===n}function tV(i,e,t){let n=4,r=i.attrs,o=r!==null?rV(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!To(n)&&!To(l))return!1;if(s&&To(l))continue;s=!1,n=l|n&1;continue}if(!s)if(n&4){if(n=2|n&1,l!==""&&!eV(i,l,t)||l===""&&e.length===1){if(To(n))return!1;s=!0}}else if(n&8){if(r===null||!Qz(i,r,l,t)){if(To(n))return!1;s=!0}}else{let c=e[++a],d=nV(l,r,TC(i),t);if(d===-1){if(To(n))return!1;s=!0;continue}if(c!==""){let u;if(d>o?u="":u=r[d+1].toLowerCase(),n&2&&c!==u){if(To(n))return!1;s=!0}}}}return To(n)||s}function To(i){return(i&1)===0}function nV(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 oV(e,i)}function uA(i,e,t=!1){for(let n=0;n<e.length;n++)if(tV(i,e[n],t))return!0;return!1}function iV(i){let e=i.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function rV(i){for(let e=0;e<i.length;e++){let t=i[e];if(Z5(t))return e}return i.length}function oV(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 sV(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 CP(i,e){return i?":not("+e.trim()+")":e}function aV(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!==""&&!To(s)&&(e+=CP(o,r),r=""),n=s,o=o||!To(n);t++}return r!==""&&(e+=CP(o,r)),e}function lV(i){return i.map(aV).join(",")}function cV(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(!To(r))break;r=o}n++}return t.length&&e.push(1,...t),e}var Mr={};function DC(i,e,t,n,r,o,s,a,l,c,d){let u=$t+n,f=u+r,h=dV(u,f),p=typeof c=="function"?c():c;return h[Qe]={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 dV(i,e){let t=[];for(let n=0;n<e;n++)t.push(n<i?null:Mr);return t}function uV(i){let e=i.tView;return e===null||e.incompleteFirstPass?i.tView=DC(1,null,i.template,i.decls,i.vars,i.directiveDefs,i.pipeDefs,i.viewQuery,i.schemas,i.consts,i.id):e}function IC(i,e,t,n,r,o,s,a,l,c,d){let u=e.blueprint.slice();return u[Vi]=r,u[Ct]=n|4|128|8|64|1024,(c!==null||i&&i[Ct]&2048)&&(u[Ct]|=2048),LS(u),u[Vn]=u[gc]=i,u[kn]=t,u[Eo]=s||i&&i[Eo],u[qt]=a||i&&i[qt],u[yr]=l||i&&i[yr]||null,u[Gi]=o,u[Qs]=fz(),u[Hi]=d,u[OS]=c,u[li]=e.type==2?i[li]:u,u}function fV(i,e,t){let n=eo(e,i),r=uV(t),o=i[Eo].rendererFactory,s=PC(i,IC(i,r,null,fA(t),n,e,null,o.createRenderer(n,t),null,null,null));return i[e.index]=s}function fA(i){let e=16;return i.signals?e=4096:i.onPush&&(e=64),e}function hA(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 PC(i,e){return i[eu]?i[AS][Jr]=e:i[eu]=e,i[AS]=e,e}function A(i=1){pA(In(),ht(),ea()+i,!1)}function pA(i,e,t,n){if(!n)if((e[Ct]&3)===3){let o=i.preOrderCheckHooks;o!==null&&Zg(e,o,t)}else{let o=i.preOrderHooks;o!==null&&Jg(e,o,0,t)}Xa(t)}var D0=(function(i){return i[i.None=0]="None",i[i.SignalBased=1]="SignalBased",i[i.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",i})(D0||{});function k1(i,e,t,n){let r=at(null);try{let[o,s,a]=i.inputs[t],l=null;(s&D0.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):ZP(e,l,o,n)}finally{at(r)}}var ms=(function(i){return i[i.Important=1]="Important",i[i.DashCase=2]="DashCase",i})(ms||{}),hV;function AC(i,e){return hV(i,e)}var Oue=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var F1=new WeakMap,N1=new WeakSet;function pV(i,e){let t=F1.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),N1.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 mV(i,e){let t=F1.get(i);t?t.includes(e)||t.push(e):F1.set(i,[e])}var Ec=new Set,I0=(function(i){return i[i.CHANGE_DETECTION=0]="CHANGE_DETECTION",i[i.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",i})(I0||{}),vs=new Xe(""),wP=new Set;function Oo(i){wP.has(i)||(wP.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}var OC=(()=>{class i{impl=null;execute(){this.impl?.execute()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),mA=[0,1,2,3],gA=(()=>{class i{ngZone=Z(or);scheduler=Z(ls);errorHandler=Z(Kr,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){Z(vs,{optional:!0})}execute(){let t=this.sequences.size>0;t&&en(Ht.AfterRenderHooksStart),this.executing=!0;for(let n of mA)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&&en(Ht.AfterRenderHooksEnd)}register(t){let{view:n}=t;n!==void 0?((n[bc]??=[]).push(t),_c(n),n[Ct]|=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(I0.AFTER_NEXT_RENDER,t):t()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),f0=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?.[bc];e&&(this.view[bc]=e.filter(t=>t!==this))}};function P0(i,e){let t=e?.injector??Z(Ti);return Oo("NgAfterNextRender"),vV(i,t,e,!0)}function gV(i){return i instanceof Function?[void 0,void 0,i,void 0]:[i.earlyRead,i.write,i.mixedReadWrite,i.read]}function vV(i,e,t,n){let r=e.get(OC);r.impl??=e.get(gA);let o=e.get(vs,null,{optional:!0}),s=t?.manualCleanup!==!0?e.get(sr):null,a=e.get(Th,null,{optional:!0}),l=new f0(r.impl,gV(i),a?.view,n,s,o?.snapshot(null));return r.impl.register(l),l}var vA=new Xe("",{factory:()=>({queue:new Set,isScheduled:!1,scheduler:null,injector:Z(Mi)})});function bA(i,e,t){let n=i.get(vA);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 bV(i,e){let t=i.get(vA);if(e.detachedLeaveAnimationFns){for(let n of e.detachedLeaveAnimationFns)t.queue.delete(n);e.detachedLeaveAnimationFns=void 0}}function yV(i,e){for(let[t,n]of e)bA(i,n.animateFns)}function EP(i,e,t,n){let r=i?.[ja]?.enter;e!==null&&r&&r.has(t.index)&&yV(n,r)}function au(i,e,t,n,r,o,s,a){if(r!=null){let l,c=!1;_r(r)?l=r:Qr(r)&&(c=!0,r=r[Vi]);let d=Sr(r);i===0&&n!==null?(EP(a,n,o,t),s==null?oA(e,n,d):u0(e,n,d,s||null,!0)):i===1&&n!==null?(EP(a,n,o,t),u0(e,n,d,s||null,!0),pV(o,d)):i===2?(a?.[ja]?.leave?.has(o.index)&&mV(o,d),MP(a,o,t,u=>{if(N1.has(d)){N1.delete(d);return}wC(e,d,c,u)})):i===3&&MP(a,o,t,()=>{e.destroyNode(d)}),l!=null&&PV(e,i,t,l,o,n,s)}}function xV(i,e){yA(i,e),e[Vi]=null,e[Gi]=null}function _V(i,e,t,n,r,o){n[Vi]=r,n[Gi]=e,O0(i,n,t,1,r,o)}function yA(i,e){e[Eo].changeDetectionScheduler?.notify(9),O0(i,e,e[qt],2,null,null)}function SV(i){let e=i[eu];if(!e)return a1(i[Qe],i);for(;e;){let t=null;if(Qr(e))t=e[eu];else{let n=e[Dn];n&&(t=n)}if(!t){for(;e&&!e[Jr]&&e!==i;)Qr(e)&&a1(e[Qe],e),e=e[Vn];e===null&&(e=i),Qr(e)&&a1(e[Qe],e),t=e&&e[Jr]}e=t}}function RC(i,e){let t=i[yc],n=t.indexOf(e);t.splice(n,1)}function A0(i,e){if(Wa(e))return;let t=e[qt];t.destroyNode&&O0(i,e,t,3,null,null),SV(e)}function a1(i,e){if(Wa(e))return;let t=at(null);try{e[Ct]&=-129,e[Ct]|=256,e[xr]&&rc(e[xr]),EV(i,e),wV(i,e),e[Qe].type===1&&e[qt].destroy();let n=e[Ha];if(n!==null&&_r(e[Vn])){n!==e[Vn]&&RC(n,e);let r=e[ds];r!==null&&r.detachView(i)}_1(e)}finally{at(t)}}function MP(i,e,t,n){let r=i?.[ja];if(r==null||r.leave==null||!r.leave.has(e.index))return n(!1);i&&Ec.add(i[Qs]),bA(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),CV(i,n)}else i&&Ec.delete(i[Qs]),n(!1)},r)}function CV(i,e){let t=i[ja]?.running;if(t){t.then(()=>{i[ja].running=void 0,Ec.delete(i[Qs]),e(!0)});return}e(!1)}function wV(i,e){let t=i.cleanup,n=e[Qd];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[Qd]=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[za];if(o!==null){e[za]=null;for(let s of o)s.destroy()}}function EV(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 wc)){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];en(Ht.LifecycleHookStart,a,l);try{l.call(a)}finally{en(Ht.LifecycleHookEnd,a,l)}}else{en(Ht.LifecycleHookStart,r,o);try{o.call(r)}finally{en(Ht.LifecycleHookEnd,r,o)}}}}}function xA(i,e,t){return MV(i,e.parent,t)}function MV(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===Io.None||r===Io.Emulated)return null}return eo(n,t)}function _A(i,e,t){return DV(i,e,t)}function TV(i,e,t){return i.type&40?eo(i,t):null}var DV=TV,TP;function kC(i,e,t,n){let r=xA(i,n,e),o=e[qt],s=n.parent||e[Gi],a=_A(s,n,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)SP(o,r,t[l],a,!1);else SP(o,r,t,a,!1);TP!==void 0&&TP(o,n,e,t,r)}function Ph(i,e){if(e!==null){let t=e.type;if(t&3)return eo(e,i);if(t&4)return L1(-1,i[e.index]);if(t&8){let n=e.child;if(n!==null)return Ph(i,n);{let r=i[e.index];return _r(r)?L1(-1,r):Sr(r)}}else{if(t&128)return Ph(i,e.next);if(t&32)return AC(e,i)()||Sr(i[e.index]);{let n=SA(i,e);if(n!==null){if(Array.isArray(n))return n[0];let r=Va(i[li]);return Ph(r,n)}else return Ph(i,e.next)}}}return null}function SA(i,e){if(e!==null){let n=i[li][Gi],r=e.projection;return n.projection[r]}return null}function L1(i,e){let t=Dn+i+1;if(t<e.length){let n=e[t],r=n[Qe].firstChild;if(r!==null)return Ph(n,r)}return e[us]}function FC(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&&fu(Sr(l),n),t.flags|=2),!Wh(t))if(c&8)FC(i,e,t.child,n,r,o,!1),au(e,i,a,r,l,t,o,n);else if(c&32){let d=AC(t,n),u;for(;u=d();)au(e,i,a,r,u,t,o,n);au(e,i,a,r,l,t,o,n)}else c&16?CA(i,e,n,t,r,o):au(e,i,a,r,l,t,o,n);t=s?t.projectionNext:t.next}}function O0(i,e,t,n,r,o){FC(t,n,i.firstChild,e,r,o,!1)}function IV(i,e,t){let n=e[qt],r=xA(i,t,e),o=t.parent||e[Gi],s=_A(o,t,e);CA(n,0,e,t,r,s)}function CA(i,e,t,n,r,o){let s=t[li],l=s[Gi].projection[n.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];au(e,i,t[yr],r,d,n,o,t)}else{let c=l,d=s[Vn];d0(n)&&(c.flags|=128),FC(i,e,c,d,r,o,!0)}}function PV(i,e,t,n,r,o,s){let a=n[us],l=Sr(n);a!==l&&au(e,i,t,o,a,r,s);for(let c=Dn;c<n.length;c++){let d=n[c];O0(d[Qe],d,i,e,o,a)}}function AV(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 wA(i,e,t,n,r){let o=ea(),s=n&2;try{Xa(-1),s&&e.length>$t&&pA(i,e,$t,!1);let a=s?Ht.TemplateUpdateStart:Ht.TemplateCreateStart;en(a,r,t),t(n,r)}finally{Xa(o);let a=s?Ht.TemplateUpdateEnd:Ht.TemplateCreateEnd;en(a,r,t)}}function R0(i,e,t){LV(i,e,t),(t.flags&64)===64&&UV(i,e,t)}function Yh(i,e,t=eo){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 OV(i,e,t,n){let o=n.get(uC,I2)||t===Io.ShadowDom||t===Io.ExperimentalIsolatedShadowDom,s=i.selectRootElement(e,o);return RV(s),s}function RV(i){EA(i)}var EA=()=>null;function kV(i){p2(i)?sA(i):Cz(i)}function MA(){EA=kV}function FV(i){return i==="class"?"className":i==="for"?"htmlFor":i==="formaction"?"formAction":i==="innerHtml"?"innerHTML":i==="readonly"?"readOnly":i==="tabindex"?"tabIndex":i}function TA(i,e,t,n,r,o){let s=e[Qe];if(zC(i,s,e,t,n)){fs(i)&&NV(e,i.index);return}i.type&3&&(t=FV(t)),DA(i,e,t,n,r,o)}function DA(i,e,t,n,r,o){if(i.type&3){let s=eo(i,e);n=o!=null?o(n,i.value||"",t):n,r.setProperty(s,t,n)}else i.type&12}function NV(i,e){let t=to(e,i);t[Ct]&16||(t[Ct]|=64)}function LV(i,e,t){let n=t.directiveStart,r=t.directiveEnd;fs(t)&&fV(e,t,i.data[n+t.componentOffset]),i.firstCreatePass||l0(t,e);let o=t.initialInputs;for(let s=n;s<r;s++){let a=i.data[s],l=Oh(e,i,s,t);if(fu(l,e),o!==null&&GV(e,s-n,l,a,t,o),hs(a)){let c=to(t.index,e);c[kn]=Oh(e,i,s,t)}}}function UV(i,e,t){let n=t.directiveStart,r=t.directiveEnd,o=t.index,s=XI();try{Xa(o);for(let a=n;a<r;a++){let l=i.data[a],c=e[a];Bg(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&BV(l,c)}}finally{Xa(-1),Bg(s)}}function BV(i,e){i.hostBindings!==null&&i.hostBindings(1,e)}function NC(i,e){let t=i.directiveRegistry,n=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];uA(e,o.selectors,!1)&&(n??=[],hs(o)?n.unshift(o):n.push(o))}return n}function zV(i,e,t,n,r,o){let s=eo(i,e);VV(e[qt],s,o,i.value,t,n,r)}function VV(i,e,t,n,r,o,s){if(o==null)i.removeAttribute(e,r,t);else{let a=s==null?_h(o):s(o,n||"",r);i.setAttribute(e,r,a,t)}}function GV(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];k1(n,t,l,c)}}function LC(i,e,t,n,r){let o=$t+t,s=e[Qe],a=r(s,e,i,n,t);e[o]=a,iu(i,!0);let l=i.type===2;return l?(aA(e[qt],a,i),(BI()===0||tu(i))&&fu(a,e),zI()):fu(a,e),Hg()&&(!l||!Wh(i))&&kC(s,e,a,i),i}function UC(i){let e=i;return $S()?XS():(e=e.parent,iu(e,!1)),e}function BC(i,e){let t=i[yr];if(!t)return;let n;try{n=t.get(na,null)}catch{n=null}n?.(e)}function zC(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];k1(u,t[c],d,r),a=!0}if(o)for(let l of o){let c=t[l],d=e.data[l];k1(d,c,n,r),a=!0}return a}function HV(i,e){let t=to(e,i),n=t[Qe];jV(n,t);let r=t[Vi];r!==null&&t[Hi]===null&&(t[Hi]=j2(r,t[yr])),en(Ht.ComponentStart);try{VC(n,t,t[kn])}finally{en(Ht.ComponentEnd,t[kn])}}function jV(i,e){for(let t=e.length;t<i.blueprint.length;t++)e.push(i.blueprint[t])}function VC(i,e,t){Vg(e);try{let n=i.viewQuery;n!==null&&E1(1,n,t);let r=i.template;r!==null&&wA(i,e,r,1,t),i.firstCreatePass&&(i.firstCreatePass=!1),e[ds]?.finishViewCreation(i),i.staticContentQueries&&K2(i,e),i.staticViewQueries&&E1(2,i.viewQuery,t);let o=i.components;o!==null&&WV(e,o)}catch(n){throw i.firstCreatePass&&(i.incompleteFirstPass=!0,i.firstCreatePass=!1),n}finally{e[Ct]&=-5,Gg()}}function WV(i,e){for(let t=0;t<e.length;t++)HV(i,e[t])}function yu(i,e,t,n){let r=at(null);try{let o=e.tView,a=i[Ct]&4096?4096:16,l=IC(i,o,t,a,null,e,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),c=i[e.index];l[Ha]=c;let d=i[ds];return d!==null&&(l[ds]=d.createEmbeddedView(o)),VC(o,l,t),l}finally{at(r)}}function Mc(i,e){return!e||e.firstChild===null||d0(i)}function kh(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)&&IA(o,n);let s=t.type;if(s&8)kh(i,e,t.child,n);else if(s&32){let a=AC(t,e),l;for(;l=a();)n.push(l)}else if(s&16){let a=SA(e,t);if(Array.isArray(a))n.push(...a);else{let l=Va(e[li]);kh(l[Qe],l,a,n,!0)}}t=r?t.projectionNext:t.next}return n}function IA(i,e){for(let t=Dn;t<i.length;t++){let n=i[t],r=n[Qe].firstChild;r!==null&&kh(n[Qe],n,r,e)}i[us]!==i[Vi]&&e.push(i[us])}function PA(i){if(i[bc]!==null){for(let e of i[bc])e.impl.addSequence(e);i[bc].length=0}}var AA=[];function $V(i){return i[xr]??XV(i)}function XV(i){let e=AA.pop()??Object.create(qV);return e.lView=i,e}function YV(i){i.lView[xr]!==i&&(i.lView=null,AA.push(i))}var qV=fe(R({},tc),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{_c(i.lView)},consumerOnSignalRead(){this.lView[xr]=this}});function KV(i){let e=i[xr]??Object.create(ZV);return e.lView=i,e}var ZV=fe(R({},tc),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{let e=Va(i.lView);for(;e&&!OA(e[Qe]);)e=Va(e);e&&US(e)},consumerOnSignalRead(){this.lView[xr]=this}});function OA(i){return i.type!==2}function RA(i){if(i[za]===null)return;let e=!0;for(;e;){let t=!1;for(let n of i[za])n.dirty&&(t=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));e=t&&!!(i[Ct]&8192)}}var JV=100;function kA(i,e=0){let n=i[Eo].rendererFactory,r=!1;r||n.begin?.();try{QV(i,e)}finally{r||n.end?.()}}function QV(i,e){let t=YS();try{bh(!0),U1(i,e);let n=0;for(;Eh(i);){if(n===JV)throw new Ye(103,!1);n++,U1(i,1)}}finally{bh(t)}}function eG(i,e,t,n){if(Wa(e))return;let r=e[Ct],o=!1,s=!1;Vg(e);let a=!0,l=null,c=null;o||(OA(i)?(c=$V(e),l=ic(c)):Wm()===null?(a=!1,c=KV(e),l=ic(c)):e[xr]&&(rc(e[xr]),e[xr]=null));try{LS(e),jI(i.bindingStartIndex),t!==null&&wA(i,e,t,2,n);let d=(r&3)===3;if(!o)if(d){let h=i.preOrderCheckHooks;h!==null&&Zg(e,h,null)}else{let h=i.preOrderHooks;h!==null&&Jg(e,h,0,null),r1(e,0)}if(s||tG(e),RA(e),FA(e,0),i.contentQueries!==null&&K2(i,e),!o)if(d){let h=i.contentCheckHooks;h!==null&&Zg(e,h)}else{let h=i.contentHooks;h!==null&&Jg(e,h,1),r1(e,1)}iG(i,e);let u=i.components;u!==null&&LA(e,u,0);let f=i.viewQuery;if(f!==null&&E1(2,f,n),!o)if(d){let h=i.viewCheckHooks;h!==null&&Zg(e,h)}else{let h=i.viewHooks;h!==null&&Jg(e,h,2),r1(e,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),e[Rg]){for(let h of e[Rg])h();e[Rg]=null}o||(PA(e),e[Ct]&=-73)}catch(d){throw o||_c(e),d}finally{c!==null&&(Gd(c,l),a&&YV(c)),Gg()}}function FA(i,e){for(let t=v2(i);t!==null;t=b2(t))for(let n=Dn;n<t.length;n++){let r=t[n];NA(r,e)}}function tG(i){for(let e=v2(i);e!==null;e=b2(e)){if(!(e[Ct]&2))continue;let t=e[yc];for(let n=0;n<t.length;n++){let r=t[n];US(r)}}}function nG(i,e,t){en(Ht.ComponentStart);let n=to(e,i);try{NA(n,t)}finally{en(Ht.ComponentEnd,n[kn])}}function NA(i,e){Fg(i)&&U1(i,e)}function U1(i,e){let n=i[Qe],r=i[Ct],o=i[xr],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&ch(o)),s||=!1,o&&(o.dirty=!1),i[Ct]&=-9217,s)eG(n,i,n.template,i[kn]);else if(r&8192){let a=at(null);try{RA(i),FA(i,1);let l=n.components;l!==null&&LA(i,l,1),PA(i)}finally{at(a)}}}function LA(i,e,t){for(let n=0;n<e.length;n++)nG(i,e[n],t)}function iG(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)Xa(~r);else{let o=r,s=t[++n],a=t[++n];$I(s,o);let l=e[o];en(Ht.HostBindingsUpdateStart,l);try{a(2,l)}finally{en(Ht.HostBindingsUpdateEnd,l)}}}}finally{Xa(-1)}}function k0(i,e){let t=YS()?64:1088;for(i[Eo].changeDetectionScheduler?.notify(e);i;){i[Ct]|=t;let n=Va(i);if(xc(i)&&!n)return i;i=n}return null}function UA(i,e,t,n){return[i,!0,0,e,null,n,null,t,null,null]}function BA(i,e){let t=Dn+e;if(t<i.length)return i[t]}function xu(i,e,t,n=!0){let r=e[Qe];if(rG(r,e,i,t),n){let s=L1(t,i),a=e[qt],l=a.parentNode(i[us]);l!==null&&_V(r,i[Gi],a,e,l,s)}let o=e[Hi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function GC(i,e){let t=Fh(i,e);return t!==void 0&&A0(t[Qe],t),t}function Fh(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t];if(n){let r=n[Ha];r!==null&&r!==i&&RC(r,n),e>0&&(i[t-1][Jr]=n[Jr]);let o=Sh(i,Dn+e);xV(n[Qe],n);let s=o[ds];s!==null&&s.detachView(o[Qe]),n[Vn]=null,n[Jr]=null,n[Ct]&=-129}return n}function rG(i,e,t,n){let r=Dn+n,o=t.length;n>0&&(t[r-1][Jr]=e),n<o-Dn?(e[Jr]=t[r],MS(t,Dn+n,e)):(t.push(e),e[Jr]=null),e[Vn]=t;let s=e[Ha];s!==null&&t!==s&&zA(s,e);let a=e[ds];a!==null&&a.insertView(i),Ng(e),e[Ct]|=128}function zA(i,e){let t=i[yc],n=e[Vn];if(Qr(n))i[Ct]|=2;else{let r=n[Vn][li];e[li]!==r&&(i[Ct]|=2)}t===null?i[yc]=[e]:t.push(e)}var Ka=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[Qe];return kh(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 Wa(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[wh],n=t?t.indexOf(this):-1;n>-1&&(Fh(e,n),Sh(t,n))}this._attachedToViewContainer=!1}A0(this._lView[Qe],this._lView)}onDestroy(e){BS(this._lView,e)}markForCheck(){k0(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Ct]&=-129}reattach(){Ng(this._lView),this._lView[Ct]|=128}detectChanges(){this._lView[Ct]|=1024,kA(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ye(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=xc(this._lView),t=this._lView[Ha];t!==null&&!e&&RC(t,this._lView),yA(this._lView[Qe],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Ye(902,!1);this._appRef=e;let t=xc(this._lView),n=this._lView[Ha];n!==null&&!t&&zA(n,this._lView),Ng(this._lView)}};var hu=(()=>{class i{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=oG;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=yu(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new Ka(o)}}return i})();function oG(){return F0(yi(),ht())}function F0(i,e){return i.type&4?new hu(e,i,vu(i,e)):null}function _u(i,e,t,n,r){let o=i.data[e];if(o===null)o=sG(i,e,t,n,r),WI()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=n,o.attrs=r;let s=GI();o.injectorIndex=s===null?-1:s.injectorIndex}return iu(o,!0),o}function sG(i,e,t,n,r){let o=WS(),s=$S(),a=s?o:o&&o.parent,l=i.data[e]=lG(i,a,t,e,n,r);return aG(i,l,o,s),l}function aG(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 lG(i,e,t,n,r,o){let s=e?e.injectorIndex:-1,a=0;return Ug()&&(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 cG=new RegExp(`^(\\d+)*(${_2}|${x2})*(.*)`);function dG(i){let e=i.match(cG),[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 uG(i){return!i.prev&&i.parent?.type===8}function l1(i){return i.index-$t}function fG(i,e){let t=i.i18nNodes;if(t)return t.get(e)}function N0(i,e,t,n){let r=l1(n),o=fG(i,r);if(o===void 0){let s=i.data[E2];if(s?.[r])o=pG(s[r],t);else if(e.firstChild===n)o=i.firstChild;else{let a=n.prev===null,l=n.prev??n.parent;if(uG(n)){let c=l1(n.parent);o=w1(i,c)}else{let c=eo(l,t);if(a)o=c.firstChild;else{let d=l1(l),u=w1(i,d);if(l.type===2&&u){let h=gC(i,d)+1;o=L0(h,u)}else o=c.nextSibling}}}}return o}function L0(i,e){let t=e;for(let n=0;n<i;n++)t=t.nextSibling;return t}function hG(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 gz:t=t.firstChild;break;case vz:t=t.nextSibling;break}}return t}function pG(i,e){let[t,...n]=dG(i),r;if(t===x2)r=e[li][Vi];else if(t===_2)r=cA(e[li][Vi]);else{let o=Number(t);r=Sr(e[o+$t])}return hG(r,n)}var mG=!1;function VA(i){mG=i}function gG(i){let e=i[Hi];if(e){let{i18nNodes:t,dehydratedIcuData:n}=e;if(t&&n){let r=i[qt];for(let o of n.values())vG(r,t,o)}e.i18nNodes=void 0,e.dehydratedIcuData=void 0}}function vG(i,e,t){for(let n of t.node.cases[t.case]){let r=e.get(n.index-$t);r&&wC(i,r,!1)}}function U0(i){let e=i[Mo]??[],n=i[Vn][qt],r=[];for(let o of e)o.data[M2]!==void 0?r.push(o):GA(o,n);i[Mo]=r}function bG(i){let{lContainer:e}=i,t=e[Mo];if(t===null)return;let r=e[Vn][qt];for(let o of t)GA(o,r)}function GA(i,e){let t=0,n=i.firstChild;if(n){let r=i.data[Rh];for(;t<r;){let o=n.nextSibling;wC(e,n,!1),n=o,t++}}}function B0(i){U0(i);let e=i[Vi];Qr(e)&&h0(e);for(let t=Dn;t<i.length;t++)h0(i[t])}function h0(i){gG(i);let e=i[Qe];for(let t=$t;t<e.bindingStartIndex;t++)if(_r(i[t])){let n=i[t];B0(n)}else Qr(i[t])&&h0(i[t])}function HC(i){let e=i._views;for(let t of e){let n=W2(t);n!==null&&n[Vi]!==null&&(Qr(n)?h0(n):B0(n))}}function yG(i,e,t,n){i!==null&&(t.cleanup(e),B0(i.lContainer),HC(n))}function xG(i,e){let t=[];for(let n of e)for(let r=0;r<(n[cC]??1);r++){let o={data:n,firstChild:null};n[Rh]>0&&(o.firstChild=i,i=L0(n[Rh],i)),t.push(o)}return[i,t]}var HA=()=>null,jA=()=>null;function WA(){HA=_G,jA=SG}function _G(i,e){return XA(i,e)?i[Mo].shift():(U0(i),null)}function Nh(i,e){return HA(i,e)}function SG(i,e,t){if(e.tView.ssrId===null)return null;let n=Nh(i,e.tView.ssrId);return t[Qe].firstUpdatePass&&n===null&&CG(t,e),n}function $A(i,e,t){return jA(i,e,t)}function CG(i,e){let t=e;for(;t;){if(DP(i,t))return;if((t.flags&256)===256)break;t=t.prev}for(t=e.next;t&&(t.flags&512)===512;){if(DP(i,t))return;t=t.next}}function XA(i,e){let t=i[Mo];return!e||t===null||t.length===0?!1:t[0].data[w2]===e}function DP(i,e){let t=e.tView?.ssrId;if(t==null)return!1;let n=i[e.index];return _r(n)&&XA(n,t)?(U0(n),!0):!1}var YA=class{},z0=class{},B1=class{resolveComponentFactory(e){throw new Ye(917,!1)}},V0=class{static NULL=new B1},Tc=class{},aa=(()=>{class i{destroyNode=null;static __NG_ELEMENT_ID__=()=>wG()}return i})();function wG(){let i=ht(),e=yi(),t=to(e.index,i);return(Qr(t)?t:i)[qt]}var qA=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>null})}return i})();var t0={},cu=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,t0,n);return r!==t0||t===t0?r:this.parentInjector.get(e,t,n)}};function p0(i,e,t){let n=t?i.styles:null,r=t?i.classes:null,o=0;if(e!==null)for(let s=0;s<e.length;s++){let a=e[s];if(typeof a=="number")o=a;else if(o==1)r=wg(r,a);else if(o==2){let l=a,c=e[++s];n=wg(n,l+": "+c+";")}}t?i.styles=n:i.stylesWithoutHost=n,t?i.classes=r:i.classesWithoutHost=r}function jt(i,e=0){let t=ht();if(t===null)return We(i,e);let n=yi();return c2(n,t,bi(i),e)}function KA(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}TG(i,e,t,a,o,l,c)}o!==null&&n!==null&&EG(t,n,o)}function EG(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 Ye(-301,!1);n.push(e[r],o)}}function MG(i,e,t){e.componentOffset=t,(i.components??=[]).push(e.index)}function TG(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,MG(i,t,f)),y1(l0(t,e),i,h.type)}RG(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=hA(i,e,a,null);a>0&&(t.directiveToIndex=new Map);for(let f=0;f<a;f++){let h=n[f];if(t.mergedAttrs=uu(t.mergedAttrs,h.hostAttrs),IG(i,t,e,u,h),OG(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++}DG(i,t,o)}function DG(i,e,t){for(let n=e.directiveStart;n<e.directiveEnd;n++){let r=i.data[n];if(t===null||!t.has(r))IP(0,e,r,n),IP(1,e,r,n),AP(e,n,!1);else{let o=t.get(r);PP(0,e,o,n),PP(1,e,o,n),AP(e,n,!0)}}}function IP(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),ZA(e,o)}}function PP(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),ZA(e,s)}}function ZA(i,e){e==="class"?i.flags|=8:e==="style"&&(i.flags|=16)}function AP(i,e,t){let{attrs:n,inputs:r,hostDirectiveInputs:o}=i;if(n===null||!t&&r===null||t&&o===null||TC(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 IG(i,e,t,n,r){i.data[n]=r;let o=r.factory||(r.factory=Ba(r.type,!0)),s=new wc(o,hs(r),jt,null);i.blueprint[n]=s,t[n]=s,PG(i,e,n,hA(i,t,r.hostVars,Mr),r)}function PG(i,e,t,n,r){let o=r.hostBindings;if(o){let s=i.hostBindingOpCodes;s===null&&(s=i.hostBindingOpCodes=[]);let a=~e.index;AG(s)!=a&&s.push(a),s.push(t,n,o)}}function AG(i){let e=i.length;for(;e>0;){let t=i[--e];if(typeof t=="number"&&t<0)return t}return 0}function OG(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 RG(i,e,t){i.flags|=1,i.directiveStart=e,i.directiveEnd=e+t,i.providerIndexes=e}function jC(i,e,t,n,r,o,s,a){let l=e[Qe],c=l.consts,d=no(c,s),u=_u(l,i,t,n,d);return o&&KA(l,e,u,no(c,a),r),u.mergedAttrs=uu(u.mergedAttrs,u.attrs),u.attrs!==null&&p0(u,u.attrs,!1),u.mergedAttrs!==null&&p0(u,u.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,u),u}function WC(i,e){t2(i,e),RS(e)&&i.queries.elementEnd(e)}function kG(i,e,t,n,r,o){let s=e.consts,a=no(s,r),l=_u(e,i,t,n,a);if(l.mergedAttrs=uu(l.mergedAttrs,l.attrs),o!=null){let c=no(s,o);l.localNames=[];for(let d=0;d<c.length;d+=2)l.localNames.push(c[d],-1)}return l.attrs!==null&&p0(l,l.attrs,!1),l.mergedAttrs!==null&&p0(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function G0(i,e,t){return i[e]=t}function FG(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 JA(i,e,t,n){let r=wr(i,e,t);return wr(i,e+1,n)||r}function NG(i,e,t,n,r){let o=JA(i,e,t,n);return wr(i,e+2,r)||o}function n0(i,e,t){return function n(r){let o=fs(i)?to(i.index,e):e;k0(o,5);let s=e[kn],a=OP(e,s,t,r),l=n.__ngNextListenerFn__;for(;l;)a=OP(e,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function OP(i,e,t,n){let r=at(null);try{return en(Ht.OutputStart,e,t),t(n)!==!1}catch(o){return BC(i,o),!1}finally{en(Ht.OutputEnd,e,t),at(r)}}function QA(i,e,t,n,r,o,s,a){let l=tu(i),c=!1,d=null;if(!n&&l&&(d=UG(e,t,o,i.index)),d!==null){let u=d.__ngLastListenerFn__||d;u.__ngNextListenerFn__=s,d.__ngLastListenerFn__=s,c=!0}else{let u=eo(i,t),f=n?n(u):u;bz(t,f,o,a);let h=r.listen(f,o,a);if(!LG(o)){let p=n?v=>n(Sr(v[i.index])):i.index;eO(p,e,t,o,a,h,!1)}}return c}function LG(i){return i.startsWith("animation")||i.startsWith("transition")}function UG(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[Qd],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function eO(i,e,t,n,r,o,s){let a=e.firstCreatePass?VS(e):null,l=zS(t),c=l.length;l.push(r,o),a&&a.push(n,i,c,(c+1)*(s?-1:1))}function RP(i,e,t,n,r,o){let s=e[t],a=e[Qe],c=a.data[t].outputs[n],u=s[c].subscribe(o);eO(i.index,a,e,r,o,u,!0)}var z1=Symbol("BINDING");function tO(i){return i.debugInfo?.className||i.type.name||null}var V1=class extends V0{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Ks(e);return new pu(t,this.ngModule)}};function BG(i){return Object.keys(i).map(e=>{let[t,n,r]=i[e],o={propName:t,templateName:e,isSignal:(n&D0.SignalBased)!==0};return r&&(o.transform=r),o})}function zG(i){return Object.keys(i).map(e=>({propName:i[e],templateName:e}))}function VG(i,e,t){let n=e instanceof Mi?e:e?.injector;return n&&i.getStandaloneInjector!==null&&(n=i.getStandaloneInjector(n)||n),n?new cu(t,n):t}function GG(i){let e=i.get(Tc,null);if(e===null)throw new Ye(407,!1);let t=i.get(qA,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 HG(i,e){let t=nO(i);return CC(e,t,t==="svg"?kS:t==="math"?kI:null)}function nO(i){return(i.selectors[0][0]||"div").toLowerCase()}var pu=class extends z0{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=BG(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=zG(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=lV(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,o,s){en(Ht.DynamicComponentStart);let a=at(null);try{let l=this.componentDef,c=VG(l,r||this.ngModule,e),d=GG(c),u=d.tracingService;return u&&u.componentCreate?u.componentCreate(tO(l),()=>this.createComponentRef(d,c,t,n,o,s)):this.createComponentRef(d,c,t,n,o,s)}finally{at(a)}}createComponentRef(e,t,n,r,o,s){let a=this.componentDef,l=jG(r,a,s,o),c=e.rendererFactory.createRenderer(null,a),d=r?OV(c,r,a.encapsulation,t):HG(a,c),u=s?.some(kP)||o?.some(p=>typeof p!="function"&&p.bindings.some(kP)),f=IC(null,l,null,512|fA(a),null,null,e,c,t,null,j2(d,t,!0));f[$t]=d,Vg(f);let h=null;try{let p=jC($t,f,2,"#host",()=>l.directiveRegistry,!0,0);aA(c,d,p),fu(d,f),R0(l,f,p),vC(l,p,f),WC(l,p),n!==void 0&&$G(p,this.ngContentSelectors,n),h=to(p.index,f),f[kn]=h[kn],VC(l,f,null)}catch(p){throw h!==null&&_1(h),_1(f),p}finally{en(Ht.DynamicComponentEnd),Gg()}return new m0(this.componentType,f,!!u)}};function jG(i,e,t,n){let r=i?["ng-version","21.2.4"]:cV(e.selectors[0]),o=null,s=null,a=0;if(t)for(let d of t)a+=d[z1].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[z1].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=Tg(u);l.push(f)}return DC(0,null,WG(o,s),1,a,l,null,null,null,[r],null)}function WG(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 kP(i){let e=i[z1].kind;return e==="input"||e==="twoWay"}var m0=class extends YA{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=nu(t[Qe],$t),this.location=vu(this._tNode,t),this.instance=to(this._tNode.index,t)[kn],this.hostView=this.changeDetectorRef=new Ka(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=zC(n,r[Qe],r,e,t);this.previousInputValues.set(e,t);let s=to(n.index,r);k0(s,1)}get injector(){return new Cc(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function $G(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 Su=(()=>{class i{static __NG_ELEMENT_ID__=XG}return i})();function XG(){let i=yi();return iO(i,ht())}var G1=class i extends Su{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return vu(this._hostTNode,this._hostLView)}get injector(){return new Cc(this._hostTNode,this._hostLView)}get parentInjector(){let e=oC(this._hostTNode,this._hostLView);if(i2(e)){let t=s0(e,this._hostLView),n=o0(e),r=t[Qe].data[n+8];return new Cc(r,t)}else return new Cc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=FP(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=Nh(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,Mc(this._hostTNode,s)),a}createComponent(e,t,n,r,o,s,a){let l=e&&!G5(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 pu(Ks(e)),u=n||this.parentInjector;if(!o&&d.ngModule==null){let m=(l?u:this.parentInjector).get(Mi,null);m&&(o=m)}let f=Ks(d.componentType??{}),h=Nh(this._lContainer,f?.id??null),p=h?.firstChild??null,v=d.create(u,r,p,o,s,a);return this.insertImpl(v.hostView,c,Mc(this._hostTNode,h)),v}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(FI(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 xu(s,r,o,n),e.attachToViewContainerRef(),MS(c1(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=FP(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=Fh(this._lContainer,t);n&&(Sh(c1(this._lContainer),t),A0(n[Qe],n))}detach(e){let t=this._adjustIndex(e,-1),n=Fh(this._lContainer,t);return n&&Sh(c1(this._lContainer),t)!=null?new Ka(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function FP(i){return i[wh]}function c1(i){return i[wh]||(i[wh]=[])}function iO(i,e){let t,n=e[i.index];return _r(n)?t=n:(t=UA(n,e,null,i),e[i.index]=t,PC(e,t)),rO(t,e,i,n),new G1(t,i,e)}function YG(i,e){let t=i[qt],n=t.createComment(""),r=eo(e,i),o=t.parentNode(r);return u0(t,o,n,t.nextSibling(r),!1),n}var rO=oO,$C=()=>!1;function qG(i,e,t){return $C(i,e,t)}function oO(i,e,t,n){if(i[us])return;let r;t.type&8?r=Sr(n):r=YG(e,t),i[us]=r}function KG(i,e,t){if(i[us]&&i[Mo])return!0;let n=t[Hi],r=e.index-$t;if(!n||m2(e)||Y2(n,r))return!1;let s=w1(n,r),a=n.data[_0]?.[r],[l,c]=xG(s,a);return i[us]=l,i[Mo]=c,!0}function ZG(i,e,t,n){$C(i,t,e)||oO(i,e,t,n)}function sO(){rO=ZG,$C=KG}var H1=class i{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},j1=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++)cO(e,t).matches!==null&&this.queries[t].setDirty()}},W1=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=r6(e):this.predicate=e}},$1=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)}},X1=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,JG(t,o)),this.matchTNodeWithReadOption(e,t,Qg(t,e,o,!1,!1))}else n===hu?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,Qg(t,e,n,!1,!1))}matchTNodeWithReadOption(e,t,n){if(n!==null){let r=this.metadata.read;if(r!==null)if(r===Er||r===Su||r===hu&&t.type&4)this.addMatch(t.index,-2);else{let o=Qg(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 JG(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 QG(i,e){return i.type&11?vu(i,e):i.type&4?F0(i,e):null}function e6(i,e,t,n){return t===-1?QG(e,i):t===-2?t6(i,e,n):Oh(i,i[Qe],t,e)}function t6(i,e,t){if(t===Er)return vu(e,i);if(t===hu)return F0(e,i);if(t===Su)return iO(e,i)}function aO(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(e6(e,d,s[l+1],t.metadata.read))}}r.matches=a}return r.matches}function Y1(i,e,t,n){let r=i.queries.getByIndex(t),o=r.matches;if(o!==null){let s=aO(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[Ha]===f[Vn]&&Y1(f[Qe],f,c,n)}if(d[yc]!==null){let u=d[yc];for(let f=0;f<u.length;f++){let h=u[f];Y1(h[Qe],h,c,n)}}}}}return n}function lO(i,e){return i[ds].queries[e].queryList}function n6(i,e,t){let n=new c0((t&4)===4);return UI(i,e,n,n.destroy),(e[ds]??=new j1).queries.push(new H1(n))-1}function i6(i,e,t){let n=In();return n.firstCreatePass&&(o6(n,new W1(i,e,t),-1),(e&2)===2&&(n.staticViewQueries=!0)),n6(n,ht(),e)}function r6(i){return i.split(",").map(e=>e.trim())}function o6(i,e,t){i.queries===null&&(i.queries=new $1),i.queries.track(new X1(e,t))}function cO(i,e){return i.queries.getByIndex(e)}function s6(i,e){let t=i[Qe],n=cO(t,e);return n.crossesNgTemplate?Y1(t,i,e,[]):aO(t,i,n,e)}function dO(i,e,t){let n,r=dh(()=>{n._dirtyCounter();let o=l6(n,i);if(e&&o===void 0)throw new Ye(-951,!1);return o});return n=r[Qn],n._dirtyCounter=N(0),n._flatValue=void 0,r}function uO(i){return dO(!0,!1,i)}function fO(i){return dO(!0,!0,i)}function a6(i,e){let t=i[Qn];t._lView=ht(),t._queryIndex=e,t._queryList=lO(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(n=>n+1))}function l6(i,e){let t=i._lView,n=i._queryIndex;if(t===void 0||n===void 0||t[Ct]&4)return e?void 0:Ei;let r=lO(t,n),o=s6(t,n);return r.reset(o,lz),e?r.first:r._changesDetected||i._flatValue===void 0?i._flatValue=r.toArray():i._flatValue}var Lh=class{};var Uh=class extends Lh{injector;componentFactoryResolver=new V1(this);instance=null;constructor(e){super();let t=new pc([...e.providers,{provide:Lh,useValue:this},{provide:V0,useValue:this.componentFactoryResolver}],e.parent||Zd(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function XC(i,e,t=null){return new Uh({providers:i,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var c6=(()=>{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=Og(!1,t.type),r=n.length>0?XC([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(We(Mi))})}return i})();function st(i){return Vh(()=>{let e=hO(i),t=fe(R({},e),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===sC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&i.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(c6).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||Io.Emulated,styles:i.styles||Ei,_:null,schemas:i.schemas||null,tView:null,id:""});e.standalone&&Oo("NgStandalone"),pO(t);let n=i.dependencies;return t.directiveDefs=NP(n,d6),t.pipeDefs=NP(n,SS),t.id=h6(t),t})}function d6(i){return Ks(i)||Tg(i)}function la(i){return Vh(()=>({type:i.type,bootstrap:i.bootstrap||Ei,declarations:i.declarations||Ei,imports:i.imports||Ei,exports:i.exports||Ei,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function u6(i,e){if(i==null)return Ga;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=D0.None,l=null),t[o]=[n,a,l],e[o]=s}return t}function f6(i){if(i==null)return Ga;let e={};for(let t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function Zn(i){return Vh(()=>{let e=hO(i);return pO(e),e})}function H0(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 hO(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||Ga,exportAs:i.exportAs||null,standalone:i.standalone??!0,signals:i.signals===!0,selectors:i.selectors||Ei,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:u6(i.inputs,e),outputs:f6(i.outputs),debugInfo:null}}function pO(i){i.features?.forEach(e=>e(i))}function NP(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 h6(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 p6(i){return Object.getPrototypeOf(i.prototype).constructor}function Tr(i){let e=p6(i.type),t=!0,n=[i];for(;e;){let r;if(hs(i))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Ye(903,!1);r=e.\u0275dir}if(r){if(t){n.push(r);let s=i;s.inputs=d1(i.inputs),s.declaredInputs=d1(i.declaredInputs),s.outputs=d1(i.outputs);let a=r.hostBindings;a&&y6(i,a);let l=r.viewQuery,c=r.contentQueries;if(l&&v6(i,l),c&&b6(i,c),m6(i,r),yI(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)}g6(n)}function m6(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 g6(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=uu(r.hostAttrs,t=uu(t,r.hostAttrs))}}function d1(i){return i===Ga?{}:i===Ei?[]:i}function v6(i,e){let t=i.viewQuery;t?i.viewQuery=(n,r)=>{e(n,r),t(n,r)}:i.viewQuery=e}function b6(i,e){let t=i.contentQueries;t?i.contentQueries=(n,r,o)=>{e(n,r,o),t(n,r,o)}:i.contentQueries=e}function y6(i,e){let t=i.hostBindings;t?i.hostBindings=(n,r)=>{e(n,r),t(n,r)}:i.hostBindings=e}function mO(i,e,t,n,r,o,s,a){if(t.firstCreatePass){i.mergedAttrs=uu(i.mergedAttrs,i.attrs);let d=i.tView=DC(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),iu(i,!1);let l=gO(t,e,i,n);Hg()&&kC(t,e,l,i),fu(l,e);let c=UA(l,e,l,i);e[n+$t]=c,PC(e,c),qG(c,i,e)}function x6(i,e,t,n,r,o,s,a,l,c,d){let u=t+$t,f;return e.firstCreatePass?(f=_u(e,u,4,s||null,a||null),Lg()&&KA(e,i,f,no(e.consts,c),NC),t2(e,f)):f=e.data[u],mO(f,i,e,t,n,r,o,l),tu(f)&&R0(e,i,f),c!=null&&Yh(i,f,d),f}function Bh(i,e,t,n,r,o,s,a,l,c,d){let u=t+$t,f;if(e.firstCreatePass){if(f=_u(e,u,4,s||null,a||null),c!=null){let h=no(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 mO(f,i,e,t,n,r,o,l),c!=null&&Yh(i,f,d),f}function Za(i,e,t,n,r,o,s,a){let l=ht(),c=In(),d=no(c.consts,o);return x6(l,c,i,e,t,n,r,d,void 0,s,a),Za}var gO=vO;function vO(i,e,t,n){return ta(!0),e[qt].createComment("")}function _6(i,e,t,n){let r=!w0(e,t);ta(r);let o=e[Hi]?.data[C2]?.[n]??null;if(o!==null&&t.tView!==null&&t.tView.ssrId===null&&(t.tView.ssrId=o),r)return vO(i,e);let s=e[Hi],a=N0(s,i,e,t);C0(s,n,a);let l=gC(s,n);return L0(l,a)}function bO(){gO=_6}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||{}),LP=0,S6=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 C6=0,qh=1;var w6=4,E6=5;var M6=7,du=8,T6=9,YC=(function(i){return i[i.Manual=0]="Manual",i[i.Playthrough=1]="Playthrough",i})(YC||{});function i0(i,e){let t=I6(i),n=e[t];if(n!==null){for(let r of n)r();e[t]=null}}function D6(i){i0(1,i),i0(0,i),i0(2,i)}function I6(i){let e=w6;return i===1?e=E6:i===2&&(e=T6),e}function yO(i){return i+1}function Cu(i,e){let t=i[Qe],n=yO(e.index);return i[n]}function Kh(i,e){let t=yO(e.index);return i.data[t]}function P6(i,e,t){let n=e[Qe],r=Kh(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 UP(i,e){return e===Kn.Placeholder?i.placeholderBlockConfig?.[LP]??null:e===Kn.Loading?i.loadingBlockConfig?.[LP]??null:null}function A6(i){return i.loadingBlockConfig?.[S6]??null}function BP(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 O6(i,e){let t=e.primaryTmplIndex+$t;return nu(i,t)}var R6=(()=>{class i{cachedInjectors=new Map;getOrCreateInjector(t,n,r,o){if(!this.cachedInjectors.has(t)){let s=r.length>0?XC(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 xO=new Xe("");function u1(i,e,t){return i.get(R6).getOrCreateInjector(e,i,t,"")}function k6(i,e,t){if(i instanceof cu){let r=i.injector,o=i.parentInjector,s=u1(o,e,t);return new cu(r,s)}let n=i.get(Mi);if(n!==i){let r=u1(n,e,t);return new cu(i,r)}return u1(i,e,t)}function Sc(i,e,t,n=!1){let r=t[Vn],o=r[Qe];if(Wa(r))return;let s=Cu(r,e),a=s[qh],l=s[M6];if(!(l!==null&&i<l)&&zP(a,i)&&zP(s[C6]??-1,i)){let c=Kh(o,e),u=!n&&!0&&(A6(c)!==null||UP(c,Kn.Loading)!==null||UP(c,Kn.Placeholder))?L6:N6;try{u(i,s,t,e,r)}catch(f){BC(r,f)}}}function F6(i,e){let t=i[Mo]?.findIndex(r=>r.data[T2]===e[qh])??-1;return{dehydratedView:t>-1?i[Mo][t]:null,dehydratedViewIx:t}}function N6(i,e,t,n,r){en(Ht.DeferBlockStateStart);let o=P6(i,r,n);if(o!==null){e[qh]=i;let s=r[Qe],a=o+$t,l=nu(s,a),c=0;GC(t,c);let d;if(i===Kn.Complete){let p=Kh(s,n),v=p.providers;v&&v.length>0&&(d=k6(r[yr],p,v))}let{dehydratedView:u,dehydratedViewIx:f}=F6(t,e),h=yu(r,l,null,{injector:d,dehydratedView:u});if(xu(t,h,c,Mc(l,u)),k0(h,2),f>-1&&t[Mo]?.splice(f,1),(i===Kn.Complete||i===Kn.Error)&&Array.isArray(e[du])){for(let p of e[du])p();e[du]=null}}en(Ht.DeferBlockStateEnd)}function zP(i,e){return i<e}function VP(i,e,t){i.loadingPromise.then(()=>{i.loadingState===Cr.COMPLETE?Sc(Kn.Complete,e,t):i.loadingState===Cr.FAILED&&Sc(Kn.Error,e,t)})}var L6=null;function qC(i){return typeof i=="function"&&i[Qn]!==void 0}function KC(i){return qC(i)&&typeof i.set=="function"}var ZC=new Xe("");function wu(i){return!!i&&typeof i.then=="function"}function JC(i){return!!i&&typeof i.subscribe=="function"}var _O=new Xe("");var QC=(()=>{class i{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,n)=>{this.resolve=t,this.reject=n});appInits=Z(_O,{optional:!0})??[];injector=Z(Ti);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=Jd(this.injector,r);if(wu(o))t.push(o);else if(JC(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})(),Eu=new Xe("");function SO(){V_(()=>{let i="";throw new Ye(600,i)})}function CO(i){return i.isBoundToModule}var U6=10;var Dr=(()=>{class i{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=Z(na);afterRenderManager=Z(OC);zonelessEnabled=Z(Dh);rootEffectScheduler=Z(Wg);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new wo;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=Z(qa);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(rr(t=>!t))}constructor(){Z(vs,{optional:!0})}whenStable(){let t;return new Promise(n=>{t=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{t.unsubscribe()})}_injector=Z(Mi);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,n){return this.bootstrapImpl(t,n)}bootstrapImpl(t,n,r=Ti.NULL){return this._injector.get(or).run(()=>{en(Ht.BootstrapComponentStart);let s=t instanceof z0;if(!this._injector.get(QC).done){let p="";throw new Ye(405,p)}let l;s?l=t:l=this._injector.get(V0).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=CO(l)?void 0:this._injector.get(Lh),d=n||l.selector,u=l.create(r,[],d,c),f=u.location.nativeElement,h=u.injector.get(ZC,null);return h?.registerApplication(f),u.onDestroy(()=>{this.detachView(u.hostView),Ah(this.components,u),h?.unregisterApplication(f)}),this._loadComponent(u),en(Ht.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){en(Ht.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(I0.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw en(Ht.ChangeDetectionEnd),new Ye(101,!1);let t=at(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,at(t),this.afterTick.next(),en(Ht.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Tc,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<U6;){en(Ht.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{en(Ht.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&&!Eh(r))continue;let o=n&&!this.zonelessEnabled?0:1;kA(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})=>Eh(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;Ah(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(Eu,[]).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),()=>Ah(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new Ye(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 Ah(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function wO(){let i,e;return{promise:new Promise((n,r)=>{i=n,e=r}),resolve:i,reject:e}}function EO(i,e,t){let n=e[yr],r=e[Qe];if(i.loadingState!==Cr.NOT_STARTED)return i.loadingPromise??Promise.resolve();let o=Cu(e,t),s=O6(r,i);i.loadingState=Cr.IN_PROGRESS,i0(1,o);let a=i.dependencyResolverFn,l=n.get(su).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)||Tg(p);if(v)u.push(v);else{let g=SS(p);g&&f.push(g)}}else{d=!0;break}if(d){if(i.loadingState=Cr.FAILED,i.errorTmplIndex===null){let p=new Ye(-750,!1);BC(e,p)}}else{i.loadingState=Cr.COMPLETE;let h=s.tView;if(u.length>0){h.directiveRegistry=BP(h.directiveRegistry,u);let p=u.map(g=>g.type),v=Og(!1,...p);i.providers=v}f.length>0&&(h.pipeRegistry=BP(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 B6(i,e){return e[yr].get(xO,null,{optional:!0})?.behavior!==YC.Manual}function z6(i,e,t){let n=e[Qe],r=e[t.index];if(!B6(i,e))return;let o=Cu(e,t),s=Kh(n,t);switch(D6(o),s.loadingState){case Cr.NOT_STARTED:Sc(Kn.Loading,t,r),EO(s,e,t),s.loadingState===Cr.IN_PROGRESS&&VP(s,t,r);break;case Cr.IN_PROGRESS:Sc(Kn.Loading,t,r),VP(s,t,r);break;case Cr.COMPLETE:Sc(Kn.Complete,t,r);break;case Cr.FAILED:Sc(Kn.Error,t,r);break;default:}}async function MO(i,e,t){let n=i.get(S0);if(n.hydrating.has(e))return;let{parentBlockPromise:o,hydrationQueue:s}=Mz(e,i);if(s.length===0)return;o!==null&&s.shift(),H6(n,s),o!==null&&await o;let a=s[0];n.has(a)?await GP(i,s,t):n.awaitParentBlock(a,async()=>await GP(i,s,t))}async function GP(i,e,t){let n=i.get(S0),r=n.hydrating,o=i.get(qa),s=o.add();for(let l=0;l<e.length;l++){let c=e[l],d=n.get(c);if(d!=null){if(await W6(d),await j6(i),V6(d)){bG(d),HP(e.slice(l),n);break}r.get(c).resolve()}else{G6(l,e,n),HP(e.slice(l),n);break}}let a=e[e.length-1];await r.get(a)?.promise,o.remove(s),t&&t(e),yG(n.get(a),e,n,i.get(Dr))}function V6(i){return Cu(i.lView,i.tNode)[qh]===Kn.Error}function G6(i,e,t){let n=i-1,r=n>-1?t.get(e[n]):null;r&&B0(r.lContainer)}function HP(i,e){let t=e.hydrating;for(let n in i)t.get(n)?.reject();e.cleanup(i)}function H6(i,e){for(let t of e)i.hydrating.set(t,wO())}function j6(i){return new Promise(e=>P0(e,{injector:i}))}async function W6(i){let{tNode:e,lView:t}=i,n=Cu(t,e);return new Promise(r=>{$6(n,r),z6(2,t,e)})}function $6(i,e){Array.isArray(i[du])||(i[du]=[]),i[du].push(e)}function Pn(i,e,t,n){let r=ht(),o=$a();if(wr(r,o,e)){let s=In(),a=Mh();zV(a,r,i,e,t,n)}return Pn}function Ja(){return ht()[li][kn]}var q1=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 f1(i,e,t,n,r){return i===t&&Object.is(e,n)?1:Object.is(r(i,e),r(t,n))?-1:0}function X6(i,e,t,n){let r,o,s=0,a=i.length-1,l=void 0;if(Array.isArray(e)){at(n);let c=e.length-1;for(at(null);s<=a&&s<=c;){let d=i.at(s),u=e[s],f=f1(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=f1(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 g0,o??=WP(i,s,a,t),K1(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;)jP(i,r,t,s,e[s]),s++}else if(e!=null){at(n);let c=e[Symbol.iterator]();at(null);let d=c.next();for(;!d.done&&s<=a;){let u=i.at(s),f=d.value,h=f1(s,u,s,f,t);if(h!==0)h<0&&i.updateValue(s,f),s++,d=c.next();else{r??=new g0,o??=WP(i,s,a,t);let p=t(s,f);if(K1(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;)jP(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 K1(i,e,t,n){return e!==void 0&&e.has(n)?(i.attach(t,e.get(n)),e.delete(n),!0):!1}function jP(i,e,t,n,r){if(K1(i,e,n,t(n,r)))i.updateValue(n,r);else{let o=i.create(n,r);i.attach(n,o)}}function WP(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 g0=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){Oo("NgControlFlow");let l=ht(),c=In(),d=no(c.consts,o);return Bh(l,c,i,e,t,n,r,d,256,s,a),ew}function ew(i,e,t,n,r,o,s,a){Oo("NgControlFlow");let l=ht(),c=In(),d=no(c.consts,o);return Bh(l,c,i,e,t,n,r,d,512,s,a),ew}function me(i,e){Oo("NgControlFlow");let t=ht(),n=$a(),r=t[n]!==Mr?t[n]:-1,o=r!==-1?v0(t,$t+r):void 0,s=0;if(wr(t,n,i)){let a=at(null);try{if(o!==void 0&&GC(o,s),i!==-1){let l=$t+i,c=v0(t,l),d=eC(t[Qe],l),u=$A(c,d,t),f=yu(t,d,e,{dehydratedView:u});xu(c,f,s,Mc(d,u))}}finally{at(a)}}else if(o!==void 0){let a=BA(o,s);a!==void 0&&(a[kn]=e)}}var Z1=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 Mu(i){return i}function tw(i,e){return e}var J1=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Tt(i,e,t,n,r,o,s,a,l,c,d,u,f){Oo("NgControlFlow");let h=ht(),p=In(),v=l!==void 0,g=ht(),m=a?s.bind(g[li][kn]):s,b=new J1(v,m);g[$t+i]=b,Bh(h,p,i+1,e,t,n,r,no(p.consts,o),256),v&&Bh(h,p,i+2,l,c,d,u,no(p.consts,f),512)}var Q1=class extends q1{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,xu(this.lContainer,t,e,Mc(this.templateTNode,n)),Y6(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,q6(this.lContainer,e),K6(this.lContainer,e)}create(e,t){let n=Nh(this.lContainer,this.templateTNode.tView.ssrId);return yu(this.hostLView,this.templateTNode,new Z1(this.lContainer,t,e),{dehydratedView:n})}destroy(e){A0(e[Qe],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 Z6(this.lContainer,e)}};function Dt(i){let e=at(null),t=ea();try{let n=ht(),r=n[Qe],o=n[t],s=t+1,a=v0(n,s);if(o.liveCollection===void 0){let c=eC(r,s);o.liveCollection=new Q1(a,n,c)}else o.liveCollection.reset();let l=o.liveCollection;if(X6(l,i,o.trackByFn,e),l.updateIndexes(),o.hasEmptyBlock){let c=$a(),d=l.length===0;if(wr(n,c,d)){let u=t+2,f=v0(n,u);if(d){let h=eC(r,u),p=$A(f,h,n),v=yu(n,h,void 0,{dehydratedView:p});xu(f,v,0,Mc(h,p))}else r.firstUpdatePass&&U0(f),GC(f,0)}}}finally{at(e)}}function v0(i,e){return i[e]}function Y6(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t],r=n?n[ja]:void 0;if(n&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=n[yr];bV(o,r),Ec.delete(n[Qs]),r.detachedLeaveAnimationFns=void 0}}function q6(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t],r=n?n[ja]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function K6(i,e){return Fh(i,e)}function Z6(i,e){return BA(i,e)}function eC(i,e){return nu(i,e)}function te(i,e,t){let n=ht(),r=$a();if(wr(n,r,e)){let o=In(),s=Mh();TA(s,n,i,e,n[qt],t)}return te}function tC(i,e,t,n,r){zC(e,i,t,r?"class":"style",n)}function M(i,e,t,n){let r=ht(),o=r[Qe],s=i+$t,a=o.firstCreatePass?jC(s,r,2,e,NC,Lg(),t,n):o.data[s];if(fs(a)){let l=r[Eo].tracingService;if(l&&l.componentCreate){let c=o.data[a.directiveStart+a.componentOffset];return l.componentCreate(tO(c),()=>($P(i,e,r,a,n),M))}}return $P(i,e,r,a,n),M}function $P(i,e,t,n,r){if(LC(n,t,i,e,nw),tu(n)){let o=t[Qe];R0(o,t,n),vC(o,n,t)}r!=null&&Yh(t,n)}function I(){let i=In(),e=yi(),t=UC(e);return i.firstCreatePass&&WC(i,t),HS(t)&&jS(),GS(),t.classesWithoutHost!=null&&Y5(t)&&tC(i,t,ht(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&q5(t)&&tC(i,t,ht(),t.stylesWithoutHost,!1),I}function K(i,e,t,n){return M(i,e,t,n),I(),K}function ie(i,e,t,n){let r=ht(),o=r[Qe],s=i+$t,a=o.firstCreatePass?kG(s,o,2,e,t,n):o.data[s];return LC(a,r,i,e,nw),n!=null&&Yh(r,a),ie}function de(){let i=yi(),e=UC(i);return HS(e)&&jS(),GS(),de}function mt(i,e,t,n){return ie(i,e,t,n),de(),mt}var nw=(i,e,t,n,r)=>(ta(!0),CC(e[qt],n,JS()));function J6(i,e,t,n,r){let o=!w0(e,t);if(ta(o),o)return CC(e[qt],n,JS());let s=e[Hi],a=N0(s,i,e,t);return X2(s,r)&&C0(s,r,a.nextSibling),s&&(h2(t)||p2(a))&&fs(t)&&(VI(t),sA(a)),a}function TO(){nw=J6}function iw(i,e,t){let n=ht(),r=n[Qe],o=i+$t,s=r.firstCreatePass?jC(o,n,8,"ng-container",NC,Lg(),e,t):r.data[o];if(LC(s,n,i,"ng-container",DO),tu(s)){let a=n[Qe];R0(a,n,s),vC(a,s,n)}return t!=null&&Yh(n,s),iw}function rw(){let i=In(),e=yi(),t=UC(e);return i.firstCreatePass&&WC(i,t),rw}function Ir(i,e,t){return iw(i,e,t),rw(),Ir}var DO=(i,e,t,n,r)=>(ta(!0),rA(e[qt],""));function Q6(i,e,t,n,r){let o,s=!w0(e,t);if(ta(s),s)return rA(e[qt],"");let a=e[Hi],l=N0(a,i,e,t),c=wz(a,r);return C0(a,r,l),o=L0(c,l),o}function IO(){DO=Q6}function Ue(){return ht()}function ci(i,e,t){let n=ht(),r=$a();if(wr(n,r,e)){let o=In(),s=Mh();DA(s,n,i,e,n[qt],t)}return ci}var Ih=void 0;function e8(i){let e=Math.floor(Math.abs(i)),t=i.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var t8=["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"]],Ih,[["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"]],Ih,[["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}",Ih,Ih,Ih],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",e8],h1={};function j0(i){let e=n8(i),t=XP(e);if(t)return t;let n=e.split("-")[0];if(t=XP(n),t)return t;if(n==="en")return t8;throw new Ye(701,!1)}function XP(i){return i in h1||(h1[i]=Zr.ng&&Zr.ng.common&&Zr.ng.common.locales&&Zr.ng.common.locales[i]),h1[i]}var Ic=(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})(Ic||{});function n8(i){return i.toLowerCase().replace(/_/g,"-")}var Zh="en-US";var i8=Zh;function PO(i){typeof i=="string"&&(i8=i.toLowerCase().replace(/_/g,"-"))}function oe(i,e,t){let n=ht(),r=In(),o=yi();return AO(r,n,n[qt],o,i,e,t),oe}function Gn(i,e,t){let n=ht(),r=In(),o=yi();return(o.type&3||t)&&QA(o,r,n,t,n[qt],i,e,n0(o,n,e)),Gn}function AO(i,e,t,n,r,o,s){let a=!0,l=null;if((n.type&3||s)&&(l??=n0(n,e,o),QA(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??=n0(n,e,o),RP(n,e,f,h,r,l)}if(c&&c.length)for(let u of c)l??=n0(n,e,o),RP(n,e,u,r,r,l)}}function E(i=1){return QI(i)}function r8(i,e){let t=null,n=iV(i);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(n===null?uA(i,o,!0):sV(n,o))return r}return t}function xi(i){let e=ht()[li][Gi];if(!e.projection){let t=i?i.length:1,n=e.projection=EI(t,null),r=n.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=i?r8(o,i):0;s!==null&&(r[s]?r[s].projectionNext=o:n[s]=o,r[s]=o)}o=o.next}}}function _i(i,e=0,t,n,r,o){let s=ht(),a=In(),l=n?i+1:null;l!==null&&Bh(s,a,l,n,r,o,null,t);let c=_u(a,$t+i,16,null,t||null);c.projection===null&&(c.projection=e),XS();let u=!s[Hi]||Ug();s[li][Gi].projection[c.projection]===null&&l!==null?o8(s,a,l):u&&!Wh(c)&&IV(a,s,c)}function o8(i,e,t){let n=$t+t,r=e.data[n],o=i[n],s=Nh(o,r.tView.ssrId),a=yu(i,r,void 0,{dehydratedView:s});xu(o,a,0,Mc(r,s))}function Qa(i,e,t,n){return a6(i,i6(e,t,n)),Qa}function Pc(i=1){zg(qI()+i)}function io(i){let e=HI();return kg(e,$t+i)}function Kg(i,e){return i<<17|e<<2}function Dc(i){return i>>17&32767}function s8(i){return(i&2)==2}function a8(i,e){return i&131071|e<<17}function nC(i){return i|2}function mu(i){return(i&131068)>>2}function p1(i,e){return i&-131069|e<<2}function l8(i){return(i&1)===1}function iC(i){return i|1}function c8(i,e,t,n,r,o){let s=o?e.classBindings:e.styleBindings,a=Dc(s),l=mu(s);i[n]=t;let c=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||Kd(u,d)>0)&&(c=!0)}else d=t;if(r)if(l!==0){let f=Dc(i[a+1]);i[n+1]=Kg(f,a),f!==0&&(i[f+1]=p1(i[f+1],n)),i[a+1]=a8(i[a+1],n)}else i[n+1]=Kg(a,0),a!==0&&(i[a+1]=p1(i[a+1],n)),a=n;else i[n+1]=Kg(l,0),a===0?a=n:i[l+1]=p1(i[l+1],n),l=n;c&&(i[n+1]=nC(i[n+1])),YP(i,d,n,!0),YP(i,d,n,!1),d8(e,d,i,n,o),s=Kg(a,l),o?e.classBindings=s:e.styleBindings=s}function d8(i,e,t,n,r){let o=r?i.residualClasses:i.residualStyles;o!=null&&typeof e=="string"&&Kd(o,e)>=0&&(t[n+1]=iC(t[n+1]))}function YP(i,e,t,n){let r=i[t+1],o=e===null,s=n?Dc(r):mu(r),a=!1;for(;s!==0&&(a===!1||o);){let l=i[s],c=i[s+1];u8(l,e)&&(a=!0,i[s+1]=n?iC(c):nC(c)),s=n?Dc(c):mu(c)}a&&(i[t+1]=n?nC(r):iC(r))}function u8(i,e){return i===null||e==null||(Array.isArray(i)?i[1]:i)===e?!0:Array.isArray(i)&&typeof e=="string"?Kd(i,e)>=0:!1}var Do={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function f8(i){return i.substring(Do.key,Do.keyEnd)}function h8(i){return p8(i),OO(i,RO(i,0,Do.textEnd))}function OO(i,e){let t=Do.textEnd;return t===e?-1:(e=Do.keyEnd=m8(i,Do.key=e,t),RO(i,e,t))}function p8(i){Do.key=0,Do.keyEnd=0,Do.value=0,Do.valueEnd=0,Do.textEnd=i.length}function RO(i,e,t){for(;e<t&&i.charCodeAt(e)<=32;)e++;return e}function m8(i,e,t){for(;e<t&&i.charCodeAt(e)>32;)e++;return e}function ro(i,e,t){return kO(i,e,t,!1),ro}function ft(i,e){return kO(i,e,null,!0),ft}function oo(i){v8(C8,g8,i,!0)}function g8(i,e){for(let t=h8(e);t>=0;t=OO(e,t))Pg(i,f8(e),!0)}function kO(i,e,t,n){let r=ht(),o=In(),s=qS(2);if(o.firstUpdatePass&&NO(o,i,s,n),e!==Mr&&wr(r,s,e)){let a=o.data[ea()];LO(o,a,r,r[qt],i,r[s+1]=E8(e,t),n,s)}}function v8(i,e,t,n){let r=In(),o=qS(2);r.firstUpdatePass&&NO(r,null,o,n);let s=ht();if(t!==Mr&&wr(s,o,t)){let a=r.data[ea()];if(UO(a,n)&&!FO(r,o)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=wg(l,t||"")),tC(r,a,s,t,n)}else w8(r,a,s,s[qt],s[o+1],s[o+1]=S8(i,e,t),n,o)}}function FO(i,e){return e>=i.expandoStartIndex}function NO(i,e,t,n){let r=i.data;if(r[t+1]===null){let o=r[ea()],s=FO(i,t);UO(o,n)&&e===null&&!s&&(e=!1),e=b8(r,o,e,n),c8(r,o,e,t,s,n)}}function b8(i,e,t,n){let r=YI(i),o=n?e.residualClasses:e.residualStyles;if(r===null)(n?e.classBindings:e.styleBindings)===0&&(t=m1(null,i,e,t,n),t=zh(t,e.attrs,n),o=null);else{let s=e.directiveStylingLast;if(s===-1||i[s]!==r)if(t=m1(r,i,e,t,n),o===null){let l=y8(i,e,n);l!==void 0&&Array.isArray(l)&&(l=m1(null,i,e,l[1],n),l=zh(l,e.attrs,n),x8(i,e,n,l))}else o=_8(i,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),t}function y8(i,e,t){let n=t?e.classBindings:e.styleBindings;if(mu(n)!==0)return i[Dc(n)]}function x8(i,e,t,n){let r=t?e.classBindings:e.styleBindings;i[Dc(r)]=n}function _8(i,e,t){let n,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=i[o].hostAttrs;n=zh(n,s,t)}return zh(n,e.attrs,t)}function m1(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=zh(n,o.hostAttrs,r),o!==i);)a++;return i!==null&&(t.directiveStylingLast=a),n}function zh(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]),Pg(i,s,t?!0:e[++o]))}return i===void 0?null:i}function S8(i,e,t){if(t==null||t==="")return Ei;let n=[],r=Po(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 C8(i,e,t){let n=String(e);n!==""&&!n.includes(" ")&&Pg(i,n,t)}function w8(i,e,t,n,r,o,s,a){r===Mr&&(r=Ei);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&&LO(i,e,t,n,p,v,s,a),d=l<r.length?r[l]:null,u=c<o.length?o[c]:null}}function LO(i,e,t,n,r,o,s,a){if(!(e.type&3))return;let l=i.data,c=l[a+1],d=l8(c)?qP(l,e,t,r,mu(c),s):void 0;if(!b0(d)){b0(o)||s8(c)&&(o=qP(l,null,t,r,a,s));let u=FS(ea(),t);AV(n,s,u,r,o)}}function qP(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?Ei:void 0);let h=u?Ag(f,n):d===n?f:void 0;if(c&&!b0(h)&&(h=Ag(l,n)),b0(h)&&(a=h,s))return a;let p=i[r+1];r=s?Dc(p):mu(p)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=Ag(l,n))}return a}function b0(i){return i!==void 0}function E8(i,e){return i==null||i===""||(typeof e=="string"?i=i+e:typeof i=="object"&&(i=Cg(Po(i)))),i}function UO(i,e){return(i.flags&(e?8:16))!==0}function F(i,e=""){let t=ht(),n=In(),r=i+$t,o=n.firstCreatePass?_u(n,r,1,e,null):n.data[r],s=BO(n,t,o,e);t[r]=s,Hg()&&kC(n,t,s,o),iu(o,!1)}var BO=(i,e,t,n)=>(ta(!0),iA(e[qt],n));function M8(i,e,t,n){let r=!w0(e,t);if(ta(r),r)return iA(e[qt],n);let o=e[Hi];return N0(o,i,e,t)}function zO(){BO=M8}function VO(i,e,t,n=""){return wr(i,$a(),t)?e+_h(t)+n:Mr}function $e(i){return Ut("",i),$e}function Ut(i,e,t){let n=ht(),r=VO(n,i,e,t);return r!==Mr&&T8(n,ea(),r),Ut}function T8(i,e,t){let n=FS(e,i);qz(i[qt],n,t)}function Ac(i,e,t){KC(e)&&(e=e());let n=ht(),r=$a();if(wr(n,r,e)){let o=In(),s=Mh();TA(s,n,i,e,n[qt],t)}return Ac}function bs(i,e){let t=KC(i);return t&&i.set(e),t}function Jh(i,e){let t=ht(),n=In(),r=yi();return AO(n,t,t[qt],r,i,e),Jh}function W0(i,e,t=""){return VO(ht(),i,e,t)}function KP(i,e,t){let n=In();n.firstCreatePass&&GO(e,n.data,n.blueprint,hs(i),t)}function GO(i,e,t,n,r){if(i=bi(i),Array.isArray(i))for(let o=0;o<i.length;o++)GO(i[o],e,t,n,r);else{let o=In(),s=ht(),a=yi(),l=hc(i)?i:bi(i.provide),c=PS(i),d=a.providerIndexes&1048575,u=a.directiveStart,f=a.providerIndexes>>20;if(hc(i)||!i.multi){let h=new wc(c,r,jt,null),p=v1(l,e,r?d:d+f,u);p===-1?(y1(l0(a,s),o,l),g1(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=v1(l,e,d+f,u),p=v1(l,e,d,d+f),v=h>=0&&t[h],g=p>=0&&t[p];if(r&&!g||!r&&!v){y1(l0(a,s),o,l);let m=P8(r?I8:D8,t.length,r,n,c,i);!r&&g&&(t[p].providerFactory=m),g1(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=HO(t[r?p:h],c,!r&&n);g1(o,i,h>-1?h:p,m)}!r&&n&&g&&t[p].componentProviders++}}}function g1(i,e,t,n){let r=hc(e),o=AI(e);if(r||o){let l=(o?bi(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 HO(i,e,t){return t&&i.componentProviders++,i.multi.push(e)-1}function v1(i,e,t,n){for(let r=t;r<n;r++)if(e[r]===i)return r;return-1}function D8(i,e,t,n,r){return rC(this.multi,[])}function I8(i,e,t,n,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=Oh(n,n[Qe],this.providerFactory.index,r);s=l.slice(0,a),rC(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],rC(o,s);return s}function rC(i,e){for(let t=0;t<i.length;t++){let n=i[t];e.push(n())}return e}function P8(i,e,t,n,r,o){let s=new wc(i,t,jt,null);return s.multi=[],s.index=e,s.componentProviders=0,HO(s,r,n&&!t),s}function so(i,e){return t=>{t.providersResolver=(n,r)=>KP(n,r?r(i):i,!1),e&&(t.viewProvidersResolver=(n,r)=>KP(n,r?r(e):e,!0))}}function ow(i,e){let t=ru()+i,n=ht();return n[t]===Mr?G0(n,t,e()):FG(n,t)}function ys(i,e,t){return A8(ht(),ru(),i,e,t)}function $0(i,e,t,n){return jO(ht(),ru(),i,e,t,n)}function sw(i,e){let t=i[e];return t===Mr?void 0:t}function A8(i,e,t,n,r,o){let s=e+t;return wr(i,s,r)?G0(i,s+1,o?n.call(o,r):n(r)):sw(i,s+1)}function jO(i,e,t,n,r,o,s){let a=e+t;return JA(i,a,r,o)?G0(i,a+2,s?n.call(s,r,o):n(r,o)):sw(i,a+2)}function O8(i,e,t,n,r,o,s,a){let l=e+t;return NG(i,l,r,o,s)?G0(i,l+3,a?n.call(a,r,o,s):n(r,o,s)):sw(i,l+3)}function Di(i,e){let t=In(),n,r=i+$t;t.firstCreatePass?(n=R8(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=Ba(n.type,!0)),s,a=Bi(jt);try{let l=a0(!1),c=o();return a0(l),NS(t,ht(),r,c),c}finally{Bi(a)}}function R8(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+$t,o=ht(),s=kg(o,r);return WO(o,r)?jO(o,ru(),e,s.transform,t,n,s):s.transform(t,n)}function aw(i,e,t,n,r){let o=i+$t,s=ht(),a=kg(s,o);return WO(s,o)?O8(s,ru(),e,a.transform,t,n,r,a):a.transform(t,n,r)}function WO(i,e){return i[Qe].data[e].pure}function el(i,e){return F0(i,e)}var $O=(()=>{class i{applicationErrorHandler=Z(na);appRef=Z(Dr);taskService=Z(qa);ngZone=Z(or);zonelessEnabled=Z(Dh);tracing=Z(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(yh):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(Z(i1,{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?rP:QS;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(yh+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 XO(){return[{provide:ls,useExisting:$O},{provide:or,useClass:xh},{provide:Dh,useValue:!0}]}function k8(){return typeof $localize<"u"&&$localize.locale||Zh}var Qh=new Xe("",{factory:()=>Z(Qh,{optional:!0,skipSelf:!0})||k8()});var ep=class{destroyed=!1;listeners=null;errorHandler=Z(Kr,{optional:!0});destroyRef=Z(sr);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new Ye(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=at(null);try{for(let n of this.listeners)try{n(e)}catch(r){this.errorHandler?.handleError(r)}}finally{at(t)}}};function En(i){return pI(i)}function Pe(i,e){return dh(i,e?.equal)}var fw={JSACTION:"__jsaction",OWNER:"__owner"},ZO={};function F8(i){return i[fw.JSACTION]}function YO(i,e){i[fw.JSACTION]=e}function N8(i){return ZO[i]}function L8(i,e){ZO[i]=e}var dt={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"},U8=[dt.MOUSEENTER,dt.MOUSELEAVE,"pointerenter","pointerleave"],Yue=[dt.CLICK,dt.DBLCLICK,dt.FOCUSIN,dt.FOCUSOUT,dt.KEYDOWN,dt.KEYUP,dt.KEYPRESS,dt.MOUSEOVER,dt.MOUSEOUT,dt.SUBMIT,dt.TOUCHSTART,dt.TOUCHEND,dt.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"],B8=[dt.FOCUS,dt.BLUR,dt.ERROR,dt.LOAD,dt.TOGGLE],hw=i=>B8.indexOf(i)>=0;function z8(i){return i===dt.MOUSEENTER?dt.MOUSEOVER:i===dt.MOUSELEAVE?dt.MOUSEOUT:i===dt.POINTERENTER?dt.POINTEROVER:i===dt.POINTERLEAVE?dt.POINTEROUT:i}function V8(i,e,t,n){let r=!1;hw(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 G8(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 H8(i){i.preventDefault?i.preventDefault():i.returnValue=!1}var qO=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function j8(i){return i.which===2||i.which==null&&i.button===4}function W8(i){return qO&&i.metaKey||!qO&&i.ctrlKey||j8(i)||i.shiftKey}function $8(i,e,t){let n=i.relatedTarget;return(i.type===dt.MOUSEOVER&&e===dt.MOUSEENTER||i.type===dt.MOUSEOUT&&e===dt.MOUSELEAVE||i.type===dt.POINTEROVER&&e===dt.POINTERENTER||i.type===dt.POINTEROUT&&e===dt.POINTERLEAVE)&&(!n||n!==t&&!t.contains(n))}function X8(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===dt.MOUSEOVER?t.type=dt.MOUSEENTER:i.type===dt.MOUSEOUT?t.type=dt.MOUSELEAVE:i.type===dt.POINTEROVER?t.type=dt.POINTERENTER:t.type=dt.POINTERLEAVE,t.target=t.srcElement=e,t.bubbles=!1,t._originalEvent=i,t}var Y8=typeof navigator<"u"&&/iPhone|iPad|iPod/.test(navigator.userAgent),K0=class{element;handlerInfos=[];constructor(e){this.element=e}addEventListener(e,t,n){Y8&&(this.element.style.cursor="pointer"),this.handlerInfos.push(V8(this.element,e,t(this.element),n))}cleanUp(){for(let e=0;e<this.handlerInfos.length;e++)G8(this.element,this.handlerInfos[e]);this.handlerInfos=[]}},q8={NAMESPACE_ACTION_SEPARATOR:".",EVENT_ACTION_SEPARATOR:":"};function tl(i){return i.eventType}function pw(i,e){i.eventType=e}function Y0(i){return i.event}function JO(i,e){i.event=e}function QO(i){return i.targetElement}function eR(i,e){i.targetElement=e}function tR(i){return i.eic}function K8(i,e){i.eic=e}function Z8(i){return i.timeStamp}function J8(i,e){i.timeStamp=e}function q0(i){return i.eia}function nR(i,e,t){i.eia=[e,t]}function lw(i){i.eia=void 0}function X0(i){return i[1]}function Q8(i){return i.eirp}function iR(i,e){i.eirp=e}function rR(i){return i.eir}function oR(i,e){i.eir=e}function sR(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 eH(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 cw=class i{eventInfo;constructor(e){this.eventInfo=e}getEventType(){return tl(this.eventInfo)}setEventType(e){pw(this.eventInfo,e)}getEvent(){return Y0(this.eventInfo)}setEvent(e){JO(this.eventInfo,e)}getTargetElement(){return QO(this.eventInfo)}setTargetElement(e){eR(this.eventInfo,e)}getContainer(){return tR(this.eventInfo)}setContainer(e){K8(this.eventInfo,e)}getTimestamp(){return Z8(this.eventInfo)}setTimestamp(e){J8(this.eventInfo,e)}getAction(){let e=q0(this.eventInfo);if(e)return{name:e[0],element:e[1]}}setAction(e){if(!e){lw(this.eventInfo);return}nR(this.eventInfo,e.name,e.element)}getIsReplay(){return Q8(this.eventInfo)}setIsReplay(e){iR(this.eventInfo,e)}getResolved(){return rR(this.eventInfo)}setResolved(e){oR(this.eventInfo,e)}clone(){return new i(sR(this.eventInfo))}},tH={},nH=/\s*;\s*/,iH=dt.CLICK,dw=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&&tl(e)===dt.CLICK&&W8(Y0(e))?pw(e,dt.CLICKMOD):this.a11yClickSupport&&this.updateEventInfoForA11yClick(e)}resolveAction(e){rR(e)||(this.populateAction(e,QO(e)),oR(e,!0))}resolveParentAction(e){let t=q0(e),n=t&&X0(t);lw(e);let r=n&&this.getParentNode(n);r&&this.populateAction(e,r)}populateAction(e,t){let n=t;for(;n&&n!==tR(e)&&(n.nodeType===Node.ELEMENT_NODE&&this.populateActionOnElement(n,e),!q0(e));)n=this.getParentNode(n);let r=q0(e);if(r&&(this.a11yClickSupport&&this.preventDefaultForA11yClick(e),this.syntheticMouseEventSupport&&(tl(e)===dt.MOUSEENTER||tl(e)===dt.MOUSELEAVE||tl(e)===dt.POINTERENTER||tl(e)===dt.POINTERLEAVE)))if($8(Y0(e),tl(e),X0(r))){let o=X8(Y0(e),X0(r));JO(e,o),eR(e,X0(r))}else lw(e)}getParentNode(e){let t=e[fw.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[tl(t)];r!==void 0&&nR(t,r,e),this.a11yClickSupport&&this.populateClickOnlyAction(e,t,n)}parseActions(e){let t=F8(e);if(!t){let n=e.getAttribute($g.JSACTION);if(!n)t=tH,YO(e,t);else{if(t=N8(n),!t){t={};let r=n.split(nH);for(let o=0;o<r.length;o++){let s=r[o];if(!s)continue;let a=s.indexOf(q8.EVENT_ACTION_SEPARATOR),l=a!==-1,c=l?s.substr(0,a).trim():iH,d=l?s.substr(a+1).trim():s;t[c]=d}L8(n,t)}YO(e,t)}}return t}addA11yClickSupport(e,t,n){this.a11yClickSupport=!0,this.updateEventInfoForA11yClick=e,this.preventDefaultForA11yClick=t,this.populateClickOnlyAction=n}},aR=(function(i){return i[i.I_AM_THE_JSACTION_FRAMEWORK=0]="I_AM_THE_JSACTION_FRAMEWORK",i})(aR||{}),uw=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 cw(e);this.actionResolver?.resolveEventType(e),this.actionResolver?.resolveAction(e);let n=t.getAction();if(n&&rH(n.element,t)&&H8(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 rH(i,e){return i.tagName==="A"&&(e.getEventType()===dt.CLICK||e.getEventType()===dt.CLICKMOD)}var lR=Symbol.for("propagationStopped"),mw={REPLAY:101};var oH="`preventDefault` called during event replay.";var sH="`composedPath` called during event replay.",Z0=class{dispatchDelegate;clickModSupport;actionResolver;dispatcher;constructor(e,t=!0){this.dispatchDelegate=e,this.clickModSupport=t,this.actionResolver=new dw({clickModSupport:t}),this.dispatcher=new uw(n=>{this.dispatchToDelegate(n)},{actionResolver:this.actionResolver})}dispatch(e){this.dispatcher.dispatch(e)}dispatchToDelegate(e){for(e.getIsReplay()&&cH(e),aH(e);e.getAction();){if(dH(e),hw(e.getEventType())&&e.getAction().element!==e.getTargetElement()||(this.dispatchDelegate(e.getEvent(),e.getAction().name),lH(e)))return;this.actionResolver.resolveParentAction(e.eventInfo)}}};function aH(i){let e=i.getEvent(),t=i.getEvent().stopPropagation.bind(e),n=()=>{e[lR]=!0,t()};Oc(e,"stopPropagation",n),Oc(e,"stopImmediatePropagation",n)}function lH(i){return!!i.getEvent()[lR]}function cH(i){let e=i.getEvent(),t=i.getTargetElement(),n=e.preventDefault.bind(e);Oc(e,"target",t),Oc(e,"eventPhase",mw.REPLAY),Oc(e,"preventDefault",()=>{throw n(),new Error(oH+"")}),Oc(e,"composedPath",()=>{throw new Error(sH+"")})}function dH(i){let e=i.getEvent(),t=i.getAction()?.element;t&&Oc(e,"currentTarget",t,{configurable:!0})}function Oc(i,e,t,{configurable:n=!1}={}){Object.defineProperty(i,e,{value:t,configurable:n})}function cR(i,e){i.ecrd(t=>{e.dispatch(t)},aR.I_AM_THE_JSACTION_FRAMEWORK)}function uH(i){return i?.q??[]}function fH(i){i&&(KO(i.c,i.et,i.h),KO(i.c,i.etc,i.h,!0))}function KO(i,e,t,n){for(let r=0;r<e.length;r++)i.removeEventListener(e[r],t,n)}var hH=!1,dR=(()=>{class i{static MOUSE_SPECIAL_SUPPORT=hH;containerManager;eventHandlers={};browserEventTypeToExtraEventTypes={};dispatcher=null;queuedEventInfos=[];constructor(t){this.containerManager=t}handleEvent(t,n,r){let o=eH(t,n,n.target,r,Date.now());this.handleEventInfo(o)}handleEventInfo(t){if(!this.dispatcher){iR(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&&U8.indexOf(t)>=0)return;let o=(a,l,c)=>{this.handleEvent(a,l,c)};this.eventHandlers[t]=o;let s=z8(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),fH(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=sR(r);pw(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 uR(i,e=window){return uH(e._ejsas?.[i])}function gw(i,e=window){e._ejsas&&(e._ejsas[i]=void 0)}var ev=Symbol("InputSignalNode#UNSET"),xR=fe(R({},qm),{transformFn:void 0,applyValueToInputSignal(i,e){oc(i,e)}});function _R(i,e){let t=Object.create(xR);t.value=i,t.transformFn=e?.transform;function n(){if(nc(t),t.value===ev){let r=null;throw new Ye(-950,r)}return t.value}return n[Qn]=t,n}function Pt(i){return new ep}function fR(i,e){return _R(i,e)}function AH(i){return _R(ev,i)}var Me=(fR.required=AH,fR);function hR(i,e){return uO(e)}function OH(i,e){return fO(e)}var Tu=(hR.required=OH,hR);function SR(i,e){let t=Object.create(xR),n=new ep;t.value=i;function r(){return nc(t),pR(t.value),t.value}return r[Qn]=t,r.asReadonly=jg.bind(r),r.set=o=>{t.equal(t.value,o)||(oc(t,o),n.emit(o))},r.update=o=>{pR(t.value),r.set(o(t.value))},r.subscribe=n.subscribe.bind(n),r.destroyRef=n.destroyRef,r}function pR(i){if(i===ev)throw new Ye(952,!1)}function mR(i,e){return SR(i,e)}function RH(i){return SR(ev,i)}var xs=(mR.required=RH,mR);var vw=new Xe(""),kH=new Xe("");function tp(i){return!i.moduleRef}function FH(i){let e=tp(i)?i.r3Injector:i.moduleRef.injector,t=e.get(or);return t.run(()=>{tp(i)?i.r3Injector.resolveInjectorInitializers():i.moduleRef.resolveInjectorInitializers();let n=e.get(na),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:n})}),tp(i)){let o=()=>e.destroy(),s=i.platformInjector.get(vw);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>i.moduleRef.destroy(),s=i.platformInjector.get(vw);s.add(o),i.moduleRef.onDestroy(()=>{Ah(i.allPlatformModules,i.moduleRef),r.unsubscribe(),s.delete(o)})}return LH(n,t,()=>{let o=e.get(qa),s=o.add(),a=e.get(QC);return a.runInitializers(),a.donePromise.then(()=>{let l=e.get(Qh,Zh);if(PO(l||Zh),!e.get(kH,!0))return tp(i)?e.get(Dr):(i.allPlatformModules.push(i.moduleRef),i.moduleRef);if(tp(i)){let d=e.get(Dr);return i.rootComponent!==void 0&&d.bootstrap(i.rootComponent),d}else return NH?.(i.moduleRef,i.allPlatformModules),i.moduleRef}).finally(()=>{o.remove(s)})})})}var NH;function LH(i,e,t){try{let n=t();return wu(n)?n.catch(r=>{throw e.runOutsideAngular(()=>i(r)),r}):n}catch(n){throw e.runOutsideAngular(()=>i(n)),n}}var Q0=null;function UH(i=[],e){return Ti.create({name:e,providers:[{provide:Ch,useValue:"platform"},{provide:vw,useValue:new Set([()=>Q0=null])},...i]})}function BH(i=[]){if(Q0)return Q0;let e=UH(i);return Q0=e,SO(),zH(e),e}function zH(i){let e=i.get(y0,null);Jd(i,()=>{e?.forEach(t=>t())})}var J0=new WeakSet,gR="";function vR(i){return i.get(fC,P2)}function CR(){let i=[{provide:fC,useFactory:()=>{let e=!0;{let t=Z(gs);e=!!window._ejsas?.[t]}return e&&Oo("NgEventReplay"),e}}];return i.push({provide:Zs,useValue:()=>{let e=Z(Dr),{injector:t}=e;if(!J0.has(e)){let n=Z(hC);if(vR(t)){B2();let r=t.get(gs),o=L2(r,(s,a,l)=>{s.nodeType===Node.ELEMENT_NODE&&(R2(s,a,l),k2(s,n))});e.onDestroy(o)}}},multi:!0},{provide:Eu,useFactory:()=>{let e=Z(Dr),{injector:t}=e;return()=>{if(!vR(t)||J0.has(e))return;J0.add(e);let n=t.get(gs);e.onDestroy(()=>{J0.delete(e),gw(n)}),e.whenStable().then(()=>{if(e.destroyed)return;let r=t.get(N2);VH(r,t);let o=t.get(hC);o.get(gR)?.forEach(F2),o.delete(gR);let s=r.instance;$2(t)?e.onDestroy(()=>s.cleanUp()):s.cleanUp()})}},multi:!0}),i}var VH=(i,e)=>{let t=e.get(gs),n=window._ejsas[t],r=i.instance=new dR(new K0(n.c));for(let a of n.et)r.addEvent(a);for(let a of n.etc)r.addEvent(a);let o=uR(t);r.replayEarlyEventInfos(o),gw(t);let s=new Z0(a=>{GH(e,a,a.currentTarget)});cR(r,s)};function GH(i,e,t){let n=(t&&t.getAttribute(jh))??"";/d\d+/.test(n)?HH(n,i,e,t):e.eventPhase===mw.REPLAY&&pC(e,t)}function HH(i,e,t,n){let r=e.get(A2);r.push({event:t,currentTarget:n}),MO(e,i,jH(r))}function jH(i){return e=>{let t=new Set(e),n=[];for(let{event:r,currentTarget:o}of i){let s=o.getAttribute(jh);t.has(s)?pC(r,o):n.push({event:r,currentTarget:o})}i.length=0,i.push(...n)}}var bR=!1;var WH=1e4;function $H(){bR||(bR=!0,H2(),TO(),zO(),IO(),bO(),sO(),WA(),MA())}function XH(i){return i.whenStable()}function wR(){let i=[{provide:Hh,useFactory:()=>{let e=!0;return e=!!Z(bu,{optional:!0})?.get(mC,null),e&&Oo("NgHydration"),e}},{provide:Zs,useValue:()=>{VA(!1);let e=Z(Cn);Z(Hh)&&(q2(e),$H())},multi:!0}];return i.push({provide:uC,useFactory:()=>Z(Hh)},{provide:Eu,useFactory:()=>{let e=Z(ls);if(Z(Hh)){let t=Z(Dr);return()=>{XH(t).then(()=>{t.destroyed||(HC(t),e.notify(7))})}}return()=>{}},multi:!0}),Js(i)}var Vge=WH-1e3;var tv=(()=>{class i{static __NG_ELEMENT_ID__=YH}return i})();function YH(i){return qH(yi(),ht(),(i&16)===16)}function qH(i,e,t){if(fs(i)&&!t){let n=to(i.index,e);return new Ka(n,n)}else if(i.type&175){let n=e[li];return new Ka(n,e)}return null}function ER(i){let{rootComponent:e,appProviders:t,platformProviders:n,platformRef:r}=i;en(Ht.BootstrapApplicationStart);try{let o=r?.injector??BH(n),s=[XO(),sP,...t||[]],a=new Uh({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return FH({r3Injector:a.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{en(Ht.BootstrapApplicationEnd)}}function nv(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function MR(i,e){let t=Ks(i),n=e.elementInjector||Zd();return new pu(t).create(n,e.projectableNodes,e.hostElement,e.environmentInjector,e.directives,e.bindings)}var TR=null;function ao(){return TR}function bw(i){TR??=i}var np=class{},iv=(()=>{class i{historyGo(t){throw new Error("")}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:()=>Z(DR),providedIn:"platform"})}return i})();var DR=(()=>{class i extends iv{_location;_history;_doc=Z(Cn);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ao().getBaseHref(this._doc)}onPopState(t){let n=ao().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",t,!1),()=>n.removeEventListener("popstate",t)}onHashChange(t){let n=ao().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 _w=(function(i){return i[i.Decimal=0]="Decimal",i[i.Percent=1]="Percent",i[i.Currency=2]="Currency",i[i.Scientific=3]="Scientific",i})(_w||{});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 Du(i,e){let t=j0(i),n=t[Ic.NumberSymbols][e];if(typeof n>"u"){if(e===_s.CurrencyDecimal)return t[Ic.NumberSymbols][_s.Decimal];if(e===_s.CurrencyGroup)return t[Ic.NumberSymbols][_s.Group]}return n}function PR(i,e){return j0(i)[Ic.NumberFormats][e]}var KH=/^(\d+)?\.((\d+)(-(\d+))?)?$/,IR=22,rv=".",ip="0",ZH=";",JH=",",yw="#";function QH(i,e,t,n,r,o,s=!1){let a="",l=!1;if(!isFinite(i))a=Du(t,_s.Infinity);else{let c=nj(i);s&&(c=tj(c));let d=e.minInt,u=e.minFrac,f=e.maxFrac;if(o){let b=o.match(KH);if(b===null)throw new Ye(2306,!1);let y=b[1],x=b[3],_=b[5];y!=null&&(d=xw(y)),x!=null&&(u=xw(x)),_!=null?f=xw(_):x!=null&&u>f&&(f=u)}ij(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(Du(t,n)),g.length&&(a+=Du(t,r)+g.join("")),v&&(a+=Du(t,_s.Exponential)+"+"+v)}return i<0&&!l?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function AR(i,e,t){let n=PR(e,_w.Decimal),r=ej(n,Du(e,_s.MinusSign));return QH(i,r,e,_s.Group,_s.Decimal,t)}function ej(i,e="-"){let t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(ZH),r=n[0],o=n[1],s=r.indexOf(rv)!==-1?r.split(rv):[r.substring(0,r.lastIndexOf(ip)+1),r.substring(r.lastIndexOf(ip)+1)],a=s[0],l=s[1]||"";t.posPre=a.substring(0,a.indexOf(yw));for(let d=0;d<l.length;d++){let u=l.charAt(d);u===ip?t.minFrac=t.maxFrac=d+1:u===yw?t.maxFrac=d+1:t.posSuf+=u}let c=a.split(JH);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(yw);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 tj(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 nj(i){let e=Math.abs(i)+"",t=0,n,r,o,s,a;for((r=e.indexOf(rv))>-1&&(e=e.replace(rv,"")),(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)===ip;o++);if(o===(a=e.length))n=[0],r=1;else{for(a--;e.charAt(a)===ip;)a--;for(r-=o,n=[],s=0;o<=a;o++,s++)n[s]=Number(e.charAt(o))}return r>IR&&(n=n.splice(0,IR-1),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}function ij(i,e,t){if(e>t)throw new Ye(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 xw(i){let e=parseInt(i);if(isNaN(e))throw new Ye(2305,!1);return e}var Rc=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=Z(Ti);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)(jt(Su))};static \u0275dir=Zn({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[gu]})}return i})();function OR(i,e){return new Ye(2100,!1)}var kc=(()=>{class i{_locale;constructor(t){this._locale=t}transform(t,n,r){if(!rj(t))return null;r||=this._locale;try{let o=oj(t);return AR(o,r,n)}catch(o){throw OR(i,o.message)}}static \u0275fac=function(n){return new(n||i)(jt(Qh,16))};static \u0275pipe=H0({name:"number",type:i,pure:!0})}return i})();function rj(i){return!(i==null||i===""||i!==i)}function oj(i){if(typeof i=="string"&&!isNaN(Number(i)-parseFloat(i)))return Number(i);if(typeof i!="number")throw new Ye(2309,!1);return i}var Sw=(()=>{class i{transform(t,n,r){if(t==null)return null;if(!(typeof t=="string"||Array.isArray(t)))throw OR(i,t);return t.slice(n,r)}static \u0275fac=function(n){return new(n||i)};static \u0275pipe=H0({name:"slice",type:i,pure:!1})}return i})();var Xt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=la({type:i});static \u0275inj=cs({})}return i})();function rp(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 Fc=class{};var RR="browser";var op=class{_doc;constructor(e){this._doc=e}manager},sv=(()=>{class i extends op{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)(We(Cn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),cv=new Xe(""),Mw=(()=>{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 sv));this._plugins=r.slice().reverse();let o=t.find(s=>s instanceof sv);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 Ye(5101,!1);return this._eventNameToPlugin.set(t,n),n}static \u0275fac=function(n){return new(n||i)(We(cv),We(or))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),Cw="ng-app-id";function kR(i){for(let e of i)e.remove()}function FR(i,e){let t=e.createElement("style");return t.textContent=i,t}function aj(i,e,t,n){let r=i.head?.querySelectorAll(`style[${Cw}="${e}"],link[${Cw}="${e}"]`);if(r)for(let o of r)o.removeAttribute(Cw),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 Ew(i,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),t}var Tw=(()=>{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,aj(t,n,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,n){for(let r of t)this.addUsage(r,this.inline,FR);n?.forEach(r=>this.addUsage(r,this.external,Ew))}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&&(kR(r.elements),n.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])kR(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[n,{elements:r}]of this.inline)r.push(this.addElement(t,FR(n,this.doc)));for(let[n,{elements:r}]of this.external)r.push(this.addElement(t,Ew(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)(We(Cn),We(gs),We(x0,8),We(Gh))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),ww={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"},Dw=/%COMP%/g;var LR="%COMP%",lj=`_nghost-${LR}`,cj=`_ngcontent-${LR}`,dj=!0,uj=new Xe("",{factory:()=>dj});function fj(i){return cj.replace(Dw,i)}function hj(i){return lj.replace(Dw,i)}function UR(i,e){return e.map(t=>t.replace(Dw,i))}var Iw=(()=>{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 sp(t,s,a,this.tracingService)}createRenderer(t,n){if(!t||!n)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,n);return r instanceof lv?r.applyToHost(t):r instanceof ap&&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 Io.Emulated:o=new lv(l,c,n,this.appId,d,s,a,u);break;case Io.ShadowDom:return new av(l,t,n,s,a,this.nonce,u,c);case Io.ExperimentalIsolatedShadowDom:return new av(l,t,n,s,a,this.nonce,u);default:o=new ap(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)(We(Mw),We(Tw),We(gs),We(uj),We(Cn),We(or),We(x0),We(vs,8))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),sp=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(ww[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(NR(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(NR(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 Ye(-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=ww[r];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=ww[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=ao().getGlobalEventTarget(this.doc,e),!e))throw new Ye(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 NR(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var av=class extends sp{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=UR(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=Ew(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)}},ap=class extends sp{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?UR(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Ec.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},lv=class extends ap{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=fj(c),this.hostAttr=hj(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 dv=class i extends np{supportsDOMEvents=!0;static makeCurrent(){bw(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=pj();return t==null?null:mj(t)}resetBaseElement(){lp=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return rp(document.cookie,e)}},lp=null;function pj(){return lp=lp||document.head.querySelector("base"),lp?lp.getAttribute("href"):null}function mj(i){return new URL(i,document.baseURI).pathname}var gj=(()=>{class i{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),BR=["alt","control","meta","shift"],vj={"\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"},bj={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},zR=(()=>{class i extends op{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(()=>ao().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."),BR.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=vj[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"),BR.forEach(s=>{if(s!==r){let a=bj[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)(We(Cn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})();async function Pw(i,e){return ER(yj(i,e))}function yj(i,e){return{platformRef:e?.platformRef,appProviders:[...wj,...i?.providers??[]],platformProviders:Cj}}function xj(){dv.makeCurrent()}function _j(){return new Kr}function Sj(){return aC(document),document}var Cj=[{provide:Gh,useValue:RR},{provide:y0,useValue:xj,multi:!0},{provide:Cn,useFactory:Sj}];var wj=[{provide:Ch,useValue:"root"},{provide:Kr,useFactory:_j},{provide:cv,useClass:sv,multi:!0},{provide:cv,useClass:zR,multi:!0},Iw,Tw,Mw,{provide:Tc,useExisting:Iw},{provide:Fc,useClass:gj},[]];var co=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 fv=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()}},hv=class{encodeKey(e){return VR(e)}encodeValue(e){return VR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Ej(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 Mj=/%(\d[a-f0-9])/gi,Tj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function VR(i){return encodeURIComponent(i).replace(Mj,(e,t)=>Tj[t]??e)}function uv(i){return`${i}`}var lo=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new hv,e.fromString){if(e.fromObject)throw new Ye(2805,!1);this.map=Ej(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(uv):[uv(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(uv(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(uv(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 Dj(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function GR(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function HR(i){return typeof Blob<"u"&&i instanceof Blob}function jR(i){return typeof FormData<"u"&&i instanceof FormData}function Ij(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var WR="Content-Type",$R="Accept",XR="text/plain",YR="application/json",Pj=`${YR}, ${XR}, */*`,Iu=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(Dj(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 Ye(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 co,this.context??=new fv,!this.params)this.params=new lo,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"||GR(this.body)||HR(this.body)||jR(this.body)||Ij(this.body)?this.body:this.body instanceof lo?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||jR(this.body)?null:HR(this.body)?this.body.type||null:GR(this.body)?null:typeof this.body=="string"?XR:this.body instanceof lo?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?YR: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((w,T)=>w.set(T,e.setHeaders[T]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((w,T)=>w.set(T,e.setParams[T]),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})}},Nc=(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})(Nc||{}),Pu=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new co,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}},pv=class i extends Pu{constructor(e={}){super(e)}type=Nc.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})}},Au=class i extends Pu{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Nc.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})}},nl=class extends Pu{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}},Aj=200,Oj=204;var Rj=new Xe("");var kj=/^\)\]\}',?\n/;var Ow=(()=>{class i{xhrFactory;tracingService=Z(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 Ye(-2800,!1);let n=this.xhrFactory;return ss(null).pipe(nS(()=>new wn(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($R)||s.setRequestHeader($R,Pj),!t.headers.has(WR)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(WR,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 co(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new pv({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!==Oj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Aj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let w=x;x=x.replace(kj,"");try{x=x!==""?JSON.parse(x):null}catch(T){x=w,_&&(_=!1,x={error:T,text:x})}}_?(o.next(new Au({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new nl({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new nl({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 nl({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:Nc.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:Nc.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:Nc.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)(We(Fc))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Fj(i,e){return e(i)}function Nj(i,e,t){return(n,r)=>Jd(t,()=>e(n,o=>i(o,r)))}var Rw=new Xe("",{factory:()=>[]}),kw=new Xe(""),qR=new Xe("",{factory:()=>!0});var Fw=(()=>{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=We(Ow),r},providedIn:"root"})}return i})();var mv=(()=>{class i{backend;injector;chain=null;pendingTasks=Z(su);contributeToStability=Z(qR);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(Rw),...this.injector.get(kw,[])]));this.chain=n.reduceRight((r,o)=>Nj(r,o,this.injector),Fj)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(ph(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(We(Fw),We(Mi))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),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=We(mv),r},providedIn:"root"})}return i})();function Aw(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 gv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof Iu)o=t;else{let l;r.headers instanceof co?l=r.headers:l=new co(r.headers);let c;r.params&&(r.params instanceof lo?c=r.params:c=new lo({fromObject:r.params})),o=new Iu(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(tS(l=>this.handler.handle(l)));if(t instanceof Iu||r.observe==="events")return s;let a=s.pipe(eS(l=>l instanceof Au));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 Ye(2806,!1);return l.body}));case"blob":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Ye(2807,!1);return l.body}));case"text":return a.pipe(rr(l=>{if(l.body!==null&&typeof l.body!="string")throw new Ye(2808,!1);return l.body}));default:return a.pipe(rr(l=>l.body))}case"response":return a;default:throw new Ye(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 lo().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,Aw(r,n))}post(t,n,r={}){return this.request("POST",t,Aw(r,n))}put(t,n,r={}){return this.request("PUT",t,Aw(r,n))}static \u0275fac=function(n){return new(n||i)(We(Nw))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Lj=new Xe("",{factory:()=>!0}),Uj="XSRF-TOKEN",Bj=new Xe("",{factory:()=>Uj}),zj="X-XSRF-TOKEN",Vj=new Xe("",{factory:()=>zj}),Gj=(()=>{class i{cookieName=Z(Bj);doc=Z(Cn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=rp(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})(),KR=(()=>{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=We(Gj),r},providedIn:"root"})}return i})();function Hj(i,e){if(!Z(Lj)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Z(iv).href,{origin:o}=new URL(r),{origin:s}=new URL(i.url,o);if(o!==s)return e(i)}catch{return e(i)}let t=Z(KR).getToken(),n=Z(Vj);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var Lw=(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})(Lw||{});function jj(i,e){return{\u0275kind:i,\u0275providers:e}}function Uw(...i){let e=[gv,mv,{provide:Nw,useExisting:mv},{provide:Fw,useFactory:()=>Z(Rj,{optional:!0})??Z(Ow)},{provide:Rw,useValue:Hj,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Js(e)}function Bw(i){return jj(Lw.Interceptors,i.map(e=>({provide:Rw,useValue:e,multi:!0})))}var Wj=new Xe(""),$j="b",Xj="h",Yj="s",qj="st",Kj="u",Zj="rt",zw=new Xe(""),Jj=["GET","HEAD"];function QR(i,e){let s=e,{isCacheActive:t}=s,n=Qt(s,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!Jj.includes(o)||!n.includeRequestsWithAuthHeaders&&t9(i)||n.filter?.(i)===!1)}function ek(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function Qj(i,e,t,n){let{transferCache:r}=i;if(!QR(i,e))return null;if(n)throw new Ye(2803,!1);let o=i.url,s=tk(i,o),a=t.get(s,null),l=ek(e,r);if(a){let{[$j]:c,[Zj]:d,[Xj]:u,[Yj]:f,[qj]:h,[Kj]:p}=a,v=c;switch(d){case"arraybuffer":v=JR(c);break;case"blob":v=new Blob([JR(c)]);break}let g=new co(u);return new Au({body:v,headers:g,status:f,statusText:h,url:p})}return null}function e9(i,e){let t=Z(zw),n=Z(bu),r=Z(Wj,{optional:!0}),o=Qj(i,t,n,r);if(o)return ss(o);let{transferCache:s}=i,a=ek(t,s),l=i.url,c=tk(i,l);return QR(i,t),e(i)}function t9(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function ZR(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function tk(i,e){let{params:t,method:n,responseType:r}=i,o=ZR(t),s=i.serializeBody();s instanceof URLSearchParams?s=ZR(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=n9(a);return l}function n9(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function JR(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function nk(i){return[{provide:zw,useFactory:()=>(Oo("NgHttpTransferCache"),R({isCacheActive:!0},i))},{provide:kw,useValue:e9,multi:!0},{provide:Eu,multi:!0,useFactory:()=>{let e=Z(Dr),t=Z(zw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var cp=(()=>{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=We(i9),r},providedIn:"root"})}return i})(),i9=(()=>{class i extends cp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Ao.NONE:return n;case Ao.HTML:return oa(n,"HTML")?Po(n):M0(this._doc,String(n)).toString();case Ao.STYLE:return oa(n,"Style")?Po(n):n;case Ao.SCRIPT:if(oa(n,"Script"))return Po(n);throw new Ye(5200,!1);case Ao.URL:return oa(n,"URL")?Po(n):$h(String(n));case Ao.RESOURCE_URL:if(oa(n,"ResourceURL"))return Po(n);throw new Ye(5201,!1);default:throw new Ye(5202,!1)}}bypassSecurityTrustHtml(t){return bC(t)}bypassSecurityTrustStyle(t){return yC(t)}bypassSecurityTrustScript(t){return xC(t)}bypassSecurityTrustUrl(t){return _C(t)}bypassSecurityTrustResourceUrl(t){return SC(t)}static \u0275fac=function(n){return new(n||i)(We(Cn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),vv=(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})(vv||{});function r9(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function ik(){return r9(vv.EventReplay,CR())}function rk(...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(vv.HttpTransferCacheOptions);return Js([[],[],wR(),t.has(vv.NoHttpTransferCache)||n?[]:nk({}),e])}var Ou=class i{loadingCount=N(0);isLoading=Pe(()=>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 bv(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=Pe(()=>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 dp=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof nl&&this.showError(e)}showError(e){return this.toasterService.showError(bv(e)),Ua(()=>e)}static \u0275fac=function(t){return new(t||i)(We(ca))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var ok=(i,e)=>{let t=Z(dp),n=Z(Ou),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(dc(s=>(r||t.handleError(s),r?ss(null):Ua(()=>s))),ph(()=>{o&&n.hide()}))};var sk=[ok];var ak={apiUrl:"https://pixeasy-stage-api-htapefcta9c3arfd.westus3-01.azurewebsites.net/api/"};var yv=new Xe("ENV"),eye=new Xe("LOADER_DELAY");var lk={provide:yv,useValue:ak};function ck(){return[n1(),rk(ik()),Uw(Bw(sk)),lk,Ou]}var yk=(()=>{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)(jt(aa),jt(Er))};static \u0275dir=Zn({type:i})}return i})(),gp=(()=>{class i extends yk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,features:[Tr]})}return i})(),il=new Xe(""),a9={provide:il,useExisting:zi(()=>$w),multi:!0},$w=(()=>{class i extends gp{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&&oe("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[so([a9]),Tr]})}return i})(),l9={provide:il,useExisting:zi(()=>Fu),multi:!0};function c9(){let i=ao()?ao().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var d9=new Xe(""),Fu=(()=>{class i extends yk{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!c9())}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)(jt(aa),jt(Er),jt(d9,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&&oe("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:[so([l9]),Tr]})}return i})();var Xw=new Xe(""),u9=new Xe("");function f9(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 h9(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 dk(i){return null}function xk(i){return i!=null}function _k(i){return wu(i)?hh(i):i}function Sk(i){let e={};return i.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function Ck(i,e){return e.map(t=>t(i))}function p9(i){return!i.validate}function wk(i){return i.map(e=>p9(e)?e:t=>e.validate(t))}function m9(i){if(!i)return null;let e=i.filter(xk);return e.length==0?null:function(t){return Sk(Ck(t,e))}}function Ek(i){return i!=null?m9(wk(i)):null}function g9(i){if(!i)return null;let e=i.filter(xk);return e.length==0?null:function(t){let n=Ck(t,e).map(_k);return Q_(n).pipe(rr(Sk))}}function Mk(i){return i!=null?g9(wk(i)):null}function uk(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function v9(i){return i._rawValidators}function b9(i){return i._rawAsyncValidators}function Vw(i){return i?Array.isArray(i)?i:[i]:[]}function _v(i,e){return Array.isArray(i)?i.includes(e):i===e}function fk(i,e){let t=Vw(e);return Vw(i).forEach(r=>{_v(t,r)||t.push(r)}),t}function hk(i,e){return Vw(e).filter(t=>!_v(i,t))}var Sv=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=Ek(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Mk(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}},Gw=class extends Sv{name;get formDirective(){return null}get path(){return null}},mp=class extends Sv{_parent=null;name=null;valueAccessor=null},Hw=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 rl=(()=>{class i extends Hw{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(jt(mp,2))};static \u0275dir=Zn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&ft("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 up="VALID",xv="INVALID",Ru="PENDING",fp="DISABLED",Lc=class{},Cv=class extends Lc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},hp=class extends Lc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},pp=class extends Lc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},ku=class extends Lc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var jw=class extends Lc{source;constructor(e){super(),this.source=e}};function y9(i){return(wv(i)?i.validators:i)||null}function x9(i){return Array.isArray(i)?Ek(i):i||null}function _9(i,e){return(wv(e)?e.asyncValidators:i)||null}function S9(i){return Array.isArray(i)?Mk(i):i||null}function wv(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var Ww=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 En(this.statusReactive)}set status(e){En(()=>this.statusReactive.set(e))}_status=Pe(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===up}get invalid(){return this.status===xv}get pending(){return this.status==Ru}get disabled(){return this.status===fp}get enabled(){return this.status!==fp}errors;get pristine(){return En(this.pristineReactive)}set pristine(e){En(()=>this.pristineReactive.set(e))}_pristine=Pe(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return En(this.touchedReactive)}set touched(e){En(()=>this.touchedReactive.set(e))}_touched=Pe(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new wo;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(fk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(fk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(hk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(hk(e,this._rawAsyncValidators))}hasValidator(e){return _v(this._rawValidators,e)}hasAsyncValidator(e){return _v(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(fe(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new pp(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new pp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(fe(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new hp(!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 hp(!0,n))}markAsPending(e={}){this.status=Ru;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new ku(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(fe(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=fp,this.errors=null,this._forEachChild(r=>{r.disable(fe(R({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Cv(this.value,n)),this._events.next(new ku(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(fe(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=up,this._forEachChild(n=>{n.enable(fe(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(fe(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===up||this.status===Ru)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Cv(this.value,t)),this._events.next(new ku(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(fe(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()?fp:up}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Ru,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=_k(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 ku(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new br,this.statusChanges=new br}_calculateStatus(){return this._allControlsDisabled()?fp:this.errors?xv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ru)?Ru:this._anyControlsHaveStatus(xv)?xv:up}_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 hp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new pp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){wv(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=x9(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=S9(this._rawAsyncValidators)}};var Tk=new Xe("",{factory:()=>Yw}),Yw="always";function C9(i,e){return[...e.path,i]}function w9(i,e,t=Yw){M9(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),T9(i,e),I9(i,e),D9(i,e),E9(i,e)}function pk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function E9(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function M9(i,e){let t=v9(i);e.validator!==null?i.setValidators(uk(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=b9(i);e.asyncValidator!==null?i.setAsyncValidators(uk(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();pk(e._rawValidators,r),pk(e._rawAsyncValidators,r)}function T9(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Dk(i,e)})}function D9(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Dk(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Dk(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function I9(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function P9(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function A9(i){return Object.getPrototypeOf(i.constructor)===gp}function O9(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===Fu?t=o:A9(o)?n=o:r=o}),r||n||t||null}function mk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function gk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var R9=class extends Ww{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(y9(t),_9(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),wv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(gk(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 jw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){mk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){mk(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){gk(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 k9={provide:mp,useExisting:zi(()=>da)},vk=Promise.resolve(),da=(()=>{class i extends mp{_changeDetectorRef;callSetDisabledState;control=new R9;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=O9(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),P9(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(){w9(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){vk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&nv(n);vk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?C9(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)(jt(Gw,9),jt(Xw,10),jt(u9,10),jt(il,10),jt(tv,8),jt(Tk,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:[so([k9]),Tr,gu]})}return i})();var F9={provide:il,useExisting:zi(()=>vp),multi:!0},vp=(()=>{class i extends gp{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&&oe("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[so([F9]),Tr]})}return i})();var N9={provide:il,useExisting:zi(()=>Ev),multi:!0};function Ik(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function L9(i){return i.split(":")[0]}var Ev=(()=>{class i extends gp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(Dr).injector;destroyRef=Z(sr);cdr=Z(tv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,P0({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=Ik(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=L9(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&&oe("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[so([N9]),Tr]})}return i})(),Pk=(()=>{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(Ik(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)(jt(Er),jt(aa),jt(Ev,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),U9={provide:il,useExisting:zi(()=>Ak),multi:!0};function bk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function B9(i){return i.split(":")[0]}var Ak=(()=>{class i extends gp{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=B9(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&&oe("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[so([U9]),Tr]})}return i})(),Ok=(()=>{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(bk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(bk(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)(jt(Er),jt(aa),jt(Ak,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function Rk(i){return typeof i=="number"?i:parseFloat(i)}var kk=(()=>{class i{_validator=dk;_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):dk,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:[gu]})}return i})(),z9={provide:Xw,useExisting:zi(()=>bp),multi:!0},bp=(()=>{class i extends kk{max;inputName="max";normalizeInput=t=>Rk(t);createValidator=t=>h9(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:[so([z9]),Tr]})}return i})(),V9={provide:Xw,useExisting:zi(()=>yp),multi:!0},yp=(()=>{class i extends kk{min;inputName="min";normalizeInput=t=>Rk(t);createValidator=t=>f9(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:[so([V9]),Tr]})}return i})();var G9=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=la({type:i});static \u0275inj=cs({})}return i})();var uo=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Tk,useValue:t.callSetDisabledState??Yw}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=la({type:i});static \u0275inj=cs({imports:[G9]})}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},cF=0,PE=1,dF=2;var jp=1,uF=2,hf=3,Xi=0,Ki=1,ws=2,Es=0,Hc=1,AE=2,OE=3,RE=4,fF=5,fl=100,hF=101,pF=102,mF=103,gF=104,vF=200,bF=201,yF=202,xF=203,Kv=204,Zv=205,_F=206,SF=207,CF=208,wF=209,EF=210,MF=211,TF=212,DF=213,IF=214,Sb=0,Cb=1,wb=2,jc=3,Eb=4,Mb=5,Tb=6,Db=7,Ib=0,PF=1,AF=2,Uo=0,kE=1,FE=2,NE=3,Qc=4,LE=5,UE=6,BE=7;var bE=300,Sl=301,ed=302,Pb=303,Ab=304,Wp=306,Ju=1e3,Ai=1001,Jv=1002,fi=1003,OF=1004;var $p=1005;var jn=1006,Ob=1007;var mo=1008;var ar=1009,zE=1010,VE=1011,pf=1012,Rb=1013,Bo=1014,zo=1015,Ms=1016,kb=1017,Fb=1018,mf=1020,GE=35902,HE=35899,jE=1021,WE=1022,go=1023,Ss=1026,Cl=1027,$E=1028,Nb=1029,td=1030,Lb=1031;var Ub=1033,Xp=33776,Yp=33777,qp=33778,Kp=33779,Bb=35840,zb=35841,Vb=35842,Gb=35843,Hb=36196,jb=37492,Wb=37496,$b=37488,Xb=37489,Yb=37490,qb=37491,Kb=37808,Zb=37809,Jb=37810,Qb=37811,ey=37812,ty=37813,ny=37814,iy=37815,ry=37816,oy=37817,sy=37818,ay=37819,ly=37820,cy=37821,dy=36492,uy=36494,fy=36495,hy=36283,py=36284,my=36285,gy=36286;var Tp=2300,Qv=2301,qv=2302,yE=2400,xE=2401,_E=2402;var RF=3200;var XE=0,kF=1,_a="",vn="srgb",Wc="srgb-linear",Dp="linear",on="srgb";var Gc=7680;var SE=519,FF=512,NF=513,LF=514,vy=515,UF=516,BF=517,by=518,zF=519,CE=35044;var YE="300 es",No=2e3,Ip=2001;function qE(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function H9(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function Qu(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function VF(){let i=Qu("canvas");return i.style.display="block",i}var Fk={},ef=null;function KE(...i){let e="THREE."+i.shift();ef?ef("log",e,...i):console.log(e,...i)}function ut(...i){let e="THREE."+i.shift();ef?ef("warn",e,...i):console.warn(e,...i)}function gt(...i){let e="THREE."+i.shift();ef?ef("error",e,...i):console.error(e,...i)}function tf(...i){let e=i.join(" ");e in Fk||(Fk[e]=!0,ut(...i))}function GF(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}}},Ii=["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"],Nk=1234567,Ep=Math.PI/180,nf=180/Math.PI;function gf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Ii[i&255]+Ii[i>>8&255]+Ii[i>>16&255]+Ii[i>>24&255]+"-"+Ii[e&255]+Ii[e>>8&255]+"-"+Ii[e>>16&15|64]+Ii[e>>24&255]+"-"+Ii[t&63|128]+Ii[t>>8&255]+"-"+Ii[t>>16&255]+Ii[t>>24&255]+Ii[n&255]+Ii[n>>8&255]+Ii[n>>16&255]+Ii[n>>24&255]).toLowerCase()}function Vt(i,e,t){return Math.max(e,Math.min(t,i))}function ZE(i,e){return(i%e+e)%e}function j9(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function W9(i,e,t){return i!==e?(t-i)/(e-i):0}function Mp(i,e,t){return(1-t)*i+t*e}function $9(i,e,t,n){return Mp(i,e,1-Math.exp(-t*n))}function X9(i,e=1){return e-Math.abs(ZE(i,e*2)-e)}function Y9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function q9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function K9(i,e){return i+Math.floor(Math.random()*(e-i+1))}function Z9(i,e){return i+Math.random()*(e-i)}function J9(i){return i*(.5-Math.random())}function Q9(i){i!==void 0&&(Nk=i);let e=Nk+=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 eW(i){return i*Ep}function tW(i){return i*nf}function nW(i){return(i&i-1)===0&&i!==0}function iW(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function rW(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function oW(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:ut("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function qu(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 tn={DEG2RAD:Ep,RAD2DEG:nf,generateUUID:gf,clamp:Vt,euclideanModulo:ZE,mapLinear:j9,inverseLerp:W9,lerp:Mp,damp:$9,pingpong:X9,smoothstep:Y9,smootherstep:q9,randInt:K9,randFloat:Z9,randFloatSpread:J9,seededRandom:Q9,degToRad:eW,radToDeg:tW,isPowerOfTwo:nW,ceilPowerOfTwo:iW,floorPowerOfTwo:rW,setQuaternionFromProperEuler:oW,normalize:$i,denormalize:qu},vt=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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(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(Vt(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}},po=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:ut("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(Vt(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(Lk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Lk.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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(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 qw.copy(this).projectOnVector(e),this.sub(qw)}reflect(e){return this.sub(qw.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(Vt(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}},qw=new G,Lk=new po,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],w=r[5],T=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*w,o[6]=s*m+a*x+l*T,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*w,o[7]=c*m+d*x+u*T,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*w,o[8]=f*m+h*x+p*T,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(Kw.makeScale(e,t)),this}rotate(e){return this.premultiply(Kw.makeRotation(-e)),this}translate(e,t){return this.premultiply(Kw.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)}},Kw=new At,Uk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Bk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function sW(){let i={enabled:!0,workingColorSpace:Wc,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=Ku(r.r),r.g=Ku(r.g),r.b=Ku(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===_a?Dp: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 tf("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return tf("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({[Wc]:{primaries:e,whitePoint:n,transfer:Dp,toXYZ:Uk,fromXYZ:Bk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:vn},outputColorSpaceConfig:{drawingBufferColorSpace:vn}},[vn]:{primaries:e,whitePoint:n,transfer:on,toXYZ:Uk,fromXYZ:Bk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:vn}}}),i}var zt=sW();function ba(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Ku(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Nu,eb=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{Nu===void 0&&(Nu=Qu("canvas")),Nu.width=e.width,Nu.height=e.height;let r=Nu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Nu}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=Qu("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 ut("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},aW=0,rf=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:aW++}),this.uuid=gf(),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(Zw(r[s].image)):o.push(Zw(r[s]))}else o=Zw(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function Zw(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?eb.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(ut("Texture: Unable to serialize Texture."),{})}var lW=0,Jw=new G,Vo=(()=>{class i extends Cs{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ai,o=Ai,s=jn,a=mo,l=go,c=ar,d=i.DEFAULT_ANISOTROPY,u=_a){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:lW++}),this.uuid=gf(),this.name="",this.source=new rf(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 vt(0,0),this.repeat=new vt(1,1),this.center=new vt(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(Jw).x}get height(){return this.source.getSize(Jw).y}get depth(){return this.source.getSize(Jw).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){ut(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){ut(`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!==bE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Ju:t.x=t.x-Math.floor(t.x);break;case Ai:t.x=t.x<0?0:1;break;case Jv: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 Ju:t.y=t.y-Math.floor(t.y);break;case Ai:t.y=t.y<0?0:1;break;case Jv: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=bE,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,w=(d+f)/4,T=(u+v)/4,P=(p+g)/4;return y>x&&y>_?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=w/n,o=T/n):x>_?x<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),n=w/r,o=P/r):_<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),n=T/o,r=P/o),this.set(n,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this.w=Vt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this.w=Vt(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(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}},tb=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 Vo(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 rf(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 tb{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Pp=class extends Vo{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=fi,this.minFilter=fi,this.wrapR=Ai,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var nb=class extends Vo{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=fi,this.minFilter=fi,this.wrapR=Ai,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(Ro.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Ro.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=Ro.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,Ro):Ro.fromBufferAttribute(o,s),Ro.applyMatrix4(e.matrixWorld),this.expandByPoint(Ro);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Tv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Tv.copy(n.boundingBox)),Tv.applyMatrix4(e.matrixWorld),this.union(Tv)}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,Ro),Ro.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(xp),Dv.subVectors(this.max,xp),Lu.subVectors(e.a,xp),Uu.subVectors(e.b,xp),Bu.subVectors(e.c,xp),ol.subVectors(Uu,Lu),sl.subVectors(Bu,Uu),Uc.subVectors(Lu,Bu);let t=[0,-ol.z,ol.y,0,-sl.z,sl.y,0,-Uc.z,Uc.y,ol.z,0,-ol.x,sl.z,0,-sl.x,Uc.z,0,-Uc.x,-ol.y,ol.x,0,-sl.y,sl.x,0,-Uc.y,Uc.x,0];return!Qw(t,Lu,Uu,Bu,Dv)||(t=[1,0,0,0,1,0,0,0,1],!Qw(t,Lu,Uu,Bu,Dv))?!1:(Iv.crossVectors(ol,sl),t=[Iv.x,Iv.y,Iv.z],Qw(t,Lu,Uu,Bu,Dv))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ro).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ro).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],Ro=new G,Tv=new Yi,Lu=new G,Uu=new G,Bu=new G,ol=new G,sl=new G,Uc=new G,xp=new G,Dv=new G,Iv=new G,Bc=new G;function Qw(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){Bc.fromArray(i,o);let a=r.x*Math.abs(Bc.x)+r.y*Math.abs(Bc.y)+r.z*Math.abs(Bc.z),l=e.dot(Bc),c=t.dot(Bc),d=n.dot(Bc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var cW=new Yi,_p=new G,eE=new G,hl=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):cW.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;_p.subVectors(e,this.center);let t=_p.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(_p,r/n),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(eE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(_p.copy(e.center).add(eE)),this.expandByPoint(_p.copy(e.center).sub(eE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},fa=new G,tE=new G,Pv=new G,al=new G,nE=new G,Av=new G,iE=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){tE.copy(e).add(t).multiplyScalar(.5),Pv.copy(t).sub(e).normalize(),al.copy(this.origin).sub(tE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Pv),a=al.dot(this.direction),l=-al.dot(Pv),c=al.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(tE).addScaledVector(Pv,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){nE.subVectors(t,e),Av.subVectors(n,e),iE.crossVectors(nE,Av);let s=this.direction.dot(iE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;al.subVectors(this.origin,e);let l=a*this.direction.dot(Av.crossVectors(al,Av));if(l<0)return null;let c=a*this.direction.dot(nE.cross(al));if(c<0||l+c>s)return null;let d=-a*al.dot(iE);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/zu.setFromMatrixColumn(e,0).length(),o=1/zu.setFromMatrixColumn(e,1).length(),s=1/zu.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(dW,e,uW)}lookAt(e,t,n){let r=this.elements;return Pr.subVectors(e,t),Pr.lengthSq()===0&&(Pr.z=1),Pr.normalize(),ll.crossVectors(n,Pr),ll.lengthSq()===0&&(Math.abs(n.z)===1?Pr.x+=1e-4:Pr.z+=1e-4,Pr.normalize(),ll.crossVectors(n,Pr)),ll.normalize(),Ov.crossVectors(Pr,ll),r[0]=ll.x,r[4]=Ov.x,r[8]=Pr.x,r[1]=ll.y,r[5]=Ov.y,r[9]=Pr.y,r[2]=ll.z,r[6]=Ov.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],w=r[0],T=r[4],P=r[8],S=r[12],D=r[1],L=r[5],H=r[9],V=r[13],X=r[2],Y=r[6],q=r[10],j=r[14],ne=r[3],ye=r[7],xe=r[11],Se=r[15];return o[0]=s*w+a*D+l*X+c*ne,o[4]=s*T+a*L+l*Y+c*ye,o[8]=s*P+a*H+l*q+c*xe,o[12]=s*S+a*V+l*j+c*Se,o[1]=d*w+u*D+f*X+h*ne,o[5]=d*T+u*L+f*Y+h*ye,o[9]=d*P+u*H+f*q+h*xe,o[13]=d*S+u*V+f*j+h*Se,o[2]=p*w+v*D+g*X+m*ne,o[6]=p*T+v*L+g*Y+m*ye,o[10]=p*P+v*H+g*q+m*xe,o[14]=p*S+v*V+g*j+m*Se,o[3]=b*w+y*D+x*X+_*ne,o[7]=b*T+y*L+x*Y+_*ye,o[11]=b*P+y*H+x*q+_*xe,o[15]=b*S+y*V+x*j+_*Se,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,w=s*f-l*d,T=s*u-a*d;return t*(v*b-g*y+m*x)-n*(p*b-g*_+m*w)+r*(p*y-v*_+m*T)-o*(p*x-v*w+g*T)}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,w=t*b+n*y+r*x+o*_;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let T=1/w;return e[0]=b*T,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*T,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*T,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*T,e[4]=y*T,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*T,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*T,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*T,e[8]=x*T,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*T,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*T,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*T,e[12]=_*T,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*T,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*T,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*T,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,w=n.y,T=n.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*w,r[5]=(1-(f+m))*w,r[6]=(g+b)*w,r[7]=0,r[8]=(p+y)*T,r[9]=(g-b)*T,r[10]=(1-(f+v))*T,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=zu.set(r[0],r[1],r[2]).length(),s=zu.set(r[4],r[5],r[6]).length(),a=zu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),ko.copy(this);let c=1/o,d=1/s,u=1/a;return ko.elements[0]*=c,ko.elements[1]*=c,ko.elements[2]*=c,ko.elements[4]*=d,ko.elements[5]*=d,ko.elements[6]*=d,ko.elements[8]*=u,ko.elements[9]*=u,ko.elements[10]*=u,t.setFromRotationMatrix(ko),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=No,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===No)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Ip)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=No,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===No)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Ip)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}},zu=new G,ko=new Mn,dW=new G(0,0,0),uW=new G(1,1,1),ll=new G,Ov=new G,Pr=new G,zk=new Mn,Vk=new po,pl=(()=>{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(Vt(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(-Vt(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(Vt(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(-Vt(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(Vt(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(-Vt(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:ut("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return zk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(zk,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return Vk.setFromEuler(this),this.setFromQuaternion(Vk,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})(),of=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}},fW=0,Gk=new G,Vu=new po,ha=new Mn,Rv=new G,Sp=new G,hW=new G,pW=new po,Hk=new G(1,0,0),jk=new G(0,1,0),Wk=new G(0,0,1),$k={type:"added"},mW={type:"removed"},Gu={type:"childadded",child:null},rE={type:"childremoved",child:null},kr=(()=>{class i extends Cs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:fW++}),this.uuid=gf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new G,n=new pl,r=new po,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 of,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 Vu.setFromAxisAngle(t,n),this.quaternion.multiply(Vu),this}rotateOnWorldAxis(t,n){return Vu.setFromAxisAngle(t,n),this.quaternion.premultiply(Vu),this}rotateX(t){return this.rotateOnAxis(Hk,t)}rotateY(t){return this.rotateOnAxis(jk,t)}rotateZ(t){return this.rotateOnAxis(Wk,t)}translateOnAxis(t,n){return Gk.copy(t).applyQuaternion(this.quaternion),this.position.add(Gk.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(Hk,t)}translateY(t){return this.translateOnAxis(jk,t)}translateZ(t){return this.translateOnAxis(Wk,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?Rv.copy(t):Rv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Sp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ha.lookAt(Sp,Rv,this.up):ha.lookAt(Rv,Sp,this.up),this.quaternion.setFromRotationMatrix(ha),o&&(ha.extractRotation(o.matrixWorld),Vu.setFromRotationMatrix(ha),this.quaternion.premultiply(Vu.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(gt("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($k),Gu.child=t,this.dispatchEvent(Gu),Gu.child=null):gt("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(mW),rE.child=t,this.dispatchEvent(rE),rE.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($k),Gu.child=t,this.dispatchEvent(Gu),Gu.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(Sp,t,hW),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Sp,pW,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=>fe(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})(),Fo=new G,pa=new G,oE=new G,ma=new G,Hu=new G,ju=new G,Xk=new G,sE=new G,aE=new G,lE=new G,cE=new An,dE=new An,uE=new An,ul=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),Fo.subVectors(e,t),r.cross(Fo);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){Fo.subVectors(r,t),pa.subVectors(n,t),oE.subVectors(e,t);let s=Fo.dot(Fo),a=Fo.dot(pa),l=Fo.dot(oE),c=pa.dot(pa),d=pa.dot(oE),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 cE.setScalar(0),dE.setScalar(0),uE.setScalar(0),cE.fromBufferAttribute(e,t),dE.fromBufferAttribute(e,n),uE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(cE,o.x),s.addScaledVector(dE,o.y),s.addScaledVector(uE,o.z),s}static isFrontFacing(e,t,n,r){return Fo.subVectors(n,t),pa.subVectors(e,t),Fo.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 Fo.subVectors(this.c,this.b),pa.subVectors(this.a,this.b),Fo.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;Hu.subVectors(r,n),ju.subVectors(o,n),sE.subVectors(e,n);let l=Hu.dot(sE),c=ju.dot(sE);if(l<=0&&c<=0)return t.copy(n);aE.subVectors(e,r);let d=Hu.dot(aE),u=ju.dot(aE);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(Hu,s);lE.subVectors(e,o);let h=Hu.dot(lE),p=ju.dot(lE);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(ju,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Xk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Xk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector(Hu,s).addScaledVector(ju,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},HF={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},cl={h:0,s:0,l:0},kv={h:0,s:0,l:0};function fE(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 _t=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=vn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,zt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=zt.workingColorSpace){return this.r=e,this.g=t,this.b=n,zt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=zt.workingColorSpace){if(e=ZE(e,1),t=Vt(t,0,1),n=Vt(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=fE(s,o,e+1/3),this.g=fE(s,o,e),this.b=fE(s,o,e-1/3)}return zt.colorSpaceToWorking(this,r),this}setStyle(e,t=vn){function n(o){o!==void 0&&parseFloat(o)<1&&ut("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:ut("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);ut("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=vn){let n=HF[e.toLowerCase()];return n!==void 0?this.setHex(n,t):ut("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=Ku(e.r),this.g=Ku(e.g),this.b=Ku(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=vn){return zt.workingToColorSpace(Pi.copy(this),e),Math.round(Vt(Pi.r*255,0,255))*65536+Math.round(Vt(Pi.g*255,0,255))*256+Math.round(Vt(Pi.b*255,0,255))}getHexString(e=vn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=zt.workingColorSpace){zt.workingToColorSpace(Pi.copy(this),t);let n=Pi.r,r=Pi.g,o=Pi.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=zt.workingColorSpace){return zt.workingToColorSpace(Pi.copy(this),t),e.r=Pi.r,e.g=Pi.g,e.b=Pi.b,e}getStyle(e=vn){zt.workingToColorSpace(Pi.copy(this),e);let t=Pi.r,n=Pi.g,r=Pi.b;return e!==vn?`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(cl),this.setHSL(cl.h+e,cl.s+t,cl.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(cl),e.getHSL(kv);let n=Mp(cl.h,kv.h,t),r=Mp(cl.s,kv.s,t),o=Mp(cl.l,kv.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}},Pi=new _t;_t.NAMES=HF;var gW=0,Fr=class extends Cs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:gW++}),this.uuid=gf(),this.name="",this.type="Material",this.blending=Hc,this.side=Xi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Kv,this.blendDst=Zv,this.blendEquation=fl,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new _t(0,0,0),this.blendAlpha=0,this.depthFunc=jc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=SE,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Gc,this.stencilZFail=Gc,this.stencilZPass=Gc,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){ut(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ut(`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!==Hc&&(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!==Kv&&(n.blendSrc=this.blendSrc),this.blendDst!==Zv&&(n.blendDst=this.blendDst),this.blendEquation!==fl&&(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!==jc&&(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!==SE&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Gc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Gc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Gc&&(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++}},Ap=class extends Fr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _t(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 pl,this.combine=Ib,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,Fv=new vt,vW=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:vW++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=CE,this.updateRanges=[],this.gpuType=zo,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++)Fv.fromBufferAttribute(this,t),Fv.applyMatrix3(e),this.setXY(t,Fv.x,Fv.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=qu(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=qu(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=qu(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=qu(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=qu(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!==CE&&(e.usage=this.usage),e}};var Op=class extends Or{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var Rp=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)}},bW=0,fo=new Mn,hE=new kr,Wu=new G,Ar=new Yi,Cp=new Yi,di=new G,ei=class i extends Cs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:bW++}),this.uuid=gf(),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(qE(e)?Rp:Op)(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 fo.makeRotationFromQuaternion(e),this.applyMatrix4(fo),this}rotateX(e){return fo.makeRotationX(e),this.applyMatrix4(fo),this}rotateY(e){return fo.makeRotationY(e),this.applyMatrix4(fo),this}rotateZ(e){return fo.makeRotationZ(e),this.applyMatrix4(fo),this}translate(e,t,n){return fo.makeTranslation(e,t,n),this.applyMatrix4(fo),this}scale(e,t,n){return fo.makeScale(e,t,n),this.applyMatrix4(fo),this}lookAt(e){return hE.lookAt(e),hE.updateMatrix(),this.applyMatrix4(hE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Wu).negate(),this.translate(Wu.x,Wu.y,Wu.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&&ut("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){gt("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?(di.addVectors(this.boundingBox.min,Ar.min),this.boundingBox.expandByPoint(di),di.addVectors(this.boundingBox.max,Ar.max),this.boundingBox.expandByPoint(di)):(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))&&gt('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 hl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){gt("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];Cp.setFromBufferAttribute(a),this.morphTargetsRelative?(di.addVectors(Ar.min,Cp.min),Ar.expandByPoint(di),di.addVectors(Ar.max,Cp.max),Ar.expandByPoint(di)):(Ar.expandByPoint(Cp.min),Ar.expandByPoint(Cp.max))}Ar.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)di.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(di));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++)di.fromBufferAttribute(a,c),l&&(Wu.fromBufferAttribute(e,c),di.add(Wu)),r=Math.max(r,n.distanceToSquared(di))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&gt('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){gt("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 P=0;P<n.count;P++)a[P]=new G,l[P]=new G;let c=new G,d=new G,u=new G,f=new vt,h=new vt,p=new vt,v=new G,g=new G;function m(P,S,D){c.fromBufferAttribute(n,P),d.fromBufferAttribute(n,S),u.fromBufferAttribute(n,D),f.fromBufferAttribute(o,P),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,D),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[P].add(v),a[S].add(v),a[D].add(v),l[P].add(g),l[S].add(g),l[D].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let P=0,S=b.length;P<S;++P){let D=b[P],L=D.start,H=D.count;for(let V=L,X=L+H;V<X;V+=3)m(e.getX(V+0),e.getX(V+1),e.getX(V+2))}let y=new G,x=new G,_=new G,w=new G;function T(P){_.fromBufferAttribute(r,P),w.copy(_);let S=a[P];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(w,S);let L=x.dot(l[P])<0?-1:1;s.setXYZW(P,y.x,y.y,y.z,L)}for(let P=0,S=b.length;P<S;++P){let D=b[P],L=D.start,H=D.count;for(let V=L,X=L+H;V<X;V+=3)T(e.getX(V+0)),T(e.getX(V+1)),T(e.getX(V+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++)di.fromBufferAttribute(e,t),di.normalize(),e.setXYZ(t,di.x,di.y,di.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 ut("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"})}},Yk=new Mn,zc=new ya,Nv=new hl,qk=new G,Lv=new G,Uv=new G,Bv=new G,pE=new G,zv=new G,Kk=new G,Vv=new G,qi=class extends kr{constructor(e=new ei,t=new Ap){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){zv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(pE.fromBufferAttribute(u,e),s?zv.addScaledVector(pE,d):zv.addScaledVector(pE.sub(t),d))}t.add(zv)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Nv.copy(n.boundingSphere),Nv.applyMatrix4(o),zc.copy(e.ray).recast(e.near),!(Nv.containsPoint(zc.origin)===!1&&(zc.intersectSphere(Nv,qk)===null||zc.origin.distanceToSquared(qk)>(e.far-e.near)**2))&&(Yk.copy(o).invert(),zc.copy(e.ray).applyMatrix4(Yk),!(n.boundingBox!==null&&zc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,zc)))}_computeIntersections(e,t,n){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let w=a.getX(x),T=a.getX(x+1),P=a.getX(x+2);r=Gv(this,m,e,n,c,d,u,w,T,P),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=Gv(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 w=x,T=x+1,P=x+2;r=Gv(this,m,e,n,c,d,u,w,T,P),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=Gv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function yW(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;Vv.copy(a),Vv.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(Vv);return c<t.near||c>t.far?null:{distance:c,point:Vv.clone(),object:i}}function Gv(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,Lv),i.getVertexPosition(l,Uv),i.getVertexPosition(c,Bv);let d=yW(i,e,t,n,Lv,Uv,Bv,Kk);if(d){let u=new G;ul.getBarycoord(Kk,Lv,Uv,Bv,u),r&&(d.uv=ul.getInterpolatedAttribute(r,a,l,c,u,new vt)),o&&(d.uv1=ul.getInterpolatedAttribute(o,a,l,c,u,new vt)),s&&(d.normal=ul.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};ul.getNormal(Lv,Uv,Bv,f.normal),d.face=f,d.barycoord=u}return d}var sf=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,_,w,T,P,S){let D=x/T,L=_/P,H=x/2,V=_/2,X=w/2,Y=T+1,q=P+1,j=0,ne=0,ye=new G;for(let xe=0;xe<q;xe++){let Se=xe*L-V;for(let et=0;et<Y;et++){let pt=et*D-H;ye[v]=pt*b,ye[g]=Se*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=w>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(et/T),u.push(1-xe/P),j+=1}}for(let xe=0;xe<P;xe++)for(let Se=0;Se<T;Se++){let et=f+Se+Y*xe,pt=f+Se+Y*(xe+1),Wt=f+(Se+1)+Y*(xe+1),Kt=f+(Se+1)+Y*xe;l.push(et,pt,Kt),l.push(pt,Wt,Kt),ne+=6}a.addGroup(h,ne,S),h+=ne,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 nd(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?(ut("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 Oi(i){let e={};for(let t=0;t<i.length;t++){let n=nd(i[t]);for(let r in n)e[r]=n[r]}return e}function xW(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function JE(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:zt.workingColorSpace}var jF={clone:nd,merge:Oi},_W=`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 fv=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()}},hv=class{encodeKey(e){return VR(e)}encodeValue(e){return VR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Ej(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 Mj=/%(\d[a-f0-9])/gi,Tj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function VR(i){return encodeURIComponent(i).replace(Mj,(e,t)=>Tj[t]??e)}function uv(i){return`${i}`}var lo=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new hv,e.fromString){if(e.fromObject)throw new Ye(2805,!1);this.map=Ej(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(uv):[uv(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(uv(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(uv(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 Dj(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function GR(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function HR(i){return typeof Blob<"u"&&i instanceof Blob}function jR(i){return typeof FormData<"u"&&i instanceof FormData}function Ij(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var WR="Content-Type",$R="Accept",XR="text/plain",YR="application/json",Pj=`${YR}, ${XR}, */*`,Iu=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(Dj(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 Ye(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 co,this.context??=new fv,!this.params)this.params=new lo,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"||GR(this.body)||HR(this.body)||jR(this.body)||Ij(this.body)?this.body:this.body instanceof lo?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||jR(this.body)?null:HR(this.body)?this.body.type||null:GR(this.body)?null:typeof this.body=="string"?XR:this.body instanceof lo?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?YR: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((w,T)=>w.set(T,e.setHeaders[T]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((w,T)=>w.set(T,e.setParams[T]),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})}},Nc=(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})(Nc||{}),Pu=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new co,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}},pv=class i extends Pu{constructor(e={}){super(e)}type=Nc.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})}},Au=class i extends Pu{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Nc.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})}},nl=class extends Pu{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}},Aj=200,Oj=204;var Rj=new Xe("");var kj=/^\)\]\}',?\n/;var Ow=(()=>{class i{xhrFactory;tracingService=Z(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 Ye(-2800,!1);let n=this.xhrFactory;return ss(null).pipe(nS(()=>new wn(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($R)||s.setRequestHeader($R,Pj),!t.headers.has(WR)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(WR,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 co(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new pv({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!==Oj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Aj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let w=x;x=x.replace(kj,"");try{x=x!==""?JSON.parse(x):null}catch(T){x=w,_&&(_=!1,x={error:T,text:x})}}_?(o.next(new Au({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new nl({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new nl({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 nl({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:Nc.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:Nc.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:Nc.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)(We(Fc))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Fj(i,e){return e(i)}function Nj(i,e,t){return(n,r)=>Jd(t,()=>e(n,o=>i(o,r)))}var Rw=new Xe("",{factory:()=>[]}),kw=new Xe(""),qR=new Xe("",{factory:()=>!0});var Fw=(()=>{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=We(Ow),r},providedIn:"root"})}return i})();var mv=(()=>{class i{backend;injector;chain=null;pendingTasks=Z(su);contributeToStability=Z(qR);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(Rw),...this.injector.get(kw,[])]));this.chain=n.reduceRight((r,o)=>Nj(r,o,this.injector),Fj)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(ph(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(We(Fw),We(Mi))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),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=We(mv),r},providedIn:"root"})}return i})();function Aw(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 gv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof Iu)o=t;else{let l;r.headers instanceof co?l=r.headers:l=new co(r.headers);let c;r.params&&(r.params instanceof lo?c=r.params:c=new lo({fromObject:r.params})),o=new Iu(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(tS(l=>this.handler.handle(l)));if(t instanceof Iu||r.observe==="events")return s;let a=s.pipe(eS(l=>l instanceof Au));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 Ye(2806,!1);return l.body}));case"blob":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Ye(2807,!1);return l.body}));case"text":return a.pipe(rr(l=>{if(l.body!==null&&typeof l.body!="string")throw new Ye(2808,!1);return l.body}));default:return a.pipe(rr(l=>l.body))}case"response":return a;default:throw new Ye(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 lo().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,Aw(r,n))}post(t,n,r={}){return this.request("POST",t,Aw(r,n))}put(t,n,r={}){return this.request("PUT",t,Aw(r,n))}static \u0275fac=function(n){return new(n||i)(We(Nw))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Lj=new Xe("",{factory:()=>!0}),Uj="XSRF-TOKEN",Bj=new Xe("",{factory:()=>Uj}),zj="X-XSRF-TOKEN",Vj=new Xe("",{factory:()=>zj}),Gj=(()=>{class i{cookieName=Z(Bj);doc=Z(Cn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=rp(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})(),KR=(()=>{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=We(Gj),r},providedIn:"root"})}return i})();function Hj(i,e){if(!Z(Lj)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Z(iv).href,{origin:o}=new URL(r),{origin:s}=new URL(i.url,o);if(o!==s)return e(i)}catch{return e(i)}let t=Z(KR).getToken(),n=Z(Vj);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var Lw=(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})(Lw||{});function jj(i,e){return{\u0275kind:i,\u0275providers:e}}function Uw(...i){let e=[gv,mv,{provide:Nw,useExisting:mv},{provide:Fw,useFactory:()=>Z(Rj,{optional:!0})??Z(Ow)},{provide:Rw,useValue:Hj,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Js(e)}function Bw(i){return jj(Lw.Interceptors,i.map(e=>({provide:Rw,useValue:e,multi:!0})))}var Wj=new Xe(""),$j="b",Xj="h",Yj="s",qj="st",Kj="u",Zj="rt",zw=new Xe(""),Jj=["GET","HEAD"];function QR(i,e){let s=e,{isCacheActive:t}=s,n=Qt(s,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!Jj.includes(o)||!n.includeRequestsWithAuthHeaders&&t9(i)||n.filter?.(i)===!1)}function ek(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function Qj(i,e,t,n){let{transferCache:r}=i;if(!QR(i,e))return null;if(n)throw new Ye(2803,!1);let o=i.url,s=tk(i,o),a=t.get(s,null),l=ek(e,r);if(a){let{[$j]:c,[Zj]:d,[Xj]:u,[Yj]:f,[qj]:h,[Kj]:p}=a,v=c;switch(d){case"arraybuffer":v=JR(c);break;case"blob":v=new Blob([JR(c)]);break}let g=new co(u);return new Au({body:v,headers:g,status:f,statusText:h,url:p})}return null}function e9(i,e){let t=Z(zw),n=Z(bu),r=Z(Wj,{optional:!0}),o=Qj(i,t,n,r);if(o)return ss(o);let{transferCache:s}=i,a=ek(t,s),l=i.url,c=tk(i,l);return QR(i,t),e(i)}function t9(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function ZR(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function tk(i,e){let{params:t,method:n,responseType:r}=i,o=ZR(t),s=i.serializeBody();s instanceof URLSearchParams?s=ZR(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=n9(a);return l}function n9(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function JR(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function nk(i){return[{provide:zw,useFactory:()=>(Oo("NgHttpTransferCache"),R({isCacheActive:!0},i))},{provide:kw,useValue:e9,multi:!0},{provide:Eu,multi:!0,useFactory:()=>{let e=Z(Dr),t=Z(zw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var cp=(()=>{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=We(i9),r},providedIn:"root"})}return i})(),i9=(()=>{class i extends cp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Ao.NONE:return n;case Ao.HTML:return oa(n,"HTML")?Po(n):M0(this._doc,String(n)).toString();case Ao.STYLE:return oa(n,"Style")?Po(n):n;case Ao.SCRIPT:if(oa(n,"Script"))return Po(n);throw new Ye(5200,!1);case Ao.URL:return oa(n,"URL")?Po(n):$h(String(n));case Ao.RESOURCE_URL:if(oa(n,"ResourceURL"))return Po(n);throw new Ye(5201,!1);default:throw new Ye(5202,!1)}}bypassSecurityTrustHtml(t){return bC(t)}bypassSecurityTrustStyle(t){return yC(t)}bypassSecurityTrustScript(t){return xC(t)}bypassSecurityTrustUrl(t){return _C(t)}bypassSecurityTrustResourceUrl(t){return SC(t)}static \u0275fac=function(n){return new(n||i)(We(Cn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),vv=(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})(vv||{});function r9(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function ik(){return r9(vv.EventReplay,CR())}function rk(...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(vv.HttpTransferCacheOptions);return Js([[],[],wR(),t.has(vv.NoHttpTransferCache)||n?[]:nk({}),e])}var Ou=class i{loadingCount=N(0);isLoading=Pe(()=>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 bv(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=Pe(()=>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 dp=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof nl&&this.showError(e)}showError(e){return this.toasterService.showError(bv(e)),Ua(()=>e)}static \u0275fac=function(t){return new(t||i)(We(ca))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var ok=(i,e)=>{let t=Z(dp),n=Z(Ou),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(dc(s=>(r||t.handleError(s),r?ss(null):Ua(()=>s))),ph(()=>{o&&n.hide()}))};var sk=[ok];var ak={apiUrl:"https://pixeasy-api-esaca7hvgdfxgmcn.westus3-01.azurewebsites.net/api/"};var yv=new Xe("ENV"),eye=new Xe("LOADER_DELAY");var lk={provide:yv,useValue:ak};function ck(){return[n1(),rk(ik()),Uw(Bw(sk)),lk,Ou]}var yk=(()=>{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)(jt(aa),jt(Er))};static \u0275dir=Zn({type:i})}return i})(),gp=(()=>{class i extends yk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=ra(i)))(r||i)}})();static \u0275dir=Zn({type:i,features:[Tr]})}return i})(),il=new Xe(""),a9={provide:il,useExisting:zi(()=>$w),multi:!0},$w=(()=>{class i extends gp{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&&oe("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[so([a9]),Tr]})}return i})(),l9={provide:il,useExisting:zi(()=>Fu),multi:!0};function c9(){let i=ao()?ao().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var d9=new Xe(""),Fu=(()=>{class i extends yk{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!c9())}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)(jt(aa),jt(Er),jt(d9,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&&oe("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:[so([l9]),Tr]})}return i})();var Xw=new Xe(""),u9=new Xe("");function f9(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 h9(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 dk(i){return null}function xk(i){return i!=null}function _k(i){return wu(i)?hh(i):i}function Sk(i){let e={};return i.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function Ck(i,e){return e.map(t=>t(i))}function p9(i){return!i.validate}function wk(i){return i.map(e=>p9(e)?e:t=>e.validate(t))}function m9(i){if(!i)return null;let e=i.filter(xk);return e.length==0?null:function(t){return Sk(Ck(t,e))}}function Ek(i){return i!=null?m9(wk(i)):null}function g9(i){if(!i)return null;let e=i.filter(xk);return e.length==0?null:function(t){let n=Ck(t,e).map(_k);return Q_(n).pipe(rr(Sk))}}function Mk(i){return i!=null?g9(wk(i)):null}function uk(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function v9(i){return i._rawValidators}function b9(i){return i._rawAsyncValidators}function Vw(i){return i?Array.isArray(i)?i:[i]:[]}function _v(i,e){return Array.isArray(i)?i.includes(e):i===e}function fk(i,e){let t=Vw(e);return Vw(i).forEach(r=>{_v(t,r)||t.push(r)}),t}function hk(i,e){return Vw(e).filter(t=>!_v(i,t))}var Sv=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=Ek(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Mk(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}},Gw=class extends Sv{name;get formDirective(){return null}get path(){return null}},mp=class extends Sv{_parent=null;name=null;valueAccessor=null},Hw=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 rl=(()=>{class i extends Hw{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(jt(mp,2))};static \u0275dir=Zn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&ft("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 up="VALID",xv="INVALID",Ru="PENDING",fp="DISABLED",Lc=class{},Cv=class extends Lc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},hp=class extends Lc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},pp=class extends Lc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},ku=class extends Lc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var jw=class extends Lc{source;constructor(e){super(),this.source=e}};function y9(i){return(wv(i)?i.validators:i)||null}function x9(i){return Array.isArray(i)?Ek(i):i||null}function _9(i,e){return(wv(e)?e.asyncValidators:i)||null}function S9(i){return Array.isArray(i)?Mk(i):i||null}function wv(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var Ww=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 En(this.statusReactive)}set status(e){En(()=>this.statusReactive.set(e))}_status=Pe(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===up}get invalid(){return this.status===xv}get pending(){return this.status==Ru}get disabled(){return this.status===fp}get enabled(){return this.status!==fp}errors;get pristine(){return En(this.pristineReactive)}set pristine(e){En(()=>this.pristineReactive.set(e))}_pristine=Pe(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return En(this.touchedReactive)}set touched(e){En(()=>this.touchedReactive.set(e))}_touched=Pe(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new wo;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(fk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(fk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(hk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(hk(e,this._rawAsyncValidators))}hasValidator(e){return _v(this._rawValidators,e)}hasAsyncValidator(e){return _v(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(fe(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new pp(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new pp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(fe(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new hp(!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 hp(!0,n))}markAsPending(e={}){this.status=Ru;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new ku(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(fe(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=fp,this.errors=null,this._forEachChild(r=>{r.disable(fe(R({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Cv(this.value,n)),this._events.next(new ku(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(fe(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=up,this._forEachChild(n=>{n.enable(fe(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(fe(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===up||this.status===Ru)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Cv(this.value,t)),this._events.next(new ku(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(fe(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()?fp:up}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Ru,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=_k(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 ku(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new br,this.statusChanges=new br}_calculateStatus(){return this._allControlsDisabled()?fp:this.errors?xv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ru)?Ru:this._anyControlsHaveStatus(xv)?xv:up}_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 hp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new pp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){wv(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=x9(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=S9(this._rawAsyncValidators)}};var Tk=new Xe("",{factory:()=>Yw}),Yw="always";function C9(i,e){return[...e.path,i]}function w9(i,e,t=Yw){M9(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),T9(i,e),I9(i,e),D9(i,e),E9(i,e)}function pk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function E9(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function M9(i,e){let t=v9(i);e.validator!==null?i.setValidators(uk(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=b9(i);e.asyncValidator!==null?i.setAsyncValidators(uk(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();pk(e._rawValidators,r),pk(e._rawAsyncValidators,r)}function T9(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Dk(i,e)})}function D9(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Dk(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Dk(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function I9(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function P9(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function A9(i){return Object.getPrototypeOf(i.constructor)===gp}function O9(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===Fu?t=o:A9(o)?n=o:r=o}),r||n||t||null}function mk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function gk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var R9=class extends Ww{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(y9(t),_9(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),wv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(gk(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 jw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){mk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){mk(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){gk(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 k9={provide:mp,useExisting:zi(()=>da)},vk=Promise.resolve(),da=(()=>{class i extends mp{_changeDetectorRef;callSetDisabledState;control=new R9;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=O9(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),P9(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(){w9(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){vk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&nv(n);vk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?C9(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)(jt(Gw,9),jt(Xw,10),jt(u9,10),jt(il,10),jt(tv,8),jt(Tk,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:[so([k9]),Tr,gu]})}return i})();var F9={provide:il,useExisting:zi(()=>vp),multi:!0},vp=(()=>{class i extends gp{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&&oe("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[so([F9]),Tr]})}return i})();var N9={provide:il,useExisting:zi(()=>Ev),multi:!0};function Ik(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function L9(i){return i.split(":")[0]}var Ev=(()=>{class i extends gp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(Dr).injector;destroyRef=Z(sr);cdr=Z(tv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,P0({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=Ik(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=L9(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&&oe("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[so([N9]),Tr]})}return i})(),Pk=(()=>{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(Ik(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)(jt(Er),jt(aa),jt(Ev,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),U9={provide:il,useExisting:zi(()=>Ak),multi:!0};function bk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function B9(i){return i.split(":")[0]}var Ak=(()=>{class i extends gp{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=B9(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&&oe("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[so([U9]),Tr]})}return i})(),Ok=(()=>{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(bk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(bk(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)(jt(Er),jt(aa),jt(Ak,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function Rk(i){return typeof i=="number"?i:parseFloat(i)}var kk=(()=>{class i{_validator=dk;_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):dk,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:[gu]})}return i})(),z9={provide:Xw,useExisting:zi(()=>bp),multi:!0},bp=(()=>{class i extends kk{max;inputName="max";normalizeInput=t=>Rk(t);createValidator=t=>h9(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:[so([z9]),Tr]})}return i})(),V9={provide:Xw,useExisting:zi(()=>yp),multi:!0},yp=(()=>{class i extends kk{min;inputName="min";normalizeInput=t=>Rk(t);createValidator=t=>f9(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:[so([V9]),Tr]})}return i})();var G9=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=la({type:i});static \u0275inj=cs({})}return i})();var uo=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Tk,useValue:t.callSetDisabledState??Yw}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=la({type:i});static \u0275inj=cs({imports:[G9]})}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},cF=0,PE=1,dF=2;var jp=1,uF=2,hf=3,Xi=0,Ki=1,ws=2,Es=0,Hc=1,AE=2,OE=3,RE=4,fF=5,fl=100,hF=101,pF=102,mF=103,gF=104,vF=200,bF=201,yF=202,xF=203,Kv=204,Zv=205,_F=206,SF=207,CF=208,wF=209,EF=210,MF=211,TF=212,DF=213,IF=214,Sb=0,Cb=1,wb=2,jc=3,Eb=4,Mb=5,Tb=6,Db=7,Ib=0,PF=1,AF=2,Uo=0,kE=1,FE=2,NE=3,Qc=4,LE=5,UE=6,BE=7;var bE=300,Sl=301,ed=302,Pb=303,Ab=304,Wp=306,Ju=1e3,Ai=1001,Jv=1002,fi=1003,OF=1004;var $p=1005;var jn=1006,Ob=1007;var mo=1008;var ar=1009,zE=1010,VE=1011,pf=1012,Rb=1013,Bo=1014,zo=1015,Ms=1016,kb=1017,Fb=1018,mf=1020,GE=35902,HE=35899,jE=1021,WE=1022,go=1023,Ss=1026,Cl=1027,$E=1028,Nb=1029,td=1030,Lb=1031;var Ub=1033,Xp=33776,Yp=33777,qp=33778,Kp=33779,Bb=35840,zb=35841,Vb=35842,Gb=35843,Hb=36196,jb=37492,Wb=37496,$b=37488,Xb=37489,Yb=37490,qb=37491,Kb=37808,Zb=37809,Jb=37810,Qb=37811,ey=37812,ty=37813,ny=37814,iy=37815,ry=37816,oy=37817,sy=37818,ay=37819,ly=37820,cy=37821,dy=36492,uy=36494,fy=36495,hy=36283,py=36284,my=36285,gy=36286;var Tp=2300,Qv=2301,qv=2302,yE=2400,xE=2401,_E=2402;var RF=3200;var XE=0,kF=1,_a="",vn="srgb",Wc="srgb-linear",Dp="linear",on="srgb";var Gc=7680;var SE=519,FF=512,NF=513,LF=514,vy=515,UF=516,BF=517,by=518,zF=519,CE=35044;var YE="300 es",No=2e3,Ip=2001;function qE(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function H9(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function Qu(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function VF(){let i=Qu("canvas");return i.style.display="block",i}var Fk={},ef=null;function KE(...i){let e="THREE."+i.shift();ef?ef("log",e,...i):console.log(e,...i)}function ut(...i){let e="THREE."+i.shift();ef?ef("warn",e,...i):console.warn(e,...i)}function gt(...i){let e="THREE."+i.shift();ef?ef("error",e,...i):console.error(e,...i)}function tf(...i){let e=i.join(" ");e in Fk||(Fk[e]=!0,ut(...i))}function GF(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}}},Ii=["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"],Nk=1234567,Ep=Math.PI/180,nf=180/Math.PI;function gf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Ii[i&255]+Ii[i>>8&255]+Ii[i>>16&255]+Ii[i>>24&255]+"-"+Ii[e&255]+Ii[e>>8&255]+"-"+Ii[e>>16&15|64]+Ii[e>>24&255]+"-"+Ii[t&63|128]+Ii[t>>8&255]+"-"+Ii[t>>16&255]+Ii[t>>24&255]+Ii[n&255]+Ii[n>>8&255]+Ii[n>>16&255]+Ii[n>>24&255]).toLowerCase()}function Vt(i,e,t){return Math.max(e,Math.min(t,i))}function ZE(i,e){return(i%e+e)%e}function j9(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function W9(i,e,t){return i!==e?(t-i)/(e-i):0}function Mp(i,e,t){return(1-t)*i+t*e}function $9(i,e,t,n){return Mp(i,e,1-Math.exp(-t*n))}function X9(i,e=1){return e-Math.abs(ZE(i,e*2)-e)}function Y9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function q9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function K9(i,e){return i+Math.floor(Math.random()*(e-i+1))}function Z9(i,e){return i+Math.random()*(e-i)}function J9(i){return i*(.5-Math.random())}function Q9(i){i!==void 0&&(Nk=i);let e=Nk+=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 eW(i){return i*Ep}function tW(i){return i*nf}function nW(i){return(i&i-1)===0&&i!==0}function iW(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function rW(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function oW(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:ut("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function qu(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 tn={DEG2RAD:Ep,RAD2DEG:nf,generateUUID:gf,clamp:Vt,euclideanModulo:ZE,mapLinear:j9,inverseLerp:W9,lerp:Mp,damp:$9,pingpong:X9,smoothstep:Y9,smootherstep:q9,randInt:K9,randFloat:Z9,randFloatSpread:J9,seededRandom:Q9,degToRad:eW,radToDeg:tW,isPowerOfTwo:nW,ceilPowerOfTwo:iW,floorPowerOfTwo:rW,setQuaternionFromProperEuler:oW,normalize:$i,denormalize:qu},vt=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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(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(Vt(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}},po=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:ut("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(Vt(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(Lk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Lk.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=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(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 qw.copy(this).projectOnVector(e),this.sub(qw)}reflect(e){return this.sub(qw.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(Vt(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}},qw=new G,Lk=new po,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],w=r[5],T=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*w,o[6]=s*m+a*x+l*T,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*w,o[7]=c*m+d*x+u*T,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*w,o[8]=f*m+h*x+p*T,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(Kw.makeScale(e,t)),this}rotate(e){return this.premultiply(Kw.makeRotation(-e)),this}translate(e,t){return this.premultiply(Kw.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)}},Kw=new At,Uk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Bk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function sW(){let i={enabled:!0,workingColorSpace:Wc,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=Ku(r.r),r.g=Ku(r.g),r.b=Ku(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===_a?Dp: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 tf("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return tf("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({[Wc]:{primaries:e,whitePoint:n,transfer:Dp,toXYZ:Uk,fromXYZ:Bk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:vn},outputColorSpaceConfig:{drawingBufferColorSpace:vn}},[vn]:{primaries:e,whitePoint:n,transfer:on,toXYZ:Uk,fromXYZ:Bk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:vn}}}),i}var zt=sW();function ba(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Ku(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Nu,eb=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{Nu===void 0&&(Nu=Qu("canvas")),Nu.width=e.width,Nu.height=e.height;let r=Nu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Nu}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=Qu("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 ut("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},aW=0,rf=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:aW++}),this.uuid=gf(),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(Zw(r[s].image)):o.push(Zw(r[s]))}else o=Zw(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function Zw(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?eb.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(ut("Texture: Unable to serialize Texture."),{})}var lW=0,Jw=new G,Vo=(()=>{class i extends Cs{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Ai,o=Ai,s=jn,a=mo,l=go,c=ar,d=i.DEFAULT_ANISOTROPY,u=_a){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:lW++}),this.uuid=gf(),this.name="",this.source=new rf(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 vt(0,0),this.repeat=new vt(1,1),this.center=new vt(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(Jw).x}get height(){return this.source.getSize(Jw).y}get depth(){return this.source.getSize(Jw).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){ut(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){ut(`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!==bE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Ju:t.x=t.x-Math.floor(t.x);break;case Ai:t.x=t.x<0?0:1;break;case Jv: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 Ju:t.y=t.y-Math.floor(t.y);break;case Ai:t.y=t.y<0?0:1;break;case Jv: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=bE,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,w=(d+f)/4,T=(u+v)/4,P=(p+g)/4;return y>x&&y>_?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=w/n,o=T/n):x>_?x<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),n=w/r,o=P/r):_<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),n=T/o,r=P/o),this.set(n,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this.w=Vt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this.w=Vt(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Vt(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}},tb=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 Vo(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 rf(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 tb{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Pp=class extends Vo{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=fi,this.minFilter=fi,this.wrapR=Ai,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var nb=class extends Vo{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=fi,this.minFilter=fi,this.wrapR=Ai,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(Ro.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Ro.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=Ro.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,Ro):Ro.fromBufferAttribute(o,s),Ro.applyMatrix4(e.matrixWorld),this.expandByPoint(Ro);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Tv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Tv.copy(n.boundingBox)),Tv.applyMatrix4(e.matrixWorld),this.union(Tv)}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,Ro),Ro.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(xp),Dv.subVectors(this.max,xp),Lu.subVectors(e.a,xp),Uu.subVectors(e.b,xp),Bu.subVectors(e.c,xp),ol.subVectors(Uu,Lu),sl.subVectors(Bu,Uu),Uc.subVectors(Lu,Bu);let t=[0,-ol.z,ol.y,0,-sl.z,sl.y,0,-Uc.z,Uc.y,ol.z,0,-ol.x,sl.z,0,-sl.x,Uc.z,0,-Uc.x,-ol.y,ol.x,0,-sl.y,sl.x,0,-Uc.y,Uc.x,0];return!Qw(t,Lu,Uu,Bu,Dv)||(t=[1,0,0,0,1,0,0,0,1],!Qw(t,Lu,Uu,Bu,Dv))?!1:(Iv.crossVectors(ol,sl),t=[Iv.x,Iv.y,Iv.z],Qw(t,Lu,Uu,Bu,Dv))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ro).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ro).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],Ro=new G,Tv=new Yi,Lu=new G,Uu=new G,Bu=new G,ol=new G,sl=new G,Uc=new G,xp=new G,Dv=new G,Iv=new G,Bc=new G;function Qw(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){Bc.fromArray(i,o);let a=r.x*Math.abs(Bc.x)+r.y*Math.abs(Bc.y)+r.z*Math.abs(Bc.z),l=e.dot(Bc),c=t.dot(Bc),d=n.dot(Bc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var cW=new Yi,_p=new G,eE=new G,hl=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):cW.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;_p.subVectors(e,this.center);let t=_p.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(_p,r/n),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(eE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(_p.copy(e.center).add(eE)),this.expandByPoint(_p.copy(e.center).sub(eE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},fa=new G,tE=new G,Pv=new G,al=new G,nE=new G,Av=new G,iE=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){tE.copy(e).add(t).multiplyScalar(.5),Pv.copy(t).sub(e).normalize(),al.copy(this.origin).sub(tE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Pv),a=al.dot(this.direction),l=-al.dot(Pv),c=al.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(tE).addScaledVector(Pv,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){nE.subVectors(t,e),Av.subVectors(n,e),iE.crossVectors(nE,Av);let s=this.direction.dot(iE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;al.subVectors(this.origin,e);let l=a*this.direction.dot(Av.crossVectors(al,Av));if(l<0)return null;let c=a*this.direction.dot(nE.cross(al));if(c<0||l+c>s)return null;let d=-a*al.dot(iE);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/zu.setFromMatrixColumn(e,0).length(),o=1/zu.setFromMatrixColumn(e,1).length(),s=1/zu.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(dW,e,uW)}lookAt(e,t,n){let r=this.elements;return Pr.subVectors(e,t),Pr.lengthSq()===0&&(Pr.z=1),Pr.normalize(),ll.crossVectors(n,Pr),ll.lengthSq()===0&&(Math.abs(n.z)===1?Pr.x+=1e-4:Pr.z+=1e-4,Pr.normalize(),ll.crossVectors(n,Pr)),ll.normalize(),Ov.crossVectors(Pr,ll),r[0]=ll.x,r[4]=Ov.x,r[8]=Pr.x,r[1]=ll.y,r[5]=Ov.y,r[9]=Pr.y,r[2]=ll.z,r[6]=Ov.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],w=r[0],T=r[4],P=r[8],S=r[12],D=r[1],L=r[5],H=r[9],V=r[13],X=r[2],Y=r[6],q=r[10],j=r[14],ne=r[3],ye=r[7],xe=r[11],Se=r[15];return o[0]=s*w+a*D+l*X+c*ne,o[4]=s*T+a*L+l*Y+c*ye,o[8]=s*P+a*H+l*q+c*xe,o[12]=s*S+a*V+l*j+c*Se,o[1]=d*w+u*D+f*X+h*ne,o[5]=d*T+u*L+f*Y+h*ye,o[9]=d*P+u*H+f*q+h*xe,o[13]=d*S+u*V+f*j+h*Se,o[2]=p*w+v*D+g*X+m*ne,o[6]=p*T+v*L+g*Y+m*ye,o[10]=p*P+v*H+g*q+m*xe,o[14]=p*S+v*V+g*j+m*Se,o[3]=b*w+y*D+x*X+_*ne,o[7]=b*T+y*L+x*Y+_*ye,o[11]=b*P+y*H+x*q+_*xe,o[15]=b*S+y*V+x*j+_*Se,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,w=s*f-l*d,T=s*u-a*d;return t*(v*b-g*y+m*x)-n*(p*b-g*_+m*w)+r*(p*y-v*_+m*T)-o*(p*x-v*w+g*T)}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,w=t*b+n*y+r*x+o*_;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let T=1/w;return e[0]=b*T,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*T,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*T,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*T,e[4]=y*T,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*T,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*T,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*T,e[8]=x*T,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*T,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*T,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*T,e[12]=_*T,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*T,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*T,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*T,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,w=n.y,T=n.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*w,r[5]=(1-(f+m))*w,r[6]=(g+b)*w,r[7]=0,r[8]=(p+y)*T,r[9]=(g-b)*T,r[10]=(1-(f+v))*T,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=zu.set(r[0],r[1],r[2]).length(),s=zu.set(r[4],r[5],r[6]).length(),a=zu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),ko.copy(this);let c=1/o,d=1/s,u=1/a;return ko.elements[0]*=c,ko.elements[1]*=c,ko.elements[2]*=c,ko.elements[4]*=d,ko.elements[5]*=d,ko.elements[6]*=d,ko.elements[8]*=u,ko.elements[9]*=u,ko.elements[10]*=u,t.setFromRotationMatrix(ko),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=No,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===No)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Ip)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=No,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===No)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Ip)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}},zu=new G,ko=new Mn,dW=new G(0,0,0),uW=new G(1,1,1),ll=new G,Ov=new G,Pr=new G,zk=new Mn,Vk=new po,pl=(()=>{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(Vt(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(-Vt(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(Vt(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(-Vt(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(Vt(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(-Vt(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:ut("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return zk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(zk,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return Vk.setFromEuler(this),this.setFromQuaternion(Vk,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})(),of=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}},fW=0,Gk=new G,Vu=new po,ha=new Mn,Rv=new G,Sp=new G,hW=new G,pW=new po,Hk=new G(1,0,0),jk=new G(0,1,0),Wk=new G(0,0,1),$k={type:"added"},mW={type:"removed"},Gu={type:"childadded",child:null},rE={type:"childremoved",child:null},kr=(()=>{class i extends Cs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:fW++}),this.uuid=gf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new G,n=new pl,r=new po,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 of,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 Vu.setFromAxisAngle(t,n),this.quaternion.multiply(Vu),this}rotateOnWorldAxis(t,n){return Vu.setFromAxisAngle(t,n),this.quaternion.premultiply(Vu),this}rotateX(t){return this.rotateOnAxis(Hk,t)}rotateY(t){return this.rotateOnAxis(jk,t)}rotateZ(t){return this.rotateOnAxis(Wk,t)}translateOnAxis(t,n){return Gk.copy(t).applyQuaternion(this.quaternion),this.position.add(Gk.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(Hk,t)}translateY(t){return this.translateOnAxis(jk,t)}translateZ(t){return this.translateOnAxis(Wk,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?Rv.copy(t):Rv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Sp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ha.lookAt(Sp,Rv,this.up):ha.lookAt(Rv,Sp,this.up),this.quaternion.setFromRotationMatrix(ha),o&&(ha.extractRotation(o.matrixWorld),Vu.setFromRotationMatrix(ha),this.quaternion.premultiply(Vu.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(gt("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($k),Gu.child=t,this.dispatchEvent(Gu),Gu.child=null):gt("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(mW),rE.child=t,this.dispatchEvent(rE),rE.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($k),Gu.child=t,this.dispatchEvent(Gu),Gu.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(Sp,t,hW),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Sp,pW,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=>fe(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})(),Fo=new G,pa=new G,oE=new G,ma=new G,Hu=new G,ju=new G,Xk=new G,sE=new G,aE=new G,lE=new G,cE=new An,dE=new An,uE=new An,ul=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),Fo.subVectors(e,t),r.cross(Fo);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){Fo.subVectors(r,t),pa.subVectors(n,t),oE.subVectors(e,t);let s=Fo.dot(Fo),a=Fo.dot(pa),l=Fo.dot(oE),c=pa.dot(pa),d=pa.dot(oE),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 cE.setScalar(0),dE.setScalar(0),uE.setScalar(0),cE.fromBufferAttribute(e,t),dE.fromBufferAttribute(e,n),uE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(cE,o.x),s.addScaledVector(dE,o.y),s.addScaledVector(uE,o.z),s}static isFrontFacing(e,t,n,r){return Fo.subVectors(n,t),pa.subVectors(e,t),Fo.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 Fo.subVectors(this.c,this.b),pa.subVectors(this.a,this.b),Fo.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;Hu.subVectors(r,n),ju.subVectors(o,n),sE.subVectors(e,n);let l=Hu.dot(sE),c=ju.dot(sE);if(l<=0&&c<=0)return t.copy(n);aE.subVectors(e,r);let d=Hu.dot(aE),u=ju.dot(aE);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(Hu,s);lE.subVectors(e,o);let h=Hu.dot(lE),p=ju.dot(lE);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(ju,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Xk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Xk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector(Hu,s).addScaledVector(ju,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},HF={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},cl={h:0,s:0,l:0},kv={h:0,s:0,l:0};function fE(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 _t=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=vn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,zt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=zt.workingColorSpace){return this.r=e,this.g=t,this.b=n,zt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=zt.workingColorSpace){if(e=ZE(e,1),t=Vt(t,0,1),n=Vt(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=fE(s,o,e+1/3),this.g=fE(s,o,e),this.b=fE(s,o,e-1/3)}return zt.colorSpaceToWorking(this,r),this}setStyle(e,t=vn){function n(o){o!==void 0&&parseFloat(o)<1&&ut("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:ut("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);ut("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=vn){let n=HF[e.toLowerCase()];return n!==void 0?this.setHex(n,t):ut("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=Ku(e.r),this.g=Ku(e.g),this.b=Ku(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=vn){return zt.workingToColorSpace(Pi.copy(this),e),Math.round(Vt(Pi.r*255,0,255))*65536+Math.round(Vt(Pi.g*255,0,255))*256+Math.round(Vt(Pi.b*255,0,255))}getHexString(e=vn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=zt.workingColorSpace){zt.workingToColorSpace(Pi.copy(this),t);let n=Pi.r,r=Pi.g,o=Pi.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=zt.workingColorSpace){return zt.workingToColorSpace(Pi.copy(this),t),e.r=Pi.r,e.g=Pi.g,e.b=Pi.b,e}getStyle(e=vn){zt.workingToColorSpace(Pi.copy(this),e);let t=Pi.r,n=Pi.g,r=Pi.b;return e!==vn?`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(cl),this.setHSL(cl.h+e,cl.s+t,cl.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(cl),e.getHSL(kv);let n=Mp(cl.h,kv.h,t),r=Mp(cl.s,kv.s,t),o=Mp(cl.l,kv.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}},Pi=new _t;_t.NAMES=HF;var gW=0,Fr=class extends Cs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:gW++}),this.uuid=gf(),this.name="",this.type="Material",this.blending=Hc,this.side=Xi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Kv,this.blendDst=Zv,this.blendEquation=fl,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new _t(0,0,0),this.blendAlpha=0,this.depthFunc=jc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=SE,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Gc,this.stencilZFail=Gc,this.stencilZPass=Gc,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){ut(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ut(`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!==Hc&&(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!==Kv&&(n.blendSrc=this.blendSrc),this.blendDst!==Zv&&(n.blendDst=this.blendDst),this.blendEquation!==fl&&(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!==jc&&(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!==SE&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Gc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Gc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Gc&&(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++}},Ap=class extends Fr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _t(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 pl,this.combine=Ib,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,Fv=new vt,vW=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:vW++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=CE,this.updateRanges=[],this.gpuType=zo,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++)Fv.fromBufferAttribute(this,t),Fv.applyMatrix3(e),this.setXY(t,Fv.x,Fv.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=qu(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=qu(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=qu(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=qu(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=qu(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!==CE&&(e.usage=this.usage),e}};var Op=class extends Or{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var Rp=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)}},bW=0,fo=new Mn,hE=new kr,Wu=new G,Ar=new Yi,Cp=new Yi,di=new G,ei=class i extends Cs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:bW++}),this.uuid=gf(),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(qE(e)?Rp:Op)(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 fo.makeRotationFromQuaternion(e),this.applyMatrix4(fo),this}rotateX(e){return fo.makeRotationX(e),this.applyMatrix4(fo),this}rotateY(e){return fo.makeRotationY(e),this.applyMatrix4(fo),this}rotateZ(e){return fo.makeRotationZ(e),this.applyMatrix4(fo),this}translate(e,t,n){return fo.makeTranslation(e,t,n),this.applyMatrix4(fo),this}scale(e,t,n){return fo.makeScale(e,t,n),this.applyMatrix4(fo),this}lookAt(e){return hE.lookAt(e),hE.updateMatrix(),this.applyMatrix4(hE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Wu).negate(),this.translate(Wu.x,Wu.y,Wu.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&&ut("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){gt("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?(di.addVectors(this.boundingBox.min,Ar.min),this.boundingBox.expandByPoint(di),di.addVectors(this.boundingBox.max,Ar.max),this.boundingBox.expandByPoint(di)):(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))&&gt('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 hl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){gt("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];Cp.setFromBufferAttribute(a),this.morphTargetsRelative?(di.addVectors(Ar.min,Cp.min),Ar.expandByPoint(di),di.addVectors(Ar.max,Cp.max),Ar.expandByPoint(di)):(Ar.expandByPoint(Cp.min),Ar.expandByPoint(Cp.max))}Ar.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)di.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(di));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++)di.fromBufferAttribute(a,c),l&&(Wu.fromBufferAttribute(e,c),di.add(Wu)),r=Math.max(r,n.distanceToSquared(di))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&gt('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){gt("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 P=0;P<n.count;P++)a[P]=new G,l[P]=new G;let c=new G,d=new G,u=new G,f=new vt,h=new vt,p=new vt,v=new G,g=new G;function m(P,S,D){c.fromBufferAttribute(n,P),d.fromBufferAttribute(n,S),u.fromBufferAttribute(n,D),f.fromBufferAttribute(o,P),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,D),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[P].add(v),a[S].add(v),a[D].add(v),l[P].add(g),l[S].add(g),l[D].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let P=0,S=b.length;P<S;++P){let D=b[P],L=D.start,H=D.count;for(let V=L,X=L+H;V<X;V+=3)m(e.getX(V+0),e.getX(V+1),e.getX(V+2))}let y=new G,x=new G,_=new G,w=new G;function T(P){_.fromBufferAttribute(r,P),w.copy(_);let S=a[P];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(w,S);let L=x.dot(l[P])<0?-1:1;s.setXYZW(P,y.x,y.y,y.z,L)}for(let P=0,S=b.length;P<S;++P){let D=b[P],L=D.start,H=D.count;for(let V=L,X=L+H;V<X;V+=3)T(e.getX(V+0)),T(e.getX(V+1)),T(e.getX(V+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++)di.fromBufferAttribute(e,t),di.normalize(),e.setXYZ(t,di.x,di.y,di.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 ut("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"})}},Yk=new Mn,zc=new ya,Nv=new hl,qk=new G,Lv=new G,Uv=new G,Bv=new G,pE=new G,zv=new G,Kk=new G,Vv=new G,qi=class extends kr{constructor(e=new ei,t=new Ap){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){zv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(pE.fromBufferAttribute(u,e),s?zv.addScaledVector(pE,d):zv.addScaledVector(pE.sub(t),d))}t.add(zv)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Nv.copy(n.boundingSphere),Nv.applyMatrix4(o),zc.copy(e.ray).recast(e.near),!(Nv.containsPoint(zc.origin)===!1&&(zc.intersectSphere(Nv,qk)===null||zc.origin.distanceToSquared(qk)>(e.far-e.near)**2))&&(Yk.copy(o).invert(),zc.copy(e.ray).applyMatrix4(Yk),!(n.boundingBox!==null&&zc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,zc)))}_computeIntersections(e,t,n){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let w=a.getX(x),T=a.getX(x+1),P=a.getX(x+2);r=Gv(this,m,e,n,c,d,u,w,T,P),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=Gv(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 w=x,T=x+1,P=x+2;r=Gv(this,m,e,n,c,d,u,w,T,P),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=Gv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function yW(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;Vv.copy(a),Vv.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(Vv);return c<t.near||c>t.far?null:{distance:c,point:Vv.clone(),object:i}}function Gv(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,Lv),i.getVertexPosition(l,Uv),i.getVertexPosition(c,Bv);let d=yW(i,e,t,n,Lv,Uv,Bv,Kk);if(d){let u=new G;ul.getBarycoord(Kk,Lv,Uv,Bv,u),r&&(d.uv=ul.getInterpolatedAttribute(r,a,l,c,u,new vt)),o&&(d.uv1=ul.getInterpolatedAttribute(o,a,l,c,u,new vt)),s&&(d.normal=ul.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};ul.getNormal(Lv,Uv,Bv,f.normal),d.face=f,d.barycoord=u}return d}var sf=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,_,w,T,P,S){let D=x/T,L=_/P,H=x/2,V=_/2,X=w/2,Y=T+1,q=P+1,j=0,ne=0,ye=new G;for(let xe=0;xe<q;xe++){let Se=xe*L-V;for(let et=0;et<Y;et++){let pt=et*D-H;ye[v]=pt*b,ye[g]=Se*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=w>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(et/T),u.push(1-xe/P),j+=1}}for(let xe=0;xe<P;xe++)for(let Se=0;Se<T;Se++){let et=f+Se+Y*xe,pt=f+Se+Y*(xe+1),Wt=f+(Se+1)+Y*(xe+1),Kt=f+(Se+1)+Y*xe;l.push(et,pt,Kt),l.push(pt,Wt,Kt),ne+=6}a.addGroup(h,ne,S),h+=ne,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 nd(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?(ut("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 Oi(i){let e={};for(let t=0;t<i.length;t++){let n=nd(i[t]);for(let r in n)e[r]=n[r]}return e}function xW(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function JE(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:zt.workingColorSpace}var jF={clone:nd,merge:Oi},_W=`void main() {
6
6
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
7
7
  }`,SW=`void main() {
8
8
  gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );