vendor: 6,754 bytes, line 1
1"use strict";var _K=Object.defineProperty,vK=Object.defineProperties,yK=Object.getOwnPropertyDescriptors,HR=Object.getOwnPropertySymbols,bK=Object.prototype.hasOwnProperty,xK=Object.prototype.propertyIsEnumerable,GR=(Pt,Yn,Mi)=>Yn in Pt?_K(Pt,Yn,{enumerable:!0,configurable:!0,writable:!0,value:Mi}):Pt[Yn]=Mi,$b=(Pt,Yn)=>{for(var Mi in Yn||(Yn={}))bK.call(Yn,Mi)&&GR(Pt,Mi,Yn[Mi]);if(HR)for(var Mi of HR(Yn))xK.call(Yn,Mi)&&GR(Pt,Mi,Yn[Mi]);return Pt},WR=(Pt,Yn)=>vK(Pt,yK(Yn));(self.webpackChunkMpaPortal=self.webpackChunkMpaPortal||[]).push([[179],{550:()=>{function Pt(n){return"function"==typeof n}function Yn(n){const t=n(i=>{Error.call(i),i.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const Mi=Yn(n=>function(t){n(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function Hc(n,e){if(n){const t=n.indexOf(e);0<=t&&n.splice(t,1)}}class Bt{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const s of t)s.remove(this);else t.remove(this);const{initialTeardown:i}=this;if(Pt(i))try{i()}catch(s){e=s instanceof Mi?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{Xb(s)}catch(o){e=null!=e?e:[],o instanceof Mi?e=[...e,...o.errors]:e.push(o)}}if(e)throw new Mi(e)}}add(e){var t;if(e&&e!==this)if(this.closed)Xb(e);else{if(e instanceof Bt){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(e)}}_hasParent(e){const{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){const{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&Hc(t,e)}remove(e){const{_finalizers:t}=this;t&&Hc(t,e),e instanceof Bt&&e._removeParent(this)}}Bt.EMPTY=(()=>{const n=new Bt;return n.closed=!0,n})();const qb=Bt.EMPTY;function Yb(n){return n instanceof Bt||n&&"closed"in n&&Pt(n.remove)&&Pt(n.add)&&Pt(n.unsubscribe)}function Xb(n){Pt(n)?n():n.unsubscribe()}const qo={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},$h={setTimeout(n,e,...t){const{delegate:i}=$h;return(null==i?void 0:i.setTimeout)?i.setTimeout(n,e,...t):setTimeout(n,e,...t)},clearTimeout(n){const{delegate:e}=$h;return((null==e?void 0:e.clearTimeout)||clearTimeout)(n)},delegate:void 0};function Zb(n){$h.setTimeout(()=>{const{onUnhandledError:e}=qo;if(!e)throw n;e(n)})}function Kb(){}const jR=Bm("C",void 0,void 0);function Bm(n,e,t){return{kind:n,value:e,error:t}}let Yo=null;function qh(n){if(qo.useDeprecatedSynchronousErrorHandling){const e=!Yo;if(e&&(Yo={errorThrown:!1,error:null}),n(),e){const{errorThrown:t,error:i}=Yo;if(Yo=null,t)throw i}}else n()}class Vm extends Bt{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Yb(e)&&e.add(this)):this.destination=JR}static create(e,t,i){return new Gc(e,t,i)}next(e){this.isStopped?Hm(function qR(n){return Bm("N",n,void 0)}(e),this):this._next(e)}error(e){this.isStopped?Hm(function $R(n){return Bm("E",void 0,n)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Hm(jR,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()}}}const XR=Function.prototype.bind;function zm(n,e){return XR.call(n,e)}class ZR{constructor(e){this.partialObserver=e}next(e){const{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(i){Yh(i)}}error(e){const{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(i){Yh(i)}else Yh(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){Yh(t)}}}class Gc extends Vm{constructor(e,t,i){let r;if(super(),Pt(e)||!e)r={next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=i?i:void 0};else{let s;this&&qo.useDeprecatedNextContext?(s=Object.create(e),s.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&zm(e.next,s),error:e.error&&zm(e.error,s),complete:e.complete&&zm(e.complete,s)}):r=e}this.destination=new ZR(r)}}function Yh(n){qo.useDeprecatedSynchronousErrorHandling?function YR(n){qo.useDeprecatedSynchronousErrorHandling&&Yo&&(Yo.errorThrown=!0,Yo.error=n)}(n):Zb(n)}function Hm(n,e){const{onStoppedNotification:t}=qo;t&&$h.setTimeout(()=>t(n,e))}const JR={closed:!0,next:Kb,error:function KR(n){throw n},complete:Kb},Gm="function"==typeof Symbol&&Symbol.observable||"@@observable";function Xo(n){return n}let Dn=(()=>{class n{constructor(t){t&&(this._subscribe=t)}lift(t){const i=new n;return i.source=this,i.operator=t,i}subscribe(t,i,r){const s=function e3(n){return n&&n instanceof Vm||function QR(n){return n&&Pt(n.next)&&Pt(n.error)&&Pt(n.complete)}(n)&&Yb(n)}(t)?t:new Gc(t,i,r);return qh(()=>{const{operator:o,source:a}=this;s.add(o?o.call(s,a):a?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(t){try{return this._subscribe(t)}catch(i){t.error(i)}}forEach(t,i){return new(i=Qb(i))((r,s)=>{const o=new Gc({next:a=>{try{t(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:r});this.subscribe(o)})}_subscribe(t){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(t)}[Gm](){return this}pipe(...t){return function Jb(n){return 0===n.length?Xo:1===n.length?n[0]:function(t){return n.reduce((i,r)=>r(i),t)}}(t)(this)}toPromise(t){return new(t=Qb(t))((i,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>i(s))})}}return n.create=e=>new n(e),n})();function Qb(n){var e;return null!==(e=null!=n?n:qo.Promise)&&void 0!==e?e:Promise}const t3=Yn(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let is=(()=>{class n extends Dn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const i=new ex(this,this);return i.operator=t,i}_throwIfClosed(){if(this.closed)throw new t3}next(t){qh(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(t)}})}error(t){qh(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:i}=this;for(;i.length;)i.shift().error(t)}})}complete(){qh(()=>
vendor: 4,177 bytes, line 1
1{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{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(null===(t=this.observers)||void 0===t?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){const{hasError:i,isStopped:r,observers:s}=this;return i||r?qb:(this.currentObservers=null,s.push(t),new Bt(()=>{this.currentObservers=null,Hc(s,t)}))}_checkFinalizedStatuses(t){const{hasError:i,thrownError:r,isStopped:s}=this;i?t.error(r):s&&t.complete()}asObservable(){const t=new Dn;return t.source=this,t}}return n.create=(e,t)=>new ex(e,t),n})();class ex extends is{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===i||i.call(t,e)}error(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===i||i.call(t,e)}complete(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)}_subscribe(e){var t,i;return null!==(i=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==i?i:qb}}function tx(n){return Pt(null==n?void 0:n.lift)}function ni(n){return e=>{if(tx(e))return e.lift(function(t){try{return n(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Xn(n,e,t,i,r){return new n3(n,e,t,i,r)}class n3 extends Vm{constructor(e,t,i,r,s,o){super(e),this.onFinalize=s,this.shouldUnsubscribe=o,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=i?function(){try{i()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}}function Vt(n,e){return ni((t,i)=>{let r=0;t.subscribe(Xn(i,s=>{i.next(n.call(e,s,r++))}))})}function oo(n){return this instanceof oo?(this.v=n,this):new oo(n)}function rx(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=t.apply(n,e||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function o(f){return function(p){return Promise.resolve(p).then(f,h)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(f,p){i[f]&&(r[f]=function(_){return new Promise(function(g,m){s.push([f,_,g,m])>1||l(f,_)})},p&&(r[f]=p(r[f])))}function l(f,p){try{!function c(f){f.value instanceof oo?Promise.resolve(f.value.v).then(u,h):d(s[0][2],f)}(i[f](p))}catch(_){d(s[0][3],_)}}function u(f){l("next",f)}function h(f){l("throw",f)}function d(f,p){f(p),s.shift(),s.length&&l(s[0][0],s[0][1])}}function sx(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=n[Symbol.asyncIterator];return e?e.call(n):(n=function qm(n){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&n[e],i=0;if(t)return t.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=n[s]&&function(o){return new Promise(function(a,l){!function r(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}(a,l,(o=n[s](o)).done,o.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const ox=n=>n&&"number"==typeof n.length&&"function"!=typeof n;function ax(n){return Pt(null==n?void 0:n.then)}function lx(n){return Pt(n[Gm])}function cx(n){return Symbol.asyncIterator&&Pt(null==n?void 0:n[Symbol.asyncIterator])}function ux(n){return new TypeError(`You provided ${null!==n&&"object"==typeof n?"an invali
1d object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const hx=function D3(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function dx(n){return Pt(null==n?void 0:n[hx])}function fx(n){return rx(this,arguments,function*(){const t=n.getReader();try{for(;;){const{value:i,done:r}=yield oo(t.read());if(r)return yield oo(void 0);yield yield oo(i)}}finally{t.releaseLock()}})}function px(n){return Pt(null==n?void 0:n.getReader)}function Lr(n){if(n instanceof Dn)return n;if(null!=n){if(lx(n))return function P3(n){return new Dn(e=>{const t=n[Gm]();if(Pt(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(n);if(ox(n))return function I3(n){return new Dn(e=>{for(let t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}(n);if(ax(n))return function R3(n){return new Dn(e=>{n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,Zb)})}(n);if(cx(n))return mx(n);if(dx(n))return function O3(n){return new Dn(e=>{for(const t of n)if(e.next(t),e.closed)return;e.complete()})}(n);if(px(n))return function L3(n){return mx(fx(n))}(n)}throw ux(n)}function mx(n){return new Dn(e=>{(function F3(n,e){var t,i,r,s;return function nx(n,e,t,i){return new(t||(t=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(h){o(h)}}function l(u){try{c(i.throw(u))}catch(h){o(h)}}function c(u){u.done?s(u.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(u.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}(this,void 0,void 0,function*(){try{for(t=sx(n);!(i=yield t.next()).done;)if(e.next(i.value),e.closed)return}catch(o){r={error:o}}finally{try{i&&!i.done&&(s=t.return)&&(yield s.call(t))}finally{if(r)throw r.error}}e.complete()})})(n,e).catch(t=>e.error(t))})}function Ps(n,e,t,i=0,r=!1){const s=e.schedule(function(){t(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(s),!r)return s}function Zn(n,e,t=1/0){return Pt(e)?Zn((i,r)=>Vt((s,o)=>e(i,s,r,o))(Lr(n(i,r))),t):("number"==typeof e&&(t=e),ni((i,r)=>function N3(n,e,t,i,r,s,o,a){const l=[];let c=0,u=0,h=!1;const d=()=>{h&&!l.length&&!c&&e.complete()},f=_=>c<i?p(_):l.push(_),p=_=>{s&&e.next(_),c++;let g=!1;Lr(t(_,u++)).subscribe(Xn(e,m=>{null==r||r(m),s?f(m):e.next(m)},()=>{g=!0},void 0,()=>{if(g)try{for(c--;l.length&&c<i;){const m=l.shift();o?Ps(e,o,()=>p(m)):p(m)}d()}catch(m){e.error(m)}}))};return n.subscribe(Xn(e,f,()=>{h=!0,d()})),()=>{null==a||a()}}(i,r,n,t)))}function Wc(n=1/0){return Zn(Xo,n)}const Is=new Dn(n=>n.complete());function Xm(n){return n[n.length-1]}function gx(n){return Pt(Xm(n))?n.pop():void 0}function jc(n){return function U3(n){return n&&Pt(n.schedule)}(Xm(n))?n.pop():void 0}function _x(n,e=0){return ni((t,i)=>{t.subscribe(Xn(i,r=>Ps(i,n,()=>i.next(r),e),()=>Ps(i,n,()=>i.complete(),e),r=>Ps(i,n,()=>i.error(r),e)))})}function vx(n,e=0){return ni((t,i)=>{i.add(n.schedule(()=>t.subscribe(i),e))})}function yx(n,e){if(!n)throw new Error("Iterable cannot be null");return new Dn(t=>{Ps(t,e,()=>{const i=n[Symbol.asyncIterator]();Ps(t,e,()=>{i.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function ii(n,e){return e?function j3(n,e){if(null!=n){if(lx(n))return function V3(n,e){return Lr(n).pipe(vx(e),_x(e))}(n,e);if(ox(n))return function H3(n,e){return new Dn(t=>{let i=0;return e.schedule(function(){i===n.length?t.complete():(t.next(n[i++]),t.closed||this.schedule())})})}(n,e);if(ax(n))return function z3(n,e){return Lr(n).pipe(vx(e),_x(e))}(n,e);if(cx(n))return yx(n,e);if(dx(n))return function G3(n,e){return new Dn(t=>{let i;return Ps(t,e,()=>{i=n[hx](),Ps(t,e,()=>{let r,s;try{({value:r,done:s}=i.next())}catch(o){return void t.error(o)}s?t.complete():t.next(r)},0,!0)}),()=>Pt(null==i?void 0:i.return)&&i.return()})}(n,e);if(px(n))return function W3(n,e){return yx(fx(n),e)}(n,e)}throw ux(n)}(n,e):Lr(n)}function bx(n={}){const{connector:e=(()=>new is),resetOnError:t=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return s=>{let o,a,l,c=0,u=!1,h=!1;const d=()=>{null==a||a.unsubscribe(),a=void 0},f=()=>{d(),o=l=void 0,u=h=!1},p=()=>{const _=o;f(),null==_||_.unsubscribe()};return ni((_,g)=>{c++,!h&&!u&&d();const m=l=null!=l?l:e();g.add(()=>{c--,0===c&&!h&&!u&&(a=Zm(p,r))}),m.subscribe(g),!o&&c>0&&(o=new Gc({next:v=>m.next(v),error:v=>{h=!0,d(),a=Zm(f,t,v),m.error(v)},complete:()=>{u=!0,d(),a=Zm(f,i),m.complete()}}),Lr(_).subscribe(o))})(s)}}function Zm(n,e,...t){if(!0===e)return void n();if(!1===e)return;const i=new Gc({next:()=>{i.unsubscribe(),n()}});return e(...t).subscribe(i)}function Qt(n){for(let e in n)if(n[e]===Qt)return e;throw Error("Could not find renamed property on target object.")}function Km(n,e){for(const t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function Ht(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(Ht).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const e=n.toString();if(null==e)return""+e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function Jm(n,e){return null==n||""===n?null===e?"":e:null==e||""===e?n:n+" "+e}const q3=Qt({__forward_ref__:Qt});function tn(n){return n.__forward_ref__=tn,n.toString=function(){return Ht(this())},n}function mt(n){return xx(n)?n():n}function xx(n){return"function"==typeof n&&n.hasOwnProperty(q3)&&n.__forward_ref__===tn}
1class Ot extends Error{constructor(e,t){super(function Qm(n,e){return`NG0${Math.abs(n)}${e?": "+e:""}`}(e,t)),this.code=e}}function rt(n){return"string"==typeof n?n:null==n?"":String(n)}function ri(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():rt(n)}function Xh(n,e){const t=e?` in ${e}`:"";throw new Ot(-201,`No provider for ${ri(n)} found${t}`)}function rr(n,e){null==n&&function Gt(n,e,t,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${t} ${i} ${e} <=Actual]`))}(e,n,null,"!=")}function Ze(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Ci(n){return{providers:n.providers||[],imports:n.imports||[]}}function eg(n){return wx(n,Zh)||wx(n,Cx)}function wx(n,e){return n.hasOwnProperty(e)?n[e]:null}function Mx(n){return n&&(n.hasOwnProperty(tg)||n.hasOwnProperty(eO))?n[tg]:null}const Zh=Qt({\u0275prov:Qt}),tg=Qt({\u0275inj:Qt}),Cx=Qt({ngInjectableDef:Qt}),eO=Qt({ngInjectorDef:Qt});var tt=(()=>((tt=tt||{})[tt.Default=0]="Default",tt[tt.Host=1]="Host",tt[tt.Self=2]="Self",tt[tt.SkipSelf=4]="SkipSelf",tt[tt.Optional=8]="Optional",tt))();let ng;function ao(n){const e=ng;return ng=n,e}function Sx(n,e,t){const i=eg(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:t&tt.Optional?null:void 0!==e?e:void Xh(Ht(n),"Injector")}function lo(n){return{toString:n}.toString()}var Fr=(()=>((Fr=Fr||{})[Fr.OnPush=0]="OnPush",Fr[Fr.Default=1]="Default",Fr))(),rs=(()=>{return(n=rs||(rs={}
1))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",rs;var n})();const nO="undefined"!=typeof globalThis&&globalThis,iO="undefined"!=typeof window&&window,rO="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Xt=nO||"undefined"!=typeof global&&global||iO||rO,qa={},en=[],Kh=Qt({\u0275cmp:Qt}),ig=Qt({\u0275dir:Qt}),rg=Qt({\u0275pipe:Qt}),Ex=Qt({\u0275mod:Qt}),Os=Qt({\u0275fac:Qt}),$c=Qt({__NG_ELEMENT_ID__:Qt});let sO=0;function Zt(n){return lo(()=>{const t={},i={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===Fr.OnPush,directiveDefs:null,pipeDefs:null,selectors:n.selectors||en,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||rs.Emulated,id:"c",styles:n.styles||en,_:null,setInput:null,schemas:n.schemas||null,tView:null},r=n.directives,s=n.features,o=n.pipes;return i.id+=sO++,i.inputs=Px(n.inputs,t),i.outputs=Px(n.outputs),s&&s.forEach(a=>a(i)),i.directiveDefs=r?()=>("function"==typeof r?r():r).map(Tx):null,i.pipeDefs=o?()=>("function"==typeof o?o():o).map(Ax):null,i})}function Tx(n){return si(n)||function co(n){return n[ig]||null}(n)}function Ax(n){return function Zo(n){return n[rg]||null}(n)}const Dx={};function Hi(n){return lo(()=>{const e={type:n.type,bootstrap:n.bootstrap||en,declarations:n.declarations||en,imports:n.imports||en,exports:n.exports||en,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null};return null!=n.id&&(Dx[n.id]=n.type),e})}function Px(n,e){if(null==n)return qa;const t={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),t[r]=i,e&&(e[r]=s)}return t}const Ke=Zt;function Si(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,onDestroy:n.type.prototype.ngOnDestroy||null}}function si(n){return n[Kh]||null}function br(n,e){const t=n[Ex]||null;if(!t&&!0===e)throw new Error(`Type ${Ht(n)} does not have '\u0275mod' property.`);return t}function ss(n){return Array.isArray(n)&&"object"==typeof n[1]}function kr(n){return Array.isArray(n)&&!0===n[1]}function ag(n){return 0!=(8&n.flags)}function td(n){return 2==(2&n.flags)}function nd(n){return 1==(1&n.flags)}function Ur(n){return null!==n.template}function hO(n){return 0!=(512&n[2])}function ea(n,e){return n.hasOwnProperty(Os)?n[Os]:null}class pO{constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}}function wr(){return Rx}function Rx(n){return n.type.prototype.ngOnChanges&&(n.setInput=gO),mO}function mO(){const n=Lx(this),e=null==n?void 0:n.current;if(e){const t=n.previous;if(t===qa)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function gO(n,e,t,i){const r=Lx(n)||function _O(n,e){return n[Ox]=e}(n,{previous:qa,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[t],l=o[a];s[a]=new pO(l&&l.currentValue,e,o===qa),n[i]=e}wr.ngInherit=!0;const Ox="__ngSimpleChanges__";function Lx(n){return n[Ox]||null}let dg;function fg(){return void 0!==dg?dg:"undefined"!=typeof document?document:void 0}function wn(n){return!!n.listen}const Fx={createRenderer:(n,e)=>fg()};function On(n){for(;Array.isArray(n);)n=n[0];return n}function id(n,e){return On(e[n])}function or(n,e){return On(e[n.index])}function pg(n,e){return n.data[e]}function ar(n,e){const t=e[n];return ss(t)?t:t[0]}function Nx(n){return 4==(4&n[2])}function mg(n){return 128==(128&n[2])}function uo(n,e){return null==e?null:n[e]}function kx(n){n[18]=0}function gg(n,e){n[5]+=e;let t=n,i=n[3];for(;null!==i&&(1===e&&1===t[5]||-1===e&&0===t[5]);)i[5]+=e,t=i,i=i[3]}const st={lFrame:$x(null),bindingsEnabled:!0};function Bx(){return st.bindingsEnabled}function oe(){return st.lFrame.lView}function Ft(){return st.lFrame.tView}function hn(n){return st.lFrame.contextLView=n,n[8]}function Vn(){let n=Vx();for(;null!==n&&64===n.type;)n=n.parent;return n}function Vx(){return st.lFrame.currentTNode}function os(n,e){const t=st.lFrame;t.currentTNode=n,t.isParent=e}function _g(){return st.lFrame.isParent}function Ti(){const n=st.lFrame;let e=n.bindingRootIndex;return-1===e&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function Qa(){return st.lFrame.bindingIndex++}function Fs(n){const e=st.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function LO(n,e){const t=st.lFrame;t.bindingIndex=t.bindingRootIndex=n,yg(e)}function yg(n){st.lFrame.currentDirectiveIndex=n}function Gx(){return st.lFrame.currentQueryIndex}function xg(n){st.lFrame.currentQueryIndex=n}function NO(n){const e=n[1];return 2===e.type?e.declTNode:1===e.type?n[6]:null}function Wx(n,e,t){if(t&tt.SkipSelf){let r=e,s=n;for(;!(r=r.parent,null!==r||t&tt.Host||(r=NO(s),null===r||(s=s[15],10&r.type))););if(null===r)return!1;e=r,n=s}const i=st.lFrame=jx();return i.currentTNode=e,i.lView=n,!0}function sd(n){const e=jx(),t=n[1];st.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function jx(){const n=st.lFrame,e=null===n?null:n.child;return null===e?$x(n):e}function $x(n){const e={currentTNode:null,isParent:!0,lView:null,tView:null,
vendor: 4,647 bytes, line 1
1selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=e),e}function qx(){const n=st.lFrame;return st.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const Yx=qx;function od(){const n=qx();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Ai(){return st.lFrame.selectedIndex}function ho(n){st.lFrame.selectedIndex=n}function gn(){const n=st.lFrame;return pg(n.tView,n.selectedIndex)}function dn(){st.lFrame.currentNamespace="svg"}function Di(){!function VO(){st.lFrame.currentNamespace=null}()}function ad(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t<i;t++){const s=n.data[t].type.prototype,{ngAfterContentInit:o,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:u}=s;o&&(n.contentHooks||(n.contentHooks=[])).push(-t,o),a&&((n.contentHooks||(n.contentHooks=[])).push(t,a),(n.contentCheckHooks||(n.contentCheckHooks=[])).push(t,a)),l&&(n.viewHooks||(n.viewHooks=[])).push(-t,l),c&&((n.viewHooks||(n.viewHooks=[])).push(t,c),(n.viewCheckHooks||(n.viewCheckHooks=[])).push(t,c)),null!=u&&(n.destroyHooks||(n.destroyHooks=[])).push(t,u)}}function ld(n,e,t){Xx(n,e,3,t)}function cd(n,e,t,i){(3&n[2])===t&&Xx(n,e,t,i)}function wg(n,e){let t=n[2];(3&t)===e&&(t&=2047,t+=1,n[2]=t)}function Xx(n,e,t,i){const s=null!=i?i:-1,o=e.length-1;let a=0;for(let l=void 0!==i?65535&n[18]:0;l<o;l++)if("number"==typeof e[l+1]){if(a=e[l],null!=i&&a>=i)break}else e[l]<0&&(n[18]+=65536),(a<s||-1==s)&&(GO(n,t,e,l),n[18]=(4294901760&n[18])+l+2),l++}function GO(n,e,t,i){const r=t[i]<0,s=t[i+1],a=n[r?-t[i]:t[i]];if(r){if(n[2]>>11<n[18]>>16&&(3&n[2])===e){n[2]+=2048;try{s.call(a)}finally{}}}else try{s.call(a)}finally{}}class Kc{constructor(e,t,i){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=i}}function ud(n,e,t){const i=wn(n);let r=0;for(;r<t.length;){const s=t[r];if("number"==typeof s){if(0!==s)break;r++;const o=t[r++],a=t[r++],l=t[r++];i?n.setAttribute(e,a,l,o):e.setAttributeNS(o,a,l)}else{const o=s,a=t[++r];Cg(o)?i&&n.setProperty(e,o,a):i?n.setAttribute(e,o,a):e.setAttribute(o,a),r++}}return r}function Zx(n){return 3===n||4===n||6===n}function Cg(n){return 64===n.charCodeAt(0)}function hd(n,e){if(null!==e&&0!==e.length)if(null===n||0===n.length)n=e.slice();else{let t=-1;for(let i=0;i<e.length;i++){const r=e[i];"number"==typeof r?t=r:0===t||Kx(n,t,r,null,-1===t||2===t?e[++i]:null)}}return n}function Kx(n,e,t,i,r){let s=0,o=n.length;if(-1===e)o=-1;else for(;s<n.length;){const a=n[s++];if("number"==typeof a){if(a===e){o=-1;break}if(a>e){o=s-1;break}}}for(;s<n.length;){const a=n[s];if("number"==typeof a)break;if(a===t){if(null===i)return void(null!==r&&(n[s+1]=r));if(i===n[s+1])return void(n[s+2]=r)}s++,null!==i&&s++,null!==r&&s++}-1!==o&&(n.splice(o,0,e),s=o+1),n.splice(s++,0,t),null!==i&&n.splice(s++,0,i),null!==r&&n.splice(s++,0,r)}function Jx(n){return-1!==n}function el(n){return 32767&n}function tl(n,e){let t=function YO(n){return n>>16}(n),i=e;for(;t>0;)i=i[15],t--;return i}let Sg=!0;function dd(n){const e=Sg;return Sg=n,e}let XO=0;function Qc(n,e){const t=Tg(n,e);if(-1!==t)return t;const i=e[1];i.firstCreatePass&&(n.injectorIndex=e.length,Eg(i.data,n),Eg(e,null),Eg(i.blueprint,null));const r=fd(n,e),s=n.injectorIndex;if(Jx(r)){const o=el(r),a=tl(r,e),l=a[1].data;for(let c=0;c<8;c++)e[s+c]=a[o+c]|l[o+c]}return e[s+8]=r,s}function Eg(n,e){n.push(0,0,0,0,0,0,0,0,e)}function Tg(n,e){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===e[n.injectorIndex+8]?-1:n.injectorIndex}function fd(n,e){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;null!==r;){const s=r[1],o=s.type;if(i=2===o?s.declTNode:1===o?r[6]:null,null===i)return-1;if(t++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|t<<16}return-1}function pd(n,e,t){!function ZO(n,e,t){let i;"string"==typeof t?i=t.charCodeAt(0)||0:t.hasOwnProperty($c)&&(i=t[$c]),null==i&&(i=t[$c]=XO++);const r=255&i;e.data[n+(r>>5)]|=1<<r}(n,e,t)}function tw(n,e,t){if(t&tt.Optional)return n;Xh(e,"NodeInjector")}function nw(n,e,t,i){if(t&tt.Optional&&void 0===i&&(i=null),0==(t&(tt.Self|tt.Host))){const r=n[9],s=ao(void 0);try{return r?r.get(e,i,t&tt.Optional):Sx(e,i,t&tt.Optional)}finally{ao(s)}}return tw(i,e,t)}function iw(n,e,t,i=tt.Default,r){if(null!==n){const s=function eL(n){if("string"==typeof n)return n.charCo
1deAt(0)||0;const e=n.hasOwnProperty($c)?n[$c]:void 0;return"number"==typeof e?e>=0?255&e:JO:e}(t);if("function"==typeof s){if(!Wx(e,n,i))return i&tt.Host?tw(r,t,i):nw(e,t,i,r);try{const o=s(i);if(null!=o||i&tt.Optional)return o;Xh(t)}finally{Yx()}}else if("number"==typeof s){let o=null,a=Tg(n,e),l=-1,c=i&tt.Host?e[16][6]:null;for((-1===a||i&tt.SkipSelf)&&(l=-1===a?fd(n,e):e[a+8],-1!==l&&ow(i,!1)?(o=e[1],a=el(l),e=tl(l,e)):a=-1);-1!==a;){const u=e[1];if(sw(s,a,u.data)){const h=QO(a,e,t,o,i,c);if(h!==rw)return h}l=e[a+8],-1!==l&&ow(i,e[1].data[a+8]===c)&&sw(s,a,e)?(o=u,a=el(l),e=tl(l,e)):a=-1}}}return nw(e,t,i,r)}const rw={};function JO(){return new nl(Vn(),oe())}function QO(n,e,t,i,r,s){const o=e[1],a=o.data[n+8],u=md(a,o,t,null==i?td(a)&&Sg:i!=o&&0!=(3&a.type),r&tt.Host&&s===a);return null!==u?eu(e,o,u,a):rw}function md(n,e,t,i,r){const s=n.providerIndexes,o=e.data,a=1048575&s,l=n.directiveStart,u=s>>20,d=r?a+u:n.directiveEnd;for(let f=i?a:a+u;f<d;f++){const p=o[f];if(f<l&&t===p||f>=l&&p.type===t)return f}if(r){const f=o[l];if(f&&Ur(f)&&f.type===t)return l}return null}function eu(n,e,t,i){let r=n[t];const s=e.data;if(function WO(n){return n instanceof Kc}(r)){const o=r;o.resolving&&function Y3(n,e){const t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new Ot(-200,`Circular dependency in DI detected for ${n}${t}`)}(ri(s[t]));const a=dd(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?ao(o.injectImpl):null;Wx(n,i,tt.Default);try{r=n[t]=o.factory(void 0,s,n,i),e.firstCreatePass&&t>=i.directiveStart&&function HO(n,e,t){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=e.type.prototype;if(i){const o=Rx(e);(t.preOrderHooks||(t.preOrderHooks=[])).push(n,o),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,o)}r&&(t.preOrderHooks||(t.preOrderHooks=[])).push(0-n,r),s&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n,s),(t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n,s))}(t,s[t],e)}finally{null!==l&&ao(l),dd(a),o.resolving=!1,Yx()}}return r}function sw(n,e,t){return!!(t[e+(n>>5)]&1<<n)}function ow(n,e){return!(n&tt.Self||n&tt.Host&&e)}class nl{constructor(e,t){this._tNode=e,this._lView=t}get(e,t,i){return iw(this._tNode,this._lView,e,i,t)}}function hi(n){return lo(()=>{const e=n.prototype.constructor,t=e[Os]||Ag(e),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const s=r[Os]||Ag(r);if(s&&s!==t)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function Ag(n){return xx(n)?()=>{const e=Ag(mt(n));return e&&e()}:ea(n)}function tu(n){return function KO(n,e){if("class"===e)return n.classes;if("style"===e)return n.styles;const t=n.attrs;if(t){const i=t.length;let r=0;for(;r<i;){const s=t[r];if(Zx(s))break;if(0===s)r+=2;else if("number"==typeof s)for(r++;r<i&&"string"==typeof t[r];)r++;else{if(s===e)return t[r+1];r+=2}}}return null}(Vn(),n)}const rl="__parameters__";function ol(n,e,t){return lo(()=>{const i=function Dg(n){return function(...t){if(n){const i=n(...t);for(const r in i)this[r]=i[r]}}}(e);function r(...s){if(this instanceof r)return i.apply(this,s),this;const o=new r(...s);return a.annotation=o,a;function a(l,c,u){const h=l.hasOwnProperty(rl)?l[rl]:Object.defineProperty(l,rl,{value:[]})[rl];for(;h.length<=u;)h.push(null);return(h[u]=h[u]||[]).push(o),l}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class gt{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=Ze({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}toString(){return`InjectionToken ${this._desc}`}}const nL=new gt("AnalyzeForEntryComponents");function Cr(n,e){void 0===e&&(e=n);for(let t=0;t<n.length;t++){let i=n[t];Array.isArray(i)?(e===n&&(e=n.slice(0,t)),Cr(i,e)):e!==n&&e.push(i)}return e}function as(n,e){n.forEach(t=>Array.isArray(t)?as(t,e):e(t))}function lw(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function gd(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function lr(n,e,t){let i=al(n,e);return i>=0?n[1|i]=t:(i=~i,function sL(n,e,t,i){let r=n.length;if(r==e)n.push(t,i);else if(1===r)n.push(i,n[0]),n[0]=t;else{for(r--,n.push(n[r-1],n[r]);r>e;)n[r]=n[r-2],r--;n[e]=t,n[e+1]=i}}(n,i,e,t)),i}function Ig(n,e){const t=al(n,e);if(t>=0)return n[1|t]}function al(n,e){return function hw(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){const s=i+(r-i>>1),o=n[s<<t];if(e===o)return s<<t;o>e?r=s:i=s+1}return~(r<<t)}(n,e,1)}const su={},Og="__NG_DI_FLAG__",vd="ngTempTokenPath",dL=/\n/gm,fw="__source",pL=Qt({provide:String,useValue:Qt});let ou;function pw(n){const e=ou;return ou=n,e}function mL(n,e=tt.Default){if(void 0===ou)throw new Ot(203,"");return null===ou?Sx(n,void 0,e):ou.get(n,e&tt.Optional?null:void 0,e)}function Le(n,e=tt.Default){return(function tO(){return ng}()||mL)(mt(n),e)}const gL=Le;function Lg(n){const e=[];for(let t=0;t<n.length;t++){const i=mt(n[t]);if(Array.isArray(i)){if(0===i.length)throw new Ot(900,"");let r,s=tt.Default;for(let o=0;o<i.length;o++){const a=i[o],l=_L(a);"number"==typeof l?-1===l?r=a.token:s|=l:r=a}e.push(Le(r,s))}else e.push(Le(i))}return e}function au(n,e){return n[Og]=e,n.prototype[Og]=e,n}function _L(n){return n[Og]}const yd=au(ol("Inject",n=>({token:n})),-1),po=au(ol("Optional"),8),lu=au(ol("SkipSelf"),4);var cr=(()=>((cr=cr||{})[cr.Important=1]="Important",cr[cr.DashCase=2]="DashCase",cr))();const ww="__ngContext__";function di(n,e){n[ww]=e}function kg(n){const e=function uu(n){return n[ww]||null}(n);return e?Array.isArray(e)?e:e.lView:null}function Bg(n,e){return undefined(n,e)}function hu(n){const e=n[3];return kr(e)?e[3]:e}function Vg(n){return Dw(n[13])}function zg(n){return Dw(n[4])}function Dw(n){for(;null!==n&&!kr(n);)n=n[4];return n}function cl(n,e,t,i,r){if(null!=i){let s,o=!1;kr(i)?s=i:ss(i)&&(o=!0,i=i[0]);const a=On(i);0===n&&null!==t?null==r?Fw(e,t,a):ta(e,t,a,r||null,!0):1===n&&null!==t?ta(e,t,a,r||null,!0):2===n?function Yg(n,e,t){const i=xd(n,e);i&&function YL(n,e,t,i){wn(n)?n.removeChild(e,t,i):e.removeChild(t)}(n,i,e,t)}(e,a,o):3===n&&e.destroyNode(a),null!=s&&function KL(n,e,t,i,r){const s=t[7];s!==On(t)&&cl(e,n,i,s,r);for(let a=10;a<t.length;a++){const l=t[a];du(l[1],l,n,e,i,s)}}(e,n,s,t,r)}}function Gg(n,e,t){if(wn(n))return n.createElement(e,t);{const i=null!==t?function xO(n){const e=n.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(t):null;return null===i?n.createElement(e):n.createElementNS(i,e)}}function Iw(n,e){const t=n[9],i=t.indexOf(e),r=e[3];1024&e[2]&&(e[2]&=-1025,gg(r,-1)),t.splice(i,1)}function Wg(n,e){if(n.length<=10)return;const t=10+e,i=n[t];if(i){const r=i[17];null!==r&&r!==n&&Iw(r,i),e>0&&(n[t-1][4]=i[4]);const s=gd(n,10+e);
vendor: 4,180 bytes, line 1
1!function VL(n,e){du(n,e,e[11],2,null,null),e[0]=null,e[6]=null}(i[1],i);const o=s[19];null!==o&&o.detachView(s[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}function Rw(n,e){if(!(256&e[2])){const t=e[11];wn(t)&&t.destroyNode&&du(n,e,t,3,null,null),function GL(n){let e=n[13];if(!e)return jg(n[1],n);for(;e;){let t=null;if(ss(e))t=e[13];else{const i=e[10];i&&(t=i)}if(!t){for(;e&&!e[4]&&e!==n;)ss(e)&&jg(e[1],e),e=e[3];null===e&&(e=n),ss(e)&&jg(e[1],e),t=e&&e[4]}e=t}}(e)}}function jg(n,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function qL(n,e){let t;if(null!=n&&null!=(t=n.destroyHooks))for(let i=0;i<t.length;i+=2){const r=e[t[i]];if(!(r instanceof Kc)){const s=t[i+1];if(Array.isArray(s))for(let o=0;o<s.length;o+=2){const a=r[s[o]],l=s[o+1];try{l.call(a)}finally{}}else try{s.call(r)}finally{}}}}(n,e),function $L(n,e){const t=n.cleanup,i=e[7];let r=-1;if(null!==t)for(let s=0;s<t.length-1;s+=2)if("string"==typeof t[s]){const o=t[s+1],a="function"==typeof o?o(e):On(e[o]),l=i[r=t[s+2]],c=t[s+3];"boolean"==typeof c?a.removeEventListener(t[s],l,c):c>=0?i[r=c]():i[r=-c].unsubscribe(),s+=2}else{const o=i[r=t[s+1]];t[s].call(o)}if(null!==i){for(let s=r+1;s<i.length;s++)i[s]();e[7]=null}}(n,e),1===e[1].type&&wn(e[11])&&e[11].destroy();const t=e[17];if(null!==t&&kr(e[3])){t!==e[3]&&Iw(t,e);const i=e[19];null!==i&&i.detachView(n)}}}function Ow(n,e,t){return function Lw(n,e,t){let i=e;for(;null!==i&&40&i.type;)i=(e=i).parent;if(null===i)return t[0];if(2&i.flags){const r=n.data[i.directiveStart].encapsulation;if(r===rs.None||r===rs.Emulated)return null}return or(i,t)}(n,e.parent,t)}function ta(n,e,t,i,r){wn(n)?n.insertBefore(e,t,i,r):e.insertBefore(t,i,r)}function Fw(n,e,t){wn(n)?n.appendChild(e,t):e.appendChild(t)}function Nw(n,e,t,i,r){null!==i?ta(n,e,t,i,r):Fw(n,e,t)}function xd(n,e){return wn(n)?n.parentNode(e):e.parentNode}let Cd,Sd,Bw=function Uw(n,e,t){return 40&n.type?or(n,t):null};function wd(n,e,t,i){const r=Ow(n,i,e),s=e[11],a=function kw(n,e,t){return Bw(n,e,t)}(i.parent||e[6],i,e);if(null!=r)if(Array.isArray(t))for(let l=0;l<t.length;l++)Nw(s,r,t[l],a,!1);else Nw(s,r,t,a,!1)}function Md(n,e){if(null!==e){const t=e.type;if(3&t)return or(e,n);if(4&t)return qg(-1,n[e.index]);if(8&t){const i=e.child;if(null!==i)return Md(n,i);{const r=n[e.index];return kr(r)?qg(-1,r):On(r)}}if(32&t)return Bg(e,n)()||On(n[e.index]);{const i=zw(n,e);return null!==i?Array.isArray(i)?i[0]:Md(hu(n[16]),i):Md(n,e.next)}}return null}function zw(n,e){return null!==e?n[16][6].projection[e.projection]:null}function qg(n,e){const t=10+n+1;if(t<e.length){const i=e[t],r=i[1].firstChild;if(null!==r)return Md(i,r)}return e[7]}function Xg(n,e,t,i,r,s,o){for(;null!=t;){const a=i[t.index],l=t.type;if(o&&0===e&&(a&&di(On(a),i),t.flags|=4),64!=(64&t.flags))if(8&l)Xg(n,e,t.child,i,r,s,!1),cl(e,n,r,a,s);else if(32&l){const c=Bg(t,i);let u;for(;u=c();)cl(e,n,r,u,s);cl(e,n,r,a,s)}else 16&l?Hw(n,e,i,t,r,s):cl(e,n,r,a,s);t=o?t.projectionNext:t.next}}function du(n,e,t,i,r,s){Xg(t,i,n.firstChild,e,r,s,!1)}function Hw(n,e,t,i,r,s){const o=t[16],l=o[6].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++)cl(e,n,r,l[c],s);else Xg(n,e,l,o[3],r,s,!0)}function Gw(n,e,t){wn(n)?n.setAttribute(e,"style",t):e.style.cssText=t}function Zg(n,e,t){wn(n)?""===t?n.removeAttribute(e,"class"):n.setAttribute(e,"class",t):e.className=t}function na(n){var e;return(null===(e=function Kg(){if(void 0===Cd&&(Cd=null,Xt.trustedTypes))try{Cd=Xt.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return Cd}())||void 0===e?void 0:e.createHTML(n))||n}function Ww(n){var e;return(null===(e=function Jg(){if(void 0===Sd&&(Sd=null,Xt.trustedTypes))try{Sd=Xt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch(n){}return Sd}())||void 0===e?void 0:e.createHTML(n))||n}class ia{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}class nF extends ia{getTypeName(){return"HTML"}}class iF extends ia{getTypeName(){return"Style"}}
1class rF extends ia{getTypeName(){return"Script"}}class sF extends ia{getTypeName(){return"URL"}}class oF extends ia{getTypeName(){return"ResourceURL"}}function ur(n){return n instanceof ia?n.changingThisBreaksApplicationSecurity:n}function ls(n,e){const t=qw(n);if(null!=t&&t!==e){if("ResourceURL"===t&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${t} (see https://g.co/ng/security#xss)`)}return t===e}function qw(n){return n instanceof ia&&n.getTypeName()||null}class dF{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{const t=(new window.DOMParser).parseFromString(na(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch(t){return null}}}class fF{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const i=this.inertDocument.createElement("body");t.appendChild(i)}}getInertBodyElement(e){const t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=na(e),t;const i=this.inertDocument.createElement("body");return i.innerHTML=na(e),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(e){const t=e.attributes;for(let r=t.length-1;0<r;r--){const o=t.item(r).name;("xmlns:ns1"===o||0===o.indexOf("ns1:"))&&e.removeAttribute(o)}let i=e.firstChild;for(;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling}}const mF=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,gF=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function fu(n){return(n=String(n)).match(mF)||n.match(gF)?n:"unsafe:"+n}function cs(n){const e={};for(const t of n.split(","))e[t]=!0;return e}function pu(...n){const e={};for(const t of n)for(const i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}const Zw=cs("area,br,col,hr,img,wbr"),Kw=cs("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Jw=cs("rp,rt"),Qg=pu(Zw,pu(Kw,cs("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")),pu(Jw,cs("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")),pu(Jw,Kw)),e_=cs("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),t_=cs("srcset"),Qw=pu(e_,t_,cs("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,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),cs("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")),_F=cs("script,style,template");class vF{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,i=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let r=this.checkClobberedElement(t,t.nextSibling);if(r){t=r;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(e){const t=e.nodeName.toLowerCase();if(!Qg.hasOwnProperty(t))return this.sanitizedSomething=!0,!_F.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const i=e.attributes;for(let r=0;r<i.length;r++){const s=i.item(r),o=s.name,a=o.toLowerCase();if(!Qw.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=s.value;e_[a]&&(l=fu(l)),t_[a]&&(n=l,l=(n=String(n)).split(",").map(e=>fu(e.trim())).join(", ")),this.buf.push(" ",o,'="',eM(l),'"')}var n;return this.buf.push(">"),!0}endElement(e){const t=e.nodeName.toLowerCase();Qg.hasOwnProperty(t)&&!Zw.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(eM(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return t}}const yF=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,bF=/([^\#-~ |!])/g;function eM(n){return n.replace(/&/g,"&").replace(yF,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(bF,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}let Ed;function tM(n,e){let t=null;try{Ed=Ed||function Yw(n){const e=new fF(n);return function pF(){try{return!!(new window.DOMParser).parseFromString(na(""),"text/html")}catch(n){return!1}}()?new dF(e):e}(n);let i=e?String(e):"";t=Ed.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=t.innerHTML,t=Ed.getInertBodyElement(i)}while(i!==s);return na((new vF).sanitizeChildren(n_(t)||t))}finally{if(t){const i=n_(t)||t;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function n_(n){return"content"in n&&function xF(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var rn=(()=>((rn=rn||{})[rn.NONE=0]="NONE",rn[rn.HTML=1]="HTML",rn[rn.STYLE=2]="STYLE",rn[rn.SCRIPT=3]="SCRIPT",rn[rn.URL=4]="URL",rn[rn.RESOURCE_URL=5]="RESOURCE_URL",rn))();function i_(n){const e=mu();return e?Ww(e.sanitize(rn.HTML,n)||""):ls(n,"HTML")?Ww(ur(n)):tM(fg(),rt(n))}function us(n){const e=mu();
1return e?e.sanitize(rn.URL,n)||"":ls(n,"URL")?ur(n):fu(rt(n))}function mu(){const n=oe();return n&&n[12]}function s_(n){return n.ngOriginalError}function IF(n,...e){n.error(...e)}class gu{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e),i=function PF(n){return n&&n.ngErrorLogger||IF}(e);i(this._console,"ERROR",e),t&&i(this._console,"ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&s_(e);for(;t&&s_(t);)t=s_(t);return t||null}}const UF=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Xt))();function iM(n){return n.ownerDocument.defaultView}function o_(n){return n.ownerDocument}function hs(n){return n instanceof Function?n():n}function sM(n,e,t){let i=n.length;for(;;){const r=n.indexOf(e,t);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const s=e.length;if(r+s===i||n.charCodeAt(r+s)<=32)return r}t=r+1}}const oM="ng-template";function VF(n,e,t){let i=0;for(;i<n.length;){let r=n[i++];if(t&&"class"===r){if(r=n[i],-1!==sM(r.toLowerCase(),e,0))return!0}else if(1===r){for(;i<n.length&&"string"==typeof(r=n[i++]);)if(r.toLowerCase()===e)return!0;return!1}}return!1}function aM(n){return 4===n.type&&n.value!==oM}function zF(n,e,t){return e===(4!==n.type||t?n.value:oM)}function HF(n,e,t){let i=4;const r=n.attrs||[],s=function jF(n){for(let e=0;e<n.length;e++)if(Zx(n[e]))return e;return n.length}(r);let o=!1;for(let a=0;a<e.length;a++){const l=e[a];if("number"!=typeof l){if(!o)if(4&i){if(i=2|1&i,""!==l&&!zF(n,l,t)||""===l&&1===e.length){if(Br(i))return!1;o=!0}}else{const c=8&i?l:e[++a];if(8&i&&null!==n.attrs){if(!VF(n.attrs,c,t)){if(Br(i))return!1;o=!0}continue}const h=GF(8&i?"class":l,r,aM(n),t);if(-1===h){if(Br(i))return!1;o=!0;continue}if(""!==c){let d;d=h>s?"":r[h+1].toLowerCase();const f=8&i?d:null;if(f&&-1!==sM(f,c,0)||2&i&&c!==d){if(Br(i))return!1;o=!0}}}}else{if(!o&&!Br(i)&&!Br(l))return!1;if(o&&Br(l))continue;o=!1,i=l|1&i}}return Br(i)||o}function Br(n){return 0==(1&n)}function GF(n,e,t,i){if(null===e)return-1;let r=0;if(i||!t){let s=!1;for(;r<e.length;){const o=e[r];if(o===n)return r;if(3===o||6===o)s=!0;else{if(1===o||2===o){let a=e[++r];for(;"string"==typeof a;)a=e[++r];continue}if(4===o)break;if(0===o){r+=4;continue}}r+=s?1:2}return-1}return function $F(n,e){let t=n.indexOf(4);if(t>-1)for(t++;t<n.length;){const i=n[t];if("number"==typeof i)return-1;if(i===e)return t;t++}return-1}(e,n)}function lM(n,e,t=!1){for(let i=0;i<e.length;i++)if(HF(n,e[i],t))return!0;return!1}function cM(n,e){return n?":not("+e.trim()+")":e}function YF(n){let e=n[0],t=1,i=2,r="",s=!1;for(;t<n.length;){let o=n[t];if("string"==typeof o)if(2&i){const a=n[++t];r+="["+o+(a.length>0?'="'+a+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""!==r&&!Br(o)&&(e+=cM(s,r),r=""),i=o,s=s||!Br(i);t++}return""!==r&&(e+=cM(s,r)),e}const ot={};function B(n){uM(Ft(),oe(),Ai()+n,!1)}function uM(n,e,t,i){if(!i)if(3==(3&e[2])){const s=n.preOrderCheckHooks;null!==s&&ld(e,s,t)}else{const s=n.preOrderHooks;null!==s&&cd(e,s,0,t)}ho(t)}function Td(n,e){return n<<17|e<<2}function Vr(n){return n>>17&32767}function a_(n){return 2|n}function Ns(n){return(131068&n)>>2}function l_(n,e){return-131069&n|e<<2}function c_(n){return 1|n}function xM(n,e){const t=n.contentQueries;if(null!==t)for(let i=0;i<t.length;i+=2){const r=t[i],s=t[i+1];if(-1!==s){const o=n.data[s];xg(r),o.contentQueries(2,e[s],s)}}}function _u(n,e,t,i,r,s,o,a,l,c){const u=e.blueprint.slice();return u[0]=r,u[2]=140|i,kx(u),u[3]=u[15]=n,u[8]=t,u[10]=o||n&&n[10],u[11]=a||n&&n[11],u[12]=l||n&&n[12]||null,u[9]=c||n&&n[9]||null,u[6]=s,u[16]=2==e.type?n[16]:u,u}function hl(n,e,t,i,r){let s=n.data[e];if(null===s)s=function v_(n,e,t,i,r){const s=Vx(),o=_g(),l=n.data[e]=function dN(n,e,t,i,r,s){return{type:t,index:i,insertBeforeIndex:null,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,value:r,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next: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}}(0,o?s:s&&s.parent,t,e,i,r);return null===n.firstChild&&(n.firstChild=l),null!==s&&(o?null==s.child&&null!==l.parent&&(s.child=l):null===s.next&&(s.next=l)),l}(n,e,t,i,r),function OO(){return st.lFrame.inI18n}()&&(s.flags|=64);else if(64&s.type){s.type=t,s.value=i,s.attrs=r;const o=function Zc(){const n=st.lFrame,e=n.currentTNode;return n.isParent?e:e.parent}();s.injectorIndex=null===o?-1:o.injectorIndex}return os(s,!0),s}function dl(n,e,t,i){if(0===t)return-1;const r=e.length;for(let s=0;s<t;s++)e.push(i),n.blueprint.push(i),n.data.push(null);return r}function vu(n,e,t){sd(e);try{const i=n.viewQuery;null!==i&&T_(1,i,t);const r=n.template;null!==r&&wM(n,e,r,1,t),n.firstCreatePass&&(n.firstCreatePass=!1),n.staticContentQueries&&xM(n,e),n.staticViewQueries&&T_(2,n.viewQuery,t);const s=n.components;null!==s&&function cN(n,e){for(let t=0;t<e.length;t++)PN(n,e[t])}(e,s)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{e[2]&=-5,od()}}function fl(n,e,t,i){const r=e[2];if(256!=(256&r)){sd(e);try{kx(e),function zx(n){return st.lFrame.bindingIndex=n}(n.bindingStartIndex),null!==t&&wM(n,e,t,2,i);const o=3==(3&r);if(o){const c=n.preOrderCheckHooks;null!==c&&ld(e,c,null)}else{const c=n.preOrderHooks;null!==c&&cd(e,c,0,null),wg(e,0)}if(function AN(n){for(let e=Vg(n);null!==e;e=zg(e)){if(!e[2])continue;const t=e[9];for(let i=0;i<t.length;i++){const r=t[i],s=r[3];0==(1024&r[2])&&gg(s,1),r[2]|=1024}}}(e),function TN(n){for(let e=Vg(n);null!==e;e=zg(e))for(let t=10;t<e.length;t++){const i=e[t],r=i[1];mg(i)&&fl(r,i,r.template,i[8])}}(e),null!==n.contentQueries&&xM(n,e),o){const c=n.contentCheckHooks;null!==c&&ld(e,c)}else{const c=n.contentHooks;null!==c&&cd(e,c,1),wg(e,1)}!function aN(n,e){const t=n.hostBindingOpCodes;if(null!==t)try{for(let i=0;i<t.length;i++){const r=t[i];if(r<0)ho(~r);else{const s=r,o=t[++i],a=t[++i];LO(o,s),a(2,e[s])}}}finally{ho(-1)}}(n,e);const a=n.components;null!==a&&function lN(n,e){for(let t=0;t<e.length;t++)DN(n,e[t])}(e,a);const l=n.viewQuery;if(null!==l&&T_(2,l,i),o){const c=n.viewCheckHooks;null!==c&&ld(e,c)}else{const c=n.viewHooks;null!==c&&cd(e,c,2),wg(e,2)}!0===n.firstUpdatePass&&(n.firstUpdatePass=!1),e[2]&=-73,1024&e[2]&&(e[2]&=-1025,gg(e[3],-1))}finally{od()}}}function uN(n,e,t,i){const r=e[10],o=Nx(e);try{!o&&r.begin&&r.begin(),o&&vu(n,e,i),fl(n,e,t,i)}finally{!o&&r.end&&r.end()}}function wM(n,e,t,i,r){const s=Ai(),o=2&i;try{ho(-1),o&&e.length>20&&uM(n,e,20,!1),t(i,r)}finally{ho(s)}}function y_(n,e,t){!Bx()||(function yN(n,e,t,i){const r=t.directiveStart,s=t.directiveEnd;n.firstCreatePass||Qc(t,e),di(i,e);const o=t.initialInputs;for(let a=r;a<s;a++){const l=n.data[a],c=Ur(l);c&&CN(e,t,l);const u=eu(e,n,a,t);di(u,e),null!==o&&SN(0,a-r,u,l,0,o),c&&(ar(t.index,e)[8]=u)}}(n,e,t,or(t,e)),128==(128&t.flags)&&function bN(n,e,t){const i=t.directiveStart,r=t.directiveEnd,o=t.index,a=function FO(){return st.lFrame.currentDirectiveIndex}();try{ho(o);for(let l=i;l<r;l++){const c=n.data[l],u=e[l];yg(l),(null!==c.hostBindings||0!==c.hostVars||null!==c.hostAttrs)&&IM(c,u)}}finally{ho(-1),yg(a)}}(n,e,t))}function b_(n,e,t=or){const i=e.localNames;if(null!==i){let r=e.index+1;for(let s=0;s<i.length;s+=2){const o=i[s+1],a=-1===o?t(e,n):n[o];n[r++]=a}}}function CM(n){const e=n.tView;
vendor: 4,766 bytes, line 1
1return null===e||e.incompleteFirstPass?n.tView=Pd(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts):e}function Pd(n,e,t,i,r,s,o,a,l,c){const u=20+i,h=u+r,d=function hN(n,e){const t=[];for(let i=0;i<e;i++)t.push(i<n?null:ot);return t}(u,h),f="function"==typeof c?c():c;return d[1]={type:n,blueprint:d,template:t,queries:null,viewQuery:a,declTNode:e,data:d.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:h,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:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:l,consts:f,incompleteFirstPass:!1}}function TM(n,e,t,i){const r=kM(e);null===t?r.push(i):(r.push(t),n.firstCreatePass&&UM(n).push(i,r.length-1))}function AM(n,e,t){for(let i in n)if(n.hasOwnProperty(i)){const r=n[i];(t=null===t?{}:t).hasOwnProperty(i)?t[i].push(e,r):t[i]=[e,r]}return t}function x_(n,e,t,i){let r=!1;if(Bx()){const s=function xN(n,e,t){const i=n.directiveRegistry;let r=null;if(i)for(let s=0;s<i.length;s++){const o=i[s];lM(t,o.selectors,!1)&&(r||(r=[]),pd(Qc(t,e),n,o.type),Ur(o)?(RM(n,t),r.unshift(o)):r.push(o))}return r}(n,e,t),o=null===i?null:{"":-1};if(null!==s){r=!0,OM(t,n.data.length,s.length);for(let u=0;u<s.length;u++){const h=s[u];h.providersResolver&&h.providersResolver(h)}let a=!1,l=!1,c=dl(n,e,s.length,null);for(let u=0;u<s.length;u++){const h=s[u];t.mergedAttrs=hd(t.mergedAttrs,h.hostAttrs),LM(n,t,e,c,h),MN(c,h,o),null!==h.contentQueries&&(t.flags|=8),(null!==h.hostBindings||null!==h.hostAttrs||0!==h.hostVars)&&(t.flags|=128);const d=h.type.prototype;!a&&(d.ngOnChanges||d.ngOnInit||d.ngDoCheck)&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t.index),a=!0),!l&&(d.ngOnChanges||d.ngDoCheck)&&((n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t.index),l=!0),c++}!function fN(n,e){const i=e.directiveEnd,r=n.data,s=e.attrs,o=[];let a=null,l=null;for(let c=e.directiveStart;c<i;c++){const u=r[c],h=u.inputs,d=null===s||aM(e)?null:EN(h,s);o.push(d),a=AM(h,c,a),l=AM(u.outputs,c,l)}null!==a&&(a.hasOwnProperty("class")&&(e.flags|=16),a.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=o,e.inputs=a,e.outputs=l}(n,t)}o&&function wN(n,e,t){if(e){const i=n.localNames=[];for(let r=0;r<e.length;r+=2){const s=t[e[r+1]];if(null==s)throw new Ot(-301,!1);i.push(e[r],s)}}}(t,i,o)}return t.mergedAttrs=hd(t.mergedAttrs,t.attrs),r}function PM(n,e,t,i,r,s){const o=s.hostBindings;if(o){let a=n.hostBindingOpCodes;null===a&&(a=n.hostBindingOpCodes=[]);const l=~e.index;(function vN(n){let e=n.length;for(;e>0;){const t=n[--e];if("number"==typeof t&&t<0)return t}return 0})(a)!=l&&a.push(l),a.push(i,r,o)}}function IM(n,e){null!==n.hostBindings&&n.hostBindings(1,e)}function RM(n,e){e.flags|=2,(n.components||(n.components=[])).push(e.index)}function MN(n,e,t){if(t){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)t[e.exportAs[i]]=n;Ur(e)&&(t[""]=n)}}function OM(n,e,t){n.flags|=1,n.directiveStart=e,n.directiveEnd=e+t,n.providerIndexes=e}function LM(n,e,t,i,r){n.data[i]=r;const s=r.factory||(r.factory=ea(r.type)),o=new Kc(s,Ur(r),null);n.blueprint[i]=o,t[i]=o,PM(n,e,0,i,dl(n,t,r.hostVars,ot),r)}function CN(n,e,t){const i=or(e,n),r=CM(t),s=n[10],o=Id(n,_u(n,r,null,t.onPush?64:16,i,e,s,s.createRenderer(i,t),null,null));n[e.index]=o}function ds(n,e,t,i,r,s){const o=or(n,e);!function w_(n,e,t,i,r,s,o){if(null==s)wn(n)?n.removeAttribute(e,r,t):e.removeAttribute(r);else{const a=null==o?rt(s):o(s,i||"",r);wn(n)?n.setAttribute(e,r,a,t):t?e.setAttributeNS(t,r,a):e.setAttribute(r,a)}}(e[11],o,s,n.value,t,i,r)}function SN(n,e,t,i,r,s){const o=s[e];if(null!==o){const a=i.setInput;for(let l=0;l<o.length;){const c=o[l++],u=o[l++],h=o[l++];null!==a?i.setInput(t,h,c,u):t[u]=h}}}function EN(n,e){let t=null,i=0;for(;i<e.length;){const r=e[i];if(0!==r)if(5!==r){if("number"==typeof r)break;n.hasOwnProperty(r)&&(null===t&&(t=[]),t.push(r,n[r],e[i+1])),i+=2}else i+=2;else i+=4}return t}function FM(n,e,t,i){return new Array(n,!0,!1,e,null,0,i,t,null,null)}function DN(n,e){const t=ar(e,n);if(mg(t)){const i=t[1];80&t[2]?fl(i,t,i.template,t[8]):t[5]>0&&M_(t)}}function M_(n){for(let i=Vg(n);null!==i;i=zg(i))for(let r=10;r<i.length;r++){const s=i[r];if(1024&s[2]){const o=s[1];fl(o,s,o.template,s[8])}else s[5]>0&&M_(s)}const t=n[1].components;if(null!==t)for(let i=0;i<t.length;i++){const r=ar(t[i],n);mg(r)&&r[5]>0&&M_(r)}}function PN(n,e){const t=ar(e,n),i=t[1];(function IN(n,e){for(let t=e.length;t<n.blueprint.length;t++)e.push(n.blueprint[t])})(i,t),vu(i,t,t[8])}
1function Id(n,e){return n[13]?n[14][4]=e:n[13]=e,n[14]=e,e}function C_(n){for(;n;){n[2]|=64;const e=hu(n);if(hO(n)&&!e)return n;n=e}return null}function NM(n){!function S_(n){for(let e=0;e<n.components.length;e++){const t=n.components[e],i=kg(t),r=i[1];uN(r,i,r.template,t)}}(n[8])}function T_(n,e,t){xg(0),e(n,t)}const ON=(()=>Promise.resolve(null))();function kM(n){return n[7]||(n[7]=[])}function UM(n){return n.cleanup||(n.cleanup=[])}function VM(n,e){const t=n[9],i=t?t.get(gu,null):null;i&&i.handleError(e)}function zM(n,e,t,i,r){for(let s=0;s<t.length;){const o=t[s++],a=t[s++],l=e[o],c=n.data[o];null!==c.setInput?c.setInput(l,r,i,a):l[a]=r}}function ks(n,e,t){const i=id(e,n);!function Pw(n,e,t){wn(n)?n.setValue(e,t):e.textContent=t}(n[11],i,t)}function Rd(n,e,t){let i=t?n.styles:null,r=t?n.classes:null,s=0;if(null!==e)for(let o=0;o<e.length;o++){const a=e[o];"number"==typeof a?s=a:1==s?r=Jm(r,a):2==s&&(i=Jm(i,a+": "+e[++o]+";"))}t?n.styles=i:n.stylesWithoutHost=i,t?n.classes=r:n.classesWithoutHost=r}const A_=new gt("INJECTOR",-1);class HM{get(e,t=su){if(t===su){const i=new Error(`NullInjectorError: No provider for ${Ht(e)}!`);throw i.name="NullInjectorError",i}return t}}const D_=new gt("Set Injector scope."),yu={},NN={};let P_;function GM(){return void 0===P_&&(P_=new HM),P_}function WM(n,e=null,t=null,i){const r=jM(n,e,t,i);return r._resolveInjectorDefTypes(),r}function jM(n,e=null,t=null,i){return new kN(n,t,e||GM(),i)}class kN{constructor(e,t,i,r=null){this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const s=[];t&&as(t,a=>this.processProvider(a,e,t)),as([e],a=>this.processInjectorType(a,[],s)),this.records.set(A_,pl(void 0,this));const o=this.records.get(D_);this.scope=null!=o?o.value:null,this.source=r||("object"==typeof e?null:Ht(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,t=su,i=tt.Default){this.assertNotDestroyed();const r=pw(this),s=ao(void 0);try{if(!(i&tt.SkipSelf)){let a=this.records.get(e);if(void 0===a){const l=function jN(n){return"function"==typeof n||"object"==typeof n&&n instanceof gt}(e)&&eg(e);a=l&&this.injectableDefInScope(l)?pl(I_(e),yu):null,this.records.set(e,a)}if(null!=a)return this.hydrate(e,a)}return(i&tt.Self?GM():this.parent).get(e,t=i&tt.Optional&&t===su?null:t)}catch(o){if("NullInjectorError"===o.name){if((o[vd]=o[vd]||[]).unshift(Ht(e)),r)throw o;return function vL(n,e,t,i){const r=n[vd];throw e[fw]&&r.unshift(e[fw]),n.message=function yL(n,e,t,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.substr(2):n;let r=Ht(e);if(Array.isArray(e))r=e.map(Ht).join(" -> ");else if("object"==typeof e){let s=[];for(let o in e)if(e.hasOwnProperty(o)){let a=e[o];s.push(o+":"+("string"==typeof a?JSON.stringify(a):Ht(a)))}r=`{${s.join(", ")}}`}return`${t}${i?"("+i+")":""}[${r}]: ${n.replace(dL,"\n ")}`}("\n"+n.message,r,t,i),n.ngTokenPath=r,n[vd]=null,n}(o,e,"R3InjectorError",this.source)}throw o}finally{ao(s),pw(r)}}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((i,r)=>e.push(Ht(r))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Ot(205,!1)}processInjectorType(e,t,i){if(!(e=mt(e)))return!1;let r=Mx(e);const s=null==r&&e.ngModule||void 0,o=void 0===s?e:s,a=-1!==i.indexOf(o);if(void 0!==s&&(r=Mx(s)),null==r)return!1;if(null!=r.imports&&!a){let u;i.push(o);try{as(r.imports,h=>{this.processInjectorType(h,t,i)&&(void 0===u&&(u=[]),u.push(h))})}finally{}if(void 0!==u)for(let h=0;h<u.length;h++){const{ngModule:d,providers:f}=u[h];as(f,p=>this.processProvider(p,d,f||en))}}this.injectorDefTypes.add(o);const l=ea(o)||(()=>new o);this.records.set(o,pl(l,yu));const c=r.providers;if(null!=c&&!a){const u=e;as(c,h=>this.processProvider(h,u,c))}return void 0!==s&&void 0!==e.providers}processProvider(e,t,i){let r=ml(e=mt(e))?e:mt(e&&e.provide);const s=function BN(n,e,t){return qM(n)?pl(void 0,n.useValue):pl($M(n),yu)}(e);if(ml(e)||!0!==e.multi)this.records.get(r);else{let o=this.records.get(r);o||(o=pl(void 0,yu,!0),o.factory=()=>Lg(o.multi),this.records.set(r,o)),r=e,o.multi.push(e)}this.records.set(r,s)}hydrate(e,t){return t.value===yu&&(t.value=NN,t.value=t.factory()),"object"==typeof t.value&&t.value&&function WN(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(t.value)&&this.onDestroy.add(t.value),t.value}injectableDefInScope(e){if(!e.providedIn)return!1;const t=mt(e.providedIn);return"string"==typeof t?"any"===t||t===this.scope:this.injectorDefTypes.has(t)}}function I_(n){const e=eg(n),t=null!==e?e.factory:ea(n);if(null!==t)return t;if(n instanceof gt)throw new Ot(204,!1);if(n instanceof Function)return function UN(n){const e=n.length;if(e>0)throw function ru(n,e){const t=[];for(let i=0;i<n;i++)t.push(e);return t}(e,"?"),new Ot(204,!1);const t=function J3(n){const e=n&&(n[Zh]||n[Cx]);if(e){const t=function Q3(n){if(n.hasOwnProperty("name"))return n.name;const e=(""+n).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${t}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${t}" class.`),e}return null}(n);return null!==t?()=>t.factory(n):()=>new n}(n);throw new Ot(204,!1)}function $M(n,e,t){let i;if(ml(n)){const r=mt(n);return ea(r)||I_(r)}if(qM(n))i=()=>mt(n.useValue);else if(function zN(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...Lg(n.deps||[]));else if(function VN(n){return!(!n||!n.useExisting)}(n))i=()=>Le(mt(n.useExisting));else{const r=mt(n&&(n.useClass||n.provide));if(!function GN(n){return!!n.deps}(n))return ea(r)||I_(r);i=()=>new r(...Lg(n.deps))}return i}function pl(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function qM(n){return null!==n&&"object"==typeof n&&pL in n}function ml(n){return"function"==typeof n}let fi=(()=>{class n{static create(t,i){var r;if(Array.isArray(t))return WM({name:""},i,t,"");{const s=null!==(r=t.name)&&void 0!==r?r:"";return WM({name:s},t.parent,t.providers,s)}}}return n.THROW_IF_NOT_FOUND=su,n.NULL=new HM,n.\u0275prov=Ze({token:n,providedIn:"any",factory:()=>Le(A_)}),n.__NG_ELEMENT_ID__=-1,n})();function QN(n,e){ad(kg(n)[1],Vn())}function Wt(n){let e=function sC(n){return Object.getPrototypeOf(n.prototype).constructor}(n.type),t=!0;const i=[n];for(;e;){let r;if(Ur(n))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Ot(903,"");r=e.\u0275dir}if(r){if(t){i.push(r);const o=n;o.inputs=L_(n.inputs),o.declaredInputs=L_(n.declaredInputs),o.outputs=L_(n.outputs);const a=r.hostBindings;a&&ik(n,a);const l=r.viewQuery,c=r.contentQueries;if(l&&tk(n,l),c&&nk(n,c),Km(n.inputs,r.inputs),Km(n.declaredInputs,r.declaredInputs),Km(n.outputs,r.outputs),Ur(r)&&r.data.animation){const u=n.data;u.animation=(u.animation||[]).concat(r.data.animation)}}const s=r.features;if(s)for(let o=0;o<s.length;o++){const a=s[o];a&&a.ngInherit&&a(n),a===Wt&&(t=!1)}}e=Object.getPrototypeOf(e)}!function ek(n){let e=0,t=null;for(let i=n.length-1;i>=0;i--){const r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=hd(r.hostAttrs,t=hd(t,r.hostAttrs))}}(i)}function L_(n){return n===qa?{}:n===en?[]:n}function tk(n,e){const t=n.viewQuery;n.viewQuery=t?(i,r)=>{e(i,r),t(i,r)}:e}function nk(n,e){const t=n.contentQueries;n.contentQueries=t?(i,r,s)=>{e(i,r,s),t(i,r,s)}:e}function ik(n,e){const t=n.hostBindings;n.hostBindings=t?(i,r)=>{e(i,r),t(i,r)}:e}let Od=null;function gl(){if(!Od){const n=Xt.Symbol;if(n&&n.iterator)Od=n.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;t<e.length;++t){const i=e[t];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(Od=i)}}}return Od}
1function bu(n){return!!F_(n)&&(Array.isArray(n)||!(n instanceof Map)&&gl()in n)}function F_(n){return null!==n&&("function"==typeof n||"object"==typeof n)}function fs(n,e,t){return n[e]=t}function pi(n,e,t){return!Object.is(n[e],t)&&(n[e]=t,!0)}function Gi(n,e,t,i){const r=oe();return pi(r,Qa(),e)&&(Ft(),ds(gn(),r,n,e,t,i)),Gi}function yl(n,e,t,i,r,s){const a=function ra(n,e,t,i){const r=pi(n,e,t);return pi(n,e+1,i)||r}(n,function Ls(){return st.lFrame.bindingIndex}(),t,r);return Fs(2),a?e+rt(t)+i+rt(r)+s:ot}function We(n,e,t,i,r,s,o,a){const l=oe(),c=Ft(),u=n+20,h=c.firstCreatePass?function uk(n,e,t,i,r,s,o,a,l){const c=e.consts,u=hl(e,n,4,o||null,uo(c,a));x_(e,t,u,uo(c,l)),ad(e,u);const h=u.tViews=Pd(2,u,i,r,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c);return null!==e.queries&&(e.queries.template(e,u),h.queries=e.queries.embeddedTView(u)),u}(u,c,l,e,t,i,r,s,o):c.data[u];os(h,!1);const d=l[11].createComment("");wd(c,l,d,h),di(d,l),Id(l,l[u]=FM(d,l,d,h)),nd(h)&&y_(c,l,h),null!=o&&b_(l,h,a)}function Y(n,e=tt.Default){const t=oe();return null===t?Le(n,e):iw(Vn(),t,mt(n),e)}function V_(){throw new Error("invalid")}function ne(n,e,t){const i=oe();return pi(i,Qa(),e)&&function hr(n,e,t,i,r,s,o,a){const l=or(e,t);let u,c=e.inputs;!a&&null!=c&&(u=c[i])?(zM(n,t,u,i,r),td(e)&&function mN(n,e){const t=ar(e,n);16&t[2]||(t[2]|=64)}(t,e.index)):3&e.type&&(i=function pN(n){return"class"===n?"className":"for"===n?"htmlFor":"formaction"===n?"formAction":"innerHtml"===n?"innerHTML":"readonly"===n?"readOnly":"tabindex"===n?"tabIndex":n}(i),r=null!=o?o(r,e.value||"",i):r,wn(s)?s.setProperty(l,i,r):Cg(i)||(l.setProperty?l.setProperty(i,r):l[i]=r))}(Ft(),gn(),i,n,e,i[11],t,!1),ne}function z_(n,e,t,i,r){const o=r?"class":"style";zM(n,t,e.inputs[o],o,i)}function C(n,e,t,i){const r=oe(),s=Ft(),o=20+n,a=r[11],l=r[o]=Gg(a,e,function zO(){return st.lFrame.currentNamespace}()),c=s.firstCreatePass?function Rk(n,e,t,i,r,s,o){const a=e.consts,c=hl(e,n,2,r,uo(a,s));return x_(e,t,c,uo(a,o)),null!==c.attrs&&Rd(c,c.attrs,!1),null!==c.mergedAttrs&&Rd(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(o,s,r,0,e,t,i):s.data[o];os(c,!0);const u=c.mergedAttrs;null!==u&&ud(a,l,u);const h=c.classes;null!==h&&Zg(a,l,h);const d=c.styles;return null!==d&&Gw(a,l,d),64!=(64&c.flags)&&wd(s,r,l,c),0===function TO(){return st.lFrame.elementDepthCount}()&&di(l,r),function AO(){st.lFrame.elementDepthCount++}(),nd(c)&&(y_(s,r,c),function MM(n,e,t){if(ag(e)){const r=e.directiveEnd;for(let s=e.directiveStart;s<r;s++){const o=n.data[s];o.contentQueries&&o.contentQueries(1,t[s],s)}}}(s,c,r)),null!==i&&b_(r,c),C}function x(){let n=Vn();_g()?function vg(){st.lFrame.isParent=!1}():(n=n.parent,os(n,!1));const e=n;!function DO(){st.lFrame.elementDepthCount--}();const t=Ft();return t.firstCreatePass&&(ad(t,n),ag(n)&&t.queries.elementEnd(n)),null!=e.classesWithoutHost&&function $O(n){return 0!=(16&n.flags)}(e)&&z_(t,e,oe(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function qO(n){return 0!=(32&n.flags)}(e)&&z_(t,e,oe(),e.stylesWithoutHost,!1),x}function ge(n,e,t,i){return C(n,e,t,i),x(),ge}function Hn(){return oe()}function wu(n){return!!n&&"function"==typeof n.then}const W_=function EC(n){return!!n&&"function"==typeof n.subscribe};function Ge(n,e,t,i){const r=oe(),s=Ft(),o=Vn();return function AC(n,e,t,i,r,s,o,a){const l=nd(i),u=n.firstCreatePass&&UM(n),h=e[8],d=kM(e);let f=!0;if(3&i.type||a){const g=or(i,e),m=a?a(g):g,v=d.length,y=a?b=>a(On(b[i.index])):i.index;if(wn(t)){let b=null;if(!a&&l&&(b=function Lk(n,e,t,i){const r=n.cleanup;if(null!=r)for(let s=0;s<r.length-1;s+=2){const o=r[s];if(o===t&&r[s+1]===i){const a=e[7],l=r[s+2];return a.length>l?a[l]:null}"string"==typeof o&&(s+=2)}return null}(n,e,r,i.index)),null!==b)(b.__ngLastListenerFn__||b).__ngNextListenerFn__=s,b.__ngLastListenerFn__=s,f=!1;else{s=j_(i,e,h,s,!1);const T=t.listen(m,r,s);d.push(s,T),u&&u.push(r,y,v,v+1)}}else s=j_(i,e,h,s,!0),m.addEventListener(r,s,o),d.push(s),u&&u.push(r,y,v,o)}else s=j_(i,e,h,s,!1);const p=i.outputs;let _;if(f&&null!==p&&(_=p[r])){const g=_.length;if(g)for(let m=0;m<g;m+=2){const S=e[_[m]][_[m+1]].subscribe(s),P=d.length;d.push(s,S),u&&u.push(r,i.index,P,-(P+1))}}}(s,r,r[11],o,n,e,!!t,i),Ge}function DC(n,e,t,i){try{return!1!==t(i)}catch(r){return VM(n,r),!1}}function j_(n,e,t,i,r){return function s(o){if(o===Function)return i;const a=2&n.flags?ar(n.index,e):e;0==(32&e[2])&&C_(a);let l=DC(e,0,i,o),c=s.__ngNextListenerFn__;for(;c;)l=DC(e,0,c,o)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(o.preventDefault(),o.returnValue=!1),l}}function ze(n=1){return function kO(n){return(st.lFrame.contextLView=function UO(n,e){for(;n>0;)e=e[15],n--;return e}(n,st.lFrame.contextLView))[8]}(n)}function BC(n,e,t,i,r){const s=n[t+1],o=null===e;let a=i?Vr(s):Ns(s),l=!1;for(;0!==a&&(!1===l||o);){const u=n[a+1];Vk(n[a],e)&&(l=!0,n[a+1]=i?c_(u):a_(u)),a=i?Vr(u):Ns(u)}l&&(n[t+1]=i?a_(s):c_(s))}function Vk(n,e){return null===n||null==e||(Array.isArray(n)?n[1]:n)===e||!(!Array.isArray(n)||"string"!=typeof e)&&al(n,e)>=0}function Nd(n,e){return function Hr(n,e,t,i){const r=oe(),s=Ft(),o=Fs(2);s.firstUpdatePass&&function YC(n,e,t,i){const r=n.data;if(null===r[t+1]){const s=r[Ai()],o=function qC(n,e){return e>=n.expandoStartIndex}(n,t);(function JC(n,e){return 0!=(n.flags&(e?16:32))})(s,i)&&null===e&&!o&&(e=!1),e=function Xk(n,e,t,i){const r=function bg(n){const e=st.lFrame.currentDirectiveIndex;return-1===e?null:n[e]}(n);let s=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(t=Mu(t=q_(null,n,e,t,i),e.attrs,i),s=null);else{const o=e.directiveStylingLast;if(-1===o||n[o]!==r)if(t=q_(r,n,e,t,i),null===s){let l=function Zk(n,e,t){const i=t?e.classBindings:e.styleBindings;if(0!==Ns(i))return n[Vr(i)]}(n,e,i);void 0!==l&&Array.isArray(l)&&(l=q_(null,n,e,l[1],i),l=Mu(l,e.attrs,i),function Kk(n,e,t,i){n[Vr(t?e.classBindings:e.styleBindings)]=i}(n,e,i,l))}else s=function Jk(n,e,t){let i;const r=e.directiveEnd;for(let s=1+e.directiveStylingLast;s<r;s++)i=Mu(i,n[s].hostAttrs,t);return Mu(i,e.attrs,t)}(n,e,i)}return void 0!==s&&(i?e.residualClasses=s:e.residualStyles=s),t}(r,s,e,i),function Uk(n,e,t,i,r,s){let o=s?e.classBindings:e.styleBindings,a=Vr(o),l=Ns(o);n[i]=t;let u,c=!1;if(Array.isArray(t)){const h=t;u=h[1],(null===u||al(h,u)>0)&&(c=!0)}else u=t;if(r)if(0!==l){const d=Vr(n[a+1]);
1n[i+1]=Td(d,a),0!==d&&(n[d+1]=l_(n[d+1],i)),n[a+1]=function KF(n,e){return 131071&n|e<<17}(n[a+1],i)}else n[i+1]=Td(a,0),0!==a&&(n[a+1]=l_(n[a+1],i)),a=i;else n[i+1]=Td(l,0),0===a?a=i:n[l+1]=l_(n[l+1],i),l=i;c&&(n[i+1]=a_(n[i+1])),BC(n,u,i,!0),BC(n,u,i,!1),function Bk(n,e,t,i,r){const s=r?n.residualClasses:n.residualStyles;null!=s&&"string"==typeof e&&al(s,e)>=0&&(t[i+1]=c_(t[i+1]))}(e,u,n,i,s),o=Td(a,l),s?e.classBindings=o:e.styleBindings=o}(r,s,e,t,o,i)}}(s,n,o,i),e!==ot&&pi(r,o,e)&&function ZC(n,e,t,i,r,s,o,a){if(!(3&e.type))return;const l=n.data,c=l[a+1];kd(function fM(n){return 1==(1&n)}(c)?KC(l,e,t,r,Ns(c),o):void 0)||(kd(s)||function dM(n){return 2==(2&n)}(c)&&(s=KC(l,null,t,r,a,o)),function JL(n,e,t,i,r){const s=wn(n);if(e)r?s?n.addClass(t,i):t.classList.add(i):s?n.removeClass(t,i):t.classList.remove(i);else{let o=-1===i.indexOf("-")?void 0:cr.DashCase;if(null==r)s?n.removeStyle(t,i,o):t.style.removeProperty(i);else{const a="string"==typeof r&&r.endsWith("!important");a&&(r=r.slice(0,-10),o|=cr.Important),s?n.setStyle(t,i,r,o):t.style.setProperty(i,r,a?"important":"")}}}(i,o,id(Ai(),t),r,s))}(s,s.data[Ai()],r,r[11],n,r[o+1]=function tU(n,e){return null==n||("string"==typeof e?n+=e:"object"==typeof n&&(n=Ht(ur(n)))),n}(e,t),i,o)}(n,e,null,!0),Nd}function q_(n,e,t,i,r){let s=null;const o=t.directiveEnd;let a=t.directiveStylingLast;for(-1===a?a=t.directiveStart:a++;a<o&&(s=e[a],i=Mu(i,s.hostAttrs,r),s!==n);)a++;return null!==n&&(t.directiveStylingLast=a),i}function Mu(n,e,t){const i=t?1:2;let r=-1;if(null!==e)for(let s=0;s<e.length;s++){const o=e[s];"number"==typeof o?r=o:r===i&&(Array.isArray(n)||(n=void 0===n?[]:["",n]),lr(n,o,!!t||e[++s]))}return void 0===n?null:n}function KC(n,e,t,i,r,s){const o=null===e;let a;for(;r>0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,h=null===u;let d=t[r+1];d===ot&&(d=h?en:void 0);let f=h?Ig(d,i):u===i?d:void 0;if(c&&!kd(f)&&(f=Ig(l,i)),kd(f)&&(a=f,o))return a;const p=n[r+1];r=o?Vr(p):Ns(p)}if(null!==e){let l=s?e.residualClasses:e.residualStyles;null!=l&&(a=Ig(l,i))}return a}function kd(n){return void 0!==n}function A(n,e=""){const t=oe(),i=Ft(),r=n+20,s=i.firstCreatePass?hl(i,r,1,e,null):i.data[r],o=t[r]=function Hg(n,e){return wn(n)?n.createText(e):n.createTextNode(e)}(t[11],e);wd(i,t,o,s),os(s,!1)}function $e(n){return St("",n,""),$e}function St(n,e,t){const i=oe(),r=function vl(n,e,t,i){return pi(n,Qa(),t)?e+rt(t)+i:ot}(i,n,e,t);return r!==ot&&ks(i,Ai(),r),St}function Y_(n,e,t,i,r){const s=oe(),o=yl(s,n,e,t,i,r);return o!==ot&&ks(s,Ai(),o),Y_}const Ud="en-US";let yS=Ud;function K_(n,e,t,i,r){if(n=mt(n),Array.isArray(n))for(let s=0;s<n.length;s++)K_(n[s],e,t,i,r);else{const s=Ft(),o=oe();let a=ml(n)?n:mt(n.provide),l=$M(n);const c=Vn(),u=1048575&c.providerIndexes,h=c.directiveStart,d=c.providerIndexes>>20;if(ml(n)||!n.multi){const f=new Kc(l,r,Y),p=Q_(a,e,r?u:u+d,h);-1===p?(pd(Qc(c,o),s,a),J_(s,n,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(f),o.push(f)):(t[p]=f,o[p]=f)}else{const f=Q_(a,e,u+d,h),p=Q_(a,e,u,u+d),_=f>=0&&t[f],g=p>=0&&t[p];if(r&&!g||!r&&!_){pd(Qc(c,o),s,a);const m=function b5(n,e,t,i,r){const s=new Kc(n,t,Y);return s.multi=[],s.index=e,s.componentProviders=0,GS(s,r,i&&!t),s}(r?y5:v5,t.length,r,i,l);!r&&g&&(t[p].providerFactory=m),J_(s,n,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),t.push(m),o.push(m)}else J_(s,n,f>-1?f:p,GS(t[r?p:f],l,!r&&i));!r&&i&&g&&t[p].componentProviders++}}}function J_(n,e,t,i){const r=ml(e),s=function HN(n){return!!n.useClass}(e);if(r||s){const l=(s?mt(e.useClass):e).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){const u=c.indexOf(t);-1===u?c.push(t,[i,l]):c[u+1].push(i,l)}else c.push(t,l)}}}function GS(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function Q_(n,e,t,i){for(let r=t;r<i;r++)if(e[r]===n)return r;return-1}function v5(n,e,t,i){return ev(this.multi,[])}function y5(n,e,t,i){const r=this.multi;let s;if(this.providerFactory){const o=this.providerFactory.componentProviders,a=eu(t,t[1],this.providerFactory.index,i);s=a.slice(0,o),ev(r,s);for(let l=o;l<a.length;l++)s.push(a[l])}else s=[],ev(r,s);return s}function ev(n,e){for(let t=0;t<n.length;t++)e.push((0,n[t])());return e}function fn(n,e=[]){return t=>{t.providersResolver=(i,r)=>function _5(n,e,t){const i=Ft();if(i.firstCreatePass){const r=Ur(n);K_(t,i.data,i.blueprint,r,!0),K_(e,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,e)}}class WS{}
1class M5{resolveComponentFactory(e){throw function w5(n){const e=Error(`No component factory found for ${Ht(n)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=n,e}(e)}}let Au=(()=>{class n{}return n.NULL=new M5,n})();function C5(){return Pl(Vn(),oe())}function Pl(n,e){return new Wi(or(n,e))}let Wi=(()=>{class n{constructor(t){this.nativeElement=t}}return n.__NG_ELEMENT_ID__=C5,n})();function S5(n){return n instanceof Wi?n.nativeElement:n}class $S{}let gs=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function T5(){const n=oe(),t=ar(Vn().index,n);return function E5(n){return n[11]}(ss(t)?t:n)}(),n})(),A5=(()=>{class n{}return n.\u0275prov=Ze({token:n,providedIn:"root",factory:()=>null}),n})();class Du{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const D5=new Du("13.3.12"),tv={};function Gd(n,e,t,i,r=!1){for(;null!==t;){const s=e[t.index];if(null!==s&&i.push(On(s)),kr(s))for(let a=10;a<s.length;a++){const l=s[a],c=l[1].firstChild;null!==c&&Gd(l[1],l,c,i)}const o=t.type;if(8&o)Gd(n,e,t.child,i);else if(32&o){const a=Bg(t,e);let l;for(;l=a();)i.push(l)}else if(16&o){const a=zw(e,t);if(Array.isArray(a))i.push(...a);else{const l=hu(e[16]);Gd(l[1],l,a,i,!0)}}t=r?t.projectionNext:t.next}return i}class Pu{constructor(e,t){this._lView=e,this._cdRefInjectingView=t,this._appRef=null,this._attachedToViewContainer=!1}get rootNodes(){const e=this._lView,t=e[1];return Gd(t,e,t.firstChild,[])}get context(){return this._lView[8]}set context(e){this._lView[8]=e}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const e=this._lView[3];if(kr(e)){const t=e[8],i=t?t.indexOf(this):-1;i>-1&&(Wg(e,i),gd(t,i))}this._attachedToViewContainer=!1}Rw(this._lView[1],this._lView)}onDestroy(e){TM(this._lView[1],this._lView,null,e)}markForCheck(){C_(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){!function E_(n,e,t){const i=e[10];i.begin&&i.begin();try{fl(n,e,n.template,t)}catch(r){throw VM(e,r),r}finally{i.end&&i.end()}}(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ot(902,"");this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function HL(n,e){du(n,e,e[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Ot(902,"");this._appRef=e}}class P5 extends Pu{constructor(e){super(e),this._view=e}detectChanges(){NM(this._view)}checkNoChanges(){}get context(){return null}}class qS extends Au{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=si(e);return new nv(t,this.ngModule)}}function YS(n){const e=[];for(let t in n)n.hasOwnProperty(t)&&e.push({propName:n[t],templateName:t});return e}class nv extends WS{constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function XF(n){return n.map(YF).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}get inputs(){return YS(this.componentDef.inputs)}get outputs(){return YS(this.componentDef.outputs)}create(e,t,i,r){const s=(r=r||this.ngModule)?function R5(n,e){return{get:(t,i,r)=>{const s=n.get(t,tv,r);return s!==tv||i===tv?s:e.get(t,i,r)}}}(e,r.injector):e,o=s.get($S,Fx),a=s.get(A5,null),l=o.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",u=i?function EM(n,e,t){if(wn(n))return n.selectRootElement(e,t===rs.ShadowDom);let i="string"==typeof e?n.querySelector(e):e;return i.textContent="",i}(l,i,this.componentDef.encapsulation):Gg(o.createRenderer(null,this.componentDef),c,function I5(n){const e=n.toLowerCase();return"svg"===e?"svg":"math"===e?"math":null}(c)),h=this.componentDef.onPush?576:528,d=function rC(n,e){return{components:[],scheduler:n||UF,clean:ON,playerHandler:e||null,flags:0}}(),f=Pd(0,null,null,1,0,null,null,null,null,null),p=_u(null,f,d,h,null,null,o,l,a,s);let _,g;sd(p);try{const m=function nC(n,e,t,i,r,s){const o=t[1];t[20]=n;const l=hl(o,20,2,"#host",null),c=l.mergedAttrs=e.hostAttrs;null!==c&&(Rd(l,c,!0),null!==n&&(ud(r,n,c),null!==l.classes&&Zg(r,n,l.classes),null!==l.styles&&Gw(r,n,l.styles)));const u=i.createRenderer(n,e),h=_u(t,CM(e),null,e.onPush?64:16,t[20],l,i,u,s||null,null);return o.firstCreatePass&&(pd(Qc(l,t),o,e.type),RM(o,l),OM(l,t.length,1)),Id(t,h),t[20]=h}(u,this.componentDef,p,o,l);if(u)if(i)ud(l,u,["ng-version",D5.full]);else{const{attrs:v,classes:y}=function ZF(n){const e=[],t=[];let i=1,r=2;for(;i<n.length;){let s=n[i];if("string"==typeof s)2===r?""!==s&&e.push(s,n[++i]):8===r&&t.push(s);else{if(!Br(r))break;r=s}i++}return{attrs:e,classes:t}}(this.componentDef.selectors[0]);v&&ud(l,u,v),y&&y.length>0&&Zg(l,u,y.join(" "))}if(g=pg(f,20),void 0!==t){const v=g.projection=[];for(let y=0;y<this.ngContentSelectors.length;y++){const b=t[y];v.push(null!=b?Array.from(b):null)}}_=function iC(n,e,t,i,r){const s=t[1],o=function _N(n,e,t){const i=Vn();n.firstCreatePass&&(t.providersResolver&&t.providersResolver(t),LM(n,i,e,dl(n,e,1,null),t));const r=eu(e,n,i.directiveStart,i);di(r,e);const s=or(i,e);return s&&di(s,e),r}(s,t,e);if(i.components.push(o),n[8]=o,r&&r.forEach(l=>l(o,e)),e.contentQueries){const l=Vn();e.contentQueries(1,o,l.directiveStart)}const a=Vn();return!s.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(ho(a.index),PM(t[1],a,0,a.directiveStart,a.directiveEnd,e),IM(e,o)),o}(m,this.componentDef,p,d,[QN]),vu(f,p,null)}finally{od()}return new L5(this.componentType,_,Pl(g,p),p,g)}}class L5 extends class x5{}{constructor(e,t,i,r,s){super(),this.location=i,this._rootLView=r,this._tNode=s,this.instance=t,this.hostView=this.changeDetectorRef=new P5(r),this.componentType=e}get injector(){return new nl(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}}class Us{}class XS{}const Il=new Map;class JS extends Us{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new qS(this);const i=br(e);this._bootstrapComponents=hs(i.bootstrap),this._r3Injector=jM(e,t,[{provide:Us,useValue:this},{provide:Au,useValue:this.componentFactoryResolver}],Ht(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,t=fi.THROW_IF_NOT_FOUND,i=tt.Default){return e===fi||e===Us||e===A_?this:this._r3Injector.get(e,t,i)}destroy(){const e=this._r3Injector;
1!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class iv extends XS{constructor(e){super(),this.moduleType=e,null!==br(e)&&function N5(n){const e=new Set;!function t(i){const r=br(i,!0),s=r.id;null!==s&&(function ZS(n,e,t){if(e&&e!==t)throw new Error(`Duplicate module registered for ${n} - ${Ht(e)} vs ${Ht(e.name)}`)}(s,Il.get(s),i),Il.set(s,i));const o=hs(r.imports);for(const a of o)e.has(a)||(e.add(a),t(a))}(n)}(e)}create(e){return new JS(this.moduleType,e)}}function Wr(n,e,t){const i=Ti()+n,r=oe();return r[i]===ot?fs(r,i,t?e.call(t):e()):function xu(n,e){return n[e]}(r,i)}function Cn(n,e,t,i){return QS(oe(),Ti(),n,e,t,i)}function QS(n,e,t,i,r,s){const o=e+t;return pi(n,o,r)?fs(n,o+1,s?i.call(s,r):i(r)):function Iu(n,e){const t=n[e];return t===ot?void 0:t}(n,o+1)}function Wd(n,e){const t=Ft();let i;const r=n+20;t.firstCreatePass?(i=function j5(n,e){if(e)for(let t=e.length-1;t>=0;t--){const i=e[t];if(n===i.name)return i}}(e,t.pipeRegistry),t.data[r]=i,i.onDestroy&&(t.destroyHooks||(t.destroyHooks=[])).push(r,i.onDestroy)):i=t.data[r];const s=i.factory||(i.factory=ea(i.type)),o=ao(Y);try{const a=dd(!1),l=s();return dd(a),function hk(n,e,t,i){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}(t,oe(),r,l),l}finally{ao(o)}}function jd(n,e,t){const i=n+20,r=oe(),s=function Ja(n,e){return n[e]}(r,i);return function Ru(n,e){return n[1].data[e].pure}(r,i)?QS(r,Ti(),e,s.transform,t,s):s.transform(t)}function rv(n){return e=>{setTimeout(n,void 0,e)}}const sn=class Z5 extends is{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,i){var r,s,o;let a=e,l=t||(()=>null),c=i;if(e&&"object"==typeof e){const h=e;a=null===(r=h.next)||void 0===r?void 0:r.bind(h),l=null===(s=h.error)||void 0===s?void 0:s.bind(h),c=null===(o=h.complete)||void 0===o?void 0:o.bind(h)}this.__isAsync&&(l=rv(l),a&&(a=rv(a)),c&&(c=rv(c)));const u=super.subscribe({next:a,error:l,complete:c});return e instanceof Bt&&e.add(u),u}};function K5(){return this._results[gl()]()}class sv{constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const t=gl(),i=sv.prototype;i[t]||(i[t]=K5)}get changes(){return this._changes||(this._changes=new sn)}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){const i=this;i.dirty=!1;const r=Cr(e);(this._changesDetected=!function iL(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],s=e[i];if(t&&(r=t(r),s=t(s)),s!==r)return!1}return!0}(i._results,r,t))&&(i._results=r,i.length=r.length,i.last=r[this.length-1],i.first=r[0])}notifyOnChanges(){this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}Symbol;let Bs=(()=>{class n{}return n.__NG_ELEMENT_ID__=e4,n})();const J5=Bs,Q5=class extends J5{constructor(e,t,i){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=i}createEmbeddedView(e){const t=this._declarationTContainer.tViews,i=_u(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);i[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(i[19]=s.createEmbeddedView(t)),vu(t,i,e),new Pu(i)}};function e4(){return $d(Vn(),oe())}function $d(n,e){return 4&n.type?new Q5(e,n,Pl(n,e)):null}let jr=(()=>{class n{}return n.__NG_ELEMENT_ID__=t4,n})();function t4(){return oE(Vn(),oe())}const n4=jr,rE=class extends n4{constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return Pl(this._hostTNode,this._hostLView)}get injector(){return new nl(this._hostTNode,this._hostLView)}get parentInjector(){const e=fd(this._hostTNode,this._hostLView);if(Jx(e)){const t=tl(e,this._hostLView),i=el(e);return new nl(t[1].data[i+8],t)}return new nl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){const t=sE(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-10}createEmbeddedView(e,t,i){const r=e.createEmbeddedView(t||{});return this.insert(r,i),r}createComponent(e,t,i,r,s){const o=e&&!function iu(n){return"function"==typeof n}(e);let a;if(o)a=t;else{const h=t||{};a=h.index,i=h.injector,r=h.projectableNodes,s=h.ngModuleRef}const l=o?e:new nv(si(e)),c=i||this.parentInjector;if(!s&&null==l.ngModule){const d=(o?c:this.parentInjector).get(Us,null);d&&(s=d)}const u=l.create(c,r,void 0,s);return this.insert(u.hostView,a),u}insert(e,t){const i=e._lView,r=i[1];if(function EO(n){return kr(n[3])}(i)){const u=this.indexOf(e);if(-1!==u)this.detach(u);else{const h=i[3],d=new rE(h,h[6],h[3]);d.detach(d.indexOf(e))}}const s=this._adjustIndex(t),o=this._lContainer;!function WL(n,e,t,i){const r=10+i,s=t.length;i>0&&(t[r-1][4]=e),i<s-10?(e[4]=t[r],lw(t,10+i,e)):(t.push(e),e[4]=null),e[3]=t;const o=e[17];null!==o&&t!==o&&function jL(n,e){const t=n[9];
vendor: 4,510 bytes, line 1
1e[16]!==e[3][3][16]&&(n[2]=!0),null===t?n[9]=[e]:t.push(e)}(o,e);const a=e[19];null!==a&&a.insertView(n),e[2]|=128}(r,i,o,s);const a=qg(s,o),l=i[11],c=xd(l,o[7]);return null!==c&&function zL(n,e,t,i,r,s){i[0]=r,i[6]=e,du(n,i,t,1,r,s)}(r,o[6],l,i,c,a),e.attachToViewContainerRef(),lw(ov(o),s,e),e}move(e,t){return this.insert(e,t)}indexOf(e){const t=sE(this._lContainer);return null!==t?t.indexOf(e):-1}remove(e){const t=this._adjustIndex(e,-1),i=Wg(this._lContainer,t);i&&(gd(ov(this._lContainer),t),Rw(i[1],i))}detach(e){const t=this._adjustIndex(e,-1),i=Wg(this._lContainer,t);return i&&null!=gd(ov(this._lContainer),t)?new Pu(i):null}_adjustIndex(e,t=0){return null==e?this.length+t:e}};function sE(n){return n[8]}function ov(n){return n[8]||(n[8]=[])}function oE(n,e){let t;const i=e[n.index];if(kr(i))t=i;else{let r;if(8&n.type)r=On(i);else{const s=e[11];r=s.createComment("");const o=or(n,e);ta(s,xd(s,o),r,function XL(n,e){return wn(n)?n.nextSibling(e):e.nextSibling}(s,o),!1)}e[n.index]=t=FM(i,e,r,n),Id(e,t)}return new rE(t,n,e)}class av{constructor(e){this.queryList=e,this.matches=null}clone(){return new av(this.queryList)}setDirty(){this.queryList.setDirty()}}class lv{constructor(e=[]){this.queries=e}createEmbeddedView(e){const t=e.queries;if(null!==t){const i=null!==e.contentQueries?e.contentQueries[0]:t.length,r=[];for(let s=0;s<i;s++){const o=t.getByIndex(s);r.push(this.queries[o.indexInDeclarationView].clone())}return new lv(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)null!==hE(e,t).matches&&this.queries[t].setDirty()}}class aE{constructor(e,t,i=null){this.predicate=e,this.flags=t,this.read=i}}class cv{constructor(e=[]){this.queries=e}elementStart(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].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 i=0;i<this.length;i++){const r=null!==t?t.length:0,s=this.getByIndex(i).embeddedTView(e,r);s&&(s.indexInDeclarationView=i,null!==t?t.push(s):t=[s])}return null!==t?new cv(t):null}template(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}}class uv{constructor(e,t=-1){this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,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 uv(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){const t=this._declarationNodeIndex;let i=e.parent;for(;null!==i&&8&i.type&&i.index!==t;)i=i.parent;return t===(null!==i?i.index:-1)}return this._appliesToNextNode}matchTNode(e,t){const i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){const s=i[r];this.matchTNodeWithReadOption(e,t,s4(t,s)),this.matchTNodeWithReadOption(e,t,md(t,e,s,!1,!1))}else i===Bs?4&t.type&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,md(t,e,i,!1,!1))}matchTNodeWithReadOption(e,t,i){if(null!==i){const r=this.metadata.read;if(null!==r)if(r===Wi||r===jr||r===Bs&&4&t.type)this.addMatch(t.index,-2);else{const s=md(t,e,r,!1,!1);null!==s&&this.addMatch(t.index,s)}else this.addMatch(t.index,i)}}addMatch(e,t){null===this.matches?this.matches=[e,t]:this.matches.push(e,t)}}function s4(n,e){const t=n.localNames;if(null!==t)for(let i=0;i<t.length;i+=2)if(t[i]===e)return t[i+1];return null}function a4(n,e,t,i){return-1===t?function o4(n,e){return 11&n.type?Pl(n,e):4&n.type?$d(n,e):null}(e,n):-2===t?function l4(n,e,t){return t===Wi?Pl(e,n):t===Bs?$d(e,n):t===jr?oE(e,n):void 0}(n,e,i):eu(n,n[1],t,e)}function lE(n,e,t,i){const r=e[19].queries[i];if(null===r.matches){const s=n.data,o=t.matches,a=[];for(let l=0;l<o.length;l+=2){const c=o[l];a.push(c<0?null:a4(e,s[c],o[l+1],t.metadata.read))}r.matches=a}return r.matches}function hv(n,e,t,i){const r=n.queries.getByIndex(t),s=r.matches;if(null!==s){const o=lE(n,e,r,t);for(let a=0;a<s.length;a+=2){const l=s[a];if(l>0)i.push(o[a/2]);else{const c=s[a+1],u=e[-l];for(let h=10;h<u.length;h++){const d=u[h];
1d[17]===d[3]&&hv(d[1],d,c,i)}if(null!==u[9]){const h=u[9];for(let d=0;d<h.length;d++){const f=h[d];hv(f[1],f,c,i)}}}}}return i}function oa(n){const e=oe(),t=Ft(),i=Gx();xg(i+1);const r=hE(t,i);if(n.dirty&&Nx(e)===(2==(2&r.metadata.flags))){if(null===r.matches)n.reset([]);else{const s=r.crossesNgTemplate?hv(t,e,i,[]):lE(t,e,r,i);n.reset(s,S5),n.notifyOnChanges()}return!0}return!1}function Ou(n,e,t){const i=Ft();i.firstCreatePass&&(uE(i,new aE(n,e,t),-1),2==(2&e)&&(i.staticViewQueries=!0)),cE(i,oe(),e)}function dv(n,e,t,i){const r=Ft();if(r.firstCreatePass){const s=Vn();uE(r,new aE(e,t,i),s.index),function u4(n,e){const t=n.contentQueries||(n.contentQueries=[]);e!==(t.length?t[t.length-1]:-1)&&t.push(n.queries.length-1,e)}(r,n),2==(2&t)&&(r.staticContentQueries=!0)}cE(r,oe(),t)}function aa(){return function c4(n,e){return n[19].queries[e].queryList}(oe(),Gx())}function cE(n,e,t){const i=new sv(4==(4&t));TM(n,e,i,i.destroy),null===e[19]&&(e[19]=new lv),e[19].queries.push(new av(i))}function uE(n,e,t){null===n.queries&&(n.queries=new cv),n.queries.track(new uv(e,t))}function hE(n,e){return n.queries.getByIndex(e)}function Xd(...n){}const vv=new gt("Application Initializer");let yv=(()=>{class n{constructor(t){this.appInits=t,this.resolve=Xd,this.reject=Xd,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const t=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r<this.appInits.length;r++){const s=this.appInits[r]();if(wu(s))t.push(s);else if(W_(s)){const o=new Promise((a,l)=>{s.subscribe({complete:a,error:l})});t.push(o)}}Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),0===t.length&&i(),this.initialized=!0}}return n.\u0275fac=function(t){return new(t||n)(Le(vv,8))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Fu=new gt("AppId",{providedIn:"root",factory:function AE(){return`${bv()}${bv()}${bv()}`}});function bv(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const DE=new gt("Platform Initializer"),xv=new gt("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),PE=new gt("appBootstrapListener");let A4=(()=>{class n{log(t){console.log(t)}warn(t){console.warn(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();const _o=new gt("LocaleId",{providedIn:"root",factory:()=>gL(_o,tt.Optional|tt.SkipSelf)||function D4(){return"undefined"!=typeof $localize&&$localize.locale||Ud}()});class I4{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}let IE=(()=>{class n{compileModuleSync(t){return new iv(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const i=this.compileModuleSync(t),s=hs(br(t).declarations).reduce((o,a)=>{const l=si(a);return l&&o.push(new nv(l)),o},[]);return new I4(i,s)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const O4=(()=>Promise.resolve(0))();function wv(n){"undefined"==typeof Zone?O4.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class Jn{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new sn(!1),this.onMicrotaskEmpty=new sn(!1),this.onStable=new sn(!1),this.onError=new sn(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&t,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function L4(){let n=Xt.requestAnimationFrame,e=Xt.cancelAnimationFrame;if("undefined"!=typeof Zone&&n&&e){const t=n[Zone.__symbol__("OriginalDelegate")];t&&(n=t);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function k4(n){const e=()=>{!function N4(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(Xt,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,Cv(n),n.isCheckStableRunning=!0,Mv(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),Cv(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,i,r,s,o,a)=>{try{return RE(n),t.invokeTask(r,s,o,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||n.shouldCoalesceRunChangeDetection)&&e(),OE(n)}},onInvoke:(t,i,r,s,o,a,l)=>{try{return RE(n),t.invoke(r,s,o,a,l)}finally{n.shouldCoalesceRunChangeDetection&&e(),OE(n)}},onHasTask:(t,i,r,s)=>{t.hasTask(r,s),i===r&&("microTask"==s.change?(n._hasPendingMicrotasks=s.microTask,Cv(n),Mv(n)):"macroTask"==s.change&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(t,i,r,s)=>(t.handleError(r,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}(r)}
vendor: 4,703 bytes, line 1
1static isInAngularZone(){return"undefined"!=typeof Zone&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Jn.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(Jn.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+r,e,F4,Xd,Xd);try{return s.runTask(o,t,i)}finally{s.cancelTask(o)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}}const F4={};function Mv(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function Cv(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function RE(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function OE(n){n._nesting--,Mv(n)}class U4{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new sn,this.onMicrotaskEmpty=new sn,this.onStable=new sn,this.onError=new sn}run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}}let Sv=(()=>{class n{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Jn.assertNotInAngularZone(),wv(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())wv(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(t)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,i,r){let s=-1;i&&i>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),t(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:t,timeoutId:s,updateCb:r})}whenStable(t,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,i,r){return[]}}return n.\u0275fac=function(t){return new(t||n)(Le(Jn))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})(),B4=(()=>{class n{constructor(){this._applications=new Map,Ev.addToWindow(this)}registerApplication(t,i){this._applications.set(t,i)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,i=!0){return Ev.findTestabilityInTree(this,t,i)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();class V4{addToWindow(e){}findTestabilityInTree(e,t,i){return null}}let Ev=new V4,la=null;const LE=new gt("AllowMultipleToken"),FE=new gt("PlatformOnDestroy");class NE{constructor(e,t){this.name=e,this.token=t}}function kE(n,e,t=[]){const i=`Platform: ${e}`,r=new gt(i);return(s=[])=>{let o=Tv();if(!o||o.injector.get(LE,!1)){const a=[...t,...s,{provide:r,useValue:!0}];n?n(a):function W4(n){if(la&&!la.get(LE,!1))throw new Ot(400,"");la=n;const e=n.get(UE),t=n.get(DE,null);t&&t.forEach(i=>
1i())}(function $4(n=[],e){return fi.create({name:e,providers:[{provide:D_,useValue:"platform"},{provide:FE,useValue:()=>la=null},...n]})}(a,i))}return function j4(n){const e=Tv();if(!e)throw new Ot(401,"");return e}()}}function Tv(){var n;return null!==(n=null==la?void 0:la.get(UE))&&void 0!==n?n:null}let UE=(()=>{class n{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,i){const a=function q4(n,e){let t;return t="noop"===n?new U4:("zone.js"===n?void 0:n)||new Jn({enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!!(null==e?void 0:e.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==e?void 0:e.ngZoneRunCoalescing)}),t}(i?i.ngZone:void 0,{ngZoneEventCoalescing:i&&i.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:i&&i.ngZoneRunCoalescing||!1}),l=[{provide:Jn,useValue:a}];return a.run(()=>{const c=fi.create({providers:l,parent:this.injector,name:t.moduleType.name}),u=t.create(c),h=u.injector.get(gu,null);if(!h)throw new Ot(402,"");return a.runOutsideAngular(()=>{const d=a.onError.subscribe({next:f=>{h.handleError(f)}});u.onDestroy(()=>{Dv(this._modules,u),d.unsubscribe()})}),function Y4(n,e,t){try{const i=t();return wu(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n.handleError(i)),i}}(h,a,()=>{const d=u.injector.get(yv);return d.runInitializers(),d.donePromise.then(()=>(function EU(n){rr(n,"Expected localeId to be defined"),"string"==typeof n&&(yS=n.toLowerCase().replace(/_/g,"-"))}(u.injector.get(_o,Ud)||Ud),this._moduleDoBootstrap(u),u))})})}bootstrapModule(t,i=[]){const r=BE({},i);return function H4(n,e,t){const i=new iv(t);return Promise.resolve(i)}(0,0,t).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(t){const i=t.injector.get(Av);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!t.instance.ngDoBootstrap)throw new Ot(403,"");t.instance.ngDoBootstrap(i)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Ot(404,"");this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const t=this._injector.get(FE,null);null==t||t(),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(t){return new(t||n)(Le(fi))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function BE(n,e){return Array.isArray(e)?e.reduce(BE,n):Object.assign(Object.assign({},n),e)}let Av=(()=>{class n{constructor(t,i,r,s){this._zone=t,this._injector=i,this._exceptionHandler=r,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new Dn(l=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{l.next(this._stable),l.complete()})}),a=new Dn(l=>{let c;this._zone.runOutsideAngular(()=>{c=this._zone.onStable.subscribe(()=>{Jn.assertNotInAngularZone(),wv(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,l.next(!0))})})});const u=this._zone.onUnstable.subscribe(()=>{Jn.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{l.next(!1)}))});return()=>{c.unsubscribe(),u.unsubscribe()}});this.isStable=function $3(...n){const e=jc(n),t=function B3(n,e){return"number"==typeof Xm(n)?n.pop():e}(n,1/0),i=n;return i.length?1===i.length?Lr(i[0]):Wc(t)(ii(i,e)):Is}(o,a.pipe(bx()))}bootstrap(t,i){if(!this._initStatus.done)throw new Ot(405,"");let r;r=t instanceof WS?t:this._injector.get(Au).resolveComponentFactory(t),this.componentTypes.push(r.componentType);const s=function G4(n){return n.isBoundToModule}(r)?void 0:this._injector.get(Us),a=r.create(fi.NULL,[],i||r.selector,s),l=a.location.nativeElement,c=a.injector.get(Sv,null),u=c&&a.injector.get(B4);return c&&u&&u.registerApplication(l,c),a.onDestroy(()=>{this.detachView(a.hostView),Dv(this.components,a),u&&u.unregisterApplication(l)}),this._loadComponent(a),a}tick(){if(this._runningTick)throw new Ot(101,"");try{this._runningTick=!0;for(let t of this._views)t.detectChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){const i=t;Dv(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(PE,[]).concat(this._bootstrapListeners).forEac
vendor: 8,407 bytes, line 1
1h(r=>r(t))}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}get viewCount(){return this._views.length}}return n.\u0275fac=function(t){return new(t||n)(Le(Jn),Le(fi),Le(gu),Le(yv))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Dv(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}let zE=!0,Zd=(()=>{class n{}return n.__NG_ELEMENT_ID__=K4,n})();function K4(n){return function J4(n,e,t){if(td(n)&&!t){const i=ar(n.index,e);return new Pu(i,i)}return 47&n.type?new Pu(e[16],e):null}(Vn(),oe(),16==(16&n))}class $E{constructor(){}supports(e){return bu(e)}create(e){return new rB(e)}}const iB=(n,e)=>e;class rB{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||iB}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,r=0,s=null;for(;t||i;){const o=!i||t&&t.currentIndex<YE(i,r,s)?t:i,a=YE(o,r,s),l=o.currentIndex;if(o===i)r--,i=i._nextRemoved;else if(t=t._next,null==o.previousIndex)r++;else{s||(s=[]);const c=a-r,u=l-r;if(c!=u){for(let d=0;d<c;d++){const f=d<s.length?s[d]:s[d]=0,p=f+d;u<=p&&p<c&&(s[d]=f+1)}s[o.previousIndex]=u-c}}a!==l&&e(o,a,l)}}forEachPreviousItem(e){let t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachMovedItem(e){let t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}forEachIdentityChange(e){let t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)}diff(e){if(null==e&&(e=[]),!bu(e))throw new Ot(900,"");return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let r,s,o,t=this._itHead,i=!1;if(Array.isArray(e)){this.length=e.length;for(let a=0;a<this.length;a++)s=e[a],o=this._trackByFn(a,s),null!==t&&Object.is(t.trackById,o)?(i&&(t=this._verifyReinsertion(t,s,o,a)),Object.is(t.item,s)||this._addIdentityChange(t,s)):(t=this._mismatch(t,s,o,a),i=!0),t=t._next}else r=0,function ck(n,e){if(Array.isArray(n))for(let t=0;t<n.length;t++)e(n[t]);else{const t=n[gl()]();let i;for(;!(i=t.next()).done;)e(i.value)}}(e,a=>{o=this._trackByFn(r,a),null!==t&&Object.is(t.trackById,o)?(i&&(t=this._verifyReinsertion(t,a,o,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)):(t=this._mismatch(t,a,o,r),i=!0),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,r){let s;return null===e?s=this._itTail:(s=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,s,r)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,s,r)):e=this._addAfter(new sB(t,i),s,r),e}_verifyReinsertion(e,t,i,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==s?e=this._reinsertAfter(s,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const r=e._prevRemoved,s=e._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){const r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new qE),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,i=e._next;return null===t?this._itHead=i:t._next=i,null===i?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new qE),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class sB{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class oB{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===t||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){const t=e._prevDup,i=e._nextDup;return null===t?this._head=i:t._nextDup=i,null===i?this._tail=t:i._prevDup=t,null===this._head}}class qE{constructor(){this.map=new Map}put(e){const t=e.trackById;let i=this.map.get(t);i||(i=new oB,this.map.set(t,i)),i.add(e)}get(e,t){const r=this.map.get(e);return r?r.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function YE(n,e,t){const i=n.previousIndex;if(null===i)return i;let r=0;return t&&i<t.length&&(r=t[i]),i+e+r}class XE{constructor(){}supports(e){return e instanceof Map||F_(e)}create(){return new aB}}class aB{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(e){let t;for(t=this._mapHead;null!==t;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}diff(e){if(e){if(!(e instanceof Map||F_(e)))throw new Ot(900,"")}else e=new Map;return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;
1if(this._appendAfter=null,this._forEach(e,(i,r)=>{if(t&&t.key===r)this._maybeAddToChanges(t,i),this._appendAfter=t,t=t._next;else{const s=this._getOrCreateRecordForKey(r,i);t=this._insertBeforeOrAppend(t,s)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let i=t;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const i=e._prev;return t._next=e,t._prev=i,e._prev=t,i&&(i._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const r=this._records.get(e);this._maybeAddToChanges(r,t);const s=r._prev,o=r._next;return s&&(s._next=o),o&&(o._prev=s),r._next=null,r._prev=null,r}const i=new lB(e);return this._records.set(e,i),i.currentValue=t,this._addToAdditions(i),i}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(i=>t(e[i],i))}}class lB{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function ZE(){return new Qd([new $E])}let Qd=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(null!=i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||ZE()),deps:[[n,new lu,new po]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(null!=i)return i;throw new Ot(901,"")}}return n.\u0275prov=Ze({token:n,providedIn:"root",factory:ZE}),n})();function KE(){return new Nu([new XE])}let Nu=(()=>{class n{constructor(t){this.factories=t}static create(t,i){if(i){const r=i.factories.slice();t=t.concat(r)}return new n(t)}static extend(t){return{provide:n,useFactory:i=>n.create(t,i||KE()),deps:[[n,new lu,new po]]}}find(t){const i=this.factories.find(s=>s.supports(t));if(i)return i;throw new Ot(901,"")}}return n.\u0275prov=Ze({token:n,providedIn:"root",factory:KE}),n})();const hB=kE(null,"core",[]);let dB=(()=>{class n{constructor(t){}}return n.\u0275fac=function(t){return new(t||n)(Le(Av))},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({}),n})(),ef=null;function _s(){return ef}const Oi=new gt("DocumentToken");let ua=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:function(){return function gB(){return Le(JE)}()},providedIn:"platform"}),n})();const _B=new gt("Location Initialized");let JE=(()=>{class n extends ua{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=window.location,this._history=window.history}getBaseHrefFromDOM(){return _s().getBaseHref(this._doc)}onPopState(t){const i=_s().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",t,!1),()=>i.removeEventListener("popstate",t)}onHashChange(t){const i=_s().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",t,!1),()=>i.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,i,r){QE()?this._history.pushState(t,i,r):this.location.hash=r}replaceState(t,i,r){QE()?this._history.replaceState(t,i,r):this.location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}}return n.\u0275fac=function(t){return new(t||n)(Le(Oi))},n.\u0275prov=Ze({token:n,factory:function(){return function vB(){return new JE(Le(Oi))}()},providedIn:"platform"}),n})();function QE(){return!!window.history.pushState}function Lv(n,e){if(0==n.length)return e;if(0==e.length)return n;let t=0;return n.endsWith("/")&&t++,e.startsWith("/")&&t++,2==t?n+e.substring(1):1==t?n+e:n+"/"+e}function eT(n){const e=n.match(/#|\?|$/),t=e&&e.index||n.length;return n.slice(0,t-("/"===n[t-1]?1:0))+n.slice(t)}function Vs(n){return n&&"?"!==n[0]?"?"+n:n}let Ol=(()=>{class n{historyGo(t){throw new Error("Not implemented")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:function(){return function yB(n){const e=Le(Oi).location;return new tT(Le(ua),e&&e.origin||"")}()},providedIn:"root"}),n})();const Fv=new gt("appBaseHref");let tT=(()=>{class n extends Ol{constructor(t,i){if(super(),this._platformLocation=t,this._removeListenerFns=[],null==i&&(i=this._platformLocation.getBaseHrefFromDOM()),null==i)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=i}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.on
1HashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return Lv(this._baseHref,t)}path(t=!1){const i=this._platformLocation.pathname+Vs(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${i}${r}`:i}pushState(t,i,r,s){const o=this.prepareExternalUrl(r+Vs(s));this._platformLocation.pushState(t,i,o)}replaceState(t,i,r,s){const o=this.prepareExternalUrl(r+Vs(s));this._platformLocation.replaceState(t,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var i,r;null===(r=(i=this._platformLocation).historyGo)||void 0===r||r.call(i,t)}}return n.\u0275fac=function(t){return new(t||n)(Le(ua),Le(Fv,8))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})(),bB=(()=>{class n extends Ol{constructor(t,i){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(t){const i=Lv(this._baseHref,t);return i.length>0?"#"+i:i}pushState(t,i,r,s){let o=this.prepareExternalUrl(r+Vs(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(t,i,o)}replaceState(t,i,r,s){let o=this.prepareExternalUrl(r+Vs(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(t,i,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}historyGo(t=0){var i,r;null===(r=(i=this._platformLocation).historyGo)||void 0===r||r.call(i,t)}}return n.\u0275fac=function(t){return new(t||n)(Le(ua),Le(Fv,8))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})(),Nv=(()=>{class n{constructor(t,i){this._subject=new sn,this._urlChangeListeners=[],this._platformStrategy=t;const r=this._platformStrategy.getBaseHref();this._platformLocation=i,this._baseHref=eT(nT(r)),this._platformStrategy.onPopState(s=>{this._subject.emit({url:this.path(!0),pop:!0,state:s.state,type:s.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,i=""){return this.path()==this.normalize(t+Vs(i))}normalize(t){return n.stripTrailingSlash(function wB(n,e){return n&&e.startsWith(n)?e.substring(n.length):e}(this._baseHref,nT(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,i="",r=null){this._platformStrategy.pushState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Vs(i)),r)}replaceState(t,i="",r=null){this._platformStrategy.replaceState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Vs(i)),r)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}historyGo(t=0){var i,r;null===(r=(i=this._platformStrategy).historyGo)||void 0===r||r.call(i,t)}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}))}_notifyUrlChangeListeners(t="",i){this._urlChangeListeners.forEach(r=>r(t,i))}subscribe(t,i,r){return this._subject.subscribe({next:t,error:i,complete:r})}}return n.normalizeQueryParams=Vs,n.joinWithSlash=Lv,n.stripTrailingSlash=eT,n.\u0275fac=function(t){return new(t||n)(Le(Ol),Le(ua))},n.\u0275prov=Ze({token:n,factory:function(){return function xB(){return new Nv(Le(Ol),Le(ua))}()},providedIn:"root"}),n})();function nT(n){return n.replace(/\/index.html$/,"")}function hT(n,e){e=encodeURIComponent(e);for(const t of n.split(";")){const i=t.indexOf("="),[r,s]=-1==i?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(s)}return null}let vo=(()=>{class n{constructor(t,i,r,s){this._iterableDiffers=t,this._keyValueDiffers=i,this._ngEl=r,this._renderer=s,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(bu(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(i=>this._toggleClass(i.key,i.currentValue)),t.forEachChangedItem(i=>this._toggleClass(i.key,i.currentValue)),t.forEachRemovedItem(i=>{i.previousValue&&this._toggleClass(i.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(i=>{if("string"!=typeof i.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${Ht(i.item)}`);this._toggleClass(i.item,!0)}),t.forEachRemovedItem(i=>this._toggleClass(i.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(i=>
1this._toggleClass(i,!0)):Object.keys(t).forEach(i=>this._toggleClass(i,!!t[i])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(i=>this._toggleClass(i,!1)):Object.keys(t).forEach(i=>this._toggleClass(i,!1)))}_toggleClass(t,i){(t=t.trim())&&t.split(/\s+/g).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(t){return new(t||n)(Y(Qd),Y(Nu),Y(Wi),Y(gs))},n.\u0275dir=Ke({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),n})();class oV{constructor(e,t,i,r){this.$implicit=e,this.ngForOf=t,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let vs=(()=>{class n{constructor(t,i,r){this._viewContainer=t,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const i=this._viewContainer;t.forEachOperation((r,s,o)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new oV(r.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)i.remove(null===s?void 0:s);else if(null!==s){const a=i.get(s);i.move(a,o),dT(a,r)}});for(let r=0,s=i.length;r<s;r++){const a=i.get(r).context;a.index=r,a.count=s,a.ngForOf=this._ngForOf}t.forEachIdentityChange(r=>{dT(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(Y(jr),Y(Bs),Y(Qd))},n.\u0275dir=Ke({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),n})();function dT(n,e){n.context.$implicit=e.item}let ys=(()=>{class n{constructor(t,i){this._viewContainer=t,this._context=new aV,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){fT("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){fT("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,i){return!0}}return n.\u0275fac=function(t){return new(t||n)(Y(jr),Y(Bs))},n.\u0275dir=Ke({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),n})();class aV{constructor(){this.$implicit=null,this.ngIf=null}}function fT(n,e){if(e&&!e.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${Ht(e)}'.`)}let mT=(()=>{class n{transform(t){if(null==t)return null;if("string"!=typeof t)throw function qr(n,e){return new Ot(2100,"")}();return t.toUpperCase()}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275pipe=Si({name:"uppercase",type:n,pure:!0}),n})(),OV=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({}),n})();let kV=(()=>{class n{}return n.\u0275prov=Ze({token:n,providedIn:"root",factory:()=>new UV(Le(Oi),window)}),n})();class UV{constructor(e,t){this.document=e,this.window=t,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const t=function BV(n,e){const t=n.getElementById(e)||n.getElementsByName(e)[0];if(t)return t;if("function"==typeof n.createTreeWalker&&n.body&&(n.body.createShadowRoot||n.body.attachShadow)){const i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const s=r.shadowRoot;if(s){const o=s.getElementById(e)||s.querySelector(`[name="${e}"]`);if(o)return o}r=i.nextNode()}}return null}(this.document,e);
1t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),i=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(i-s[0],r-s[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=vT(this.window.history)||vT(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch(e){return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch(e){return!1}}}function vT(n){return Object.getOwnPropertyDescriptor(n,"scrollRestoration")}class yT{}class Zv extends class VV extends class mB{}{constructor(){super(...arguments),this.supportsDOMEvents=!0}}{static makeCurrent(){!function pB(n){ef||(ef=n)}(new Zv)}onAndCancel(e,t,i){return e.addEventListener(t,i,!1),()=>{e.removeEventListener(t,i,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,t){return(t=t||this.getDefaultDocument()).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"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){const t=function zV(){return Bu=Bu||document.querySelector("base"),Bu?Bu.getAttribute("href"):null}();return null==t?null:function HV(n){hf=hf||document.createElement("a"),hf.setAttribute("href",n);const e=hf.pathname;return"/"===e.charAt(0)?e:`/${e}`}(t)}resetBaseElement(){Bu=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return hT(document.cookie,e)}}let hf,Bu=null;const bT=new gt("TRANSITION_ID"),WV=[{provide:vv,useFactory:function GV(n,e,t){return()=>{t.get(yv).donePromise.then(()=>{const i=_s(),r=e.querySelectorAll(`style[ng-transition="${n}"]`);for(let s=0;s<r.length;s++)i.remove(r[s])})}},deps:[bT,Oi,fi],multi:!0}];class Kv{static init(){!function z4(n){Ev=n}(new Kv)}addToWindow(e){Xt.getAngularTestability=(i,r=!0)=>{const s=e.findTestabilityInTree(i,r);if(null==s)throw new Error("Could not find testability for element.");return s},Xt.getAllAngularTestabilities=()=>e.getAllTestabilities(),Xt.getAllAngularRootElements=()=>e.getAllRootElements(),Xt.frameworkStabilizers||(Xt.frameworkStabilizers=[]),Xt.frameworkStabilizers.push(i=>{const r=Xt.getAllAngularTestabilities();let s=r.length,o=!1;const a=function(l){o=o||l,s--,0==s&&i(o)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(e,t,i){if(null==t)return null;const r=e.getTestability(t);return null!=r?r:i?_s().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}let jV=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();const df=new gt("EventManagerPlugins");let ff=(()=>{class n{constructor(t,i){this._zone=i,this._eventNameToPlugin=new Map,t.forEach(r=>r.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,i,r){return this._findPluginFor(i).addEventListener(t,i,r)}addGlobalEventListener(t,i,r){return this._findPluginFor(i).addGlobalEventListener(t,i,r)}getZone(){return this._zone}_findPluginFor(t){const i=this._eventNameToPlugin.get(t);if(i)return i;const r=this._plugins;for(let s=0;s<r.length;s++){const o=r[s];if(o.supports(t))return this._eventNameToPlugin.set(t,o),o}throw new Error(`No event manager plugin found for event ${t}`)}}return n.\u0275fac=function(t){return new(t||n)(Le(df),Le(Jn))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();class xT{constructor(e){this._doc=e}addGlobalEventListener(e,t,i){const r=_s().getGlobalEventTarget(this._doc,e);if(!r)throw new Error(`Unsupported event target ${r} for event ${t}`);return this.addEventListener(r,t,i)}}let wT=(()=>{class n{constructor(){this._stylesSet=new Set}addStyles(t){const i=new Set;t.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})(),Vu=(()=>{class n extends wT{constructor(t){super(),this._doc=t,this._hostNodes=new Map,this._hostNodes.set(t.head,[])}_addStylesToHost(t,i,r){t.forEach(s=>{const o=this._doc.createElement("style");o.textContent=s,r.push(i.appendChild(o))})}addHost(t){const i=[];this._addStylesToHost(this._stylesSet,t,i),this._hostNodes.set(t,i)}removeHost(t){const i=this._hostNodes.get(t);
1i&&i.forEach(MT),this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(t,r,i)})}ngOnDestroy(){this._hostNodes.forEach(t=>t.forEach(MT))}}return n.\u0275fac=function(t){return new(t||n)(Le(Oi))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();function MT(n){_s().remove(n)}const Jv={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/MathML/"},Qv=/%COMP%/g;function pf(n,e,t){for(let i=0;i<e.length;i++){let r=e[i];Array.isArray(r)?pf(n,r,t):(r=r.replace(Qv,n),t.push(r))}return t}function ET(n){return e=>{if("__ngUnwrap__"===e)return n;!1===n(e)&&(e.preventDefault(),e.returnValue=!1)}}let ey=(()=>{class n{constructor(t,i,r){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new ty(t)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;switch(i.encapsulation){case rs.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new KV(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(t),r}case 1:case rs.ShadowDom:return new JV(this.eventManager,this.sharedStylesHost,t,i);default:if(!this.rendererByCompId.has(i.id)){const r=pf(i.id,i.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(t){return new(t||n)(Le(ff),Le(Vu),Le(Fu))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();class ty{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,t){return t?document.createElementNS(Jv[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,i){e&&e.insertBefore(t,i)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let i="string"==typeof e?document.querySelector(e):e;if(!i)throw new Error(`The selector "${e}" did not match any elements`);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;const s=Jv[r];s?e.setAttributeNS(s,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){const r=Jv[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(cr.DashCase|cr.Important)?e.style.setProperty(t,i,r&cr.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&cr.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e[t]=i}setValue(e,t){e.nodeValue=t}listen(e,t,i){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,ET(i)):this.eventManager.addEventListener(e,t,ET(i))}}class KV extends ty{constructor(e,t,i,r){super(e),this.component=i;const s=pf(r+"-"+i.id,i.styles,[]);t.addStyles(s),this.contentAttr=function YV(n){return"_ngcontent-%COMP%".replace(Qv,n)}(r+"-"+i.id),this.hostAttr=function XV(n){return"_nghost-%COMP%".replace(Qv,n)}(r+"-"+i.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}}class JV extends ty{constructor(e,t,i,r){super(e),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=pf(r.id,r.styles,[]);for(let o=0;o<s.length;o++){const a=document.createElement("style");a.textContent=s[o],this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(this.nodeOrShadowRoot(e),t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}}let QV=(()=>{class n extends xT{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r){return t.addEventListener(i,r,!1),()=>this.removeEventListener(t,i,r)}removeEventListener(t,i,r){return t.removeEventListener(i,r)}}return n.\u0275fac=function(t){return new(t||n)(Le(Oi))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();const AT=["alt","control","meta","shift"],t8={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},DT={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},n8={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let i8=(()=>{class n extends xT{constructor(t){super(t)}supports(t){return null!=n.parseEventName(t)}addEventListener(t,i,r){const s=n.parseEventName(i),o=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>_s().onAndCancel(t,s.domEventName,o))}static parseEventName(t){const i=t.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const s=n._normalizeKey(i.pop());let o="";if(AT.forEach(l=>{const c=i.indexOf(l);c>-1&&(i.splice(c,1),o+=l+".")}),o+=s,0!=i.length||0===s.length)return null;const a={};return a.domEventName=r,a.fullKey=o,a}static getEventFullKey(t){let i="",r=function r8(n){let e=n.key;if(null==e){if(e=n.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===n.location&&DT.hasOwnProperty(e)&&(e=DT[e]))}return t8[e]||e}(t);return r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),AT.forEach(s=>{s!=r&&n8[s](t)&&(i+=s+".")}),i+=r,i}static eventCallback(t,i,r){return s=>{n.getEventFullKey(s)===t&&r.runGuarded(()=>i(s))}}static _normalizeKey(t){return"esc"===t?"escape":t}}return n.\u0275fac=function(t){return new(t||n)(Le(Oi))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();const l8=kE(hB,"browser",[{provide:xv,useValue:"browser"},{provide:DE,useValue:function s8(){Zv.makeCurrent(),Kv.init()},multi:!0},{provide:Oi,useFactory:function a8(){return function wO(n){dg=n}(document),document},deps:[]}]),c8=[{provide:D_,useValue:"root"},{provide:gu,useFactory:function o8(){return new gu},deps:[]},{provide:df,useClass:QV,multi:!0,deps:[Oi,Jn,xv]},{provide:df,useClass:i8,multi:!0,deps:[Oi]},{provide:ey,useClass:ey,deps:[ff,Vu,Fu]},{provide:$S,useExisting:ey},{provide:wT,useExisting:Vu},{provide:Vu,useClass:Vu,deps:[Oi]},{provide:Sv,useClass:Sv,deps:[Jn]},{provide:ff,useClass:ff,deps:[df,Jn]},{provide:yT,useClass:jV,deps:[]}];let u8=(()=>{class n{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(t){return{ngModule:n,providers:[{provide:Fu,useValue:t.appId},{provide:bT,useExisting:Fu},WV]}}}return n.\u0275fac=function(t){return new(t||n)(Le(n,12))},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({providers:c8,imports:[OV,dB]}),n})();"undefined"!=typeof window&&window;let RT=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:function(t){let i=null;return i=t?new(t||n):Le(OT),i},providedIn:"root"}),n})(),OT=(()=>{class n extends RT{constructor(t){super(),this._doc=t}sanitize(t,i){if(null==i)return null;switch(t){case rn.NONE:return i;case rn.HTML:return ls(i,"HTML")?ur(i):tM(this._doc,String(i)).toString();case rn.STYLE:return ls(i,"Style")?ur(i):i;case rn.SCRIPT:if(ls(i,"Script"))return ur(i);throw new Error("unsafe value used in a script context");case rn.URL:return qw(i),ls(i,"URL")?ur(i):fu(String(i));case rn.RESOURCE_URL:if(ls(i,"ResourceURL"))return ur(i);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see https://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return function aF(n){return new nF(n)}(t)}bypassSecurityTrustStyle(t){return function lF(n){return new iF(n)}(t)}bypassSecurityTrustScript(t){return function cF(n){return new rF(n)}(t)}bypassSecurityTrustUrl(t){return function uF(n){return new sF(n)}(t)}bypassSecurityTrustResourceUrl(t){return function hF(n){return new oF(n)}(t)}}return n.\u0275fac=function(t){return new(t||n)(Le(Oi))},n.\u0275prov=Ze({token:n,factory:function(t){let i=null;return i=t?new t:function b8(n){return new OT(n.get(Oi))}(Le(fi)),i},providedIn:"root"}),n})();function at(...n){return ii(n,jc(n))}function Ll(n,e){return Pt(e)?Zn(n,e,1):Zn(n,1)}function bo(n,e){return ni((t,i)=>{let r=0;t.subscribe(Xn(i,s=>n.call(e,s,r++)&&i.next(s)))})}class LT{}class FT{}class bs{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?()=>{this.headers=new Map,e.split("\n").forEach(t=>{const i=t.indexOf(":");if(i>0){const r=t.slice(0,i),s=r.toLowerCase(),o=t.slice(i+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:()=>{this.headers=new Map,Object.keys(e).forEach(t=>{let i=e[t];const r=t.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(t,r))})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const 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 bs?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e
vendor: 4,233 bytes, line 1
1=>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){const t=new bs;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof bs?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(e.name,t);const r=("a"===e.op?this.headers.get(t):void 0)||[];r.push(...i),this.headers.set(t,r);break;case"d":const s=e.value;if(s){let o=this.headers.get(t);if(!o)return;o=o.filter(a=>-1===s.indexOf(a)),0===o.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}}class x8{encodeKey(e){return NT(e)}encodeValue(e){return NT(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}const M8=/%(\d[a-f0-9])/gi,C8={40:"@","3A":":",24:"$","2C":",","3B":";","2B":"+","3D":"=","3F":"?","2F":"/"};function NT(n){return encodeURIComponent(n).replace(M8,(e,t)=>{var i;return null!==(i=C8[t])&&void 0!==i?i:e})}function kT(n){return`${n}`}class xo{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new x8,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function w8(n,e){const t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const s=r.indexOf("="),[o,a]=-1==s?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,s)),e.decodeValue(r.slice(s+1))],l=t.get(o)||[];l.push(a),t.set(o,l)}),t}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{const i=e.fromObject[t];this.map.set(t,Array.isArray(i)?i:[i])})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const 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){const t=[];return Object.keys(e).forEach(i=>{const r=e[i];Array.isArray(r)?r.forEach(s=>{t.push({param:i,value:s,op:"a"})}):t.push({param:i,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=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const t=new xo({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(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":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(kT(e.value)),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let i=this.map.get(e.param)||[];const r=i.indexOf(kT(e.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}class S8{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}}function UT(n){return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer}function BT(n){return"undefined"!=typeof Blob&&n instanceof Blob}function VT(n){return"undefined"!=typeof FormData&&n instanceof FormData}class zu{constructor(e,t,i,r){let s;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function E8(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}
1(this.method)||r?(this.body=void 0!==i?i:null,s=r):s=i,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params)),this.headers||(this.headers=new bs),this.context||(this.context=new S8),this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=t;else{const a=t.indexOf("?");this.urlWithParams=t+(-1===a?"?":a<t.length-1?"&":"")+o}}else this.params=new xo,this.urlWithParams=t}serializeBody(){return null===this.body?null:UT(this.body)||BT(this.body)||VT(this.body)||function T8(n){return"undefined"!=typeof URLSearchParams&&n instanceof URLSearchParams}(this.body)||"string"==typeof this.body?this.body:this.body instanceof xo?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||VT(this.body)?null:BT(this.body)?this.body.type||null:UT(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof xo?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(e={}){var t;const i=e.method||this.method,r=e.url||this.url,s=e.responseType||this.responseType,o=void 0!==e.body?e.body:this.body,a=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,l=void 0!==e.reportProgress?e.reportProgress:this.reportProgress;let c=e.headers||this.headers,u=e.params||this.params;const h=null!==(t=e.context)&&void 0!==t?t:this.context;return void 0!==e.setHeaders&&(c=Object.keys(e.setHeaders).reduce((d,f)=>d.set(f,e.setHeaders[f]),c)),e.setParams&&(u=Object.keys(e.setParams).reduce((d,f)=>d.set(f,e.setParams[f]),u)),new zu(i,r,o,{params:u,headers:c,context:h,reportProgress:l,responseType:s,withCredentials:a})}}var Nn=(()=>((Nn=Nn||{})[Nn.Sent=0]="Sent",Nn[Nn.UploadProgress=1]="UploadProgress",Nn[Nn.ResponseHeader=2]="ResponseHeader",Nn[Nn.DownloadProgress=3]="DownloadProgress",Nn[Nn.Response=4]="Response",Nn[Nn.User=5]="User",Nn))();class iy{constructor(e,t=200,i="OK"){this.headers=e.headers||new bs,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class ry extends iy{constructor(e={}){super(e),this.type=Nn.ResponseHeader}clone(e={}){return new ry({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class mf extends iy{constructor(e={}){super(e),this.type=Nn.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new mf({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class zT extends iy{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${e.url||"(unknown url)"}`:`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function sy(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let oy=(()=>{class n{constructor(t){this.handler=t}request(t,i,r={}){let s;if(t instanceof zu)s=t;else{let l,c;l=r.headers instanceof bs?r.headers:new bs(r.headers),r.params&&(c=r.params instanceof xo?r.params:new xo({fromObject:r.params})),s=new zu(t,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const o=at(s).pipe(Ll(l=>this.handler.handle(l)));if(t instanceof zu||"events"===r.observe)return o;const a=o.pipe(bo(l=>l instanceof mf));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return a.pipe(Vt(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(Vt(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(Vt(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(Vt(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:(new xo).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,r={}){return this.request("PATCH",t,sy(r,i))}post(t,i,r={}){return this.request("POST",t,sy(r,i))}put(t,i,r={}){return this.request("PUT",t,sy(r,i))}}return n.\u0275fac=function(t){return new(t||n)(Le(LT))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();class HT{constructor(e,t){this.next=e,this.interceptor=t}handle(e){return this.interceptor.intercept(e,this.next)}}
vendor: 4,749 bytes, line 1
1const GT=new gt("HTTP_INTERCEPTORS");let A8=(()=>{class n{intercept(t,i){return i.handle(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();const D8=/^\)\]\}',?\n/;let WT=(()=>{class n{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Dn(i=>{const r=this.xhrFactory.build();if(r.open(t.method,t.urlWithParams),t.withCredentials&&(r.withCredentials=!0),t.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),t.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const f=t.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(t.responseType){const f=t.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const s=t.serializeBody();let o=null;const a=()=>{if(null!==o)return o;const f=r.statusText||"OK",p=new bs(r.getAllResponseHeaders()),_=function P8(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||t.url;return o=new ry({headers:p,status:r.status,statusText:f,url:_}),o},l=()=>{let{headers:f,status:p,statusText:_,url:g}=a(),m=null;204!==p&&(m=void 0===r.response?r.responseText:r.response),0===p&&(p=m?200:0);let v=p>=200&&p<300;if("json"===t.responseType&&"string"==typeof m){const y=m;m=m.replace(D8,"");try{m=""!==m?JSON.parse(m):null}catch(b){m=y,v&&(v=!1,m={error:b,text:m})}}v?(i.next(new mf({body:m,headers:f,status:p,statusText:_,url:g||void 0})),i.complete()):i.error(new zT({error:m,headers:f,status:p,statusText:_,url:g||void 0}))},c=f=>{const{url:p}=a(),_=new zT({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(_)};let u=!1;const h=f=>{u||(i.next(a()),u=!0);let p={type:Nn.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===t.responseType&&!!r.responseText&&(p.partialText=r.responseText),i.next(p)},d=f=>{let p={type:Nn.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),t.reportProgress&&(r.addEventListener("progress",h),null!==s&&r.upload&&r.upload.addEventListener("progress",d)),r.send(s),i.next({type:Nn.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),t.reportProgress&&(r.removeEventListener("progress",h),null!==s&&r.upload&&r.upload.removeEventListener("progress",d)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(t){return new(t||n)(Le(yT))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();const ay=new gt("XSRF_COOKIE_NAME"),ly=new gt("XSRF_HEADER_NAME");class jT{}let I8=(()=>{class n{constructor(t,i,r){this.doc=t,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=hT(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return n.\u0275fac=function(t){return new(t||n)(Le(Oi),Le(xv),Le(ay))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})(),cy=(()=>{class n{constructor(t,i){this.tokenService=t,this.headerName=i}intercept(t,i){const r=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||r.startsWith("http://")||r.startsWith("https://"))return i.handle(t);const s=this.tokenService.getToken();return null!==s&&!t.headers.has(this.headerName)&&(t=t.clone({headers:t.headers.set(this.headerName,s)})),i.handle(t)}}return n.\u0275fac=function(t){return new(t||n)(Le(jT),Le(ly))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})(),R8=(()=>{class n{constructor(t,i){this.backend=t,this.injector=i,this.chain=null}handle(t){if(null===this.chain){const i=this.injector.get(GT,[]);this.chain=i.reduceRight((r,s)=>new HT(r,s),this.backend)}return this.chain.handle(t)}}return n.\u0275fac=function(t){return new(t||n)(Le(FT),Le(fi))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})(),O8=(()=>{class n{static disable(){return{ngModule:n,providers:[{provide:cy,useClass:A8}]}}static withOptions(t={}){return{ngModule:n,providers:[t.cookieName?{provide:ay,useValue:t.cookieName}:[],t.headerName?{provide:ly,useValue:t.headerName}:[]]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({providers:[cy,{provide:GT,useExisting:cy,multi:!0},{provide:jT,useClass:I8},{provide:ay,useValue:"XSRF-TOKEN"},{provide:ly,useValue:"X-XSRF-TOKEN"}
1]}),n})(),L8=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({providers:[oy,{provide:LT,useClass:R8},WT,{provide:FT,useExisting:WT}],imports:[[O8.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),n})();const{isArray:F8}=Array,{getPrototypeOf:N8,prototype:k8,keys:U8}=Object;function $T(n){if(1===n.length){const e=n[0];if(F8(e))return{args:e,keys:null};if(function B8(n){return n&&"object"==typeof n&&N8(n)===k8}(e)){const t=U8(e);return{args:t.map(i=>e[i]),keys:t}}}return{args:n,keys:null}}const{isArray:V8}=Array;function qT(n){return Vt(e=>function z8(n,e){return V8(e)?n(...e):n(e)}(n,e))}function YT(n,e){return n.reduce((t,i,r)=>(t[i]=e[r],t),{})}function Hu(...n){const e=gx(n),{args:t,keys:i}=$T(n),r=new Dn(s=>{const{length:o}=t;if(!o)return void s.complete();const a=new Array(o);let l=o,c=o;for(let u=0;u<o;u++){let h=!1;Lr(t[u]).subscribe(Xn(s,d=>{h||(h=!0,c--),a[u]=d},()=>l--,void 0,()=>{(!l||!h)&&(c||s.next(i?YT(i,a):a),s.complete())}))}});return e?r.pipe(qT(e)):r}let XT=(()=>{class n{constructor(t,i){this._renderer=t,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}}return n.\u0275fac=function(t){return new(t||n)(Y(gs),Y(Wi))},n.\u0275dir=Ke({type:n}),n})(),ha=(()=>{class n extends XT{}return n.\u0275fac=function(){let e;return function(i){return(e||(e=hi(n)))(i||n)}}(),n.\u0275dir=Ke({type:n,features:[Wt]}),n})();const xs=new gt("NgValueAccessor"),H8={provide:xs,useExisting:tn(()=>uy),multi:!0};let uy=(()=>{class n extends ha{writeValue(t){this.setProperty("checked",t)}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=hi(n)))(i||n)}}(),n.\u0275dir=Ke({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,i){1&t&&Ge("change",function(s){return i.onChange(s.target.checked)})("blur",function(){return i.onTouched()})},features:[fn([H8]),Wt]}),n})();const G8={provide:xs,useExisting:tn(()=>gf),multi:!0},j8=new gt("CompositionEventMode");let gf=(()=>{class n extends XT{constructor(t,i,r){super(t,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function W8(){const n=_s()?_s().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(t){this.setProperty("value",null==t?"":t)}_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)}}return n.\u0275fac=function(t){return new(t||n)(Y(gs),Y(Wi),Y(j8,8))},n.\u0275dir=Ke({type:n,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(t,i){1&t&&Ge("input",function(s){return i._handleInput(s.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(s){return i._compositionEnd(s.target.value)})},features:[fn([G8]),Wt]}),n})();const mi=new gt("NgValidators"),Mo=new gt("NgAsyncValidators");function QT(n){return function wo(n){return null==n||0===n.length}(n.value)?{required:!0}:null}function _f(n){return null}function sA(n){return null!=n}function oA(n){const e=wu(n)?ii(n):n;return W_(e),e}function aA(n){let e={};return n.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function lA(n,e){return e.map(t=>t(n))}function cA(n){return n.map(e=>function q8(n){return!n.validate}(e)?e:t=>e.validate(t))}function hy(n){return null!=n?function uA(n){if(!n)return null;const e=n.filter(sA);return 0==e.length?null:function(t){return aA(lA(t,e))}}(cA(n)):null}function dy(n){return null!=n?function hA(n){if(!n)return null;const e=n.filter(sA);return 0==e.length?null:function(t){return Hu(lA(t,e).map(oA)).pipe(Vt(aA))}}(cA(n)):null}function dA(n,e){return null===n?[e]:Array.isArray(n)?[...n,e]:[n,e]}function fA(n){return n._rawValidators}function pA(n){return n._rawAsyncValidators}function fy(n){return n?Array.isArray(n)?n:[n]:[]}function vf(n,e){return Array.isArray(n)?n.includes(e):n===e}function mA(n,e){const t=fy(e);
1return fy(n).forEach(r=>{vf(t,r)||t.push(r)}),t}function gA(n,e){return fy(e).filter(t=>!vf(n,t))}class _A{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=hy(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=dy(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}}class Co extends _A{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class Li extends _A{get formDirective(){return null}get path(){return null}}class vA{constructor(e){this._cd=e}is(e){var t,i,r;return"submitted"===e?!!(null===(t=this._cd)||void 0===t?void 0:t.submitted):!!(null===(r=null===(i=this._cd)||void 0===i?void 0:i.control)||void 0===r?void 0:r[e])}}let py=(()=>{class n extends vA{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(Y(Co,2))},n.\u0275dir=Ke({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,i){2&t&&Nd("ng-untouched",i.is("untouched"))("ng-touched",i.is("touched"))("ng-pristine",i.is("pristine"))("ng-dirty",i.is("dirty"))("ng-valid",i.is("valid"))("ng-invalid",i.is("invalid"))("ng-pending",i.is("pending"))},features:[Wt]}),n})(),my=(()=>{class n extends vA{constructor(t){super(t)}}return n.\u0275fac=function(t){return new(t||n)(Y(Li,10))},n.\u0275dir=Ke({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,i){2&t&&Nd("ng-untouched",i.is("untouched"))("ng-touched",i.is("touched"))("ng-pristine",i.is("pristine"))("ng-dirty",i.is("dirty"))("ng-valid",i.is("valid"))("ng-invalid",i.is("invalid"))("ng-pending",i.is("pending"))("ng-submitted",i.is("submitted"))},features:[Wt]}),n})();function bf(n,e){return[...e.path,n]}function Gu(n,e){vy(n,e),e.valueAccessor.writeValue(n.value),function t6(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&bA(n,e)})}(n,e),function i6(n,e){const t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)}
1)}(n,e),function n6(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&bA(n,e),"submit"!==n.updateOn&&n.markAsTouched()})}(n,e),function e6(n,e){if(e.valueAccessor.setDisabledState){const t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}(n,e)}function xf(n,e,t=!0){const i=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(i),e.valueAccessor.registerOnTouched(i)),Mf(n,e),n&&(e._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function wf(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function vy(n,e){const t=fA(n);null!==e.validator?n.setValidators(dA(t,e.validator)):"function"==typeof t&&n.setValidators([t]);const i=pA(n);null!==e.asyncValidator?n.setAsyncValidators(dA(i,e.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();wf(e._rawValidators,r),wf(e._rawAsyncValidators,r)}function Mf(n,e){let t=!1;if(null!==n){if(null!==e.validator){const r=fA(n);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==e.validator);s.length!==r.length&&(t=!0,n.setValidators(s))}}if(null!==e.asyncValidator){const r=pA(n);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==e.asyncValidator);s.length!==r.length&&(t=!0,n.setAsyncValidators(s))}}}const i=()=>{};return wf(e._rawValidators,i),wf(e._rawAsyncValidators,i),t}function bA(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function xA(n,e){vy(n,e)}function yy(n,e){if(!n.hasOwnProperty("model"))return!1;const t=n.model;return!!t.isFirstChange()||!Object.is(e,t.currentValue)}function MA(n,e){n._syncPendingControls(),e.forEach(t=>{const i=t.control;"submit"===i.updateOn&&i._pendingChange&&(t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function by(n,e){if(!e)return null;let t,i,r;return Array.isArray(e),e.forEach(s=>{s.constructor===gf?t=s:function o6(n){return Object.getPrototypeOf(n.constructor)===ha}(s)?i=s:r=s}),r||i||t||null}function xy(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const Wu="VALID",Cf="INVALID",Fl="PENDING",ju="DISABLED";function My(n){return(Sf(n)?n.validators:n)||null}function CA(n){return Array.isArray(n)?hy(n):n||null}function Cy(n,e){return(Sf(e)?e.asyncValidators:n)||null}function SA(n){return Array.isArray(n)?dy(n):n||null}function Sf(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}const Sy=n=>n instanceof Ty,Ef=n=>n instanceof Tf,EA=n=>n instanceof PA;function TA(n){return Sy(n)?n.value:n.getRawValue()}function AA(n,e){const t=Ef(n),i=n.controls;if(!(t?Object.keys(i):i).length)throw new Ot(1e3,"");if(!i[e])throw new Ot(1001,"")}function DA(n,e){Ef(n),n._forEachChild((i,r)=>{if(void 0===e[r])throw new Ot(1002,"")})}class Ey{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=t,this._composedValidatorFn=CA(this._rawValidators),this._composedAsyncValidatorFn=SA(this._rawAsyncValidators)}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 valid(){return this.status===Wu}get invalid(){return this.status===Cf}get pending(){return this.status==Fl}get disabled(){return this.status===ju}get enabled(){return this.status!==ju}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._rawValidators=e,this._composedValidatorFn=CA(e)}setAsyncValidators(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=SA(e)}addValidators(e){this.setValidators(mA(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(mA(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(gA(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(gA(e,this._rawAsyncValidators))}hasValidator(e){return vf(this._rawValidators,e)}hasAsyncValidator(e){return vf(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}
1),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=Fl,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=ju,this.errors=null,this._forEachChild(i=>{i.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(i=>i(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=Wu,this._forEachChild(i=>{i.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Wu||this.status===Fl)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ju:Wu}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=Fl,this._hasOwnPendingAsyncValidator=!0;const t=oA(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){return function a6(n,e,t){if(null==e||(Array.isArray(e)||(e=e.split(t)),Array.isArray(e)&&0===e.length))return null;let i=n;return e.forEach(r=>{i=Ef(i)?i.controls.hasOwnProperty(r)?i.controls[r]:null:EA(i)&&i.at(r)||null}),i}(this,e,".")}getError(e,t){const i=t?this.get(t):this;return i&&i.errors?i.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){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new sn,this.statusChanges=new sn}_calculateStatus(){return this._allControlsDisabled()?ju:this.errors?Cf:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Fl)?Fl:this._anyControlsHaveStatus(Cf)?Cf:Wu}_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={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_isBoxedValue(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Sf(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}
1class Ty extends Ey{constructor(e=null,t,i){super(My(t),Cy(i,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Sf(t)&&t.initialValueIsDefault&&(this.defaultValue=this._isBoxedValue(e)?e.value:e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){xy(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){xy(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){this._isBoxedValue(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}}class Tf extends Ey{constructor(e,t,i){super(My(t),Cy(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,i={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){DA(this,e),Object.keys(e).forEach(i=>{AA(this,i),this.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(Object.keys(e).forEach(i=>{this.controls[i]&&this.controls[i].patchValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,i)=>(e[i]=TA(t),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,i)=>!!i._syncPendingControls()||t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{const i=this.controls[t];i&&e(i,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const t of Object.keys(this.controls)){const i=this.controls[t];if(this.contains(t)&&e(i))return!0}return!1}_reduceValue(){return this._reduceChildren({},(e,t,i)=>((t.enabled||this.disabled)&&(e[i]=t.value),e))}_reduceChildren(e,t){let i=e;return this._forEachChild((r,s)=>{i=t(i,r,s)}),i}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}}class PA extends Ey{constructor(e,t,i){super(My(t),Cy(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControl
1s(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[e]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,i={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){DA(this,e),e.forEach((i,r)=>{AA(this,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(e.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>TA(e))}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_syncPendingControls(){let e=this.controls.reduce((t,i)=>!!i._syncPendingControls()||t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,i)=>{e(t,i)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}}const l6={provide:Li,useExisting:tn(()=>Af)},$u=(()=>Promise.resolve(null))();let Af=(()=>{class n extends Li{constructor(t,i){super(),this.submitted=!1,this._directives=new Set,this.ngSubmit=new sn,this.form=new Tf({},hy(t),dy(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){$u.then(()=>{const i=this._findContainer(t.path);t.control=i.registerControl(t.name,t.control),Gu(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}
1removeControl(t){$u.then(()=>{const i=this._findContainer(t.path);i&&i.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){$u.then(()=>{const i=this._findContainer(t.path),r=new Tf({});xA(r,t),i.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){$u.then(()=>{const i=this._findContainer(t.path);i&&i.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,i){$u.then(()=>{this.form.get(t.path).setValue(i)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,MA(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return n.\u0275fac=function(t){return new(t||n)(Y(mi,10),Y(Mo,10))},n.\u0275dir=Ke({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,i){1&t&&Ge("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[fn([l6]),Wt]}),n})();const u6={provide:Co,useExisting:tn(()=>Ay)},OA=(()=>Promise.resolve(null))();let Ay=(()=>{class n extends Co{constructor(t,i,r,s,o){super(),this._changeDetectorRef=o,this.control=new Ty,this._registered=!1,this.update=new sn,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=by(0,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),yy(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&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&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Gu(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){OA.then(()=>{var i;this.control.setValue(t,{emitViewToModelChange:!1}),null===(i=this._changeDetectorRef)||void 0===i||i.markForCheck()})}_updateDisabled(t){const i=t.isDisabled.currentValue,r=""===i||i&&"false"!==i;OA.then(()=>{var s;r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),null===(s=this._changeDetectorRef)||void 0===s||s.markForCheck()})}_getPath(t){return this._parent?bf(t,this._parent):[t]}}return n.\u0275fac=function(t){return new(t||n)(Y(Li,9),Y(mi,10),Y(Mo,10),Y(xs,10),Y(Zd,8))},n.\u0275dir=Ke({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[fn([u6]),Wt,wr]}),n})(),Dy=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ke({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})(),FA=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({}),n})();const Py=new gt("NgModelWithFormControlWarning"),g6={provide:Li,useExisting:tn(()=>Df)};let Df=(()=>{class n extends Li{constructor(t,i){super(),this.validators=t,this.asyncValidators=i,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new sn,this._setValidators(t),this._setAsyncValidators(i)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateV
1alidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Mf(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const i=this.form.get(t.path);return Gu(i,t),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),i}getControl(t){return this.form.get(t.path)}removeControl(t){xf(t.control||null,t,!1),xy(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,i){this.form.get(t.path).setValue(i)}onSubmit(t){return this.submitted=!0,MA(this.form,this.directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const i=t.control,r=this.form.get(t.path);i!==r&&(xf(i||null,t),Sy(r)&&(Gu(r,t),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const i=this.form.get(t.path);xA(i,t),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const i=this.form.get(t.path);i&&function r6(n,e){return Mf(n,e)}(i,t)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){vy(this.form,this),this._oldForm&&Mf(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(t){return new(t||n)(Y(mi,10),Y(Mo,10))},n.\u0275dir=Ke({type:n,selectors:[["","formGroup",""]],hostBindings:function(t,i){1&t&&Ge("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[fn([g6]),Wt,wr]}),n})();const y6={provide:Co,useExisting:tn(()=>Oy)};let Oy=(()=>{class n extends Co{constructor(t,i,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.update=new sn,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=by(0,s)}set isDisabled(t){}ngOnChanges(t){this._added||this._setUpControl(),yy(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return bf(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(t){return new(t||n)(Y(Li,13),Y(mi,10),Y(Mo,10),Y(xs,10),Y(Py,8))},n.\u0275dir=Ke({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[fn([y6]),Wt,wr]}),n})();const b6={provide:xs,useExisting:tn(()=>qu),multi:!0};function VA(n,e){return null==n?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${n}: ${e}`.slice(0,50))}let qu=(()=>{class n extends ha{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const r=VA(this._getOptionId(t),t);this.setProperty("value",r)}registerOnChange(t){this.onChange=i=>{this.value=this._getOptionValue(i),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),t))return i;return null}_getOptionValue(t){const i=function x6(n){return n.split(":")[0]}(t);return this._optionMap.has(i)?this._optionMap.get(i):t}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=hi(n)))(i||n)}}(),n.\u0275dir=Ke({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,i){1&t&&Ge("change",function(s){return i.onChange(s.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[fn([b6]),Wt]}),n})(),Ly=(()=>{class n{constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(VA(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id
1),this._select.writeValue(this._select.value))}}return n.\u0275fac=function(t){return new(t||n)(Y(Wi),Y(gs),Y(qu,9))},n.\u0275dir=Ke({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),n})();const w6={provide:xs,useExisting:tn(()=>Fy),multi:!0};function zA(n,e){return null==n?`${e}`:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${n}: ${e}`.slice(0,50))}let Fy=(()=>{class n extends ha{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let i;if(this.value=t,Array.isArray(t)){const r=t.map(s=>this._getOptionId(s));i=(s,o)=>{s._setSelected(r.indexOf(o.toString())>-1)}}else i=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(t){this.onChange=i=>{const r=[],s=i.selectedOptions;if(void 0!==s){const o=s;for(let a=0;a<o.length;a++){const c=this._getOptionValue(o[a].value);r.push(c)}}else{const o=i.options;for(let a=0;a<o.length;a++){const l=o[a];if(l.selected){const c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,t(r)}}_registerOption(t){const i=(this._idCounter++).toString();return this._optionMap.set(i,t),i}_getOptionId(t){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i)._value,t))return i;return null}_getOptionValue(t){const i=function M6(n){return n.split(":")[0]}(t);return this._optionMap.has(i)?this._optionMap.get(i)._value:t}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=hi(n)))(i||n)}}(),n.\u0275dir=Ke({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,i){1&t&&Ge("change",function(s){return i.onChange(s.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[fn([w6]),Wt]}),n})(),Ny=(()=>{class n{constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(zA(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(zA(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))}}return n.\u0275fac=function(t){return new(t||n)(Y(Wi),Y(gs),Y(Fy,9))},n.\u0275dir=Ke({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),n})(),da=(()=>{class n{constructor(){this._validator=_f}ngOnChanges(t){if(this.inputName in t){const i=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):_f,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275dir=Ke({type:n,features:[wr]}),n})();const T6={provide:mi,useExisting:tn(()=>Pf),multi:!0};let Pf=(()=>{class n extends da{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=t=>function C6(n){return null!=n&&!1!==n&&"false"!=`${n}`}(t),this.createValidator=t=>QT}enabled(t){return t}}return n.\u0275fac=function(){let e;return function(i){return(e||(e=hi(n)))(i||n)}}(),n.\u0275dir=Ke({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,i){2&t&&Gi("required",i._enabled?"":null)},inputs:{required:"required"},features:[fn([T6]),Wt]}),n})(),KA=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({imports:[[FA]]}),n})(),O6=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({imports:[KA]}),n})(),JA=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Py,useValue:t.warnOnNgModelWithFormControl}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({imports:[KA]}),n})(),F6=(()=>{class n{group(t,i=null){const r=this._reduceControls(t);let a,s=null,o=null;return null!=i&&(function L6(n){return void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn}(i)?(s=null!=i.validators?i.validators:null,o=null!=i.asyncValidators?i.asyncValidators:null,a=null!=i.updateOn?i.updateOn:void 0):(s=null!=i.validator?i.validator:null,o=null!=i.asyncValidator?i.asyncValidator:null)),new Tf(r,{asyncValidators:o,updateOn:a,validators:s})}control(t,i,r){return new Ty(t,i,r)}array(t,i,r){const s=t.map(o=>this._createControl(o));return new PA(s,i,r)}_reduceControls(t){const i={};return Object.keys(t).forEach(r=>{i[r]=this._createControl(t[r])}),i}_createControl(t){return Sy(t)||Ef(t)||EA(t)?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:n.\u0275fac,providedIn:JA}),n})();class Ar extends is{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){const{hasError:e,thrownError:t,_value:i}=this;if(e)throw t;return this._throwIfClosed(),i}next(e){super.next(this._value=e)}}function QA(n,e,t){n?Ps(t,n,e):e()}function If(n,e){const t=Pt(n)?n:()=>n,i=r=>r.error(t());return new Dn(e?r=>e.schedule(i,0,r):i)}const Rf=Yn(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function ky(...n){return function U6(){return Wc(1)}()(ii(n,jc(n)))}function eD(n){return new Dn(e=>{Lr(n()).subscribe(e)})}function tD(){return ni((n,e)=>{let t=null;n._refCount++;const i=Xn(e,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount)return void(t=null);const r=n._connection,s=t;t=null,r&&(!s||r===s)&&r.unsubscribe(),e.unsubscribe()});n.subscribe(i),i.closed||(t=n.connect())})}class B6 extends Dn{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,tx(e)&&(this.lift=e.lift)}
1_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:e}=this;this._subject=this._connection=null,null==e||e.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new Bt;const t=this.getSubject();e.add(this.source.subscribe(Xn(t,void 0,()=>{this._teardown(),t.complete()},i=>{this._teardown(),t.error(i)},()=>this._teardown()))),e.closed&&(this._connection=null,e=Bt.EMPTY)}return e}refCount(){return tD()(this)}}function Sn(n,e){return ni((t,i)=>{let r=null,s=0,o=!1;const a=()=>o&&!r&&i.complete();t.subscribe(Xn(i,l=>{null==r||r.unsubscribe();let c=0;const u=s++;Lr(n(l,u)).subscribe(r=Xn(i,h=>i.next(e?e(l,h,u,c++):h),()=>{r=null,a()}))},()=>{o=!0,a()}))})}function Uy(n){return n<=0?()=>Is:ni((e,t)=>{let i=0;e.subscribe(Xn(t,r=>{++i<=n&&(t.next(r),n<=i&&t.complete())}))})}function z6(n,e,t,i,r){return(s,o)=>{let a=t,l=e,c=0;s.subscribe(Xn(o,u=>{const h=c++;l=a?n(l,u,h):(a=!0,u),i&&o.next(l)},r&&(()=>{a&&o.next(l),o.complete()})))}}function nD(n,e){return ni(z6(n,e,arguments.length>=2,!0))}function So(n){return ni((e,t)=>{let s,i=null,r=!1;i=e.subscribe(Xn(t,void 0,void 0,o=>{s=Lr(n(o,So(n)(e))),i?(i.unsubscribe(),i=null,s.subscribe(t)):r=!0})),r&&(i.unsubscribe(),i=null,s.subscribe(t))})}function By(n){return n<=0?()=>Is:ni((e,t)=>{let i=[];e.subscribe(Xn(t,r=>{i.push(r),n<i.length&&i.shift()},()=>{for(const r of i)t.next(r);t.complete()},void 0,()=>{i=null}))})}function iD(n=H6){return ni((e,t)=>{let i=!1;e.subscribe(Xn(t,r=>{i=!0,t.next(r)},()=>i?t.complete():t.error(n())))})}function H6(){return new Rf}function rD(n){return ni((e,t)=>{let i=!1;e.subscribe(Xn(t,r=>{i=!0,t.next(r)},()=>{i||t.next(n),t.complete()}))})}function Nl(n,e){const t=arguments.length>=2;return i=>i.pipe(n?bo((r,s)=>n(r,s,i)):Xo,Uy(1),t?rD(e):iD(()=>new Rf))}function $i(n,e,t){const i=Pt(n)||e||t?{next:n,error:e,complete:t}:n;return i?ni((r,s)=>{var o;null===(o=i.subscribe)||void 0===o||o.call(i);let a=!0;r.subscribe(Xn(s,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),s.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),s.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),s.error(l)},()=>{var l,c;a&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(c=i.finalize)||void 0===c||c.call(i)}))}):Xo}class Hs{constructor(e,t){this.id=e,this.url=t}}class Vy extends Hs{constructor(e,t,i="imperative",r=null){super(e,t),this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class kl extends Hs{constructor(e,t,i){super(e,t),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class sD extends Hs{constructor(e,t,i){super(e,t),this.reason=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class j6 extends Hs{constructor(e,t,i){super(e,t),this.error=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class $6 extends Hs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class q6 extends Hs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Y6 extends Hs{constructor(e,t,i,r,s){super(e,t),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=s}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class X6 extends Hs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Z6 extends Hs{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class oD{constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class aD{constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class K6{constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class J6{constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Q6{constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ez{constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class lD{constructor(e,t,i){this.routerEvent=e,this.position=t,this.anchor=i}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const Et="primary";class tz{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function Ul(n){return new tz(n)}const cD="ngNavigationCancelingError";function zy(n){const e=Error("NavigationCancelingError: "+n);return e[cD]=!0,e}function iz(n,e,t){const i=t.path.split("/");if(i.length>n.length||"full"===t.pathMatch&&(e.hasChildren()||i.length<n.length))return null;const r={};for(let s=0;s<i.length;s++){const o=i[s],a=n[s];if(o.startsWith(":"))r[o.substring(1)]=a;else if(o!==a.path)return null}return{consumed:n.slice(0,i.length),posParams:r}}function ws(n,e){const t=n?Object.keys(n):void 0,i=e?Object.keys(e):void 0;if(!t||!i||t.length!=i.length)return!1;let r;for(let s=0;s<t.length;s++)if(r=t[s],!uD(n[r],e[r]))return!1;return!0}function uD(n,e){if(Array.isArray(n)&&Array.isArray(e)){if(n.length!==e.length)return!1;const t=[...n].sort(),i=[...e].sort();return t.every((r,s)=>i[s]===r)}return n===e}function hD(n){return Array.prototype.concat.apply([],n)}function dD(n){return n.length>0?n[n.length-1]:null}function oi(n,e){for(const t in n)n.hasOwnProperty(t)&&e(n[t],t)}function Ms(n){return W_(n)?n:wu(n)?ii(Promise.resolve(n)):at(n)}const oz={exact:function mD(n,e,t){if(!pa(n.segments,e.segments)||!Of(n.segments,e.segments,t)||n.numberOfChildren!==e.numberOfChildren)return!1;for(const i in e.children)if(!n.children[i]||!mD(n.children[i],e.children[i],t))return!1;return!0},subset:gD},fD={exact:function az(n,e){return ws(n,e)},subset:function lz(n,e){return Object.keys(e).length<=Object.keys(n).length&&Object.keys(e).every(t=>uD(n[t],e[t]))},ignored:()=>!0};function pD(n,e,t){return oz[t.paths](n.root,e.root,t.matrixParams)&&fD[t.queryParams](n.queryParams,e.queryParams)&&!("exact"===t.fragment&&n.fragment!==e.fragment)}function gD(n,e,t){return _D(n,e,e.segments,t)}function _D(n,e,t,i){if(n.segments.length>t.length){const r=n.segments.slice(0,t.length);
1return!(!pa(r,t)||e.hasChildren()||!Of(r,t,i))}if(n.segments.length===t.length){if(!pa(n.segments,t)||!Of(n.segments,t,i))return!1;for(const r in e.children)if(!n.children[r]||!gD(n.children[r],e.children[r],i))return!1;return!0}{const r=t.slice(0,n.segments.length),s=t.slice(n.segments.length);return!!(pa(n.segments,r)&&Of(n.segments,r,i)&&n.children[Et])&&_D(n.children[Et],e,s,i)}}function Of(n,e,t){return e.every((i,r)=>fD[t](n[r].parameters,i.parameters))}class fa{constructor(e,t,i){this.root=e,this.queryParams=t,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Ul(this.queryParams)),this._queryParamMap}toString(){return hz.serialize(this)}}class It{constructor(e,t){this.segments=e,this.children=t,this.parent=null,oi(t,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Lf(this)}}class Yu{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=Ul(this.parameters)),this._parameterMap}toString(){return wD(this)}}function pa(n,e){return n.length===e.length&&n.every((t,i)=>t.path===e[i].path)}class vD{}class yD{parse(e){const t=new bz(e);return new fa(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){const t=`/${Xu(e.root,!0)}`,i=function pz(n){const e=Object.keys(n).map(t=>{const i=n[t];return Array.isArray(i)?i.map(r=>`${Ff(t)}=${Ff(r)}`).join("&"):`${Ff(t)}=${Ff(i)}`}).filter(t=>!!t);return e.length?`?${e.join("&")}`:""}(e.queryParams);return`${t}${i}${"string"==typeof e.fragment?`#${function dz(n){return encodeURI(n)}(e.fragment)}`:""}`}}const hz=new yD;function Lf(n){return n.segments.map(e=>wD(e)).join("/")}function Xu(n,e){if(!n.hasChildren())return Lf(n);if(e){const t=n.children[Et]?Xu(n.children[Et],!1):"",i=[];return oi(n.children,(r,s)=>{s!==Et&&i.push(`${s}:${Xu(r,!1)}`)}),i.length>0?`${t}(${i.join("//")})`:t}{const t=function uz(n,e){let t=[];return oi(n.children,(i,r)=>{r===Et&&(t=t.concat(e(i,r)))}),oi(n.children,(i,r)=>{r!==Et&&(t=t.concat(e(i,r)))}),t}(n,(i,r)=>r===Et?[Xu(n.children[Et],!1)]:[`${r}:${Xu(i,!1)}`]);return 1===Object.keys(n.children).length&&null!=n.children[Et]?`${Lf(n)}/${t[0]}`:`${Lf(n)}/(${t.join("//")})`}}function bD(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Ff(n){return bD(n).replace(/%3B/gi,";")}function Hy(n){return bD(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Nf(n){return decodeURIComponent(n)}function xD(n){return Nf(n.replace(/\+/g,"%20"))}function wD(n){return`${Hy(n.path)}${function fz(n){return Object.keys(n).map(e=>`;${Hy(e)}=${Hy(n[e])}`).join("")}(n.parameters)}`}const mz=/^[^\/()?;=#]+/;function kf(n){const e=n.match(mz);return e?e[0]:""}const gz=/^[^=?&#]+/,vz=/^[^&#]+/;class bz{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new It([],{}):new It([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(i[Et]=new It(e,t)),i}parseSegment(){const e=kf(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(e),new Yu(Nf(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=kf(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){const r=kf(this.remaining);r&&(i=r,this.capture(i))}e[Nf(t)]=Nf(i)}parseQueryParam(e){const t=function _z(n){const e=n.match(gz);return e?e[0]:""}(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){const o=function yz(n){const e=n.match(vz);return e?e[0]:""}(this.remaining);o&&(i=o,this.capture(i))}const r=xD(t),s=xD(i);if(e.hasOwnProperty(r)){let o=e[r];Array.isArray(o)||(o=[o],e[r]=o),o.push(s)}else e[r]=s}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=kf(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error(`Cannot parse url '${this.url}'`);let s;i.indexOf(":")>-1?(s=i.substr(0,i.indexOf(":")),this.capture(s),this.capture(":")):e&&(s=Et);const o=this.parseChildren();t[s]=1===Object.keys(o).length?o[Et]:new It([],o),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new Error(`Expected "${e}".`)}}class MD{constructor(e){this._root=e}get root(){return this._root.value}
1parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=Gy(e,this._root);return t?t.children.map(i=>i.value):[]}firstChild(e){const t=Gy(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=Wy(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return Wy(e,this._root).map(t=>t.value)}}function Gy(n,e){if(n===e.value)return e;for(const t of e.children){const i=Gy(n,t);if(i)return i}return null}function Wy(n,e){if(n===e.value)return[e];for(const t of e.children){const i=Wy(n,t);if(i.length)return i.unshift(e),i}return[]}class Gs{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function Bl(n){const e={};return n&&n.children.forEach(t=>e[t.value.outlet]=t),e}class CD extends MD{constructor(e,t){super(e),this.snapshot=t,jy(this,e)}toString(){return this.snapshot.toString()}}function SD(n,e){const t=function xz(n,e){const o=new Uf([],{},{},"",{},Et,e,null,n.root,-1,{});return new TD("",new Gs(o,[]))}(n,e),i=new Ar([new Yu("",{})]),r=new Ar({}),s=new Ar({}),o=new Ar({}),a=new Ar(""),l=new ma(i,r,o,a,s,Et,e,t.root);return l.snapshot=t.root,new CD(new Gs(l,[]),t)}class ma{constructor(e,t,i,r,s,o,a,l){this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(Vt(e=>Ul(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Vt(e=>Ul(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function ED(n,e="emptyOnly"){const t=n.pathFromRoot;let i=0;if("always"!==e)for(i=t.length-1;i>=1;){const r=t[i],s=t[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(s.component)break;i--}}return function wz(n){return n.reduce((e,t)=>({params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}),{params:{},data:{},resolve:{}})}(t.slice(i))}class Uf{constructor(e,t,i,r,s,o,a,l,c,u,h){this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=h}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Ul(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Ul(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class TD extends MD{constructor(e,t){super(t),this.url=e,jy(this,t)}toString(){return AD(this._root)}}function jy(n,e){e.value._routerState=n,e.children.forEach(t=>jy(n,t))}function AD(n){const e=n.children.length>0?` { ${n.children.map(AD).join(", ")} } `:"";return`${n.value}${e}`}function $y(n){if(n.snapshot){const e=n.snapshot,t=n._futureSnapshot;n.snapshot=t,ws(e.queryParams,t.queryParams)||n.queryParams.next(t.queryParams),e.fragment!==t.fragment&&n.fragment.next(t.fragment),ws(e.params,t.params)||n.params.next(t.params),function rz(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;++t)if(!ws(n[t],e[t]))return!1;return!0}(e.url,t.url)||n.url.next(t.url),ws(e.data,t.data)||n.data.next(t.data)}else n.snapshot=n._futureSnapshot,n.data.next(n._futureSnapshot.data)}function qy(n,e){const t=ws(n.params,e.params)&&function cz(n,e){return pa(n,e)&&n.every((t,i)=>ws(t.parameters,e[i].parameters))}(n.url,e.url);return t&&!(!n.parent!=!e.parent)&&(!n.parent||qy(n.parent,e.parent))}function Zu(n,e,t){if(t&&n.shouldReuseRoute(e.value,t.value.snapshot)){const i=t.value;i._futureSnapshot=e.value;const r=function Cz(n,e,t){return e.children.map(i=>{for(const r of t.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Zu(n,i,r);return Zu(n,i)})}(n,e,t);return new Gs(i,r)}{if(n.shouldAttach(e.value)){const s=n.retrieve(e.value);if(null!==s){const o=s.route;return o.value._futureSnapshot=e.value,o.children=e.children.map(a=>Zu(n,a)),o}}const i=function Sz(n){return new ma(new Ar(n.url),new Ar(n.params),new Ar(n.queryParams),new Ar(n.fragment),new Ar(n.data),n.outlet,n.component,n)}(e.value),r=e.children.map(s=>Zu(n,s));return new Gs(i,r)}}function Bf(n){return"object"==typeof n&&null!=n&&!n.outlets&&!n.segmentPath}function Ku(n){return"object"==typeof n&&null!=n&&n.outlets}function Yy(n,e,t,i,r){let s={};
1if(i&&oi(i,(a,l)=>{s[l]=Array.isArray(a)?a.map(c=>`${c}`):`${a}`}),n===e)return new fa(t,s,r);const o=DD(n,e,t);return new fa(o,s,r)}function DD(n,e,t){const i={};return oi(n.children,(r,s)=>{i[s]=r===e?t:DD(r,e,t)}),new It(n.segments,i)}class PD{constructor(e,t,i){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=i,e&&i.length>0&&Bf(i[0]))throw new Error("Root segment cannot have matrix parameters");const r=i.find(Ku);if(r&&r!==dD(i))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Xy{constructor(e,t,i){this.segmentGroup=e,this.processChildren=t,this.index=i}}function ID(n,e,t){if(n||(n=new It([],{})),0===n.segments.length&&n.hasChildren())return Vf(n,e,t);const i=function Iz(n,e,t){let i=0,r=e;const s={match:!1,pathIndex:0,commandIndex:0};for(;r<n.segments.length;){if(i>=t.length)return s;const o=n.segments[r],a=t[i];if(Ku(a))break;const l=`${a}`,c=i<t.length-1?t[i+1]:null;if(r>0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!OD(l,c,o))return s;i+=2}else{if(!OD(l,{},o))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(n,e,t),r=t.slice(i.commandIndex);if(i.match&&i.pathIndex<n.segments.length){const s=new It(n.segments.slice(0,i.pathIndex),{});return s.children[Et]=new It(n.segments.slice(i.pathIndex),n.children),Vf(s,0,r)}return i.match&&0===r.length?new It(n.segments,{}):i.match&&!n.hasChildren()?Zy(n,e,t):i.match?Vf(n,0,r):Zy(n,e,t)}function Vf(n,e,t){if(0===t.length)return new It(n.segments,{});{const i=function Pz(n){return Ku(n[0])?n[0].outlets:{[Et]:n}}(t),r={};return oi(i,(s,o)=>{"string"==typeof s&&(s=[s]),null!==s&&(r[o]=ID(n.children[o],e,s))}),oi(n.children,(s,o)=>{void 0===i[o]&&(r[o]=s)}),new It(n.segments,r)}}function Zy(n,e,t){const i=n.segments.slice(0,e);let r=0;for(;r<t.length;){const s=t[r];if(Ku(s)){const l=Rz(s.outlets);return new It(i,l)}if(0===r&&Bf(t[0])){i.push(new Yu(n.segments[e].path,RD(t[0]))),r++;continue}const o=Ku(s)?s.outlets[Et]:`${s}`,a=r<t.length-1?t[r+1]:null;o&&a&&Bf(a)?(i.push(new Yu(o,RD(a))),r+=2):(i.push(new Yu(o,{})),r++)}return new It(i,{})}function Rz(n){const e={};return oi(n,(t,i)=>{"string"==typeof t&&(t=[t]),null!==t&&(e[i]=Zy(new It([],{}),0,t))}),e}function RD(n){const e={};return oi(n,(t,i)=>e[i]=`${t}`),e}function OD(n,e,t){return n==t.path&&ws(e,t.parameters)}class Lz{constructor(e,t,i,r){this.routeReuseStrategy=e,this.futureState=t,this.currState=i,this.forwardEvent=r}activate(e){const t=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,i,e),$y(this.futureState.root),this.activateChildRoutes(t,i,e)}deactivateChildRoutes(e,t,i){const r=Bl(t);e.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],i),delete r[o]}),oi(r,(s,o)=>{this.deactivateRouteAndItsChildren(s,i)})}deactivateRoutes(e,t,i){const r=e.value,s=t?t.value:null;if(r===s)if(r.component){const o=i.getContext(r.outlet);o&&this.deactivateChildRoutes(e,t,o.children)}else this.deactivateChildRoutes(e,t,i);else s&&this.deactivateRouteAndItsChildren(t,i)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,s=Bl(e);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);if(i&&i.outlet){const o=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:o,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){const i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,s=Bl(e);for(const o of Object.keys(s))this.deactivateRouteAndItsChildren(s[o],r);i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(e,t,i){const r=Bl(t);e.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],i),this.forwardEvent(new ez(s.value.snapshot))}),e.children.length&&this.forwardEvent(new J6(e.value.snapshot))}activateRoutes(e,t,i){const r=e.value,s=t?t.value:null;if($y(r),r===s)if(r.component){const o=i.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,o.children)}else this.activateChildRoutes(e,t,i);else if(r.component){const o=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),$y(a.route.value),this.activateChildRoutes(e,null,o.children)}else{const a=function Fz(n){for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(r.snapshot),l=a?a.module.componentFactoryResolver:null;o.attachRef=null,o.route=r,o.resolver=l,o.outlet&&o.outlet.activateWith(r,l),this.activateChildRoutes(e,null,o.children)}}else this.activateChildRoutes(e,null,i)}}class Ky{constructor(e,t){this.routes=e,this.module=t}}function Eo(n){return"function"==typeof n}function ga(n){return n instanceof fa}const Ju=Symbol("INITIAL_VALUE");function Qu(){return Sn(n=>function N6(...n){const e=jc(n),t=gx(n),{args:i,keys:r}=$T(n);if(0===i.length)return ii([],e);const s=new Dn(function k6(n,e,t=Xo){return i=>{QA(e,()=>{const{length:r}=n,s=new Array(r);let o=r,a=r;for(let l=0;l<r;l++)QA(e,()=>{const c=ii(n[l],e);let u=!1;c.subscribe(Xn(i,h=>{s[l]=h,u||(u=!0,a--),a||i.next(t(s.slice()))},()=>{--o||i.complete()}
1))},i)},i)}}(i,e,r?o=>YT(r,o):Xo));return t?s.pipe(qT(t)):s}(n.map(e=>e.pipe(Uy(1),function V6(...n){const e=jc(n);return ni((t,i)=>{(e?ky(n,t,e):ky(n,t)).subscribe(i)})}(Ju)))).pipe(nD((e,t)=>{let i=!1;return t.reduce((r,s,o)=>r!==Ju?r:(s===Ju&&(i=!0),i||!1!==s&&o!==t.length-1&&!ga(s)?r:s),e)},Ju),bo(e=>e!==Ju),Vt(e=>ga(e)?e:!0===e),Uy(1)))}class zz{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new eh,this.attachRef=null}}class eh{constructor(){this.contexts=new Map}onChildOutletCreated(e,t){const i=this.getOrCreateContext(e);i.outlet=t,this.contexts.set(e,i)}onChildOutletDestroyed(e){const t=this.getContext(e);t&&(t.outlet=null,t.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let t=this.getContext(e);return t||(t=new zz,this.contexts.set(e,t)),t}getContext(e){return this.contexts.get(e)||null}}let Jy=(()=>{class n{constructor(t,i,r,s,o){this.parentContexts=t,this.location=i,this.resolver=r,this.changeDetector=o,this.activated=null,this._activatedRoute=null,this.activateEvents=new sn,this.deactivateEvents=new sn,this.attachEvents=new sn,this.detachEvents=new sn,this.name=s||Et,t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,i){this.activated=t,this._activatedRoute=i,this.location.insert(t.hostView),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,i){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const o=(i=i||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),a=this.parentContexts.getOrCreateContext(this.name).children,l=new Hz(t,a,this.location.injector);this.activated=this.location.createComponent(o,this.location.length,l),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return n.\u0275fac=function(t){return new(t||n)(Y(eh),Y(jr),Y(Au),tu("name"),Y(Zd))},n.\u0275dir=Ke({type:n,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"]}),n})();class Hz{constructor(e,t,i){this.route=e,this.childContexts=t,this.parent=i}get(e,t){return e===ma?this.route:e===eh?this.childContexts:this.parent.get(e,t)}}let LD=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,i){1&t&&ge(0,"router-outlet")},directives:[Jy],encapsulation:2}),n})();function FD(n,e=""){for(let t=0;t<n.length;t++){const i=n[t];Gz(i,Wz(e,i))}}function Gz(n,e){n.children&&FD(n.children,e)}function Wz(n,e){return e?n||e.path?n&&!e.path?`${n}/`:!n&&e.path?e.path:`${n}/${e.path}`:"":n}function Qy(n){const e=n.children&&n.children.map(Qy),t=e?Object.assign(Object.assign({},n),{children:e}):Object.assign({},n);return!t.component&&(e||t.loadChildren)&&t.outlet&&t.outlet!==Et&&(t.component=LD),t}function Dr(n){return n.outlet||Et}function ND(n,e){const t=n.filter(i=>Dr(i)===e);return t.push(...n.filter(i=>Dr(i)!==e)),t}const kD={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function zf(n,e,t){var i;if(""===e.path)return"full"===e.pathMatch&&(n.hasChildren()||t.length>0)?Object.assign({},kD):{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};const s=(e.matcher||iz)(t,n,e);if(!s)return Object.assign({},kD);const o={};oi(s.posParams,(l,c)=>{o[c]=l.path});const a=s.consumed.length>0?Object.assign(Object.assign({},o),s.consumed[s.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:s.consumed,remainingSegments:t.slice(s.consumed.length),parameters:a,positionalParamSegments:null!==(i=s.posParams)&&void 0!==i?i:{}}}function Hf(n,e,t,i,r="corrected"){if(t.length>0&&function qz(n,e,t){return t.some(i=>Gf(n,e,i)&&Dr(i)!==Et)}(n,t,i)){const o=new It(e,function $z(n,e,t,i){const r={};r[Et]=i,i._sourceSegment=n,i._segmentIndexShift=e.length;for(const s of t)if(""===s.path&&Dr(s)!==Et){const o=new It([],{});o._sourceSegment=n,o._segmentIndexShift=e.length,r[Dr(s)]=o}return r}(n,e,i,new It(t,n.children)));return o._sourceSegment=n,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:[]}}if(0===t.length&&function Yz(n,e,t){return t.some(i=>Gf(n,e,i))}(n,t,i)){const o=new It(n.segments,function jz(n,e,t,i,r,s){const o={};for(const a of i)if(Gf(n,t,a)&&!r[Dr(a)]){const l=new It([],{});l._sourceSegment=n,l._segmentIndexShift="legacy"===s?n.segments.length:e.length,o[Dr(a)]=l}return Object.assign(Object.assign({},r),o)}(n,e,t,i,n.children,r));return o._sourceSegment=n,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:t}}const s=new It(n.segments,n.children);return s._sourceSegment=n,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:t}}function Gf(n,e,t){return(!(n.hasChildren()||e.length>0)||"full"!==t.pathMatch)&&""===t.path}
1function UD(n,e,t,i){return!!(Dr(n)===i||i!==Et&&Gf(e,t,n))&&("**"===n.path||zf(e,n,t).matched)}function BD(n,e,t){return 0===e.length&&!n.children[t]}class Wf{constructor(e){this.segmentGroup=e||null}}class VD{constructor(e){this.urlTree=e}}function th(n){return If(new Wf(n))}function zD(n){return If(new VD(n))}class Jz{constructor(e,t,i,r,s){this.configLoader=t,this.urlSerializer=i,this.urlTree=r,this.config=s,this.allowRedirects=!0,this.ngModule=e.get(Us)}apply(){const e=Hf(this.urlTree.root,[],[],this.config).segmentGroup,t=new It(e.segments,e.children);return this.expandSegmentGroup(this.ngModule,this.config,t,Et).pipe(Vt(s=>this.createUrlTree(e0(s),this.urlTree.queryParams,this.urlTree.fragment))).pipe(So(s=>{if(s instanceof VD)return this.allowRedirects=!1,this.match(s.urlTree);throw s instanceof Wf?this.noMatchError(s):s}))}match(e){return this.expandSegmentGroup(this.ngModule,this.config,e.root,Et).pipe(Vt(r=>this.createUrlTree(e0(r),e.queryParams,e.fragment))).pipe(So(r=>{throw r instanceof Wf?this.noMatchError(r):r}))}noMatchError(e){return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`)}createUrlTree(e,t,i){const r=e.segments.length>0?new It([],{[Et]:e}):e;return new fa(r,t,i)}expandSegmentGroup(e,t,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(e,t,i).pipe(Vt(s=>new It([],s))):this.expandSegment(e,i,t,i.segments,r,!0)}expandChildren(e,t,i){const r=[];for(const s of Object.keys(i.children))"primary"===s?r.unshift(s):r.push(s);return ii(r).pipe(Ll(s=>{const o=i.children[s],a=ND(t,s);return this.expandSegmentGroup(e,a,o,s).pipe(Vt(l=>({segment:l,outlet:s})))}),nD((s,o)=>(s[o.outlet]=o.segment,s),{}),function G6(n,e){const t=arguments.length>=2;return i=>i.pipe(n?bo((r,s)=>n(r,s,i)):Xo,By(1),t?rD(e):iD(()=>new Rf))}())}expandSegment(e,t,i,r,s,o){return ii(i).pipe(Ll(a=>this.expandSegmentAgainstRoute(e,t,i,a,r,s,o).pipe(So(c=>{if(c instanceof Wf)return at(null);throw c}))),Nl(a=>!!a),So((a,l)=>{if(a instanceof Rf||"EmptyError"===a.name)return BD(t,r,s)?at(new It([],{})):th(t);throw a}))}expandSegmentAgainstRoute(e,t,i,r,s,o,a){return UD(r,t,s,o)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(e,t,r,s,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o):th(t):th(t)}expandSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,i,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,i,r){const s=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?zD(s):this.lineralizeSegments(i,s).pipe(Zn(o=>{const a=new It(o,{});return this.expandSegment(e,a,t,o,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,i,r,s,o){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=zf(t,r,s);if(!a)return th(t);const h=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?zD(h):this.lineralizeSegments(r,h).pipe(Zn(d=>this.expandSegment(e,t,i,d.concat(c),o,!1)))}matchSegmentAgainstRoute(e,t,i,r,s){if("**"===i.path)return i.loadChildren?(i._loadedConfig?at(i._loadedConfig):this.configLoader.load(e.injector,i)).pipe(Vt(h=>(i._loadedConfig=h,new It(r,{})))):at(new It(r,{}));const{matched:o,consumedSegments:a,remainingSegments:l}=zf(t,i,r);return o?this.getChildConfig(e,i,r).pipe(Zn(u=>{const h=u.module,d=u.routes,{segmentGroup:f,slicedSegments:p}=Hf(t,a,l,d),_=new It(f.segments,f.children);if(0===p.length&&_.hasChildren())return this.expandChildren(h,d,_).pipe(Vt(y=>new It(a,y)));if(0===d.length&&0===p.length)return at(new It(a,{}));const g=Dr(i)===s;return this.expandSegment(h,_,d,p,g?Et:s,!0).pipe(Vt(v=>new It(a.concat(v.segments),v.children)))})):th(t)}getChildConfig(e,t,i){return t.children?at(new Ky(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?at(t._loadedConfig):this.runCanLoadGuards(e.injector,t,i).pipe(Zn(r=>r?this.configLoader.load(e.injector,t).pipe(Vt(s=>(t._loadedConfig=s,s))):function Zz(n){return If(zy(`Cannot load children because the guard of the route "path: '${n.path}'" returned false`))}(t))):at(new Ky([],e))}runCanLoadGuards(e,t,i){const r=t.canLoad;return r&&0!==r.length?at(r.map(o=>{const a=e.get(o);let l;if(function kz(n){return n&&Eo(n.canLoad)}(a))l=a.canLoad(t,i);else{if(!Eo(a))throw new Error("Invalid CanLoad guard");l=a(t,i)}return Ms(l)})).pipe(Qu(),$i(o=>{if(!ga(o))return;const a=zy(`Redirecting to "${this.urlSerializer.serialize(o)}"`);throw a.url=o,a}),Vt(o=>!0===o)):at(!0)}lineralizeSegments(e,t){let i=[],r=t.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return at(i);if(r.numberOfChildren>1||!r.children[Et])return If(new Error(`Only absolute redirects can have named outlets. redirectTo: '${e.redirectTo}'`));r=r.children[Et]}}applyRedirectCommands(e,t,i){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,i)}applyRedirectCreatreUrlTree(e,t,i,r){const s=this.createSegmentGroup(e,t.root,i,r);return new fa(s,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const i={};return oi(e,(r,s)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[s]=t[a]}else i[s]=r}),i}createSegmentGroup(e,t,i,r){const s=this.createSegments(e,t.segments,i,r);let o={};return oi(t.children,(a,l)=>{o[l]=this.createSegmentGroup(e,a,i,r)}),new It(s,o)}createSegments(e,t,i,r){return t.map(s=>s.path.startsWith(":")?this.findPosParam(e,s,r):this.findOrReturn(s,i))}findPosParam(e,t,i){const r=i[t.path.substring(1)];if(!r)throw new Error(`Cannot redirect to '${e}'. Cannot find '${t.path}'.`);return r}findOrReturn(e,t){let i=0;for(const r of t){if(r.path===e.path)return t.splice(i),r;i++}return e}}function e0(n){const e={};for(const i of Object.keys(n.children)){const s=e0(n.children[i]);(s.segments.length>0||s.hasChildren())&&(e[i]=s)}return function Qz(n){if(1===n.numberOfChildren&&n.children[Et]){const e=n.children[Et];return new It(n.segments.concat(e.segments),e.children)}return n}(new It(n.segments,e))}class HD{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class jf{constructor(e,t){this.component=e,this.route=t}}function tH(n,e,t){const i=n._root;return nh(i,e?e._root:null,t,[i.value])}function $f(n,e,t){const i=function iH(n){if(!n)return null;for(let e=n.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(i?i.module.injector:t).get(n)}function nh(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=Bl(e);
1return n.children.forEach(o=>{(function rH(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=n.value,o=e?e.value:null,a=t?t.getContext(n.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const l=function sH(n,e,t){if("function"==typeof t)return t(n,e);switch(t){case"pathParamsChange":return!pa(n.url,e.url);case"pathParamsOrQueryParamsChange":return!pa(n.url,e.url)||!ws(n.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!qy(n,e)||!ws(n.queryParams,e.queryParams);default:return!qy(n,e)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new HD(i)):(s.data=o.data,s._resolvedData=o._resolvedData),nh(n,e,s.component?a?a.children:null:t,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new jf(a.outlet.component,o))}else o&&ih(e,a,r),r.canActivateChecks.push(new HD(i)),nh(n,null,s.component?a?a.children:null:t,i,r)})(o,s[o.value.outlet],t,i.concat([o.value]),r),delete s[o.value.outlet]}),oi(s,(o,a)=>ih(o,t.getContext(a),r)),r}function ih(n,e,t){const i=Bl(n),r=n.value;oi(i,(s,o)=>{ih(s,r.component?e?e.children.getContext(o):null:e,t)}),t.canDeactivateChecks.push(new jf(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}class pH{}function GD(n){return new Dn(e=>e.error(n))}class gH{constructor(e,t,i,r,s,o){this.rootComponentType=e,this.config=t,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=s,this.relativeLinkResolution=o}recognize(){const e=Hf(this.urlTree.root,[],[],this.config.filter(o=>void 0===o.redirectTo),this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,Et);if(null===t)return null;const i=new Uf([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},Et,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Gs(i,t),s=new TD(this.url,r);return this.inheritParamsAndData(s._root),s}inheritParamsAndData(e){const t=e.value,i=ED(t,this.paramsInheritanceStrategy);t.params=Object.freeze(i.params),t.data=Object.freeze(i.data),e.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(e,t,i){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,i)}processChildren(e,t){const i=[];for(const s of Object.keys(t.children)){const o=t.children[s],a=ND(e,s),l=this.processSegmentGroup(a,o,s);if(null===l)return null;i.push(...l)}const r=WD(i);return function _H(n){n.sort((e,t)=>e.value.outlet===Et?-1:t.value.outlet===Et?1:e.value.outlet.localeCompare(t.value.outlet))}(r),r}processSegment(e,t,i,r){for(const s of e){const o=this.processSegmentAgainstRoute(s,t,i,r);if(null!==o)return o}return BD(t,i,r)?[]:null}processSegmentAgainstRoute(e,t,i,r){if(e.redirectTo||!UD(e,t,i,r))return null;let s,o=[],a=[];if("**"===e.path){const f=i.length>0?dD(i).parameters:{};s=new Uf(i,f,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,qD(e),Dr(e),e.component,e,jD(t),$D(t)+i.length,YD(e))}else{const f=zf(t,e,i);if(!f.matched)return null;o=f.consumedSegments,a=f.remainingSegments,s=new Uf(o,f.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,qD(e),Dr(e),e.component,e,jD(t),$D(t)+o.length,YD(e))}const l=function vH(n){return n.children?n.children:n.loadChildren?n._loadedConfig.routes:[]}(e),{segmentGroup:c,slicedSegments:u}=Hf(t,o,a,l.filter(f=>void 0===f.redirectTo),this.relativeLinkResolution);if(0===u.length&&c.hasChildren()){const f=this.processChildren(l,c);return null===f?null:[new Gs(s,f)]}if(0===l.length&&0===u.length)return[new Gs(s,[])];const h=Dr(e)===r,d=this.processSegment(l,c,u,h?Et:r);return null===d?null:[new Gs(s,d)]}}function yH(n){const e=n.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}function WD(n){const e=[],t=new Set;for(const i of n){if(!yH(i)){e.push(i);continue}const r=e.find(s=>i.value.routeConfig===s.value.routeConfig);void 0!==r?(r.children.push(...i.children),t.add(r)):e.push(i)}for(const i of t){const r=WD(i.children);e.push(new Gs(i.value,r))}return e.filter(i=>!t.has(i))}function jD(n){let e=n;for(;e._sourceSegment;)e=e._sourceSegment;return e}function $D(n){let e=n,t=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,t+=e._segmentIndexShift?e._segmentIndexShift:0;return t-1}function qD(n){return n.data||{}}function YD(n){return n.resolve||{}}function XD(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function t0(n){return Sn(e=>{const t=n(e);return t?ii(t).pipe(Vt(()=>e)):at(e)})}class TH extends class EH{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}{}const n0=new gt("ROUTES");class ZD{constructor(e,t,i,r){this.injector=e,this.compiler=t,this.onLoadStartListener=i,this.onLoadEndListener=r}load(e,t){if(t._loader$)return t._loader$;this.onLoadStartListener&&this.onLoadStartListener(t);const r=this.loadModuleFactory(t.loadChildren).pipe(Vt(s=>{this.onLoadEndListener&&this.onLoadEndListener(t);const o=s.create(e);return new Ky(hD(o.injector.get(n0,void 0,tt.Self|tt.Optional)).map(Qy),o)}),So(s=>{throw t._loader$=void 0,s}));return t._loader$=new B6(r,()=>new is).pipe(tD()),t._loader$}loadModuleFactory(e){return Ms(e()).pipe(Zn(t=>t instanceof XS?at(t):ii(this.compiler.compileModuleAsync(t))))}}class DH{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,t){return e}}function PH(n){throw n}function IH(n,e,t){return e.parse("/")}function KD(n,e){return at(null)}const RH={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},OH={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let qi=(()=>{class n{constructor(t,i,r,s,o,a,l){this.rootComponentType=t,this.urlSerializer
1=i,this.rootContexts=r,this.location=s,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.navigationId=0,this.currentPageId=0,this.isNgZoneEnabled=!1,this.events=new is,this.errorHandler=PH,this.malformedUriErrorHandler=IH,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:KD,afterPreactivation:KD},this.urlHandlingStrategy=new DH,this.routeReuseStrategy=new TH,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.canceledNavigationResolution="replace",this.ngModule=o.get(Us),this.console=o.get(A4);const h=o.get(Jn);this.isNgZoneEnabled=h instanceof Jn&&Jn.isInAngularZone(),this.resetConfig(l),this.currentUrlTree=function sz(){return new fa(new It([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new ZD(o,a,d=>this.triggerEvent(new oD(d)),d=>this.triggerEvent(new aD(d))),this.routerState=SD(this.currentUrlTree,this.rootComponentType),this.transitions=new Ar({id:0,targetPageId:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}get browserPageId(){var t;return null===(t=this.location.getState())||void 0===t?void 0:t.\u0275routerPageId}setupNavigations(t){const i=this.events;return t.pipe(bo(r=>0!==r.id),Vt(r=>Object.assign(Object.assign({},r),{extractedUrl:this.urlHandlingStrategy.extract(r.rawUrl)})),Sn(r=>{let s=!1,o=!1;return at(r).pipe($i(a=>{this.currentNavigation={id:a.id,initialUrl:a.currentRawUrl,extractedUrl:a.extractedUrl,trigger:a.source,extras:a.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Sn(a=>{const l=this.browserUrlTree.toString(),c=!this.navigated||a.extractedUrl.toString()!==l||l!==this.currentUrlTree.toString();if(("reload"===this.onSameUrlNavigation||c)&&this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return JD(a.source)&&(this.browserUrlTree=a.extractedUrl),at(a).pipe(Sn(h=>{const d=this.transitions.getValue();return i.next(new Vy(h.id,this.serializeUrl(h.extractedUrl),h.source,h.restoredState)),d!==this.transitions.getValue()?Is:Promise.resolve(h)}),function eH(n,e,t,i){return Sn(r=>function Kz(n,e,t,i,r){return new Jz(n,e,t,i,r).apply()}(n,e,t,r.extractedUrl,i).pipe(Vt(s=>Object.assign(Object.assign({},r),{urlAfterRedirects:s}))))}(this.ngModule.injector,this.configLoader,this.urlSerializer,this.config),$i(h=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:h.urlAfterRedirects})}),function bH(n,e,t,i,r){return Zn(s=>function mH(n,e,t,i,r="emptyOnly",s="legacy"){try{const o=new gH(n,e,t,i,r,s).recognize();return null===o?GD(new pH):at(o)}catch(o){return GD(o)}}(n,e,s.urlAfterRedirects,t(s.urlAfterRedirects),i,r).pipe(Vt(o=>Object.assign(Object.assign({},s),{targetSnapshot:o}))))}(this.rootComponentType,this.config,h=>this.serializeUrl(h),this.paramsInheritanceStrategy,this.relativeLinkResolution),$i(h=>{if("eager"===this.urlUpdateStrategy){if(!h.extras.skipLocationChange){const f=this.urlHandlingStrategy.merge(h.urlAfterRedirects,h.rawUrl);this.setBrowserUrl(f,h)}this.browserUrlTree=h.urlAfterRedirects}const d=new $6(h.id,this.serializeUrl(h.extractedUrl),this.serializeUrl(h.urlAfterRedirects),h.targetSnapshot);i.next(d)}));if(c&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:d,extractedUrl:f,source:p,restoredState:_,extras:g}=a,m=new Vy(d,this.serializeUrl(f),p,_);i.next(m);const v=SD(f,this.rootComponentType).snapshot;return at(Object.assign(Object.assign({},a),{targetSnapshot:v,urlAfterRedirects:f,extras:Object.assign(Object.assign({},g),{skipLocationChange:!1,replaceUrl:!1})}
1))}return this.rawUrlTree=a.rawUrl,a.resolve(null),Is}),t0(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:h,extras:{skipLocationChange:d,replaceUrl:f}}=a;return this.hooks.beforePreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:h,skipLocationChange:!!d,replaceUrl:!!f})}),$i(a=>{const l=new q6(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot);this.triggerEvent(l)}),Vt(a=>Object.assign(Object.assign({},a),{guards:tH(a.targetSnapshot,a.currentSnapshot,this.rootContexts)})),function oH(n,e){return Zn(t=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=t;return 0===o.length&&0===s.length?at(Object.assign(Object.assign({},t),{guardsResult:!0})):function aH(n,e,t,i){return ii(n).pipe(Zn(r=>function fH(n,e,t,i,r){const s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return s&&0!==s.length?at(s.map(a=>{const l=$f(a,e,r);let c;if(function Vz(n){return n&&Eo(n.canDeactivate)}(l))c=Ms(l.canDeactivate(n,e,t,i));else{if(!Eo(l))throw new Error("Invalid CanDeactivate guard");c=Ms(l(n,e,t,i))}return c.pipe(Nl())})).pipe(Qu()):at(!0)}(r.component,r.route,t,e,i)),Nl(r=>!0!==r,!0))}(o,i,r,n).pipe(Zn(a=>a&&function Nz(n){return"boolean"==typeof n}(a)?function lH(n,e,t,i){return ii(e).pipe(Ll(r=>ky(function uH(n,e){return null!==n&&e&&e(new K6(n)),at(!0)}(r.route.parent,i),function cH(n,e){return null!==n&&e&&e(new Q6(n)),at(!0)}(r.route,i),function dH(n,e,t){const i=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(o=>function nH(n){const e=n.routeConfig?n.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:n,guards:e}:null}(o)).filter(o=>null!==o).map(o=>eD(()=>at(o.guards.map(l=>{const c=$f(l,o.node,t);let u;if(function Bz(n){return n&&Eo(n.canActivateChild)}(c))u=Ms(c.canActivateChild(i,n));else{if(!Eo(c))throw new Error("Invalid CanActivateChild guard");u=Ms(c(i,n))}return u.pipe(Nl())})).pipe(Qu())));return at(s).pipe(Qu())}(n,r.path,t),function hH(n,e,t){const i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||0===i.length)return at(!0);const r=i.map(s=>eD(()=>{const o=$f(s,e,t);let a;if(function Uz(n){return n&&Eo(n.canActivate)}(o))a=Ms(o.canActivate(e,n));else{if(!Eo(o))throw new Error("Invalid CanActivate guard");a=Ms(o(e,n))}return a.pipe(Nl())}));return at(r).pipe(Qu())}(n,r.route,t))),Nl(r=>!0!==r,!0))}(i,s,n,e):at(a)),Vt(a=>Object.assign(Object.assign({},t),{guardsResult:a})))})}(this.ngModule.injector,a=>this.triggerEvent(a)),$i(a=>{if(ga(a.guardsResult)){const c=zy(`Redirecting to "${this.serializeUrl(a.guardsResult)}"`);throw c.url=a.guardsResult,c}const l=new Y6(a.id,this.serializeUrl(a.extractedUrl),this.serializeUrl(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);this.triggerEvent(l)}),bo(a=>!!a.guardsResult||(this.restoreHistory(a),this.cancelNavigationTransition(a,""),!1)),t0(a=>{if(a.guards.canActivateChecks.length)return at(a).pipe($i(l=>{const c=new X6(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}),Sn(l=>{let c=!1;return at(l).pipe(function xH(n,e){return Zn(t=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=t;if(!r.length)return at(t);let s=0;return ii(r).pipe(Ll(o=>function wH(n,e,t,i){return function MH(n,e,t,i){const r=XD(n);if(0===r.length)return at({});const s={};return ii(r).pipe(Zn(o=>function CH(n,e,t,i){const r=$f(n,e,i);return Ms(r.resolve?r.resolve(e,t):r(e,t))}(n[o],e,t,i).pipe($i(a=>{s[o]=a}))),By(1),Zn(()=>XD(s).length===r.length?at(s):Is))}(n._resolve,n,e,i).pipe(Vt(s=>(n._resolvedData=s,n.data=Object.assign(Object.assign({},n.data),ED(n,t).resolve),null)))}(o.route,i,n,e)),$i(()=>s++),By(1),Zn(o=>s===r.length?at(t):Is))})}(this.paramsInheritanceStrategy,this.ngModule.injector),$i({next:()=>c=!0,complete:()=>{c||(this.restoreHistory(l),this.cancelNavigationTransition(l,"At least one route resolver didn't emit any value."))}}))}),$i(l=>{const c=new Z6(l.id,this.serializeUrl(l.extractedUrl),this.serializeUrl(l.urlAfterRedirects),l.targetSnapshot);this.triggerEvent(c)}))}),t0(a=>{const{targetSnapshot:l,id:c,extractedUrl:u,rawUrl:h,extras:{skipLocationChange:d,replaceUrl:f}}=a;return this.hooks.afterPreactivation(l,{navigationId:c,appliedUrlTree:u,rawUrlTree:h,skipLocationChange:!!d,replaceUrl:!!f})}),Vt(a=>{const l=function Mz(n,e,t){const i=Zu(n,e._root,t?t._root:void 0);return new CD(i,e)}(this.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);return Object.assign(Object.assign({},a),{targetRouterState:l})}),$i(a=>{this.currentUrlTree=a.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(a.urlAfterRedirects,a.rawUrl),this.routerState=a.targetRouterState,"deferred"===this.urlUpdateStrategy&&(a.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,a),this.browserUrlTree=a.urlAfterRedirects)}),((n,e,t)=>Vt(i=>(new Lz(e,i.targetRouterState,i.currentRouterState,t).activate(n),i)))(this.rootContexts,this.routeReuseStrategy,a=>this.triggerEvent(a)),$i({next(){s=!0},complete(){s=!0}}),function W6(n){return ni((e,t)=>{try{e.subscribe(t)}finally{t.add(n)}})}(()=>{var a;s||o||this.cancelNavigationTransition(r,`Navigation ID ${r.id} is not equal to the current navigation id ${this.navigationId}`),(null===(a=this.currentNavigation)||void 0===a?void 0:a.id)===r.id&&(this.currentNavigation=null)}),So(a=>{if(o=!0,function nz(n){return n&&n[cD]}(a)){const l=ga(a.url);l||(this.navigated=!0,this.restoreHistory(r,!0));const c=new sD(r.id,this.serializeUrl(r.extractedUrl),a.message);i.next(c),l?setTimeout(()=>{const u=this.urlHandlingStrategy.merge(a.url,this.rawUrlTree),h={skipLocationChange:r.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||JD(r.source)};this.scheduleNavigation(u,"imperative",null,h,{resolve:r.resolve,reject:r.reject,promise:r.promise})},0):r.resolve(!1)}else{this.restoreHistory(r,!0);const l=new j6(r.id,this.serializeUrl(r.extractedUrl),a);i.next(l);try{r.resolve(this.errorHandler(a))}catch(c){r.reject(c)}}return Is}))}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.transitions.value),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const i="popstate"===t.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{var r;const s={replaceUrl:!0},o=(null===(r=t.state)||void 0===r?void 0:r.navigationId)?t.state:null;if(o){const l=Object.assign({},o);delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(s.state=l)}const a=this.parseUrl(t.url);this.scheduleNavigation(a,i,o,s)},0)}))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){FD(t),this.config=t.map(Qy),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(t,i={}){const{relativeTo:r,queryParams:s,fragment:o,queryParamsHandling:a,preserveFragment:l}=i,c=r||this.routerState.root,u=l?this.currentUrlTree.fragment:o;let h=null;switch(a){case"merge":h=Object.assign(Object.assign({},this.currentUrlTree.queryParams),s);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=s||null}return null!==h&&(h=this.removeEmptyProps(h)),function Ez(n,e,t,i,r){if(0===t.length)return Yy(e.root,e.root,e.root,i,r);const s=function Tz(n){if("string"==typeof n[0]&&1===n.length&&"/"===n[0])return new PD(!0,
10,n);let e=0,t=!1;const i=n.reduce((r,s,o)=>{if("object"==typeof s&&null!=s){if(s.outlets){const a={};return oi(s.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(s.segmentPath)return[...r,s.segmentPath]}return"string"!=typeof s?[...r,s]:0===o?(s.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?t=!0:".."===a?e++:""!=a&&r.push(a))}),r):[...r,s]},[]);return new PD(t,e,i)}(t);if(s.toRoot())return Yy(e.root,e.root,new It([],{}),i,r);const o=function Az(n,e,t){if(n.isAbsolute)return new Xy(e.root,!0,0);if(-1===t.snapshot._lastPathIndex){const s=t.snapshot._urlSegment;return new Xy(s,s===e.root,0)}const i=Bf(n.commands[0])?0:1;return function Dz(n,e,t){let i=n,r=e,s=t;for(;s>r;){if(s-=r,i=i.parent,!i)throw new Error("Invalid number of '../'");r=i.segments.length}return new Xy(i,!1,r-s)}(t.snapshot._urlSegment,t.snapshot._lastPathIndex+i,n.numberOfDoubleDots)}(s,e,n),a=o.processChildren?Vf(o.segmentGroup,o.index,s.commands):ID(o.segmentGroup,o.index,s.commands);return Yy(e.root,o.segmentGroup,a,i,r)}(c,this.currentUrlTree,t,h,null!=u?u:null)}navigateByUrl(t,i={skipLocationChange:!1}){const r=ga(t)?t:this.parseUrl(t),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,"imperative",null,i)}navigate(t,i={skipLocationChange:!1}){return function LH(n){for(let e=0;e<n.length;e++){const t=n[e];if(null==t)throw new Error(`The requested path contains ${t} segment at index ${e}`)}}(t),this.navigateByUrl(this.createUrlTree(t,i),i)}serializeUrl(t){return this.urlSerializer.serialize(t)}parseUrl(t){let i;try{i=this.urlSerializer.parse(t)}catch(r){i=this.malformedUriErrorHandler(r,this.urlSerializer,t)}return i}isActive(t,i){let r;if(r=!0===i?Object.assign({},RH):!1===i?Object.assign({},OH):i,ga(t))return pD(this.currentUrlTree,t,r);const s=this.parseUrl(t);return pD(this.currentUrlTree,s,r)}removeEmptyProps(t){return Object.keys(t).reduce((i,r)=>{const s=t[r];return null!=s&&(i[r]=s),i},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.currentPageId=t.targetPageId,this.events.next(new kl(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,t.resolve(!0)},t=>{this.console.warn(`Unhandled Navigation Error: ${t}`)})}scheduleNavigation(t,i,r,s,o){var a,l;if(this.disposed)return Promise.resolve(!1);let c,u,h;o?(c=o.resolve,u=o.reject,h=o.promise):h=new Promise((p,_)=>{c=p,u=_});const d=++this.navigationId;let f;return"computed"===this.canceledNavigationResolution?(0===this.currentPageId&&(r=this.location.getState()),f=r&&r.\u0275routerPageId?r.\u0275routerPageId:s.replaceUrl||s.skipLocationChange?null!==(a=this.browserPageId)&&void 0!==a?a:0:(null!==(l=this.browserPageId)&&void 0!==l?l:0)+1):f=0,this.setTransition({id:d,targetPageId:f,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:s,resolve:c,reject:u,promise:h,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),h.catch(p=>Promise.reject(p))}setBrowserUrl(t,i){const r=this.urlSerializer.serialize(t),s=Object.assign(Object.assign({},i.extras.state),this.generateNgRouterState(i.id,i.targetPageId));this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl?this.location.replaceState(r,"",s):this.location.go(r,"",s)}restoreHistory(t,i=!1){var r,s;if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-t.targetPageId;"popstate"!==t.source&&"eager"!==this.urlUpdateStrategy&&this.currentUrlTree!==(null===(r=this.currentNavigation)||void 0===r?void 0:r.finalUrl)||0===o?this.currentUrlTree===(null===(s=this.currentNavigation)||void 0===s?void 0:s.finalUrl)&&0===o&&(this.resetState(t),this.browserUrlTree=t.currentUrlTree,this.resetUrlToCurrentUrlTree()):this.location.historyGo(o)}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=t.currentRouterState,this.currentUrlTree=t.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}cancelNavigationTransition(t,i){const r=new sD(t.id,this.serializeUrl(t.extractedUrl),i);this.triggerEvent(r),t.resolve(!1)}generateNgRouterState(t,i){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:i}:{navigationId:t}}}return n.\u0275fac=function(t){V_()},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();function JD(n){return"imperative"!==n}let r0=(()=>{class n{constructor(t,i,r,s,o){this.router=t,this.route=i,this.tabIndexAttribute=r,this.renderer=s,this.el=o,this.commands=null,this.onChanges=new is,this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(t){if(null!=this.tabIndexAttribute)return;const i=this.renderer,r=this.el.nativeElement;null!==t?i.setAttribute(r,"tabindex",t):i.removeAttribute(r,"tabindex")}ngOnChanges(t){this.onChanges.next(this)}set routerLink(t){null!=t?(this.commands=Array.isArray(t)?t:[t],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(){if(null===this.urlTree)return!0;const t={skipLocationChange:Vl(this.skipLocationChange),replaceUrl:Vl(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:Vl(this.preserveFragment)})}}return n.\u0275fac=function(t){return new(t||n)(Y(qi),Y(ma),tu("tabindex"),Y(gs),Y(Wi))},n.\u0275dir=Ke({type:n,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(t,i){1&t&&Ge("click",function(){return i.onClick()})},inputs:{queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[wr]}),n})(),Yr=(()=>{class n{constructor(t,i,r){this.router=t,this.route=i,this.locationStrategy=r,this.commands=null,this.href=null,this.onChanges=new is,this.subscription=t.events.subscribe(s=>{s instanceof kl&&this.updateTargetUrlAndHref()})}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:null}ngOnChanges(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(t,i,r,s,o){if(0!==t||i||r||s||o||"string"==typeof this.target&&"_self"!=this.target||null===this.urlTree)return!0;const a={skipLocationChange:Vl(this.skipLocationChange),replaceUrl:Vl(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,a),!1}updateTargetUrlAndHref(){this.href=null!==this.urlTree?this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:Vl(this.preserveFragment)})}}return n.\u0275fac=function(t){return new(t||n)(Y(qi),Y(ma),Y(Ol))},n.\u0275dir=Ke({type:n,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(t,i){1&t&&Ge("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),2&t&&Gi("target",i.target)("href",i.href,us)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state",relativeTo:"relativeTo",routerLink:"routerLink"},features:[wr]}),n})();function Vl(n){return""===n||!!n}let QD=(()=>{class n{constructor(t,i,r,s,o,a){this.router=t,this.element=i,this.renderer=r,this.cdr=s,this.link=o,this.linkWithHref=a,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new sn,this.routerEventsSubscription=t.events.subscribe(l=>{l instanceof kl&&this.update()})}ngAfterContentInit(){at(this.links.changes,this.linksWithHrefs.changes,at(null)).pipe(W
1c()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var t;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();const i=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=ii(i).pipe(Wc()).subscribe(r=>{this.isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(t){const i=Array.isArray(t)?t:t.split(" ");this.classes=i.filter(r=>!!r)}ngOnChanges(t){this.update()}ngOnDestroy(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()}update(){!this.links||!this.linksWithHrefs||!this.router.navigated||Promise.resolve().then(()=>{const t=this.hasActiveLinks();this.isActive!==t&&(this.isActive=t,this.cdr.markForCheck(),this.classes.forEach(i=>{t?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),this.isActiveChange.emit(t))})}isLinkActive(t){const i=function FH(n){return!!n.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return r=>!!r.urlTree&&t.isActive(r.urlTree,i)}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)}}return n.\u0275fac=function(t){return new(t||n)(Y(qi),Y(Wi),Y(gs),Y(Zd),Y(r0,8),Y(Yr,8))},n.\u0275dir=Ke({type:n,selectors:[["","routerLinkActive",""]],contentQueries:function(t,i,r){if(1&t&&(dv(r,r0,5),dv(r,Yr,5)),2&t){let s;oa(s=aa())&&(i.links=s),oa(s=aa())&&(i.linksWithHrefs=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[wr]}),n})();class e2{}class t2{preload(e,t){return at(null)}}let n2=(()=>{class n{constructor(t,i,r,s){this.router=t,this.injector=r,this.preloadingStrategy=s,this.loader=new ZD(r,i,l=>t.triggerEvent(new oD(l)),l=>t.triggerEvent(new aD(l)))}setUpPreloading(){this.subscription=this.router.events.pipe(bo(t=>t instanceof kl),Ll(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(Us);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,i){const r=[];for(const s of i)if(s.loadChildren&&!s.canLoad&&s._loadedConfig){const o=s._loadedConfig;r.push(this.processRoutes(o.module,o.routes))}else s.loadChildren&&!s.canLoad?r.push(this.preloadConfig(t,s)):s.children&&r.push(this.processRoutes(t,s.children));return ii(r).pipe(Wc(),Vt(s=>{}))}preloadConfig(t,i){return this.preloadingStrategy.preload(i,()=>(i._loadedConfig?at(i._loadedConfig):this.loader.load(t.injector,i)).pipe(Zn(s=>(i._loadedConfig=s,this.processRoutes(s.module,s.routes)))))}}return n.\u0275fac=function(t){return new(t||n)(Le(qi),Le(IE),Le(fi),Le(e2))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})(),s0=(()=>{class n{constructor(t,i,r={}){this.router=t,this.viewportScroller=i,this.options=r,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},r.scrollPositionRestoration=r.scrollPositionRestoration||"disabled",r.anchorScrolling=r.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof Vy?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof kl&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof lD&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,i){this.router.triggerEvent(new lD(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return n.\u0275fac=function(t){V_()},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();const _a=new gt("ROUTER_CONFIGURATION"),i2=new gt("ROUTER_FORROOT_GUARD"),kH=[Nv,{provide:vD,useClass:yD},{provide:qi,useFactory:function HH(n,e,t,i,r,s,o={},a,l){const c=new qi(null,n,e,t,i,r,hD(s));return a&&(c.urlHandlingStrategy=a),l&&(c.routeReuseStrategy=l),function GH(n,e){n.errorHandler&&(e.errorHandler=n.errorHandler),n.malformedUriErrorHandler&&(e.malformedUriErrorHandler=n.malformedUriErrorHandler),n.onSameUrlNavigation&&(e.onSameUrlNavigation=n.onSameUrlNavigation),n.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=n.paramsInheritanceStrategy),n.relativeLinkResolution&&(e.relativeLinkResolution=n.relativeLinkResolution),n.urlUpdateStrategy&&(e.urlUpdateStrategy=n.urlUpdateStrategy),n.canceledNavigationResolution&&(e.canceledNavigationResolution=n.canceledNavigationResolution)}(o,c),o.enableTracing&&c.events.subscribe(u=>{var h,d;
1null===(h=console.group)||void 0===h||h.call(console,`Router Event: ${u.constructor.name}`),console.log(u.toString()),console.log(u),null===(d=console.groupEnd)||void 0===d||d.call(console)}),c},deps:[vD,eh,Nv,fi,IE,n0,_a,[class AH{},new po],[class SH{},new po]]},eh,{provide:ma,useFactory:function WH(n){return n.routerState.root},deps:[qi]},n2,t2,class NH{preload(e,t){return t().pipe(So(()=>at(null)))}},{provide:_a,useValue:{enableTracing:!1}}];function UH(){return new NE("Router",qi)}let r2=(()=>{class n{constructor(t,i){}static forRoot(t,i){return{ngModule:n,providers:[kH,s2(t),{provide:i2,useFactory:zH,deps:[[qi,new po,new lu]]},{provide:_a,useValue:i||{}},{provide:Ol,useFactory:VH,deps:[ua,[new yd(Fv),new po],_a]},{provide:s0,useFactory:BH,deps:[qi,kV,_a]},{provide:e2,useExisting:i&&i.preloadingStrategy?i.preloadingStrategy:t2},{provide:NE,multi:!0,useFactory:UH},[o0,{provide:vv,multi:!0,useFactory:jH,deps:[o0]},{provide:o2,useFactory:$H,deps:[o0]},{provide:PE,multi:!0,useExisting:o2}]]}}static forChild(t){return{ngModule:n,providers:[s2(t)]}}}return n.\u0275fac=function(t){return new(t||n)(Le(i2,8),Le(qi,8))},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({}),n})();function BH(n,e,t){return t.scrollOffset&&e.setOffset(t.scrollOffset),new s0(n,e,t)}function VH(n,e,t={}){return t.useHash?new bB(n,e):new tT(n,e)}function zH(n){return"guarded"}function s2(n){return[{provide:nL,multi:!0,useValue:n},{provide:n0,multi:!0,useValue:n}]}let o0=(()=>{class n{constructor(t){this.injector=t,this.initNavigation=!1,this.destroyed=!1,this.resultOfPreactivationDone=new is}appInitializer(){return this.injector.get(_B,Promise.resolve(null)).then(()=>{if(this.destroyed)return Promise.resolve(!0);let i=null;const r=new Promise(a=>i=a),s=this.injector.get(qi),o=this.injector.get(_a);return"disabled"===o.initialNavigation?(s.setUpLocationChangeListener(),i(!0)):"enabled"===o.initialNavigation||"enabledBlocking"===o.initialNavigation?(s.hooks.afterPreactivation=()=>this.initNavigation?at(null):(this.initNavigation=!0,i(!0),this.resultOfPreactivationDone),s.initialNavigation()):i(!0),r})}bootstrapListener(t){const i=this.injector.get(_a),r=this.injector.get(n2),s=this.injector.get(s0),o=this.injector.get(qi),a=this.injector.get(Av);t===a.components[0]&&(("enabledNonBlocking"===i.initialNavigation||void 0===i.initialNavigation)&&o.initialNavigation(),r.setUpPreloading(),s.init(),o.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}ngOnDestroy(){this.destroyed=!0}}return n.\u0275fac=function(t){return new(t||n)(Le(fi))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})();function jH(n){return n.appInitializer.bind(n)}function $H(n){return n.bootstrapListener.bind(n)}const o2=new gt("Router Initializer");let a2=(()=>{class n{constructor(t,i){this.router=i,this.mergedConfig=Object.assign({trackPageviews:!0},t),this.mergedConfig.trackPageviews&&i.events.pipe(bo(r=>r instanceof kl),$i(r=>{this.pageview()})).subscribe()}event(t,i={}){try{gtag("event",t,i),this.debug("event",this.mergedConfig.trackingId,t,i)}catch(r){console.error("Google Analytics event error",r)}}pageview(t){try{const i={page_path:this.router.url,page_title:"Angular App",page_location:window.location.href};t=Object.assign({},i,t),gtag("config",this.mergedConfig.trackingId,t),this.debug("pageview",this.mergedConfig.trackingId,t)}catch(i){console.error("Google Analytics pageview error",i)}}config(t){try{gtag("config",this.mergedConfig.trackingId,{})}catch(i){console.error("Google Analytics config error",i)}}set(t){try{gtag("set",{})}catch(i){console.error("Google Analytics set error",i)}}debug(...t){this.mergedConfig.debug&&console.log("angular-gtag:",...t)}}return n.\u0275fac=function(t){return new(t||n)(Le("config"),Le(qi))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac}),n})(),YH=(()=>{class n{static forRoot(t){return{ngModule:n,providers:[a2,{provide:"config",useValue:t}]}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({}),n})();const l2={now:()=>(l2.delegate||Date).now(),delegate:void 0};class XH extends is{constructor(e=1/0,t=1/0,i=l2){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){const{isStopped:t,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:s,_windowTime:o}=this;t||(i.push(e),!r&&i.push(s.now()+o)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();const t=this._innerSubscribe(e),{_infiniteTimeWindow:i,_buffer:r}=this,s=r.slice();for(let o=0;o<s.length&&!e.closed;o+=i?1:2)e.next(s[o]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){const{_bufferSize:e,_timestampProvider:t,_buffer:i,_infiniteTimeWindow:r}=this,s=(r?1:2)*e;if(e<1/0&&s<i.length&&i.splice(0,i.length-s),!r){const o=t.now();let a=0;for(let l=1;l<i.length&&i[l]<=o;l+=2)a=l;a&&i.splice(0,a+1)}}}function c2(n,e,t){let i,r=!1;return n&&"object"==typeof n?({bufferSize:i=1/0,windowTime:e=1/0,refCount:r=!1,scheduler:t}=n):i=null!=n?n:1/0,bx({connector:()=>new XH(i,e,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}let a0=(()=>{class n{constructor(t){this.http=t,this.showEspaBanner=!0,this.parentContainerUuid="ec9ce8f6-224b-4198-9be2-88a66495c36a",this.apiUrl="https://repox.athenscitymuseum.gr/api",this.headersOptions={"Content-Type":"application/json","X-TenantID":"mpa",Authorization:"Zr/6CpfRHVAdvugwErFsLqRdOdhUoZUKOa+8SR+T8SpFmlxoFWdPdL3+PpPotnoeJkXetxXLWQErWscxM70g2E8hK8EbK6VR3qlzKJ/m1nwBWf1SLTq1LdybMU+3ZwwflpV0O0IVUB9FKa5J8TUX9XXWG4Am3e8IrspEcMyBEmU="},this.headers=new bs(this.headersOptions),this.defaultPaginationData={currentPage:0,pageSize:16,totalPages:1},this.paginationData={currentPage:0,pageSize:16,totalPages:1},this.clickedButtonIndex=0,this.searchData={value:"",containerTypes:[this.parentContainerUuid],propertyValueFilters:[]}}getParentContainer(){return this.http.get(`${this.apiUrl}/v2/public/containers/${this.parentContainerUuid}`,{headers:this.headers})}getContainer(t){return this.http.get(`${this.apiUrl}/v2/public/containers/${t}`,{headers:this.headers})}getChildren(t){return this.http.get(`${this.apiUrl}/public/containers/${this.parentContainerUuid}/children?page=${t.currentPage}&size=${t.pageSize}`,{headers:this.headers})}getChildrenBySearchValues(t,i){return this.http.post(`${this.apiUrl}/public/containers/search?page=${t.currentPage}&size=${t.pageSize}`,i,{headers:this.headers})}
1getDataStreams(t){return this.http.get(`${this.apiUrl}/public/containers/${t}/datastreams`,{headers:this.headers})}getChildrenDetailed(t){const i=this.getChildren(t).pipe(c2(1)),r=i.pipe(Sn(s=>{const a=s.content.map(l=>this.getContainer(l.uuid));return 0===a.length?at([]):Hu(a)}));return Hu({pageData:i,childrenDetails:r})}getChildrenDetailedBySearch(t,i){const r=this.getChildrenBySearchValues(t,i).pipe(c2(1)),s=r.pipe(Sn(o=>{const l=o.content.map(c=>this.getContainer(c.uuid));return 0===l.length?at([]):Hu(l)}));return Hu({pageData:r,childrenDetails:s})}getList(t,i){return null===i?this.getChildrenDetailed(t):this.getChildrenDetailedBySearch(t,i)}getDropdownCollections(){return this.http.get(`${this.apiUrl}/public/containers/types`,{headers:this.headers})}getCreatorsList(){return this.http.post(`${this.apiUrl}/public/containers/properties/d229947d-6fa6-4b48-ad4c-5efaad7e11da`,{containerTypes:[this.parentContainerUuid]},{headers:this.headers})}}return n.\u0275fac=function(t){return new(t||n)(Le(oy))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),dr=(()=>{class n{constructor(t){this.http=t}getResources(t,i){return this.http.get(`/assets/resources/${t}-${i}.json`).pipe(Vt(r=>r[0]))}}return n.\u0275fac=function(t){return new(t||n)(Le(oy))},n.\u0275prov=Ze({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Yi=(()=>{class n{constructor(){this.langSubject=new Ar("el"),this.lang$=this.langSubject.asObservable()}setLang(t){this.langSubject.next(t)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const ZH=function(n){return{disappear:n}};let KH=(()=>{class n{constructor(){this.visible=!1,this.message="Loading items..."}ngOnInit(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["app-loader"]],inputs:{visible:"visible",message:"message"},decls:4,vars:4,consts:[[1,"loader",3,"ngClass"],[1,"spinner"],[1,"loader__message"]],template:function(t,i){1&t&&(C(0,"div",0),ge(1,"div",1),C(2,"p",2),A(3),x()()),2&t&&(ne("ngClass",Cn(2,ZH,!i.visible)),B(3),$e(i.message))},directives:[vo],styles:["@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes blink{0%{opacity:1}50%{opacity:.5}95%{opacity:0}to{opacity:0}}.loader[_ngcontent-%COMP%]{position:absolute;inset:0 0 2.5rem;display:flex;flex-direction:column;align-items:center;gap:var(--rds-2);background-color:var(--color-grey-light);padding:var(--rds-5) 1rem 1rem;z-index:99}.loader__logo[_ngcontent-%COMP%]{max-width:12rem}.loader__message[_ngcontent-%COMP%]{color:var(--color-text);font-size:var(--fs-20);font-weight:600;animation:blink 1.75s linear infinite alternate-reverse}.spinner[_ngcontent-%COMP%]{width:var(--rds-8);aspect-ratio:1;border:5px solid var(--color-primary);border-top:5px solid #fff;border-radius:50%;animation:spin 1s linear infinite}"]}),n})();function JH(n,e){1&n&&(C(0,"span"),A(1,","),x())}function QH(n,e){if(1&n&&(C(0,"span"),A(1),x()),2&n){const t=ze();B(1),St(" ",t.date,"")}}let e7=(()=>{class n{constructor(){this.urlLink=[],this.imgUrl="",this.title="",this.date="",this.creator="",this.btnLabel=""}ngOnInit(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["app-artwork-card"]],inputs:{urlLink:"urlLink",imgUrl:"imgUrl",title:"title",date:"date",creator:"creator",btnLabel:"btnLabel"},decls:12,vars:9,consts:[[1,"artwork-card"],[1,"artwork-card__img-wrapper",3,"routerLink"],["loading","lazy",3,"src","alt"],[1,"artwork-card__content"],[1,"artwork-card__title"],[4,"ngIf"],[1,"artwork-card__creator"],[1,"artwork-card__link",3,"routerLink"]],template:function(t,i){1&t&&(C(0,"div",0)(1,"a",1),ge(2,"img",2),x(),C(3,"div",3)(4,"p",4),A(5),We(6,JH,2,0,"span",5),We(7,QH,2,1,"span",5),x(),C(8,"p",6),A(9),x(),C(10,"a",7),A(11),x()()()),2&t&&(B(1),ne("routerLink",i.urlLink),B(1),ne("src",i.imgUrl,us)("alt",i.title),B(3),St(" ",i.title,""),B(1),ne("ngIf",i.title&&i.date),B(1),ne("ngIf",i.date),B(2),St(" ",i.creator," "),B(1),ne("routerLink",i.urlLink),B(1),$e(i.btnLabel))},directives:[Yr,ys],styles:[".artwork-card[_ngcontent-%COMP%]{width:100%;position:relative}.artwork-card__img-wrapper[_ngcontent-%COMP%]{width:100%}.artwork-card__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;object-fit:contain}.artwork-card__content[_ngcontent-%COMP%]{margin-top:1rem;padding:.5rem var(--rds-2);border-left:1.5px solid var(--color-text-light)}.artwork-card__title[_ngcontent-%COMP%]{margin-bottom:.5rem;font-family:var(--ff-secondary);font-size:var(--fs-22);color:var(--color-text-light);line-height:1.1}
1.artwork-card__creator[_ngcontent-%COMP%]{margin-bottom:3rem;font-size:var(--fs-16);font-weight:400}.artwork-card__link[_ngcontent-%COMP%]{padding:.5rem;margin-left:-.5rem;border:0;font-size:var(--fs-14);font-weight:400;transition:color .2s ease-in-out}.artwork-card__link[_ngcontent-%COMP%]:hover{color:var(--color-primary-light)}"]}),n})();function t7(n,e){if(1&n){const t=Hn();C(0,"li")(1,"button",18),Ge("click",function(){return hn(t),ze(2).goToPage(1)}),A(2," 1 "),x()()}}function n7(n,e){1&n&&(C(0,"li")(1,"div",19),dn(),C(2,"svg",20),ge(3,"path",21),x()()())}function i7(n,e){if(1&n){const t=Hn();C(0,"li")(1,"button",22),Ge("click",function(){hn(t);const r=ze(2);return r.goToPage(r.currentPage-1)}),A(2),x()()}if(2&n){const t=ze(2);B(1),Gi("aria-label","Go to page "+(t.currentPage-1)),B(1),St(" ",t.currentPage-1," ")}}function r7(n,e){if(1&n){const t=Hn();C(0,"li")(1,"button",22),Ge("click",function(){hn(t);const r=ze(2);return r.goToPage(r.currentPage+1)}),A(2),x()()}if(2&n){const t=ze(2);B(1),Gi("aria-label","Go to page "+(t.currentPage+1)),B(1),St(" ",t.currentPage+1," ")}}function s7(n,e){1&n&&(C(0,"li")(1,"div",19),dn(),C(2,"svg",20),ge(3,"path",21),x()()())}function o7(n,e){if(1&n){const t=Hn();C(0,"li")(1,"button",22),Ge("click",function(){hn(t);const r=ze(2);return r.goToPage(r.totalPages)}),A(2),x()()}if(2&n){const t=ze(2);B(1),Gi("aria-label","Go to page "+t.totalPages),B(1),St(" ",t.totalPages," ")}}const qf=function(n){return{disabled:n}},a7=function(){return{active:!0}};function l7(n,e){if(1&n){const t=Hn();C(0,"div",1)(1,"button",2),Ge("click",function(){return hn(t),ze().goToPage(1)}),dn(),C(2,"svg",3),ge(3,"path",4)(4,"path",5),x()(),Di(),C(5,"button",6),Ge("click",function(){hn(t);const r=ze();return r.goToPage(r.currentPage-1)}),dn(),C(6,"svg",7),ge(7,"path",8),x()(),Di(),C(8,"ul",9),We(9,t7,3,0,"li",10),We(10,n7,4,0,"li",10),We(11,i7,3,2,"li",10),C(12,"li")(13,"button",11),A(14),x()(),We(15,r7,3,2,"li",10),We(16,s7,4,0,"li",10),We(17,o7,3,2,"li",10),x(),C(18,"button",12),Ge("click",function(){hn(t);const r=ze();return r.goToPage(r.currentPage+1)}),dn(),C(19,"svg",13),ge(20,"path",14),x()(),Di(),C(21,"button",15),Ge("click",function(){hn(t);const r=ze();return r.goToPage(r.totalPages)}),dn(),C(22,"svg",16),ge(23,"path",14)(24,"path",17),x()()()}if(2&n){const t=ze();B(1),ne("ngClass",Cn(13,qf,1===t.currentPage)),B(4),ne("ngClass",Cn(15,qf,1===t.currentPage)),B(4),ne("ngIf",t.currentPage===t.totalPages&&t.totalPages>3&&!t.isMobile),B(1),ne("ngIf",t.currentPage===t.totalPages&&t.totalPages>3&&!t.isMobile),B(1),ne("ngIf",t.currentPage>1&&!t.isMobile),B(2),ne("ngClass",Wr(17,a7)),Gi("aria-label","Go to page "+t.currentPage),B(1),St(" ",t.currentPage," "),B(1),ne("ngIf",t.currentPage<t.totalPages&&!t.isMobile),B(1),ne("ngIf",1===t.currentPage&&t.totalPages>3&&!t.isMobile),B(1),ne("ngIf",1===t.currentPage&&t.totalPages>3&&!t.isMobile),B(1),ne("ngClass",Cn(18,qf,t.currentPage===t.totalPages)),B(3),ne("ngClass",Cn(20,qf,t.currentPage===t.totalPages))}}let c7=(()=>{class n{constructor(){this.currentPage=1,this.totalPages=18,this.pageChange=new sn,this.isMobile=!1}ngOnInit(){window.screen.width<600&&(this.isMobile=!0)}goToPage(t){t>=1&&t<=this.totalPages&&t!==this.currentPage&&this.pageChange.emit(t-1)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["app-pagination"]],inputs:{currentPage:"currentPage",totalPages:"totalPages"},outputs:{pageChange:"pageChange"},decls:1,vars:1,consts:[["class","pagination",4,"ngIf"],[1,"pagination"],["aria-label","Go to first page",1,"pagination__start",3,"ngClass","click"],["width","17","height","9","viewBox","0 0 17 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M16.5625 2.33594L11.5391 4.53125L16.5625 7.00781L16.5625 8.88281L9.125 5.00781L9.125 3.89062L16.5625 0.46875L16.5625 2.33594Z","fill","#2a383c"],["d","M7.4375 2.33594L2.41406 4.53125L7.4375 7.00781L7.4375 8.88281L3.38763e-07 5.00781L4.36431e-07 3.89062L7.4375 0.468749L7.4375 2.33594Z","fill","#2a383c"],["aria-label","Go to previous page",1,"pagination__previous",3,"ngClass","click"],["width","8","height","9","viewBox","0 0 8 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.5625 2.33594L2.53906 4.53125L7.5625 7.00781L7.5625 8.88281L0.125 5.00781L0.125 3.89062L7.5625 0.46875L7.5625 2.33594Z","fill","#2a383c"],[1,"pagination__list"],[4,"ngIf"],[1,"pagination__btn",3,"ngClass"],["aria-label","Go to
1next page",1,"pagination__next",3,"ngClass","click"],["width","9","height","9","viewBox","0 0 9 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M0.84375 7.01562L5.86719 4.82031L0.84375 2.34375V0.46875L8.28125 4.34375V5.46094L0.84375 8.88281V7.01562Z","fill","#2a383c"],["aria-label","Go to last page",1,"pagination__end",3,"ngClass","click"],["width","18","height","9","viewBox","0 0 18 9","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M9.96875 7.01562L14.9922 4.82031L9.96875 2.34375V0.46875L17.4062 4.34375V5.46094L9.96875 8.88281V7.01562Z","fill","#2a383c"],["aria-label","Go to page 1",1,"pagination__btn",3,"click"],[1,"pagination__dots"],["width","13","height","4","viewBox","0 0 13 4","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M0.914062 1.88281C0.914062 1.63802 0.947917 1.43229 1.01562 1.26562C1.08854 1.09375 1.1875 0.955729 1.3125 0.851562C1.4375 0.747396 1.58333 0.671875 1.75 0.625C1.91667 0.578125 2.09635 0.554688 2.28906 0.554688C2.47135 0.554688 2.64323 0.578125 2.80469 0.625C2.97135 0.671875 3.11719 0.747396 3.24219 0.851562C3.36719 0.955729 3.46615 1.09375 3.53906 1.26562C3.61198 1.43229 3.64844 1.63802 3.64844 1.88281C3.64844 2.11719 3.61198 2.31771 3.53906 2.48438C3.46615 2.65104 3.36719 2.78906 3.24219 2.89844C3.11719 3.00781 2.97135 3.08594 2.80469 3.13281C2.64323 3.1849 2.47135 3.21094 2.28906 3.21094C2.09635 3.21094 1.91667 3.1849 1.75 3.13281C1.58333 3.08594 1.4375 3.00781 1.3125 2.89844C1.1875 2.78906 1.08854 2.65104 1.01562 2.48438C0.947917 2.31771 0.914062 2.11719 0.914062 1.88281ZM5.47656 1.88281C5.47656 1.63802 5.51042 1.43229 5.57812 1.26562C5.65104 1.09375 5.75 0.955729 5.875 0.851562C6 0.747396 6.14583 0.671875 6.3125 0.625C6.47917 0.578125 6.65885 0.554688 6.85156 0.554688C7.03385 0.554688 7.20573 0.578125 7.36719 0.625C7.53385 0.671875 7.67969 0.747396 7.80469 0.851562C7.92969 0.955729 8.02865 1.09375 8.10156 1.26562C8.17448 1.43229 8.21094 1.63802 8.21094 1.88281C8.21094 2.11719 8.17448 2.31771 8.10156 2.48438C8.02865 2.65104 7.92969 2.78906 7.80469 2.89844C7.67969 3.00781 7.53385 3.08594 7.36719 3.13281C7.20573 3.1849 7.03385 3.21094 6.85156 3.21094C6.65885 3.21094 6.47917 3.1849 6.3125 3.13281C6.14583 3.08594 6 3.00781 5.875 2.89844C5.75 2.78906 5.65104 2.65104 5.57812 2.48438C5.51042 2.31771 5.47656 2.11719 5.47656 1.88281ZM10.0391 1.88281C10.0391 1.63802 10.0729 1.43229 10.1406 1.26562C10.2135 1.09375 10.3125 0.955729 10.4375 0.851562C10.5625 0.747396 10.7083 0.671875 10.875 0.625C11.0417 0.578125 11.2214 0.554688 11.4141 0.554688C11.5964 0.554688 11.7682 0.578125 11.9297 0.625C12.0964 0.671875 12.2422 0.747396 12.3672 0.851562C12.4922 0.955729 12.5911 1.09375 12.6641 1.26562C12.737 1.43229 12.7734 1.63802 12.7734 1.88281C12.7734 2.11719 12.737 2.31771 12.6641 2.48438C12.5911 2.65104 12.4922 2.78906 12.3672 2.89844C12.2422 3.00781 12.0964 3.08594 11.9297 3.13281C11.7682 3.1849 11.5964 3.21094 11.4141 3.21094C11.2214 3.21094 11.0417 3.1849 10.875 3.13281C10.7083 3.08594 10.5625 3.00781 10.4375 2.89844C10.3125 2.78906 10.2135 2.65104 10.1406 2.48438C10.0729 2.31771 10.0391 2.11719 10.0391 1.88281Z","fill","black"],[1,"pagination__btn",3,"click"]],template:function(t,i){1&t&&We(0,l7,25,22,"div",0),2&t&&ne("ngIf",i.totalPages>1)},directives:[ys,vo],styles:[".pagination[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:1rem}.pagination__list[_ngcontent-%COMP%]{display:flex;align-items:flex-end;justify-content:space-evenly;gap:1.5rem}.pagination__btn[_ngcontent-%COMP%]{display:inline-block;display:grid;place-items:center;min-width:2.5rem;aspect-ratio:1;background-color:transparent;border:1.5px solid var(--color-primary);font-size:var(--fs-16);font-weight:700;transition:background-color .2s ease-in-out,color .2s ease-in-out}.pagination__btn[_ngcontent-%COMP%]:hover, .pagination__btn.active[_ngcontent-%COMP%]{background-color:var(--color-primary);color:var(--color-white)}.pagination__start[_ngcontent-%COMP%], .pagination__previous[_ngcontent-%COMP%], .pagination__next[_ngcontent-%COMP%], .pagination__end[_ngcontent-%COMP%]{padding:.25rem .5rem;background-color:transparent;border:0}.pagination[_ngcontent-%COMP%] button.disabled[_ngcontent-%COMP%]{opacity:.25;pointer-events:none}"]}),n})();function u7(n,e){if(1&n&&(C(0,"option",34),A(1),x()),2&n){const t=e.$implicit;ne("value",t.value),B(1),St(" ",t.label," ")}}const u2=function(n){return{closed:n}};let h7=(()=>{class n{constructor(t,i,r,s){this.dataService=t,this.fb=i,this.resourcesService=r,this.langService=s,this.isFiltersOpen=!1,this.creatorList=[],this.closeFilters=new sn,this.newListOptions=new sn,this.resources={},this.langSub=new Bt,this.titleSearchUuid="d2640abe-cac4-4066-8756-3104654266b2",this.creatorSearchUuid="d229947d-6fa6-4b48-ad4c-5efaad7e11da",this.idSearchUuid="cd603028-7b3d-4afd-b784-f6b88993d3bc",this.threeDSearchUuid="03ed90c4-453d-447e-b872-ba0fa8f69866",this.searchForm=this.fb.group({artworkId:"",title:"",creator:"",include3D:!1})}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("filters",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)})}onSubmit(){var t,i,r,s;Object.values(this.searchForm.controls).some(({value:a})=>!!a||0===a)?(this.dataService.searchData={value:"",containerTypes:[],propertyValueFilters:[]},(null===(t=this.searchForm.get("include3D"))||void 0===t?void 0:t.value)&&this.dataService.searchData.propertyValueFilters.push({propertyUuid:this.threeDSearchUuid,propertyValue:["3d"],logicalOperator:"AN
1D",operator:"EQUALS"}),(null===(i=this.searchForm.get("artworkId"))||void 0===i?void 0:i.value)&&this.dataService.searchData.propertyValueFilters.push({propertyUuid:this.idSearchUuid,propertyValue:this.searchForm.value.artworkId,logicalOperator:"AND",operator:"EQUALS"}),(null===(r=this.searchForm.get("title"))||void 0===r?void 0:r.value)&&this.dataService.searchData.propertyValueFilters.push({propertyUuid:this.titleSearchUuid,propertyValue:this.searchForm.value.title.toLowerCase(),logicalOperator:"AND",operator:"CONTAINS"}),(null===(s=this.searchForm.get("creator"))||void 0===s?void 0:s.value)&&this.dataService.searchData.propertyValueFilters.push({propertyUuid:this.creatorSearchUuid,propertyValue:[this.searchForm.value.creator],logicalOperator:"AND",operator:"EQUALS"})):this.dataService.searchData={value:"",containerTypes:[this.dataService.parentContainerUuid],propertyValueFilters:[]},this.dataService.paginationData=this.dataService.defaultPaginationData,this.newListOptions.emit(),this.closeFilters.emit()}onCloseFilters(){this.isFiltersOpen=!1,this.closeFilters.emit()}onClearFilters(){var t,i,r,s;this.dataService.searchData={value:"",containerTypes:[this.dataService.parentContainerUuid],propertyValueFilters:[]},null===(t=this.searchForm.get("artworkId"))||void 0===t||t.setValue(""),null===(i=this.searchForm.get("title"))||void 0===i||i.setValue(""),null===(r=this.searchForm.get("creator"))||void 0===r||r.setValue(""),null===(s=this.searchForm.get("include3D"))||void 0===s||s.setValue(!1)}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(a0),Y(F6),Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-filters-combined"]],inputs:{isFiltersOpen:"isFiltersOpen",creatorList:"creatorList"},outputs:{closeFilters:"closeFilters",newListOptions:"newListOptions"},decls:45,vars:18,consts:[[1,"filters__overlay",3,"ngClass","click"],[1,"filters",3,"ngClass"],[1,"filters__header"],["width","24","height","21","viewBox","0 0 24 21","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M1 2.28125C0.447715 2.28125 0 2.72897 0 3.28125C0 3.83353 0.447715 4.28125 1 4.28125V2.28125ZM1 4.28125H11.5V2.28
1125H1V4.28125Z","fill","white"],["d","M22.6562 4.28125C23.2085 4.28125 23.6562 3.83353 23.6562 3.28125C23.6562 2.72897 23.2085 2.28125 22.6562 2.28125V4.28125ZM17.4062 4.28125H22.6562V2.28125H17.4062V4.28125Z","fill","white"],["cx","14.7812","cy","3.28125","r","2.28125","stroke","white","stroke-width","2"],["d","M1 16.7188C0.447715 16.7188 0 17.1665 0 17.7188C0 18.271 0.447715 18.7188 1 18.7188V16.7188ZM1 18.7188H11.5V16.7188H1V18.7188Z","fill","white"],["d","M22.6562 18.7188C23.2085 18.7188 23.6562 18.271 23.6562 17.7188C23.6562 17.1665 23.2085 16.7188 22.6562 16.7188V18.7188ZM17.4062 18.7188H22.6562V16.7188H17.4062V18.7188Z","fill","white"],["cx","14.7812","cy","17.7188","r","2.28125","stroke","white","stroke-width","2"],["d","M22.6563 11.5C23.2085 11.5 23.6562 11.0523 23.6563 10.5C23.6562 9.94771 23.2085 9.5 22.6562 9.5L22.6563 11.5ZM22.6562 9.5L12.8125 9.5L12.8125 11.5L22.6563 11.5L22.6562 9.5Z","fill","white"],["d","M1 9.5C0.447715 9.5 4.82823e-08 9.94771 0 10.5C-4.82823e-08 11.0523 0.447715 11.5 1 11.5L1 9.5ZM6.25 9.5L1 9.5L1 11.5L6.25 11.5L6.25 9.5Z","fill","white"],["cx","9.53125","cy","10.5","r","2.28125","transform","rotate(-180 9.53125 10.5)","stroke","white","stroke-width","2"],[1,"filters__header-title"],["aria-label","Close filters",1,"filters__close",3,"click"],["width","23","height","23","viewBox","0 0 23 23","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M23 2.31643L20.6836 0L11.5 9.18357L2.31643 0L0 2.31643L9.18357 11.5L0 20.6836L2.31643 23L11.5 13.8164L20.6836 23L23 20.6836L13.8164 11.5L23 2.31643Z","fill","white"],[1,"filters__main"],[1,"filters__main-title"],[3,"formGroup","ngSubmit"],[1,"filters__control"],["for","title",1,"filters__label"],[1,"filters__input-wrapper"],["id","title","name","title","type","text","formControlName","title",1,"filters__input","search__input",3,"placeholder"],["for","creator",1,"filters__label"],["id","creator","name","creator","formControlName","creator",1,"filters__input","search__input","filters-select"],["value",""],[3,"value",4,"ngFor","ngForOf"],[1,"filters__checkbox-wrapper"],["id","threeD","name","threeD","type","checkbox","formControlName","include3D",1,"filters__checkbox"],["for","threeD",1,"filters__checkbox-label"],[1,"filters__btn-wrapper"],["type","submit",1,"filters__btn",3,"disabled"],[1,"filters__clear-btn",3,"click"],[3,"value"]],template:function(t,i){1&t&&(C(0,"div",0),Ge("click",function(){return i.onCloseFilters()}),x(),C(1,"div",1)(2,"div",2),dn(),C(3,"svg",3),ge(4,"path",4)(5,"path",5)(6,"circle",6)(7,"path",7)(8,"path",8)(9,"circle",9)(10,"path",10)(11,"path",11)(12,"circle",12),x(),Di(),C(13,"p",13),A(14),x(),C(15,"button",14),Ge("click",function(){return i.onCloseFilters()}),dn(),C(16,"svg",15),ge(17,"path",16),x()()(),Di(),C(18,"div",17)(19,"div",18)(20,"p",18),A(21),x()(),C(22,"form",19),Ge("ngSubmit",function(){return i.onSubmit()}),C(23,"div",20)(24,"label",21),A(25),x(),C(26,"div",22),ge(27,"input",23),x()(),C(28,"div",20)(29,"label",24),A(30),x(),C(31,"div",22)(32,"select",25)(33,"option",26),A(34),x(),We(35,u7,2,2,"option",27),x()()(),C(36,"div",28),ge(37,"input",29),C(38,"label",30),A(39),x()(),C(40,"div",31)(41,"button",32),A(42),x(),C(43,"button",33),Ge("click",function(){return i.onClearFilters()}),A(44),x()()()()()),2&t&&(ne("ngClass",Cn(14,u2,!i.isFiltersOpen)),B(1),ne("ngClass",Cn(16,u2,!i.isFiltersOpen)),B(13),$e(i.resources.filtersTitle),B(7),$e(i.resources.searchTitle),B(1),ne("formGroup",i.searchForm),B(3),$e(i.resources.byTitleLabel),B(2),ne("placeholder",i.resources.titlePlaceholder),B(3),$e(i.resources.byCreatorLabel),B(4),$e(i.resources.creatorPlaceholder),B(1),ne("ngForOf",i.creatorList),B(4),$e(i.resources.threeDLabel),B(2),ne("disabled",i.searchForm.invalid),B(1),St(" ",i.resources.searchBtnLabel," "),B(2),St(" ",i.resources.clearFiltersLabel," "))},directives:[vo,Dy,my,Df,gf,py,Oy,qu,Ly,Ny,vs,uy],styles:['@charset "UTF-8";.filters[_ngcontent-%COMP%]{position:fixed;top:0;right:0;width:min(100%,25rem);min-height:100vh;background-color:var(--color-white);transition:transform .2s ease-in-out;z-index:101}.filters__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem var(--rds-2);background-color:var(--color-primary);color:var(--color-white)}.filters__header-title[_ngcontent-%COMP%]{font-size:var(--fs-16);font-weight:700;margin-right:auto}.filters__main[_ngcontent-%COMP%]{height:calc(100vh - 6rem);padding:1rem var(--rds-2);overflow-y:auto}.filters__main-title[_ngcontent-%COMP%]{font-size:var(--fs-16);margin-bottom:2rem}.filters__close[_ngcontent-%COMP%]{background-color:transparent;border:0}.filters__control[_ngcontent-%COMP%]{margin-bottom:3.5rem}.filters__control[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start}.filters__label[_ngcontent-%COMP%]{font-size:var(--fs-16);font-weight:700;margin-bottom:.5rem}.filters__input-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;min-height:4rem;border-left:1.5px solid var(--color-primary-light);border-bottom:1.5px solid var(--color-primary-light);position:relative}.filters__input[_ngcontent-%COMP%]{padding:.5rem;margin-left:1.5rem;outline:0;color:var(--color-text);border:1.5px solid var(--color-primary-light);transform:translateY(50%)}.filters__input[_ngcontent-%COMP%]:focus-within{border-width:2px}.filters__btn[_ngcontent-%COMP%]{margin-top:2rem;margin-left:1.5rem;padding:.5em 1.5em;background-color:var(--color-primary-light);border:1.5px solid var(--color-primary-light);color:var(--color-white)}.filters__clear-btn[_ngcontent-%COMP%]{padding:.5em 1.5em;margin-left:1.5rem;background-color:var(--color-white);border:1.5px solid var(--color-primary-light);transition:background-color .2s ease-in-out,color .2s ease-in-out}.filters__clear-btn[_ngcontent-%COMP%]:hover{background-color:var(--color-primary-light);color:var(--color-white)}.filters.closed[_ngcontent-%COMP%]{transform:translate(100%)}.filters__overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:var(--color-black);opacity:.5;transition:transform .2s ease-in-out;z-index:100}.filters__overlay.closed[_ngcontent-%COMP%]{display:none}.filters__checkbox-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem}.filters__checkbox[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:1.5rem;aspect-ratio:1;border:1.5px solid var(--color-primary-light);cursor:pointer;border:2px solid var(--color-primary-light);appearance:none;background-color:transparent}.filters__checkbox[_ngcontent-%COMP%]:checked:after{content:"\\2714";color:var(--color-primary-light);font-weight:700}.filters__checkbox-label[_ngcontent-%COMP%]{font-size:var(--fs-16);font-weight:700}.filters-select[_ngcontent-%COMP%]{padding:.6rem}.filters-select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{color:inherit;background-color:var(--color-bg)}']}),n})();function d7(n,e){if(1&n&&(C(0,"option",42),A(1),x()),2&n){const t=e.$implicit;ne("value",t.uuid),B(1),St(" ",t.name," ")}}function f7(n,e){if(1&n){const t=Hn();C(0,"form",35,36)(2,"label",37),A(3),x(),C(4,"div",38)(5,"select",39),Ge("ngModelChange",function(r){return hn(t),ze().selectedOption=r})("ngModelChange",function(){return hn(t),ze().onOptionChange()}),C(6,"option",40),A(7),x(),We(8,d7,2,2,"option",41),x()()()}if(2&n){const t=ze();B(3),St("",t.resources.selectlabel,":"),B(2),ne("ngModel",t.selectedOption),B(2),St("-- ",t.resources.selectlabel," --"),B(1),ne("ngForOf",t.selectOptions)}}function p7(n,e){1&n&&(C(0,"span",48),A(1," | "),x())}function m7(n,e){if(1&n&&(C(0,"span",49),A(1),x()),2&n){const t=ze(2);B(1),St("",t.resources.appearLabel," ")}}function g7(n,e){if(1&n&&(C(0,"span",50),A(1),x()),2&n){const t=ze(2);B(1),Y_("",t.paginationData.currentPage*t.paginationData.pageSize+1," - ",t.paginationData.currentPage*t.paginationData.pageSize+t.paginationData.pageElements,"")}}function _7(n,e){if(1&n&&(C(0,"p")(1,"span",43),A(2),x(),C(3,"span",44),A(4),x(),We(5,p7,2,0,"span",45),We(6,m7,2,1,"span",46),We(7,g7,2,2,"span",47),x()),2&n){const t=ze();B(2),St("",t.resources.resultsLabel," "),B(2),$e(t.totalItems),B(1),ne("ngIf",t.totalItems),B(1),ne("ngIf",t.totalItems),B(1),ne("ngIf",t.totalItems)}}const Yf=function(n){return["/artworks",n]};function v7(n,e){if(1&n&&ge(0,"app-artwork-card",57),2&n){const t=e.$implicit,i=ze(2);let r;ne("urlLink",Cn(6,Yf,t.uuid))("imgUrl",t.thumbnails.medium?t.thumbnails.medium:t.imageUrl)("title",t.title)("creator",t.creator)("date",t.date)("btnLabel",null!==(r=i.resources.cardBtnLabel)&&void 0!==r?r:"")}}function y7(n,e){if(1&n&&ge(0,"app-artwork-card",57),2&n){const t=e.$implicit,i=ze(2);ne("urlLink",Cn(6,Yf,t.uuid))("imgUrl",t.thumbnails.medium?t.thumbnails.medium:t.imageUrl)("title",t.title)("creator",t.creator)("date",t.date)("btnLabel",i.resources.cardBtnLabel||"")}}function b7(n,e){if(1&n&&ge(0,"app-artwork-card",57),2&n){const t=e.$implicit,i=ze(2);ne("urlLink",Cn(6,Yf,t.uuid))("imgUrl",t.thumbnails.medium?t.thumbnails.medium:t.imageUrl)("title",t.title)("creator",t.creator)("date",t.date)("btnLabel",i.resources.cardBtnLabel||"")}}function x7(n,e){if(1&n&&ge(0,"app-artwork-card",57),2&n){const t=e.$implicit,i=ze(2);ne("urlLink",Cn(6,Yf,t.uuid))("imgUrl",t.thumbnails.medium?t.thumbnails.medium:t.imageUrl)("title",t.title)("creator",t.creator)("date",t.date)("btnLabel",i.resources.cardBtnLabel||"")}}function w7(n,e){if(1&n&&(C(0,"div",51)(1,"div",52),We(2,v7,1,8,"app-artwork-card",53),x(),C(3,"div",54),We(4,y7,1,8,"app-artwork-card",53),x(),C(5,"div",55),We(6,b7,1,8,"app-artwork-card",53),x(),C(7,"div",56),We(8,x7,1,8,"app-artwork-card",53),x()()),2&n){const t=ze();B(2),ne("ngForOf",t.itemSubList1)("ngForTrackBy",t.trackByItemId),B(2),ne("ngForOf",t.itemSubList2)("ngForTrackBy",t.trackByItemId),B(2),ne("ngForOf",t.itemSubList3)("ngForTrackBy",t.trackByItemId),B(2),ne("ngForOf",t.itemSubList4)("ngForTrackBy",t.trackByItemId)}}function M7(n,e){if(1&n&&(C(0,"div",58)(1,"p",59),A(2),x()()),2&n){const t=ze();B(2),St(" ",t.resources.noResultsText," ")}}function C7(n,e){if(1&n){const t=Hn();C(0,"app-pagination",60),Ge("pageChange",function(r){return hn(t),ze().onPageChange(r)}),x()}if(2&n){const t=ze();ne("currentPage",t.paginationData.currentPage+1)("totalPages",t.paginationData.totalPages)}}function S7(n,e){if(1&n){const t=Hn();C(0,"div",61),Ge("click",function(){return hn(t),ze().onBannerClose()}),C(1,"div",62)(2,"button",63),dn(),C(3,"svg",64),ge(4,"path",65),x()(),Di(),ge(5,"img",66),x()()}}let E7=(()=>{class n{constructor(t,i,r){this.dataService=t,this.resourcesService=i,this.langService=r,this.resources={},this.showBanner=!0,this.showSelectMenu=!0,this.showLoader=!1,this.message="Loading items...",this.items=[],this.itemSubList1=[],this.itemSubList2=[],this.itemSubList3=[],this.itemSubList4=[],this.totalItems=0,this.selectOptions=[],this.allSelectOptionsUuids=[],this.selectedOption="",this.paginationData={currentPage:0,pageSize:16,pageElements:0,totalPages:1},this.searchData=null,this.columns=4,this.noResults=!1,this.isFiltersOpen=!1,this.creatorList=[],this.listSub=new Bt,this.langSub=new Bt,this.collectionsSub=new Bt,this.creatorsListSub=new Bt}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("artworks",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)}),this.paginationData=this.dataService.paginationData,this.searchData=this.dataService.searchData,this.showBanner=this.dataService.showEspaBanner,this.collectionsSub=this.dataService.getDropdownCollections().subscribe({next:t=>{let i=0;t.length>0&&(t.length>3&&(i=2),this.selectOptions=t,this.dataService.parentContainerUuid=t[i].uuid,this.dataService.searchData&&(this.dataService.searchData.containerTypes=[t[i].uuid]),this.selectedOption=t[i].uuid,this.fetchList(this.paginationData,this.searchData))},error:t=>{this.noResults=!0,this.totalItems=0,this.showLoader=!1}}),this.creatorsListSub=this.dataService.getCreatorsList().subscribe({next:t=>this.creatorList=t.options,error:t=>console.log(t)})}fetchList(t,i){this.showLoader=!0,this.scrollToTop(),this.listSub=this.dataService.getList(t,i).subscribe({next:r=>{if(this.totalItems=r.pageData.totalElements,!r||0===r.childrenDetails.length)return this.noResults=!0,this.totalItems=0,void(this.showLoader=!1);this.noResults=!1;const s=[];
1r.childrenDetails.forEach(o=>{var a,l,c,u,h,d,f,p,_,g,m,v,y,b,T,S,P;const I={title:null!==(c=null===(l=null===(a=o.properties)||void 0===a?void 0:a.find(w=>"p:syllogi-titlos"===w.property.slug))||void 0===l?void 0:l.valueAsText)&&void 0!==c?c:"",creator:null!==(d=null===(h=null===(u=o.properties)||void 0===u?void 0:u.find(w=>"p:p:syllogi-dhmioyrgos"===w.property.slug))||void 0===h?void 0:h.valueAsText)&&void 0!==d?d:"",type:null!==(_=null===(p=null===(f=o.properties)||void 0===f?void 0:f.find(w=>"p:p:europeana-typos"===w.property.slug))||void 0===p?void 0:p.valueAsText)&&void 0!==_?_:"",date:null!==(v=null===(m=null===(g=o.properties)||void 0===g?void 0:g.find(w=>"p:p:syllogi-xronologia"===w.property.slug))||void 0===m?void 0:m.valueAsText)&&void 0!==v?v:"",imageUrl:(null===(y=o.coverFile)||void 0===y?void 0:y.viewUrl)?null===(b=o.coverFile)||void 0===b?void 0:b.viewUrl:"/assets/images/default-image.png",thumbnails:{small:(null===(T=o.coverFile)||void 0===T?void 0:T.thumbnails.smallUrl)||"/assets/images/default-image.png",medium:(null===(S=o.coverFile)||void 0===S?void 0:S.thumbnails.mediumUrl)||"/assets/images/default-image.png",large:(null===(P=o.coverFile)||void 0===P?void 0:P.thumbnails.largeUrl)||"/assets/images/default-image.png"},uuid:o.uuid};s.push(I)}),this.items=s,this.dataService.paginationData={currentPage:r.pageData.number,pageSize:r.pageData.size,totalPages:r.pageData.totalPages},this.paginationData=this.dataService.paginationData,this.paginationData.pageElements=r.pageData.numberOfElements,this.updateItemSubLists(this.items,this.columns),this.showLoader=!1},error:r=>{this.noResults=!0,this.totalItems=0,this.showLoader=!1}})}updateItemSubLists(t,i){this.itemSubList1=this.createSubList(t,i,0),this.itemSubList2=this.createSubList(t,i,1),this.itemSubList3=this.createSubList(t,i,2),this.itemSubList4=this.createSubList(t,i,3)}createSubList(t,i,r){return t.map((a,l)=>l).filter(a=>a%i===r).map(a=>t[a])}onPageChange(t){this.dataService.paginationData=Object.assign(Object.assign({},this.paginationData),{currentPage:t}),this.paginationData=this.dataService.paginationData,this.fetchList(this.paginationData,this.searchData)}onNewListOptions(){this.noResults=!1,this.searchData=this.dataService.searchData,this.paginationData=this.dataService.paginationData,this.fetchList(this.paginationData,this.searchData)}onCloseFilters(){this.isFiltersOpen=!1}toggleFilters(){this.isFiltersOpen=!this.isFiltersOpen}onOptionChange(){this.selectedOption?(this.dataService.parentContainerUuid=this.selectedOption,this.dataService.paginationData=this.dataService.defaultPaginationData,this.dataService.searchData={value:"",containerTypes:[this.selectedOption],propertyValueFilters:[]},this.paginationData=this.dataService.paginationData,this.searchData=this.dataService.searchData,this.fetchList(this.paginationData,this.searchData),this.creatorsListSub=this.dataService.getCreatorsList().subscribe({next:t=>this.creatorList=t.options,error:t=>console.log(t)})):this.fetchList(this.paginationData,this.searchData)}onExitFullscreen(){this.showBanner=!1}onBannerClose(){this.dataService.showEspaBanner=!1,this.showBanner=!1}trackByItemId(t,i){return i.uuid}scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}ngOnDestroy(){this.listSub&&this.listSub.unsubscribe(),this.langSub&&this.langSub.unsubscribe(),this.collectionsSub&&this.collectionsSub.unsubscribe(),this.creatorsListSub&&this.creatorsListSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(a0),Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-artworks"]],decls:40,vars:13,consts:[[1,"hero"],[1,"hero__content","cont"],[1,"hero__title"],[1,"hero__subtitle"],[1,"hero__search"],[1,"filter-btn",3,"click"],["width","24","height","21","viewBox","0 0 24 21","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M1 2.28125C0.447715 2.28125 0 2.72897 0 3.28125C0 3.83353 0.447715 4.28125 1 4.28125V2.28125ZM1 4.28125H11.5V2.28
1125H1V4.28125Z","fill","white"],["d","M22.6562 4.28125C23.2085 4.28125 23.6562 3.83353 23.6562 3.28125C23.6562 2.72897 23.2085 2.28125 22.6562 2.28125V4.28125ZM17.4062 4.28125H22.6562V2.28125H17.4062V4.28125Z","fill","white"],["cx","14.7812","cy","3.28125","r","2.28125","stroke","white","stroke-width","2"],["d","M1 16.7188C0.447715 16.7188 0 17.1665 0 17.7188C0 18.271 0.447715 18.7188 1 18.7188V16.7188ZM1 18.7188H11.5V16.7188H1V18.7188Z","fill","white"],["d","M22.6562 18.7188C23.2085 18.7188 23.6562 18.271 23.6562 17.7188C23.6562 17.1665 23.2085 16.7188 22.6562 16.7188V18.7188ZM17.4062 18.7188H22.6562V16.7188H17.4062V18.7188Z","fill","white"],["cx","14.7812","cy","17.7188","r","2.28125","stroke","white","stroke-width","2"],["d","M22.6563 11.5C23.2085 11.5 23.6562 11.0523 23.6563 10.5C23.6562 9.94771 23.2085 9.5 22.6562 9.5L22.6563 11.5ZM22.6562 9.5L12.8125 9.5L12.8125 11.5L22.6563 11.5L22.6562 9.5Z","fill","white"],["d","M1 9.5C0.447715 9.5 4.82823e-08 9.94771 0 10.5C-4.82823e-08 11.0523 0.447715 11.5 1 11.5L1 9.5ZM6.25 9.5L1 9.5L1 11.5L6.25 11.5L6.25 9.5Z","fill","white"],["cx","9.53125","cy","10.5","r","2.28125","transform","rotate(-180 9.53125 10.5)","stroke","white","stroke-width","2"],["d","M22.6562 18.7188C23.2085 18.7188 23.6562 18.271 23.6562 17.7188C23.6563 17.1665 23.2085 16.7188 22.6563 16.7188L22.6562 18.7188ZM22.6563 16.7188L12.1563 16.7187L12.1562 18.7187L22.6562 18.7188L22.6563 16.7188Z","fill","white"],["d","M1 16.7187C0.447715 16.7187 4.82823e-08 17.1665 0 17.7187C-4.82823e-08 18.271 0.447715 18.7187 1 18.7187L1 16.7187ZM6.25 16.7188L1 16.7187L1 18.7187L6.25 18.7188L6.25 16.7188Z","fill","white"],["cx","8.875","cy","17.7188","r","2.28125","transform","rotate(-180 8.875 17.7188)","stroke","white","stroke-width","2"],["d","M22.6562 4.28125C23.2085 4.28125 23.6562 3.83353 23.6562 3.28125C23.6563 2.72897 23.2085 2.28125 22.6563 2.28125L22.6562 4.28125ZM22.6563 2.28125L12.1563 2.28125L12.1562 4.28125L22.6562 4.28125L22.6563 2.28125Z","fill","white"],["d","M1 2.28125C0.447715 2.28125 4.82823e-08 2.72896 0 3.28125C-4.82823e-08 3.83353 0.447715 4.28125 1 4.28125L1 2.28125ZM6.25 2.28125L1 2.28125L1 4.28125L6.25 4.28125L6.25 2.28125Z","fill","white"],["cx","8.875","cy","3.28125","r","2.28125","transform","rotate(-180 8.875 3.28125)","stroke","white","stroke-width","2"],["d","M1 9.5C0.447715 9.5 9.65644e-08 9.94772 0 10.5C-3.69601e-08 11.0523 0.447715 11.5 1 11.5L1 9.5ZM1 11.5L10.8437 11.5L10.8438 9.5L1 9.5L1 11.5Z","fill","white"],["d","M22.6562 11.5C23.2085 11.5 23.6562 11.0523 23.6562 10.5C23.6563 9.94772 23.2085 9.5 22.6563 9.5L22.6562 11.5ZM17.4062 11.5L22.6562 11.5L22.6563 9.5L17.4063 9.5L17.4062 11.5Z","fill","white"],["cx","14.125","cy","10.5","r","2.28125","stroke","white","stroke-width","2"],[1,"artworks","cont-lg"],[3,"visible","message"],["class","select-form",4,"ngIf"],[1,"artworks__info"],[4,"ngIf"],["class","artworks__content",4,"ngIf"],["class","artworks__no-results",4,"ngIf"],[3,"currentPage","totalPages","pageChange",4,"ngIf"],[3,"isFiltersOpen","creatorList","closeFilters","newListOptions"],["class","espa-banner",3,"click",4,"ngIf"],[1,"select-form"],["myForm","ngForm"],["for","selectOption"],[1,"select"],["id","selectOption","name","selectOption","required","",1,"collections-select",3,"ngModel","ngModelChange"],["value","","disabled",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"artworks__results-text"],[1,"artworks__results-number"],["class","artworks__results-divider",4,"ngIf"],["class","artworks__appear-text",4,"ngIf"],["class","artworks__appear-number",4,"ngIf"],[1,"artworks__results-divider"],[1,"artworks__appear-text"],[1,"artworks__appear-number"],[1,"artworks__content"],[1,"artworks__content-col--1"],[3,"urlLink","imgUrl","title","creator","date","btnLabel",4,"ngFor","ngForOf","ngForTrackBy"],[1,"artworks__content-col--2"],[1,"artworks__content-col--3"],[1,"artworks__content-col--4"],[3,"urlLink","imgUrl","title","creator","date","btnLabel"],[1,"artworks__no-results"],[1,"artworks__no-results-text"],[3,"currentPage","totalPages","pageChange"],[1,"espa-banner",3,"click"],[1,"espa-banner__wrapper"],["aria-label","Close banner",1,"espa-banner__close-btn"],["width","23","height","23","viewBox","0 0 23 23","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M23 2.31643L20.6836 0L11.5 9.18357L2.31643 0L0 2.31643L9.18357 11.5L0 20.6836L2.31643 23L11.5 13.8164L20.6836 23L23 20.6836L13.8164 11.5L23 2.31643Z","fill","black"],["src","/assets/images/espa-banner-mpa.jpg","alt","ESPA logo"]],template:function(t,i){1&t&&(C(0,"section",0)(1,"div",1)(2,"h1",2),A(3),x(),C(4,"p",3),A(5),x(),C(6,"div",4)(7,"button",5),Ge("click",function(){return i.toggleFilters()}),C(8,"span"),A(9),x(),dn(),C(10,"svg",6),ge(11,"path",7)(12,"path",8)(13,"circle",9)(14,"path",10)(15,"path",11)(16,"circle",12)(17,"path",13)(18,"path",14)(19,"circle",15),x(),C(20,"svg",6),ge(21,"path",16)(22,"path",17)(23,"circle",18)(24,"path",19)(25,"path",20)(26,"circle",21)(27,"path",22)(28,"path",23)(29,"circle",24),x()()()()(),Di(),C(30,"section",25),ge(31,"app-loader",26),We(32,f7,9,4,"form",27),C(33,"div",28),We(34,_7,8,5,"p",29),x(),We(35,w7,9,8,"div",30),We(36,M7,3,1,"div",31),We(37,C7,1,2,"app-pagination",32),x(),C(38,"app-filters-combined",33),Ge("closeFilters",function(){return i.onCloseFilters()})("newListOptions",function(){return i.onNewListOptions()}),x(),We(39,S7,6,0,"div",34)),2&t&&(B(3),$e(i.resources.title),B(2),St(" ",i.resources.subtitle," "),B(4),$e(i.resources.filterBtnLabel),B(22),ne("visible",i.showLoader)("message",i.message),B(1),ne("ngIf",i.showSelectMenu),B(2),ne("ngIf",i.paginationData.pageElements),B(1),ne("ngIf",!i.noResults),B(1),ne("ngIf",i.noResults),B(1),ne("ngIf",i.paginationData.totalPages>1&&!i.noResults),B(1),ne("isFiltersOpen",i.isFiltersOpen)("creatorList",i.creatorList),B(1),ne("ngIf",i.showBanner))}
1,directives:[KH,ys,Dy,my,Af,qu,Pf,py,Ay,Ly,Ny,vs,e7,c7,h7],styles:[".hero[_ngcontent-%COMP%]{background-color:var(--color-bg);padding-block:var(--rds-5)}.hero__title[_ngcontent-%COMP%]{text-align:center;margin-bottom:1rem;max-width:50ch;margin-inline:auto}.hero__subtitle[_ngcontent-%COMP%]{text-align:center;max-width:95ch;margin-inline:auto}.hero__search[_ngcontent-%COMP%]{margin-top:1.5rem;display:flex;justify-content:center;align-items:center;gap:1rem}.hero__search[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{min-width:25%}.hero__search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.75rem 3rem .75rem .5rem;width:100%}.artworks[_ngcontent-%COMP%]{padding-bottom:var(--rds-5);position:relative}.artworks__info[_ngcontent-%COMP%]{padding-block:var(--rds-4)}.artworks__results-text[_ngcontent-%COMP%], .artworks__results-number[_ngcontent-%COMP%], .artworks__appear-text[_ngcontent-%COMP%], .artworks__appear-number[_ngcontent-%COMP%]{color:var(--color-black)}.artworks__results-number[_ngcontent-%COMP%], .artworks__appear-number[_ngcontent-%COMP%]{font-weight:700}.artworks__content[_ngcontent-%COMP%]{--cols: 1;display:grid;grid-template-columns:repeat(var(--cols),1fr);grid-column-gap:var(--rds-4);column-gap:var(--rds-4);grid-row-gap:var(--rds-5);row-gap:var(--rds-5);margin-bottom:var(--rds-6)}@media (min-width: 30.001em){.artworks__content[_ngcontent-%COMP%]{--cols: 2}}@media (min-width: 55em){.artworks__content[_ngcontent-%COMP%]{--cols: 4}}.artworks__content-col[_ngcontent-%COMP%], .artworks__content-col--4[_ngcontent-%COMP%], .artworks__content-col--3[_ngcontent-%COMP%], .artworks__content-col--2[_ngcontent-%COMP%], .artworks__content-col--1[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-start;gap:var(--rds-5)}.artworks__load-btn[_ngcontent-%COMP%]{display:block;margin-inline:auto}.artworks__no-results-text[_ngcontent-%COMP%]{font-size:var(--fs-24);font-weight:700;margin-top:var(--rds-4)}.select-form[_ngcontent-%COMP%]{margin-top:var(--rds-3);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}"]}),n})(),T7=(()=>{class n{constructor(){}shareOnFacebook(t){const i=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(t)}`;this.openShareWindow(i)}shareOnTwitter(t,i){const r=`https://twitter.com/intent/tweet?url=${encodeURIComponent(t)}&text=${encodeURIComponent(i)}`;this.openShareWindow(r)}shareOnLinkedIn(t,i,r){const s=`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(t)}&title=${encodeURIComponent(i)}&summary=${encodeURIComponent(r)}`;this.openShareWindow(s)}openShareWindow(t){window.open(t,"_blank","width=800,height=600")}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=Ze({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const A7=function(n){return{active:n}};function D7(n,e){if(1&n&&(C(0,"div",9)(1,"div",10),ge(2,"img",11),x()()),2&n){const t=e.$implicit,i=e.index,r=ze(2);ne("ngClass",Cn(3,A7,r.currentIndex===i)),B(2),ne("src",t.viewUrl,us)("alt",t.filename)}}const h2=function(n){return{disabled:n}};function P7(n,e){if(1&n){const t=Hn();C(0,"button",12),Ge("click",function(){return hn(t),ze(2).previousSlide()}),A(1),x()}if(2&n){const t=ze(2);ne("ngClass",Cn(2,h2,0===t.currentIndex)),B(1),St(" < ",t.resources.previousBtnLabel," ")}}function I7(n,e){if(1&n){const t=Hn();C(0,"button",13),Ge("click",function(){return hn(t),ze(2).nextSlide()}),A(1),x()}if(2&n){const t=ze(2);ne("ngClass",Cn(2,h2,t.currentIndex===t.slides.length-1)),B(1),St(" ",t.resources.nextBtnLabel," > ")}}function R7(n,e){if(1&n){const t=Hn();C(0,"div",1),We(1,D7,3,5,"div",2),C(2,"div",3),We(3,P7,2,4,"button",4),We(4,I7,2,4,"button",5),x(),C(5,"button",6),Ge("click",function(){return hn(t),ze().onExitFullscreen()}),dn(),C(6,"svg",7),ge(7,"path",8),x()()()}if(2&n){const t=ze();B(1),ne("ngForOf",t.slides),B(2),ne("ngIf",t.slides.length>1),B(1),ne("ngIf",t.slides.length>1)}}let O7=(()=>{class n{constructor(t,i){this.resourcesService=t,this.langService=i,this.slides=[],this.exitFullscreen=new sn,this.resources={},this.langSub=new Bt,this.currentIndex=0}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("image-slider",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)})}nextSlide(){this.currentIndex<this.slides.length-1&&this.currentIndex++}previousSlide(){this.currentIndex>0&&this.currentIndex--}onExitFullscreen(){this.exitFullscreen.emit()}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-slider-fullscreen"]],inputs:{slides:"slides"},outputs:{exitFullscreen:"exitFullscreen"},decls:1,vars:1,consts:[["class","slider",4,"ngIf"],[1,"slider"],["class","slider__slide",3,"ngClass",4,"ngFor","ngForOf"],[1,"slider__btn-wrapper"],["class","slider__btn--prev","aria-label","Previous slide",3,"ngClass","click",4,"ngIf"],["class","slider__btn--next","aria-label","Next slide",3,"ngClass","click",4,"ngIf"],["aria-label","Exit fullscreen",1,"slider__close-btn",3,"click"],["width","23","height","23","viewBox","0 0 23 23","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M23 2.31643L20.6836 0L11.5 9.18357L2.31643 0L0 2.31643L9.18357 11.5L0 20.6836L2.31643 23L11.5 13.8164L20.6836 23L23 20.6836L13.8164 11.5L23 2.31643Z","fill","white"],[1,"slider__slide",3,"ngClass"],[1,"slider__img-wrapper"],[3,"src","alt"],["aria-label","Previous slide",1,"slider__btn--prev",3,"ngClass","click"],["aria-label","Next slide",1,"slider__btn--next",3,"ngClass","click"]],template:function(t,i){1&t&&We(0,R7,8,3,"div",0),2&t&&ne("ngIf",i.slides.length>0)},directives:[ys,vs,vo],styles:[".slider[_ngcontent-%COMP%]{display:grid;place-items:center;position:fixed;inset:0;background-color:var(--color-black);overflow:hidden;z-index:300}.slider__slide[_ngcontent-%COMP%]{margin-inline:auto;display:none;opacity:0;transition:opacity .35s ease-in-out}.slider__slide.active[_ngcontent-%COMP%]{display:block;opacity:1}.slider__img-wrapper[_ngcontent-%COMP%]{max-width:96%;margin-inline:auto;overflow:hidden}.slider__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:80vh;object-fit:contain;margin-inline:auto}@media (min-width: 65em){.slider__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:90vh}}.slider__btn-wrapper[_ngcontent-%COMP%]{position:absolute;bottom:1rem;left:50%;transform:translate(-50%);display:flex;justify-content:space-between;align-items:center;gap:2rem;padding-top:var(--rds-2);padding-inline:var(--rds-1);z-index:10}@media (min-width: 65em){.slider__btn-wrapper[_ngcontent-%COMP%]{top:50%;left:0;width:100%;transform:translateY(-50%);padding-top:0}}.slider__btn[_ngcontent-%COMP%], .slider__btn--next[_ngcontent-%COMP%], .slider__btn--prev[_ngcontent-%COMP%]{padding-block:.5em;background-color:var(--color-black);border:0;width:max-content;color:var(--color-white);font-size:var(--fs-18)}.slider__btn.disabled[_ngcontent-%COMP%], .disabled.slider__btn--next[_ngcontent-%COMP%], .disabled.slider__btn--prev[_ngcontent-%COMP%]{pointer-events:none;opacity:.4}.slider__default-img-wrapper[_ngcontent-%COMP%]{width:clamp(18rem,70%,60rem);margin-inline:auto;overflow:hidden}.slider__default-img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;margin-inline:auto}.slider__close-btn[_ngcontent-%COMP%]{position:absolute;top:var(--rds-1);right:var(--rds-1);padding:.5rem;background-color:transparent;border:0}"]}),n})();const L7=function(n){return{active:n}};function F7(n,e){if(1&n&&(C(0,"div",6)(1,"div",7),ge(2,"img",8),x()()),2&n){const t=e.$implicit,i=e.index,r=ze(2);ne("ngClass",Cn(3,L7,r.currentIndex===i)),B(2),ne("src",t.viewUrl,us)("alt",t.filename)}}const d2=function(n){return{disabled:n}};function N7(n,e){if(1&n){const t=Hn();C(0,"button",9),Ge("click",function(){return hn(t),ze(2).previousSlide()}),A(1),x()}if(2&n){const t=ze(2);ne("ngClass",Cn(2,d2,0===t.currentIndex)),B(1),St(" < ",t.resources.previousBtnLabel," ")}}function k7(n,e){if(1&n){const t=Hn();C(0,"button",10),Ge("click",function(){return hn(t),ze(2).nextSlide()}),A(1),x()}if(2&n){const t=ze(2);ne("ngClass",Cn(2,d2,t.currentIndex===t.slides.length-1)),B(1),St(" ",t.resources.nextBtnLabel," > ")}}function U7(n,e){if(1&n&&(C(0,"div",1),We(1,F7,3,5,"div",2),C(2,"div",3),We(3,N7,2,4,"button",4),We(4,k7,2,4,"button",5),x()()),2&n){const t=ze();B(1),ne("ngForOf",t.slides),B(2),ne("ngIf",t.slides.length>1),B(1),ne("ngIf",t.slides.length>1)}}let B7=(()=>{class n{constructor(t,i){this.resourcesService=t,this.langService=i,this.slides=[],this.resources={},this.langSub=new Bt,this.currentIndex=0}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("image-slider",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)})}nextSlide(){this.currentIndex<this.slides.length-1&&this.currentIndex++}previousSlide(){this.currentIndex>0&&this.currentIndex--}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-image-slider"]],inputs:{slides:"slides"},decls:1,vars:1,consts:[["class","slider",4,"ngIf"],[1,"slider"],["class","slider__slide",3,"ngClass",4,"ngFor","ngForOf"],[1,"slider__btn-wrapper"],["class","slider__btn--prev","aria-label","Previous slide",3,"ngClass","click",4,"ngIf"],["class","slider__btn--next","aria-label","Next slide",3,"ngClass","click",4,"ngIf"],[1,"slider__slide",3,"ngClass"],[1,"slider__img-wrapper"],[3,"src","alt"],["aria-label","Previous slide",1,"slider__btn--prev",3,"ngClass","click"],["aria-label","Next slide",1,"slider__btn--next",3,"ngClass","click"]],template:function(t,i){1&t&&We(0,U7,5,3,"div",0),2&t&&ne("ngIf",i.slides.length>0)},directives:[ys,vs,vo],styles:[".slider[_ngcontent-%COMP%]{position:relative;overflow:hidden}.slider__slide[_ngcontent-%COMP%]{width:clamp(18rem,70%,60rem);margin-inline:auto;display:none;opacity:0;transition:opacity .35s ease-in-out}.slider__slide.active[_ngcontent-%COMP%]{display:block;opacity:1}.slider__img-wrapper[_ngcontent-%COMP%]{max-height:65vh;max-width:100%;overflow:hidden}.slider__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:50vh;object-fit:contain;margin-inline:auto}@media (min-width: 50.001em){.slider__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:50vh}}.slider__btn-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding-top:var(--rds-2)}@media (min-width: 65em){.slider__btn-wrapper[_ngcontent-%COMP%]{position:absolute;top:50%;left:0;width:100%;transform:translateY(-50%);padding-top:0}}.slider__btn[_ngcontent-%COMP%], .slider__btn--next[_ngcontent-%COMP%], .slider__btn--prev[_ngcontent-%COMP%]{padding-block:.5em;background-color:transparent;border:0;color:var(--color-primary);font-size:var(--fs-18)}.slider__btn.disabled[_ngcontent-%COMP%], .disabled.slider__btn--next[_ngcontent-%COMP%], .disabled.slider__btn--prev[_ngcontent-%COMP%]{pointer-events:none;opacity:.4}.slider__default-img-wrapper[_ngcontent-%COMP%]{width:clamp(18rem,70%,60rem);margin-inline:auto;overflow:hidden}.slider__default-img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;margin-inline:auto}"]}),n})();const v2="attached",jl=1e3,fr=1001,gi=1003,Qn=1006,$s=1008,qs=1009,ah=1012,Io=1014,pr=1015,lh=1016,$l=1020,Zi=1023,ql=1026,Yl=1027,ep=33776,tp=33777,np=33778,ip=33779,rp=36492,an="srgb",Kl="srgb-linear",ap="linear",Kt="srgb",Jl=7680,Cs=2e3;class xa{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)}hasEventListener(e,t){const i=this._listeners;return void 0!==i&&void 0!==i[e]&&-1!==i[e].indexOf(t)}removeEventListener(e,t){const i=this._listeners;if(void 0===i)return;const r=i[e];if(void 0!==r){const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}dispatchEvent(e){const t=this._listeners;if(void 0===t)return;const i=t[e.type];if(void 0!==i){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s<o;s++)r[s].call(this,e);e.target=null}}}const _i=["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","5
15","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"];const wa=Math.PI/180,Ql=180/Math.PI;function mr(){const n=4294967295*Math.random()|0,e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(_i[255&n]+_i[n>>8&255]+_i[n>>16&255]+_i[n>>24&255]+"-"+_i[255&e]+_i[e>>8&255]+"-"+_i[e>>16&15|64]+_i[e>>24&255]+"-"+_i[63&t|128]+_i[t>>8&255]+"-"+_i[t>>16&255]+_i[t>>24&255]+_i[255&i]+_i[i>>8&255]+_i[i>>16&255]+_i[i>>24&255]).toLowerCase()}function lt(n,e,t){return Math.max(e,Math.min(t,n))}function e1(n,e){return(n%e+e)%e}function ch(n,e,t){return(1-t)*n+t*e}function Fi(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function ft(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(4294967295*n);case Uint16Array:return Math.round(65535*n);case Uint8Array:return Math.round(255*n);case Int32Array:return Math.round(2147483647*n);case Int16Array:return Math.round(32767*n);case Int8Array:return Math.round(127*n);default:throw new Error("Invalid component type.")}}const vi_DEG2RAD=wa,vi_degToRad=function V9(n){return n*wa};class J{constructor(e=0,t=0){J.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){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+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=lt(this.x,e.x,t.x),this.y=lt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=lt(this.x,e,t),this.y=lt(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(lt(i,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}
vendor: 5,138 bytes, line 1
1roundToZero(){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){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(lt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,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){const i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class ht{constructor(e,t,i,r,s,o,a,l,c){ht.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,i,r,s,o,a,l,c)}set(e,t,i,r,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,u[4]=s,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const 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){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],h=i[7],d=i[2],f=i[5],p=i[8],_=r[0],g=r[3],m=r[6],v=r[1],y=r[4],b=r[7],T=r[2],S=r[5],P=r[8];return s[0]=o*_+a*v+l*T,s[3]=o*g+a*y+l*S,s[6]=o*m+a*b+l*P,s[1]=c*_+u*v+h*T,s[4]=c*g+u*y+h*S,s[7]=c*m+u*b+h*P,s[2]=d*_+f*v+p*T,s[5]=d*g+f*y+p*S,s[8]=d*m+f*b+p*P,this}multiplyScalar(e){const 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(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-i*s*u+i*a*l+r*s*c-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=u*o-a*c,d=a*l-u*s,f=c*s-o*l,p=t*h+i*d+r*f;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const _=1/p;return e[0]=h*_,e[1]=(r*c-u*i)*_,e[2]=(a*i-r*o)*_,e[3]=d*_,e[4]=(u*t-r*l)*_,e[5]=(r*s-a*t)*_,e[6]=f*_,e[7]=(i*l-c*t)*_,e[8]=(o*t-i*s)*_,this}transpose(){let e;const 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){const 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,i,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-r*c,r*l,-r*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(t1.makeScale(e,t)),this}rotate(e){return this.premultiply(t1.makeRotation(-e)),this}translate(e,t){return this.premultiply(t1.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){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const t1=new ht;function L2(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function uh(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function q9(){const n=uh("canvas");return n.style.display="block",n}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const F2={};function tc(n){n in F2||(F2[n]=!0,console.warn(n))}const N2=(new ht).set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),k2=(new ht).set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.20397
17,1.0569715);function K9(){const n={enabled:!0,workingColorSpace:Kl,spaces:{},convert:function(r,s,o){return!1===this.enabled||s===o||!s||!o||(this.spaces[s].transfer===Kt&&(r.r=Ys(r.r),r.g=Ys(r.g),r.b=Ys(r.b)),this.spaces[s].primaries!==this.spaces[o].primaries&&(r.applyMatrix3(this.spaces[s].toXYZ),r.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===Kt&&(r.r=nc(r.r),r.g=nc(r.g),r.b=nc(r.b))),r},fromWorkingColorSpace:function(r,s){return this.convert(r,this.workingColorSpace,s)},toWorkingColorSpace:function(r,s){return this.convert(r,s,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return""===r?ap:this.spaces[r].transfer},getLuminanceCoefficients:function(r,s=this.workingColorSpace){return r.fromArray(this.spaces[s].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,s,o){return r.copy(this.spaces[s].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[Kl]:{primaries:e,whitePoint:i,transfer:ap,toXYZ:N2,fromXYZ:k2,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:an},outputColorSpaceConfig:{drawingBufferColorSpace:an}},[an]:{primaries:e,whitePoint:i,transfer:Kt,toXYZ:N2,fromXYZ:k2,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:an}}}),n}const vt=K9();function Ys(n){return n<.04045?.0773993808*n:Math.pow(.9478672986*n+.0521327014,2.4)}function nc(n){return n<.0031308?12.92*n:1.055*Math.pow(n,.41666)-.055}let ic,Q9=0;class rc{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Q9++}),this.uuid=mr(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const i={uuid:this.uuid,url:""},r=this.data;if(null!==r){let s;if(Array.isArray(r)){s=[];for(let o=0,a=r.length;o<a;o++)s.push(n1(r[o].isDataTexture?r[o].image:r[o]))}else s=n1(r);i.url=s}return t||(e.images[this.uuid]=i),i}}function n1(n){return"undefined"!=typeof HTMLImageElement&&n instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&n instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&n instanceof ImageBitmap?class J9{static getDataURL(e){if(/^data:/i.test(e.src)||"undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===ic&&(ic=uh("canvas")),ic.width=e.width,ic.height=e.height;const i=ic.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=ic}return t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=uh("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o<s.length;o++)s[o]=255*Ys(s[o]/255);return i.putImageData(r,0,0),t}if(e.data){const t=e.data.slice(0);for(let i=0;i<t.length;i++)t[i]=t instanceof Uint8Array||t instanceof Uint8ClampedArray?Math.floor(255*Ys(t[i]/255)):Ys(t[i]);return{data:t,width:e.width,height:e.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let eG=0,Xr=(()=>{class n extends xa{constructor(t=n.DEFAULT_IMAGE,i=n.DEFAULT_MAPPING,r=fr,s=fr,o=Qn,a=$s,l=Zi,c=qs,u=n.DEFAULT_ANISOTROPY,h=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:eG++}),this.uuid=mr(),this.name="",this.source=new rc(t),this.mipmaps=[],this.mapping=i,this.channel=0,this.wrapS=r,this.wrapT=s,this.magFilter=o,this.minFilter=a,this.anisotropy=u,this.format=l,this.internalFormat=null,this.type=c,this.offset=new J(0,0),this.repeat=new J(1,1),this.center=new J(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ht,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace
vendor: 4,479 bytes, line 1
1=h,this.userData={},this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}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)}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.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){const i=void 0===t||"string"==typeof t;if(!i&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const r={metadata:{version:4.6,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),i||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case jl:t.x=t.x-Math.floor(t.x);break;case fr:t.x=t.x<0?0:1;break;case 1002:t.x=1===Math.abs(Math.floor(t.x)%2)?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case jl:t.y=t.y-Math.floor(t.y);break;case fr:t.y=t.y<0?0:1;break;case 1002:t.y=1===Math.abs(Math.floor(t.y)%2)?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){!0===t&&this.pmremVersion++}}return n.DEFAULT_IMAGE=null,n.DEFAULT_MAPPING=300,n.DEFAULT_ANISOTROPY=1,n})();class At{constructor(e=0,t=0,i=0,r=1){At.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,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,i,r){return this.x=e,this.y=t,this.z=i,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=void 0!==e.w?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){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;
vendor: 6,078 bytes, line 1
1return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,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);const 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,i,r,s;const l=e.elements,c=l[0],u=l[4],h=l[8],d=l[1],f=l[5],p=l[9],_=l[2],g=l[6],m=l[10];if(Math.abs(u-d)<.01&&Math.abs(h-_)<.01&&Math.abs(p-g)<.01){if(Math.abs(u+d)<.1&&Math.abs(h+_)<.1&&Math.abs(p+g)<.1&&Math.abs(c+f+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const y=(c+1)/2,b=(f+1)/2,T=(m+1)/2,S=(u+d)/4,P=(h+_)/4,I=(p+g)/4;return y>b&&y>T?y<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(y),r=S/i,s=P/i):b>T?b<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(b),i=S/r,s=I/r):T<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(T),i=P/s,r=I/s),this.set(i,r,s,t),this}let v=Math.sqrt((g-p)*(g-p)+(h-_)*(h-_)+(d-u)*(d-u));return Math.abs(v)<.001&&(v=1),this.x=(g-p)/v,this.y=(h-_)/v,this.z=(d-u)/v,this.w=Math.acos((c+f+m-1)/2),this}setFromMatrixPosition(e){const 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=lt(this.x,e.x,t.x),this.y=lt(this.y,e.y,t.y),this.z=lt(this.z,e.z,t.z),this.w=lt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=lt(this.x,e,t),this.y=lt(this.y,e,t),this.z=lt(this.z,e,t),this.w=lt(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(lt(i,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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,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}}class tG extends xa{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new At(0,0,e,t),this.scissorTest=!1,this.viewport=new At(0,0,e,t);const r={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Qn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const s=new Xr(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);s.flipY=!1,s.generateMipmaps=i.generateMipmaps,s.internalFormat=i.internalFormat,this.textures=[];const o=i.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){null!==this._depthTexture&&(this._depthTexture.renderTarget=null),null!==e&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,i=1){if(this.width!==e||this.height!==t||this.depth!==i){this.width=e,this.height=t,this.depth=i;for(let r=0,s=this.textures.length;r<s;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=i;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 i=0,r=e.textures.length;i<r;i++)this.textures[i]=e.textures[i].clone(),this.textures[i].isRenderTargetTexture=!0,this.textures[i].renderTarget=this;const t=Object.assign({},e.texture.image);return this.texture.source=new rc(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Ma extends tG{constructor(e=1,t=1,i={}
vendor: 4,159 bytes, line 1
1){super(e,t,i),this.isWebGLRenderTarget=!0}}class up extends Xr{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=gi,this.minFilter=gi,this.wrapR=fr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class i1 extends Xr{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=gi,this.minFilter=gi,this.wrapR=fr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class vn{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,s,o,a){let l=i[r+0],c=i[r+1],u=i[r+2],h=i[r+3];const d=s[o+0],f=s[o+1],p=s[o+2],_=s[o+3];if(0===a)return e[t+0]=l,e[t+1]=c,e[t+2]=u,void(e[t+3]=h);if(1===a)return e[t+0]=d,e[t+1]=f,e[t+2]=p,void(e[t+3]=_);if(h!==_||l!==d||c!==f||u!==p){let g=1-a;const m=l*d+c*f+u*p+h*_,v=m>=0?1:-1,y=1-m*m;if(y>Number.EPSILON){const T=Math.sqrt(y),S=Math.atan2(T,m*v);g=Math.sin(g*S)/T,a=Math.sin(a*S)/T}const b=a*v;if(l=l*g+d*b,c=c*g+f*b,u=u*g+p*b,h=h*g+_*b,g===1-a){const T=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=T,c*=T,u*=T,h*=T}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=h}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],c=i[r+2],u=i[r+3],h=s[o],d=s[o+1],f=s[o+2],p=s[o+3];return e[t]=a*p+u*h+l*f-c*d,e[t+1]=l*p+u*d+c*h-a*f,e[t+2]=c*p+u*f+a*d-l*h,e[t+3]=u*p-a*h-l*d-c*f,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,i,r){return this._x=e,this._y=t,this._z=i,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){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(r/2),h=a(s/2),d=l(i/2),f=l(r/2),p=l(s/2);switch(o){case"XYZ":this._x=d*u*h+c*f*p,this._y=c*f*h-d*u*p,this._z=c*u*p+d*f*h,this._w=c*u*h-d*f*p;break;case"YXZ":this._x=d*u*h+c*f*p,this._y=c*f*h-d*u*p,this._z=c*u*p-d*f*h,this._w=c*u*h+d*f*p;break;case"ZXY":this._x=d*u*h-c*f*p,this._y=c*f*h+d*u*p,this._z=c*u*p+d*f*h,this._w=c*u*h-d*f*p;break;case"ZYX":this._x=d*u*h-c*f*p,this._y=c*f*h+d*u*p,this._z=c*u*p-d*f*h,this._w=c*u*h+d*f*p;break;case"YZX":this._x=d*u*h+c*f*p,this._y=c*f*h+d*u*p,this._z=c*u*p-d*f*h,this._w=c*u*h-d*f*p;break;case"XZY":this._x=d*u*h-c*f*p,this._y=c*f*h-d*u*p,this._z=c*u*p+d*f*h,this._w=c*u*h+d*f*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],l=t[9],c=t[2],u=t[6],h=t[10],d=i+a+h;if(d>0){const f=.5/Math.sqrt(d+1);this._w=.25/f,this._x=(u-l)*f,this._y=(s-c)*f,this._z=(o-r)*f}else if(i>a&&i>h){const f=2*Math.sqrt(1+i-a-h);this._w=(u-l)/f,this._x=.25*f,this._y=(r+o)/f,this._z=(s+c)/f}else if(a>h){const f=2*Math.sqrt(1+a-i-h);this._w=(s-c)/f,this._x=(r+o)/f,this._y=.25*f,this._z=(l+u)/f}else{const f=2*Math.sqrt(1+h-i-a);this._w=(o-r)/f,this._x=(s+c)/f,this._y=(l+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<Number.EPSILON?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(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=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(lt(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(0===i)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}
vendor: 11,430 bytes, line 1
1conjugate(){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 0===e?(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){const i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+o*a+r*c-s*l,this._y=r*u+o*l+s*a-i*c,this._z=s*u+o*c+i*l-r*a,this._w=o*u-i*a-r*l-s*c,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const f=1-t;return this._w=f*o+t*this._w,this._x=f*i+t*this._x,this._y=f*r+t*this._y,this._z=f*s+t*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),h=Math.sin((1-t)*u)/c,d=Math.sin(t*u)/c;return this._w=o*h+this._w*d,this._x=i*h+this._x*d,this._y=r*h+this._y*d,this._z=s*h+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),s*Math.sin(t),s*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class R{constructor(e=0,t=0,i=0){R.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return void 0===i&&(i=this.z),this.x=e,this.y=t,this.z=i,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(U2.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(U2.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*r-a*i),u=2*(a*t-s*r),h=2*(s*i-o*t);return this.x=t+l*c+o*h-a*u,this.y=i+l*u+a*c-s*h,this.z=r+l*h+s*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[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=lt(this.x,e.x,t.x),this.y=lt(this.y,e.y,t.y),this.z=lt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=lt(this.x,e,t),this.y=lt(this.y,e,t),this.z=lt(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(lt(i,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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return r1.copy(this).projectOnVector(e),this.sub(r1)}reflect(e){return this.sub(r1.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(lt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+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,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}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(){const e=Math.random()*Math.PI*2,t=2*Math.random()-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const r1=new R,U2=new vn;class Ki{constructor(e=new R(1/0,1/0,1/0),t=new R(-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,i=e.length;t<i;t+=3)this.expandByPoint(Zr.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(Zr.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const i=Zr.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),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);const i=e.geometry;if(void 0!==i){const s=i.getAttribute("position");if(!0===t&&void 0!==s&&!0!==e.isInstancedMesh)for(let o=0,a=s.count;o<a;o++)!0===e.isMesh?e.getVertexPosition(o,Zr):Zr.fromBufferAttribute(s,o),Zr.applyMatrix4(e.matrixWorld),this.expandByPoint(Zr);else void 0!==e.boundingBox?(null===e.boundingBox&&e.computeBoundingBox(),hp.copy(e.boundingBox)):(null===i.boundingBox&&i.computeBoundingBox(),hp.copy(i.boundingBox)),hp.applyMatrix4(e.matrixWorld),this.union(hp)}const r=e.children;for(let s=0,o=r.length;s<o;s++)this.expandByObject(r[s],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,Zr),Zr.distanceToSquared(e.center)<=e.radius*e.radiu
vendor: 6,121 bytes, line 1
1s}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(hh),dp.subVectors(this.max,hh),sc.subVectors(e.a,hh),oc.subVectors(e.b,hh),ac.subVectors(e.c,hh),Oo.subVectors(oc,sc),Lo.subVectors(ac,oc),Ca.subVectors(sc,ac);let t=[0,-Oo.z,Oo.y,0,-Lo.z,Lo.y,0,-Ca.z,Ca.y,Oo.z,0,-Oo.x,Lo.z,0,-Lo.x,Ca.z,0,-Ca.x,-Oo.y,Oo.x,0,-Lo.y,Lo.x,0,-Ca.y,Ca.x,0];return!(!s1(t,sc,oc,ac,dp)||(t=[1,0,0,0,1,0,0,0,1],!s1(t,sc,oc,ac,dp)))&&(fp.crossVectors(Oo,Lo),t=[fp.x,fp.y,fp.z],s1(t,sc,oc,ac,dp))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Zr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(Zr).length()),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()||(Xs[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Xs[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Xs[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Xs[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Xs[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Xs[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Xs[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Xs[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Xs)),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)}}const Xs=[new R,new R,new R,new R,new R,new R,new R,new R],Zr=new R,hp=new Ki,sc=new R,oc=new R,ac=new R,Oo=new R,Lo=new R,Ca=new R,hh=new R,dp=new R,fp=new R,Sa=new R;function s1(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){Sa.fromArray(n,s);const a=r.x*Math.abs(Sa.x)+r.y*Math.abs(Sa.y)+r.z*Math.abs(Sa.z),l=e.dot(Sa),c=t.dot(Sa),u=i.dot(Sa);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const nG=new Ki,dh=new R,o1=new R;class Ni{constructor(e=new R,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){const i=this.center;void 0!==t?i.copy(t):nG.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;s<o;s++)r=Math.max(r,i.distanceToSquared(e[s]));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){const 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){const i=this.center.distanceToSquared(e);return t.copy(e),i>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;dh.subVectors(e,this.center);const t=dh.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=.5*(i-this.radius);this.center.addScaledVector(dh,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(o1.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(dh.copy(e.center).add(o1)),this.expandByPoint(dh.copy(e.center).sub(o1))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Zs=new R,a1=new R,pp=new R,Fo=new R,l1=new R,mp=new R,c1=new R;class lc{constructor(e=new R,t=new R(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.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,Zs)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Zs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Zs.copy(this.origin).addScaledVector(this.direction,t),Zs.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){a1.copy(e).add(t).multiplyScalar(.5),pp.copy(t).sub(e).normalize(),Fo.copy(this.origin).sub(a1);const s=.5*e.distanceTo(t),o=-this.direction.dot(pp),a=Fo.dot(this.direction),l=-Fo.dot(pp),c=Fo.lengthSq(),u=Math.abs(1-o*o);let h,d,f,p;if(u>0)if(h=o*l-a,d=o*a-l,p=s*u,h>=0)if(d>=-p)if(d<=p){const _=1/u;h*=_,d*=_,f=h*(h+o*d+2*a)+d*(o*h+d+2*l)+c}else d=s,h=Math.max(0,-(o*d+a)),f=-h*h+d*(d+2*l)+c;else d=-s,h=Math.max(0,-(o*d+a)),f=-h*h+d*(d+2*l)+c;else d<=-p?(h=Math.max(0,-(-o*s+a)),d=h>0?-s:Math.min(Math.max(-s,-l),s),f=-h*h+d*(d+2*l)+c):d<=p?(h=0,d=Math.min(Math.max(-s,-l),s),f=d*(d+2*l)+c):(h=Math.max(0,-(o*s+a)),d=h>0?s:Math.min(Math.max(-s,-l),s),f=-h*h+d*(d+2*l)+c);else d=o>0?-s:s,h=Math.max(0,-(o*d+a)),f=-h*h+d*(d+2*l)+c;
vendor: 4,321 bytes, line 1
1return i&&i.copy(this.origin).addScaledVector(this.direction,h),r&&r.copy(a1).addScaledVector(pp,d),f}intersectSphere(e,t){Zs.subVectors(e.center,this.origin);const i=Zs.dot(this.direction),r=Zs.dot(Zs)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:this.at(a<0?l:a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return null===i?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,d=this.origin;return c>=0?(i=(e.min.x-d.x)*c,r=(e.max.x-d.x)*c):(i=(e.max.x-d.x)*c,r=(e.min.x-d.x)*c),u>=0?(s=(e.min.y-d.y)*u,o=(e.max.y-d.y)*u):(s=(e.max.y-d.y)*u,o=(e.min.y-d.y)*u),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o<r||isNaN(r))&&(r=o),h>=0?(a=(e.min.z-d.z)*h,l=(e.max.z-d.z)*h):(a=(e.max.z-d.z)*h,l=(e.min.z-d.z)*h),i>l||a>r)||((a>i||i!=i)&&(i=a),(l<r||r!=r)&&(r=l),r<0)?null:this.at(i>=0?i:r,t)}intersectsBox(e){return null!==this.intersectBox(e,Zs)}intersectTriangle(e,t,i,r,s){l1.subVectors(t,e),mp.subVectors(i,e),c1.crossVectors(l1,mp);let a,o=this.direction.dot(c1);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Fo.subVectors(this.origin,e);const l=a*this.direction.dot(mp.crossVectors(Fo,mp));if(l<0)return null;const c=a*this.direction.dot(l1.cross(Fo));if(c<0||l+c>o)return null;const u=-a*Fo.dot(c1);return u<0?null:this.at(u/o,s)}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)}}class De{constructor(e,t,i,r,s,o,a,l,c,u,h,d,f,p,_,g){De.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,i,r,s,o,a,l,c,u,h,d,f,p,_,g)}set(e,t,i,r,s,o,a,l,c,u,h,d,f,p,_,g){const m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=r,m[1]=s,m[5]=o,m[9]=a,m[13]=l,m[2]=c,m[6]=u,m[10]=h,m[14]=d,m[3]=f,m[7]=p,m[11]=_,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 De).fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const 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,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/cc.setFromMatrixColumn(e,0).length(),s=1/cc.setFromMatrixColumn(e,1).length(),o=1/cc.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),u=Math.cos(s),h=Math.sin(s);if("XYZ"===e.order){const d=o*u,f=o*h,p=a*u,_=a*h;t[0]=l*u,t[4]=-l*h,t[8]=c,t[1]=f+p*c,t[5]=d-_*c,t[9]=-a*l,t[2]=_-d*c,t[6]=p+f*c,t[10]=o*l}else if("YXZ"===e.order){const d=l*u,f=l*h,p=c*u,_=c*h;t[0]=d+_*a,t[4]=p*a-f,t[8]=o*c,t[1]=o*h,t[5]=o*u,t[9]=-a,t[2]=f*a-p,t[6]=_+d*a,t[10]=o*l}else if("ZXY"===e.order){const d=l*u,f=l*h,p=c*u,_=c*h;t[0]=d-_*a,t[4]=-o*h,t[8]=p+f*a,t[1]=f+p*a,t[5]=o*u,t[9]=_-d*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if("ZYX"===e.order){const d=o*u,f=o*h,p=a*u,_=a*h;t[0]=l*u,t[4]=p*c-f,t[8]=d*c+_,t[1]=l*h,t[5]=_*c+d,t[9]=f*c-p,t[2]=-c,t[6]=a*l,t[10]=o*l}else if("YZX"===e.order){const d=o*l,f=o*c,p=a*l,_=a*c;t[0]=l*u,t[4]=_-d*h,t[8]=p*h+f,t[1]=h,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=f*h+p,t[10]=d-_*h}
vendor: 5,523 bytes, line 1
1else if("XZY"===e.order){const d=o*l,f=o*c,p=a*l,_=a*c;t[0]=l*u,t[4]=-h,t[8]=c*u,t[1]=d*h+_,t[5]=o*u,t[9]=f*h-p,t[2]=p*h-f,t[6]=a*u,t[10]=_*h+d}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(iG,e,rG)}lookAt(e,t,i){const r=this.elements;return gr.subVectors(e,t),0===gr.lengthSq()&&(gr.z=1),gr.normalize(),No.crossVectors(i,gr),0===No.lengthSq()&&(1===Math.abs(i.z)?gr.x+=1e-4:gr.z+=1e-4,gr.normalize(),No.crossVectors(i,gr)),No.normalize(),gp.crossVectors(gr,No),r[0]=No.x,r[4]=gp.x,r[8]=gr.x,r[1]=No.y,r[5]=gp.y,r[9]=gr.y,r[2]=No.z,r[6]=gp.z,r[10]=gr.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],h=i[5],d=i[9],f=i[13],p=i[2],_=i[6],g=i[10],m=i[14],v=i[3],y=i[7],b=i[11],T=i[15],S=r[0],P=r[4],I=r[8],w=r[12],M=r[1],F=r[5],V=r[9],z=r[13],H=r[2],X=r[6],G=r[10],ee=r[14],$=r[3],ce=r[7],ye=r[11],_e=r[15];return s[0]=o*S+a*M+l*H+c*$,s[4]=o*P+a*F+l*X+c*ce,s[8]=o*I+a*V+l*G+c*ye,s[12]=o*w+a*z+l*ee+c*_e,s[1]=u*S+h*M+d*H+f*$,s[5]=u*P+h*F+d*X+f*ce,s[9]=u*I+h*V+d*G+f*ye,s[13]=u*w+h*z+d*ee+f*_e,s[2]=p*S+_*M+g*H+m*$,s[6]=p*P+_*F+g*X+m*ce,s[10]=p*I+_*V+g*G+m*ye,s[14]=p*w+_*z+g*ee+m*_e,s[3]=v*S+y*M+b*H+T*$,s[7]=v*P+y*F+b*X+T*ce,s[11]=v*I+y*V+b*G+T*ye,s[15]=v*w+y*z+b*ee+T*_e,this}multiplyScalar(e){const 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(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],h=e[6],d=e[10],f=e[14];return e[3]*(+s*l*h-r*c*h-s*a*d+i*c*d+r*a*f-i*l*f)+e[7]*(+t*l*f-t*c*d+s*o*d-r*o*f+r*c*u-s*l*u)+e[11]*(+t*c*h-t*a*f-s*o*h+i*o*f+s*a*u-i*c*u)+e[15]*(-r*a*u-t*l*h+t*a*d+r*o*h-i*o*d+i*l*u)}transpose(){const e=this.elements;let 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,i){const 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]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],f=e[11],p=e[12],_=e[13],g=e[14],m=e[15],v=h*g*c-_*d*c+_*l*f-a*g*f-h*l*m+a*d*m,y=p*d*c-u*g*c-p*l*f+o*g*f+u*l*m-o*d*m,b=u*_*c-p*h*c+p*a*f-o*_*f-u*a*m+o*h*m,T=p*h*l-u*_*l-p*a*d+o*_*d+u*a*g-o*h*g,S=t*v+i*y+r*b+s*T;if(0===S)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/S;return e[0]=v*P,e[1]=(_*d*s-h*g*s-_*r*f+i*g*f+h*r*m-i*d*m)*P,e[2]=(a*g*s-_*l*s+_*r*c-i*g*c-a*r*m+i*l*m)*P,e[3]=(h*l*s-a*d*s-h*r*c+i*d*c+a*r*f-i*l*f)*P,e[4]=y*P,e[5]=(u*g*s-p*d*s+p*r*f-t*g*f-u*r*m+t*d*m)*P,e[6]=(p*l*s-o*g*s-p*r*c+t*g*c+o*r*m-t*l*m)*P,e[7]=(o*d*s-u*l*s+u*r*c-t*d*c-o*r*f+t*l*f)*P,e[8]=b*P,e[9]=(p*h*s-u*_*s-p*i*f+t*_*f+u*i*m-t*h*m)*P,e[10]=(o*_*s-p*a*s+p*i*c-t*_*c-o*i*m+t*a*m)*P,e[11]=(u*a*s-o*h*s-u*i*c+t*h*c+o*i*f-t*a*f)*P,e[12]=T*P,e[13]=(u*_*r-p*h*r+p*i*d-t*_*d-u*i*g+t*h*g)*P,e[14]=(p*a*r-o*_*r-p*i*l+t*_*l+o*i*g-t*a*g)*P,e[15]=(o*h*r-u*a*r+u*i*l-t*h*l-o*i*d+t*a*d)*P,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements;return Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1]+e[2]*e[2],e[4]*e[4]+e[5]*e[5]+e[6]*e[6],e[8]*e[8]+e[9]*e[9]+e[10]*e[10]))}makeTranslation(e,t,i){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,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+i,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+i,u*l-r*o,0,c*l-r*a,u*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,c=s+s,u=o+o,h=a+a,d=s*c,f=s*u,p=s*h,_=o*u,g=o*h,m=a*h,v=l*c,y=l*u,b=l*h,T=i.x,S=i.y,P=i.z;return r[0]=(1-(_+m))*T,r[1]=(f+b)*T,r[2]=(p-y)*T,r[3]=0,r[4]=(f-b)*S,r[5]=(1-(d+m))*S,r[6]=(g+v)*S,r[7]=0,r[8]=(p+y)*P,r[9]=(g-v)*P,r[10]=(1-(d+_))*P,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=cc.set(r[0],r[1],r[2]).length();const o=cc.set(r[4],r[5],r[6]).length(),a=cc.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],Kr.copy(this);const c=1/s,u=1/o,h=1/a;return Kr.elements[0]*=c,Kr.elements[1]*=c,Kr.elements[2]*=c,Kr.elements[4]*=u,Kr.elements[5]*=u,Kr.elements[6]*=u,Kr.elements[8]*=h,Kr.elements[9]*=h,Kr.elements[10]*=h,t.setFromRotationMatrix(Kr),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=Cs){const l=this.elements,c=2*s/(t-e),u=2*s/(i-r),h=(t+e)/(t-e),d=(i+r)/(i-r);let f,p;if(a===Cs)f=-(o+s)/(o-s),p=-2*o*s/(o-s);else{if(2001!==a)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);f=-o/(o-s),p=-o*s/(o-s)}return l[0]=c,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=u,l[9]=d,l[13]=0,l[2]=0,l[6]=0,l[10
vendor: 5,545 bytes, line 1
1]=f,l[14]=p,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,r,s,o,a=Cs){const l=this.elements,c=1/(t-e),u=1/(i-r),h=1/(o-s),d=(t+e)*c,f=(i+r)*u;let p,_;if(a===Cs)p=(o+s)*h,_=-2*h;else{if(2001!==a)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);p=s*h,_=-1*h}return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-d,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=_,l[14]=-p,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const cc=new R,Kr=new De,iG=new R(0,0,0),rG=new R(1,1,1),No=new R,gp=new R,gr=new R,B2=new De,V2=new vn;let yi=(()=>{class n{constructor(t=0,i=0,r=0,s=n.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=r,this._order=s}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,i,r,s=this._order){return this._x=t,this._y=i,this._z=r,this._order=s,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,i=this._order,r=!0){const s=t.elements,o=s[0],a=s[4],l=s[8],c=s[1],u=s[5],h=s[9],d=s[2],f=s[6],p=s[10];switch(i){case"XYZ":this._y=Math.asin(lt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,p),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-lt(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-d,o),this._z=0);break;case"ZXY":this._x=Math.asin(lt(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-d,p),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-lt(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(f,p),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(lt(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-lt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(l,o)):(this._x=Math.atan2(-h,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,!0===r&&this._onChangeCallback(),this}setFromQuaternion(t,i,r){return B2.makeRotationFromQuaternion(t),this.setFromRotationMatrix(B2,i,r)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return V2.setFromEuler(this),this.setFromQuaternion(V2,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],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+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 n.DEFAULT_ORDER="XYZ",n})();class u1{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 0!=(this.mask&e.mask)}isEnabled(e){return 0!=(this.mask&(1<<e|0))}}let sG=0;const z2=new R,uc=new vn,Ks=new De,_p=new R,fh=new R,oG=new R,aG=new vn,H2=new R(1,0,0),G2=new R(0,1,0),W2=new R(0,0,1),j2={type:"added"},lG={type:"removed"},hc={type:"childadded",child:null},h1={type:"childremoved",child:null};let kn=(()=>{class n extends xa{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:sG++}),this.uuid=mr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=n.DEFAULT_UP.clone();const t=new R,i=new yi,r=new vn,s=new R(1,1,1);i._onChange(function o(){r.setFromEuler(i,!1)}),r._onChange(function a(){i.setFromQuaternion(r,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:i},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new De},normalMatrix:{value:new ht}}),this.matrix=new De,this.matrixWorld=new De,this.matrixAutoUpdate=n.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new u1,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],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,i){this.quaternion.setFromAxisAngle(t,i)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}
vendor: 1,821 bytes, line 1
1setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,i){return uc.setFromAxisAngle(t,i),this.quaternion.multiply(uc),this}rotateOnWorldAxis(t,i){return uc.setFromAxisAngle(t,i),this.quaternion.premultiply(uc),this}rotateX(t){return this.rotateOnAxis(H2,t)}rotateY(t){return this.rotateOnAxis(G2,t)}rotateZ(t){return this.rotateOnAxis(W2,t)}translateOnAxis(t,i){return z2.copy(t).applyQuaternion(this.quaternion),this.position.add(z2.multiplyScalar(i)),this}translateX(t){return this.translateOnAxis(H2,t)}translateY(t){return this.translateOnAxis(G2,t)}translateZ(t){return this.translateOnAxis(W2,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Ks.copy(this.matrixWorld).invert())}lookAt(t,i,r){t.isVector3?_p.copy(t):_p.set(t,i,r);const s=this.parent;this.updateWorldMatrix(!0,!1),fh.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ks.lookAt(fh,_p,this.up):Ks.lookAt(_p,fh,this.up),this.quaternion.setFromRotationMatrix(Ks),s&&(Ks.extractRotation(s.matrixWorld),uc.setFromRotationMatrix(Ks),this.quaternion.premultiply(uc.invert()))}add(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.add(arguments[i]);return this}return t===this?(console.error("THREE.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(j2),hc.child=t,this.dispatchEvent(hc),hc.child=null):console.error("THREE.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}const i=this.children.indexOf(t);
vendor: 2,943 bytes, line 1
1return-1!==i&&(t.parent=null,this.children.splice(i,1),t.dispatchEvent(lG),h1.child=t,this.dispatchEvent(h1),h1.child=null),this}removeFromParent(){const t=this.parent;return null!==t&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),Ks.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),Ks.multiply(t.parent.matrixWorld)),t.applyMatrix4(Ks),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(j2),hc.child=t,this.dispatchEvent(hc),hc.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,i){if(this[t]===i)return this;for(let r=0,s=this.children.length;r<s;r++){const a=this.children[r].getObjectByProperty(t,i);if(void 0!==a)return a}}getObjectsByProperty(t,i,r=[]){this[t]===i&&r.push(this);const s=this.children;for(let o=0,a=s.length;o<a;o++)s[o].getObjectsByProperty(t,i,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(fh,t,oG),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(fh,aG,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const i=this.matrixWorld.elements;return t.set(i[8],i[9],i[10]).normalize()}raycast(){}traverse(t){t(this);const i=this.children;for(let r=0,s=i.length;r<s;r++)i[r].traverse(t)}traverseVisible(t){if(!1===this.visible)return;t(this);const i=this.children;for(let r=0,s=i.length;r<s;r++)i[r].traverseVisible(t)}traverseAncestors(t){const i=this.parent;null!==i&&(t(i),i.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const i=this.children;for(let r=0,s=i.length;r<s;r++)i[r].updateMatrixWorld(t)}updateWorldMatrix(t,i){const r=this.parent;if(!0===t&&null!==r&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),!0===i){const s=this.children;for(let o=0,a=s.length;o<a;o++)s[o].updateWorldMatrix(!1,!0)}}toJSON(t){const i=void 0===t||"string"==typeof t,r={};i&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const s={};function o(l,c){return void 0===l[c.uuid]&&(l[c.uuid]=c.toJSON(t)),c.uuid}
vendor: 4,741 bytes, line 1
1if(s.uuid=this.uuid,s.type=this.type,""!==this.name&&(s.name=this.name),!0===this.castShadow&&(s.castShadow=!0),!0===this.receiveShadow&&(s.receiveShadow=!0),!1===this.visible&&(s.visible=!1),!1===this.frustumCulled&&(s.frustumCulled=!1),0!==this.renderOrder&&(s.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.visibility=this._visibility,s.active=this._active,s.bounds=this._bounds.map(l=>({boxInitialized:l.boxInitialized,boxMin:l.box.min.toArray(),boxMax:l.box.max.toArray(),sphereInitialized:l.sphereInitialized,sphereRadius:l.sphere.radius,sphereCenter:l.sphere.center.toArray()})),s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(t),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.toJSON(t)),null!==this.boundingSphere&&(s.boundingSphere={center:s.boundingSphere.center.toArray(),radius:s.boundingSphere.radius}),null!==this.boundingBox&&(s.boundingBox={min:s.boundingBox.min.toArray(),max:s.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(s.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=o(t.geometries,this.geometry);const l=this.geometry.parameters;if(void 0!==l&&void 0!==l.shapes){const c=l.shapes;if(Array.isArray(c))for(let u=0,h=c.length;u<h;u++)o(t.shapes,c[u]);else o(t.shapes,c)}}if(this.isSkinnedMesh&&(s.bindMode=this.bindMode,s.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(o(t.skeletons,this.skeleton),s.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const l=[];for(let c=0,u=this.material.length;c<u;c++)l.push(o(t.materials,this.material[c]));s.material=l}else s.material=o(t.materials,this.material);if(this.children.length>0){s.children=[];for(let l=0;l<this.children.length;l++)s.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){s.animations=[];for(let l=0;l<this.animations.length;l++)s.animations.push(o(t.animations,this.animations[l]))}if(i){const l=a(t.geometries),c=a(t.materials),u=a(t.textures),h=a(t.images),d=a(t.shapes),f=a(t.skeletons),p=a(t.animations),_=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),u.length>0&&(r.textures=u),h.length>0&&(r.images=h),d.length>0&&(r.shapes=d),f.length>0&&(r.skeletons=f),p.length>0&&(r.animations=p),_.length>0&&(r.nodes=_)}return r.object=s,r;function a(l){const c=[];for(const u in l){const h=l[u];delete h.metadata,c.push(h)}return c}}clone(t){return(new this.constructor).copy(this,t)}copy(t,i=!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)),!0===i)for(let r=0;r<t.children.length;r++)this.add(t.children[r].clone());return this}}return n.DEFAULT_UP=new R(0,1,0),n.DEFAULT_MATRIX_AUTO_UPDATE=!0,n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,n})();const Jr=new R,Js=new R,d1=new R,Qs=new R,dc=new R,fc=new R,$2=new R,f1=new R,p1=new R,m1=new R,g1=new At,_1=new At,v1=new At;class _r{constructor(e=new R,t=new R,i=new R){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,r){r.subVectors(i,t),Jr.subVectors(e,t),r.cross(Jr);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){Jr.subVectors(r,t),Js.subVectors(i,t),d1.subVectors(e,t);
vendor: 6,330 bytes, line 1
1const o=Jr.dot(Jr),a=Jr.dot(Js),l=Jr.dot(d1),c=Js.dot(Js),u=Js.dot(d1),h=o*c-a*a;if(0===h)return s.set(0,0,0),null;const d=1/h,f=(c*l-a*u)*d,p=(o*u-a*l)*d;return s.set(1-f-p,p,f)}static containsPoint(e,t,i,r){return null!==this.getBarycoord(e,t,i,r,Qs)&&Qs.x>=0&&Qs.y>=0&&Qs.x+Qs.y<=1}static getInterpolation(e,t,i,r,s,o,a,l){return null===this.getBarycoord(e,t,i,r,Qs)?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Qs.x),l.addScaledVector(o,Qs.y),l.addScaledVector(a,Qs.z),l)}static getInterpolatedAttribute(e,t,i,r,s,o){return g1.setScalar(0),_1.setScalar(0),v1.setScalar(0),g1.fromBufferAttribute(e,t),_1.fromBufferAttribute(e,i),v1.fromBufferAttribute(e,r),o.setScalar(0),o.addScaledVector(g1,s.x),o.addScaledVector(_1,s.y),o.addScaledVector(v1,s.z),o}static isFrontFacing(e,t,i,r){return Jr.subVectors(i,t),Js.subVectors(e,t),Jr.cross(Js).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),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 Jr.subVectors(this.c,this.b),Js.subVectors(this.a,this.b),.5*Jr.cross(Js).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return _r.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return _r.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,s){return _r.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return _r.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return _r.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;dc.subVectors(r,i),fc.subVectors(s,i),f1.subVectors(e,i);const l=dc.dot(f1),c=fc.dot(f1);if(l<=0&&c<=0)return t.copy(i);p1.subVectors(e,r);const u=dc.dot(p1),h=fc.dot(p1);if(u>=0&&h<=u)return t.copy(r);const d=l*h-u*c;if(d<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(i).addScaledVector(dc,o);m1.subVectors(e,s);const f=dc.dot(m1),p=fc.dot(m1);if(p>=0&&f<=p)return t.copy(s);const _=f*c-l*p;if(_<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(i).addScaledVector(fc,a);const g=u*p-f*h;if(g<=0&&h-u>=0&&f-p>=0)return $2.subVectors(s,r),a=(h-u)/(h-u+(f-p)),t.copy(r).addScaledVector($2,a);const m=1/(g+_+d);return o=_*m,a=d*m,t.copy(i).addScaledVector(dc,o).addScaledVector(fc,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const q2={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},ko={h:0,s:0,l:0},vp={h:0,s:0,l:0};function y1(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+6*(e-n)*t:t<.5?e:t<2/3?n+6*(e-n)*(2/3-t):n}class me{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(void 0===t&&void 0===i){const r=e;r&&r.isColor?this.copy(r):"number"==typeof r?this.setHex(r):"string"==typeof r&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=an){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,vt.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=vt.workingColorSpace){return this.r=e,this.g=t,this.b=i,vt.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=vt.workingColorSpace){if(e=e1(e,1),t=lt(t,0,1),i=lt(i,0,1),0===t)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;
vendor: 6,119 bytes, line 1
1this.r=y1(o,s,e+1/3),this.g=y1(o,s,e),this.b=y1(o,s,e-1/3)}return vt.toWorkingColorSpace(this,r),this}setStyle(e,t=an){function i(s){void 0!==s&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=r[2];switch(r[1]){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(3===o)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(6===o)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=an){const i=q2[e.toLowerCase()];return void 0!==i?this.setHex(i,t):console.warn("THREE.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=Ys(e.r),this.g=Ys(e.g),this.b=Ys(e.b),this}copyLinearToSRGB(e){return this.r=nc(e.r),this.g=nc(e.g),this.b=nc(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=an){return vt.fromWorkingColorSpace(bi.copy(this),e),65536*Math.round(lt(255*bi.r,0,255))+256*Math.round(lt(255*bi.g,0,255))+Math.round(lt(255*bi.b,0,255))}getHexString(e=an){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=vt.workingColorSpace){vt.fromWorkingColorSpace(bi.copy(this),t);const i=bi.r,r=bi.g,s=bi.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const h=o-a;switch(c=u<=.5?h/(o+a):h/(2-o-a),o){case i:l=(r-s)/h+(r<s?6:0);break;case r:l=(s-i)/h+2;break;case s:l=(i-r)/h+4}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,t=vt.workingColorSpace){return vt.fromWorkingColorSpace(bi.copy(this),t),e.r=bi.r,e.g=bi.g,e.b=bi.b,e}getStyle(e=an){vt.fromWorkingColorSpace(bi.copy(this),e);const t=bi.r,i=bi.g,r=bi.b;return e!==an?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*i)},${Math.round(255*r)})`}offsetHSL(e,t,i){return this.getHSL(ko),this.setHSL(ko.h+e,ko.s+t,ko.l+i)}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,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(ko),e.getHSL(vp);const i=ch(ko.h,vp.h,t),r=ch(ko.s,vp.s,t),s=ch(ko.l,vp.l,t);return this.setHSL(i,r,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,i=this.g,r=this.b,s=e.elements;return this.r=s[0]*t+s[3]*i+s[6]*r,this.g=s[1]*t+s[4]*i+s[7]*r,this.b=s[2]*t+s[5]*i+s[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}}const bi=new me;me.NAMES=q2;let cG=0;class Uo extends xa{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:cG++}),this.uuid=mr(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new me(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Jl,this.stencilZFail=Jl,this.stencilZPass=Jl,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.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(void 0!==e)for(const t in e){const i=e[t];if(void 0===i){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}
vendor: 5,428 bytes, line 1
1if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.dispersion&&(i.dispersion=this.dispersion),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(i.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapRotation&&(i.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(i.blending=this.blending),0!==this.side&&(i.side=this.side),!0===this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=!0),204!==this.blendSrc&&(i.blendSrc=this.blendSrc),205!==this.blendDst&&(i.blendDst=this.blendDst),100!==this.blendEquation&&(i.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(i.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&
vendor: 5,933 bytes, line 1
1(i.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(i.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(i.depthFunc=this.depthFunc),!1===this.depthTest&&(i.depthTest=this.depthTest),!1===this.depthWrite&&(i.depthWrite=this.depthWrite),!1===this.colorWrite&&(i.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(i.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(i.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(i.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Jl&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Jl&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Jl&&(i.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(i.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaHash&&(i.alphaHash=!0),!0===this.alphaToCoverage&&(i.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=!0),!0===this.forceSinglePass&&(i.forceSinglePass=!0),!0===this.wireframe&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=!0),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}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;const t=e.clippingPlanes;let i=null;if(null!==t){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,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.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class Ea extends Uo{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new me(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 yi,this.combine=0,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}}const Un=new R,yp=new J;let hG=0;class Bn{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:hG++}),this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=i,this.usage=35044,this.updateRanges=[],this.gpuType=pr,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&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,i){e*=this.itemSize,i*=t.itemSize;
vendor: 4,843 bytes, line 1
1for(let r=0,s=this.itemSize;r<s;r++)this.array[e+r]=t.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,i=this.count;t<i;t++)yp.fromBufferAttribute(this,t),yp.applyMatrix3(e),this.setXY(t,yp.x,yp.y);else if(3===this.itemSize)for(let t=0,i=this.count;t<i;t++)Un.fromBufferAttribute(this,t),Un.applyMatrix3(e),this.setXYZ(t,Un.x,Un.y,Un.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)Un.fromBufferAttribute(this,t),Un.applyMatrix4(e),this.setXYZ(t,Un.x,Un.y,Un.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)Un.fromBufferAttribute(this,t),Un.applyNormalMatrix(e),this.setXYZ(t,Un.x,Un.y,Un.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)Un.fromBufferAttribute(this,t),Un.transformDirection(e),this.setXYZ(t,Un.x,Un.y,Un.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=Fi(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=ft(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Fi(t,this.array)),t}setX(e,t){return this.normalized&&(t=ft(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Fi(t,this.array)),t}setY(e,t){return this.normalized&&(t=ft(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=Fi(t,this.array)),t}setZ(e,t){return this.normalized&&(t=ft(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=Fi(t,this.array)),t}setW(e,t){return this.normalized&&(t=ft(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=ft(t,this.array),i=ft(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,r){return e*=this.itemSize,this.normalized&&(t=ft(t,this.array),i=ft(i,this.array),r=ft(r,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,t,i,r,s){return e*=this.itemSize,this.normalized&&(t=ft(t,this.array),i=ft(i,this.array),r=ft(r,this.array),s=ft(s,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=s,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),35044!==this.usage&&(e.usage=this.usage),e}}class b1 extends Bn{constructor(e,t,i){super(new Uint16Array(e),t,i)}}class Y2 extends Bn{constructor(e,t,i){super(new Uint32Array(e),t,i)}}class Pe extends Bn{constructor(e,t,i){super(new Float32Array(e),t,i)}}let dG=0;const Pr=new De,x1=new kn,pc=new R,vr=new Ki,mh=new Ki,ei=new R;class pt extends xa{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:dG++}),this.uuid=mr(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,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 this.index=Array.isArray(e)?new(L2(e)?Y2:b1)(e,1):e,this}setIndirect(e){return this.indirect=e,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 void 0!==this.attributes[e]}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const i=this.attributes.normal;if(void 0!==i){const s=(new ht).getNormalMatrix(e);i.applyNormalMatrix(s),i.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return Pr.makeRotationFromQuaternion(e),this.applyMatrix4(Pr),this}rotateX(e){return Pr.makeRotationX(e),this.applyMatrix4(Pr),this}rotateY(e){return Pr.makeRotationY(e),this.applyMatrix4(Pr),this}rotateZ(e){return Pr.makeRotationZ(e),this.applyMatrix4(Pr),this}translate(e,t,i){return Pr.makeTranslation(e,t,i),this.applyMatrix4(Pr),this}scale(e,t,i){return Pr.makeScale(e,t,i),this.applyMatrix4(Pr),this}lookAt(e){return x1.lookAt(e),x1.updateMatrix(),this.applyMatrix4(x1.matrix
vendor: 12,625 bytes, line 1
1),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(pc).negate(),this.translate(pc.x,pc.y,pc.z),this}setFromPoints(e){const t=this.getAttribute("position");if(void 0===t){const i=[];for(let r=0,s=e.length;r<s;r++){const o=e[r];i.push(o.x,o.y,o.z||0)}this.setAttribute("position",new Pe(i,3))}else{const i=Math.min(e.length,t.count);for(let r=0;r<i;r++){const s=e[r];t.setXYZ(r,s.x,s.y,s.z||0)}e.length>t.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Ki);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),void this.boundingBox.set(new R(-1/0,-1/0,-1/0),new R(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=t.length;i<r;i++)vr.setFromBufferAttribute(t[i]),this.morphTargetsRelative?(ei.addVectors(this.boundingBox.min,vr.min),this.boundingBox.expandByPoint(ei),ei.addVectors(this.boundingBox.max,vr.max),this.boundingBox.expandByPoint(ei)):(this.boundingBox.expandByPoint(vr.min),this.boundingBox.expandByPoint(vr.max))}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Ni);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),void this.boundingSphere.set(new R,1/0);if(e){const i=this.boundingSphere.center;if(vr.setFromBufferAttribute(e),t)for(let s=0,o=t.length;s<o;s++)mh.setFromBufferAttribute(t[s]),this.morphTargetsRelative?(ei.addVectors(vr.min,mh.min),vr.expandByPoint(ei),ei.addVectors(vr.max,mh.max),vr.expandByPoint(ei)):(vr.expandByPoint(mh.min),vr.expandByPoint(mh.max));vr.getCenter(i);let r=0;for(let s=0,o=e.count;s<o;s++)ei.fromBufferAttribute(e,s),r=Math.max(r,i.distanceToSquared(ei));if(t)for(let s=0,o=t.length;s<o;s++){const a=t[s],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)ei.fromBufferAttribute(a,c),l&&(pc.fromBufferAttribute(e,c),ei.add(pc)),r=Math.max(r,i.distanceToSquared(ei))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const i=t.position,r=t.normal,s=t.uv;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new Bn(new Float32Array(4*i.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let I=0;I<i.count;I++)a[I]=new R,l[I]=new R;const c=new R,u=new R,h=new R,d=new J,f=new J,p=new J,_=new R,g=new R;function m(I,w,M){c.fromBufferAttribute(i,I),u.fromBufferAttribute(i,w),h.fromBufferAttribute(i,M),d.fromBufferAttribute(s,I),f.fromBufferAttribute(s,w),p.fromBufferAttribute(s,M),u.sub(c),h.sub(c),f.sub(d),p.sub(d);const F=1/(f.x*p.y-p.x*f.y);!isFinite(F)||(_.copy(u).multiplyScalar(p.y).addScaledVector(h,-f.y).multiplyScalar(F),g.copy(h).multiplyScalar(f.x).addScaledVector(u,-p.x).multiplyScalar(F),a[I].add(_),a[w].add(_),a[M].add(_),l[I].add(g),l[w].add(g),l[M].add(g))}let v=this.groups;0===v.length&&(v=[{start:0,count:e.count}]);for(let I=0,w=v.length;I<w;++I){const M=v[I],F=M.start;for(let z=F,H=F+M.count;z<H;z+=3)m(e.getX(z+0),e.getX(z+1),e.getX(z+2))}const y=new R,b=new R,T=new R,S=new R;function P(I){T.fromBufferAttribute(r,I),S.copy(T);const w=a[I];y.copy(w),y.sub(T.multiplyScalar(T.dot(w))).normalize(),b.crossVectors(S,w);const F=b.dot(l[I])<0?-1:1;o.setXYZW(I,y.x,y.y,y.z,F)}for(let I=0,w=v.length;I<w;++I){const M=v[I],F=M.start;for(let z=F,H=F+M.count;z<H;z+=3)P(e.getX(z+0)),P(e.getX(z+1)),P(e.getX(z+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let i=this.getAttribute("normal");if(void 0===i)i=new Bn(new Float32Array(3*t.count),3),this.setAttribute("normal",i);else for(let d=0,f=i.count;d<f;d++)i.setXYZ(d,0,0,0);const r=new R,s=new R,o=new R,a=new R,l=new R,c=new R,u=new R,h=new R;if(e)for(let d=0,f=e.count;d<f;d+=3){const p=e.getX(d+0),_=e.getX(d+1),g=e.getX(d+2);r.fromBufferAttribute(t,p),s.fromBufferAttribute(t,_),o.fromBufferAttribute(t,g),u.subVectors(o,s),h.subVectors(r,s),u.cross(h),a.fromBufferAttribute(i,p),l.fromBufferAttribute(i,_),c.fromBufferAttribute(i,g),a.add(u),l.add(u),c.add(u),i.setXYZ(p,a.x,a.y,a.z),i.setXYZ(_,l.x,l.y,l.z),i.setXYZ(g,c.x,c.y,c.z)}else for(let d=0,f=t.count;d<f;d+=3)r.fromBufferAttribute(t,d+0),s.fromBufferAttribute(t,d+1),o.fromBufferAttribute(t,d+2),u.subVectors(o,s),h.subVectors(r,s),u.cross(h),i.setXYZ(d+0,u.x,u.y,u.z),i.setXYZ(d+1,u.x,u.y,u.z),i.setXYZ(d+2,u.x,u.y,u.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)ei.fromBufferAttribute(e,t),ei.normalize(),e.setXYZ(t,ei.x,ei.y,ei.z)}toNonIndexed(){function e(a,l){const c=a.array,u=a.itemSize,h=a.normalized,d=new c.constructor(l.length*u);let f=0,p=0;for(let _=0,g=l.length;_<g;_++){f=a.isInterleavedBufferAttribute?l[_]*a.data.stride+a.offset:l[_]*u;for(let m=0;m<u;m++)d[p++]=c[f++]}return new Bn(d,u,h)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new pt,i=this.index.array,r=this.attributes;for(const a in r){const c=e(r[a],i);t.setAttribute(a,c)}const s=this.morphAttributes;for(const a in s){const l=[],c=s[a];for(let u=0,h=c.length;u<h;u++){const f=e(c[u],i);l.push(f)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){const e={metadata:{version:4.6,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),void 0!==this.parameters){const l=this.parameters;for(const c in l)void 0!==l[c]&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i)e.data.attributes[l]=i[l].toJSON(e.data);const r={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let h=0,d=c.length;h<d;h++)u.push(c[h].toJSON(e.data));u.length>0&&(r[l]=u,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;null!==i&&this.setIndex(i.clone(t));const r=e.attributes;for(const c in r)this.setAttribute(c,r[c].clone(t));const s=e.morphAttributes;for(const c in s){const u=[],h=s[c];for(let d=0,f=h.length;d<f;d++)u.push(h[d].clone(t));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,u=o.length;c<u;c++){const h=o[c];this.addGroup(h.start,h.count,h.materialIndex)}const a=e.boundingBox;null!==a&&(this.boundingBox=a.clone());const l=e.boundingSphere;return null!==l&&(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"})}}const X2=new De,Ta=new lc,bp=new Ni,Z2=new R,xp=new R,wp=new R,Mp=new R,w1=new R,Cp=new R,K2=new R,Sp=new R;class ai extends kn{constructor(e=new pt,t=new Ea){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(e,t){const i=this.geometry,s=i.morphAttributes.position,o=i.morphTargetsRelative;t.fromBufferAttribute(i.attributes.position,e);const a=this.morphTargetInfluences;if(s&&a){Cp.set(0,0,0);for(let l=0,c=s.length;l<c;l++){const u=a[l],h=s[l];0!==u&&(w1.fromBufferAttribute(h,e),Cp.addScaledVector(o?w1:w1.sub(t),u))}t.add(Cp)}return t}raycast(e,t){const i=this.geometry,s=this.matrixWorld;void 0!==this.material&&(null===i.boundingSphere&&i.computeBoundingSphere(),bp.copy(i.boundingSphere),bp.applyMatrix4(s),Ta.copy(e.ray).recast(e.near),(!1!==bp.containsPoint(Ta.origin)||!(null===Ta.intersectSphere(bp,Z2)||Ta.origin.distanceToSquared(Z2)>(e.far-e.near)**2))&&(X2.copy(s).invert(),Ta.copy(e.ray).applyMatrix4(X2),(null===i.boundingBox||!1!==Ta.intersectsBox(i.boundingBox))&&this._computeIntersections(e,t,Ta)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,h=s.attributes.normal,d=s.groups,f=s.drawRange;if(null!==a)if(Array.isArray(o))for(let p=0,_=d.length;p<_;p++){const g=d[p],m=o[g.materialIndex];for(let b=Math.max(g.start,f.start),T=Math.min(a.count,Math.min(g.start+g.count,f.start+f.count));b<T;b+=3)r=Ep(this,m,e,i,c,u,h,a.getX(b),a.getX(b+1),a.getX(b+2)),r&&(r.faceIndex=Math.floor(b/3),r.face.materialIndex=g.materialIndex,t.push(r))}else for(let g=Math.max(0,f.start),m=Math.min(a.count,f.start+f.count);g<m;g+=3)r=Ep(this,o,e,i,c,u,h,a.getX(g),a.getX(g+1),a.getX(g+2)),r&&(r.faceIndex=Math.floor(g/3),t.push(r));else if(void 0!==l)if(Array.isArray(o))for(let p=0,_=d.length;p<_;p++){const g=d[p],m=o[g.materialIndex];for(let b=Math.max(g.start,f.start),T=Math.min(l.count,Math.min(g.start+g.count,f.start+f.count));b<T;b+=3)r=Ep(this,m,e,i,c,u,h,b,b+1,b+2),r&&(r.faceIndex=Math.floor(b/3),r.face.materialIndex=g.materialIndex,t.push(r))}else for(let g=Math.max(0,f.start),m=Math.min(l.count,f.start+f.count);g<m;g+=3)r=Ep(this,o,e,i,c,u,h,g,g+1,g+2),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}function Ep(n,e,t,i,r,s,o,a,l,c){n.getVertexPosition(a,xp),n.getVertexPosition(l,wp),n.getVertexPosition(c,Mp);const u=function fG(n,e,t,i,r,s,o,a){let l;if(l=1===e.side?i.intersectTriangle(o,s,r,!0,a):i.intersectTriangle(r,s,o,0===e.side,a),null===l)return null;Sp.copy(a),Sp.applyMatrix4(n.matrixWorld);const c=t.ray.origin.distanceTo(Sp);return c<t.near||c>t.far?null:{distance:c,point:Sp.clone(),object:n}}(n,e,t,i,xp,wp,Mp,K2);if(u){const h=new R;_r.getBarycoord(K2,xp,wp,Mp,h),r&&(u.uv=_r.getInterpolatedAttribute(r,a,l,c,h,new J)),s&&(u.uv1=_r.getInterpolatedAttribute(s,a,l,c,h,new J)),o&&(u.normal=_r.getInterpolatedAttribute(o,a,l,c,h,new R),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const d={a,b:l,c,normal:new R,materialIndex:0};_r.getNormal(xp,wp,Mp,d.normal),u.face=d,u.barycoord=h}return u}class mc extends pt{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],h=[];let d=0,f=0;function p(_,g,m,v,y,b,T,S,P,I,w){const M=b/P,F=T/I,V=b/2,z=T/2,H=S/2,X=P+1,G=I+1;let ee=0,$=0;const ce=new R;for(let ye=0;ye<G;ye++){const _e=ye*F-z;for(let je=0;je<X;je++)ce[_]=(je*M-V)*v,ce[g]=_e*y,ce[m]=H,c.push(ce.x,ce.y,ce.z),ce[_]=0,ce[g]=0,
vendor: 9,336 bytes, line 1
1ce[m]=S>0?1:-1,u.push(ce.x,ce.y,ce.z),h.push(je/P),h.push(1-ye/I),ee+=1}for(let ye=0;ye<I;ye++)for(let _e=0;_e<P;_e++){const ct=d+_e+X*(ye+1),Z=d+(_e+1)+X*(ye+1),ie=d+(_e+1)+X*ye;l.push(d+_e+X*ye,ct,ie),l.push(ct,Z,ie),$+=6}a.addGroup(f,$,w),f+=$,d+=ee}p("z","y","x",-1,-1,i,t,e,o,s,0),p("z","y","x",1,-1,i,t,-e,o,s,1),p("x","z","y",1,1,e,i,t,r,o,2),p("x","z","y",1,-1,e,i,-t,r,o,3),p("x","y","z",1,-1,e,t,i,r,s,4),p("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new Pe(c,3)),this.setAttribute("normal",new Pe(u,3)),this.setAttribute("uv",new Pe(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new mc(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function gc(n){const e={};for(const t in n){e[t]={};for(const i in n[t]){const r=n[t][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][i]=null):e[t][i]=r.clone():e[t][i]=Array.isArray(r)?r.slice():r}}return e}function ki(n){const e={};for(let t=0;t<n.length;t++){const i=gc(n[t]);for(const r in i)e[r]=i[r]}return e}function J2(n){const e=n.getRenderTarget();return null===e?n.outputColorSpace:!0===e.isXRRenderTarget?e.texture.colorSpace:vt.workingColorSpace}const mG={clone:gc,merge:ki};class to extends Uo{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=gc(e.uniforms),this.uniformsGroups=function pG(n){const e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const o=this.uniforms[r].value;t.uniforms[r]=o&&o.isTexture?{type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?{type:"c",value:o.getHex()}:o&&o.isVector2?{type:"v2",value:o.toArray()}:o&&o.isVector3?{type:"v3",value:o.toArray()}:o&&o.isVector4?{type:"v4",value:o.toArray()}:o&&o.isMatrix3?{type:"m3",value:o.toArray()}:o&&o.isMatrix4?{type:"m4",value:o.toArray()}:{value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const r in this.extensions)!0===this.extensions[r]&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class M1 extends kn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new De,this.projectionMatrix=new De,this.projectionMatrixInverse=new De,this.coordinateSystem=Cs}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}const Bo=new R,Q2=new J,eP=new J;class ti extends M1{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Ql*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*wa*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Ql*Math.atan(Math.tan(.5*wa*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){Bo.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Bo.x,Bo.y).multiplyScalar(-e/Bo.z),Bo.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Bo.x,Bo.y).multiplyScalar(-e/Bo.z)}getViewSize(e,t){return this.getViewBounds(e,Q2,eP),t.subVectors(eP,Q2)}setViewOffset(e,t,i,r,s,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*wa*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/c,r*=o.width/l,i*=o.height/c}const a=this.filmOffset;0!==a&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}class vG extends kn{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new ti(-90,1,e,t);r.layers=this.layers,this.add(r);const s=new ti(-90,1,e,t);s.layers=this.layers,this.add(s);const o=new ti(-90,1,e,t);o.layers=this.layers,this.add(o);const a=new ti(-90,1,e,t);a.layers=this.layers,this.add(a);const l=new ti(-90,1,e,t);l.layers=this.layers,this.add(l);const c=new ti(-90,1,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,l]=t;for(const c of t)this.remove(c);if(e===Cs)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else{if(2001!==e)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1)}for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,h=e.getRenderTarget(),d=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const _=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(t,s),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,a),e.setRenderTarget(i,3,r),e.render(t,l),e.setRenderTarget(i,4,r),e.render(t,c),i.texture.generateMipmaps=_,e.setRenderTarget(i,5,r),e.render(t,u),e.setRenderTarget(h,d,f),e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class Tp extends Xr{constructor(e,t,i,r,s,o,a,l,c,u){super(e=void 0!==e?e:[],t=void 0!==t?t:301,i,r,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class yG extends Ma{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1};this.texture=new Tp([i,i,i,i,i,i],t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:Qn}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace
vendor: 6,595 bytes, line 1
1=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i_uniforms={tEquirect:{value:null}},i_vertexShader="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i_fragmentShader="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",r=new mc(5,5,5),s=new to({name:"CubemapFromEquirect",uniforms:gc(i_uniforms),vertexShader:i_vertexShader,fragmentShader:i_fragmentShader,side:1,blending:0});s.uniforms.tEquirect.value=t;const o=new ai(r,s),a=t.minFilter;return t.minFilter===$s&&(t.minFilter=Qn),new vG(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}class Aa extends kn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const bG={type:"move"};class C1{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Aa,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Aa,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new R,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new R),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Aa,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new R,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new R),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const g=t.getJointPose(_,i),m=this._getHandJoint(c,_);null!==g&&(m.matrix.fromArray(g.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.matrixWorldNeedsUpdate=!0,m.jointRadius=g.radius),m.visible=null!==g}const d=c.joints["index-finger-tip"].position.distanceTo(c.joints["thumb-tip"].position),f=.02,p=.005;c.inputState.pinching&&d>f+p?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&d<=f-p&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==l&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),null!==s&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));null!==a&&(r=t.getPose(e.targetRaySpace,i),null===r&&null!==s&&(r=s),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(bG)))}return null!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==s),null!==c&&(c.visible=null!==o),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const i=new Aa;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class tP extends kn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new yi,this.environmentIntensity=1,this.environmentRotation=new yi,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}const lP=new R,cP=new At,uP=new At,MG=new R,hP=new De,Rp=new R,A1=new Ni,dP=new De,D1=new lc;class fP extends ai{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=v2,this.bindMatrix=new De,this.bindMatrixInverse=new De,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;
vendor: 4,535 bytes, line 1
1null===this.boundingBox&&(this.boundingBox=new Ki),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,Rp),this.boundingBox.expandByPoint(Rp)}computeBoundingSphere(){const e=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new Ni),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,Rp),this.boundingSphere.expandByPoint(Rp)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const r=this.matrixWorld;void 0!==this.material&&(null===this.boundingSphere&&this.computeBoundingSphere(),A1.copy(this.boundingSphere),A1.applyMatrix4(r),!1!==e.ray.intersectsSphere(A1)&&(dP.copy(r).invert(),D1.copy(e.ray).applyMatrix4(dP),(null===this.boundingBox||!1!==D1.intersectsBox(this.boundingBox))&&this._computeIntersections(e,t,D1)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new At,t=this.geometry.attributes.skinWeight;for(let i=0,r=t.count;i<r;i++){e.fromBufferAttribute(t,i);const s=1/e.manhattanLength();s!==1/0?e.multiplyScalar(s):e.set(1,0,0,0),t.setXYZW(i,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===v2?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const i=this.skeleton,r=this.geometry;cP.fromBufferAttribute(r.attributes.skinIndex,e),uP.fromBufferAttribute(r.attributes.skinWeight,e),lP.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let s=0;s<4;s++){const o=uP.getComponent(s);if(0!==o){const a=cP.getComponent(s);hP.multiplyMatrices(i.bones[a].matrixWorld,i.boneInverses[a]),t.addScaledVector(MG.copy(lP).applyMatrix4(hP),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class Op extends kn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class no extends Xr{constructor(e=null,t=1,i=1,r,s,o,a,l,c=gi,u=gi,h,d){super(null,o,a,l,c,u,r,s,h,d),this.isDataTexture=!0,this.image={data:e,width:t,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const pP=new De,CG=new De;class Lp{constructor(e=[],t=[]){this.uuid=mr(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,r=this.bones.length;i<r;i++)this.boneInverses.push(new De)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const i=new De;this.bones[e]&&i.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&i.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const e=this.bones,t=this.boneInverses,i=this.boneMatrices,r=this.boneTexture;for(let s=0,o=e.length;s<o;s++)pP.multiplyMatrices(e[s]?e[s].matrixWorld:CG,t[s]),pP.toArray(i,16*s);null!==r&&(r.needsUpdate=!0)}clone(){return new Lp(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=4*Math.ceil(e/4),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const i=new no(t,e,e,Zi,pr);return i.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=i,this}getBoneByName(e){for(let t=0,i=this.bones.length;t<i;t++){const r=this.bones[t];if(r.name===e)return r}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;
vendor: 4,743 bytes, line 1
1for(let i=0,r=e.bones.length;i<r;i++){const s=e.bones[i];let o=t[s];void 0===o&&(console.warn("THREE.Skeleton: No bone found with UUID:",s),o=new Op),this.bones.push(o),this.boneInverses.push((new De).fromArray(e.boneInverses[i]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,i=this.boneInverses;for(let r=0,s=t.length;r<s;r++)e.bones.push(t[r].uuid),e.boneInverses.push(i[r].toArray());return e}}const P1=new R,TG=new R,AG=new ht;class Vo{constructor(e=new R(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=P1.subVectors(i,t).cross(TG.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(P1),r=this.normal.dot(i);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||AG.getNormalMatrix(e),r=this.coplanarPoint(P1).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Da=new Ni,Np=new R;class kp{constructor(e=new Vo,t=new Vo,i=new Vo,r=new Vo,s=new Vo,o=new Vo){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Cs){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],c=r[4],u=r[5],h=r[6],d=r[7],f=r[8],p=r[9],_=r[10],g=r[11],m=r[12],v=r[13],y=r[14],b=r[15];if(i[0].setComponents(l-s,d-c,g-f,b-m).normalize(),i[1].setComponents(l+s,d+c,g+f,b+m).normalize(),i[2].setComponents(l+o,d+u,g+p,b+v).normalize(),i[3].setComponents(l-o,d-u,g-p,b-v).normalize(),i[4].setComponents(l-a,d-h,g-_,b-y).normalize(),t===Cs)i[5].setComponents(l+a,d+h,g+_,b+y).normalize();else{if(2001!==t)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);i[5].setComponents(a,h,_,y).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),Da.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),Da.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Da)}intersectsSprite(e){return Da.center.set(0,0,0),Da.radius=.7071067811865476,Da.applyMatrix4(e.matrixWorld),this.intersectsSphere(Da)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)<r)return!1;return!0}intersectsBox(e){const t=this.planes;for(let i=0;i<6;i++){const r=t[i];if(Np.x=r.normal.x>0?e.max.x:e.min.x,Np.y=r.normal.y>0?e.max.y:e.min.y,Np.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Np)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}class er extends Uo{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new me(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const Vp=new R,zp=new R,vP=new De,Mh=new lc,Hp=new Ni,L1=new R,yP=ne
1w R;class Ch extends kn{constructor(e=new pt,t=new er){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,i=[0];for(let r=1,s=t.count;r<s;r++)Vp.fromBufferAttribute(t,r-1),zp.fromBufferAttribute(t,r),i[r]=i[r-1],i[r]+=Vp.distanceTo(zp);e.setAttribute("lineDistance",new Pe(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const i=this.geometry,r=this.matrixWorld,s=e.params.Line.threshold,o=i.drawRange;if(null===i.boundingSphere&&i.computeBoundingSphere(),Hp.copy(i.boundingSphere),Hp.applyMatrix4(r),Hp.radius+=s,!1===e.ray.intersectsSphere(Hp))return;vP.copy(r).invert(),Mh.copy(e.ray).applyMatrix4(vP);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=this.isLineSegments?2:1,u=i.index,d=i.attributes.position;if(null!==u){const f=Math.max(0,o.start),p=Math.min(u.count,o.start+o.count);for(let _=f,g=p-1;_<g;_+=c){const m=u.getX(_),v=u.getX(_+1),y=Gp(this,e,Mh,l,m,v,_);y&&t.push(y)}if(this.isLineLoop){const _=u.getX(p-1),g=u.getX(f),m=Gp(this,e,Mh,l,_,g,p-1);m&&t.push(m)}}else{const f=Math.max(0,o.start),p=Math.min(d.count,o.start+o.count);for(let _=f,g=p-1;_<g;_+=c){const m=Gp(this,e,Mh,l,_,_+1,_);m&&t.push(m)}if(this.isLineLoop){const _=Gp(this,e,Mh,l,p-1,f,p-1);_&&t.push(_)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}}function Gp(n,e,t,i,r,s,o){const a=n.geometry.attributes.position;if(Vp.fromBufferAttribute(a,r),zp.fromBufferAttribute(a,s),t.distanceSqToSegment(Vp,zp,L1,yP)>i)return;L1.applyMatrix4(n.matrixWorld);const c=e.ray.origin.distanceTo(L1);return c<e.near||c>e.far?void 0:{distance:c,point:yP.clone().applyMatrix4(n.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:n}}class EP extends Xr{constructor(e,t,i,r,s,o,a,l,c,u=ql){if(u!==ql&&u!==Yl)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&u===ql&&(i=Io),void 0===i&&u===Yl&&(i=$l),super(null,r,s,o,a,l,u,i,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==a?a:gi,this.minFilter=void 0!==l?l:gi,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}function OP(n,e,t,i,r){let s,o;if(r===function pW(n,e,t,i){let r=0;for(let s=e,o=t-i;s<t;s+=i)r+=(n[o]-n[s])*(n[s+1]+n[o+1]),o=s;return r}(n,e,t,i)>0)for(s=e;s<t;s+=i)o=NP(s,n[s],n[s+1],o);else for(s=t-i;s>=e;s-=i)o=NP(s,n[s],n[s+1],o);return o&&Qp(o,o.next)&&(Ph(o),o=o.next),o}function Oa(n,e){if(!n)return n;e||(e=n);let i,t=n;do{if(i=!1,t.steiner||!Qp(t,t.next)&&0!==yn(t.prev,t,t.next))t=t.next;else{if(Ph(t),t=e=t.prev,t===t.next)break;i=!0}}while(i||t!==e);return e}function Ah(n,e,t,i,r,s,o){if(!n)return;!o&&s&&function lW(n,e,t,i){let r=n;do{0===r.z&&(r.z=$1(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,function cW(n){let e,t,i,r,s,o,a,l,c=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e<c&&(a++,i=i.nextZ,i);e++);for(l=c;a>0||l>0&&i;)0!==a&&(0===l||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,c*=2}while(o>1)}(r)}(n,i,r,s);let l,c,a=n;for(;n.prev!==n.next;)if(l=n.prev,c=n.next,s?eW(n,i,r,s):QG(n))e.push(l.i/t|0),e.push(n.i/t|0),e.push(c.i/t|0),Ph(n),n=c.next,a=c.next;else if((n=c)===a){o?1===o?Ah(n=tW(Oa(n),e,t),e,t,i,r,s,2):2===o&&nW(n,e,t,i,r,s):Ah(Oa(n),e,t,i,r,s,1);break}}function QG(n){const e=n.prev,t=n,i=n.next;if(yn(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,c=i.y,u=r<s?r<o?r:o:s<o?s:o,h=a<l?a<c?a:c:l<c?l:c,d=r>s?r>o?r:o:s>o?s:o,f=a>l?a>c?a:c:l>c?l:c;let p=i.next;for(;p!==e;){if(p.x>=u&&p.x<=d&&p.y>=h&&p.y<=f&&Ec(r,a,s,l,o,c,p.x,p.y)&&yn(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function eW(n,e,t,i){const r=n.prev,s=n,o=n.next;if(yn(r,s,o)>=0)return!1;const a=r.x,l=s.x,c=o.x,u=r.y,h=s.y,d=o.y,f=a<l?a<c?a:c:l<c?l:c,p=u<h?u<d?u:d:h<d?h:d,_=a>l?a>c?a:c:l>c?l:c,g=u>h?u>d?u:d:h>d?h:d,m=$1(f,p,e,t,i),v=$1(_,g,e,t,i);let y=n.prevZ,b=n.nextZ;for(;y&&y.z>=m&&b&&b.z<=v;){if(y.x>=f&&y.x<=_&&y.y>=p&&y.y<=g&&y!==r&&y!==o&&Ec(a,u,l,h,c,d,y.x,y.y)&&yn(y.prev,y,y.next)>=0||(y=y.prevZ,b.x>=f&&b.x<=_&&b.y>=p&&b.y<=g&&b!==r&&b!==o&&Ec(a,u,l,h,c,d,b.x,b.y)&&yn(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;y&&y.z>=m;){if(y.x>=f&&y.x<=_&&y.y>=p&&y.y<=g&&y!==r&&y!==o&&Ec(a,u,l,h,c,d,y.x,y.y)&&yn(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;b&&b.z<=v;){if(b.x>=f&&b.x<=_&&b.y>=p&&b.y<=g&&b!==r&&b!==o&&Ec(a,u,l,h,c,d,b.x,b.y)&&yn(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function tW(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!Qp(r,s)&&LP(r,i,i.next,s)&&Dh(r,s)&&Dh(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),Ph(i),Ph(i.next),i=n=s),i=i.next}while(i!==n);return Oa(i)}function nW(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;
1){if(o.i!==a.i&&hW(o,a)){let l=FP(o,a);return o=Oa(o,o.next),l=Oa(l,l.next),Ah(o,e,t,i,r,s,0),void Ah(l,e,t,i,r,s,0)}a=a.next}o=o.next}while(o!==n)}function rW(n,e){return n.x-e.x}function sW(n,e){const t=function oW(n,e){let r,t=e,i=-1/0;const s=n.x,o=n.y;do{if(o<=t.y&&o>=t.next.y&&t.next.y!==t.y){const d=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(d<=s&&d>i&&(i=d,r=t.x<t.next.x?t:t.next,d===s))return r}t=t.next}while(t!==e);if(!r)return null;const a=r,l=r.x,c=r.y;let h,u=1/0;t=r;do{s>=t.x&&t.x>=l&&s!==t.x&&Ec(o<c?s:i,o,l,c,o<c?i:s,o,t.x,t.y)&&(h=Math.abs(o-t.y)/(s-t.x),Dh(t,n)&&(h<u||h===u&&(t.x>r.x||t.x===r.x&&aW(r,t)))&&(r=t,u=h)),t=t.next}while(t!==a);return r}(n,e);if(!t)return e;const i=FP(t,n);return Oa(i,i.next),Oa(t,t.next)}function aW(n,e){return yn(n.prev,n,e.prev)<0&&yn(e.next,n,n.next)<0}function $1(n,e,t,i,r){return(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=(n-t)*r|0)|n<<8))|n<<4))|n<<2))|n<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-i)*r|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function uW(n){let e=n,t=n;do{(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next}while(e!==n);return t}function Ec(n,e,t,i,r,s,o,a){return(r-o)*(e-a)>=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function hW(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!function dW(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&LP(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}(n,e)&&(Dh(n,e)&&Dh(e,n)&&function fW(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do{t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next}while(t!==n);return i}(n,e)&&(yn(n.prev,n,e.prev)||yn(n,e.prev,e))||Qp(n,e)&&yn(n.prev,n,n.next)>0&&yn(e.prev,e,e.next)>0)}function yn(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Qp(n,e){return n.x===e.x&&n.y===e.y}function LP(n,e,t,i){const r=tm(yn(n,e,t)),s=tm(yn(n,e,i)),o=tm(yn(t,i,n)),a=tm(yn(t,i,e));return!!(r!==s&&o!==a||0===r&&em(n,t,e)||0===s&&em(n,i,e)||0===o&&em(t,n,i)||0===a&&em(t,e,i))}function em(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function tm(n){return n>0?1:n<0?-1:0}function Dh(n,e){return yn(n.prev,n,n.next)<0?yn(n,e,n.next)>=0&&yn(n,n.prev,e)>=0:yn(n,e,n.prev)<0||yn(n,n.next,e)<0}function FP(n,e){const t=new q1(n.i,n.x,n.y),i=new q1(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function NP(n,e,t,i){const r=new q1(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Ph(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function q1(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Ss{static area(e){const t=e.length;let i=0;for(let r=t-1,s=0;s<t;r=s++)i+=e[r].x*e[s].y-e[s].x*e[r].y;return.5*i}static isClockWise(e){return Ss.area(e)<0}static triangulateShape(e,t){const i=[],r=[],s=[];kP(e),UP(i,e);let o=e.length;t.forEach(kP);for(let l=0;l<t.length;l++)r.push(o),o+=t[l].length,UP(i,t[l]);const a=function(n,e,t=2){const i=e&&e.length,r=i?e[0]*t:n.length;let s=OP(n,0,r,t,!0);const o=[];if(!s||s.next===s.prev)return o;let a,l,c,u,h,d,f;if(i&&(s=function iW(n,e,t,i){const r=[];let s,o,a,l,c;for(s=0,o=e.length;s<o;s++)a=e[s]*i,l=s<o-1?e[s+1]*i:n.length,c=OP(n,a,l,i,!1),c===c.next&&(c.steiner=!0),r.push(uW(c));for(r.sort(rW),s=0;s<r.length;s++)t=sW(r[s],t);return t}(n,e,s,t)),n.length>80*t){a=c=n[0],l=u=n[1];for(let p=t;p<r;p+=t)h=n[p],d=n[p+1],h<a&&(a=h),d<l&&(l=d),h>c&&(c=h),d>u&&(u=d);f=Math.max(c-a,u-l),f=0!==f?32767/f:0}return Ah(s,o,t,a,l,f,0),o}(i,r);for(let l=0;l<a.length;l+=3)s.push(a.slice(l,l+3));return s}}function kP(n){const e=n.length;e>2&&n[e-1].equals(n[0])&&n.pop()}function UP(n,e){for(let t=0;t<e.length;t++)n.push(e[t].x),n.push(e[t].y)}class Ih extends pt{constructor(e=1,t=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:r};const s=e/2,o=t/2,a=Math.floor(i),l=Math.floor(r),c=a+1,u=l+1,h=e/a,d=t/l,f=[],p=[],_=[],g=[];for(let m=0;m<u;m++){const v=m*d-o;for(let y=0;y<c;y++)p.push(y*h-s,-v,0),_.push(0,0,1),g.push(y/a),g.push(1-m/l)}for(let m=0;m<l;m++)for(let v=0;v<a;v++){const b=v+c*(m+1),T=v+1+c*(m+1),S=v+1+c*m;
vendor: 6,509 bytes, line 1
1f.push(v+c*m,b,S),f.push(b,T,S)}this.setIndex(f),this.setAttribute("position",new Pe(p,3)),this.setAttribute("normal",new Pe(_,3)),this.setAttribute("uv",new Pe(g,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ih(e.width,e.height,e.widthSegments,e.heightSegments)}}class rm extends Uo{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new me(16777215),this.specular=new me(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new me(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new J(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new yi,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.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.flatShading=e.flatShading,this.fog=e.fog,this}}class zP extends Uo{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new me(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new me(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new J(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new yi,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,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.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.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.flatShading=e.flatShading,this.fog=e.fog,this}}class HP extends Uo{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class GP extends Uo{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function La(n,e,t){return!n||!t&&n.constructor===e?n:"number"==typeof e.BYTES_PER_ELEMENT?new e(n):Array.prototype.slice.call(n)}function jP(n){const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(function e(r,s){return n[r]-n[s]}),i}function nb(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function ib(n,e,t,i){let r=1,s=n[0];for(;void 0!==s&&void 0===s[i];)s=n[r++];if(void 0===s)return;let o=s[i];if(void 0!==o)if(Array.isArray(o))do{o=s[i],void 0!==o&&(e.push(s.time),t.push.apply(t,o)),s=n[r++]}while(void 0!==s);else if(void 0!==o.toArray)do{o=s[i],void 0!==o&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++]}while(void 0!==s);else do{o=s[i],void 0!==o&&(e.push(s.time),t.push(o)),s=n[r++]}while(void 0!==s)}class sm{constructor(e,t,i,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,r=t[i],s=t[i-1];e:{t:{let o;n:{i:if(!(e<r)){for(let a=i+2;;){if(void 0===r){if(e<s)break i;return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===a)break;if(s=r,r=t[++i],e<r)break t}o=t.length;break n}if(e>=s)break e;{const a=t[1];e<a&&(i=2,s=a);for(let l=i-2;;){if(void 0===s)return this._cachedIndex=0,this.copySampleValue_(0);if(i===l)break;if(r=s,s=t[--i-1],e>=s)break t}o=i,i=0}
vendor: 17,178 bytes, line 1
1}for(;i<o;){const a=i+o>>>1;e<t[a]?o=a:i=a+1}if(r=t[i],s=t[i-1],void 0===s)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===r)return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,s,r)}return this.interpolate_(i,s,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r;for(let o=0;o!==r;++o)t[o]=i[s+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class DW extends sm{constructor(e,t,i,r){super(e,t,i,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(e,t,i){const r=this.parameterPositions;let s=e-2,o=e+1,a=r[s],l=r[o];if(void 0===a)switch(this.getSettings_().endingStart){case 2401:s=e,a=2*t-i;break;case 2402:s=r.length-2,a=t+r[s]-r[s+1];break;default:s=e,a=i}if(void 0===l)switch(this.getSettings_().endingEnd){case 2401:o=e,l=2*i-t;break;case 2402:o=1,l=i+r[1]-r[0];break;default:o=e-1,l=t}const c=.5*(i-t),u=this.valueSize;this._weightPrev=c/(t-a),this._weightNext=c/(l-i),this._offsetPrev=s*u,this._offsetNext=o*u}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,u=this._offsetPrev,h=this._offsetNext,d=this._weightPrev,f=this._weightNext,p=(i-t)/(r-t),_=p*p,g=_*p,m=-d*g+2*d*_-d*p,v=(1+d)*g+(-1.5-2*d)*_+(-.5+d)*p+1,y=(-1-f)*g+(1.5+f)*_+.5*p,b=f*g-f*_;for(let T=0;T!==a;++T)s[T]=m*o[u+T]+v*o[c+T]+y*o[l+T]+b*o[h+T];return s}}class $P extends sm{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,u=(i-t)/(r-t),h=1-u;for(let d=0;d!==a;++d)s[d]=o[c+d]*h+o[l+d]*u;return s}}class PW extends sm{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Es{constructor(e,t,i,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=La(t,this.TimeBufferType),this.values=La(i,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let i;if(t.toJSON!==this.toJSON)i=t.toJSON(e);else{i={name:e.name,times:La(e.times,Array),values:La(e.values,Array)};const r=e.getInterpolation();r!==e.DefaultInterpolation&&(i.interpolation=r)}return i.type=e.ValueTypeName,i}InterpolantFactoryMethodDiscrete(e){return new PW(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new $P(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new DW(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(i);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let i=0,r=t.length;i!==r;++i)t[i]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let i=0,r=t.length;i!==r;++i)t[i]*=e}return this}trim(e,t){const i=this.times,r=i.length;let s=0,o=r-1;for(;s!==r&&i[s]<e;)++s;for(;-1!==o&&i[o]>t;)--o;if(++o,0!==s||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;0===s&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if("number"==typeof l&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(null!==o&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(void 0!==r&&function WP(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}(r))for(let a=0,l=r.length;a!==l;++a){const c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),r=2302===this.getInterpolation(),s=e.length-1;let o=1;for(let a=1;a<s;++a){let l=!1;const c=e[a];if(c!==e[a+1]&&(1!==a||c!==e[0]))if(r)l=!0;else{const h=a*i,d=h-i,f=h+i;for(let p=0;p!==i;++p){const _=t[h+p];if(_!==t[d+p]||_!==t[f+p]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const h=a*i,d=o*i;for(let f=0;f!==i;++f)t[d+f]=t[h+f]}++o}}if(s>0){e[o]=e[s];for(let a=s*i,l=o*i,c=0;c!==i;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),r=new(0,this.constructor)(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Es.prototype.TimeBufferType=Float32Array,Es.prototype.ValueBufferType=Float32Array,Es.prototype.DefaultInterpolation=2301;class Tc extends Es{constructor(e,t,i){super(e,t,i)}}Tc.prototype.ValueTypeName="bool",Tc.prototype.ValueBufferType=Array,Tc.prototype.DefaultInterpolation=2300,Tc.prototype.InterpolantFactoryMethodLinear=void 0,Tc.prototype.InterpolantFactoryMethodSmooth=void 0;class qP extends Es{}qP.prototype.ValueTypeName="color";class Rh extends Es{}Rh.prototype.ValueTypeName="number";class IW extends sm{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let c=e*a;for(let u=c+a;c!==u;c+=4)vn.slerpFlat(s,0,o,c-a,o,c,l);return s}}class Ac extends Es{InterpolantFactoryMethodLinear(e){return new IW(this.times,this.values,this.getValueSize(),e)}}Ac.prototype.ValueTypeName="quaternion",Ac.prototype.InterpolantFactoryMethodSmooth=void 0;class Dc extends Es{constructor(e,t,i){super(e,t,i)}}Dc.prototype.ValueTypeName="string",Dc.prototype.ValueBufferType=Array,Dc.prototype.DefaultInterpolation=2300,Dc.prototype.InterpolantFactoryMethodLinear=void 0,Dc.prototype.InterpolantFactoryMethodSmooth=void 0;class Oh extends Es{}Oh.prototype.ValueTypeName="vector";class Lh{constructor(e="",t=-1,i=[],r=2500){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=mr(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(OW(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(Es.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a<s;a++){let l=[],c=[];l.push((a+s-1)%s,a,(a+1)%s),c.push(0,1,0);const u=jP(l);l=nb(l,1,u),c=nb(c,1,u),!r&&0===l[0]&&(l.push(s),c.push(c[0])),o.push(new Rh(".morphTargetInfluences["+t[a].name+"]",l,c).scale(1/i))}return new this(e,-1,o)}static findByName(e,t){let i=e;if(!Array.isArray(e)){const r=e;i=r.geometry&&r.geometry.animations||r.animations}for(let r=0;r<i.length;r++)if(i[r].name===t)return i[r];return null}static CreateClipsFromMorphTargetSequences(e,t,i){const r={},s=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const c=e[a],u=c.name.match(s);if(u&&u.length>1){const h=u[1];let d=r[h];d||(r[h]=d=[]),d.push(c)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(h,d,f,p,_){if(0!==f.length){const g=[],m=[];ib(f,g,m,p),0!==g.length&&_.push(new h(d,g,m))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let h=0;h<c.length;h++){const d=c[h].keys;if(d&&0!==d.length)if(d[0].morphTargets){const f={};let p;for(p=0;p<d.length;p++)if(d[p].morphTargets)for(let _=0;_<d[p].morphTargets.length;_++)f[d[p].morphTargets[_]]=-1;for(const _ in f){const g=[],m=[];for(let v=0;v!==d[p].morphTargets.length;++v){const y=d[p];g.push(y.time),m.push(y.morphTarget===_?1:0)}r.push(new Rh(".morphTargetInfluence["+_+"]",g,m))}l=f.length*o}else{const f=".bones["+t[h].name+"]";i(Oh,f+".position",d,"pos",r),i(Ac,f+".quaternion",d,"rot",r),i(Oh,f+".scale",d,"scl",r)}}return 0===r.length?null:new this(s,l,r,a)}resetDuration(){let t=0;for(let i=0,r=this.tracks.length;i!==r;++i){const s=this.tracks[i];t=Math.max(t,s.times[s.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function OW(n){if(void 0===n.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=function RW(n){switch(n.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Rh;case"vector":case"vector2":case"vector3":case"vector4":return Oh;case"color":return qP;case"quaternion":return Ac;case"bool":case"boolean":return Tc;case"string":return Dc}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+n)}(n.type);if(void 0===n.times){const t=[],i=[];ib(n.keys,t,i,"value"),n.times=t,n.values=i}return void 0!==e.parse?e.parse(n):new e(n.name,n.times,n.values,n.interpolation)}const zo={enabled:!1,files:{},add:function(n,e){!1!==this.enabled&&(this.files[n]=e)},get:function(n){if(!1!==this.enabled)return this.files[n]},remove:function(n){delete this.files[n]},clear:function(){this.files={}}};class YP{constructor(e,t,i){const r=this;let l,s=!1,o=0,a=0;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=i,this.itemStart=function(u){a++,!1===s&&void 0!==r.onStart&&r.onStart(u,o,a),s=!0},this.itemEnd=function(u){o++,void 0!==r.onProgress&&r.onProgress(u,o,a),o===a&&(s=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(u){void 0!==r.onError&&r.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,h){return c.push(u,h),this},this.removeHandler=function(u){const h=c.indexOf(u);return-1!==h&&c.splice(h,2),this},this.getHandler=function(u){for(let h=0,d=c.length;h<d;h+=2){const f=c[h],p=c[h+1];if(f.global&&(f.lastIndex=0),f.test(u))return p}return null}}}const LW=new YP;let Pc=(()=>{class n{constructor(t){this.manager=void 0!==t?t:LW,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,i){const r=this;return new Promise(function(s,o){r.load(t,s,i,o)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}return n.DEFAULT_MATERIAL_NAME="__DEFAULT",n})();const io={};class FW extends Error{constructor(e,t){super(e),this.response=t}}class ro extends Pc{constructor(e){super(e)}load(e,t,i,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const s=zo.get(e);if(void 0!==s)return this.manager.itemStart(e),setTimeout(()=>{t&&t(s),this.manager.itemEnd(e)},0),s;if(void 0!==io[e])return void io[e].push({onLoad:t,onProgress:i,onError:r});io[e]=[],io[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(200===c.status||0===c.status){if(0===c.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===c.body||void 0===c.body.getReader)return c;const u=io[e],h=c.body.getReader(),d=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),f=d?parseInt(d):0,p=0!==f;let _=0;const g=new ReadableStream({start(m){!function v(){h.read().then(({done:y,value:b})=>{if(y)m.close();else{_+=b.byteLength;const T=new ProgressEvent("progress",{lengthComputable:p,loaded:_,total:f});for(let S=0,P=u.length;S<P;S++){const I=u[S];I.onProgress&&I.onProgress(T)}m.enqueue(b),v()}},y=>{m.error(y)})}()}});return new Response(g)}throw new FW(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>(new DOMParser).parseFromString(u,a));case"json":return c.json();default:if(void 0===a)return c.text();{const h=/charset="?([^;"\s]*)"?/i.exec(a),d=h&&h[1]?h[1].toLowerCase():void 0,f=new TextDecoder(d);return c.arrayBuffer().then(p=>f.decode(p))}}}).then(c=>{zo.add(e,c);const u=io[e];delete io[e];for(let h=0,d=u.length;h<d;h++){const f=u[h];f.onLoad&&f.onLoad(c)}}).catch(c=>{const u=io[e];if(void 0===u)throw this.manager.itemError(e),c;delete io[e];for(let h=0,d=u.length;h<d;h++){const f=u[h];f.onError&&f.onError(c)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class om extends Pc{constructor(e){super(e)}load(e,t,i,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=zo.get(e);if(void 0!==o)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a=uh("img");function l(){u(),zo.add(e,this),t&&t(this),s.manager.itemEnd(e)}function c(h){u(),r&&r(h),s.manager.itemError(e),s.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),s.manager.itemStart(e),a.src=e,a}}class NW extends Pc{constructor(e){super(e)}load(e,t,i,r){const s=new Xr,o=new om(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){s.image=a,s.needsUpdate=!0,void 0!==t&&t(s)},i,r),s}}class am extends kn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new me(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),void 0!==this.target&&(t.object.target=this.target.uuid),t}}const rb=new De,XP=new R,ZP=new R;class sb{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new J(512,512),this.map=null,this.mapPass=null,this.matrix=new De,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new kp,this._frameExtents=new J(1,1),this._viewportCount=1,this._viewports=[new At(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;XP.setFromMatrixPosition(e.matrixWorld),t.position.copy(XP),ZP.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(ZP),t.updateMatrixWorld(),rb.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rb),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(rb)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 1!==this.intensity&&(e.intensity=this.intensity),0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radiu
vendor: 8,565 bytes, line 1
1s=this.radius),(512!==this.mapSize.x||512!==this.mapSize.y)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class UW extends sb{constructor(){super(new ti(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,i=2*Ql*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,s=e.distance||t.far;(i!==t.fov||r!==t.aspect||s!==t.far)&&(t.fov=i,t.aspect=r,t.far=s,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class KP extends am{constructor(e,t,i=0,r=Math.PI/3,s=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(kn.DEFAULT_UP),this.updateMatrix(),this.target=new kn,this.distance=i,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new UW}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const JP=new De,Fh=new R,ob=new R;class BW extends sb{constructor(){super(new ti(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new J(4,2),this._viewportCount=6,this._viewports=[new At(2,1,1,1),new At(0,1,1,1),new At(3,1,1,1),new At(1,1,1,1),new At(3,0,1,1),new At(1,0,1,1)],this._cubeDirections=[new R(1,0,0),new R(-1,0,0),new R(0,0,1),new R(0,0,-1),new R(0,1,0),new R(0,-1,0)],this._cubeUps=[new R(0,1,0),new R(0,1,0),new R(0,1,0),new R(0,1,0),new R(0,0,1),new R(0,0,-1)]}updateMatrices(e,t=0){const i=this.camera,r=this.matrix,s=e.distance||i.far;s!==i.far&&(i.far=s,i.updateProjectionMatrix()),Fh.setFromMatrixPosition(e.matrixWorld),i.position.copy(Fh),ob.copy(i.position),ob.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(ob),i.updateMatrixWorld(),r.makeTranslation(-Fh.x,-Fh.y,-Fh.z),JP.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(JP)}}class ab extends am{constructor(e,t,i=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new BW}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class lb extends M1{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,l=r-t;if(null!==this.view&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}class VW extends sb{constructor(){super(new lb(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class QP extends am{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(kn.DEFAULT_UP),this.updateMatrix(),this.target=new kn,this.shadow=new VW}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class cb extends am{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class qW extends ti{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e,this.index=0}}const db="\\[\\]\\.:\\/",JW=new RegExp("["+db+"]","g"),fb="[^"+db+"]",QW="[^"+db.replace("\\.","")+"]",rj=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",fb)+/(WCOD+)?/.source.replace("WCOD",QW)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",fb)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",fb)+"$"),sj=["material","materials","bones","map"];class oj{constructor(e,t,i){const r=i||jt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const r=this._bindings[this._targetGroup.nCachedObjects_];void 0!==r&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}let jt=(()=>{class n{constructor(t,i,r){this.path=i,this.parsedPath=r||n.parseTrackName(i),this.node=n.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,i,r){return t&&t.isAnimationObjectGroup?new n.Composite(t,i,r):new n(t,i,r)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(JW,"")}static parseTrackName(t){const i=rj.exec(t);if(null===i)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const r={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},s=r.nodeName&&r.nodeName.lastIndexOf(".");if(void 0!==s&&-1!==s){const o=r.nodeName.substring(s+1);-1!==sj.indexOf(o)&&(r.nodeName=r.nodeName.substring(0,s),r.objectName=o)}if(null===r.propertyName||0===r.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return r}static findNode(t,i){if(void 0===i||""===i||"."===i||-1===i||i===t.name||i===t.uuid)return t;if(t.skeleton){const r=t.skeleton.getBoneByName(i);if(void 0!==r)return r}if(t.children){const r=function(o){for(let a=0;a<o.length;a++){const l=o[a];if(l.name===i||l.uuid===i)return l;const c=r(l.children);if(c)return c}return null},s=r(t.children);if(s)return s}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,i){t[i]=this.targetObject[this.propertyName]}_getValue_array(t,i){const r=this.resolvedProperty;for(let s=0,o=r.length;s!==o;++s)t[i++]=r[s]}_getValue_arrayElement(t,i){t[i]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,i){this.resolvedProperty.toArray(t,i)}_setValue_direct(t,i){this.targetObject[this.propertyName]=t[i]}_setValue_direct_setNeedsUpdate(t,i){this.targetObject[this.propertyName]=t[i],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,i){this.targetObject[this.propertyName]=t[i],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,i){const r=this.resolvedProperty;for(let s=0,o=r.length;s!==o;++s)r[s]=t[i++]}_setValue_array_setNeedsUpdate(t,i){const r=this.resolvedProperty;for(let s=0,o=r.length;s!==o;++s)r[s]=t[i++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,i){const r=this.resolvedProperty;for(let s=0,o=r.length;s!==o;++s)r[s]=t[i++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,i){this.resolvedProperty[this.propertyIndex]=t[i]}_setValue_arrayElement_setNeedsUpdate(t,i){this.resolvedProperty[this.propertyIndex]=t[i],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,i){this.resolvedProperty[this.propertyIndex]=t[i],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,i){this.resolvedProperty.fromArray(t,i)}_setValue_fromArray_setNeedsUpdate(t,i){this.resolvedProperty.fromArray(t,i),this.targetObject.needsUpdate=!0}
1_setValue_fromArray_setMatrixWorldNeedsUpdate(t,i){this.resolvedProperty.fromArray(t,i),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,i){this.bind(),this.getValue(t,i)}_setValue_unbound(t,i){this.bind(),this.setValue(t,i)}bind(){let t=this.node;const i=this.parsedPath,r=i.objectName,s=i.propertyName;let o=i.propertyIndex;if(t||(t=n.findNode(this.rootNode,i.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");if(r){let u=i.objectIndex;switch(r){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(let h=0;h<t.length;h++)if(t[h].name===u){u=h;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);t=t.material.map;break;default:if(void 0===t[r])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[r]}if(void 0!==u){if(void 0===t[u])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[u]}}const a=t[s];if(void 0===a)return void console.error("THREE.PropertyBinding: Trying to update property for track: "+i.nodeName+"."+s+" but it wasn't found.",t);let l=this.Versioning.None;this.targetObject=t,!0===t.isMaterial?l=this.Versioning.NeedsUpdate:!0===t.isObject3D&&(l=this.Versioning.MatrixWorldNeedsUpdate);let c=this.BindingType.Direct;if(void 0!==o){if("morphTargetInfluences"===s){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==t.morphTargetDictionary[o]&&(o=t.morphTargetDictionary[o])}c=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=o}else void 0!==a.fromArray&&void 0!==a.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(c=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=s;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][l]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}return n.Composite=oj,n})();jt.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},jt.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},jt.prototype.GetterByBindingType=[jt.prototype._getValue_direct,jt.prototype._getValue_array,jt.prototype._getValue_arrayElement,jt.prototype._getValue_toArray],jt.prototype.SetterByBindingTypeAndVersioning=[[jt.prototype._setValue_direct,jt.prototype._setValue_direct_setNeedsUpdate,jt.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[jt.prototype._setValue_array,jt.prototype._setValue_array_setNeedsUpdate,jt.prototype._setValue_array_setMatrixWorldNeedsUpdate],[jt.prototype._setValue_arrayElement,jt.prototype._setValue_arrayElement_setNeedsUpdate,jt.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[jt.prototype._setValue_fromArray,jt.prototype._setValue_fromArray_setNeedsUpdate,jt.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]],new Float32Array(1);class hI{constructor(e=1,t=0,i=0){return this.radius=e,this.phi=t,this.theta=i,this}set(e,t,i){return this.radius=e,this.phi=t,this.theta=i,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=lt(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,i){return this.radius=Math.sqrt(e*e+t*t+i*i),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,i),this.phi=Math.acos(lt(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}class hj extends xa{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(){}disconnect(){}dispose(){}update(){}}function _b(n,e,t,i){const r=function mj(n){switch(n){case qs:case 1010:return{byteLength:1,components:1};case ah:case 1011:case lh:return{byteLength:2,components:1};case 1017:case 1018:return{byteLength:2,components:4};case Io:case 1013:case pr:return{byteLength:4,components:1};case 35902:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}(i);switch(t){case 1021:case 1024:return n*e;case 1025:return n*e*2;case 1028:case 1029:return n*e/r.components*r.byteLength;case 1030:case 1031:return n*e*2/r.components*r.byteLength;case 1022:return n*e*3/r.components*r.byteLength;case Zi:case 1033:return n*e*4/r.components*r.byteLength;case ep:case tp:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case np:case ip:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case 35841:case 35843:return Math.max(n,16)*Math.max(e,8)/4;case 35840:case 35842:return Math.max(n,8)*Math.max(e,8)/2;case 36196:case 37492:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case 37496:case 37808:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;
1case 37809:return Math.floor((n+4)/5)*Math.floor((e+3)/4)*16;case 37810:return Math.floor((n+4)/5)*Math.floor((e+4)/5)*16;case 37811:return Math.floor((n+5)/6)*Math.floor((e+4)/5)*16;case 37812:return Math.floor((n+5)/6)*Math.floor((e+5)/6)*16;case 37813:return Math.floor((n+7)/8)*Math.floor((e+4)/5)*16;case 37814:return Math.floor((n+7)/8)*Math.floor((e+5)/6)*16;case 37815:return Math.floor((n+7)/8)*Math.floor((e+7)/8)*16;case 37816:return Math.floor((n+9)/10)*Math.floor((e+4)/5)*16;case 37817:return Math.floor((n+9)/10)*Math.floor((e+5)/6)*16;case 37818:return Math.floor((n+9)/10)*Math.floor((e+7)/8)*16;case 37819:return Math.floor((n+9)/10)*Math.floor((e+9)/10)*16;case 37820:return Math.floor((n+11)/12)*Math.floor((e+9)/10)*16;case 37821:return Math.floor((n+11)/12)*Math.floor((e+11)/12)*16;case rp:case 36494:case 36495:return Math.ceil(n/4)*Math.ceil(e/4)*16;case 36283:case 36284:return Math.ceil(n/4)*Math.ceil(e/4)*8;case 36285:case 36286:return Math.ceil(n/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function wI(n,e,t,i,r,s,o){try{var a=n[s](o),l=a.value}catch(c){return void t(c)}a.done?e(l):Promise.resolve(l).then(i,r)}function MI(n){return function(){var e=this,t=arguments;return new Promise(function(i,r){var s=n.apply(e,t);function o(l){wI(s,i,r,o,a,"next",l)}function a(l){wI(s,i,r,o,a,"throw",l)}o(void 0)})}}function CI(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==t&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function gj(n){const e=new WeakMap;return{get:function r(a){return a.isInterleavedBufferAttribute&&(a=a.data),e.get(a)},remove:function s(a){a.isInterleavedBufferAttribute&&(a=a.data);const l=e.get(a);l&&(n.deleteBuffer(l.buffer),e.delete(a))},update:function o(a,l){if(a.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const u=e.get(a);return void((!u||u.version<a.version)&&e.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version}))}const c=e.get(a);if(void 0===c)e.set(a,function t(a,l){const c=a.array,u=a.usage,h=c.byteLength,d=n.createBuffer();let f;if(n.bindBuffer(l,d),n.bufferData(l,c,u),a.onUploadCallback(),c instanceof Float32Array)f=n.FLOAT;else if(c instanceof Uint16Array)f=a.isFloat16BufferAttribute?n.HALF_FLOAT:n.UNSIGNED_SHORT;else if(c instanceof Int16Array)f=n.SHORT;else if(c instanceof Uint32Array)f=n.UNSIGNED_INT;else if(c instanceof Int32Array)f=n.INT;else if(c instanceof Int8Array)f=n.BYTE;else if(c instanceof Uint8Array)f=n.UNSIGNED_BYTE;else{if(!(c instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);f=n.UNSIGNED_BYTE}return{buffer:d,type:f,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:h}}(a,l));else if(c.version<a.version){if(c.size!==a.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");(function i(a,l,c){const u=l.array,h=l.updateRanges;if(n.bindBuffer(c,a),0===h.length)n.bufferSubData(c,0,u);else{h.sort((f,p)=>f.start-p.start);let d=0;for(let f=1;f<h.length;f++){const p=h[d],_=h[f];_.start<=p.start+p.count+1?p.count=Math.max(p.count,_.start+_.count-p.start):(++d,h[d]=_)}h.length=d+1;for(let f=0,p=h.length;f<p;f++){const _=h[f];n.bufferSubData(c,_.start*u.BYTES_PER_ELEMENT,u,_.start,_.count)}l.clearUpdateRanges()}l.onUploadCallback()})(c.buffer,a,l),c.version=a.version}}}}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"173"}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="173");const bt
vendor: 24,872 bytes, line 1
1={alphahash_fragment:"#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n\t#if ! defined( GL_ANGLE_multi_draw )\n\t#define gl_DrawID _gl_DrawID\n\tuniform int _gl_DrawID;\n\t#endif\n\tuniform highp sampler2D batchingTexture;\n\tuniform highp usampler2D batchingIdTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n\tfloat getIndirectIndex( const in int i ) {\n\t\tint size = textureSize( batchingIdTexture, 0 ).x;\n\t\tint x = i % size;\n\t\tint y = i / size;\n\t\treturn float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n\t}\n#endif\n#ifdef USE_BATCHING_COLOR\n\tuniform sampler2D batchingColorTexture;\n\tvec3 getBatchingColor( const in float i ) {\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n\t}\n#endif",batching_vertex:"#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n\t\temissiveColor = sRGBTransferEOTF( emissiveColor );\n\t#endif\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"vec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t}
vendor: 5,673 bytes, line 1
1 else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}
vendor: 5,966 bytes, line 1
1\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;
vendor: 4,695 bytes, line 1
1\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alph
vendor: 11,921 bytes, line 1
1aB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
vendor: 14,255 bytes, line 1
1\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );
vendor: 4,597 bytes, line 1
1\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 25
vendor: 18,431 bytes, line 1
15.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;
vendor: 2,005 bytes, line 1
1\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);
vendor: 9,105 bytes, line 1
1\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t#else\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;
vendor: 5,728 bytes, line 1
1\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
vendor: 37,111 bytes, line 1
1\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",depth_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix[ 3 ];\n\tvec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}"},
vendor: 765 bytes, line 1
1ve={common:{diffuse:{value:new me(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new ht},alphaMap:{value:null},alphaMapTransform:{value:new ht},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new ht}},envmap:{envMap:{value:null},envMapRotation:{value:new ht},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new ht}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new ht}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new ht},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new ht},normalScale:{value:new J(1,1)}}
vendor: 7,767 bytes, line 1
1,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new ht},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new ht}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new ht}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new ht}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new me(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new me(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new ht},alphaTest:{value:0},uvTransform:{value:new ht}},sprite:{diffuse:{value:new me(16777215)},opacity:{value:1},center:{value:new J(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new ht},alphaMap:{value:null},alphaMapTransform:{value:new ht},alphaTest:{value:0}}},Ts={basic:{uniforms:ki([ve.common,ve.specularmap,ve.envmap,ve.aomap,ve.lightmap,ve.fog]),vertexShader:bt.meshbasic_vert,fragmentShader:bt.meshbasic_frag},lambert:{uniforms:ki([ve.common,ve.specularmap,ve.envmap,ve.aomap,ve.lightmap,ve.emissivemap,ve.bumpmap,ve.normalmap,ve.displacementmap,ve.fog,ve.lights,{emissive:{value:new me(0)}}]),vertexShader:bt.meshlambert_vert,fragmentShader:bt.meshlambert_frag},phong:{uniforms:ki([ve.common,ve.specularmap,ve.envmap,ve.aomap,ve.lightmap,ve.emissivemap,ve.bumpmap,ve.normalmap,ve.displacementmap,ve.fog,ve.lights,{emissive:{value:new me(0)},specular:{value:new me(1118481)},shininess:{value:30}}]),vertexShader:bt.meshphong_vert,fragmentShader:bt.meshphong_frag},standard:{uniforms:ki([ve.common,ve.envmap,ve.aomap,ve.lightmap,ve.emissivemap,ve.bumpmap,ve.normalmap,ve.displacementmap,ve.roughnessmap,ve.metalnessmap,ve.fog,ve.lights,{emissive:{value:new me(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:bt.meshphysical_vert,fragmentShader:bt.meshphysical_frag},toon:{uniforms:ki([ve.common,ve.aomap,ve.lightmap,ve.emissivemap,ve.bumpmap,ve.normalmap,ve.displacementmap,ve.gradientmap,ve.fog,ve.lights,{emissive:{value:new me(0)}}]),vertexShader:bt.meshtoon_vert,fragmentShader:bt.meshtoon_frag},matcap:{uniforms:ki([ve.common,ve.bumpmap,ve.normalmap,ve.displacementmap,ve.fog,{matcap:{value:null}}]),vertexShader:bt.meshmatcap_vert,fragmentShader:bt.meshmatcap_frag},points:{uniforms:ki([ve.points,ve.fog]),vertexShader:bt.points_vert,fragmentShader:bt.points_frag},dashed:{uniforms:ki([ve.common,ve.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:bt.linedashed_vert,fragmentShader:bt.linedashed_frag},depth:{uniforms:ki([ve.common,ve.displacementmap]),vertexShader:bt.depth_vert,fragmentShader:bt.depth_frag},normal:{uniforms:ki([ve.common,ve.bumpmap,ve.normalmap,ve.displacementmap,{opacity:{value:1}}]),vertexShader:bt.meshnormal_vert,fragmentShader:bt.meshnormal_frag},sprite:{uniforms:ki([ve.sprite,ve.fog]),vertexShader:bt.sprite_vert,fragmentShader:bt.sprite_frag},background:{uniforms:{uvTransform:{value:new ht},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:bt.background_vert,fragmentShader:bt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new ht}},vertexShader:bt.backgroundCube_vert,fragmentShader:bt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:bt.cube_vert,fragmentShader:bt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:bt.equirect_vert,fragmentShader:bt.equirect_frag},distanceRGBA:{uniforms:ki([ve.common,ve.displacementmap,{referencePosition:{value:new R},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:bt.distanceRGBA_vert,fragmentShader:bt.distanceRGBA_frag},shadow:{uniforms:ki([ve.lights,ve.fog,{color:{value:new me(0)},opacity:{value:1}}]),vertexShader:bt.shadow_vert,fragmentShader:bt.shadow_frag}};Ts.physical={uniforms:ki([Ts.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new ht},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new ht},clearcoatNormalScale:{value:new J(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new ht},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new ht},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new ht},sheen:{value:0},sheenColor:{value:new me(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new ht},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new ht},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new ht},transmissionSamplerSize:{value:new J},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new ht},attenuationDistance:{value:0},attenuationColor:{value:new me(0)},specularColor:{value:new me(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new ht},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new ht},anisotropyVector:{value:new J},anisotropyMap:{value:null},anisotropyMapTransform:{value:new ht}}]),vertexShader:bt.meshphysical_vert,fragmentShader:bt.meshphysical_frag};const mm={r:0,b:0,g:0},Va=new yi,gq=new De;function _q(n,e,t,i,r,s,o){const a=new me(0);let c,u,l=!0===s?0:1,h=null,d=0,f=null;function p(y){let b=!0===y.isScene?y.background:null;return b&&b.isTexture&&(b=(y.backgroundBlurriness>0?t:e).get(b)),b}function m(y,b){y.getRGB(mm,J2(n)),i.buffers.color.setClear(mm.r,mm.g,mm.b,b,o)}return{getClearColor:function(){return a},setClearColor:function(y,b=1){a.set(y),l=b,m(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(y){l=y,m(a,l)},render:function _(y){let b=!1;const T=p(y);null===T?m(a,l):T&&T.isColor&&(m(T,1),b=!0);const S=n.xr.getEnvironmentBlendMode();"additive"===S?i.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===S&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||b)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil))},addToRenderList:function g(y,b){const T=p(b);T&&(T.isCubeTexture||306===T.mapping)?(void 0===u&&(u=new ai(new mc(1,1,1),new to({name:"Backgroun
1dCubeMaterial",uniforms:gc(Ts.backgroundCube.uniforms),vertexShader:Ts.backgroundCube.vertexShader,fragmentShader:Ts.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(S,P,I){this.matrixWorld.copyPosition(I.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),Va.copy(b.backgroundRotation),Va.x*=-1,Va.y*=-1,Va.z*=-1,T.isCubeTexture&&!1===T.isRenderTargetTexture&&(Va.y*=-1,Va.z*=-1),u.material.uniforms.envMap.value=T,u.material.uniforms.flipEnvMap.value=T.isCubeTexture&&!1===T.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=b.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=b.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(gq.makeRotationFromEuler(Va)),u.material.toneMapped=vt.getTransfer(T.colorSpace)!==Kt,(h!==T||d!==T.version||f!==n.toneMapping)&&(u.material.needsUpdate=!0,h=T,d=T.version,f=n.toneMapping),u.layers.enableAll(),y.unshift(u,u.geometry,u.material,0,0,null)):T&&T.isTexture&&(void 0===c&&(c=new ai(new Ih(2,2),new to({name:"BackgroundMaterial",uniforms:gc(Ts.background.uniforms),vertexShader:Ts.background.vertexShader,fragmentShader:Ts.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=T,c.material.uniforms.backgroundIntensity.value=b.backgroundIntensity,c.material.toneMapped=vt.getTransfer(T.colorSpace)!==Kt,!0===T.matrixAutoUpdate&&T.updateMatrix(),c.material.uniforms.uvTransform.value.copy(T.matrix),(h!==T||d!==T.version||f!==n.toneMapping)&&(c.material.needsUpdate=!0,h=T,d=T.version,f=n.toneMapping),c.layers.enableAll(),y.unshift(c,c.geometry,c.material,0,0,null))},dispose:function v(){void 0!==u&&(u.geometry.dispose(),u.material.dispose(),u=void 0),void 0!==c&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}}}function vq(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},r=d(null);let s=r,o=!1;function c(M){return n.bindVertexArray(M)}function u(M){return n.deleteVertexArray(M)}function d(M){const F=[],V=[],z=[];for(let H=0;H<t;H++)F[H]=0,V[H]=0,z[H]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:F,enabledAttributes:V,attributeDivisors:z,object:M,attributes:{},index:null}}function _(){const M=s.newAttributes;for(let F=0,V=M.length;F<V;F++)M[F]=0}function g(M){m(M,0)}function m(M,F){const z=s.enabledAttributes,H=s.attributeDivisors;s.newAttributes[M]=1,0===z[M]&&(n.enableVertexAttribArray(M),z[M]=1),H[M]!==F&&(n.vertexAttribDivisor(M,F),H[M]=F)}function v(){const M=s.newAttributes,F=s.enabledAttributes;for(let V=0,z=F.length;V<z;V++)F[V]!==M[V]&&(n.disableVertexAttribArray(V),F[V]=0)}function y(M,F,V,z,H,X,G){!0===G?n.vertexAttribIPointer(M,F,V,H,X):n.vertexAttribPointer(M,F,V,z,H,X)}function I(){w(),o=!0,s!==r&&(s=r,c(s.object))}function w(){r.geometry=null,r.program=null,r.wireframe=!1}return{setup:function a(M,F,V,z,H){let X=!1;const G=function h(M,F,V){const z=!0===V.wireframe;let H=i[M.id];void 0===H&&(H={},i[M.id]=H);let X=H[F.id];void 0===X&&(X={},H[F.id]=X);let G=X[z];return void 0===G&&(G=d(function l(){return n.createVertexArray()}()),X[z]=G),G}(z,V,F);s!==G&&(s=G,c(s.object)),X=function f(M,F,V,z){const H=s.attributes,X=F.attributes;let G=0;const ee=V.getAttributes();for(const $ in ee)if(ee[$].location>=0){const ye=H[$];let _e=X[$];if(void 0===_e&&("instanceMatrix"===$&&M.instanceMatrix&&(_e=M.instanceMatrix),"instanceColor"===$&&M.instanceColor&&(_e=M.instanceColor)),void 0===ye||ye.attribute!==_e||_e&&ye.data!==_e.data)return!0;G++}return s.attributesNum!==G||s.index!==z}(M,z,V,H),X&&function p(M,F,V,z){const H={},X=F.attributes;let G=0;const ee=V.getAttributes();for(const $ in ee)if(ee[$].location>=0){let ye=X[$];void 0===ye&&("instanceMatrix"===$&&M.instanceMatrix&&(ye=M.instanceMatrix),"instanceColor"===$&&M.instanceColor&&(ye=M.instanceColor));const _e={};_e.attribute=ye,ye&&ye.data&&(_e.data=ye.data),H[$]=_e,G++}s.attributes=H,s.attributesNum=G,s.index=z}(M,z,V,H),null!==H&&e.update(H,n.ELEMENT_ARRAY_BUFFER),(X||o)&&(o=!1,function b(M,F,V,z){_();const H=z.attributes,X=V.getAttributes(),G=F.defaultAttributeValues;for(const ee in X){const $=X[ee];if($.location>=0){let ce=H[ee];if(void 0===ce&&("instanceMatrix"===ee&&M.instanceMatrix&&(ce=M.instanceMatrix),"instanceColor"===ee&&M.instanceColor&&(ce=M.instanceColor)),void 0!==ce){const ye=ce.normalized,_e=ce.itemSize,je=e.get(ce);if(void 0===je)continue;const ct=je.buffer,Z=je.type,ie=je.bytesPerElement,Te=Z===n.INT||Z===n.UNSIGNED_INT||1013===ce.gpuType;if(ce.isInterleavedBufferAttribute){const de=ce.data,Be=de.stride,Mt=ce.offset;if(de.isInstancedInterleavedBuffer){for(let Ne=0;Ne<$.locationSize;Ne++)m($.location+Ne,de.meshPerAttribute);!0!==M.isInstancedMesh&&void 0===z._maxInstanceCount&&(z._maxInstanceCount=de.meshPerAttribute*de.count)}else for(let Ne=0;Ne<$.locationSize;Ne++)g($.location+Ne);n.bindBuffer(n.ARRAY_BUFFER,ct);for(let Ne=0;Ne<$.locationSize;Ne++)y($.location+Ne,_e/$.locationSize,Z,ye,Be*ie,(Mt+_e/$.locationSize*Ne)*ie,Te)}else{if(ce.isInstancedBufferAttribute){for(let de=0;de<$.locationSize;de++)m($.location+de,ce.meshPerAttribute);!0!==M.isInstancedMesh&&void 0===z._maxInstanceCount&&(z._maxInstanceCount=ce.meshPerAttribute*ce.count)}else for(let de=0;de<$.locationSize;de++)g($.location+de);n.bindBuffer(n.ARRAY_BUFFER,ct);for(let de=0;de<$.locationSize;de++)y($.location+de,_e/$.locationSize,Z,ye,_e*ie,_e/$.locationSize*de*ie,Te)}}else if(void 0!==G){const ye=G[ee];if(void 0!==ye)switch(ye.length){case 2:n.vertexAttrib2fv($.location,ye);break;case 3:n.vertexAttrib3fv($.location,ye);break;case 4:n.vertexAttrib4fv($.location,ye);break;default:n.vertexAttrib1fv($.location,ye)}}}}v()}(M,F,V,z),null!==H&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(H).buffer))},reset:I,resetDefaultState:w,dispose:function T(){I();for(const M in i){const F=i[M];for(const V in F){const z=F[V];for(const H in z)u(z[H].object),delete z[H];delete F[V]}delete i[M]}},releaseStatesOfGeometry:function S(M){if(void 0===i[M.id])return;const F=i[M.id];for(const V in F){const z=F[V];for(const H in z)u(z[H].object),delete z[H];delete F[V]}delete i[M.id]},releaseStatesOfProgram:function P(M){for(const F in i){const V=i[F];if(void 0===V[M.id])continue;const z=V[M.id];for(const H in z)u(z[H].object),delete z[H];delete V[M.id]}},initAttributes:_,enableAttribute:g,disableUnusedAttributes:v}}function yq(n,e,t){let i;function o(c,u,h){0!==h&&(n.drawArraysInstanced(i,c,u,h),t.update(u,i,h))}this.setMode=function r(c){i=c},this.render=function s(c,u){n.drawArrays(i,c,u),t.update(u,i,1)},this.renderInstances=o,this.renderMultiDraw=function a(c,u,h){if(0===h)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,c,0,u,0,h);let f=0;for(let p=0;p<h;p++)f+=u[p];t.update(f,i,1)},this.renderMultiDrawInstances=function l(c,u,h,d){if(0===h)return;const f=e.get("WEBGL_multi_draw");if(null===f)for(let p=0;p<c.length;p++)o(c[p],u[p],d[p]);
vendor: 14,728 bytes, line 1
1else{f.multiDrawArraysInstancedWEBGL(i,c,0,u,0,d,0,h);let p=0;for(let _=0;_<h;_++)p+=u[_]*d[_];t.update(p,i,1)}}}function bq(n,e,t,i){let r;function l(P){if("highp"===P){if(n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";P="mediump"}return"mediump"===P&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=void 0!==t.precision?t.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const h=!0===t.logarithmicDepthBuffer,d=!0===t.reverseDepthBuffer&&e.has("EXT_clip_control"),f=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),p=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function s(){if(void 0!==r)return r;if(!0===e.has("EXT_texture_filter_anisotropic")){const P=e.get("EXT_texture_filter_anisotropic");r=n.getParameter(P.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:l,textureFormatReadable:function o(P){return!(P!==Zi&&i.convert(P)!==n.getParameter(n.IMPLEMENTATION_COLOR_READ_FORMAT))},textureTypeReadable:function a(P){const I=P===lh&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(P!==qs&&i.convert(P)!==n.getParameter(n.IMPLEMENTATION_COLOR_READ_TYPE)&&P!==pr&&!I)},precision:c,logarithmicDepthBuffer:h,reverseDepthBuffer:d,maxTextures:f,maxVertexTextures:p,maxTextureSize:n.getParameter(n.MAX_TEXTURE_SIZE),maxCubemapSize:n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),maxAttributes:n.getParameter(n.MAX_VERTEX_ATTRIBS),maxVertexUniforms:n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),maxVaryings:n.getParameter(n.MAX_VARYING_VECTORS),maxFragmentUniforms:n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures:p>0,maxSamples:n.getParameter(n.MAX_SAMPLES)}}function xq(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Vo,a=new ht,l={value:null,needsUpdate:!1};function u(h,d,f,p){const _=null!==h?h.length:0;let g=null;if(0!==_){if(g=l.value,!0!==p||null===g){const m=f+4*_,v=d.matrixWorldInverse;a.getNormalMatrix(v),(null===g||g.length<m)&&(g=new Float32Array(m));for(let y=0,b=f;y!==_;++y,b+=4)o.copy(h[y]).applyMatrix4(v,a),o.normal.toArray(g,b),g[b+3]=o.constant}l.value=g,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,g}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(h,d){const f=0!==h.length||d||0!==i||r;return r=d,i=h.length,f},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(h,d){t=u(h,d,0)},this.setState=function(h,d,f){const p=h.clippingPlanes,_=h.clipIntersection,g=h.clipShadows,m=n.get(h);if(!r||null===p||0===p.length||s&&!g)s?u(null):function c(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}();else{const v=s?0:i,y=4*v;let b=m.clippingState||null;l.value=b,b=u(p,d,y,f);for(let T=0;T!==y;++T)b[T]=t[T];m.clippingState=b,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=v}}}function wq(n){let e=new WeakMap;function t(o,a){return 303===a?o.mapping=301:304===a&&(o.mapping=302),o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);void 0!==l&&(e.delete(a),l.dispose())}return{get:function i(o){if(o&&o.isTexture){const a=o.mapping;if(303===a||304===a){if(e.has(o))return t(e.get(o).texture,o.mapping);{const l=o.image;if(l&&l.height>0){const c=new yG(l.height);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",r),t(c.texture,o.mapping)}return null}}}return o},dispose:function s(){e=new WeakMap}}}const SI=[.125,.215,.35,.446,.526,.582],vb=new lb,EI=new me;let yb=null,bb=0,xb=0,wb=!1;const Ha=(1+Math.sqrt(5))/2,Rc=1/Ha,TI=[new R(-Ha,Rc,0),new R(Ha,Rc,0),new R(-Rc,0,Ha),new R(Rc,0,Ha),new R(0,Ha,-Rc),new R(0,Ha,Rc),new R(-1,1,-1),new R(1,1,-1),new R(-1,1,1),new R(1,1,1)];class AI{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){yb=this._renderer.getRenderTarget(),bb=this._renderer.getActiveCubeFace(),xb=this._renderer.getActiveMipmapLevel(),wb=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=II(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=PI(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(yb,bb,xb),this._renderer.xr.enabled=wb,e.scissorTest=!1,gm(e,0,0,e.width,e.height)}_fromTexture(e,t){this._setSize(301===e.mapping||302===e.mapping?0===e.image.length?16:e.image[0].width||e.image[0].image.width:e.image.width/4),yb=this._renderer.getRenderTarget(),bb=this._renderer.getActiveCubeFace(),xb=this._renderer.getActiveMipmapLevel(),wb=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const i=t||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,i={magFilter:Qn,minFilter:Qn,generateMipmaps:!1,type:lh,format:Zi,colorSpace:Kl,depthBuffer:!1},r=DI(e,t,i);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=DI(e,t,i);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function Mq(n){const e=[],t=[],i=[];let r=n;const s=n-4+1+SI.length;for(let o=0;o<s;o++){const a=Math.pow(2,r);t.push(a);let l=1/a;o>n-4?l=SI[o-n+4-1]:0===o&&(l=0),i.push(l);const c=1/(a-2),u=-c,h=1+c,d=[u,u,h,u,h,h,u,u,h,h,u,h],f=6,p=6,_=3,g=2,m=1,v=new Float32Array(_*p*f),y=new Float32Array(g*p*f),b=new Float32Array(m*p*f);for(let S=0;S<f;S++){const P=S%3*2/3-1,I=S>2?0:-1;v.set([P,I,0,P+2/3,I,0,P+2/3,I+1,0,P,I,0,P+2/3,I+1,0,P,I+1,0],_*p*S),y.set(d,g*p*S),b.set([S,S,S,S,S,S],m*p*S)}const T=new pt;T.setAttribute("position",new Bn(v,_)),T.setAttribute("uv",new Bn(y,g)),T.setAttribute("faceIndex",new Bn(b,m)),e.push(T),r>4&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}(s)),this._blurMaterial=function Cq(n,e,t){const i=new Float32Array(20),r=new R(0,1,0);return new to({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(s,e,t)}return r}_compileMaterial(e){const t=new ai(this._lodPlanes[0],e);this._renderer.compile(t,vb)}_sceneToCubeUV(e,t,i,r){const a=new ti(90,1,t,i),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,h=u.autoClear,d=u.toneMapping;u.getClearColor(EI),u.toneMapping=0,u.autoClear=!1;const f=new Ea({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),p=new ai(new mc,f);let _=!1;const g=e.background;g?g.isColor&&(f.color.copy(g),e.background=null,_=!0):(f.color.copy(EI),_=!0);for(let m=0;m<6;m++){const v=m%3;0===v?(a.up.set(0,l[m],0),a.lookAt(c[m],0,0)):1===v?(a.up.set(0,0,l[m]),a.lookAt(0,c[m],0)):(a.up.set(0,l[m],0),a.lookAt(0,0,c[m]));const y=this._cubeSize;gm(r,v*y,m>2?y:0,y,y),u.setRenderTarget(r),_&&u.render(p,a),u.render(e,a)}p.geometry.dispose(),p.material.dispose(),u.toneMapping=d,u.autoClear=h,e.background=g}_textureToCubeUV(e,t){const i=this._renderer,r=301===e.mapping||302===e.mapping;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=II()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=PI());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new ai(this._lodPlanes[0],s);s.uniforms.envMap.value=e;const l=this._cubeSize;gm(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,vb)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;s<r;s++){const o=Math.sqrt(this._sigmas[s]*this._sigmas[s]-this._sigmas[s-1]*this._sigmas[s-1]);this._blur(e,s-1,s,o,TI[(r-s-1)%TI.length])}t.autoClear=i}_blur(e,t,i,r,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,i,r,"latitudinal",s),this._halfBlur(o,e,i,i,r,"longitudinal",s)}_halfBlur(e,t,i,r,s,o,a){const l=this._renderer,c=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");const h=new ai(this._lodPlanes[r],c),d=c.uniforms,f=this._sizeLods[i]-1,p=isFinite(s)?Math.PI/(2*f):2*Math.PI/39,_=s/p,g=isFinite(s)?1+Math.floor(3*_):20;g>20&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${g} samples when the maximum is set to 20`);const m=[];let v=0;for(let P=0;P<20;++P){const I=P/_,w=Math.exp(-I*I/2);m.push(w),0===P?v+=w:P<g&&(v+=2*w)}for(let P=0;P<m.length;P++)m[P]=m[P]/v;d.envMap.value=e.texture,d.samples.value=g,d.weights.value=m,d.latitudinal.value="latitudinal"===o,a&&(d.poleAxis.value=a);const{_lodMax:y}=this;d.dTheta.value=p,d.mipInt.value=y-i;const b=this._sizeLods[r];gm(t,3*b*(r>y-4?r-y+4:0),4*(this._cubeSize-b),3*b,2*b),l.setRenderTarget(t),l.render(h,vb)}}function DI(n,e,t){const i=new Ma(n,e,t);return i.texture.mapping=306,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function gm(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function PI(){return new to({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );
1\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function II(){return new to({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function Sq(n){let e=new WeakMap,t=null;function s(a){const l=a.target;l.removeEventListener("dispose",s);const c=e.get(l);void 0!==c&&(e.delete(l),c.dispose())}return{get:function i(a){if(a&&a.isTexture){const l=a.mapping,c=303===l||304===l,u=301===l||302===l;if(c||u){let h=e.get(a);const d=void 0!==h?h.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==d)return null===t&&(t=new AI(n)),h=c?t.fromEquirectangular(a,h):t.fromCubemap(a,h),h.texture.pmremVersion=a.pmremVersion,e.set(a,h),h.texture;if(void 0!==h)return h.texture;{const f=a.image;return c&&f&&f.height>0||u&&f&&function r(a){let l=0;for(let u=0;u<6;u++)void 0!==a[u]&&l++;return 6===l}(f)?(null===t&&(t=new AI(n)),h=c?t.fromEquirectangular(a):t.fromCubemap(a),h.texture.pmremVersion=a.pmremVersion,e.set(a,h),a.addEventListener("dispose",s),h.texture):null}}}return a},dispose:function o(){e=new WeakMap,null!==t&&(t.dispose(),t=null)}}}function Eq(n){const e={};function t(i){if(void 0!==e[i])return e[i];let r;switch(i){case"WEBGL_depth_texture":r=n.getExtension("WEBGL_depth_texture")||n.getExtension("MOZ_WEBGL_depth_texture")||n.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=n.getExtension("WEBGL_compressed_texture_s3tc")||n.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=n.getExtension("WEBGL_compressed_texture_pvrtc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=n.getExtension(i)}return e[i]=r,r}return{has:function(i){return null!==t(i)},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(i){const r=t(i);return null===r&&tc("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function Tq(n,e,t,i){const r={},s=new WeakMap;function o(h){const d=h.target;null!==d.index&&e.remove(d.index);for(const p in d.attributes)e.remove(d.attributes[p]);d.removeEventListener("dispose",o),delete r[d.id];const f=s.get(d);
vendor: 5,278 bytes, line 1
1f&&(e.remove(f),s.delete(d)),i.releaseStatesOfGeometry(d),!0===d.isInstancedBufferGeometry&&delete d._maxInstanceCount,t.memory.geometries--}function c(h){const d=[],f=h.index,p=h.attributes.position;let _=0;if(null!==f){const v=f.array;_=f.version;for(let y=0,b=v.length;y<b;y+=3){const T=v[y+0],S=v[y+1],P=v[y+2];d.push(T,S,S,P,P,T)}}else{if(void 0===p)return;_=p.version;for(let y=0,b=p.array.length/3-1;y<b;y+=3){const T=y+0,S=y+1,P=y+2;d.push(T,S,S,P,P,T)}}const g=new(L2(d)?Y2:b1)(d,1);g.version=_;const m=s.get(h);m&&e.remove(m),s.set(h,g)}return{get:function a(h,d){return!0===r[d.id]||(d.addEventListener("dispose",o),r[d.id]=!0,t.memory.geometries++),d},update:function l(h){const d=h.attributes;for(const f in d)e.update(d[f],n.ARRAY_BUFFER)},getWireframeAttribute:function u(h){const d=s.get(h);if(d){const f=h.index;null!==f&&d.version<f.version&&c(h)}else c(h);return s.get(h)}}}function Aq(n,e,t){let i,s,o;function c(d,f,p){0!==p&&(n.drawElementsInstanced(i,f,s,d*o,p),t.update(f,i,p))}this.setMode=function r(d){i=d},this.setIndex=function a(d){s=d.type,o=d.bytesPerElement},this.render=function l(d,f){n.drawElements(i,f,s,d*o),t.update(f,i,1)},this.renderInstances=c,this.renderMultiDraw=function u(d,f,p){if(0===p)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,f,0,s,d,0,p);let g=0;for(let m=0;m<p;m++)g+=f[m];t.update(g,i,1)},this.renderMultiDrawInstances=function h(d,f,p,_){if(0===p)return;const g=e.get("WEBGL_multi_draw");if(null===g)for(let m=0;m<d.length;m++)c(d[m]/o,f[m],_[m]);else{g.multiDrawElementsInstancedWEBGL(i,f,0,s,d,0,_,0,p);let m=0;for(let v=0;v<p;v++)m+=f[v]*_[v];t.update(m,i,1)}}}function Dq(n){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function r(){t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function i(s,o,a){switch(t.calls++,o){case n.TRIANGLES:t.triangles+=a*(s/3);break;case n.LINES:t.lines+=a*(s/2);break;case n.LINE_STRIP:t.lines+=a*(s-1);break;case n.LINE_LOOP:t.lines+=a*s;break;case n.POINTS:t.points+=a*s;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o)}}}}function Pq(n,e,t){const i=new WeakMap,r=new At;return{update:function s(o,a,l){const c=o.morphTargetInfluences,u=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,h=void 0!==u?u.length:0;let d=i.get(a);if(void 0===d||d.count!==h){let w=function(){P.dispose(),i.delete(a),a.removeEventListener("dispose",w)};void 0!==d&&d.texture.dispose();const f=void 0!==a.morphAttributes.position,p=void 0!==a.morphAttributes.normal,_=void 0!==a.morphAttributes.color,g=a.morphAttributes.position||[],m=a.morphAttributes.normal||[],v=a.morphAttributes.color||[];let y=0;!0===f&&(y=1),!0===p&&(y=2),!0===_&&(y=3);let b=a.attributes.position.count*y,T=1;b>e.maxTextureSize&&(T=Math.ceil(b/e.maxTextureSize),b=e.maxTextureSize);const S=new Float32Array(b*T*4*h),P=new up(S,b,T,h);P.type=pr,P.needsUpdate=!0;const I=4*y;for(let M=0;M<h;M++){const F=g[M],V=m[M],z=v[M],H=b*T*4*M;for(let X=0;X<F.count;X++){const G=X*I;!0===f&&(r.fromBufferAttribute(F,X),S[H+G+0]=r.x,S[H+G+1]=r.y,S[H+G+2]=r.z,S[H+G+3]=0),!0===p&&(r.fromBufferAttribute(V,X),S[H+G+4]=r.x,S[H+G+5]=r.y,S[H+G+6]=r.z,S[H+G+7]=0),!0===_&&(r.fromBufferAttribute(z,X),S[H+G+8]=r.x,S[H+G+9]=r.y,S[H+G+10]=r.z,S[H+G+11]=4===z.itemSize?r.w:1)}}d={count:h,texture:P,size:new J(b,T)},i.set(a,d),a.addEventListener("dispose",w)}if(!0===o.isInstancedMesh&&null!==o.morphTexture)l.getUniforms().setValue(n,"morphTexture",o.morphTexture,t);else{let f=0;for(let _=0;_<c.length;_++)f+=c[_];const p=a.morphTargetsRelative?1:1-f;l.getUniforms().setValue(n,"morphTargetBaseInfluence",p),l.getUniforms().setValue(n,"morphTargetInfluences",c)}l.getUniforms().setValue(n,"morphTargetsTexture",d.texture,t),l.getUniforms().setValue(n,"morphTargetsTextureSize",d.size)}}}function Iq(n,e,t,i){let r=new WeakMap;function a(l){const c=l.target;c.removeEventListener("dispose",a),t.remove(c.instanceMatrix),null!==c.instanceColor&&t.remove(c.instanceColor)}return{update:function s(l){const c=i.render.frame,h=e.get(l,l.geometry);if(r.get(h)!==c&&(e.update(h),r.set(h,c)),l.isInstancedMesh&&(!1===l.hasEventListener("dispose",a)&&l.addEventListener("dispose",a),r.get(l)!==c&&(t.update(l.instanceMatrix,n.ARRAY_BUFFER),null!==l.instanceColor&&t.update(l.instanceColor,n.ARRAY_BUFFER),r.set(l,c))),l.isSkinnedMesh){const d=l.skeleton;r.get(d)!==c&&(d.update(),r.set(d,c))}return h},dispose:function o(){r=new WeakMap}}}const RI=new Xr,OI=new EP(1,1),LI=new up,FI=new i1,NI=new Tp,kI=[],UI=[],BI=new Float32Array(16),VI=new Float32Array(9),zI=new Float32Array(4);function Oc(n,e,t){const i=n[0];if(i<=0||i>0)return n;const r=e*t;let s=kI[r];if(void 0===s&&(s=new Float32Array(r),kI[r]=s),0!==e){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function jn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t<i;t++)if(n[t]!==e[t])return!1;return!0}function $n(n,e){for(let t=0,i=e.length;t<i;t++)n[t]=e[t]}function _m(n,e){let t=UI[e];void 0===t&&(t=new Int32Array(e),UI[e]=t);for(let i=0;i!==e;++i)t[i]=n.allocateTextureUnit();return t}function Rq(n,e){const t=this.cache;t[0]!==e&&(n.uniform1f(this.addr,e),t[0]=e)}function Oq(n,e){const t=this.cache;
vendor: 9,341 bytes, line 1
1if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(jn(t,e))return;n.uniform2fv(this.addr,e),$n(t,e)}}function Lq(n,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(void 0!==e.r)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(n.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(jn(t,e))return;n.uniform3fv(this.addr,e),$n(t,e)}}function Fq(n,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(jn(t,e))return;n.uniform4fv(this.addr,e),$n(t,e)}}function Nq(n,e){const t=this.cache,i=e.elements;if(void 0===i){if(jn(t,e))return;n.uniformMatrix2fv(this.addr,!1,e),$n(t,e)}else{if(jn(t,i))return;zI.set(i),n.uniformMatrix2fv(this.addr,!1,zI),$n(t,i)}}function kq(n,e){const t=this.cache,i=e.elements;if(void 0===i){if(jn(t,e))return;n.uniformMatrix3fv(this.addr,!1,e),$n(t,e)}else{if(jn(t,i))return;VI.set(i),n.uniformMatrix3fv(this.addr,!1,VI),$n(t,i)}}function Uq(n,e){const t=this.cache,i=e.elements;if(void 0===i){if(jn(t,e))return;n.uniformMatrix4fv(this.addr,!1,e),$n(t,e)}else{if(jn(t,i))return;BI.set(i),n.uniformMatrix4fv(this.addr,!1,BI),$n(t,i)}}function Bq(n,e){const t=this.cache;t[0]!==e&&(n.uniform1i(this.addr,e),t[0]=e)}function Vq(n,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(jn(t,e))return;n.uniform2iv(this.addr,e),$n(t,e)}}function zq(n,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(jn(t,e))return;n.uniform3iv(this.addr,e),$n(t,e)}}function Hq(n,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(jn(t,e))return;n.uniform4iv(this.addr,e),$n(t,e)}}function Gq(n,e){const t=this.cache;t[0]!==e&&(n.uniform1ui(this.addr,e),t[0]=e)}function Wq(n,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(jn(t,e))return;n.uniform2uiv(this.addr,e),$n(t,e)}}function jq(n,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(jn(t,e))return;n.uniform3uiv(this.addr,e),$n(t,e)}}function $q(n,e){const t=this.cache;if(void 0!==e.x)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(jn(t,e))return;n.uniform4uiv(this.addr,e),$n(t,e)}}function qq(n,e,t){const i=this.cache,r=t.allocateTextureUnit();let s;i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),this.type===n.SAMPLER_2D_SHADOW?(OI.compareFunction=515,s=OI):s=RI,t.setTexture2D(e||s,r)}function Yq(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTexture3D(e||FI,r)}function Xq(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTextureCube(e||NI,r)}function Zq(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTexture2DArray(e||LI,r)}function Jq(n,e){n.uniform1fv(this.addr,e)}function Qq(n,e){const t=Oc(e,this.size,2);n.uniform2fv(this.addr,t)}function eY(n,e){const t=Oc(e,this.size,3);n.uniform3fv(this.addr,t)}function tY(n,e){const t=Oc(e,this.size,4);n.uniform4fv(this.addr,t)}function nY(n,e){const t=Oc(e,this.size,4);n.uniformMatrix2fv(this.addr,!1,t)}function iY(n,e){const t=Oc(e,this.size,9);n.uniformMatrix3fv(this.addr,!1,t)}function rY(n,e){const t=Oc(e,this.size,16);n.uniformMatrix4fv(this.addr,!1,t)}function sY(n,e){n.uniform1iv(this.addr,e)}function oY(n,e){n.uniform2iv(this.addr,e)}function aY(n,e){n.uniform3iv(this.addr,e)}function lY(n,e){n.uniform4iv(this.addr,e)}function cY(n,e){n.uniform1uiv(this.addr,e)}function uY(n,e){n.uniform2uiv(this.addr,e)}function hY(n,e){n.uniform3uiv(this.addr,e)}function dY(n,e){n.uniform4uiv(this.addr,e)}function fY(n,e,t){const i=this.cache,r=e.length,s=_m(t,r);jn(i,s)||(n.uniform1iv(this.addr,s),$n(i,s));for(let o=0;o!==r;++o)t.setTexture2D(e[o]||RI,s[o])}function pY(n,e,t){const i=this.cache,r=e.length,s=_m(t,r);jn(i,s)||(n.uniform1iv(this.addr,s),$n(i,s));for(let o=0;o!==r;++o)t.setTexture3D(e[o]||FI,s[o])}function mY(n,e,t){const i=this.cache,r=e.length,s=_m(t,r);jn(i,s)||(n.uniform1iv(this.addr,s),$n(i,s));for(let o=0;o!==r;++o)t.setTextureCube(e[o]||NI,s[o])}function gY(n,e,t){const i=this.cache,r=e.length,s=_m(t,r);jn(i,s)||(n.uniform1iv(this.addr,s),$n(i,s));for(let o=0;o!==r;++o)t.setTexture2DArray(e[o]||LI,s[o])}class vY{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.setValue=function Kq(n){switch(n){case 5126:return Rq;case 35664:return Oq;case 35665:return Lq;case 35666:return Fq;case 35674:return Nq;case 35675:return kq;case 35676:return Uq;case 5124:case 35670:return Bq;case 35667:case 35671:return Vq;case 35668:case 35672:return zq;case 35669:case 35673:return Hq;case 5125:return Gq;case 36294:return Wq;case 36295:return jq;case 36296:return $q;case 35678:case 36198:case 36298:case 36306:case 35682:return qq;case 35679:case 36299:case 36307:return Yq;case 35680:case 36300:case 36308:case 36293:return Xq;case 36289:case 36303:case 36311:case 36292:return Zq}}(t.type)}}class yY{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=function _Y(n){switch(n){case 5126:return Jq;case 35664:return Qq;case 35665:return eY;case 35666:return tY;case 35674:return nY;case 35675:return iY;case 35676:return rY;case 5124:case 35670:return sY;case 35667:case 35671:return oY;case 35668:case 35672:return aY;case 35669:case 35673:return lY;case 5125:return cY;case 36294:return uY;case 36295:return hY;case 36296:return dY;case 35678:case 36198:case 36298:case 36306:case 35682:return fY;case 35679:case 36299:case 36307:return pY;case 35680:case 36300:case 36308:case 36293:return mY;case 36289:case 36303:case 36311:case 36292:return gY}}(t.type)}}class bY{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,i){const r=this.seq;for(let s=0,o=r.length;s!==o;++s){const a=r[s];a.setValue(e,t[a.id],i)}}}const Cb=/(\w+)(\])?(\[|\.)?/g;function HI(n,e){n.seq.push(e),n.map[e.id]=e}function xY(n,e,t){const i=n.name,r=i.length;for(Cb.lastIndex=0;;){const s=Cb.exec(i),o=Cb.lastIndex;let a=s[1];const c=s[3];if("]"===s[2]&&(a|=0),void 0===c||"["===c&&o+2===r){HI(t,void 0===c?new vY(a,n,e):new yY(a,n,e));break}{let h=t.map[a];void 0===h&&(h=new bY(a),HI(t,h)),t=h}}}class vm{constructor(e,t){this.seq=[],this.map={};const i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let r=0;r<i;++r){const s=e.getActiveUniform(t,r);xY(s,e.getUniformLocation(t,s.name),this)}}setValue(e,t,i,r){const s=this.map[t];void 0!==s&&s.setValue(e,i,r)}setOptional(e,t,i){const r=t[i];void 0!==r&&this.setValue(e,i,r)}static upload(e,t,i,r){for(let s=0,o=t.length;s!==o;++s){const a=t[s],l=i[a.id];!1!==l.needsUpdate&&a.setValue(e,l.value,r)}}static seqWithValue(e,t){const i=[];for(let r=0,s=e.length;r!==s;++r){const o=e[r];o.id in t&&i.push(o)}return i}}function GI(n,e,t){const i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),i}let MY=0;const WI=new ht;function jI(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),r=n.getShaderInfoLog(e).trim();if(i&&""===r)return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return t.toUpperCase()+"\n\n"+r+"\n\n"+function CY(n,e){const t=n.split("\n"),i=[],r=Math.max(e-6,0),s=Math.min(e+6,t.length);for(let o=r;o<s;o++){const a=o+1;i.push(`${a===e?">":" "} ${a}: ${t[o]}`)}return i.join("\n")}(n.getShaderSource(e),o)}return r}function EY(n,e){const t=function SY(n){vt._getMatrix(WI,vt.workingColorSpace,n);const e=`mat3( ${WI.elements.map(t=>t.toFixed(4))} )`;switch(vt.getTransfer(n)){case ap:return[e,"LinearTransferOETF"];case Kt:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",n),[e,"LinearTransferOETF"]}}(e);return[`vec4 ${n}( vec4 value ) {`,`\treturn ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join("\n")}function TY(n,e){let t;switch(e){case 1:t="Linear";break;case 2:t="Reinhard";break;case 3:t="Cineon";break;case 4:t="ACESFilmic";break;case 6:t="AgX";break;case 7:t="Neutral";break;case 5:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const ym=new R;function Nh(n){return""!==n}function $I(n,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return n.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_L
1IGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function qI(n,e){return n.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const RY=/^[ \t]*#include +<([\w\d./]+)>/gm;function Sb(n){return n.replace(RY,LY)}const OY=new Map;function LY(n,e){let t=bt[e];if(void 0===t){const i=OY.get(e);if(void 0===i)throw new Error("Can not resolve #include <"+e+">");t=bt[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i)}return Sb(t)}const FY=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function YI(n){return n.replace(FY,NY)}function NY(n,e,t,i){let r="";for(let s=parseInt(e);s<parseInt(t);s++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+s+" ]").replace(/UNROLLED_LOOP_INDEX/g,s);return r}function XI(n){let e=`precision ${n.precision} float;\n\tprecision ${n.precision} int;\n\tprecision ${n.precision} sampler2D;\n\tprecision ${n.precision} samplerCube;\n\tprecision ${n.precision} sampler3D;\n\tprecision ${n.precision} sampler2DArray;\n\tprecision ${n.precision} sampler2DShadow;\n\tprecision ${n.precision} samplerCubeShadow;\n\tprecision ${n.precision} sampler2DArrayShadow;\n\tprecision ${n.precision} isampler2D;\n\tprecision ${n.precision} isampler3D;\n\tprecision ${n.precision} isamplerCube;\n\tprecision ${n.precision} isampler2DArray;\n\tprecision ${n.precision} usampler2D;\n\tprecision ${n.precision} usampler3D;\n\tprecision ${n.precision} usamplerCube;\n\tprecision ${n.precision} usampler2DArray;\n\t`;return"highp"===n.precision?e+="\n#define HIGH_PRECISION":"mediump"===n.precision?e+="\n#define MEDIUM_PRECISION":"lowp"===n.precision&&(e+="\n#define LOW_PRECISION"),e}function HY(n,e,t,i){const r=n.getContext(),s=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=function kY(n){let e="SHADOWMAP_TYPE_BASIC";return 1===n.shadowMapType?e="SHADOWMAP_TYPE_PCF":2===n.shadowMapType?e="SHADOWMAP_TYPE_PCF_SOFT":3===n.shadowMapType&&(e="SHADOWMAP_TYPE_VSM"),e}(t),c=function UY(n){let e="ENVMAP_TYPE_CUBE";if(n.envMap)switch(n.envMapMode){case 301:case 302:e="ENVMAP_TYPE_CUBE";break;case 306:e="ENVMAP_TYPE_CUBE_UV"}return e}(t),u=function BY(n){let e="ENVMAP_MODE_REFLECTION";return n.envMap&&302===n.envMapMode&&(e="ENVMAP_MODE_REFRACTION"),e}(t),h=function VY(n){let e="ENVMAP_BLENDING_NONE";if(n.envMap)switch(n.combine){case 0:e="ENVMAP_BLENDING_MULTIPLY";break;case 1:e="ENVMAP_BLENDING_MIX";break;case 2:e="ENVMAP_BLENDING_ADD"}return e}(t),d=function zY(n){const e=n.envMapCubeUVHeight;if(null===e)return null;const t=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),112)),texelHeight:i,maxMip:t}}(t),f=function DY(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Nh).join("\n")}(t),p=function PY(n){const e=[];for(const t in n){const i=n[t];!1!==i&&e.push("#define "+t+" "+i)}return e.join("\n")}(s),_=r.createProgram();let g,m,v=t.glslVersion?"#version "+t.glslVersion+"\n":"";t.isRawShaderMaterial?(g=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,p].filter(Nh).join("\n"),g.length>0&&(g+="\n"),m=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,p].filter(Nh).join("\n"),m.length>0&&(m+="\n")):(g=[XI(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,p,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IR
1IDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&!1===t.flatShading?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&!1===t.flatShading?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","\tuniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Nh).join("\n"),m=[XI(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,p,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+u:"",t.envMap?"#define "+h:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IR
1IDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&!1===t.flatShading?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==t.toneMapping?"#define TONE_MAPPING":"",0!==t.toneMapping?bt.tonemapping_pars_fragment:"",0!==t.toneMapping?TY("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",bt.colorspace_pars_fragment,EY("linearToOutputTexel",t.outputColorSpace),(vt.getLuminanceCoefficients(ym),["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${ym.x.toFixed(4)}, ${ym.y.toFixed(4)}, ${ym.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"","\n"].filter(Nh).join("\n")),o=Sb(o),o=$I(o,t),o=qI(o,t),a=Sb(a),a=$I(a,t),a=qI(a,t),o=YI(o),a=YI(a),!0!==t.isRawShaderMaterial&&(v="#version 300 es\n",g=[f,"#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,m=["#define varying in","300 es"===t.glslVersion?"":"layout(location = 0) out highp vec4 pc_fragColor;","300 es"===t.glslVersion?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+m);const b=v+m+a,T=GI(r,r.VERTEX_SHADER,v+g+o),S=GI(r,r.FRAGMENT_SHADER,b);function P(F){if(n.debug.checkShaderErrors){const V=r.getProgramInfoLog(_).trim(),z=r.getShaderInfoLog(T).trim(),H=r.getShaderInfoLog(S).trim();let X=!0,G=!0;if(!1===r.getProgramParameter(_,r.LINK_STATUS))if(X=!1,"function"==typeof n.debug.onShaderError)n.debug.onShaderError(r,_,T,S);else{const ee=jI(r,T,"vertex"),$=jI(r,S,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(_,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+F.name+"\nMaterial Type: "+F.type+"\n\nProgram Info Log: "+V+"\n"+ee+"\n"+$)}else""!==V?console.warn("THREE.WebGLProgram: Program Info Log:",V):(""===z||""===H)&&(G=!1);G&&(F.diagnostics={runnable:X,programLog:V,vertexShader:{log:z,prefix:g},fragmentShader:{log:H,prefix:m}})}r.deleteShader(T),r.deleteShader(S),I=new vm(r,_),w=function IY(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const s=n.getActiveAttrib(e,r),o=s.name;let a=1;s.type===n.FLOAT_MAT2&&(a=2),s.type===n.FLOAT_MAT3&&(a=3),s.type===n.FLOAT_MAT4&&(a=4),t[o]={type:s.type,location:n.getAttribLocation(e,o),locationSize:a}}return t}(r,_)}let I,w;r.attachShader(_,T),r.attachShader(_,S),void 0!==t.index0AttributeName?r.bindAttribLocation(_,0,t.index0AttributeName):!0===t.morphTargets&&r.bindAttribLocation(_,0,"position"),r.linkProgram(_),this.getUniforms=function(){return void 0===I&&P(this),I},this.getAttributes=function(){return void 0===w&&P(this),w};let M=!1===t.rendererExtensionParallelShaderCompile;return this.isReady=function(){return!1===M&&(M=r.getProgramParameter(_,37297)),M},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=MY++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=T,this.fragmentShader=S,this}let GY=0;class WY{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const i=e.fragmentShader,r=this._getShaderStage(e.vertexShader),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return!1===o.has(r)&&(o.add(r),r.usedTimes++),!1===o.has(s)&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,0===i.usedTimes&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return void 0===i&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return void 0===i&&(i=new jY(e),t.set(e,i)),i}}class jY{constructor(e){this.id=GY++,this.code=e,this.usedTimes=0}}function $Y(n,e,t,i,r,s,o){const a=new u1,l=new WY,c=new Set,u=[],h=r.logarithmicDepthBuffer,d=r.vertexTextures;let f=r.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(w){return c.add(w),0===w?"uv":`uv${w}`}return{getParameters:function g(w,M,F,V,z){const H=V.fog,X=z.geometry,ee=(w.isMeshStandardMaterial?t:e).get(w.envMap||(w.isMeshStandardMaterial?V.environment:null)),$=ee&&306===ee.mapping?ee.image.height:null,ce=p[w.type];null!==w.precision&&(f=r.getMaxPrecision(w.precision),f!==w.precision&&console.warn("THREE.WebGLProgram.getParameters:",w.precision,"not supported, using",f,"instead."));const ye=X.morphAttributes.position||X.morphAttributes.normal||X.morphAttributes.color,_e=void 0!==ye?ye.length:0;let ct,Z,ie,Te,je=0;if(void 0!==X.morphAttributes.position&&(je=1),void 0!==X.morphAttributes.normal&&(je=2),void 0!==X.morphAttributes.color&&(je=3),ce){const qt=Ts[ce];ct=qt.vertexShader,Z=qt.fragmentShader}else ct=w.vertexShader,Z=w.fragmentShader,l.update(w),ie=l.getVertexShaderID(w),Te=l.getFragmentShaderID(w);const de=n.getRenderTarget(),Be=n.state.buffers.depth.getReversed(),Mt=!0===z.isInstancedMesh,Ne=!0===z.isBatchedMesh,Dt=!!w.map,re=!!ee,L=!!w.aoMap,He=!!w.lightMap,ue=!!w.bumpMap,Re=!!w.normalMap,pe=!!w.displacementMap,et=!!w.emissiveMap,Se=!!w.metalnessMap,O
1=!!w.roughnessMap,E=w.anisotropy>0,W=w.clearcoat>0,ae=w.iridescence>0,te=w.sheen>0,Ve=w.transmission>0,xe=E&&!!w.anisotropyMap,Ie=W&&!!w.clearcoatMap,Rt=W&&!!w.clearcoatNormalMap,fe=W&&!!w.clearcoatRoughnessMap,ke=ae&&!!w.iridescenceMap,Qe=ae&&!!w.iridescenceThicknessMap,nt=te&&!!w.sheenColorMap,Ue=te&&!!w.sheenRoughnessMap,kt=!!w.specularMap,xt=!!w.specularColorMap,ln=!!w.specularIntensityMap,N=Ve&&!!w.transmissionMap,Ce=Ve&&!!w.thicknessMap,se=!!w.alphaMap,yt=!!w.extensions;let Tn=0;w.toneMapped&&(null===de||!0===de.isXRRenderTarget)&&(Tn=n.toneMapping);const wi={shaderID:ce,shaderType:w.type,shaderName:w.name,vertexShader:ct,fragmentShader:Z,defines:w.defines,customVertexShaderID:ie,customFragmentShaderID:Te,isRawShaderMaterial:!0===w.isRawShaderMaterial,glslVersion:w.glslVersion,precision:f,batching:Ne,batchingColor:Ne&&null!==z._colorsTexture,instancing:Mt,instancingColor:Mt&&null!==z.instanceColor,instancingMorph:Mt&&null!==z.morphTexture,supportsVertexTextures:d,outputColorSpace:null===de?n.outputColorSpace:!0===de.isXRRenderTarget?de.texture.colorSpace:Kl,alphaToCoverage:!!w.alphaToCoverage,map:Dt,matcap:!!w.matcap,envMap:re,envMapMode:re&&ee.mapping,envMapCubeUVHeight:$,aoMap:L,lightMap:He,bumpMap:ue,normalMap:Re,displacementMap:d&&pe,emissiveMap:et,normalMapObjectSpace:Re&&1===w.normalMapType,normalMapTangentSpace:Re&&0===w.normalMapType,metalnessMap:Se,roughnessMap:O,anisotropy:E,anisotropyMap:xe,clearcoat:W,clearcoatMap:Ie,clearcoatNormalMap:Rt,clearcoatRoughnessMap:fe,dispersion:w.dispersion>0,iridescence:ae,iridescenceMap:ke,iridescenceThicknessMap:Qe,sheen:te,sheenColorMap:nt,sheenRoughnessMap:Ue,specularMap:kt,specularColorMap:xt,specularIntensityMap:ln,transmission:Ve,transmissionMap:N,thicknessMap:Ce,gradientMap:!!w.gradientMap,opaque:!1===w.transparent&&1===w.blending&&!1===w.alphaToCoverage,alphaMap:se,alphaTest:w.alphaTest>0,alphaHash:!!w.alphaHash,combine:w.combine,mapUv:Dt&&_(w.map.channel),aoMapUv:L&&_(w.aoMap.channel),lightMapUv:He&&_(w.lightMap.channel),bumpMapUv:ue&&_(w.bumpMap.channel),normalMapUv:Re&&_(w.normalMap.channel),displacementMapUv:pe&&_(w.displacementMap.channel),emissiveMapUv:et&&_(w.emissiveMap.channel),metalnessMapUv:Se&&_(w.metalnessMap.channel),roughnessMapUv:O&&_(w.roughnessMap.channel),anisotropyMapUv:xe&&_(w.anisotropyMap.channel),clearcoatMapUv:Ie&&_(w.clearcoatMap.channel),clearcoatNormalMapUv:Rt&&_(w.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:fe&&_(w.clearcoatRoughnessMap.channel),iridescenceMapUv:ke&&_(w.iridescenceMap.channel),iridescenceThicknessMapUv:Qe&&_(w.iridescenceThicknessMap.channel),sheenColorMapUv:nt&&_(w.sheenColorMap.channel),sheenRoughnessMapUv:Ue&&_(w.sheenRoughnessMap.channel),specularMapUv:kt&&_(w.specularMap.channel),specularColorMapUv:xt&&_(w.specularColorMap.channel),specularIntensityMapUv:ln&&_(w.specularIntensityMap.channel),transmissionMapUv:N&&_(w.transmissionMap.channel),thicknessMapUv:Ce&&_(w.thicknessMap.channel),alphaMapUv:se&&_(w.alphaMap.channel),vertexTangents:!!X.attributes.tangent&&(Re||E),vertexColors:w.vertexColors,vertexAlphas:!0===w.vertexColors&&!!X.attributes.color&&4===X.attributes.color.itemSize,pointsUvs:!0===z.isPoints&&!!X.attributes.uv&&(Dt||se),fog:!!H,useFog:!0===w.fog,fogExp2:!!H&&H.isFogExp2,flatShading:!0===w.flatShading,sizeAttenuation:!0===w.sizeAttenuation,logarithmicDepthBuffer:h,reverseDepthBuffer:Be,skinning:!0===z.isSkinnedMesh,morphTargets:void 0!==X.morphAttributes.position,morphNormals:void 0!==X.morphAttributes.normal,morphColors:void 0!==X.morphAttributes.color,morphTargetsCount:_e,morphTextureStride:je,numDirLights:M.directional.length,numPointLights:M.point.length,numSpotLights:M.spot.length,numSpotLightMaps:M.spotLightMap.length,numRectAreaLights:M.rectArea.length,numHemiLights:M.hemi.length,numDirLightShadows:M.directionalShadowMap.length,numPointLightShadows:M.pointShadowMap.length,numSpotLightShadows:M.spotShadowMap.length,numSpotLightShadowsWithMaps:M.numSpotLightShadowsWithMaps,numLightProbes:M.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:w.dithering,shadowMapEnabled:n.shadowMap.enabled&&F.length>0,shadowMapType:n.shadowMap.type,toneMapping:Tn,decodeVideoTexture:Dt&&!0===w.map.isVideoTexture&&vt.getTransfer(w.map.colorSpace)===Kt,decodeVideoTextureEmissive:et&&!0===w.emissiveMap.isVideoTexture&&vt.getTransfer(w.emissiveMap.colorSpace)===Kt,premultipliedAlpha:w.premultipliedAlpha,doubleSided:2===w.side,flipSided:1===w.side,useDepthPacking:w.depthPacking>=0,depthPacking:w.depthPacking||0,index0AttributeName:w.index0AttributeName,extensionCl
vendor: 12,271 bytes, line 1
1ipCullDistance:yt&&!0===w.extensions.clipCullDistance&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(yt&&!0===w.extensions.multiDraw||Ne)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:w.customProgramCacheKey()};return wi.vertexUv1s=c.has(1),wi.vertexUv2s=c.has(2),wi.vertexUv3s=c.has(3),c.clear(),wi},getProgramCacheKey:function m(w){const M=[];if(w.shaderID?M.push(w.shaderID):(M.push(w.customVertexShaderID),M.push(w.customFragmentShaderID)),void 0!==w.defines)for(const F in w.defines)M.push(F),M.push(w.defines[F]);return!1===w.isRawShaderMaterial&&(function v(w,M){w.push(M.precision),w.push(M.outputColorSpace),w.push(M.envMapMode),w.push(M.envMapCubeUVHeight),w.push(M.mapUv),w.push(M.alphaMapUv),w.push(M.lightMapUv),w.push(M.aoMapUv),w.push(M.bumpMapUv),w.push(M.normalMapUv),w.push(M.displacementMapUv),w.push(M.emissiveMapUv),w.push(M.metalnessMapUv),w.push(M.roughnessMapUv),w.push(M.anisotropyMapUv),w.push(M.clearcoatMapUv),w.push(M.clearcoatNormalMapUv),w.push(M.clearcoatRoughnessMapUv),w.push(M.iridescenceMapUv),w.push(M.iridescenceThicknessMapUv),w.push(M.sheenColorMapUv),w.push(M.sheenRoughnessMapUv),w.push(M.specularMapUv),w.push(M.specularColorMapUv),w.push(M.specularIntensityMapUv),w.push(M.transmissionMapUv),w.push(M.thicknessMapUv),w.push(M.combine),w.push(M.fogExp2),w.push(M.sizeAttenuation),w.push(M.morphTargetsCount),w.push(M.morphAttributeCount),w.push(M.numDirLights),w.push(M.numPointLights),w.push(M.numSpotLights),w.push(M.numSpotLightMaps),w.push(M.numHemiLights),w.push(M.numRectAreaLights),w.push(M.numDirLightShadows),w.push(M.numPointLightShadows),w.push(M.numSpotLightShadows),w.push(M.numSpotLightShadowsWithMaps),w.push(M.numLightProbes),w.push(M.shadowMapType),w.push(M.toneMapping),w.push(M.numClippingPlanes),w.push(M.numClipIntersection),w.push(M.depthPacking)}(M,w),function y(w,M){a.disableAll(),M.supportsVertexTextures&&a.enable(0),M.instancing&&a.enable(1),M.instancingColor&&a.enable(2),M.instancingMorph&&a.enable(3),M.matcap&&a.enable(4),M.envMap&&a.enable(5),M.normalMapObjectSpace&&a.enable(6),M.normalMapTangentSpace&&a.enable(7),M.clearcoat&&a.enable(8),M.iridescence&&a.enable(9),M.alphaTest&&a.enable(10),M.vertexColors&&a.enable(11),M.vertexAlphas&&a.enable(12),M.vertexUv1s&&a.enable(13),M.vertexUv2s&&a.enable(14),M.vertexUv3s&&a.enable(15),M.vertexTangents&&a.enable(16),M.anisotropy&&a.enable(17),M.alphaHash&&a.enable(18),M.batching&&a.enable(19),M.dispersion&&a.enable(20),M.batchingColor&&a.enable(21),w.push(a.mask),a.disableAll(),M.fog&&a.enable(0),M.useFog&&a.enable(1),M.flatShading&&a.enable(2),M.logarithmicDepthBuffer&&a.enable(3),M.reverseDepthBuffer&&a.enable(4),M.skinning&&a.enable(5),M.morphTargets&&a.enable(6),M.morphNormals&&a.enable(7),M.morphColors&&a.enable(8),M.premultipliedAlpha&&a.enable(9),M.shadowMapEnabled&&a.enable(10),M.doubleSided&&a.enable(11),M.flipSided&&a.enable(12),M.useDepthPacking&&a.enable(13),M.dithering&&a.enable(14),M.transmission&&a.enable(15),M.sheen&&a.enable(16),M.opaque&&a.enable(17),M.pointsUvs&&a.enable(18),M.decodeVideoTexture&&a.enable(19),M.decodeVideoTextureEmissive&&a.enable(20),M.alphaToCoverage&&a.enable(21),w.push(a.mask)}(M,w),M.push(n.outputColorSpace)),M.push(w.customProgramCacheKey),M.join()},getUniforms:function b(w){const M=p[w.type];let F;return F=M?mG.clone(Ts[M].uniforms):w.uniforms,F},acquireProgram:function T(w,M){let F;for(let V=0,z=u.length;V<z;V++){const H=u[V];if(H.cacheKey===M){F=H,++F.usedTimes;break}}return void 0===F&&(F=new HY(n,M,w,s),u.push(F)),F},releaseProgram:function S(w){if(0==--w.usedTimes){const M=u.indexOf(w);u[M]=u[u.length-1],u.pop(),w.destroy()}},releaseShaderCache:function P(w){l.remove(w)},programs:u,dispose:function I(){l.dispose()}}}function qY(){let n=new WeakMap;return{has:function e(o){return n.has(o)},get:function t(o){let a=n.get(o);return void 0===a&&(a={},n.set(o,a)),a},remove:function i(o){n.delete(o)},update:function r(o,a,l){n.get(o)[a]=l},dispose:function s(){n=new WeakMap}}}function YY(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.material.id!==e.material.id?n.material.id-e.material.id:n.z!==e.z?n.z-e.z:n.id-e.id}function ZI(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.z!==e.z?e.z-n.z:n.id-e.id}function KI(){const n=[];let e=0;const t=[],i=[],r=[];function o(h,d,f,p,_,g){let m=n[e];return void 0===m?(m={id:h.id,object:h,geometry:d,material:f,groupOrder:p,renderOrder:h.renderOrder,z:_,group:g},n[e]=m):(m.id=h.id,m.object=h,m.geometry=d,m.material=f,m.groupOrder=p,m.renderOrder=h.renderOrder,m.z=_,m.group=g),e++,m}return{opaque:t,transmissive:i,transparent:r,init:function s(){e=0,t.length=0,i.length=0,r.length=0},push:function a(h,d,f,p,_,g){const m=o(h,d,f,p,_,g);f.transmission>0?i.push(m):!0===f.transparent?r.push(m):t.push(m)},unshift:function l(h,d,f,p,_,g){const m=o(h,d,f,p,_,g);f.transmission>0?i.unshift(m):!0===f.transparent?r.unshift(m):t.unshift(m)},finish:function u(){for(let h=e,d=n.length;h<d;h++){const f=n[h];if(null===f.id)break;f.id=null,f.object=null,f.geometry=null,f.material=null,f.group=null}},sort:function c(h,d){t.length>1&&t.sort(h||YY),i.length>1&&i.sort(d||ZI),r.length>1&&r.sort(d||ZI)}}}function XY(){let n=new WeakMap;return{get:function e(i,r){const s=n.get(i);let o;return void 0===s?(o=new KI,n.set(i,[o])):r>=s.length?(o=new KI,s.push(o)):o=s[r],o},dispose:function t(){n=new WeakMap}}}function ZY(){const n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new R,color:new me};break;case"SpotLight":t={position:new R,direction:new R,color:new me,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new R,color:new me,distance:0,decay:0};break;case"HemisphereLight":t={direction:new R,skyColor:new me,groundColor:new me};break;case"RectAreaLight":t={color:new me,position:new R,halfWidth:new R,halfHeight:new R}}return n[e.id]=t,t}}}let JY=0;function QY(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function eX(n){const e=new ZY,t=function KY(){const n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];let t;switch(e.type){case"DirectionalLight":case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new J};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new J,shadowCameraNear:1,shadowCameraFar:1e3}}return n[e.id]=t,t}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)i.probe.push(new R);const r=new R,s=new De,o=new De;return{setup:function a(c){let u=0,h=0,d=0;for(let w=0;w<9;w++)i.probe[w].set(0,0,0);let f=0,p=0,_=0,g=0,m=0,v=0,y=0,b=0,T=0,S=0,P=0;c.sort(QY);for(let w=0,M=c.length;w<M;w++){const F=c[w],V=F.color,z=F.intensity,H=F.distance,X=F.shadow&&F.shadow.map?F.shadow.map.texture:null;if(F.isAmbientLight)u+=V.r*z,h+=V.g*z,d+=V.b*z;else if(F.isLightProbe){for(let G=0;G<9;G++)i.probe[G].addScaledVector(F.sh.coefficients[G],z);P++}else if(F.isDirectionalLight){const G=e.get(F);if(G.color.copy(F.color).multiplyScalar(F.intensity),F.castShadow){const ee=F.shadow,$=t.get(F);$.shadowIntensity=ee.intensity,$.shadowBias=ee.bias,$.shadowNormalBias=ee.normalBias,$.shadowRadius=ee.radius,$.shadowMapSize=ee.mapSize,i.directionalShadow[f]=$,i.directionalShadowMap[f]=X,i.directionalShadowMatrix[f]=F.shadow.matrix,v++}i.directional[f]=G,f++}else if(F.isSpotLight){const G=e.get(F);G.position.setFromMatrixPosition(F.matrixWorld),G.color.copy(V).multiplyScalar(z),G.distance=H,G.coneCos=Math.cos(F.angle),G.penumbraCos=Math.cos(F.angle*(1-F.penumbra)),G.decay=F.decay,i.spot[_]=G;const ee=F.shadow;if(F.map&&(i.spotLightMap[T]=F.map,T++,ee.updateMatrices(F),F.castShadow&&S++),i.spotLightMatrix[_]=ee.matrix,F.castShadow){const $=t.get(F);$.shadowIntensity=ee.intensity,$.shadowBias=ee.bias,$.shadowNormalBias=ee.normalBias,$.shadowRadius=ee.radius,$.shadowMapSize=ee.mapSize,i.spotShadow[_]=$,i.spotShadowMap[_]=X,b++}_++}else if(F.isRectAreaLight){const G=e.get(F);G.color.copy(V).multiplyScalar(z),G.halfWidth.set(.5*F.width,0,0),G.halfHeight.set(0,.5*F.height,0),i.rectArea[g]=G,g++}else if(F.isPointLight){const G=e.get(F);if(G.color.copy(F.color).multiplyScalar(F.intensity),G.distance=F.distance,G.decay=F.decay,F.castShadow){const ee=F.shadow,$=t.get(F);$.shadowIntensity=ee.intensity,$.shadowBias=ee.bias,$.shadowNormalBias=ee.normalBias,$.shadowRadius=ee.radius,$.shadowMapSize=ee.mapSize,$.shadowCameraNear=ee.camera.near,$.shadowCameraFar=ee.camera.far,i.pointShadow[p]=$,i.pointShadowMap[p]=X,i.pointShadowMatrix[p]=F.shadow.matrix,y++}i.point[p]=G,p++}else if(F.isHemisphereLight){const G=e.get(F);G.skyColor.copy(F.color).multiplyScalar(z),G.groundColor.copy(F.groundColor).multiplyScalar(z),i.hemi[m]=G,m++}}g>0&&(!0===n.has("OES_texture_float_linear")?(i.rectAreaLTC1=ve.LTC_FLOAT_1,i.rectAreaLTC2=ve.LTC_FLOAT_2):(i.rectAreaLTC1=ve.LTC_HALF_1,i.rectAreaLTC2=ve.LTC_HALF_2)),i.ambient[0]=u,i.ambient[1]=h,i.ambient[2]=d;const I=i.hash;(I.directionalLength!==f||I.pointLength!==p||I.spotLength!==_||I.rectAreaLength!==g||I.hemiLength!==m||I.numDirectionalShadows!==v||I.numPointShadows!==y||I.numSpotShadows!==b||I.numSpotMaps!==T||I.numLightProbes!==P)&&(i.directional.length=f,i.spot.length=_,i.rectArea.length=g,i.point.length=p,i.hemi.length=m,i.directionalShadow.length=v,i.directionalShadowMap.length=v,i.pointShadow.length=y,i.pointShadowMap.length=y,i.spotShadow.length=b,i.spotShadowMap.length=b,i.directionalShadowMatrix.length=v,i.pointShadowMatrix.length=y,i.spotLightMatrix.length=b+T-S,i.spotLightMap.length=T,i.numSpotLightShadowsWithMaps=S,i.numLightProbes=P,I.directionalLength=f,I.pointLength=p,I.spotLength=_,I.rectAreaLength=g,I.hemiLength=m,I.numDirectionalShadows=v,I.numPointShadows=y,I.numSpotShadows=b,I.numSpotMaps=T,I.numLightProbes=P,i.version=JY++)},setupView:function l(c,u){let h=0,d=0,f=0,p=0,_=0;const g=u.matrixWorldInverse;for(let m=0,v=c.length;m<v;m++){const y=c[m];if(y.isDirectionalLight){const b=i.directional[h];b.direction.setFromMatrixPosition(y.matrixWorld),r.setFromMatrixPosition(y.target.matrixWorld),b.direction.sub(r),b.direction.transformDirection(g),h++}else if(y.isSpotLight){const b=i.spot[f];b.position.setFromMatrixPosition(y.matrixWorld),b.position.applyMatrix4(g),b.direction.setFromMatrixPosition(y.matrixWorld),r.setFromMatrixPosition(y.target.matrixWorld),b.direction.sub(r),b.direction.transformDirection(g),f++}else if(y.isRectAreaLight){const b=i.rectArea[p];b.position.setFromMatrixPosition(y.matrixWorld),b.position.applyMatrix4(g),o.identity(),s.copy(y.matrixWorld),s.premultiply(g),o.extractRotation(s),b.halfWidth.set(.5*y.width,0,0),b.halfHeight.set(0,.5*y.height,0),b.halfWidth.applyMatrix4(o),b.halfHeight.applyMatrix4(o),p++}else if(y.isPointLight){const b=i.point[d];b.position.setFromMatrixPosition(y.matrixWorld),b.position.applyMatrix4(g),d++}else if(y.isHemisphereLight){const b=i.hemi[_];b.direction.setFromMatrixPosition(y.matrixWorld),b.direction.transformDirection(g),_++}}},state:i}}function JI(n){const e=new eX(n),t=[],i=[],c={lightsArray:t,shadowsArray:i,camera:null,lights:e,transmissionRenderTarget:{}};return{init:function r(u){c.camera=u,t.length=0,i.length=0},state:c,setupLights:function a(){e.setup(t)},setupLightsView:function l(u){e.setupView(t,u)},pushLight:function s(u){t.push(u)},pushShadow:function o(u){i.push(u)}}}function tX(n){let e=new WeakMap;return{get:function t(r,s=0){const o=e.get(r);let a;return void 0===o?(a=new JI(n),e.set(r,[a])):s>=o.length?(a=new JI(n),o.push(a)):a=o[s],a}
vendor: 4,335 bytes, line 1
1,dispose:function i(){e=new WeakMap}}}function rX(n,e,t){let i=new kp;const r=new J,s=new J,o=new At,a=new HP({depthPacking:3201}),l=new GP,c={},u=t.maxTextureSize,h={0:1,1:0,2:2},d=new to({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new J},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),f=d.clone();f.defines.HORIZONTAL_PASS=1;const p=new pt;p.setAttribute("position",new Bn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new ai(p,d),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let m=this.type;function v(S,P){const I=e.update(_);d.defines.VSM_SAMPLES!==S.blurSamples&&(d.defines.VSM_SAMPLES=S.blurSamples,f.defines.VSM_SAMPLES=S.blurSamples,d.needsUpdate=!0,f.needsUpdate=!0),null===S.mapPass&&(S.mapPass=new Ma(r.x,r.y)),d.uniforms.shadow_pass.value=S.map.texture,d.uniforms.resolution.value=S.mapSize,d.uniforms.radius.value=S.radius,n.setRenderTarget(S.mapPass),n.clear(),n.renderBufferDirect(P,null,I,d,_,null),f.uniforms.shadow_pass.value=S.mapPass.texture,f.uniforms.resolution.value=S.mapSize,f.uniforms.radius.value=S.radius,n.setRenderTarget(S.map),n.clear(),n.renderBufferDirect(P,null,I,f,_,null)}function y(S,P,I,w){let M=null;const F=!0===I.isPointLight?S.customDistanceMaterial:S.customDepthMaterial;if(void 0!==F)M=F;else if(M=!0===I.isPointLight?l:a,n.localClippingEnabled&&!0===P.clipShadows&&Array.isArray(P.clippingPlanes)&&0!==P.clippingPlanes.length||P.displacementMap&&0!==P.displacementScale||P.alphaMap&&P.alphaTest>0||P.map&&P.alphaTest>0){const V=M.uuid,z=P.uuid;let H=c[V];void 0===H&&(H={},c[V]=H);let X=H[z];void 0===X&&(X=M.clone(),H[z]=X,P.addEventListener("dispose",T)),M=X}return M.visible=P.visible,M.wireframe=P.wireframe,M.side=3===w?null!==P.shadowSide?P.shadowSide:P.side:null!==P.shadowSide?P.shadowSide:h[P.side],M.alphaMap=P.alphaMap,M.alphaTest=P.alphaTest,M.map=P.map,M.clipShadows=P.clipShadows,M.clippingPlanes=P.clippingPlanes,M.clipIntersection=P.clipIntersection,M.displacementMap=P.displacementMap,M.displacementScale=P.displacementScale,M.displacementBias=P.displacementBias,M.wireframeLinewidth=P.wireframeLinewidth,M.linewidth=P.linewidth,!0===I.isPointLight&&!0===M.isMeshDistanceMaterial&&(n.properties.get(M).light=I),M}function b(S,P,I,w,M){if(!1===S.visible)return;if(S.layers.test(P.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&3===M)&&(!S.frustumCulled||i.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,S.matrixWorld);const z=e.update(S),H=S.material;if(Array.isArray(H)){const X=z.groups;for(let G=0,ee=X.length;G<ee;G++){const $=X[G],ce=H[$.materialIndex];if(ce&&ce.visible){const ye=y(S,ce,w,M);S.onBeforeShadow(n,S,P,I,z,ye,$),n.renderBufferDirect(I,null,z,ye,S,$),S.onAfterShadow(n,S,P,I,z,ye,$)}}}else if(H.visible){const X=y(S,H,w,M);S.onBeforeShadow(n,S,P,I,z,X,null),n.renderBufferDirect(I,null,z,X,S,null),S.onAfterShadow(n,S,P,I,z,X,null)}}const V=S.children;for(let z=0,H=V.length;z<H;z++)b(V[z],P,I,w,M)}function T(S){S.target.removeEventListener("dispose",T);for(const I in c){const w=c[I],M=S.target.uuid;M in w&&(w[M].dispose(),delete w[M])}}
1this.render=function(S,P,I){if(!1===g.enabled||!1===g.autoUpdate&&!1===g.needsUpdate||0===S.length)return;const w=n.getRenderTarget(),M=n.getActiveCubeFace(),F=n.getActiveMipmapLevel(),V=n.state;V.setBlending(0),V.buffers.color.setClear(1,1,1,1),V.buffers.depth.setTest(!0),V.setScissorTest(!1);const z=3!==m&&3===this.type,H=3===m&&3!==this.type;for(let X=0,G=S.length;X<G;X++){const ee=S[X],$=ee.shadow;if(void 0===$){console.warn("THREE.WebGLShadowMap:",ee,"has no shadow.");continue}if(!1===$.autoUpdate&&!1===$.needsUpdate)continue;r.copy($.mapSize);const ce=$.getFrameExtents();if(r.multiply(ce),s.copy($.mapSize),(r.x>u||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/ce.x),r.x=s.x*ce.x,$.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/ce.y),r.y=s.y*ce.y,$.mapSize.y=s.y)),null===$.map||!0===z||!0===H){const _e=3!==this.type?{minFilter:gi,magFilter:gi}:{};null!==$.map&&$.map.dispose(),$.map=new Ma(r.x,r.y,_e),$.map.texture.name=ee.name+".shadowMap",$.camera.updateProjectionMatrix()}n.setRenderTarget($.map),n.clear();const ye=$.getViewportCount();for(let _e=0;_e<ye;_e++){const je=$.getViewport(_e);o.set(s.x*je.x,s.y*je.y,s.x*je.z,s.y*je.w),V.viewport(o),$.updateMatrices(ee,_e),i=$.getFrustum(),b(P,I,$.camera,ee,this.type)}!0!==$.isPointLightShadow&&3===this.type&&v($,I),$.needsUpdate=!1}m=this.type,g.needsUpdate=!1,n.setRenderTarget(w,M,F)}}const sX={0:1,2:6,4:7,3:5,1:0,6:2,7:4,5:3};function oX(n,e){const s=new function t(){let N=!1;const Ce=new At;let K=null;const se=new At(0,0,0,0);return{setMask:function(Ae){K!==Ae&&!N&&(n.colorMask(Ae,Ae,Ae,Ae),K=Ae)},setLocked:function(Ae){N=Ae},setClear:function(Ae,Ee,yt,Tn,wi){!0===wi&&(Ae*=Tn,Ee*=Tn,yt*=Tn),Ce.set(Ae,Ee,yt,Tn),!1===se.equals(Ce)&&(n.clearColor(Ae,Ee,yt,Tn),se.copy(Ce))},reset:function(){N=!1,K=null,se.set(-1,0,0,0)}}},o=new function i(){let N=!1,Ce=!1,K=null,se=null,Ae=null;return{setReversed:function(Ee){if(Ce!==Ee){const yt=e.get("EXT_clip_control");yt.clipControlEXT(yt.LOWER_LEFT_EXT,Ce?yt.ZERO_TO_ONE_EXT:yt.NEGATIVE_ONE_TO_ONE_EXT);const Tn=Ae;Ae=null,this.setClear(Tn)}Ce=Ee},getReversed:function(){return Ce},setTest:function(Ee){Ee?de(n.DEPTH_TEST):Be(n.DEPTH_TEST)},setMask:function(Ee){K!==Ee&&!N&&(n.depthMask(Ee),K=Ee)},setFunc:function(Ee){if(Ce&&(Ee=sX[Ee]),se!==Ee){switch(Ee){case 0:n.depthFunc(n.NEVER);break;case 1:n.depthFunc(n.ALWAYS);break;case 2:n.depthFunc(n.LESS);break;case 3:default:n.depthFunc(n.LEQUAL);break;case 4:n.depthFunc(n.EQUAL);break;case 5:n.depthFunc(n.GEQUAL);break;case 6:n.depthFunc(n.GREATER);break;case 7:n.depthFunc(n.NOTEQUAL)}se=Ee}},setLocked:function(Ee){N=Ee},setClear:function(Ee){Ae!==Ee&&(Ce&&(Ee=1-Ee),n.clearDepth(Ee),Ae=Ee)},reset:function(){N=!1,K=null,se=null,Ae=null,Ce=!1}}},a=new function r(){let N=!1,Ce=null,K=null,se=null,Ae=null,Ee=null,yt=null,Tn=null,wi=null;return{setTest:function(qt){N||(qt?de(n.STENCIL_TEST):Be(n.STENCIL_TEST))},setMask:function(qt){Ce!==qt&&!N&&(n.stencilMask(qt),Ce=qt)},setFunc:function(qt,ts,so){(K!==qt||se!==ts||Ae!==so)&&(n.stencilFunc(qt,ts,so),K=qt,se=ts,Ae=so)},setOp:function(qt,ts,so){(Ee!==qt||yt!==ts||Tn!==so)&&(n.stencilOp(qt,ts,so),Ee=qt,yt=ts,Tn=so)},setLocked:function(qt){N=qt},setClear:function(qt){wi!==qt&&(n.clearStencil(qt),wi=qt)},reset:function(){N=!1,Ce=null,K=null,se=null,Ae=null,Ee=null,yt=null,Tn=null,wi=null}}},l=new WeakMap,c=new WeakMap;let u={},h={},d=new WeakMap,f=[],p=null,_=!1,g=null,m=null,v=null,y=null,b=null,T=null,S=null,P=new me(0,0,0),I=0,w=!1,M=null,F=null,V=null,z=null,H=null;const X=n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let G=!1,ee=0;const $=n.getParameter(n.VERSION);-1!==$.indexOf("WebGL")?(ee=parseFloat(/^WebGL (\d)/.exec($)[1]),G=ee>=1):-1!==$.indexOf("OpenGL ES")&&(ee=parseFloat(/^OpenGL ES (\d)/.exec($)[1]),G=ee>=2);let ce=null,ye={};const _e=n.getParameter(n.SCISSOR_BOX),je=n.getParameter(n.VIEWPORT),ct=(new At).fromArray(_e),Z=(new At).fromArray(je);function ie(N,Ce,K,se){const Ae=new Uint8Array(4),Ee=n.createTexture();n.bindTexture(N,Ee),n.texParameteri(N,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(N,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let yt=0;yt<K;yt++)N===n.TEXTURE_3D||N===n.TEXTURE_2D_ARRAY?n.texImage3D(Ce,0,n.RGBA,1,1,se,0,n.RGBA,n.UNSIGNED_BYTE,Ae):n.texImage2D(Ce+yt,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,Ae);return Ee}const Te={};function de(N){!0!==u[N]&&(n.enable(N),u[N]=!0)}function Be(N){!1!==u[N]&&(n.disable(N),u[N]=!1)}Te[n.TEXTURE_2D]=ie(n.TEXTURE_2D,n.TEXTURE_2D,1),Te[n.TEXTURE_CUBE_MAP]=ie(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),Te[n.TEXTURE_2D_ARRAY]=ie(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),Te[n.TEXTURE_3D]=ie(n.TEXTURE_3D,n.TEXTURE_3D,1,1),s.setClear(0,0,0,1),o.setClear(1),a.setClear(0),de(n.DEPTH_TEST),o.setFunc(3),ue(!1),Re(1),de(n.CULL_FACE),L(0);const le={100:n.FUNC_ADD,101:n.FUNC_SUBTRACT,102:n.FUNC_REVERSE_SUBTRACT};le[103]=n.MIN,le[104]=n.MAX;const re={200:n.ZERO,201:n.ONE,202:n.SRC_COLOR,204:n.SRC_ALPHA,210:n.SRC_ALPHA_SATURATE,208:n.DST_COLOR,206:n.DST_ALPHA,203:n.ONE_MINUS_SRC_COLOR,205:n.ONE_MINUS_SRC_ALPHA,209:n.ONE_MINUS_DST_COLOR,207:n.ONE_MINUS_DST_ALPHA,211:n.CONSTANT_COLOR,212:n.ONE_MINUS_CONSTANT_COLOR,213:n.CONSTANT_ALPHA,214:n.ONE_MINUS_CONSTANT_ALPHA};
1function L(N,Ce,K,se,Ae,Ee,yt,Tn,wi,qt){if(0!==N){if(!1===_&&(de(n.BLEND),_=!0),5===N)Ae=Ae||Ce,Ee=Ee||K,yt=yt||se,(Ce!==m||Ae!==b)&&(n.blendEquationSeparate(le[Ce],le[Ae]),m=Ce,b=Ae),(K!==v||se!==y||Ee!==T||yt!==S)&&(n.blendFuncSeparate(re[K],re[se],re[Ee],re[yt]),v=K,y=se,T=Ee,S=yt),(!1===Tn.equals(P)||wi!==I)&&(n.blendColor(Tn.r,Tn.g,Tn.b,wi),P.copy(Tn),I=wi),g=N,w=!1;else if(N!==g||qt!==w){if((100!==m||100!==b)&&(n.blendEquation(n.FUNC_ADD),m=100,b=100),qt)switch(N){case 1:n.blendFuncSeparate(n.ONE,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case 2:n.blendFunc(n.ONE,n.ONE);break;case 3:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case 4:n.blendFuncSeparate(n.ZERO,n.SRC_COLOR,n.ZERO,n.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",N)}else switch(N){case 1:n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case 2:n.blendFunc(n.SRC_ALPHA,n.ONE);break;case 3:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case 4:n.blendFunc(n.ZERO,n.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",N)}v=null,y=null,T=null,S=null,P.set(0,0,0),I=0,g=N,w=qt}}else!0===_&&(Be(n.BLEND),_=!1)}function ue(N){M!==N&&(n.frontFace(N?n.CW:n.CCW),M=N)}function Re(N){0!==N?(de(n.CULL_FACE),N!==F&&n.cullFace(1===N?n.BACK:2===N?n.FRONT:n.FRONT_AND_BACK)):Be(n.CULL_FACE),F=N}function et(N,Ce,K){N?(de(n.POLYGON_OFFSET_FILL),(z!==Ce||H!==K)&&(n.polygonOffset(Ce,K),z=Ce,H=K)):Be(n.POLYGON_OFFSET_FILL)}return{buffers:{color:s,depth:o,stencil:a},enable:de,disable:Be,bindFramebuffer:function Mt(N,Ce){return h[N]!==Ce&&(n.bindFramebuffer(N,Ce),h[N]=Ce,N===n.DRAW_FRAMEBUFFER&&(h[n.FRAMEBUFFER]=Ce),N===n.FRAMEBUFFER&&(h[n.DRAW_FRAMEBUFFER]=Ce),!0)},drawBuffers:function Ne(N,Ce){let K=f,se=!1;if(N){K=d.get(Ce),void 0===K&&(K=[],d.set(Ce,K));const Ae=N.textures;if(K.length!==Ae.length||K[0]!==n.COLOR_ATTACHMENT0){for(let Ee=0,yt=Ae.length;Ee<yt;Ee++)K[Ee]=n.COLOR_ATTACHMENT0+Ee;K.length=Ae.length,se=!0}}else K[0]!==n.BACK&&(K[0]=n.BACK,se=!0);se&&n.drawBuffers(K)},useProgram:function Dt(N){return p!==N&&(n.useProgram(N),p=N,!0)},setBlending:L,setMaterial:function He(N,Ce){2===N.side?Be(n.CULL_FACE):de(n.CULL_FACE);let K=1===N.side;Ce&&(K=!K),ue(K),1===N.blending&&!1===N.transparent?L(0):L(N.blending,N.blendEquation,N.blendSrc,N.blendDst,N.blendEquationAlpha,N.blendSrcAlpha,N.blendDstAlpha,N.blendColor,N.blendAlpha,N.premultipliedAlpha),o.setFunc(N.depthFunc),o.setTest(N.depthTest),o.setMask(N.depthWrite),s.setMask(N.colorWrite);const se=N.stencilWrite;a.setTest(se),se&&(a.setMask(N.stencilWriteMask),a.setFunc(N.stencilFunc,N.stencilRef,N.stencilFuncMask),a.setOp(N.stencilFail,N.stencilZFail,N.stencilZPass)),et(N.polygonOffset,N.polygonOffsetFactor,N.polygonOffsetUnits),!0===N.alphaToCoverage?de(n.SAMPLE_ALPHA_TO_COVERAGE):Be(n.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:ue,setCullFace:Re,setLineWidth:function pe(N){N!==V&&(G&&n.lineWidth(N),V=N)},setPolygonOffset:et,setScissorTest:function Se(N){N?de(n.SCISSOR_TEST):Be(n.SCISSOR_TEST)},activeTexture:function O(N){void 0===N&&(N=n.TEXTURE0+X-1),ce!==N&&(n.activeTexture(N),ce=N)},bindTexture:function E(N,Ce,K){void 0===K&&(K=null===ce?n.TEXTURE0+X-1:ce);let se=ye[K];void 0===se&&(se={type:void 0,texture:void 0},ye[K]=se),(se.type!==N||se.texture!==Ce)&&(ce!==K&&(n.activeTexture(K),ce=K),n.bindTexture(N,Ce||Te[N]),se.type=N,se.texture=Ce)},unbindTexture:function W(){const N=ye[ce];void 0!==N&&void 0!==N.type&&(n.bindTexture(N.type,null),N.type=void 0,N.texture=void 0)},compressedTexImage2D:function Q(){try{n.compressedTexImage2D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}},compressedTexImage3D:function ae(){try{n.compressedTexImage3D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}},texImage2D:function ke(){try{n.texImage2D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}},texImage3D:function Qe(){try{n.texImage3D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}},updateUBOMapping:function kt(N,Ce){let K=c.get(Ce);void 0===K&&(K=new WeakMap,c.set(Ce,K));let se=K.get(N);void 0===se&&(se=n.getUniformBlockIndex(Ce,N.name),K.set(N,se))},uniformBlockBinding:function xt(N,Ce){const se=c.get(Ce).get(N);l.get(Ce)!==se&&(n.uniformBlockBinding(Ce,se,N.__bindingPointIndex),l.set(Ce,se))},texStorage2D:function Rt(){try{n.texStorage2D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}},texStorage3D:function fe(){try{n.texStorage3D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}},texSubImage2D:function te(){try{n.texSubImage2D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}},texSubImage3D:function Ve(){try{n.texSubImage3D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}},compressedTexSubImage2D:function xe(){try{n.compressedTexSubImage2D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}},compressedTexSubImage3D:function Ie(){try{n.compressedTexSubImage3D.apply(n,arguments)}catch(N){console.error("THREE.WebGLState:",N)}},scissor:function nt(N){!1===ct.equals(N)&&(n.scissor(N.x,N.y,N.z,N.w),ct.copy(N))},viewport:function Ue(N){!1===Z.equals(N)&&(n.viewport(N.x,N.y,N.z,N.w),Z.copy(N))},reset:function ln(){n.disable(n.BLEND),n.disable(n.CULL_FACE),n.disable(n.DEPTH_TEST),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SCISSOR_TEST),n.disable(n.STENCIL_TEST),n.disable(n.SAMPLE_ALPHA_TO_COVERAGE),n.blendEquation(n.FUNC_ADD),n.blendFunc(n.ONE,n.ZERO),n.blendFuncSeparate(n.ONE,n.ZERO,n.ONE,n.ZERO),n.blendColor
vendor: 5,080 bytes, line 1
1(0,0,0,0),n.colorMask(!0,!0,!0,!0),n.clearColor(0,0,0,0),n.depthMask(!0),n.depthFunc(n.LESS),o.setReversed(!1),n.clearDepth(1),n.stencilMask(4294967295),n.stencilFunc(n.ALWAYS,0,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),n.clearStencil(0),n.cullFace(n.BACK),n.frontFace(n.CCW),n.polygonOffset(0,0),n.activeTexture(n.TEXTURE0),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),n.bindFramebuffer(n.READ_FRAMEBUFFER,null),n.useProgram(null),n.lineWidth(1),n.scissor(0,0,n.canvas.width,n.canvas.height),n.viewport(0,0,n.canvas.width,n.canvas.height),u={},ce=null,ye={},h={},d=new WeakMap,f=[],p=null,_=!1,g=null,m=null,v=null,y=null,b=null,T=null,S=null,P=new me(0,0,0),I=0,w=!1,M=null,F=null,V=null,z=null,H=null,ct.set(0,0,n.canvas.width,n.canvas.height),Z.set(0,0,n.canvas.width,n.canvas.height),s.reset(),o.reset(),a.reset()}}}function aX(n,e,t,i,r,s,o){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),c=new J,u=new WeakMap;let h;const d=new WeakMap;let f=!1;try{f="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(O){}function p(O,E){return f?new OffscreenCanvas(O,E):uh("canvas")}function _(O,E,W){let Q=1;const ae=Se(O);if((ae.width>W||ae.height>W)&&(Q=W/Math.max(ae.width,ae.height)),Q<1){if("undefined"!=typeof HTMLImageElement&&O instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&O instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&O instanceof ImageBitmap||"undefined"!=typeof VideoFrame&&O instanceof VideoFrame){const te=Math.floor(Q*ae.width),Ve=Math.floor(Q*ae.height);void 0===h&&(h=p(te,Ve));const xe=E?p(te,Ve):h;return xe.width=te,xe.height=Ve,xe.getContext("2d").drawImage(O,0,0,te,Ve),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ae.width+"x"+ae.height+") to ("+te+"x"+Ve+")."),xe}return"data"in O&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ae.width+"x"+ae.height+")."),O}return O}function g(O){return O.generateMipmaps}function m(O){n.generateMipmap(O)}function v(O){return O.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:O.isWebGL3DRenderTarget?n.TEXTURE_3D:O.isWebGLArrayRenderTarget||O.isCompressedArrayTexture?n.TEXTURE_2D_ARRAY:n.TEXTURE_2D}function y(O,E,W,Q,ae=!1){if(null!==O){if(void 0!==n[O])return n[O];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+O+"'")}let te=E;if(E===n.RED&&(W===n.FLOAT&&(te=n.R32F),W===n.HALF_FLOAT&&(te=n.R16F),W===n.UNSIGNED_BYTE&&(te=n.R8)),E===n.RED_INTEGER&&(W===n.UNSIGNED_BYTE&&(te=n.R8UI),W===n.UNSIGNED_SHORT&&(te=n.R16UI),W===n.UNSIGNED_INT&&(te=n.R32UI),W===n.BYTE&&(te=n.R8I),W===n.SHORT&&(te=n.R16I),W===n.INT&&(te=n.R32I)),E===n.RG&&(W===n.FLOAT&&(te=n.RG32F),W===n.HALF_FLOAT&&(te=n.RG16F),W===n.UNSIGNED_BYTE&&(te=n.RG8)),E===n.RG_INTEGER&&(W===n.UNSIGNED_BYTE&&(te=n.RG8UI),W===n.UNSIGNED_SHORT&&(te=n.RG16UI),W===n.UNSIGNED_INT&&(te=n.RG32UI),W===n.BYTE&&(te=n.RG8I),W===n.SHORT&&(te=n.RG16I),W===n.INT&&(te=n.RG32I)),E===n.RGB_INTEGER&&(W===n.UNSIGNED_BYTE&&(te=n.RGB8UI),W===n.UNSIGNED_SHORT&&(te=n.RGB16UI),W===n.UNSIGNED_INT&&(te=n.RGB32UI),W===n.BYTE&&(te=n.RGB8I),W===n.SHORT&&(te=n.RGB16I),W===n.INT&&(te=n.RGB32I)),E===n.RGBA_INTEGER&&(W===n.UNSIGNED_BYTE&&(te=n.RGBA8UI),W===n.UNSIGNED_SHORT&&(te=n.RGBA16UI),W===n.UNSIGNED_INT&&(te=n.RGBA32UI),W===n.BYTE&&(te=n.RGBA8I),W===n.SHORT&&(te=n.RGBA16I),W===n.INT&&(te=n.RGBA32I)),E===n.RGB&&W===n.UNSIGNED_INT_5_9_9_9_REV&&(te=n.RGB9_E5),E===n.RGBA){const Ve=ae?ap:vt.getTransfer(Q);W===n.FLOAT&&(te=n.RGBA32F),W===n.HALF_FLOAT&&(te=n.RGBA16F),W===n.UNSIGNED_BYTE&&(te=Ve===Kt?n.SRGB8_ALPHA8:n.RGBA8),W===n.UNSIGNED_SHORT_4_4_4_4&&(te=n.RGBA4),W===n.UNSIGNED_SHORT_5_5_5_1&&(te=n.RGB5_A1)}return(te===n.R16F||te===n.R32F||te===n.RG16F||te===n.RG32F||te===n.RGBA16F||te===n.RGBA32F)&&e.get("EXT_color_buffer_float"),te}function b(O,E){let W;return O?null===E||E===Io||E===$l?W=n.DEPTH24_STENCIL8:E===pr?W=n.DEPTH32F_STENCIL8:E===ah&&(W=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===E||E===Io||E===$l?W=n.DEPTH_COMPONENT24:E===pr?W=n.DEPTH_COMPONENT32F:E===ah&&(W=n.DEPTH_COMPONENT16),W}function T(O,E){return!0===g(O)||O.isFramebufferTexture&&O.minFilter!==gi&&O.minFilter!==Qn?Math.log2(Math.max(E.width,E.height))+1:void 0!==O.mipmaps&&O.mipmaps.length>0?O.mipmaps.length:O.isCompressedTexture&&Array.isArray(O.image)?E.mipmaps.length:1}function S(O){const E=O.target;E.removeEventListener("dispose",S),function I(O){const E=i.get(O);if(void 0===E.__webglInit)return;const W=O.source,Q=d.get(W);if(Q){const ae=Q[E.__cacheKey];ae.usedTimes--,0===ae.usedTimes&&w(O),0===Object.keys(Q).length&&d.delete(W)}i.remove(O)}(E),E.isVideoTexture&&u.delete(E)}function P(O){const E=O.target;E.removeEventListener("dispose",P),function M(O){const E=i.get(O);if(O.depthTexture&&(O.depthTexture.dispose(),i.remove(O.depthTexture)),O.isWebGLCubeRen
1derTarget)for(let Q=0;Q<6;Q++){if(Array.isArray(E.__webglFramebuffer[Q]))for(let ae=0;ae<E.__webglFramebuffer[Q].length;ae++)n.deleteFramebuffer(E.__webglFramebuffer[Q][ae]);else n.deleteFramebuffer(E.__webglFramebuffer[Q]);E.__webglDepthbuffer&&n.deleteRenderbuffer(E.__webglDepthbuffer[Q])}else{if(Array.isArray(E.__webglFramebuffer))for(let Q=0;Q<E.__webglFramebuffer.length;Q++)n.deleteFramebuffer(E.__webglFramebuffer[Q]);else n.deleteFramebuffer(E.__webglFramebuffer);if(E.__webglDepthbuffer&&n.deleteRenderbuffer(E.__webglDepthbuffer),E.__webglMultisampledFramebuffer&&n.deleteFramebuffer(E.__webglMultisampledFramebuffer),E.__webglColorRenderbuffer)for(let Q=0;Q<E.__webglColorRenderbuffer.length;Q++)E.__webglColorRenderbuffer[Q]&&n.deleteRenderbuffer(E.__webglColorRenderbuffer[Q]);E.__webglDepthRenderbuffer&&n.deleteRenderbuffer(E.__webglDepthRenderbuffer)}const W=O.textures;for(let Q=0,ae=W.length;Q<ae;Q++){const te=i.get(W[Q]);te.__webglTexture&&(n.deleteTexture(te.__webglTexture),o.memory.textures--),i.remove(W[Q])}i.remove(O)}(E)}function w(O){const E=i.get(O);n.deleteTexture(E.__webglTexture),delete d.get(O.source)[E.__cacheKey],o.memory.textures--}let F=0;function X(O,E){const W=i.get(O);if(O.isVideoTexture&&function pe(O){const E=o.render.frame;u.get(O)!==E&&(u.set(O,E),O.update())}(O),!1===O.isRenderTargetTexture&&O.version>0&&W.__version!==O.version){const Q=O.image;if(null===Q)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==Q.complete)return void Z(W,O,E);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}t.bindTexture(n.TEXTURE_2D,W.__webglTexture,n.TEXTURE0+E)}const ce={[jl]:n.REPEAT,[fr]:n.CLAMP_TO_EDGE,1002:n.MIRRORED_REPEAT},ye={[gi]:n.NEAREST,1004:n.NEAREST_MIPMAP_NEAREST,1005:n.NEAREST_MIPMAP_LINEAR,[Qn]:n.LINEAR,1007:n.LINEAR_MIPMAP_NEAREST,[$s]:n.LINEAR_MIPMAP_LINEAR},_e={512:n.NEVER,519:n.ALWAYS,513:n.LESS,515:n.LEQUAL,514:n.EQUAL,518:n.GEQUAL,516:n.GREATER,517:n.NOTEQUAL};function je(O,E){if(E.type===pr&&!1===e.has("OES_texture_float_linear")&&(E.magFilter===Qn||1007===E.magFilter||1005===E.magFilter||E.magFilter===$s||E.minFilter===Qn||1007===E.minFilter||1005===E.minFilter||E.minFilter===$s)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(O,n.TEXTURE_WRAP_S,ce[E.wrapS]),n.texParameteri(O,n.TEXTURE_WRAP_T,ce[E.wrapT]),(O===n.TEXTURE_3D||O===n.TEXTURE_2D_ARRAY)&&n.texParameteri(O,n.TEXTURE_WRAP_R,ce[E.wrapR]),n.texParameteri(O,n.TEXTURE_MAG_FILTER,ye[E.magFilter]),n.texParameteri(O,n.TEXTURE_MIN_FILTER,ye[E.minFilter]),E.compareFunction&&(n.texParameteri(O,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(O,n.TEXTURE_COMPARE_FUNC,_e[E.compareFunction])),!0===e.has("EXT_texture_filter_anisotropic")){if(E.magFilter===gi||1005!==E.minFilter&&E.minFilter!==$s||E.type===pr&&!1===e.has("OES_texture_float_linear"))return;if(E.anisotropy>1||i.get(E).__currentAnisotropy){const W=e.get("EXT_texture_filter_anisotropic");n.texParameterf(O,W.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(E.anisotropy,r.getMaxAnisotropy())),i.get(E).__currentAnisotropy=E.anisotropy}}}function ct(O,E){let W=!1;void 0===O.__webglInit&&(O.__webglInit=!0,E.addEventListener("dispose",S));const Q=E.source;let ae=d.get(Q);void 0===ae&&(ae={},d.set(Q,ae));const te=function H(O){const E=[];return E.push(O.wrapS),E.push(O.wrapT),E.push(O.wrapR||0),E.push(O.magFilter),E.push(O.minFilter),E.push(O.anisotropy),E.push(O.internalFormat),E.push(O.format),E.push(O.type),E.push(O.generateMipmaps),E.push(O.premultiplyAlpha),E.push(O.flipY),E.push(O.unpackAlignment),E.push(O.colorSpace),E.join()}(E);if(te!==O.__cacheKey){void 0===ae[te]&&(ae[te]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,W=!0),ae[te].usedTimes++;const Ve=ae[O.__cacheKey];void 0!==Ve&&(ae[O.__cacheKey].usedTimes--,0===Ve.usedTimes&&w(E)),O.__cacheKey=te,O.__webglTexture=ae[te].texture}return W}function Z(O,E,W){let Q=n.TEXTURE_2D;(E.isDataArrayTexture||E.isCompressedArrayTexture)&&(Q=n.TEXTURE_2D_ARRAY),E.isData3DTexture&&(Q=n.TEXTURE_3D);const ae=ct(O,E),te=E.source;t.bindTexture(Q,O.__webglTexture,n.TEXTURE0+W);const Ve=i.get(te);if(te.version!==Ve.__version||!0===ae){t.activeTexture(n.TEXTURE0+W);const xe=vt.getPrimaries(vt.workingColorSpace),Ie=""===E.colorSpace?null:vt.getPrimaries(E.colorSpace),Rt=""===E.colorSpace||xe===Ie?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,E.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,E.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,E.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Rt);let fe=_(E.image,!1,r.maxTextureSize);fe=et(E,fe);const ke=s.convert(E.format,E.colorSpace),Qe=s.convert(E.type);let Ue,nt=y(E.internalFormat,ke,Qe,E.colorSpace,E.isVideoTexture);je(Q,E);const kt=E.mipmaps,xt=!0!==E.isVideoTexture,ln=void 0===Ve.__version||!0===ae,N=te.dataReady,Ce=T(E,fe);if(E.isDepthTexture)nt=b(E.format===Yl,E.type),ln&&(xt?t.texStorage2D(n.TEXTURE_2D,1,nt,fe.width,fe.height):t.texImage2D(n.TEXTURE_2D,0,nt,fe.width,fe.height,0,ke,Qe,null));else if(E.isDataTexture)if(kt.length>0){xt&&ln&&t.texStorage2D(n.TEXTURE_2D,Ce,nt,kt[0].width,kt[0].height);for(let K=0,se=kt.length;K<se;K++)Ue=kt[K],xt?N&&t.texSubImage2D(n.TEXTURE_2D,K,0,0,Ue.width,Ue.height,ke,Qe,Ue.data):t.texImage2D(n.TEXTURE_2D,K,nt,Ue.width,Ue.height,0,ke,Qe,Ue.data);E.generateMipmaps=!1}else xt?(ln&&t.texStorage2D(n.TEXTURE_2D,Ce,nt,fe.width,fe.height),N&&t.texSubImage2D(n.TEXTURE_2D,0,0,0,fe.width,fe.height,ke,Qe,fe.data)):t.texImage2D(n.TEXTURE_2D,0,nt,fe.width,fe.height,0,ke,Qe,fe.data);else if(E.isCompressedTexture)if(E.isCompressedArrayTexture){xt&&ln&&t.texStorage3D(n.TEXTURE_2D_ARRAY,Ce,nt,kt[0].width,kt[0].height,fe.depth);for(let K=0,se=kt.length;K<se;K++)if(Ue=kt[K],E.format!==Zi)if(null!==ke)if(xt){if(N)if(E.layerUpdates.size>0){const Ae=_b(Ue.width,Ue.height,E.format,E.type);for(const Ee of E.layerUpdates){const yt=Ue.data.subarray(Ee*Ae/Ue.data.BYTES_PER_ELEMENT,(Ee+1)*Ae/Ue.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,K,0,0,Ee,Ue.width,Ue.height,1,ke,yt)}E.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,K,0,0,0,Ue.width,Ue.height,fe.depth,ke,Ue.data)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,K,nt,Ue.width,Ue.height,fe.depth,0,Ue.data,
vendor: 4,098 bytes, line 1
10,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else xt?N&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,K,0,0,0,Ue.width,Ue.height,fe.depth,ke,Qe,Ue.data):t.texImage3D(n.TEXTURE_2D_ARRAY,K,nt,Ue.width,Ue.height,fe.depth,0,ke,Qe,Ue.data)}else{xt&&ln&&t.texStorage2D(n.TEXTURE_2D,Ce,nt,kt[0].width,kt[0].height);for(let K=0,se=kt.length;K<se;K++)Ue=kt[K],E.format!==Zi?null!==ke?xt?N&&t.compressedTexSubImage2D(n.TEXTURE_2D,K,0,0,Ue.width,Ue.height,ke,Ue.data):t.compressedTexImage2D(n.TEXTURE_2D,K,nt,Ue.width,Ue.height,0,Ue.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):xt?N&&t.texSubImage2D(n.TEXTURE_2D,K,0,0,Ue.width,Ue.height,ke,Qe,Ue.data):t.texImage2D(n.TEXTURE_2D,K,nt,Ue.width,Ue.height,0,ke,Qe,Ue.data)}else if(E.isDataArrayTexture)if(xt){if(ln&&t.texStorage3D(n.TEXTURE_2D_ARRAY,Ce,nt,fe.width,fe.height,fe.depth),N)if(E.layerUpdates.size>0){const K=_b(fe.width,fe.height,E.format,E.type);for(const se of E.layerUpdates){const Ae=fe.data.subarray(se*K/fe.data.BYTES_PER_ELEMENT,(se+1)*K/fe.data.BYTES_PER_ELEMENT);t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,se,fe.width,fe.height,1,ke,Qe,Ae)}E.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,fe.width,fe.height,fe.depth,ke,Qe,fe.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,nt,fe.width,fe.height,fe.depth,0,ke,Qe,fe.data);else if(E.isData3DTexture)xt?(ln&&t.texStorage3D(n.TEXTURE_3D,Ce,nt,fe.width,fe.height,fe.depth),N&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,fe.width,fe.height,fe.depth,ke,Qe,fe.data)):t.texImage3D(n.TEXTURE_3D,0,nt,fe.width,fe.height,fe.depth,0,ke,Qe,fe.data);else if(E.isFramebufferTexture){if(ln)if(xt)t.texStorage2D(n.TEXTURE_2D,Ce,nt,fe.width,fe.height);else{let K=fe.width,se=fe.height;for(let Ae=0;Ae<Ce;Ae++)t.texImage2D(n.TEXTURE_2D,Ae,nt,K,se,0,ke,Qe,null),K>>=1,se>>=1}}else if(kt.length>0){if(xt&&ln){const K=Se(kt[0]);t.texStorage2D(n.TEXTURE_2D,Ce,nt,K.width,K.height)}for(let K=0,se=kt.length;K<se;K++)Ue=kt[K],xt?N&&t.texSubImage2D(n.TEXTURE_2D,K,0,0,ke,Qe,Ue):t.texImage2D(n.TEXTURE_2D,K,nt,ke,Qe,Ue);E.generateMipmaps=!1}else if(xt){if(ln){const K=Se(fe);t.texStorage2D(n.TEXTURE_2D,Ce,nt,K.width,K.height)}N&&t.texSubImage2D(n.TEXTURE_2D,0,0,0,ke,Qe,fe)}else t.texImage2D(n.TEXTURE_2D,0,nt,ke,Qe,fe);g(E)&&m(Q),Ve.__version=te.version,E.onUpdate&&E.onUpdate(E)}O.__version=E.version}function Te(O,E,W,Q,ae,te){const Ve=s.convert(W.format,W.colorSpace),xe=s.convert(W.type),Ie=y(W.internalFormat,Ve,xe,W.colorSpace),Rt=i.get(E),fe=i.get(W);if(fe.__renderTarget=E,!Rt.__hasExternalTextures){const ke=Math.max(1,E.width>>te),Qe=Math.max(1,E.height>>te);ae===n.TEXTURE_3D||ae===n.TEXTURE_2D_ARRAY?t.texImage3D(ae,te,Ie,ke,Qe,E.depth,0,Ve,xe,null):t.texImage2D(ae,te,Ie,ke,Qe,0,Ve,xe,null)}t.bindFramebuffer(n.FRAMEBUFFER,O),Re(E)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Q,ae,fe.__webglTexture,0,ue(E)):(ae===n.TEXTURE_2D||ae>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&ae<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,Q,ae,fe.__webglTexture,te),t.bindFramebuffer(n.FRAMEBUFFER,null)}function de(O,E,W){if(n.bindRenderbuffer(n.RENDERBUFFER,O),E.depthBuffer){const Q=E.depthTexture,te=b(E.stencilBuffer,Q&&Q.isDepthTexture?Q.type:null),Ve=E.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,xe=ue(E);Re(E)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,xe,te,E.width,E.height):W?n.renderbufferStorageMultisample(n.RENDERBUFFER,xe,te,E.width,E.height):n.renderbufferStorage(n.RENDERBUFFER,te,E.width,E.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,Ve,n.RENDERBUFFER,O)}else{const Q=E.textures;for(let ae=0;ae<Q.length;ae++){const te=Q[ae],Ve=s.convert(te.format,te.colorSpace),xe=s.convert(te.type),Ie=y(te.internalFormat,Ve,xe,te.colorSpace),Rt=ue(E);W&&!1===Re(E)?n.renderbufferStorageMultisample(n.RENDERBUFFER,Rt,Ie,E.width,E.height):Re(E)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Rt,Ie,E.width,E.height):n.renderbufferStorage(n.RENDERBUFFER,Ie,E.width,E.height)}}n.bindRenderbuffer(n.RENDERBUFFER,null)}
1function Mt(O){const E=i.get(O),W=!0===O.isWebGLCubeRenderTarget;if(E.__boundDepthTexture!==O.depthTexture){const Q=O.depthTexture;if(E.__depthDisposeCallback&&E.__depthDisposeCallback(),Q){const ae=()=>{delete E.__boundDepthTexture,delete E.__depthDisposeCallback,Q.removeEventListener("dispose",ae)};Q.addEventListener("dispose",ae),E.__depthDisposeCallback=ae}E.__boundDepthTexture=Q}if(O.depthTexture&&!E.__autoAllocateDepthBuffer){if(W)throw new Error("target.depthTexture not supported in Cube render targets");!function Be(O,E){if(E&&E.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(n.FRAMEBUFFER,O),!E.depthTexture||!E.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const Q=i.get(E.depthTexture);Q.__renderTarget=E,(!Q.__webglTexture||E.depthTexture.image.width!==E.width||E.depthTexture.image.height!==E.height)&&(E.depthTexture.image.width=E.width,E.depthTexture.image.height=E.height,E.depthTexture.needsUpdate=!0),X(E.depthTexture,0);const ae=Q.__webglTexture,te=ue(E);if(E.depthTexture.format===ql)Re(E)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,ae,0,te):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,ae,0);else{if(E.depthTexture.format!==Yl)throw new Error("Unknown depthTexture format");Re(E)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,ae,0,te):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,ae,0)}}(E.__webglFramebuffer,O)}else if(W){E.__webglDepthbuffer=[];for(let Q=0;Q<6;Q++)if(t.bindFramebuffer(n.FRAMEBUFFER,E.__webglFramebuffer[Q]),void 0===E.__webglDepthbuffer[Q])E.__webglDepthbuffer[Q]=n.createRenderbuffer(),de(E.__webglDepthbuffer[Q],O,!1);else{const ae=O.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,te=E.__webglDepthbuffer[Q];n.bindRenderbuffer(n.RENDERBUFFER,te),n.framebufferRenderbuffer(n.FRAMEBUFFER,ae,n.RENDERBUFFER,te)}}else if(t.bindFramebuffer(n.FRAMEBUFFER,E.__webglFramebuffer),void 0===E.__webglDepthbuffer)E.__webglDepthbuffer=n.createRenderbuffer(),de(E.__webglDepthbuffer,O,!1);else{const Q=O.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ae=E.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,ae),n.framebufferRenderbuffer(n.FRAMEBUFFER,Q,n.RENDERBUFFER,ae)}t.bindFramebuffer(n.FRAMEBUFFER,null)}const re=[],L=[];function ue(O){return Math.min(r.maxSamples,O.samples)}function Re(O){const E=i.get(O);return O.samples>0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==E.__useRenderToTexture}function et(O,E){const W=O.colorSpace,Q=O.format,ae=O.type;return!0===O.isCompressedTexture||!0===O.isVideoTexture||W!==Kl&&""!==W&&(vt.getTransfer(W)===Kt?(Q!==Zi||ae!==qs)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",W)),E}function Se(O){return"undefined"!=typeof HTMLImageElement&&O instanceof HTMLImageElement?(c.width=O.naturalWidth||O.width,c.height=O.naturalHeight||O.height):"undefined"!=typeof VideoFrame&&O instanceof VideoFrame?(c.width=O.displayWidth,c.height=O.displayHeight):(c.width=O.width,c.height=O.height),c}this.allocateTextureUnit=function z(){const O=F;return O>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+O+" texture units while this GPU supports only "+r.maxTextures),F+=1,O},this.resetTextureUnits=function V(){F=0},this.setTexture2D=X,this.setTexture2DArray=function G(O,E){const W=i.get(O);O.version>0&&W.__version!==O.version?Z(W,O,E):t.bindTexture(n.TEXTURE_2D_ARRAY,W.__webglTexture,n.TEXTURE0+E)},this.setTexture3D=function ee(O,E){const W=i.get(O);O.version>0&&W.__version!==O.version?Z(W,O,E):t.bindTexture(n.TEXTURE_3D,W.__webglTexture,n.TEXTURE0+E)},this.setTextureCube=function $(O,E){const W=i.get(O);O.version>0&&W.__version!==O.version?function ie(O,E,W){if(6!==E.image.length)return;const Q=ct(O,E),ae=E.source;t.bindTexture(n.TEXTURE_CUBE_MAP,O.__webglTexture,n.TEXTURE0+W);const te=i.get(ae);if(ae.version!==te.__version||!0===Q){t.activeTexture(n.TEXTURE0+W);const Ve=vt.getPrimaries(vt.workingColorSpace),xe=""===E.colorSpace?null:vt.getPrimaries(E.colorSpace),Ie=""===E.colorSpace||Ve===xe?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,E.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,E.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,E.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ie);const Rt=E.isCompressedTexture||E.image[0].isCompressedTexture,fe=E.image[0]&&E.image[0].isDataTexture,ke=[];for(let se=0;se<6;se++)ke[se]=Rt||fe?fe?E.image[se].image:E.image[se]:_(E.image[se],!0,r.maxCubemapSize),ke[se]=et(E,ke[se]);const Qe=ke[0],nt=s.convert(E.format,E.colorSpace),Ue=s.convert(E.type),kt=y(E.internalFormat,nt,Ue,E.colorSpace),xt=!0!==E.isVideoTexture,ln=void 0===te.__version||!0===Q,N=ae.dataReady;let K,Ce=T(E,Qe);if(je(n.TEXTURE_CUBE_MAP,E),Rt){xt&&ln&&t.texStorage2D(n.TEXTURE_CUBE_MAP,Ce,kt,Qe.width,Qe.height);for(let se=0;se<6;se++){K=ke[se].mipmaps;for(let Ae=0;Ae<K.length;Ae++){const Ee=K[Ae];E.format!==Zi?null!==nt?xt?N&&t.compressedTexSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,Ae,0,0,Ee.width,Ee.height,nt,Ee.data):t.compressedTexImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,Ae,kt,Ee.width,Ee.height,0,Ee.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):xt?N&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,Ae,0,0,Ee.width,Ee.height,nt,Ue,Ee.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,Ae,kt,Ee.width,Ee.height,0,nt,Ue,Ee.data)}}}else{if(K=E.mipmaps,xt&&ln){K.length>0&&Ce++;const se=Se(ke[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,Ce,kt,se.width,se.height)}for(let se=0;se<6;se++)if(fe){xt?N&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,0,0,0,ke[se].width,ke[se].height,nt,Ue,ke[se].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,0,kt,ke[se].width,ke[se].height,0,nt,Ue,ke[se].data);for(let Ae=0;Ae<K.length;Ae++){const yt=K[Ae].image[se].image;xt?N&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,Ae+1,0,0,yt.width,yt.height,nt,Ue,yt.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,Ae+1,kt,yt.width,yt.height,0,nt,Ue,yt.data)}}else{xt?N&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,0,0,0,nt,Ue,ke[se]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,0,kt,nt,Ue,ke[se]);for(let Ae=0;Ae<K.length;Ae++){const Ee=K[Ae];xt?N&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,Ae+1,0,0,nt,Ue,Ee.image[se]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+se,Ae+1,kt,nt,Ue,Ee.image[se])}}}
vendor: 4,353 bytes, line 1
1g(E)&&m(n.TEXTURE_CUBE_MAP),te.__version=ae.version,E.onUpdate&&E.onUpdate(E)}O.__version=E.version}(W,O,E):t.bindTexture(n.TEXTURE_CUBE_MAP,W.__webglTexture,n.TEXTURE0+E)},this.rebindTextures=function Ne(O,E,W){const Q=i.get(O);void 0!==E&&Te(Q.__webglFramebuffer,O,O.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),void 0!==W&&Mt(O)},this.setupRenderTarget=function Dt(O){const E=O.texture,W=i.get(O),Q=i.get(E);O.addEventListener("dispose",P);const ae=O.textures,te=!0===O.isWebGLCubeRenderTarget,Ve=ae.length>1;if(Ve||(void 0===Q.__webglTexture&&(Q.__webglTexture=n.createTexture()),Q.__version=E.version,o.memory.textures++),te){W.__webglFramebuffer=[];for(let xe=0;xe<6;xe++)if(E.mipmaps&&E.mipmaps.length>0){W.__webglFramebuffer[xe]=[];for(let Ie=0;Ie<E.mipmaps.length;Ie++)W.__webglFramebuffer[xe][Ie]=n.createFramebuffer()}else W.__webglFramebuffer[xe]=n.createFramebuffer()}else{if(E.mipmaps&&E.mipmaps.length>0){W.__webglFramebuffer=[];for(let xe=0;xe<E.mipmaps.length;xe++)W.__webglFramebuffer[xe]=n.createFramebuffer()}else W.__webglFramebuffer=n.createFramebuffer();if(Ve)for(let xe=0,Ie=ae.length;xe<Ie;xe++){const Rt=i.get(ae[xe]);void 0===Rt.__webglTexture&&(Rt.__webglTexture=n.createTexture(),o.memory.textures++)}if(O.samples>0&&!1===Re(O)){W.__webglMultisampledFramebuffer=n.createFramebuffer(),W.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,W.__webglMultisampledFramebuffer);for(let xe=0;xe<ae.length;xe++){const Ie=ae[xe];W.__webglColorRenderbuffer[xe]=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,W.__webglColorRenderbuffer[xe]);const Rt=s.convert(Ie.format,Ie.colorSpace),fe=s.convert(Ie.type),ke=y(Ie.internalFormat,Rt,fe,Ie.colorSpace,!0===O.isXRRenderTarget),Qe=ue(O);n.renderbufferStorageMultisample(n.RENDERBUFFER,Qe,ke,O.width,O.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+xe,n.RENDERBUFFER,W.__webglColorRenderbuffer[xe])}n.bindRenderbuffer(n.RENDERBUFFER,null),O.depthBuffer&&(W.__webglDepthRenderbuffer=n.createRenderbuffer(),de(W.__webglDepthRenderbuffer,O,!0)),t.bindFramebuffer(n.FRAMEBUFFER,null)}}if(te){t.bindTexture(n.TEXTURE_CUBE_MAP,Q.__webglTexture),je(n.TEXTURE_CUBE_MAP,E);for(let xe=0;xe<6;xe++)if(E.mipmaps&&E.mipmaps.length>0)for(let Ie=0;Ie<E.mipmaps.length;Ie++)Te(W.__webglFramebuffer[xe][Ie],O,E,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+xe,Ie);else Te(W.__webglFramebuffer[xe],O,E,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+xe,0);g(E)&&m(n.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Ve){for(let xe=0,Ie=ae.length;xe<Ie;xe++){const Rt=ae[xe],fe=i.get(Rt);t.bindTexture(n.TEXTURE_2D,fe.__webglTexture),je(n.TEXTURE_2D,Rt),Te(W.__webglFramebuffer,O,Rt,n.COLOR_ATTACHMENT0+xe,n.TEXTURE_2D,0),g(Rt)&&m(n.TEXTURE_2D)}t.unbindTexture()}else{let xe=n.TEXTURE_2D;if((O.isWebGL3DRenderTarget||O.isWebGLArrayRenderTarget)&&(xe=O.isWebGL3DRenderTarget?n.TEXTURE_3D:n.TEXTURE_2D_ARRAY),t.bindTexture(xe,Q.__webglTexture),je(xe,E),E.mipmaps&&E.mipmaps.length>0)for(let Ie=0;Ie<E.mipmaps.length;Ie++)Te(W.__webglFramebuffer[Ie],O,E,n.COLOR_ATTACHMENT0,xe,Ie);else Te(W.__webglFramebuffer,O,E,n.COLOR_ATTACHMENT0,xe,0);g(E)&&m(xe),t.unbindTexture()}O.depthBuffer&&Mt(O)},this.updateRenderTargetMipmap=function le(O){const E=O.textures;for(let W=0,Q=E.length;W<Q;W++){const ae=E[W];if(g(ae)){const te=v(O),Ve=i.get(ae).__webglTexture;t.bindTexture(te,Ve),m(te),t.unbindTexture()}}},this.updateMultisampleRenderTarget=function He(O){if(O.samples>0)if(!1===Re(O)){const E=O.textures,W=O.width,Q=O.height;let ae=n.COLOR_BUFFER_BIT;const te=O.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Ve=i.get(O),xe=E.length>1;if(xe)for(let Ie=0;Ie<E.length;Ie++)t.bindFramebuffer(n.FRAMEBUFFER,Ve.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+Ie,n.RENDERBUFFER,null),t.bindFramebuffer(n.FRAMEBUFFER,Ve.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+Ie,n.TEXTURE_2D,null,0);t.bindFramebuffer(n.READ_FRAMEBUFFER,Ve.__webglMultisampledFramebuffer),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Ve.__webglFramebuffer);for(let Ie=0;Ie<E.length;Ie++){if(O.resolveDepthBuffer&&(O.depthBuffer&&(ae|=n.DEPTH_BUFFER_BIT),O.stencilBuffer&&O.resolveStencilBuffer&&(ae|=n.STENCIL_BUFFER_BIT)),xe){n.framebufferRenderbuffer(n.READ_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,Ve.__webglColorRen
1derbuffer[Ie]);const Rt=i.get(E[Ie]).__webglTexture;n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,Rt,0)}n.blitFramebuffer(0,0,W,Q,0,0,W,Q,ae,n.NEAREST),!0===l&&(re.length=0,L.length=0,re.push(n.COLOR_ATTACHMENT0+Ie),O.depthBuffer&&!1===O.resolveDepthBuffer&&(re.push(te),L.push(te),n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,L)),n.invalidateFramebuffer(n.READ_FRAMEBUFFER,re))}if(t.bindFramebuffer(n.READ_FRAMEBUFFER,null),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),xe)for(let Ie=0;Ie<E.length;Ie++){t.bindFramebuffer(n.FRAMEBUFFER,Ve.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+Ie,n.RENDERBUFFER,Ve.__webglColorRenderbuffer[Ie]);const Rt=i.get(E[Ie]).__webglTexture;t.bindFramebuffer(n.FRAMEBUFFER,Ve.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+Ie,n.TEXTURE_2D,Rt,0)}t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Ve.__webglMultisampledFramebuffer)}else O.depthBuffer&&!1===O.resolveDepthBuffer&&l&&n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,[O.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT])},this.setupDepthRenderbuffer=Mt,this.setupFrameBufferTexture=Te,this.useMultisampledRTT=Re}function lX(n,e){return{convert:function t(i,r=""){let s;const o=vt.getTransfer(r);if(i===qs)return n.UNSIGNED_BYTE;if(1017===i)return n.UNSIGNED_SHORT_4_4_4_4;if(1018===i)return n.UNSIGNED_SHORT_5_5_5_1;if(35902===i)return n.UNSIGNED_INT_5_9_9_9_REV;if(1010===i)return n.BYTE;if(1011===i)return n.SHORT;if(i===ah)return n.UNSIGNED_SHORT;if(1013===i)return n.INT;if(i===Io)return n.UNSIGNED_INT;if(i===pr)return n.FLOAT;if(i===lh)return n.HALF_FLOAT;if(1021===i)return n.ALPHA;if(1022===i)return n.RGB;if(i===Zi)return n.RGBA;if(1024===i)return n.LUMINANCE;if(1025===i)return n.LUMINANCE_ALPHA;if(i===ql)return n.DEPTH_COMPONENT;if(i===Yl)return n.DEPTH_STENCIL;if(1028===i)return n.RED;if(1029===i)return n.RED_INTEGER;if(1030===i)return n.RG;if(1031===i)return n.RG_INTEGER;if(1033===i)return n.RGBA_INTEGER;if(i===ep||i===tp||i===np||i===ip)if(o===Kt){if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),null===s)return null;if(i===ep)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===tp)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===np)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===ip)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(s=e.get("WEBGL_compressed_texture_s3tc"),null===s)return null;if(i===ep)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===tp)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===np)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===ip)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===i||35841===i||35842===i||35843===i){if(s=e.get("WEBGL_compressed_texture_pvrtc"),null===s)return null;if(35840===i)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===i)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===i)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===i)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===i||37492===i||37496===i){if(s=e.get("WEBGL_compressed_texture_etc"),null===s)return null;if(36196===i||37492===i)return o===Kt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(37496===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}if(37808===i||37809===i||37810===i||37811===i||37812===i||37813===i||37814===i||37815===i||37816===i||37817===i||37818===i||37819===i||37820===i||37821===i){if(s=e.get("WEBGL_compressed_texture_astc"),null===s)return null;if(37808===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===i)return o===Kt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}if(i===rp||36494===i||36495===i){if(s=e.get("EXT_texture_compression_bptc"),null===s)return null;if(i===rp)return o===Kt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(36494===i)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(36495===i)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(36283===i||36284===i||36285===i||36286===i){if(s=e.get("EXT_texture_compression_rgtc"),null===s)return null;
vendor: 4,650 bytes, line 1
1if(i===rp)return s.COMPRESSED_RED_RGTC1_EXT;if(36284===i)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(36285===i)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(36286===i)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return i===$l?n.UNSIGNED_INT_24_8:void 0!==n[i]?n[i]:null}}}class hX{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(null===this.texture){const r=new Xr;e.properties.get(r).__webglTexture=t.texture,(t.depthNear!==i.depthNear||t.depthFar!==i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=r}}getMesh(e){if(null!==this.texture&&null===this.mesh){const t=e.cameras[0].viewport,i=new to({vertexShader:"\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}",fragmentShader:"\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n\tvec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n\tif ( coord.x >= 1.0 ) {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n\t} else {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n\t}\n\n}",uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new ai(new Ih(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class dX extends xa{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,h=null,d=null,f=null,p=null;const _=new hX,g=t.getContextAttributes();let m=null,v=null;const y=[],b=[],T=new J;let S=null;const P=new ti;P.viewport=new At;const I=new ti;I.viewport=new At;const w=[P,I],M=new qW;let F=null,V=null;function z(Z){const ie=b.indexOf(Z.inputSource);if(-1===ie)return;const Te=y[ie];void 0!==Te&&(Te.update(Z.inputSource,Z.frame,c||o),Te.dispatchEvent({type:Z.type,data:Z.inputSource}))}function H(){r.removeEventListener("select",z),r.removeEventListener("selectstart",z),r.removeEventListener("selectend",z),r.removeEventListener("squeeze",z),r.removeEventListener("squeezestart",z),r.removeEventListener("squeezeend",z),r.removeEventListener("end",H),r.removeEventListener("inputsourceschange",X);for(let Z=0;Z<y.length;Z++){const ie=b[Z];null!==ie&&(b[Z]=null,y[Z].disconnect(ie))}F=null,V=null,_.reset(),e.setRenderTarget(m),f=null,d=null,h=null,r=null,v=null,ct.stop(),i.isPresenting=!1,e.setPixelRatio(S),e.setSize(T.width,T.height,!1),i.dispatchEvent({type:"sessionend"})}function X(Z){for(let ie=0;ie<Z.removed.length;ie++){const Te=Z.removed[ie],de=b.indexOf(Te);de>=0&&(b[de]=null,y[de].disconnect(Te))}for(let ie=0;ie<Z.added.length;ie++){const Te=Z.added[ie];let de=b.indexOf(Te);if(-1===de){for(let Mt=0;Mt<y.length;Mt++){if(Mt>=b.length){b.push(Te),de=Mt;break}if(null===b[Mt]){b[Mt]=Te,de=Mt;break}}if(-1===de)break}const Be=y[de];Be&&Be.connect(Te)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Z){let ie=y[Z];return void 0===ie&&(ie=new C1,y[Z]=ie),ie.getTargetRaySpace()},this.getControllerGrip=function(Z){let ie=y[Z];return void 0===ie&&(ie=new C1,y[Z]=ie),ie.getGripSpace()},this.getHand=function(Z){let ie=y[Z];return void 0===ie&&(ie=new C1,y[Z]=ie),ie.getHandSpace()},this.setFramebufferScaleFactor=function(Z){s=Z,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Z){a=Z,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(Z){c=Z},this.getBaseLayer=function(){return null!==d?d:f},this.getBinding=function(){return h},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=function(){var Z=MI(function*(ie){if(r=ie,null!==r){if(m=e.getRenderTarget(),r.addEventListener("select",z),r.addEventListener("selectstart",z),r.addEventListener("selectend",z),r.addEventListener("squeeze",z),r.addEventListener("squeezestart",z),r.addEventListener("squeezeend",z),r.addEventListener("end",H),r.addEventListener("inputsourceschange",X),!0!==g.xrCompatible&&(yield t.makeXRCompatible()),S=e.getPixelRatio(),e.getSize(T),"undefined"!=typeof XRWebGLBinding&&"createProjectionLayer"in XRWebGLBinding.prototype){let de=null,Be=null,Mt=null;g.depth&&(Mt=g.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,de=g.stencil?Yl:ql,Be=g.stencil?$l:Io);const Ne={colorFormat:t.RGBA8,depthFormat:Mt,scaleFactor:s};h=new XRWebGLBinding(r,t),d=h.createProjectionLayer(Ne),r.updateRenderState({layers:[d]}
1),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),v=new Ma(d.textureWidth,d.textureHeight,{format:Zi,type:qs,depthTexture:new EP(d.textureWidth,d.textureHeight,Be,void 0,void 0,void 0,void 0,void 0,void 0,de),stencilBuffer:g.stencil,colorSpace:e.outputColorSpace,samples:g.antialias?4:0,resolveDepthBuffer:!1===d.ignoreDepthValues})}else f=new XRWebGLLayer(r,t,{antialias:g.antialias,alpha:!0,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:s}),r.updateRenderState({baseLayer:f}),e.setPixelRatio(1),e.setSize(f.framebufferWidth,f.framebufferHeight,!1),v=new Ma(f.framebufferWidth,f.framebufferHeight,{format:Zi,type:qs,colorSpace:e.outputColorSpace,stencilBuffer:g.stencil});v.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=yield r.requestReferenceSpace(a),ct.setContext(r),ct.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}});return function(ie){return Z.apply(this,arguments)}}(),this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};const G=new R,ee=new R;function ce(Z,ie){null===ie?Z.matrixWorld.copy(Z.matrix):Z.matrixWorld.multiplyMatrices(ie.matrixWorld,Z.matrix),Z.matrixWorldInverse.copy(Z.matrixWorld).invert()}this.updateCamera=function(Z){if(null===r)return;let ie=Z.near,Te=Z.far;null!==_.texture&&(_.depthNear>0&&(ie=_.depthNear),_.depthFar>0&&(Te=_.depthFar)),M.near=I.near=P.near=ie,M.far=I.far=P.far=Te,(F!==M.near||V!==M.far)&&(r.updateRenderState({depthNear:M.near,depthFar:M.far}),F=M.near,V=M.far),P.layers.mask=2|Z.layers.mask,I.layers.mask=4|Z.layers.mask,M.layers.mask=P.layers.mask|I.layers.mask;const de=Z.parent,Be=M.cameras;ce(M,de);for(let Mt=0;Mt<Be.length;Mt++)ce(Be[Mt],de);2===Be.length?function $(Z,ie,Te){G.setFromMatrixPosition(ie.matrixWorld),ee.setFromMatrixPosition(Te.matrixWorld);const de=G.distanceTo(ee),Be=ie.projectionMatrix.elements,Mt=Te.projectionMatrix.elements,Ne=Be[14]/(Be[10]-1),Dt=Be[14]/(Be[10]+1),le=(Be[9]+1)/Be[5],re=(Be[9]-1)/Be[5],L=(Be[8]-1)/Be[0],He=(Mt[8]+1)/Mt[0],ue=Ne*L,Re=Ne*He,pe=de/(-L+He),et=pe*-L;if(ie.matrixWorld.decompose(Z.position,Z.quaternion,Z.scale),Z.translateX(et),Z.translateZ(pe),Z.matrixWorld.compose(Z.position,Z.quaternion,Z.scale),Z.matrixWorldInverse.copy(Z.matrixWorld).invert(),-1===Be[10])Z.projectionMatrix.copy(ie.projectionMatrix),Z.projectionMatrixInverse.copy(ie.projectionMatrixInverse);else{const Se=Ne+pe,O=Dt+pe;Z.projectionMatrix.makePerspective(ue-et,Re+(de-et),le*Dt/O*Se,re*Dt/O*Se,Se,O),Z.projectionMatrixInverse.copy(Z.projectionMatrix).invert()}}(M,P,I):M.projectionMatrix.copy(P.projectionMatrix),function ye(Z,ie,Te){null===Te?Z.matrix.copy(ie.matrixWorld):(Z.matrix.copy(Te.matrixWorld),Z.matrix.invert(),Z.matrix.multiply(ie.matrixWorld)),Z.matrix.decompose(Z.position,Z.quaternion,Z.scale),Z.updateMatrixWorld(!0),Z.projectionMatrix.copy(ie.projectionMatrix),Z.projectionMatrixInverse.copy(ie.projectionMatrixInverse),Z.isPerspectiveCamera&&(Z.fov=2*Ql*Math.atan(1/Z.projectionMatrix.elements[5]),Z.zoom=1)}(Z,M,de)},this.getCamera=function(){return M},this.getFoveation=function(){if(null!==d||null!==f)return l},this.setFoveation=function(Z){l=Z,null!==d&&(d.fixedFoveation=Z),null!==f&&void 0!==f.fixedFoveation&&(f.fixedFoveation=Z)},this.hasDepthSensing=function(){return null!==_.texture},this.getDepthSensingMesh=function(){return _.getMesh(M)};let _e=null;const ct=new CI;ct.setAnimationLoop(function je(Z,ie){if(u=ie.getViewerPose(c||o),p=ie,null!==u){const Te=u.views;null!==f&&(e.setRenderTargetFramebuffer(v,f.framebuffer),e.setRenderTarget(v));let de=!1;Te.length!==M.cameras.length&&(M.cameras.length=0,de=!0);for(let Ne=0;Ne<Te.length;Ne++){const Dt=Te[Ne];let le=null;if(null!==f)le=f.getViewport(Dt);else{const L=h.getViewSubImage(d,Dt);le=L.viewport,0===Ne&&(e.setRenderTargetTextures(v,L.colorTexture,d.ignoreDepthValues?void 0:L.depthStencilTexture),e.setRenderTarget(v))}let re=w[Ne];void 0===re&&(re=new ti,re.layers.enable(Ne),re.viewport=new At,w[Ne]=re),re.matrix.fromArray(Dt.transform.matrix),re.matrix.decompose(re.position,re.quaternion,re.scale),re.projectionMatrix.fromArray(Dt.projectionMatrix),re.projectionMatrixInverse.copy(re.projectionMatrix).invert(),re.viewport.set(le.x,le.y,le.width,le.height),0===Ne&&(M.matrix.copy(re.matrix),M.matrix.decompose(M.position,M.quaternion,M.scale)),!0===de&&M.cameras.push(re)}const Be=r.enabledFeatures;if(Be&&Be.includes("depth-sensing")&&"gpu-optimized"==r.depthUsage&&h){const Ne=h.getDepthInformation(Te[0]);Ne&&Ne.isValid&&Ne.texture&&_.init(e,Ne,r.renderState)}}for(let Te=0;Te<y.length;Te++){const de=b[Te],Be=y[Te];null!==de&&void 0!==Be&&Be.update(de,ie,c||o)}_e&&_e(Z,ie),ie.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:ie}),p=null}),this.setAnimationLoop=function(Z){_e=Z},this.dispose=function(){}}}const Ga=new yi,fX=new De;function pX(n,e){function t(g,m){!0===g.matrixAutoUpdate&&g.updateMatrix(),m.value.copy(g.matrix)}function s(g,m){g.opacity.value=m.opacity,m.color&&g.diffuse.value.copy(m.color),m.emissive&&g.emissive.value.copy(m.emissive).multiplyScalar(m.emissiveIntensity),m.map&&(g.map.value=m.map,t(m.map,g.mapTransform)),m.alphaMap&&(g.alphaMap.value=m.alphaMap,t(m.alphaMap,g.alphaMapTransform)),m.bumpMap&&(g.bumpMap.value=m.bumpMap,t(m.bumpMap,g.bumpMapTransform),g.bumpScale.value=m.bumpScale,1===m.side&&(g.bumpScale.value*=-1)),m.normalMap&&(g.normalMap.value=m.normalMap,t(m.normalMap,g.normalMapTransform),g.normalScale.value.copy(m.normalScale),1===m.side&&g.normalScale.value.negate()),m.displacementMap&&(g.displacementMap.value=m.dis
1placementMap,t(m.displacementMap,g.displacementMapTransform),g.displacementScale.value=m.displacementScale,g.displacementBias.value=m.displacementBias),m.emissiveMap&&(g.emissiveMap.value=m.emissiveMap,t(m.emissiveMap,g.emissiveMapTransform)),m.specularMap&&(g.specularMap.value=m.specularMap,t(m.specularMap,g.specularMapTransform)),m.alphaTest>0&&(g.alphaTest.value=m.alphaTest);const v=e.get(m),y=v.envMap,b=v.envMapRotation;y&&(g.envMap.value=y,Ga.copy(b),Ga.x*=-1,Ga.y*=-1,Ga.z*=-1,y.isCubeTexture&&!1===y.isRenderTargetTexture&&(Ga.y*=-1,Ga.z*=-1),g.envMapRotation.value.setFromMatrix4(fX.makeRotationFromEuler(Ga)),g.flipEnvMap.value=y.isCubeTexture&&!1===y.isRenderTargetTexture?-1:1,g.reflectivity.value=m.reflectivity,g.ior.value=m.ior,g.refractionRatio.value=m.refractionRatio),m.lightMap&&(g.lightMap.value=m.lightMap,g.lightMapIntensity.value=m.lightMapIntensity,t(m.lightMap,g.lightMapTransform)),m.aoMap&&(g.aoMap.value=m.aoMap,g.aoMapIntensity.value=m.aoMapIntensity,t(m.aoMap,g.aoMapTransform))}return{refreshFogUniforms:function i(g,m){m.color.getRGB(g.fogColor.value,J2(n)),m.isFog?(g.fogNear.value=m.near,g.fogFar.value=m.far):m.isFogExp2&&(g.fogDensity.value=m.density)},refreshMaterialUniforms:function r(g,m,v,y,b){m.isMeshBasicMaterial||m.isMeshLambertMaterial?s(g,m):m.isMeshToonMaterial?(s(g,m),function h(g,m){m.gradientMap&&(g.gradientMap.value=m.gradientMap)}(g,m)):m.isMeshPhongMaterial?(s(g,m),function u(g,m){g.specular.value.copy(m.specular),g.shininess.value=Math.max(m.shininess,1e-4)}(g,m)):m.isMeshStandardMaterial?(s(g,m),function d(g,m){g.metalness.value=m.metalness,m.metalnessMap&&(g.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,g.metalnessMapTransform)),g.roughness.value=m.roughness,m.roughnessMap&&(g.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,g.roughnessMapTransform)),m.envMap&&(g.envMapIntensity.value=m.envMapIntensity)}(g,m),m.isMeshPhysicalMaterial&&function f(g,m,v){g.ior.value=m.ior,m.sheen>0&&(g.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),g.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(g.sheenColorMap.value=m.sheenColorMap,t(m.sheenColorMap,g.sheenColorMapTransform)),m.sheenRoughnessMap&&(g.sheenRoughnessMap.value=m.sheenRoughnessMap,t(m.sheenRoughnessMap,g.sheenRoughnessMapTransform))),m.clearcoat>0&&(g.clearcoat.value=m.clearcoat,g.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(g.clearcoatMap.value=m.clearcoatMap,t(m.clearcoatMap,g.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,t(m.clearcoatRoughnessMap,g.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(g.clearcoatNormalMap.value=m.clearcoatNormalMap,t(m.clearcoatNormalMap,g.clearcoatNormalMapTransform),g.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),1===m.side&&g.clearcoatNormalScale.value.negate())),m.dispersion>0&&(g.dispersion.value=m.dispersion),m.iridescence>0&&(g.iridescence.value=m.iridescence,g.iridescenceIOR.value=m.iridescenceIOR,g.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],g.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(g.iridescenceMap.value=m.iridescenceMap,t(m.iridescenceMap,g.iridescenceMapTransform)),m.iridescenceThicknessMap&&(g.iridescenceThicknessMap.value=m.iridescenceThicknessMap,t(m.iridescenceThicknessMap,g.iridescenceThicknessMapTransform))),m.transmission>0&&(g.transmission.value=m.transmission,g.transmissionSamplerMap.value=v.texture,g.transmissionSamplerSize.value.set(v.width,v.height),m.transmissionMap&&(g.transmissionMap.value=m.transmissionMap,t(m.transmissionMap,g.transmissionMapTransform)),g.thickness.value=m.thickness,m.thicknessMap&&(g.thicknessMap.value=m.thicknessMap,t(m.thicknessMap,g.thicknessMapTransform)),g.attenuationDistance.value=m.attenuationDistance,g.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(g.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(g.anisotropyMap.value=m.anisotropyMap,t(m.anisotropyMap,g.anisotropyMapTransform))),g.specularIntensity.value=m.specularIntensity,g.specularColor.value.copy(m.specularColor),m.specularColorMap&&(g.specularColorMap.value=m.specularColorMap,t(m.specularColorMap,g.specularColorMapTransform)),m.specularIntensityMap&&(g.specularIntensityMap.value=m.specularIntensityMap,t(m.specularIntensityMap,g.specularIntensityMapTransform))}
1(g,m,b)):m.isMeshMatcapMaterial?(s(g,m),function p(g,m){m.matcap&&(g.matcap.value=m.matcap)}(g,m)):m.isMeshDepthMaterial?s(g,m):m.isMeshDistanceMaterial?(s(g,m),function _(g,m){const v=e.get(m).light;g.referencePosition.value.setFromMatrixPosition(v.matrixWorld),g.nearDistance.value=v.shadow.camera.near,g.farDistance.value=v.shadow.camera.far}(g,m)):m.isMeshNormalMaterial?s(g,m):m.isLineBasicMaterial?(function o(g,m){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,m.map&&(g.map.value=m.map,t(m.map,g.mapTransform))}(g,m),m.isLineDashedMaterial&&function a(g,m){g.dashSize.value=m.dashSize,g.totalSize.value=m.dashSize+m.gapSize,g.scale.value=m.scale}(g,m)):m.isPointsMaterial?function l(g,m,v,y){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.size.value=m.size*v,g.scale.value=.5*y,m.map&&(g.map.value=m.map,t(m.map,g.uvTransform)),m.alphaMap&&(g.alphaMap.value=m.alphaMap,t(m.alphaMap,g.alphaMapTransform)),m.alphaTest>0&&(g.alphaTest.value=m.alphaTest)}(g,m,v,y):m.isSpriteMaterial?function c(g,m){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.rotation.value=m.rotation,m.map&&(g.map.value=m.map,t(m.map,g.mapTransform)),m.alphaMap&&(g.alphaMap.value=m.alphaMap,t(m.alphaMap,g.alphaMapTransform)),m.alphaTest>0&&(g.alphaTest.value=m.alphaTest)}(g,m):m.isShadowMaterial?(g.color.value.copy(m.color),g.opacity.value=m.opacity):m.isShaderMaterial&&(m.uniformsNeedUpdate=!1)}}}function mX(n,e,t,i){let r={},s={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function f(v,y,b,T){const S=v.value,P=y+"_"+b;if(void 0===T[P])return T[P]="number"==typeof S||"boolean"==typeof S?S:S.clone(),!0;{const I=T[P];if("number"==typeof S||"boolean"==typeof S){if(I!==S)return T[P]=S,!0}else if(!1===I.equals(S))return I.copy(S),!0}return!1}function _(v){const y={boundary:0,storage:0};return"number"==typeof v||"boolean"==typeof v?(y.boundary=4,y.storage=4):v.isVector2?(y.boundary=8,y.storage=8):v.isVector3||v.isColor?(y.boundary=16,y.storage=12):v.isVector4?(y.boundary=16,y.storage=16):v.isMatrix3?(y.boundary=48,y.storage=48):v.isMatrix4?(y.boundary=64,y.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),y}function g(v){const y=v.target;y.removeEventListener("dispose",g);const b=o.indexOf(y.__bindingPointIndex);o.splice(b,1),n.deleteBuffer(r[y.id]),delete r[y.id],delete s[y.id]}return{bind:function l(v,y){i.uniformBlockBinding(v,y.program)},update:function c(v,y){let b=r[v.id];void 0===b&&(function p(v){const y=v.uniforms;let b=0;for(let P=0,I=y.length;P<I;P++){const w=Array.isArray(y[P])?y[P]:[y[P]];for(let M=0,F=w.length;M<F;M++){const V=w[M],z=Array.isArray(V.value)?V.value:[V.value];for(let H=0,X=z.length;H<X;H++){const ee=_(z[H]),$=b%16,ce=$%ee.boundary,ye=$+ce;b+=ce,0!==ye&&16-ye<ee.storage&&(b+=16-ye),V.__data=new Float32Array(ee.storage/Float32Array.BYTES_PER_ELEMENT),V.__offset=b,b+=ee.storage}}}const S=b%16;S>0&&(b+=16-S),v.__size=b,v.__cache={}}(v),b=function u(v){const y=function h(){for(let v=0;v<a;v++)if(-1===o.indexOf(v))return o.push(v),v;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();v.__bindingPointIndex=y;const b=n.createBuffer(),T=v.__size,S=v.usage;return n.bindBuffer(n.UNIFORM_BUFFER,b),n.bufferData(n.UNIFORM_BUFFER,T,S),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,y,b),b}(v),r[v.id]=b,v.addEventListener("dispose",g)),i.updateUBOMapping(v,y.program);const S=e.render.frame;s[v.id]!==S&&(function d(v){const b=v.uniforms,T=v.__cache;n.bindBuffer(n.UNIFORM_BUFFER,r[v.id]);for(let S=0,P=b.length;S<P;S++){const I=Array.isArray(b[S])?b[S]:[b[S]];for(let w=0,M=I.length;w<M;w++){const F=I[w];if(!0===f(F,S,w,T)){const V=F.__offset,z=Array.isArray(F.value)?F.value:[F.value];let H=0;for(let X=0;X<z.length;X++){const G=z[X],ee=_(G);"number"==typeof G||"boolean"==typeof G?(F.__data[0]=G,n.bufferSubData(n.UNIFORM_BUFFER,V+H,F.__data)):G.isMatrix3?(F.__data[0]=G.elements[0],F.__data[1]=G.elements[1],F.__data[2]=G.elements[2],F.__data[3]=0,F.__data[4]=G.elements[3],F.__data[5]=G.elements[4],F.__data[6]=G.elements[5],F.__data[7]=0,F.__data[8]=G.elements[6],F.__data[9]=G.elements[7],F.__data[10]=G.elements[8],F.__data[11]=0):(G.toArray(F.__data,H),H+=ee.storage/Float32Array.BYTES_PER_ELEMENT)}n.bufferSubData(n.UNIFORM_BUFFER,V,F.__data)}}}n.bindBuffer(n.UNIFORM_BUFFER,null)}(v),s[v.id]=S)},dispose:function m(){for(const v in r)n.deleteBuffer(r[v]);o=[],r={},s={}}}}class gX{constructor(e={}){const{canvas:t=q9(),context:i=null,depth:r=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:h=!1,reverseDepthBuffer:d=!1}=e;let f;
vendor: 4,466 bytes, line 1
1if(this.isWebGLRenderer=!0,null!==i){if("undefined"!=typeof WebGLRenderingContext&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");f=i.getContextAttributes().alpha}else f=o;const p=new Uint32Array(4),_=new Int32Array(4);let g=null,m=null;const v=[],y=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=an,this.toneMapping=0,this.toneMappingExposure=1;const b=this;let T=!1,S=0,P=0,I=null,w=-1,M=null;const F=new At,V=new At;let z=null;const H=new me(0);let X=0,G=t.width,ee=t.height,$=1,ce=null,ye=null;const _e=new At(0,0,G,ee),je=new At(0,0,G,ee);let ct=!1;const Z=new kp;let ie=!1,Te=!1;this.transmissionResolutionScale=1;const de=new De,Be=new De,Mt=new R,Ne=new At,Dt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let le=!1;function re(){return null===I?$:1}let ue,Re,pe,et,Se,O,E,W,Q,ae,te,Ve,xe,Ie,Rt,fe,ke,Qe,nt,Ue,kt,xt,ln,N,L=i;function He(D,k){return t.getContext(D,k)}try{const D={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:h};if("setAttribute"in t&&t.setAttribute("data-engine","three.js r173"),t.addEventListener("webglcontextlost",se,!1),t.addEventListener("webglcontextrestored",Ae,!1),t.addEventListener("webglcontextcreationerror",Ee,!1),null===L){const k="webgl2";if(L=He(k,D),null===L)throw He(k)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(D){throw console.error("THREE.WebGLRenderer: "+D.message),D}function Ce(){ue=new Eq(L),ue.init(),xt=new lX(L,ue),Re=new bq(L,ue,e,xt),pe=new oX(L,ue),Re.reverseDepthBuffer&&d&&pe.buffers.depth.setReversed(!0),et=new Dq(L),Se=new qY,O=new aX(L,ue,pe,Se,Re,xt,et),E=new wq(b),W=new Sq(b),Q=new gj(L),ln=new vq(L,Q),ae=new Tq(L,Q,et,ln),te=new Iq(L,ae,Q,et),nt=new Pq(L,Re,O),fe=new xq(Se),Ve=new $Y(b,E,W,ue,Re,ln,fe),xe=new pX(b,Se),Ie=new XY,Rt=new tX(ue),Qe=new _q(b,E,W,pe,te,f,l),ke=new rX(b,te,Re),N=new mX(L,et,Re,pe),Ue=new yq(L,ue,et),kt=new Aq(L,ue,et),et.programs=Ve.programs,b.capabilities=Re,b.extensions=ue,b.properties=Se,b.renderLists=Ie,b.shadowMap=ke,b.state=pe,b.info=et}Ce();const K=new dX(b,L);function se(D){D.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),T=!0}function Ae(){console.log("THREE.WebGLRenderer: Context Restored."),T=!1;const D=et.autoReset,k=ke.enabled,j=ke.autoUpdate,q=ke.needsUpdate,U=ke.type;Ce(),et.autoReset=D,ke.enabled=k,ke.autoUpdate=j,ke.needsUpdate=q,ke.type=U}function Ee(D){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",D.statusMessage)}function yt(D){const k=D.target;k.removeEventListener("dispose",yt),function Tn(D){(function wi(D){const k=Se.get(D).programs;void 0!==k&&(k.forEach(function(j){Ve.releaseProgram(j)}),D.isShaderMaterial&&Ve.releaseShaderCache(D))})(D),Se.remove(D)}(k)}function qt(D,k,j){!0===D.transparent&&2===D.side&&!1===D.forceSinglePass?(D.side=1,D.needsUpdate=!0,Um(D,k,j),D.side=0,D.needsUpdate=!0,Um(D,k,j),D.side=2):Um(D,k,j)}this.xr=K,this.getContext=function(){return L},this.getContextAttributes=function(){return L.getContextAttributes()},this.forceContextLoss=function(){const D=ue.get("WEBGL_lose_context");D&&D.loseContext()},this.forceContextRestore=function(){const D=ue.get("WEBGL_lose_context");D&&D.restoreContext()},this.getPixelRatio=function(){return $},this.setPixelRatio=function(D){void 0!==D&&($=D,this.setSize(G,ee,!1))},this.getSize=function(D){return D.set(G,ee)},this.setSize=function(D,k,j=!0){K.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(G=D,ee=k,t.width=Math.floor(D*$),t.height=Math.floor(k*$),!0===j&&(t.style.width=D+"px",t.style.height=k+"px"),this.setViewport(0,0,D,k))},this.getDrawingBufferSize=function(D){return D.set(G*$,ee*$).floor()},this.setDrawingBufferSize=function(D,k,j){G=D,ee=k,$=j,t.width=Math.floor(D*j),t.height=Math.floor(k*j),this.setViewport(0,0,D,k)},this.getCurrentViewport=function(D){return D.copy(F)},this.getViewport=function(D){return D.copy(_e)},this.setViewport=function(D,k,j,q){D.isVector4?_e.set(D.x,D.y,D.z,D.w):_e.set(D,k,j,q),pe.viewport(F.copy(_e).multiplyScalar($).round())}
1,this.getScissor=function(D){return D.copy(je)},this.setScissor=function(D,k,j,q){D.isVector4?je.set(D.x,D.y,D.z,D.w):je.set(D,k,j,q),pe.scissor(V.copy(je).multiplyScalar($).round())},this.getScissorTest=function(){return ct},this.setScissorTest=function(D){pe.setScissorTest(ct=D)},this.setOpaqueSort=function(D){ce=D},this.setTransparentSort=function(D){ye=D},this.getClearColor=function(D){return D.copy(Qe.getClearColor())},this.setClearColor=function(){Qe.setClearColor.apply(Qe,arguments)},this.getClearAlpha=function(){return Qe.getClearAlpha()},this.setClearAlpha=function(){Qe.setClearAlpha.apply(Qe,arguments)},this.clear=function(D=!0,k=!0,j=!0){let q=0;if(D){let U=!1;if(null!==I){const he=I.texture.format;U=1033===he||1031===he||1029===he}if(U){const he=I.texture.type,be=he===qs||he===Io||he===ah||he===$l||1017===he||1018===he,Fe=Qe.getClearColor(),Oe=Qe.getClearAlpha(),it=Fe.r,ut=Fe.g,Ye=Fe.b;be?(p[0]=it,p[1]=ut,p[2]=Ye,p[3]=Oe,L.clearBufferuiv(L.COLOR,0,p)):(_[0]=it,_[1]=ut,_[2]=Ye,_[3]=Oe,L.clearBufferiv(L.COLOR,0,_))}else q|=L.COLOR_BUFFER_BIT}k&&(q|=L.DEPTH_BUFFER_BIT),j&&(q|=L.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),L.clear(q)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",se,!1),t.removeEventListener("webglcontextrestored",Ae,!1),t.removeEventListener("webglcontextcreationerror",Ee,!1),Qe.dispose(),Ie.dispose(),Rt.dispose(),Se.dispose(),E.dispose(),W.dispose(),te.dispose(),ln.dispose(),N.dispose(),Ve.dispose(),K.dispose(),K.removeEventListener("sessionstart",FR),K.removeEventListener("sessionend",NR),ja.stop()},this.renderBufferDirect=function(D,k,j,q,U,he){null===k&&(k=Dt);const be=U.isMesh&&U.matrixWorld.determinant()<0,Fe=function hK(D,k,j,q,U){!0!==k.isScene&&(k=Dt),O.resetTextureUnits();const he=k.fog,Fe=null===I?b.outputColorSpace:!0===I.isXRRenderTarget?I.texture.colorSpace:Kl,Oe=(q.isMeshStandardMaterial?W:E).get(q.envMap||(q.isMeshStandardMaterial?k.environment:null)),it=!0===q.vertexColors&&!!j.attributes.color&&4===j.attributes.color.itemSize,ut=!!j.attributes.tangent&&(!!q.normalMap||q.anisotropy>0),Ye=!!j.morphAttributes.position,Lt=!!j.morphAttributes.normal,Yt=!!j.morphAttributes.color;let bn=0;q.toneMapped&&(null===I||!0===I.isXRRenderTarget)&&(bn=b.toneMapping);const An=j.morphAttributes.position||j.morphAttributes.normal||j.morphAttributes.color,Ut=void 0!==An?An.length:0,Xe=Se.get(q),ci=m.state.lights;!0!==ie||!0!==Te&&D===M||fe.setState(q,D,D===M&&q.id===w);let zt=!1;q.version===Xe.__version?(Xe.needsLights&&Xe.lightsStateVersion!==ci.state.version||Xe.outputColorSpace!==Fe||U.isBatchedMesh&&!1===Xe.batching||!U.isBatchedMesh&&!0===Xe.batching||U.isBatchedMesh&&!0===Xe.batchingColor&&null===U.colorTexture||U.isBatchedMesh&&!1===Xe.batchingColor&&null!==U.colorTexture||U.isInstancedMesh&&!1===Xe.instancing||!U.isInstancedMesh&&!0===Xe.instancing||U.isSkinnedMesh&&
1!1===Xe.skinning||!U.isSkinnedMesh&&!0===Xe.skinning||U.isInstancedMesh&&!0===Xe.instancingColor&&null===U.instanceColor||U.isInstancedMesh&&!1===Xe.instancingColor&&null!==U.instanceColor||U.isInstancedMesh&&!0===Xe.instancingMorph&&null===U.morphTexture||U.isInstancedMesh&&!1===Xe.instancingMorph&&null!==U.morphTexture||Xe.envMap!==Oe||!0===q.fog&&Xe.fog!==he||void 0!==Xe.numClippingPlanes&&(Xe.numClippingPlanes!==fe.numPlanes||Xe.numIntersection!==fe.numIntersection)||Xe.vertexAlphas!==it||Xe.vertexTangents!==ut||Xe.morphTargets!==Ye||Xe.morphNormals!==Lt||Xe.morphColors!==Yt||Xe.toneMapping!==bn||Xe.morphTargetsCount!==Ut)&&(zt=!0):(zt=!0,Xe.__version=q.version);let ns=Xe.currentProgram;!0===zt&&(ns=Um(q,k,U));let zc=!1,yr=!1,jh=!1;const mn=ns.getUniforms(),Rr=Xe.uniforms;if(pe.useProgram(ns.program)&&(zc=!0,yr=!0,jh=!0),q.id!==w&&(w=q.id,yr=!0),zc||M!==D){pe.buffers.depth.getReversed()?(de.copy(D.projectionMatrix),function X9(n){const e=n.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}(de),function Z9(n){const e=n.elements;-1===e[11]?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=1-e[14])}(de),mn.setValue(L,"projectionMatrix",de)):mn.setValue(L,"projectionMatrix",D.projectionMatrix),mn.setValue(L,"viewMatrix",D.matrixWorldInverse);const nr=mn.map.cameraPosition;void 0!==nr&&nr.setValue(L,Mt.setFromMatrixPosition(D.matrixWorld)),Re.logarithmicDepthBuffer&&mn.setValue(L,"logDepthBufFC",2/(Math.log(D.far+1)/Math.LN2)),(q.isMeshPhongMaterial||q.isMeshToonMaterial||q.isMeshLambertMaterial||q.isMeshBasicMaterial||q.isMeshStandardMaterial||q.isShaderMaterial)&&mn.setValue(L,"isOrthographic",!0===D.isOrthographicCamera),M!==D&&(M=D,yr=!0,jh=!0)}if(U.isSkinnedMesh){mn.setOptional(L,U,"bindMatrix"),mn.setOptional(L,U,"bindMatrixInverse");const zi=U.skeleton;zi&&(null===zi.boneTexture&&zi.computeBoneTexture(),mn.setValue(L,"boneTexture",zi.boneTexture,O))}U.isBatchedMesh&&(mn.setOptional(L,U,"batchingTexture"),mn.setValue(L,"batchingTexture",U._matricesTexture,O),mn.setOptional(L,U,"batchingIdTexture"),mn.setValue(L,"batchingIdTexture",U._indirectTexture,O),mn.setOptional(L,U,"batchingColorTexture"),null!==U._colorsTexture&&mn.setValue(L,"batchingColorTexture",U._colorsTexture,O));const Or=j.morphAttributes;if((void 0!==Or.position||void 0!==Or.normal||void 0!==Or.color)&&nt.update(U,j,ns),(yr||Xe.receiveShadow!==U.receiveShadow)&&(Xe.receiveShadow=U.receiveShadow,mn.setValue(L,"receiveShadow",U.receiveShadow)),q.isMeshGouraudMaterial&&null!==q.envMap&&(Rr.envMap.value=Oe,Rr.flipEnvMap.value=Oe.isCubeTexture&&!1===Oe.isRenderTargetTexture?-1:1),q.isMeshStandardMaterial&&null===q.envMap&&null!==k.environment&&(Rr.envMapIntensity.value=k.environmentIntensity),yr&&(mn.setValue(L,"toneMappingExposure",b.toneMappingExposure),Xe.needsLights&&function dK(D,k){D.ambientLightColor.needsUpdate=k,D.lightProbe.needsUpdate=k,D.directionalLights.needsUpdate=k,D.directionalLightShadows.needsUpdate=k,D.pointLights.needsUpdate=k,D.pointLightShadows.needsUpdate=k,D.spotLights.needsUpdate=k,D.spotLightShadows.needsUpdate=k,D.rectAreaLights.needsUpdate=k,D.hemisphereLights.needsUpdate=k}(Rr,jh),he&&!0===q.fog&&xe.refreshFogUniforms(Rr,he),xe.refreshMaterialUniforms(Rr,q,$,ee,m.state.transmissionRenderTarget[D.id]),vm.upload(L,VR(Xe),Rr,O)),q.isShaderMaterial&&!0===q.uniformsNeedUpdate&&(vm.upload(L,VR(Xe),Rr,O),q.uniformsNeedUpdate=!1),q.isSpriteMaterial&&mn.setValue(L,"center",U.center),mn.setValue(L,"modelViewMatrix",U.modelViewMatrix),mn.setValue(L,"normalMatrix",U.normalMatrix),mn.setValue(L,"modelMatrix",U.matrixWorld),q.isShaderMaterial||q.isRawShaderMaterial){const zi=q.uniformsGroups;for(let nr=0,jb=zi.length;nr<jb;nr++){const $a=zi[nr];N.update($a,ns),N.bind($a,ns)}}return ns}(D,k,j,q,U);pe.setMaterial(q,be);let Oe=j.index,it=1;
vendor: 3,283 bytes, line 1
1if(!0===q.wireframe){if(Oe=ae.getWireframeAttribute(j),void 0===Oe)return;it=2}const ut=j.drawRange,Ye=j.attributes.position;let Lt=ut.start*it,Yt=(ut.start+ut.count)*it;null!==he&&(Lt=Math.max(Lt,he.start*it),Yt=Math.min(Yt,(he.start+he.count)*it)),null!==Oe?(Lt=Math.max(Lt,0),Yt=Math.min(Yt,Oe.count)):null!=Ye&&(Lt=Math.max(Lt,0),Yt=Math.min(Yt,Ye.count));const bn=Yt-Lt;if(bn<0||bn===1/0)return;ln.setup(U,q,Fe,j,Oe);let An,Ut=Ue;if(null!==Oe&&(An=Q.get(Oe),Ut=kt,Ut.setIndex(An)),U.isMesh)!0===q.wireframe?(pe.setLineWidth(q.wireframeLinewidth*re()),Ut.setMode(L.LINES)):Ut.setMode(L.TRIANGLES);else if(U.isLine){let Xe=q.linewidth;void 0===Xe&&(Xe=1),pe.setLineWidth(Xe*re()),Ut.setMode(U.isLineSegments?L.LINES:U.isLineLoop?L.LINE_LOOP:L.LINE_STRIP)}else U.isPoints?Ut.setMode(L.POINTS):U.isSprite&&Ut.setMode(L.TRIANGLES);if(U.isBatchedMesh)if(null!==U._multiDrawInstances)Ut.renderMultiDrawInstances(U._multiDrawStarts,U._multiDrawCounts,U._multiDrawCount,U._multiDrawInstances);else if(ue.get("WEBGL_multi_draw"))Ut.renderMultiDraw(U._multiDrawStarts,U._multiDrawCounts,U._multiDrawCount);else{const Xe=U._multiDrawStarts,ci=U._multiDrawCounts,zt=U._multiDrawCount,ns=Oe?Q.get(Oe).bytesPerElement:1,zc=Se.get(q).currentProgram.getUniforms();for(let yr=0;yr<zt;yr++)zc.setValue(L,"_gl_DrawID",yr),Ut.render(Xe[yr]/ns,ci[yr])}else if(U.isInstancedMesh)Ut.renderInstances(Lt,bn,U.count);else if(j.isInstancedBufferGeometry){const ci=Math.min(j.instanceCount,void 0!==j._maxInstanceCount?j._maxInstanceCount:1/0);Ut.renderInstances(Lt,bn,ci)}else Ut.render(Lt,bn)},this.compile=function(D,k,j=null){null===j&&(j=D),m=Rt.get(j),m.init(k),y.push(m),j.traverseVisible(function(U){U.isLight&&U.layers.test(k.layers)&&(m.pushLight(U),U.castShadow&&m.pushShadow(U))}),D!==j&&D.traverseVisible(function(U){U.isLight&&U.layers.test(k.layers)&&(m.pushLight(U),U.castShadow&&m.pushShadow(U))}),m.setupLights();const q=new Set;return D.traverse(function(U){if(!(U.isMesh||U.isPoints||U.isLine||U.isSprite))return;const he=U.material;if(he)if(Array.isArray(he))for(let be=0;be<he.length;be++){const Fe=he[be];qt(Fe,j,U),q.add(Fe)}else qt(he,j,U),q.add(he)}),y.pop(),m=null,q},this.compileAsync=function(D,k,j=null){const q=this.compile(D,k,j);return new Promise(U=>{function he(){q.forEach(function(be){Se.get(be).currentProgram.isReady()&&q.delete(be)}),0!==q.size?setTimeout(he,10):U(D)}null!==ue.get("KHR_parallel_shader_compile")?he():setTimeout(he,10)})};let ts=null;function FR(){ja.stop()}function NR(){ja.start()}const ja=new CI;function Wb(D,k,j,q){if(!1===D.visible)return;if(D.layers.test(k.layers))if(D.isGroup)j=D.renderOrder;else if(D.isLOD)!0===D.autoUpdate&&D.update(k);else if(D.isLight)m.pushLight(D),D.castShadow&&m.pushShadow(D);else if(D.isSprite){if(!D.frustumCulled||Z.intersectsSprite(D)){q&&Ne.setFromMatrixPosition(D.matrixWorld).applyMatrix4(Be);const be=te.update(D),Fe=D.material;Fe.visible&&g.push(D,be,Fe,j,Ne.z,null)}}else if((D.isMesh||D.isLine||D.isPoints)&&(!D.frustumCulled||Z.intersectsObject(D))){const be=te.update(D),Fe=D.material;if(q&&(void 0!==D.boundingSphere?(null===D.boundingSphere&&D.computeBoundingSphere(),Ne.copy(D.boundingSphere.center)):(null===be.boundingSphere&&be.computeBoundingSphere(),Ne.copy(be.boundingSphere.center)),Ne.applyM
vendor: 14,094 bytes, line 1
1atrix4(D.matrixWorld).applyMatrix4(Be)),Array.isArray(Fe)){const Oe=be.groups;for(let it=0,ut=Oe.length;it<ut;it++){const Ye=Oe[it],Lt=Fe[Ye.materialIndex];Lt&&Lt.visible&&g.push(D,be,Lt,j,Ne.z,Ye)}}else Fe.visible&&g.push(D,be,Fe,j,Ne.z,null)}const he=D.children;for(let be=0,Fe=he.length;be<Fe;be++)Wb(he[be],k,j,q)}function kR(D,k,j,q){const U=D.opaque,he=D.transmissive,be=D.transparent;m.setupLightsView(j),!0===ie&&fe.setGlobalState(b.clippingPlanes,j),q&&pe.viewport(F.copy(q)),U.length>0&&km(U,k,j),he.length>0&&km(he,k,j),be.length>0&&km(be,k,j),pe.buffers.depth.setTest(!0),pe.buffers.depth.setMask(!0),pe.buffers.color.setMask(!0),pe.setPolygonOffset(!1)}function UR(D,k,j,q){if(null!==(!0===j.isScene?j.overrideMaterial:null))return;void 0===m.state.transmissionRenderTarget[q.id]&&(m.state.transmissionRenderTarget[q.id]=new Ma(1,1,{generateMipmaps:!0,type:ue.has("EXT_color_buffer_half_float")||ue.has("EXT_color_buffer_float")?lh:qs,minFilter:$s,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:vt.workingColorSpace}));const he=m.state.transmissionRenderTarget[q.id],be=q.viewport||F;he.setSize(be.z*b.transmissionResolutionScale,be.w*b.transmissionResolutionScale);const Fe=b.getRenderTarget();b.setRenderTarget(he),b.getClearColor(H),X=b.getClearAlpha(),X<1&&b.setClearColor(16777215,.5),b.clear(),le&&Qe.render(j);const Oe=b.toneMapping;b.toneMapping=0;const it=q.viewport;if(void 0!==q.viewport&&(q.viewport=void 0),m.setupLightsView(q),!0===ie&&fe.setGlobalState(b.clippingPlanes,q),km(D,j,q),O.updateMultisampleRenderTarget(he),O.updateRenderTargetMipmap(he),!1===ue.has("WEBGL_multisampled_render_to_texture")){let ut=!1;for(let Ye=0,Lt=k.length;Ye<Lt;Ye++){const Yt=k[Ye],bn=Yt.object,An=Yt.geometry,Ut=Yt.material,Xe=Yt.group;if(2===Ut.side&&bn.layers.test(q.layers)){const ci=Ut.side;Ut.side=1,Ut.needsUpdate=!0,BR(bn,j,q,An,Ut,Xe),Ut.side=ci,Ut.needsUpdate=!0,ut=!0}}!0===ut&&(O.updateMultisampleRenderTarget(he),O.updateRenderTargetMipmap(he))}b.setRenderTarget(Fe),b.setClearColor(H,X),void 0!==it&&(q.viewport=it),b.toneMapping=Oe}function km(D,k,j){const q=!0===k.isScene?k.overrideMaterial:null;for(let U=0,he=D.length;U<he;U++){const be=D[U],Fe=be.object,Oe=be.geometry,it=null===q?be.material:q,ut=be.group;Fe.layers.test(j.layers)&&BR(Fe,k,j,Oe,it,ut)}}function BR(D,k,j,q,U,he){D.onBeforeRender(b,k,j,q,U,he),D.modelViewMatrix.multiplyMatrices(j.matrixWorldInverse,D.matrixWorld),D.normalMatrix.getNormalMatrix(D.modelViewMatrix),U.onBeforeRender(b,k,j,q,D,he),!0===U.transparent&&2===U.side&&!1===U.forceSinglePass?(U.side=1,U.needsUpdate=!0,b.renderBufferDirect(j,k,q,U,D,he),U.side=0,U.needsUpdate=!0,b.renderBufferDirect(j,k,q,U,D,he),U.side=2):b.renderBufferDirect(j,k,q,U,D,he),D.onAfterRender(b,k,j,q,U,he)}function Um(D,k,j){!0!==k.isScene&&(k=Dt);const q=Se.get(D),U=m.state.lights,be=U.state.version,Fe=Ve.getParameters(D,U.state,m.state.shadowsArray,k,j),Oe=Ve.getProgramCacheKey(Fe);let it=q.programs;q.environment=D.isMeshStandardMaterial?k.environment:null,q.fog=k.fog,q.envMap=(D.isMeshStandardMaterial?W:E).get(D.envMap||q.environment),q.envMapRotation=null!==q.environment&&null===D.envMap?k.environmentRotation:D.envMapRotation,void 0===it&&(D.addEventListener("dispose",yt),it=new Map,q.programs=it);let ut=it.get(Oe);if(void 0!==ut){if(q.currentProgram===ut&&q.lightsStateVersion===be)return zR(D,Fe),ut}else Fe.uniforms=Ve.getUniforms(D),D.onBeforeCompile(Fe,b),ut=Ve.acquireProgram(Fe,Oe),it.set(Oe,ut),q.uniforms=Fe.uniforms;const Ye=q.uniforms;return(!D.isShaderMaterial&&!D.isRawShaderMaterial||!0===D.clipping)&&(Ye.clippingPlanes=fe.uniform),zR(D,Fe),q.needsLights=function fK(D){return D.isMeshLambertMaterial||D.isMeshToonMaterial||D.isMeshPhongMaterial||D.isMeshStandardMaterial||D.isShadowMaterial||D.isShaderMaterial&&!0===D.lights}(D),q.lightsStateVersion=be,q.needsLights&&(Ye.ambientLightColor.value=U.state.ambient,Ye.lightProbe.value=U.state.probe,Ye.directionalLights.value=U.state.directional,Ye.directionalLightShadows.value=U.state.directionalShadow,Ye.spotLights.value=U.state.spot,Ye.spotLightShadows.value=U.state.spotShadow,Ye.rectAreaLights.value=U.state.rectArea,Ye.ltc_1.value=U.state.rectAreaLTC1,Ye.ltc_2.value=U.state.rectAreaLTC2,Ye.pointLights.value=U.state.point,Ye.pointLightShadows.value=U.state.pointShadow,Ye.hemisphereLights.value=U.state.hemi,Ye.directionalShadowMap.value=U.state.directionalShadowMap,Ye.directionalShadowMatrix.value=U.state.directionalShadowMatrix,Ye.spotShadowMap.value=U.state.spotShadowMap,Ye.spotLightMatrix.value=U.state.spotLightMatrix,Ye.spotLightMap.value=U.state.spotLightMap,Ye.pointShadowMap.value=U.state.pointShadowMap,Ye.pointShadowMatrix.value=U.state.pointShadowMatrix),q.currentProgram=ut,q.uniformsList=null,ut}function VR(D){if(null===D.uniformsList){const k=D.currentProgram.getUniforms();D.uniformsList=vm.seqWithValue(k.seq,D.uniforms)}return D.uniformsList}function zR(D,k){const j=Se.get(D);j.outputColorSpace=k.outputColorSpace,j.batching=k.batching,j.batchingColor=k.batchingColor,j.instancing=k.instancing,j.instancingColor=k.instancingColor,j.instancingMorph=k.instancingMorph,j.skinning=k.skinning,j.morphTargets=k.morphTargets,j.morphNormals=k.morphNormals,j.morphColors=k.morphColors,j.morphTargetsCount=k.morphTargetsCount,j.numClippingPlanes=k.numClippingPlanes,j.numIntersection=k.numClipIntersection,j.vertexAlphas=k.vertexAlphas,j.vertexTangents=k.vertexTangents,j.toneMapping=k.toneMapping}ja.setAnimationLoop(function so(D){ts&&ts(D)}),"undefined"!=typeof self&&ja.setContext(self),this.setAnimationLoop=function(D){ts=D,K.setAnimationLoop(D),null===D?ja.stop():ja.start()},K.addEventListener("sessionstart",FR),K.addEventListener("sessionend",NR),this.render=function(D,k){if(void 0!==k&&!0!==k.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===T)return;if(!0===D.matrixWorldAutoUpdate&&D.updateMatrixWorld(),null===k.parent&&!0===k.matrixWorldAutoUpdate&&k.updateMatrixWorld(),!0===K.enabled&&!0===K.isPresenting&&(!0===K.cameraAutoUpdate&&K.updateCamera(k),k=K.getCamera()),!0===D.isScene&&D.onBeforeRender(b,D,k,I),m=Rt.get(D,y.length),m.init(k),y.push(m),Be.multiplyMatrices(k.projectionMatrix,k.matrixWorldInverse),Z.setFromProjectionMatrix(Be),Te=this.localClippingEnabled,ie=fe.init(this.clippingPlanes,Te),g=Ie.get(D,v.length),g.init(),v.push(g),!0===K.enabled&&!0===K.isPresenting){const he=b.xr.getDepthSensingMesh();null!==he&&Wb(he,k,-1/0,b.sortObjects)}Wb(D,k,0,b.sortObjects),g.finish(),!0===b.sortObjects&&g.sort(ce,ye),le=!1===K.enabled||!1===K.isPresenting||!1===K.hasDepthSensing(),le&&Qe.addToRenderList(g,D),this.info.render.frame++,!0===ie&&fe.beginShadows(),ke.render(m.state.shadowsArray,D,k),!0===ie&&fe.endShadows(),!0===this.info.autoReset&&this.info.reset();const q=g.opaque,U=g.transmissive;if(m.setupLights(),k.isArrayCamera){const he=k.cameras;if(U.length>0)for(let be=0,Fe=he.length;be<Fe;be++)UR(q,U,D,he[be]);le&&Qe.render(D);for(let be=0,Fe=he.length;be<Fe;be++){const Oe=he[be];kR(g,D,Oe,Oe.viewport)}}else U.length>0&&UR(q,U,D,k),le&&Qe.render(D),kR(g,D,k);null!==I&&0===P&&(O.updateMultisampleRenderTarget(I),O.updateRenderTargetMipmap(I)),!0===D.isScene&&D.onAfterRender(b,D,k),ln.resetDefaultState(),w=-1,M=null,y.pop(),y.length>0?(m=y[y.length-1],!0===ie&&fe.setGlobalState(b.clippingPlanes,m.state.camera)):m=null,v.pop(),g=v.length>0?v[v.length-1]:null},this.getActiveCubeFace=function(){return S},this.getActiveMipmapLevel=function(){return P},this.getRenderTarget=function(){return I},this.setRenderTargetTextures=function(D,k,j){Se.get(D.texture).__webglTexture=k,Se.get(D.depthTexture).__webglTexture=j;const q=Se.get(D);q.__hasExternalTextures=!0,q.__autoAllocateDepthBuffer=void 0===j,q.__autoAllocateDepthBuffer||!0===ue.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),q.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(D,k){const j=Se.get(D);j.__webglFramebuffer=k,j.__useDefaultFramebuffer=void 0===k};const pK=L.createFramebuffer();this.setRenderTarget=function(D,k=0,j=0){I=D,S=k,P=j;let q=!0,U=null,he=!1,be=!1;if(D){const Oe=Se.get(D);if(void 0!==Oe.__useDefaultFramebuffer)pe.bindFramebuffer(L.FRAMEBUFFER,null),q=!1;else if(void 0===Oe.__webglFramebuffer)O.setupRenderTarget(D);else if(Oe.__hasExternalTextures)O.rebindTextures(D,Se.get(D.texture).__webglTexture,Se.get(D.depthTexture).__webglTexture);else if(D.depthBuffer){const Ye=D.depthTexture;if(Oe.__boundDepthTexture!==Ye){if(null!==Ye&&Se.has(Ye)&&(D.width!==Ye.image.width||D.height!==Ye.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");O.setupDepthRenderbuffer(D)}}const it=D.texture;(it.isData3DTexture||it.isDataArrayTexture||it.isCompressedArrayTexture)&&(be=!0);const ut=Se.get(D).__webglFramebuffer;D.isWebGLCubeRenderTarget?(U=Array.isArray(ut[k])?ut[k][j]:ut[k],he=!0):U=D.samples>0&&!1===O.useMultisampledRTT(D)?Se.get(D).__webglMultisampledFramebuffer:Array.isArray(ut)?ut[j]:ut,F.copy(D.viewport),V.copy(D.scissor),z=D.scissorTest}else F.copy(_e).multiplyScalar($).floor(),V.copy(je).multiplyScalar($).floor(),z=ct;if(0!==j&&(U=pK),pe.bindFramebuffer(L.FRAMEBUFFER,U)&&q&&pe.drawBuffers(D,U),pe.viewport(F),pe.scissor(V),pe.setScissorTest(z),he){const Oe=Se.get(D.texture);L.framebufferTexture2D(L.FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_CUBE_MAP_POSITIVE_X+k,Oe.__webglTexture,j)}else if(be){const Oe=Se.get(D.texture);L.framebufferTextureLayer(L.FRAMEBUFFER,L.COLOR_ATTACHMENT0,Oe.__webglTexture,j,k)}else if(null!==D&&0!==j){const Oe=Se.get(D.texture);L.framebufferTexture2D(L.FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_2D,Oe.__webglTexture,j)}w=-1},this.readRenderTargetPixels=function(D,k,j,q,U,he,be){if(!D||!D.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Fe=Se.get(D).__webglFramebuffer;if(D.isWebGLCubeRenderTarget&&void 0!==be&&(Fe=Fe[be]),Fe){pe.bindFramebuffer(L.FRAMEBUFFER,Fe);try{const Oe=D.texture,it=Oe.format,ut=Oe.type;if(!Re.textureFormatReadable(it))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!Re.textureTypeReadable(ut))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");k>=0&&k<=D.width-q&&j>=0&&j<=D.height-U&&L.readPixels(k,j,q,U,xt.convert(it),xt.convert(ut),he)}finally{const Oe=null!==I?Se.get(I).__webglFramebuffer:null;pe.bindFramebuffer(L.FRAMEBUFFER,Oe)}}},this.readRenderTargetPixelsAsync=function(){var D=MI(function*(k,j,q,U,he,be,Fe){if(!k||!k.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Oe=Se.get(k).__webglFramebuffer;if(k.isWebGLCubeRenderTarget&&void 0!==Fe&&(Oe=Oe[Fe]),Oe){const it=k.texture,ut=it.format,Ye=it.type;if(!Re.textureFormatReadable(ut))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Re.textureTypeReadable(Ye))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(j>=0&&j<=k.width-U&&q>=0&&q<=k.height-he){pe.bindFramebuffer(L.FRAMEBUFFER,Oe);const Lt=L.createBuffer();L.bindBuffer(L.PIXEL_PACK_BUFFER,Lt),L.bufferData(L.PIXEL_PACK_BUFFER,be.byteLength,L.STREAM_READ),L.readPixels(j,q,U,he,xt.convert(ut),xt.convert(Ye),0);const Yt=null!==I?Se.get(I).__webglFramebuffer:null;pe.bindFramebuffer(L.FRAMEBUFFER,Yt);const bn=L.fenceSync(L.SYNC_GPU_COMMANDS_COMPLETE,0);return L.flush(),yield function Y9(n,e,t){return new Promise(function(i,r){setTimeout(function s(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:r();break;case n.TIMEOUT_EXPIRED:setTimeout(s,t);break;default:i()}},t)})}(L,bn,4),L.bindBuffer(L.PIXEL_PACK_BUFFER,Lt),L.getBufferSubData(L.PIXEL_PACK_BUFFER,0,be),L.deleteBuffer(Lt),L.deleteSync(bn),be}throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}});return function(k,j,q,U,he,be,Fe){return D.apply(this,arguments)}}(),this.copyFramebufferToTexture=function(D,k=null,j=0){!0!==D.isTexture&&(tc("WebGLRenderer: copyFramebufferToTexture function signature has changed."),k=arguments[0]||null,D=arguments[1]);const q=Math.pow(2,-j),U=Math.floor(D.image.width*q),he=Math.floor(D.image.height*q),be=null!==k?k.x:0,Fe=null!==k?k.y:0;O.setTexture2D(D,0),L.copyTexSubImage2D(L.TEXTURE_2D,j,0,0,be,Fe,U,he),pe.unbindTexture()};const mK=L.createFramebuffer(),gK=L.createFramebuffer();this.copyTextureToTexture=function(D,k,j=null,q=null,U=0,he=null){let be,Fe,Oe,it,ut,Ye,Lt,Yt,bn;!0!==D.isTexture&&(tc("WebGLRenderer: copyTextureToTexture function signature has changed."),q=arguments[0]||null,D=arguments[1],k=arguments[2],he=arguments[3]||0,j=null),null===he&&(0!==U?(tc("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),he=U,U=0):he=0);const An=D.isCompressedTexture?D.mipmaps[he]:D.image;if(null!==j)be=j.max.x-j.min.x,Fe=j.max.y-j.min.y,Oe=j.isBox3?j.max.z-j.min.z:1,it=j.min.x,ut=j.min.y,Ye=j.isBox3?j.min.z:0;else{const Or=Math.pow(2,-U);be=Math.floor(An.width*Or),Fe=Math.floor(An.height*Or),Oe=D.isDataArrayTexture?An.depth:D.isData3DTexture?Math.floor(An.depth*Or):1,it=0,ut=0,Ye=0}null!==q?(Lt=q.x,Yt=q.y,bn=q.z):(Lt=0,Yt=0,bn=0);const Ut=xt.convert(k.format),Xe=xt.convert(k.type);let ci;k.isData3DTexture?(O.setTexture3D(k,0),ci=L.TEXTURE_3D):k.isDataArrayTexture||k.isCompressedArrayTexture?(O.setTexture2DArray(k,0),ci=L.TEXTURE_2D_ARRAY):(O.setTexture2D(k,0),ci=L.TEXTURE_2D),L.pixelStorei(L.UNPACK_FLIP_Y_WEBGL,k.flipY),L.pixelStorei(L.UNPACK_PREMULTIPLY_ALPHA_WEBGL,k.premultiplyAlpha),L.pixelStorei(L.UNPACK_ALIGNMENT,k.unpackAlignment);
1const zt=L.getParameter(L.UNPACK_ROW_LENGTH),ns=L.getParameter(L.UNPACK_IMAGE_HEIGHT),zc=L.getParameter(L.UNPACK_SKIP_PIXELS),yr=L.getParameter(L.UNPACK_SKIP_ROWS),jh=L.getParameter(L.UNPACK_SKIP_IMAGES);L.pixelStorei(L.UNPACK_ROW_LENGTH,An.width),L.pixelStorei(L.UNPACK_IMAGE_HEIGHT,An.height),L.pixelStorei(L.UNPACK_SKIP_PIXELS,it),L.pixelStorei(L.UNPACK_SKIP_ROWS,ut),L.pixelStorei(L.UNPACK_SKIP_IMAGES,Ye);const mn=D.isDataArrayTexture||D.isData3DTexture,Rr=k.isDataArrayTexture||k.isData3DTexture;if(D.isDepthTexture){const Or=Se.get(D),zi=Se.get(k),nr=Se.get(Or.__renderTarget),jb=Se.get(zi.__renderTarget);pe.bindFramebuffer(L.READ_FRAMEBUFFER,nr.__webglFramebuffer),pe.bindFramebuffer(L.DRAW_FRAMEBUFFER,jb.__webglFramebuffer);for(let $a=0;$a<Oe;$a++)mn&&(L.framebufferTextureLayer(L.READ_FRAMEBUFFER,L.COLOR_ATTACHMENT0,Se.get(D).__webglTexture,U,Ye+$a),L.framebufferTextureLayer(L.DRAW_FRAMEBUFFER,L.COLOR_ATTACHMENT0,Se.get(k).__webglTexture,he,bn+$a)),L.blitFramebuffer(it,ut,be,Fe,Lt,Yt,be,Fe,L.DEPTH_BUFFER_BIT,L.NEAREST);pe.bindFramebuffer(L.READ_FRAMEBUFFER,null),pe.bindFramebuffer(L.DRAW_FRAMEBUFFER,null)}else if(0!==U||D.isRenderTargetTexture||Se.has(D)){const Or=Se.get(D),zi=Se.get(k);pe.bindFramebuffer(L.READ_FRAMEBUFFER,mK),pe.bindFramebuffer(L.DRAW_FRAMEBUFFER,gK);for(let nr=0;nr<Oe;nr++)mn?L.framebufferTextureLayer(L.READ_FRAMEBUFFER,L.COLOR_ATTACHMENT0,Or.__webglTexture,U,Ye+nr):L.framebufferTexture2D(L.READ_FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_2D,Or.__webglTexture,U),Rr?L.framebufferTextureLayer(L.DRAW_FRAMEBUFFER,L.COLOR_ATTACHMENT0,zi.__webglTexture,he,bn+nr):L.framebufferTexture2D(L.DRAW_FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_2D,zi.__webglTexture,he),0!==U?L.blitFramebuffer(it,ut,be,Fe,Lt,Yt,be,Fe,L.COLOR_BUFFER_BIT,L.NEAREST):Rr?L.copyTexSubImage3D(ci,he,Lt,Yt,bn+nr,it,ut,be,Fe):L.copyTexSubImage2D(ci,he,Lt,Yt,it,ut,be,Fe);pe.bindFramebuffer(L.READ_FRAMEBUFFER,null),pe.bindFramebuffer(L.DRAW_FRAMEBUFFER,null)}else Rr?D.isDataTexture||D.isData3DTexture?L.texSubImage3D(ci,he,Lt,Yt,bn,be,Fe,Oe,Ut,Xe,An.data):k.isCompressedArrayTexture?L.compressedTexSubImage3D(ci,he,Lt,Yt,bn,be,Fe,Oe,Ut,An.data):L.texSubImage3D(ci,he,Lt,Yt,bn,be,Fe,Oe,Ut,Xe,An):D.isDataTexture?L.texSubImage2D(L.TEXTURE_2D,he,Lt,Yt,be,Fe,Ut,Xe,An.data):D.isCompressedTexture?L.compressedTexSubImage2D(L.TEXTURE_2D,he,Lt,Yt,An.width,An.height,Ut,An.data):L.texSubImage2D(L.TEXTURE_2D,he,Lt,Yt,be,Fe,Ut,Xe,An);L.pixelStorei(L.UNPACK_ROW_LENGTH,zt),L.pixelStorei(L.UNPACK_IMAGE_HEIGHT,ns),L.pixelStorei(L.UNPACK_SKIP_PIXELS,zc),L.pixelStorei(L.UNPACK_SKIP_ROWS,yr),L.pixelStorei(L.UNPACK_SKIP_IMAGES,jh),0===he&&k.generateMipmaps&&L.generateMipmap(ci),pe.unbindTexture()},this.copyTextureToTexture3D=function(D,k,j=null,q=null,U=0){return!0!==D.isTexture&&(tc("WebGLRenderer: copyTextureToTexture3D function signature has changed."),j=arguments[0]||null,q=arguments[1]||null,D=arguments[2],k=arguments[3],U=arguments[4]||0),tc('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(D,k,j,q,U)},this.initRenderTarget=function(D){void 0===Se.get(D).__webglFramebuffer&&O.setupRenderTarget(D)},this.initTexture=function(D){D.isCubeTexture?O.setTextureCube(D,0):D.isData3DTexture?O.setTexture3D(D,0):D.isDataArrayTexture||D.isCompressedArrayTexture?O.setTexture2DArray(D,0):O.setTexture2D(D,0),pe.unbindTexture()},this.resetState=function(){S=0,P=0,I=null,pe.reset(),ln.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Cs}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorspace=vt._getDrawingBufferColorSpace(e),t.unpackColorSpace=vt._getUnpackColorSpace()}}const QI={type:"change"},Eb={type:"start"},eR={type:"end"},bm=new lc,tR=new Vo,_X=Math.cos(70*vi_DEG2RAD),qn=new R,tr=2*Math.PI,Tb=1e-6;class vX extends hj{constructor(e,t=null){super(e,t),this.state=-1,this.enabled=!0,this.target=new R,this.cursor=new R,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LE
vendor: 4,412 bytes, line 1
1FT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:0,MIDDLE:1,RIGHT:2},this.touches={ONE:0,TWO:2},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new R,this._lastQuaternion=new vn,this._lastTargetPosition=new R,this._quat=(new vn).setFromUnitVectors(e.up,new R(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new hI,this._sphericalDelta=new hI,this._scale=1,this._panOffset=new R,this._rotateStart=new J,this._rotateEnd=new J,this._rotateDelta=new J,this._panStart=new J,this._panEnd=new J,this._panDelta=new J,this._dollyStart=new J,this._dollyEnd=new J,this._dollyDelta=new J,this._dollyDirection=new R,this._mouse=new J,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=bX.bind(this),this._onPointerDown=yX.bind(this),this._onPointerUp=xX.bind(this),this._onContextMenu=AX.bind(this),this._onMouseWheel=CX.bind(this),this._onKeyDown=SX.bind(this),this._onTouchStart=EX.bind(this),this._onTouchMove=TX.bind(this),this._onMouseDown=wX.bind(this),this._onMouseMove=MX.bind(this),this._interceptControlDown=DX.bind(this),this._interceptControlUp=PX.bind(this),null!==this.domElement&&this.connect(),this.update()}connect(){this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){null!==this._domElementKeyEvents&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(QI),this.update(),this.state=-1}update(e=null){const t=this.object.position;qn.copy(t).sub(this.target),qn.applyQuaternion(this._quat),this._spherical.setFromVector3(qn),this.autoRotate&&-1===this.state&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let i=this.minAzimuthAngle,r=this.maxAzimuthAngle;isFinite(i)&&isFinite(r)&&(i<-Math.PI?i+=tr:i>Math.PI&&(i-=tr),r<-Math.PI?r+=tr:r>Math.PI&&(r-=tr),this._spherical.theta=i<=r?Math.max(i,Math.min(r,this._spherical.theta)):this._spherical.theta>(i+r)/2?Math.max(i,this._spherical.theta):Math.min(r,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),!0===this.enableDamping?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radiu
1s=this._clampDistance(this._spherical.radius);else{const o=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=o!=this._spherical.radius}if(qn.setFromSpherical(this._spherical),qn.applyQuaternion(this._quatInverse),t.copy(this.target).add(qn),this.object.lookAt(this.target),!0===this.enableDamping?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let o=null;if(this.object.isPerspectiveCamera){const a=qn.length();o=this._clampDistance(a*this._scale);const l=a-o;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),s=!!l}else if(this.object.isOrthographicCamera){const a=new R(this._mouse.x,this._mouse.y,0);a.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=l!==this.object.zoom;const c=new R(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(a),this.object.updateMatrixWorld(),o=qn.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;null!==o&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position):(bm.origin.copy(this.object.position),bm.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(bm.direction))<_X?this.object.lookAt(this.target):(tR.setFromNormalAndCoplanarPoint(this.object.up,this.target),bm.intersectPlane(tR,this.target))))}else if(this.object.isOrthographicCamera){const o=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),o!==this.object.zoom&&(this.object.updateProjectionMatrix(),s=!0)}return this._scale=1,this._performCursorZoom=!1,!!(s||this._lastPosition.distanceToSquared(this.object.position)>Tb||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Tb||this._lastTargetPosition.distanceToSquared(this.target)>Tb)&&(this.dispatchEvent(QI),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0)}_getAutoRotationAngle(e){return null!==e?tr/60*this.autoRotateSpeed*e:tr/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(.01*e);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){qn.setFromMatrixColumn(t,0),qn.multiplyScalar(-e),this._panOffset.add(qn)}_panUp(e,t){!0===this.screenSpacePanning?qn.setFromMatrixColumn(t,1):(qn.setFromMatrixColumn(t,0),qn.crossVectors(this.object.up,qn)),qn.multiplyScalar(e),this._panOffset.add(qn)}_pan(e,t){const i=this.domElement;if(this.object.isPerspectiveCamera){qn.copy(this.object.position).sub(this.target);let s=qn.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*s/i.clientHeight,this.object.matrix),this._panUp(2*t*s/i.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/i.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/i.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const i=this.domElement.getBoundingClientRect(),s=t-i.top,a=i.height;this._mouse.x=(e-i.left)/i.width*2-1,this._mouse.y=-s/a*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(tr*this._rotateDelta.x/t.clientHeight),this._rotateUp(tr*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(tr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-tr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(tr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-tr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(1===this._pointers.length)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e);this._rotateStart.set(.5*(e.pageX+t.x),.5*(e.pageY+t.y))}}_handleTouchStartPan(e){if(1===this._pointers.length)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e);this._panStart.set(.5*(e.pageX+t.x),.5*(e.pageY+t.y))}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),i=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(i*i+r*r);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(1==this._pointers.length)this._rotateEnd.set(e.pageX,e.pageY);else{const i=this._getSecondPointerPosition(e);this._rotateEnd.set(.5*(e.pageX+i.x),.5*(e.pageY+i.y))}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(tr*this._rotateDelta.x/t.clientHeight),this._rotateUp(tr*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(1===this._pointers.length)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e);this._panEnd.set(.5*(e.pageX+t.x),.5*(e.pageY+t.y))}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),i=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(i*i+r*r);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd),this._updateZoomParameters(.5*(e.pageX+t.x),.5*(e.pageY+t.y))}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return void this._pointers.splice(t,1)}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];void 0===t&&(t=new J,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){return this._pointerPositions[e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0]]}_customWheelEvent(e){const i={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(e.deltaMode){case 1:i.deltaY*=16;break;case 2:i.deltaY*=100}return e.ctrlKey&&!this._controlActive&&(i.deltaY*=10),i}}function yX(n){!1!==this.enabled&&(0===this._pointers.length&&(this.domElement.setPointerCapture(n.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(n)&&(this._addPointer(n),"touch"===n.pointerType?this._onTouchStart(n):this._onMouseDown(n)))}function bX(n){!1!==this.enabled&&("touch"===n.pointerType?this._onTouchMove(n):this._onMouseMove(n))}function xX(n){switch(this._removePointer(n),this._pointers.length){case 0:this.domElement.releasePointerCapture(n.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(eR),this.state=-1;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y})}}function wX(n){let e;switch(n.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case 1:if(!1===this.enableZoom)return;this._handleMouseDownDolly(n),this.state=1;break;case 0:if(n.ctrlKey||n.metaKey||n.shiftKey){if(!1===this.enablePan)return;this._handleMouseDownPan(n),this.state=2}else{if(!1===this.enableRotate)return;this._handleMouseDownRotate(n),this.state=0}break;case 2:if(n.ctrlKey||n.metaKey||n.shiftKey){if(!1===this.enableRotate)return;this._handleMouseDownRotate(n),this.state=0}else{if(!1===this.enablePan)return;this._handleMouseDownPan(n),this.state=2}break;default:this.state=-1}-1!==this.state&&this.dispatchEvent(Eb)}function MX(n){switch(this.state){case 0:if(!1===this.enableRotate)return;this._handleMouseMoveRotate(n);break;case 1:if(!1===this.enableZoom)return;this._handleMouseMoveDolly(n);break;case 2:if(!1===this.enablePan)return;this._handleMouseMovePan(n)}}function CX(n){!1===this.enabled||!1===this.enableZoom||-1!==this.state||(n.preventDefault(),this.dispatchEvent(Eb),this._handleMouseWheel(this._customWheelEvent(n)),this.dispatchEvent(eR))}function SX(n){!1!==this.enabled&&this._handleKeyDown(n)}function EX(n){switch(this._trackPointer(n),this._pointers.length){case 1:switch(this.touches.ONE){case 0:if(!1===this.enableRotate)return;this._handleTouchStartRotate(n),this.state=3;break;case 1:if(!1===this.enablePan)return;this._handleTouchStartPan(n),this.state=4;break;default:this.state=-1}break;case 2:switch(this.touches.TWO){case 2:if(!1===this.enableZoom&&!1===this.enablePan)return;this._handleTouchStartDollyPan(n),this.state=5;break;case 3:if(!1===this.enableZoom&&!1===this.enableRotate)return;this._handleTouchStartDollyRotate(n),this.state=6;break;default:this.state=-1}break;default:this.state=-1}-1!==this.state&&this.dispatchEvent(Eb)}function TX(n){switch(this._trackPointer(n),this.state){case 3:if(!1===this.enableRotate)return;this._handleTouchMoveRotate(n),this.update();break;case 4:if(!1===this.enablePan)return;this._handleTouchMovePan(n),this.update();break;case 5:if(!1===this.enableZoom&&!1===this.enablePan)return;this._handleTouchMoveDollyPan(n),this.update();break;case 6:if(!1===this.enableZoom&&!1===this.enableRotate)return;this._handleTouchMoveDollyRotate(n),this.update();break;default:this.state=-1}}function AX(n){!1!==this.enabled&&n.preventDefault()}
1function DX(n){"Control"===n.key&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function PX(n){"Control"===n.key&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var $t=Uint8Array,Bi=Uint16Array,kh=Int32Array,Lc=new $t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Fc=new $t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Uh=new $t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),iR=function(n,e){for(var t=new Bi(31),i=0;i<31;++i)t[i]=e+=1<<n[i-1];var r=new kh(t[30]);for(i=1;i<30;++i)for(var s=t[i];s<t[i+1];++s)r[s]=s-t[i]<<5|i;return{b:t,r}},rR=iR(Lc,2),Ab=rR.b,xm=rR.r;Ab[28]=258,xm[258]=28;for(var oR=iR(Fc,0).b,Bh=new Bi(32768),cn=0;cn<32768;++cn){var Go=(43690&cn)>>1|(21845&cn)<<1;Bh[cn]=((65280&(Go=(61680&(Go=(52428&Go)>>2|(13107&Go)<<2))>>4|(3855&Go)<<4))>>8|(255&Go)<<8)>>1}var As=function(n,e,t){for(var i=n.length,r=0,s=new Bi(e);r<i;++r)n[r]&&++s[n[r]-1];var a,o=new Bi(e);for(r=1;r<e;++r)o[r]=o[r-1]+s[r-1]<<1;if(t){a=new Bi(1<<e);var l=15-e;for(r=0;r<i;++r)if(n[r])for(var c=r<<4|n[r],u=e-n[r],h=o[n[r]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)a[Bh[h]>>l]=c}else for(a=new Bi(i),r=0;r<i;++r)n[r]&&(a[r]=Bh[o[n[r]-1]++]>>15-n[r]);return a},Wo=new $t(288);for(cn=0;cn<144;++cn)Wo[cn]=8;for(cn=144;cn<256;++cn)Wo[cn]=9;for(cn=256;cn<280;++cn)Wo[cn]=7;for(cn=280;cn<288;++cn)Wo[cn]=8;var Vh=new $t(32);for(cn=0;cn<32;++cn)Vh[cn]=5;var lR=As(Wo,9,1),uR=As(Vh,5,1),wm=function(n){for(var e=n[0],t=1;t<n.length;++t)n[t]>e&&(e=n[t]);return e},Ir=function(n,e,t){var i=e/8|0;return(n[i]|n[i+1]<<8)>>(7&e)&t},Mm=function(n,e){var t=e/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(7&e)},zh=function(n){return(n+7)/8|0}
1,hR=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Nt=function(n,e,t){var i=new Error(e||hR[n]);if(i.code=n,Error.captureStackTrace&&Error.captureStackTrace(i,Nt),!t)throw i;return i},Cm=function(n,e,t,i){var r=n.length,s=i?i.length:0;if(!r||e.f&&!e.l)return t||new $t(0);var o=!t,a=o||2!=e.i,l=e.i;o&&(t=new $t(3*r));var c=function(Dt){var le=t.length;if(Dt>le){var re=new $t(Math.max(2*le,Dt));re.set(t),t=re}},u=e.f||0,h=e.p||0,d=e.b||0,f=e.l,p=e.d,_=e.m,g=e.n,m=8*r;do{if(!f){u=Ir(n,h,1);var v=Ir(n,h+1,3);if(h+=3,!v){var b=n[(y=zh(h)+4)-4]|n[y-3]<<8,T=y+b;if(T>r){l&&Nt(0);break}a&&c(d+b),t.set(n.subarray(y,T),d),e.b=d+=b,e.p=h=8*T,e.f=u;continue}if(1==v)f=lR,p=uR,_=9,g=5;else if(2==v){var S=Ir(n,h,31)+257,P=Ir(n,h+10,15)+4,I=S+Ir(n,h+5,31)+1;h+=14;for(var w=new $t(I),M=new $t(19),F=0;F<P;++F)M[Uh[F]]=Ir(n,h+3*F,7);h+=3*P;var V=wm(M),z=(1<<V)-1,H=As(M,V,1);for(F=0;F<I;){var y,X=H[Ir(n,h,z)];if(h+=15&X,(y=X>>4)<16)w[F++]=y;else{var G=0,ee=0;for(16==y?(ee=3+Ir(n,h,3),h+=2,G=w[F-1]):17==y?(ee=3+Ir(n,h,7),h+=3):18==y&&(ee=11+Ir(n,h,127),h+=7);ee--;)w[F++]=G}}var $=w.subarray(0,S),ce=w.subarray(S);_=wm($),g=wm(ce),f=As($,_,1),p=As(ce,g,1)}else Nt(1);if(h>m){l&&Nt(0);break}}a&&c(d+131072);for(var ye=(1<<_)-1,_e=(1<<g)-1,je=h;;je=h){var ct=(G=f[Mm(n,h)&ye])>>4;if((h+=15&G)>m){l&&Nt(0);break}if(G||Nt(2),ct<256)t[d++]=ct;else{if(256==ct){je=h,f=null;break}var Z=ct-254;ct>264&&(Z=Ir(n,h,(1<<(ie=Lc[F=ct-257]))-1)+Ab[F],h+=ie);var Te=p[Mm(n,h)&_e],de=Te>>4;if(Te||Nt(3),h+=15&Te,ce=oR[de],de>3){var ie=Fc[de];ce+=Mm(n,h)&(1<<ie)-1,h+=ie}if(h>m){l&&Nt(0);break}a&&c(d+131072);var Be=d+Z;if(d<ce){var Mt=s-ce,Ne=Math.min(ce,Be);for(Mt+d<0&&Nt(3);d<Ne;++d)t[d]=i[Mt+d]}for(;d<Be;++d)t[d]=t[d-ce]}}e.l=f,e.p=je,e.b=d,e.f=u,f&&(u=1,e.m=_,e.d=p,e.n=g)}while(!u);return d!=t.length&&o?function(n,e,t){return(null==e||e<0)&&(e=0),(null==t||t>n.length)&&(t=n.length),new $t(n.subarray(e,t))}(t,0,d):t.subarray(0,d)},Ob=new $t(0);function Rm(n,e){return Cm(n.subarray(function(n,e){return(8!=(15&n[0])||n[0]>>4>7||(n[0]<<8|n[1])%31)&&Nt(6,"invalid zlib data"),(n[1]>>5&1)==+!e&&Nt(6,"invalid zlib data: "+(32&n[1]?"need":"unexpected")+" dictionary"),2+(n[1]>>3&4)}(n,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}var zb="undefined"!=typeof TextDecoder&&new TextDecoder;try{zb.decode(Ob,{stream:!0})}catch(n){}function Wa(n,e,t){const i=t.length-n-1;if(e>=t[i])return i-1;if(e<=t[n])return n;let r=n,s=i,o=Math.floor((r+s)/2);for(;e<t[o]||e>=t[o+1];)e<t[o]?s=o:r=o,o=Math.floor((r+s)/2);return o}function qX(n,e){let t=1;for(let r=2;r<=n;++r)t*=r;let i=1;for(let r=2;r<=e;++r)i*=r;for(let r=2;r<=n-e;++r)i*=r;return t/i}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;class ZX extends class Qr{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;o=t||e*i[s-1];let c,a=0,l=s-1;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=i[r]-o,c<0)a=r+1;else{if(!(c>0)){l=r;break}l=r-1}if(r=l,i[r]===o)return r/(s-1);const u=i[r];return(r+(o-u)/(i[r+1]-u))/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new J:new R);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new R,r=[],s=[],o=[],a=new R,l=new De;for(let f=0;f<=e;f++)r[f]=this.getTangentAt(f/e,new R);s[0]=new R,o[0]=new R;let c=Number.MAX_VALUE;const u=Math.abs(r[0].x),h=Math.abs(r[0].y),d=Math.abs(r[0].z);u<=c&&(c=u,i.set(1,0,0)),h<=c&&(c=h,i.set(0,1,0)),d<=c&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let f=1;f<=e;f++){if(s[f]=s[f-1].clone(),o[f]=o[f-1].clone(),a.crossVectors(r[f-1],r[f]),a.length()>Number.EPSILON){a.normalize();const p=Math.acos(lt(r[f-1].dot(r[f]),-1,1));s[f].applyMatrix4(l.makeRotationAxis(a,p))}o[f].crossVectors(r[f],s[f])}if(!0===t){let f=Math.acos(lt(s[0].dot(s[e]),-1,1));f/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(f=-f);for(let p=1;p<=e;p++)s[p].applyMatrix4(l.makeRotationAxis(r[p],f*p)),o[p].crossVectors(r[p],s[p])}return{tangents:r,normals:s,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.t
1ype,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}{constructor(e,t,i,r,s){super();const o=t?t.length-1:0,a=i?i.length:0;this.degree=e,this.knots=t,this.controlPoints=[],this.startKnot=r||0,this.endKnot=s||o;for(let l=0;l<a;++l){const c=i[l];this.controlPoints[l]=new At(c.x,c.y,c.z,c.w)}}getPoint(e,t=new R){const i=t,s=function WX(n,e,t,i){const r=Wa(n,i,e),s=function Bc(n,e,t,i){const r=[],s=[],o=[];r[0]=1;for(let a=1;a<=t;++a){s[a]=e-i[n+1-a],o[a]=i[n+a]-e;let l=0;for(let c=0;c<a;++c){const u=o[c+1],h=s[a-c],d=r[c]/(u+h);r[c]=l+u*d,l=h*d}r[a]=l}return r}(r,i,n,e),o=new At(0,0,0,0);for(let a=0;a<=n;++a){const l=t[r-n+a],c=s[a],u=l.w*c;o.x+=l.x*u,o.y+=l.y*u,o.z+=l.z*u,o.w+=l.w*c}return o}(this.degree,this.knots,this.controlPoints,this.knots[this.startKnot]+e*(this.knots[this.endKnot]-this.knots[this.startKnot]));return 1!==s.w&&s.divideScalar(s.w),i.set(s.x,s.y,s.z)}getTangent(e,t=new R){const i=t,s=function XX(n,e,t,i,r){const s=function $X(n,e,t,i,r){const s=r<n?r:n,o=[],a=Wa(n,i,e),l=function jX(n,e,t,i,r){const s=[];for(let h=0;h<=t;++h)s[h]=0;const o=[];for(let h=0;h<=i;++h)o[h]=s.slice(0);const a=[];for(let h=0;h<=t;++h)a[h]=s.slice(0);a[0][0]=1;const l=s.slice(0),c=s.slice(0);for(let h=1;h<=t;++h){l[h]=e-r[n+1-h],c[h]=r[n+h]-e;let d=0;for(let f=0;f<h;++f){const p=c[f+1],_=l[h-f];a[h][f]=p+_;const g=a[f][h-1]/a[h][f];a[f][h]=d+p*g,d=_*g}a[h][h]=d}for(let h=0;h<=t;++h)o[0][h]=a[h][t];for(let h=0;h<=t;++h){let d=0,f=1;const p=[];for(let _=0;_<=t;++_)p[_]=s.slice(0);p[0][0]=1;for(let _=1;_<=i;++_){let g=0;const m=h-_,v=t-_;h>=_&&(p[f][0]=p[d][0]/a[v+1][m],g=p[f][0]*a[m][v]);const b=h-1<=v?_-1:t-h;for(let S=m>=-1?1:-m;S<=b;++S)p[f][S]=(p[d][S]-p[d][S-1])/a[v+1][m+S],g+=p[f][S]*a[m+S][v];h<=v&&(p[f][_]=-p[d][_-1]/a[v+1][h],g+=p[f][_]*a[h][v]),o[_][h]=g;const T=d;d=f,f=T}}let u=t;for(let h=1;h<=i;++h){for(let d=0;d<=t;++d)o[h][d]*=u;u*=t-h}return o}(a,i,n,s,e),c=[];for(let u=0;u<t.length;++u){const h=t[u].clone(),d=h.w;h.x*=d,h.y*=d,h.z*=d,c[u]=h}for(let u=0;u<=s;++u){const h=c[a-n].clone().multiplyScalar(l[u][0]);for(let d=1;d<=n;++d)h.add(c[a-n+d].clone().multiplyScalar(l[u][d]));o[u]=h}for(let u=s+1;u<=r+1;++u)o[u]=new At(0,0,0);return o}(n,e,t,i,r);return function YX(n){const e=n.length,t=[],i=[];for(let s=0;s<e;++s){const o=n[s];t[s]=new R(o.x,o.y,o.z),i[s]=o.w}const r=[];for(let s=0;s<e;++s){const o=t[s].clone();for(let a=1;a<=s;++a)o.sub(r[s-a].clone().multiplyScalar(qX(s,a)*i[a]));r[s]=o.divideScalar(i[0])}return r}(s)}(this.degree,this.knots,this.controlPoints,this.knots[0]+e*(this.knots[this.knots.length-1]-this.knots[0]),1);return i.copy(s[1]).normalize(),i}toJSON(){const e=super.toJSON();return e.degree=this.degree,e.knots=[...this.knots],e.controlPoints=this.controlPoints.map(t=>t.toArray()),e.startKnot=this.startKnot,e.endKnot=this.endKnot,e}fromJSON(e){return super.fromJSON(e),this.degree=e.degree,this.knots=[...e.knots],this.controlPoints=e.controlPoints.map(t=>new At(t[0],t[1],t[2],t[3])),this.startKnot=e.startKnot,this.endKnot=e.endKnot,this}}let wt,Rn,Vi;class KX extends Pc{constructor(e){super(e)}load(e,t,i,r){const s=this,o=""===s.path?class hb{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let i=0,r=e.length;i<r;i++)t+=String.fromCharCode(e[i]);try{return decodeURIComponent(escape(t))}catch(i){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}.extractUrlBase(e):s.path,a=new ro(this.manager);a.setPath(s.path),a.setResponseType("arraybuffer"),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,function(l){try{t(s.parse(l,o))}catch(c){r?r(c):console.error(c),s.manager.itemError(e)}},i,r)}parse(e,t){if(function iZ(n){const e="Kaydara FBX Binary \0";return n.byteLength>=e.length&&e===LR(n,0,e.length)}(e))wt=(new nZ).parse(e);else{const r=LR(e);if(!function rZ(n){const e=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"];let t=0;function i(r){const s=n[r-1];return n=n.slice(t+r),t++,s}for(let r=0;r<e.length;++r)if(i(1)===e[r])return!1;return!0}(r))throw new Error("THREE.FBXLoader: Unknown format.");if(RR(r)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+RR(r));wt=(new tZ).parse(r)}const i=new NW(this.manager).setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);return new JX(i,this.manager).parse(wt)}}class JX{constructor(e,t){this.textureLoader=e,this.manager=t}parse(){Rn=this.parseConnections();const e=this.parseImages(),t=this.parseTextures(e),i=this.parseMaterials(t),r=this.parseDeformers(),s=(new QX).parse(r);return this.parseScene(r,s,i),Vi}parseConnections(){const e=new Map;return"Connections"in wt&&wt.Connections.connections.forEach(function(i){const r=i[0],s=i[1],o=i[2];e.has(r)||e.set(r,{parents:[],children:[]});const a={ID:s,relationship:o};e.get(r).parents.push(a),e.has(s)||e.set(s,{parents:[],children:[]});const l={ID:r,relationship:o};e.get(s).children.push(l)}),e}parseImages(){const e={},t={};if("Video"in wt.Objects){const i=wt.Objects.Video;for(const r in i){const s=i[r];if(e[parseInt(r)]=s.RelativeFilename||s.Filename,"Content"in s){const a=s.Content instanceof ArrayBuffer&&s.Content.byteLength>0,l="string"==typeof s.Content&&""!==s.Content;if(a||l){const c=this.parseImage(i[r]);t[s.RelativeFilename||s.Filename]=c}}}}for(const i in e){const r=e[i];e[i]=void 0!==t[r]?t[r]:e[i].split("\\").pop()}return e}parseImage(e){const t=e.Content,i=e.RelativeFilename||e.Filename,r=i.slice(i.lastIndexOf(".")+1).toLowerCase();let s;switch(r){case"bmp":s="image/bmp";break;case"jpg":case"jpeg":s="image/jpeg";break;case"png":s="image/png";break;case"tif":s="image/tiff";break;case"tga":null===this.manager.getHandler(".tga")&&console.warn("FBXLoader: TGA loader not found, skipping ",i),s="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+r+'" is not supported.')}if("string"==typeof t)return"data:"+s+";base64,"+t;{const o=new Uint8Array(t);return window.URL.createObjectURL(new Blob([o],{type:s}))}}parseTextures(e){const t=new Map;if("Texture"in wt.Objects){const i=wt.Objects.Texture;for(const r in i){const s=this.parseTexture(i[r],e);t.set(parseInt(r),s)}}return t}parseTexture(e,t){const i=this.loadTexture(e,t);i.ID=e.id,i.name=e.attrName;const r=e.WrapModeU,s=e.WrapModeV,a=void 0!==s?s.value:0;if(i.wrapS=0===(void 0!==r?r.value:0)?jl:fr,i.wrapT=0===a?jl:fr,"Scaling"in e){const l=e.Scaling.value;i.repeat.x=l[0],i.repeat.y=l[1]}if("Translation"in e){const l=e.Translation.value;i.offset.x=l[0],i.offset.y=l[1]}return i}loadTexture(e,t){const i=new Set(["tga","tif","tiff","exr","dds","hdr","ktx2"]),r=e.FileName.split(".").pop().toLowerCase(),s=i.has(r)?this.manager.getHandler(`.${r}`):this.textureLoader;if(!s)return console.warn(`FBXLoader: ${r.toUpperCase()} loader not found, creating placeholder texture for`,e.RelativeFilename),new Xr;const o=s.path;o||s.setPath(this.textureLoader.path);const a=Rn.get(e.id).children;let l;void 0!==a&&a.length>0&&void 0!==t[a[0].ID]&&(l=t[a[0].ID],(0===l.indexOf("blob:")||0===l.indexOf("data:"))&&s.setPath(void 0));const c=s.load(l);return s.setPath(o),c}parseMaterials(e){const t=new Map;if("Material"in wt.Objects){const i=wt.Objects.Material;for(const r in i){const s=this.parseMaterial(i[r],e);null!==s&&t.set(parseInt(r),s)}}return t}parseMaterial(e,t){const i=e.id,r=e.attrName;let s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!Rn.has(i))return null;const o=this.parseParameters(e,t,i);let a;switch(s.toLowerCase()){case"phong":a=new rm;break;case"lambert":a=new zP;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',s),a=new rm}return a.setValues(o),a.name=r,a}parseParameters(e,t,i){const r={};e.BumpFactor&&(r.bumpScale=e.BumpFactor.value),e.Diffuse?r.color=vt.toWorkingColorSpace((new me).fromArray(e.Diffuse.value),an):e.DiffuseColor&&("Color"===e.DiffuseColor.type||"ColorRGB"===e.DiffuseColor.type)&&(r.color=vt.toWorkingColorSpace((new me).fromArray(e.DiffuseColor.value),an)),e.DisplacementFactor&&(r.displacementScale=e.DisplacementFactor.value),e.Emissive?r.emissive=vt.toWorkingColorSpace((new me).fromArray(e.Emissive.value),an):e.EmissiveColor&&("Color"===e.EmissiveColor.type||"ColorRGB"===e.EmissiveColor.type)&&(r.emissive=vt.toWorkingColorSpace((new me).fromArray(e.EmissiveColor.value),an)),e.EmissiveFactor&&(r.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),r.opacity=1-(e.TransparencyFactor?parseFloat(e.TransparencyFactor.value):0),(1===r.opacity||0===r.opacity)&&(r.opacity=e.Opacity?parseFloat(e.Opacity.value):null,null===r.opacity&&(r.opacity=1-(e.TransparentColor?parseFloat(e.TransparentColor.value[0]):0))),r.opacity<1&&(r.transparent=!0),e.ReflectionFactor&&(r.reflectivity=e.ReflectionFactor.value),e.Shininess&&(r.shininess=e.Shininess.value),e.Specular?r.specular=vt.toWorkingColorSpace((new me).fromArray(e.Specular.value),an):e.SpecularColor&&"Color"===e.SpecularColor.type&&(r.specular=vt.toWorkingColorSpace((new me).fromArray(e.SpecularColor.value),an));const s=this;
1return Rn.get(i).children.forEach(function(o){const a=o.relationship;switch(a){case"Bump":r.bumpMap=s.getTexture(t,o.ID);break;case"Maya|TEX_ao_map":r.aoMap=s.getTexture(t,o.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":r.map=s.getTexture(t,o.ID),void 0!==r.map&&(r.map.colorSpace=an);break;case"DisplacementColor":r.displacementMap=s.getTexture(t,o.ID);break;case"EmissiveColor":r.emissiveMap=s.getTexture(t,o.ID),void 0!==r.emissiveMap&&(r.emissiveMap.colorSpace=an);break;case"NormalMap":case"Maya|TEX_normal_map":r.normalMap=s.getTexture(t,o.ID);break;case"ReflectionColor":r.envMap=s.getTexture(t,o.ID),void 0!==r.envMap&&(r.envMap.mapping=303,r.envMap.colorSpace=an);break;case"SpecularColor":r.specularMap=s.getTexture(t,o.ID),void 0!==r.specularMap&&(r.specularMap.colorSpace=an);break;case"TransparentColor":case"TransparencyFactor":r.alphaMap=s.getTexture(t,o.ID),r.transparent=!0;break;default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",a)}}),r}getTexture(e,t){return"LayeredTexture"in wt.Objects&&t in wt.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),t=Rn.get(t).children[0].ID),e.get(t)}parseDeformers(){const e={},t={};if("Deformer"in wt.Objects){const i=wt.Objects.Deformer;for(const r in i){const s=i[r],o=Rn.get(parseInt(r));if("Skin"===s.attrType){const a=this.parseSkeleton(o,i);a.ID=r,o.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),a.geometryID=o.parents[0].ID,e[r]=a}else if("BlendShape"===s.attrType){const a={id:r};a.rawTargets=this.parseMorphTargets(o,i),a.id=r,o.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),t[r]=a}}}return{skeletons:e,morphTargets:t}}parseSkeleton(e,t){const i=[];return e.children.forEach(function(r){const s=t[r.ID];if("Cluster"!==s.attrType)return;const o={ID:r.ID,indices:[],weights:[],transformLink:(new De).fromArray(s.TransformLink.a)};"Indexes"in s&&(o.indices=s.Indexes.a,o.weights=s.Weights.a),i.push(o)}),{rawBones:i,bones:[]}}parseMorphTargets(e,t){const i=[];for(let r=0;r<e.children.length;r++){const s=e.children[r],o=t[s.ID],a={name:o.attrName,initialWeight:o.DeformPercent,id:o.id,fullWeights:o.FullWeights.a};if("BlendShapeChannel"!==o.attrType)return;a.geoID=Rn.get(parseInt(s.ID)).children.filter(function(l){return void 0===l.relationship})[0].ID,i.push(a)}return i}parseScene(e,t,i){Vi=new Aa;const r=this.parseModels(e.skeletons,t,i),s=wt.Objects.Model,o=this;r.forEach(function(l){o.setLookAtProperties(l,s[l.ID]),Rn.get(l.ID).parents.forEach(function(h){const d=r.get(h.ID);void 0!==d&&d.add(l)}),null===l.parent&&Vi.add(l)}),this.bindSkeleton(e.skeletons,t,r),this.addGlobalSceneSettings(),Vi.traverse(function(l){if(l.userData.transformData){l.parent&&(l.userData.transformData.parentMatrix=l.parent.matrix,l.userData.transformData.parentMatrixWorld=l.parent.matrixWorld);const c=OR(l.userData.transformData);l.applyMatrix4(c),l.updateWorldMatrix()}});const a=(new eZ).parse();1===Vi.children.length&&Vi.children[0].isGroup&&(Vi.children[0].animations=a,Vi=Vi.children[0]),Vi.animations=a}parseModels(e,t,i){const r=new Map,s=wt.Objects.Model;for(const o in s){const a=parseInt(o),l=s[o],c=Rn.get(a);let u=this.buildSkeleton(c,e,a,l.attrName);if(!u){switch(l.attrType){case"Camera":u=this.createCamera(c);break;case"Light":u=this.createLight(c);break;case"Mesh":u=this.createMesh(c,t,i);break;case"NurbsCurve":u=this.createCurve(c,t);break;case"LimbNode":case"Root":u=new Op;break;default:u=new Aa}u.name=l.attrName?jt.sanitizeNodeName(l.attrName):"",u.userData.originalName=l.attrName,u.ID=a}this.getTransformData(u,l),r.set(a,u)}return r}buildSkeleton(e,t,i,r){let s=null;return e.parents.forEach(function(o){for(const a in t){const l=t[a];l.rawBones.forEach(function(c,u){if(c.ID===o.ID){const h=s;s=new Op,s.matrixWorld.copy(c.transformLink),s.name=r?jt.sanitizeNodeName(r):"",s.userData.originalName=r,s.ID=i,l.bones[u]=s,null!==h&&s.add(h)}})}}),s}createCamera(e){let t,i;
1if(e.children.forEach(function(r){const s=wt.Objects.NodeAttribute[r.ID];void 0!==s&&(i=s)}),void 0===i)t=new kn;else{let r=0;void 0!==i.CameraProjectionType&&1===i.CameraProjectionType.value&&(r=1);let s=1;void 0!==i.NearPlane&&(s=i.NearPlane.value/1e3);let o=1e3;void 0!==i.FarPlane&&(o=i.FarPlane.value/1e3);let a=window.innerWidth,l=window.innerHeight;void 0!==i.AspectWidth&&void 0!==i.AspectHeight&&(a=i.AspectWidth.value,l=i.AspectHeight.value);const c=a/l;let u=45;void 0!==i.FieldOfView&&(u=i.FieldOfView.value);const h=i.FocalLength?i.FocalLength.value:null;switch(r){case 0:t=new ti(u,c,s,o),null!==h&&t.setFocalLength(h);break;case 1:console.warn("THREE.FBXLoader: Orthographic cameras not supported yet."),t=new kn;break;default:console.warn("THREE.FBXLoader: Unknown camera type "+r+"."),t=new kn}}return t}createLight(e){let t,i;if(e.children.forEach(function(r){const s=wt.Objects.NodeAttribute[r.ID];void 0!==s&&(i=s)}),void 0===i)t=new kn;else{let r;r=void 0===i.LightType?0:i.LightType.value;let s=16777215;void 0!==i.Color&&(s=vt.toWorkingColorSpace((new me).fromArray(i.Color.value),an));let o=void 0===i.Intensity?1:i.Intensity.value/100;void 0!==i.CastLightOnObject&&0===i.CastLightOnObject.value&&(o=0);let a=0;void 0!==i.FarAttenuationEnd&&(a=void 0!==i.EnableFarAttenuation&&0===i.EnableFarAttenuation.value?0:i.FarAttenuationEnd.value);const l=1;switch(r){case 0:t=new ab(s,o,a,l);break;case 1:t=new QP(s,o);break;case 2:let c=Math.PI/3;void 0!==i.InnerAngle&&(c=vi_degToRad(i.InnerAngle.value));let u=0;void 0!==i.OuterAngle&&(u=vi_degToRad(i.OuterAngle.value),u=Math.max(u,1)),t=new KP(s,o,a,c,u,l);break;default:console.warn("THREE.FBXLoader: Unknown light type "+i.LightType.value+", defaulting to a PointLight."),t=new ab(s,o)}void 0!==i.CastShadows&&1===i.CastShadows.value&&(t.castShadow=!0)}return t}createMesh(e,t,i){let r,s=null,o=null;const a=[];return e.children.forEach(function(l){t.has(l.ID)&&(s=t.get(l.ID)),i.has(l.ID)&&a.push(i.get(l.ID))}),a.length>1?o=a:a.length>0?o=a[0]:(o=new rm({name:Pc.DEFAULT_MATERIAL_NAME,color:13421772}),a.push(o)),"color"in s.attributes&&a.forEach(function(l){l.vertexColors=!0}),s.FBX_Deformer?(r=new fP(s,o),r.normalizeSkinWeights()):r=new ai(s,o),r}createCurve(e,t){const i=e.children.reduce(function(s,o){return t.has(o.ID)&&(s=t.get(o.ID)),s},null),r=new er({name:Pc.DEFAULT_MATERIAL_NAME,color:3342591,linewidth:1});return new Ch(i,r)}getTransformData(e,t){const i={};"InheritType"in t&&(i.inheritType=parseInt(t.InheritType.value)),i.eulerOrder=Wh("RotationOrder"in t?t.RotationOrder.value:0),"Lcl_Translation"in t&&(i.translation=t.Lcl_Translation.value),"PreRotation"in t&&(i.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(i.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(i.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(i.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(i.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(i.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(i.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(i.rotationPivot=t.RotationPivot.value),e.userData.transformData=i}setLookAtProperties(e,t){"LookAtProperty"in t&&Rn.get(e.ID).children.forEach(function(r){if("LookAtProperty"===r.relationship){const s=wt.Objects.Model[r.ID];if("Lcl_Translation"in s){const o=s.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(o),Vi.add(e.target)):e.lookAt((new R).fromArray(o))}}})}bindSkeleton(e,t,i){const r=this.parsePoseNodes();for(const s in e){const o=e[s];Rn.get(parseInt(o.ID)).parents.forEach(function(l){t.has(l.ID)&&Rn.get(l.ID).parents.forEach(function(h){i.has(h.ID)&&i.get(h.ID).bind(new Lp(o.bones),r[h.ID])})})}}parsePoseNodes(){const e={};if("Pose"in wt.Objects){const t=wt.Objects.Pose;for(const i in t)if("BindPose"===t[i].attrType&&t[i].NbPoseNodes>0){const r=t[i].PoseNode;Array.isArray(r)?r.forEach(function(s){e[s.Node]=(new De).fromArray(s.Matrix.a)}):e[r.Node]=(new De).fromArray(r.Matrix.a)}}return e}addGlobalSceneSettings(){if("GlobalSettings"in wt){if("AmbientColor"in wt.GlobalSettings){const e=wt.GlobalSettings.AmbientColor.value,t=e[0],i=e[1],r=e[2];if(0!==t||0!==i||0!==r){const s=(new me).setRGB(t,i,r,an);Vi.add(new cb(s,1))}}"UnitScaleFactor"in wt.GlobalSettings&&(Vi.userData.unitScaleFactor=wt.GlobalSettings.UnitScaleFactor.value)}}}class QX{constructor(){this.negativeMaterialIndices=!1}parse(e){const t=new Map;if("Geometry"in wt.Objects){const i=wt.Objects.Geometry;for(const r in i){const s=Rn.get(parseInt(r)),o=this.parseGeometry(s,i[r],e);t.set(parseInt(r),o)}}return!0===this.negativeMaterialIndices&&console.warn("THREE.FBXLoader: The FBX file contains invali
1d (negative) material indices. The asset might not render as expected."),t}parseGeometry(e,t,i){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,i);case"NurbsCurve":return this.parseNurbsGeometry(t)}}parseMeshGeometry(e,t,i){const r=i.skeletons,s=[],o=e.parents.map(function(h){return wt.Objects.Model[h.ID]});if(0===o.length)return;const a=e.children.reduce(function(h,d){return void 0!==r[d.ID]&&(h=r[d.ID]),h},null);e.children.forEach(function(h){void 0!==i.morphTargets[h.ID]&&s.push(i.morphTargets[h.ID])});const l=o[0],c={};"RotationOrder"in l&&(c.eulerOrder=Wh(l.RotationOrder.value)),"InheritType"in l&&(c.inheritType=parseInt(l.InheritType.value)),"GeometricTranslation"in l&&(c.translation=l.GeometricTranslation.value),"GeometricRotation"in l&&(c.rotation=l.GeometricRotation.value),"GeometricScaling"in l&&(c.scale=l.GeometricScaling.value);const u=OR(c);return this.genGeometry(t,a,s,u)}genGeometry(e,t,i,r){const s=new pt;e.attrName&&(s.name=e.attrName);const o=this.parseGeoNode(e,t),a=this.genBuffers(o),l=new Pe(a.vertex,3);if(l.applyMatrix4(r),s.setAttribute("position",l),a.colors.length>0&&s.setAttribute("color",new Pe(a.colors,3)),t&&(s.setAttribute("skinIndex",new b1(a.weightsIndices,4)),s.setAttribute("skinWeight",new Pe(a.vertexWeights,4)),s.FBX_Deformer=t),a.normal.length>0){const c=(new ht).getNormalMatrix(r),u=new Pe(a.normal,3);u.applyNormalMatrix(c),s.setAttribute("normal",u)}
1if(a.uvs.forEach(function(c,u){s.setAttribute(0===u?"uv":`uv${u}`,new Pe(a.uvs[u],2))}),o.material&&"AllSame"!==o.material.mappingType){let c=a.materialIndex[0],u=0;if(a.materialIndex.forEach(function(h,d){h!==c&&(s.addGroup(u,d-u,c),c=h,u=d)}),s.groups.length>0){const h=s.groups[s.groups.length-1],d=h.start+h.count;d!==a.materialIndex.length&&s.addGroup(d,a.materialIndex.length-d,c)}0===s.groups.length&&s.addGroup(0,a.materialIndex.length,a.materialIndex[0])}return this.addMorphTargets(s,e,i,r),s}parseGeoNode(e,t){const i={};if(i.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],i.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(i.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(i.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(i.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){i.uv=[];let r=0;for(;e.LayerElementUV[r];)e.LayerElementUV[r].UV&&i.uv.push(this.parseUVs(e.LayerElementUV[r])),r++}return i.weightTable={},null!==t&&(i.skeleton=t,t.rawBones.forEach(function(r,s){r.indices.forEach(function(o,a){void 0===i.weightTable[o]&&(i.weightTable[o]=[]),i.weightTable[o].push({id:s,weight:r.weights[a]})})})),i}genBuffers(e){const t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]};let i=0,r=0,s=!1,o=[],a=[],l=[],c=[],u=[],h=[];const d=this;return e.vertexIndices.forEach(function(f,p){let _,g=!1;f<0&&(f^=-1,g=!0);let m=[],v=[];if(o.push(3*f,3*f+1,3*f+2),e.color){const y=Nm(p,i,f,e.color);l.push(y[0],y[1],y[2])}if(e.skeleton){if(void 0!==e.weightTable[f]&&e.weightTable[f].forEach(function(y){v.push(y.weight),m.push(y.id)}),v.length>4){s||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),s=!0);const y=[0,0,0,0],b=[0,0,0,0];v.forEach(function(T,S){let P=T,I=m[S];b.forEach(function(w,M,F){if(P>w){F[M]=P,P=w;const V=y[M];y[M]=I,I=V}})}),m=y,v=b}for(;v.length<4;)v.push(0),m.push(0);for(let y=0;y<4;++y)u.push(v[y]),h.push(m[y])}if(e.normal){const y=Nm(p,i,f,e.normal);a.push(y[0],y[1],y[2])}e.material&&"AllSame"!==e.material.mappingType&&(_=Nm(p,i,f,e.material)[0],_<0&&(d.negativeMaterialIndices=!0,_=0)),e.uv&&e.uv.forEach(function(y,b){const T=Nm(p,i,f,y);void 0===c[b]&&(c[b]=[]),c[b].push(T[0]),c[b].push(T[1])}),r++,g&&(d.genFace(t,e,o,_,a,l,c,u,h,r),i++,r=0,o=[],a=[],l=[],c=[],u=[],h=[])}),t}getNormalNewell(e){const t=new R(0,0,0);for(let i=0;i<e.length;i++){const r=e[i],s=e[(i+1)%e.length];t.x+=(r.y-s.y)*(r.z+s.z),t.y+=(r.z-s.z)*(r.x+s.x),t.z+=(r.x-s.x)*(r.y+s.y)}return t.normalize(),t}getNormalTangentAndBitangent(e){const t=this.getNormalNewell(e),r=(Math.abs(t.z)>.5?new R(0,1,0):new R(0,0,1)).cross(t).normalize(),s=t.clone().cross(r).normalize();return{normal:t,tangent:r,bitangent:s}}flattenVertex(e,t,i){return new J(e.dot(t),e.dot(i))}genFace(e,t,i,r,s,o,a,l,c,u){let h;if(u>3){const d=[],f=t.baseVertexPositions||t.vertexPositions;for(let m=0;m<i.length;m+=3)d.push(new R(f[i[m]],f[i[m+1]],f[i[m+2]]));const{tangent:p,bitangent:_}=this.getNormalTangentAndBitangent(d),g=[];for(const m of d)g.push(this.flattenVertex(m,p,_));h=Ss.triangulateShape(g,[])}else h=[[0,1,2]];for(const[d,f,p]of h)e.vertex.push(t.vertexPositions[i[3*d]]),e.vertex.push(t.vertexPositions[i[3*d+1]]),e.vertex.push(t.vertexPositions[i[3*d+2]]),e.vertex.push(t.vertexPositions[i[3*f]]),e.vertex.push(t.vertexPositions[i[3*f+1]]),e.vertex.push(t.vertexPositions[i[3*f+2]]),e.vertex.push(t.vertexPositions[i[3*p]]),e.vertex.push(t.vertexPositions[i[3*p+1]]),e.vertex.push(t.vertexPositions[i[3*p+2]]),t.skeleton&&(e.vertexWeights.push(l[4*d]),e.vertexWeights.push(l[4*d+1]),e.vertexWeights.push(l[4*d+2]),e.vertexWeights.push(l[4*d+3]),e.vertexWeights.push(l[4*f]),e.vertexWeights.push(l[4*f+1]),e.vertexWeights.push(l[4*f+2]),e.vertexWeights.push(l[4*f+3]),e.vertexWeights.push(l[4*p]),e.vertexWeights.push(l[4*p+1]),e.vertexWeights.push(l[4*p+2]),e.vertexWeights.push(l[4*p+3]),e.weightsIndices.push(c[4*d]),e.weightsIndices.push(c[4*d+1]),e.weightsIndices.push(c[4*d+2]),e.weightsIndices.push(c[4*d+3]),e.weightsIndices.push(c[4*f]),e.weightsIndices.push(c[4*f+1]),e.weightsIndices.push(c[4*f+2]),e.weightsIndices.push(c[4*f+3]),e.weightsIndices.push(c[4*p]),e.weightsIndices.push(c[4*p+1]),e.weightsIndices.push(c[4*p+2]),e.weightsIndices.push(c[4*p+3])),t.color&&(e.colors.push(o[3*d]),e.colors.push(o[3*d+1]),e.colors.push(o[3*d+2]),e.colors.push(o[3*f]),e.colors.push(o[3*f+1]),e.colors.push(o[3*f+2]),e.colors.push(o[3*p]),e.colors.push(o[3*p+1]),e.colors.push(o[3*p+2])),t.material&&"AllSame"!==t.material.mappingType&&(e.materialIndex.push(r),e.materialIndex.push(r),e.materialIndex.push(r)),t.normal&&(e.normal.push(s[3*d]),e.normal.push(s[3*d+1]),e.normal.push(s[3*d+2]),e.normal.push(s[3*f]),e.normal.push(s[3*f+1]),e.normal.push(s[3*f+2]),e.normal.push(s[3*p]),e.normal.push(s[3*p+1]),e.normal.push(s[3*p+2])),t.uv&&t.uv.forEach(function(_,g){void 0===e.uvs[g]&&(e.uvs[g]=[]),e.uvs[g].push(a[g][2*d]),e.uvs[g].push(a[g][2*d+1]),e.uvs[g].push(a[g][2*f]),e.uvs[g].push(a[g][2*f+1]),e.uvs[g].push(a[g][2*p]),e.uvs[g].push(a[g][2*p+1])})}addMorphTargets(e,t,i,r){if(0===i.length)return;e.morphTargetsRelative=!0,e.morphAttributes.position=[];const s=this;
1i.forEach(function(o){o.rawTargets.forEach(function(a){const l=wt.Objects.Geometry[a.geoID];void 0!==l&&s.genMorphGeometry(e,t,l,r,a.name)})})}genMorphGeometry(e,t,i,r,s){const o=void 0!==t.Vertices?t.Vertices.a:[],a=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],l=void 0!==i.Vertices?i.Vertices.a:[],c=void 0!==i.Indexes?i.Indexes.a:[],h=new Float32Array(3*e.attributes.position.count);for(let _=0;_<c.length;_++){const g=3*c[_];h[g]=l[3*_],h[g+1]=l[3*_+1],h[g+2]=l[3*_+2]}const f=this.genBuffers({vertexIndices:a,vertexPositions:h,baseVertexPositions:o}),p=new Pe(f.vertex,3);p.name=s||i.attrName,p.applyMatrix4(r),e.morphAttributes.position.push(p)}parseNormals(e){const i=e.ReferenceInformationType;let s=[];return"IndexToDirect"===i&&("NormalIndex"in e?s=e.NormalIndex.a:"NormalsIndex"in e&&(s=e.NormalsIndex.a)),{dataSize:3,buffer:e.Normals.a,indices:s,mappingType:e.MappingInformationType,referenceType:i}}parseUVs(e){const i=e.ReferenceInformationType;let s=[];return"IndexToDirect"===i&&(s=e.UVIndex.a),{dataSize:2,buffer:e.UV.a,indices:s,mappingType:e.MappingInformationType,referenceType:i}}parseVertexColors(e){const t=e.MappingInformationType,i=e.ReferenceInformationType,r=e.Colors.a;let s=[];"IndexToDirect"===i&&(s=e.ColorIndex.a);for(let o=0,a=new me;o<r.length;o+=4)a.fromArray(r,o),vt.toWorkingColorSpace(a,an),a.toArray(r,o);return{dataSize:4,buffer:r,indices:s,mappingType:t,referenceType:i}}parseMaterialIndices(e){const t=e.MappingInformationType,i=e.ReferenceInformationType;if("NoMappingInformation"===t)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:i};const r=e.Materials.a,s=[];for(let o=0;o<r.length;++o)s.push(o);return{dataSize:1,buffer:r,indices:s,mappingType:t,referenceType:i}}parseNurbsGeometry(e){const t=parseInt(e.Order);if(isNaN(t))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",e.Order,e.id),new pt;const i=t-1,r=e.KnotVector.a,s=[],o=e.Points.a;for(let h=0,d=o.length;h<d;h+=4)s.push((new At).fromArray(o,h));let a,l;if("Closed"===e.Form)s.push(s[0]);else if("Periodic"===e.Form){a=i,l=r.length-1-a;for(let h=0;h<i;++h)s.push(s[h])}const u=new ZX(i,r,s,a,l).getPoints(12*s.length);return(new pt).setFromPoints(u)}}class eZ{parse(){const e=[],t=this.parseClips();if(void 0!==t)for(const i in t){const s=this.addClip(t[i]);e.push(s)}return e}parseClips(){if(void 0===wt.Objects.AnimationCurve)return;const e=this.parseAnimationCurveNodes();this.parseAnimationCurves(e);const t=this.parseAnimationLayers(e);return this.parseAnimStacks(t)}parseAnimationCurveNodes(){const e=wt.Objects.AnimationCurveNode,t=new Map;for(const i in e){const r=e[i];if(null!==r.attrName.match(/S|R|T|DeformPercent/)){const s={id:r.id,attr:r.attrName,curves:{}};t.set(s.id,s)}}return t}parseAnimationCurves(e){const t=wt.Objects.AnimationCurve;for(const i in t){const r={id:t[i].id,times:t[i].KeyTime.a.map(sZ),values:t[i].KeyValueFloat.a},s=Rn.get(r.id);if(void 0!==s){const o=s.parents[0].ID,a=s.parents[0].relationship;a.match(/X/)?e.get(o).curves.x=r:a.match(/Y/)?e.get(o).curves.y=r:a.match(/Z/)?e.get(o).curves.z=r:a.match(/DeformPercent/)&&e.has(o)&&(e.get(o).curves.morph=r)}}}parseAnimationLayers(e){const t=wt.Objects.AnimationLayer,i=new Map;for(const r in t){const s=[],o=Rn.get(parseInt(r));void 0!==o&&(o.children.forEach(function(l,c){if(e.has(l.ID)){const u=e.get(l.ID);if(void 0!==u.curves.x||void 0!==u.curves.y||void 0!==u.curves.z){if(void 0===s[c]){const h=Rn.get(l.ID).parents.filter(function(d){return void 0!==d.relationship})[0].ID;if(void 0!==h){const d=wt.Objects.Model[h.toString()];if(void 0===d)return void console.warn("THREE.FBXLoader: Encountered a unused curve.",l);const f={modelName:d.attrName?jt.sanitizeNodeName(d.attrName):"",ID:d.id,initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};Vi.traverse(function(p){p.ID===d.id&&(f.transform=p.matrix,p.userData.transformData&&(f.eulerOrder=p.userData.transformData.eulerOrder))}),f.transform||(f.transform=new De),"PreRotation"in d&&(f.preRotation=d.PreRotation.value),"PostRotation"in d&&(f.postRotation=d.PostRotation.value),s[c]=f}}s[c]&&(s[c][u.attr]=u)}else if(void 0!==u.curves.morph){if(void 0===s[c]){const h=Rn.get(l.ID).parents.filter(function(m){return void 0!==m.relationship})[0].ID,d=Rn.get(h).parents[0].ID,f=Rn.get(d).parents[0].ID,p=Rn.get(f).parents[0].ID,_=wt.Objects.Model[p],g={modelName:_.attrName?jt.sanitizeNodeName(_.attrName):"",morphName:wt.Objects.Deformer[h].attrName};s[c]=g}s[c][u.attr]=u}}}),i.set(parseInt(r),s))}return i}parseAnimStacks(e){const t=wt.Objects.AnimationStack,i={};for(const r in t){const s=Rn.get(parseInt(r)).children;s.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");const o=e.get(s[0].ID);i[r]={name:t[r].attrName,layer:o}}return i}addClip(e){let t=[];const i=this;return e.layer.forEach(function(r){t=t.concat(i.generateTracks(r))}),new Lh(e.name,-1,t)}generateTracks(e){const t=[];let i=new R,r=new R;if(e.transform&&e.transform.decompose(i,new vn,r),i=i.toArray(),r=r.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){const s=this.generateVectorTrack(e.modelName,e.T.curves,i,"position");void 0!==s&&t.push(s)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){const s=this.generateRotationTrack(e.modelName,e.R.curves,e.preRotation,e.postRotation,e.eulerOrder);void 0!==s&&t.push(s)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){const s=this.generateVectorTrack(e.modelName,e.S.curves,r,"scale");void 0!==s&&t.push(s)}if(void 0!==e.DeformPercent){const s=this.generateMorphTrack(e);void 0!==s&&t.push(s)}return t}generateVectorTrack(e,t,i,r){const s=this.getTimesForAllAxes(t),o=this.getKeyframeTrackValues(s,t,i);return new Oh(e+"."+r,s,o)}generateRotationTrack(e,t,i,r,s){let o,a;if(void 0!==t.x&&void 0!==t.y&&void 0!==t.z){const d=this.interpolateRotations(t.x,t.y,t.z,s);o=d[0],a=d[1]}const l=Wh(0);void 0!==i&&((i=i.map(vi_degToRad)).push(l),i=(new yi).fromArray(i),i=(new vn).setFromEuler(i)),void 0!==r&&((r=r.map(vi_degToRad)).push(l),r=(new yi).fromArray(r),r=(new vn).setFromEuler(r).invert());const c=new vn,u=new yi,h=[];if(!a||!o)return new Ac(e+".quaternion",[0],[0]);for(let d=0;d<a.length;d+=3)u.set(a[d],a[d+1],a[d+2],s),c.setFromEuler(u),void 0!==i&&c.premultiply(i),void 0!==r&&c.multiply(r),d>2&&(new vn).fromArray(h,(d-3)/3*4).dot(c)<0&&c.set(-c.x,-c.y,-c.z,-c.w),c.toArray(h,d/3*4);return new Ac(e+".quaternion",o,h)}generateMorphTrack(e){const t=e.DeformPercent.curves.morph,i=t.values.map(function(s){return s/100}),r=Vi.getObjectByName(e.modelName).morphTargetDictionary[e.morphName];return new Rh(e.modelName+".morphTargetInfluences["+r+"]",t.times,i)}getTimesForAllAxes(e){let t=[];if(void 0!==e.x&&(t=t.concat(e.x.times)),void 0!==e.y&&(t=t.concat(e.y.times)),void 0!==e.z&&(t=t.concat(e.z.times)),t=t.sort(function(i,r){return i-r}),t.length>1){let i=1,r=t[0];for(let s=1;s<t.length;s++){const o=t[s];o!==r&&(t[i]=o,r=o,i++)}t=t.slice(0,i)}return t}getKeyframeTrackValues(e,t,i){const r=i,s=[];let o=-1,a=-1,l=-1;return e.forEach(function(c){if(t.x&&(o=t.x.times.indexOf(c)),t.y&&(a=t.y.times.indexOf(c)),t.z&&(l=t.z.times.indexOf(c)),-1!==o){const u=t.x.values[o];s.push(u),r[0]=u}else s.push(r[0]);if(-1!==a){const u=t.y.values[a];s.push(u),r[1]=u}else s.push(r[1]);if(-1!==l){const u=t.z.values[l];s.push(u),r[2]=u}else s.push(r[2])}),s}interpolateRotations(e,t,i,r){const s=[],o=[];s.push(e.times[0]),o.push(vi_degToRad(e.values[0])),o.push(vi_degToRad(t.values[0])),o.push(vi_degToRad(i.values[0]));for(let a=1;a<e.values.length;a++){const l=[e.values[a-1],t.values[a-1],i.values[a-1]];if(isNaN(l[0])||isNaN(l[1])||isNaN(l[2]))continue;const c=l.map(vi_degToRad),u=[e.values[a],t.values[a],i.values[a]];if(isNaN(u[0])||isNaN(u[1])||isNaN(u[2]))continue;const h=u.map(vi_degToRad),d=[u[0]-l[0],u[1]-l[1],u[2]-l[2]],f=[Math.abs(d[0]),Math.abs(d[1]),Math.abs(d[2])];if(f[0]>=180||f[1]>=180||f[2]>=180){const _=Math.max(...f)/180,g=new yi(...c,r),m=new yi(...h,r),v=(new vn).setFromEuler(g),y=(new vn).setFromEuler(m);v.dot(y)&&y.set(-y.x,-y.y,-y.z,-y.w);const b=e.times[a-1],T=e.times[a]-b,S=new vn,P=new yi;for(let I=0;I<1;I+=1/_)S.copy(v.clone().slerp(y.clone(),I)),s.push(b+I*T),P.setFromQuaternion(S,r),o.push(P.x),o.push(P.y),o.push(P.z)}else s.push(e.times[a]),o.push(vi_degToRad(e.values[a])),o.push(vi_degToRad(t.values[a])),o.push(vi_degToRad(i.values[a]))}return[s,o]}}class tZ{getPrevNode(){return this.nodeStack[this.currentIndent-2]}getCurrentNode(){return this.nodeStack[this.currentIndent-1]}getCurrentProp(){return this.currentProp}pushStack(e){this.nodeStack.push(e),this.currentIndent+=1}popStack(){this.nodeStack.pop(),this.currentIndent-=1}setCurrentProp(e,t){this.currentProp=e,this.currentPropName=t}parse(e){this.currentIndent=0,this.allNodes=new IR,this.nodeStack=[],this.currentProp=[],this.currentPropName="";const t=this,i=e.split(/[\r\n]+/);
1return i.forEach(function(r,s){const o=r.match(/^[\s\t]*;/),a=r.match(/^[\s\t]*$/);if(o||a)return;const l=r.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),c=r.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),u=r.match("^\\t{"+(t.currentIndent-1)+"}}");l?t.parseNodeBegin(r,l):c?t.parseNodeProperty(r,c,i[++s]):u?t.popStack():r.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(r)}),this.allNodes}parseNodeBegin(e,t){const i=t[1].trim().replace(/^"/,"").replace(/"$/,""),r=t[2].split(",").map(function(l){return l.trim().replace(/^"/,"").replace(/"$/,"")}),s={name:i},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(i,s):i in a?("PoseNode"===i?a.PoseNode.push(s):void 0!==a[i].id&&(a[i]={},a[i][a[i].id]=a[i]),""!==o.id&&(a[i][o.id]=s)):"number"==typeof o.id?(a[i]={},a[i][o.id]=s):"Properties70"!==i&&(a[i]="PoseNode"===i?[s]:s),"number"==typeof o.id&&(s.id=o.id),""!==o.name&&(s.attrName=o.name),""!==o.type&&(s.attrType=o.type),this.pushStack(s)}parseNodeAttr(e){let t=e[0];""!==e[0]&&(t=parseInt(e[0]),isNaN(t)&&(t=e[0]));let i="",r="";return e.length>1&&(i=e[1].replace(/^(\w+)::/,""),r=e[2]),{id:t,name:i,type:r}}parseNodeProperty(e,t,i){let r=t[1].replace(/^"/,"").replace(/"$/,"").trim(),s=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===s&&(s=i.replace(/"/g,"").replace(/,$/,"").trim());const o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){const l=s.split(",").slice(1),c=parseInt(l[0]),u=parseInt(l[1]);let h=s.split(",").slice(3);h=h.map(function(d){return d.trim().replace(/^"/,"")}),r="connections",s=[c,u],function aZ(n,e){for(let t=0,i=n.length,r=e.length;t<r;t++,i++)n[i]=e[t]}(s,h),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=s),r in o&&Array.isArray(o[r])?o[r].push(s):"a"!==r?o[r]=s:o.a=s,this.setCurrentProp(o,r),"a"===r&&","!==s.slice(-1)&&(o.a=Gb(s))}else this.parseNodeSpecialProperty(e,r,s)}parseNodePropertyContinued(e){const t=this.getCurrentNode();t.a+=e,","!==e.slice(-1)&&(t.a=Gb(t.a))}parseNodeSpecialProperty(e,t,i){const r=i.split('",').map(function(u){return u.trim().replace(/^\"/,"").replace(/\s/,"_")}),s=r[0],o=r[1],a=r[2],l=r[3];let c=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":c=parseFloat(c);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":c=Gb(c)}this.getPrevNode()[s]={type:o,type2:a,flag:l,value:c},this.setCurrentProp(this.getPrevNode(),s)}}class nZ{parse(e){const t=new PR(e);t.skip(23);const i=t.getUint32();if(i<6400)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+i);const r=new IR;for(;!this.endOfContent(t);){const s=this.parseNode(t,i);null!==s&&r.add(s.name,s)}return r}endOfContent(e){return e.size()%16==0?(e.getOffset()+160+16&-16)>=e.size():e.getOffset()+160+16>=e.size()}parseNode(e,t){const i={},r=t>=7500?e.getUint64():e.getUint32(),s=t>=7500?e.getUint64():e.getUint32();t>=7500?e.getUint64():e.getUint32();const o=e.getUint8(),a=e.getString(o);if(0===r)return null;const l=[];for(let d=0;d<s;d++)l.push(this.parseProperty(e));const c=l.length>0?l[0]:"",u=l.length>1?l[1]:"",h=l.length>2?l[2]:"";for(i.singleProperty=1===s&&e.getOffset()===r;r>e.getOffset();){const d=this.parseNode(e,t);null!==d&&this.parseSubNode(a,i,d)}return i.propertyList=l,"number"==typeof c&&(i.id=c),""!==u&&(i.attrName=u),""!==h&&(i.attrType=h),""!==a&&(i.name=a),i}parseSubNode(e,t,i){if(!0===i.singleProperty){const r=i.propertyList[0];Array.isArray(r)?(t[i.name]=i,i.a=r):t[i.name]=r}else if("Connections"===e&&"C"===i.name){const r=[];i.propertyList.forEach(function(s,o){0!==o&&r.push(s)}),void 0===t.connections&&(t.connections=[]),t.connections.push(r)}
1else if("Properties70"===i.name)Object.keys(i).forEach(function(s){t[s]=i[s]});else if("Properties70"===e&&"P"===i.name){let r=i.propertyList[0],s=i.propertyList[1];const o=i.propertyList[2],a=i.propertyList[3];let l;0===r.indexOf("Lcl ")&&(r=r.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),l="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[i.propertyList[4],i.propertyList[5],i.propertyList[6]]:i.propertyList[4],t[r]={type:s,type2:o,flag:a,value:l}}else void 0===t[i.name]?"number"==typeof i.id?(t[i.name]={},t[i.name][i.id]=i):t[i.name]=i:"PoseNode"===i.name?(Array.isArray(t[i.name])||(t[i.name]=[t[i.name]]),t[i.name].push(i)):void 0===t[i.name][i.id]&&(t[i.name][i.id]=i)}parseProperty(e){const t=e.getString(1);let i;switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":return i=e.getUint32(),e.getArrayBuffer(i);case"S":return i=e.getUint32(),e.getString(i);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":const r=e.getUint32(),s=e.getUint32(),o=e.getUint32();if(0===s)switch(t){case"b":case"c":return e.getBooleanArray(r);case"d":return e.getFloat64Array(r);case"f":return e.getFloat32Array(r);case"i":return e.getInt32Array(r);case"l":return e.getInt64Array(r)}const a=Rm(new Uint8Array(e.getArrayBuffer(o))),l=new PR(a.buffer);switch(t){case"b":case"c":return l.getBooleanArray(r);case"d":return l.getFloat64Array(r);case"f":return l.getFloat32Array(r);case"i":return l.getInt32Array(r);case"l":return l.getInt64Array(r)}break;default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}}class PR{constructor(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t,this._textDecoder=new TextDecoder}getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(e){this.offset+=e}getBoolean(){return 1==(1&this.getUint8())}getBooleanArray(e){const t=[];for(let i=0;i<e;i++)t.push(this.getBoolean());return t}getUint8(){const e=this.dv.getUint8(this.offset);return this.offset+=1,e}getInt16(){const e=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}getInt32(){const e=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}getInt32Array(e){const t=[];for(let i=0;i<e;i++)t.push(this.getInt32());return t}getUint32(){const e=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}getInt64(){let e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),2147483648&t?(t=4294967295&~t,e=4294967295&~e,4294967295===e&&(t=t+1&4294967295),e=e+1&4294967295,-(4294967296*t+e)):4294967296*t+e}getInt64Array(e){const t=[];for(let i=0;i<e;i++)t.push(this.getInt64());return t}getUint64(){let e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),4294967296*t+e}getFloat32(){const e=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}getFloat32Array(e){const t=[];for(let i=0;i<e;i++)t.push(this.getFloat32());return t}getFloat64(){const e=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}getFloat64Array(e){const t=[];for(let i=0;i<e;i++)t.push(this.getFloat64());return t}getArrayBuffer(e){const t=this.dv.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t}getString(e){const t=this.offset;let i=new Uint8Array(this.dv.buffer,t,e);this.skip(e);const r=i.indexOf(0);return r>=0&&(i=new Uint8Array(this.dv.buffer,t,r)),this._textDecoder.decode(i)}}class IR{add(e,t){this[e]=t}}function RR(n){const t=n.match(/FBXVersion: (\d+)/);if(t)return parseInt(t[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function sZ(n){return n/46186158e3}const oZ=[];function Nm(n,e,t,i){let r;switch(i.mappingType){case"ByPolygonVertex":r=n;break;case"ByPolygon":r=e;break;case"ByVertice":r=t;break;case"AllSame":r=i.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+i.mappingType)}"IndexToDirect"===i.referenceType&&(r=i.indices[r]);const s=r*i.dataSize;return function lZ(n,e,t,i){for(let r=t,s=0;r<i;r++,s++)n[s]=e[r];return n}(oZ,i.buffer,s,s+i.dataSize)}const Hb=new yi,Vc=new R;function OR(n){const e=new De,t=new De,i=new De,r=new De,s=new De,o=new De,a=new De,l=new De,c=new De,u=new De,h=new De,d=new De,f=n.inheritType?n.inheritType:0;n.translation&&e.setPosition(Vc.fromArray(n.translation));const p=Wh(0);if(n.preRotation){const F=n.preRotation.map(vi_degToRad);F.push(p),t.makeRotationFromEuler(Hb.fromArray(F))}if(n.rotation){const F=n.rotation.map(vi_degToRad);F.push(n.eulerOrder||p),i.makeRotationFromEuler(Hb.fromArray(F))}if(n.postRotation){const F=n.postRotation.map(vi_degToRad);F.push(p),r.makeRotationFromEuler(Hb.fromArray(F)),r.invert()}n.scale&&s.scale(Vc.fromArray(n.scale)),n.scalingOffset&&a.setPosition(Vc.fromArray(n.scalingOffset)),n.scalingPivot&&o.setPosition(Vc.fromArray(n.scalingPivot)),n.rotationOffset&&l.setPosition(Vc.fromArray(n.rotationOffset)),n.rotationPivot&&c.setPosition(Vc.fromArray(n.rotationPivot)),n.parentMatrixWorld&&(h.copy(n.parentMatrix),u.copy(n.parentMatrixWorld));const _=t.clone().multiply(i).multiply(r),g=new De;g.extractRotation(u);const m=new De;m.copyPosition(u);const v=m.clone().invert().multiply(u),y=g.clone().invert().multiply(v),b=s,T=new De;if(0===f)T.copy(g).multiply(_).multiply(y).multiply(b);else if(1===f)T.copy(g).multiply(y).multiply(_).multiply(b);else{const V=(new De).scale((new R).setFromMatrixScale(h)).clone().invert(),z=y.clone().multiply(V);T.copy(g).multiply(_).multiply(z).multiply(b)}const S=c.clone().invert(),P=o.clone().invert();let I=e.clone().multiply(l).multiply(c).multiply(t).multiply(i).multiply(r).multiply(S).multiply(a).multiply(o).multiply(s).multiply(P);const w=(new De).copyPosition(I),M=u.clone().multiply(w);return d.copyPosition(M),I=d.clone().multiply(T),I.premultiply(u.invert()),I}function Wh(n){const e=["ZYX","YZX","XZY","ZXY","YXZ","XYZ"];return 6===(n=n||0)?(console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."),e[0]):e[n]}function Gb(n){return n.split(",").map(function(t){return parseFloat(t)})}function LR(n,e,t){return void 0===e&&(e=0),void 0===t&&(t=n.byteLength),(new TextDecoder).decode(new Uint8Array(n,e,t))}const cZ=["rendererContainer"];function uZ(n,e){if(1&n&&(C(0,"div",11)(1,"p",12),A(2),x(),C(3,"p",12),A(4),x(),C(5,"p",12),A(6),x()()),2&n){const t=ze();B(2),$e(t.resources.userInfoZoom),B(2),$e(t.resources.userInfoRotate),B(2),$e(t.resources.userInfoMove)}}function hZ(n,e){if(1&n&&(C(0,"div",13),ge(1,"div",14),C(2,"span",15),A(3),x()()),2&n){const t=ze();B(3),$e(t.loadingPercent)}}let dZ=(()=>{class n{constructor(t,i,r){this.ngZone=t,this.resourcesService=i,this.langService=r,this.modelUrl="",this.isLoading=!1,this.loadingPercent="",this.showInfo=!1,this.resources={},this.langSub=new Bt}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("three-d",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)})}ngAfterViewInit(){this.initScene(),this.loadFBXModel(),this.animate()}initScene(){this.scene=new tP,this.scene.position.y-=35,this.scene.background=new me("#f2f2f4"),this.camera=new ti(45,this.rendererContainer.nativeElement.offsetWidth/this.rendererContainer.nativeElement.offsetHeight,.5,1e3),this.camera.position.z+=250,this.camera.position.x-=50,this.renderer=new gX,this.renderer.setSize(this.rendererContainer.nativeElement.offsetWidth,this.rendererContainer.nativeElement.offsetHeight),this.ambientLight=new cb(16777215,1.7),this.scene.add(this.ambientLight),this.controls=new vX(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.target.set(0,1,0),this.rendererContainer.nativeElement.appendChild(this.renderer.domElement)}loadFBXModel(){this.isLoading=!0,this.loader=new KX,this.loader.load(this.modelUrl,t=>{this.isLoading=!1,this.scene.add(t)},t=>{this.loadingPercent=`${(t.loaded/t.total*100).toFixed(0)}% `},t=>{this.isLoading=!1,console.log(t)})}animate(){this.ngZone.runOutsideAngular(()=>{const t=()=>{requestAnimationFrame(t),this.renderer.render(this.scene,this.camera)};t()})}onInfoClick(){this.showInfo=!this.showInfo}zoomIn(){console.log("Zoom in"),this.camera.zoom+=.1,this.camera.updateProjectionMatrix()}zoomOut(){console.log("Zoom out"),this.camera.zoom-=.1,this.camera.updateProjectionMatrix()}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(Jn),Y(dr),Y(Yi))}
1,n.\u0275cmp=Zt({type:n,selectors:[["app-three-d"]],viewQuery:function(t,i){if(1&t&&Ou(cZ,5),2&t){let r;oa(r=aa())&&(i.rendererContainer=r.first)}},inputs:{modelUrl:"modelUrl"},decls:11,vars:2,consts:[[1,"three-d-wrapper"],[1,"user-info"],["class","user-info__popup",4,"ngIf"],["aria-label","User info",1,"user-info__btn",3,"click"],["width","113","height","113","viewBox","0 0 113 113","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M56.3673 112.26C25.1945 112.26 0 87.0617 0 56.2008C0 46.1498 2.70449 36.3818 7.8288 27.7465C8.39816 26.8971 9.39457 26.614 10.2486 27.1803C11.1027 27.7465 11.3874 28.7374 10.818 29.5868C5.97836 37.6559 3.55854 46.8576 3.55854 56.2008C3.55854 85.2214 27.3296 108.721 56.3673 108.721C85.5474 108.721 109.176 85.0798 109.176 56.2008C109.176 27.1803 85.4051 3.68062 56.3673 3.68062C43.2719 3.68062 30.7458 8.49379 21.0666 17.1292C20.3549 17.837 19.2161 17.6955 18.5044 16.9876C17.7927 16.2798 17.9351 15.1473 18.6468 14.4395C29.0377 5.09627 42.4179 0 56.3673 0C87.5402 0 112.735 25.1983 112.735 56.0592C112.877 87.0617 87.5402 112.26 56.3673 112.26Z","fill","#2a383c"],["d","M71.5977 93.1487H44.8375C41.5636 93.1487 38.7168 90.4591 38.7168 87.0615V85.929C38.7168 82.6731 41.4213 79.8417 44.8375 79.8417H50.5311V50.1133H44.8375C41.5636 50.1133 38.7168 47.4236 38.7168 44.0261V42.8936C38.7168 39.6377 41.4213 36.8064 44.8375 36.8064H60.0681C63.1996 36.8064 65.904 39.3545 65.904 42.6105V79.7002H71.5977C74.8716 79.7002 77.7184 82.3899 77.7184 85.7874V86.9199C77.5761 90.459 74.8716 93.1487 71.5977 93.1487ZM44.8375 83.5224C43.4141 83.5224 42.2753 84.6549 42.2753 86.0706V87.2031C42.2753 88.6187 43.4141 89.7512 44.8375 89.7512H71.5977C73.0211 89.7512 74.1599 88.6187 74.1599 87.2031V86.0706C74.1599 84.6549 73.0211 83.5224 71.5977 83.5224H61.9185L62.2032 81.5405C62.2032 81.3989 62.2032 81.2574 62.2032 81.2574V42.8936C62.2032 41.6195 61.2068 40.6286 59.9257 40.6286H44.6951C43.2717 40.6286 42.133 41.7611 42.133 43.1768V44.3093C42.133 45.7249 43.2717 46.8574 44.6951 46.8574H53.9473V81.399V81.5405L54.232 83.5224L52.2393 83.664H44.8375V83.5224Z","fill","#2a383c"],["d","M56.3672 34.1167C51.8122 34.1167 48.1113 30.436 48.1113 25.906C48.1113 21.376 51.8122 17.6953 56.3672 17.6953C60.9221 17.6953 64.623 21.376 64.623 25.906C64.623 30.436 60.9221 34.1167 56.3672 34.1167ZM56.3672 21.3759C53.805 21.3759 51.6699 23.4994 51.6699 26.0475C51.6699 28.5957 53.805 30.7192 56.3672 30.7192C58.9293 30.7192 61.0644 28.5957 61.0644 26.0475C61.0644 23.4994 58.9293 21.3759 56.3672 21.3759Z","fill","#2a383c"],["id","container3d"],["rendererContainer",""],["class","loading-indicator",4,"ngIf"],[1,"user-info__popup"],[1,"user-info__text"],[1,"loading-indicator"],[1,"loader__icon","spinner"],[1,"loading-indicator__number"]],template:function(t,i){1&t&&(C(0,"div",0)(1,"div",1),We(2,uZ,7,3,"div",2),C(3,"button",3),Ge("click",function(){return i.onInfoClick()}),dn(),C(4,"svg",4),ge(5,"path",5)(6,"path",6)(7,"path",7),x()()(),Di(),ge(8,"div",8,9),We(10,hZ,4,1,"div",10),x()),2&t&&(B(2),ne("ngIf",i.showInfo),B(8),ne("ngIf",i.isLoading))},directives:[ys],styles:[".three-d-wrapper[_ngcontent-%COMP%]{position:relative}#container3d[_ngcontent-%COMP%]{width:clamp(300px,80%,1600px);aspect-ratio:1;margin-inline:auto}@media (min-width: 40em){#container3d[_ngcontent-%COMP%]{aspect-ratio:4/3}}.loading-indicator[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1rem;background-color:var(--color-bg);z-index:1}.loading-indicator__text[_ngcontent-%COMP%]{font-size:var(--fs-36);font-weight:700}.loading-indicator__number[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:var(--fs-48);font-weight:700}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.user-info[_ngcontent-%COMP%]{--width: min(5rem, 15vw);display:flex;align-items:center;justify-content:flex-end;gap:.25rem;padding-inline:.5rem}.user-info__btn[_ngcontent-%COMP%]{background-color:transparent;padding:.5rem;border:0}.user-info__btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:var(--width);aspect-ratio:1}.user-info__popup[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;padding:1rem;border:1px solid var(--color-primary);background-color:var(--color-bg)}.user-info__text[_ngcontent-%COMP%]{max-width:65ch;font-size:var(--fs-14)}.spinner[_ngcontent-%COMP%]{display:grid;place-items:center;width:min(25%,13rem);aspect-ratio:1;padding:2rem;border:5px solid var(--color-primary);border-top:5px solid var(--color-bg);border-radius:50%;animation:spin 3s linear infinite}"]}),n})(),fZ=(()=>{class n{constructor(t){this.sanitizer=t}transform(t){return t?this.sanitizer.bypassSecurityTrustHtml(t):""}}return n.\u0275fac=function(t){return new(t||n)(Y(RT,16))},n.\u0275pipe=Si({name:"safeHtml",type:n,pure:!0}),n})();function pZ(n,e){if(1&n){const t=Hn();C(0,"app-slider-fullscreen",18),Ge("exitFullscreen",function(){return hn(t),ze().onExitFullscreen()}),x()}2&n&&ne("slides",ze().itemFiles)}function mZ(n,e){1&n&&(C(0,"span"),A(1,","),x())}function gZ(n,e){if(1&n&&(C(0,"span",29),A(1),x()),2&n){const t=ze(2);B(1),St(" ",t.item.date,"")}}function _Z(n,e){if(1&n&&(C(0,"p",30),A(1),x()),2&n){const t=ze(2);B(1),St(" ",t.resources.descriptionLabel," ")}}function vZ(n,e){1&n&&(ge(0,"div",31),Wd(1,"safeHtml")),2&n&&ne("innerHTML",jd(1,1,ze(2).item.description),i_)}function yZ(n,e){if(1&n&&(C(0,"div",32)(1,"p",33),A(2),x(),ge(3,"div",34),Wd(4,"safeHtml"),x()),2&n){const t=e.$implicit;B(2),$e(t.propertyLabel),B(1),ne("innerHTML",jd(4,2,t.propertyValue),i_)}}function bZ(n,e){if(1&n&&(dn(),Di(),C(0,"div",19)(1,"div",20)(2,"h1",21),A(3),We(4,mZ,2,0,"span",22),We(5,gZ,2,1,"span",23),x(),C(6,"p",24),A(7),x(),We(8,_Z,2,1,"p",25),We(9,vZ,2,3,"div",26),x(),C(10,"aside",27),We(11,yZ,5,4,"div",28),x()()),2&n){const t=ze();B(3),St(" ",t.item.title,""),B(1),ne("ngIf",t.item.title&&t.item.date),B(1),ne("ngIf",t.item.date),B(2),$e(t.item.creator),B(1),ne("ngIf",t.item.description),B(1),ne("ngIf",t.item.description),B(2),ne("ngForOf",t.item.fullProperties)}}function xZ(n,e){1&n&&ge(0,"app-three-d",37),2&n&&ne("modelUrl",e.$implicit.viewUrl)}function wZ(n,e){if(1&n&&(dn(),Di(),C(0,"div",35),We(1,xZ,1,1,"app-three-d",36),x()),2&n){const t=ze();B(1),ne("ngForOf",t.item3dFiles)}}let MZ=(()=>{class n{constructor(t,i,r,s,o){this.route=t,this.dataService=i,this.socialShareService=r,this.resourcesService=s,this.langService=o,this.resources={},this.langSub=new Bt,this.containerSub=new Bt,this.dataStreamSub=new Bt,this.threeDSub=new Bt,this.itemFiles=[],this.item3dFiles=[],this.noResults=!1,this.isFullscreen=!1,this.isSharing=!1,this.shareUrl="https://your-website-url.com"}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(i=>this.resourcesService.getResources("artwork-single",i))).subscribe({next:i=>{this.resources=i},error:i=>console.log(i)});
1const t=this.route.snapshot.paramMap.get("uuid");t&&(this.fetchContainer(t),this.fetchDataStreams(t),this.fetch3dFiles(t))}fetchContainer(t){this.containerSub=this.dataService.getContainer(t).subscribe({next:i=>{var r,s,o,a,l,c,u,h,d,f,p,_,g,m,v,y,b;this.noResults=!1;const T={title:null!==(o=null===(s=null===(r=i.properties)||void 0===r?void 0:r.find(S=>"p:syllogi-titlos"===S.property.slug))||void 0===s?void 0:s.valueAsText)&&void 0!==o?o:"",creator:null!==(c=null===(l=null===(a=i.properties)||void 0===a?void 0:a.find(S=>"p:p:syllogi-dhmioyrgos"===S.property.slug))||void 0===l?void 0:l.valueAsText)&&void 0!==c?c:"",date:null!==(d=null===(h=null===(u=i.properties)||void 0===u?void 0:u.find(S=>"p:p:syllogi-xronologia"===S.property.slug))||void 0===h?void 0:h.valueAsText)&&void 0!==d?d:"",description:null!==(_=null===(p=null===(f=i.properties)||void 0===f?void 0:f.find(S=>"p:p:vasika-perigrafh"===S.property.slug))||void 0===p?void 0:p.valueAsText)&&void 0!==_?_:"",uuid:i.uuid,imageSrc:(null===(g=i.coverFile)||void 0===g?void 0:g.viewUrl)?null===(m=i.coverFile)||void 0===m?void 0:m.viewUrl:"/assets/images/default-image.png",imageAlt:(null===(v=i.coverFile)||void 0===v?void 0:v.filename)?null===(y=i.coverFile)||void 0===y?void 0:y.filename:"Default image",fullProperties:null===(b=i.properties)||void 0===b?void 0:b.map(S=>({propertyLabel:S.property.name,propertyValue:S.valueAsText}))};this.item=T},error:i=>this.noResults=!0})}fetchDataStreams(t){this.dataStreamSub=this.dataService.getDataStreams(t).subscribe({next:i=>{this.itemFiles=i.content.map(r=>r.bitstreamFile).filter(r=>"application/octet-stream"!==r.mimeType)},error:i=>console.log(i)})}fetch3dFiles(t){this.threeDSub=this.dataService.getDataStreams(t).subscribe({next:i=>{this.item3dFiles=i.content.map(r=>r.bitstreamFile).filter(r=>"application/octet-stream"===r.mimeType)},error:i=>console.log(i)})}onClickFullscreen(){this.isFullscreen=!0}onExitFullscreen(){this.isFullscreen=!1}onClickSocialShare(){}shareOnFacebook(){this.socialShareService.shareOnFacebook(this.shareUrl)}shareOnTwitter(){this.socialShareService.shareOnTwitter(this.shareUrl,"\u039c\u03bf\u03c5\u03c3\u03b5\u03af\u03bf \u039d\u03b5\u03bf\u03b5\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae\u03c2 \u03a4\u03ad\u03c7\u03bd\u03b7\u03c2 \u03a1\u03cc\u03b4\u03bf\u03c5")}shareOnLinkedIn(){this.socialShareService.shareOnLinkedIn(this.shareUrl,"\u039c\u03bf\u03c5\u03c3\u03b5\u03af\u03bf \u039d\u03b5\u03bf\u03b5\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae\u03c2 \u03a4\u03ad\u03c7\u03bd\u03b7\u03c2 \u03a1\u03cc\u03b4\u03bf\u03c5","")}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe(),this.containerSub&&this.containerSub.unsubscribe(),this.dataStreamSub&&this.dataStreamSub.unsubscribe(),this.threeDSub&&this.threeDSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(ma),Y(a0),Y(T7),Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-artwork-single"]],decls:22,vars:5,consts:[[3,"slides","exitFullscreen",4,"ngIf"],[1,"single"],[1,"single__top"],[1,"cont-lg"],["routerLink","/artworks",1,"single__back-btn"],["width","28","height","16","viewBox","0 0 28 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M27 9C27.5523 9 28 8.55228 28 8C28 7.44772 27.5523 7 27 7L27 9ZM0.292894 7.29289C-0.0976295 7.68342 -0.0976296 8.31658 0.292894 8.7071L6.65685 15.0711C7.04738 15.4616 7.68054 15.4616 8.07107 15.0711C8.46159 14.6805 8.46159 14.0474 8.07107 13.6569L2.41422 8L8.07107 2.34314C8.46159 1.95262 8.46159 1.31945 8.07107 0.928931C7.68054 0.538406 7.04738 0.538406 6.65686 0.92893L0.292894 7.29289ZM27 7L1 7L1 9L27 9L27 7Z","fill","#2a383c"],[1,"single__hero","cont-lg"],[3,"slides"],[1,"user-actions"],["aria-label","Fullscreen mode",1,"user-actions__zoom-btn",3,"click"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["clip-path","url(#clip0_176_940)"],["d","M15.5 14H14.71L14.43 13.73C15.41 12.59 16 11.11 16 9.5C16 5.91 13.09 3 9.5 3C5.91 3 3 5.91 3 9.5C3 13.09 5.91 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5C5 7.01 7.01 5 9.5 5C11.99 5 14 7.01 14 9.5C14 11.99 11.99 14 9.5 14ZM10 7H9V9H7V10H9V12H10V10H12V9H10V7Z","fill","#010000"],["id","clip0_176_940"],["width","24","height","24","fill","white"],["class","single__content cont-lg",4,"ngIf"],["class","wrapper-three",4,"ngIf"],[3,"slides","exitFullscreen"],[1,"single__content","cont-lg"],[1,"single__main"],[1,"single__title"],[4,"ngIf"],["class","single__date",4,"ngIf"],[1,"single__creator"],["class","single__description-label",4,"ngIf"],["class","single__description",3,"innerHTML",4,"ngIf"],[1,"single__aside"],["class","single__item-info",4,"ngFor","ngForOf"],[1,"single__date"],[1,"single__description-label"],[1,"single__description",3,"innerHTML"],[1,"single__item-info"],[1,"single__property-label"],[1,"single__property-value",3,"innerHTML"],[1,"wrapper-three"],[3,"modelUrl",4,"ngFor","ngForOf"],[3,"modelUrl"]],template:function(t,i){1&t&&(We(0,pZ,1,1,"app-slider-fullscreen",0),C(1,"section")(2,"div",1)(3,"div",2)(4,"div",3)(5,"a",4),dn(),C(6,"svg",5),ge(7,"path",6),x(),Di(),C(8,"span"),A(9),x()()()(),C(10,"div",7),ge(11,"app-image-slider",8),C(12,"div",9)(13,"button",10),Ge("click",function(){return i.onClickFullscreen()}),dn(),C(14,"svg",11)(15,"g",12),ge(16,"path",13),x(),C(17,"defs")(18,"clipPath",14),ge(19,"rect",15),x()()()()()()(),We(20,bZ,12,7,"div",16),x(),We(21,wZ,2,1,"div",17)),2&t&&(ne("ngIf",i.itemFiles.length>0&&i.isFullscreen),B(9),$e(i.resources.backBtnlabel),B(2),ne("slides",i.itemFiles),B(9),ne("ngIf",i.item),B(1),ne("ngIf",i.item3dFiles.length>0))},directives:[ys,O7,Yr,B7,vs,dZ],pipes:[fZ],styles:[".single[_ngcontent-%COMP%]{padding-block:var(--rds-1);background-color:var(--color-bg)}.single__no-results-text[_ngcontent-%COMP%]{font-size:var(--fs-24);font-weight:700}@media (min-width: 50.001em){.single[_ngcontent-%COMP%]{padding-block:var(--rds-5)}}.single__top[_ngcontent-%COMP%]{padding-block:.75rem}.single__back-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:fit-content;font-size:var(--fs-16);color:var(--color-text);transition:gap .2s linear}.single__back-btn[_ngcontent-%COMP%]:hover{gap:1.25rem}.single__hero[_ngcontent-%COMP%]{position:relative}.single__img-wrapper[_ngcontent-%COMP%]{padding:1rem 1rem 2rem;overflow:hidden}@media (min-width: 40.001em){.single__img-wrapper[_ngcontent-%COMP%]{padding:2rem 2rem 3rem}}.single__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-inline:auto}@media (min-width: 65.001em){.single__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:80%}}@media (min-width: 100.001em){.single__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:70%}}.single__content[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;grid-row-gap:2rem;row-gap:2rem;padding-block:var(--rds-5) var(--rds-10)}@media (min-width: 60.001em){.single__content[_ngcontent-%COMP%]{grid-template-columns:2fr 1fr;column-gap:2rem}}.single__title[_ngcontent-%COMP%]{font-size:var(--fs-48);font-weight:700;color:var(--color-primary-light);margin-bottom:.5rem}.single__date[_ngcontent-%COMP%]{font-weight:400;font-style:italic}
1.single__creator[_ngcontent-%COMP%]{font-family:var(--ff-secondary);font-size:var(--fs-32);font-weight:400;color:var(--color-text);margin-bottom:4rem}.single__description-label[_ngcontent-%COMP%]{margin-bottom:.5rem;color:var(--color-text-light)}.single__aside[_ngcontent-%COMP%]{padding:2rem;background-color:var(--color-bg)}.single__item-info[_ngcontent-%COMP%]{margin-bottom:1.5rem}.single__property-label[_ngcontent-%COMP%], .single__property-value[_ngcontent-%COMP%]{font-size:var(--fs-16)}.single__property-label[_ngcontent-%COMP%]{color:var(--color-secondary)}.fullscreen[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:var(--color-black);display:grid;place-items:center;z-index:1000}.fullscreen__img-wrapper[_ngcontent-%COMP%]{padding:var(--rds-5);overflow:hidden}.fullscreen__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-inline:auto;object-fit:contain}.fullscreen__close-btn[_ngcontent-%COMP%]{position:absolute;right:var(--rds-2);top:var(--rds-2);background-color:transparent;border:0}.user-actions[_ngcontent-%COMP%]{position:absolute;bottom:4rem;right:0;display:flex;flex-direction:column}@media (min-width: 65.001em){.user-actions[_ngcontent-%COMP%]{bottom:2rem}}.user-actions__share-btn[_ngcontent-%COMP%], .user-actions__zoom-btn[_ngcontent-%COMP%]{display:grid;place-items:center;padding:.5rem;border:1.5px solid var(--color-primary);background-color:transparent;transition:background-color .2s ease-in-out}.user-actions__share-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%], .user-actions__zoom-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{transition:fill .2s ease-in-out}.user-actions__share-btn[_ngcontent-%COMP%]:hover, .user-actions__zoom-btn[_ngcontent-%COMP%]:hover{background-color:var(--color-primary)}.user-actions__share-btn[_ngcontent-%COMP%]:hover svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%], .user-actions__zoom-btn[_ngcontent-%COMP%]:hover svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:var(--color-white)}.user-actions__share-btn[_ngcontent-%COMP%]{border-bottom:0}.social-share[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:var(--color-black);width:min(90%,50rem);padding:var(--rds-4) --rds-2;z-index:1000}.wrapper-three[_ngcontent-%COMP%]{width:100%;background-color:var(--color-bg);margin-bottom:var(--rds-6)}"]}),n})();function CZ(n,e){if(1&n&&(C(0,"p",8),A(1),x()),2&n){const t=e.$implicit;B(1),St(" ",t," ")}}let SZ=(()=>{class n{constructor(t,i){this.resourcesService=t,this.langService=i,this.resources={},this.langSub=new Bt}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("about",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)})}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-about"]],decls:9,vars:2,consts:[[1,"hero"],[1,"hero__content"],[1,"hero__title"],[1,"about","cont-xs"],[1,"about__text-container"],["class","about__text",4,"ngFor","ngForOf"],[1,"about__espa-banner"],["src","/assets/images/espa-banner-mpa.jpg","alt","ESPA logo"],[1,"about__text"]],template:function(t,i){1&t&&(C(0,"section",0)(1,"div",1)(2,"h1",2),A(3),x()()(),C(4,"section",3)(5,"div",4),We(6,CZ,2,1,"p",5),x(),C(7,"div",6),ge(8,"img",7),x()()),2&t&&(B(3),$e(i.resources.title),B(3),ne("ngForOf",i.resources.textArray))},directives:[vs],styles:[".hero[_ngcontent-%COMP%]{background-color:var(--color-bg);padding-block:var(--rds-5)}.hero__title[_ngcontent-%COMP%]{margin-bottom:1rem;margin-inline:auto;font-weight:700;max-width:50ch;text-align:center}.about[_ngcontent-%COMP%]{padding-block:var(--rds-5)}.about__text[_ngcontent-%COMP%]{margin-bottom:var(--rds-1)}.about__espa-banner[_ngcontent-%COMP%]{width:fit-content;margin-block:var(--rds-5) var(--rds-1);margin-inline:auto}.about__espa-banner[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:clamp(17rem,13.4rem + 18vw,35rem);object-fit:contain}"]}),n})(),EZ=(()=>{class n{constructor(){this.imgSrc="/assets/images/default.jpg",this.title="Default title",this.linkUrl=["/"],this.linkText="\u0394\u03b5\u03af\u03c4\u03b5"}ngOnInit(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["app-application-card"]],inputs:{imgSrc:"imgSrc",title:"title",linkUrl:"linkUrl",linkText:"linkText"},decls:8,vars:5,consts:[[1,"app-card",3,"routerLink"],[1,"app-card__img-wrapper"],[3,"src","alt"],[1,"app-card__content"],[1,"app-card__title"],[1,"app-card__link"]],template:function(t,i){1&t&&(C(0,"a",0)(1,"div",1),ge(2,"img",2),x(),C(3,"div",3)(4,"p",4),A(5),x(),C(6,"p",5),A(7),x()()()),2&t&&(ne("routerLink",i.linkUrl),B(2),ne("src",i.imgSrc,us)("alt",i.title),B(3),$e(i.title),B(2),$e(i.linkText))},directives:[Yr],styles:["[_nghost-%COMP%]{border-bottom:1px solid var(--color-grey)}[_nghost-%COMP%]:first-child{border-top:1px solid var(--color-grey)}.app-card[_ngcontent-%COMP%]{display:grid;padding-block:1rem;cursor:pointer;transition:background-color .2s ease-in-out}.app-card[_ngcontent-%COMP%]:hover{background-color:var(--color-bg)}@media (min-width: 50.001em){.app-card[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr;grid-auto-rows:1fr}}.app-card__img-wrapper[_ngcontent-%COMP%]{height:min(15rem,30vh);overflow:hidden}@media (min-width: 50.001em){.app-card__img-wrapper[_ngcontent-%COMP%]{height:25rem}}.app-card__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:50% 20%}.app-card__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-evenly;gap:1rem;padding:var(--rds-4) var(--rds-5)}.app-card__title[_ngcontent-%COMP%]{font-family:var(--ff-secondary);font-size:var(--fs-32);font-weight:700;line-height:1.1}.app-card__link[_ngcontent-%COMP%]{font-size:var(--fs-16)}"]}),n})();const TZ=function(){return["/applications/guide-360"]},AZ=function(){return["/applications/ar-applications"]},DZ=function(){return["/applications/games"]};let PZ=(()=>{class n{constructor(t,i){this.resourcesService=t,this.langService=i,this.resources={},this.langSub=new Bt}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("applications",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)})}ngOnDestroy(){this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-applications"]],decls:11,vars:17,consts:[[1,"hero"],[1,"hero__content","cont"],[1,"hero__title"],[1,"hero__subtitle"],[1,"section","apps","cont-lg"],[1,"apps__content"],[3,"title","imgSrc","linkUrl","linkText"]],template:function(t,i){if(1&t&&(C(0,"section",0)(1,"div",1)(2,"h1",2),A(3),x(),C(4,"p",3),A(5),x()()(),C(6,"section",4)(7,"div",5),ge(8,"app-application-card",6)(9,"app-application-card",6)(10,"app-application-card",6),x()()),2&t){let r,s,o,a,l,c;B(3),$e(i.resources.title),B(2),St(" ",i.resources.text," "),B(3),ne("title",null!==(r=i.resources.cardTitleVr)&&void 0!==r?r:"")("imgSrc","/assets/images/360-web-app.jpg")("linkUrl",Wr(14,TZ))("linkText",null!==(s=i.resources.cardBtnLabel)&&void 0!==s?s:""),B(1),ne("title",null!==(o=i.resources.cardTitleAr)&&void 0!==o?o:"")("imgSrc","/assets/images/ar-apps.jpg")("linkUrl",Wr(15,AZ))("linkText",null!==(a=i.resources.cardBtnLabel)&&void 0!==a?a:""),B(1),ne("title",null!==(l=i.resources.cardTitleGames)&&void 0!==l?l:"")("imgSrc","/assets/images/games.jpg")("linkUrl",Wr(16,DZ))("linkText",null!==(c=i.resources.cardBtnLabel)&&void 0!==c?c:"")}},directives:[EZ],styles:[".hero[_ngcontent-%COMP%]{background-color:var(--color-bg);padding-block:var(--rds-5)}.hero__title[_ngcontent-%COMP%]{font-size:var(--fs-48);font-weight:400;text-align:center;margin-bottom:var(--rds-2);max-width:50ch;margin-inline:auto}.hero__subtitle[_ngcontent-%COMP%]{text-align:center;max-width:100ch;margin-inline:auto}.apps__text[_ngcontent-%COMP%]{max-width:100ch}.apps__content[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;margin-bottom:var(--rds-6)}"]}),n})();const IZ=function(n){return[n]};let RZ=(()=>{class n{constructor(){this.imgUrl="",this.title="",this.description="",this.linkUrl="",this.linkText=""}ngOnInit(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["app-game-card"]],inputs:{imgUrl:"imgUrl",title:"title",description:"description",linkUrl:"linkUrl",linkText:"linkText"},decls:10,vars:8,consts:[["target","_blank",1,"game-card",3,"href"],[1,"game-card__img-wrapper"],[3,"src","alt"],[1,"game-card__content"],[1,"game-card__title"],[1,"game-card__description"]],template:function(t,i){1&t&&(C(0,"a",0)(1,"div",1),ge(2,"img",2),x(),C(3,"div",3)(4,"p",4),A(5),x(),C(6,"p",5),A(7),x(),C(8,"button"),A(9),x()()()),2&t&&(ne("href",Cn(6,IZ,i.linkUrl),us),B(2),ne("src",i.imgUrl,us)("alt",i.title),B(3),$e(i.title),B(2),$e(i.description),B(2),$e(i.linkText))},styles:[".game-card[_ngcontent-%COMP%]{width:100%;aspect-ratio:1.25}.game-card[_ngcontent-%COMP%]:hover .game-card__link-wrapper[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:.25rem}.game-card__img-wrapper[_ngcontent-%COMP%]{width:100%;aspect-ratio:1.5}.game-card__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.game-card__content[_ngcontent-%COMP%]{padding-block:var(--rds-2)}.game-card__title[_ngcontent-%COMP%]{font-family:var(--ff-secondary);font-size:var(--fs-36);font-weight:700;line-height:1.1;margin-bottom:1rem}.game-card__description[_ngcontent-%COMP%]{margin-bottom:.5rem}.game-card[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:var(--fs-16);padding-block:.5rem;border:0;background-color:transparent;transform:translateY(50%);transition:background-color .2s ease-in-out}"]}),n})();function OZ(n,e){if(1&n&&ge(0,"app-game-card",15),2&n){const t=e.$implicit,i=ze();let r;ne("imgUrl",t.imgUrl)("title",t.title)("description",t.description)("linkUrl",t.linkUrl)("linkText",null!==(r=i.resources.linkText)&&void 0!==r?r:"")}}let LZ=(()=>{class n{constructor(t,i){this.resourcesService=t,this.langService=i,this.resources={},this.langSub=new Bt}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("games",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)})}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-games"]],decls:19,vars:4,consts:[[1,"hero"],[1,"cont-lg"],["routerLink","/applications",1,"hero__back-btn"],["width","28","height","16","viewBox","0 0 28 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M27 9C27.5523 9 28 8.55228 28 8C28 7.44772 27.5523 7 27 7L27 9ZM0.292894 7.29289C-0.0976295 7.68342 -0.0976296 8.31658 0.292894 8.7071L6.65685 15.0711C7.04738 15.4616 7.68054 15.4616 8.07107 15.0711C8.46159 14.6805 8.46159 14.0474 8.07107 13.6569L2.41422 8L8.07107 2.34314C8.46159 1.95262 8.46159 1.31945 8.07107 0.928931C7.68054 0.538406 7.04738 0.538406 6.65686 0.92893L0.292894 7.29289ZM27 7L1 7L1 9L27 9L27 7Z","fill","#2a383c"],[1,"hero__content","cont-xs"],[1,"hero__title"],[1,"hero__img-wrapper"],["src","/assets/images/games.jpg","alt","Digital games"],[1,"games","cont-lg","m-t-2"],[1,"games__list"],[3,"imgUrl","title","description","linkUrl","linkText",4,"ngFor","ngForOf"],[1,"m-b-6","cont-sm"],[1,"games__title","m-b-2"],["src","https://www.youtube.com/embed/IupWhxN-JP4?si=RmHkXztQlrSm8On_&rel=0;","title","YouTube video player","frameborder","0","allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share","allowfullscreen","",1,"games__video"],[3,"imgUrl","title","description","linkUrl","linkText"]],template:function(t,i){1&t&&(C(0,"section",0)(1,"div",1)(2,"a",2),dn(),C(3,"svg",3),ge(4,"path",4),x(),Di(),C(5,"span"),A(6),x()()(),C(7,"div",5)(8,"h1",6),A(9),x(),C(10,"div",7),ge(11,"img",8),x()()(),C(12,"section",9)(13,"div",10),We(14,OZ,1,5,"app-game-card",11),x()(),C(15,"section",12)(16,"h2",13),A(17),x(),ge(18,"iframe",14),x()),2&t&&(B(6),$e(i.resources.backBtnlabel),B(3),$e(i.resources.title),B(5),ne("ngForOf",i.resources.games),B(3),$e(i.resources.videoSectionTitle))},directives:[Yr,vs,RZ],styles:[".hero[_ngcontent-%COMP%]{padding-top:var(--rds-3);background-color:var(--color-bg);background-image:linear-gradient(to bottom,#f2f2f4 0%,#f2f2f4 58%,#fff 58%,#fff 100%)}@media (min-width: 40.001em){.hero[_ngcontent-%COMP%]{padding-top:var(--rds-5)}}.hero__title[_ngcontent-%COMP%]{font-size:var(--fs-48);font-weight:700;text-align:center;margin-bottom:var(--rds-3);margin-top:var(--rds-2);max-width:50ch;margin-inline:auto}.hero__img-wrapper[_ngcontent-%COMP%]{aspect-ratio:1.5}.hero__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;object-position:50% 20%}.hero__back-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:fit-content;font-size:var(--fs-16);color:var(--color-text);transition:gap .2s linear}.hero__back-btn[_ngcontent-%COMP%]:hover{gap:1.25rem}.games[_ngcontent-%COMP%]{padding-block:var(--rds-6)}.games__title[_ngcontent-%COMP%]{font-size:var(--fs-24);font-weight:700;color:var(--color-tertiary);text-align:center;margin-bottom:1rem}.games__subtitle[_ngcontent-%COMP%]{font-size:var(--fs-18);font-weight:700;margin-bottom:1rem}.games__details[_ngcontent-%COMP%]{font-size:var(--fs-16);max-width:100ch;margin-bottom:var(--rds-4);margin-inline:auto}.games__list[_ngcontent-%COMP%]{--cols: 1;display:grid;grid-template-columns:repeat(var(--cols),1fr);grid-row-gap:var(--rds-4);row-gap:var(--rds-4);grid-column-gap:var(--rds-4);column-gap:var(--rds-4)}@media (min-width: 40.001em){.games__list[_ngcontent-%COMP%]{--cols: 2}}@media (min-width: 65.001em){.games__list[_ngcontent-%COMP%]{--cols: 3}}.games__video[_ngcontent-%COMP%]{width:100%;aspect-ratio:16/9}"]}),n})(),FZ=(()=>{class n{constructor(){}ngOnInit(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["app-page-not-found"]],decls:3,vars:0,consts:[[1,"section","cont-lg"],[1,"title"]],template:function(t,i){1&t&&(C(0,"section",0)(1,"h1",1),A(2,"Page not found"),x()())},styles:[""]}),n})();function NZ(n,e){if(1&n&&(C(0,"p",16),A(1),x()),2&n){const t=e.$implicit;B(1),St(" ",t," ")}}function UZ(n,e){if(1&n&&(C(0,"p",21),A(1),x()),2&n){const t=e.$implicit;B(1),St(" ",t," ")}}function BZ(n,e){if(1&n&&(C(0,"p",21),A(1),x()),2&n){const t=e.$implicit;B(1),St(" ",t," ")}}const VZ=[{path:"artworks",component:E7},{path:"artworks/:uuid",component:MZ},{path:"applications",component:PZ},{path:"applications/guide-360",component:(()=>{class n{constructor(t,i){this.resourcesService=t,this.langService=i,this.resources={},this.langSub=new Bt}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("guide360",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)})}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-guide360"]],decls:20,vars:4,consts:[[1,"hero"],[1,"cont-lg"],["routerLink","/applications",1,"hero__back-btn"],["width","28","height","16","viewBox","0 0 28 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M27 9C27.5523 9 28 8.55228 28 8C28 7.44772 27.5523 7 27 7L27 9ZM0.292894 7.29289C-0.0976295 7.68342 -0.0976296 8.31658 0.292894 8.7071L6.65685 15.0711C7.04738 15.4616 7.68054 15.4616 8.07107 15.0711C8.46159 14.6805 8.46159 14.0474 8.07107 13.6569L2.41422 8L8.07107 2.34314C8.46159 1.95262 8.46159 1.31945 8.07107 0.928931C7.68054 0.538406 7.04738 0.538406 6.65686 0.92893L0.292894 7.29289ZM27 7L1 7L1 9L27 9L27 7Z","fill","#2a383c"],[1,"hero__content"],[1,"hero__title"],[1,"hero__img-wrapper","cont-xs"],["src","/assets/images/360-web-app.jpg","alt","360 app"],[1,"app-single"],[1,"app-single__content","cont-xs"],[1,"app-single__title"],[1,"app-single__text-container"],["class","app-single__text",4,"ngFor","ngForOf"],[1,"app-single__media-wrapper","cont-xs"],["width","853","height","480","src","https://my.matterport.com/show/?m=ZRdrZMFAhQN","frameborder","0","allowfullscreen","","allow","xr-spatial
1-tracking"],[1,"app-single__text"]],template:function(t,i){1&t&&(C(0,"section",0)(1,"div",1)(2,"a",2),dn(),C(3,"svg",3),ge(4,"path",4),x(),Di(),C(5,"span"),A(6),x()()(),C(7,"div",5)(8,"h1",6),A(9),x(),C(10,"div",7),ge(11,"img",8),x()()(),C(12,"section",9)(13,"div",10)(14,"h2",11),A(15),x(),C(16,"div",12),We(17,NZ,2,1,"p",13),x()(),C(18,"div",14),ge(19,"iframe",15),x()()),2&t&&(B(6),$e(i.resources.backBtnlabel),B(3),$e(i.resources.title),B(6),St(" ",i.resources.sectionTitle," "),B(2),ne("ngForOf",i.resources.sectionDetails))},directives:[Yr,vs],styles:[".hero[_ngcontent-%COMP%]{padding-top:var(--rds-3);background-color:var(--color-bg);background-image:linear-gradient(to bottom,#f2f2f4 0%,#f2f2f4 58%,#fff 58%,#fff 100%)}@media (min-width: 40.001em){.hero[_ngcontent-%COMP%]{padding-top:var(--rds-5)}}.hero__title[_ngcontent-%COMP%]{font-size:var(--fs-48);font-weight:700;text-align:center;margin-bottom:var(--rds-3);margin-top:var(--rds-2);max-width:50ch;margin-inline:auto}.hero__img-wrapper[_ngcontent-%COMP%]{aspect-ratio:1.5}.hero__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.hero__back-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:fit-content;font-size:var(--fs-16);color:var(--color-text);transition:gap .2s linear}.hero__back-btn[_ngcontent-%COMP%]:hover{gap:1.25rem}.app-single[_ngcontent-%COMP%]{padding-block:var(--rds-5)}.app-single__title[_ngcontent-%COMP%]{font-family:var(--ff-primary);font-size:var(--fs-20);font-weight:700;margin-bottom:var(--rds-3)}.app-single__text-container[_ngcontent-%COMP%]{margin-bottom:var(--rds-4)}.app-single__text[_ngcontent-%COMP%]{margin-bottom:var(--rds-1)}.app-single__img-wrapper[_ngcontent-%COMP%]{width:100%;aspect-ratio:1.75;margin-bottom:var(--rds-3)}.app-single__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.app-single__media-wrapper[_ngcontent-%COMP%]{aspect-ratio:1.777}.app-single__media-wrapper[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{width:100%;height:100%}"]}),n})()},{path:"applications/ar-applications",component:(()=>{class n{constructor(t,i){this.resourcesService=t,this.langService=i,this.resources={},this.langSub=new Bt}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("ar-applications",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)})}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-ar-applications"]],decls:33,vars:6,consts:[[1,"hero"],[1,"cont-lg"],["routerLink","/applications",1,"hero__back-btn"],["width","28","height","16","viewBox","0 0 28 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M27 9C27.5523 9 28 8.55228 28 8C28 7.44772 27.5523 7 27 7L27 9ZM0.292894 7.29289C-0.0976295 7.68342 -0.0976296 8.31658 0.292894 8.7071L6.65685 15.0711C7.04738 15.4616 7.68054 15.4616 8.07107 15.0711C8.46159 14.6805 8.46159 14.0474 8.07107 13.6569L2.41422 8L8.07107 2.34314C8.46159 1.95262 8.46159 1.31945 8.07107 0.928931C7.68054 0.538406 7.04738 0.538406 6.65686 0.92893L0.292894 7.29289ZM27 7L1 7L1 9L27 9L27 7Z","fill","#2a383c"],[1,"hero__content"],[1,"hero__title"],[1,"hero__img-wrapper","cont-xs"],["src","/assets/images/ar-apps.jpg","alt","AR application"],[1,"app-single"],[1,"app-single__content","cont-xs"],[1,"app-single__title"],[1,"app-single__text-container"],["class","app-single__text",4,"ngFor","ngForOf"],[1,"app-single__badges-wrapper"],["href","https://play.google.com/store/apps/details?id=com.EXEO.CarnivalinAthensAR","aria-label","Go to Google Play","target","_blank"],["src","/assets/images/google-play-badge.png","alt","Google Play logo",1,"app-single__google-badge"],["href","https://apps.apple.com/us/app/ar-carnival-in-athens/id6476665954","aria-label","Go to App Store","target","_blank"],["src","/assets/images/apple-badge.png","alt","App Store logo",1,"app-single__apple-badge"],["href","https://play.google.com/store/apps/details?id=com.EXEO.ARLifeinPalace","aria-label","Go to Google Play","target","_blank"],["href","https://apps.apple.com/us/app/ar-life-in-palace/id6476617865","aria-label","Go to App Store","target","_blank"],[1,"app-single__text"]],template:function(t,i){1&t&&(C(0,"section",0)(1,"div",1)(2,"a",2),dn(),C(3,"svg",3),ge(4,"path",4),x(),Di(),C(5,"span"),A(6),x()()(),C(7,"div",5)(8,"h1",6),A(9),x(),C(10,"div",7),ge(11,"img",8),x()()(),C(12,"section",9)(13,"div",10)(14,"h2",11),A(15),x(),C(16,"div",12),We(17,UZ,2,1,"p",13),C(18,"div",14)(19,"a",15),ge(20,"img",16),x(),C(21,"a",17),ge(22,"img",18),x()()()(),C(23,"div",10)(24,"h2",11),A(25),x(),C(26,"div",12),We(27,BZ,2,1,"p",13),C(28,"div",14)(29,"a",19),ge(30,"img",16),x(),C(31,"a",20),ge(32,"img",18),x()()()()()),2&t&&(B(6),$e(i.resources.backBtnlabel),B(3),$e(i.resources.title),B(6),St(" ",i.resources.sectionTitle1," "),B(2),ne("ngForOf",i.resources.sectionDetail
1s1),B(8),St(" ",i.resources.sectionTitle2," "),B(2),ne("ngForOf",i.resources.sectionDetails2))},directives:[Yr,vs],styles:[".hero[_ngcontent-%COMP%]{padding-top:var(--rds-3);background-color:var(--color-bg);background-image:linear-gradient(to bottom,#f2f2f4 0%,#f2f2f4 58%,#fff 58%,#fff 100%)}@media (min-width: 40.001em){.hero[_ngcontent-%COMP%]{padding-top:var(--rds-5)}}.hero__title[_ngcontent-%COMP%]{font-size:var(--fs-48);font-weight:700;text-align:center;margin-bottom:var(--rds-3);margin-top:var(--rds-2);max-width:50ch;margin-inline:auto}.hero__img-wrapper[_ngcontent-%COMP%]{aspect-ratio:1.5}.hero__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.hero__back-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:fit-content;font-size:var(--fs-16);color:var(--color-text);transition:gap .2s linear}.hero__back-btn[_ngcontent-%COMP%]:hover{gap:1.25rem}.app-single[_ngcontent-%COMP%]{padding-block:var(--rds-5)}.app-single__content[_ngcontent-%COMP%]:not(:last-child){margin-bottom:var(--rds-6)}.app-single__title[_ngcontent-%COMP%]{font-family:var(--ff-primary);font-size:var(--fs-20);font-weight:700;margin-bottom:var(--rds-2)}.app-single__text-container[_ngcontent-%COMP%]{margin-bottom:var(--rds-4)}.app-single__text[_ngcontent-%COMP%]{margin-bottom:var(--rds-1)}.app-single__img-wrapper[_ngcontent-%COMP%]{width:100%;aspect-ratio:1.75;margin-bottom:var(--rds-3)}.app-single__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.app-single__badges-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.app-single__google-badge[_ngcontent-%COMP%]{height:4rem}@media (min-width: 40.001em){.app-single__google-badge[_ngcontent-%COMP%]{height:5rem}}.app-single__apple-badge[_ngcontent-%COMP%]{height:2.75rem}@media (min-width: 40.001em){.app-single__apple-badge[_ngcontent-%COMP%]{height:3.5rem}}"]}),n})()},{path:"applications/ar-applications/carnival-in-athens-privacy-policy",component:(()=>{class n{constructor(){}ngOnInit(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["app-carnival-policy"]],decls:281,vars:0,consts:[[1,"hero"],[1,"hero__content"],[1,"hero__title"],[1,"privacy","cont-sm"],[1,"privacy__section"],[1,"privacy__heading--lg"],[1,"privacy__heading--sm"],[1,"privacy__text"],[1,"privacy__list"]],template:function(t,i){1&t&&(C(0,"section",0)(1,"div",1)(2,"h1",2),A(3,"Privacy Policy for AR Carnival in Athens"),x()()(),C(4,"section",3)(5,"div",4)(6,"h2",5),A(7,"Privacy Policy"),x(),C(8,"p",6),A(9,"Last updated: December, 29 2023"),x(),C(10,"p",7),A(11," This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information when You use the Service and tells You about Your privacy rights and how the law protects You. "),x(),C(12,"p",7),A(13," We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and use of information in accordance with this Privacy Policy. This Privacy Policy has been created with the help of the Free Privacy Policy Generator. "),x()(),C(14,"div",4)(15,"h2",5),A(16,"Interpretation and Definitions"),x(),C(17,"h3",6),A(18,"Interpretation"),x(),C(19,"p",7),A(20," The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural. "),x(),C(21,"h3",6),A(22,"Definitions"),x(),C(23,"p",7),A(24,"For the purposes of this Privacy Policy:"),x(),C(25,"ul",8)(26,"li")(27,"p")(28,"span"),A(29,"Account"),x(),A(30," means a unique account created for You to access our Service or parts of our Service. "),x()(),C(31,"li")(32,"p")(33,"span"),A(34,"Affiliate "),x(),A(35,'means an entity that controls, is controlled by or is under common control with a party, where "control" means ownership of 50% or more of the shares, equity interest or other securities entitled to vote for election of directors or other managing authority. '),x()(),C(36,"li")(37,"p")(38,"span"),A(39,"Application "),x(),A(40," refers to AR Carnival in Athens, the softw
1are program provided by the Company. "),x()(),C(41,"li")(42,"p")(43,"span"),A(44,"Company "),x(),A(45,'(referred to as either "the Company", "We", "Us" or "Our" in this Agreement) refers to VILABS OE, Thermokoitida Technopolis VEPE Technopoli, Pylaia, Building \u03932, Office 3.1. '),x()(),C(46,"li")(47,"p")(48,"span"),A(49,"Country "),x(),A(50,"refers to: Greece"),x()(),C(51,"li")(52,"p")(53,"span"),A(54,"Device "),x(),A(55,"means any device that can access the Service such as a computer, a cellphone or a digital tablet. "),x()(),C(56,"li")(57,"p")(58,"span"),A(59,"Personal Data"),x(),A(60," is any information that relates to an identified or identifiable individual. "),x()(),C(61,"li")(62,"p")(63,"span"),A(64,"Service "),x(),A(65," refers to the Application."),x()(),C(66,"li")(67,"p")(68,"span"),A(69,"Service Provider"),x(),A(70,"means any natural or legal person who processes the data on behalf of the Company. It refers to third-party companies or individuals employed by the Company to facilitate the Service, to provide the Service on behalf of the Company, to perform services related to the Service or to assist the Company in analyzing how the Service is used. "),x()(),C(71,"li")(72,"p")(73,"span"),A(74,"Usage Data"),x(),A(75," refers to data collected automatically, either generated by the use of the Service or from the Service infrastructure itself (for example, the duration of a page visit). "),x()(),C(76,"li")(77,"p")(78,"span"),A(79,"You "),x(),A(80," means the individual accessing or using the Service, or the company, or other legal entity on behalf of which such individual is accessing or using the Service, as applicable. "),x()()()(),C(81,"div",4)(82,"h2",5),A(83," Collecting and Using Your Personal Data "),x(),C(84,"p",6),A(85,"Types of Data Collected"),x(),C(86,"p",6),A(87,"Personal Data"),x(),C(88,"p",7),A(89," While using Our Service, We may ask You to provide Us with certain personally identifiable information that can be used to contact or identify You. Personally identifiable information may include, but is not limited to: "),x(),C(90,"ul",8)(91,"li")(92,"p"),A(93,"Usage Data"),x()()(),C(94,"p",6),A(95,"Usage Data"),x(),C(96,"p",7),A(97," Usage Data is collected automatically when using the Service. "),x(),C(98,"p",7),A(99," Usage Data may include information such as Your Device's Internet Protocol address (e.g. IP address), browser type, browser version, the pages of our Service that You visit, the time and date of Your visit, the time spent on those pages, unique device identifiers and other diagnostic data. "),x(),C(100,"p",7),A(101," When You access the Service by or through a mobile device, We may collect certain information automatically, including, but not limited to, the type of mobile device You use, Your mobile device unique ID, the IP address of Your mobile device, Your mobile operating system, the type of mobile Internet browser You use, unique device identifiers and other diagnostic data. "),x(),C(102,"p",7),A(103," We may also collect information that Your browser sends whenever You visit our Service or when You access the Service by or through a mobile device. "),x(),C(104,"p",6),A(105," Information Collected while Using the Application "),x(),C(106,"p",7),A(107," While using Our Application, in order to provide features of Our Application, We may collect, with Your prior permission: "),x(),C(108,"ul",8)(109,"li")(110,"p"),A(111," Pictures and other information from your Device's camera and photo library "),x()()(),C(112,"p",7),A(113," We use this information to provide features of Our Service, to improve and customize Our Service. The information may be uploaded to the Company's servers and/or a Service Provider's server or it may be simply stored on Your device. "),x(),C(114,"p",7),A(115," You can enable or disable access to this information at any time, through Your Device settings. "),x(),C(116,"p",6),A(117,"Use of Your Personal Data"),x(),C(118,"p",7),A(119," The Company may use Personal Data for the following purposes: "),x(),C(120,"ul",8)(121,"li")(122,"p")(123,"span"),A(124,"To provide and maintain our Service,"),x(),A(125," including to monitor the usage of our Service. "),x()(),C(126,"li")(127,"p")(128,"span"),A(129,"To manage Your Account:"),x(),A(130," to manage Your registration as a user of the Service. The Personal Data You provide can give You access to different functionalities of the Service that are available to You as a registered user. "),x()(),C(131,"li")(132,"p")(133,"span"),A(134,"For the performance of a contract:"),x(),A(135,": the development, compliance and undertaking of the purchase contract for the products, items or services You have purchased or of any other contract with Us through the Service. "),x()(),C(136,"li")(137,"p")(138,"span"),A(139,"To contact You:"),x(),A(140," To contact You by email, telephone calls, SMS, or other equivalent forms of electronic communication, such as a mobile application's push notifications regarding updates or informative communications related to the functionalities, products or contracted services, including the security updates, when necessary or reasonable for their implementation. "),x()(),C(141,"li")(142,"p")(143,"span"),A(144,"To provide You "),x(),A(145,"with news, special offers and general information about other goods, services and events which we offer that are similar to those that you have already purchased or enquired about unless You have opted not to receive such information. "),x()(),C(146,"li")(147,"p")(148,"span"),A(149,"To manage Your requests:"),x(),A(150," To attend and manage Your requests to Us. "),x()(),C(151,"li")(152,"p")(153,"span"),A(154,"For business transfers:"),x(),A(155," We may use Your information to evaluate or conduct a merger, divestiture, restructuring, reorganization, dissolution, or other sale or transfer of some or all of Our assets, whether as a going concern or as part of bankruptcy, liquidation, or similar proceeding, in which Personal Data held by Us about our Service users is among the assets transferred. "),x()(),C(156,"li")(157,"p")(158,"span"),A(159,"For other purposes: "),x(),A(160," We may use Your information for other purposes, such as data analysis, identifying usage trends, determining the effectiveness of our promotional campaigns and to evaluate and improve our Service, products, services, marketing and your experience. "),x()()(),C(161,"p",7),A(162," We may share Your personal information in the following situations: "),x(),C(163,"ul",8)(164,"li")(165,"p")(166,"span"),A(167,"With Service Providers:"),x(),A(168," We may share Your personal information with Service Providers to monitor and analyze the use of our Service, to contact You. "),x()(),C(169,"li")(170,"p")(171,"span"),A(172,"For business transfers:"),x(),A(173," We may share or transfer Your personal information in connection with, or during negotiations of, any merger, sale of Company assets, financing, or acquisition of all or a portion of Our business to another company. "),x()(),C(174,"li")(175,"p")(176,"span"),A(177,"With Affiliates:"),x(),A(178," We may share Your information with Our affiliates, in which case we will require those affiliates to honor this Privacy Policy. Affiliates include Our parent company and any other subsidiaries, joint venture partners or other companies that We control or that are under common control with Us. "),x()(),C(179,"li")(180,"p")(181,"span"),A(182,"With business partners: "),x(),A(183,"We may share Your information with Our business partners to offer You certain products, services or promotions. "),x()(),C(184,"li")(185,"p")(186,"span"),A(187,"With other users: "),x(),A(188,"when You share personal information or otherwise interact in the public areas with other users, such information may be viewed by all users and may be publicly distributed outside. "),x()(),C(189,"li")(190,"p")(191,"span"),A(192,"With Your consent: "),x(),A(193,"We may disclose Your personal information for any other purpose with Your consent. "),x()()(),C(194,"p",6),A(195,"Retention of Your Personal Data"),x(),C(196,"p",7),A(197," The Company will retain Your Personal Data only for as long as is necessary for the purposes set out in this Privacy Policy. We will retain and use Your Personal Data to the extent necessary to comply with our legal obligations (for example, if we are required to retain your data to comply with applicable laws), resolve disputes, and enforce our legal agreements and policies. "),x(),C(198,"p",7),A(199," The Company will also retain Usage Data for internal analysis purposes. Usage Data is generally retained for a shorter peri
1od of time, except when this data is used to strengthen the security or to improve the functionality of Our Service, or We are legally obligated to retain this data for longer time periods. "),x(),C(200,"p",6),A(201,"Transfer of Your Personal Data"),x(),C(202,"p",7),A(203," Your information, including Personal Data, is processed at the Company's operating offices and in any other places where the parties involved in the processing are located. It means that this information may be transferred to \u2014 and maintained on \u2014 computers located outside of Your state, province, country or other governmental jurisdiction where the data protection laws may differ than those from Your jurisdiction. "),x(),C(204,"p",7),A(205," Your consent to this Privacy Policy followed by Your submission of such information represents Your agreement to that transfer. "),x(),C(206,"p",7),A(207," The Company will take all steps reasonably necessary to ensure that Your data is treated securely and in accordance with this Privacy Policy and no transfer of Your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of Your data and other personal information. "),x(),C(208,"p",6),A(209,"Delete Your Personal Data"),x(),C(210,"p",7),A(211," You have the right to delete or request that We assist in deleting the Personal Data that We have collected about You. "),x(),C(212,"p",7),A(213," Our Service may give You the ability to delete certain information about You from within the Service. "),x(),C(214,"p",7),A(215," You may update, amend, or delete Your information at any time by signing in to Your Account, if you have one, and visiting the account settings section that allows you to manage Your personal information. You may also contact Us to request access to, correct, or delete any personal information that You have provided to Us. "),x(),C(216,"p",7),A(217," Please note, however, that We may need to retain certain information when we have a legal obligation or lawful basis to do so. "),x()(),C(218,"div",4)(219,"h2",5),A(220,"Disclosure of Your Personal Data"),x(),C(221,"p",6),A(222,"Business Transactions"),x(),C(223,"p",7),A(224," If the Company is involved in a merger, acquisition or asset sale, Your Personal Data may be transferred. We will provide notice before Your Personal Data is transferred and becomes subject to a different Privacy Policy. "),x(),C(225,"p",6),A(226,"Law enforcement"),x(),C(227,"p",7),A(228," Under certain circumstances, the Company may be required to disclose Your Personal Data if required to do so by law or in response to valid requests by public authorities (e.g. a court or a government agency). "),x(),C(229,"p",6),A(230,"Other legal requirements"),x(),C(231,"p",7),A(232," The Company may disclose Your Personal Data in the good faith belief that such action is necessary to: "),x(),C(233,"ul",8)(234,"li")(235,"p"),A(236,"Comply with a legal obligation"),x()(),C(237,"li")(238,"p"),A(239,"Protect and defend the rights or property of the Company"),x()(),C(240,"li")(241,"p"),A(242," Prevent or investigate possible wrongdoing in connection with the Service "),x()(),C(243,"li")(244,"p"),A(245,"Protect the personal safety of Users of the Service or the public"),x()(),C(246,"li")(247,"p"),A(248,"Protect against legal liability"),x()()(),C(249,"p",6),A(250,"Security of Your Personal Data"),x(),C(251,"p",7),A(252," The security of Your Personal Data is important to Us, but remember that no method of transmission over the Internet, or method of electronic storage is 100% secure. While We strive to use commercially acceptable means to protect Your Personal Data, We cannot guarantee its absolute security. "),x(),C(253,"p",6),A(254,"Children's Privacy"),x(),C(255,"p",7),A(256," Our Service does not address anyone under the age of 13. We do not knowingly collect personally identifiable information from anyone under the age of 13. If You are a parent or guardian and You are aware that Your child has provided Us with Personal Data, please contact Us. If We become aware that We have collected Personal Data from anyone under the age of 13 without verification of parental consent, We take steps to remove that information from Our servers. "),x(),C(257,"p",7),A(258," If We need to rely on consent as a legal basis for processing Your information and Your country requires consent from a parent, We may require Your parent's consent before We collect and use that information. "),x(),C(259,"p",6),A(260,"Links to Other Websites"),x(),C(261,"p",7),A(262," Our Service may contain links to other websites that are not operated by Us. If You click on a third party link, You will be directed to that third party's site. We strongly advise You to review the Privacy Policy of every site You visit. "),x(),C(263,"p",7),A(264," We have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services. "),x(),C(265,"p",6),A(266,"Changes to this Privacy Policy"),x(),C(267,"p",7),A(268," We may update Our Privacy Policy from time to time. We will notify You of any changes by posting the new Privacy Policy on this page. "),x(),C(269,"p",7),A(270,' We will let You know via email and/or a prominent notice on Our Service, prior to the change becoming effective and update the "Last updated" date at the top of this Privacy Policy. '),x(),C(271,"p",7),A(272," You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page. "),x(),C(273,"p",6),A(274,"Contact Us"),x(),C(275,"p",7),A(276," If you have any questions about this Privacy Policy, You can contact us: "),x(),C(277,"ul",8)(278,"li")(279,"p"),A(280,"By email: mailto:[email protected]"),x()()()()())},styles:[".hero[_ngcontent-%COMP%]{background-color:var(--color-bg);padding-block:var(--rds-5)}.hero__title[_ngcontent-%COMP%]{margin-bottom:1rem;margin-inline:auto;font-weight:700;max-width:50ch;text-align:center}.privacy[_ngcontent-%COMP%]{padding-block:var(--rds-5)}.privacy__heading[_ngcontent-%COMP%], .privacy__heading--lg[_ngcontent-%COMP%], .privacy__heading--sm[_ngcontent-%COMP%]{font-weight:600}.privacy__heading--sm[_ngcontent-%COMP%]{font-size:var(--fs-22);margin-block:var(--rds-1)}.privacy__heading--lg[_ngcontent-%COMP%]{font-size:var(--fs-32);margin-block:var(--rds-2)}.privacy__section[_ngcontent-%COMP%]{margin-block:var(--rds-3) var(--rds-3)}.privacy__text[_ngcontent-%COMP%]{margin-bottom:var(--rds-1)}.privacy__list[_ngcontent-%COMP%]{list-style:disc;padding-left:2rem;margin-bottom:2rem}.privacy__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:.5rem}.privacy__list[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:600}"]}
1),n})()},{path:"applications/ar-applications/life-in-palace-privacy-policy",component:(()=>{class n{constructor(){}ngOnInit(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["app-palace-policy"]],decls:281,vars:0,consts:[[1,"hero"],[1,"hero__content"],[1,"hero__title"],[1,"privacy","cont-sm"],[1,"privacy__section"],[1,"privacy__heading--lg"],[1,"privacy__heading--sm"],[1,"privacy__text"],[1,"privacy__list"]],template:function(t,i){1&t&&(C(0,"section",0)(1,"div",1)(2,"h1",2),A(3,"Privacy Policy for AR Palace Life"),x()()(),C(4,"section",3)(5,"div",4)(6,"h2",5),A(7,"Privacy Policy"),x(),C(8,"p",6),A(9,"Last updated: December, 29 2023"),x(),C(10,"p",7),A(11," This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information when You use the Service and tells You about Your privacy rights and how the law protects You. "),x(),C(12,"p",7),A(13," We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and use of information in accordance with this Privacy Policy. This Privacy Policy has been created with the help of the Free Privacy Policy Generator. "),x()(),C(14,"div",4)(15,"h2",5),A(16,"Interpretation and Definitions"),x(),C(17,"h3",6),A(18,"Interpretation"),x(),C(19,"p",7),A(20," The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural. "),x(),C(21,"h3",6),A(22,"Definitions"),x(),C(23,"p",7),A(24,"For the purposes of this Privacy Policy:"),x(),C(25,"ul",8)(26,"li")(27,"p")(28,"span"),A(29,"Account"),x(),A(30," means a unique account created for You to access our Service or parts of our Service. "),x()(),C(31,"li")(32,"p")(33,"span"),A(34,"Affiliate "),x(),A(35,'means an entity that controls, is controlled by or is under common control with a party, where "control" means ownership of 50% or more of the shares, equity interest or other securities entitled to vote for election of directors or other managing authority. '),x()(),C(36,"li")(37,"p")(38,"span"),A(39,"Application "),x(),A(40," refers to AR Palace Life, the software program provided by the Company. "),x()(),C(41,"li")(42,"p")(43,"span"),A(44,"Company "),x(),A(45,'(referred to as either "the Company", "We", "Us" or "Our" in this Agreement) refers to VILABS OE, Thermokoitida Technopolis VEPE Technopoli, Pylaia, Building \u03932, Office 3.1. '),x()(),C(46,"li")(47,"p")(48,"span"),A(49,"Country "),x(),A(50,"refers to: Greece"),x()(),C(51,"li")(52,"p")(53,"span"),A(54,"Device "),x(),A(55,"means any device that can access the Service such as a computer, a cellphone or a digital tablet. "),x()(),C(56,"li")(57,"p")(58,"span"),A(59,"Personal Data"),x(),A(60," is any information that relates to an identified or identifiable individual. "),x()(),C(61,"li")(62,"p")(63,"span"),A(64,"Service "),x(),A(65," refers to the Application."),x()(),C(66,"li")(67,"p")(68,"span"),A(69,"Service Provider"),x(),A(70,"means any natural or legal person who processes the data on behalf of the Company. It refers to third-party companies or individuals employed by the Company to facilitate the Service, to provide the Service on behalf of the Company, to perform services related to the Service or to assist the Company in analyzing how the Service is used. "),x()(),C(71,"li")(72,"p")(73,"span"),A(74,"Usage Data"),x(),A(75," refers to data collected automatically, either generated by the use of the Service or from the Service infrastructure itself (for example, the duration of a page visit). "),x()(),C(76,"li")(77,"p")(78,"span"),A(79,"You "),x(),A(80," means the individual accessing or using the Service, or the company, or other legal entity on behalf of which such individual is accessing or using the Service, as applicable. "),x()()()(),C(81,"div",4)(82,"h2",5),A(83," Collecting and Using Your Personal Data "),x(),C(84,"p",6),A(85,"Types of Data Collected"),x(),C(86,"p",6),A(87,"Personal Data"),x(),C(88,"p",7),A(89," While using Our Service, We may ask You to provide Us with certain personally identifiable information that can be used to contact or identify You. Personally identifiable information may include, but is not limited to: "),x(),C(90,"ul",8)(91,"li")(92,"p"),A(93,"Usage Data"),x()()(),C(94,"p",6),A(95,"Usage Data"),x(),C(96,"p",7),A(97," Usage Data is collected automatically when using the Service. "),x(),C(98,"p",7),A(99," Usage Data may include information such as Your Device's Internet Protocol address (e.g. IP address), browser type, browser version, the pages of our Service that You visit, the time and date of Your visit, the time spent on those pages, unique device identifiers and other diagnostic data. "),x(),C(100,"p",7),A(101," When You access the Service by or through a mobile device, We may collect certain information automatically, including, but not limited to, the type of mobile device You use, Your mobile device unique ID, the IP address of Your mobile device, Your mobile operating system, the type of mobile Internet browser You use, unique device identifiers and other diagnostic data. "),x(),C(102,"p",7),A(103," We may al
1so collect information that Your browser sends whenever You visit our Service or when You access the Service by or through a mobile device. "),x(),C(104,"p",6),A(105," Information Collected while Using the Application "),x(),C(106,"p",7),A(107," While using Our Application, in order to provide features of Our Application, We may collect, with Your prior permission: "),x(),C(108,"ul",8)(109,"li")(110,"p"),A(111," Pictures and other information from your Device's camera and photo library "),x()()(),C(112,"p",7),A(113," We use this information to provide features of Our Service, to improve and customize Our Service. The information may be uploaded to the Company's servers and/or a Service Provider's server or it may be simply stored on Your device. "),x(),C(114,"p",7),A(115," You can enable or disable access to this information at any time, through Your Device settings. "),x(),C(116,"p",6),A(117,"Use of Your Personal Data"),x(),C(118,"p",7),A(119," The Company may use Personal Data for the following purposes: "),x(),C(120,"ul",8)(121,"li")(122,"p")(123,"span"),A(124,"To provide and maintain our Service,"),x(),A(125," including to monitor the usage of our Service. "),x()(),C(126,"li")(127,"p")(128,"span"),A(129,"To manage Your Account:"),x(),A(130," to manage Your registration as a user of the Service. The Personal Data You provide can give You access to different functionalities of the Service that are available to You as a registered user. "),x()(),C(131,"li")(132,"p")(133,"span"),A(134,"For the performance of a contract:"),x(),A(135,": the development, compliance and undertaking of the purchase contract for the products, items or services You have purchased or of any other contract with Us through the Service. "),x()(),C(136,"li")(137,"p")(138,"span"),A(139,"To contact You:"),x(),A(140," To contact You by email, telephone calls, SMS, or other equivalent forms of electronic communication, such as a mobile application's push notifications regarding updates or informative communications related to the functionalities, products or contracted services, including the security updates, when necessary or reasonable for their implementation. "),x()(),C(141,"li")(142,"p")(143,"span"),A(144,"To provide You "),x(),A(145,"with news, special offers and general information about other goods, services and events which we offer that are similar to those that you have already purchased or enquired about unless You have opted not to receive such information. "),x()(),C(146,"li")(147,"p")(148,"span"),A(149,"To manage Your requests:"),x(),A(150," To attend and manage Your requests to Us. "),x()(),C(151,"li")(152,"p")(153,"span"),A(154,"For business transfers:"),x(),A(155," We may use Your information to evaluate or conduct a merger, divestiture, restructuring, reorganization, dissolution, or other sale or transfer of some or all of Our assets, whether as a going concern or as part of bankruptcy, liquidation, or similar proceeding, in which Personal Data held by Us about our Service users is among the assets transferred. "),x()(),C(156,"li")(157,"p")(158,"span"),A(159,"For other purposes: "),x(),A(160," We may use Your information for other purposes, such as data analysis, identifying usage trends, determining the effectiveness of our promotional campaigns and to evaluate and improve our Service, products, services, marketing and your experience. "),x()()(),C(161,"p",7),A(162," We may share Your personal information in the following situations: "),x(),C(163,"ul",8)(164,"li")(165,"p")(166,"span"),A(167,"With Service Providers:"),x(),A(168," We may share Your personal information with Service Providers to monitor and analyze the use of our Service, to contact You. "),x()(),C(169,"li")(170,"p")(171,"span"),A(172,"For business transfers:"),x(),A(173," We may share or transfer Your personal information in connection with, or during negotiations of, any merger, sale of Company assets, financing, or acquisition of all or a portion of Our business to another company. "),x()(),C(174,"li")(175,"p")(176,"span"),A(177,"With Affiliates:"),x(),A(178," We may share Your information with Our affiliates, in which case we will require those affiliates to honor this Privacy Policy. Affiliates include Our parent company and any other subsidiaries, joint venture partners or other companies that We control or that are under common control with Us. "),x()(),C(179,"li")(180,"p")(181,"span"),A(182,"With business partners: "),x(),A(183,"We may share Your information with Our business partners to offer You certain products, services or promotions. "),x()(),C(184,"li")(185,"p")(186,"span"),A(187,"With other users: "),x(),A(188,"when You share personal information or otherwise interact in the public areas with other users, such information may be viewed by all users and may be publicly distributed outside. "),x()(),C(189,"li")(190,"p")(191,"span"),A(192,"With Your consent: "),x(),A(193,"We may disclose Your personal information for any other purpose with Your consent. "),x()()(),C(194,"p",6),A(195,"Retention of Your Personal Data"),x(),C(196,"p",7),A(197," The Company will retain Your Personal Data only for as long as is necessary for the purposes set out in this Privacy Policy. We will retain and use Your Personal Data to the extent necessary to comply with our legal obligations (for example, if we are required to retain your data to comply with applicable laws), resolve disputes, and enforce our legal agreements and policies. "),x(),C(198,"p",7),A(199," The Company will also retain Usage Data for internal analysis purposes. Usage Data is generally retained for a shorter peri
1od of time, except when this data is used to strengthen the security or to improve the functionality of Our Service, or We are legally obligated to retain this data for longer time periods. "),x(),C(200,"p",6),A(201,"Transfer of Your Personal Data"),x(),C(202,"p",7),A(203," Your information, including Personal Data, is processed at the Company's operating offices and in any other places where the parties involved in the processing are located. It means that this information may be transferred to \u2014 and maintained on \u2014 computers located outside of Your state, province, country or other governmental jurisdiction where the data protection laws may differ than those from Your jurisdiction. "),x(),C(204,"p",7),A(205," Your consent to this Privacy Policy followed by Your submission of such information represents Your agreement to that transfer. "),x(),C(206,"p",7),A(207," The Company will take all steps reasonably necessary to ensure that Your data is treated securely and in accordance with this Privacy Policy and no transfer of Your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of Your data and other personal information. "),x(),C(208,"p",6),A(209,"Delete Your Personal Data"),x(),C(210,"p",7),A(211," You have the right to delete or request that We assist in deleting the Personal Data that We have collected about You. "),x(),C(212,"p",7),A(213," Our Service may give You the ability to delete certain information about You from within the Service. "),x(),C(214,"p",7),A(215," You may update, amend, or delete Your information at any time by signing in to Your Account, if you have one, and visiting the account settings section that allows you to manage Your personal information. You may also contact Us to request access to, correct, or delete any personal information that You have provided to Us. "),x(),C(216,"p",7),A(217," Please note, however, that We may need to retain certain information when we have a legal obligation or lawful basis to do so. "),x()(),C(218,"div",4)(219,"h2",5),A(220,"Disclosure of Your Personal Data"),x(),C(221,"p",6),A(222,"Business Transactions"),x(),C(223,"p",7),A(224," If the Company is involved in a merger, acquisition or asset sale, Your Personal Data may be transferred. We will provide notice before Your Personal Data is transferred and becomes subject to a different Privacy Policy. "),x(),C(225,"p",6),A(226,"Law enforcement"),x(),C(227,"p",7),A(228," Under certain circumstances, the Company may be required to disclose Your Personal Data if required to do so by law or in response to valid requests by public authorities (e.g. a court or a government agency). "),x(),C(229,"p",6),A(230,"Other legal requirements"),x(),C(231,"p",7),A(232," The Company may disclose Your Personal Data in the good faith belief that such action is necessary to: "),x(),C(233,"ul",8)(234,"li")(235,"p"),A(236,"Comply with a legal obligation"),x()(),C(237,"li")(238,"p"),A(239,"Protect and defend the rights or property of the Company"),x()(),C(240,"li")(241,"p"),A(242," Prevent or investigate possible wrongdoing in connection with the Service "),x()(),C(243,"li")(244,"p"),A(245,"Protect the personal safety of Users of the Service or the public"),x()(),C(246,"li")(247,"p"),A(248,"Protect against legal liability"),x()()(),C(249,"p",6),A(250,"Security of Your Personal Data"),x(),C(251,"p",7),A(252," The security of Your Personal Data is important to Us, but remember that no method of transmission over the Internet, or method of electronic storage is 100% secure. While We strive to use commercially acceptable means to protect Your Personal Data, We cannot guarantee its absolute security. "),x(),C(253,"p",6),A(254,"Children's Privacy"),x(),C(255,"p",7),A(256," Our Service does not address anyone under the age of 13. We do not knowingly collect personally identifiable information from anyone under the age of 13. If You are a parent or guardian and You are aware that Your child has provided Us with Personal Data, please contact Us. If We become aware that We have collected Personal Data from anyone under the age of 13 without verification of parental consent, We take steps to remove that information from Our servers. "),x(),C(257,"p",7),A(258," If We need to rely on consent as a legal basis for processing Your information and Your country requires consent from a parent, We may require Your parent's consent before We collect and use that information. "),x(),C(259,"p",6),A(260,"Links to Other Websites"),x(),C(261,"p",7),A(262," Our Service may contain links to other websites that are not operated by Us. If You click on a third party link, You will be directed to that third party's site. We strongly advise You to review the Privacy Policy of every site You visit. "),x(),C(263,"p",7),A(264," We have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services. "),x(),C(265,"p",6),A(266,"Changes to this Privacy Policy"),x(),C(267,"p",7),A(268," We may update Our Privacy Policy from time to time. We will notify You of any changes by posting the new Privacy Policy on this page. "),x(),C(269,"p",7),A(270,' We will let You know via email and/or a prominent notice on Our Service, prior to the change becoming effective and update the "Last updated" date at the top of this Privacy Policy. '),x(),C(271,"p",7),A(272," You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page. "),x(),C(273,"p",6),A(274,"Contact Us"),x(),C(275,"p",7),A(276," If you have any questions about this Privacy Policy, You can contact us: "),x(),C(277,"ul",8)(278,"li")(279,"p"),A(280,"By email: mailto:[email protected]"),x()()()()())},styles:[".hero[_ngcontent-%COMP%]{background-color:var(--color-bg);padding-block:var(--rds-5)}.hero__title[_ngcontent-%COMP%]{margin-bottom:1rem;margin-inline:auto;font-weight:700;max-width:50ch;text-align:center}.privacy[_ngcontent-%COMP%]{padding-block:var(--rds-5)}.privacy__heading[_ngcontent-%COMP%], .privacy__heading--lg[_ngcontent-%COMP%], .privacy__heading--sm[_ngcontent-%COMP%]{font-weight:600}.privacy__heading--sm[_ngcontent-%COMP%]{font-size:var(--fs-22);margin-block:var(--rds-1)}.privacy__heading--lg[_ngcontent-%COMP%]{font-size:var(--fs-32);margin-block:var(--rds-2)}.privacy__section[_ngcontent-%COMP%]{margin-block:var(--rds-3) var(--rds-3)}.privacy__text[_ngcontent-%COMP%]{margin-bottom:var(--rds-1)}.privacy__list[_ngcontent-%COMP%]{list-style:disc;padding-left:2rem;margin-bottom:2rem}.privacy__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:.5rem}.privacy__list[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:600}"]}
1),n})()},{path:"applications/games",component:LZ},{path:"about",component:SZ},{path:"",redirectTo:"artworks",pathMatch:"full"},{path:"**",component:FZ}];let zZ=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Hi({type:n}),n.\u0275inj=Ci({imports:[[r2.forRoot(VZ)],r2]}),n})();const HZ=["markerLine"],GZ=["readingLine"],WZ=["setAccessibility"],jZ=function(n){return{active:n}};let $Z=(()=>{class n{constructor(t){this.langServive=t,this.contrastText="",this.fontPlusText="",this.fontMinusText="",this.crosshairText="",this.rulerText="",this.fontDefaultText="",this.resetText="",this.showWidget=!1}ngOnInit(){this.langServive.lang$.subscribe(t=>{"en"===t?(this.contrastText="High contrast",this.fontPlusText="Increase font size",this.fontMinusText="Decrease font size",this.crosshairText="Mark",this.rulerText="Guide line",this.fontDefaultText="Default font size",this.resetText="Reset"):(this.contrastText="\u03a5\u03c8\u03b7\u03bb\u03ae \u0391\u03bd\u03c4\u03af\u03b8\u03b5\u03c3\u03b7",this.fontPlusText="\u0391\u03cd\u03be\u03b7\u03c3\u03b7 \u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac\u03c2",this.fontMinusText="\u039c\u03b5\u03af\u03c9\u03c3\u03b7 \u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac\u03c2",this.crosshairText="\u03a3\u03b7\u03bc\u03ac\u03b4\u03b9",this.rulerText="\u039a\u03b1\u03c4\u03b5\u03c5\u03b8\u03c5\u03bd\u03c4\u03ae\u03c1\u03b9\u03b1 \u03b3\u03c1\u03b1\u03bc\u03bc\u03ae",this.fontDefaultText="\u0391\u03c1\u03c7\u03b9\u03ba\u03ae \u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03bf\u03c3\u03b5\u03b9\u03c1\u03ac",this.resetText="\u0395\u03c0\u03b1\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac")})}onMouseMove(t){this.readingLine.nativeElement.classList.contains("accessibility_readingLine")&&(this.readingLine.nativeElement.style.top=t.pageY-20+"px"),this.markerLine.nativeElement.classList.contains("accessibility_markerLine")&&(this.markerLine.nativeElement.style.top=t.pageY-20+"px")}toggleWidget(){this.showWidget=!this.showWidget}changeContrast(){const t=document.querySelector("body");null==t||t.classList.toggle("accessibility_contrast")}onMarkerLineClick(t){this.markerLine.nativeElement.classList.toggle("accessibility_markerLine")}onReadingLineClick(t){this.readingLine.nativeElement.classList.toggle("accessibility_readingLine")}incFont(){const t=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("font-size"));t+2<36&&(document.documentElement.style.fontSize=`${t+2}px`)}decFont(){const t=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("font-size"));t-2>6.4&&(document.documentElement.style.fontSize=t-2+"px")}resetFont(){document.documentElement.style.fontSize="16px"}resetAll(){const t=document.querySelector("body"),i=this.readingLine.nativeElement,r=this.markerLine.nativeElement;null==t||t.classList.remove("accessibility_contrast"),document.documentElement.style.fontSize="16px",i.classList.remove("accessibility_readingLine"),r.classList.remove("accessibility_markerLine"),this.showWidget=!1}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-accessibility-widget"]],viewQuery:function(t,i){if(1&t&&(Ou(HZ,5),Ou(GZ,5),Ou(WZ,5)),2&t){let r;oa(r=aa())&&(i.markerLine=r.first),oa(r=aa())&&(i.readingLine=r.first),oa(r=aa())&&(i.accessButtons=r)}},hostBindings:function(t,i){1&t&&Ge("mousemove",function(s){return i.onMouseMove(s)},!1,o_)},decls:35,vars:10,consts:[["id","markerLine"],["markerLine",""],["id","readingLine"],["readingLine",""],["id","accessibilityBar",3,"ngClass"],["type","button","data-accessibility","contrast",1,"setAccessibility",3,"click"],["setAccessibility",""],["src","/assets/icons/accessibility/contrast.svg","alt","Contrast icon",1,"contrast-icon","accessibility-item-icon"],["type","button","data-accessibility","incFont",1,"setAccessibility",3,"click"],["src","/assets/icons/accessibility/zoom-in.svg","alt","Increase font-size icon",1,"increase-font-icon","accessibility-item-icon"],["type","button","data-accessibility","decFont",1,"setAccessibility",3,"click"],["src","/assets/icons/accessibility/zoom-out.svg","alt","Decrease font-size icon",1,"decrease-font-icon","accessibility-item-icon"],["type","button","data-accessibility","oriFont",1,"setAccessibility",3,"click"],["src","/assets/icons/accessibility/font.svg","alt","Reset font-size icon",1,"original-font-icon","accessibility-item-icon"],["type","button","data-accessibility","markerLine",1,"setAccessibility",3,"click"],["src","/assets/icons/accessibility/target.svg","alt","Marker icon",1,"marker-icon","accessibility-item-icon"],["type","button","data-accessibility","readingLine",1,"setAccessibility",3,"click"],["src","/assets/icons/accessibility/line.svg","alt","Reading line icon",1,"line-icon","accessibility-item-icon"],["type","button","data-accessibility","reset",1,"setAccessibility",3,"click"],["src","/assets/icons/accessibility/reload.svg","alt","Reset all icon",1,"reset-icon","accessibility-item-icon"],["id","universalAccessBtn","aria-label","Accessibility widget",1,"accessibility",3,"click"],["src","/assets/icons/accessibility/accessibility.svg","alt","Accessibility icon"]],template:function(t,i){1&t&&(ge(0,"div",0,1)(2,"div",2,3),C(4,"div",4)(5,"button",5,6),Ge("click",function(){return i.changeContrast()}),ge(7,"img",7),A(8),x(),C(9,"button",8,6),Ge("click",function(){return i.incFont()}),ge(11,"img",9),A(12),x(),C(13,"button",10,6),Ge("click",function(){return i.decFont()}),ge(15,"img",11),A(16),x(),C(17,"button",12,6),Ge("click",function(){return i.resetFont()}),ge(19,"img",13),A(20),x(),C(21,"button",14,6),Ge("click",function(s){return i.onMarkerLineClick(s)}),ge(23,"img",15),A(24),x(),C(25,"button",16,6),Ge("click",function(s){return i.onReadingLineClick(s)}),ge(27,"img",17),A(28),x(),C(29,"button",18,6),Ge("click",function(){return i.resetAll()}),ge(31,"img",19),A(32),x()(),C(33,"button",20),Ge("click",function(){return i.toggleWidget()}),ge(34,"img",21),x()),2&t&&(B(4),ne("ngClass",Cn(8,jZ,i.showWidget)),B(4),$e(i.contrastText),B(4),$e(i.fontPlusText),B(4),$e(i.fontMinusText),B(4),$e(i.fontDefaultText),B(4),$e(i.crosshairText),B(4),$e(i.rulerText),B(4),St("",i.resetText," "))},directives:[vo],styles:[".skip-to-content-btn[_ngcontent-%COMP%]{position:absolute;
1left:4%;top:var(--header-height);background-color:transparent;color:var(--color-primary);padding:0;width:1px;height:1px;overflow:hidden;z-index:-999}.skip-to-content-btn[_ngcontent-%COMP%]:focus, .skip-to-content-btn[_ngcontent-%COMP%]:active{width:fit-content;background-color:var(--color-white);height:auto;overflow:auto;z-index:999;padding:var(--rds-2) var(--rds-4)}#universalAccessBtn[_ngcontent-%COMP%]{display:flex;padding:.25em;position:fixed;left:.5rem;bottom:4rem;z-index:1000;background-color:var(--color-primary);border:none;border-radius:50%;border:0;cursor:pointer;transition:background-color .25s ease-in-out}@media screen and (hover: hover){#universalAccessBtn[_ngcontent-%COMP%]:hover{background-color:var(--color-tertiary)}}#accessibilityBar[_ngcontent-%COMP%]{position:fixed;bottom:8rem;left:.5rem;display:flex;flex-direction:column;transform:translate(calc(-100% - 3rem));background-color:var(--color-white);border:3px solid var(--color-primary);border-radius:5px;z-index:1000;transition:transform .5s ease-in-out,box-shadow .25s ease-in-out .25s}#accessibilityBar[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:1em;padding:.5em;border:none;border-bottom:2px solid var(--color-primary);color:var(--color-text);background-color:transparent;font-weight:700;text-transform:capitalize;cursor:pointer;position:relative;transition:background-color .25s ease-in-out}#accessibilityBar[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:var(--color-bg)}#accessibilityBar.active[_ngcontent-%COMP%]{transform:translate(0);box-shadow:0 5px 15px 10px #2223;pointer-events:all!important}#readingLine.accessibility_readingLine[_ngcontent-%COMP%]{position:absolute;left:0;bottom:0;width:100vw;height:.5rem;background-color:#ef3934;z-index:9999}#markerLine.accessibility_markerLine[_ngcontent-%COMP%]{position:absolute;left:0;bottom:0;width:100vw;height:1.75rem;transform:translateY(-1rem);background-color:#e4fd00;opacity:.75;z-index:9999}.accessibility-item-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.5em;fill:var(--color-primary);fill:red}"]}),n})(),qZ=(()=>{class n{constructor(){this.link="",this.linkText=""}ngOnInit(){}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["app-back-button"]],inputs:{link:"link",linkText:"linkText"},decls:6,vars:2,consts:[[1,"back-btn-wrapper","cont-lg"],[1,"back-btn",3,"href"],["width","13","height","14","viewBox","0 0 13 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M0.292893 11.5962C-0.0976311 11.9867 -0.097631 12.6199 0.292893 13.0104C0.683418 13.4009 1.31658 13.4009 1.70711 13.0104L0.292893 11.5962ZM12.6066 1.69671C12.6066 1.14443 12.1589 0.696711 11.6066 0.696711L2.6066 0.696713C2.05431 0.696712 1.6066 1.14443 1.6066 1.69671C1.6066 2.249 2.05431 2.69671 2.6066 2.69671L10.6066 2.69671L10.6066 10.6967C10.6066 11.249 11.0543 11.6967 11.6066 11.6967C12.1589 11.6967 12.6066 11.249 12.6066 10.6967L12.6066 1.69671ZM1.70711 13.0104L12.3137 2.40382L10.8995 0.989604L0.292893 11.5962L1.70711 13.0104Z","fill","white"]],template:function(t,i){1&t&&(C(0,"div",0)(1,"a",1)(2,"span"),A(3),x(),dn(),C(4,"svg",2),ge(5,"path",3),x()()()),2&t&&(B(1),ne("href",i.link,us),B(2),$e(i.linkText))},styles:[".back-btn-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}.back-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:fit-content;padding-block:.15rem;font-size:var(--fs-16);color:var(--color-white);border-bottom:1px solid transparent;transition:border-color .2s ease-in-out}.back-btn[_ngcontent-%COMP%]:hover{border-color:var(--color-white)}"]}),n})();function YZ(n,e){if(1&n){const t=Hn();C(0,"button",14),Ge("click",function(){return hn(t),ze().toggleMenu()}),dn(),C(1,"svg",15),ge(2,"path",16),x()()}}function XZ(n,e){if(1&n){const t=Hn();C(0,"ul",17)(1,"li")(2,"button",18),Ge("click",function(){return hn(t),ze().onLangSelect("el")}),A(3,"EL"),x()(),C(4,"li")(5,"button",18),Ge("click",function(){return hn(t),ze().onLangSelect("en")}),A(6,"EN"),x()()()}}function ZZ(n,e){if(1&n){const t=Hn();C(0,"button",19),Ge("click",function(){return hn(t),ze().toggleMenu()}),dn(),C(1,"svg",20)(2,"g",21),ge(3,"path",22),x(),C(4,"defs")(5,"clipPath",23),ge(6,"rect",24),x()()()()}}const KZ=function(n){return{open:n}},JZ=function(){return["/artworks"]},QZ=function(){return["/applications"]},eK=function(){return["/about"]},tK=function(n){return{active:n}};let nK=(()=>{class n{constructor(t,i){this.resourcesService=t,this.langService=i,this.resources={},this.langSub=new Bt,this.lang="el",this.showLangMenu=!1,this.isMobile=!1,this.showMobileMenu=!1}ngOnInit(){window.screen.width<800&&(this.isMobile=!0),this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("header",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)})}onLangClick(){this.showLangMenu=!this.showLangMenu}onLangSelect(t){this.langService.setLang(t),this.lang=t,this.showLangMenu=!1}toggleMenu(){this.showMobileMenu=!this.showMobileMenu}clickOutside(t){t.target.closest(".lang")||(this.showLangMenu=!1)}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-header"]],hostBindings:function(t,i){1&t&&Ge("click",function(s){return i.clickOutside(s)},!1,o_)},decls:24,vars:23,consts:[[1,"header"],[1,"header__top"],[3,"link","linkText"],[1,"header__main","cont-lg"],[1,"header__nav",3,"ngClass"],[1,"header__nav-list"],["routerLinkActive","active",1,"header__nav-link",3,"routerLink"],["class","header__close-menu","aria-label","Close menu",3,"click",4,"ngIf"],[1,"header__logo"],["src","/assets/images/mpa-logo-header.svg","alt","Athens City Museum logo"],[1,"lang"],[1,"lang__btn",3,"ngClass","click"],["class","lang__menu",4,"ngIf"],["class","header__open-menu","aria-label","Open menu",3,"click",4,"ngIf"],["aria-label","Close menu",1,"header__close-menu",3,"click"],["width","23","height","23","viewBox","0 0 23 23","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M23 2.31643L20.6836 0L11.5 9.18357L2.31643 0L0 2.31643L9.18357 11.5L0 20.6836L2.31643 23L11.5 13.8164L20.6836 23L23 20.6836L13.8164 11.5L23 2.31643Z","fill","white"],[1,"lang__menu"],[1,"lang__option",3,"click"],["aria-label","Open menu",1,"header__open-menu",3,"click"],["width","29","height","29","viewBox","0 0 29 29","fill","none","xmlns","http://www.w3.org/2000/svg"],["clip-path","url(#clip0_176_1248)"],["d","M5.25 21.4375H23.75C24.3859 21.4375 24.9062 20.9172 24.9062 20.2812C24.9062 19.6453 24.3859 19.125 23.75 19.125H5.25C4.61406 19.125 4.09375 19.6453 4.09375 20.2812C4.09375 20.9172 4.61406 21.4375 5.25 21.4375ZM5.25 15.6562H23.75C24.3859 15.6562 24.9062 15.1359 24.9062 14.5C24.9062 13.8641 24.3859 13.3438 23.75 13.3438H5.25C4.61406 13.3438 4.09375 13.8641 4.09375 14.5C4.09375 15.1359 4.614
106 15.6562 5.25 15.6562ZM4.09375 8.71875C4.09375 9.35469 4.61406 9.875 5.25 9.875H23.75C24.3859 9.875 24.9062 9.35469 24.9062 8.71875C24.9062 8.08281 24.3859 7.5625 23.75 7.5625H5.25C4.61406 7.5625 4.09375 8.08281 4.09375 8.71875Z","fill","white"],["id","clip0_176_1248"],["width","27.75","height","27.75","fill","white","transform","translate(0.625 0.625)"]],template:function(t,i){if(1&t&&(C(0,"header",0)(1,"div",1),ge(2,"app-back-button",2),x(),C(3,"div",3)(4,"nav",4)(5,"ul",5)(6,"li")(7,"a",6),A(8),x()(),C(9,"li")(10,"a",6),A(11),x()(),C(12,"li")(13,"a",6),A(14),x()()(),We(15,YZ,3,0,"button",7),x(),C(16,"div",8),ge(17,"img",9),x(),C(18,"div",10)(19,"button",11),Ge("click",function(){return i.onLangClick()}),A(20),Wd(21,"uppercase"),x(),We(22,XZ,7,0,"ul",12),x(),We(23,ZZ,7,0,"button",13),x()()),2&t){let r;B(2),ne("link","https://athenscitymuseum.gr/")("linkText",null!==(r=i.resources.museumLinkText)&&void 0!==r?r:""),B(2),ne("ngClass",Cn(16,KZ,i.showMobileMenu)),B(3),ne("routerLink",Wr(18,JZ)),B(1),$e(i.resources.artworksLabel),B(2),ne("routerLink",Wr(19,QZ)),B(1),$e(i.resources.applicationsLabel),B(2),ne("routerLink",Wr(20,eK)),B(1),$e(i.resources.aboutLabel),B(1),ne("ngIf",i.isMobile),B(4),ne("ngClass",Cn(21,tK,i.showLangMenu)),B(1),St(" ",jd(21,14,i.lang)," "),B(2),ne("ngIf",i.showLangMenu),B(1),ne("ngIf",i.isMobile)}},directives:[qZ,vo,Yr,QD,ys],pipes:[mT],styles:[".header[_ngcontent-%COMP%]{background-color:var(--color-bg)}.header__top[_ngcontent-%COMP%]{padding-block:.75rem;background-color:var(--color-primary)}.header__main[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:var(--rds-2);padding-block:1rem;position:relative}@media (min-width: 50em){.header__main[_ngcontent-%COMP%]{align-items:center}}.header__logo[_ngcontent-%COMP%]{overflow:hidden}@media (min-width: 50em){.header__logo[_ngcontent-%COMP%]{margin-left:auto}}.header__logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:clamp(15rem,11rem + 20vw,35rem)}@media (max-width: 49.999em){.header__nav[_ngcontent-%COMP%]{position:fixed;top:0;right:0;width:100%;min-height:100vh;transform:translate(100%);background-color:var(--color-primary);overflow:hidden;z-index:99;transition:transform .2s ease-in-out}.header__nav[_ngcontent-%COMP%] .header__nav-list[_ngcontent-%COMP%]{padding:1rem;margin-top:20vh;flex-direction:column;justify-content:center;gap:1.5rem}.header__nav[_ngcontent-%COMP%] .header__nav-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{width:min(75%,20rem)}.header__nav[_ngcontent-%COMP%] .header__nav-link[_ngcontent-%COMP%]{display:inline-block;padding:.5em 2em;width:100%;color:var(--color-white);font-weight:700;text-align:center;border:1.5px solid var(--color-primary-light);background-color:transparent;transition:background-color .2s ease-in-out}.header__nav[_ngcontent-%COMP%] .header__nav-link.active[_ngcontent-%COMP%]{background-color:var(--color-primary-light)}.header__nav.open[_ngcontent-%COMP%]{transform:translate(0)}}.header__nav-list[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}.header__nav-link[_ngcontent-%COMP%]{font-size:var(--fs-20);padding:.25em .75em;border-bottom:1.5px solid transparent;transition:border-color .2s ease-in-out}.header__nav-link[_ngcontent-%COMP%]:hover, .header__nav-link.active[_ngcontent-%COMP%]{border-color:var(--color-primary)}.header__open-menu[_ngcontent-%COMP%]{display:grid;place-items:center;background-color:var(--color-primary-light);border:0;padding:.5rem}.header__close-menu[_ngcontent-%COMP%]{display:grid;place-items:center;background-color:var(--color-primary-light);border:0;padding:.5rem;position:absolute;top:1rem;right:1rem}.lang[_ngcontent-%COMP%]{margin-left:auto;position:relative}@media (min-width: 50em){.lang[_ngcontent-%COMP%]{margin-left:unset}}.lang__btn[_ngcontent-%COMP%]{font-family:var(--ff-secondary);font-size:var(--fs-14);font-weight:400;padding:.75em;background-color:transparent;border:1px solid var(--color-primary);color:var(--color-primary);transition:background-color .2s ease-in-out,color .2s ease-in-out}.lang__btn[_ngcontent-%COMP%]:hover, .lang__btn.active[_ngcontent-%COMP%]{background-color:var(--color-primary);color:var(--color-white)}@media (min-width: 35.001em){.lang__btn[_ngcontent-%COMP%]{font-size:var(--fs-18)}}@media (min-width: 100.001em){.lang__btn[_ngcontent-%COMP%]{font-size:var(--fs-18)}}.lang__menu[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:absolute;bottom:-1px;left:0;transform:translateY(100%);width:100%;background-color:var(--color-primary-light);border:1px solid var(--color-tertiary)}.lang__menu[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--color-tertiary)}.lang__option[_ngcontent-%COMP%]{width:100%;padding:.5em;background-color:transparent;font-family:var(--ff-secondary);font-size:var(--fs-14);font-weight:700;color:var(--color-white);border:0;transition:background-color .2s ease-in-out,color .2s ease-in-out}.lang__option[_ngcontent-%COMP%]:hover{background-color:var(--color-primary)}"]}),n})();const iK=function(){return["/artworks"]},rK=function(){return["/applications"]},sK=function(){return["/about"]};let oK=(()=>{class n{constructor(t,i){this.resourcesService=t,this.langService=i,this.resources={},this.langSub=new Bt}ngOnInit(){this.langSub=this.langService.lang$.pipe(Sn(t=>this.resourcesService.getResources("footer",t))).subscribe({next:t=>{this.resources=t},error:t=>console.log(t)})}ngOnDestroy(){this.langSub&&this.langSub.unsubscribe()}}return n.\u0275fac=function(t){return new(t||n)(Y(dr),Y(Yi))},n.\u0275cmp=Zt({type:n,selectors:[["app-footer"]],decls:50,vars:14,consts:[[1,"footer"],[1,"footer__main","cont-lg"],[1,"footer__img-wrapper"],["src","/assets/images/mpa-logo-footer.svg","alt","Athens City Museum logo"],[1,"footer__c
1ontent"],[1,"footer__info"],[1,"footer__address"],[1,"footer__postal-code"],[1,"footer__phone"],[1,"footer__email"],[1,"footer__nav-list"],[1,"footer__link",3,"routerLink"],[1,"footer__social"],[1,"footer__social-list"],["href","https://www.facebook.com/AthensCityMuseum","target","_blank",1,"footer__social-link"],["href","https://www.instagram.com/athenscitymuseum/?hl=en","target","_blank",1,"footer__social-link"],["href","https://twitter.com/i/flow/login?redirect_after_login=%2FAthCityMuseum","target","_blank",1,"footer__social-link"],["href","https://www.youtube.com/user/AthensCityMuseum/videos","target","_blank",1,"footer__social-link"],[1,"footer__bottom"],[1,"footer__powered-by"],["href","https://vilabs.eu/","aria-label","Visit vilabs.eu","target","_blank"],["src","/assets/images/vilabs1.png","alt","Vilabs logo",1,"footer__powered-by-logo"],["href","https://exeo.gr/","aria-label","Visit exeo.gr","target","_blank"],["src","/assets/images/exeo-logo-black.svg","alt","EXEO logo",1,"footer__powered-by-logo"]],template:function(t,i){1&t&&(C(0,"footer",0)(1,"div",1)(2,"div",2),ge(3,"img",3),x(),C(4,"div",4)(5,"div",5)(6,"p",6),A(7),x(),C(8,"p",7),A(9),x(),C(10,"p",8),A(11),x(),C(12,"p",9),A(13),x()(),C(14,"ul",10)(15,"li")(16,"a",11),A(17),x()(),C(18,"li")(19,"a",11),A(20),x()(),C(21,"li")(22,"a",11),A(23),x()()(),C(24,"div",12)(25,"ul",13)(26,"li")(27,"a",14),A(28,"Facebook"),x()(),C(29,"li")(30,"a",15),A(31,"Instagram"),x()(),C(32,"li")(33,"a",16),A(34,"Twitter"),x()(),C(35,"li")(36,"a",17),A(37,"YouTube"),x()()()()()(),C(38,"div",18)(39,"p"),A(40),x()(),C(41,"div",19)(42,"p"),A(43,"Powered by"),x(),C(44,"a",20),ge(45,"img",21),x(),C(46,"p"),A(47,"&"),x(),C(48,"a",22),ge(49,"img",23),x()()()),2&t&&(B(7),$e(i.resources.addressLabel),B(2),$e(i.resources.postalCodeLabel),B(2),$e(i.resources.phoneLabel),B(2),$e(i.resources.emailLabel),B(3),ne("routerLink",Wr(11,iK)),B(1),$e(i.resources.artworksLabel),B(2),ne("routerLink",Wr(12,rK)),B(1),$e(i.resources.applicationsLabel),B(2),ne("routerLink",Wr(13,sK)),B(1),$e(i.resources.aboutLabel),B(17),St(" ",i.resources.copyrightLabel," "))},directives:[Yr],styles:["[_nghost-%COMP%]{margin-top:auto}.footer[_ngcontent-%COMP%]{background-color:var(--color-bg)}.footer__main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding-block:var(--rds-4)}@media (min-width: 75em){.footer__main[_ngcontent-%COMP%]{flex-direction:row}}.footer__img-wrapper[_ngcontent-%COMP%]{grid-area:img;overflow:hidden}.footer__img-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:clamp(15rem,11rem + 20vw,35rem)}.footer__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:2rem;width:100%}
1@media (min-width: 40.001em){.footer__content[_ngcontent-%COMP%]{flex-direction:row;flex-wrap:wrap;gap:8vw}}@media (min-width: 65.001em){.footer__content[_ngcontent-%COMP%]{gap:min(25rem,8vw)}}.footer__info[_ngcontent-%COMP%], .footer__nav-list[_ngcontent-%COMP%], .footer__policy-list[_ngcontent-%COMP%], .footer__social-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.25rem}.footer__link[_ngcontent-%COMP%]{font-size:var(--fs-16)}.footer__social-link[_ngcontent-%COMP%]{font-size:var(--fs-16);text-decoration:underline}.footer__bottom[_ngcontent-%COMP%]{padding:.75rem .25rem;background-color:var(--color-white)}.footer__bottom[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-align:center;font-size:var(--fs-14)}.footer__powered-by[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:1rem;padding:.75rem .25rem;background-color:var(--color-bg)}.footer__powered-by[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:var(--fs-14)}.footer__powered-by-logo[_ngcontent-%COMP%]{width:6rem}"]}),n})();function aK(n,e){if(1&n){const t=Hn();C(0,"button",1),Ge("click",function(){return hn(t),ze().scrollToTop()}),dn(),C(1,"svg",2),ge(2,"path",3),x()()}}let lK=(()=>{class n{constructor(){this.showScroll=!1}ngOnInit(){}onWindowScroll(){this.showScroll=window.scrollY>1e3}scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["app-back-to-top"]],hostBindings:function(t,i){1&t&&Ge("scroll",function(){return i.onWindowScroll()},!1,iM)},decls:1,vars:1,consts:[["class","back-to-top",3,"click",4,"ngIf"],[1,"back-to-top",3,"click"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.99997 15V3.82998L13.88 8.70998C14.27 9.09998 14.91 9.09998 15.3 8.70998C15.69 8.31998 15.69 7.68998 15.3 7.29998L8.70997 0.70998C8.31997 0.31998 7.68997 0.31998 7.29997 0.70998L0.699971 7.28998C0.309971 7.67998 0.309971 8.30998 0.699971 8.69998C1.08997 9.08998 1.71997 9.08998 2.10997 8.69998L6.99997 3.82998V15C6.99997 15.55 7.44997 16 7.99997 16C8.54997 16 8.99997 15.55 8.99997 15Z","fill","#2a383c"]],template:function(t,i){1&t&&We(0,aK,3,0,"button",0),2&t&&ne("ngIf",i.showScroll)},directives:[ys],styles:[".back-to-top[_ngcontent-%COMP%]{position:fixed;bottom:4rem;right:1rem;padding:1.35rem 1.5rem;border:1px solid var(--color-primary);background-color:var(--color-white);cursor:pointer;transition:background-color .2s ease-in-out}.back-to-top[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{transition:fill .2s ease-in-out}.back-to-top[_ngcontent-%COMP%]:hover{background-color:var(--color-primary)}.back-to-top[_ngcontent-%COMP%]:hover svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:var(--color-white)}"]}),n})(),cK=(()=>{class n{constructor(){this.title="MPA"}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=Zt({type:n,selectors:[["app-root"]],decls:6,vars:0,consts:[[1,"main"]],template:function(t,i){1&t&&(ge(0,"app-accessibility-widget")(1,"app-header"),C(2,"main",0),ge(3,"router-outlet"),x(),ge(4,"app-footer")(5,"app-back-to-top"))},directives:[$Z,nK,Jy,oK,lK],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}"]}),n})(),uK=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Hi({type:n,bootstrap:[cK]}),n.\u0275inj=Ci({providers:[],imports:[[u8,L8,zZ,O6,JA,YH.forRoot({trackingId:"G-DF5SXP4DSF",trackPageviews:!0})]]}),n})();(function Z4(){zE=!1})(),l8().bootstrapModule(uK).catch(n=>console.error(n))}},Pt=>{Pt(Pt.s=550)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.