@pixeasy/customizer 0.0.31-beta.prod → 0.0.32-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 P4=Object.defineProperty,A4=Object.defineProperties;var O4=Object.getOwnProp
2
2
  ${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
3
3
  `)}`:"",this.name="UnsubscriptionError",this.errors=t});function ph(i,e){if(i){let t=i.indexOf(e);0<=t&&i.splice(t,1)}}var Ui=class i{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(let o of t)o.remove(this);else t.remove(this);let{initialTeardown:n}=this;if(Ft(n))try{n()}catch(o){e=o instanceof Qm?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{HD(o)}catch(s){e=e??[],s instanceof Qm?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Qm(e)}}add(e){var t;if(e&&e!==this)if(this.closed)HD(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)&&ph(t,e)}remove(e){let{_finalizers:t}=this;t&&ph(t,e),e instanceof i&&e._removeParent(this)}};Ui.EMPTY=(()=>{let i=new Ui;return i.closed=!0,i})();var K_=Ui.EMPTY;function eg(i){return i instanceof Ui||i&&"closed"in i&&Ft(i.remove)&&Ft(i.add)&&Ft(i.unsubscribe)}function HD(i){Ft(i)?i():i.unsubscribe()}var wo={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Yd={setTimeout(i,e,...t){let{delegate:n}=Yd;return n?.setTimeout?n.setTimeout(i,e,...t):setTimeout(i,e,...t)},clearTimeout(i){let{delegate:e}=Yd;return(e?.clearTimeout||clearTimeout)(i)},delegate:void 0};function tg(i){Yd.setTimeout(()=>{let{onUnhandledError:e}=wo;if(e)e(i);else throw i})}function Z_(){}var jD=J_("C",void 0,void 0);function WD(i){return J_("E",void 0,i)}function $D(i){return J_("N",i,void 0)}function J_(i,e,t){return{kind:i,value:e,error:t}}var lc=null;function qd(i){if(wo.useDeprecatedSynchronousErrorHandling){let e=!lc;if(e&&(lc={errorThrown:!1,error:null}),i(),e){let{errorThrown:t,error:n}=lc;if(lc=null,t)throw n}}else i()}function XD(i){wo.useDeprecatedSynchronousErrorHandling&&lc&&(lc.errorThrown=!0,lc.error=i)}var cc=class extends Ui{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,eg(e)&&e.add(this)):this.destination=H4}static create(e,t,n){return new za(e,t,n)}next(e){this.isStopped?eS($D(e),this):this._next(e)}error(e){this.isStopped?eS(WD(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?eS(jD,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()}}},V4=Function.prototype.bind;function Q_(i,e){return V4.call(i,e)}var tS=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){ng(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){ng(n)}else ng(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){ng(t)}}},za=class extends cc{constructor(e,t,n){super();let r;if(Ft(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let o;this&&wo.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&Q_(e.next,o),error:e.error&&Q_(e.error,o),complete:e.complete&&Q_(e.complete,o)}):r=e}this.destination=new tS(r)}};function ng(i){wo.useDeprecatedSynchronousErrorHandling?XD(i):tg(i)}function G4(i){throw i}function eS(i,e){let{onStoppedNotification:t}=wo;t&&Yd.setTimeout(()=>t(i,e))}var H4={closed:!0,next:Z_,error:G4,complete:Z_};var Kd=typeof Symbol=="function"&&Symbol.observable||"@@observable";function ig(i){return i}function YD(i){return i.length===0?ig:i.length===1?i[0]:function(t){return i.reduce((n,r)=>r(n),t)}}var En=(()=>{class i{constructor(t){t&&(this._subscribe=t)}lift(t){let n=new i;return n.source=this,n.operator=t,n}subscribe(t,n,r){let o=W4(t)?t:new za(t,n,r);return qd(()=>{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=qD(n),new n((r,o)=>{let s=new za({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)}[Kd](){return this}pipe(...t){return YD(t)(this)}toPromise(t){return t=qD(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 qD(i){var e;return(e=i??wo.Promise)!==null&&e!==void 0?e:Promise}function j4(i){return i&&Ft(i.next)&&Ft(i.error)&&Ft(i.complete)}function W4(i){return i&&i instanceof cc||j4(i)&&eg(i)}function $4(i){return Ft(i?.lift)}function ai(i){return e=>{if($4(e))return e.lift(function(t){try{return i(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function li(i,e,t,n,r){return new nS(i,e,t,n,r)}var nS=class extends cc{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 KD=Xd(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Eo=(()=>{class i extends En{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new rg(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new KD}next(t){qd(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){qd(()=>{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(){qd(()=>{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?K_:(this.currentObservers=null,o.push(t),new Ui(()=>{this.currentObservers=null,ph(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new En;return t.source=this,t}}return i.create=(e,t)=>new rg(e,t),i})(),rg=class extends Eo{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:K_}};var mh=class extends Eo{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};function ZD(i){return i&&Ft(i.schedule)}function JD(i){return i[i.length-1]}function QD(i){return Ft(JD(i))?i.pop():void 0}function eI(i){return ZD(JD(i))?i.pop():void 0}function nI(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 tI(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 dc(i){return this instanceof dc?(this.v=i,this):new dc(i)}function iI(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 dc?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 rI(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 tI=="function"?tI(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 og=i=>i&&typeof i.length=="number"&&typeof i!="function";function sg(i){return Ft(i?.then)}function ag(i){return Ft(i[Kd])}function lg(i){return Symbol.asyncIterator&&Ft(i?.[Symbol.asyncIterator])}function cg(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 X4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var dg=X4();function ug(i){return Ft(i?.[dg])}function fg(i){return iI(this,arguments,function*(){let t=i.getReader();try{for(;;){let{value:n,done:r}=yield dc(t.read());if(r)return yield dc(void 0);yield yield dc(n)}}finally{t.releaseLock()}})}function hg(i){return Ft(i?.getReader)}function Ei(i){if(i instanceof En)return i;if(i!=null){if(ag(i))return Y4(i);if(og(i))return q4(i);if(sg(i))return K4(i);if(lg(i))return oI(i);if(ug(i))return Z4(i);if(hg(i))return J4(i)}throw cg(i)}function Y4(i){return new En(e=>{let t=i[Kd]();if(Ft(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function q4(i){return new En(e=>{for(let t=0;t<i.length&&!e.closed;t++)e.next(i[t]);e.complete()})}function K4(i){return new En(e=>{i.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,tg)})}function Z4(i){return new En(e=>{for(let t of i)if(e.next(t),e.closed)return;e.complete()})}function oI(i){return new En(e=>{Q4(i,e).catch(t=>e.error(t))})}function J4(i){return oI(fg(i))}function Q4(i,e){var t,n,r,o;return nI(this,void 0,void 0,function*(){try{for(t=rI(i);n=yield t.next(),!n.done;){let s=n.value;if(e.next(s),e.closed)return}}catch(s){r={error:s}}finally{try{n&&!n.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}e.complete()})}function Kr(i,e,t,n=0,r=!1){let o=e.schedule(function(){t(),r?i.add(this.schedule(null,n)):this.unsubscribe()},n);if(i.add(o),!r)return o}function pg(i,e=0){return ai((t,n)=>{t.subscribe(li(n,r=>Kr(n,i,()=>n.next(r),e),()=>Kr(n,i,()=>n.complete(),e),r=>Kr(n,i,()=>n.error(r),e)))})}function mg(i,e=0){return ai((t,n)=>{n.add(i.schedule(()=>t.subscribe(n),e))})}function sI(i,e){return Ei(i).pipe(mg(e),pg(e))}function aI(i,e){return Ei(i).pipe(mg(e),pg(e))}function lI(i,e){return new En(t=>{let n=0;return e.schedule(function(){n===i.length?t.complete():(t.next(i[n++]),t.closed||this.schedule())})})}function cI(i,e){return new En(t=>{let n;return Kr(t,e,()=>{n=i[dg](),Kr(t,e,()=>{let r,o;try{({value:r,done:o}=n.next())}catch(s){t.error(s);return}o?t.complete():t.next(r)},0,!0)}),()=>Ft(n?.return)&&n.return()})}function gg(i,e){if(!i)throw new Error("Iterable cannot be null");return new En(t=>{Kr(t,e,()=>{let n=i[Symbol.asyncIterator]();Kr(t,e,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function dI(i,e){return gg(fg(i),e)}function uI(i,e){if(i!=null){if(ag(i))return sI(i,e);if(og(i))return lI(i,e);if(sg(i))return aI(i,e);if(lg(i))return gg(i,e);if(ug(i))return cI(i,e);if(hg(i))return dI(i,e)}throw cg(i)}function gh(i,e){return e?uI(i,e):Ei(i)}function ss(...i){let e=eI(i);return gh(i,e)}function Va(i,e){let t=Ft(i)?i:()=>i,n=r=>r.error(t());return new En(e?r=>e.schedule(n,0,r):n)}var fI=Xd(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"});function uc(i,e){let t=typeof e=="object";return new Promise((n,r)=>{let o=new za({next:s=>{n(s),o.unsubscribe()},error:r,complete:()=>{t?n(e.defaultValue):r(new fI)}});i.subscribe(o)})}function rr(i,e){return ai((t,n)=>{let r=0;t.subscribe(li(n,o=>{n.next(i.call(e,o,r++))}))})}var{isArray:e5}=Array;function t5(i,e){return e5(e)?i(...e):i(e)}function hI(i){return rr(e=>t5(i,e))}var{isArray:n5}=Array,{getPrototypeOf:i5,prototype:r5,keys:o5}=Object;function pI(i){if(i.length===1){let e=i[0];if(n5(e))return{args:e,keys:null};if(s5(e)){let t=o5(e);return{args:t.map(n=>e[n]),keys:t}}}return{args:i,keys:null}}function s5(i){return i&&typeof i=="object"&&i5(i)===r5}function mI(i,e){return i.reduce((t,n,r)=>(t[n]=e[r],t),{})}function gI(i,e,t,n,r,o,s,a){let l=[],c=0,d=0,u=!1,f=()=>{u&&!l.length&&!c&&e.complete()},h=v=>c<n?p(v):l.push(v),p=v=>{o&&e.next(v),c++;let g=!1;Ei(t(v,d++)).subscribe(li(e,m=>{r?.(m),o?h(m):e.next(m)},()=>{g=!0},void 0,()=>{if(g)try{for(c--;l.length&&c<n;){let m=l.shift();s?Kr(e,s,()=>p(m)):p(m)}f()}catch(m){e.error(m)}}))};return i.subscribe(li(e,h,()=>{u=!0,f()})),()=>{a?.()}}function vg(i,e,t=1/0){return Ft(e)?vg((n,r)=>rr((o,s)=>e(n,o,r,s))(Ei(i(n,r))),t):(typeof e=="number"&&(t=e),ai((n,r)=>gI(n,r,i,t)))}function iS(...i){let e=QD(i),{args:t,keys:n}=pI(i),r=new En(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let d=0;d<s;d++){let u=!1;Ei(t[d]).subscribe(li(o,f=>{u||(u=!0,c--),a[d]=f},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(n?mI(n,a):a),o.complete())}))}});return e?r.pipe(hI(e)):r}function rS(i,e){return ai((t,n)=>{let r=0;t.subscribe(li(n,o=>i.call(e,o,r++)&&n.next(o)))})}function fc(i){return ai((e,t)=>{let n=null,r=!1,o;n=e.subscribe(li(t,void 0,void 0,s=>{o=Ei(i(s,fc(i)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(t))})}function oS(i,e){return Ft(e)?vg(i,e,1):vg(i,1)}function vh(i){return ai((e,t)=>{try{e.subscribe(t)}finally{t.add(i)}})}function sS(i,e){return ai((t,n)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&n.complete();t.subscribe(li(n,l=>{r?.unsubscribe();let c=0,d=o++;Ei(i(l,d)).subscribe(r=li(n,u=>n.next(e?e(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function aS(i,e,t){let n=Ft(i)||e||t?{next:i,error:e,complete:t}:i;return n?ai((r,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;r.subscribe(li(o,l=>{var c;(c=n.next)===null||c===void 0||c.call(n,l),o.next(l)},()=>{var l;a=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},l=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,l),o.error(l)},()=>{var l,c;a&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):ig}var lS;function bg(){return lS}function as(i){let e=lS;return lS=i,e}var vI=Symbol("NotFound");function Zd(i){return i===vI||i?.name==="\u0275NotFound"}function bI(i){let e=lt(null);try{return i()}finally{lt(e)}}var Eg="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Ke=class extends Error{code;constructor(e,t){super(Ks(e,t)),this.code=e}};function a5(i){return`NG0${Math.abs(i)}`}function Ks(i,e){return`${a5(i)}${e?": "+e:""}`}var Jr=globalThis;function fn(i){for(let e in i)if(i[e]===fn)return e;throw Error("")}function CI(i,e){for(let t in e)e.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&(i[t]=e[t])}function Mg(i){if(typeof i=="string")return i;if(Array.isArray(i))return`[${i.map(Mg).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 Tg(i,e){return i?e?`${i} ${e}`:i:e||""}var l5=fn({__forward_ref__:fn});function zi(i){return i.__forward_ref__=zi,i}function yi(i){return _S(i)?i():i}function _S(i){return typeof i=="function"&&i.hasOwnProperty(l5)&&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 Dg(i){return c5(i,Ig)}function c5(i,e){return i.hasOwnProperty(e)&&i[e]||null}function d5(i){let e=i?.[Ig]??null;return e||null}function dS(i){return i&&i.hasOwnProperty(xg)?i[xg]:null}var Ig=fn({\u0275prov:fn}),xg=fn({\u0275inj:fn}),qe=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=_e({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function SS(i){return i&&!!i.\u0275providers}var CS=fn({\u0275cmp:fn}),wS=fn({\u0275dir:fn}),ES=fn({\u0275pipe:fn});var yh=fn({\u0275fac:fn}),vc=fn({__NG_ELEMENT_ID__:fn}),yI=fn({__NG_ENV_ID__:fn});function Zs(i){return TS(i,"@Component"),i[CS]||null}function Pg(i){return TS(i,"@Directive"),i[wS]||null}function MS(i){return TS(i,"@Pipe"),i[ES]||null}function TS(i,e){if(i==null)throw new Ke(-919,!1)}function wh(i){return typeof i=="string"?i:i==null?"":String(i)}var wI=fn({ngErrorCode:fn}),u5=fn({ngErrorMessage:fn}),f5=fn({ngTokenPath:fn});function DS(i,e){return EI("",-200,e)}function Ag(i,e){throw new Ke(-201,!1)}function EI(i,e,t){let n=new Ke(e,i);return n[wI]=e,n[u5]=i,t&&(n[f5]=t),n}function h5(i){return i[wI]}var uS;function MI(){return uS}function Bi(i){let e=uS;return uS=i,e}function IS(i,e,t){let n=Dg(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;Ag(i,"")}var p5={},hc=p5,m5="__NG_DI_FLAG__",fS=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=pc(t)||0;try{return this.injector.get(e,n&8?null:hc,n)}catch(r){if(Zd(r))return r;throw r}}};function g5(i,e=0){let t=bg();if(t===void 0)throw new Ke(-203,!1);if(t===null)return IS(i,void 0,e);{let n=v5(e),r=t.retrieve(i,n);if(Zd(r)){if(n.optional)return null;throw r}return r}}function Xe(i,e=0){return(MI()||g5)(yi(i),e)}function Q(i,e){return Xe(i,pc(e))}function pc(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function v5(i){return{optional:!!(i&8),host:!!(i&1),self:!!(i&2),skipSelf:!!(i&4)}}function hS(i){let e=[];for(let t=0;t<i.length;t++){let n=yi(i[t]);if(Array.isArray(n)){if(n.length===0)throw new Ke(900,!1);let r,o=0;for(let s=0;s<n.length;s++){let a=n[s],l=b5(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(Xe(r,o))}else e.push(Xe(n))}return e}function b5(i){return i[m5]}function Ga(i,e){let t=i.hasOwnProperty(yh);return t?i[yh]:null}function TI(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 DI(i){return i.flat(Number.POSITIVE_INFINITY)}function Og(i,e){i.forEach(t=>Array.isArray(t)?Og(t,e):e(t))}function PS(i,e,t){e>=i.length?i.push(t):i.splice(e,0,t)}function Eh(i,e){return e>=i.length-1?i.pop():i.splice(e,1)[0]}function II(i,e){let t=[];for(let n=0;n<i;n++)t.push(e);return t}function PI(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 Rg(i,e,t){let n=Qd(i,e);return n>=0?i[n|1]=t:(n=~n,PI(i,n,e,t)),n}function kg(i,e){let t=Qd(i,e);if(t>=0)return i[t|1]}function Qd(i,e){return y5(i,e,1)}function y5(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 Wa={},Mi=[],Js=new qe(""),AS=new qe("",-1),OS=new qe(""),xh=class{get(e,t=hc){if(t===hc){let r=EI("",-201);throw r.name="\u0275NotFound",r}return t}};function Qs(i){return{\u0275providers:i}}function AI(i){return Qs([{provide:Js,multi:!0,useValue:i}])}function OI(...i){return{\u0275providers:Fg(!0,i),\u0275fromNgModule:!0}}function Fg(i,...e){let t=[],n=new Set,r,o=s=>{t.push(s)};return Og(e,s=>{let a=s;_g(a,o,[],n)&&(r||=[],r.push(a))}),r!==void 0&&RI(r,o),t}function RI(i,e){for(let t=0;t<i.length;t++){let{ngModule:n,providers:r}=i[t];RS(r,o=>{e(o,n)})}}function _g(i,e,t,n){if(i=yi(i),!i)return!1;let r=null,o=dS(i),s=!o&&Zs(i);if(!o&&!s){let l=i.ngModule;if(o=dS(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)_g(c,e,t,n)}}else if(o){if(o.imports!=null&&!a){n.add(r);let c;Og(o.imports,d=>{_g(d,e,t,n)&&(c||=[],c.push(d))}),c!==void 0&&RI(c,e)}if(!a){let c=Ga(r)||(()=>new r);e({provide:r,useFactory:c,deps:Mi},r),e({provide:OS,useValue:r,multi:!0},r),e({provide:Js,useValue:()=>Xe(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=i;RS(l,d=>{e(d,c)})}}else return!1;return r!==i&&i.providers!==void 0}function RS(i,e){for(let t of i)SS(t)&&(t=t.\u0275providers),Array.isArray(t)?RS(t,e):e(t)}var x5=fn({provide:String,useValue:fn});function kI(i){return i!==null&&typeof i=="object"&&x5 in i}function _5(i){return!!(i&&i.useExisting)}function S5(i){return!!(i&&i.useFactory)}function mc(i){return typeof i=="function"}function FI(i){return!!i.useClass}var Mh=new qe(""),yg={},xI={},cS;function eu(){return cS===void 0&&(cS=new xh),cS}var Ti=class{},gc=class extends Ti{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,mS(e,s=>this.processProvider(s)),this.records.set(AS,Jd(void 0,this)),r.has("environment")&&this.records.set(Ti,Jd(void 0,this));let o=this.records.get(Mh);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(OS,Mi,{self:!0}))}retrieve(e,t){let n=pc(t)||0;try{return this.get(e,hc,n)}catch(r){if(Zd(r))return r;throw r}}destroy(){bh(this),this._destroyed=!0;let e=lt(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),lt(e)}}onDestroy(e){return bh(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){bh(this);let t=as(this),n=Bi(void 0),r;try{return e()}finally{as(t),Bi(n)}}get(e,t=hc,n){if(bh(this),e.hasOwnProperty(yI))return e[yI](this);let r=pc(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=T5(e)&&Dg(e);d&&this.injectableDefInScope(d)?c=Jd(pS(e),yg):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?eu():this.parent;return t=r&8&&t===hc?null:t,l.get(e,t)}catch(l){let c=h5(l);throw c===-200||c===-201?new Ke(c,null):l}finally{Bi(a),as(s)}}resolveInjectorInitializers(){let e=lt(null),t=as(this),n=Bi(void 0),r;try{let o=this.get(Js,Mi,{self:!0});for(let s of o)s()}finally{as(t),Bi(n),lt(e)}}toString(){return"R3Injector[...]"}processProvider(e){e=yi(e);let t=mc(e)?e:yi(e&&e.provide),n=w5(e);if(!mc(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Jd(void 0,yg,!0),r.factory=()=>hS(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=lt(null);try{if(t.value===xI)throw DS("");return t.value===yg&&(t.value=xI,t.value=t.factory(void 0,n)),typeof t.value=="object"&&t.value&&M5(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{lt(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=yi(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function pS(i){let e=Dg(i),t=e!==null?e.factory:Ga(i);if(t!==null)return t;if(i instanceof qe)throw new Ke(-204,!1);if(i instanceof Function)return C5(i);throw new Ke(-204,!1)}function C5(i){if(i.length>0)throw new Ke(-204,!1);let t=d5(i);return t!==null?()=>t.factory(i):()=>new i}function w5(i){if(kI(i))return Jd(void 0,i.useValue);{let e=kS(i);return Jd(e,yg)}}function kS(i,e,t){let n;if(mc(i)){let r=yi(i);return Ga(r)||pS(r)}else if(kI(i))n=()=>yi(i.useValue);else if(S5(i))n=()=>i.useFactory(...hS(i.deps||[]));else if(_5(i))n=(r,o)=>Xe(yi(i.useExisting),o!==void 0&&o&8?8:void 0);else{let r=yi(i&&(i.useClass||i.provide));if(E5(i))n=()=>new r(...hS(i.deps));else return Ga(r)||pS(r)}return n}function bh(i){if(i.destroyed)throw new Ke(-205,!1)}function Jd(i,e,t=!1){return{factory:i,value:e,multi:t?[]:void 0}}function E5(i){return!!i.deps}function M5(i){return i!==null&&typeof i=="object"&&typeof i.ngOnDestroy=="function"}function T5(i){return typeof i=="function"||typeof i=="object"&&i.ngMetadataName==="InjectionToken"}function mS(i,e){for(let t of i)Array.isArray(t)?mS(t,e):t&&SS(t)?mS(t.\u0275providers,e):e(t)}function tu(i,e){let t;i instanceof gc?(bh(i),t=i):t=new fS(i);let n,r=as(t),o=Bi(void 0);try{return e()}finally{as(r),Bi(o)}}function NI(){return MI()!==void 0||bg()!=null}var Vi=0,tt=1,wt=2,Vn=3,Qr=4,Gi=5,Hi=6,nu=7,kn=8,xr=9,Mo=10,Zt=11,iu=12,FS=13,bc=14,ci=15,$a=16,yc=17,ds=18,ea=19,NS=20,qs=21,Ng=22,Ha=23,_r=24,xc=25,Xa=26,Xt=27,LI=1,To=6,us=7,Th=8,_c=9,Dn=10;function eo(i){return Array.isArray(i)&&typeof i[LI]=="object"}function Sr(i){return Array.isArray(i)&&i[LI]===!0}function LS(i){return(i.flags&4)!==0}function fs(i){return i.componentOffset>-1}function ru(i){return(i.flags&1)===1}function hs(i){return!!i.template}function Sc(i){return(i[wt]&512)!==0}function Ya(i){return(i[wt]&256)===256}var US="svg",UI="math";function Cr(i){for(;Array.isArray(i);)i=i[Vi];return i}function BS(i,e){return Cr(e[i])}function to(i,e){return Cr(e[i.index])}function ou(i,e){return i.data[e]}function Lg(i,e){return i[e]}function zS(i,e,t,n){t>=i.data.length&&(i.data[t]=null,i.blueprint[t]=null),e[t]=n}function no(i,e){let t=e[i];return eo(t)?t:t[Vi]}function Ug(i){return(i[wt]&128)===128}function BI(i){return Sr(i[Vn])}function io(i,e){return e==null?null:i[e]}function VS(i){i[yc]=0}function GS(i){i[wt]&1024||(i[wt]|=1024,Ug(i)&&Cc(i))}function zI(i,e){for(;i>0;)e=e[bc],i--;return e}function Dh(i){return!!(i[wt]&9216||i[_r]?.dirty)}function Bg(i){i[Mo].changeDetectionScheduler?.notify(8),i[wt]&64&&(i[wt]|=1024),Dh(i)&&Cc(i)}function Cc(i){i[Mo].changeDetectionScheduler?.notify(0);let e=ja(i);for(;e!==null&&!(e[wt]&8192||(e[wt]|=8192,!Ug(e)));)e=ja(e)}function HS(i,e){if(Ya(i))throw new Ke(911,!1);i[qs]===null&&(i[qs]=[]),i[qs].push(e)}function VI(i,e){if(i[qs]===null)return;let t=i[qs].indexOf(e);t!==-1&&i[qs].splice(t,1)}function ja(i){let e=i[Vn];return Sr(e)?e[Vn]:e}function jS(i){return i[nu]??=[]}function WS(i){return i.cleanup??=[]}function GI(i,e,t,n){let r=jS(e);r.push(t),i.firstCreatePass&&WS(i).push(n,r.length-1)}var Pt={lFrame:t2(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var gS=!1;function HI(){return Pt.lFrame.elementDepthCount}function jI(){Pt.lFrame.elementDepthCount++}function $S(){Pt.lFrame.elementDepthCount--}function zg(){return Pt.bindingsEnabled}function Vg(){return Pt.skipHydrationRootTNode!==null}function XS(i){return Pt.skipHydrationRootTNode===i}function WI(i){Pt.skipHydrationRootTNode=i}function YS(){Pt.skipHydrationRootTNode=null}function mt(){return Pt.lFrame.lView}function In(){return Pt.lFrame.tView}function Z(i){return Pt.lFrame.contextLView=i,i[kn]}function J(i){return Pt.lFrame.contextLView=null,i}function xi(){let i=qS();for(;i!==null&&i.type===64;)i=i.parent;return i}function qS(){return Pt.lFrame.currentTNode}function $I(){let i=Pt.lFrame,e=i.currentTNode;return i.isParent?e:e.parent}function su(i,e){let t=Pt.lFrame;t.currentTNode=i,t.isParent=e}function KS(){return Pt.lFrame.isParent}function ZS(){Pt.lFrame.isParent=!1}function XI(){return Pt.lFrame.contextLView}function JS(){return gS}function _h(i){let e=gS;return gS=i,e}function au(){let i=Pt.lFrame,e=i.bindingRootIndex;return e===-1&&(e=i.bindingRootIndex=i.tView.bindingStartIndex),e}function YI(i){return Pt.lFrame.bindingIndex=i}function qa(){return Pt.lFrame.bindingIndex++}function QS(i){let e=Pt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+i,t}function qI(){return Pt.lFrame.inI18n}function KI(i,e){let t=Pt.lFrame;t.bindingIndex=t.bindingRootIndex=i,Gg(e)}function ZI(){return Pt.lFrame.currentDirectiveIndex}function Gg(i){Pt.lFrame.currentDirectiveIndex=i}function JI(i){let e=Pt.lFrame.currentDirectiveIndex;return e===-1?null:i[e]}function QI(){return Pt.lFrame.currentQueryIndex}function Hg(i){Pt.lFrame.currentQueryIndex=i}function D5(i){let e=i[tt];return e.type===2?e.declTNode:e.type===1?i[Gi]:null}function e1(i,e,t){if(t&4){let r=e,o=i;for(;r=r.parent,r===null&&!(t&1);)if(r=D5(o),r===null||(o=o[bc],r.type&10))break;if(r===null)return!1;e=r,i=o}let n=Pt.lFrame=e2();return n.currentTNode=e,n.lView=i,!0}function jg(i){let e=e2(),t=i[tt];Pt.lFrame=e,e.currentTNode=t.firstChild,e.lView=i,e.tView=t,e.contextLView=i,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function e2(){let i=Pt.lFrame,e=i===null?null:i.child;return e===null?t2(i):e}function t2(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 n2(){let i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var t1=n2;function Wg(){let i=n2();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 i2(i){return(Pt.lFrame.contextLView=zI(i,Pt.lFrame.contextLView))[kn]}function ta(){return Pt.lFrame.selectedIndex}function Ka(i){Pt.lFrame.selectedIndex=i}function Ih(){let i=Pt.lFrame;return ou(i.tView,i.selectedIndex)}function Za(){Pt.lFrame.currentNamespace=US}function lu(){I5()}function I5(){Pt.lFrame.currentNamespace=null}function n1(){return Pt.lFrame.currentNamespace}var r2=!0;function $g(){return r2}function na(i){r2=i}function vS(i,e=null,t=null,n){let r=o2(i,e,t,n);return r.resolveInjectorInitializers(),r}function o2(i,e=null,t=null,n,r=new Set){let o=[t||Mi,OI(i)],s;return new gc(o,e||eu(),s||null,r)}var Di=class i{static THROW_IF_NOT_FOUND=hc;static NULL=new xh;static create(e,t){if(Array.isArray(e))return vS({name:""},t,e,"");{let n=e.name??"";return vS({name:n},e.parent,e.providers,n)}}static \u0275prov=_e({token:i,providedIn:"any",factory:()=>Xe(AS)});static __NG_ELEMENT_ID__=-1},wn=new qe(""),sr=(()=>{class i{static __NG_ELEMENT_ID__=P5;static __NG_ENV_ID__=t=>t}return i})(),Sg=class extends sr{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Ya(this._lView)}onDestroy(e){let t=this._lView;return HS(t,e),()=>VI(t,e)}};function P5(){return new Sg(mt())}var s2=!1,a2=new qe(""),Ja=(()=>{class i{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new mh(!1);debugTaskTracker=Q(a2,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new En(t=>{t.next(!1),t.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let t=this.taskId++;return this.pendingTasks.add(t),this.debugTaskTracker?.add(t),t}has(t){return this.pendingTasks.has(t)}remove(t){this.pendingTasks.delete(t),this.debugTaskTracker?.remove(t),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),bS=class extends Eo{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,NI()&&(this.destroyRef=Q(sr,{optional:!0})??void 0,this.pendingTasks=Q(Ja,{optional:!0})??void 0)}emit(e){let t=lt(null);try{super.next(e)}finally{lt(t)}}subscribe(e,t,n){let r=e,o=t||(()=>null),s=n;if(e&&typeof e=="object"){let l=e;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return e instanceof Ui&&e.add(a),a}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}},yr=bS;function Cg(...i){}function i1(i){let e,t;function n(){i=Cg;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 l2(i){return queueMicrotask(()=>i()),()=>{i=Cg}}var r1="isAngularZone",Sh=r1+"_ID",A5=0,or=class i{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new yr(!1);onMicrotaskEmpty=new yr(!1);onStable=new yr(!1);onError=new yr(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=s2}=e;if(typeof Zone>"u")throw new Ke(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&n,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,k5(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(r1)===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new Ke(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new Ke(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,O5,Cg,Cg);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)}},O5={};function o1(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 R5(i){if(i.isCheckStableRunning||i.callbackScheduled)return;i.callbackScheduled=!0;function e(){i1(()=>{i.callbackScheduled=!1,yS(i),i.isCheckStableRunning=!0,o1(i),i.isCheckStableRunning=!1})}i.scheduleInRootZone?Zone.root.run(()=>{e()}):i._outer.run(()=>{e()}),yS(i)}function k5(i){let e=()=>{R5(i)},t=A5++;i._inner=i._inner.fork({name:"angular",properties:{[r1]:!0,[Sh]:t,[Sh+t]:!0},onInvokeTask:(n,r,o,s,a,l)=>{if(F5(l))return n.invokeTask(o,s,a,l);try{return _I(i),n.invokeTask(o,s,a,l)}finally{(i.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&e(),SI(i)}},onInvoke:(n,r,o,s,a,l,c)=>{try{return _I(i),n.invoke(o,s,a,l,c)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!N5(l)&&e(),SI(i)}},onHasTask:(n,r,o,s)=>{n.hasTask(o,s),r===o&&(s.change=="microTask"?(i._hasPendingMicrotasks=s.microTask,yS(i),o1(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 yS(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function _I(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function SI(i){i._nesting--,o1(i)}var Ch=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new yr;onMicrotaskEmpty=new yr;onStable=new yr;onError=new yr;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 F5(i){return c2(i,"__ignore_ng_zone__")}function N5(i){return c2(i,"__scheduler_tick__")}function c2(i,e){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[e]===!0}var Zr=class{_console=console;handleError(e){this._console.error("ERROR",e)}},ia=new qe("",{factory:()=>{let i=Q(or),e=Q(Ti),t;return n=>{i.runOutsideAngular(()=>{e.destroyed&&!t?setTimeout(()=>{throw n}):(t??=e.get(Zr),t.handleError(n))})}}}),d2={provide:Js,useValue:()=>{let i=Q(Zr,{optional:!0})},multi:!0},L5=new qe("",{factory:()=>{let i=Q(wn).defaultView;if(!i)return;let e=Q(ia),t=o=>{e(o.reason),o.preventDefault()},n=o=>{o.error?e(o.error):e(new Error(o.message,{cause:o})),o.preventDefault()},r=()=>{i.addEventListener("unhandledrejection",t),i.addEventListener("error",n)};typeof Zone<"u"?Zone.root.run(r):r(),Q(sr).onDestroy(()=>{i.removeEventListener("error",n),i.removeEventListener("unhandledrejection",t)})}});function s1(){return Qs([AI(()=>{Q(L5)})])}function N(i,e){let[t,n,r]=$_(i,e?.equal),o=t,s=o[Qn];return o.set=n,o.update=r,o.asReadonly=Xg.bind(o),o}function Xg(){let i=this[Qn];if(i.readonlyFn===void 0){let e=()=>this();e[Qn]=i,i.readonlyFn=e}return i.readonlyFn}var Ph=(()=>{class i{view;node;constructor(t,n){this.view=t,this.node=n}static __NG_ELEMENT_ID__=U5}return i})();function U5(){return new Ph(mt(),xi())}var ls=class{},Ah=new qe("",{factory:()=>!0});var a1=new qe(""),cu=(()=>{class i{internalPendingTasks=Q(Ja);scheduler=Q(ls);errorHandler=Q(ia);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})(),Yg=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new xS})}return i})(),xS=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}},wg=class{[Qn];constructor(e){this[Qn]=e}destroy(){this[Qn].destroy()}};function Yt(i,e){let t=e?.injector??Q(Di),n=e?.manualCleanup!==!0?t.get(sr):null,r,o=t.get(Ph,null,{optional:!0}),s=t.get(ls);return o!==null?(r=V5(o.view,s,i),n instanceof Sg&&n._lView===o.view&&(n=null)):r=G5(i,t.get(Yg),s),r.injector=t,n!==null&&(r.onDestroyFns=[n.onDestroy(()=>r.destroy())]),new wg(r)}var u2=ue(R({},Y_),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let i=_h(!1);try{q_(this)}finally{_h(i)}},cleanup(){if(!this.cleanupFns?.length)return;let i=lt(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],lt(i)}}}),B5=ue(R({},u2),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(sc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.scheduler.remove(this)}}),z5=ue(R({},u2),{consumerMarkedDirty(){this.view[wt]|=8192,Cc(this.view),this.notifier.notify(13)},destroy(){if(sc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.view[Ha]?.delete(this)}});function V5(i,e,t){let n=Object.create(z5);return n.view=i,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=e,n.fn=f2(n,t),i[Ha]??=new Set,i[Ha].add(n),n.consumerMarkedDirty(n),n}function G5(i,e,t){let n=Object.create(B5);return n.fn=f2(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 f2(i,e){return()=>{e(t=>(i.cleanupFns??=[]).push(t))}}var qg={JSACTION:"jsaction"};function jh(i){return{toString:i}.toString()}function K5(i){return typeof i=="function"}function tP(i,e,t,n){e!==null?e.applyValueToInputSignal(e,n):i[t]=n}var a0=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}},yu=(()=>{let i=()=>nP;return i.ngInherit=!0,i})();function nP(i){return i.type.prototype.ngOnChanges&&(i.setInput=J5),Z5}function Z5(){let i=rP(this),e=i?.current;if(e){let t=i.previous;if(t===Wa)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=rP(i)||Q5(i,{previous:Wa,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new a0(c&&c.currentValue,t,l===Wa),tP(i,e,r,t)}var iP="__ngSimpleChanges__";function rP(i){return i[iP]||null}function Q5(i,e){return i[iP]=e}var h2=[];var tn=function(i,e=null,t){for(let n=0;n<h2.length;n++){let r=h2[n];r(i,e,t)}},Wt=(function(i){return i[i.TemplateCreateStart=0]="TemplateCreateStart",i[i.TemplateCreateEnd=1]="TemplateCreateEnd",i[i.TemplateUpdateStart=2]="TemplateUpdateStart",i[i.TemplateUpdateEnd=3]="TemplateUpdateEnd",i[i.LifecycleHookStart=4]="LifecycleHookStart",i[i.LifecycleHookEnd=5]="LifecycleHookEnd",i[i.OutputStart=6]="OutputStart",i[i.OutputEnd=7]="OutputEnd",i[i.BootstrapApplicationStart=8]="BootstrapApplicationStart",i[i.BootstrapApplicationEnd=9]="BootstrapApplicationEnd",i[i.BootstrapComponentStart=10]="BootstrapComponentStart",i[i.BootstrapComponentEnd=11]="BootstrapComponentEnd",i[i.ChangeDetectionStart=12]="ChangeDetectionStart",i[i.ChangeDetectionEnd=13]="ChangeDetectionEnd",i[i.ChangeDetectionSyncStart=14]="ChangeDetectionSyncStart",i[i.ChangeDetectionSyncEnd=15]="ChangeDetectionSyncEnd",i[i.AfterRenderHooksStart=16]="AfterRenderHooksStart",i[i.AfterRenderHooksEnd=17]="AfterRenderHooksEnd",i[i.ComponentStart=18]="ComponentStart",i[i.ComponentEnd=19]="ComponentEnd",i[i.DeferBlockStateStart=20]="DeferBlockStateStart",i[i.DeferBlockStateEnd=21]="DeferBlockStateEnd",i[i.DynamicComponentStart=22]="DynamicComponentStart",i[i.DynamicComponentEnd=23]="DynamicComponentEnd",i[i.HostBindingsUpdateStart=24]="HostBindingsUpdateStart",i[i.HostBindingsUpdateEnd=25]="HostBindingsUpdateEnd",i})(Wt||{});function ez(i,e,t){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(n){let s=nP(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 oP(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 e0(i,e,t){sP(i,e,3,t)}function t0(i,e,t,n){(i[wt]&3)===t&&sP(i,e,t,n)}function l1(i,e){let t=i[wt];(t&3)===e&&(t&=16383,t+=1,i[wt]=t)}function sP(i,e,t,n){let r=n!==void 0?i[yc]&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[yc]+=65536),(a<o||o==-1)&&(tz(i,t,e,l),i[yc]=(i[yc]&4294901760)+l+2),l++}function p2(i,e){tn(Wt.LifecycleHookStart,i,e);let t=lt(null);try{e.call(i)}finally{lt(t),tn(Wt.LifecycleHookEnd,i,e)}}function tz(i,e,t,n){let r=t[n]<0,o=t[n+1],s=r?-t[n]:t[n],a=i[s];r?i[wt]>>14<i[yc]>>16&&(i[wt]&3)===e&&(i[wt]+=16384,p2(a,o)):p2(a,o)}var uu=-1,Mc=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 nz(i){return(i.flags&8)!==0}function iz(i){return(i.flags&16)!==0}function rz(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];sz(o)?i.setProperty(e,o,s):i.setAttribute(e,o,s),n++}}return n}function oz(i){return i===3||i===4||i===6}function sz(i){return i.charCodeAt(0)===64}function pu(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?m2(i,t,r,null,e[++n]):m2(i,t,r,null,null))}}return i}function m2(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 aP(i){return i!==uu}function l0(i){return i&32767}function az(i){return i>>16}function c0(i,e){let t=az(i),n=e;for(;t>0;)n=n[bc],t--;return n}var S1=!0;function d0(i){let e=S1;return S1=i,e}var lz=256,lP=lz-1,cP=5,cz=0,ps={};function dz(i,e,t){let n;typeof t=="string"?n=t.charCodeAt(0)||0:t.hasOwnProperty(vc)&&(n=t[vc]),n==null&&(n=t[vc]=cz++);let r=n&lP,o=1<<r;e.data[i+(r>>cP)]|=o}function u0(i,e){let t=dP(i,e);if(t!==-1)return t;let n=e[tt];n.firstCreatePass&&(i.injectorIndex=e.length,c1(n.data,i),c1(e,null),c1(n.blueprint,null));let r=cC(i,e),o=i.injectorIndex;if(aP(r)){let s=l0(r),a=c0(r,e),l=a[tt].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function c1(i,e){i.push(0,0,0,0,0,0,0,0,e)}function dP(i,e){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||e[i.injectorIndex+8]===null?-1:i.injectorIndex}function cC(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=mP(r),n===null)return uu;if(t++,r=r[bc],n.injectorIndex!==-1)return n.injectorIndex|t<<16}return uu}function C1(i,e,t){dz(i,e,t)}function uP(i,e,t){if(t&8||i!==void 0)return i;Ag(e,"NodeInjector")}function fP(i,e,t,n){if(t&8&&n===void 0&&(n=null),(t&3)===0){let r=i[xr],o=Bi(void 0);try{return r?r.get(e,n,t&8):IS(e,n,t&8)}finally{Bi(o)}}return uP(n,e,t)}function hP(i,e,t,n=0,r){if(i!==null){if(e[wt]&2048&&!(n&2)){let s=pz(i,e,t,n,ps);if(s!==ps)return s}let o=pP(i,e,t,n,ps);if(o!==ps)return o}return fP(e,t,n,r)}function pP(i,e,t,n,r){let o=fz(t);if(typeof o=="function"){if(!e1(e,i,n))return n&1?uP(r,t,n):fP(e,t,n,r);try{let s;if(s=o(n),s==null&&!(n&8))Ag(t);else return s}finally{t1()}}else if(typeof o=="number"){let s=null,a=dP(i,e),l=uu,c=n&1?e[ci][Gi]:null;for((a===-1||n&4)&&(l=a===-1?cC(i,e):e[a+8],l===uu||!v2(n,!1)?a=-1:(s=e[tt],a=l0(l),e=c0(l,e)));a!==-1;){let d=e[tt];if(g2(o,a,d.data)){let u=uz(a,e,t,s,n,c);if(u!==ps)return u}l=e[a+8],l!==uu&&v2(n,e[tt].data[a+8]===c)&&g2(o,a,e)?(s=d,a=l0(l),e=c0(l,e)):a=-1}}return r}function uz(i,e,t,n,r,o){let s=e[tt],a=s.data[i+8],l=n==null?fs(a)&&S1:n!=s&&(a.type&3)!==0,c=r&1&&o===a,d=n0(a,s,t,l,c);return d!==null?Fh(e,s,d,a,r):ps}function n0(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 Fh(i,e,t,n,r){let o=i[t],s=e.data;if(o instanceof Mc){let a=o;if(a.resolving)throw DS("");let l=d0(a.canSeeViewProviders);a.resolving=!0;let c=s[t].type||s[t],d,u=a.injectImpl?Bi(a.injectImpl):null,f=e1(i,n,0);try{o=i[t]=a.factory(void 0,r,s,i,n),e.firstCreatePass&&t>=n.directiveStart&&ez(t,s[t],e)}finally{u!==null&&Bi(u),d0(l),a.resolving=!1,t1()}}return o}function fz(i){if(typeof i=="string")return i.charCodeAt(0)||0;let e=i.hasOwnProperty(vc)?i[vc]:void 0;return typeof e=="number"?e>=0?e&lP:hz:e}function g2(i,e,t){let n=1<<i;return!!(t[e+(i>>cP)]&n)}function v2(i,e){return!(i&2)&&!(i&1&&e)}var Ec=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return hP(this._tNode,this._lView,e,pc(n),t)}};function hz(){return new Ec(xi(),mt())}function oa(i){return jh(()=>{let e=i.prototype.constructor,t=e[yh]||w1(e),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let o=r[yh]||w1(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function w1(i){return _S(i)?()=>{let e=w1(yi(i));return e&&e()}:Ga(i)}function pz(i,e,t,n,r){let o=i,s=e;for(;o!==null&&s!==null&&s[wt]&2048&&!Sc(s);){let a=pP(o,s,t,n|2,ps);if(a!==ps)return a;let l=o.parent;if(!l){let c=s[NS];if(c){let d=c.get(t,ps,n&-5);if(d!==ps)return d}l=mP(s),s=s[bc]}o=l}return r}function mP(i){let e=i[tt],t=e.type;return t===2?e.declTNode:t===1?i[Gi]:null}function mz(){return xu(xi(),mt())}function xu(i,e){return new Mr(to(i,e))}var Mr=(()=>{class i{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=mz}return i})();function gz(i){return i instanceof Mr?i.nativeElement:i}function vz(){return this._results[Symbol.iterator]()}var f0=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Eo}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=DI(e);(this._changesDetected=!TI(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]=vz},gP="ngSkipHydration",bz="ngskiphydration";function vP(i){let e=i.mergedAttrs;if(e===null)return!1;for(let t=0;t<e.length;t+=2){let n=e[t];if(typeof n=="number")return!1;if(typeof n=="string"&&n.toLowerCase()===bz)return!0}return!1}function bP(i){return i.hasAttribute(gP)}function h0(i){return(i.flags&128)===128}function yP(i){if(h0(i))return!0;let e=i.parent;for(;e;){if(h0(i)||vP(e))return!0;e=e.parent}return!1}var dC=(function(i){return i[i.OnPush=0]="OnPush",i[i.Eager=1]="Eager",i[i.Default=1]="Default",i})(dC||{}),xP=new Map,yz=0;function xz(){return yz++}function _z(i){xP.set(i[ea],i)}function E1(i){xP.delete(i[ea])}var b2="__ngContext__";function mu(i,e){eo(e)?(i[b2]=e[ea],_z(e)):i[b2]=e}function _P(i){return CP(i[iu])}function SP(i){return CP(i[Qr])}function CP(i){for(;i!==null&&!Sr(i);)i=i[Qr];return i}var M1;function uC(i){M1=i}function fC(){if(M1!==void 0)return M1;if(typeof document<"u")return document;throw new Ke(210,!1)}var gs=new qe("",{factory:()=>Sz}),Sz="ng";var S0=new qe(""),Wh=new qe("",{providedIn:"platform",factory:()=>"unknown"});var C0=new qe("",{factory:()=>Q(wn).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var _u=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>{let t=new i;return t.store=Cz(Q(wn),Q(gs)),t}});store={};onSerializeCallbacks={};get(t,n){return this.store[t]!==void 0?this.store[t]:n}set(t,n){this.store[t]=n}remove(t){delete this.store[t]}hasKey(t){return this.store.hasOwnProperty(t)}get isEmpty(){return Object.keys(this.store).length===0}onSerialize(t,n){this.onSerializeCallbacks[t]=n}toJson(){for(let t in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(t))try{this.store[t]=this.onSerializeCallbacks[t]()}catch(n){console.warn("Exception in onSerialize callback: ",n)}return JSON.stringify(this.store).replace(/</g,"\\u003C")}}return i})();function Cz(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 wP="h",EP="b",wz="f",Ez="n",MP="e",TP="t",w0="c",hC="x",Nh="r",DP="i",IP="n",pC="d";var PP="di",AP="s",OP="p";var $h=new qe(""),RP=!1,mC=new qe("",{factory:()=>RP});var gC=new qe(""),kP=!1,FP=new qe("",{factory:()=>[]}),NP=new qe(""),vC=new qe("",{factory:()=>new Map});var Xh="ngb";var LP=(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},UP=(i,e)=>{let t=i,n=t.getAttribute(Xh)??"",r=e.get(n)??new Set;r.has(t)||r.add(t),e.set(n,r)};var BP=i=>{i.removeAttribute(qg.JSACTION),i.removeAttribute(Xh),i.__jsaction_fns=void 0},zP=new qe("",{factory:()=>({})});function bC(i,e){let t=e?.__jsaction_fns?.get(i.type);if(!(!t||!e?.isConnected))for(let n of t)n(i)}var T1=new Map;function VP(i,e){return T1.set(i,e),()=>T1.delete(i)}var y2=!1,GP=(i,e,t,n)=>{};function Mz(i,e,t,n){GP(i,e,t,n)}function HP(){y2||(GP=(i,e,t,n)=>{let r=i[xr].get(gs);T1.get(r)?.(e,t,n)},y2=!0)}var E0=new qe("");function Yh(i){return(i.flags&32)===32}var Tz="__nghData__",yC=Tz,Dz="__nghDeferData__",jP=Dz;var i0="ngh",WP="nghm",$P=()=>null;function Iz(i,e,t=!1){let n=i.getAttribute(i0);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(_u,null,{optional:!0});d!==null&&(l=d.get(yC,[])[Number(n)])}let c={data:l,firstChild:i.firstChild??null};return t&&(c.firstChild=i,M0(c,0,i.nextSibling)),a?i.setAttribute(i0,a):i.removeAttribute(i0),c}function XP(){$P=Iz}function YP(i,e,t=!1){return $P(i,e,t)}function qP(i){let e=i._lView;return e[tt].type===2?null:(Sc(e)&&(e=e[Xt]),e)}function Pz(i){return i.textContent?.replace(/\s/gm,"")}function Az(i){let e=fC(),t=e.createNodeIterator(i,NodeFilter.SHOW_COMMENT,{acceptNode(o){let s=Pz(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 M0(i,e,t){i.segmentHeads??={},i.segmentHeads[e]=t}function D1(i,e){return i.segmentHeads?.[e]??null}function KP(i){return i.get(NP,!1,{optional:!0})}function Oz(i,e){let t=i.data,n=t[MP]?.[e]??null;return n===null&&t[w0]?.[e]&&(n=xC(i,e)),n}function ZP(i,e){return i.data[w0]?.[e]??null}function xC(i,e){let t=ZP(i,e)??[],n=0;for(let r of t)n+=r[Nh]*(r[hC]??1);return n}function Rz(i){if(typeof i.disconnectedNodes>"u"){let e=i.data[pC];i.disconnectedNodes=e?new Set(e):null}return i.disconnectedNodes}function JP(i,e){if(typeof i.disconnectedNodes>"u"){let t=i.data[pC];i.disconnectedNodes=t?new Set(t):null}return!!Rz(i)?.has(e)}function T0(i,e){let t=i[Hi];return t!==null&&!Vg()&&!Yh(e)&&!JP(t,e.index-Xt)}function kz(i,e){let t=e.get(E0),r=e.get(_u).get(jP,{}),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][OP]}return{parentBlockPromise:a,hydrationQueue:l}}function d1(i){return!!i&&i.nodeType===Node.COMMENT_NODE&&i.textContent?.trim()===WP}function x2(i){for(;i&&i.nodeType===Node.TEXT_NODE;)i=i.previousSibling;return i}function QP(i){for(let n of i.body.childNodes)if(d1(n))return;let e=x2(i.body.previousSibling);if(d1(e))return;let t=x2(i.head.lastChild);if(!d1(t))throw new Ke(-507,!1)}function eA(i,e){let t=i.contentQueries;if(t!==null){let n=lt(null);try{for(let r=0;r<t.length;r+=2){let o=t[r],s=t[r+1];if(s!==-1){let a=i.data[s];Hg(o),a.contentQueries(2,e[s],s)}}}finally{lt(n)}}}function I1(i,e,t){Hg(0);let n=lt(null);try{e(i,t)}finally{lt(n)}}function _C(i,e,t){if(LS(e)){let n=lt(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;s<o;s++){let a=i.data[s];if(a.contentQueries){let l=t[s];a.contentQueries(1,l,s)}}}finally{lt(n)}}}var Po=(function(i){return i[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",i[i.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",i})(Po||{});var Kg;function Fz(){if(Kg===void 0&&(Kg=null,Jr.trustedTypes))try{Kg=Jr.trustedTypes.createPolicy("angular",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Kg}function D0(i){return Fz()?.createHTML(i)||i}var Zg;function Nz(){if(Zg===void 0&&(Zg=null,Jr.trustedTypes))try{Zg=Jr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Zg}function _2(i){return Nz()?.createHTML(i)||i}var ra=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Eg})`}},P1=class extends ra{getTypeName(){return"HTML"}},A1=class extends ra{getTypeName(){return"Style"}},O1=class extends ra{getTypeName(){return"Script"}},R1=class extends ra{getTypeName(){return"URL"}},k1=class extends ra{getTypeName(){return"ResourceURL"}};function Ao(i){return i instanceof ra?i.changingThisBreaksApplicationSecurity:i}function sa(i,e){let t=tA(i);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${Eg})`)}return t===e}function tA(i){return i instanceof ra&&i.getTypeName()||null}function SC(i){return new P1(i)}function CC(i){return new A1(i)}function wC(i){return new O1(i)}function EC(i){return new R1(i)}function MC(i){return new k1(i)}function Lz(i){let e=new N1(i);return Uz()?new F1(e):e}var F1=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(D0(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},N1=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=D0(e),t}};function Uz(){try{return!!new window.DOMParser().parseFromString(D0(""),"text/html")}catch{return!1}}var Bz=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function qh(i){return i=String(i),i.match(Bz)?i:"unsafe:"+i}function aa(i){let e={};for(let t of i.split(","))e[t]=!0;return e}function Kh(...i){let e={};for(let t of i)for(let n in t)t.hasOwnProperty(n)&&(e[n]=!0);return e}var nA=aa("area,br,col,hr,img,wbr"),iA=aa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),rA=aa("rp,rt"),zz=Kh(rA,iA),Vz=Kh(iA,aa("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")),Gz=Kh(rA,aa("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")),S2=Kh(nA,Vz,Gz,zz),oA=aa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Hz=aa("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"),jz=aa("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"),Wz=Kh(oA,Hz,jz),$z=aa("script,style,template");var L1=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=qz(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=Yz(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=C2(e).toLowerCase();if(!S2.hasOwnProperty(t))return this.sanitizedSomething=!0,!$z.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(!Wz.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;oA[a]&&(l=qh(l)),this.buf.push(" ",s,'="',w2(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=C2(e).toLowerCase();S2.hasOwnProperty(t)&&!nA.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(w2(e))}};function Xz(i,e){return(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function Yz(i){let e=i.nextSibling;if(e&&i!==e.previousSibling)throw sA(e);return e}function qz(i){let e=i.firstChild;if(e&&Xz(i,e))throw sA(e);return e}function C2(i){let e=i.nodeName;return typeof e=="string"?e:"FORM"}function sA(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var Kz=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Zz=/([^\#-~ |!])/g;function w2(i){return i.replace(/&/g,"&amp;").replace(Kz,function(e){let t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((t-55296)*1024+(n-56320)+65536)+";"}).replace(Zz,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Jg;function I0(i,e){let t=null;try{Jg=Jg||Lz(i);let n=e?String(e):"";t=Jg.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=Jg.getInertBodyElement(n)}while(n!==o);let a=new L1().sanitizeChildren(E2(t)||t);return D0(a)}finally{if(t){let n=E2(t)||t;for(;n.firstChild;)n.firstChild.remove()}}}function E2(i){return"content"in i&&Jz(i)?i.content:null}function Jz(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var Qz=/^>|^->|<!--|-->|--!>|<!-$/g,eV=/(<|>)/g,tV="\u200B$1\u200B";function nV(i){return i.replace(Qz,e=>e.replace(eV,tV))}function aA(i,e){return i.createText(e)}function iV(i,e,t){i.setValue(e,t)}function lA(i,e){return i.createComment(nV(e))}function TC(i,e,t){return i.createElement(e,t)}function p0(i,e,t,n,r){i.insertBefore(e,t,n,r)}function cA(i,e,t){i.appendChild(e,t)}function M2(i,e,t,n,r){n!==null?p0(i,e,t,n,r):cA(i,e,t)}function DC(i,e,t,n){i.removeChild(null,e,t,n)}function dA(i){i.textContent=""}function rV(i,e,t){i.setAttribute(e,"style",t)}function oV(i,e,t){t===""?i.removeAttribute(e,"class"):i.setAttribute(e,"class",t)}function uA(i,e,t){let{mergedAttrs:n,classes:r,styles:o}=t;n!==null&&rz(i,e,n),r!==null&&oV(i,e,r),o!==null&&rV(i,e,o)}var Oo=(function(i){return i[i.NONE=0]="NONE",i[i.HTML=1]="HTML",i[i.STYLE=2]="STYLE",i[i.SCRIPT=3]="SCRIPT",i[i.URL=4]="URL",i[i.RESOURCE_URL=5]="RESOURCE_URL",i})(Oo||{});function P0(i){let e=fA();return e?_2(e.sanitize(Oo.HTML,i)||""):sa(i,"HTML")?_2(Ao(i)):I0(fC(),wh(i))}function ji(i){let e=fA();return e?e.sanitize(Oo.URL,i)||"":sa(i,"URL")?Ao(i):qh(wh(i))}function fA(){let i=mt();return i&&i[Mo].sanitizer}function IC(i){return i.ownerDocument.defaultView}function PC(i){return i.ownerDocument}function hA(i){return i.ownerDocument.body}function sV(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 pA="ng-template";function aV(i,e,t,n){let r=0;if(n){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&sV(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(AC(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 AC(i){return i.type===4&&i.value!==pA}function lV(i,e,t){let n=i.type===4&&!t?pA:i.value;return e===n}function cV(i,e,t){let n=4,r=i.attrs,o=r!==null?fV(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!Do(n)&&!Do(l))return!1;if(s&&Do(l))continue;s=!1,n=l|n&1;continue}if(!s)if(n&4){if(n=2|n&1,l!==""&&!lV(i,l,t)||l===""&&e.length===1){if(Do(n))return!1;s=!0}}else if(n&8){if(r===null||!aV(i,r,l,t)){if(Do(n))return!1;s=!0}}else{let c=e[++a],d=dV(l,r,AC(i),t);if(d===-1){if(Do(n))return!1;s=!0;continue}if(c!==""){let u;if(d>o?u="":u=r[d+1].toLowerCase(),n&2&&c!==u){if(Do(n))return!1;s=!0}}}}return Do(n)||s}function Do(i){return(i&1)===0}function dV(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 hV(e,i)}function mA(i,e,t=!1){for(let n=0;n<e.length;n++)if(cV(i,e[n],t))return!0;return!1}function uV(i){let e=i.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function fV(i){for(let e=0;e<i.length;e++){let t=i[e];if(oz(t))return e}return i.length}function hV(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 pV(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 T2(i,e){return i?":not("+e.trim()+")":e}function mV(i){let e=i[0],t=1,n=2,r="",o=!1;for(;t<i.length;){let s=i[t];if(typeof s=="string")if(n&2){let a=i[++t];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else n&8?r+="."+s:n&4&&(r+=" "+s);else r!==""&&!Do(s)&&(e+=T2(o,r),r=""),n=s,o=o||!Do(n);t++}return r!==""&&(e+=T2(o,r)),e}function gV(i){return i.map(mV).join(",")}function vV(i){let e=[],t=[],n=1,r=2;for(;n<i.length;){let o=i[n];if(typeof o=="string")r===2?o!==""&&e.push(o,i[++n]):r===8&&t.push(o);else{if(!Do(r))break;r=o}n++}return t.length&&e.push(1,...t),e}var Tr={};function OC(i,e,t,n,r,o,s,a,l,c,d){let u=Xt+n,f=u+r,h=bV(u,f),p=typeof c=="function"?c():c;return h[tt]={type:i,blueprint:h,template:t,queries:null,viewQuery:a,declTNode:e,data:h.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:p,incompleteFirstPass:!1,ssrId:d}}function bV(i,e){let t=[];for(let n=0;n<e;n++)t.push(n<i?null:Tr);return t}function yV(i){let e=i.tView;return e===null||e.incompleteFirstPass?i.tView=OC(1,null,i.template,i.decls,i.vars,i.directiveDefs,i.pipeDefs,i.viewQuery,i.schemas,i.consts,i.id):e}function RC(i,e,t,n,r,o,s,a,l,c,d){let u=e.blueprint.slice();return u[Vi]=r,u[wt]=n|4|128|8|64|1024,(c!==null||i&&i[wt]&2048)&&(u[wt]|=2048),VS(u),u[Vn]=u[bc]=i,u[kn]=t,u[Mo]=s||i&&i[Mo],u[Zt]=a||i&&i[Zt],u[xr]=l||i&&i[xr]||null,u[Gi]=o,u[ea]=xz(),u[Hi]=d,u[NS]=c,u[ci]=e.type==2?i[ci]:u,u}function xV(i,e,t){let n=to(e,i),r=yV(t),o=i[Mo].rendererFactory,s=kC(i,RC(i,r,null,gA(t),n,e,null,o.createRenderer(n,t),null,null,null));return i[e.index]=s}function gA(i){let e=16;return i.signals?e=4096:i.onPush&&(e=64),e}function vA(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 kC(i,e){return i[iu]?i[FS][Qr]=e:i[iu]=e,i[FS]=e,e}function P(i=1){bA(In(),mt(),ta()+i,!1)}function bA(i,e,t,n){if(!n)if((e[wt]&3)===3){let o=i.preOrderCheckHooks;o!==null&&e0(e,o,t)}else{let o=i.preOrderHooks;o!==null&&t0(e,o,0,t)}Ka(t)}var A0=(function(i){return i[i.None=0]="None",i[i.SignalBased=1]="SignalBased",i[i.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",i})(A0||{});function U1(i,e,t,n){let r=lt(null);try{let[o,s,a]=i.inputs[t],l=null;(s&A0.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):tP(e,l,o,n)}finally{lt(r)}}var ms=(function(i){return i[i.Important=1]="Important",i[i.DashCase=2]="DashCase",i})(ms||{}),_V;function FC(i,e){return _V(i,e)}var tfe=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var B1=new WeakMap,z1=new WeakSet;function SV(i,e){let t=B1.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),z1.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 CV(i,e){let t=B1.get(i);t?t.includes(e)||t.push(e):B1.set(i,[e])}var Tc=new Set,O0=(function(i){return i[i.CHANGE_DETECTION=0]="CHANGE_DETECTION",i[i.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",i})(O0||{}),vs=new qe(""),D2=new Set;function Ro(i){D2.has(i)||(D2.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}var NC=(()=>{class i{impl=null;execute(){this.impl?.execute()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),yA=[0,1,2,3],xA=(()=>{class i{ngZone=Q(or);scheduler=Q(ls);errorHandler=Q(Zr,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){Q(vs,{optional:!0})}execute(){let t=this.sequences.size>0;t&&tn(Wt.AfterRenderHooksStart),this.executing=!0;for(let n of yA)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[n]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[n];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),t&&tn(Wt.AfterRenderHooksEnd)}register(t){let{view:n}=t;n!==void 0?((n[xc]??=[]).push(t),Cc(n),n[wt]|=8192):this.executing?this.deferredRegistrations.add(t):this.addSequence(t)}addSequence(t){this.sequences.add(t),this.scheduler.notify(7)}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}maybeTrace(t,n){return n?n.run(O0.AFTER_NEXT_RENDER,t):t()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),m0=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?.[xc];e&&(this.view[xc]=e.filter(t=>t!==this))}};function R0(i,e){let t=e?.injector??Q(Di);return Ro("NgAfterNextRender"),EV(i,t,e,!0)}function wV(i){return i instanceof Function?[void 0,void 0,i,void 0]:[i.earlyRead,i.write,i.mixedReadWrite,i.read]}function EV(i,e,t,n){let r=e.get(NC);r.impl??=e.get(xA);let o=e.get(vs,null,{optional:!0}),s=t?.manualCleanup!==!0?e.get(sr):null,a=e.get(Ph,null,{optional:!0}),l=new m0(r.impl,wV(i),a?.view,n,s,o?.snapshot(null));return r.impl.register(l),l}var _A=new qe("",{factory:()=>({queue:new Set,isScheduled:!1,scheduler:null,injector:Q(Ti)})});function SA(i,e,t){let n=i.get(_A);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 MV(i,e){let t=i.get(_A);if(e.detachedLeaveAnimationFns){for(let n of e.detachedLeaveAnimationFns)t.queue.delete(n);e.detachedLeaveAnimationFns=void 0}}function TV(i,e){for(let[t,n]of e)SA(i,n.animateFns)}function I2(i,e,t,n){let r=i?.[Xa]?.enter;e!==null&&r&&r.has(t.index)&&TV(n,r)}function du(i,e,t,n,r,o,s,a){if(r!=null){let l,c=!1;Sr(r)?l=r:eo(r)&&(c=!0,r=r[Vi]);let d=Cr(r);i===0&&n!==null?(I2(a,n,o,t),s==null?cA(e,n,d):p0(e,n,d,s||null,!0)):i===1&&n!==null?(I2(a,n,o,t),p0(e,n,d,s||null,!0),SV(o,d)):i===2?(a?.[Xa]?.leave?.has(o.index)&&CV(o,d),P2(a,o,t,u=>{if(z1.has(d)){z1.delete(d);return}DC(e,d,c,u)})):i===3&&P2(a,o,t,()=>{e.destroyNode(d)}),l!=null&&UV(e,i,t,l,o,n,s)}}function DV(i,e){CA(i,e),e[Vi]=null,e[Gi]=null}function IV(i,e,t,n,r,o){n[Vi]=r,n[Gi]=e,F0(i,n,t,1,r,o)}function CA(i,e){e[Mo].changeDetectionScheduler?.notify(9),F0(i,e,e[Zt],2,null,null)}function PV(i){let e=i[iu];if(!e)return u1(i[tt],i);for(;e;){let t=null;if(eo(e))t=e[iu];else{let n=e[Dn];n&&(t=n)}if(!t){for(;e&&!e[Qr]&&e!==i;)eo(e)&&u1(e[tt],e),e=e[Vn];e===null&&(e=i),eo(e)&&u1(e[tt],e),t=e&&e[Qr]}e=t}}function LC(i,e){let t=i[_c],n=t.indexOf(e);t.splice(n,1)}function k0(i,e){if(Ya(e))return;let t=e[Zt];t.destroyNode&&F0(i,e,t,3,null,null),PV(e)}function u1(i,e){if(Ya(e))return;let t=lt(null);try{e[wt]&=-129,e[wt]|=256,e[_r]&&sc(e[_r]),RV(i,e),OV(i,e),e[tt].type===1&&e[Zt].destroy();let n=e[$a];if(n!==null&&Sr(e[Vn])){n!==e[Vn]&&LC(n,e);let r=e[ds];r!==null&&r.detachView(i)}E1(e)}finally{lt(t)}}function P2(i,e,t,n){let r=i?.[Xa];if(r==null||r.leave==null||!r.leave.has(e.index))return n(!1);i&&Tc.add(i[ea]),SA(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),AV(i,n)}else i&&Tc.delete(i[ea]),n(!1)},r)}function AV(i,e){let t=i[Xa]?.running;if(t){t.then(()=>{i[Xa].running=void 0,Tc.delete(i[ea]),e(!0)});return}e(!1)}function OV(i,e){let t=i.cleanup,n=e[nu];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[nu]=null);let r=e[qs];if(r!==null){e[qs]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=e[Ha];if(o!==null){e[Ha]=null;for(let s of o)s.destroy()}}function RV(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 Mc)){let o=t[n+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];tn(Wt.LifecycleHookStart,a,l);try{l.call(a)}finally{tn(Wt.LifecycleHookEnd,a,l)}}else{tn(Wt.LifecycleHookStart,r,o);try{o.call(r)}finally{tn(Wt.LifecycleHookEnd,r,o)}}}}}function wA(i,e,t){return kV(i,e.parent,t)}function kV(i,e,t){let n=e;for(;n!==null&&n.type&168;)e=n,n=e.parent;if(n===null)return t[Vi];if(fs(n)){let{encapsulation:r}=i.data[n.directiveStart+n.componentOffset];if(r===Po.None||r===Po.Emulated)return null}return to(n,t)}function EA(i,e,t){return NV(i,e,t)}function FV(i,e,t){return i.type&40?to(i,t):null}var NV=FV,A2;function UC(i,e,t,n){let r=wA(i,n,e),o=e[Zt],s=n.parent||e[Gi],a=EA(s,n,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)M2(o,r,t[l],a,!1);else M2(o,r,t,a,!1);A2!==void 0&&A2(o,n,e,t,r)}function Rh(i,e){if(e!==null){let t=e.type;if(t&3)return to(e,i);if(t&4)return V1(-1,i[e.index]);if(t&8){let n=e.child;if(n!==null)return Rh(i,n);{let r=i[e.index];return Sr(r)?V1(-1,r):Cr(r)}}else{if(t&128)return Rh(i,e.next);if(t&32)return FC(e,i)()||Cr(i[e.index]);{let n=MA(i,e);if(n!==null){if(Array.isArray(n))return n[0];let r=ja(i[ci]);return Rh(r,n)}else return Rh(i,e.next)}}}return null}function MA(i,e){if(e!==null){let n=i[ci][Gi],r=e.projection;return n.projection[r]}return null}function V1(i,e){let t=Dn+i+1;if(t<e.length){let n=e[t],r=n[tt].firstChild;if(r!==null)return Rh(n,r)}return e[us]}function BC(i,e,t,n,r,o,s){for(;t!=null;){let a=n[xr];if(t.type===128){t=t.next;continue}let l=n[t.index],c=t.type;if(s&&e===0&&(l&&mu(Cr(l),n),t.flags|=2),!Yh(t))if(c&8)BC(i,e,t.child,n,r,o,!1),du(e,i,a,r,l,t,o,n);else if(c&32){let d=FC(t,n),u;for(;u=d();)du(e,i,a,r,u,t,o,n);du(e,i,a,r,l,t,o,n)}else c&16?TA(i,e,n,t,r,o):du(e,i,a,r,l,t,o,n);t=s?t.projectionNext:t.next}}function F0(i,e,t,n,r,o){BC(t,n,i.firstChild,e,r,o,!1)}function LV(i,e,t){let n=e[Zt],r=wA(i,t,e),o=t.parent||e[Gi],s=EA(o,t,e);TA(n,0,e,t,r,s)}function TA(i,e,t,n,r,o){let s=t[ci],l=s[Gi].projection[n.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];du(e,i,t[xr],r,d,n,o,t)}else{let c=l,d=s[Vn];h0(n)&&(c.flags|=128),BC(i,e,c,d,r,o,!0)}}function UV(i,e,t,n,r,o,s){let a=n[us],l=Cr(n);a!==l&&du(e,i,t,o,a,r,s);for(let c=Dn;c<n.length;c++){let d=n[c];F0(d[tt],d,i,e,o,a)}}function BV(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 DA(i,e,t,n,r){let o=ta(),s=n&2;try{Ka(-1),s&&e.length>Xt&&bA(i,e,Xt,!1);let a=s?Wt.TemplateUpdateStart:Wt.TemplateCreateStart;tn(a,r,t),t(n,r)}finally{Ka(o);let a=s?Wt.TemplateUpdateEnd:Wt.TemplateCreateEnd;tn(a,r,t)}}function N0(i,e,t){WV(i,e,t),(t.flags&64)===64&&$V(i,e,t)}function Zh(i,e,t=to){let n=e.localNames;if(n!==null){let r=e.index+1;for(let o=0;o<n.length;o+=2){let s=n[o+1],a=s===-1?t(e,i):i[s];i[r++]=a}}}function zV(i,e,t,n){let o=n.get(mC,RP)||t===Po.ShadowDom||t===Po.ExperimentalIsolatedShadowDom,s=i.selectRootElement(e,o);return VV(s),s}function VV(i){IA(i)}var IA=()=>null;function GV(i){bP(i)?dA(i):Az(i)}function PA(){IA=GV}function HV(i){return i==="class"?"className":i==="for"?"htmlFor":i==="formaction"?"formAction":i==="innerHtml"?"innerHTML":i==="readonly"?"readOnly":i==="tabindex"?"tabIndex":i}function AA(i,e,t,n,r,o){let s=e[tt];if(jC(i,s,e,t,n)){fs(i)&&jV(e,i.index);return}i.type&3&&(t=HV(t)),OA(i,e,t,n,r,o)}function OA(i,e,t,n,r,o){if(i.type&3){let s=to(i,e);n=o!=null?o(n,i.value||"",t):n,r.setProperty(s,t,n)}else i.type&12}function jV(i,e){let t=no(e,i);t[wt]&16||(t[wt]|=64)}function WV(i,e,t){let n=t.directiveStart,r=t.directiveEnd;fs(t)&&xV(e,t,i.data[n+t.componentOffset]),i.firstCreatePass||u0(t,e);let o=t.initialInputs;for(let s=n;s<r;s++){let a=i.data[s],l=Fh(e,i,s,t);if(mu(l,e),o!==null&&KV(e,s-n,l,a,t,o),hs(a)){let c=no(t.index,e);c[kn]=Fh(e,i,s,t)}}}function $V(i,e,t){let n=t.directiveStart,r=t.directiveEnd,o=t.index,s=ZI();try{Ka(o);for(let a=n;a<r;a++){let l=i.data[a],c=e[a];Gg(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&XV(l,c)}}finally{Ka(-1),Gg(s)}}function XV(i,e){i.hostBindings!==null&&i.hostBindings(1,e)}function zC(i,e){let t=i.directiveRegistry,n=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];mA(e,o.selectors,!1)&&(n??=[],hs(o)?n.unshift(o):n.push(o))}return n}function YV(i,e,t,n,r,o){let s=to(i,e);qV(e[Zt],s,o,i.value,t,n,r)}function qV(i,e,t,n,r,o,s){if(o==null)i.removeAttribute(e,r,t);else{let a=s==null?wh(o):s(o,n||"",r);i.setAttribute(e,r,a,t)}}function KV(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];U1(n,t,l,c)}}function VC(i,e,t,n,r){let o=Xt+t,s=e[tt],a=r(s,e,i,n,t);e[o]=a,su(i,!0);let l=i.type===2;return l?(uA(e[Zt],a,i),(HI()===0||ru(i))&&mu(a,e),jI()):mu(a,e),$g()&&(!l||!Yh(i))&&UC(s,e,a,i),i}function GC(i){let e=i;return KS()?ZS():(e=e.parent,su(e,!1)),e}function HC(i,e){let t=i[xr];if(!t)return;let n;try{n=t.get(ia,null)}catch{n=null}n?.(e)}function jC(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];U1(u,t[c],d,r),a=!0}if(o)for(let l of o){let c=t[l],d=e.data[l];U1(d,c,n,r),a=!0}return a}function ZV(i,e){let t=no(e,i),n=t[tt];JV(n,t);let r=t[Vi];r!==null&&t[Hi]===null&&(t[Hi]=YP(r,t[xr])),tn(Wt.ComponentStart);try{WC(n,t,t[kn])}finally{tn(Wt.ComponentEnd,t[kn])}}function JV(i,e){for(let t=e.length;t<i.blueprint.length;t++)e.push(i.blueprint[t])}function WC(i,e,t){jg(e);try{let n=i.viewQuery;n!==null&&I1(1,n,t);let r=i.template;r!==null&&DA(i,e,r,1,t),i.firstCreatePass&&(i.firstCreatePass=!1),e[ds]?.finishViewCreation(i),i.staticContentQueries&&eA(i,e),i.staticViewQueries&&I1(2,i.viewQuery,t);let o=i.components;o!==null&&QV(e,o)}catch(n){throw i.firstCreatePass&&(i.incompleteFirstPass=!0,i.firstCreatePass=!1),n}finally{e[wt]&=-5,Wg()}}function QV(i,e){for(let t=0;t<e.length;t++)ZV(i,e[t])}function Su(i,e,t,n){let r=lt(null);try{let o=e.tView,a=i[wt]&4096?4096:16,l=RC(i,o,t,a,null,e,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),c=i[e.index];l[$a]=c;let d=i[ds];return d!==null&&(l[ds]=d.createEmbeddedView(o)),WC(o,l,t),l}finally{lt(r)}}function Dc(i,e){return!e||e.firstChild===null||h0(i)}function Lh(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(Cr(o)),Sr(o)&&RA(o,n);let s=t.type;if(s&8)Lh(i,e,t.child,n);else if(s&32){let a=FC(t,e),l;for(;l=a();)n.push(l)}else if(s&16){let a=MA(e,t);if(Array.isArray(a))n.push(...a);else{let l=ja(e[ci]);Lh(l[tt],l,a,n,!0)}}t=r?t.projectionNext:t.next}return n}function RA(i,e){for(let t=Dn;t<i.length;t++){let n=i[t],r=n[tt].firstChild;r!==null&&Lh(n[tt],n,r,e)}i[us]!==i[Vi]&&e.push(i[us])}function kA(i){if(i[xc]!==null){for(let e of i[xc])e.impl.addSequence(e);i[xc].length=0}}var FA=[];function eG(i){return i[_r]??tG(i)}function tG(i){let e=FA.pop()??Object.create(iG);return e.lView=i,e}function nG(i){i.lView[_r]!==i&&(i.lView=null,FA.push(i))}var iG=ue(R({},ic),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{Cc(i.lView)},consumerOnSignalRead(){this.lView[_r]=this}});function rG(i){let e=i[_r]??Object.create(oG);return e.lView=i,e}var oG=ue(R({},ic),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{let e=ja(i.lView);for(;e&&!NA(e[tt]);)e=ja(e);e&&GS(e)},consumerOnSignalRead(){this.lView[_r]=this}});function NA(i){return i.type!==2}function LA(i){if(i[Ha]===null)return;let e=!0;for(;e;){let t=!1;for(let n of i[Ha])n.dirty&&(t=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));e=t&&!!(i[wt]&8192)}}var sG=100;function UA(i,e=0){let n=i[Mo].rendererFactory,r=!1;r||n.begin?.();try{aG(i,e)}finally{r||n.end?.()}}function aG(i,e){let t=JS();try{_h(!0),G1(i,e);let n=0;for(;Dh(i);){if(n===sG)throw new Ke(103,!1);n++,G1(i,1)}}finally{_h(t)}}function lG(i,e,t,n){if(Ya(e))return;let r=e[wt],o=!1,s=!1;jg(e);let a=!0,l=null,c=null;o||(NA(i)?(c=eG(e),l=oc(c)):Ym()===null?(a=!1,c=rG(e),l=oc(c)):e[_r]&&(sc(e[_r]),e[_r]=null));try{VS(e),YI(i.bindingStartIndex),t!==null&&DA(i,e,t,2,n);let d=(r&3)===3;if(!o)if(d){let h=i.preOrderCheckHooks;h!==null&&e0(e,h,null)}else{let h=i.preOrderHooks;h!==null&&t0(e,h,0,null),l1(e,0)}if(s||cG(e),LA(e),BA(e,0),i.contentQueries!==null&&eA(i,e),!o)if(d){let h=i.contentCheckHooks;h!==null&&e0(e,h)}else{let h=i.contentHooks;h!==null&&t0(e,h,1),l1(e,1)}uG(i,e);let u=i.components;u!==null&&VA(e,u,0);let f=i.viewQuery;if(f!==null&&I1(2,f,n),!o)if(d){let h=i.viewCheckHooks;h!==null&&e0(e,h)}else{let h=i.viewHooks;h!==null&&t0(e,h,2),l1(e,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),e[Ng]){for(let h of e[Ng])h();e[Ng]=null}o||(kA(e),e[wt]&=-73)}catch(d){throw o||Cc(e),d}finally{c!==null&&(Wd(c,l),a&&nG(c)),Wg()}}function BA(i,e){for(let t=_P(i);t!==null;t=SP(t))for(let n=Dn;n<t.length;n++){let r=t[n];zA(r,e)}}function cG(i){for(let e=_P(i);e!==null;e=SP(e)){if(!(e[wt]&2))continue;let t=e[_c];for(let n=0;n<t.length;n++){let r=t[n];GS(r)}}}function dG(i,e,t){tn(Wt.ComponentStart);let n=no(e,i);try{zA(n,t)}finally{tn(Wt.ComponentEnd,n[kn])}}function zA(i,e){Ug(i)&&G1(i,e)}function G1(i,e){let n=i[tt],r=i[wt],o=i[_r],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&fh(o)),s||=!1,o&&(o.dirty=!1),i[wt]&=-9217,s)lG(n,i,n.template,i[kn]);else if(r&8192){let a=lt(null);try{LA(i),BA(i,1);let l=n.components;l!==null&&VA(i,l,1),kA(i)}finally{lt(a)}}}function VA(i,e,t){for(let n=0;n<e.length;n++)dG(i,e[n],t)}function uG(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)Ka(~r);else{let o=r,s=t[++n],a=t[++n];KI(s,o);let l=e[o];tn(Wt.HostBindingsUpdateStart,l);try{a(2,l)}finally{tn(Wt.HostBindingsUpdateEnd,l)}}}}finally{Ka(-1)}}function L0(i,e){let t=JS()?64:1088;for(i[Mo].changeDetectionScheduler?.notify(e);i;){i[wt]|=t;let n=ja(i);if(Sc(i)&&!n)return i;i=n}return null}function GA(i,e,t,n){return[i,!0,0,e,null,n,null,t,null,null]}function HA(i,e){let t=Dn+e;if(t<i.length)return i[t]}function Cu(i,e,t,n=!0){let r=e[tt];if(fG(r,e,i,t),n){let s=V1(t,i),a=e[Zt],l=a.parentNode(i[us]);l!==null&&IV(r,i[Gi],a,e,l,s)}let o=e[Hi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function $C(i,e){let t=Uh(i,e);return t!==void 0&&k0(t[tt],t),t}function Uh(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t];if(n){let r=n[$a];r!==null&&r!==i&&LC(r,n),e>0&&(i[t-1][Qr]=n[Qr]);let o=Eh(i,Dn+e);DV(n[tt],n);let s=o[ds];s!==null&&s.detachView(o[tt]),n[Vn]=null,n[Qr]=null,n[wt]&=-129}return n}function fG(i,e,t,n){let r=Dn+n,o=t.length;n>0&&(t[r-1][Qr]=e),n<o-Dn?(e[Qr]=t[r],PS(t,Dn+n,e)):(t.push(e),e[Qr]=null),e[Vn]=t;let s=e[$a];s!==null&&t!==s&&jA(s,e);let a=e[ds];a!==null&&a.insertView(i),Bg(e),e[wt]|=128}function jA(i,e){let t=i[_c],n=e[Vn];if(eo(n))i[wt]|=2;else{let r=n[Vn][ci];e[ci]!==r&&(i[wt]|=2)}t===null?i[_c]=[e]:t.push(e)}var Qa=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[tt];return Lh(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 Ya(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Vn];if(Sr(e)){let t=e[Th],n=t?t.indexOf(this):-1;n>-1&&(Uh(e,n),Eh(t,n))}this._attachedToViewContainer=!1}k0(this._lView[tt],this._lView)}onDestroy(e){HS(this._lView,e)}markForCheck(){L0(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[wt]&=-129}reattach(){Bg(this._lView),this._lView[wt]|=128}detectChanges(){this._lView[wt]|=1024,UA(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ke(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Sc(this._lView),t=this._lView[$a];t!==null&&!e&&LC(t,this._lView),CA(this._lView[tt],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Ke(902,!1);this._appRef=e;let t=Sc(this._lView),n=this._lView[$a];n!==null&&!t&&jA(n,this._lView),Bg(this._lView)}};var gu=(()=>{class i{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=hG;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=Su(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new Qa(o)}}return i})();function hG(){return U0(xi(),mt())}function U0(i,e){return i.type&4?new gu(e,i,xu(i,e)):null}function wu(i,e,t,n,r){let o=i.data[e];if(o===null)o=pG(i,e,t,n,r),qI()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=n,o.attrs=r;let s=$I();o.injectorIndex=s===null?-1:s.injectorIndex}return su(o,!0),o}function pG(i,e,t,n,r){let o=qS(),s=KS(),a=s?o:o&&o.parent,l=i.data[e]=gG(i,a,t,e,n,r);return mG(i,l,o,s),l}function mG(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 gG(i,e,t,n,r,o){let s=e?e.injectorIndex:-1,a=0;return Vg()&&(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 vG=new RegExp(`^(\\d+)*(${EP}|${wP})*(.*)`);function bG(i){let e=i.match(vG),[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 yG(i){return!i.prev&&i.parent?.type===8}function f1(i){return i.index-Xt}function xG(i,e){let t=i.i18nNodes;if(t)return t.get(e)}function B0(i,e,t,n){let r=f1(n),o=xG(i,r);if(o===void 0){let s=i.data[IP];if(s?.[r])o=SG(s[r],t);else if(e.firstChild===n)o=i.firstChild;else{let a=n.prev===null,l=n.prev??n.parent;if(yG(n)){let c=f1(n.parent);o=D1(i,c)}else{let c=to(l,t);if(a)o=c.firstChild;else{let d=f1(l),u=D1(i,d);if(l.type===2&&u){let h=xC(i,d)+1;o=z0(h,u)}else o=c.nextSibling}}}}return o}function z0(i,e){let t=e;for(let n=0;n<i;n++)t=t.nextSibling;return t}function _G(i,e){let t=i;for(let n=0;n<e.length;n+=2){let r=e[n],o=e[n+1];for(let s=0;s<o;s++)switch(r){case wz:t=t.firstChild;break;case Ez:t=t.nextSibling;break}}return t}function SG(i,e){let[t,...n]=bG(i),r;if(t===wP)r=e[ci][Vi];else if(t===EP)r=hA(e[ci][Vi]);else{let o=Number(t);r=Cr(e[o+Xt])}return _G(r,n)}var CG=!1;function WA(i){CG=i}function wG(i){let e=i[Hi];if(e){let{i18nNodes:t,dehydratedIcuData:n}=e;if(t&&n){let r=i[Zt];for(let o of n.values())EG(r,t,o)}e.i18nNodes=void 0,e.dehydratedIcuData=void 0}}function EG(i,e,t){for(let n of t.node.cases[t.case]){let r=e.get(n.index-Xt);r&&DC(i,r,!1)}}function V0(i){let e=i[To]??[],n=i[Vn][Zt],r=[];for(let o of e)o.data[PP]!==void 0?r.push(o):$A(o,n);i[To]=r}function MG(i){let{lContainer:e}=i,t=e[To];if(t===null)return;let r=e[Vn][Zt];for(let o of t)$A(o,r)}function $A(i,e){let t=0,n=i.firstChild;if(n){let r=i.data[Nh];for(;t<r;){let o=n.nextSibling;DC(e,n,!1),n=o,t++}}}function G0(i){V0(i);let e=i[Vi];eo(e)&&g0(e);for(let t=Dn;t<i.length;t++)g0(i[t])}function g0(i){wG(i);let e=i[tt];for(let t=Xt;t<e.bindingStartIndex;t++)if(Sr(i[t])){let n=i[t];G0(n)}else eo(i[t])&&g0(i[t])}function XC(i){let e=i._views;for(let t of e){let n=qP(t);n!==null&&n[Vi]!==null&&(eo(n)?g0(n):G0(n))}}function TG(i,e,t,n){i!==null&&(t.cleanup(e),G0(i.lContainer),XC(n))}function DG(i,e){let t=[];for(let n of e)for(let r=0;r<(n[hC]??1);r++){let o={data:n,firstChild:null};n[Nh]>0&&(o.firstChild=i,i=z0(n[Nh],i)),t.push(o)}return[i,t]}var XA=()=>null,YA=()=>null;function qA(){XA=IG,YA=PG}function IG(i,e){return ZA(i,e)?i[To].shift():(V0(i),null)}function Bh(i,e){return XA(i,e)}function PG(i,e,t){if(e.tView.ssrId===null)return null;let n=Bh(i,e.tView.ssrId);return t[tt].firstUpdatePass&&n===null&&AG(t,e),n}function KA(i,e,t){return YA(i,e,t)}function AG(i,e){let t=e;for(;t;){if(O2(i,t))return;if((t.flags&256)===256)break;t=t.prev}for(t=e.next;t&&(t.flags&512)===512;){if(O2(i,t))return;t=t.next}}function ZA(i,e){let t=i[To];return!e||t===null||t.length===0?!1:t[0].data[DP]===e}function O2(i,e){let t=e.tView?.ssrId;if(t==null)return!1;let n=i[e.index];return Sr(n)&&ZA(n,t)?(V0(n),!0):!1}var JA=class{},H0=class{},H1=class{resolveComponentFactory(e){throw new Ke(917,!1)}},j0=class{static NULL=new H1},Ic=class{},la=(()=>{class i{destroyNode=null;static __NG_ELEMENT_ID__=()=>OG()}return i})();function OG(){let i=mt(),e=xi(),t=no(e.index,i);return(eo(t)?t:i)[Zt]}var QA=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>null})}return i})();var r0={},fu=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,r0,n);return r!==r0||t===r0?r:this.parentInjector.get(e,t,n)}};function v0(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=Tg(r,a);else if(o==2){let l=a,c=e[++s];n=Tg(n,l+": "+c+";")}}t?i.styles=n:i.stylesWithoutHost=n,t?i.classes=r:i.classesWithoutHost=r}function $t(i,e=0){let t=mt();if(t===null)return Xe(i,e);let n=xi();return hP(n,t,yi(i),e)}function eO(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}FG(i,e,t,a,o,l,c)}o!==null&&n!==null&&RG(t,n,o)}function RG(i,e,t){let n=i.localNames=[];for(let r=0;r<e.length;r+=2){let o=t[e[r+1]];if(o==null)throw new Ke(-301,!1);n.push(e[r],o)}}function kG(i,e,t){e.componentOffset=t,(i.components??=[]).push(e.index)}function FG(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,kG(i,t,f)),C1(u0(t,e),i,h.type)}VG(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=vA(i,e,a,null);a>0&&(t.directiveToIndex=new Map);for(let f=0;f<a;f++){let h=n[f];if(t.mergedAttrs=pu(t.mergedAttrs,h.hostAttrs),LG(i,t,e,u,h),zG(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++}NG(i,t,o)}function NG(i,e,t){for(let n=e.directiveStart;n<e.directiveEnd;n++){let r=i.data[n];if(t===null||!t.has(r))R2(0,e,r,n),R2(1,e,r,n),F2(e,n,!1);else{let o=t.get(r);k2(0,e,o,n),k2(1,e,o,n),F2(e,n,!0)}}}function R2(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),tO(e,o)}}function k2(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),tO(e,s)}}function tO(i,e){e==="class"?i.flags|=8:e==="style"&&(i.flags|=16)}function F2(i,e,t){let{attrs:n,inputs:r,hostDirectiveInputs:o}=i;if(n===null||!t&&r===null||t&&o===null||AC(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 LG(i,e,t,n,r){i.data[n]=r;let o=r.factory||(r.factory=Ga(r.type,!0)),s=new Mc(o,hs(r),$t,null);i.blueprint[n]=s,t[n]=s,UG(i,e,n,vA(i,t,r.hostVars,Tr),r)}function UG(i,e,t,n,r){let o=r.hostBindings;if(o){let s=i.hostBindingOpCodes;s===null&&(s=i.hostBindingOpCodes=[]);let a=~e.index;BG(s)!=a&&s.push(a),s.push(t,n,o)}}function BG(i){let e=i.length;for(;e>0;){let t=i[--e];if(typeof t=="number"&&t<0)return t}return 0}function zG(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 VG(i,e,t){i.flags|=1,i.directiveStart=e,i.directiveEnd=e+t,i.providerIndexes=e}function YC(i,e,t,n,r,o,s,a){let l=e[tt],c=l.consts,d=io(c,s),u=wu(l,i,t,n,d);return o&&eO(l,e,u,io(c,a),r),u.mergedAttrs=pu(u.mergedAttrs,u.attrs),u.attrs!==null&&v0(u,u.attrs,!1),u.mergedAttrs!==null&&v0(u,u.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,u),u}function qC(i,e){oP(i,e),LS(e)&&i.queries.elementEnd(e)}function GG(i,e,t,n,r,o){let s=e.consts,a=io(s,r),l=wu(e,i,t,n,a);if(l.mergedAttrs=pu(l.mergedAttrs,l.attrs),o!=null){let c=io(s,o);l.localNames=[];for(let d=0;d<c.length;d+=2)l.localNames.push(c[d],-1)}return l.attrs!==null&&v0(l,l.attrs,!1),l.mergedAttrs!==null&&v0(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function W0(i,e,t){return i[e]=t}function HG(i,e){return i[e]}function Er(i,e,t){if(t===Tr)return!1;let n=i[e];return Object.is(n,t)?!1:(i[e]=t,!0)}function nO(i,e,t,n){let r=Er(i,e,t);return Er(i,e+1,n)||r}function jG(i,e,t,n,r){let o=nO(i,e,t,n);return Er(i,e+2,r)||o}function o0(i,e,t){return function n(r){let o=fs(i)?no(i.index,e):e;L0(o,5);let s=e[kn],a=N2(e,s,t,r),l=n.__ngNextListenerFn__;for(;l;)a=N2(e,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function N2(i,e,t,n){let r=lt(null);try{return tn(Wt.OutputStart,e,t),t(n)!==!1}catch(o){return HC(i,o),!1}finally{tn(Wt.OutputEnd,e,t),lt(r)}}function iO(i,e,t,n,r,o,s,a){let l=ru(i),c=!1,d=null;if(!n&&l&&(d=$G(e,t,o,i.index)),d!==null){let u=d.__ngLastListenerFn__||d;u.__ngNextListenerFn__=s,d.__ngLastListenerFn__=s,c=!0}else{let u=to(i,t),f=n?n(u):u;Mz(t,f,o,a);let h=r.listen(f,o,a);if(!WG(o)){let p=n?v=>n(Cr(v[i.index])):i.index;rO(p,e,t,o,a,h,!1)}}return c}function WG(i){return i.startsWith("animation")||i.startsWith("transition")}function $G(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[nu],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function rO(i,e,t,n,r,o,s){let a=e.firstCreatePass?WS(e):null,l=jS(t),c=l.length;l.push(r,o),a&&a.push(n,i,c,(c+1)*(s?-1:1))}function L2(i,e,t,n,r,o){let s=e[t],a=e[tt],c=a.data[t].outputs[n],u=s[c].subscribe(o);rO(i.index,a,e,r,o,u,!0)}var j1=Symbol("BINDING");function oO(i){return i.debugInfo?.className||i.type.name||null}var W1=class extends j0{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Zs(e);return new vu(t,this.ngModule)}};function XG(i){return Object.keys(i).map(e=>{let[t,n,r]=i[e],o={propName:t,templateName:e,isSignal:(n&A0.SignalBased)!==0};return r&&(o.transform=r),o})}function YG(i){return Object.keys(i).map(e=>({propName:i[e],templateName:e}))}function qG(i,e,t){let n=e instanceof Ti?e:e?.injector;return n&&i.getStandaloneInjector!==null&&(n=i.getStandaloneInjector(n)||n),n?new fu(t,n):t}function KG(i){let e=i.get(Ic,null);if(e===null)throw new Ke(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 ZG(i,e){let t=sO(i);return TC(e,t,t==="svg"?US:t==="math"?UI:null)}function sO(i){return(i.selectors[0][0]||"div").toLowerCase()}var vu=class extends H0{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=XG(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=YG(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=gV(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,o,s){tn(Wt.DynamicComponentStart);let a=lt(null);try{let l=this.componentDef,c=qG(l,r||this.ngModule,e),d=KG(c),u=d.tracingService;return u&&u.componentCreate?u.componentCreate(oO(l),()=>this.createComponentRef(d,c,t,n,o,s)):this.createComponentRef(d,c,t,n,o,s)}finally{lt(a)}}createComponentRef(e,t,n,r,o,s){let a=this.componentDef,l=JG(r,a,s,o),c=e.rendererFactory.createRenderer(null,a),d=r?zV(c,r,a.encapsulation,t):ZG(a,c),u=s?.some(U2)||o?.some(p=>typeof p!="function"&&p.bindings.some(U2)),f=RC(null,l,null,512|gA(a),null,null,e,c,t,null,YP(d,t,!0));f[Xt]=d,jg(f);let h=null;try{let p=YC(Xt,f,2,"#host",()=>l.directiveRegistry,!0,0);uA(c,d,p),mu(d,f),N0(l,f,p),_C(l,p,f),qC(l,p),n!==void 0&&eH(p,this.ngContentSelectors,n),h=no(p.index,f),f[kn]=h[kn],WC(l,f,null)}catch(p){throw h!==null&&E1(h),E1(f),p}finally{tn(Wt.DynamicComponentEnd),Wg()}return new b0(this.componentType,f,!!u)}};function JG(i,e,t,n){let r=i?["ng-version","21.2.4"]:vV(e.selectors[0]),o=null,s=null,a=0;if(t)for(let d of t)a+=d[j1].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[j1].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=Pg(u);l.push(f)}return OC(0,null,QG(o,s),1,a,l,null,null,null,[r],null)}function QG(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 U2(i){let e=i[j1].kind;return e==="input"||e==="twoWay"}var b0=class extends JA{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=ou(t[tt],Xt),this.location=xu(this._tNode,t),this.instance=no(this._tNode.index,t)[kn],this.hostView=this.changeDetectorRef=new Qa(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=jC(n,r[tt],r,e,t);this.previousInputValues.set(e,t);let s=no(n.index,r);L0(s,1)}get injector(){return new Ec(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function eH(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 Eu=(()=>{class i{static __NG_ELEMENT_ID__=tH}return i})();function tH(){let i=xi();return aO(i,mt())}var $1=class i extends Eu{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return xu(this._hostTNode,this._hostLView)}get injector(){return new Ec(this._hostTNode,this._hostLView)}get parentInjector(){let e=cC(this._hostTNode,this._hostLView);if(aP(e)){let t=c0(e,this._hostLView),n=l0(e),r=t[tt].data[n+8];return new Ec(r,t)}else return new Ec(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=B2(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=Bh(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,Dc(this._hostTNode,s)),a}createComponent(e,t,n,r,o,s,a){let l=e&&!K5(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 vu(Zs(e)),u=n||this.parentInjector;if(!o&&d.ngModule==null){let m=(l?u:this.parentInjector).get(Ti,null);m&&(o=m)}let f=Zs(d.componentType??{}),h=Bh(this._lContainer,f?.id??null),p=h?.firstChild??null,v=d.create(u,r,p,o,s,a);return this.insertImpl(v.hostView,c,Dc(this._hostTNode,h)),v}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(BI(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 Cu(s,r,o,n),e.attachToViewContainerRef(),PS(h1(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=B2(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=Uh(this._lContainer,t);n&&(Eh(h1(this._lContainer),t),k0(n[tt],n))}detach(e){let t=this._adjustIndex(e,-1),n=Uh(this._lContainer,t);return n&&Eh(h1(this._lContainer),t)!=null?new Qa(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function B2(i){return i[Th]}function h1(i){return i[Th]||(i[Th]=[])}function aO(i,e){let t,n=e[i.index];return Sr(n)?t=n:(t=GA(n,e,null,i),e[i.index]=t,kC(e,t)),lO(t,e,i,n),new $1(t,i,e)}function nH(i,e){let t=i[Zt],n=t.createComment(""),r=to(e,i),o=t.parentNode(r);return p0(t,o,n,t.nextSibling(r),!1),n}var lO=cO,KC=()=>!1;function iH(i,e,t){return KC(i,e,t)}function cO(i,e,t,n){if(i[us])return;let r;t.type&8?r=Cr(n):r=nH(e,t),i[us]=r}function rH(i,e,t){if(i[us]&&i[To])return!0;let n=t[Hi],r=e.index-Xt;if(!n||yP(e)||JP(n,r))return!1;let s=D1(n,r),a=n.data[w0]?.[r],[l,c]=DG(s,a);return i[us]=l,i[To]=c,!0}function oH(i,e,t,n){KC(i,t,e)||cO(i,e,t,n)}function dO(){lO=oH,KC=rH}var X1=class i{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},Y1=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++)hO(e,t).matches!==null&&this.queries[t].setDirty()}},q1=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=fH(e):this.predicate=e}},K1=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)}},Z1=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,sH(t,o)),this.matchTNodeWithReadOption(e,t,n0(t,e,o,!1,!1))}else n===gu?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,n0(t,e,n,!1,!1))}matchTNodeWithReadOption(e,t,n){if(n!==null){let r=this.metadata.read;if(r!==null)if(r===Mr||r===Eu||r===gu&&t.type&4)this.addMatch(t.index,-2);else{let o=n0(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 sH(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 aH(i,e){return i.type&11?xu(i,e):i.type&4?U0(i,e):null}function lH(i,e,t,n){return t===-1?aH(e,i):t===-2?cH(i,e,n):Fh(i,i[tt],t,e)}function cH(i,e,t){if(t===Mr)return xu(e,i);if(t===gu)return U0(e,i);if(t===Eu)return aO(e,i)}function uO(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(lH(e,d,s[l+1],t.metadata.read))}}r.matches=a}return r.matches}function J1(i,e,t,n){let r=i.queries.getByIndex(t),o=r.matches;if(o!==null){let s=uO(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[$a]===f[Vn]&&J1(f[tt],f,c,n)}if(d[_c]!==null){let u=d[_c];for(let f=0;f<u.length;f++){let h=u[f];J1(h[tt],h,c,n)}}}}}return n}function fO(i,e){return i[ds].queries[e].queryList}function dH(i,e,t){let n=new f0((t&4)===4);return GI(i,e,n,n.destroy),(e[ds]??=new Y1).queries.push(new X1(n))-1}function uH(i,e,t){let n=In();return n.firstCreatePass&&(hH(n,new q1(i,e,t),-1),(e&2)===2&&(n.staticViewQueries=!0)),dH(n,mt(),e)}function fH(i){return i.split(",").map(e=>e.trim())}function hH(i,e,t){i.queries===null&&(i.queries=new K1),i.queries.track(new Z1(e,t))}function hO(i,e){return i.queries.getByIndex(e)}function pH(i,e){let t=i[tt],n=hO(t,e);return n.crossesNgTemplate?J1(t,i,e,[]):uO(t,i,n,e)}function pO(i,e,t){let n,r=hh(()=>{n._dirtyCounter();let o=gH(n,i);if(e&&o===void 0)throw new Ke(-951,!1);return o});return n=r[Qn],n._dirtyCounter=N(0),n._flatValue=void 0,r}function mO(i){return pO(!0,!1,i)}function gO(i){return pO(!0,!0,i)}function mH(i,e){let t=i[Qn];t._lView=mt(),t._queryIndex=e,t._queryList=fO(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(n=>n+1))}function gH(i,e){let t=i._lView,n=i._queryIndex;if(t===void 0||n===void 0||t[wt]&4)return e?void 0:Mi;let r=fO(t,n),o=pH(t,n);return r.reset(o,gz),e?r.first:r._changesDetected||i._flatValue===void 0?i._flatValue=r.toArray():i._flatValue}var zh=class{};var Vh=class extends zh{injector;componentFactoryResolver=new W1(this);instance=null;constructor(e){super();let t=new gc([...e.providers,{provide:zh,useValue:this},{provide:j0,useValue:this.componentFactoryResolver}],e.parent||eu(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function ZC(i,e,t=null){return new Vh({providers:i,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var vH=(()=>{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=Fg(!1,t.type),r=n.length>0?ZC([n],this._injector,""):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=_e({token:i,providedIn:"environment",factory:()=>new i(Xe(Ti))})}return i})();function at(i){return jh(()=>{let e=vO(i),t=ue(R({},e),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===dC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&i.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(vH).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||Po.Emulated,styles:i.styles||Mi,_:null,schemas:i.schemas||null,tView:null,id:""});e.standalone&&Ro("NgStandalone"),bO(t);let n=i.dependencies;return t.directiveDefs=z2(n,bH),t.pipeDefs=z2(n,MS),t.id=_H(t),t})}function bH(i){return Zs(i)||Pg(i)}function ca(i){return jh(()=>({type:i.type,bootstrap:i.bootstrap||Mi,declarations:i.declarations||Mi,imports:i.imports||Mi,exports:i.exports||Mi,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function yH(i,e){if(i==null)return Wa;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=A0.None,l=null),t[o]=[n,a,l],e[o]=s}return t}function xH(i){if(i==null)return Wa;let e={};for(let t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function Zn(i){return jh(()=>{let e=vO(i);return bO(e),e})}function $0(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 vO(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||Wa,exportAs:i.exportAs||null,standalone:i.standalone??!0,signals:i.signals===!0,selectors:i.selectors||Mi,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:yH(i.inputs,e),outputs:xH(i.outputs),debugInfo:null}}function bO(i){i.features?.forEach(e=>e(i))}function z2(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 _H(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 SH(i){return Object.getPrototypeOf(i.prototype).constructor}function Dr(i){let e=SH(i.type),t=!0,n=[i];for(;e;){let r;if(hs(i))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Ke(903,!1);r=e.\u0275dir}if(r){if(t){n.push(r);let s=i;s.inputs=p1(i.inputs),s.declaredInputs=p1(i.declaredInputs),s.outputs=p1(i.outputs);let a=r.hostBindings;a&&TH(i,a);let l=r.viewQuery,c=r.contentQueries;if(l&&EH(i,l),c&&MH(i,c),CH(i,r),CI(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===Dr&&(t=!1)}}e=Object.getPrototypeOf(e)}wH(n)}function CH(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 wH(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=pu(r.hostAttrs,t=pu(t,r.hostAttrs))}}function p1(i){return i===Wa?{}:i===Mi?[]:i}function EH(i,e){let t=i.viewQuery;t?i.viewQuery=(n,r)=>{e(n,r),t(n,r)}:i.viewQuery=e}function MH(i,e){let t=i.contentQueries;t?i.contentQueries=(n,r,o)=>{e(n,r,o),t(n,r,o)}:i.contentQueries=e}function TH(i,e){let t=i.hostBindings;t?i.hostBindings=(n,r)=>{e(n,r),t(n,r)}:i.hostBindings=e}function yO(i,e,t,n,r,o,s,a){if(t.firstCreatePass){i.mergedAttrs=pu(i.mergedAttrs,i.attrs);let d=i.tView=OC(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),su(i,!1);let l=xO(t,e,i,n);$g()&&UC(t,e,l,i),mu(l,e);let c=GA(l,e,l,i);e[n+Xt]=c,kC(e,c),iH(c,i,e)}function DH(i,e,t,n,r,o,s,a,l,c,d){let u=t+Xt,f;return e.firstCreatePass?(f=wu(e,u,4,s||null,a||null),zg()&&eO(e,i,f,io(e.consts,c),zC),oP(e,f)):f=e.data[u],yO(f,i,e,t,n,r,o,l),ru(f)&&N0(e,i,f),c!=null&&Zh(i,f,d),f}function Gh(i,e,t,n,r,o,s,a,l,c,d){let u=t+Xt,f;if(e.firstCreatePass){if(f=wu(e,u,4,s||null,a||null),c!=null){let h=io(e.consts,c);f.localNames=[];for(let p=0;p<h.length;p+=2)f.localNames.push(h[p],-1)}}else f=e.data[u];return yO(f,i,e,t,n,r,o,l),c!=null&&Zh(i,f,d),f}function el(i,e,t,n,r,o,s,a){let l=mt(),c=In(),d=io(c.consts,o);return DH(l,c,i,e,t,n,r,d,void 0,s,a),el}var xO=_O;function _O(i,e,t,n){return na(!0),e[Zt].createComment("")}function IH(i,e,t,n){let r=!T0(e,t);na(r);let o=e[Hi]?.data[TP]?.[n]??null;if(o!==null&&t.tView!==null&&t.tView.ssrId===null&&(t.tView.ssrId=o),r)return _O(i,e);let s=e[Hi],a=B0(s,i,e,t);M0(s,n,a);let l=xC(s,n);return z0(l,a)}function SO(){xO=IH}var wr=(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})(wr||{}),V2=0,PH=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 AH=0,Jh=1;var OH=4,RH=5;var kH=7,hu=8,FH=9,JC=(function(i){return i[i.Manual=0]="Manual",i[i.Playthrough=1]="Playthrough",i})(JC||{});function s0(i,e){let t=LH(i),n=e[t];if(n!==null){for(let r of n)r();e[t]=null}}function NH(i){s0(1,i),s0(0,i),s0(2,i)}function LH(i){let e=OH;return i===1?e=RH:i===2&&(e=FH),e}function CO(i){return i+1}function Mu(i,e){let t=i[tt],n=CO(e.index);return i[n]}function Qh(i,e){let t=CO(e.index);return i.data[t]}function UH(i,e,t){let n=e[tt],r=Qh(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 G2(i,e){return e===Kn.Placeholder?i.placeholderBlockConfig?.[V2]??null:e===Kn.Loading?i.loadingBlockConfig?.[V2]??null:null}function BH(i){return i.loadingBlockConfig?.[PH]??null}function H2(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 zH(i,e){let t=e.primaryTmplIndex+Xt;return ou(i,t)}var VH=(()=>{class i{cachedInjectors=new Map;getOrCreateInjector(t,n,r,o){if(!this.cachedInjectors.has(t)){let s=r.length>0?ZC(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 wO=new qe("");function m1(i,e,t){return i.get(VH).getOrCreateInjector(e,i,t,"")}function GH(i,e,t){if(i instanceof fu){let r=i.injector,o=i.parentInjector,s=m1(o,e,t);return new fu(r,s)}let n=i.get(Ti);if(n!==i){let r=m1(n,e,t);return new fu(i,r)}return m1(i,e,t)}function wc(i,e,t,n=!1){let r=t[Vn],o=r[tt];if(Ya(r))return;let s=Mu(r,e),a=s[Jh],l=s[kH];if(!(l!==null&&i<l)&&j2(a,i)&&j2(s[AH]??-1,i)){let c=Qh(o,e),u=!n&&!0&&(BH(c)!==null||G2(c,Kn.Loading)!==null||G2(c,Kn.Placeholder))?WH:jH;try{u(i,s,t,e,r)}catch(f){HC(r,f)}}}function HH(i,e){let t=i[To]?.findIndex(r=>r.data[AP]===e[Jh])??-1;return{dehydratedView:t>-1?i[To][t]:null,dehydratedViewIx:t}}function jH(i,e,t,n,r){tn(Wt.DeferBlockStateStart);let o=UH(i,r,n);if(o!==null){e[Jh]=i;let s=r[tt],a=o+Xt,l=ou(s,a),c=0;$C(t,c);let d;if(i===Kn.Complete){let p=Qh(s,n),v=p.providers;v&&v.length>0&&(d=GH(r[xr],p,v))}let{dehydratedView:u,dehydratedViewIx:f}=HH(t,e),h=Su(r,l,null,{injector:d,dehydratedView:u});if(Cu(t,h,c,Dc(l,u)),L0(h,2),f>-1&&t[To]?.splice(f,1),(i===Kn.Complete||i===Kn.Error)&&Array.isArray(e[hu])){for(let p of e[hu])p();e[hu]=null}}tn(Wt.DeferBlockStateEnd)}function j2(i,e){return i<e}function W2(i,e,t){i.loadingPromise.then(()=>{i.loadingState===wr.COMPLETE?wc(Kn.Complete,e,t):i.loadingState===wr.FAILED&&wc(Kn.Error,e,t)})}var WH=null;function QC(i){return typeof i=="function"&&i[Qn]!==void 0}function ew(i){return QC(i)&&typeof i.set=="function"}var tw=new qe("");function Tu(i){return!!i&&typeof i.then=="function"}function nw(i){return!!i&&typeof i.subscribe=="function"}var EO=new qe("");var iw=(()=>{class i{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,n)=>{this.resolve=t,this.reject=n});appInits=Q(EO,{optional:!0})??[];injector=Q(Di);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=tu(this.injector,r);if(Tu(o))t.push(o);else if(nw(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})(),Du=new qe("");function MO(){W_(()=>{let i="";throw new Ke(600,i)})}function TO(i){return i.isBoundToModule}var $H=10;var Ir=(()=>{class i{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=Q(ia);afterRenderManager=Q(NC);zonelessEnabled=Q(Ah);rootEffectScheduler=Q(Yg);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Eo;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=Q(Ja);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(rr(t=>!t))}constructor(){Q(vs,{optional:!0})}whenStable(){let t;return new Promise(n=>{t=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{t.unsubscribe()})}_injector=Q(Ti);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,n){return this.bootstrapImpl(t,n)}bootstrapImpl(t,n,r=Di.NULL){return this._injector.get(or).run(()=>{tn(Wt.BootstrapComponentStart);let s=t instanceof H0;if(!this._injector.get(iw).done){let p="";throw new Ke(405,p)}let l;s?l=t:l=this._injector.get(j0).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=TO(l)?void 0:this._injector.get(zh),d=n||l.selector,u=l.create(r,[],d,c),f=u.location.nativeElement,h=u.injector.get(tw,null);return h?.registerApplication(f),u.onDestroy(()=>{this.detachView(u.hostView),kh(this.components,u),h?.unregisterApplication(f)}),this._loadComponent(u),tn(Wt.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){tn(Wt.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(O0.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw tn(Wt.ChangeDetectionEnd),new Ke(101,!1);let t=lt(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,lt(t),this.afterTick.next(),tn(Wt.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Ic,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<$H;){tn(Wt.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{tn(Wt.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let t=!1;if(this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r}of this.allViews){if(!n&&!Dh(r))continue;let o=n&&!this.zonelessEnabled?0:1;UA(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})=>Dh(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;kh(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(Du,[]).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),()=>kh(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new Ke(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function kh(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function DO(){let i,e;return{promise:new Promise((n,r)=>{i=n,e=r}),resolve:i,reject:e}}function IO(i,e,t){let n=e[xr],r=e[tt];if(i.loadingState!==wr.NOT_STARTED)return i.loadingPromise??Promise.resolve();let o=Mu(e,t),s=zH(r,i);i.loadingState=wr.IN_PROGRESS,s0(1,o);let a=i.dependencyResolverFn,l=n.get(cu).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=Zs(p)||Pg(p);if(v)u.push(v);else{let g=MS(p);g&&f.push(g)}}else{d=!0;break}if(d){if(i.loadingState=wr.FAILED,i.errorTmplIndex===null){let p=new Ke(-750,!1);HC(e,p)}}else{i.loadingState=wr.COMPLETE;let h=s.tView;if(u.length>0){h.directiveRegistry=H2(h.directiveRegistry,u);let p=u.map(g=>g.type),v=Fg(!1,...p);i.providers=v}f.length>0&&(h.pipeRegistry=H2(h.pipeRegistry,f))}}),i.loadingPromise.finally(()=>{i.loadingPromise=null,l()})):(i.loadingPromise=Promise.resolve().then(()=>{i.loadingPromise=null,i.loadingState=wr.COMPLETE,l()}),i.loadingPromise)}function XH(i,e){return e[xr].get(wO,null,{optional:!0})?.behavior!==JC.Manual}function YH(i,e,t){let n=e[tt],r=e[t.index];if(!XH(i,e))return;let o=Mu(e,t),s=Qh(n,t);switch(NH(o),s.loadingState){case wr.NOT_STARTED:wc(Kn.Loading,t,r),IO(s,e,t),s.loadingState===wr.IN_PROGRESS&&W2(s,t,r);break;case wr.IN_PROGRESS:wc(Kn.Loading,t,r),W2(s,t,r);break;case wr.COMPLETE:wc(Kn.Complete,t,r);break;case wr.FAILED:wc(Kn.Error,t,r);break;default:}}async function PO(i,e,t){let n=i.get(E0);if(n.hydrating.has(e))return;let{parentBlockPromise:o,hydrationQueue:s}=kz(e,i);if(s.length===0)return;o!==null&&s.shift(),ZH(n,s),o!==null&&await o;let a=s[0];n.has(a)?await $2(i,s,t):n.awaitParentBlock(a,async()=>await $2(i,s,t))}async function $2(i,e,t){let n=i.get(E0),r=n.hydrating,o=i.get(Ja),s=o.add();for(let l=0;l<e.length;l++){let c=e[l],d=n.get(c);if(d!=null){if(await QH(d),await JH(i),qH(d)){MG(d),X2(e.slice(l),n);break}r.get(c).resolve()}else{KH(l,e,n),X2(e.slice(l),n);break}}let a=e[e.length-1];await r.get(a)?.promise,o.remove(s),t&&t(e),TG(n.get(a),e,n,i.get(Ir))}function qH(i){return Mu(i.lView,i.tNode)[Jh]===Kn.Error}function KH(i,e,t){let n=i-1,r=n>-1?t.get(e[n]):null;r&&G0(r.lContainer)}function X2(i,e){let t=e.hydrating;for(let n in i)t.get(n)?.reject();e.cleanup(i)}function ZH(i,e){for(let t of e)i.hydrating.set(t,DO())}function JH(i){return new Promise(e=>R0(e,{injector:i}))}async function QH(i){let{tNode:e,lView:t}=i,n=Mu(t,e);return new Promise(r=>{e6(n,r),YH(2,t,e)})}function e6(i,e){Array.isArray(i[hu])||(i[hu]=[]),i[hu].push(e)}function Pn(i,e,t,n){let r=mt(),o=qa();if(Er(r,o,e)){let s=In(),a=Ih();YV(a,r,i,e,t,n)}return Pn}function tl(){return mt()[ci][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 g1(i,e,t,n,r){return i===t&&Object.is(e,n)?1:Object.is(r(i,e),r(t,n))?-1:0}function t6(i,e,t,n){let r,o,s=0,a=i.length-1,l=void 0;if(Array.isArray(e)){lt(n);let c=e.length-1;for(lt(null);s<=a&&s<=c;){let d=i.at(s),u=e[s],f=g1(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=g1(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 y0,o??=q2(i,s,a,t),eC(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;)Y2(i,r,t,s,e[s]),s++}else if(e!=null){lt(n);let c=e[Symbol.iterator]();lt(null);let d=c.next();for(;!d.done&&s<=a;){let u=i.at(s),f=d.value,h=g1(s,u,s,f,t);if(h!==0)h<0&&i.updateValue(s,f),s++,d=c.next();else{r??=new y0,o??=q2(i,s,a,t);let p=t(s,f);if(eC(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;)Y2(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 eC(i,e,t,n){return e!==void 0&&e.has(n)?(i.attach(t,e.get(n)),e.delete(n),!0):!1}function Y2(i,e,t,n,r){if(eC(i,e,n,t(n,r)))i.updateValue(n,r);else{let o=i.create(n,r);i.attach(n,o)}}function q2(i,e,t,n){let r=new Set;for(let o=e;o<=t;o++)r.add(n(o,i.at(o)));return r}var y0=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function pe(i,e,t,n,r,o,s,a){Ro("NgControlFlow");let l=mt(),c=In(),d=io(c.consts,o);return Gh(l,c,i,e,t,n,r,d,256,s,a),rw}function rw(i,e,t,n,r,o,s,a){Ro("NgControlFlow");let l=mt(),c=In(),d=io(c.consts,o);return Gh(l,c,i,e,t,n,r,d,512,s,a),rw}function me(i,e){Ro("NgControlFlow");let t=mt(),n=qa(),r=t[n]!==Tr?t[n]:-1,o=r!==-1?x0(t,Xt+r):void 0,s=0;if(Er(t,n,i)){let a=lt(null);try{if(o!==void 0&&$C(o,s),i!==-1){let l=Xt+i,c=x0(t,l),d=rC(t[tt],l),u=KA(c,d,t),f=Su(t,d,e,{dehydratedView:u});Cu(c,f,s,Dc(d,u))}}finally{lt(a)}}else if(o!==void 0){let a=HA(o,s);a!==void 0&&(a[kn]=e)}}var tC=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 Iu(i){return i}function ow(i,e){return e}var nC=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Dt(i,e,t,n,r,o,s,a,l,c,d,u,f){Ro("NgControlFlow");let h=mt(),p=In(),v=l!==void 0,g=mt(),m=a?s.bind(g[ci][kn]):s,b=new nC(v,m);g[Xt+i]=b,Gh(h,p,i+1,e,t,n,r,io(p.consts,o),256),v&&Gh(h,p,i+2,l,c,d,u,io(p.consts,f),512)}var iC=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,Cu(this.lContainer,t,e,Dc(this.templateTNode,n)),n6(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,i6(this.lContainer,e),r6(this.lContainer,e)}create(e,t){let n=Bh(this.lContainer,this.templateTNode.tView.ssrId);return Su(this.hostLView,this.templateTNode,new tC(this.lContainer,t,e),{dehydratedView:n})}destroy(e){k0(e[tt],e)}updateValue(e,t){this.getLView(e)[kn].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[kn].$index=e}getLView(e){return o6(this.lContainer,e)}};function It(i){let e=lt(null),t=ta();try{let n=mt(),r=n[tt],o=n[t],s=t+1,a=x0(n,s);if(o.liveCollection===void 0){let c=rC(r,s);o.liveCollection=new iC(a,n,c)}else o.liveCollection.reset();let l=o.liveCollection;if(t6(l,i,o.trackByFn,e),l.updateIndexes(),o.hasEmptyBlock){let c=qa(),d=l.length===0;if(Er(n,c,d)){let u=t+2,f=x0(n,u);if(d){let h=rC(r,u),p=KA(f,h,n),v=Su(n,h,void 0,{dehydratedView:p});Cu(f,v,0,Dc(h,p))}else r.firstUpdatePass&&V0(f),$C(f,0)}}}finally{lt(e)}}function x0(i,e){return i[e]}function n6(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t],r=n?n[Xa]:void 0;if(n&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=n[xr];MV(o,r),Tc.delete(n[ea]),r.detachedLeaveAnimationFns=void 0}}function i6(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t],r=n?n[Xa]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function r6(i,e){return Uh(i,e)}function o6(i,e){return HA(i,e)}function rC(i,e){return ou(i,e)}function ne(i,e,t){let n=mt(),r=qa();if(Er(n,r,e)){let o=In(),s=Ih();AA(s,n,i,e,n[Zt],t)}return ne}function oC(i,e,t,n,r){jC(e,i,t,r?"class":"style",n)}function w(i,e,t,n){let r=mt(),o=r[tt],s=i+Xt,a=o.firstCreatePass?YC(s,r,2,e,zC,zg(),t,n):o.data[s];if(fs(a)){let l=r[Mo].tracingService;if(l&&l.componentCreate){let c=o.data[a.directiveStart+a.componentOffset];return l.componentCreate(oO(c),()=>(K2(i,e,r,a,n),w))}}return K2(i,e,r,a,n),w}function K2(i,e,t,n,r){if(VC(n,t,i,e,sw),ru(n)){let o=t[tt];N0(o,t,n),_C(o,n,t)}r!=null&&Zh(t,n)}function T(){let i=In(),e=xi(),t=GC(e);return i.firstCreatePass&&qC(i,t),XS(t)&&YS(),$S(),t.classesWithoutHost!=null&&nz(t)&&oC(i,t,mt(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&iz(t)&&oC(i,t,mt(),t.stylesWithoutHost,!1),T}function Y(i,e,t,n){return w(i,e,t,n),T(),Y}function re(i,e,t,n){let r=mt(),o=r[tt],s=i+Xt,a=o.firstCreatePass?GG(s,o,2,e,t,n):o.data[s];return VC(a,r,i,e,sw),n!=null&&Zh(r,a),re}function he(){let i=xi(),e=GC(i);return XS(e)&&YS(),$S(),he}function bt(i,e,t,n){return re(i,e,t,n),he(),bt}var sw=(i,e,t,n,r)=>(na(!0),TC(e[Zt],n,n1()));function s6(i,e,t,n,r){let o=!T0(e,t);if(na(o),o)return TC(e[Zt],n,n1());let s=e[Hi],a=B0(s,i,e,t);return ZP(s,r)&&M0(s,r,a.nextSibling),s&&(vP(t)||bP(a))&&fs(t)&&(WI(t),dA(a)),a}function AO(){sw=s6}function aw(i,e,t){let n=mt(),r=n[tt],o=i+Xt,s=r.firstCreatePass?YC(o,n,8,"ng-container",zC,zg(),e,t):r.data[o];if(VC(s,n,i,"ng-container",OO),ru(s)){let a=n[tt];N0(a,n,s),_C(a,s,n)}return t!=null&&Zh(n,s),aw}function lw(){let i=In(),e=xi(),t=GC(e);return i.firstCreatePass&&qC(i,t),lw}function Pr(i,e,t){return aw(i,e,t),lw(),Pr}var OO=(i,e,t,n,r)=>(na(!0),lA(e[Zt],""));function a6(i,e,t,n,r){let o,s=!T0(e,t);if(na(s),s)return lA(e[Zt],"");let a=e[Hi],l=B0(a,i,e,t),c=Oz(a,r);return M0(a,r,l),o=z0(c,l),o}function RO(){OO=a6}function Ne(){return mt()}function di(i,e,t){let n=mt(),r=qa();if(Er(n,r,e)){let o=In(),s=Ih();OA(s,n,i,e,n[Zt],t)}return di}var Oh=void 0;function l6(i){let e=Math.floor(Math.abs(i)),t=i.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var c6=["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"]],Oh,[["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"]],Oh,[["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}",Oh,Oh,Oh],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",l6],v1={};function X0(i){let e=d6(i),t=Z2(e);if(t)return t;let n=e.split("-")[0];if(t=Z2(n),t)return t;if(n==="en")return c6;throw new Ke(701,!1)}function Z2(i){return i in v1||(v1[i]=Jr.ng&&Jr.ng.common&&Jr.ng.common.locales&&Jr.ng.common.locales[i]),v1[i]}var Ac=(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})(Ac||{});function d6(i){return i.toLowerCase().replace(/_/g,"-")}var ep="en-US";var u6=ep;function kO(i){typeof i=="string"&&(u6=i.toLowerCase().replace(/_/g,"-"))}function ie(i,e,t){let n=mt(),r=In(),o=xi();return FO(r,n,n[Zt],o,i,e,t),ie}function Gn(i,e,t){let n=mt(),r=In(),o=xi();return(o.type&3||t)&&iO(o,r,n,t,n[Zt],i,e,o0(o,n,e)),Gn}function FO(i,e,t,n,r,o,s){let a=!0,l=null;if((n.type&3||s)&&(l??=o0(n,e,o),iO(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??=o0(n,e,o),L2(n,e,f,h,r,l)}if(c&&c.length)for(let u of c)l??=o0(n,e,o),L2(n,e,u,r,r,l)}}function M(i=1){return i2(i)}function f6(i,e){let t=null,n=uV(i);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(n===null?mA(i,o,!0):pV(n,o))return r}return t}function _i(i){let e=mt()[ci][Gi];if(!e.projection){let t=i?i.length:1,n=e.projection=II(t,null),r=n.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=i?f6(o,i):0;s!==null&&(r[s]?r[s].projectionNext=o:n[s]=o,r[s]=o)}o=o.next}}}function Si(i,e=0,t,n,r,o){let s=mt(),a=In(),l=n?i+1:null;l!==null&&Gh(s,a,l,n,r,o,null,t);let c=wu(a,Xt+i,16,null,t||null);c.projection===null&&(c.projection=e),ZS();let u=!s[Hi]||Vg();s[ci][Gi].projection[c.projection]===null&&l!==null?h6(s,a,l):u&&!Yh(c)&&LV(a,s,c)}function h6(i,e,t){let n=Xt+t,r=e.data[n],o=i[n],s=Bh(o,r.tView.ssrId),a=Su(i,r,void 0,{dehydratedView:s});Cu(o,a,0,Dc(r,s))}function nl(i,e,t,n){return mH(i,uH(e,t,n)),nl}function Oc(i=1){Hg(QI()+i)}function ro(i){let e=XI();return Lg(e,Xt+i)}function Qg(i,e){return i<<17|e<<2}function Pc(i){return i>>17&32767}function p6(i){return(i&2)==2}function m6(i,e){return i&131071|e<<17}function sC(i){return i|2}function bu(i){return(i&131068)>>2}function b1(i,e){return i&-131069|e<<2}function g6(i){return(i&1)===1}function aC(i){return i|1}function v6(i,e,t,n,r,o){let s=o?e.classBindings:e.styleBindings,a=Pc(s),l=bu(s);i[n]=t;let c=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||Qd(u,d)>0)&&(c=!0)}else d=t;if(r)if(l!==0){let f=Pc(i[a+1]);i[n+1]=Qg(f,a),f!==0&&(i[f+1]=b1(i[f+1],n)),i[a+1]=m6(i[a+1],n)}else i[n+1]=Qg(a,0),a!==0&&(i[a+1]=b1(i[a+1],n)),a=n;else i[n+1]=Qg(l,0),a===0?a=n:i[l+1]=b1(i[l+1],n),l=n;c&&(i[n+1]=sC(i[n+1])),J2(i,d,n,!0),J2(i,d,n,!1),b6(e,d,i,n,o),s=Qg(a,l),o?e.classBindings=s:e.styleBindings=s}function b6(i,e,t,n,r){let o=r?i.residualClasses:i.residualStyles;o!=null&&typeof e=="string"&&Qd(o,e)>=0&&(t[n+1]=aC(t[n+1]))}function J2(i,e,t,n){let r=i[t+1],o=e===null,s=n?Pc(r):bu(r),a=!1;for(;s!==0&&(a===!1||o);){let l=i[s],c=i[s+1];y6(l,e)&&(a=!0,i[s+1]=n?aC(c):sC(c)),s=n?Pc(c):bu(c)}a&&(i[t+1]=n?sC(r):aC(r))}function y6(i,e){return i===null||e==null||(Array.isArray(i)?i[1]:i)===e?!0:Array.isArray(i)&&typeof e=="string"?Qd(i,e)>=0:!1}var Io={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function x6(i){return i.substring(Io.key,Io.keyEnd)}function _6(i){return S6(i),NO(i,LO(i,0,Io.textEnd))}function NO(i,e){let t=Io.textEnd;return t===e?-1:(e=Io.keyEnd=C6(i,Io.key=e,t),LO(i,e,t))}function S6(i){Io.key=0,Io.keyEnd=0,Io.value=0,Io.valueEnd=0,Io.textEnd=i.length}function LO(i,e,t){for(;e<t&&i.charCodeAt(e)<=32;)e++;return e}function C6(i,e,t){for(;e<t&&i.charCodeAt(e)>32;)e++;return e}function oo(i,e,t){return UO(i,e,t,!1),oo}function pt(i,e){return UO(i,e,null,!0),pt}function so(i){E6(A6,w6,i,!0)}function w6(i,e){for(let t=_6(e);t>=0;t=NO(e,t))Rg(i,x6(e),!0)}function UO(i,e,t,n){let r=mt(),o=In(),s=QS(2);if(o.firstUpdatePass&&zO(o,i,s,n),e!==Tr&&Er(r,s,e)){let a=o.data[ta()];VO(o,a,r,r[Zt],i,r[s+1]=R6(e,t),n,s)}}function E6(i,e,t,n){let r=In(),o=QS(2);r.firstUpdatePass&&zO(r,null,o,n);let s=mt();if(t!==Tr&&Er(s,o,t)){let a=r.data[ta()];if(GO(a,n)&&!BO(r,o)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=Tg(l,t||"")),oC(r,a,s,t,n)}else O6(r,a,s,s[Zt],s[o+1],s[o+1]=P6(i,e,t),n,o)}}function BO(i,e){return e>=i.expandoStartIndex}function zO(i,e,t,n){let r=i.data;if(r[t+1]===null){let o=r[ta()],s=BO(i,t);GO(o,n)&&e===null&&!s&&(e=!1),e=M6(r,o,e,n),v6(r,o,e,t,s,n)}}function M6(i,e,t,n){let r=JI(i),o=n?e.residualClasses:e.residualStyles;if(r===null)(n?e.classBindings:e.styleBindings)===0&&(t=y1(null,i,e,t,n),t=Hh(t,e.attrs,n),o=null);else{let s=e.directiveStylingLast;if(s===-1||i[s]!==r)if(t=y1(r,i,e,t,n),o===null){let l=T6(i,e,n);l!==void 0&&Array.isArray(l)&&(l=y1(null,i,e,l[1],n),l=Hh(l,e.attrs,n),D6(i,e,n,l))}else o=I6(i,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),t}function T6(i,e,t){let n=t?e.classBindings:e.styleBindings;if(bu(n)!==0)return i[Pc(n)]}function D6(i,e,t,n){let r=t?e.classBindings:e.styleBindings;i[Pc(r)]=n}function I6(i,e,t){let n,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=i[o].hostAttrs;n=Hh(n,s,t)}return Hh(n,e.attrs,t)}function y1(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=Hh(n,o.hostAttrs,r),o!==i);)a++;return i!==null&&(t.directiveStylingLast=a),n}function Hh(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]),Rg(i,s,t?!0:e[++o]))}return i===void 0?null:i}function P6(i,e,t){if(t==null||t==="")return Mi;let n=[],r=Ao(t);if(Array.isArray(r))for(let o=0;o<r.length;o++)i(n,r[o],!0);else if(r instanceof Set)for(let o of r)i(n,o,!0);else if(typeof r=="object")for(let o in r)r.hasOwnProperty(o)&&i(n,o,r[o]);else typeof r=="string"&&e(n,r);return n}function A6(i,e,t){let n=String(e);n!==""&&!n.includes(" ")&&Rg(i,n,t)}function O6(i,e,t,n,r,o,s,a){r===Tr&&(r=Mi);let l=0,c=0,d=0<r.length?r[0]:null,u=0<o.length?o[0]:null;for(;d!==null||u!==null;){let f=l<r.length?r[l+1]:void 0,h=c<o.length?o[c+1]:void 0,p=null,v;d===u?(l+=2,c+=2,f!==h&&(p=u,v=h)):u===null||d!==null&&d<u?(l+=2,p=d):(c+=2,p=u,v=h),p!==null&&VO(i,e,t,n,p,v,s,a),d=l<r.length?r[l]:null,u=c<o.length?o[c]:null}}function VO(i,e,t,n,r,o,s,a){if(!(e.type&3))return;let l=i.data,c=l[a+1],d=g6(c)?Q2(l,e,t,r,bu(c),s):void 0;if(!_0(d)){_0(o)||p6(c)&&(o=Q2(l,null,t,r,a,s));let u=BS(ta(),t);BV(n,s,u,r,o)}}function Q2(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===Tr&&(f=u?Mi:void 0);let h=u?kg(f,n):d===n?f:void 0;if(c&&!_0(h)&&(h=kg(l,n)),_0(h)&&(a=h,s))return a;let p=i[r+1];r=s?Pc(p):bu(p)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=kg(l,n))}return a}function _0(i){return i!==void 0}function R6(i,e){return i==null||i===""||(typeof e=="string"?i=i+e:typeof i=="object"&&(i=Mg(Ao(i)))),i}function GO(i,e){return(i.flags&(e?8:16))!==0}function k(i,e=""){let t=mt(),n=In(),r=i+Xt,o=n.firstCreatePass?wu(n,r,1,e,null):n.data[r],s=HO(n,t,o,e);t[r]=s,$g()&&UC(n,t,s,o),su(o,!1)}var HO=(i,e,t,n)=>(na(!0),aA(e[Zt],n));function k6(i,e,t,n){let r=!T0(e,t);if(na(r),r)return aA(e[Zt],n);let o=e[Hi];return B0(o,i,e,t)}function jO(){HO=k6}function WO(i,e,t,n=""){return Er(i,qa(),t)?e+wh(t)+n:Tr}function Ye(i){return zt("",i),Ye}function zt(i,e,t){let n=mt(),r=WO(n,i,e,t);return r!==Tr&&F6(n,ta(),r),zt}function F6(i,e,t){let n=BS(e,i);iV(i[Zt],n,t)}function Rc(i,e,t){ew(e)&&(e=e());let n=mt(),r=qa();if(Er(n,r,e)){let o=In(),s=Ih();AA(s,n,i,e,n[Zt],t)}return Rc}function bs(i,e){let t=ew(i);return t&&i.set(e),t}function tp(i,e){let t=mt(),n=In(),r=xi();return FO(n,t,t[Zt],r,i,e),tp}function Y0(i,e,t=""){return WO(mt(),i,e,t)}function eP(i,e,t){let n=In();n.firstCreatePass&&$O(e,n.data,n.blueprint,hs(i),t)}function $O(i,e,t,n,r){if(i=yi(i),Array.isArray(i))for(let o=0;o<i.length;o++)$O(i[o],e,t,n,r);else{let o=In(),s=mt(),a=xi(),l=mc(i)?i:yi(i.provide),c=kS(i),d=a.providerIndexes&1048575,u=a.directiveStart,f=a.providerIndexes>>20;if(mc(i)||!i.multi){let h=new Mc(c,r,$t,null),p=_1(l,e,r?d:d+f,u);p===-1?(C1(u0(a,s),o,l),x1(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=_1(l,e,d+f,u),p=_1(l,e,d,d+f),v=h>=0&&t[h],g=p>=0&&t[p];if(r&&!g||!r&&!v){C1(u0(a,s),o,l);let m=U6(r?L6:N6,t.length,r,n,c,i);!r&&g&&(t[p].providerFactory=m),x1(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=XO(t[r?p:h],c,!r&&n);x1(o,i,h>-1?h:p,m)}!r&&n&&g&&t[p].componentProviders++}}}function x1(i,e,t,n){let r=mc(e),o=FI(e);if(r||o){let l=(o?yi(e.useClass):e).prototype.ngOnDestroy;if(l){let c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&e.multi){let d=c.indexOf(t);d===-1?c.push(t,[n,l]):c[d+1].push(n,l)}else c.push(t,l)}}}function XO(i,e,t){return t&&i.componentProviders++,i.multi.push(e)-1}function _1(i,e,t,n){for(let r=t;r<n;r++)if(e[r]===i)return r;return-1}function N6(i,e,t,n,r){return lC(this.multi,[])}function L6(i,e,t,n,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=Fh(n,n[tt],this.providerFactory.index,r);s=l.slice(0,a),lC(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],lC(o,s);return s}function lC(i,e){for(let t=0;t<i.length;t++){let n=i[t];e.push(n())}return e}function U6(i,e,t,n,r,o){let s=new Mc(i,t,$t,null);return s.multi=[],s.index=e,s.componentProviders=0,XO(s,r,n&&!t),s}function ao(i,e){return t=>{t.providersResolver=(n,r)=>eP(n,r?r(i):i,!1),e&&(t.viewProvidersResolver=(n,r)=>eP(n,r?r(e):e,!0))}}function cw(i,e){let t=au()+i,n=mt();return n[t]===Tr?W0(n,t,e()):HG(n,t)}function ys(i,e,t){return B6(mt(),au(),i,e,t)}function q0(i,e,t,n){return YO(mt(),au(),i,e,t,n)}function dw(i,e){let t=i[e];return t===Tr?void 0:t}function B6(i,e,t,n,r,o){let s=e+t;return Er(i,s,r)?W0(i,s+1,o?n.call(o,r):n(r)):dw(i,s+1)}function YO(i,e,t,n,r,o,s){let a=e+t;return nO(i,a,r,o)?W0(i,a+2,s?n.call(s,r,o):n(r,o)):dw(i,a+2)}function z6(i,e,t,n,r,o,s,a){let l=e+t;return jG(i,l,r,o,s)?W0(i,l+3,a?n.call(a,r,o,s):n(r,o,s)):dw(i,l+3)}function Ii(i,e){let t=In(),n,r=i+Xt;t.firstCreatePass?(n=V6(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=Ga(n.type,!0)),s,a=Bi($t);try{let l=d0(!1),c=o();return d0(l),zS(t,mt(),r,c),c}finally{Bi(a)}}function V6(i,e){if(e)for(let t=e.length-1;t>=0;t--){let n=e[t];if(i===n.name)return n}}function Wi(i,e,t,n){let r=i+Xt,o=mt(),s=Lg(o,r);return qO(o,r)?YO(o,au(),e,s.transform,t,n,s):s.transform(t,n)}function uw(i,e,t,n,r){let o=i+Xt,s=mt(),a=Lg(s,o);return qO(s,o)?z6(s,au(),e,a.transform,t,n,r,a):a.transform(t,n,r)}function qO(i,e){return i[tt].data[e].pure}function il(i,e){return U0(i,e)}var KO=(()=>{class i{applicationErrorHandler=Q(ia);appRef=Q(Ir);taskService=Q(Ja);ngZone=Q(or);zonelessEnabled=Q(Ah);tracing=Q(vs,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ui;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Sh):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(Q(a1,{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?l2:i1;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(Sh+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 ZO(){return[{provide:ls,useExisting:KO},{provide:or,useClass:Ch},{provide:Ah,useValue:!0}]}function G6(){return typeof $localize<"u"&&$localize.locale||ep}var np=new qe("",{factory:()=>Q(np,{optional:!0,skipSelf:!0})||G6()});var ip=class{destroyed=!1;listeners=null;errorHandler=Q(Zr,{optional:!0});destroyRef=Q(sr);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new Ke(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?.indexOf(e);t!==void 0&&t!==-1&&this.listeners?.splice(t,1)}}}emit(e){if(this.destroyed){console.warn(Ks(953,!1));return}if(this.listeners===null)return;let t=lt(null);try{for(let n of this.listeners)try{n(e)}catch(r){this.errorHandler?.handleError(r)}}finally{lt(t)}}};function gn(i){return bI(i)}function De(i,e){return hh(i,e?.equal)}var gw={JSACTION:"__jsaction",OWNER:"__owner"},tR={};function H6(i){return i[gw.JSACTION]}function JO(i,e){i[gw.JSACTION]=e}function j6(i){return tR[i]}function W6(i,e){tR[i]=e}var ft={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"},$6=[ft.MOUSEENTER,ft.MOUSELEAVE,"pointerenter","pointerleave"],vfe=[ft.CLICK,ft.DBLCLICK,ft.FOCUSIN,ft.FOCUSOUT,ft.KEYDOWN,ft.KEYUP,ft.KEYPRESS,ft.MOUSEOVER,ft.MOUSEOUT,ft.SUBMIT,ft.TOUCHSTART,ft.TOUCHEND,ft.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"],X6=[ft.FOCUS,ft.BLUR,ft.ERROR,ft.LOAD,ft.TOGGLE],vw=i=>X6.indexOf(i)>=0;function Y6(i){return i===ft.MOUSEENTER?ft.MOUSEOVER:i===ft.MOUSELEAVE?ft.MOUSEOUT:i===ft.POINTERENTER?ft.POINTEROVER:i===ft.POINTERLEAVE?ft.POINTEROUT:i}function q6(i,e,t,n){let r=!1;vw(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 K6(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 Z6(i){i.preventDefault?i.preventDefault():i.returnValue=!1}var QO=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function J6(i){return i.which===2||i.which==null&&i.button===4}function Q6(i){return QO&&i.metaKey||!QO&&i.ctrlKey||J6(i)||i.shiftKey}function e8(i,e,t){let n=i.relatedTarget;return(i.type===ft.MOUSEOVER&&e===ft.MOUSEENTER||i.type===ft.MOUSEOUT&&e===ft.MOUSELEAVE||i.type===ft.POINTEROVER&&e===ft.POINTERENTER||i.type===ft.POINTEROUT&&e===ft.POINTERLEAVE)&&(!n||n!==t&&!t.contains(n))}function t8(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===ft.MOUSEOVER?t.type=ft.MOUSEENTER:i.type===ft.MOUSEOUT?t.type=ft.MOUSELEAVE:i.type===ft.POINTEROVER?t.type=ft.POINTERENTER:t.type=ft.POINTERLEAVE,t.target=t.srcElement=e,t.bubbles=!1,t._originalEvent=i,t}var n8=typeof navigator<"u"&&/iPhone|iPad|iPod/.test(navigator.userAgent),Q0=class{element;handlerInfos=[];constructor(e){this.element=e}addEventListener(e,t,n){n8&&(this.element.style.cursor="pointer"),this.handlerInfos.push(q6(this.element,e,t(this.element),n))}cleanUp(){for(let e=0;e<this.handlerInfos.length;e++)K6(this.element,this.handlerInfos[e]);this.handlerInfos=[]}},i8={NAMESPACE_ACTION_SEPARATOR:".",EVENT_ACTION_SEPARATOR:":"};function rl(i){return i.eventType}function bw(i,e){i.eventType=e}function Z0(i){return i.event}function nR(i,e){i.event=e}function iR(i){return i.targetElement}function rR(i,e){i.targetElement=e}function oR(i){return i.eic}function r8(i,e){i.eic=e}function o8(i){return i.timeStamp}function s8(i,e){i.timeStamp=e}function J0(i){return i.eia}function sR(i,e,t){i.eia=[e,t]}function fw(i){i.eia=void 0}function K0(i){return i[1]}function a8(i){return i.eirp}function aR(i,e){i.eirp=e}function lR(i){return i.eir}function cR(i,e){i.eir=e}function dR(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 l8(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 hw=class i{eventInfo;constructor(e){this.eventInfo=e}getEventType(){return rl(this.eventInfo)}setEventType(e){bw(this.eventInfo,e)}getEvent(){return Z0(this.eventInfo)}setEvent(e){nR(this.eventInfo,e)}getTargetElement(){return iR(this.eventInfo)}setTargetElement(e){rR(this.eventInfo,e)}getContainer(){return oR(this.eventInfo)}setContainer(e){r8(this.eventInfo,e)}getTimestamp(){return o8(this.eventInfo)}setTimestamp(e){s8(this.eventInfo,e)}getAction(){let e=J0(this.eventInfo);if(e)return{name:e[0],element:e[1]}}setAction(e){if(!e){fw(this.eventInfo);return}sR(this.eventInfo,e.name,e.element)}getIsReplay(){return a8(this.eventInfo)}setIsReplay(e){aR(this.eventInfo,e)}getResolved(){return lR(this.eventInfo)}setResolved(e){cR(this.eventInfo,e)}clone(){return new i(dR(this.eventInfo))}},c8={},d8=/\s*;\s*/,u8=ft.CLICK,pw=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&&rl(e)===ft.CLICK&&Q6(Z0(e))?bw(e,ft.CLICKMOD):this.a11yClickSupport&&this.updateEventInfoForA11yClick(e)}resolveAction(e){lR(e)||(this.populateAction(e,iR(e)),cR(e,!0))}resolveParentAction(e){let t=J0(e),n=t&&K0(t);fw(e);let r=n&&this.getParentNode(n);r&&this.populateAction(e,r)}populateAction(e,t){let n=t;for(;n&&n!==oR(e)&&(n.nodeType===Node.ELEMENT_NODE&&this.populateActionOnElement(n,e),!J0(e));)n=this.getParentNode(n);let r=J0(e);if(r&&(this.a11yClickSupport&&this.preventDefaultForA11yClick(e),this.syntheticMouseEventSupport&&(rl(e)===ft.MOUSEENTER||rl(e)===ft.MOUSELEAVE||rl(e)===ft.POINTERENTER||rl(e)===ft.POINTERLEAVE)))if(e8(Z0(e),rl(e),K0(r))){let o=t8(Z0(e),K0(r));nR(e,o),rR(e,K0(r))}else fw(e)}getParentNode(e){let t=e[gw.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[rl(t)];r!==void 0&&sR(t,r,e),this.a11yClickSupport&&this.populateClickOnlyAction(e,t,n)}parseActions(e){let t=H6(e);if(!t){let n=e.getAttribute(qg.JSACTION);if(!n)t=c8,JO(e,t);else{if(t=j6(n),!t){t={};let r=n.split(d8);for(let o=0;o<r.length;o++){let s=r[o];if(!s)continue;let a=s.indexOf(i8.EVENT_ACTION_SEPARATOR),l=a!==-1,c=l?s.substr(0,a).trim():u8,d=l?s.substr(a+1).trim():s;t[c]=d}W6(n,t)}JO(e,t)}}return t}addA11yClickSupport(e,t,n){this.a11yClickSupport=!0,this.updateEventInfoForA11yClick=e,this.preventDefaultForA11yClick=t,this.populateClickOnlyAction=n}},uR=(function(i){return i[i.I_AM_THE_JSACTION_FRAMEWORK=0]="I_AM_THE_JSACTION_FRAMEWORK",i})(uR||{}),mw=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 hw(e);this.actionResolver?.resolveEventType(e),this.actionResolver?.resolveAction(e);let n=t.getAction();if(n&&f8(n.element,t)&&Z6(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 f8(i,e){return i.tagName==="A"&&(e.getEventType()===ft.CLICK||e.getEventType()===ft.CLICKMOD)}var fR=Symbol.for("propagationStopped"),yw={REPLAY:101};var h8="`preventDefault` called during event replay.";var p8="`composedPath` called during event replay.",ev=class{dispatchDelegate;clickModSupport;actionResolver;dispatcher;constructor(e,t=!0){this.dispatchDelegate=e,this.clickModSupport=t,this.actionResolver=new pw({clickModSupport:t}),this.dispatcher=new mw(n=>{this.dispatchToDelegate(n)},{actionResolver:this.actionResolver})}dispatch(e){this.dispatcher.dispatch(e)}dispatchToDelegate(e){for(e.getIsReplay()&&v8(e),m8(e);e.getAction();){if(b8(e),vw(e.getEventType())&&e.getAction().element!==e.getTargetElement()||(this.dispatchDelegate(e.getEvent(),e.getAction().name),g8(e)))return;this.actionResolver.resolveParentAction(e.eventInfo)}}};function m8(i){let e=i.getEvent(),t=i.getEvent().stopPropagation.bind(e),n=()=>{e[fR]=!0,t()};kc(e,"stopPropagation",n),kc(e,"stopImmediatePropagation",n)}function g8(i){return!!i.getEvent()[fR]}function v8(i){let e=i.getEvent(),t=i.getTargetElement(),n=e.preventDefault.bind(e);kc(e,"target",t),kc(e,"eventPhase",yw.REPLAY),kc(e,"preventDefault",()=>{throw n(),new Error(h8+"")}),kc(e,"composedPath",()=>{throw new Error(p8+"")})}function b8(i){let e=i.getEvent(),t=i.getAction()?.element;t&&kc(e,"currentTarget",t,{configurable:!0})}function kc(i,e,t,{configurable:n=!1}={}){Object.defineProperty(i,e,{value:t,configurable:n})}function hR(i,e){i.ecrd(t=>{e.dispatch(t)},uR.I_AM_THE_JSACTION_FRAMEWORK)}function y8(i){return i?.q??[]}function x8(i){i&&(eR(i.c,i.et,i.h),eR(i.c,i.etc,i.h,!0))}function eR(i,e,t,n){for(let r=0;r<e.length;r++)i.removeEventListener(e[r],t,n)}var _8=!1,pR=(()=>{class i{static MOUSE_SPECIAL_SUPPORT=_8;containerManager;eventHandlers={};browserEventTypeToExtraEventTypes={};dispatcher=null;queuedEventInfos=[];constructor(t){this.containerManager=t}handleEvent(t,n,r){let o=l8(t,n,n.target,r,Date.now());this.handleEventInfo(o)}handleEventInfo(t){if(!this.dispatcher){aR(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&&$6.indexOf(t)>=0)return;let o=(a,l,c)=>{this.handleEvent(a,l,c)};this.eventHandlers[t]=o;let s=Y6(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),x8(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=dR(r);bw(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 mR(i,e=window){return y8(e._ejsas?.[i])}function xw(i,e=window){e._ejsas&&(e._ejsas[i]=void 0)}var iv=Symbol("InputSignalNode#UNSET"),wR=ue(R({},Jm),{transformFn:void 0,applyValueToInputSignal(i,e){ac(i,e)}});function ER(i,e){let t=Object.create(wR);t.value=i,t.transformFn=e?.transform;function n(){if(rc(t),t.value===iv){let r=null;throw new Ke(-950,r)}return t.value}return n[Qn]=t,n}function kt(i){return new ip}function gR(i,e){return ER(i,e)}function B8(i){return ER(iv,i)}var Me=(gR.required=B8,gR);function vR(i,e){return mO(e)}function z8(i,e){return gO(e)}var Pu=(vR.required=z8,vR);function MR(i,e){let t=Object.create(wR),n=new ip;t.value=i;function r(){return rc(t),bR(t.value),t.value}return r[Qn]=t,r.asReadonly=Xg.bind(r),r.set=o=>{t.equal(t.value,o)||(ac(t,o),n.emit(o))},r.update=o=>{bR(t.value),r.set(o(t.value))},r.subscribe=n.subscribe.bind(n),r.destroyRef=n.destroyRef,r}function bR(i){if(i===iv)throw new Ke(952,!1)}function yR(i,e){return MR(i,e)}function V8(i){return MR(iv,i)}var xs=(yR.required=V8,yR);var _w=new qe(""),G8=new qe("");function rp(i){return!i.moduleRef}function H8(i){let e=rp(i)?i.r3Injector:i.moduleRef.injector,t=e.get(or);return t.run(()=>{rp(i)?i.r3Injector.resolveInjectorInitializers():i.moduleRef.resolveInjectorInitializers();let n=e.get(ia),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:n})}),rp(i)){let o=()=>e.destroy(),s=i.platformInjector.get(_w);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>i.moduleRef.destroy(),s=i.platformInjector.get(_w);s.add(o),i.moduleRef.onDestroy(()=>{kh(i.allPlatformModules,i.moduleRef),r.unsubscribe(),s.delete(o)})}return W8(n,t,()=>{let o=e.get(Ja),s=o.add(),a=e.get(iw);return a.runInitializers(),a.donePromise.then(()=>{let l=e.get(np,ep);if(kO(l||ep),!e.get(G8,!0))return rp(i)?e.get(Ir):(i.allPlatformModules.push(i.moduleRef),i.moduleRef);if(rp(i)){let d=e.get(Ir);return i.rootComponent!==void 0&&d.bootstrap(i.rootComponent),d}else return j8?.(i.moduleRef,i.allPlatformModules),i.moduleRef}).finally(()=>{o.remove(s)})})})}var j8;function W8(i,e,t){try{let n=t();return Tu(n)?n.catch(r=>{throw e.runOutsideAngular(()=>i(r)),r}):n}catch(n){throw e.runOutsideAngular(()=>i(n)),n}}var nv=null;function $8(i=[],e){return Di.create({name:e,providers:[{provide:Mh,useValue:"platform"},{provide:_w,useValue:new Set([()=>nv=null])},...i]})}function X8(i=[]){if(nv)return nv;let e=$8(i);return nv=e,MO(),Y8(e),e}function Y8(i){let e=i.get(S0,null);tu(i,()=>{e?.forEach(t=>t())})}var tv=new WeakSet,xR="";function _R(i){return i.get(gC,kP)}function TR(){let i=[{provide:gC,useFactory:()=>{let e=!0;{let t=Q(gs);e=!!window._ejsas?.[t]}return e&&Ro("NgEventReplay"),e}}];return i.push({provide:Js,useValue:()=>{let e=Q(Ir),{injector:t}=e;if(!tv.has(e)){let n=Q(vC);if(_R(t)){HP();let r=t.get(gs),o=VP(r,(s,a,l)=>{s.nodeType===Node.ELEMENT_NODE&&(LP(s,a,l),UP(s,n))});e.onDestroy(o)}}},multi:!0},{provide:Du,useFactory:()=>{let e=Q(Ir),{injector:t}=e;return()=>{if(!_R(t)||tv.has(e))return;tv.add(e);let n=t.get(gs);e.onDestroy(()=>{tv.delete(e),xw(n)}),e.whenStable().then(()=>{if(e.destroyed)return;let r=t.get(zP);q8(r,t);let o=t.get(vC);o.get(xR)?.forEach(BP),o.delete(xR);let s=r.instance;KP(t)?e.onDestroy(()=>s.cleanUp()):s.cleanUp()})}},multi:!0}),i}var q8=(i,e)=>{let t=e.get(gs),n=window._ejsas[t],r=i.instance=new pR(new Q0(n.c));for(let a of n.et)r.addEvent(a);for(let a of n.etc)r.addEvent(a);let o=mR(t);r.replayEarlyEventInfos(o),xw(t);let s=new ev(a=>{K8(e,a,a.currentTarget)});hR(r,s)};function K8(i,e,t){let n=(t&&t.getAttribute(Xh))??"";/d\d+/.test(n)?Z8(n,i,e,t):e.eventPhase===yw.REPLAY&&bC(e,t)}function Z8(i,e,t,n){let r=e.get(FP);r.push({event:t,currentTarget:n}),PO(e,i,J8(r))}function J8(i){return e=>{let t=new Set(e),n=[];for(let{event:r,currentTarget:o}of i){let s=o.getAttribute(Xh);t.has(s)?bC(r,o):n.push({event:r,currentTarget:o})}i.length=0,i.push(...n)}}var SR=!1;var Q8=1e4;function ej(){SR||(SR=!0,XP(),AO(),jO(),RO(),SO(),dO(),qA(),PA())}function tj(i){return i.whenStable()}function DR(){let i=[{provide:$h,useFactory:()=>{let e=!0;return e=!!Q(_u,{optional:!0})?.get(yC,null),e&&Ro("NgHydration"),e}},{provide:Js,useValue:()=>{WA(!1);let e=Q(wn);Q($h)&&(QP(e),ej())},multi:!0}];return i.push({provide:mC,useFactory:()=>Q($h)},{provide:Du,useFactory:()=>{let e=Q(ls);if(Q($h)){let t=Q(Ir);return()=>{tj(t).then(()=>{t.destroyed||(XC(t),e.notify(7))})}}return()=>{}},multi:!0}),Qs(i)}var d0e=Q8-1e3;var rv=(()=>{class i{static __NG_ELEMENT_ID__=nj}return i})();function nj(i){return ij(xi(),mt(),(i&16)===16)}function ij(i,e,t){if(fs(i)&&!t){let n=no(i.index,e);return new Qa(n,n)}else if(i.type&175){let n=e[ci];return new Qa(n,e)}return null}function IR(i){let{rootComponent:e,appProviders:t,platformProviders:n,platformRef:r}=i;tn(Wt.BootstrapApplicationStart);try{let o=r?.injector??X8(n),s=[ZO(),d2,...t||[]],a=new Vh({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return H8({r3Injector:a.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{tn(Wt.BootstrapApplicationEnd)}}function ov(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function PR(i,e){let t=Zs(i),n=e.elementInjector||eu();return new vu(t).create(n,e.projectableNodes,e.hostElement,e.environmentInjector,e.directives,e.bindings)}var AR=null;function lo(){return AR}function Sw(i){AR??=i}var op=class{},sv=(()=>{class i{historyGo(t){throw new Error("")}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:()=>Q(OR),providedIn:"platform"})}return i})();var OR=(()=>{class i extends sv{_location;_history;_doc=Q(wn);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return lo().getBaseHref(this._doc)}onPopState(t){let n=lo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",t,!1),()=>n.removeEventListener("popstate",t)}onHashChange(t){let n=lo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",t,!1),()=>n.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:()=>new i,providedIn:"platform"})}return i})();var Ew=(function(i){return i[i.Decimal=0]="Decimal",i[i.Percent=1]="Percent",i[i.Currency=2]="Currency",i[i.Scientific=3]="Scientific",i})(Ew||{});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 Au(i,e){let t=X0(i),n=t[Ac.NumberSymbols][e];if(typeof n>"u"){if(e===_s.CurrencyDecimal)return t[Ac.NumberSymbols][_s.Decimal];if(e===_s.CurrencyGroup)return t[Ac.NumberSymbols][_s.Group]}return n}function kR(i,e){return X0(i)[Ac.NumberFormats][e]}var rj=/^(\d+)?\.((\d+)(-(\d+))?)?$/,RR=22,av=".",sp="0",oj=";",sj=",",Cw="#";function aj(i,e,t,n,r,o,s=!1){let a="",l=!1;if(!isFinite(i))a=Au(t,_s.Infinity);else{let c=dj(i);s&&(c=cj(c));let d=e.minInt,u=e.minFrac,f=e.maxFrac;if(o){let b=o.match(rj);if(b===null)throw new Ke(2306,!1);let y=b[1],x=b[3],_=b[5];y!=null&&(d=ww(y)),x!=null&&(u=ww(x)),_!=null?f=ww(_):x!=null&&u>f&&(f=u)}uj(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(Au(t,n)),g.length&&(a+=Au(t,r)+g.join("")),v&&(a+=Au(t,_s.Exponential)+"+"+v)}return i<0&&!l?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function FR(i,e,t){let n=kR(e,Ew.Decimal),r=lj(n,Au(e,_s.MinusSign));return aj(i,r,e,_s.Group,_s.Decimal,t)}function lj(i,e="-"){let t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(oj),r=n[0],o=n[1],s=r.indexOf(av)!==-1?r.split(av):[r.substring(0,r.lastIndexOf(sp)+1),r.substring(r.lastIndexOf(sp)+1)],a=s[0],l=s[1]||"";t.posPre=a.substring(0,a.indexOf(Cw));for(let d=0;d<l.length;d++){let u=l.charAt(d);u===sp?t.minFrac=t.maxFrac=d+1:u===Cw?t.maxFrac=d+1:t.posSuf+=u}let c=a.split(sj);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(Cw);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 cj(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 dj(i){let e=Math.abs(i)+"",t=0,n,r,o,s,a;for((r=e.indexOf(av))>-1&&(e=e.replace(av,"")),(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)===sp;o++);if(o===(a=e.length))n=[0],r=1;else{for(a--;e.charAt(a)===sp;)a--;for(r-=o,n=[],s=0;o<=a;o++,s++)n[s]=Number(e.charAt(o))}return r>RR&&(n=n.splice(0,RR-1),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}function uj(i,e,t){if(e>t)throw new Ke(2307,!1);let n=i.digits,r=n.length-i.integerLen,o=Math.min(Math.max(e,r),t),s=o+i.integerLen,a=n[s];if(s>0){n.splice(Math.max(i.integerLen,s));for(let u=s;u<n.length;u++)n[u]=0}else{r=Math.max(0,r),i.integerLen=1,n.length=Math.max(1,s=o+1),n[0]=0;for(let u=1;u<s;u++)n[u]=0}if(a>=5)if(s-1<0){for(let u=0;u>s;u--)n.unshift(0),i.integerLen++;n.unshift(1),i.integerLen++}else n[s-1]++;for(;r<Math.max(0,o);r++)n.push(0);let l=o!==0,c=e+i.integerLen,d=n.reduceRight(function(u,f,h,p){return f=f+u,p[h]=f<10?f:f-10,l&&(p[h]===0&&h>=c?p.pop():l=!1),f>=10?1:0},0);d&&(n.unshift(d),i.integerLen++)}function ww(i){let e=parseInt(i);if(isNaN(e))throw new Ke(2305,!1);return e}var Fc=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=Q(Di);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static \u0275fac=function(n){return new(n||i)($t(Eu))};static \u0275dir=Zn({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[yu]})}return i})();function NR(i,e){return new Ke(2100,!1)}var Nc=(()=>{class i{_locale;constructor(t){this._locale=t}transform(t,n,r){if(!fj(t))return null;r||=this._locale;try{let o=hj(t);return FR(o,r,n)}catch(o){throw NR(i,o.message)}}static \u0275fac=function(n){return new(n||i)($t(np,16))};static \u0275pipe=$0({name:"number",type:i,pure:!0})}return i})();function fj(i){return!(i==null||i===""||i!==i)}function hj(i){if(typeof i=="string"&&!isNaN(Number(i)-parseFloat(i)))return Number(i);if(typeof i!="number")throw new Ke(2309,!1);return i}var Mw=(()=>{class i{transform(t,n,r){if(t==null)return null;if(!(typeof t=="string"||Array.isArray(t)))throw NR(i,t);return t.slice(n,r)}static \u0275fac=function(n){return new(n||i)};static \u0275pipe=$0({name:"slice",type:i,pure:!1})}return i})();var qt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=cs({})}return i})();function ap(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 Lc=class{};var LR="browser";var lp=class{_doc;constructor(e){this._doc=e}manager},cv=(()=>{class i extends lp{constructor(t){super(t)}supports(t){return!0}addEventListener(t,n,r,o){return t.addEventListener(n,r,o),()=>this.removeEventListener(t,n,r,o)}removeEventListener(t,n,r,o){return t.removeEventListener(n,r,o)}static \u0275fac=function(n){return new(n||i)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),fv=new qe(""),Pw=(()=>{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 cv));this._plugins=r.slice().reverse();let o=t.find(s=>s instanceof cv);o&&this._plugins.push(o)}addEventListener(t,n,r,o){return this._findPluginFor(n).addEventListener(t,n,r,o)}getZone(){return this._zone}_findPluginFor(t){let n=this._eventNameToPlugin.get(t);if(n)return n;if(n=this._plugins.find(o=>o.supports(t)),!n)throw new Ke(5101,!1);return this._eventNameToPlugin.set(t,n),n}static \u0275fac=function(n){return new(n||i)(Xe(fv),Xe(or))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),Tw="ng-app-id";function UR(i){for(let e of i)e.remove()}function BR(i,e){let t=e.createElement("style");return t.textContent=i,t}function mj(i,e,t,n){let r=i.head?.querySelectorAll(`style[${Tw}="${e}"],link[${Tw}="${e}"]`);if(r)for(let o of r)o.removeAttribute(Tw),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 Iw(i,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),t}var Aw=(()=>{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,mj(t,n,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,n){for(let r of t)this.addUsage(r,this.inline,BR);n?.forEach(r=>this.addUsage(r,this.external,Iw))}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&&(UR(r.elements),n.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])UR(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[n,{elements:r}]of this.inline)r.push(this.addElement(t,BR(n,this.doc)));for(let[n,{elements:r}]of this.external)r.push(this.addElement(t,Iw(n,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,n){return this.nonce&&n.setAttribute("nonce",this.nonce),t.appendChild(n)}static \u0275fac=function(n){return new(n||i)(Xe(wn),Xe(gs),Xe(C0,8),Xe(Wh))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),Dw={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"},Ow=/%COMP%/g;var VR="%COMP%",gj=`_nghost-${VR}`,vj=`_ngcontent-${VR}`,bj=!0,yj=new qe("",{factory:()=>bj});function xj(i){return vj.replace(Ow,i)}function _j(i){return gj.replace(Ow,i)}function GR(i,e){return e.map(t=>t.replace(Ow,i))}var Rw=(()=>{class i{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(t,n,r,o,s,a,l=null,c=null){this.eventManager=t,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=c,this.defaultRenderer=new cp(t,s,a,this.tracingService)}createRenderer(t,n){if(!t||!n)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,n);return r instanceof uv?r.applyToHost(t):r instanceof dp&&r.applyStyles(),r}getOrCreateRenderer(t,n){let r=this.rendererByCompId,o=r.get(n.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,u=this.tracingService;switch(n.encapsulation){case Po.Emulated:o=new uv(l,c,n,this.appId,d,s,a,u);break;case Po.ShadowDom:return new dv(l,t,n,s,a,this.nonce,u,c);case Po.ExperimentalIsolatedShadowDom:return new dv(l,t,n,s,a,this.nonce,u);default:o=new dp(l,c,n,d,s,a,u);break}r.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(n){return new(n||i)(Xe(Pw),Xe(Aw),Xe(gs),Xe(yj),Xe(wn),Xe(or),Xe(C0),Xe(vs,8))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),cp=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Dw[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(zR(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(zR(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new Ke(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let o=Dw[r];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Dw[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(ms.DashCase|ms.Important)?e.style.setProperty(t,n,r&ms.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&ms.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=lo().getGlobalEventTarget(this.doc,e),!e))throw new Ke(5102,!1);let o=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(e,t,o)),this.eventManager.addEventListener(e,t,o,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;e(t)===!1&&t.preventDefault()}}};function zR(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var dv=class extends cp{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,o,s,a,l){super(e,r,o,a),this.hostEl=t,this.sharedStylesHost=l,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let c=n.styles;c=GR(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=Iw(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)}},dp=class extends cp{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,o,s,a,l){super(e,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?GR(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Tc.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},uv=class extends dp{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=xj(c),this.hostAttr=_j(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 hv=class i extends op{supportsDOMEvents=!0;static makeCurrent(){Sw(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=Sj();return t==null?null:Cj(t)}resetBaseElement(){up=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return ap(document.cookie,e)}},up=null;function Sj(){return up=up||document.head.querySelector("base"),up?up.getAttribute("href"):null}function Cj(i){return new URL(i,document.baseURI).pathname}var wj=(()=>{class i{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),HR=["alt","control","meta","shift"],Ej={"\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"},Mj={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},jR=(()=>{class i extends lp{constructor(t){super(t)}supports(t){return i.parseEventName(t)!=null}addEventListener(t,n,r,o){let s=i.parseEventName(n),a=i.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>lo().onAndCancel(t,s.domEventName,a,o))}static parseEventName(t){let n=t.toLowerCase().split("."),r=n.shift();if(n.length===0||!(r==="keydown"||r==="keyup"))return null;let o=i._normalizeKey(n.pop()),s="",a=n.indexOf("code");if(a>-1&&(n.splice(a,1),s="code."),HR.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=Ej[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"),HR.forEach(s=>{if(s!==r){let a=Mj[s];a(t)&&(o+=s+".")}}),o+=r,o===n)}static eventCallback(t,n,r){return o=>{i.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>n(o))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(n){return new(n||i)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})();async function kw(i,e){return IR(Tj(i,e))}function Tj(i,e){return{platformRef:e?.platformRef,appProviders:[...Oj,...i?.providers??[]],platformProviders:Aj}}function Dj(){hv.makeCurrent()}function Ij(){return new Zr}function Pj(){return uC(document),document}var Aj=[{provide:Wh,useValue:LR},{provide:S0,useValue:Dj,multi:!0},{provide:wn,useFactory:Pj}];var Oj=[{provide:Mh,useValue:"root"},{provide:Zr,useFactory:Ij},{provide:fv,useClass:cv,multi:!0},{provide:fv,useClass:jR,multi:!0},Rw,Aw,Pw,{provide:Ic,useExisting:Rw},{provide:Lc,useClass:wj},[]];var uo=class i{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
5
- `).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=t.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new i;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...n),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}addHeaderEntry(e,t){let n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var mv=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()}},gv=class{encodeKey(e){return WR(e)}encodeValue(e){return WR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Rj(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 kj=/%(\d[a-f0-9])/gi,Fj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function WR(i){return encodeURIComponent(i).replace(kj,(e,t)=>Fj[t]??e)}function pv(i){return`${i}`}var co=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new gv,e.fromString){if(e.fromObject)throw new Ke(2805,!1);this.map=Rj(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(pv):[pv(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(pv(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(pv(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 Nj(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function $R(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function XR(i){return typeof Blob<"u"&&i instanceof Blob}function YR(i){return typeof FormData<"u"&&i instanceof FormData}function Lj(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var qR="Content-Type",KR="Accept",ZR="text/plain",JR="application/json",Uj=`${JR}, ${ZR}, */*`,Ou=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(Nj(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new Ke(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new uo,this.context??=new mv,!this.params)this.params=new co,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||$R(this.body)||XR(this.body)||YR(this.body)||Lj(this.body)?this.body:this.body instanceof co?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||YR(this.body)?null:XR(this.body)?this.body.type||null:$R(this.body)?null:typeof this.body=="string"?ZR:this.body instanceof co?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?JR:null}clone(e={}){let t=e.method||this.method,n=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,v=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,m=e.withCredentials??this.withCredentials,b=e.reportProgress??this.reportProgress,y=e.headers||this.headers,x=e.params||this.params,_=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((E,D)=>E.set(D,e.setHeaders[D]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((E,D)=>E.set(D,e.setParams[D]),x)),new i(t,n,g,{params:x,headers:y,context:_,reportProgress:b,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},Uc=(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})(Uc||{}),Ru=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new uo,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},vv=class i extends Ru{constructor(e={}){super(e)}type=Uc.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})}},ku=class i extends Ru{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Uc.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})}},ol=class extends Ru{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}},Bj=200,zj=204;var Vj=new qe("");var Gj=/^\)\]\}',?\n/;var Nw=(()=>{class i{xhrFactory;tracingService=Q(vs,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new Ke(-2800,!1);let n=this.xhrFactory;return ss(null).pipe(sS(()=>new En(o=>{let s=n.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),t.headers.has(KR)||s.setRequestHeader(KR,Uj),!t.headers.has(qR)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(qR,g)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=s.statusText||"OK",m=new uo(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new vv({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!==zj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Bj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let E=x;x=x.replace(Gj,"");try{x=x!==""?JSON.parse(x):null}catch(D){x=E,_&&(_=!1,x={error:D,text:x})}}_?(o.next(new ku({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new ol({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new ol({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 ol({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:Uc.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:Uc.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:Uc.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",f),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(n){return new(n||i)(Xe(Lc))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Hj(i,e){return e(i)}function jj(i,e,t){return(n,r)=>tu(t,()=>e(n,o=>i(o,r)))}var Lw=new qe("",{factory:()=>[]}),Uw=new qe(""),QR=new qe("",{factory:()=>!0});var Bw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(Nw),r},providedIn:"root"})}return i})();var bv=(()=>{class i{backend;injector;chain=null;pendingTasks=Q(cu);contributeToStability=Q(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(Lw),...this.injector.get(Uw,[])]));this.chain=n.reduceRight((r,o)=>jj(r,o,this.injector),Hj)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(vh(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(Xe(Bw),Xe(Ti))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(bv),r},providedIn:"root"})}return i})();function Fw(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 yv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof Ou)o=t;else{let l;r.headers instanceof uo?l=r.headers:l=new uo(r.headers);let c;r.params&&(r.params instanceof co?c=r.params:c=new co({fromObject:r.params})),o=new Ou(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(oS(l=>this.handler.handle(l)));if(t instanceof Ou||r.observe==="events")return s;let a=s.pipe(rS(l=>l instanceof ku));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Ke(2806,!1);return l.body}));case"blob":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Ke(2807,!1);return l.body}));case"text":return a.pipe(rr(l=>{if(l.body!==null&&typeof l.body!="string")throw new Ke(2808,!1);return l.body}));default:return a.pipe(rr(l=>l.body))}case"response":return a;default:throw new Ke(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new co().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,Fw(r,n))}post(t,n,r={}){return this.request("POST",t,Fw(r,n))}put(t,n,r={}){return this.request("PUT",t,Fw(r,n))}static \u0275fac=function(n){return new(n||i)(Xe(zw))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Wj=new qe("",{factory:()=>!0}),$j="XSRF-TOKEN",Xj=new qe("",{factory:()=>$j}),Yj="X-XSRF-TOKEN",qj=new qe("",{factory:()=>Yj}),Kj=(()=>{class i{cookieName=Q(Xj);doc=Q(wn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ap(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})(),ek=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(Kj),r},providedIn:"root"})}return i})();function Zj(i,e){if(!Q(Wj)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Q(sv).href,{origin:o}=new URL(r),{origin:s}=new URL(i.url,o);if(o!==s)return e(i)}catch{return e(i)}let t=Q(ek).getToken(),n=Q(qj);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var Vw=(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})(Vw||{});function Jj(i,e){return{\u0275kind:i,\u0275providers:e}}function Gw(...i){let e=[yv,bv,{provide:zw,useExisting:bv},{provide:Bw,useFactory:()=>Q(Vj,{optional:!0})??Q(Nw)},{provide:Lw,useValue:Zj,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Qs(e)}function Hw(i){return Jj(Vw.Interceptors,i.map(e=>({provide:Lw,useValue:e,multi:!0})))}var Qj=new qe(""),eW="b",tW="h",nW="s",iW="st",rW="u",oW="rt",jw=new qe(""),sW=["GET","HEAD"];function ik(i,e){let s=e,{isCacheActive:t}=s,n=en(s,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!sW.includes(o)||!n.includeRequestsWithAuthHeaders&&cW(i)||n.filter?.(i)===!1)}function rk(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function aW(i,e,t,n){let{transferCache:r}=i;if(!ik(i,e))return null;if(n)throw new Ke(2803,!1);let o=i.url,s=ok(i,o),a=t.get(s,null),l=rk(e,r);if(a){let{[eW]:c,[oW]:d,[tW]:u,[nW]:f,[iW]:h,[rW]:p}=a,v=c;switch(d){case"arraybuffer":v=nk(c);break;case"blob":v=new Blob([nk(c)]);break}let g=new uo(u);return new ku({body:v,headers:g,status:f,statusText:h,url:p})}return null}function lW(i,e){let t=Q(jw),n=Q(_u),r=Q(Qj,{optional:!0}),o=aW(i,t,n,r);if(o)return ss(o);let{transferCache:s}=i,a=rk(t,s),l=i.url,c=ok(i,l);return ik(i,t),e(i)}function cW(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function tk(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function ok(i,e){let{params:t,method:n,responseType:r}=i,o=tk(t),s=i.serializeBody();s instanceof URLSearchParams?s=tk(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=dW(a);return l}function dW(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function nk(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function sk(i){return[{provide:jw,useFactory:()=>(Ro("NgHttpTransferCache"),R({isCacheActive:!0},i))},{provide:Uw,useValue:lW,multi:!0},{provide:Du,multi:!0,useFactory:()=>{let e=Q(Ir),t=Q(jw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var fp=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(uW),r},providedIn:"root"})}return i})(),uW=(()=>{class i extends fp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Oo.NONE:return n;case Oo.HTML:return sa(n,"HTML")?Ao(n):I0(this._doc,String(n)).toString();case Oo.STYLE:return sa(n,"Style")?Ao(n):n;case Oo.SCRIPT:if(sa(n,"Script"))return Ao(n);throw new Ke(5200,!1);case Oo.URL:return sa(n,"URL")?Ao(n):qh(String(n));case Oo.RESOURCE_URL:if(sa(n,"ResourceURL"))return Ao(n);throw new Ke(5201,!1);default:throw new Ke(5202,!1)}}bypassSecurityTrustHtml(t){return SC(t)}bypassSecurityTrustStyle(t){return CC(t)}bypassSecurityTrustScript(t){return wC(t)}bypassSecurityTrustUrl(t){return EC(t)}bypassSecurityTrustResourceUrl(t){return MC(t)}static \u0275fac=function(n){return new(n||i)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),xv=(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})(xv||{});function fW(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function ak(){return fW(xv.EventReplay,TR())}function lk(...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(xv.HttpTransferCacheOptions);return Qs([[],[],DR(),t.has(xv.NoHttpTransferCache)||n?[]:sk({}),e])}var Fu=class i{loadingCount=N(0);isLoading=De(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function _v(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 da=class i{toastsSignal=N([]);toasts=De(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(n=>n.id!==e))}pushToast(e,t,n){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:n,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${n}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var hp=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof ol&&this.showError(e)}showError(e){return this.toasterService.showError(_v(e)),Va(()=>e)}static \u0275fac=function(t){return new(t||i)(Xe(da))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var ck=(i,e)=>{let t=Q(hp),n=Q(Fu),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(fc(s=>(r||t.handleError(s),r?ss(null):Va(()=>s))),vh(()=>{o&&n.hide()}))};var dk=[ck];var uk={apiUrl:"https://pixeasy-api-stage-cpe7dbf2f2gtg9bp.westus3-01.azurewebsites.net/api/"};var Sv=new qe("ENV"),Cye=new qe("LOADER_DELAY");var fk={provide:Sv,useValue:uk};function hk(){return[s1(),lk(ak()),Gw(Hw(dk)),fk,Fu]}var Ck=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)($t(la),$t(Mr))};static \u0275dir=Zn({type:i})}return i})(),yp=(()=>{class i extends Ck{static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,features:[Dr]})}return i})(),sl=new qe(""),mW={provide:sl,useExisting:zi(()=>Kw),multi:!0},Kw=(()=>{class i extends yp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([mW]),Dr]})}return i})(),gW={provide:sl,useExisting:zi(()=>Uu),multi:!0};function vW(){let i=lo()?lo().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var bW=new qe(""),Uu=(()=>{class i extends Ck{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!vW())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||i)($t(la),$t(Mr),$t(bW,8))};static \u0275dir=Zn({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&ie("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[ao([gW]),Dr]})}return i})();var Zw=new qe(""),yW=new qe("");function xW(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 _W(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 pk(i){return null}function wk(i){return i!=null}function Ek(i){return Tu(i)?gh(i):i}function Mk(i){let e={};return i.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function Tk(i,e){return e.map(t=>t(i))}function SW(i){return!i.validate}function Dk(i){return i.map(e=>SW(e)?e:t=>e.validate(t))}function CW(i){if(!i)return null;let e=i.filter(wk);return e.length==0?null:function(t){return Mk(Tk(t,e))}}function Ik(i){return i!=null?CW(Dk(i)):null}function wW(i){if(!i)return null;let e=i.filter(wk);return e.length==0?null:function(t){let n=Tk(t,e).map(Ek);return iS(n).pipe(rr(Mk))}}function Pk(i){return i!=null?wW(Dk(i)):null}function mk(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function EW(i){return i._rawValidators}function MW(i){return i._rawAsyncValidators}function Ww(i){return i?Array.isArray(i)?i:[i]:[]}function wv(i,e){return Array.isArray(i)?i.includes(e):i===e}function gk(i,e){let t=Ww(e);return Ww(i).forEach(r=>{wv(t,r)||t.push(r)}),t}function vk(i,e){return Ww(e).filter(t=>!wv(i,t))}var Ev=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=Ik(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Pk(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}},$w=class extends Ev{name;get formDirective(){return null}get path(){return null}},bp=class extends Ev{_parent=null;name=null;valueAccessor=null},Xw=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 al=(()=>{class i extends Xw{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)($t(bp,2))};static \u0275dir=Zn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&pt("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:[Dr]})}return i})();var pp="VALID",Cv="INVALID",Nu="PENDING",mp="DISABLED",Bc=class{},Mv=class extends Bc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},gp=class extends Bc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},vp=class extends Bc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Lu=class extends Bc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var Yw=class extends Bc{source;constructor(e){super(),this.source=e}};function TW(i){return(Tv(i)?i.validators:i)||null}function DW(i){return Array.isArray(i)?Ik(i):i||null}function IW(i,e){return(Tv(e)?e.asyncValidators:i)||null}function PW(i){return Array.isArray(i)?Pk(i):i||null}function Tv(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var qw=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return gn(this.statusReactive)}set status(e){gn(()=>this.statusReactive.set(e))}_status=De(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===pp}get invalid(){return this.status===Cv}get pending(){return this.status==Nu}get disabled(){return this.status===mp}get enabled(){return this.status!==mp}errors;get pristine(){return gn(this.pristineReactive)}set pristine(e){gn(()=>this.pristineReactive.set(e))}_pristine=De(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return gn(this.touchedReactive)}set touched(e){gn(()=>this.touchedReactive.set(e))}_touched=De(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new Eo;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(gk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(gk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(vk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(vk(e,this._rawAsyncValidators))}hasValidator(e){return wv(this._rawValidators,e)}hasAsyncValidator(e){return wv(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new vp(!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 vp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new gp(!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 gp(!0,n))}markAsPending(e={}){this.status=Nu;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Lu(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(ue(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=mp,this.errors=null,this._forEachChild(r=>{r.disable(ue(R({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Mv(this.value,n)),this._events.next(new Lu(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=pp,this._forEachChild(n=>{n.enable(ue(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===pp||this.status===Nu)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Mv(this.value,t)),this._events.next(new Lu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(ue(R({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?mp:pp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Nu,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=Ek(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 Lu(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new yr,this.statusChanges=new yr}_calculateStatus(){return this._allControlsDisabled()?mp:this.errors?Cv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Nu)?Nu:this._anyControlsHaveStatus(Cv)?Cv:pp}_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 gp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new vp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Tv(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=DW(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=PW(this._rawAsyncValidators)}};var Ak=new qe("",{factory:()=>Jw}),Jw="always";function AW(i,e){return[...e.path,i]}function OW(i,e,t=Jw){kW(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),FW(i,e),LW(i,e),NW(i,e),RW(i,e)}function bk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function RW(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function kW(i,e){let t=EW(i);e.validator!==null?i.setValidators(mk(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=MW(i);e.asyncValidator!==null?i.setAsyncValidators(mk(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();bk(e._rawValidators,r),bk(e._rawAsyncValidators,r)}function FW(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Ok(i,e)})}function NW(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Ok(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Ok(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function LW(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function UW(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function BW(i){return Object.getPrototypeOf(i.constructor)===yp}function zW(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===Uu?t=o:BW(o)?n=o:r=o}),r||n||t||null}function yk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function xk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var VW=class extends qw{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(TW(t),IW(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Tv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(xk(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 Yw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){yk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){yk(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){xk(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 GW={provide:bp,useExisting:zi(()=>ua)},_k=Promise.resolve(),ua=(()=>{class i extends bp{_changeDetectorRef;callSetDisabledState;control=new VW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yr;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=zW(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),UW(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(){OW(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){_k.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&ov(n);_k.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?AW(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)($t($w,9),$t(Zw,10),$t(yW,10),$t(sl,10),$t(rv,8),$t(Ak,8))};static \u0275dir=Zn({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[ao([GW]),Dr,yu]})}return i})();var HW={provide:sl,useExisting:zi(()=>xp),multi:!0},xp=(()=>{class i extends yp{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=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&ie("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([HW]),Dr]})}return i})();var jW={provide:sl,useExisting:zi(()=>Dv),multi:!0};function Rk(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function WW(i){return i.split(":")[0]}var Dv=(()=>{class i extends yp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Q(Ir).injector;destroyRef=Q(sr);cdr=Q(rv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,R0({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=Rk(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=WW(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([jW]),Dr]})}return i})(),kk=(()=>{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(Rk(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(n){return new(n||i)($t(Mr),$t(la),$t(Dv,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),$W={provide:sl,useExisting:zi(()=>Fk),multi:!0};function Sk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function XW(i){return i.split(":")[0]}var Fk=(()=>{class i extends yp{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=XW(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([$W]),Dr]})}return i})(),Nk=(()=>{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(Sk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Sk(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||i)($t(Mr),$t(la),$t(Fk,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function Lk(i){return typeof i=="number"?i:parseFloat(i)}var Uk=(()=>{class i{_validator=pk;_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):pk,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:[yu]})}return i})(),YW={provide:Zw,useExisting:zi(()=>_p),multi:!0},_p=(()=>{class i extends Uk{max;inputName="max";normalizeInput=t=>Lk(t);createValidator=t=>_W(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[ao([YW]),Dr]})}return i})(),qW={provide:Zw,useExisting:zi(()=>Sp),multi:!0},Sp=(()=>{class i extends Uk{min;inputName="min";normalizeInput=t=>Lk(t);createValidator=t=>xW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[ao([qW]),Dr]})}return i})();var KW=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=cs({})}return i})();var fo=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Ak,useValue:t.callSetDisabledState??Jw}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=cs({imports:[KW]})}return i})();var _l={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Sl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},hF=0,kE=1,pF=2;var Xp=1,mF=2,gf=3,Xi=0,Ki=1,Es=2,Ms=0,Wc=1,FE=2,NE=3,LE=4,gF=5,ml=100,vF=101,bF=102,yF=103,xF=104,_F=200,SF=201,CF=202,wF=203,Qv=204,eb=205,EF=206,MF=207,TF=208,DF=209,IF=210,PF=211,AF=212,OF=213,RF=214,Eb=0,Mb=1,Tb=2,$c=3,Db=4,Ib=5,Pb=6,Ab=7,Ob=0,kF=1,FF=2,Bo=0,UE=1,BE=2,zE=3,td=4,VE=5,GE=6,HE=7;var SE=300,Cl=301,nd=302,Rb=303,kb=304,Yp=306,tf=1e3,Oi=1001,tb=1002,hi=1003,NF=1004;var qp=1005;var jn=1006,Fb=1007;var go=1008;var lr=1009,jE=1010,WE=1011,vf=1012,Nb=1013,zo=1014,Vo=1015,Ts=1016,Lb=1017,Ub=1018,bf=1020,$E=35902,XE=35899,YE=1021,qE=1022,vo=1023,Ss=1026,wl=1027,KE=1028,Bb=1029,id=1030,zb=1031;var Vb=1033,Kp=33776,Zp=33777,Jp=33778,Qp=33779,Gb=35840,Hb=35841,jb=35842,Wb=35843,$b=36196,Xb=37492,Yb=37496,qb=37488,Kb=37489,Zb=37490,Jb=37491,Qb=37808,ey=37809,ty=37810,ny=37811,iy=37812,ry=37813,oy=37814,sy=37815,ay=37816,ly=37817,cy=37818,dy=37819,uy=37820,fy=37821,hy=36492,py=36494,my=36495,gy=36283,vy=36284,by=36285,yy=36286;var Pp=2300,nb=2301,Jv=2302,CE=2400,wE=2401,EE=2402;var LF=3200;var xy=0,UF=1,wa="",bn="srgb",Xc="srgb-linear",Ap="linear",on="srgb";var jc=7680;var ME=519,BF=512,zF=513,VF=514,_y=515,GF=516,HF=517,Sy=518,jF=519,TE=35044;var ZE="300 es",Lo=2e3,Op=2001;function JE(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function ZW(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function nf(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function WF(){let i=nf("canvas");return i.style.display="block",i}var Bk={},rf=null;function QE(...i){let e="THREE."+i.shift();rf?rf("log",e,...i):console.log(e,...i)}function ht(...i){let e="THREE."+i.shift();rf?rf("warn",e,...i):console.warn(e,...i)}function yt(...i){let e="THREE."+i.shift();rf?rf("error",e,...i):console.error(e,...i)}function of(...i){let e=i.join(" ");e in Bk||(Bk[e]=!0,ht(...i))}function $F(i,e,t){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}var Cs=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Pi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],zk=1234567,Dp=Math.PI/180,sf=180/Math.PI;function yf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Pi[i&255]+Pi[i>>8&255]+Pi[i>>16&255]+Pi[i>>24&255]+"-"+Pi[e&255]+Pi[e>>8&255]+"-"+Pi[e>>16&15|64]+Pi[e>>24&255]+"-"+Pi[t&63|128]+Pi[t>>8&255]+"-"+Pi[t>>16&255]+Pi[t>>24&255]+Pi[n&255]+Pi[n>>8&255]+Pi[n>>16&255]+Pi[n>>24&255]).toLowerCase()}function Ht(i,e,t){return Math.max(e,Math.min(t,i))}function eM(i,e){return(i%e+e)%e}function JW(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function QW(i,e,t){return i!==e?(t-i)/(e-i):0}function Ip(i,e,t){return(1-t)*i+t*e}function e9(i,e,t,n){return Ip(i,e,1-Math.exp(-t*n))}function t9(i,e=1){return e-Math.abs(eM(i,e*2)-e)}function n9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function i9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function r9(i,e){return i+Math.floor(Math.random()*(e-i+1))}function o9(i,e){return i+Math.random()*(e-i)}function s9(i){return i*(.5-Math.random())}function a9(i){i!==void 0&&(zk=i);let e=zk+=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 l9(i){return i*Dp}function c9(i){return i*sf}function d9(i){return(i&i-1)===0&&i!==0}function u9(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function f9(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function h9(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:ht("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Ju(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function $i(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var nn={DEG2RAD:Dp,RAD2DEG:sf,generateUUID:yf,clamp:Ht,euclideanModulo:eM,mapLinear:JW,inverseLerp:QW,lerp:Ip,damp:e9,pingpong:t9,smoothstep:n9,smootherstep:i9,randInt:r9,randFloat:o9,randFloatSpread:s9,seededRandom:a9,degToRad:l9,radToDeg:c9,isPowerOfTwo:d9,ceilPowerOfTwo:u9,floorPowerOfTwo:f9,setQuaternionFromProperEuler:h9,normalize:$i,denormalize:Ju},gt=class i{constructor(e=0,t=0){i.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Ht(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*n-s*r+e.x,this.y=o*r+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},mo=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,o,s,a){let l=n[r+0],c=n[r+1],d=n[r+2],u=n[r+3],f=o[s+0],h=o[s+1],p=o[s+2],v=o[s+3];if(a<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(a>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=v;return}if(u!==v||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*v;g<0&&(f=-f,h=-h,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let b=Math.acos(g),y=Math.sin(b);m=Math.sin(m*b)/y,a=Math.sin(a*b)/y,l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a}else{l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a;let b=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=b,c*=b,d*=b,u*=b}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,o,s){let a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],u=o[s],f=o[s+1],h=o[s+2],p=o[s+3];return e[t]=a*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-a*h,e[t+2]=c*p+d*h+a*f-l*u,e[t+3]=d*p-a*u-l*f-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(r/2),u=a(o/2),f=l(n/2),h=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:ht("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],d=t[6],u=t[10],f=n+a+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(s-r)*h}else if(n>a&&n>u){let h=2*Math.sqrt(1+n-a-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+s)/h,this._z=(o+c)/h}else if(a>u){let h=2*Math.sqrt(1+a-n-u);this._w=(o-c)/h,this._x=(r+s)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-n-a);this._w=(s-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ht(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-n*c,this._z=o*d+s*c+n*l-r*a,this._w=s*d-n*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(n=-n,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},G=class i{constructor(e=0,t=0,n=0){i.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Vk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Vk.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*r,this.y=o[1]*t+o[4]*n+o[7]*r,this.z=o[2]*t+o[5]*n+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*n+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*n+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*r-a*n),d=2*(a*t-o*r),u=2*(o*n-s*t);return this.x=t+l*c+s*u-a*d,this.y=n+l*d+a*c-o*u,this.z=r+l*u+o*d-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r,this.y=o[1]*t+o[5]*n+o[9]*r,this.z=o[2]*t+o[6]*n+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=r*l-o*a,this.y=o*s-n*l,this.z=n*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return 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(Ht(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},Qw=new G,Vk=new mo,At=class i{constructor(e,t,n,r,o,s,a,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c)}set(e,t,n,r,o,s,a,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=o,d[5]=l,d[6]=n,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[3],l=n[6],c=n[1],d=n[4],u=n[7],f=n[2],h=n[5],p=n[8],v=r[0],g=r[3],m=r[6],b=r[1],y=r[4],x=r[7],_=r[2],E=r[5],D=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*E,o[6]=s*m+a*x+l*D,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*E,o[7]=c*m+d*x+u*D,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*E,o[8]=f*m+h*x+p*D,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*s*d-t*a*c-n*o*d+n*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=d*s-a*c,f=a*l-d*o,h=c*o-s*l,p=t*u+n*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=u*v,e[1]=(r*c-d*n)*v,e[2]=(a*n-r*s)*v,e[3]=f*v,e[4]=(d*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=h*v,e[7]=(n*l-c*t)*v,e[8]=(s*t-n*o)*v,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*s+c*a)+s+e,-r*c,r*l,-r*(-c*s+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(eE.makeScale(e,t)),this}rotate(e){return this.premultiply(eE.makeRotation(-e)),this}translate(e,t){return this.premultiply(eE.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)}},eE=new At,Gk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Hk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function p9(){let i={enabled:!0,workingColorSpace:Xc,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=ya(r.r),r.g=ya(r.g),r.b=ya(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=Qu(r.r),r.g=Qu(r.g),r.b=Qu(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===wa?Ap: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 of("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return of("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({[Xc]:{primaries:e,whitePoint:n,transfer:Ap,toXYZ:Gk,fromXYZ:Hk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:bn},outputColorSpaceConfig:{drawingBufferColorSpace:bn}},[bn]:{primaries:e,whitePoint:n,transfer:on,toXYZ:Gk,fromXYZ:Hk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:bn}}}),i}var Gt=p9();function ya(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Qu(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Bu,ib=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{Bu===void 0&&(Bu=nf("canvas")),Bu.width=e.width,Bu.height=e.height;let r=Bu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Bu}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=nf("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]=ya(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(ya(t[n]/255)*255):t[n]=ya(t[n]);return{data:t,width:e.width,height:e.height}}else return ht("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},m9=0,af=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:m9++}),this.uuid=yf(),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(tE(r[s].image)):o.push(tE(r[s]))}else o=tE(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function tE(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?ib.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(ht("Texture: Unable to serialize Texture."),{})}var g9=0,nE=new G,Go=(()=>{class i extends Cs{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Oi,o=Oi,s=jn,a=go,l=vo,c=lr,d=i.DEFAULT_ANISOTROPY,u=wa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:g9++}),this.uuid=yf(),this.name="",this.source=new af(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 gt(0,0),this.repeat=new gt(1,1),this.center=new gt(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(nE).x}get height(){return this.source.getSize(nE).y}get depth(){return this.source.getSize(nE).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){ht(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){ht(`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!==SE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case tf:t.x=t.x-Math.floor(t.x);break;case Oi:t.x=t.x<0?0:1;break;case tb: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 tf:t.y=t.y-Math.floor(t.y);break;case Oi:t.y=t.y<0?0:1;break;case tb: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=SE,i.DEFAULT_ANISOTROPY=1,i})(),An=class i{constructor(e=0,t=0,n=0,r=1){i.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*n+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*n+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*n+s[11]*r+s[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],f=l[1],h=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(c+1)/2,x=(h+1)/2,_=(m+1)/2,E=(d+f)/4,D=(u+v)/4,A=(p+g)/4;return y>x&&y>_?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=E/n,o=D/n):x>_?x<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),n=E/r,o=A/r):_<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),n=D/o,r=A/o),this.set(n,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this.w=Ht(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this.w=Ht(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},rb=class extends Cs{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new An(0,0,e,t),this.scissorTest=!1,this.viewport=new An(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new Go(r);this.textures=[];let s=n.count;for(let a=0;a<s;a++)this.textures[a]=o.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:jn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new af(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"})}},kr=class extends rb{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Rp=class extends Go{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var ob=class extends Go{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yi=class{constructor(e=new G(1/0,1/0,1/0),t=new G(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(ko.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ko.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=ko.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let o=n.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let s=0,a=o.count;s<a;s++)e.isMesh===!0?e.getVertexPosition(s,ko):ko.fromBufferAttribute(o,s),ko.applyMatrix4(e.matrixWorld),this.expandByPoint(ko);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Pv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Pv.copy(n.boundingBox)),Pv.applyMatrix4(e.matrixWorld),this.union(Pv)}let r=e.children;for(let o=0,s=r.length;o<s;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,ko),ko.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Cp),Av.subVectors(this.max,Cp),zu.subVectors(e.a,Cp),Vu.subVectors(e.b,Cp),Gu.subVectors(e.c,Cp),ll.subVectors(Vu,zu),cl.subVectors(Gu,Vu),zc.subVectors(zu,Gu);let t=[0,-ll.z,ll.y,0,-cl.z,cl.y,0,-zc.z,zc.y,ll.z,0,-ll.x,cl.z,0,-cl.x,zc.z,0,-zc.x,-ll.y,ll.x,0,-cl.y,cl.x,0,-zc.y,zc.x,0];return!iE(t,zu,Vu,Gu,Av)||(t=[1,0,0,0,1,0,0,0,1],!iE(t,zu,Vu,Gu,Av))?!1:(Ov.crossVectors(ll,cl),t=[Ov.x,Ov.y,Ov.z],iE(t,zu,Vu,Gu,Av))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ko).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ko).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(fa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fa),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}},fa=[new G,new G,new G,new G,new G,new G,new G,new G],ko=new G,Pv=new Yi,zu=new G,Vu=new G,Gu=new G,ll=new G,cl=new G,zc=new G,Cp=new G,Av=new G,Ov=new G,Vc=new G;function iE(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){Vc.fromArray(i,o);let a=r.x*Math.abs(Vc.x)+r.y*Math.abs(Vc.y)+r.z*Math.abs(Vc.z),l=e.dot(Vc),c=t.dot(Vc),d=n.dot(Vc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var v9=new Yi,wp=new G,rE=new G,gl=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):v9.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;wp.subVectors(e,this.center);let t=wp.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(wp,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):(rE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(wp.copy(e.center).add(rE)),this.expandByPoint(wp.copy(e.center).sub(rE))),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}},ha=new G,oE=new G,Rv=new G,dl=new G,sE=new G,kv=new G,aE=new G,xa=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,ha)),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=ha.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ha.copy(this.origin).addScaledVector(this.direction,t),ha.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){oE.copy(e).add(t).multiplyScalar(.5),Rv.copy(t).sub(e).normalize(),dl.copy(this.origin).sub(oE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Rv),a=dl.dot(this.direction),l=-dl.dot(Rv),c=dl.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(oE).addScaledVector(Rv,f),h}intersectSphere(e,t){ha.subVectors(e.center,this.origin);let n=ha.dot(this.direction),r=ha.dot(ha)-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,ha)!==null}intersectTriangle(e,t,n,r,o){sE.subVectors(t,e),kv.subVectors(n,e),aE.crossVectors(sE,kv);let s=this.direction.dot(aE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;dl.subVectors(this.origin,e);let l=a*this.direction.dot(kv.crossVectors(dl,kv));if(l<0)return null;let c=a*this.direction.dot(sE.cross(dl));if(c<0||l+c>s)return null;let d=-a*dl.dot(aE);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/Hu.setFromMatrixColumn(e,0).length(),o=1/Hu.setFromMatrixColumn(e,1).length(),s=1/Hu.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(b9,e,y9)}lookAt(e,t,n){let r=this.elements;return Ar.subVectors(e,t),Ar.lengthSq()===0&&(Ar.z=1),Ar.normalize(),ul.crossVectors(n,Ar),ul.lengthSq()===0&&(Math.abs(n.z)===1?Ar.x+=1e-4:Ar.z+=1e-4,Ar.normalize(),ul.crossVectors(n,Ar)),ul.normalize(),Fv.crossVectors(Ar,ul),r[0]=ul.x,r[4]=Fv.x,r[8]=Ar.x,r[1]=ul.y,r[5]=Fv.y,r[9]=Ar.y,r[2]=ul.z,r[6]=Fv.z,r[10]=Ar.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[4],l=n[8],c=n[12],d=n[1],u=n[5],f=n[9],h=n[13],p=n[2],v=n[6],g=n[10],m=n[14],b=n[3],y=n[7],x=n[11],_=n[15],E=r[0],D=r[4],A=r[8],S=r[12],I=r[1],L=r[5],H=r[9],z=r[13],X=r[2],q=r[6],K=r[10],j=r[14],te=r[3],ye=r[7],xe=r[11],Ce=r[15];return o[0]=s*E+a*I+l*X+c*te,o[4]=s*D+a*L+l*q+c*ye,o[8]=s*A+a*H+l*K+c*xe,o[12]=s*S+a*z+l*j+c*Ce,o[1]=d*E+u*I+f*X+h*te,o[5]=d*D+u*L+f*q+h*ye,o[9]=d*A+u*H+f*K+h*xe,o[13]=d*S+u*z+f*j+h*Ce,o[2]=p*E+v*I+g*X+m*te,o[6]=p*D+v*L+g*q+m*ye,o[10]=p*A+v*H+g*K+m*xe,o[14]=p*S+v*z+g*j+m*Ce,o[3]=b*E+y*I+x*X+_*te,o[7]=b*D+y*L+x*q+_*ye,o[11]=b*A+y*H+x*K+_*xe,o[15]=b*S+y*z+x*j+_*Ce,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],d=e[2],u=e[6],f=e[10],h=e[14],p=e[3],v=e[7],g=e[11],m=e[15],b=l*h-c*f,y=a*h-c*u,x=a*f-l*u,_=s*h-c*d,E=s*f-l*d,D=s*u-a*d;return t*(v*b-g*y+m*x)-n*(p*b-g*_+m*E)+r*(p*y-v*_+m*D)-o*(p*x-v*E+g*D)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],f=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],b=u*g*c-v*f*c+v*l*h-a*g*h-u*l*m+a*f*m,y=p*f*c-d*g*c-p*l*h+s*g*h+d*l*m-s*f*m,x=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,_=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,E=t*b+n*y+r*x+o*_;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/E;return e[0]=b*D,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*D,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*D,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*D,e[4]=y*D,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*D,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*D,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*D,e[8]=x*D,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*D,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*D,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*D,e[12]=_*D,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*D,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*D,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*D,this}scale(e){let t=this.elements,n=e.x,r=e.y,o=e.z;return t[0]*=n,t[4]*=r,t[8]*=o,t[1]*=n,t[5]*=r,t[9]*=o,t[2]*=n,t[6]*=r,t[10]*=o,t[3]*=n,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),o=1-n,s=e.x,a=e.y,l=e.z,c=o*s,d=o*a;return this.set(c*s+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,o,s){return this.set(1,n,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,d=s+s,u=a+a,f=o*c,h=o*d,p=o*u,v=s*d,g=s*u,m=a*u,b=l*c,y=l*d,x=l*u,_=n.x,E=n.y,D=n.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*E,r[5]=(1-(f+m))*E,r[6]=(g+b)*E,r[7]=0,r[8]=(p+y)*D,r[9]=(g-b)*D,r[10]=(1-(f+v))*D,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let o=Hu.set(r[0],r[1],r[2]).length(),s=Hu.set(r[4],r[5],r[6]).length(),a=Hu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Fo.copy(this);let c=1/o,d=1/s,u=1/a;return Fo.elements[0]*=c,Fo.elements[1]*=c,Fo.elements[2]*=c,Fo.elements[4]*=d,Fo.elements[5]*=d,Fo.elements[6]*=d,Fo.elements[8]*=u,Fo.elements[9]*=u,Fo.elements[10]*=u,t.setFromRotationMatrix(Fo),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=Lo,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(n-r),f=(t+e)/(t-e),h=(n+r)/(n-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===Lo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Op)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,o,s,a=Lo,l=!1){let c=this.elements,d=2/(t-e),u=2/(n-r),f=-(t+e)/(t-e),h=-(n+r)/(n-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===Lo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Op)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}},Hu=new G,Fo=new Mn,b9=new G(0,0,0),y9=new G(1,1,1),ul=new G,Fv=new G,Ar=new G,jk=new Mn,Wk=new mo,_a=(()=>{class i{constructor(t=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,n,r,o=this._order){return this._x=t,this._y=n,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,n=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(n){case"XYZ":this._y=Math.asin(Ht(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Ht(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Ht(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-Ht(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin(Ht(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-Ht(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:ht("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return jk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(jk,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return Wk.setFromEuler(this),this.setFromQuaternion(Wk,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})(),lf=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}},x9=0,$k=new G,ju=new mo,pa=new Mn,Nv=new G,Ep=new G,_9=new G,S9=new mo,Xk=new G(1,0,0),Yk=new G(0,1,0),qk=new G(0,0,1),Kk={type:"added"},C9={type:"removed"},Wu={type:"childadded",child:null},lE={type:"childremoved",child:null},Fr=(()=>{class i extends Cs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:x9++}),this.uuid=yf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new G,n=new _a,r=new mo,o=new G(1,1,1);function s(){r.setFromEuler(n,!1)}function a(){n.setFromQuaternion(r,void 0,!1)}n._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new Mn},normalMatrix:{value:new At}}),this.matrix=new Mn,this.matrixWorld=new Mn,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new lf,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 ju.setFromAxisAngle(t,n),this.quaternion.multiply(ju),this}rotateOnWorldAxis(t,n){return ju.setFromAxisAngle(t,n),this.quaternion.premultiply(ju),this}rotateX(t){return this.rotateOnAxis(Xk,t)}rotateY(t){return this.rotateOnAxis(Yk,t)}rotateZ(t){return this.rotateOnAxis(qk,t)}translateOnAxis(t,n){return $k.copy(t).applyQuaternion(this.quaternion),this.position.add($k.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(Xk,t)}translateY(t){return this.translateOnAxis(Yk,t)}translateZ(t){return this.translateOnAxis(qk,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(pa.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?Nv.copy(t):Nv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Ep.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?pa.lookAt(Ep,Nv,this.up):pa.lookAt(Nv,Ep,this.up),this.quaternion.setFromRotationMatrix(pa),o&&(pa.extractRotation(o.matrixWorld),ju.setFromRotationMatrix(pa),this.quaternion.premultiply(ju.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(yt("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(Kk),Wu.child=t,this.dispatchEvent(Wu),Wu.child=null):yt("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(C9),lE.child=t,this.dispatchEvent(lE),lE.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),pa.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),pa.multiply(t.parent.matrixWorld)),t.applyMatrix4(pa),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Kk),Wu.child=t,this.dispatchEvent(Wu),Wu.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(Ep,t,_9),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ep,S9,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(t)}traverseAncestors(t){let n=this.parent;n!==null&&(t(n),n.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(t)}updateWorldMatrix(t,n){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>ue(R({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>R({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function s(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=s(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d<u;d++){let f=c[d];s(t.shapes,f)}else s(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(s(t.materials,this.material[c]));o.material=l}else o.material=s(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(s(t.animations,c))}}if(n){let l=a(t.geometries),c=a(t.materials),d=a(t.textures),u=a(t.images),f=a(t.shapes),h=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),n===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new G(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),No=new G,ma=new G,cE=new G,ga=new G,$u=new G,Xu=new G,Zk=new G,dE=new G,uE=new G,fE=new G,hE=new An,pE=new An,mE=new An,pl=class i{constructor(e=new G,t=new G,n=new G){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),No.subVectors(e,t),r.cross(No);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){No.subVectors(r,t),ma.subVectors(n,t),cE.subVectors(e,t);let s=No.dot(No),a=No.dot(ma),l=No.dot(cE),c=ma.dot(ma),d=ma.dot(cE),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,ga)===null?!1:ga.x>=0&&ga.y>=0&&ga.x+ga.y<=1}static getInterpolation(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,ga)===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,ga.x),l.addScaledVector(s,ga.y),l.addScaledVector(a,ga.z),l)}static getInterpolatedAttribute(e,t,n,r,o,s){return hE.setScalar(0),pE.setScalar(0),mE.setScalar(0),hE.fromBufferAttribute(e,t),pE.fromBufferAttribute(e,n),mE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(hE,o.x),s.addScaledVector(pE,o.y),s.addScaledVector(mE,o.z),s}static isFrontFacing(e,t,n,r){return No.subVectors(n,t),ma.subVectors(e,t),No.cross(ma).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return No.subVectors(this.c,this.b),ma.subVectors(this.a,this.b),No.cross(ma).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;$u.subVectors(r,n),Xu.subVectors(o,n),dE.subVectors(e,n);let l=$u.dot(dE),c=Xu.dot(dE);if(l<=0&&c<=0)return t.copy(n);uE.subVectors(e,r);let d=$u.dot(uE),u=Xu.dot(uE);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($u,s);fE.subVectors(e,o);let h=$u.dot(fE),p=Xu.dot(fE);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(Xu,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Zk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Zk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector($u,s).addScaledVector(Xu,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},XF={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},fl={h:0,s:0,l:0},Lv={h:0,s:0,l:0};function gE(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 ct=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=bn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=Gt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Gt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=Gt.workingColorSpace){if(e=eM(e,1),t=Ht(t,0,1),n=Ht(n,0,1),t===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o;this.r=gE(s,o,e+1/3),this.g=gE(s,o,e),this.b=gE(s,o,e-1/3)}return Gt.colorSpaceToWorking(this,r),this}setStyle(e,t=bn){function n(o){o!==void 0&&parseFloat(o)<1&&ht("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:ht("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);ht("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=bn){let n=XF[e.toLowerCase()];return n!==void 0?this.setHex(n,t):ht("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=ya(e.r),this.g=ya(e.g),this.b=ya(e.b),this}copyLinearToSRGB(e){return this.r=Qu(e.r),this.g=Qu(e.g),this.b=Qu(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=bn){return Gt.workingToColorSpace(Ai.copy(this),e),Math.round(Ht(Ai.r*255,0,255))*65536+Math.round(Ht(Ai.g*255,0,255))*256+Math.round(Ht(Ai.b*255,0,255))}getHexString(e=bn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Gt.workingColorSpace){Gt.workingToColorSpace(Ai.copy(this),t);let n=Ai.r,r=Ai.g,o=Ai.b,s=Math.max(n,r,o),a=Math.min(n,r,o),l,c,d=(a+s)/2;if(a===s)l=0,c=0;else{let u=s-a;switch(c=d<=.5?u/(s+a):u/(2-s-a),s){case n:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-n)/u+2;break;case o:l=(n-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=Gt.workingColorSpace){return Gt.workingToColorSpace(Ai.copy(this),t),e.r=Ai.r,e.g=Ai.g,e.b=Ai.b,e}getStyle(e=bn){Gt.workingToColorSpace(Ai.copy(this),e);let t=Ai.r,n=Ai.g,r=Ai.b;return e!==bn?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(fl),this.setHSL(fl.h+e,fl.s+t,fl.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(fl),e.getHSL(Lv);let n=Ip(fl.h,Lv.h,t),r=Ip(fl.s,Lv.s,t),o=Ip(fl.l,Lv.l,t);return this.setHSL(n,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*r,this.g=o[1]*t+o[4]*n+o[7]*r,this.b=o[2]*t+o[5]*n+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Ai=new ct;ct.NAMES=XF;var w9=0,ar=class extends Cs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:w9++}),this.uuid=yf(),this.name="",this.type="Material",this.blending=Wc,this.side=Xi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Qv,this.blendDst=eb,this.blendEquation=ml,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ct(0,0,0),this.blendAlpha=0,this.depthFunc=$c,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=ME,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=jc,this.stencilZFail=jc,this.stencilZPass=jc,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){ht(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ht(`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!==Wc&&(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!==Qv&&(n.blendSrc=this.blendSrc),this.blendDst!==eb&&(n.blendDst=this.blendDst),this.blendEquation!==ml&&(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!==$c&&(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!==ME&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==jc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==jc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==jc&&(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++}},kp=class extends ar{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ct(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 _a,this.combine=Ob,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,Uv=new gt,E9=0,Rr=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:E9++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=TE,this.updateRanges=[],this.gpuType=Vo,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Uv.fromBufferAttribute(this,t),Uv.applyMatrix3(e),this.setXY(t,Uv.x,Uv.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=Ju(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=Ju(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=Ju(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=Ju(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=Ju(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!==TE&&(e.usage=this.usage),e}};var Fp=class extends Rr{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var Np=class extends Rr{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var Hn=class extends Rr{constructor(e,t,n){super(new Float32Array(e),t,n)}},M9=0,ho=new Mn,vE=new Fr,Yu=new G,Or=new Yi,Mp=new Yi,ui=new G,ei=class i extends Cs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:M9++}),this.uuid=yf(),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(JE(e)?Np:Fp)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new At().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ho.makeRotationFromQuaternion(e),this.applyMatrix4(ho),this}rotateX(e){return ho.makeRotationX(e),this.applyMatrix4(ho),this}rotateY(e){return ho.makeRotationY(e),this.applyMatrix4(ho),this}rotateZ(e){return ho.makeRotationZ(e),this.applyMatrix4(ho),this}translate(e,t,n){return ho.makeTranslation(e,t,n),this.applyMatrix4(ho),this}scale(e,t,n){return ho.makeScale(e,t,n),this.applyMatrix4(ho),this}lookAt(e){return vE.lookAt(e),vE.updateMatrix(),this.applyMatrix4(vE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Yu).negate(),this.translate(Yu.x,Yu.y,Yu.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&&ht("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){yt("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];Or.setFromBufferAttribute(o),this.morphTargetsRelative?(ui.addVectors(this.boundingBox.min,Or.min),this.boundingBox.expandByPoint(ui),ui.addVectors(this.boundingBox.max,Or.max),this.boundingBox.expandByPoint(ui)):(this.boundingBox.expandByPoint(Or.min),this.boundingBox.expandByPoint(Or.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&yt('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 gl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){yt("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(Or.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];Mp.setFromBufferAttribute(a),this.morphTargetsRelative?(ui.addVectors(Or.min,Mp.min),Or.expandByPoint(ui),ui.addVectors(Or.max,Mp.max),Or.expandByPoint(ui)):(Or.expandByPoint(Mp.min),Or.expandByPoint(Mp.max))}Or.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)ui.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(ui));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)ui.fromBufferAttribute(a,c),l&&(Yu.fromBufferAttribute(e,c),ui.add(Yu)),r=Math.max(r,n.distanceToSquared(ui))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&yt('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){yt("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 Rr(new Float32Array(4*n.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let A=0;A<n.count;A++)a[A]=new G,l[A]=new G;let c=new G,d=new G,u=new G,f=new gt,h=new gt,p=new gt,v=new G,g=new G;function m(A,S,I){c.fromBufferAttribute(n,A),d.fromBufferAttribute(n,S),u.fromBufferAttribute(n,I),f.fromBufferAttribute(o,A),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,I),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[A].add(v),a[S].add(v),a[I].add(v),l[A].add(g),l[S].add(g),l[I].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)m(e.getX(z+0),e.getX(z+1),e.getX(z+2))}let y=new G,x=new G,_=new G,E=new G;function D(A){_.fromBufferAttribute(r,A),E.copy(_);let S=a[A];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(E,S);let L=x.dot(l[A])<0?-1:1;s.setXYZW(A,y.x,y.y,y.z,L)}for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)D(e.getX(z+0)),D(e.getX(z+1)),D(e.getX(z+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Rr(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let f=0,h=n.count;f<h;f++)n.setXYZ(f,0,0,0);let r=new G,o=new G,s=new G,a=new G,l=new G,c=new G,d=new G,u=new G;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),v=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,v),c.fromBufferAttribute(n,g),a.add(d),l.add(d),c.add(d),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(v,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),n.setXYZ(f+0,d.x,d.y,d.z),n.setXYZ(f+1,d.x,d.y,d.z),n.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)ui.fromBufferAttribute(e,t),ui.normalize(),e.setXYZ(t,ui.x,ui.y,ui.z)}toNonIndexed(){function e(a,l){let c=a.array,d=a.itemSize,u=a.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?h=l[v]*a.data.stride+a.offset:h=l[v]*d;for(let m=0;m<d;m++)f[p++]=c[h++]}return new Rr(f,d,u)}if(this.index===null)return ht("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"})}},Jk=new Mn,Gc=new xa,Bv=new gl,Qk=new G,zv=new G,Vv=new G,Gv=new G,bE=new G,Hv=new G,eF=new G,jv=new G,qi=class extends Fr{constructor(e=new ei,t=new kp){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){Hv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(bE.fromBufferAttribute(u,e),s?Hv.addScaledVector(bE,d):Hv.addScaledVector(bE.sub(t),d))}t.add(Hv)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Bv.copy(n.boundingSphere),Bv.applyMatrix4(o),Gc.copy(e.ray).recast(e.near),!(Bv.containsPoint(Gc.origin)===!1&&(Gc.intersectSphere(Bv,Qk)===null||Gc.origin.distanceToSquared(Qk)>(e.far-e.near)**2))&&(Jk.copy(o).invert(),Gc.copy(e.ray).applyMatrix4(Jk),!(n.boundingBox!==null&&Gc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Gc)))}_computeIntersections(e,t,n){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=a.getX(x),D=a.getX(x+1),A=a.getX(x+2);r=Wv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(a.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=a.getX(g),y=a.getX(g+1),x=a.getX(g+2);r=Wv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=x,D=x+1,A=x+2;r=Wv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(l.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=g,y=g+1,x=g+2;r=Wv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function T9(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;jv.copy(a),jv.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(jv);return c<t.near||c>t.far?null:{distance:c,point:jv.clone(),object:i}}function Wv(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,zv),i.getVertexPosition(l,Vv),i.getVertexPosition(c,Gv);let d=T9(i,e,t,n,zv,Vv,Gv,eF);if(d){let u=new G;pl.getBarycoord(eF,zv,Vv,Gv,u),r&&(d.uv=pl.getInterpolatedAttribute(r,a,l,c,u,new gt)),o&&(d.uv1=pl.getInterpolatedAttribute(o,a,l,c,u,new gt)),s&&(d.normal=pl.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};pl.getNormal(zv,Vv,Gv,f.normal),d.face=f,d.barycoord=u}return d}var cf=class i extends ei{constructor(e=1,t=1,n=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,n,t,e,s,o,0),p("z","y","x",1,-1,n,t,-e,s,o,1),p("x","z","y",1,1,e,n,t,r,s,2),p("x","z","y",1,-1,e,n,-t,r,s,3),p("x","y","z",1,-1,e,t,n,r,o,4),p("x","y","z",-1,-1,e,t,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new Hn(c,3)),this.setAttribute("normal",new Hn(d,3)),this.setAttribute("uv",new Hn(u,2));function p(v,g,m,b,y,x,_,E,D,A,S){let I=x/D,L=_/A,H=x/2,z=_/2,X=E/2,q=D+1,K=A+1,j=0,te=0,ye=new G;for(let xe=0;xe<K;xe++){let Ce=xe*L-z;for(let ce=0;ce<q;ce++){let Ie=ce*I-H;ye[v]=Ie*b,ye[g]=Ce*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=E>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(ce/D),u.push(1-xe/A),j+=1}}for(let xe=0;xe<A;xe++)for(let Ce=0;Ce<D;Ce++){let ce=f+Ce+q*xe,Ie=f+Ce+q*(xe+1),Mt=f+(Ce+1)+q*(xe+1),Lt=f+(Ce+1)+q*xe;l.push(ce,Ie,Lt),l.push(Ie,Mt,Lt),te+=6}a.addGroup(h,te,S),h+=te,f+=j}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function rd(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?(ht("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function Ri(i){let e={};for(let t=0;t<i.length;t++){let n=rd(i[t]);for(let r in n)e[r]=n[r]}return e}function D9(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function tM(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Gt.workingColorSpace}var YF={clone:rd,merge:Ri},I9=`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 mv=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()}},gv=class{encodeKey(e){return WR(e)}encodeValue(e){return WR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Rj(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 kj=/%(\d[a-f0-9])/gi,Fj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function WR(i){return encodeURIComponent(i).replace(kj,(e,t)=>Fj[t]??e)}function pv(i){return`${i}`}var co=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new gv,e.fromString){if(e.fromObject)throw new Ke(2805,!1);this.map=Rj(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(pv):[pv(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(pv(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(pv(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 Nj(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function $R(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function XR(i){return typeof Blob<"u"&&i instanceof Blob}function YR(i){return typeof FormData<"u"&&i instanceof FormData}function Lj(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var qR="Content-Type",KR="Accept",ZR="text/plain",JR="application/json",Uj=`${JR}, ${ZR}, */*`,Ou=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(Nj(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new Ke(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new uo,this.context??=new mv,!this.params)this.params=new co,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||$R(this.body)||XR(this.body)||YR(this.body)||Lj(this.body)?this.body:this.body instanceof co?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||YR(this.body)?null:XR(this.body)?this.body.type||null:$R(this.body)?null:typeof this.body=="string"?ZR:this.body instanceof co?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?JR:null}clone(e={}){let t=e.method||this.method,n=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,v=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,m=e.withCredentials??this.withCredentials,b=e.reportProgress??this.reportProgress,y=e.headers||this.headers,x=e.params||this.params,_=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((E,D)=>E.set(D,e.setHeaders[D]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((E,D)=>E.set(D,e.setParams[D]),x)),new i(t,n,g,{params:x,headers:y,context:_,reportProgress:b,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},Uc=(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})(Uc||{}),Ru=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new uo,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},vv=class i extends Ru{constructor(e={}){super(e)}type=Uc.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})}},ku=class i extends Ru{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Uc.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})}},ol=class extends Ru{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}},Bj=200,zj=204;var Vj=new qe("");var Gj=/^\)\]\}',?\n/;var Nw=(()=>{class i{xhrFactory;tracingService=Q(vs,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new Ke(-2800,!1);let n=this.xhrFactory;return ss(null).pipe(sS(()=>new En(o=>{let s=n.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),t.headers.has(KR)||s.setRequestHeader(KR,Uj),!t.headers.has(qR)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(qR,g)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=s.statusText||"OK",m=new uo(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new vv({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!==zj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Bj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let E=x;x=x.replace(Gj,"");try{x=x!==""?JSON.parse(x):null}catch(D){x=E,_&&(_=!1,x={error:D,text:x})}}_?(o.next(new ku({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new ol({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new ol({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 ol({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:Uc.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:Uc.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:Uc.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",f),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(n){return new(n||i)(Xe(Lc))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Hj(i,e){return e(i)}function jj(i,e,t){return(n,r)=>tu(t,()=>e(n,o=>i(o,r)))}var Lw=new qe("",{factory:()=>[]}),Uw=new qe(""),QR=new qe("",{factory:()=>!0});var Bw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(Nw),r},providedIn:"root"})}return i})();var bv=(()=>{class i{backend;injector;chain=null;pendingTasks=Q(cu);contributeToStability=Q(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(Lw),...this.injector.get(Uw,[])]));this.chain=n.reduceRight((r,o)=>jj(r,o,this.injector),Hj)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(vh(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(Xe(Bw),Xe(Ti))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(bv),r},providedIn:"root"})}return i})();function Fw(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 yv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof Ou)o=t;else{let l;r.headers instanceof uo?l=r.headers:l=new uo(r.headers);let c;r.params&&(r.params instanceof co?c=r.params:c=new co({fromObject:r.params})),o=new Ou(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(oS(l=>this.handler.handle(l)));if(t instanceof Ou||r.observe==="events")return s;let a=s.pipe(rS(l=>l instanceof ku));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Ke(2806,!1);return l.body}));case"blob":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Ke(2807,!1);return l.body}));case"text":return a.pipe(rr(l=>{if(l.body!==null&&typeof l.body!="string")throw new Ke(2808,!1);return l.body}));default:return a.pipe(rr(l=>l.body))}case"response":return a;default:throw new Ke(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new co().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,Fw(r,n))}post(t,n,r={}){return this.request("POST",t,Fw(r,n))}put(t,n,r={}){return this.request("PUT",t,Fw(r,n))}static \u0275fac=function(n){return new(n||i)(Xe(zw))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Wj=new qe("",{factory:()=>!0}),$j="XSRF-TOKEN",Xj=new qe("",{factory:()=>$j}),Yj="X-XSRF-TOKEN",qj=new qe("",{factory:()=>Yj}),Kj=(()=>{class i{cookieName=Q(Xj);doc=Q(wn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ap(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})(),ek=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(Kj),r},providedIn:"root"})}return i})();function Zj(i,e){if(!Q(Wj)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Q(sv).href,{origin:o}=new URL(r),{origin:s}=new URL(i.url,o);if(o!==s)return e(i)}catch{return e(i)}let t=Q(ek).getToken(),n=Q(qj);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var Vw=(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})(Vw||{});function Jj(i,e){return{\u0275kind:i,\u0275providers:e}}function Gw(...i){let e=[yv,bv,{provide:zw,useExisting:bv},{provide:Bw,useFactory:()=>Q(Vj,{optional:!0})??Q(Nw)},{provide:Lw,useValue:Zj,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Qs(e)}function Hw(i){return Jj(Vw.Interceptors,i.map(e=>({provide:Lw,useValue:e,multi:!0})))}var Qj=new qe(""),eW="b",tW="h",nW="s",iW="st",rW="u",oW="rt",jw=new qe(""),sW=["GET","HEAD"];function ik(i,e){let s=e,{isCacheActive:t}=s,n=en(s,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!sW.includes(o)||!n.includeRequestsWithAuthHeaders&&cW(i)||n.filter?.(i)===!1)}function rk(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function aW(i,e,t,n){let{transferCache:r}=i;if(!ik(i,e))return null;if(n)throw new Ke(2803,!1);let o=i.url,s=ok(i,o),a=t.get(s,null),l=rk(e,r);if(a){let{[eW]:c,[oW]:d,[tW]:u,[nW]:f,[iW]:h,[rW]:p}=a,v=c;switch(d){case"arraybuffer":v=nk(c);break;case"blob":v=new Blob([nk(c)]);break}let g=new uo(u);return new ku({body:v,headers:g,status:f,statusText:h,url:p})}return null}function lW(i,e){let t=Q(jw),n=Q(_u),r=Q(Qj,{optional:!0}),o=aW(i,t,n,r);if(o)return ss(o);let{transferCache:s}=i,a=rk(t,s),l=i.url,c=ok(i,l);return ik(i,t),e(i)}function cW(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function tk(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function ok(i,e){let{params:t,method:n,responseType:r}=i,o=tk(t),s=i.serializeBody();s instanceof URLSearchParams?s=tk(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=dW(a);return l}function dW(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function nk(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function sk(i){return[{provide:jw,useFactory:()=>(Ro("NgHttpTransferCache"),R({isCacheActive:!0},i))},{provide:Uw,useValue:lW,multi:!0},{provide:Du,multi:!0,useFactory:()=>{let e=Q(Ir),t=Q(jw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var fp=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(uW),r},providedIn:"root"})}return i})(),uW=(()=>{class i extends fp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Oo.NONE:return n;case Oo.HTML:return sa(n,"HTML")?Ao(n):I0(this._doc,String(n)).toString();case Oo.STYLE:return sa(n,"Style")?Ao(n):n;case Oo.SCRIPT:if(sa(n,"Script"))return Ao(n);throw new Ke(5200,!1);case Oo.URL:return sa(n,"URL")?Ao(n):qh(String(n));case Oo.RESOURCE_URL:if(sa(n,"ResourceURL"))return Ao(n);throw new Ke(5201,!1);default:throw new Ke(5202,!1)}}bypassSecurityTrustHtml(t){return SC(t)}bypassSecurityTrustStyle(t){return CC(t)}bypassSecurityTrustScript(t){return wC(t)}bypassSecurityTrustUrl(t){return EC(t)}bypassSecurityTrustResourceUrl(t){return MC(t)}static \u0275fac=function(n){return new(n||i)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),xv=(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})(xv||{});function fW(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function ak(){return fW(xv.EventReplay,TR())}function lk(...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(xv.HttpTransferCacheOptions);return Qs([[],[],DR(),t.has(xv.NoHttpTransferCache)||n?[]:sk({}),e])}var Fu=class i{loadingCount=N(0);isLoading=De(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function _v(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 da=class i{toastsSignal=N([]);toasts=De(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(n=>n.id!==e))}pushToast(e,t,n){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:n,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${n}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var hp=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof ol&&this.showError(e)}showError(e){return this.toasterService.showError(_v(e)),Va(()=>e)}static \u0275fac=function(t){return new(t||i)(Xe(da))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var ck=(i,e)=>{let t=Q(hp),n=Q(Fu),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(fc(s=>(r||t.handleError(s),r?ss(null):Va(()=>s))),vh(()=>{o&&n.hide()}))};var dk=[ck];var uk={apiUrl:"https://pixeasy-api-esaca7hvgdfxgmcn.westus3-01.azurewebsites.net/api/"};var Sv=new qe("ENV"),Cye=new qe("LOADER_DELAY");var fk={provide:Sv,useValue:uk};function hk(){return[s1(),lk(ak()),Gw(Hw(dk)),fk,Fu]}var Ck=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)($t(la),$t(Mr))};static \u0275dir=Zn({type:i})}return i})(),yp=(()=>{class i extends Ck{static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,features:[Dr]})}return i})(),sl=new qe(""),mW={provide:sl,useExisting:zi(()=>Kw),multi:!0},Kw=(()=>{class i extends yp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([mW]),Dr]})}return i})(),gW={provide:sl,useExisting:zi(()=>Uu),multi:!0};function vW(){let i=lo()?lo().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var bW=new qe(""),Uu=(()=>{class i extends Ck{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!vW())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||i)($t(la),$t(Mr),$t(bW,8))};static \u0275dir=Zn({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&ie("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[ao([gW]),Dr]})}return i})();var Zw=new qe(""),yW=new qe("");function xW(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 _W(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 pk(i){return null}function wk(i){return i!=null}function Ek(i){return Tu(i)?gh(i):i}function Mk(i){let e={};return i.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function Tk(i,e){return e.map(t=>t(i))}function SW(i){return!i.validate}function Dk(i){return i.map(e=>SW(e)?e:t=>e.validate(t))}function CW(i){if(!i)return null;let e=i.filter(wk);return e.length==0?null:function(t){return Mk(Tk(t,e))}}function Ik(i){return i!=null?CW(Dk(i)):null}function wW(i){if(!i)return null;let e=i.filter(wk);return e.length==0?null:function(t){let n=Tk(t,e).map(Ek);return iS(n).pipe(rr(Mk))}}function Pk(i){return i!=null?wW(Dk(i)):null}function mk(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function EW(i){return i._rawValidators}function MW(i){return i._rawAsyncValidators}function Ww(i){return i?Array.isArray(i)?i:[i]:[]}function wv(i,e){return Array.isArray(i)?i.includes(e):i===e}function gk(i,e){let t=Ww(e);return Ww(i).forEach(r=>{wv(t,r)||t.push(r)}),t}function vk(i,e){return Ww(e).filter(t=>!wv(i,t))}var Ev=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=Ik(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Pk(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}},$w=class extends Ev{name;get formDirective(){return null}get path(){return null}},bp=class extends Ev{_parent=null;name=null;valueAccessor=null},Xw=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 al=(()=>{class i extends Xw{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)($t(bp,2))};static \u0275dir=Zn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&pt("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:[Dr]})}return i})();var pp="VALID",Cv="INVALID",Nu="PENDING",mp="DISABLED",Bc=class{},Mv=class extends Bc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},gp=class extends Bc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},vp=class extends Bc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Lu=class extends Bc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var Yw=class extends Bc{source;constructor(e){super(),this.source=e}};function TW(i){return(Tv(i)?i.validators:i)||null}function DW(i){return Array.isArray(i)?Ik(i):i||null}function IW(i,e){return(Tv(e)?e.asyncValidators:i)||null}function PW(i){return Array.isArray(i)?Pk(i):i||null}function Tv(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var qw=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return gn(this.statusReactive)}set status(e){gn(()=>this.statusReactive.set(e))}_status=De(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===pp}get invalid(){return this.status===Cv}get pending(){return this.status==Nu}get disabled(){return this.status===mp}get enabled(){return this.status!==mp}errors;get pristine(){return gn(this.pristineReactive)}set pristine(e){gn(()=>this.pristineReactive.set(e))}_pristine=De(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return gn(this.touchedReactive)}set touched(e){gn(()=>this.touchedReactive.set(e))}_touched=De(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new Eo;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(gk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(gk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(vk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(vk(e,this._rawAsyncValidators))}hasValidator(e){return wv(this._rawValidators,e)}hasAsyncValidator(e){return wv(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new vp(!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 vp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new gp(!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 gp(!0,n))}markAsPending(e={}){this.status=Nu;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Lu(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(ue(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=mp,this.errors=null,this._forEachChild(r=>{r.disable(ue(R({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Mv(this.value,n)),this._events.next(new Lu(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=pp,this._forEachChild(n=>{n.enable(ue(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===pp||this.status===Nu)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Mv(this.value,t)),this._events.next(new Lu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(ue(R({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?mp:pp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Nu,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=Ek(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 Lu(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new yr,this.statusChanges=new yr}_calculateStatus(){return this._allControlsDisabled()?mp:this.errors?Cv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Nu)?Nu:this._anyControlsHaveStatus(Cv)?Cv:pp}_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 gp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new vp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Tv(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=DW(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=PW(this._rawAsyncValidators)}};var Ak=new qe("",{factory:()=>Jw}),Jw="always";function AW(i,e){return[...e.path,i]}function OW(i,e,t=Jw){kW(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),FW(i,e),LW(i,e),NW(i,e),RW(i,e)}function bk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function RW(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function kW(i,e){let t=EW(i);e.validator!==null?i.setValidators(mk(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=MW(i);e.asyncValidator!==null?i.setAsyncValidators(mk(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();bk(e._rawValidators,r),bk(e._rawAsyncValidators,r)}function FW(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Ok(i,e)})}function NW(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Ok(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Ok(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function LW(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function UW(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function BW(i){return Object.getPrototypeOf(i.constructor)===yp}function zW(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===Uu?t=o:BW(o)?n=o:r=o}),r||n||t||null}function yk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function xk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var VW=class extends qw{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(TW(t),IW(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Tv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(xk(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 Yw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){yk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){yk(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){xk(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 GW={provide:bp,useExisting:zi(()=>ua)},_k=Promise.resolve(),ua=(()=>{class i extends bp{_changeDetectorRef;callSetDisabledState;control=new VW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yr;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=zW(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),UW(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(){OW(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){_k.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&ov(n);_k.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?AW(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)($t($w,9),$t(Zw,10),$t(yW,10),$t(sl,10),$t(rv,8),$t(Ak,8))};static \u0275dir=Zn({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[ao([GW]),Dr,yu]})}return i})();var HW={provide:sl,useExisting:zi(()=>xp),multi:!0},xp=(()=>{class i extends yp{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=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&ie("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([HW]),Dr]})}return i})();var jW={provide:sl,useExisting:zi(()=>Dv),multi:!0};function Rk(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function WW(i){return i.split(":")[0]}var Dv=(()=>{class i extends yp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Q(Ir).injector;destroyRef=Q(sr);cdr=Q(rv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,R0({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=Rk(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=WW(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([jW]),Dr]})}return i})(),kk=(()=>{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(Rk(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(n){return new(n||i)($t(Mr),$t(la),$t(Dv,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),$W={provide:sl,useExisting:zi(()=>Fk),multi:!0};function Sk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function XW(i){return i.split(":")[0]}var Fk=(()=>{class i extends yp{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=XW(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([$W]),Dr]})}return i})(),Nk=(()=>{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(Sk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Sk(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||i)($t(Mr),$t(la),$t(Fk,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function Lk(i){return typeof i=="number"?i:parseFloat(i)}var Uk=(()=>{class i{_validator=pk;_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):pk,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:[yu]})}return i})(),YW={provide:Zw,useExisting:zi(()=>_p),multi:!0},_p=(()=>{class i extends Uk{max;inputName="max";normalizeInput=t=>Lk(t);createValidator=t=>_W(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[ao([YW]),Dr]})}return i})(),qW={provide:Zw,useExisting:zi(()=>Sp),multi:!0},Sp=(()=>{class i extends Uk{min;inputName="min";normalizeInput=t=>Lk(t);createValidator=t=>xW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[ao([qW]),Dr]})}return i})();var KW=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=cs({})}return i})();var fo=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Ak,useValue:t.callSetDisabledState??Jw}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=cs({imports:[KW]})}return i})();var _l={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Sl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},hF=0,kE=1,pF=2;var Xp=1,mF=2,gf=3,Xi=0,Ki=1,Es=2,Ms=0,Wc=1,FE=2,NE=3,LE=4,gF=5,ml=100,vF=101,bF=102,yF=103,xF=104,_F=200,SF=201,CF=202,wF=203,Qv=204,eb=205,EF=206,MF=207,TF=208,DF=209,IF=210,PF=211,AF=212,OF=213,RF=214,Eb=0,Mb=1,Tb=2,$c=3,Db=4,Ib=5,Pb=6,Ab=7,Ob=0,kF=1,FF=2,Bo=0,UE=1,BE=2,zE=3,td=4,VE=5,GE=6,HE=7;var SE=300,Cl=301,nd=302,Rb=303,kb=304,Yp=306,tf=1e3,Oi=1001,tb=1002,hi=1003,NF=1004;var qp=1005;var jn=1006,Fb=1007;var go=1008;var lr=1009,jE=1010,WE=1011,vf=1012,Nb=1013,zo=1014,Vo=1015,Ts=1016,Lb=1017,Ub=1018,bf=1020,$E=35902,XE=35899,YE=1021,qE=1022,vo=1023,Ss=1026,wl=1027,KE=1028,Bb=1029,id=1030,zb=1031;var Vb=1033,Kp=33776,Zp=33777,Jp=33778,Qp=33779,Gb=35840,Hb=35841,jb=35842,Wb=35843,$b=36196,Xb=37492,Yb=37496,qb=37488,Kb=37489,Zb=37490,Jb=37491,Qb=37808,ey=37809,ty=37810,ny=37811,iy=37812,ry=37813,oy=37814,sy=37815,ay=37816,ly=37817,cy=37818,dy=37819,uy=37820,fy=37821,hy=36492,py=36494,my=36495,gy=36283,vy=36284,by=36285,yy=36286;var Pp=2300,nb=2301,Jv=2302,CE=2400,wE=2401,EE=2402;var LF=3200;var xy=0,UF=1,wa="",bn="srgb",Xc="srgb-linear",Ap="linear",on="srgb";var jc=7680;var ME=519,BF=512,zF=513,VF=514,_y=515,GF=516,HF=517,Sy=518,jF=519,TE=35044;var ZE="300 es",Lo=2e3,Op=2001;function JE(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function ZW(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function nf(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function WF(){let i=nf("canvas");return i.style.display="block",i}var Bk={},rf=null;function QE(...i){let e="THREE."+i.shift();rf?rf("log",e,...i):console.log(e,...i)}function ht(...i){let e="THREE."+i.shift();rf?rf("warn",e,...i):console.warn(e,...i)}function yt(...i){let e="THREE."+i.shift();rf?rf("error",e,...i):console.error(e,...i)}function of(...i){let e=i.join(" ");e in Bk||(Bk[e]=!0,ht(...i))}function $F(i,e,t){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}var Cs=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Pi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],zk=1234567,Dp=Math.PI/180,sf=180/Math.PI;function yf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Pi[i&255]+Pi[i>>8&255]+Pi[i>>16&255]+Pi[i>>24&255]+"-"+Pi[e&255]+Pi[e>>8&255]+"-"+Pi[e>>16&15|64]+Pi[e>>24&255]+"-"+Pi[t&63|128]+Pi[t>>8&255]+"-"+Pi[t>>16&255]+Pi[t>>24&255]+Pi[n&255]+Pi[n>>8&255]+Pi[n>>16&255]+Pi[n>>24&255]).toLowerCase()}function Ht(i,e,t){return Math.max(e,Math.min(t,i))}function eM(i,e){return(i%e+e)%e}function JW(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function QW(i,e,t){return i!==e?(t-i)/(e-i):0}function Ip(i,e,t){return(1-t)*i+t*e}function e9(i,e,t,n){return Ip(i,e,1-Math.exp(-t*n))}function t9(i,e=1){return e-Math.abs(eM(i,e*2)-e)}function n9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function i9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function r9(i,e){return i+Math.floor(Math.random()*(e-i+1))}function o9(i,e){return i+Math.random()*(e-i)}function s9(i){return i*(.5-Math.random())}function a9(i){i!==void 0&&(zk=i);let e=zk+=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 l9(i){return i*Dp}function c9(i){return i*sf}function d9(i){return(i&i-1)===0&&i!==0}function u9(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function f9(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function h9(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:ht("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Ju(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function $i(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var nn={DEG2RAD:Dp,RAD2DEG:sf,generateUUID:yf,clamp:Ht,euclideanModulo:eM,mapLinear:JW,inverseLerp:QW,lerp:Ip,damp:e9,pingpong:t9,smoothstep:n9,smootherstep:i9,randInt:r9,randFloat:o9,randFloatSpread:s9,seededRandom:a9,degToRad:l9,radToDeg:c9,isPowerOfTwo:d9,ceilPowerOfTwo:u9,floorPowerOfTwo:f9,setQuaternionFromProperEuler:h9,normalize:$i,denormalize:Ju},gt=class i{constructor(e=0,t=0){i.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Ht(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*n-s*r+e.x,this.y=o*r+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},mo=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,o,s,a){let l=n[r+0],c=n[r+1],d=n[r+2],u=n[r+3],f=o[s+0],h=o[s+1],p=o[s+2],v=o[s+3];if(a<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(a>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=v;return}if(u!==v||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*v;g<0&&(f=-f,h=-h,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let b=Math.acos(g),y=Math.sin(b);m=Math.sin(m*b)/y,a=Math.sin(a*b)/y,l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a}else{l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a;let b=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=b,c*=b,d*=b,u*=b}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,o,s){let a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],u=o[s],f=o[s+1],h=o[s+2],p=o[s+3];return e[t]=a*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-a*h,e[t+2]=c*p+d*h+a*f-l*u,e[t+3]=d*p-a*u-l*f-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(r/2),u=a(o/2),f=l(n/2),h=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:ht("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],d=t[6],u=t[10],f=n+a+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(s-r)*h}else if(n>a&&n>u){let h=2*Math.sqrt(1+n-a-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+s)/h,this._z=(o+c)/h}else if(a>u){let h=2*Math.sqrt(1+a-n-u);this._w=(o-c)/h,this._x=(r+s)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-n-a);this._w=(s-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ht(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-n*c,this._z=o*d+s*c+n*l-r*a,this._w=s*d-n*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(n=-n,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},G=class i{constructor(e=0,t=0,n=0){i.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Vk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Vk.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*r,this.y=o[1]*t+o[4]*n+o[7]*r,this.z=o[2]*t+o[5]*n+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*n+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*n+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*r-a*n),d=2*(a*t-o*r),u=2*(o*n-s*t);return this.x=t+l*c+s*u-a*d,this.y=n+l*d+a*c-o*u,this.z=r+l*u+o*d-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r,this.y=o[1]*t+o[5]*n+o[9]*r,this.z=o[2]*t+o[6]*n+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=r*l-o*a,this.y=o*s-n*l,this.z=n*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return 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(Ht(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},Qw=new G,Vk=new mo,At=class i{constructor(e,t,n,r,o,s,a,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c)}set(e,t,n,r,o,s,a,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=o,d[5]=l,d[6]=n,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[3],l=n[6],c=n[1],d=n[4],u=n[7],f=n[2],h=n[5],p=n[8],v=r[0],g=r[3],m=r[6],b=r[1],y=r[4],x=r[7],_=r[2],E=r[5],D=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*E,o[6]=s*m+a*x+l*D,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*E,o[7]=c*m+d*x+u*D,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*E,o[8]=f*m+h*x+p*D,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*s*d-t*a*c-n*o*d+n*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=d*s-a*c,f=a*l-d*o,h=c*o-s*l,p=t*u+n*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=u*v,e[1]=(r*c-d*n)*v,e[2]=(a*n-r*s)*v,e[3]=f*v,e[4]=(d*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=h*v,e[7]=(n*l-c*t)*v,e[8]=(s*t-n*o)*v,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*s+c*a)+s+e,-r*c,r*l,-r*(-c*s+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(eE.makeScale(e,t)),this}rotate(e){return this.premultiply(eE.makeRotation(-e)),this}translate(e,t){return this.premultiply(eE.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)}},eE=new At,Gk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Hk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function p9(){let i={enabled:!0,workingColorSpace:Xc,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=ya(r.r),r.g=ya(r.g),r.b=ya(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=Qu(r.r),r.g=Qu(r.g),r.b=Qu(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===wa?Ap: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 of("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return of("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({[Xc]:{primaries:e,whitePoint:n,transfer:Ap,toXYZ:Gk,fromXYZ:Hk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:bn},outputColorSpaceConfig:{drawingBufferColorSpace:bn}},[bn]:{primaries:e,whitePoint:n,transfer:on,toXYZ:Gk,fromXYZ:Hk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:bn}}}),i}var Gt=p9();function ya(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Qu(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Bu,ib=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{Bu===void 0&&(Bu=nf("canvas")),Bu.width=e.width,Bu.height=e.height;let r=Bu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Bu}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=nf("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]=ya(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(ya(t[n]/255)*255):t[n]=ya(t[n]);return{data:t,width:e.width,height:e.height}}else return ht("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},m9=0,af=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:m9++}),this.uuid=yf(),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(tE(r[s].image)):o.push(tE(r[s]))}else o=tE(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function tE(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?ib.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(ht("Texture: Unable to serialize Texture."),{})}var g9=0,nE=new G,Go=(()=>{class i extends Cs{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Oi,o=Oi,s=jn,a=go,l=vo,c=lr,d=i.DEFAULT_ANISOTROPY,u=wa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:g9++}),this.uuid=yf(),this.name="",this.source=new af(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 gt(0,0),this.repeat=new gt(1,1),this.center=new gt(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(nE).x}get height(){return this.source.getSize(nE).y}get depth(){return this.source.getSize(nE).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){ht(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){ht(`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!==SE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case tf:t.x=t.x-Math.floor(t.x);break;case Oi:t.x=t.x<0?0:1;break;case tb: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 tf:t.y=t.y-Math.floor(t.y);break;case Oi:t.y=t.y<0?0:1;break;case tb: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=SE,i.DEFAULT_ANISOTROPY=1,i})(),An=class i{constructor(e=0,t=0,n=0,r=1){i.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*n+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*n+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*n+s[11]*r+s[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],f=l[1],h=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(c+1)/2,x=(h+1)/2,_=(m+1)/2,E=(d+f)/4,D=(u+v)/4,A=(p+g)/4;return y>x&&y>_?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=E/n,o=D/n):x>_?x<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),n=E/r,o=A/r):_<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),n=D/o,r=A/o),this.set(n,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this.w=Ht(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this.w=Ht(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},rb=class extends Cs{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new An(0,0,e,t),this.scissorTest=!1,this.viewport=new An(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new Go(r);this.textures=[];let s=n.count;for(let a=0;a<s;a++)this.textures[a]=o.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:jn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new af(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"})}},kr=class extends rb{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Rp=class extends Go{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var ob=class extends Go{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yi=class{constructor(e=new G(1/0,1/0,1/0),t=new G(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(ko.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ko.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=ko.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let o=n.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let s=0,a=o.count;s<a;s++)e.isMesh===!0?e.getVertexPosition(s,ko):ko.fromBufferAttribute(o,s),ko.applyMatrix4(e.matrixWorld),this.expandByPoint(ko);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Pv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Pv.copy(n.boundingBox)),Pv.applyMatrix4(e.matrixWorld),this.union(Pv)}let r=e.children;for(let o=0,s=r.length;o<s;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,ko),ko.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Cp),Av.subVectors(this.max,Cp),zu.subVectors(e.a,Cp),Vu.subVectors(e.b,Cp),Gu.subVectors(e.c,Cp),ll.subVectors(Vu,zu),cl.subVectors(Gu,Vu),zc.subVectors(zu,Gu);let t=[0,-ll.z,ll.y,0,-cl.z,cl.y,0,-zc.z,zc.y,ll.z,0,-ll.x,cl.z,0,-cl.x,zc.z,0,-zc.x,-ll.y,ll.x,0,-cl.y,cl.x,0,-zc.y,zc.x,0];return!iE(t,zu,Vu,Gu,Av)||(t=[1,0,0,0,1,0,0,0,1],!iE(t,zu,Vu,Gu,Av))?!1:(Ov.crossVectors(ll,cl),t=[Ov.x,Ov.y,Ov.z],iE(t,zu,Vu,Gu,Av))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ko).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ko).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(fa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fa),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}},fa=[new G,new G,new G,new G,new G,new G,new G,new G],ko=new G,Pv=new Yi,zu=new G,Vu=new G,Gu=new G,ll=new G,cl=new G,zc=new G,Cp=new G,Av=new G,Ov=new G,Vc=new G;function iE(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){Vc.fromArray(i,o);let a=r.x*Math.abs(Vc.x)+r.y*Math.abs(Vc.y)+r.z*Math.abs(Vc.z),l=e.dot(Vc),c=t.dot(Vc),d=n.dot(Vc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var v9=new Yi,wp=new G,rE=new G,gl=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):v9.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;wp.subVectors(e,this.center);let t=wp.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(wp,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):(rE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(wp.copy(e.center).add(rE)),this.expandByPoint(wp.copy(e.center).sub(rE))),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}},ha=new G,oE=new G,Rv=new G,dl=new G,sE=new G,kv=new G,aE=new G,xa=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,ha)),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=ha.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ha.copy(this.origin).addScaledVector(this.direction,t),ha.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){oE.copy(e).add(t).multiplyScalar(.5),Rv.copy(t).sub(e).normalize(),dl.copy(this.origin).sub(oE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Rv),a=dl.dot(this.direction),l=-dl.dot(Rv),c=dl.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(oE).addScaledVector(Rv,f),h}intersectSphere(e,t){ha.subVectors(e.center,this.origin);let n=ha.dot(this.direction),r=ha.dot(ha)-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,ha)!==null}intersectTriangle(e,t,n,r,o){sE.subVectors(t,e),kv.subVectors(n,e),aE.crossVectors(sE,kv);let s=this.direction.dot(aE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;dl.subVectors(this.origin,e);let l=a*this.direction.dot(kv.crossVectors(dl,kv));if(l<0)return null;let c=a*this.direction.dot(sE.cross(dl));if(c<0||l+c>s)return null;let d=-a*dl.dot(aE);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/Hu.setFromMatrixColumn(e,0).length(),o=1/Hu.setFromMatrixColumn(e,1).length(),s=1/Hu.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(b9,e,y9)}lookAt(e,t,n){let r=this.elements;return Ar.subVectors(e,t),Ar.lengthSq()===0&&(Ar.z=1),Ar.normalize(),ul.crossVectors(n,Ar),ul.lengthSq()===0&&(Math.abs(n.z)===1?Ar.x+=1e-4:Ar.z+=1e-4,Ar.normalize(),ul.crossVectors(n,Ar)),ul.normalize(),Fv.crossVectors(Ar,ul),r[0]=ul.x,r[4]=Fv.x,r[8]=Ar.x,r[1]=ul.y,r[5]=Fv.y,r[9]=Ar.y,r[2]=ul.z,r[6]=Fv.z,r[10]=Ar.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[4],l=n[8],c=n[12],d=n[1],u=n[5],f=n[9],h=n[13],p=n[2],v=n[6],g=n[10],m=n[14],b=n[3],y=n[7],x=n[11],_=n[15],E=r[0],D=r[4],A=r[8],S=r[12],I=r[1],L=r[5],H=r[9],z=r[13],X=r[2],q=r[6],K=r[10],j=r[14],te=r[3],ye=r[7],xe=r[11],Ce=r[15];return o[0]=s*E+a*I+l*X+c*te,o[4]=s*D+a*L+l*q+c*ye,o[8]=s*A+a*H+l*K+c*xe,o[12]=s*S+a*z+l*j+c*Ce,o[1]=d*E+u*I+f*X+h*te,o[5]=d*D+u*L+f*q+h*ye,o[9]=d*A+u*H+f*K+h*xe,o[13]=d*S+u*z+f*j+h*Ce,o[2]=p*E+v*I+g*X+m*te,o[6]=p*D+v*L+g*q+m*ye,o[10]=p*A+v*H+g*K+m*xe,o[14]=p*S+v*z+g*j+m*Ce,o[3]=b*E+y*I+x*X+_*te,o[7]=b*D+y*L+x*q+_*ye,o[11]=b*A+y*H+x*K+_*xe,o[15]=b*S+y*z+x*j+_*Ce,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],d=e[2],u=e[6],f=e[10],h=e[14],p=e[3],v=e[7],g=e[11],m=e[15],b=l*h-c*f,y=a*h-c*u,x=a*f-l*u,_=s*h-c*d,E=s*f-l*d,D=s*u-a*d;return t*(v*b-g*y+m*x)-n*(p*b-g*_+m*E)+r*(p*y-v*_+m*D)-o*(p*x-v*E+g*D)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],f=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],b=u*g*c-v*f*c+v*l*h-a*g*h-u*l*m+a*f*m,y=p*f*c-d*g*c-p*l*h+s*g*h+d*l*m-s*f*m,x=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,_=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,E=t*b+n*y+r*x+o*_;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/E;return e[0]=b*D,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*D,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*D,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*D,e[4]=y*D,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*D,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*D,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*D,e[8]=x*D,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*D,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*D,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*D,e[12]=_*D,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*D,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*D,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*D,this}scale(e){let t=this.elements,n=e.x,r=e.y,o=e.z;return t[0]*=n,t[4]*=r,t[8]*=o,t[1]*=n,t[5]*=r,t[9]*=o,t[2]*=n,t[6]*=r,t[10]*=o,t[3]*=n,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),o=1-n,s=e.x,a=e.y,l=e.z,c=o*s,d=o*a;return this.set(c*s+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,o,s){return this.set(1,n,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,d=s+s,u=a+a,f=o*c,h=o*d,p=o*u,v=s*d,g=s*u,m=a*u,b=l*c,y=l*d,x=l*u,_=n.x,E=n.y,D=n.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*E,r[5]=(1-(f+m))*E,r[6]=(g+b)*E,r[7]=0,r[8]=(p+y)*D,r[9]=(g-b)*D,r[10]=(1-(f+v))*D,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let o=Hu.set(r[0],r[1],r[2]).length(),s=Hu.set(r[4],r[5],r[6]).length(),a=Hu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Fo.copy(this);let c=1/o,d=1/s,u=1/a;return Fo.elements[0]*=c,Fo.elements[1]*=c,Fo.elements[2]*=c,Fo.elements[4]*=d,Fo.elements[5]*=d,Fo.elements[6]*=d,Fo.elements[8]*=u,Fo.elements[9]*=u,Fo.elements[10]*=u,t.setFromRotationMatrix(Fo),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=Lo,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(n-r),f=(t+e)/(t-e),h=(n+r)/(n-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===Lo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Op)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,o,s,a=Lo,l=!1){let c=this.elements,d=2/(t-e),u=2/(n-r),f=-(t+e)/(t-e),h=-(n+r)/(n-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===Lo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Op)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}},Hu=new G,Fo=new Mn,b9=new G(0,0,0),y9=new G(1,1,1),ul=new G,Fv=new G,Ar=new G,jk=new Mn,Wk=new mo,_a=(()=>{class i{constructor(t=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,n,r,o=this._order){return this._x=t,this._y=n,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,n=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(n){case"XYZ":this._y=Math.asin(Ht(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Ht(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Ht(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-Ht(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin(Ht(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-Ht(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:ht("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return jk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(jk,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return Wk.setFromEuler(this),this.setFromQuaternion(Wk,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})(),lf=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}},x9=0,$k=new G,ju=new mo,pa=new Mn,Nv=new G,Ep=new G,_9=new G,S9=new mo,Xk=new G(1,0,0),Yk=new G(0,1,0),qk=new G(0,0,1),Kk={type:"added"},C9={type:"removed"},Wu={type:"childadded",child:null},lE={type:"childremoved",child:null},Fr=(()=>{class i extends Cs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:x9++}),this.uuid=yf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new G,n=new _a,r=new mo,o=new G(1,1,1);function s(){r.setFromEuler(n,!1)}function a(){n.setFromQuaternion(r,void 0,!1)}n._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new Mn},normalMatrix:{value:new At}}),this.matrix=new Mn,this.matrixWorld=new Mn,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new lf,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 ju.setFromAxisAngle(t,n),this.quaternion.multiply(ju),this}rotateOnWorldAxis(t,n){return ju.setFromAxisAngle(t,n),this.quaternion.premultiply(ju),this}rotateX(t){return this.rotateOnAxis(Xk,t)}rotateY(t){return this.rotateOnAxis(Yk,t)}rotateZ(t){return this.rotateOnAxis(qk,t)}translateOnAxis(t,n){return $k.copy(t).applyQuaternion(this.quaternion),this.position.add($k.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(Xk,t)}translateY(t){return this.translateOnAxis(Yk,t)}translateZ(t){return this.translateOnAxis(qk,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(pa.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?Nv.copy(t):Nv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Ep.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?pa.lookAt(Ep,Nv,this.up):pa.lookAt(Nv,Ep,this.up),this.quaternion.setFromRotationMatrix(pa),o&&(pa.extractRotation(o.matrixWorld),ju.setFromRotationMatrix(pa),this.quaternion.premultiply(ju.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(yt("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(Kk),Wu.child=t,this.dispatchEvent(Wu),Wu.child=null):yt("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(C9),lE.child=t,this.dispatchEvent(lE),lE.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),pa.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),pa.multiply(t.parent.matrixWorld)),t.applyMatrix4(pa),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Kk),Wu.child=t,this.dispatchEvent(Wu),Wu.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(Ep,t,_9),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ep,S9,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(t)}traverseAncestors(t){let n=this.parent;n!==null&&(t(n),n.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(t)}updateWorldMatrix(t,n){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>ue(R({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>R({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function s(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=s(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d<u;d++){let f=c[d];s(t.shapes,f)}else s(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(s(t.materials,this.material[c]));o.material=l}else o.material=s(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(s(t.animations,c))}}if(n){let l=a(t.geometries),c=a(t.materials),d=a(t.textures),u=a(t.images),f=a(t.shapes),h=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),n===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new G(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),No=new G,ma=new G,cE=new G,ga=new G,$u=new G,Xu=new G,Zk=new G,dE=new G,uE=new G,fE=new G,hE=new An,pE=new An,mE=new An,pl=class i{constructor(e=new G,t=new G,n=new G){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),No.subVectors(e,t),r.cross(No);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){No.subVectors(r,t),ma.subVectors(n,t),cE.subVectors(e,t);let s=No.dot(No),a=No.dot(ma),l=No.dot(cE),c=ma.dot(ma),d=ma.dot(cE),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,ga)===null?!1:ga.x>=0&&ga.y>=0&&ga.x+ga.y<=1}static getInterpolation(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,ga)===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,ga.x),l.addScaledVector(s,ga.y),l.addScaledVector(a,ga.z),l)}static getInterpolatedAttribute(e,t,n,r,o,s){return hE.setScalar(0),pE.setScalar(0),mE.setScalar(0),hE.fromBufferAttribute(e,t),pE.fromBufferAttribute(e,n),mE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(hE,o.x),s.addScaledVector(pE,o.y),s.addScaledVector(mE,o.z),s}static isFrontFacing(e,t,n,r){return No.subVectors(n,t),ma.subVectors(e,t),No.cross(ma).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return No.subVectors(this.c,this.b),ma.subVectors(this.a,this.b),No.cross(ma).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;$u.subVectors(r,n),Xu.subVectors(o,n),dE.subVectors(e,n);let l=$u.dot(dE),c=Xu.dot(dE);if(l<=0&&c<=0)return t.copy(n);uE.subVectors(e,r);let d=$u.dot(uE),u=Xu.dot(uE);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($u,s);fE.subVectors(e,o);let h=$u.dot(fE),p=Xu.dot(fE);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(Xu,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Zk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Zk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector($u,s).addScaledVector(Xu,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},XF={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},fl={h:0,s:0,l:0},Lv={h:0,s:0,l:0};function gE(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 ct=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=bn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=Gt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Gt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=Gt.workingColorSpace){if(e=eM(e,1),t=Ht(t,0,1),n=Ht(n,0,1),t===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o;this.r=gE(s,o,e+1/3),this.g=gE(s,o,e),this.b=gE(s,o,e-1/3)}return Gt.colorSpaceToWorking(this,r),this}setStyle(e,t=bn){function n(o){o!==void 0&&parseFloat(o)<1&&ht("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:ht("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);ht("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=bn){let n=XF[e.toLowerCase()];return n!==void 0?this.setHex(n,t):ht("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=ya(e.r),this.g=ya(e.g),this.b=ya(e.b),this}copyLinearToSRGB(e){return this.r=Qu(e.r),this.g=Qu(e.g),this.b=Qu(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=bn){return Gt.workingToColorSpace(Ai.copy(this),e),Math.round(Ht(Ai.r*255,0,255))*65536+Math.round(Ht(Ai.g*255,0,255))*256+Math.round(Ht(Ai.b*255,0,255))}getHexString(e=bn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Gt.workingColorSpace){Gt.workingToColorSpace(Ai.copy(this),t);let n=Ai.r,r=Ai.g,o=Ai.b,s=Math.max(n,r,o),a=Math.min(n,r,o),l,c,d=(a+s)/2;if(a===s)l=0,c=0;else{let u=s-a;switch(c=d<=.5?u/(s+a):u/(2-s-a),s){case n:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-n)/u+2;break;case o:l=(n-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=Gt.workingColorSpace){return Gt.workingToColorSpace(Ai.copy(this),t),e.r=Ai.r,e.g=Ai.g,e.b=Ai.b,e}getStyle(e=bn){Gt.workingToColorSpace(Ai.copy(this),e);let t=Ai.r,n=Ai.g,r=Ai.b;return e!==bn?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(fl),this.setHSL(fl.h+e,fl.s+t,fl.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(fl),e.getHSL(Lv);let n=Ip(fl.h,Lv.h,t),r=Ip(fl.s,Lv.s,t),o=Ip(fl.l,Lv.l,t);return this.setHSL(n,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*r,this.g=o[1]*t+o[4]*n+o[7]*r,this.b=o[2]*t+o[5]*n+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Ai=new ct;ct.NAMES=XF;var w9=0,ar=class extends Cs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:w9++}),this.uuid=yf(),this.name="",this.type="Material",this.blending=Wc,this.side=Xi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Qv,this.blendDst=eb,this.blendEquation=ml,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ct(0,0,0),this.blendAlpha=0,this.depthFunc=$c,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=ME,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=jc,this.stencilZFail=jc,this.stencilZPass=jc,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){ht(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ht(`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!==Wc&&(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!==Qv&&(n.blendSrc=this.blendSrc),this.blendDst!==eb&&(n.blendDst=this.blendDst),this.blendEquation!==ml&&(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!==$c&&(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!==ME&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==jc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==jc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==jc&&(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++}},kp=class extends ar{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ct(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 _a,this.combine=Ob,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,Uv=new gt,E9=0,Rr=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:E9++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=TE,this.updateRanges=[],this.gpuType=Vo,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Uv.fromBufferAttribute(this,t),Uv.applyMatrix3(e),this.setXY(t,Uv.x,Uv.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=Ju(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=Ju(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=Ju(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=Ju(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=Ju(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!==TE&&(e.usage=this.usage),e}};var Fp=class extends Rr{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var Np=class extends Rr{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var Hn=class extends Rr{constructor(e,t,n){super(new Float32Array(e),t,n)}},M9=0,ho=new Mn,vE=new Fr,Yu=new G,Or=new Yi,Mp=new Yi,ui=new G,ei=class i extends Cs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:M9++}),this.uuid=yf(),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(JE(e)?Np:Fp)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new At().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ho.makeRotationFromQuaternion(e),this.applyMatrix4(ho),this}rotateX(e){return ho.makeRotationX(e),this.applyMatrix4(ho),this}rotateY(e){return ho.makeRotationY(e),this.applyMatrix4(ho),this}rotateZ(e){return ho.makeRotationZ(e),this.applyMatrix4(ho),this}translate(e,t,n){return ho.makeTranslation(e,t,n),this.applyMatrix4(ho),this}scale(e,t,n){return ho.makeScale(e,t,n),this.applyMatrix4(ho),this}lookAt(e){return vE.lookAt(e),vE.updateMatrix(),this.applyMatrix4(vE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Yu).negate(),this.translate(Yu.x,Yu.y,Yu.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&&ht("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){yt("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];Or.setFromBufferAttribute(o),this.morphTargetsRelative?(ui.addVectors(this.boundingBox.min,Or.min),this.boundingBox.expandByPoint(ui),ui.addVectors(this.boundingBox.max,Or.max),this.boundingBox.expandByPoint(ui)):(this.boundingBox.expandByPoint(Or.min),this.boundingBox.expandByPoint(Or.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&yt('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 gl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){yt("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(Or.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];Mp.setFromBufferAttribute(a),this.morphTargetsRelative?(ui.addVectors(Or.min,Mp.min),Or.expandByPoint(ui),ui.addVectors(Or.max,Mp.max),Or.expandByPoint(ui)):(Or.expandByPoint(Mp.min),Or.expandByPoint(Mp.max))}Or.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)ui.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(ui));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)ui.fromBufferAttribute(a,c),l&&(Yu.fromBufferAttribute(e,c),ui.add(Yu)),r=Math.max(r,n.distanceToSquared(ui))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&yt('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){yt("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 Rr(new Float32Array(4*n.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let A=0;A<n.count;A++)a[A]=new G,l[A]=new G;let c=new G,d=new G,u=new G,f=new gt,h=new gt,p=new gt,v=new G,g=new G;function m(A,S,I){c.fromBufferAttribute(n,A),d.fromBufferAttribute(n,S),u.fromBufferAttribute(n,I),f.fromBufferAttribute(o,A),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,I),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[A].add(v),a[S].add(v),a[I].add(v),l[A].add(g),l[S].add(g),l[I].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)m(e.getX(z+0),e.getX(z+1),e.getX(z+2))}let y=new G,x=new G,_=new G,E=new G;function D(A){_.fromBufferAttribute(r,A),E.copy(_);let S=a[A];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(E,S);let L=x.dot(l[A])<0?-1:1;s.setXYZW(A,y.x,y.y,y.z,L)}for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)D(e.getX(z+0)),D(e.getX(z+1)),D(e.getX(z+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Rr(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let f=0,h=n.count;f<h;f++)n.setXYZ(f,0,0,0);let r=new G,o=new G,s=new G,a=new G,l=new G,c=new G,d=new G,u=new G;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),v=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,v),c.fromBufferAttribute(n,g),a.add(d),l.add(d),c.add(d),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(v,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),n.setXYZ(f+0,d.x,d.y,d.z),n.setXYZ(f+1,d.x,d.y,d.z),n.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)ui.fromBufferAttribute(e,t),ui.normalize(),e.setXYZ(t,ui.x,ui.y,ui.z)}toNonIndexed(){function e(a,l){let c=a.array,d=a.itemSize,u=a.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?h=l[v]*a.data.stride+a.offset:h=l[v]*d;for(let m=0;m<d;m++)f[p++]=c[h++]}return new Rr(f,d,u)}if(this.index===null)return ht("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"})}},Jk=new Mn,Gc=new xa,Bv=new gl,Qk=new G,zv=new G,Vv=new G,Gv=new G,bE=new G,Hv=new G,eF=new G,jv=new G,qi=class extends Fr{constructor(e=new ei,t=new kp){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){Hv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(bE.fromBufferAttribute(u,e),s?Hv.addScaledVector(bE,d):Hv.addScaledVector(bE.sub(t),d))}t.add(Hv)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Bv.copy(n.boundingSphere),Bv.applyMatrix4(o),Gc.copy(e.ray).recast(e.near),!(Bv.containsPoint(Gc.origin)===!1&&(Gc.intersectSphere(Bv,Qk)===null||Gc.origin.distanceToSquared(Qk)>(e.far-e.near)**2))&&(Jk.copy(o).invert(),Gc.copy(e.ray).applyMatrix4(Jk),!(n.boundingBox!==null&&Gc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Gc)))}_computeIntersections(e,t,n){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=a.getX(x),D=a.getX(x+1),A=a.getX(x+2);r=Wv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(a.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=a.getX(g),y=a.getX(g+1),x=a.getX(g+2);r=Wv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=x,D=x+1,A=x+2;r=Wv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(l.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=g,y=g+1,x=g+2;r=Wv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function T9(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;jv.copy(a),jv.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(jv);return c<t.near||c>t.far?null:{distance:c,point:jv.clone(),object:i}}function Wv(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,zv),i.getVertexPosition(l,Vv),i.getVertexPosition(c,Gv);let d=T9(i,e,t,n,zv,Vv,Gv,eF);if(d){let u=new G;pl.getBarycoord(eF,zv,Vv,Gv,u),r&&(d.uv=pl.getInterpolatedAttribute(r,a,l,c,u,new gt)),o&&(d.uv1=pl.getInterpolatedAttribute(o,a,l,c,u,new gt)),s&&(d.normal=pl.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};pl.getNormal(zv,Vv,Gv,f.normal),d.face=f,d.barycoord=u}return d}var cf=class i extends ei{constructor(e=1,t=1,n=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,n,t,e,s,o,0),p("z","y","x",1,-1,n,t,-e,s,o,1),p("x","z","y",1,1,e,n,t,r,s,2),p("x","z","y",1,-1,e,n,-t,r,s,3),p("x","y","z",1,-1,e,t,n,r,o,4),p("x","y","z",-1,-1,e,t,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new Hn(c,3)),this.setAttribute("normal",new Hn(d,3)),this.setAttribute("uv",new Hn(u,2));function p(v,g,m,b,y,x,_,E,D,A,S){let I=x/D,L=_/A,H=x/2,z=_/2,X=E/2,q=D+1,K=A+1,j=0,te=0,ye=new G;for(let xe=0;xe<K;xe++){let Ce=xe*L-z;for(let ce=0;ce<q;ce++){let Ie=ce*I-H;ye[v]=Ie*b,ye[g]=Ce*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=E>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(ce/D),u.push(1-xe/A),j+=1}}for(let xe=0;xe<A;xe++)for(let Ce=0;Ce<D;Ce++){let ce=f+Ce+q*xe,Ie=f+Ce+q*(xe+1),Mt=f+(Ce+1)+q*(xe+1),Lt=f+(Ce+1)+q*xe;l.push(ce,Ie,Lt),l.push(Ie,Mt,Lt),te+=6}a.addGroup(h,te,S),h+=te,f+=j}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function rd(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?(ht("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function Ri(i){let e={};for(let t=0;t<i.length;t++){let n=rd(i[t]);for(let r in n)e[r]=n[r]}return e}function D9(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function tM(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Gt.workingColorSpace}var YF={clone:rd,merge:Ri},I9=`void main() {
6
6
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
7
7
  }`,P9=`void main() {
8
8
  gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );