vendor: 8,496 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ATQkczp2.js","./error-404.CoZKRZXM.css","./B6NP5N7j.js","./error-500.D6506J9O.css"])))=>i.map(i=>d[i]); 2/** 3* @vue/shared v3.5.12 4* (c) 2018-present Yuxi (Evan) You and Vue contributors 5* @license MIT 6**//*! #__NO_SIDE_EFFECTS__ */function cf(n){const e=Object.create(null);for(const t of n.split(","))e[t]=1;return t=>t in e}const at={},ms=[],Zn=()=>{},U0=()=>!1,ko=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),uf=n=>n.startsWith("onUpdate:"),Dt=Object.assign,ff=(n,e)=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)},N0=Object.prototype.hasOwnProperty,Ze=(n,e)=>N0.call(n,e),Be=Array.isArray,_s=n=>dl(n)==="[object Map]",Yp=n=>dl(n)==="[object Set]",Oe=n=>typeof n=="function",vt=n=>typeof n=="string",rr=n=>typeof n=="symbol",ht=n=>n!==null&&typeof n=="object",$p=n=>(ht(n)||Oe(n))&&Oe(n.then)&&Oe(n.catch),jp=Object.prototype.toString,dl=n=>jp.call(n),O0=n=>dl(n).slice(8,-1),Kp=n=>dl(n)==="[object Object]",hf=n=>vt(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,gs=cf(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),pl=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},F0=/-(\w)/g,Dn=pl(n=>n.replace(F0,(e,t)=>t?t.toUpperCase():"")),B0=/\B([A-Z])/g,zr=pl(n=>n.replace(B0,"-$1").toLowerCase()),ml=pl(n=>n.charAt(0).toUpperCase()+n.slice(1)),Il=pl(n=>n?`on${ml(n)}`:""),$i=(n,e)=>!Object.is(n,e),Ul=(n,...e)=>{for(let t=0;t<n.length;t++)n[t](...e)},Zp=(n,e,t,i=!1)=>{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,writable:i,value:t})},k0=n=>{const e=parseFloat(n);return isNaN(e)?n:e},H0=n=>{const e=vt(n)?Number(n):NaN;return isNaN(e)?n:e};let wh;const _l=()=>wh||(wh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function gl(n){if(Be(n)){const e={};for(let t=0;t<n.length;t++){const i=n[t],r=vt(i)?W0(i):gl(i);if(r)for(const s in r)e[s]=r[s]}return e}else if(vt(n)||ht(n))return n}const z0=/;(?![^(]*\))/g,V0=/:([^]+)/,G0=/\/\*[^]*?\*\//g;function W0(n){const e={};return n.replace(G0,"").split(z0).forEach(t=>{if(t){const i=t.split(V0);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function vl(n){let e="";if(vt(n))e=n;else if(Be(n))for(let t=0;t<n.length;t++){const i=vl(n[t]);i&&(e+=i+" ")}else if(ht(n))for(const t in n)n[t]&&(e+=t+" ");return e.trim()}function X0(n){if(!n)return null;let{class:e,style:t}=n;return e&&!vt(e)&&(n.class=vl(e)),t&&(n.style=gl(t)),n}const q0="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Y0=cf(q0);function Jp(n){return!!n||n===""}const Qp=n=>!!(n&&n.__v_isRef===!0),df=n=>vt(n)?n:n==null?"":Be(n)||ht(n)&&(n.toString===jp||!Oe(n.toString))?Qp(n)?df(n.value):JSON.stringify(n,em,2):String(n),em=(n,e)=>Qp(e)?em(n,e.value):_s(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,r],s)=>(t[Nl(i,s)+" =>"]=r,t),{})}:Yp(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>Nl(t))}:rr(e)?Nl(e):ht(e)&&!Be(e)&&!Kp(e)?String(e):e,Nl=(n,e="")=>{var t;return rr(n)?`Symbol(${(t=n.description)!=null?t:e})`:n};/** 7* @vue/reactivity v3.5.12 8* (c) 2018-present Yuxi (Evan) You and Vue contributors 9* @license MIT 10**/let hn;class tm{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=hn,!e&&hn&&(this.index=(hn.scopes||(hn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=hn;try{return hn=this,e()}finally{hn=t}}}on(){hn=this}off(){hn=this.parent}stop(e){if(this._active){let t,i;for(t=0,i=this.effects.length;t<i;t++)this.effects[t].stop();for(t=0,i=this.cleanups.length;t<i;t++)this.cleanups[t]();if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function $0(n){return new tm(n)}function nm(){return hn}let ot;const Ol=new WeakSet;class im{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,hn&&hn.active&&hn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ol.has(this)&&(Ol.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||sm(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ah(this),om(this);const e=ot,t=zn;ot=this,zn=!0;try{return this.fn()}finally{am(this),ot=e,zn=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)_f(e);this.deps=this.depsTail=void 0,Ah(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ol.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Uc(this)&&this.run()}get dirty(){return Uc(this)}}let rm=0,fo,ho;function sm(n,e=!1){if(n.flags|=8,e){n.next=ho,ho=n;return}n.next=fo,fo=n}function pf(){rm++}function mf(){if(--rm>0)return;if(ho){let e=ho;for(ho=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let n;for(;fo;){let e=fo;for(fo=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){n||(n=i)}e=t}}if(n)throw n}function om(n){for(let e=n.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function am(n){let e,t=n.depsTail,i=t;for(;i;){const r=i.prevDep;i.version===-1?(i===t&&(t=r),_f(i),j0(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}n.deps=e,n.depsTail=t}function Uc(n){for(let e=n.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(lm(e.dep.computed)||e.dep.version!==e.version))return!0;return!!n._dirty}function lm(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===Eo))return;n.globalVersion=Eo;const e=n.dep;if(n.flags|=2,e.version>0&&!n.isSSR&&n.deps&&!Uc(n)){n.flags&=-3;return}const t=ot,i=zn;ot=n,zn=!0;try{om(n);const r=n.fn(n._value);(e.version===0||$i(r,n._value))&&(n._value=r,e.version++)}catch(r){throw e.version++,r}finally{ot=t,zn=i,am(n),n.flags&=-3}}function _f(n,e=!1){const{dep:t,prevSub:i,nextSub:r}=n;if(i&&(i.nextSub=r,n.prevSub=void 0),r&&(r.prevSub=i,n.nextSub=void 0),t.subs===n&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let s=t.computed.deps;s;s=s.nextDep)_f(s,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function j0(n){const{prevDep:e,nextDep:t}=n;e&&(e.nextDep=t,n.prevDep=void 0),t&&(t.prevDep=e,n.nextDep=void 0)}let zn=!0;const cm=[];function sr(){cm.push(zn),zn=!1}function or(){const n=cm.pop();zn=n===void 0?!0:n}function Ah(n){const{cleanup:e}=n;if(n.cleanup=void 0,e){const t=ot;ot=void 0;try{e()}finally{ot=t}}}let Eo=0;class K0{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class gf{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!ot||!zn||ot===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==ot)t=this.activeLink=new K0(ot,this),ot.deps?(t.prevDep=ot.depsTail,ot.depsTail.nextDep=t,ot.depsTail=t):ot.deps=ot.depsTail=t,um(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=ot.depsTail,t.nextDep=void 0,ot.depsTail.nextDep=t,ot.depsTail=t,ot.deps===t&&(ot.deps=i)}return t}trigger(e){this.version++,Eo++,this.notify(e)}notify(e){pf();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{mf()}}}function um(n){if(n.dep.sc++,n.sub.flags&4){const e=n.dep.computed;if(e&&!n.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)um(i)}const t=n.dep.subs;t!==n&&(n.prevSub=t,t&&(t.nextSub=n)),n.dep.subs=n}}const Va=new WeakMap,Pr=Symbol(""),Nc=Symbol(""),To=Symbol("");function Ft(n,e,t){if(zn&&ot){let i=Va.get(n);i||Va.set(n,i=new Map);let r=i.get(t);r||(i.set(t,r=new gf),r.map=i,r.key=t),r.track()}}function _i(n,e,t,i,r,s){const o=Va.get(n);if(!o){Eo++;return}const a=l=>{l&&l.trigger()};
vendor: 5,360 bytes, line 10
10if(pf(),e==="clear")o.forEach(a);else{const l=Be(n),u=l&&hf(t);if(l&&t==="length"){const c=Number(i);o.forEach((f,h)=>{(h==="length"||h===To||!rr(h)&&h>=c)&&a(f)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),u&&a(o.get(To)),e){case"add":l?u&&a(o.get("length")):(a(o.get(Pr)),_s(n)&&a(o.get(Nc)));break;case"delete":l||(a(o.get(Pr)),_s(n)&&a(o.get(Nc)));break;case"set":_s(n)&&a(o.get(Pr));break}}mf()}function Z0(n,e){const t=Va.get(n);return t&&t.get(e)}function Wr(n){const e=$e(n);return e===n?e:(Ft(e,"iterate",To),Vn(n)?e:e.map(qt))}function vf(n){return Ft(n=$e(n),"iterate",To),n}const J0={__proto__:null,[Symbol.iterator](){return Fl(this,Symbol.iterator,qt)},concat(...n){return Wr(this).concat(...n.map(e=>Be(e)?Wr(e):e))},entries(){return Fl(this,"entries",n=>(n[1]=qt(n[1]),n))},every(n,e){return oi(this,"every",n,e,void 0,arguments)},filter(n,e){return oi(this,"filter",n,e,t=>t.map(qt),arguments)},find(n,e){return oi(this,"find",n,e,qt,arguments)},findIndex(n,e){return oi(this,"findIndex",n,e,void 0,arguments)},findLast(n,e){return oi(this,"findLast",n,e,qt,arguments)},findLastIndex(n,e){return oi(this,"findLastIndex",n,e,void 0,arguments)},forEach(n,e){return oi(this,"forEach",n,e,void 0,arguments)},includes(...n){return Bl(this,"includes",n)},indexOf(...n){return Bl(this,"indexOf",n)},join(n){return Wr(this).join(n)},lastIndexOf(...n){return Bl(this,"lastIndexOf",n)},map(n,e){return oi(this,"map",n,e,void 0,arguments)},pop(){return Js(this,"pop")},push(...n){return Js(this,"push",n)},reduce(n,...e){return Rh(this,"reduce",n,e)},reduceRight(n,...e){return Rh(this,"reduceRight",n,e)},shift(){return Js(this,"shift")},some(n,e){return oi(this,"some",n,e,void 0,arguments)},splice(...n){return Js(this,"splice",n)},toReversed(){return Wr(this).toReversed()},toSorted(n){return Wr(this).toSorted(n)},toSpliced(...n){return Wr(this).toSpliced(...n)},unshift(...n){return Js(this,"unshift",n)},values(){return Fl(this,"values",qt)}};function Fl(n,e,t){const i=vf(n),r=i[e]();return i!==n&&!Vn(n)&&(r._next=r.next,r.next=()=>{const s=r._next();return s.value&&(s.value=t(s.value)),s}),r}const Q0=Array.prototype;function oi(n,e,t,i,r,s){const o=vf(n),a=o!==n&&!Vn(n),l=o[e];if(l!==Q0[e]){const f=l.apply(n,s);return a?qt(f):f}let u=t;o!==n&&(a?u=function(f,h){return t.call(this,qt(f),h,n)}:t.length>2&&(u=function(f,h){return t.call(this,f,h,n)}));const c=l.call(o,u,i);return a&&r?r(c):c}function Rh(n,e,t,i){const r=vf(n);let s=t;return r!==n&&(Vn(n)?t.length>3&&(s=function(o,a,l){return t.call(this,o,a,l,n)}):s=function(o,a,l){return t.call(this,o,qt(a),l,n)}),r[e](s,...i)}function Bl(n,e,t){const i=$e(n);Ft(i,"iterate",To);const r=i[e](...t);return(r===-1||r===!1)&&Sf(t[0])?(t[0]=$e(t[0]),i[e](...t)):r}function Js(n,e,t=[]){sr(),pf();const i=$e(n)[e].apply(n,t);return mf(),or(),i}const ev=cf("__proto__,__v_isRef,__isVue"),fm=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(rr));function tv(n){rr(n)||(n=String(n));const e=$e(this);return Ft(e,"has",n),e.hasOwnProperty(n)}class hm{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){const r=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!r;if(t==="__v_isReadonly")return r;if(t==="__v_isShallow")return s;if(t==="__v_raw")return i===(r?s?fv:_m:s?mm:pm).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Be(e);if(!r){let l;if(o&&(l=J0[t]))return l;if(t==="hasOwnProperty")return tv}const a=Reflect.get(e,t,Pt(e)?e:i);return(rr(t)?fm.has(t):ev(t))||(r||Ft(e,"get",t),s)?a:Pt(a)?o&&hf(t)?a:a.value:ht(a)?r?gm(a):Ji(a):a}}class dm extends hm{constructor(e=!1){super(!1,e)}set(e,t,i,r){let s=e[t];if(!this._isShallow){const l=Qi(s);if(!Vn(i)&&!Qi(i)&&(s=$e(s),i=$e(i)),!Be(e)&&Pt(s)&&!Pt(i))return l?!1:(s.value=i,!0)}const o=Be(e)&&hf(t)?Number(t)<e.length:Ze(e,t),a=Reflect.set(e,t,i,Pt(e)?e:r);return e===$e(r)&&(o?$i(i,s)&&_i(e,"set",t,i):_i(e,"add",t,i)),a}deleteProperty(e,t){const i=Ze(e,t);e[t];const r=Reflect.deleteProperty(e,t);return r&&i&&_i(e,"delete",t,void 0),r}has(e,t){const i=Reflect.has(e,t);return(!rr(t)||!fm.has(t))&&Ft(e,"has",t),i}ownKeys(e){return Ft(e,"iterate",Be(e)?"length":Pr),Reflect.ownKeys(e)}}class nv extends hm{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const iv=new dm,rv=new nv,sv=new dm(!0);const Oc=n=>n,jo=n=>Reflect.getPrototypeOf(n);function ov(n,e,t){return function(...i){const r=this.__v_raw,s=$e(r),o=_s(s),a=n==="entries"||n===Symbol.iterator&&o,l=n==="keys"&&o,u=r[n](...i),c=t?Oc:e?Fc:qt;return!e&&Ft(s,"iterate",l?Nc:Pr),{next(){const{value:f,done:h}=u.next();return h?{value:f,done:h}:{value:a?[c(f[0]),c(f[1])]:c(f),done:h}},[Symbol.iterator](){return this}}}}function Ko(n){return function(...e){return n==="delete"?!1:n==="clear"?void 0:this}}function av(n,e){const t={get(r){const s=this.__v_raw,o=$e(s),a=$e(r);n||($i(r,a)&&Ft(o,"get",r),Ft(o,"get",a));const{has:l}=jo(o),u=e?Oc:n?Fc:qt;if(l.call(o,r))return u(s.get(r));if(l.call(o,a))return u(s.get(a));s!==o&&s.get(r)},get size(){const r=this.__v_raw;return!n&&Ft($e(r),"iterate",Pr),Reflect.get(r,"size",r)},has(r){const s=this.__v_raw,o=$e(s),a=$e(r);return n||($i(r,a)&&Ft(o,"has",r),Ft(o,"has",a)),r===a?s.has(r):s.has(r)||s.has(a)},forEach(r,s){const o=this,a=o.__v_raw,l=$e(a),u=e?Oc:n?Fc:qt;
vendor: 5,638 bytes, lines 10-13
10return!n&&Ft(l,"iterate",Pr),a.forEach((c,f)=>r.call(s,u(c),u(f),o))}};return Dt(t,n?{add:Ko("add"),set:Ko("set"),delete:Ko("delete"),clear:Ko("clear")}:{add(r){!e&&!Vn(r)&&!Qi(r)&&(r=$e(r));const s=$e(this);return jo(s).has.call(s,r)||(s.add(r),_i(s,"add",r,r)),this},set(r,s){!e&&!Vn(s)&&!Qi(s)&&(s=$e(s));const o=$e(this),{has:a,get:l}=jo(o);let u=a.call(o,r);u||(r=$e(r),u=a.call(o,r));const c=l.call(o,r);return o.set(r,s),u?$i(s,c)&&_i(o,"set",r,s):_i(o,"add",r,s),this},delete(r){const s=$e(this),{has:o,get:a}=jo(s);let l=o.call(s,r);l||(r=$e(r),l=o.call(s,r)),a&&a.call(s,r);const u=s.delete(r);return l&&_i(s,"delete",r,void 0),u},clear(){const r=$e(this),s=r.size!==0,o=r.clear();return s&&_i(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=ov(r,n,e)}),t}function xf(n,e){const t=av(n,e);return(i,r,s)=>r==="__v_isReactive"?!n:r==="__v_isReadonly"?n:r==="__v_raw"?i:Reflect.get(Ze(t,r)&&r in i?t:i,r,s)}const lv={get:xf(!1,!1)},cv={get:xf(!1,!0)},uv={get:xf(!0,!1)};const pm=new WeakMap,mm=new WeakMap,_m=new WeakMap,fv=new WeakMap;function hv(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function dv(n){return n.__v_skip||!Object.isExtensible(n)?0:hv(O0(n))}function Ji(n){return Qi(n)?n:yf(n,!1,iv,lv,pm)}function us(n){return yf(n,!1,sv,cv,mm)}function gm(n){return yf(n,!0,rv,uv,_m)}function yf(n,e,t,i,r){if(!ht(n)||n.__v_raw&&!(e&&n.__v_isReactive))return n;const s=r.get(n);if(s)return s;const o=dv(n);if(o===0)return n;const a=new Proxy(n,o===2?i:t);return r.set(n,a),a}function vs(n){return Qi(n)?vs(n.__v_raw):!!(n&&n.__v_isReactive)}function Qi(n){return!!(n&&n.__v_isReadonly)}function Vn(n){return!!(n&&n.__v_isShallow)}function Sf(n){return n?!!n.__v_raw:!1}function $e(n){const e=n&&n.__v_raw;return e?$e(e):n}function pv(n){return!Ze(n,"__v_skip")&&Object.isExtensible(n)&&Zp(n,"__v_skip",!0),n}const qt=n=>ht(n)?Ji(n):n,Fc=n=>ht(n)?gm(n):n;function Pt(n){return n?n.__v_isRef===!0:!1}function Pn(n){return vm(n,!1)}function Ch(n){return vm(n,!0)}function vm(n,e){return Pt(n)?n:new mv(n,e)}class mv{constructor(e,t){this.dep=new gf,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:$e(e),this._value=t?e:qt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||Vn(e)||Qi(e);e=i?e:$e(e),$i(e,t)&&(this._rawValue=e,this._value=i?e:qt(e),this.dep.trigger())}}function Mt(n){return Pt(n)?n.value:n}const _v={get:(n,e,t)=>e==="__v_raw"?n:Mt(Reflect.get(n,e,t)),set:(n,e,t,i)=>{const r=n[e];return Pt(r)&&!Pt(t)?(r.value=t,!0):Reflect.set(n,e,t,i)}};function xm(n){return vs(n)?n:new Proxy(n,_v)}class gv{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return Z0($e(this._object),this._key)}}class vv{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function xv(n,e,t){return Pt(n)?n:Oe(n)?new vv(n):ht(n)&&arguments.length>1?yv(n,e,t):Pn(n)}function yv(n,e,t){const i=n[e];return Pt(i)?i:new gv(n,e,t)}class Sv{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new gf(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Eo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&ot!==this)return sm(this,!0),!0}get value(){const e=this.dep.track();return lm(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Mv(n,e,t=!1){let i,r;return Oe(n)?i=n:(i=n.get,r=n.set),new Sv(i,r,t)}const Zo={},Ga=new WeakMap;let yr;function Ev(n,e=!1,t=yr){if(t){let i=Ga.get(t);i||Ga.set(t,i=[]),i.push(n)}}function Tv(n,e,t=at){const{immediate:i,deep:r,once:s,scheduler:o,augmentJob:a,call:l}=t,u=v=>r?v:Vn(v)||r===!1||r===0?zi(v,1):zi(v);let c,f,h,d,g=!1,_=!1;if(Pt(n)?(f=()=>n.value,g=Vn(n)):vs(n)?(f=()=>u(n),g=!0):Be(n)?(_=!0,g=n.some(v=>vs(v)||Vn(v)),f=()=>n.map(v=>{if(Pt(v))return v.value;if(vs(v))return u(v);if(Oe(v))return l?l(v,2):v()})):Oe(n)?e?f=l?()=>l(n,2):n:f=()=>{if(h){sr();try{h()}finally{or()}}const v=yr;yr=c;try{return l?l(n,3,[d]):n(d)}finally{yr=v}}:f=Zn,e&&r){const v=f,A=r===!0?1/0:r;f=()=>zi(v(),A)}const m=nm(),p=()=>{c.stop(),m&&ff(m.effects,c)};if(s&&e){const v=e;e=(...A)=>{v(...A),p()}}let T=_?new Array(n.length).fill(Zo):Zo;const x=v=>{if(!(!(c.flags&1)||!c.dirty&&!v))if(e){const A=c.run();if(r||g||(_?A.some((w,C)=>$i(w,T[C])):$i(A,T))){h&&h();const w=yr;yr=c;try{const C=[A,T===Zo?void 0:_&&T[0]===Zo?[]:T,d];l?l(e,3,C):e(...C),T=A}finally{yr=w}}}else c.run()};return a&&a(x),c=new im(f),c.scheduler=o?()=>o(x,!1):x,d=v=>Ev(v,!1,c),h=c.onStop=()=>{const v=Ga.get(c);if(v){if(l)l(v,4);else for(const A of v)A();Ga.delete(c)}},e?i?x(!0):T=c.run():o?o(x.bind(null,!0),!0):c.run(),p.pause=c.pause.bind(c),p.resume=c.resume.bind(c),p.stop=p,p}function zi(n,e=1/0,t){if(e<=0||!ht(n)||n.__v_skip||(t=t||new Set,t.has(n)))return n;if(t.add(n),e--,Pt(n))zi(n.value,e,t);else if(Be(n))for(let i=0;i<n.length;i++)zi(n[i],e,t);else if(Yp(n)||_s(n))n.forEach(i=>{zi(i,e,t)});else if(Kp(n)){for(const i in n)zi(n[i],e,t);for(const i of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,i)&&zi(n[i],e,t)}return n}/** 11* @vue/runtime-core v3.5.12 12* (c) 2018-present Yuxi (Evan) You and Vue contributors 13* @license MIT
14**/function Ho(n,e,t,i){try{return i?n(...i):n()}catch(r){Gs(r,e,t)}}function ei(n,e,t,i){if(Oe(n)){const r=Ho(n,e,t,i);return r&&$p(r)&&r.catch(s=>{Gs(s,e,t)}),r}if(Be(n)){const r=[];for(let s=0;s<n.length;s++)r.push(ei(n[s],e,t,i));return r}}function Gs(n,e,t,i=!0){const r=e?e.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||at;if(e){let a=e.parent;const l=e.proxy,u=`https://vuejs.org/error-reference/#runtime-${t}`;for(;a;){const c=a.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](n,l,u)===!1)return}a=a.parent}if(s){sr(),Ho(s,null,10,[n,l,u]),or();return}}bv(n,t,r,i,o)}function bv(n,e,t,i=!0,r=!1){if(r)throw n;console.error(n)}const Yt=[];let Xn=-1;const xs=[];let Bi=null,ls=0;const ym=Promise.resolve();let Wa=null;function Mf(n){const e=Wa||ym;return n?e.then(this?n.bind(this):n):e}function wv(n){let e=Xn+1,t=Yt.length;for(;e<t;){const i=e+t>>>1,r=Yt[i],s=bo(r);s<n||s===n&&r.flags&2?e=i+1:t=i}return e}function Ef(n){if(!(n.flags&1)){const e=bo(n),t=Yt[Yt.length-1];!t||!(n.flags&2)&&e>=bo(t)?Yt.push(n):Yt.splice(wv(e),0,n),n.flags|=1,Sm()}}function Sm(){Wa||(Wa=ym.then(Mm))}function Bc(n){Be(n)?xs.push(...n):Bi&&n.id===-1?Bi.splice(ls+1,0,n):n.flags&1||(xs.push(n),n.flags|=1),Sm()}function Ph(n,e,t=Xn+1){for(;t<Yt.length;t++){const i=Yt[t];if(i&&i.flags&2){if(n&&i.id!==n.uid)continue;Yt.splice(t,1),t--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Xa(n){if(xs.length){const e=[...new Set(xs)].sort((t,i)=>bo(t)-bo(i));if(xs.length=0,Bi){Bi.push(...e);return}for(Bi=e,ls=0;ls<Bi.length;ls++){const t=Bi[ls];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}Bi=null,ls=0}}const bo=n=>n.id==null?n.flags&2?-1:1/0:n.id;function Mm(n){try{for(Xn=0;Xn<Yt.length;Xn++){const e=Yt[Xn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),Ho(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Xn<Yt.length;Xn++){const e=Yt[Xn];e&&(e.flags&=-2)}Xn=-1,Yt.length=0,Xa(),Wa=null,(Yt.length||xs.length)&&Mm()}}let gn=null,Em=null;function qa(n){const e=gn;return gn=n,Em=n&&n.type.__scopeId||null,e}function Tm(n,e=gn,t){if(!e||n._n)return n;const i=(...r)=>{i._d&&Gh(-1);const s=qa(e);let o;try{o=n(...r)}finally{qa(s),i._d&&Gh(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function qn(n,e,t,i){const r=n.dirs,s=e&&e.dirs;for(let o=0;o<r.length;o++){const a=r[o];s&&(a.oldValue=s[o].value);let l=a.dir[i];l&&(sr(),ei(l,t,8,[n.el,a,n,e]),or())}}const Av=Symbol("_vte"),Rv=n=>n.__isTeleport;function Tf(n,e){n.shapeFlag&6&&n.component?(n.transition=e,Tf(n.component.subTree,e)):n.shapeFlag&128?(n.ssContent.transition=e.clone(n.ssContent),n.ssFallback.transition=e.clone(n.ssFallback)):n.transition=e}/*! #__NO_SIDE_EFFECTS__ */function bm(n,e){return Oe(n)?Dt({name:n.name},e,{setup:n}):n}function bf(n){n.ids=[n.ids[0]+n.ids[2]+++"-",0,0]}function Ya(n,e,t,i,r=!1){if(Be(n)){n.forEach((g,_)=>Ya(g,e&&(Be(e)?e[_]:e),t,i,r));return}if(ys(i)&&!r)return;const s=i.shapeFlag&4?Uf(i.component):i.el,o=r?null:s,{i:a,r:l}=n,u=e&&e.r,c=a.refs===at?a.refs={}:a.refs,f=a.setupState,h=$e(f),d=f===at?()=>!1:g=>Ze(h,g);if(u!=null&&u!==l&&(vt(u)?(c[u]=null,d(u)&&(f[u]=null)):Pt(u)&&(u.value=null)),Oe(l))Ho(l,a,12,[o,c]);else{const g=vt(l),_=Pt(l);if(g||_){const m=()=>{if(n.f){const p=g?d(l)?f[l]:c[l]:l.value;r?Be(p)&&ff(p,s):Be(p)?p.includes(s)||p.push(s):g?(c[l]=[s],d(l)&&(f[l]=c[l])):(l.value=[s],n.k&&(c[n.k]=l.value))}else g?(c[l]=o,d(l)&&(f[l]=o)):_&&(l.value=o,n.k&&(c[n.k]=o))};o?(m.id=-1,fn(m,t)):m()}}}let Dh=!1;const Xr=()=>{Dh||(console.error("Hydration completed but contains mismatches."),Dh=!0)},Cv=n=>n.namespaceURI.includes("svg")&&n.tagName!=="foreignObject",Pv=n=>n.namespaceURI.includes("MathML"),Jo=n=>{if(n.nodeType===1){if(Cv(n))return"svg";if(Pv(n))return"mathml"}},fs=n=>n.nodeType===8;function Dv(n){const{mt:e,p:t,o:{patchProp:i,createText:r,nextSibling:s,parentNode:o,remove:a,insert:l,createComment:u}}=n,c=(x,v)=>{if(!v.hasChildNodes()){t(null,x,v),Xa(),v._vnode=x;return}f(v.firstChild,x,null,null,null),Xa(),v._vnode=x},f=(x,v,A,w,C,P=!1)=>{P=P||!!v.dynamicChildren;const S=fs(x)&&x.data==="[",M=()=>_(x,v,A,w,C,S),{type:I,ref:z,shapeFlag:O,patchFlag:X}=v;let J=x.nodeType;v.el=x,X===-2&&(P=!1,v.dynamicChildren=null);let D=null;switch(I){case Lr:J!==3?v.children===""?(l(v.el=r(""),o(x),x),D=x):D=M():(x.data!==v.children&&(Xr(),x.data=v.children),D=s(x));break;case ti:T(x)?(D=s(x),p(v.el=x.content.firstChild,x,A)):J!==8||S?D=M():D=s(x);break;case mo:if(S&&(x=s(x),J=x.nodeType),J===1||J===3){D=x;const V=!v.children.length;for(let U=0;U<v.staticCount;U++)V&&(v.children+=D.nodeType===1?D.outerHTML:D.data),U===v.staticCount-1&&(v.anchor=D),D=s(D);return S?s(D):D}else M();break;case wn:S?D=g(x,v,A,w,C,P):D=M();break;default:if(O&1)(J!==1||v.type.toLowerCase()!==x.tagName.toLowerCase())&&!T(x)?D=M():D=h(x,v,A,w,C,P);else if(O&6){v.slotScopeIds=C;const V=o(x);if(S?D=m(x):fs(x)&&x.data==="teleport start"?D=m(x,x.data,"teleport end"):D=s(x),e(v,V,null,A,w,Jo(V),P),ys(v)){let U;S?(U=_t(wn),U.anchor=D?D.previousSibling:V.lastChild):U=x.nodeType===3?Lf(""):_t("div"),U.el=x,v.component.subTree=U}}else O&64?J!==8?D=M():D=v.type.hydrate(x,v,A,w,C,P,n,d):O&128&&(D=v.type.hydrate(x,v,A,w,Jo(o(x)),C,P,n,f))}return z!=null&&Ya(z,null,w,v),D},h=(x,v,A,w,C,P)=>{P=P||!!v.dynamicChildren;const{type:S,props:M,patchFlag:I,shapeFlag:z,dirs:O,transition:X}=v,J=S==="input"||S==="option";if(J||I!==-1){O&&qn(v,null,A,"created");let D=!1;if(T(x)){D=$m(null,X)&&A&&A.vnode.props&&A.vnode.props.appear;const U=x.content.firstChild;D&&X.beforeEnter(U),p(U,x,A),v.el=x=U}if(z&16&&!(M&&(M.innerHTML||M.textContent))){let U=d(x.firstChild,v,x,A,w,C,P);for(;
vendor: 5,029 bytes, lines 14-15
14U;){Qo(x,1)||Xr();const se=U;U=U.nextSibling,a(se)}}else if(z&8){let U=v.children;U[0]===` 15`&&(x.tagName==="PRE"||x.tagName==="TEXTAREA")&&(U=U.slice(1)),x.textContent!==U&&(Qo(x,0)||Xr(),x.textContent=v.children)}if(M){if(J||!P||I&48){const U=x.tagName.includes("-");for(const se in M)(J&&(se.endsWith("value")||se==="indeterminate")||ko(se)&&!gs(se)||se[0]==="."||U)&&i(x,se,null,M[se],void 0,A)}else if(M.onClick)i(x,"onClick",null,M.onClick,void 0,A);else if(I&4&&vs(M.style))for(const U in M.style)M.style[U]}let V;(V=M&&M.onVnodeBeforeMount)&&Tn(V,A,v),O&&qn(v,null,A,"beforeMount"),((V=M&&M.onVnodeMounted)||O||D)&&t_(()=>{V&&Tn(V,A,v),D&&X.enter(x),O&&qn(v,null,A,"mounted")},w)}return x.nextSibling},d=(x,v,A,w,C,P,S)=>{S=S||!!v.dynamicChildren;const M=v.children,I=M.length;for(let z=0;z<I;z++){const O=S?M[z]:M[z]=mn(M[z]),X=O.type===Lr;x?(X&&!S&&z+1<I&&mn(M[z+1]).type===Lr&&(l(r(x.data.slice(O.children.length)),A,s(x)),x.data=O.children),x=f(x,O,w,C,P,S)):X&&!O.children?l(O.el=r(""),A):(Qo(A,1)||Xr(),t(null,O,A,null,w,C,Jo(A),P))}return x},g=(x,v,A,w,C,P)=>{const{slotScopeIds:S}=v;S&&(C=C?C.concat(S):S);const M=o(x),I=d(s(x),v,M,A,w,C,P);return I&&fs(I)&&I.data==="]"?s(v.anchor=I):(Xr(),l(v.anchor=u("]"),M,I),I)},_=(x,v,A,w,C,P)=>{if(Qo(x.parentElement,1)||Xr(),v.el=null,P){const I=m(x);for(;;){const z=s(x);if(z&&z!==I)a(z);else break}}const S=s(x),M=o(x);return a(x),t(null,v,M,S,A,w,Jo(M),C),S},m=(x,v="[",A="]")=>{let w=0;for(;x;)if(x=s(x),x&&fs(x)&&(x.data===v&&w++,x.data===A)){if(w===0)return s(x);w--}return x},p=(x,v,A)=>{const w=v.parentNode;w&&w.replaceChild(x,v);let C=A;for(;C;)C.vnode.el===v&&(C.vnode.el=C.subTree.el=x),C=C.parent},T=x=>x.nodeType===1&&x.tagName==="TEMPLATE";return[c,f]}const Lh="data-allow-mismatch",Lv={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Qo(n,e){if(e===0||e===1)for(;n&&!n.hasAttribute(Lh);)n=n.parentElement;const t=n&&n.getAttribute(Lh);if(t==null)return!1;if(t==="")return!0;{const i=t.split(",");return e===0&&i.includes("children")?!0:t.split(",").includes(Lv[e])}}_l().requestIdleCallback;_l().cancelIdleCallback;function Iv(n,e){if(fs(n)&&n.data==="["){let t=1,i=n.nextSibling;for(;i;){if(i.nodeType===1){if(e(i)===!1)break}else if(fs(i))if(i.data==="]"){if(--t===0)break}else i.data==="["&&t++;i=i.nextSibling}}else e(n)}const ys=n=>!!n.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Ih(n){Oe(n)&&(n={loader:n});const{loader:e,loadingComponent:t,errorComponent:i,delay:r=200,hydrate:s,timeout:o,suspensible:a=!0,onError:l}=n;let u=null,c,f=0;const h=()=>(f++,u=null,d()),d=()=>{let g;return u||(g=u=e().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),l)return new Promise((m,p)=>{l(_,()=>m(h()),()=>p(_),f+1)});throw _}).then(_=>g!==u&&u?u:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),c=_,_)))};return bm({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(g,_,m){const p=s?()=>{const T=s(m,x=>Iv(g,x));T&&(_.bum||(_.bum=[])).push(T)}:m;c?p():d().then(()=>!_.isUnmounted&&p())},get __asyncResolved(){return c},setup(){const g=bt;if(bf(g),c)return()=>kl(c,g);const _=x=>{u=null,Gs(x,g,13,!i)};if(a&&g.suspense||Ds)return d().then(x=>()=>kl(x,g)).catch(x=>(_(x),()=>i?_t(i,{error:x}):null));const m=Pn(!1),p=Pn(),T=Pn(!!r);return r&&setTimeout(()=>{T.value=!1},r),o!=null&&setTimeout(()=>{if(!m.value&&!p.value){const x=new Error(`Async component timed out after ${o}ms.`);_(x),p.value=x}},o),d().then(()=>{m.value=!0,g.parent&&wf(g.parent.vnode)&&g.parent.update()}).catch(x=>{_(x),p.value=x}),()=>{if(m.value&&c)return kl(c,g);if(p.value&&i)return _t(i,{error:p.value});if(t&&!T.value)return _t(t)}}})}function kl(n,e){const{ref:t,props:i,children:r,ce:s}=e.vnode,o=_t(n,i,r);return o.ref=t,o.ce=s,delete e.vnode.ce,o}const wf=n=>n.type.__isKeepAlive;function wm(n,e){Rm(n,"a",e)}function Am(n,e){Rm(n,"da",e)}function Rm(n,e,t=bt){const i=n.__wdc||(n.__wdc=()=>{let r=t;for(;r;){if(r.isDeactivated)return;r=r.parent}return n()});if(xl(e,i,t),t){let r=t.parent;for(;r&&r.parent;)wf(r.parent.vnode)&&Uv(i,e,t,r),r=r.parent}}function Uv(n,e,t,i){const r=xl(e,n,i,!0);yl(()=>{ff(i[e],r)},t)}function xl(n,e,t=bt,i=!1){if(t){const r=t[n]||(t[n]=[]),s=e.__weh||(e.__weh=(...o)=>{sr();const a=zo(t),l=ei(e,t,n,o);return a(),or(),l});return i?r.unshift(s):r.push(s),s}}const Ri=n=>(e,t=bt)=>{(!Ds||n==="sp")&&xl(n,(...i)=>e(...i),t)},Nv=Ri("bm"),Af=Ri("m"),Ov=Ri("bu"),Fv=Ri("u"),Cm=Ri("bum"),yl=Ri("um"),Bv=Ri("sp"),kv=Ri("rtg"),Hv=Ri("rtc");function Pm(n,e=bt){xl("ec",n,e)}const Dm="components";function dP(n,e){return Im(Dm,n,!0,e)||n}const Lm=Symbol.for("v-ndc");function zv(n){return vt(n)?Im(Dm,n,!1)||n:n||Lm}function Im(n,e,t=!0,i=!1){const r=gn||bt;if(r){const s=r.type;{const a=Dx(s,!1);if(a&&(a===e||a===Dn(e)||a===ml(Dn(e))))return s}const o=Uh(r[n]||s[n],e)||Uh(r.appContext[n],e);return!o&&i?s:o}}function Uh(n,e){return n&&(n[e]||n[Dn(e)]||n[ml(Dn(e))])}const kc=n=>n?a_(n)?Uf(n):kc(n.parent):null,po=Dt(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>
vendor: 5,526 bytes, line 15
15n.props,$attrs:n=>n.attrs,$slots:n=>n.slots,$refs:n=>n.refs,$parent:n=>kc(n.parent),$root:n=>kc(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>Rf(n),$forceUpdate:n=>n.f||(n.f=()=>{Ef(n.update)}),$nextTick:n=>n.n||(n.n=Mf.bind(n.proxy)),$watch:n=>lx.bind(n)}),Hl=(n,e)=>n!==at&&!n.__isScriptSetup&&Ze(n,e),Vv={get({_:n},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:r,props:s,accessCache:o,type:a,appContext:l}=n;let u;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return i[e];case 2:return r[e];case 4:return t[e];case 3:return s[e]}else{if(Hl(i,e))return o[e]=1,i[e];if(r!==at&&Ze(r,e))return o[e]=2,r[e];if((u=n.propsOptions[0])&&Ze(u,e))return o[e]=3,s[e];if(t!==at&&Ze(t,e))return o[e]=4,t[e];Hc&&(o[e]=0)}}const c=po[e];let f,h;if(c)return e==="$attrs"&&Ft(n.attrs,"get",""),c(n);if((f=a.__cssModules)&&(f=f[e]))return f;if(t!==at&&Ze(t,e))return o[e]=4,t[e];if(h=l.config.globalProperties,Ze(h,e))return h[e]},set({_:n},e,t){const{data:i,setupState:r,ctx:s}=n;return Hl(r,e)?(r[e]=t,!0):i!==at&&Ze(i,e)?(i[e]=t,!0):Ze(n.props,e)||e[0]==="$"&&e.slice(1)in n?!1:(s[e]=t,!0)},has({_:{data:n,setupState:e,accessCache:t,ctx:i,appContext:r,propsOptions:s}},o){let a;return!!t[o]||n!==at&&Ze(n,o)||Hl(e,o)||(a=s[0])&&Ze(a,o)||Ze(i,o)||Ze(po,o)||Ze(r.config.globalProperties,o)},defineProperty(n,e,t){return t.get!=null?n._.accessCache[e]=0:Ze(t,"value")&&this.set(n,e,t.value,null),Reflect.defineProperty(n,e,t)}};function Nh(n){return Be(n)?n.reduce((e,t)=>(e[t]=null,e),{}):n}let Hc=!0;function Gv(n){const e=Rf(n),t=n.proxy,i=n.ctx;Hc=!1,e.beforeCreate&&Oh(e.beforeCreate,n,"bc");const{data:r,computed:s,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:f,mounted:h,beforeUpdate:d,updated:g,activated:_,deactivated:m,beforeDestroy:p,beforeUnmount:T,destroyed:x,unmounted:v,render:A,renderTracked:w,renderTriggered:C,errorCaptured:P,serverPrefetch:S,expose:M,inheritAttrs:I,components:z,directives:O,filters:X}=e;if(u&&Wv(u,i,null),o)for(const V in o){const U=o[V];Oe(U)&&(i[V]=U.bind(t))}if(r){const V=r.call(t,t);ht(V)&&(n.data=Ji(V))}if(Hc=!0,s)for(const V in s){const U=s[V],se=Oe(U)?U.bind(t,t):Oe(U.get)?U.get.bind(t,t):Zn,fe=!Oe(U)&&Oe(U.set)?U.set.bind(t):Zn,pe=c_({get:se,set:fe});Object.defineProperty(i,V,{enumerable:!0,configurable:!0,get:()=>pe.value,set:Ee=>pe.value=Ee})}if(a)for(const V in a)Um(a[V],i,t,V);if(l){const V=Oe(l)?l.call(t):l;Reflect.ownKeys(V).forEach(U=>{Om(U,V[U])})}c&&Oh(c,n,"c");function D(V,U){Be(U)?U.forEach(se=>V(se.bind(t))):U&&V(U.bind(t))}if(D(Nv,f),D(Af,h),D(Ov,d),D(Fv,g),D(wm,_),D(Am,m),D(Pm,P),D(Hv,w),D(kv,C),D(Cm,T),D(yl,v),D(Bv,S),Be(M))if(M.length){const V=n.exposed||(n.exposed={});M.forEach(U=>{Object.defineProperty(V,U,{get:()=>t[U],set:se=>t[U]=se})})}else n.exposed||(n.exposed={});A&&n.render===Zn&&(n.render=A),I!=null&&(n.inheritAttrs=I),z&&(n.components=z),O&&(n.directives=O),S&&bf(n)}function Wv(n,e,t=Zn){Be(n)&&(n=zc(n));for(const i in n){const r=n[i];let s;ht(r)?"default"in r?s=Ss(r.from||i,r.default,!0):s=Ss(r.from||i):s=Ss(r),Pt(s)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[i]=s}}function Oh(n,e,t){ei(Be(n)?n.map(i=>i.bind(e.proxy)):n.bind(e.proxy),e,t)}function Um(n,e,t,i){let r=i.includes(".")?Zm(t,i):()=>t[i];if(vt(n)){const s=e[n];Oe(s)&&wa(r,s)}else if(Oe(n))wa(r,n.bind(t));else if(ht(n))if(Be(n))n.forEach(s=>Um(s,e,t,i));else{const s=Oe(n.handler)?n.handler.bind(t):e[n.handler];Oe(s)&&wa(r,s,n)}}function Rf(n){const e=n.type,{mixins:t,extends:i}=e,{mixins:r,optionsCache:s,config:{optionMergeStrategies:o}}=n.appContext,a=s.get(e);let l;return a?l=a:!r.length&&!t&&!i?l=e:(l={},r.length&&r.forEach(u=>$a(l,u,o,!0)),$a(l,e,o)),ht(e)&&s.set(e,l),l}function $a(n,e,t,i=!1){const{mixins:r,extends:s}=e;s&&$a(n,s,t,!0),r&&r.forEach(o=>$a(n,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=Xv[o]||t&&t[o];n[o]=a?a(n[o],e[o]):e[o]}return n}const Xv={data:Fh,props:Bh,emits:Bh,methods:so,computed:so,beforeCreate:Vt,created:Vt,beforeMount:Vt,mounted:Vt,beforeUpdate:Vt,updated:Vt,beforeDestroy:Vt,beforeUnmount:Vt,destroyed:Vt,unmounted:Vt,activated:Vt,deactivated:Vt,errorCaptured:Vt,serverPrefetch:Vt,components:so,directives:so,watch:Yv,provide:Fh,inject:qv};function Fh(n,e){return e?n?function(){return Dt(Oe(n)?n.call(this,this):n,Oe(e)?e.call(this,this):e)}:e:n}function qv(n,e){return so(zc(n),zc(e))}function zc(n){if(Be(n)){const e={};for(let t=0;t<n.length;t++)e[n[t]]=n[t];return e}return n}function Vt(n,e){return n?[...new Set([].concat(n,e))]:e}function so(n,e){return n?Dt(Object.create(null),n,e):e}function Bh(n,e){return n?Be(n)&&Be(e)?[...new Set([...n,...e])]:Dt(Object.create(null),Nh(n),Nh(e??{})):e}function Yv(n,e){if(!n)return e;if(!e)return n;const t=Dt(Object.create(null),n);for(const i in e)t[i]=Vt(n[i],e[i]);return t}function Nm(){return{app:null,config:{isNativeTag:U0,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let $v=0;function jv(n,e){return function(i,r=null){Oe(i)||(i=Dt({},i)),r!=null&&!ht(r)&&(r=null);const s=Nm(),o=new WeakSet,a=[];let l=!1;const u=s.app={_uid:$v++,_component:i,_props:r,_container:null,_context:s,_instance:null,version:u_,get config(){return s.config},set config(c){},use(c,...f){return o.has(c)||(c&&Oe(c.install)?(o.add(c),c.install(u,...f)):Oe(c)&&(o.add(c),c(u,...f))),u}
vendor: 21,686 bytes, line 15
15,mixin(c){return s.mixins.includes(c)||s.mixins.push(c),u},component(c,f){return f?(s.components[c]=f,u):s.components[c]},directive(c,f){return f?(s.directives[c]=f,u):s.directives[c]},mount(c,f,h){if(!l){const d=u._ceVNode||_t(i,r);return d.appContext=s,h===!0?h="svg":h===!1&&(h=void 0),f&&e?e(d,c):n(d,c,h),l=!0,u._container=c,c.__vue_app__=u,Uf(d.component)}},onUnmount(c){a.push(c)},unmount(){l&&(ei(a,u._instance,16),n(null,u._container),delete u._container.__vue_app__)},provide(c,f){return s.provides[c]=f,u},runWithContext(c){const f=Dr;Dr=u;try{return c()}finally{Dr=f}}};return u}}let Dr=null;function Om(n,e){if(bt){let t=bt.provides;const i=bt.parent&&bt.parent.provides;i===t&&(t=bt.provides=Object.create(i)),t[n]=e}}function Ss(n,e,t=!1){const i=bt||gn;if(i||Dr){const r=Dr?Dr._context.provides:i?i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(r&&n in r)return r[n];if(arguments.length>1)return t&&Oe(e)?e.call(i&&i.proxy):e}}function Fm(){return!!(bt||gn||Dr)}const Bm={},km=()=>Object.create(Bm),Hm=n=>Object.getPrototypeOf(n)===Bm;function Kv(n,e,t,i=!1){const r={},s=km();n.propsDefaults=Object.create(null),zm(n,e,r,s);for(const o in n.propsOptions[0])o in r||(r[o]=void 0);t?n.props=i?r:us(r):n.type.props?n.props=r:n.props=s,n.attrs=s}function Zv(n,e,t,i){const{props:r,attrs:s,vnode:{patchFlag:o}}=n,a=$e(r),[l]=n.propsOptions;let u=!1;if((i||o>0)&&!(o&16)){if(o&8){const c=n.vnode.dynamicProps;for(let f=0;f<c.length;f++){let h=c[f];if(Sl(n.emitsOptions,h))continue;const d=e[h];if(l)if(Ze(s,h))d!==s[h]&&(s[h]=d,u=!0);else{const g=Dn(h);r[g]=Vc(l,a,g,d,n,!1)}else d!==s[h]&&(s[h]=d,u=!0)}}}else{zm(n,e,r,s)&&(u=!0);let c;for(const f in a)(!e||!Ze(e,f)&&((c=zr(f))===f||!Ze(e,c)))&&(l?t&&(t[f]!==void 0||t[c]!==void 0)&&(r[f]=Vc(l,a,f,void 0,n,!0)):delete r[f]);if(s!==a)for(const f in s)(!e||!Ze(e,f))&&(delete s[f],u=!0)}u&&_i(n.attrs,"set","")}function zm(n,e,t,i){const[r,s]=n.propsOptions;let o=!1,a;if(e)for(let l in e){if(gs(l))continue;const u=e[l];let c;r&&Ze(r,c=Dn(l))?!s||!s.includes(c)?t[c]=u:(a||(a={}))[c]=u:Sl(n.emitsOptions,l)||(!(l in i)||u!==i[l])&&(i[l]=u,o=!0)}if(s){const l=$e(t),u=a||at;for(let c=0;c<s.length;c++){const f=s[c];t[f]=Vc(r,l,f,u[f],n,!Ze(u,f))}}return o}function Vc(n,e,t,i,r,s){const o=n[t];if(o!=null){const a=Ze(o,"default");if(a&&i===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Oe(l)){const{propsDefaults:u}=r;if(t in u)i=u[t];else{const c=zo(r);i=u[t]=l.call(null,e),c()}}else i=l;r.ce&&r.ce._setProp(t,i)}o[0]&&(s&&!a?i=!1:o[1]&&(i===""||i===zr(t))&&(i=!0))}return i}const Jv=new WeakMap;function Vm(n,e,t=!1){const i=t?Jv:e.propsCache,r=i.get(n);if(r)return r;const s=n.props,o={},a=[];let l=!1;if(!Oe(n)){const c=f=>{l=!0;const[h,d]=Vm(f,e,!0);Dt(o,h),d&&a.push(...d)};!t&&e.mixins.length&&e.mixins.forEach(c),n.extends&&c(n.extends),n.mixins&&n.mixins.forEach(c)}if(!s&&!l)return ht(n)&&i.set(n,ms),ms;if(Be(s))for(let c=0;c<s.length;c++){const f=Dn(s[c]);kh(f)&&(o[f]=at)}else if(s)for(const c in s){const f=Dn(c);if(kh(f)){const h=s[c],d=o[f]=Be(h)||Oe(h)?{type:h}:Dt({},h),g=d.type;let _=!1,m=!0;if(Be(g))for(let p=0;p<g.length;++p){const T=g[p],x=Oe(T)&&T.name;if(x==="Boolean"){_=!0;break}else x==="String"&&(m=!1)}else _=Oe(g)&&g.name==="Boolean";d[0]=_,d[1]=m,(_||Ze(d,"default"))&&a.push(f)}}const u=[o,a];return ht(n)&&i.set(n,u),u}function kh(n){return n[0]!=="$"&&!gs(n)}const Gm=n=>n[0]==="_"||n==="$stable",Cf=n=>Be(n)?n.map(mn):[mn(n)],Qv=(n,e,t)=>{if(e._n)return e;const i=Tm((...r)=>Cf(e(...r)),t);return i._c=!1,i},Wm=(n,e,t)=>{const i=n._ctx;for(const r in n){if(Gm(r))continue;const s=n[r];if(Oe(s))e[r]=Qv(r,s,i);else if(s!=null){const o=Cf(s);e[r]=()=>o}}},Xm=(n,e)=>{const t=Cf(e);n.slots.default=()=>t},qm=(n,e,t)=>{for(const i in e)(t||i!=="_")&&(n[i]=e[i])},ex=(n,e,t)=>{const i=n.slots=km();if(n.vnode.shapeFlag&32){const r=e._;r?(qm(i,e,t),t&&Zp(i,"_",r,!0)):Wm(e,i)}else e&&Xm(n,e)},tx=(n,e,t)=>{const{vnode:i,slots:r}=n;let s=!0,o=at;if(i.shapeFlag&32){const a=e._;a?t&&a===1?s=!1:qm(r,e,t):(s=!e.$stable,Wm(e,r)),o=e}else e&&(Xm(n,e),o={default:1});if(s)for(const a in r)!Gm(a)&&o[a]==null&&delete r[a]},fn=t_;function nx(n){return Ym(n)}function ix(n){return Ym(n,Dv)}function Ym(n,e){const t=_l();t.__VUE__=!0;const{insert:i,remove:r,patchProp:s,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:f,nextSibling:h,setScopeId:d=Zn,insertStaticContent:g}=n,_=(L,E,j,ee=null,Z=null,q=null,oe=void 0,Q=null,b=!!E.dynamicChildren)=>{if(L===E)return;L&&!Gi(L,E)&&(ee=de(L),Ee(L,Z,q,!0),L=null),E.patchFlag===-2&&(b=!1,E.dynamicChildren=null);const{type:y,ref:N,shapeFlag:B}=E;switch(y){case Lr:m(L,E,j,ee);break;case ti:p(L,E,j,ee);break;case mo:L==null&&T(E,j,ee,oe);break;case wn:z(L,E,j,ee,Z,q,oe,Q,b);break;default:B&1?A(L,E,j,ee,Z,q,oe,Q,b):B&6?O(L,E,j,ee,Z,q,oe,Q,b):(B&64||B&128)&&y.process(L,E,j,ee,Z,q,oe,Q,b,Ne)}N!=null&&Z&&Ya(N,L&&L.ref,q,E||L,!E)},m=(L,E,j,ee)=>{if(L==null)i(E.el=a(E.children),j,ee);else{const Z=E.el=L.el;E.children!==L.children&&u(Z,E.children)}},p=(L,E,j,ee)=>{L==null?i(E.el=l(E.children||""),j,ee):E.el=L.el},T=(L,E,j,ee)=>{[L.el,L.anchor]=g(L.children,E,j,ee,L.el,L.anchor)},x=({el:L,anchor:E},j,ee)=>{let Z;for(;L&&L!==E;)Z=h(L),i(L,j,ee),L=Z;i(E,j,ee)},v=({el:L,anchor:E})=>{let j;for(;L&&L!==E;)j=h(L),r(L),L=j;r(E)},A=(L,E,j,ee,Z,q,oe,Q,b)=>{E.type==="svg"?oe="svg":E.type==="math"&&(oe="mathml"),L==null?w(E,j,ee,Z,q,oe,Q,b):S(L,E,Z,q,oe,Q,b)},w=(L,E,j,ee,Z,q,oe,Q)=>{let b,y;const{props:N,shapeFlag:B,transition:W,dirs:G}=L;if(b=L.el=o(L.type,q,N&&N.is,N),B&8?c(b,L.children):B&16&&P(L.children,b,null,ee,Z,zl(L,q),oe,Q),G&&qn(L,null,ee,"created"),C(b,L,L.scopeId,oe,ee),N){for(const ae in N)ae!=="value"&&!gs(ae)&&s(b,ae,null,N[ae],q,ee);"value"in N&&s(b,"value",null,N.value,q),(y=N.onVnodeBeforeMount)&&Tn(y,ee,L)}G&&qn(L,null,ee,"beforeMount");const ue=$m(Z,W);ue&&W.beforeEnter(b),i(b,E,j),((y=N&&N.onVnodeMounted)||ue||G)&&fn(()=>{y&&Tn(y,ee,L),ue&&W.enter(b),G&&qn(L,null,ee,"mounted")},Z)},C=(L,E,j,ee,Z)=>{if(j&&d(L,j),ee)for(let q=0;q<ee.length;q++)d(L,ee[q]);if(Z){let q=Z.subTree;if(E===q||Qm(q.type)&&(q.ssContent===E||q.ssFallback===E)){const oe=Z.vnode;C(L,oe,oe.scopeId,oe.slotScopeIds,Z.parent)}}},P=(L,E,j,ee,Z,q,oe,Q,b=0)=>{for(let y=b;y<L.length;y++){const N=L[y]=Q?ki(L[y]):mn(L[y]);_(null,N,E,j,ee,Z,q,oe,Q)}},S=(L,E,j,ee,Z,q,oe)=>{const Q=E.el=L.el;let{patchFlag:b,dynamicChildren:y,dirs:N}=E;b|=L.patchFlag&16;const B=L.props||at,W=E.props||at;let G;if(j&&ur(j,!1),(G=W.onVnodeBeforeUpdate)&&Tn(G,j,E,L),N&&qn(E,L,j,"beforeUpdate"),j&&ur(j,!0),(B.innerHTML&&W.innerHTML==null||B.textContent&&W.textContent==null)&&c(Q,""),y?M(L.dynamicChildren,y,Q,j,ee,zl(E,Z),q):oe||U(L,E,Q,null,j,ee,zl(E,Z),q,!1),b>0){if(b&16)I(Q,B,W,j,Z);else if(b&2&&B.class!==W.class&&s(Q,"class",null,W.class,Z),b&4&&s(Q,"style",B.style,W.style,Z),b&8){const ue=E.dynamicProps;for(let ae=0;ae<ue.length;ae++){const ce=ue[ae],Ue=B[ce],re=W[ce];(re!==Ue||ce==="value")&&s(Q,ce,Ue,re,Z,j)}}b&1&&L.children!==E.children&&c(Q,E.children)}else!oe&&y==null&&I(Q,B,W,j,Z);((G=W.onVnodeUpdated)||N)&&fn(()=>{G&&Tn(G,j,E,L),N&&qn(E,L,j,"updated")},ee)},M=(L,E,j,ee,Z,q,oe)=>{for(let Q=0;Q<E.length;Q++){const b=L[Q],y=E[Q],N=b.el&&(b.type===wn||!Gi(b,y)||b.shapeFlag&70)?f(b.el):j;_(b,y,N,null,ee,Z,q,oe,!0)}},I=(L,E,j,ee,Z)=>{if(E!==j){if(E!==at)for(const q in E)!gs(q)&&!(q in j)&&s(L,q,E[q],null,Z,ee);for(const q in j){if(gs(q))continue;const oe=j[q],Q=E[q];oe!==Q&&q!=="value"&&s(L,q,Q,oe,Z,ee)}"value"in j&&s(L,"value",E.value,j.value,Z)}},z=(L,E,j,ee,Z,q,oe,Q,b)=>{const y=E.el=L?L.el:a(""),N=E.anchor=L?L.anchor:a("");let{patchFlag:B,dynamicChildren:W,slotScopeIds:G}=E;G&&(Q=Q?Q.concat(G):G),L==null?(i(y,j,ee),i(N,j,ee),P(E.children||[],j,N,Z,q,oe,Q,b)):B>0&&B&64&&W&&L.dynamicChildren?(M(L.dynamicChildren,W,j,Z,q,oe,Q),(E.key!=null||Z&&E===Z.subTree)&&jm(L,E,!0)):U(L,E,j,N,Z,q,oe,Q,b)},O=(L,E,j,ee,Z,q,oe,Q,b)=>{E.slotScopeIds=Q,L==null?E.shapeFlag&512?Z.ctx.activate(E,j,ee,oe,b):X(E,j,ee,Z,q,oe,b):J(L,E,b)},X=(L,E,j,ee,Z,q,oe)=>{const Q=L.component=wx(L,ee,Z);if(wf(L)&&(Q.ctx.renderer=Ne),Ax(Q,!1,oe),Q.asyncDep){if(Z&&Z.registerDep(Q,D,oe),!L.el){const b=Q.subTree=_t(ti);p(null,b,E,j)}}else D(Q,L,E,j,Z,q,oe)},J=(L,E,j)=>{const ee=E.component=L.component;if(px(L,E,j))if(ee.asyncDep&&!ee.asyncResolved){V(ee,E,j);return}else ee.next=E,ee.update();else E.el=L.el,ee.vnode=E},D=(L,E,j,ee,Z,q,oe)=>{const Q=()=>{if(L.isMounted){let{next:B,bu:W,u:G,parent:ue,vnode:ae}=L;{const Te=Km(L);if(Te){B&&(B.el=ae.el,V(L,B,oe)),Te.asyncDep.then(()=>{L.isUnmounted||Q()});return}}let ce=B,Ue;ur(L,!1),B?(B.el=ae.el,V(L,B,oe)):B=ae,W&&Ul(W),(Ue=B.props&&B.props.onVnodeBeforeUpdate)&&Tn(Ue,ue,B,ae),ur(L,!0);const re=Vl(L),me=L.subTree;L.subTree=re,_(me,re,f(me.el),de(me),L,Z,q),B.el=re.el,ce===null&&Df(L,re.el),G&&fn(G,Z),(Ue=B.props&&B.props.onVnodeUpdated)&&fn(()=>Tn(Ue,ue,B,ae),Z)}else{let B;const{el:W,props:G}=E,{bm:ue,m:ae,parent:ce,root:Ue,type:re}=L,me=ys(E);if(ur(L,!1),ue&&Ul(ue),!me&&(B=G&&G.onVnodeBeforeMount)&&Tn(B,ce,E),ur(L,!0),W&&We){const Te=()=>{L.subTree=Vl(L),We(W,L.subTree,L,Z,null)};me&&re.__asyncHydrate?re.__asyncHydrate(W,L,Te):Te()}else{Ue.ce&&Ue.ce._injectChildStyle(re);const Te=L.subTree=Vl(L);_(null,Te,j,ee,L,Z,q),E.el=Te.el}if(ae&&fn(ae,Z),!me&&(B=G&&G.onVnodeMounted)){const Te=E;fn(()=>Tn(B,ce,Te),Z)}(E.shapeFlag&256||ce&&ys(ce.vnode)&&ce.vnode.shapeFlag&256)&&L.a&&fn(L.a,Z),L.isMounted=!0,E=j=ee=null}};L.scope.on();const b=L.effect=new im(Q);L.scope.off();const y=L.update=b.run.bind(b),N=L.job=b.runIfDirty.bind(b);N.i=L,N.id=L.uid,b.scheduler=()=>Ef(N),ur(L,!0),y()},V=(L,E,j)=>{E.component=L;const ee=L.vnode.props;L.vnode=E,L.next=null,Zv(L,E.props,ee,j),tx(L,E.children,j),sr(),Ph(L),or()},U=(L,E,j,ee,Z,q,oe,Q,b=!1)=>{const y=L&&L.children,N=L?L.shapeFlag:0,B=E.children,{patchFlag:W,shapeFlag:G}=E;if(W>0){if(W&128){fe(y,B,j,ee,Z,q,oe,Q,b);return}else if(W&256){se(y,B,j,ee,Z,q,oe,Q,b);return}}G&8?(N&16&&Me(y,Z,q),B!==y&&c(j,B)):N&16?G&16?fe(y,B,j,ee,Z,q,oe,Q,b):Me(y,Z,q,!0):(N&8&&c(j,""),G&16&&P(B,j,ee,Z,q,oe,Q,b))},se=(L,E,j,ee,Z,q,oe,Q,b)=>{L=L||ms,E=E||ms;const y=L.length,N=E.length,B=Math.min(y,N);let W;for(W=0;W<B;W++){const G=E[W]=b?ki(E[W]):mn(E[W]);_(L[W],G,j,null,Z,q,oe,Q,b)}y>N?Me(L,Z,q,!0,!1,B):P(E,j,ee,Z,q,oe,Q,b,B)},fe=(L,E,j,ee,Z,q,oe,Q,b)=>{let y=0;const N=E.length;let B=L.length-1,W=N-1;for(;y<=B&&y<=W;){const G=L[y],ue=E[y]=b?ki(E[y]):mn(E[y]);if(Gi(G,ue))_(G,ue,j,null,Z,q,oe,Q,b);else break;y++}for(;y<=B&&y<=W;){const G=L[B],ue=E[W]=b?ki(E[W]):mn(E[W]);if(Gi(G,ue))_(G,ue,j,null,Z,q,oe,Q,b);else break;B--,W--}if(y>B){if(y<=W){const G=W+1,ue=G<N?E[G].el:ee;for(;y<=W;)_(null,E[y]=b?ki(E[y]):mn(E[y]),j,ue,Z,q,oe,Q,b),y++}}else if(y>W)for(;y<=B;)Ee(L[y],Z,q,!0),y++;else{const G=y,ue=y,ae=new Map;for(y=ue;y<=W;y++){const Ie=E[y]=b?ki(E[y]):mn(E[y]);Ie.key!=null&&ae.set(Ie.key,y)}let ce,Ue=0;const re=W-ue+1;let me=!1,Te=0;const Pe=new Array(re);for(y=0;y<re;y++)Pe[y]=0;for(y=G;y<=B;y++){const Ie=L[y];if(Ue>=re){Ee(Ie,Z,q,!0);continue}let De;if(Ie.key!=null)De=ae.get(Ie.key);else for(ce=ue;ce<=W;ce++)if(Pe[ce-ue]===0&&Gi(Ie,E[ce])){De=ce;break}De===void 0?Ee(Ie,Z,q,!0):(Pe[De-ue]=y+1,De>=Te?Te=De:me=!0,_(Ie,E[De],j,null,Z,q,oe,Q,b),Ue++)}const Se=me?rx(Pe):ms;for(ce=Se.length-1,y=re-1;y>=0;y--){const Ie=ue+y,De=E[Ie],Qe=Ie+1<N?E[Ie+1].el:ee;Pe[y]===0?_(null,De,j,Qe,Z,q,oe,Q,b):me&&(ce<0||y!==Se[ce]?pe(De,j,Qe,2):ce--)}}},pe=(L,E,j,ee,Z=null)=>{const{el:q,type:oe,transition:Q,children:b,shapeFlag:y}=L;if(y&6){pe(L.component.subTree,E,j,ee);return}if(y&128){L.suspense.move(E,j,ee);return}if(y&64){oe.move(L,E,j,Ne);return}if(oe===wn){i(q,E,j);for(let B=0;B<b.length;B++)pe(b[B],E,j,ee);i(L.anchor,E,j);return}if(oe===mo){x(L,E,j);return}if(ee!==2&&y&1&&Q)if(ee===0)Q.beforeEnter(q),i(q,E,j),fn(()=>Q.enter(q),Z);else{const{leave:B,delayLeave:W,afterLeave:G}=Q,ue=()=>i(q,E,j),ae=()=>{B(q,()=>{ue(),G&&G()})};W?W(q,ue,ae):ae()}else i(q,E,j)},Ee=(L,E,j,ee=!1,Z=!1)=>{const{type:q,props:oe,ref:Q,children:b,dynamicChildren:y,shapeFlag:N,patchFlag:B,dirs:W,cacheIndex:G}=L;if(B===-2&&(Z=!1),Q!=null&&Ya(Q,null,j,L,!0),G!=null&&(E.renderCache[G]=void 0),N&256){E.ctx.deactivate(L);return}const ue=N&1&&W,ae=!ys(L);let ce;if(ae&&(ce=oe&&oe.onVnodeBeforeUnmount)&&Tn(ce,E,L),N&6)le(L.component,j,ee);else{if(N&128){L.suspense.unmount(j,ee);return}ue&&qn(L,null,E,"beforeUnmount"),N&64?L.type.remove(L,E,j,Ne,ee):y&&!y.hasOnce&&(q!==wn||B>0&&B&64)?Me(y,E,j,!1,!0):(q===wn&&B&384||!Z&&N&16)&&Me(b,E,j),ee&&Ge(L)}(ae&&(ce=oe&&oe.onVnodeUnmounted)||ue)&&fn(()=>{ce&&Tn(ce,E,L),ue&&qn(L,null,E,"unmounted")},j)},Ge=L=>{const{type:E,el:j,anchor:ee,transition:Z}=L;if(E===wn){te(j,ee);return}if(E===mo){v(L);return}const q=()=>{r(j),Z&&!Z.persisted&&Z.afterLeave&&Z.afterLeave()};if(L.shapeFlag&1&&Z&&!Z.persisted){const{leave:oe,delayLeave:Q}=Z,b=()=>oe(j,q);Q?Q(L.el,q,b):b()}else q()},te=(L,E)=>{let j;for(;L!==E;)j=h(L),r(L),L=j;r(E)},le=(L,E,j)=>{const{bum:ee,scope:Z,job:q,subTree:oe,um:Q,m:b,a:y}=L;Hh(b),Hh(y),ee&&Ul(ee),Z.stop(),q&&(q.flags|=8,Ee(oe,L,E,j)),Q&&fn(Q,E),fn(()=>{L.isUnmounted=!0},E),E&&E.pendingBranch&&!E.isUnmounted&&L.asyncDep&&!L.asyncResolved&&L.suspenseId===E.pendingId&&(E.deps--,E.deps===0&&E.resolve())},Me=(L,E,j,ee=!1,Z=!1,q=0)=>{for(let oe=q;oe<L.length;oe++)Ee(L[oe],E,j,ee,Z)},de=L=>{if(L.shapeFlag&6)return de(L.component.subTree);if(L.shapeFlag&128)return L.suspense.next();const E=h(L.anchor||L.el),j=E&&E[Av];return j?h(j):E};let Ce=!1;const Le=(L,E,j)=>{L==null?E._vnode&&Ee(E._vnode,null,null,!0):_(E._vnode||null,L,E,null,null,null,j),E._vnode=L,Ce||(Ce=!0,Ph(),Xa(),Ce=!1)},Ne={p:_,um:Ee,m:pe,r:Ge,mt:X,mc:P,pc:U,pbc:M,n:de,o:n};let it,We;return e&&([it,We]=e(Ne)),{render:Le,hydrate:it,createApp:jv(Le,it)}}function zl({type:n,props:e},t){return t==="svg"&&n==="foreignObject"||t==="mathml"&&n==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function ur({effect:n,job:e},t){t?(n.flags|=32,e.flags|=4):(n.flags&=-33,e.flags&=-5)}function $m(n,e){return(!n||n&&!n.pendingBranch)&&e&&!e.persisted}function jm(n,e,t=!1){const i=n.children,r=e.children;if(Be(i)&&Be(r))for(let s=0;s<i.length;s++){const o=i[s];let a=r[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=r[s]=ki(r[s]),a.el=o.el),!t&&a.patchFlag!==-2&&jm(o,a)),a.type===Lr&&(a.el=o.el)}}function rx(n){const e=n.slice(),t=[0];let i,r,s,o,a;const l=n.length;for(i=0;i<l;i++){const u=n[i];if(u!==0){if(r=t[t.length-1],n[r]<u){e[i]=r,t.push(i);continue}for(s=0,o=t.length-1;s<o;)a=s+o>>1,n[t[a]]<u?s=a+1:o=a;u<n[t[s]]&&(s>0&&(e[i]=t[s-1]),t[s]=i)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function Km(n){const e=n.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Km(e)}function Hh(n){if(n)for(let e=0;e<n.length;e++)n[e].flags|=8}const sx=Symbol.for("v-scx"),ox=()=>Ss(sx);function ax(n,e){return Pf(n,null,e)}function wa(n,e,t){return Pf(n,e,t)}function Pf(n,e,t=at){const{immediate:i,deep:r,flush:s,once:o}=t,a=Dt({},t),l=e&&i||!e&&s!=="post";let u;if(Ds){if(s==="sync"){const d=ox();u=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=Zn,d.resume=Zn,d.pause=Zn,d}}const c=bt;a.call=(d,g,_)=>ei(d,c,g,_);let f=!1;s==="post"?a.scheduler=d=>{fn(d,c&&c.suspense)}:s!=="sync"&&(f=!0,a.scheduler=(d,g)=>{g?d():Ef(d)}),a.augmentJob=d=>{e&&(d.flags|=4),f&&(d.flags|=2,c&&(d.id=c.uid,d.i=c))};const h=Tv(n,e,a);return Ds&&(u?u.push(h):l&&h()),h}function lx(n,e,t){const i=this.proxy,r=vt(n)?n.includes(".")?Zm(i,n):()=>i[n]:n.bind(i,i);let s;Oe(e)?s=e:(s=e.handler,t=e);const o=zo(this),a=Pf(r,s.bind(i),t);return o(),a}function Zm(n,e){const t=e.split(".");return()=>{let i=n;for(let r=0;r<t.length&&i;r++)i=i[t[r]];return i}}const cx=(n,e)=>e==="modelValue"||e==="model-value"?n.modelModifiers:n[`${e}Modifiers`]||n[`${Dn(e)}Modifiers`]||n[`${zr(e)}Modifiers`];function ux(n,e,...t){if(n.isUnmounted)return;const i=n.vnode.props||at;let r=t;const s=e.startsWith("update:"),o=s&&cx(i,e.slice(7));o&&(o.trim&&(r=t.map(c=>vt(c)?c.trim():c)),o.number&&(r=t.map(k0)));let a,l=i[a=Il(e)]||i[a=Il(Dn(e))];!l&&s&&(l=i[a=Il(zr(e))]),l&&ei(l,n,6,r);const u=i[a+"Once"];if(u){if(!n.emitted)n.emitted={};else if(n.emitted[a])return;n.emitted[a]=!0,ei(u,n,6,r)}}function Jm(n,e,t=!1){const i=e.emitsCache,r=i.get(n);if(r!==void 0)return r;const s=n.emits;let o={},a=!1;if(!Oe(n)){const l=u=>{const c=Jm(u,e,!0);c&&(a=!0,Dt(o,c))};!t&&e.mixins.length&&e.mixins.forEach(l),n.extends&&l(n.extends),n.mixins&&n.mixins.forEach(l)}return!s&&!a?(ht(n)&&i.set(n,null),null):(Be(s)?s.forEach(l=>o[l]=null):Dt(o,s),ht(n)&&i.set(n,o),o)}function Sl(n,e){return!n||!ko(e)?!1:(e=e.slice(2).replace(/Once$/,""),Ze(n,e[0].toLowerCase()+e.slice(1))||Ze(n,zr(e))||Ze(n,e))}function Vl(n){const{type:e,vnode:t,proxy:i,withProxy:r,propsOptions:[s],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:f,data:h,setupState:d,ctx:g,inheritAttrs:_}=n,m=qa(n);let p,T;try{if(t.shapeFlag&4){const v=r||i,A=v;p=mn(u.call(A,v,c,f,d,h,g)),T=a}else{const v=e;p=mn(v.length>1?v(f,{attrs:a,slots:o,emit:l}):v(f,null)),T=e.props?a:hx(a)}}catch(v){_o.length=0,Gs(v,n,1),p=_t(ti)}let x=p;if(T&&_!==!1){const v=Object.keys(T),{shapeFlag:A}=x;v.length&&A&7&&(s&&v.some(uf)&&(T=dx(T,s)),x=Ps(x,T,!1,!0))}return t.dirs&&(x=Ps(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(t.dirs):t.dirs),t.transition&&Tf(x,t.transition),p=x,qa(m),p}function fx(n,e=!0){let t;for(let i=0;i<n.length;i++){const r=n[i];if(Ro(r)){if(r.type!==ti||r.children==="v-if"){if(t)return;t=r}}else return}return t}const hx=n=>{let e;for(const t in n)(t==="class"||t==="style"||ko(t))&&((e||(e={}))[t]=n[t]);return e},dx=(n,e)=>{const t={};for(const i in n)(!uf(i)||!(i.slice(9)in e))&&(t[i]=n[i]);return t};function px(n,e,t){const{props:i,children:r,component:s}=n,{props:o,children:a,patchFlag:l}=e,u=s.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&l>=0){if(l&1024)return!0;if(l&16)return i?zh(i,o,u):!!o;if(l&8){const c=e.dynamicProps;for(let f=0;f<c.length;f++){const h=c[f];if(o[h]!==i[h]&&!Sl(u,h))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:i===o?!1:i?o?zh(i,o,u):!0:!!o;return!1}function zh(n,e,t){const i=Object.keys(e);if(i.length!==Object.keys(n).length)return!0;for(let r=0;r<i.length;r++){const s=i[r];if(e[s]!==n[s]&&!Sl(t,s))return!0}return!1}function Df({vnode:n,parent:e},t){for(;e;){const i=e.subTree;if(i.suspense&&i.suspense.activeBranch===n&&(i.el=n.el),i===n)(n=e.vnode).el=t,e=e.parent;else break}}const Qm=n=>n.__isSuspense;let Gc=0;const mx={name:"Suspense",__isSuspense:!0,process(n,e,t,i,r,s,o,a,l,u){if(n==null)gx(e,t,i,r,s,o,a,l,u);else{if(s&&s.deps>0&&!n.suspense.isInFallback){e.suspense=n.suspense,e.suspense.vnode=e,e.el=n.el;return}vx(n,e,t,i,r,o,a,l,u)}},hydrate:xx,normalize:yx},_x=mx;function wo(n,e){const t=n.props&&n.props[e];Oe(t)&&t()}function gx(n,e,t,i,r,s,o,a,l){const{p:u,o:{createElement:c}}=l,f=c("div"),h=n.suspense=e_(n,r,i,e,f,t,s,o,a,l);u(null,h.pendingBranch=n.ssContent,f,null,i,h,s,o),h.deps>0?(wo(n,"onPending"),wo(n,"onFallback"),u(null,n.ssFallback,e,t,i,null,s,o),Ms(h,n.ssFallback)):h.resolve(!1,!0)}function vx(n,e,t,i,r,s,o,a,{p:l,um:u,o:{createElement:c}}){const f=e.suspense=n.suspense;f.vnode=e,e.el=n.el;const h=e.ssContent,d=e.ssFallback,{activeBranch:g,pendingBranch:_,isInFallback:m,isHydrating:p}=f;if(_)f.pendingBranch=h,Gi(h,_)?(l(_,h,f.hiddenContainer,null,r,f,s,o,a),f.deps<=0?f.resolve():m&&(p||(l(g,d,t,i,r,null,s,o,a),Ms(f,d)))):(f.pendingId=Gc++,p?(f.isHydrating=!1,f.activeBranch=_):u(_,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),m?(l(null,h,f.hiddenContainer,null,r,f,s,o,a),f.deps<=0?f.resolve():(l(g,d,t,i,r,null,s,o,a),Ms(f,d))):g&&Gi(h,g)?(l(g,h,t,i,r,f,s,o,a),f.resolve(!0)):(l(null,h,f.hiddenContainer,null,r,f,s,o,a),f.deps<=0&&f.resolve()));else if(g&&Gi(h,g))l(g,h,t,i,r,f,s,o,a),Ms(f,h);else if(wo(e,"onPending"),f.pendingBranch=h,h.shapeFlag&512?f.pendingId=h.component.suspenseId:f.pendingId=Gc++,l(null,h,f.hiddenContainer,null,r,f,s,o,a),f.deps<=0)f.resolve();else{const{timeout:T,pendingId:x}=f;T>0?setTimeout(()=>{f.pendingId===x&&f.fallback(d)},T):T===0&&f.fallback(d)}}function e_(n,e,t,i,r,s,o,a,l,u,c=!1){const{p:f,m:h,um:d,n:g,o:{parentNode:_,remove:m}}=u;let p;const T=Sx(n);T&&e&&e.pendingBranch&&(p=e.pendingId,e.deps++);const x=n.props?H0(n.props.timeout):void 0,v=s,A={vnode:n,parent:e,parentComponent:t,namespace:o,container:i,hiddenContainer:r,deps:0,pendingId:Gc++,timeout:typeof x=="number"?x:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(w=!1,C=!1){const{vnode:P,activeBranch:S,pendingBranch:M,pendingId:I,effects:z,parentComponent:O,container:X}=A;let J=!1;A.isHydrating?A.isHydrating=!1:w||(J=S&&M.transition&&M.transition.mode==="out-in",J&&(S.transition.afterLeave=()=>{I===A.pendingId&&(h(M,X,s===v?g(S):s,0),Bc(z))}),S&&(_(S.el)===X&&(s=g(S)),d(S,O,A,!0)),J||h(M,X,s,0)),Ms(A,M),A.pendingBranch=null,A.isInFallback=!1;let D=A.parent,V=!1;for(;D;){if(D.pendingBranch){D.effects.push(...z),V=!0;break}D=D.parent}!V&&!J&&Bc(z),A.effects=[],T&&e&&e.pendingBranch&&p===e.pendingId&&(e.deps--,e.deps===0&&!C&&e.resolve()),wo(P,"onResolve")},fallback(w){if(!A.pendingBranch)return;const{vnode:C,activeBranch:P,parentComponent:S,container:M,namespace:I}=A;wo(C,"onFallback");const z=g(P),O=()=>{A.isInFallback&&(f(null,w,M,z,S,null,I,a,l),Ms(A,w))},X=w.transition&&w.transition.mode==="out-in";X&&(P.transition.afterLeave=O),A.isInFallback=!0,d(P,S,null,!0),X||O()},move(w,C,P){A.activeBranch&&h(A.activeBranch,w,C,P),A.container=w},next(){return A.activeBranch&&g(A.activeBranch)},registerDep(w,C,P){const S=!!A.pendingBranch;S&&A.deps++;const M=w.vnode.el;
vendor: 5,743 bytes, line 15
15w.asyncDep.catch(I=>{Gs(I,w,0)}).then(I=>{if(w.isUnmounted||A.isUnmounted||A.pendingId!==w.suspenseId)return;w.asyncResolved=!0;const{vnode:z}=w;Xc(w,I,!1),M&&(z.el=M);const O=!M&&w.subTree.el;C(w,z,_(M||w.subTree.el),M?null:g(w.subTree),A,o,P),O&&m(O),Df(w,z.el),S&&--A.deps===0&&A.resolve()})},unmount(w,C){A.isUnmounted=!0,A.activeBranch&&d(A.activeBranch,t,w,C),A.pendingBranch&&d(A.pendingBranch,t,w,C)}};return A}function xx(n,e,t,i,r,s,o,a,l){const u=e.suspense=e_(e,i,t,n.parentNode,document.createElement("div"),null,r,s,o,a,!0),c=l(n,u.pendingBranch=e.ssContent,t,u,s,o);return u.deps===0&&u.resolve(!1,!0),c}function yx(n){const{shapeFlag:e,children:t}=n,i=e&32;n.ssContent=Vh(i?t.default:t),n.ssFallback=i?Vh(t.fallback):_t(ti)}function Vh(n){let e;if(Oe(n)){const t=Cs&&n._c;t&&(n._d=!1,Jt()),n=n(),t&&(n._d=!0,e=Qt,n_())}return Be(n)&&(n=fx(n)),n=mn(n),e&&!n.dynamicChildren&&(n.dynamicChildren=e.filter(t=>t!==n)),n}function t_(n,e){e&&e.pendingBranch?Be(n)?e.effects.push(...n):e.effects.push(n):Bc(n)}function Ms(n,e){n.activeBranch=e;const{vnode:t,parentComponent:i}=n;let r=e.el;for(;!r&&e.component;)e=e.component.subTree,r=e.el;t.el=r,i&&i.subTree===t&&(i.vnode.el=r,Df(i,r))}function Sx(n){const e=n.props&&n.props.suspensible;return e!=null&&e!==!1}const wn=Symbol.for("v-fgt"),Lr=Symbol.for("v-txt"),ti=Symbol.for("v-cmt"),mo=Symbol.for("v-stc"),_o=[];let Qt=null;function Jt(n=!1){_o.push(Qt=n?null:[])}function n_(){_o.pop(),Qt=_o[_o.length-1]||null}let Cs=1;function Gh(n){Cs+=n,n<0&&Qt&&(Qt.hasOnce=!0)}function i_(n){return n.dynamicChildren=Cs>0?Qt||ms:null,n_(),Cs>0&&Qt&&Qt.push(n),n}function Ao(n,e,t,i,r,s){return i_(Xt(n,e,t,i,r,s,!0))}function Vi(n,e,t,i,r){return i_(_t(n,e,t,i,r,!0))}function Ro(n){return n?n.__v_isVNode===!0:!1}function Gi(n,e){return n.type===e.type&&n.key===e.key}const r_=({key:n})=>n??null,Aa=({ref:n,ref_key:e,ref_for:t})=>(typeof n=="number"&&(n=""+n),n!=null?vt(n)||Pt(n)||Oe(n)?{i:gn,r:n,k:e,f:!!t}:n:null);function Xt(n,e=null,t=null,i=0,r=null,s=n===wn?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:n,props:e,key:e&&r_(e),ref:e&&Aa(e),scopeId:Em,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:gn};return a?(If(l,t),s&128&&n.normalize(l)):t&&(l.shapeFlag|=vt(t)?8:16),Cs>0&&!o&&Qt&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&Qt.push(l),l}const _t=Mx;function Mx(n,e=null,t=null,i=0,r=null,s=!1){if((!n||n===Lm)&&(n=ti),Ro(n)){const a=Ps(n,e,!0);return t&&If(a,t),Cs>0&&!s&&Qt&&(a.shapeFlag&6?Qt[Qt.indexOf(n)]=a:Qt.push(a)),a.patchFlag=-2,a}if(Lx(n)&&(n=n.__vccOpts),e){e=s_(e);let{class:a,style:l}=e;a&&!vt(a)&&(e.class=vl(a)),ht(l)&&(Sf(l)&&!Be(l)&&(l=Dt({},l)),e.style=gl(l))}const o=vt(n)?1:Qm(n)?128:Rv(n)?64:ht(n)?4:Oe(n)?2:0;return Xt(n,e,t,i,r,o,s,!0)}function s_(n){return n?Sf(n)||Hm(n)?Dt({},n):n:null}function Ps(n,e,t=!1,i=!1){const{props:r,ref:s,patchFlag:o,children:a,transition:l}=n,u=e?Ex(r||{},e):r,c={__v_isVNode:!0,__v_skip:!0,type:n.type,props:u,key:u&&r_(u),ref:e&&e.ref?t&&s?Be(s)?s.concat(Aa(e)):[s,Aa(e)]:Aa(e):s,scopeId:n.scopeId,slotScopeIds:n.slotScopeIds,children:a,target:n.target,targetStart:n.targetStart,targetAnchor:n.targetAnchor,staticCount:n.staticCount,shapeFlag:n.shapeFlag,patchFlag:e&&n.type!==wn?o===-1?16:o|16:o,dynamicProps:n.dynamicProps,dynamicChildren:n.dynamicChildren,appContext:n.appContext,dirs:n.dirs,transition:l,component:n.component,suspense:n.suspense,ssContent:n.ssContent&&Ps(n.ssContent),ssFallback:n.ssFallback&&Ps(n.ssFallback),el:n.el,anchor:n.anchor,ctx:n.ctx,ce:n.ce};return l&&i&&Tf(c,l.clone(c)),c}function Lf(n=" ",e=0){return _t(Lr,null,n,e)}function Gl(n,e){const t=_t(mo,null,n);return t.staticCount=e,t}function Wh(n="",e=!1){return e?(Jt(),Vi(ti,null,n)):_t(ti,null,n)}function mn(n){return n==null||typeof n=="boolean"?_t(ti):Be(n)?_t(wn,null,n.slice()):Ro(n)?ki(n):_t(Lr,null,String(n))}function ki(n){return n.el===null&&n.patchFlag!==-1||n.memo?n:Ps(n)}function If(n,e){let t=0;const{shapeFlag:i}=n;if(e==null)e=null;else if(Be(e))t=16;else if(typeof e=="object")if(i&65){const r=e.default;r&&(r._c&&(r._d=!1),If(n,r()),r._c&&(r._d=!0));return}else{t=32;const r=e._;!r&&!Hm(e)?e._ctx=gn:r===3&&gn&&(gn.slots._===1?e._=1:(e._=2,n.patchFlag|=1024))}else Oe(e)?(e={default:e,_ctx:gn},t=32):(e=String(e),i&64?(t=16,e=[Lf(e)]):t=8);n.children=e,n.shapeFlag|=t}function Ex(...n){const e={};for(let t=0;t<n.length;t++){const i=n[t];for(const r in i)if(r==="class")e.class!==i.class&&(e.class=vl([e.class,i.class]));else if(r==="style")e.style=gl([e.style,i.style]);else if(ko(r)){const s=e[r],o=i[r];o&&s!==o&&!(Be(s)&&s.includes(o))&&(e[r]=s?[].concat(s,o):o)}else r!==""&&(e[r]=i[r])}return e}function Tn(n,e,t,i=null){ei(n,e,7,[t,i])}const Tx=Nm();let bx=0;function wx(n,e,t){const i=n.type,r=(e?e.appContext:n.appContext)||Tx,s={uid:bx++,vnode:n,type:i,parent:e,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new tm(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(r.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Vm(i,r),emitsOptions:Jm(i,r),emit:null,emitted:null,propsDefaults:at,inheritAttrs:i.inheritAttrs,ctx:at,data:at,props:at,attrs:at,slots:at,refs:at,setupState:at,setupContext:null,suspense:t,suspenseId:t?t.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,
vendor: 2,263 bytes, lines 15-18
15sp:null};return s.ctx={_:s},s.root=e?e.root:s,s.emit=ux.bind(null,s),n.ce&&n.ce(s),s}let bt=null;const o_=()=>bt||gn;let ja,Wc;{const n=_l(),e=(t,i)=>{let r;return(r=n[t])||(r=n[t]=[]),r.push(i),s=>{r.length>1?r.forEach(o=>o(s)):r[0](s)}};ja=e("__VUE_INSTANCE_SETTERS__",t=>bt=t),Wc=e("__VUE_SSR_SETTERS__",t=>Ds=t)}const zo=n=>{const e=bt;return ja(n),n.scope.on(),()=>{n.scope.off(),ja(e)}},Xh=()=>{bt&&bt.scope.off(),ja(null)};function a_(n){return n.vnode.shapeFlag&4}let Ds=!1;function Ax(n,e=!1,t=!1){e&&Wc(e);const{props:i,children:r}=n.vnode,s=a_(n);Kv(n,i,s,e),ex(n,r,t);const o=s?Rx(n,e):void 0;return e&&Wc(!1),o}function Rx(n,e){const t=n.type;n.accessCache=Object.create(null),n.proxy=new Proxy(n.ctx,Vv);const{setup:i}=t;if(i){sr();const r=n.setupContext=i.length>1?Px(n):null,s=zo(n),o=Ho(i,n,0,[n.props,r]),a=$p(o);if(or(),s(),(a||n.sp)&&!ys(n)&&bf(n),a){if(o.then(Xh,Xh),e)return o.then(l=>{Xc(n,l,e)}).catch(l=>{Gs(l,n,0)});n.asyncDep=o}else Xc(n,o,e)}else l_(n,e)}function Xc(n,e,t){Oe(e)?n.type.__ssrInlineRender?n.ssrRender=e:n.render=e:ht(e)&&(n.setupState=xm(e)),l_(n,t)}let qh;function l_(n,e,t){const i=n.type;if(!n.render){if(!e&&qh&&!i.render){const r=i.template||Rf(n).template;if(r){const{isCustomElement:s,compilerOptions:o}=n.appContext.config,{delimiters:a,compilerOptions:l}=i,u=Dt(Dt({isCustomElement:s,delimiters:a},o),l);i.render=qh(r,u)}}n.render=i.render||Zn}{const r=zo(n);sr();try{Gv(n)}finally{or(),r()}}}const Cx={get(n,e){return Ft(n,"get",""),n[e]}};function Px(n){const e=t=>{n.exposed=t||{}};return{attrs:new Proxy(n.attrs,Cx),slots:n.slots,emit:n.emit,expose:e}}function Uf(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(xm(pv(n.exposed)),{get(e,t){if(t in e)return e[t];if(t in po)return po[t](n)},has(e,t){return t in e||t in po}})):n.proxy}function Dx(n,e=!0){return Oe(n)?n.displayName||n.name:n.name||e&&n.__name}function Lx(n){return Oe(n)&&"__vccOpts"in n}const c_=(n,e)=>Mv(n,e,Ds);function Ix(n,e,t){const i=arguments.length;return i===2?ht(e)&&!Be(e)?Ro(e)?_t(n,null,[e]):_t(n,e):_t(n,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Ro(t)&&(t=[t]),_t(n,e,t))}const u_="3.5.12";/** 16* @vue/runtime-dom v3.5.12 17* (c) 2018-present Yuxi (Evan) You and Vue contributors 18* @license MIT
19**/let qc;const Yh=typeof window<"u"&&window.trustedTypes;if(Yh)try{qc=Yh.createPolicy("vue",{createHTML:n=>n})}catch{}const f_=qc?n=>qc.createHTML(n):n=>n,Ux="http://www.w3.org/2000/svg",Nx="http://www.w3.org/1998/Math/MathML",di=typeof document<"u"?document:null,$h=di&&di.createElement("template"),Ox={insert:(n,e,t)=>{e.insertBefore(n,t||null)},remove:n=>{const e=n.parentNode;e&&e.removeChild(n)},createElement:(n,e,t,i)=>{const r=e==="svg"?di.createElementNS(Ux,n):e==="mathml"?di.createElementNS(Nx,n):t?di.createElement(n,{is:t}):di.createElement(n);return n==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:n=>di.createTextNode(n),createComment:n=>di.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>di.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,t,i,r,s){const o=t?t.previousSibling:e.lastChild;if(r&&(r===s||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),t),!(r===s||!(r=r.nextSibling)););else{$h.innerHTML=f_(i==="svg"?`<svg>${n}</svg>`:i==="mathml"?`<math>${n}</math>`:n);const a=$h.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},Fx=Symbol("_vtc");function Bx(n,e,t){const i=n[Fx];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?n.removeAttribute("class"):t?n.setAttribute("class",e):n.className=e}const jh=Symbol("_vod"),kx=Symbol("_vsh"),Hx=Symbol(""),zx=/(^|;)\s*display\s*:/;function Vx(n,e,t){const i=n.style,r=vt(t);let s=!1;if(t&&!r){if(e)if(vt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&Ra(i,a,"")}else for(const o in e)t[o]==null&&Ra(i,o,"");for(const o in t)o==="display"&&(s=!0),Ra(i,o,t[o])}else if(r){if(e!==t){const o=i[Hx];o&&(t+=";"+o),i.cssText=t,s=zx.test(t)}}else e&&n.removeAttribute("style");jh in n&&(n[jh]=s?i.display:"",n[kx]&&(i.display="none"))}const Kh=/\s*!important$/;function Ra(n,e,t){if(Be(t))t.forEach(i=>Ra(n,e,i));else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{const i=Gx(n,e);Kh.test(t)?n.setProperty(zr(i),t.replace(Kh,""),"important"):n[i]=t}}const Zh=["Webkit","Moz","ms"],Wl={};function Gx(n,e){const t=Wl[e];if(t)return t;let i=Dn(e);if(i!=="filter"&&i in n)return Wl[e]=i;i=ml(i);for(let r=0;r<Zh.length;r++){const s=Zh[r]+i;if(s in n)return Wl[e]=s}return e}const Jh="http://www.w3.org/1999/xlink";function Qh(n,e,t,i,r,s=Y0(e)){i&&e.startsWith("xlink:")?t==null?n.removeAttributeNS(Jh,e.slice(6,e.length)):n.setAttributeNS(Jh,e,t):t==null||s&&!Jp(t)?n.removeAttribute(e):n.setAttribute(e,s?"":rr(t)?String(t):t)}function ed(n,e,t,i,r){if(e==="innerHTML"||e==="textContent"){t!=null&&(n[e]=e==="innerHTML"?f_(t):t);return}const s=n.tagName;if(e==="value"&&s!=="PROGRESS"&&!s.includes("-")){const a=s==="OPTION"?n.getAttribute("value")||"":n.value,l=t==null?n.type==="checkbox"?"on":"":String(t);(a!==l||!("_value"in n))&&(n.value=l),t==null&&n.removeAttribute(e),n._value=t;return}let o=!1;if(t===""||t==null){const a=typeof n[e];a==="boolean"?t=Jp(t):t==null&&a==="string"?(t="",o=!0):a==="number"&&(t=0,o=!0)}try{n[e]=t}catch{}o&&n.removeAttribute(r||e)}function Wx(n,e,t,i){n.addEventListener(e,t,i)}function Xx(n,e,t,i){n.removeEventListener(e,t,i)}const td=Symbol("_vei");function qx(n,e,t,i,r=null){const s=n[td]||(n[td]={}),o=s[e];if(i&&o)o.value=i;else{const[a,l]=Yx(e);if(i){const u=s[e]=Kx(i,r);Wx(n,a,u,l)}else o&&(Xx(n,a,o,l),s[e]=void 0)}}const nd=/(?:Once|Passive|Capture)$/;function Yx(n){let e;if(nd.test(n)){e={};let i;for(;i=n.match(nd);)n=n.slice(0,n.length-i[0].length),e[i[0].toLowerCase()]=!0}return[n[2]===":"?n.slice(3):zr(n.slice(2)),e]}let Xl=0;const $x=Promise.resolve(),jx=()=>Xl||($x.then(()=>
19Xl=0),Xl=Date.now());function Kx(n,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;ei(Zx(i,t.value),e,5,[i])};return t.value=n,t.attached=jx(),t}function Zx(n,e){if(Be(e)){const t=n.stopImmediatePropagation;return n.stopImmediatePropagation=()=>{t.call(n),n._stopped=!0},e.map(i=>r=>!r._stopped&&i&&i(r))}else return e}const id=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)>96&&n.charCodeAt(2)<123,Jx=(n,e,t,i,r,s)=>{const o=r==="svg";e==="class"?Bx(n,i,o):e==="style"?Vx(n,t,i):ko(e)?uf(e)||qx(n,e,t,i,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Qx(n,e,i,o))?(ed(n,e,i),!n.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Qh(n,e,i,o,s,e!=="value")):n._isVueCE&&(/[A-Z]/.test(e)||!vt(i))?ed(n,Dn(e),i,s,e):(e==="true-value"?n._trueValue=i:e==="false-value"&&(n._falseValue=i),Qh(n,e,i,o))};function Qx(n,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in n&&id(e)&&Oe(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&n.tagName==="INPUT"||e==="type"&&n.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=n.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return id(e)&&vt(t)?!1:e in n}const h_=Dt({patchProp:Jx},Ox);let go,rd=!1;function ey(){return go||(go=nx(h_))}function ty(){return go=rd?go:ix(h_),rd=!0,go}const ny=(...n)=>{const e=ey().createApp(...n),{mount:t}=e;return e.mount=i=>{const r=p_(i);if(!r)return;const s=e._component;!Oe(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=t(r,!1,d_(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},e},iy=(...n)=>{const e=ty().createApp(...n),{mount:t}=e;return e.mount=i=>{const r=p_(i);if(r)return t(r,!0,d_(r))},e};function d_(n){if(n instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&n instanceof MathMLElement)return"mathml"}function p_(n){return vt(n)?document.querySelector(n):n}const ry=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,sy=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,oy=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function ay(n,e){if(n==="__proto__"||n==="constructor"&&e&&typeof e=="object"&&"prototype"in e){ly(n);return}return e}function ly(n){console.warn(`[destr] Dropping "${n}" key to prevent prototype pollution.`)}function Ka(n,e={}){if(typeof n!="string")return n;const t=n.trim();if(n[0]==='"'&&n.endsWith('"')&&!n.includes("\\"))return t.slice(1,-1);if(t.length<=9){const i=t.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;if(i==="undefined")return;if(i==="null")return null;if(i==="nan")return Number.NaN;if(i==="infinity")return Number.POSITIVE_INFINITY;if(i==="-infinity")return Number.NEGATIVE_INFINITY}if(!oy.test(n)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return n}try{if(ry.test(n)||sy.test(n)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(n,ay)}return JSON.parse(n)}catch(i){if(e.strict)throw i;return n}}const cy=/#/g,uy=/&/g,fy=/\//g,hy=/=/g,Nf=/\+/g,dy=/%5e/gi,py=/%60/gi,my=/%7c/gi,_y=/%20/gi;function gy(n){return encodeURI(""+n).replace(my,"|")}function Yc(n){return gy(typeof n=="string"?n:JSON.stringify(n)).replace(Nf,"%2B").replace(_y,"+").replace(cy,"%23").replace(uy,"%26").replace(py,"`").replace(dy,"^").replace(fy,"%2F")}function ql(n){return Yc(n).replace(hy,"%3D")}function Za(n=""){try{return decodeURIComponent(""+n)}catch{return""+n}}function vy(n){return Za(n.replace(Nf," "))}function xy(n){return Za(n.replace(Nf," "))}function m_(n=""){const e={};n[0]==="?"&&(n=n.slice(1));for(const t of n.split("&")){const i=t.match(/([^=]+)=?(.*)/)||[];if(i.length<2)continue;const r=vy(i[1]);if(r==="__proto__"||r==="constructor")continue;const s=xy(i[2]||"");e[r]===void 0?e[r]=s:Array.isArray(e[r])?e[r].push(s):e[r]=[e[r],s]}return e}function yy(n,e){return(typeof e=="number"||typeof e=="boolean")&&(e=String(e)),e?Array.isArray(e)?e.map(t=>`${ql(n)}=${Yc(t)}`).join("&"):`${ql(n)}=${Yc(e)}
19`:ql(n)}function __(n){return Object.keys(n).filter(e=>n[e]!==void 0).map(e=>yy(e,n[e])).filter(Boolean).join("&")}const Sy=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,My=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Ey=/^([/\\]\s*){2,}[^/\\]/,Ty=/^[\s\0]*(blob|data|javascript|vbscript):$/i,by=/\/$|\/\?|\/#/,wy=/^\.?\//;function Ws(n,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?Sy.test(n):My.test(n)||(e.acceptRelative?Ey.test(n):!1)}function Ay(n){return!!n&&Ty.test(n)}function $c(n="",e){return e?by.test(n):n.endsWith("/")}function Of(n="",e){if(!e)return($c(n)?n.slice(0,-1):n)||"/";if(!$c(n,!0))return n||"/";let t=n,i="";const r=n.indexOf("#");r>=0&&(t=n.slice(0,r),i=n.slice(r));const[s,...o]=t.split("?");return((s.endsWith("/")?s.slice(0,-1):s)||"/")+(o.length>0?`?${o.join("?")}`:"")+i}function jc(n="",e){if(!e)return n.endsWith("/")?n:n+"/";if($c(n,!0))return n||"/";let t=n,i="";const r=n.indexOf("#");if(r>=0&&(t=n.slice(0,r),i=n.slice(r),!t))return i;const[s,...o]=t.split("?");return s+"/"+(o.length>0?`?${o.join("?")}`:"")+i}function Ry(n=""){return n.startsWith("/")}function sd(n=""){return Ry(n)?n:"/"+n}function Cy(n,e){if(v_(e)||Ws(n))return n;const t=Of(e);return n.startsWith(t)?n:Ml(t,n)}function Py(n,e){if(v_(e))return n;const t=Of(e);if(!n.startsWith(t))return n;const i=n.slice(t.length);return i[0]==="/"?i:"/"+i}function g_(n,e){const t=Iy(n),i={...m_(t.search),...e};return t.search=__(i),S_(t)}function v_(n){return!n||n==="/"}function Dy(n){return n&&n!=="/"}function Ml(n,...e){let t=n||"";for(const i of e.filter(r=>Dy(r)))if(t){const r=i.replace(wy,"");t=jc(t)+r}else t=i;return t}function x_(...n){var o,a,l,u;const e=/\/(?!\/)/,t=n.filter(Boolean),i=[];let r=0;for(const c of t)if(!(!c||c==="/")){for(const[f,h]of c.split(e).entries())if(!(!h||h===".")){if(h===".."){if(i.length===1&&Ws(i[0]))continue;i.pop(),r--;continue}if(f===1&&((o=i[i.length-1])!=null&&o.endsWith(":/"))){i[i.length-1]+="/"+h;continue}i.push(h),r++}}let s=i.join("/");return r>=0?(a=t[0])!=null&&a.startsWith("/")&&!s.startsWith("/")?s="/"+s:(l=t[0])!=null&&l.startsWith("./")&&!s.startsWith("./")&&(s="./"+s):s="../".repeat(-1*r)+s,(u=t[t.length-1])!=null&&u.endsWith("/")&&!s.endsWith("/")&&(s+="/"),s}function Ly(n,e,t={}){return t.trailingSlash||(n=jc(n),e=jc(e)),t.leadingSlash||(n=sd(n),e=sd(e)),t.encoding||(n=Za(n),e=Za(e)),n===e}const y_=Symbol.for("ufo:protocolRelative");function Iy(n="",e){const t=n.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(t){const[,f,h=""]=t;return{protocol:f.toLowerCase(),pathname:h,href:f+h,auth:"",host:"",search:"",hash:""}}if(!Ws(n,{acceptRelative:!0}))return od(n);const[,i="",r,s=""]=n.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,o="",a=""]=s.match(/([^#/?]*)(.*)?/)||[];i==="file:"&&(a=a.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:l,search:u,hash:c}=od(a);return{protocol:i.toLowerCase(),auth:r?r.slice(0,Math.max(0,r.length-1)):"",host:o,pathname:l,search:u,hash:c,[y_]:!i}}function od(n=""){const[e="",t="",i=""]=(n.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:t,hash:i}}function S_(n){const e=n.pathname||"",t=n.search?(n.search.startsWith("?")?"":"?")+n.search:"",i=n.hash||"",r=n.auth?n.auth+"@":"",s=n.host||"";return(n.protocol||n[y_]?(n.protocol||"")+"//":"")+r+s+e+t+i}class Uy extends Error{constructor(e,t){super(e,t),this.name="FetchError",t!=null&&t.cause&&!this.cause&&(this.cause=t.cause)}}function Ny(n){var l,u,c,f,h;const e=((l=n.error)==null?void 0:l.message)||((u=n.error)==null?void 0:u.toString())||"",t=((c=n.request)==null?void 0:c.method)||((f=n.options)==null?void 0:f.method)||"GET",i=((h=n.request)==null?void 0:h.url)||String(n.request)||"/",r=`[${t}] ${JSON.stringify(i)}`,s=n.response?`${n.response.status} ${n.response.statusText}`:"<no response>",o=`${r}: ${s}${e?` ${e}`:""}`,a=new Uy(o,n.error?{cause:n.error}:void 0);for(const d of["request","options","response"])Object.defineProperty(a,d,{get(){return n[d]}});for(const[d,g]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(a,d,{get(){return n.response&&n.response[g]}});return a}const Oy=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function ad(n="GET"){return Oy.has(n.toUpperCase())}function Fy(n){if(n===void 0)return!1;const e=typeof n;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(n)?!0:n.buffer?!1:n.constructor&&n.constructor.name==="Object"||typeof n.toJSON=="function"}const By=new Set(["image/svg","application/xml","application/xhtml","application/html"]),ky=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Hy(n=""){if(!n)return"json";const e=n.split(";").shift()||"";return ky.test(e)?"json":By.has(e)||e.startsWith("text/")?"text":"blob"}function zy(n,e,t,i){const r=Vy((e==null?void 0:e.headers)??(n==null?void 0:n.headers),t==null?void 0:t.headers,i);let s;return(t!=null&&t.query||t!=null&&t.params||e!=null&&e.params||e!=null&&e.query)&&(s={...t==null?void 0:t.params,...t==null?void 0:t.query,...e==null?void 0:e.params,...e==null?void 0:e.query}),{...t,...e,query:s,params:s,headers:r}}function Vy(n,e,t){if(!e)return new t(n);const i=new t(e);if(n)for(const[r,s]of Symbol.iterator in n||Array.isArray(n)?n:new t(n))i.set(r,s);return i}async function ea(n,e){if(e)if(Array.isArray(e))for(const t of e)await t(n);else await e(n)}const Gy=new Set([408,409,425,429,500,502,503,504]),Wy=new Set([101,204,205,304]);function M_(n={}){const{fetch:e=globalThis.fetch,Headers:t=globalThis.Headers,AbortController:i=globalThis.AbortController}=n;async function r(a){const l=a.error&&a.error.name==="AbortError"&&!a.options.timeout||!1;if(a.options.retry!==!1&&!l){let c;typeof a.options.retry=="number"?c=a.options.retry:c=ad(a.options.method)?0:1;const f=a.response&&a.response.status||500;if(c>0&&(Array.isArray(a.options.retryStatusCodes)?a.options.retryStatusCodes.includes(f):Gy.has(f))){const h=typeof a.options.retryDelay=="function"?a.options.retryDelay(a):a.options.retryDelay||0;return h>0&&await new Promise(d=>setTimeout(d,h)),s(a.request,{...a.options,retry:c-1})}}const u=Ny(a);throw Error.captureStackTrace&&Error.captureStackTrace(u,s),u}const s=async function(l,u={}){const c={request:l,options:zy(l,u,n.defaults,t),response:void 0,error:void 0};c.options.method&&(c.options.method=c.options.method.toUpperCase()),c.options.onRequest&&await ea(c,c.options.onRequest),typeof c.request=="string"&&(c.options.baseURL&&(c.request=Cy(c.request,c.options.baseURL)),c.options.query&&(c.request=g_(c.request,c.options.query),delete c.options.query),"query"in c.options&&delete c.options.query,"params"in c.options&&delete c.options.params),c.options.body&&ad(c.options.method)&&(Fy(c.options.body)?(c.options.body=typeof c.options.body=="str
19ing"?c.options.body:JSON.stringify(c.options.body),c.options.headers=new t(c.options.headers||{}),c.options.headers.has("content-type")||c.options.headers.set("content-type","application/json"),c.options.headers.has("accept")||c.options.headers.set("accept","application/json")):("pipeTo"in c.options.body&&typeof c.options.body.pipeTo=="function"||typeof c.options.body.pipe=="function")&&("duplex"in c.options||(c.options.duplex="half")));let f;if(!c.options.signal&&c.options.timeout){const d=new i;f=setTimeout(()=>{const g=new Error("[TimeoutError]: The operation was aborted due to timeout");g.name="TimeoutError",g.code=23,d.abort(g)},c.options.timeout),c.options.signal=d.signal}try{c.response=await e(c.request,c.options)}catch(d){return c.error=d,c.options.onRequestError&&await ea(c,c.options.onRequestError),await r(c)}finally{f&&clearTimeout(f)}if((c.response.body||c.response._bodyInit)&&!Wy.has(c.response.status)&&c.options.method!=="HEAD"){const d=(c.options.parseResponse?"json":c.options.responseType)||Hy(c.response.headers.get("content-type")||"");switch(d){case"json":{const g=await c.response.text(),_=c.options.parseResponse||Ka;c.response._data=_(g);break}case"stream":{c.response._data=c.response.body||c.response._bodyInit;break}default:c.response._data=await c.response[d]()}}return c.options.onResponse&&await ea(c,c.options.onResponse),!c.options.ignoreResponseError&&c.response.status>=400&&c.response.status<600?(c.options.onResponseError&&await ea(c,c.options.onResponseError),await r(c)):c.response},o=async function(l,u){return(await s(l,u))._data};return o.raw=s,o.native=(...a)=>e(...a),o.create=(a={},l={})=>M_({...n,...l,defaults:{...n.defaults,...l.defaults,...a}}),o}const Ja=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),Xy=Ja.fetch?(...n)=>Ja.fetch(...n):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),qy=Ja.Headers,Yy=Ja.AbortController,$y=M_({fetch:Xy,Headers:qy,AbortController:Yy}),jy=$y,Ky=()=>{var n;return((n=window==null?void 0:window.__NUXT__)==null?void 0:n.config)||{}},Qa=Ky().app,Zy=()=>Qa.baseURL,Jy=()=>Qa.buildAssetsDir,Ff=(...n)=>x_(E_(),Jy(),...n),E_=(...n)=>{const e=Qa.cdnURL||Qa.baseURL;return n.length?x_(e,...n):e};globalThis.__buildAssetsURL=Ff,globalThis.__publicAssetsURL=E_;globalThis.$fetch||(globalThis.$fetch=jy.create({baseURL:Zy()}));function Kc(n,e={},t){for(const i in n){const r=n[i],s=t?`${t}:${i}`:i;typeof r=="object"&&r!==null?Kc(r,e,s):typeof r=="function"&&(e[s]=r)}return e}const Qy={run:n=>n()},eS=()=>Qy,T_=typeof console.createTask<"u"?console.createTask:eS;function tS(n,e){const t=e.shift(),i=T_(t);return n.reduce((r,s)=>r.then(()=>i.run(()=>s(...e))),Promise.resolve())}function nS(n,e){const t=e.shift(),i=T_(t);return Promise.all(n.map(r=>i.run(()=>r(...e))))}function Yl(n,e){for(const t of[...n])t(e)}class iS{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,t,i={}){if(!e||typeof t!="function")return()=>{};const r=e;let s;for(;this._deprecatedHooks[e];)s=this._deprecatedHooks[e],e=s.to;if(s&&!i.allowDeprecated){let o=s.message;o||(o=`${r} hook has been deprecated`+(s.to?`, please use ${s.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(o)||(console.warn(o),this._deprecatedMessages.add(o))}if(!t.name)try{Object.defineProperty(t,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&(this.removeHook(e,t),t=void 0)}}hookOnce(e,t){let i,r=(...s)=>(typeof i=="function"&&i(),i=void 0,r=void 0,t(...s));return i=this.hook(e,r),i}removeHook(e,t){if(this._hooks[e]){const i=this._hooks[e].indexOf(t);i!==-1&&this._hooks[e].splice(i,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,t){this._deprecatedHooks[e]=typeof t=="string"?{to:t}:t;const i=this._hooks[e]||[];delete this._hooks[e];for(const r of i)this.hook(e,r)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const t in e)this.deprecateHook(t,e[t])}addHooks(e){const t=Kc(e),i=Object.keys(t).map(r=>this.hook(r,t[r]));return()=>{for(const r of i.splice(0,i.length))r()}}removeHooks(e){const t=Kc(e);for(const i in t)this.removeHook(i,t[i])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...t){return t.unshift(e),this.callHookWith(tS,e,...t)}callHookParallel(e,...t){return t.unshift(e),this.callHookWith(nS,e,...t)}callHookWith(e,t,...i){const r=this._before||this._after?{name:t,args:i,context:{}}:void 0;this._before&&Yl(this._before,r);const s=e(t in this._hooks?[...this._hooks[t]]:[],i);return s instanceof Promise?s.finally(()=>{this._after&&r&&Yl(this._after,r)}):(this._after&&r&&Yl(this._after,r),s)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const t=this._before.indexOf(e);t!==-1&&this._before.splice(t,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const t=this._after.indexOf(e);t!==-1&&this._after.splice(t,1)}}}}function b_(){return new iS}function rS(n={}){let e,t=!1;const i=o=>
19{if(e&&e!==o)throw new Error("Context conflict")};let r;if(n.asyncContext){const o=n.AsyncLocalStorage||globalThis.AsyncLocalStorage;o?r=new o:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const s=()=>{if(r&&e===void 0){const o=r.getStore();if(o!==void 0)return o}return e};return{use:()=>{const o=s();if(o===void 0)throw new Error("Context is not available");return o},tryUse:()=>s(),set:(o,a)=>{a||i(o),e=o,t=!0},unset:()=>{e=void 0,t=!1},call:(o,a)=>{i(o),e=o;try{return r?r.run(o,a):a()}finally{t||(e=void 0)}},async callAsync(o,a){e=o;const l=()=>{e=o},u=()=>e===o?l:void 0;Zc.add(u);try{const c=r?r.run(o,a):a();return t||(e=void 0),await c}finally{Zc.delete(u)}}}}function sS(n={}){const e={};return{get(t,i={}){return e[t]||(e[t]=rS({...n,...i})),e[t],e[t]}}}const el=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},ld="__unctx__",oS=el[ld]||(el[ld]=sS()),aS=(n,e={})=>oS.get(n,e),cd="__unctx_async_handlers__",Zc=el[cd]||(el[cd]=new Set);function w_(n){const e=[];for(const r of Zc){const s=r();s&&e.push(s)}const t=()=>{for(const r of e)r()};let i=n();return i&&typeof i=="object"&&"catch"in i&&(i=i.catch(r=>{throw t(),r})),[i,t]}const pP={componentName:"NuxtLink",prefetch:!0,prefetchOn:{visibility:!0}},lS=null,cS="#__nuxt",A_="nuxt-app",ud=36e5,uS="vite:preloadError";function R_(n=A_){return aS(n,{asyncContext:!1})}const fS="__nuxt_plugin";function hS(n){var r;let e=0;const t={_id:n.id||A_||"nuxt-app",_scope:$0(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.13.2"},get vue(){return t.vueApp.version}},payload:us({...((r=n.ssrContext)==null?void 0:r.payload)||{},data:us({}),state:Ji({}),once:new Set,_errors:us({})}),static:{data:{}},runWithContext(s){return t._scope.active&&!nm()?t._scope.run(()=>fd(t,s)):fd(t,s)},isHydrating:!0,deferHydration(){if(!t.isHydrating)return()=>{};e++;let s=!1;return()=>{if(!s&&(s=!0,e--,e===0))return t.isHydrating=!1,t.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:us({}),_payloadRevivers:{},...n};{const s=window.__NUXT__;if(s)for(const o in s)switch(o){case"data":case"state":case"_errors":Object.assign(t.payload[o],s[o]);break;default:t.payload[o]=s[o]}}t.hooks=b_(),t.hook=t.hooks.hook,t.callHook=t.hooks.callHook,t.provide=(s,o)=>{const a="$"+s;ta(t,a,o),ta(t.vueApp.config.globalProperties,a,o)},ta(t.vueApp,"$nuxt",t),ta(t.vueApp.config.globalProperties,"$nuxt",t);{window.addEventListener(uS,o=>{t.callHook("app:chunkError",{error:o.payload}),(t.isHydrating||o.payload.message.includes("Unable to preload CSS"))&&o.preventDefault()}),window.useNuxtApp=window.useNuxtApp||It;const s=t.hook("app:error",(...o)=>{console.error("[nuxt] error caught during app initialization",...o)});t.hook("app:mounted",s)}const i=t.payload.config;return t.provide("config",i),t}function dS(n,e){e.hooks&&n.hooks.addHooks(e.hooks)}async function pS(n,e){if(typeof e=="function"){const{provide:t}=await n.runWithContext(()=>e(n))||{};if(t&&typeof t=="object")for(const i in t)n.provide(i,t[i])}}async function mS(n,e){const t=[],i=[],r=[],s=[];let o=0;async function a(l){var c;const u=((c=l.dependsOn)==null?void 0:c.filter(f=>e.some(h=>h._name===f)&&!t.includes(f)))??[];if(u.length>0)i.push([new Set(u),l]);else{const f=pS(n,l).then(async()=>{l._name&&(t.push(l._name),await Promise.all(i.map(async([h,d])=>{h.has(l._name)&&(h.delete(l._name),h.size===0&&(o++,await a(d)))})))});l.parallel?r.push(f.catch(h=>s.push(h))):await f}}for(const l of e)dS(n,l);for(const l of e)await a(l);if(await Promise.all(r),o)for(let l=0;l<o;l++)await Promise.all(r);if(s.length)throw s[0]}function Ci(n){if(typeof n=="function")return n;const e=n._name||n.name;return delete n.name,Object.assign(n.setup||(()=>{}),n,{[fS]:!0,_name:e})}function fd(n,e,t){const i=()=>e();return R_(n._id).set(n),n.vueApp.runWithContext(i)}function _S(n){var t;let e;return Fm()&&(e=(t=o_())==null?void 0:t.appContext.app.$nuxt),e=e||R_(n).tryUse(),e||null}function It(n){const e=_S(n);if(!e)throw new Error("[nuxt] instance unavailable");return e}function Co(n){return It().$config}function ta(n,e,t){Object.defineProperty(n,e,{get:()=>t})}function gS(n,e){return{ctx:{table:n},matchAll:t=>P_(t,n)}}function C_(n){const e={};for(const t in n)e[t]=t==="dynamic"?new Map(Object.entries(n[t]).map(([i,r])=>
19[i,C_(r)])):new Map(Object.entries(n[t]));return e}function vS(n){return gS(C_(n))}function P_(n,e,t){n.endsWith("/")&&(n=n.slice(0,-1)||"/");const i=[];for(const[s,o]of hd(e.wildcard))(n===s||n.startsWith(s+"/"))&&i.push(o);for(const[s,o]of hd(e.dynamic))if(n.startsWith(s+"/")){const a="/"+n.slice(s.length).split("/").splice(2).join("/");i.push(...P_(a,o))}const r=e.static.get(n);return r&&i.push(r),i.filter(Boolean)}function hd(n){return[...n.entries()].sort((e,t)=>e[0].length-t[0].length)}function $l(n){if(n===null||typeof n!="object")return!1;const e=Object.getPrototypeOf(n);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in n?!1:Symbol.toStringTag in n?Object.prototype.toString.call(n)==="[object Module]":!0}function Jc(n,e,t=".",i){if(!$l(e))return Jc(n,{},t,i);const r=Object.assign({},e);for(const s in n){if(s==="__proto__"||s==="constructor")continue;const o=n[s];o!=null&&(i&&i(r,s,o,t)||(Array.isArray(o)&&Array.isArray(r[s])?r[s]=[...o,...r[s]]:$l(o)&&$l(r[s])?r[s]=Jc(o,r[s],(t?`${t}.`:"")+s.toString(),i):r[s]=o))}return r}function xS(n){return(...e)=>e.reduce((t,i)=>Jc(t,i,"",n),{})}const yS=xS();function SS(n,e){try{return e in n}catch{return!1}}var MS=Object.defineProperty,ES=(n,e,t)=>e in n?MS(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Sr=(n,e,t)=>(ES(n,typeof e!="symbol"?e+"":e,t),t);
19class Qc extends Error{constructor(e,t={}){super(e,t),Sr(this,"statusCode",500),Sr(this,"fatal",!1),Sr(this,"unhandled",!1),Sr(this,"statusMessage"),Sr(this,"data"),Sr(this,"cause"),t.cause&&!this.cause&&(this.cause=t.cause)}toJSON(){const e={message:this.message,statusCode:eu(this.statusCode,500)};return this.statusMessage&&(e.statusMessage=D_(this.statusMessage)),this.data!==void 0&&(e.data=this.data),e}}Sr(Qc,"__h3_error__",!0);function TS(n){if(typeof n=="string")return new Qc(n);if(bS(n))return n;const e=new Qc(n.message??n.statusMessage??"",{cause:n.cause||n});if(SS(n,"stack"))try{Object.defineProperty(e,"stack",{get(){return n.stack}})}catch{try{e.stack=n.stack}catch{}}if(n.data&&(e.data=n.data),n.statusCode?e.statusCode=eu(n.statusCode,e.statusCode):n.status&&(e.statusCode=eu(n.status,e.statusCode)),n.statusMessage?e.statusMessage=n.statusMessage:n.statusText&&(e.statusMessage=n.statusText),e.statusMessage){const t=e.statusMessage;D_(e.statusMessage)!==t&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return n.fatal!==void 0&&(e.fatal=n.fatal),n.unhandled!==void 0&&(e.unhandled=n.unhandled),e}function bS(n){var e;return((e=n==null?void 0:n.constructor)==null?void 0:e.__h3_error__)===!0}const wS=/[^\u0009\u0020-\u007E]/g;function D_(n=""){return n.replace(wS,"")}function eu(n,e=200){return!n||(typeof n=="string"&&(n=Number.parseInt(n,10)),n<100||n>999)?e:n}const L_=Symbol("route"),Fr=()=>{var n;return(n=It())==null?void 0:n.$router},I_=()=>Fm()?Ss(L_,It()._route):It()._route;const AS=()=>{try{if(It()._processingMiddleware)return!0}catch{return!1}return!1},RS=(n,e)=>{n||(n="/");const t=typeof n=="string"?n:"path"in n?CS(n):Fr().resolve(n).href;if(e!=null&&e.open){const{target:l="_blank",windowFeatures:u={}}=e.open,c=Object.entries(u).filter(([f,h])=>h!==void 0).map(([f,h])=>`${f.toLowerCase()}=${h}`).join(", ");return open(t,l,c),Promise.resolve()}const i=Ws(t,{acceptRelative:!0}),r=(e==null?void 0:e.external)||i;if(r){if(!(e!=null&&e.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const{protocol:l}=new URL(t,window.location.href);if(l&&Ay(l))throw new Error(`Cannot navigate to a URL with '${l}' protocol.`)}const s=AS();if(!r&&s)return n;const o=Fr(),a=It();return r?(a._scope.stop(),e!=null&&e.replace?location.replace(t):location.href=t,s?a.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):e!=null&&e.replace?o.replace(n):o.push(n)};function CS(n){return g_(n.path||"",n.query||{})+(n.hash||"")}const U_="__nuxt_error",Bf=()=>xv(It().payload,"error"),PS=n=>{const e=kf(n);try{const t=It(),i=Bf();t.hooks.callHook("app:error",e),i.value=i.value||e}catch{throw e}return e},DS=async(n={})=>{const e=It(),t=Bf();e.callHook("app:error:cleared",n),n.redirect&&await Fr().replace(n.redirect),t.value=lS},LS=n=>!!n&&typeof n=="object"&&U_ in n,kf=n=>{const e=TS(n);return Object.defineProperty(e,U_,{value:!0,configurable:!1,writable:!1}),e};function dd(n){const e=US(n),t=new ArrayBuffer(e.length),i=new DataView(t);for(let r=0;r<t.byteLength;r++)i.setUint8(r,e.charCodeAt(r));return t}const IS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function US(n){n.length%4===0&&(n=n.replace(/==?$/,""));let e="",t=0,i=0;for(let r=0;r<n.length;r++)t<<=6,t|=IS.indexOf(n[r]),i+=6,i===24&&(e+=String.fromCharCode((t&16711680)>>16),e+=String.fromCharCode((t&65280)>>8),e+=String.fromCharCode(t&255),t=i=0);return i===12?(t>>=4,e+=String.fromCharCode(t)):i===18&&(t>>=2,e+=String.fromCharCode((t&65280)>>8),e+=String.fromCharCode(t&255)),e}const NS=-1,OS=-2,FS=-3,BS=-4,kS=-5,HS=-6;function zS(n,e){return VS(JSON.parse(n),e)}function VS(n,e){if(typeof n=="number")return r(n,!0);if(!Array.isArray(n)||n.length===0)throw new Error("Invalid input");const t=n,i=Array(t.length);function r(s,o=!1){if(s===NS)return;if(s===FS)return NaN;if(s===BS)return 1/0;if(s===kS)return-1/0;if(s===HS)return-0;if(o)throw new Error("Invalid input");if(s in i)return i[s];const a=t[s];if(!a||typeof a!="object")i[s]=a;else if(Array.isArray(a))if(typeof a[0]=="string"){const l=a[0],u=e==null?void 0:e[l];
19if(u)return i[s]=u(r(a[1]));switch(l){case"Date":i[s]=new Date(a[1]);break;case"Set":const c=new Set;i[s]=c;for(let d=1;d<a.length;d+=1)c.add(r(a[d]));break;case"Map":const f=new Map;i[s]=f;for(let d=1;d<a.length;d+=2)f.set(r(a[d]),r(a[d+1]));break;case"RegExp":i[s]=new RegExp(a[1],a[2]);break;case"Object":i[s]=Object(a[1]);break;case"BigInt":i[s]=BigInt(a[1]);break;case"null":const h=Object.create(null);i[s]=h;for(let d=1;d<a.length;d+=2)h[a[d]]=r(a[d+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const d=globalThis[l],g=a[1],_=dd(g),m=new d(_);i[s]=m;break}case"ArrayBuffer":{const d=a[1],g=dd(d);i[s]=g;break}default:throw new Error(`Unknown type ${l}`)}}else{const l=new Array(a.length);i[s]=l;for(let u=0;u<a.length;u+=1){const c=a[u];c!==OS&&(l[u]=r(c))}}else{const l={};i[s]=l;for(const u in a){const c=a[u];l[u]=r(c)}}return i[s]}return r(0)}const GS=new Set(["title","titleTemplate","script","style","noscript"]),Ca=new Set(["base","meta","link","style","script","noscript"]),WS=new Set(["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"]),XS=new Set(["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"]),N_=new Set(["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"]),qS=typeof window<"u";function tl(n){let e=9;for(let t=0;t<n.length;)e=Math.imul(e^n.charCodeAt(t++),9**9);return((e^e>>>9)+65536).toString(16).substring(1,8).toLowerCase()}function tu(n){if(n._h)return n._h;if(n._d)return tl(n._d);let e=`${n.tag}:${n.textContent||n.innerHTML||""}:`;for(const t in n.props)e+=`${t}:${String(n.props[t])},`;return tl(e)}function O_(n,e){const t=[],i=e.resolveKeyData||(s=>s.key),r=e.resolveValueData||(s=>s.value);for(const[s,o]of Object.entries(n))t.push(...(Array.isArray(o)?o:[o]).map(a=>{const l={key:s,value:a},u=r(l);return typeof u=="object"?O_(u,e):Array.isArray(u)?u:{[typeof e.key=="function"?e.key(l):e.key]:i(l),[typeof e.value=="function"?e.value(l):e.value]:u}}).flat());return t}function F_(n,e){return Object.entries(n).map(([t,i])=>{if(typeof i=="object"&&(i=F_(i,e)),e.resolve){const r=e.resolve({key:t,value:i});if(typeof r<"u")return r}return typeof i=="number"&&(i=i.toString()),typeof i=="string"&&e.wrapValue&&(i=i.replace(new RegExp(e.wrapValue,"g"),`\\${e.wrapValue}`),i=`${e.wrapValue}${i}${e.wrapValue}`),`${t}${e.keyValueSeparator||""}${i}`}).join(e.entrySeparator||"")}const zt=n=>({keyValue:n,metaKey:"property"}),jl=n=>({keyValue:n}),Hf={appleItunesApp:{unpack:{entrySeparator:", ",resolve({key:n,value:e}){return`${vi(n)}=${e}`}}},articleExpirationTime:zt("article:expiration_time"),articleModifiedTime:zt("article:modified_time"),articlePublishedTime:zt("article:published_time"),bookReleaseDate:zt("book:release_date"),charset:{metaKey:"charset"},contentSecurityPolicy:{unpack:{entrySeparator:"; ",resolve({key:n,value:e}){return`${vi(n)} ${e}`}},metaKey:"http-equiv"},contentType:{metaKey:"http-equiv"},defaultStyle:{metaKey:"http-equiv"},fbAppId:zt("fb:app_id"),msapplicationConfig:jl("msapplication-Config"),msapplicationTileColor:jl("msapplication-TileColor"),msapplicationTileImage:jl("msapplication-TileImage"),ogAudioSecureUrl:zt("og:audio:secure_url"),ogAudioUrl:zt("og:audio"),ogImageSecureUrl:zt("og:image:secure_url"),ogImageUrl:zt("og:image"),ogSiteName:zt("og:site_name"),ogVideoSecureUrl:zt("og:video:secure_url"),ogVideoUrl:zt("og:video"),profileFirstName:zt("profile:first_name"),profileLastName:zt("profile:last_name"),profileUsername:zt("profile:username"),refresh:{metaKey:"http-equiv",unpack:{entrySeparator:";",resolve({key:n,value:e}){if(n==="seconds")return`${e}`}}},robots:{unpack:{entrySeparator:", ",resolve({key:n,value:e}){return typeof e=="boolean"?`${vi(n)}`:`${vi(n)}:${e}`}}},xUaCompatible:{metaKey:"http-equiv"}},B_=new Set(["og","book","article","profile"]);function k_(n){var i;const e=vi(n),t=e.indexOf(":");return B_.has(e.substring(0,t))?"property":((i=Hf[n])==null?void 0:i.metaKey)||"name"}function YS(n){var e;return((e=Hf[n])==null?void 0:e.keyValue)||vi(n)}function vi(n){const e=n.replace(/([A-Z])/g,"-$1").toLowerCase(),t=e.indexOf("-"),i=e.substring(0,t);return i==="twitter"||B_.has(i)?n.replace(/([A-Z])/g,":$1").toLowerCase():e}function nu(n){if(Array.isArray(n))return n.map(t=>nu(t));if(typeof n!="object"||Array.isArray(n))return n;const e={};for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[vi(t)]=nu(n[t]));return e}function $S(n,e){const t=Hf[e];return e==="refresh"?`${n.seconds};url=${n.url}`:F_(nu(n),{keyValueSeparator:"=",entrySeparator:", ",resolve({value:i,key:r}){if(i===null)return"";if(typeof i=="boolean")return`${r}`},...t==null?void 0:t.unpack})}const H_=new Set(["og:image","og:video","og:audio","twitter:image"]);function z_(n){const e={};for(const t in n){if(!Object.prototype.hasOwnProperty.call(n,t))continue;const i=n[t];String(i)!=="false"&&t&&(e[t]=i)}return e}function pd(n,e){const t=z_(e),i=vi(n),r=k_(i);if(H_.has(i)){const s={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(s[`${n}${o==="url"?"":`${o[0].toUpperCase()}${o.slice(1)}`}`]=t[o]);return zf(s).sort((o,a)=>{var l,u;return(((l=o[r])==null?void 0:l.length)||0)-(((u=a[r])==null?void 0:u.length)||0)})}return[{[r]:i,...t}]}function zf(n){const e=[],t={};for(const r in n){if(!Object.prototype.hasOwnProperty.call(n,r))continue;const s=n[r];if(!Array.isArray(s)){if(typeof s=="object"&&s){if(H_.has(vi(r))){e.push(...pd(r,s));continue}t[r]=z_(s)}else t[r]=s;continue}
19for(const o of s)e.push(...typeof o=="string"?zf({[r]:o}):pd(r,o))}const i=O_(t,{key({key:r}){return k_(r)},value({key:r}){return r==="charset"?"charset":"content"},resolveKeyData({key:r}){return YS(r)},resolveValueData({value:r,key:s}){return r===null?"_null":typeof r=="object"?$S(r,s):typeof r=="number"?r.toString():r}});return[...e,...i].map(r=>(r.content==="_null"&&(r.content=null),r))}function jS(n,e){return n instanceof Promise?n.then(e):e(n)}function iu(n,e,t,i){const r=i||G_(typeof e=="object"&&typeof e!="function"&&!(e instanceof Promise)?{...e}:{[n==="script"||n==="noscript"||n==="style"?"innerHTML":"textContent"]:e},n==="templateParams"||n==="titleTemplate");if(r instanceof Promise)return r.then(o=>iu(n,e,t,o));const s={tag:n,props:r};for(const o of N_){const a=s.props[o]!==void 0?s.props[o]:t[o];a!==void 0&&((!(o==="innerHTML"||o==="textContent"||o==="children")||GS.has(s.tag))&&(s[o==="children"?"innerHTML":o]=a),delete s.props[o])}return s.props.body&&(s.tagPosition="bodyClose",delete s.props.body),s.tag==="script"&&typeof s.innerHTML=="object"&&(s.innerHTML=JSON.stringify(s.innerHTML),s.props.type=s.props.type||"application/json"),Array.isArray(s.props.content)?s.props.content.map(o=>({...s,props:{...s.props,content:o}})):s}function KS(n,e){var i;const t=n==="class"?" ":";";return e&&typeof e=="object"&&!Array.isArray(e)&&(e=Object.entries(e).filter(([,r])=>r).map(([r,s])=>n==="style"?`${r}:${s}`:r)),(i=String(Array.isArray(e)?e.join(t):e))==null?void 0:i.split(t).filter(r=>!!r.trim()).join(t)}function V_(n,e,t,i){for(let r=i;r<t.length;r+=1){const s=t[r];if(s==="class"||s==="style"){n[s]=KS(s,n[s]);continue}if(n[s]instanceof Promise)return n[s].then(o=>(n[s]=o,V_(n,e,t,r)));if(!e&&!N_.has(s)){const o=String(n[s]),a=s.startsWith("data-");o==="true"||o===""?n[s]=a?"true":!0:n[s]||(a&&o==="false"?n[s]="false":delete n[s])}}}function G_(n,e=!1){const t=V_(n,e,Object.keys(n),0);return t instanceof Promise?t.then(()=>n):n}const ZS=10;function W_(n,e,t){for(let i=t;i<e.length;i+=1){const r=e[i];if(r instanceof Promise)return r.then(s=>(e[i]=s,W_(n,e,i)));Array.isArray(r)?n.push(...r):n.push(r)}}function JS(n){const e=[],t=n.resolvedInput;for(const r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;const s=t[r];
19if(!(s===void 0||!WS.has(r))){if(Array.isArray(s)){for(const o of s)e.push(iu(r,o,n));continue}e.push(iu(r,s,n))}}if(e.length===0)return[];const i=[];return jS(W_(i,e,0),()=>i.map((r,s)=>(r._e=n._i,n.mode&&(r._m=n.mode),r._p=(n._i<<ZS)+s,r)))}const md=new Set(["onload","onerror","onabort","onprogress","onloadstart"]),_d={base:-10,title:10},gd={critical:-80,high:-10,low:20};function nl(n){const e=n.tagPriority;if(typeof e=="number")return e;let t=100;return n.tag==="meta"?n.props["http-equiv"]==="content-security-policy"?t=-30:n.props.charset?t=-20:n.props.name==="viewport"&&(t=-15):n.tag==="link"&&n.props.rel==="preconnect"?t=20:n.tag in _d&&(t=_d[n.tag]),e&&e in gd?t+gd[e]:t}const QS=[{prefix:"before:",offset:-1},{prefix:"after:",offset:1}],eM=["name","property","http-equiv"];function X_(n){const{props:e,tag:t}=n;if(XS.has(t))return t;if(t==="link"&&e.rel==="canonical")return"canonical";if(e.charset)return"charset";if(e.id)return`${t}:id:${e.id}`;for(const i of eM)if(e[i]!==void 0)return`${t}:${i}:${e[i]}`;return!1}const Hi="%separator";function tM(n,e,t=!1){var r;let i;if(e==="s"||e==="pageTitle")i=n.pageTitle;else if(e.includes(".")){const s=e.indexOf(".");i=(r=n[e.substring(0,s)])==null?void 0:r[e.substring(s+1)]}else i=n[e];if(i!==void 0)return t?(i||"").replace(/"/g,'\\"'):i||""}const nM=new RegExp(`${Hi}(?:\\s*${Hi})*`,"g");function na(n,e,t,i=!1){if(typeof n!="string"||!n.includes("%"))return n;let r=n;try{r=decodeURI(n)}catch{}const s=r.match(/%\w+(?:\.\w+)?/g);if(!s)return n;const o=n.includes(Hi);return n=n.replace(/%\w+(?:\.\w+)?/g,a=>{if(a===Hi||!s.includes(a))return a;const l=tM(e,a.slice(1),i);return l!==void 0?l:a}).trim(),o&&(n.endsWith(Hi)&&(n=n.slice(0,-Hi.length)),n.startsWith(Hi)&&(n=n.slice(Hi.length)),n=n.replace(nM,t).trim()),n}function vd(n,e){return n==null?e||null:typeof n=="function"?n(e):n}async function q_(n,e={}){const t=e.document||n.resolvedOptions.document;if(!t||!n.dirty)return;const i={shouldRender:!0,tags:[]};if(await n.hooks.callHook("dom:beforeRender",i),!!i.shouldRender)return n._domUpdatePromise||(n._domUpdatePromise=new Promise(async r=>{var f;const s=(await n.resolveTags()).map(h=>({tag:h,id:Ca.has(h.tag)?tu(h):h.tag,shouldRender:!0}));let o=n._dom;if(!o){o={elMap:{htmlAttrs:t.documentElement,bodyAttrs:t.body}};const h=new Set;for(const d of["body","head"]){const g=(f=t[d])==null?void 0:f.children;for(const _ of g){const m=_.tagName.toLowerCase();if(!Ca.has(m))continue;const p={tag:m,props:await G_(_.getAttributeNames().reduce((A,w)=>({...A,[w]:_.getAttribute(w)}),{})),innerHTML:_.innerHTML},T=X_(p);let x=T,v=1;for(;x&&h.has(x);)x=`${T}:${v++}`;x&&(p._d=x,h.add(x)),o.elMap[_.getAttribute("data-hid")||tu(p)]=_}}}o.pendingSideEffects={...o.sideEffects},o.sideEffects={};function a(h,d,g){const _=`${h}:${d}`;o.sideEffects[_]=g,delete o.pendingSideEffects[_]}function l({id:h,$el:d,tag:g}){const _=g.tag.endsWith("Attrs");if(o.elMap[h]=d,_||(g.textContent&&g.textContent!==d.textContent&&(d.textContent=g.textContent),g.innerHTML&&g.innerHTML!==d.innerHTML&&(d.innerHTML=g.innerHTML),a(h,"el",()=>{var m;(m=o.elMap[h])==null||m.remove(),delete o.elMap[h]})),g._eventHandlers)for(const m in g._eventHandlers)Object.prototype.hasOwnProperty.call(g._eventHandlers,m)&&d.getAttribute(`data-${m}`)!==""&&((g.tag==="bodyAttrs"?t.defaultView:d).addEventListener(m.substring(2),g._eventHandlers[m].bind(d)),d.setAttribute(`data-${m}`,""));for(const m in g.props){if(!Object.prototype.hasOwnProperty.call(g.props,m))continue;const p=g.props[m],T=`attr:${m}`;if(m==="class"){if(!p)continue;for(const x of p.split(" "))_&&a(h,`${T}:${x}`,()=>d.classList.remove(x)),!d.classList.contains(x)&&d.classList.add(x)}else if(m==="style"){if(!p)continue;for(const x of p.split(";")){const v=x.indexOf(":"),A=x.substring(0,v).trim(),w=x.substring(v+1).trim();a(h,`${T}:${A}`,()=>{d.style.removeProperty(A)}),d.style.setProperty(A,w)}}else d.getAttribute(m)!==p&&d.setAttribute(m,p===!0?"":String(p)),_&&a(h,T,()=>d.removeAttribute(m))}}const u=[],c={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const h of s){const{tag:d,shouldRender:g,id:_}=h;if(g){if(d.tag==="title"){t.title=d.textContent;continue}h.$el=h.$el||o.elMap[_],h.$el?l(h):Ca.has(d.tag)&&u.push(h)}}for(const h of u){const d=h.tag.tagPosition||"head";h.$el=t.createElement(h.tag.tag),l(h),c[d]=c[d]||t.createDocumentFragment(),c[d].appendChild(h.$el)}for(const h of s)await n.hooks.callHook("dom:renderTag",h,t,a);c.head&&t.head.appendChild(c.head),c.bodyOpen&&t.body.insertBefore(c.bodyOpen,t.body.firstChild),c.bodyClose&&t.body.appendChild(c.bodyClose);for(const h in o.pendingSideEffects)o.pendingSideEffects[h]();n._dom=o,await n.hooks.callHook("dom:rendered",{renders:s}),r()}).finally(()=>{n._domUpdatePromise=void 0,n.dirty=!1})),n._domUpdatePromise}function iM(n,e={}){const t=e.delayFn||(i=>setTimeout(i,10));return n._domDebouncedUpdatePromise=n._domDebouncedUpdatePromise||new Promise(i=>t(()=>q_(n,e).then(()=>{delete n._domDebouncedUpdatePromise,i()})))}function rM(n){return e=>{var i,r;const t=((r=(i=e.resolvedOptions.document)==null?void 0:i.head.querySelector('script[id="unhead:payload"]'))==null?void 0:r.innerHTML)||!1;return t&&e.push(JSON.parse(t)),{mode:"client",hooks:{"entries:updated":s=>{iM(s,n)}}}}}const sM=new Set(["templateParams","htmlAttrs","bodyAttrs"]),oM={hooks:{"tag:normalise":({tag:n})=>{n.props.hid&&(n.key=n.props.hid,delete n.props.hid),n.props.vmid&&(n.key=n.props.vmid,delete n.props.vmid),n.props.key&&
19(n.key=n.props.key,delete n.props.key);const e=X_(n);e&&!e.startsWith("meta:og:")&&!e.startsWith("meta:twitter:")&&delete n.key;const t=e||(n.key?`${n.tag}:${n.key}`:!1);t&&(n._d=t)},"tags:resolve":n=>{const e=Object.create(null);for(const i of n.tags){const r=(i.key?`${i.tag}:${i.key}`:i._d)||tu(i),s=e[r];if(s){let a=i==null?void 0:i.tagDuplicateStrategy;if(!a&&sM.has(i.tag)&&(a="merge"),a==="merge"){const l=s.props;l.style&&i.props.style&&(l.style[l.style.length-1]!==";"&&(l.style+=";"),i.props.style=`${l.style} ${i.props.style}`),l.class&&i.props.class?i.props.class=`${l.class} ${i.props.class}`:l.class&&(i.props.class=l.class),e[r].props={...l,...i.props};continue}else if(i._e===s._e){s._duped=s._duped||[],i._d=`${s._d}:${s._duped.length+1}`,s._duped.push(i);continue}else if(nl(i)>nl(s))continue}if(!(i.innerHTML||i.textContent||Object.keys(i.props).length!==0)&&Ca.has(i.tag)){delete e[r];continue}e[r]=i}const t=[];for(const i in e){const r=e[i],s=r._duped;t.push(r),s&&(delete r._duped,t.push(...s))}n.tags=t,n.tags=n.tags.filter(i=>!(i.tag==="meta"&&(i.props.name||i.props.property)&&!i.props.content))}}},aM=new Set(["script","link","bodyAttrs"]),lM=n=>({hooks:{"tags:resolve":e=>{for(const t of e.tags){if(!aM.has(t.tag))continue;const i=t.props;for(const r in i){if(r[0]!=="o"||r[1]!=="n"||!Object.prototype.hasOwnProperty.call(i,r))continue;const s=i[r];typeof s=="function"&&(n.ssr&&md.has(r)?i[r]=`this.dataset.${r}fired = true`:delete i[r],t._eventHandlers=t._eventHandlers||{},t._eventHandlers[r]=s)}n.ssr&&t._eventHandlers&&(t.props.src||t.props.href)&&(t.key=t.key||tl(t.props.src||t.props.href))}},"dom:renderTag":({$el:e,tag:t})=>{var r,s;const i=e==null?void 0:e.dataset;if(i)for(const o in i){if(!o.endsWith("fired"))continue;const a=o.slice(0,-5);md.has(a)&&((s=(r=t._eventHandlers)==null?void 0:r[a])==null||s.call(e,new Event(a.substring(2))))}}}}),cM=new Set(["link","style","script","noscript"]),uM={hooks:{"tag:normalise":({tag:n})=>{n.key&&cM.has(n.tag)&&(n.props["data-hid"]=n._h=tl(n.key))}}},fM={mode:"server",hooks:{"tags:beforeResolve":n=>{const e={};let t=!1;for(const i of n.tags)i._m!=="server"||i.tag!=="titleTemplate"&&i.tag!=="templateParams"&&i.tag!=="title"||(e[i.tag]=i.tag==="title"||i.tag==="titleTemplate"?i.textContent:i.props,t=!0);t&&n.tags.push({tag:"script",innerHTML:JSON.stringify(e),props:{id:"unhead:payload",type:"application/json"}})}}},hM={hooks:{"tags:resolve":n=>{var e;for(const t of n.tags)if(typeof t.tagPriority=="string")for(const{prefix:i,offset:r}of QS){if(!t.tagPriority.startsWith(i))continue;const s=t.tagPriority.substring(i.length),o=(e=n.tags.find(a=>a._d===s))==null?void 0:e._p;if(o!==void 0){t._p=o+r;break}}n.tags.sort((t,i)=>{const r=nl(t),s=nl(i);return r<s?-1:r>s?1:t._p-i._p})}}},dM={meta:"content",link:"href",htmlAttrs:"lang"},pM=["innerHTML","textContent"],mM=n=>({hooks:{"tags:resolve":e=>{var o;const{tags:t}=e;let i;for(let a=0;a<t.length;a+=1)t[a].tag==="templateParams"&&(i=e.tags.splice(a,1)[0].props,a-=1);const r=i||{},s=r.separator||"|";delete r.separator,r.pageTitle=na(r.pageTitle||((o=t.find(a=>a.tag==="title"))==null?void 0:o.textContent)||"",r,s);for(const a of t){if(a.processTemplateParams===!1)continue;const l=dM[a.tag];if(l&&typeof a.props[l]=="string")a.props[l]=na(a.props[l],r,s);else if(a.processTemplateParams||a.tag==="titleTemplate"||a.tag==="title")for(const u of pM)typeof a[u]=="string"&&(a[u]=na(a[u],r,s,a.tag==="script"&&a.props.type.endsWith("json")))}n._templateParams=r,n._separator=s},"tags:afterResolve":({tags:e})=>{let t;for(let i=0;i<e.length;i+=1){const r=e[i];r.tag==="title"&&r.processTemplateParams!==!1&&(t=r)}t!=null&&t.textContent&&(t.textContent=na(t.textContent,n._templateParams,n._separator))}}}),_M={hooks:{"tags:resolve":n=>{const{tags:e}=n;let t,i;for(let r=0;r<e.length;r+=1){const s=e[r];s.tag==="title"?t=s:s.tag==="titleTemplate"&&(i=s)}if(i&&t){const r=vd(i.textContent,t.textContent);r!==null?t.textContent=r||t.textContent:n.tags.splice(n.tags.indexOf(t),1)}else if(i){const r=vd(i.textContent);r!==null&&(i.textContent=r,i.tag="title",i=void 0)}i&&n.tags.splice(n.tags.indexOf(i),1)}}},gM={hooks:{"tags:afterResolve":n=>{for(const e of n.tags)typeof e.innerHTML=="string"&&(e.innerHTML&&(e.props.type==="application/ld+json"||e.props.type==="application/json")?e.innerHTML=e.innerHTML.replace(/</g,"\\u003C"):e.innerHTML=e.innerHTML.replace(new RegExp(`</${e.tag}`,"g"),`<\\/${e.tag}`))}}};let Y_;function vM(n={}){const e=xM(n);return e.use(rM()),Y_=e}function xd(n,e){return!n||n==="server"&&e||n==="client"&&!e}function xM(n={}){const e=b_();e.addHooks(n.hooks||{}),n.document=n.document||(qS?document:void 0);const t=!n.document,i=()=>{a.dirty=!0,e.callHook("entries:updated",a)};let r=0,s=[];const o=[],a={plugins:o,dirty:!1,resolvedOptions:n,hooks:e,headEntries(){return s},use(l){const u=typeof l=="function"?l(a):l;(!u.key||!o.some(c=>c.key===u.key))&&(o.push(u),xd(u.mode,t)&&e.addHooks(u.hooks||{}))},push(l,u){u==null||delete u.head;const c={_i:r++,input:l,...u};return xd(c.mode,t)&&(s.push(c),i()),{dispose(){s=s.filter(f=>f._i!==c._i),i()},patch(f){for(const h of s)h._i===c._i&&(h.input=c.input=f);i()}}},async resolveTags(){const l={tags:[],entries:[...s]};await e.callHook("entries:resolve",l);for(const u of l.entries){const c=u.resolvedInput||u.input;if(u.resolvedInput=await(u.transform?u.transform(c):c),u.resolvedInput)for(const f of await JS(u)){const h={tag:f,entry:u,resolvedOptions:a.resolvedOptions};await e.callHook("tag:normalise",h),l.tags.push(h.tag)}}return await e.callHook("tags:beforeResolve",l),await e.callHook("tags:resolve",l),await e.callHook("tags:afterResolve",l),l.tags},ssr:t};return[oM,fM,lM,uM,hM,mM,_M,gM,...(n==null?void 0:n.plugins)||[]].forEac
19h(l=>a.use(l)),a.hooks.callHook("init",a),a}function yM(){return Y_}const SM=u_[0]==="3";function MM(n){return typeof n=="function"?n():Mt(n)}function il(n){if(n instanceof Promise||n instanceof Date||n instanceof RegExp)return n;const e=MM(n);if(!n||!e)return e;if(Array.isArray(e))return e.map(t=>il(t));if(typeof e=="object"){const t={};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(i==="titleTemplate"||i[0]==="o"&&i[1]==="n"){t[i]=Mt(e[i]);continue}t[i]=il(e[i])}return t}return e}const EM={hooks:{"entries:resolve":n=>{for(const e of n.entries)e.resolvedInput=il(e.input)}}},$_="usehead";function TM(n){return{install(t){SM&&(t.config.globalProperties.$unhead=n,t.config.globalProperties.$head=n,t.provide($_,n))}}.install}function bM(n={}){n.domDelayFn=n.domDelayFn||(t=>Mf(()=>setTimeout(()=>t(),0)));const e=vM(n);return e.use(EM),e.install=TM(e),e}const ru=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},su="__unhead_injection_handler__";function wM(n){ru[su]=n}function AM(){if(su in ru)return ru[su]();const n=Ss($_);return n||yM()}function RM(n,e={}){const t=e.head||AM();if(t)return t.ssr?t.push(n,e):CM(t,n,e)}function CM(n,e,t={}){const i=Pn(!1),r=Pn({});ax(()=>{r.value=i.value?{}:il(e)});const s=n.push(r.value,t);return wa(r,a=>{s.patch(a)}),o_()&&(Cm(()=>{s.dispose()}),Am(()=>{i.value=!0}),wm(()=>{i.value=!1})),s}function PM(n,e){const{title:t,titleTemplate:i,...r}=n;return RM({title:t,titleTemplate:i,_flatMeta:r},{...e,transform(s){const o=zf({...s._flatMeta});return delete s._flatMeta,{...s,meta:o}}})}let Pa,Da;function DM(){return Pa=$fetch(Ff(`builds/meta/${Co().app.buildId}.json`),{responseType:"json"}),Pa.then(n=>{Da=vS(n.matcher)}).catch(n=>{console.error("[nuxt] Error fetching app manifest.",n)}),Pa}function El(){return Pa||DM()}async function Vf(n){if(await El(),!Da)return console.error("[nuxt] Error creating app manifest matcher.",Da),{};try{return yS({},...Da.matchAll(n).reverse())}catch(e){return console.error("[nuxt] Error matching route rules.",e),{}}}async function yd(n,e={}){const t=await IM(n,e),i=It(),r=i._payloadCache=i._payloadCache||{};return t in r||(r[t]=K_(n).then(s=>s?j_(t).then(o=>o||(delete r[t],null)):(r[t]=null,null))),r[t]}const LM="_payload.json";async function IM(n,e={}){const t=new URL(n,"http://localhost");if(t.host!=="localhost"||Ws(t.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+n);const i=Co(),r=e.hash||(e.fresh?Date.now():i.app.buildId),s=i.app.cdnURL,o=s&&await K_(n)?s:i.app.baseURL;return Ml(o,t.pathname,LM+(r?`?${r}`:""))}async function j_(n){const e=fetch(n).then(t=>t.text().then(Z_));try{return await e}catch(t){console.warn("[nuxt] Cannot load payload ",n,t)}return null}async function K_(n=I_().path){if(n=Of(n),(await El()).prerendered.includes(n))return!0;const t=await Vf(n);return!!t.prerender&&!t.redirect}let fr=null;async function UM(){var i;if(fr)return fr;const n=document.getElementById("__NUXT_DATA__");if(!n)return{};const e=await Z_(n.textContent||""),t=n.dataset.src?await j_(n.dataset.src):void 0;return fr={...e,...t,...window.__NUXT__},(i=fr.config)!=null&&i.public&&(fr.config.public=Ji(fr.config.public)),fr}async function Z_(n){return await zS(n,It()._payloadRevivers)}function NM(n,e){It()._payloadRevivers[n]=e}const Sd={NuxtError:n=>kf(n),EmptyShallowRef:n=>Ch(n==="_"?void 0:n==="0n"?BigInt(0):Ka(n)),EmptyRef:n=>Pn(n==="_"?void 0:n==="0n"?BigInt(0):Ka(n)),ShallowRef:n=>Ch(n),ShallowReactive:n=>us(n),Ref:n=>Pn(n),Reactive:n=>Ji(n)},OM=Ci({name:"nuxt:revive-payload:client",order:-30,async setup(n){let e,t;for(const i in Sd)NM(i,Sd[i]);Object.assign(n.payload,([e,t]=w_(()=>n.runWithContext(UM)),e=await e,t(),e)),window.__NUXT__=n.payload}}),FM=[],BM=Ci({name:"nuxt:head",enforce:"pre",setup(n){const e=bM({plugins:FM});wM(()=>It().vueApp._context.provides.usehead),n.vueApp.use(e);{let t=!0;const i=async()=>{t=!1,await q_(e)};e.hooks.hook("dom:beforeRender",r=>{r.shouldRender=!t}),n.hooks.hook("page:start",()=>{t=!0}),n.hooks.hook("page:finish",()=>{n.isHydrating||i()}),n.hooks.hook("app:error",i),n.hooks.hook("app:suspense:resolve",i)}}}),kM=async n=>{let e,t;const i=([e,t]=w_(()=>Vf(n.path)),e=await e,t(),e);if(i.redirect)return Ws(i.redirect,{acceptRelative:!0})?(window.location.href=i.redirect,!1):i.redirect},HM=[kM];function Kl(n){typeof n=="object"&&(n=S_({pathname:n.path||"",search:__(n.query||{}),hash:n.hash||""}));const e=new URL(n.toString(),window.location.href);
19return{path:e.pathname,fullPath:n,query:m_(e.search),hash:e.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:n}}const zM=Ci({name:"nuxt:router",enforce:"pre",setup(n){const e=Py(window.location.pathname,Co().app.baseURL)+window.location.search+window.location.hash,t=[],i={"navigate:before":[],"resolve:before":[],"navigate:after":[],error:[]},r=(f,h)=>(i[f].push(h),()=>i[f].splice(i[f].indexOf(h),1)),s=Co().app.baseURL,o=Ji(Kl(e));async function a(f,h){try{const d=Kl(f);for(const g of i["navigate:before"]){const _=await g(d,o);if(_===!1||_ instanceof Error)return;if(typeof _=="string"&&_.length)return a(_,!0)}for(const g of i["resolve:before"])await g(d,o);Object.assign(o,d),window.history[h?"replaceState":"pushState"]({},"",Ml(s,d.fullPath)),n.isHydrating||await n.runWithContext(DS);for(const g of i["navigate:after"])await g(d,o)}catch(d){for(const g of i.error)await g(d)}}const u={currentRoute:c_(()=>o),isReady:()=>Promise.resolve(),options:{},install:()=>Promise.resolve(),push:f=>a(f,!1),replace:f=>a(f,!0),back:()=>window.history.go(-1),go:f=>window.history.go(f),forward:()=>window.history.go(1),beforeResolve:f=>r("resolve:before",f),beforeEach:f=>r("navigate:before",f),afterEach:f=>r("navigate:after",f),onError:f=>r("error",f),resolve:Kl,addRoute:(f,h)=>{t.push(h)},getRoutes:()=>t,hasRoute:f=>t.some(h=>h.name===f),removeRoute:f=>{const h=t.findIndex(d=>d.name===f);h!==-1&&t.splice(h,1)}};n.vueApp.component("RouterLink",bm({functional:!0,props:{to:{type:String,required:!0},custom:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:String},setup:(f,{slots:h})=>{const d=()=>a(f.to,f.replace);return()=>{var _;const g=u.resolve(f.to);return f.custom?(_=h.default)==null?void 0:_.call(h,{href:f.to,navigate:d,route:g}):Ix("a",{href:f.to,onClick:m=>(m.preventDefault(),d())},h)}}})),window.addEventListener("popstate",f=>{const h=f.target.location;u.replace(h.href.replace(h.origin,""))}),n._route=o,n._middleware=n._middleware||{global:[],named:{}};const c=n.payload.state._layout;return n.hooks.hookOnce("app:created",async()=>{u.beforeEach(async(f,h)=>{f.meta=Ji(f.meta||{}),n.isHydrating&&c&&!Qi(f.meta.layout)&&(f.meta.layout=c),n._processingMiddleware=!0;{const d=new Set([...HM,...n._middleware.global]);{const g=await n.runWithContext(()=>Vf(f.path));if(g.appMiddleware)for(const _ in g.appMiddleware){const m=n._middleware.named[_];if(!m)return;g.appMiddleware[_]?d.add(m):d.delete(m)}}for(const g of d){const _=await n.runWithContext(()=>g(f,h));if(_!==!0&&(_||_===!1))return _}}}),u.afterEach(()=>{delete n._processingMiddleware}),await u.replace(e),Ly(o.fullPath,e)||await n.runWithContext(()=>RS(o.fullPath))}),{provide:{route:o,router:u}}}}),Md=globalThis.requestIdleCallback||(n=>{const e=Date.now(),t={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-e))};return setTimeout(()=>{n(t)},1)}),mP=globalThis.cancelIdleCallback||(n=>{clearTimeout(n)}),Gf=n=>{const e=It();e.isHydrating?e.hooks.hookOnce("app:suspense:resolve",()=>{Md(()=>n())}):Md(()=>n())},VM=Ci({name:"nuxt:payload",setup(n){Fr().beforeResolve(async(e,t)=>{if(e.path===t.path)return;const i=await yd(e.path);i&&Object.assign(n.static.data,i.data)}),Gf(()=>{var e;n.hooks.hook("link:prefetch",async t=>{const{hostname:i}=new URL(t,window.location.href);i===window.location.hostname&&await yd(t)}),((e=navigator.connection)==null?void 0:e.effectiveType)!=="slow-2g"&&setTimeout(El,1e3)})}}),GM=Ci(()=>{const n=Fr();Gf(()=>{n.beforeResolve(async()=>{await new Promise(e=>{setTimeout(e,100),requestAnimationFrame(()=>{setTimeout(e,0)})})})})}),WM=Ci(n=>{let e;async function t(){const i=await El();e&&clearTimeout(e),e=setTimeout(t,ud);try{const r=await $fetch(Ff("builds/latest.json")+`?${Date.now()}`);r.id!==i.id&&n.hooks.callHook("app:manifest:update",r)}catch{}}Gf(()=>{e=setTimeout(t,ud)})});function XM(n={}){const e=n.path||window.location.pathname;let t={};try{t=Ka(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(n.force||(t==null?void 0:t.path)!==e||(t==null?void 0:t.expires)<Date.now()){try{sessionStorage.setItem("nuxt:reload",JSON.stringify({path:e,expires:Date.now()+(n.ttl??1e4)}))}catch{}if(n.persistState)try{sessionStorage.setItem("nuxt:reload:state",JSON.stringify({state:It().payload.state}))}catch{}window.location.pathname!==e?window.location.href=e:window.location.reload()}}const qM=Ci({name:"nuxt:chunk-reload",setup(n){const e=Fr(),t=Co(),i=new Set;e.beforeEach(()=>{i.clear()}),n.hook("app:chunkError",({error:s})=>{i.add(s)});function r(s){const a="href"in s&&s.href[0]==="#"?t.app.baseURL+s.href:Ml(t.app.baseURL,s.fullPath);XM({path:a,persistState:!0})}n.hook("app:manifest:update",()=>{e.beforeResolve(r)}),e.onError((s,o)=>{i.has(s)&&r(o)})}}),YM=Ci({name:"nuxt:global-components"}),$M=Ci(()=>{window.dataLayer=window.dataLayer||[];function n(){window.dataLayer.push(arguments)}n("js",new Date),n("config","G-95ZFJLSVJ3")}),jM=[OM,BM,zM,VM,GM,WM,qM,YM,$M],KM="modulepreload",ZM=function(n,e){return new URL(n,e).href},Ed={},Td=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){const o=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(t.map(u=>{if(u=ZM(u,i),u in Ed)return;Ed[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!i)for(let g=o.length-1;g>=0;g--){const _=o[g];if(_.href===u&&(!c||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${f}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":KM,c||(d.as="script"),d.crossOrigin="",d.href=u,l&&d.setAttribute("nonce",l),document.head.appendChild(d),c)return new Promise((g,_)=>{d.addEventListener("load",g),d.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return r.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};function JM(){const n=Pn(!1),e=()=>{n.value=window.innerWidth>=1024};return Af(()=>{e(),window.addEventListener("resize",e)}),yl(()=>{window.removeEventListener("resize",e)}),{isDesktop:n}}function pi(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function J_(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}/*! 20 * GSAP 3.12.5 21 * https://gsap.com 22 * 23 * @license Copyright 2008-2024, GreenSock. All rights reserved. 24 * Subject to the terms at https://gsap.com/standard-license or for 25 * Club GSAP members, the agreement issued with that membership. 26 * @author: Jack Doyle, [email protected] 27*/var xn={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Ls={duration:.5,overwrite:!1,delay:0}
vendor: 65,522 bytes, lines 27-35
27,Wf,kt,ft,Rn=1e8,lt=1/Rn,ou=Math.PI*2,QM=ou/4,eE=0,Q_=Math.sqrt,tE=Math.cos,nE=Math.sin,Lt=function(e){return typeof e=="string"},gt=function(e){return typeof e=="function"},Ti=function(e){return typeof e=="number"},Xf=function(e){return typeof e>"u"},ni=function(e){return typeof e=="object"},tn=function(e){return e!==!1},qf=function(){return typeof window<"u"},ia=function(e){return gt(e)||Lt(e)},eg=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Ht=Array.isArray,au=/(?:-?\.?\d|\.)+/gi,tg=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,hs=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Zl=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,ng=/[+-]=-?[.\d]+/,ig=/[^,'"\[\]\s]+/gi,iE=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,dt,Yn,lu,Yf,Sn={},rl={},rg,sg=function(e){return(rl=Br(e,Sn))&&an},$f=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Po=function(e,t){return!t&&console.warn(e)},og=function(e,t){return e&&(Sn[e]=t)&&rl&&(rl[e]=t)||Sn},Do=function(){return 0},rE={suppressEvents:!0,isStart:!0,kill:!1},La={suppressEvents:!0,kill:!1},sE={suppressEvents:!0},jf={},ji=[],cu={},ag,dn={},Jl={},bd=30,Ia=[],Kf="",Zf=function(e){var t=e[0],i,r;if(ni(t)||gt(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(r=Ia.length;r--&&!Ia[r].targetTest(t););i=Ia[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new Dg(e[r],i)))||e.splice(r,1);return e},Ir=function(e){return e._gsap||Zf(Cn(e))[0]._gsap},lg=function(e,t,i){return(i=e[t])&>(i)?e[t]():Xf(i)&&e.getAttribute&&e.getAttribute(t)||i},nn=function(e,t){return(e=e.split(",")).forEach(t)||e},xt=function(e){return Math.round(e*1e5)/1e5||0},Ct=function(e){return Math.round(e*1e7)/1e7||0},Es=function(e,t){var i=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+r:i==="-"?e-r:i==="*"?e*r:e/r},oE=function(e,t){for(var i=t.length,r=0;e.indexOf(t[r])<0&&++r<i;);return r<i},sl=function(){var e=ji.length,t=ji.slice(0),i,r;for(cu={},ji.length=0,i=0;i<e;i++)r=t[i],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},cg=function(e,t,i,r){ji.length&&!kt&&sl(),e.render(t,i,kt&&t<0&&(e._initted||e._startAt)),ji.length&&!kt&&sl()},ug=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(ig).length<2?t:Lt(e)?e.trim():e},fg=function(e){return e},Ln=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},aE=function(e){return function(t,i){for(var r in i)r in t||r==="duration"&&e||r==="ease"||(t[r]=i[r])}},Br=function(e,t){for(var i in t)e[i]=t[i];return e},wd=function n(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=ni(t[i])?n(e[i]||(e[i]={}),t[i]):t[i]);return e},ol=function(e,t){var i={},r;for(r in e)r in t||(i[r]=e[r]);return i},vo=function(e){var t=e.parent||dt,i=e.keyframes?aE(Ht(e.keyframes)):Ln;if(tn(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},lE=function(e,t){for(var i=e.length,r=i===t.length;r&&i--&&e[i]===t[i];);return i<0},hg=function(e,t,i,r,s){var o=e[r],a;if(s)for(a=t[s];o&&o[s]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},Tl=function(e,t,i,r){i===void 0&&(i="_first"),r===void 0&&(r="_last");var s=t._prev,o=t._next;s?s._next=o:e[i]===t&&(e[i]=o),o?o._prev=s:e[r]===t&&(e[r]=s),t._next=t._prev=t.parent=null},er=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Ur=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},cE=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},uu=function(e,t,i,r){return e._startAt&&(kt?e._startAt.revert(La):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},uE=function n(e){return!e||e._ts&&n(e.parent)},Ad=function(e){return e._repeat?Is(e._tTime,e=e.duration()+e._rDelay)*e:0},Is=function(e,t){var i=Math.floor(e/=t);return e&&i===e?i-1:i},al=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},bl=function(e){return e._end=Ct(e._start+(e._tDur/Math.abs(e._ts||e._rts||lt)||0))},wl=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=Ct(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),bl(e),i._dirty||Ur(i,e)),e},dg=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=al(e.rawTime(),t),(!t._dur||Vo(0,t.totalDuration(),i)-t._tTime>lt)&&t.render(i,!0)),Ur(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-lt}},jn=function(e,t,i,r){return t.parent&&er(t),t._start=Ct((Ti(i)?i:i||e!==dt?bn(e,i,t):e._time)+t._delay),t._end=Ct(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),hg(e,t,"_first","_last",e._sort?"_start":0),fu(t)||(e._recent=t),r||dg(e,t),e._ts<0&&wl(e,e._tTime),e},pg=function(e,t){return(Sn.ScrollTrigger||$f("scrollTrigger",t))&&Sn.ScrollTrigger.create(t,e)},mg=function(e,t,i,r,s){if(Qf(e,t,s),!e._initted)return 1;if(!i&&e._pt&&!kt&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&ag!==_n.frame)return ji.push(e),e._lazy=[s,r],1},fE=function n(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||n(t))},fu=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},hE=function(e,t,i,r){var s=e.ratio,o=t<0||!t&&(!e._start&&fE(e)&&!(!e._initted&&fu(e))||(e._ts<0||e._dp._ts<0)&&!fu(e))?0:1,a=e._rDelay,l=0,u,c,f;if(a&&e._repeat&&(l=Vo(0,e._tDur,t),c=Is(l,a),e._yoyo&&c&1&&(o=1-o),c!==Is(e._tTime,a)&&(s=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==s||kt||r||e._zTime===lt||!t&&e._zTime){if(!e._initted&&mg(e,t,r,i,l))return;for(f=e._zTime,e._zTime=t||(i?lt:0),i||(i=t&&!f),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,u=e._pt;u;)u.r(o,u.d),u=u._next;t<0&&uu(e,t,i,!0),e._onUpdate&&!i&&vn(e,"onUpdate"),l&&e._repeat&&!i&&e.parent&&vn(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&er(e,1),!i&&!kt&&(vn(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},dE=function(e,t,i){var r;if(i>t)for(r=e._first;r&&r._start<=i;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=i;){if(r.data==="isPause"&&r._start<t)return r;r=r._prev}},Us=function(e,t,i,r){var s=e._repeat,o=Ct(t)||0,a=e._tTime/e._tDur;return a&&!r&&(e._time*=o/e._dur),e._dur=o,e._tDur=s?s<0?1e10:Ct(o*(s+1)+e._rDelay*s):o,a>0&&!r&&wl(e,e._tTime=e._tDur*a),e.parent&&bl(e),i||Ur(e.parent,e),e},Rd=function(e){return e instanceof jt?Ur(e):Us(e,e._dur)},pE={_start:0,endTime:Do,totalDuration:Do},bn=function n(e,t,i){var r=e.labels,s=e._recent||pE,o=e.duration()>=Rn?s.endTime(!1):e._dur,a,l,u;return Lt(t)&&(isNaN(t)||t in r)?(l=t.charAt(0),u=t.substr(-1)==="%",a=t.indexOf("="),l==="<"||l===">"?(a>=0&&(t=t.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(a<0?s:i).totalDuration()/100:1)):a<0?(t in r||(r[t]=o),r[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),u&&i&&(l=l/100*(Ht(i)?i[0]:i).totalDuration()),a>1?n(e,t.substr(0,a-1),i)+l:o+l)):t==null?o:+t},xo=function(e,t,i){var r=Ti(t[1]),s=(r?2:1)+(e<2?0:1),o=t[s],a,l;if(r&&(o.duration=t[1]),o.parent=i,e){for(a=o,l=i;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=tn(l.vars.inherit)&&l.parent;o.immediateRender=tn(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[s-1]}return new Et(t[0],o,t[s+1])},ar=function(e,t){return e||e===0?t(e):t},Vo=function(e,t,i){return i<e?e:i>t?t:i},Bt=function(e,t){return!Lt(e)||!(t=iE.exec(e))?"":t[1]},mE=function(e,t,i){return ar(i,function(r){return Vo(e,t,r)})},hu=[].slice,_g=function(e,t){return e&&ni(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&ni(e[0]))&&!e.nodeType&&e!==Yn},_E=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(r){var s;return Lt(r)&&!t||_g(r,1)?(s=i).push.apply(s,Cn(r)):i.push(r)})||i},Cn=function(e,t,i){return ft&&!t&&ft.selector?ft.selector(e):Lt(e)&&!i&&(lu||!Ns())?hu.call((t||Yf).querySelectorAll(e),0):Ht(e)?_E(e,i):_g(e)?hu.call(e,0):e?[e]:[]},du=function(e){return e=Cn(e)[0]||Po("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return Cn(t,i.querySelectorAll?i:i===e?Po("Invalid scope")||Yf.createElement("div"):e)}},gg=function(e){return e.sort(function(){return .5-Math.random()})},vg=function(e){if(gt(e))return e;var t=ni(e)?e:{each:e},i=Nr(t.ease),r=t.from||0,s=parseFloat(t.base)||0,o={},a=r>0&&r<1,l=isNaN(r)||a,u=t.axis,c=r,f=r;return Lt(r)?c=f={center:.5,edges:.5,end:1}[r]||0:!a&&l&&(c=r[0],f=r[1]),function(h,d,g){var _=(g||t).length,m=o[_],p,T,x,v,A,w,C,P,S;if(!m){if(S=t.grid==="auto"?0:(t.grid||[1,Rn])[1],!S){for(C=-Rn;C<(C=g[S++].getBoundingClientRect().left)&&S<_;);S<_&&S--}for(m=o[_]=[],p=l?Math.min(S,_)*c-.5:r%S,T=S===Rn?0:l?_*f/S-.5:r/S|0,C=0,P=Rn,w=0;w<_;w++)x=w%S-p,v=T-(w/S|0),m[w]=A=u?Math.abs(u==="y"?v:x):Q_(x*x+v*v),A>C&&(C=A),A<P&&(P=A);r==="random"&&gg(m),m.max=C-P,m.min=P,m.v=_=(parseFloat(t.amount)||parseFloat(t.each)*(S>_?_-1:u?u==="y"?_/S:S:Math.max(S,_/S))||0)*(r==="edges"?-1:1),m.b=_<0?s-_:s,m.u=Bt(t.amount||t.each)||0,i=i&&_<0?Rg(i):i}return _=(m[h]-m.min)/m.max||0,Ct(m.b+(i?i(_):_)*m.v)+m.u}},pu=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var r=Ct(Math.round(parseFloat(i)/e)*e*t);return(r-r%1)/t+(Ti(i)?0:Bt(i))}},xg=function(e,t){var i=Ht(e),r,s;return!i&&ni(e)&&(r=i=e.radius||Rn,e.values?(e=Cn(e.values),(s=!Ti(e[0]))&&(r*=r)):e=pu(e.increment)),ar(t,i?gt(e)?function(o){return s=e(o),Math.abs(s-o)<=r?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),u=Rn,c=0,f=e.length,h,d;f--;)s?(h=e[f].x-a,d=e[f].y-l,h=h*h+d*d):h=Math.abs(e[f]-a),h<u&&(u=h,c=f);return c=!r||u<=r?e[c]:o,s||c===o||Ti(o)?c:c+Bt(o)}:pu(e))},yg=function(e,t,i,r){return ar(Ht(e)?!t:i===!0?!!(i=0):!r,function(){return Ht(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(r=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*r)/r})},gE=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(r){return t.reduce(function(s,o){return o(s)},r)}},vE=function(e,t){return function(i){return e(parseFloat(i))+(t||Bt(i))}},xE=function(e,t,i){return Mg(e,t,0,1,i)},Sg=function(e,t,i){return ar(i,function(r){return e[~~t(r)]})},yE=function n(e,t,i){var r=t-e;return Ht(e)?Sg(e,n(0,e.length),t):ar(i,function(s){return(r+(s-e)%r)%r+e})},SE=function n(e,t,i){var r=t-e,s=r*2;return Ht(e)?Sg(e,n(0,e.length-1),t):ar(i,function(o){return o=(s+(o-e)%s)%s||0,e+(o>r?s-o:o)})},Lo=function(e){for(var t=0,i="",r,s,o,a;~(r=e.indexOf("random(",t));)o=e.indexOf(")",r),a=e.charAt(r+7)==="[",s=e.substr(r+7,o-r-7).match(a?ig:au),i+=e.substr(t,r-t)+yg(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),t=o+1;return i+e.substr(t,e.length-t)},Mg=function(e,t,i,r,s){var o=t-e,a=r-i;return ar(s,function(l){return i+((l-e)/o*a||0)})},ME=function n(e,t,i,r){var s=isNaN(e+t)?0:function(d){return(1-d)*e+d*t};if(!s){var o=Lt(e),a={},l,u,c,f,h;if(i===!0&&(r=1)&&(i=null),o)e={p:e},t={p:t};else if(Ht(e)&&!Ht(t)){for(c=[],f=e.length,h=f-2,u=1;u<f;u++)c.push(n(e[u-1],e[u]));f--,s=function(g){g*=f;var _=Math.min(h,~~g);return c[_](g-_)},i=t}else r||(e=Br(Ht(e)?[]:{},e));if(!c){for(l in t)Jf.call(a,e,l,"get",t[l]);s=function(g){return nh(g,a)||(o?e.p:e)}}}return ar(i,s)},Cd=function(e,t,i){var r=e.labels,s=Rn,o,a,l;for(o in r)a=r[o]-t,a<0==!!i&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},vn=function(e,t,i){var r=e.vars,s=r[t],o=ft,a=e._ctx,l,u,c;if(s)return l=r[t+"Params"],u=r.callbackScope||e,i&&ji.length&&sl(),a&&(ft=a),c=l?s.apply(u,l):s.call(u),ft=o,c},oo=function(e){return er(e),e.scrollTrigger&&e.scrollTrigger.kill(!!kt),e.progress()<1&&vn(e,"onInterrupt"),e},ds,Eg=[],Tg=function(e){if(e)if(e=!e.name&&e.default||e,qf()||e.headless){var t=e.name,i=gt(e),r=t&&!i&&e.init?function(){this._props=[]}:e,s={init:Do,render:nh,add:Jf,kill:BE,modifier:FE,rawVars:0},o={targetTest:0,get:0,getSetter:th,aliases:{},register:0};if(Ns(),e!==r){if(dn[t])return;Ln(r,Ln(ol(e,s),o)),Br(r.prototype,Br(s,ol(e,o))),dn[r.prop=t]=r,e.targetTest&&(Ia.push(r),jf[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}og(t,r),e.register&&e.register(an,r,rn)}else Eg.push(e)},rt=255,ao={aqua:[0,rt,rt],lime:[0,rt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,rt],navy:[0,0,128],white:[rt,rt,rt],olive:[128,128,0],yellow:[rt,rt,0],orange:[rt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[rt,0,0],pink:[rt,192,203],cyan:[0,rt,rt],transparent:[rt,rt,rt,0]},Ql=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*rt+.5|0},bg=function(e,t,i){var r=e?Ti(e)?[e>>16,e>>8&rt,e&rt]:0:ao.black,s,o,a,l,u,c,f,h,d,g;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),ao[e])r=ao[e];else if(e.charAt(0)==="#"){if(e.length<6&&(s=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+s+s+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&rt,r&rt,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&rt,e&rt]}else if(e.substr(0,3)==="hsl"){if(r=g=e.match(au),!t)l=+r[0]%360/360,u=+r[1]/100,c=+r[2]/100,o=c<=.5?c*(u+1):c+u-c*u,s=c*2-o,r.length>3&&(r[3]*=1),r[0]=Ql(l+1/3,s,o),r[1]=Ql(l,s,o),r[2]=Ql(l-1/3,s,o);else if(~e.indexOf("="))return r=e.match(tg),i&&r.length<4&&(r[3]=1),r}else r=e.match(au)||ao.transparent;r=r.map(Number)}return t&&!g&&(s=r[0]/rt,o=r[1]/rt,a=r[2]/rt,f=Math.max(s,o,a),h=Math.min(s,o,a),c=(f+h)/2,f===h?l=u=0:(d=f-h,u=c>.5?d/(2-f-h):d/(f+h),l=f===s?(o-a)/d+(o<a?6:0):f===o?(a-s)/d+2:(s-o)/d+4,l*=60),r[0]=~~(l+.5),r[1]=~~(u*100+.5),r[2]=~~(c*100+.5)),i&&r.length<4&&(r[3]=1),r},wg=function(e){var t=[],i=[],r=-1;return e.split(Ki).forEach(function(s){var o=s.match(hs)||[];t.push.apply(t,o),i.push(r+=o.length+1)}),t.c=i,t},Pd=function(e,t,i){var r="",s=(e+r).match(Ki),o=t?"hsla(":"rgba(",a=0,l,u,c,f;if(!s)return e;if(s=s.map(function(h){return(h=bg(h,t,1))&&o+(t?h[0]+","+h[1]+"%,"+h[2]+"%,"+h[3]:h.join(","))+")"}),i&&(c=wg(e),l=i.c,l.join(r)!==c.c.join(r)))for(u=e.replace(Ki,"1").split(hs),f=u.length-1;a<f;a++)r+=u[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(c.length?c:s.length?s:i).shift());if(!u)for(u=e.split(Ki),f=u.length-1;a<f;a++)r+=u[a]+s[a];return r+u[f]},Ki=function(){var n="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in ao)n+="|"+e+"\\b";return new RegExp(n+")","gi")}(),EE=/hsl[a]?\(/,Ag=function(e){var t=e.join(" "),i;if(Ki.lastIndex=0,Ki.test(t))return i=EE.test(t),e[1]=Pd(e[1],i),e[0]=Pd(e[0],i,wg(e[1])),!0},Io,_n=function(){var n=Date.now,e=500,t=33,i=n(),r=i,s=1e3/240,o=s,a=[],l,u,c,f,h,d,g=function _(m){var p=n()-r,T=m===!0,x,v,A,w;if((p>e||p<0)&&(i+=p-t),r+=p,A=r-i,x=A-o,(x>0||T)&&(w=++f.frame,h=A-f.time*1e3,f.time=A=A/1e3,o+=x+(x>=s?4:s-x),v=1),T||(l=u(_)),v)for(d=0;d<a.length;d++)a[d](A,h,w,m)};return f={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(m){return h/(1e3/(m||60))},wake:function(){rg&&(!lu&&qf()&&(Yn=lu=window,Yf=Yn.document||{},Sn.gsap=an,(Yn.gsapVersions||(Yn.gsapVersions=[])).push(an.version),sg(rl||Yn.GreenSockGlobals||!Yn.gsap&&Yn||{}),Eg.forEach(Tg)),c=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&f.sleep(),u=c||function(m){return setTimeout(m,o-f.time*1e3+1|0)},Io=1,g(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),Io=0,u=Do},lagSmoothing:function(m,p){e=m||1/0,t=Math.min(p||33,e)},fps:function(m){s=1e3/(m||240),o=f.time*1e3+s},add:function(m,p,T){var x=p?function(v,A,w,C){m(v,A,w,C),f.remove(x)}:m;return f.remove(m),a[T?"unshift":"push"](x),Ns(),x},remove:function(m,p){~(p=a.indexOf(m))&&a.splice(p,1)&&d>=p&&d--},_listeners:a},f}(),Ns=function(){return!Io&&_n.wake()},Xe={},TE=/^[\d.\-M][\d.\-,\s]/,bE=/["']/g,wE=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),r=i[0],s=1,o=i.length,a,l,u;s<o;s++)l=i[s],a=s!==o-1?l.lastIndexOf(","):l.length,u=l.substr(0,a),t[r]=isNaN(u)?u.replace(bE,"").trim():+u,r=l.substr(a+1).trim();return t},AE=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),r=e.indexOf("(",t);return e.substring(t,~r&&r<i?e.indexOf(")",i+1):i)},RE=function(e){var t=(e+"").split("("),i=Xe[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[wE(t[1])]:AE(e).split(",").map(ug)):Xe._CE&&TE.test(e)?Xe._CE("",e):i},Rg=function(e){return function(t){return 1-e(1-t)}},Cg=function n(e,t){for(var i=e._first,r;i;)i instanceof jt?n(i,t):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==t&&(i.timeline?n(i.timeline,t):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=t)),i=i._next},Nr=function(e,t){return e&&(gt(e)?e:Xe[e]||RE(e))||t},Vr=function(e,t,i,r){i===void 0&&(i=function(l){return 1-t(1-l)}),r===void 0&&(r=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var s={easeIn:t,easeOut:i,easeInOut:r},o;return nn(e,function(a){Xe[a]=Sn[a]=s,Xe[o=a.toLowerCase()]=i;for(var l in s)Xe[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=Xe[a+"."+l]=s[l]}),s},Pg=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},ec=function n(e,t,i){var r=t>=1?t:1,s=(i||(e?.3:.45))/(t<1?t:1),o=s/ou*(Math.asin(1/r)||0),a=function(c){return c===1?1:r*Math.pow(2,-10*c)*nE((c-o)*s)+1},l=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:Pg(a);return s=ou/s,l.config=function(u,c){return n(e,u,c)},l},tc=function n(e,t){t===void 0&&(t=1.70158);var i=function(o){return o?--o*o*((t+1)*o+t)+1:0},r=e==="out"?i:e==="in"?function(s){return 1-i(1-s)}:Pg(i);return r.config=function(s){return n(e,s)},r};nn("Linear,Quad,Cubic,Quart,Quint,Strong",function(n,e){var t=e<5?e+1:e;Vr(n+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})});Xe.Linear.easeNone=Xe.none=Xe.Linear.easeIn;Vr("Elastic",ec("in"),ec("out"),ec());(function(n,e){var t=1/e,i=2*t,r=2.5*t,s=function(a){return a<t?n*a*a:a<i?n*Math.pow(a-1.5/e,2)+.75:a<r?n*(a-=2.25/e)*a+.9375:n*Math.pow(a-2.625/e,2)+.984375};Vr("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);Vr("Expo",function(n){return n?Math.pow(2,10*(n-1)):0});Vr("Circ",function(n){return-(Q_(1-n*n)-1)});Vr("Sine",function(n){return n===1?1:-tE(n*QM)+1});Vr("Back",tc("in"),tc("out"),tc());Xe.SteppedEase=Xe.steps=Sn.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,r=e+(t?0:1),s=t?1:0,o=1-lt;return function(a){return((r*Vo(0,o,a)|0)+s)*i}}};Ls.ease=Xe["quad.out"];nn("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(n){return Kf+=n+","+n+"Params,"});var Dg=function(e,t){this.id=eE++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:lg,this.set=t?t.getSetter:th},Uo=function(){function n(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Us(this,+t.duration,1,1),this.data=t.data,ft&&(this._ctx=ft,ft.data.push(this)),Io||_n.wake()}var e=n.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,Us(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,r){if(Ns(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(wl(this,i),!s._dp||s.parent||dg(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&jn(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===lt||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),cg(this,i,r)),this},e.time=function(i,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+Ad(this))%(this._dur+this._rDelay)||(i?this._dur:0),r):this._time},e.totalProgress=function(i,r){return arguments.length?this.totalTime(this.totalDuration()*i,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(i,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+Ad(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,r){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*s,r):this._repeat?Is(this._tTime,s)+1:1},e.timeScale=function(i,r){if(!arguments.length)return this._rts===-lt?0:this._rts;if(this._rts===i)return this;var s=this.parent&&this._ts?al(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-lt?0:this._rts,this.totalTime(Vo(-Math.abs(this._delay),this._tDur,s),r!==!1),bl(this),cE(this)},e.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ns(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==lt&&(this._tTime-=lt)))),this):this._ps},e.startTime=function(i){if(arguments.length){this._start=i;var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&jn(r,this,i-this._delay),this}return this._start},e.endTime=function(i){return this._start+(tn(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var r=this.parent||this._dp;return r?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?al(r.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=sE);var r=kt;return kt=i,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),kt=r,this},e.globalTime=function(i){for(var r=this,s=arguments.length?i:r.rawTime();r;)s=r._start+s/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(i):s},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,Rd(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var r=this._time;return this._rDelay=i,Rd(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,r){return this.totalTime(bn(this,i),tn(r))},e.restart=function(i,r){return this.play().totalTime(i?-this._delay:0,tn(r))},e.play=function(i,r){return i!=null&&this.seek(i,r),this.reversed(!1).paused(!1)},e.reverse=function(i,r){return i!=null&&this.seek(i||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(i,r){return i!=null&&this.seek(i,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-lt:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-lt,this},e.isActive=function(){var i=this.parent||this._dp,r=this._start,s;return!!(!i||this._ts&&this._initted&&i.isActive()&&(s=i.rawTime(!0))>=r&&s<this.endTime(!0)-lt)},e.eventCallback=function(i,r,s){var o=this.vars;return arguments.length>1?(r?(o[i]=r,s&&(o[i+"Params"]=s),i==="onUpdate"&&(this._onUpdate=r)):delete o[i],this):o[i]},e.then=function(i){var r=this;return new Promise(function(s){var o=gt(i)?i:fg,a=function(){var u=r.then;r.then=null,gt(o)&&(o=o(r))&&(o.then||o===r)&&(r.then=u),s(o),r.then=u};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?a():r._prom=a})},e.kill=function(){oo(this)},n}();Ln(Uo.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-lt,_prom:0,_ps:!1,_rts:1});var jt=function(n){J_(e,n);function e(i,r){var s;return i===void 0&&(i={}),s=n.call(this,i)||this,s.labels={},s.smoothChildTiming=!!i.smoothChildTiming,s.autoRemoveChildren=!!i.autoRemoveChildren,s._sort=tn(i.sortChildren),dt&&jn(i.parent||dt,pi(s),r),i.reversed&&s.reverse(),i.paused&&s.paused(!0),i.scrollTrigger&&pg(pi(s),i.scrollTrigger),s}var t=e.prototype;return t.to=function(r,s,o){return xo(0,arguments,this),this},t.from=function(r,s,o){return xo(1,arguments,this),this},t.fromTo=function(r,s,o,a){return xo(2,arguments,this),this},t.set=function(r,s,o){return s.duration=0,s.parent=this,vo(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Et(r,s,bn(this,o),1),this},t.call=function(r,s,o){return jn(this,Et.delayedCall(0,r,s),o)},t.staggerTo=function(r,s,o,a,l,u,c){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=u,o.onCompleteParams=c,o.parent=this,new Et(r,o,bn(this,l)),this},t.staggerFrom=function(r,s,o,a,l,u,c){return o.runBackwards=1,vo(o).immediateRender=tn(o.immediateRender),this.staggerTo(r,s,o,a,l,u,c)},t.staggerFromTo=function(r,s,o,a,l,u,c,f){return a.startAt=o,vo(a).immediateRender=tn(a.immediateRender),this.staggerTo(r,s,a,l,u,c,f)},t.render=function(r,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=r<=0?0:Ct(r),f=this._zTime<0!=r<0&&(this._initted||!u),h,d,g,_,m,p,T,x,v,A,w,C;if(this!==dt&&c>l&&r>=0&&(c=l),c!==this._tTime||o||f){if(a!==this._time&&u&&(c+=this._time-a,r+=this._time-a),h=c,v=this._start,x=this._ts,p=!x,f&&(u||(a=this._zTime),(r||!s)&&(this._zTime=r)),this._repeat){if(w=this._yoyo,m=u+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(m*100+r,s,o);if(h=Ct(c%m),c===l?(_=this._repeat,h=u):(_=~~(c/m),_&&_===c/m&&(h=u,_--),h>u&&(h=u)),A=Is(this._tTime,m),!a&&this._tTime&&A!==_&&this._tTime-A*m-this._dur<=0&&(A=_),w&&_&1&&(h=u-h,C=1),_!==A&&!this._lock){var P=w&&A&1,S=P===(w&&_&1);if(_<A&&(P=!P),a=P?0:c%u?u:c,this._lock=1,this.render(a||(C?0:Ct(_*m)),s,!u)._lock=0,this._tTime=c,!s&&this.parent&&vn(this,"onRepeat"),this.vars.repeatRefresh&&!C&&(this.invalidate()._lock=1),a&&a!==this._time||p!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,S&&(this._lock=2,a=P?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!C&&this.invalidate()),this._lock=0,!this._ts&&!p)return this;Cg(this,C)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(T=dE(this,Ct(a),Ct(h)),T&&(c-=h-(h=T._start))),this._tTime=c,this._time=h,this._act=!x,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=r,a=0),!a&&h&&!s&&!_&&(vn(this,"onStart"),this._tTime!==c))return this;if(h>=a&&r>=0)for(d=this._first;d;){if(g=d._next,(d._act||h>=d._start)&&d._ts&&T!==d){if(d.parent!==this)return this.render(r,s,o);if(d.render(d._ts>0?(h-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(h-d._start)*d._ts,s,o),h!==this._time||!this._ts&&!p){T=0,g&&(c+=this._zTime=-lt);break}}d=g}else{d=this._last;for(var M=r<0?r:h;d;){if(g=d._prev,(d._act||M<=d._end)&&d._ts&&T!==d){if(d.parent!==this)return this.render(r,s,o);if(d.render(d._ts>0?(M-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(M-d._start)*d._ts,s,o||kt&&(d._initted||d._startAt)),h!==this._time||!this._ts&&!p){T=0,g&&(c+=this._zTime=M?-lt:lt);break}}d=g}}if(T&&!s&&(this.pause(),T.render(h>=a?0:-lt)._zTime=h>=a?1:-1,this._ts))return this._start=v,bl(this),this.render(r,s,o);this._onUpdate&&!s&&vn(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&a)&&(v===this._start||Math.abs(x)!==Math.abs(this._ts))&&(this._lock||((r||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&er(this,1),!s&&!(r<0&&!a)&&(c||a||!l)&&(vn(this,c===l&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(r,s){var o=this;if(Ti(s)||(s=bn(this,s,r)),!(r instanceof Uo)){if(Ht(r))return r.forEach(function(a){return o.add(a,s)}),this;if(Lt(r))return this.addLabel(r,s);if(gt(r))r=Et.delayedCall(0,r);else return this}return this!==r?jn(this,r,s):this},t.getChildren=function(r,s,o,a){r===void 0&&(r=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-Rn);for(var l=[],u=this._first;u;)u._start>=a&&(u instanceof Et?s&&l.push(u):(o&&l.push(u),r&&l.push.apply(l,u.getChildren(!0,s,o)))),u=u._next;return l},t.getById=function(r){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===r)return s[o]},t.remove=function(r){return Lt(r)?this.removeLabel(r):gt(r)?this.killTweensOf(r):(Tl(this,r),r===this._recent&&(this._recent=this._last),Ur(this))},t.totalTime=function(r,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Ct(_n.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),n.prototype.totalTime.call(this,r,s),this._forcing=0,this):this._tTime},t.addLabel=function(r,s){return this.labels[r]=bn(this,s),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,s,o){var a=Et.delayedCall(0,s||Do,o);return a.data="isPause",this._hasPause=1,jn(this,a,bn(this,r))},t.removePause=function(r){var s=this._first;for(r=bn(this,r);s;)s._start===r&&s.data==="isPause"&&er(s),s=s._next},t.killTweensOf=function(r,s,o){for(var a=this.getTweensOf(r,o),l=a.length;l--;)Xi!==a[l]&&a[l].kill(r,s);return this},t.getTweensOf=function(r,s){for(var o=[],a=Cn(r),l=this._first,u=Ti(s),c;l;)l instanceof Et?oE(l._targets,a)&&(u?(!Xi||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(c=l.getTweensOf(a,s)).length&&o.push.apply(o,c),l=l._next;return o},t.tweenTo=function(r,s){s=s||{};var o=this,a=bn(o,r),l=s,u=l.startAt,c=l.onStart,f=l.onStartParams,h=l.immediateRender,d,g=Et.to(o,Ln({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale())||lt,onStart:function(){if(o.pause(),!d){var m=s.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale());g._dur!==m&&Us(g,m,0,1).render(g._time,!0,!0),d=1}c&&c.apply(g,f||[])}},s));return h?g.render(0):g},t.tweenFromTo=function(r,s,o){return this.tweenTo(s,Ln({startAt:{time:bn(this,r)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),Cd(this,bn(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),Cd(this,bn(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+lt)},t.shiftChildren=function(r,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,u;a;)a._start>=o&&(a._start+=r,a._end+=r),a=a._next;if(s)for(u in l)l[u]>=o&&(l[u]+=r);return Ur(this)},t.invalidate=function(r){var s=this._first;for(this._lock=0;s;)s.invalidate(r),s=s._next;return n.prototype.invalidate.call(this,r)},t.clear=function(r){r===void 0&&(r=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),r&&(this.labels={}),Ur(this)},t.totalDuration=function(r){var s=0,o=this,a=o._last,l=Rn,u,c,f;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-r:r));if(o._dirty){for(f=o.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),c=a._start,c>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,jn(o,a,c-a._delay,1)._lock=0):l=c,c<0&&a._ts&&(s-=c,(!f&&!o._dp||f&&f.smoothChildTiming)&&(o._start+=c/o._ts,o._time-=c,o._tTime-=c),o.shiftChildren(-c,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=u;Us(o,o===dt&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(r){if(dt._ts&&(cg(dt,al(r,dt)),ag=_n.frame),_n.frame>=bd){bd+=xn.autoSleep||120;var s=dt._first;if((!s||!s._ts)&&xn.autoSleep&&_n._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||_n.sleep()}}},e}(Uo);Ln(jt.prototype,{_lock:0,_hasPause:0,_forcing:0});var CE=function(e,t,i,r,s,o,a){var l=new rn(this._pt,e,t,0,1,Fg,null,s),u=0,c=0,f,h,d,g,_,m,p,T;for(l.b=i,l.e=r,i+="",r+="",(p=~r.indexOf("random("))&&(r=Lo(r)),o&&(T=[i,r],o(T,e,t),i=T[0],r=T[1]),h=i.match(Zl)||[];f=Zl.exec(r);)g=f[0],_=r.substring(u,f.index),d?d=(d+1)%5:_.substr(-5)==="rgba("&&(d=1),g!==h[c++]&&(m=parseFloat(h[c-1])||0,l._pt={_next:l._pt,p:_||c===1?_:",",s:m,c:g.charAt(1)==="="?Es(m,g)-m:parseFloat(g)-m,m:d&&d<4?Math.round:0},u=Zl.lastIndex);return l.c=u<r.length?r.substring(u,r.length):"",l.fp=a,(ng.test(r)||p)&&(l.e=0),this._pt=l,l},Jf=function(e,t,i,r,s,o,a,l,u,c){gt(r)&&(r=r(s||0,e,o));var f=e[t],h=i!=="get"?i:gt(f)?u?e[t.indexOf("set")||!gt(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():f,d=gt(f)?u?UE:Ng:eh,g;if(Lt(r)&&(~r.indexOf("random(")&&(r=Lo(r)),r.charAt(1)==="="&&(g=Es(h,r)+(Bt(h)||0),(g||g===0)&&(r=g))),!c||h!==r||mu)return!isNaN(h*r)&&r!==""?(g=new rn(this._pt,e,t,+h||0,r-(h||0),typeof f=="boolean"?OE:Og,0,d),u&&(g.fp=u),a&&g.modifier(a,this,e),this._pt=g):(!f&&!(t in e)&&$f(t,r),CE.call(this,e,t,h,r,d,l||xn.stringFilter,u))},PE=function(e,t,i,r,s){if(gt(e)&&(e=yo(e,s,t,i,r)),!ni(e)||e.style&&e.nodeType||Ht(e)||eg(e))return Lt(e)?yo(e,s,t,i,r):e;var o={},a;for(a in e)o[a]=yo(e[a],s,t,i,r);return o},Lg=function(e,t,i,r,s,o){var a,l,u,c;if(dn[e]&&(a=new dn[e]).init(s,a.rawVars?t[e]:PE(t[e],r,s,o,i),i,r,o)!==!1&&(i._pt=l=new rn(i._pt,s,e,0,1,a.render,a,0,a.priority),i!==ds))for(u=i._ptLookup[i._targets.indexOf(s)],c=a._props.length;c--;)u[a._props[c]]=l;return a},Xi,mu,Qf=function n(e,t,i){var r=e.vars,s=r.ease,o=r.startAt,a=r.immediateRender,l=r.lazy,u=r.onUpdate,c=r.runBackwards,f=r.yoyoEase,h=r.keyframes,d=r.autoRevert,g=e._dur,_=e._startAt,m=e._targets,p=e.parent,T=p&&p.data==="nested"?p.vars.targets:m,x=e._overwrite==="auto"&&!Wf,v=e.timeline,A,w,C,P,S,M,I,z,O,X,J,D,V;if(v&&(!h||!s)&&(s="none"),e._ease=Nr(s,Ls.ease),e._yEase=f?Rg(Nr(f===!0?s:f,Ls.ease)):0,f&&e._yoyo&&!e._repeat&&(f=e._yEase,e._yEase=e._ease,e._ease=f),e._from=!v&&!!r.runBackwards,!v||h&&!r.stagger){if(z=m[0]?Ir(m[0]).harness:0,D=z&&r[z.prop],A=ol(r,jf),_&&(_._zTime<0&&_.progress(1),t<0&&c&&a&&!d?_.render(-1,!0):_.revert(c&&g?La:rE),_._lazy=0),o){if(er(e._startAt=Et.set(m,Ln({data:"isStart",overwrite:!1,parent:p,immediateRender:!0,lazy:!_&&tn(l),startAt:null,delay:0,onUpdate:u&&function(){return vn(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(kt||!a&&!d)&&e._startAt.revert(La),a&&g&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(c&&g&&!_){if(t&&(a=!1),C=Ln({overwrite:!1,data:"isFromStart",lazy:a&&!_&&tn(l),immediateRender:a,stagger:0,parent:p},A),D&&(C[z.prop]=D),er(e._startAt=Et.set(m,C)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(kt?e._startAt.revert(La):e._startAt.render(-1,!0)),e._zTime=t,!a)n(e._startAt,lt,lt);else if(!t)return}for(e._pt=e._ptCache=0,l=g&&tn(l)||l&&!g,w=0;w<m.length;w++){if(S=m[w],I=S._gsap||Zf(m)[w]._gsap,e._ptLookup[w]=X={},cu[I.id]&&ji.length&&sl(),J=T===m?w:T.indexOf(S),z&&(O=new z).init(S,D||A,e,J,T)!==!1&&(e._pt=P=new rn(e._pt,S,O.name,0,1,O.render,O,0,O.priority),O._props.forEach(function(U){X[U]=P}),O.priority&&(M=1)),!z||D)for(C in A)dn[C]&&(O=Lg(C,A,e,J,S,T))?O.priority&&(M=1):X[C]=P=Jf.call(e,S,C,"get",A[C],J,T,0,r.stringFilter);e._op&&e._op[w]&&e.kill(S,e._op[w]),x&&e._pt&&(Xi=e,dt.killTweensOf(S,X,e.globalTime(t)),V=!e.parent,Xi=0),e._pt&&l&&(cu[I.id]=1)}M&&Bg(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!V,h&&t<=0&&v.render(Rn,!0,!0)},DE=function(e,t,i,r,s,o,a,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],c,f,h,d;if(!u)for(u=e._ptCache[t]=[],h=e._ptLookup,d=e._targets.length;d--;){if(c=h[d][t],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==t&&c.fp!==t;)c=c._next;if(!c)return mu=1,e.vars[t]="+=0",Qf(e,a),mu=0,l?Po(t+" not eligible for reset"):1;u.push(c)}for(d=u.length;d--;)f=u[d],c=f._pt||f,c.s=(r||r===0)&&!s?r:c.s+(r||0)+o*c.c,c.c=i-c.s,f.e&&(f.e=xt(i)+Bt(f.e)),f.b&&(f.b=c.s+Bt(f.b))},LE=function(e,t){var i=e[0]?Ir(e[0]).harness:0,r=i&&i.aliases,s,o,a,l;if(!r)return t;s=Br({},t);for(o in r)if(o in s)for(l=r[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},IE=function(e,t,i,r){var s=t.ease||r||"power1.inOut",o,a;if(Ht(t))a=i[e]||(i[e]=[]),t.forEach(function(l,u){return a.push({t:u/(t.length-1)*100,v:l,e:s})});else for(o in t)a=i[o]||(i[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:s})},yo=function(e,t,i,r,s){return gt(e)?e.call(t,i,r,s):Lt(e)&&~e.indexOf("random(")?Lo(e):e},Ig=Kf+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Ug={};nn(Ig+",id,stagger,delay,duration,paused,scrollTrigger",function(n){return Ug[n]=1});var Et=function(n){J_(e,n);function e(i,r,s,o){var a;typeof r=="number"&&(s.duration=r,r=s,s=null),a=n.call(this,o?r:vo(r))||this;var l=a.vars,u=l.duration,c=l.delay,f=l.immediateRender,h=l.stagger,d=l.overwrite,g=l.keyframes,_=l.defaults,m=l.scrollTrigger,p=l.yoyoEase,T=r.parent||dt,x=(Ht(i)||eg(i)?Ti(i[0]):"length"in r)?[i]:Cn(i),v,A,w,C,P,S,M,I;if(a._targets=x.length?Zf(x):Po("GSAP target "+i+" not found. https://gsap.com",!xn.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,g||h||ia(u)||ia(c)){if(r=a.vars,v=a.timeline=new jt({data:"nested",defaults:_||{},targets:T&&T.data==="nested"?T.vars.targets:x}),v.kill(),v.parent=v._dp=pi(a),v._start=0,h||ia(u)||ia(c)){if(C=x.length,M=h&&vg(h),ni(h))for(P in h)~Ig.indexOf(P)&&(I||(I={}),I[P]=h[P]);for(A=0;A<C;A++)w=ol(r,Ug),w.stagger=0,p&&(w.yoyoEase=p),I&&Br(w,I),S=x[A],w.duration=+yo(u,pi(a),A,S,x),w.delay=(+yo(c,pi(a),A,S,x)||0)-a._delay,!h&&C===1&&w.delay&&(a._delay=c=w.delay,a._start+=c,w.delay=0),v.to(S,w,M?M(A,S,x):0),v._ease=Xe.none;v.duration()?u=c=0:a.timeline=0}else if(g){vo(Ln(v.vars.defaults,{ease:"none"})),v._ease=Nr(g.ease||r.ease||"none");var z=0,O,X,J;if(Ht(g))g.forEach(function(D){return v.to(x,D,">")}),v.duration();else{w={};for(P in g)P==="ease"||P==="easeEach"||IE(P,g[P],w,g.easeEach);for(P in w)for(O=w[P].sort(function(D,V){return D.t-V.t}),z=0,A=0;A<O.length;A++)X=O[A],J={ease:X.e,duration:(X.t-(A?O[A-1].t:0))/100*u},J[P]=X.v,v.to(x,J,z),z+=J.duration;v.duration()<u&&v.to({},{duration:u-v.duration()})}}u||a.duration(u=v.duration())}else a.timeline=0;return d===!0&&!Wf&&(Xi=pi(a),dt.killTweensOf(x),Xi=0),jn(T,pi(a),s),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(f||!u&&!g&&a._start===Ct(T._time)&&tn(f)&&uE(pi(a))&&T.data!=="nested")&&(a._tTime=-lt,a.render(Math.max(0,-c)||0)),m&&pg(pi(a),m),a}var t=e.prototype;return t.render=function(r,s,o){var a=this._time,l=this._tDur,u=this._dur,c=r<0,f=r>l-lt&&!c?l:r<lt?0:r,h,d,g,_,m,p,T,x,v;if(!u)hE(this,r,s,o);else if(f!==this._tTime||!r||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c){if(h=f,x=this.timeline,this._repeat){if(_=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(_*100+r,s,o);if(h=Ct(f%_),f===l?(g=this._repeat,h=u):(g=~~(f/_),g&&g===Ct(f/_)&&(h=u,g--),h>u&&(h=u)),p=this._yoyo&&g&1,p&&(v=this._yEase,h=u-h),m=Is(this._tTime,_),h===a&&!o&&this._initted&&g===m)return this._tTime=f,this;g!==m&&(x&&this._yEase&&Cg(x,p),this.vars.repeatRefresh&&!p&&!this._lock&&this._time!==_&&this._initted&&(this._lock=o=1,this.render(Ct(_*g),!0).invalidate()._lock=0))}if(!this._initted){if(mg(this,c?r:h,o,s,f))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&g!==m))return this;if(u!==this._dur)return this.render(r,s,o)}if(this._tTime=f,this._time=h,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=T=(v||this._ease)(h/u),this._from&&(this.ratio=T=1-T),h&&!a&&!s&&!g&&(vn(this,"onStart"),this._tTime!==f))return this;for(d=this._pt;d;)d.r(T,d.d),d=d._next;x&&x.render(r<0?r:x._dur*x._ease(h/this._dur),s,o)||this._startAt&&(this._zTime=r),this._onUpdate&&!s&&(c&&uu(this,r,s,o),vn(this,"onUpdate")),this._repeat&&g!==m&&this.vars.onRepeat&&!s&&this.parent&&vn(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(c&&!this._onUpdate&&uu(this,r,!0,!0),(r||!u)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&er(this,1),!s&&!(c&&!a)&&(f||a||p)&&(vn(this,f===l?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),n.prototype.invalidate.call(this,r)},t.resetTo=function(r,s,o,a,l){Io||_n.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||Qf(this,u),c=this._ease(u/this._dur),DE(this,r,s,o,a,c,u,l)?this.resetTo(r,s,o,a,1):(wl(this,0),this.parent||hg(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(r,s){if(s===void 0&&(s="all"),!r&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?oo(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(r,s,Xi&&Xi.vars.overwrite!==!0)._first||oo(this),this.parent&&o!==this.timeline.totalDuration()&&Us(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=r?Cn(r):a,u=this._ptLookup,c=this._pt,f,h,d,g,_,m,p;if((!s||s==="all")&&lE(a,l))return s==="all"&&(this._pt=0),oo(this);for(f=this._op=this._op||[],s!=="all"&&(Lt(s)&&(_={},nn(s,function(T){return _[T]=1}),s=_),s=LE(a,s)),p=a.length;p--;)if(~l.indexOf(a[p])){h=u[p],s==="all"?(f[p]=s,g=h,d={}):(d=f[p]=f[p]||{},g=s);for(_ in g)m=h&&h[_],m&&((!("kill"in m.d)||m.d.kill(_)===!0)&&Tl(this,m,"_pt"),delete h[_]),d!=="all"&&(d[_]=1)}return this._initted&&!this._pt&&c&&oo(this),this},e.to=function(r,s){return new e(r,s,arguments[2])},e.from=function(r,s){return xo(1,arguments)},e.delayedCall=function(r,s,o,a){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(r,s,o){return xo(2,arguments)},e.set=function(r,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(r,s)},e.killTweensOf=function(r,s,o){return dt.killTweensOf(r,s,o)},e}(Uo);Ln(Et.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});nn("staggerTo,staggerFrom,staggerFromTo",function(n){Et[n]=function(){var e=new jt,t=hu.call(arguments,0);return t.splice(n==="staggerFromTo"?5:4,0,0),e[n].apply(e,t)}});var eh=function(e,t,i){return e[t]=i},Ng=function(e,t,i){return e[t](i)},UE=function(e,t,i,r){return e[t](r.fp,i)},NE=function(e,t,i){return e.setAttribute(t,i)},th=function(e,t){return gt(e[t])?Ng:Xf(e[t])&&e.setAttribute?NE:eh},Og=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},OE=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Fg=function(e,t){var i=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;i;)r=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+r,i=i._next;r+=t.c}t.set(t.t,t.p,r,t)},nh=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},FE=function(e,t,i,r){for(var s=this._pt,o;s;)o=s._next,s.p===r&&s.modifier(e,t,i),s=o},BE=function(e){for(var t=this._pt,i,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?Tl(this,t,"_pt"):t.dep||(i=1),t=r;return!i},kE=function(e,t,i,r){r.mSet(e,t,r.m.call(r.tween,i,r.mt),r)},Bg=function(e){for(var t=e._pt,i,r,s,o;t;){for(i=t._next,r=s;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:o)?t._prev._next=t:s=t,(t._next=r)?r._prev=t:o=t,t=i}e._pt=s},rn=function(){function n(t,i,r,s,o,a,l,u,c){this.t=i,this.s=s,this.c=o,this.p=r,this.r=a||Og,this.d=l||this,this.set=u||eh,this.pr=c||0,this._next=t,t&&(t._prev=this)}var e=n.prototype;return e.modifier=function(i,r,s){this.mSet=this.mSet||this.set,this.set=kE,this.m=i,this.mt=s,this.tween=r},n}();nn(Kf+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(n){return jf[n]=1});Sn.TweenMax=Sn.TweenLite=Et;Sn.TimelineLite=Sn.TimelineMax=jt;dt=new jt({sortChildren:!1,defaults:Ls,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});xn.stringFilter=Ag;var Or=[],Ua={},HE=[],Dd=0,zE=0,nc=function(e){return(Ua[e]||HE).map(function(t){return t()})},_u=function(){var e=Date.now(),t=[];e-Dd>2&&(nc("matchMediaInit"),Or.forEach(function(i){var r=i.queries,s=i.conditions,o,a,l,u;for(a in r)o=Yn.matchMedia(r[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,u=1);u&&(i.revert(),l&&t.push(i))}),nc("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(r){return i.add(null,r)})}),Dd=e,nc("matchMedia"))},kg=function(){function n(t,i){this.selector=i&&du(i),this.data=[],this._r=[],this.isReverted=!1,this.id=zE++,t&&this.add(t)}var e=n.prototype;return e.add=function(i,r,s){gt(i)&&(s=r,r=i,i=gt);var o=this,a=function(){var u=ft,c=o.selector,f;return u&&u!==o&&u.data.push(o),s&&(o.selector=du(s)),ft=o,f=r.apply(o,arguments),gt(f)&&o._r.push(f),ft=u,o.selector=c,o.isReverted=!1,f};return o.last=a,i===gt?a(o,function(l){return o.add(null,l)}):i?o[i]=a:a},e.ignore=function(i){var r=ft;ft=null,i(this),ft=r},e.getTweens=function(){var i=[];return this.data.forEach(function(r){return r instanceof n?i.push.apply(i,r.getTweens()):r instanceof Et&&!(r.parent&&r.parent.data==="nested")&&i.push(r)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,r){var s=this;if(i?function(){for(var a=s.getTweens(),l=s.data.length,u;l--;)u=s.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return a.splice(a.indexOf(c),1)}));for(a.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,f){return f.g-c.g||-1/0}).forEach(function(c){return c.t.revert(i)}),l=s.data.length;l--;)u=s.data[l],u instanceof jt?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof Et)&&u.revert&&u.revert(i);s._r.forEach(function(c){return c(i,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),r)for(var o=Or.length;o--;)Or[o].id===this.id&&Or.splice(o,1)},e.revert=function(i){this.kill(i||{})},n}(),VE=function(){function n(t){this.contexts=[],this.scope=t,ft&&ft.data.push(this)}var e=n.prototype;return e.add=function(i,r,s){ni(i)||(i={matches:i});var o=new kg(0,s||this.scope),a=o.conditions={},l,u,c;ft&&!o.selector&&(o.selector=ft.selector),this.contexts.push(o),r=o.add("onMatch",r),o.queries=i;for(u in i)u==="all"?c=1:(l=Yn.matchMedia(i[u]),l&&(Or.indexOf(o)<0&&Or.push(o),(a[u]=l.matches)&&(c=1),l.addListener?l.addListener(_u):l.addEventListener("change",_u)));return c&&r(o,function(f){return o.add(null,f)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(r){return r.kill(i,!0)})},n}(),ll={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(r){return Tg(r)})},timeline:function(e){return new jt(e)},getTweensOf:function(e,t){return dt.getTweensOf(e,t)},getProperty:function(e,t,i,r){Lt(e)&&(e=Cn(e)[0]);var s=Ir(e||{}).get,o=i?fg:ug;return i==="native"&&(i=""),e&&(t?o((dn[t]&&dn[t].get||s)(e,t,i,r)):function(a,l,u){return o((dn[a]&&dn[a].get||s)(e,a,l,u))})},quickSetter:function(e,t,i){if(e=Cn(e),e.length>1){var r=e.map(function(c){return an.quickSetter(c,t,i)}),s=r.length;return function(c){for(var f=s;f--;)r[f](c)}}e=e[0]||{};var o=dn[t],a=Ir(e),l=a.harness&&(a.harness.aliases||{})[t]||t,u=o?function(c){var f=new o;ds._pt=0,f.init(e,i?c+i:c,ds,0,[e]),f.render(1,f),ds._pt&&nh(1,ds)}:a.set(e,l);return o?u:function(c){return u(e,l,i?c+i:c,a,1)}},quickTo:function(e,t,i){var r,s=an.to(e,Br((r={},r[t]="+=0.1",r.paused=!0,r),i||{})),o=function(l,u,c){return s.resetTo(t,l,u,c)};return o.tween=s,o},isTweening:function(e){return dt.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Nr(e.ease,Ls.ease)),wd(Ls,e||{})},config:function(e){return wd(xn,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,r=e.plugins,s=e.defaults,o=e.extendTimeline;(r||"").split(",").forEach(function(a){return a&&!dn[a]&&!Sn[a]&&Po(t+" effect requires "+a+" plugin.")}),Jl[t]=function(a,l,u){return i(Cn(a),Ln(l||{},s),u)},o&&(jt.prototype[t]=function(a,l,u){return this.add(Jl[t](a,ni(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){Xe[e]=Nr(t)},parseEase:function(e,t){return arguments.length?Nr(e,t):Xe},getById:function(e){return dt.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new jt(e),r,s;for(i.smoothChildTiming=tn(e.smoothChildTiming),dt.remove(i),i._dp=0,i._time=i._tTime=dt._time,r=dt._first;r;)s=r._next,(t||!(!r._dur&&r instanceof Et&&r.vars.onComplete===r._targets[0]))&&jn(i,r,r._start-r._delay),r=s;return jn(dt,i,0),i},context:function(e,t){return e?new kg(e,t):ft},matchMedia:function(e){return new VE(e)},matchMediaRefresh:function(){return Or.forEach(function(e){var t=e.conditions,i,r;for(r in t)t[r]&&(t[r]=!1,i=1);i&&e.revert()})||_u()},addEventListener:function(e,t){var i=Ua[e]||(Ua[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=Ua[e],r=i&&i.indexOf(t);r>=0&&i.splice(r,1)},utils:{wrap:yE,wrapYoyo:SE,distribute:vg,random:yg,snap:xg,normalize:xE,getUnit:Bt,clamp:mE,splitColor:bg,toArray:Cn,selector:du,mapRange:Mg,pipe:gE,unitize:vE,interpolate:ME,shuffle:gg},install:sg,effects:Jl,ticker:_n,updateRoot:jt.updateRoot,plugins:dn,globalTimeline:dt,core:{PropTween:rn,globals:og,Tween:Et,Timeline:jt,Animation:Uo,getCache:Ir,_removeLinkedListItem:Tl,reverting:function(){return kt},context:function(e){return e&&ft&&(ft.data.push(e),e._ctx=ft),ft},suppressOverwrites:function(e){return Wf=e}}};nn("to,from,fromTo,delayedCall,set,killTweensOf",function(n){return ll[n]=Et[n]});_n.add(jt.updateRoot);ds=ll.to({},{duration:0});var GE=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},WE=function(e,t){var i=e._targets,r,s,o;for(r in t)for(s=i.length;s--;)o=e._ptLookup[s][r],o&&(o=o.d)&&(o._pt&&(o=GE(o,r)),o&&o.modifier&&o.modifier(t[r],e,i[s],r))},ic=function(e,t){return{name:e,rawVars:1,init:function(r,s,o){o._onInit=function(a){var l,u;if(Lt(s)&&(l={},nn(s,function(c){return l[c]=1}),s=l),t){l={};for(u in s)l[u]=t(s[u]);s=l}WE(a,s)}}}},an=ll.registerPlugin({name:"attr",init:function(e,t,i,r,s){var o,a,l;this.tween=i;for(o in t)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",t[o],r,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,t){for(var i=t._pt;i;)kt?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},ic("roundProps",pu),ic("modifiers"),ic("snap",xg))||ll;Et.version=jt.version=an.version="3.12.5";rg=1;qf()&&Ns();Xe.Power0;Xe.Power1;Xe.Power2;Xe.Power3;Xe.Power4;Xe.Linear;Xe.Quad;Xe.Cubic;Xe.Quart;Xe.Quint;Xe.Strong;Xe.Elastic;Xe.Back;Xe.SteppedEase;Xe.Bounce;Xe.Sine;Xe.Expo;Xe.Circ;/*! 28 * CSSPlugin 3.12.5 29 * https://gsap.com 30 * 31 * Copyright 2008-2024, GreenSock. All rights reserved. 32 * Subject to the terms at https://gsap.com/standard-license or for 33 * Club GSAP members, the agreement issued with that membership. 34 * @author: Jack Doyle, [email protected] 35*/var Ld,qi,Ts,ih,Ar,Id,rh,XE=function(){return typeof window<"u"},bi={},Mr=180/Math.PI,bs=Math.PI/180,qr=Math.atan2,Ud=1e8,sh=/([A-Z])/g,qE=/(left|right|width|margin|padding|x)/i,YE=/[\s,\(]\S/,Kn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},gu=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},$E=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},jE=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},KE=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},Hg=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},zg=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},ZE=function(e,t,i){return e.style[t]=i},JE=function(e,t,i){return e.style.setProperty(t,i)},QE=function(e,t,i){return e._gsap[t]=i},eT=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},tT=function(e,t,i,r,s){var o=e._gsap;o.scaleX=o.scaleY=i,o.renderTransform(s,o)},nT=function(e,t,i,r,s){var o=e._gsap;o[t]=i,o.renderTransform(s,o)},pt="transform",sn=pt+"Origin",iT=function n(e,t){var i=this,r=this.target,s=r.style,o=r._gsap;if(e in bi&&s){if(this.tfm=this.tfm||{},e!=="transform")e=Kn[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return i.tfm[a]=mi(r,a)}):this.tfm[e]=o.x?o[e]:mi(r,e),e===sn&&(this.tfm.zOrigin=o.zOrigin);else return Kn.transform.split(",").forEach(function(a){return n.call(i,a,t)});if(this.props.indexOf(pt)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(sn,t,"")),e=pt}(s||t)&&this.props.push(e,t,s[e])},Vg=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},rT=function(){var e=this.props,t=this.target,i=t.style,r=t._gsap,s,o;for(s=0;s<e.length;s+=3)e[s+1]?t[e[s]]=e[s+2]:e[s+2]?i[e[s]]=e[s+2]:i.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(sh,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)r[o]=this.tfm[o];r.svg&&(r.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),s=rh(),(!s||!s.isStart)&&!i[pt]&&(Vg(i),r.zOrigin&&i[sn]&&(i[sn]+=" "+r.zOrigin+"px",r.zOrigin=0,r.renderTransform()),r.uncache=1)}},Gg=function(e,t){var i={target:e,props:[],revert:rT,save:iT};return e._gsap||an.core.getCache(e),t&&t.split(",").forEach(function(r){return i.save(r)}),i},Wg,vu=function(e,t){var i=qi.createElementNS?qi.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):qi.createElement(e);return i&&i.style?i:qi.createElement(e)},Jn=function n(e,t,i){var r=getComputedStyle(e);return r[t]||r.getPropertyValue(t.replace(sh,"-$1").toLowerCase())||r.getPropertyValue(t)||!i&&n(e,Os(t)||t,1)||""},Nd="O,Moz,ms,Ms,Webkit".split(","),Os=function(e,t,i){var r=t||Ar,s=r.style,o=5;if(e in s&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(Nd[o]+e in s););return o<0?null:(o===3?"ms":o>=0?Nd[o]:"")+e},xu=function(){XE()&&window.document&&(Ld=window,qi=Ld.document,Ts=qi.documentElement,Ar=vu("div")||{style:{}},vu("div"),pt=Os(pt),sn=pt+"Origin",Ar.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Wg=!!Os("perspective"),rh=an.core.reverting,ih=1)},rc=function n(e){var t=vu("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,r=this.nextSibling,s=this.style.cssText,o;if(Ts.appendChild(t),t.appendChild(this),this.style.display="block",e)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=n}catch{}else this._gsapBBox&&(o=this._gsapBBox());return i&&(r?i.insertBefore(this,r):i.appendChild(this)),Ts.removeChild(t),this.style.cssText=s,o},Od=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},Xg=function(e){var t;try{t=e.getBBox()}catch{t=rc.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===rc||(t=rc.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+Od(e,["x","cx","x1"])||0,y:+Od(e,["y","cy","y1"])||0,width:0,height:0}:t},qg=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Xg(e))},kr=function(e,t){if(t){var i=e.style,r;t in bi&&t!==sn&&(t=pt),i.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(r==="--"?t:t.replace(sh,"-$1").toLowerCase())):i.removeAttribute(t)}},Yi=function(e,t,i,r,s,o){var a=new rn(e._pt,t,i,0,1,o?zg:Hg);return e._pt=a,a.b=r,a.e=s,e._props.push(i),a},Fd={deg:1,rad:1,turn:1},sT={grid:1,flex:1},tr=function n(e,t,i,r){var s=parseFloat(i)||0,o=(i+"").trim().substr((s+"").length)||"px",a=Ar.style,l=qE.test(t),u=e.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),f=100,h=r==="px",d=r==="%",g,_,m,p;if(r===o||!s||Fd[r]||Fd[o])return s;if(o!=="px"&&!h&&(s=n(e,t,i,"px")),p=e.getCTM&&qg(e),(d||o==="%")&&(bi[t]||~t.indexOf("adius")))return g=p?e.getBBox()[l?"width":"height"]:e[c],xt(d?s/g*f:s/100*g);if(a[l?"width":"height"]=f+(h?o:r),_=~t.indexOf("adius")||r==="em"&&e.appendChild&&!u?e:e.parentNode,p&&(_=(e.ownerSVGElement||{}).parentNode),(!_||_===qi||!_.appendChild)&&(_=qi.body),m=_._gsap,m&&d&&m.width&&l&&m.time===_n.time&&!m.uncache)return xt(s/m.width*f);if(d&&(t==="height"||t==="width")){var T=e.style[t];e.style[t]=f+r,g=e[c],T?e.style[t]=T:kr(e,t)}else(d||o==="%")&&!sT[Jn(_,"display")]&&(a.position=Jn(e,"position")),_===e&&(a.position="static"),_.appendChild(Ar),g=Ar[c],_.removeChild(Ar),a.position="absolute";return l&&d&&(m=Ir(_),m.time=_n.time,m.width=_[c]),xt(h?g*s/f:g&&s?f/g*s:0)},mi=function(e,t,i,r){var s;return ih||xu(),t in Kn&&t!=="transform"&&(t=Kn[t],~t.indexOf(",")&&(t=t.split(",")[0])),bi[t]&&t!=="transform"?(s=Oo(e,r),s=t!=="transformOrigin"?s[t]:s.svg?s.origin:ul(Jn(e,sn))+" "+s.zOrigin+"px"):(s=e.style[t],(!s||s==="auto"||r||~(s+"").indexOf("calc("))&&(s=cl[t]&&cl[t](e,t,i)||Jn(e,t)||lg(e,t)||(t==="opacity"?1:0))),i&&!~(s+"").trim().indexOf(" ")?tr(e,t,s,i)+i:s},oT=function(e,t,i,r){if(!i||i==="none"){var s=Os(t,e,1),o=s&&Jn(e,s,1);o&&o!==i?(t=s,i=o):t==="borderColor"&&(i=Jn(e,"borderTopColor"))}var a=new rn(this._pt,e.style,t,0,1,Fg),l=0,u=0,c,f,h,d,g,_,m,p,T,x,v,A;if(a.b=i,a.e=r,i+="",r+="",r==="auto"&&(_=e.style[t],e.style[t]=r,r=Jn(e,t)||r,_?e.style[t]=_:kr(e,t)),c=[i,r],Ag(c),i=c[0],r=c[1],h=i.match(hs)||[],A=r.match(hs)||[],A.length){for(;f=hs.exec(r);)m=f[0],T=r.substring(l,f.index),g?g=(g+1)%5:(T.substr(-5)==="rgba("||T.substr(-5)==="hsla(")&&(g=1),m!==(_=h[u++]||"")&&(d=parseFloat(_)||0,v=_.substr((d+"").length),m.charAt(1)==="="&&(m=Es(d,m)+v),p=parseFloat(m),x=m.substr((p+"").length),l=hs.lastIndex-x.length,x||(x=x||xn.units[t]||v,l===r.length&&(r+=x,a.e+=x)),v!==x&&(d=tr(e,t,_,x)||0),a._pt={_next:a._pt,p:T||u===1?T:",",s:d,c:p-d,m:g&&g<4||t==="zIndex"?Math.round:0});a.c=l<r.length?r.substring(l,r.length):""}else a.r=t==="display"&&r==="none"?zg:Hg;return ng.test(r)&&(a.e=0),this._pt=a,a},Bd={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},aT=function(e){var t=e.split(" "),i=t[0],r=t[1]||"50%";return(i==="top"||i==="bottom"||r==="left"||r==="right")&&(e=i,i=r,r=e),t[0]=Bd[i]||i,t[1]=Bd[r]||r,t.join(" ")},lT=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,r=i.style,s=t.u,o=i._gsap,a,l,u;if(s==="all"||s===!0)r.cssText="",l=1;else for(s=s.split(","),u=s.length;--u>-1;)a=s[u],bi[a]&&(l=1,a=a==="transformOrigin"?sn:pt),kr(i,a);l&&(kr(i,pt),o&&(o.svg&&i.removeAttribute("transform"),Oo(i,1),o.uncache=1,Vg(r)))}},cl={clearProps:function(e,t,i,r,s){if(s.data!=="isFromStart"){var o=e._pt=new rn(e._pt,t,i,0,0,lT);return o.u=r,o.pr=-10,o.tween=s,e._props.push(i),1}}},No=[1,0,0,1,0,0],Yg={},$g=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},kd=function(e){var t=Jn(e,pt);return $g(t)?No:t.substr(7).match(tg).map(xt)},oh=function(e,t){var i=e._gsap||Ir(e),r=e.style,s=kd(e),o,a,l,u;return i.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?No:s):(s===No&&!e.offsetParent&&e!==Ts&&!i.svg&&(l=r.display,r.display="block",o=e.parentNode,(!o||!e.offsetParent)&&(u=1,a=e.nextElementSibling,Ts.appendChild(e)),s=kd(e),l?r.display=l:kr(e,"display"),u&&(a?o.insertBefore(e,a):o?o.appendChild(e):Ts.removeChild(e))),t&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},yu=function(e,t,i,r,s,o){var a=e._gsap,l=s||oh(e,!0),u=a.xOrigin||0,c=a.yOrigin||0,f=a.xOffset||0,h=a.yOffset||0,d=l[0],g=l[1],_=l[2],m=l[3],p=l[4],T=l[5],x=t.split(" "),v=parseFloat(x[0])||0,A=parseFloat(x[1])||0,w,C,P,S;i?l!==No&&(C=d*m-g*_)&&(P=v*(m/C)+A*(-_/C)+(_*T-m*p)/C,S=v*(-g/C)+A*(d/C)-(d*T-g*p)/C,v=P,A=S):(w=Xg(e),v=w.x+(~x[0].indexOf("%")?v/100*w.width:v),A=w.y+(~(x[1]||x[0]).indexOf("%")?A/100*w.height:A)),r||r!==!1&&a.smooth?(p=v-u,T=A-c,a.xOffset=f+(p*d+T*_)-p,a.yOffset=h+(p*g+T*m)-T):a.xOffset=a.yOffset=0,a.xOrigin=v,a.yOrigin=A,a.smooth=!!r,a.origin=t,a.originIsAbsolute=!!i,e.style[sn]="0px 0px",o&&(Yi(o,a,"xOrigin",u,v),Yi(o,a,"yOrigin",c,A),Yi(o,a,"xOffset",f,a.xOffset),Yi(o,a,"yOffset",h,a.yOffset)),e.setAttribute("data-svg-origin",v+" "+A)},Oo=function(e,t){var i=e._gsap||new Dg(e);if("x"in i&&!t&&!i.uncache)return i;var r=e.style,s=i.scaleX<0,o="px",a="deg",l=getComputedStyle(e),u=Jn(e,sn)||"0",c,f,h,d,g,_,m,p,T,x,v,A,w,C,P,S,M,I,z,O,X,J,D,V,U,se,fe,pe,Ee,Ge,te,le;return c=f=h=_=m=p=T=x=v=0,d=g=1,i.svg=!!(e.getCTM&&qg(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(r[pt]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[pt]!=="none"?l[pt]:"")),r.scale=r.rotate=r.translate="none"),C=oh(e,i.svg),i.svg&&(i.uncache?(U=e.getBBox(),u=i.xOrigin-U.x+"px "+(i.yOrigin-U.y)+"px",V=""):V=!t&&e.getAttribute("data-svg-origin"),yu(e,V||u,!!V||i.originIsAbsolute,i.smooth!==!1,C)),A=i.xOrigin||0,w=i.yOrigin||0,C!==No&&(I=C[0],z=C[1],O=C[2],X=C[3],c=J=C[4],f=D=C[5],C.length===6?(d=Math.sqrt(I*I+z*z),g=Math.sqrt(X*X+O*O),_=I||z?qr(z,I)*Mr:0,T=O||X?qr(O,X)*Mr+_:0,T&&(g*=Math.abs(Math.cos(T*bs))),i.svg&&(c-=A-(A*I+w*O),f-=w-(A*z+w*X))):(le=C[6],Ge=C[7],fe=C[8],pe=C[9],Ee=C[10],te=C[11],c=C[12],f=C[13],h=C[14],P=qr(le,Ee),m=P*Mr,P&&(S=Math.cos(-P),M=Math.sin(-P),V=J*S+fe*M,U=D*S+pe*M,se=le*S+Ee*M,fe=J*-M+fe*S,pe=D*-M+pe*S,Ee=le*-M+Ee*S,te=Ge*-M+te*S,J=V,D=U,le=se),P=qr(-O,Ee),p=P*Mr,P&&(S=Math.cos(-P),M=Math.sin(-P),V=I*S-fe*M,U=z*S-pe*M,se=O*S-Ee*M,te=X*M+te*S,I=V,z=U,O=se),P=qr(z,I),_=P*Mr,P&&(S=Math.cos(P),M=Math.sin(P),V=I*S+z*M,U=J*S+D*M,z=z*S-I*M,D=D*S-J*M,I=V,J=U),m&&Math.abs(m)+Math.abs(_)>359.9&&(m=_=0,p=180-p),d=xt(Math.sqrt(I*I+z*z+O*O)),g=xt(Math.sqrt(D*D+le*le)),P=qr(J,D),T=Math.abs(P)>2e-4?P*Mr:0,v=te?1/(te<0?-te:te):0),i.svg&&(V=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!$g(Jn(e,pt)),V&&e.setAttribute("transform",V))),Math.abs(T)>90&&Math.abs(T)<270&&(s?(d*=-1,T+=_<=0?180:-180,_+=_<=0?180:-180):(g*=-1,T+=T<=0?180:-180)),t=t||i.uncache,i.x=c-((i.xPercent=c&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-c)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+o,i.y=f-((i.yPercent=f&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-f)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+o,i.z=h+o,i.scaleX=xt(d),i.scaleY=xt(g),i.rotation=xt(_)+a,i.rotationX=xt(m)+a,i.rotationY=xt(p)+a,i.skewX=T+a,i.skewY=x+a,i.transformPerspective=v+o,(i.zOrigin=parseFloat(u.split(" ")[2])||!t&&i.zOrigin||0)&&(r[sn]=ul(u)),i.xOffset=i.yOffset=0,i.force3D=xn.force3D,i.renderTransform=i.svg?uT:Wg?jg:cT,i.uncache=0,i},ul=function(e){return(e=e.split(" "))[0]+" "+e[1]},sc=function(e,t,i){var r=Bt(t);return xt(parseFloat(t)+parseFloat(tr(e,"x",i+"px",r)))+r},cT=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,jg(e,t)},hr="0deg",Qs="0px",dr=") ",jg=function(e,t){var i=t||this,r=i.xPercent,s=i.yPercent,o=i.x,a=i.y,l=i.z,u=i.rotation,c=i.rotationY,f=i.rotationX,h=i.skewX,d=i.skewY,g=i.scaleX,_=i.scaleY,m=i.transformPerspective,p=i.force3D,T=i.target,x=i.zOrigin,v="",A=p==="auto"&&e&&e!==1||p===!0;if(x&&(f!==hr||c!==hr)){var w=parseFloat(c)*bs,C=Math.sin(w),P=Math.cos(w),S;w=parseFloat(f)*bs,S=Math.cos(w),o=sc(T,o,C*S*-x),a=sc(T,a,-Math.sin(w)*-x),l=sc(T,l,P*S*-x+x)}m!==Qs&&(v+="perspective("+m+dr),(r||s)&&(v+="translate("+r+"%, "+s+"%) "),(A||o!==Qs||a!==Qs||l!==Qs)&&(v+=l!==Qs||A?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+dr),u!==hr&&(v+="rotate("+u+dr),c!==hr&&(v+="rotateY("+c+dr),f!==hr&&(v+="rotateX("+f+dr),(h!==hr||d!==hr)&&(v+="skew("+h+", "+d+dr),(g!==1||_!==1)&&(v+="scale("+g+", "+_+dr),T.style[pt]=v||"translate(0, 0)"},uT=function(e,t){var i=t||this,r=i.xPercent,s=i.yPercent,o=i.x,a=i.y,l=i.rotation,u=i.skewX,c=i.skewY,f=i.scaleX,h=i.scaleY,d=i.target,g=i.xOrigin,_=i.yOrigin,m=i.xOffset,p=i.yOffset,T=i.forceCSS,x=parseFloat(o),v=parseFloat(a),A,w,C,P,S;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=bs,u*=bs,A=Math.cos(l)*f,w=Math.sin(l)*f,C=Math.sin(l-u)*-h,P=Math.cos(l-u)*h,u&&(c*=bs,S=Math.tan(u-c),S=Math.sqrt(1+S*S),C*=S,P*=S,c&&(S=Math.tan(c),S=Math.sqrt(1+S*S),A*=S,w*=S)),A=xt(A),w=xt(w),C=xt(C),P=xt(P)):(A=f,P=h,w=C=0),(x&&!~(o+"").indexOf("px")||v&&!~(a+"").indexOf("px"))&&(x=tr(d,"x",o,"px"),v=tr(d,"y",a,"px")),(g||_||m||p)&&(x=xt(x+g-(g*A+_*C)+m),v=xt(v+_-(g*w+_*P)+p)),(r||s)&&(S=d.getBBox(),x=xt(x+r/100*S.width),v=xt(v+s/100*S.height)),S="matrix("+A+","+w+","+C+","+P+","+x+","+v+")",d.setAttribute("transform",S),T&&(d.style[pt]=S)},fT=function(e,t,i,r,s){var o=360,a=Lt(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?Mr:1),u=l-r,c=r+u+"deg",f,h;return a&&(f=s.split("_")[1],f==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-o)),f==="cw"&&u<0?u=(u+o*Ud)%o-~~(u/o)*o:f==="ccw"&&u>0&&(u=(u-o*Ud)%o-~~(u/o)*o)),e._pt=h=new rn(e._pt,t,i,r,u,$E),h.e=c,h.u="deg",e._props.push(i),h},Hd=function(e,t){for(var i in t)e[i]=t[i];return e},hT=function(e,t,i){var r=Hd({},i._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=i.style,a,l,u,c,f,h,d,g;r.svg?(u=i.getAttribute("transform"),i.setAttribute("transform",""),o[pt]=t,a=Oo(i,1),kr(i,pt),i.setAttribute("transform",u)):(u=getComputedStyle(i)[pt],o[pt]=t,a=Oo(i,1),o[pt]=u);for(l in bi)u=r[l],c=a[l],u!==c&&s.indexOf(l)<0&&(d=Bt(u),g=Bt(c),f=d!==g?tr(i,l,u,g):parseFloat(u),h=parseFloat(c),e._pt=new rn(e._pt,a,l,f,h-f,gu),e._pt.u=g||0,e._props.push(l));Hd(a,r)};nn("padding,margin,Width,Radius",function(n,e){var t="Top",i="Right",r="Bottom",s="Left",o=(e<3?[t,i,r,s]:[t+s,t+i,r+i,r+s]
vendor: 6,319 bytes, lines 35-39
35).map(function(a){return e<2?n+a:"border"+a+n});cl[e>1?"border"+n:n]=function(a,l,u,c,f){var h,d;if(arguments.length<4)return h=o.map(function(g){return mi(a,g,u)}),d=h.join(" "),d.split(h[0]).length===5?h[0]:d;h=(c+"").split(" "),d={},o.forEach(function(g,_){return d[g]=h[_]=h[_]||h[(_-1)/2|0]}),a.init(l,d,f)}});var Kg={name:"css",register:xu,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,r,s){var o=this._props,a=e.style,l=i.vars.startAt,u,c,f,h,d,g,_,m,p,T,x,v,A,w,C,P;ih||xu(),this.styles=this.styles||Gg(e),P=this.styles.props,this.tween=i;for(_ in t)if(_!=="autoRound"&&(c=t[_],!(dn[_]&&Lg(_,t,i,r,e,s)))){if(d=typeof c,g=cl[_],d==="function"&&(c=c.call(i,r,e,s),d=typeof c),d==="string"&&~c.indexOf("random(")&&(c=Lo(c)),g)g(this,e,_,c,i)&&(C=1);else if(_.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(_)+"").trim(),c+="",Ki.lastIndex=0,Ki.test(u)||(m=Bt(u),p=Bt(c)),p?m!==p&&(u=tr(e,_,u,p)+p):m&&(c+=m),this.add(a,"setProperty",u,c,r,s,0,0,_),o.push(_),P.push(_,0,a[_]);else if(d!=="undefined"){if(l&&_ in l?(u=typeof l[_]=="function"?l[_].call(i,r,e,s):l[_],Lt(u)&&~u.indexOf("random(")&&(u=Lo(u)),Bt(u+"")||u==="auto"||(u+=xn.units[_]||Bt(mi(e,_))||""),(u+"").charAt(1)==="="&&(u=mi(e,_))):u=mi(e,_),h=parseFloat(u),T=d==="string"&&c.charAt(1)==="="&&c.substr(0,2),T&&(c=c.substr(2)),f=parseFloat(c),_ in Kn&&(_==="autoAlpha"&&(h===1&&mi(e,"visibility")==="hidden"&&f&&(h=0),P.push("visibility",0,a.visibility),Yi(this,a,"visibility",h?"inherit":"hidden",f?"inherit":"hidden",!f)),_!=="scale"&&_!=="transform"&&(_=Kn[_],~_.indexOf(",")&&(_=_.split(",")[0]))),x=_ in bi,x){if(this.styles.save(_),v||(A=e._gsap,A.renderTransform&&!t.parseTransform||Oo(e,t.parseTransform),w=t.smoothOrigin!==!1&&A.smooth,v=this._pt=new rn(this._pt,a,pt,0,1,A.renderTransform,A,0,-1),v.dep=1),_==="scale")this._pt=new rn(this._pt,A,"scaleY",A.scaleY,(T?Es(A.scaleY,T+f):f)-A.scaleY||0,gu),this._pt.u=0,o.push("scaleY",_),_+="X";else if(_==="transformOrigin"){P.push(sn,0,a[sn]),c=aT(c),A.svg?yu(e,c,0,w,0,this):(p=parseFloat(c.split(" ")[2])||0,p!==A.zOrigin&&Yi(this,A,"zOrigin",A.zOrigin,p),Yi(this,a,_,ul(u),ul(c)));continue}else if(_==="svgOrigin"){yu(e,c,1,w,0,this);continue}else if(_ in Yg){fT(this,A,_,h,T?Es(h,T+c):c);continue}else if(_==="smoothOrigin"){Yi(this,A,"smooth",A.smooth,c);continue}else if(_==="force3D"){A[_]=c;continue}else if(_==="transform"){hT(this,c,e);continue}}else _ in a||(_=Os(_)||_);if(x||(f||f===0)&&(h||h===0)&&!YE.test(c)&&_ in a)m=(u+"").substr((h+"").length),f||(f=0),p=Bt(c)||(_ in xn.units?xn.units[_]:m),m!==p&&(h=tr(e,_,u,p)),this._pt=new rn(this._pt,x?A:a,_,h,(T?Es(h,T+f):f)-h,!x&&(p==="px"||_==="zIndex")&&t.autoRound!==!1?KE:gu),this._pt.u=p||0,m!==p&&p!=="%"&&(this._pt.b=u,this._pt.r=jE);else if(_ in a)oT.call(this,e,_,u,T?T+c:c);else if(_ in e)this.add(e,_,u||e[_],T?T+c:c,r,s);else if(_!=="parseTransform"){$f(_,c);continue}x||(_ in a?P.push(_,0,a[_]):P.push(_,1,u||e[_])),o.push(_)}}C&&Bg(this)},render:function(e,t){if(t.tween._time||!rh())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:mi,aliases:Kn,getSetter:function(e,t,i){var r=Kn[t];return r&&r.indexOf(",")<0&&(t=r),t in bi&&t!==sn&&(e._gsap.x||mi(e,"x"))?i&&Id===i?t==="scale"?eT:QE:(Id=i||{})&&(t==="scale"?tT:nT):e.style&&!Xf(e.style[t])?ZE:~t.indexOf("-")?JE:th(e,t)},core:{_removeProperty:kr,_getMatrix:oh}};an.utils.checkPrefix=Os;an.core.getStyleSaver=Gg;(function(n,e,t,i){var r=nn(n+","+e+","+t,function(s){bi[s]=1});nn(e,function(s){xn.units[s]="deg",Yg[s]=1}),Kn[r[13]]=n+","+e,nn(i,function(s){var o=s.split(":");Kn[o[1]]=r[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");nn("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(n){xn.units[n]="px"});an.registerPlugin(Kg);var Na=an.registerPlugin(Kg)||an;Na.core.Tween;/** 36 * @license 37 * Copyright 2010-2024 Three.js Authors 38 * SPDX-License-Identifier: MIT 39 */const ah="170",dT=0,zd=1,pT=2,Zg=1,mT=2,hi=3,nr=0,on=1,gi=2,Si=0,ws=1,Vd=2,Gd=3,Wd=4,_T=5,br=100,gT=101,vT=102,xT=103,yT=104,ST=200,MT=201,ET=202,TT=203,Su=204,Mu=205,bT=206,wT=207,AT=208,RT=209,CT=210,PT=211,DT=212,LT=213,IT=214,Eu=0,Tu=1,bu=2,Fs=3,wu=4,Au=5,Ru=6,Cu=7,Jg=0,UT=1,NT=2,Zi=0,OT=1,FT=2,BT=3,kT=4,HT=5,zT=6,VT=7,Qg=300,Bs=301,ks=302,Pu=303,Du=304,Al=306,Lu=1e3,Rr=1001,Iu=1002,Gn=1003,GT=1004,ra=1005,en=1006,oc=1007,Cr=1008,wi=1009,e0=1010,t0=1011,Fo=1012,lh=1013,Hr=1014,xi=1015,Xs=1016,ch=1017,uh=1018,Hs=1020,n0=35902,i0=1021,r0=1022,kn=1023,s0=1024,o0=1025,As=1026,zs=1027,a0=1028,fh=1029,l0=1030,hh=1031,dh=1033,Oa=33776,Fa=33777,Ba=33778,ka=33779,Uu=35840,Nu=35841,Ou=35842,Fu=35843,Bu=36196,ku=37492,Hu=37496,zu=37808,Vu=37809,Gu=37810,Wu=37811,Xu=37812,qu=37813,Yu=37814,$u=37815,ju=37816,Ku=37817,Zu=37818,Ju=37819,Qu=37820,ef=37821,Ha=36492,tf=36494,nf=36495,c0=36283,rf=36284,sf=36285,of=36286,WT=3200,XT=3201,qT=0,YT=1,Wi="",pn="srgb",qs="srgb-linear",Rl="linear",nt="srgb",Yr=7680,Xd=519,$T=512,jT=513,KT=514,u0=515,ZT=516,JT=517,QT=518,eb=519,qd=35044,Yd="300 es",yi=2e3,fl=2001;class Ys{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){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 Nt=["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
395","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"];let $d=1234567;const So=Math.PI/180,Bo=180/Math.PI;function $s(){const n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Nt[n&255]+Nt[n>>8&255]+Nt[n>>16&255]+Nt[n>>24&255]+"-"+Nt[e&255]+Nt[e>>8&255]+"-"+Nt[e>>16&15|64]+Nt[e>>24&255]+"-"+Nt[t&63|128]+Nt[t>>8&255]+"-"+Nt[t>>16&255]+Nt[t>>24&255]+Nt[i&255]+Nt[i>>8&255]+Nt[i>>16&255]+Nt[i>>24&255]).toLowerCase()}function $t(n,e,t){return Math.max(e,Math.min(t,n))}function ph(n,e){return(n%e+e)%e}function tb(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function nb(n,e,t){return n!==e?(t-n)/(e-n):0}function Mo(n,e,t){return(1-t)*n+t*e}function ib(n,e,t,i){return Mo(n,e,1-Math.exp(-t*i))}function rb(n,e=1){return e-Math.abs(ph(n,e*2)-e)}function sb(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function ob(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function ab(n,e){return n+Math.floor(Math.random()*(e-n+1))}function lb(n,e){return n+Math.random()*(e-n)}function cb(n){return n*(.5-Math.random())}function ub(n){n!==void 0&&($d=n);let e=$d+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function fb(n){return n*So}function hb(n){return n*Bo}function db(n){return(n&n-1)===0&&n!==0}function pb(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function mb(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function _b(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),u=s((e+i)/2),c=o((e+i)/2),f=s((e-i)/2),h=o((e-i)/2),d=s((i-e)/2),g=o((i-e)/2);switch(r){case"XYX":n.set(a*c,l*f,l*h,a*u);break;case"YZY":n.set(l*h,a*c,l*f,a*u);break;case"ZXZ":n.set(l*f,l*h,a*c,a*u);break;case"XZX":n.set(a*c,l*g,l*d,a*u);break;case"YXY":n.set(l*d,a*c,l*g,a*u);break;case"ZYZ":n.set(l*g,l*d,a*c,a*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function cs(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 Gt(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const jd={DEG2RAD:So,RAD2DEG:Bo,generateUUID:$s,clamp:$t,euclideanModulo:ph,mapLinear:tb,inverseLerp:nb,lerp:Mo,damp:ib,pingpong:rb,smoothstep:sb,smootherstep:ob,randInt:ab,randFloat:lb,randFloatSpread:cb,seededRandom:ub,degToRad:fb,radToDeg:hb,isPowerOfTwo:db,ceilPowerOfTwo:pb,floorPowerOfTwo:mb,setQuaternionFromProperEuler:_b,normalize:Gt,denormalize:cs};class Je{constructor(e=0,t=0){Je.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}
vendor: 7,693 bytes, line 39
39sub(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=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos($t(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 ze{constructor(e,t,i,r,s,o,a,l,u){ze.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,l,u)}set(e,t,i,r,s,o,a,l,u){const c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=s,c[5]=l,c[6]=i,c[7]=o,c[8]=u,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],u=i[1],c=i[4],f=i[7],h=i[2],d=i[5],g=i[8],_=r[0],m=r[3],p=r[6],T=r[1],x=r[4],v=r[7],A=r[2],w=r[5],C=r[8];return s[0]=o*_+a*T+l*A,s[3]=o*m+a*x+l*w,s[6]=o*p+a*v+l*C,s[1]=u*_+c*T+f*A,s[4]=u*m+c*x+f*w,s[7]=u*p+c*v+f*C,s[2]=h*_+d*T+g*A,s[5]=h*m+d*x+g*w,s[8]=h*p+d*v+g*C,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],u=e[7],c=e[8];return t*o*c-t*a*u-i*s*c+i*a*l+r*s*u-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],u=e[7],c=e[8],f=c*o-a*u,h=a*l-c*s,d=u*s-o*l,g=t*f+i*h+r*d;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/g;return e[0]=f*_,e[1]=(r*u-c*i)*_,e[2]=(a*i-r*o)*_,e[3]=h*_,e[4]=(c*t-r*l)*_,e[5]=(r*s-a*t)*_,e[6]=d*_,e[7]=(i*l-u*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),u=Math.sin(s);return this.set(i*l,i*u,-i*(l*o+u*a)+o+e,-r*u,r*l,-r*(-u*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(ac.makeScale(e,t)),this}rotate(e){return this.premultiply(ac.makeRotation(-e)),this}translate(e,t){return this.premultiply(ac.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 ac=new ze;function f0(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function hl(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function gb(){const n=hl("canvas");return n.style.display="block",n}const Kd={};function lo(n){n in Kd||(Kd[n]=!0,console.warn(n))}function vb(n,e,t){return new Promise(function(i,r){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()}}setTimeout(s,t)})}function xb(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]}function yb(n){const e=n.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const qe={enabled:!0,workingColorSpace:qs,spaces:{},convert:function(n,e,t){return this.enabled===!1||e===t||!e||!t||(this.spaces[e].transfer===nt&&(n.r=Mi(n.r),n.g=Mi(n.g),n.b=Mi(n.b)),this.spaces[e].primaries!==this.spaces[t].primaries&&(n.applyMatrix3(this.spaces[e].toXYZ),n.applyMatrix3(this.spaces[t].fromXYZ)),this.spaces[t].transfer===nt&&(n.r=Rs(n.r),n.g=Rs(n.g),n.b=Rs(n.b))),n},fromWorkingColorSpace:function(n,e){return this.convert(n,this.workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this.workingColorSpace)},getPrimaries:function(n){return this.spaces[n].primaries},getTransfer:function(n){return n===Wi?Rl:this.spaces[n].transfer},getLuminanceCoefficients:function(n,e=this.workingColorSpace){return n.fromArray(this.spaces[e].luminanceCoefficients)},define:function(n){Object.assign(this.spaces,n)},_getMatrix:function(n,e,t){return n.copy(this.spaces[e].toXYZ).multiply(this.spaces[t].fromXYZ)},_getDrawingBufferColorSpace:function(n){return this.spaces[n].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(n=this.workingColorSpace){return this.spaces[n].workingColorSpaceConfig.unpackColorSpace}};function Mi(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}
vendor: 4,610 bytes, line 39
39function Rs(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}const Zd=[.64,.33,.3,.6,.15,.06],Jd=[.2126,.7152,.0722],Qd=[.3127,.329],ep=new ze().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),tp=new ze().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);qe.define({[qs]:{primaries:Zd,whitePoint:Qd,transfer:Rl,toXYZ:ep,fromXYZ:tp,luminanceCoefficients:Jd,workingColorSpaceConfig:{unpackColorSpace:pn},outputColorSpaceConfig:{drawingBufferColorSpace:pn}},[pn]:{primaries:Zd,whitePoint:Qd,transfer:nt,toXYZ:ep,fromXYZ:tp,luminanceCoefficients:Jd,outputColorSpaceConfig:{drawingBufferColorSpace:pn}}});let $r;class Sb{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{$r===void 0&&($r=hl("canvas")),$r.width=e.width,$r.height=e.height;const i=$r.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=$r}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=hl("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]=Mi(s[o]/255)*255;return i.putImageData(r,0,0),t}else if(e.data){const t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(Mi(t[i]/255)*255):t[i]=Mi(t[i]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let Mb=0;class h0{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Mb++}),this.uuid=$s(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let s;if(Array.isArray(r)){s=[];for(let o=0,a=r.length;o<a;o++)r[o].isDataTexture?s.push(lc(r[o].image)):s.push(lc(r[o]))}else s=lc(r);i.url=s}return t||(e.images[this.uuid]=i),i}}function lc(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?Sb.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 Eb=0;class Kt extends Ys{constructor(e=Kt.DEFAULT_IMAGE,t=Kt.DEFAULT_MAPPING,i=Rr,r=Rr,s=en,o=Cr,a=kn,l=wi,u=Kt.DEFAULT_ANISOTROPY,c=Wi){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Eb++}),this.uuid=$s(),this.name="",this.source=new h0(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=s,this.minFilter=o,this.anisotropy=u,this.format=a,this.internalFormat=null,this.type=l,this.offset=new Je(0,0),this.repeat=new Je(1,1),this.center=new Je(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ze,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=c,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(e=null){this.source.data=e}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(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace
vendor: 19,270 bytes, line 39
39=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).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&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Qg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Lu:e.x=e.x-Math.floor(e.x);break;case Rr:e.x=e.x<0?0:1;break;case Iu:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Lu:e.y=e.y-Math.floor(e.y);break;case Rr:e.y=e.y<0?0:1;break;case Iu:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Kt.DEFAULT_IMAGE=null;Kt.DEFAULT_MAPPING=Qg;Kt.DEFAULT_ANISOTROPY=1;class yt{constructor(e=0,t=0,i=0,r=1){yt.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=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return 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,u=l[0],c=l[4],f=l[8],h=l[1],d=l[5],g=l[9],_=l[2],m=l[6],p=l[10];if(Math.abs(c-h)<.01&&Math.abs(f-_)<.01&&Math.abs(g-m)<.01){if(Math.abs(c+h)<.1&&Math.abs(f+_)<.1&&Math.abs(g+m)<.1&&Math.abs(u+d+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const x=(u+1)/2,v=(d+1)/2,A=(p+1)/2,w=(c+h)/4,C=(f+_)/4,P=(g+m)/4;return x>v&&x>A?x<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(x),r=w/i,s=C/i):v>A?v<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(v),i=w/r,s=P/r):A<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(A),i=C/s,r=P/s),this.set(i,r,s,t),this}let T=Math.sqrt((m-g)*(m-g)+(f-_)*(f-_)+(h-c)*(h-c));return Math.abs(T)<.001&&(T=1),this.x=(m-g)/T,this.y=(f-_)/T,this.z=(h-c)/T,this.w=Math.acos((u+d+p-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=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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 Tb extends Ys{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new yt(0,0,e,t),this.scissorTest=!1,this.viewport=new yt(0,0,e,t);const r={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:en,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const s=new Kt(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.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}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;const t=Object.assign({},e.texture.image);return this.texture.source=new h0(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class ir extends Tb{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class d0 extends Kt{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=Gn,this.minFilter=Gn,this.wrapR=Rr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class bb extends Kt{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=Gn,this.minFilter=Gn,this.wrapR=Rr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Go{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],u=i[r+1],c=i[r+2],f=i[r+3];const h=s[o+0],d=s[o+1],g=s[o+2],_=s[o+3];if(a===0){e[t+0]=l,e[t+1]=u,e[t+2]=c,e[t+3]=f;return}if(a===1){e[t+0]=h,e[t+1]=d,e[t+2]=g,e[t+3]=_;return}if(f!==_||l!==h||u!==d||c!==g){let m=1-a;const p=l*h+u*d+c*g+f*_,T=p>=0?1:-1,x=1-p*p;if(x>Number.EPSILON){const A=Math.sqrt(x),w=Math.atan2(A,p*T);m=Math.sin(m*w)/A,a=Math.sin(a*w)/A}const v=a*T;if(l=l*m+h*v,u=u*m+d*v,c=c*m+g*v,f=f*m+_*v,m===1-a){const A=1/Math.sqrt(l*l+u*u+c*c+f*f);l*=A,u*=A,c*=A,f*=A}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],u=i[r+2],c=i[r+3],f=s[o],h=s[o+1],d=s[o+2],g=s[o+3];return e[t]=a*g+c*f+l*d-u*h,e[t+1]=l*g+c*h+u*f-a*d,e[t+2]=u*g+c*d+a*h-l*f,e[t+3]=c*g-a*f-l*h-u*d,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,u=a(i/2),c=a(r/2),f=a(s/2),h=l(i/2),d=l(r/2),g=l(s/2);switch(o){case"XYZ":this._x=h*c*f+u*d*g,this._y=u*d*f-h*c*g,this._z=u*c*g+h*d*f,this._w=u*c*f-h*d*g;break;case"YXZ":this._x=h*c*f+u*d*g,this._y=u*d*f-h*c*g,this._z=u*c*g-h*d*f,this._w=u*c*f+h*d*g;break;case"ZXY":this._x=h*c*f-u*d*g,this._y=u*d*f+h*c*g,this._z=u*c*g+h*d*f,this._w=u*c*f-h*d*g;break;case"ZYX":this._x=h*c*f-u*d*g,this._y=u*d*f+h*c*g,this._z=u*c*g-h*d*f,this._w=u*c*f+h*d*g;break;case"YZX":this._x=h*c*f+u*d*g,this._y=u*d*f+h*c*g,this._z=u*c*g-h*d*f,this._w=u*c*f-h*d*g;break;case"XZY":this._x=h*c*f-u*d*g,this._y=u*d*f-h*c*g,this._z=u*c*g+h*d*f,this._w=u*c*f+h*d*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&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],u=t[2],c=t[6],f=t[10],h=i+a+f;if(h>0){const d=.5/Math.sqrt(h+1);this._w=.25/d,this._x=(c-l)*d,this._y=(s-u)*d,this._z=(o-r)*d}else if(i>a&&i>f){const d=2*Math.sqrt(1+i-a-f);this._w=(c-l)/d,this._x=.25*d,this._y=(r+o)/d,this._z=(s+u)/d}else if(a>f){const d=2*Math.sqrt(1+a-i-f);this._w=(s-u)/d,this._x=(r+o)/d,this._y=.25*d,this._z=(l+c)/d}else{const d=2*Math.sqrt(1+f-i-a);this._w=(o-r)/d,this._x=(s+u)/d,this._y=(l+c)/d,this._z=.25*d}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($t(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)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()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,u=t._z,c=t._w;return this._x=i*c+o*a+r*u-s*l,this._y=r*c+o*l+s*a-i*u,this._z=s*c+o*u+i*l-r*a,this._w=o*c-i*a-r*l-s*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)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 d=1-t;return this._w=d*o+t*this._w,this._x=d*i+t*this._x,this._y=d*r+t*this._y,this._z=d*s+t*this._z,this.normalize(),this}const u=Math.sqrt(l),c=Math.atan2(u,a),f=Math.sin((1-t)*c)/u,h=Math.sin(t*c)/u;return this._w=o*f+this._w*h,this._x=i*f+this._x*h,this._y=r*f+this._y*h,this._z=s*f+this._z*h,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 K{constructor(e=0,t=0,i=0){K.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(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(np.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(np.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,u=2*(o*r-a*i),c=2*(a*t-s*r),f=2*(s*i-o*t);return this.x=t+l*u+o*f-a*c,this.y=i+l*c+a*u-s*f,this.z=r+l*f+s*c-o*u,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=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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}
vendor: 5,724 bytes, line 39
39roundToZero(){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(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return cc.copy(this).projectOnVector(e),this.sub(cc)}reflect(e){return this.sub(cc.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos($t(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,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-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 cc=new K,np=new Go;class Wo{constructor(e=new K(1/0,1/0,1/0),t=new K(-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(Nn.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(Nn.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=Nn.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(i!==void 0){const s=i.getAttribute("position");if(t===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,Nn):Nn.fromBufferAttribute(s,o),Nn.applyMatrix4(e.matrixWorld),this.expandByPoint(Nn);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),sa.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),sa.copy(i.boundingBox)),sa.applyMatrix4(e.matrixWorld),this.union(sa)}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,Nn),Nn.distanceToSquared(e.center)<=e.radius*e.radiu
vendor: 21,530 bytes, line 39
39s}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(eo),oa.subVectors(this.max,eo),jr.subVectors(e.a,eo),Kr.subVectors(e.b,eo),Zr.subVectors(e.c,eo),Li.subVectors(Kr,jr),Ii.subVectors(Zr,Kr),pr.subVectors(jr,Zr);let t=[0,-Li.z,Li.y,0,-Ii.z,Ii.y,0,-pr.z,pr.y,Li.z,0,-Li.x,Ii.z,0,-Ii.x,pr.z,0,-pr.x,-Li.y,Li.x,0,-Ii.y,Ii.x,0,-pr.y,pr.x,0];return!uc(t,jr,Kr,Zr,oa)||(t=[1,0,0,0,1,0,0,0,1],!uc(t,jr,Kr,Zr,oa))?!1:(aa.crossVectors(Li,Ii),t=[aa.x,aa.y,aa.z],uc(t,jr,Kr,Zr,oa))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Nn).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Nn).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ai[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ai[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ai[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ai[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ai[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ai[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ai[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ai[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ai),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 ai=[new K,new K,new K,new K,new K,new K,new K,new K],Nn=new K,sa=new Wo,jr=new K,Kr=new K,Zr=new K,Li=new K,Ii=new K,pr=new K,eo=new K,oa=new K,aa=new K,mr=new K;function uc(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){mr.fromArray(n,s);const a=r.x*Math.abs(mr.x)+r.y*Math.abs(mr.y)+r.z*Math.abs(mr.z),l=e.dot(mr),u=t.dot(mr),c=i.dot(mr);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>a)return!1}return!0}const wb=new Wo,to=new K,fc=new K;class mh{constructor(e=new K,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;t!==void 0?i.copy(t):wb.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;to.subVectors(e,this.center);const t=to.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(to,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(fc.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(to.copy(e.center).add(fc)),this.expandByPoint(to.copy(e.center).sub(fc))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const li=new K,hc=new K,la=new K,Ui=new K,dc=new K,ca=new K,pc=new K;class Ab{constructor(e=new K,t=new K(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,li)),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=li.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(li.copy(this.origin).addScaledVector(this.direction,t),li.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){hc.copy(e).add(t).multiplyScalar(.5),la.copy(t).sub(e).normalize(),Ui.copy(this.origin).sub(hc);const s=e.distanceTo(t)*.5,o=-this.direction.dot(la),a=Ui.dot(this.direction),l=-Ui.dot(la),u=Ui.lengthSq(),c=Math.abs(1-o*o);let f,h,d,g;if(c>0)if(f=o*l-a,h=o*a-l,g=s*c,f>=0)if(h>=-g)if(h<=g){const _=1/c;f*=_,h*=_,d=f*(f+o*h+2*a)+h*(o*f+h+2*l)+u}else h=s,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+u;else h=-s,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+u;else h<=-g?(f=Math.max(0,-(-o*s+a)),h=f>0?-s:Math.min(Math.max(-s,-l),s),d=-f*f+h*(h+2*l)+u):h<=g?(f=0,h=Math.min(Math.max(-s,-l),s),d=h*(h+2*l)+u):(f=Math.max(0,-(o*s+a)),h=f>0?s:Math.min(Math.max(-s,-l),s),d=-f*f+h*(h+2*l)+u);else h=o>0?-s:s,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,f),r&&r.copy(hc).addScaledVector(la,h),d}intersectSphere(e,t){li.subVectors(e.center,this.origin);const i=li.dot(this.direction),r=li.dot(li)-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:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?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 i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,l;const u=1/this.direction.x,c=1/this.direction.y,f=1/this.direction.z,h=this.origin;return u>=0?(i=(e.min.x-h.x)*u,r=(e.max.x-h.x)*u):(i=(e.max.x-h.x)*u,r=(e.min.x-h.x)*u),c>=0?(s=(e.min.y-h.y)*c,o=(e.max.y-h.y)*c):(s=(e.max.y-h.y)*c,o=(e.min.y-h.y)*c),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o<r||isNaN(r))&&(r=o),f>=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),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 this.intersectBox(e,li)!==null}intersectTriangle(e,t,i,r,s){dc.subVectors(t,e),ca.subVectors(i,e),pc.crossVectors(dc,ca);let o=this.direction.dot(pc),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Ui.subVectors(this.origin,e);const l=a*this.direction.dot(ca.crossVectors(Ui,ca));if(l<0)return null;const u=a*this.direction.dot(dc.cross(Ui));if(u<0||l+u>o)return null;const c=-a*Ui.dot(pc);return c<0?null:this.at(c/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 Tt{constructor(e,t,i,r,s,o,a,l,u,c,f,h,d,g,_,m){Tt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,l,u,c,f,h,d,g,_,m)}set(e,t,i,r,s,o,a,l,u,c,f,h,d,g,_,m){const p=this.elements;return p[0]=e,p[4]=t,p[8]=i,p[12]=r,p[1]=s,p[5]=o,p[9]=a,p[13]=l,p[2]=u,p[6]=c,p[10]=f,p[14]=h,p[3]=d,p[7]=g,p[11]=_,p[15]=m,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 Tt().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/Jr.setFromMatrixColumn(e,0).length(),s=1/Jr.setFromMatrixColumn(e,1).length(),o=1/Jr.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),u=Math.sin(r),c=Math.cos(s),f=Math.sin(s);if(e.order==="XYZ"){const h=o*c,d=o*f,g=a*c,_=a*f;t[0]=l*c,t[4]=-l*f,t[8]=u,t[1]=d+g*u,t[5]=h-_*u,t[9]=-a*l,t[2]=_-h*u,t[6]=g+d*u,t[10]=o*l}else if(e.order==="YXZ"){const h=l*c,d=l*f,g=u*c,_=u*f;t[0]=h+_*a,t[4]=g*a-d,t[8]=o*u,t[1]=o*f,t[5]=o*c,t[9]=-a,t[2]=d*a-g,t[6]=_+h*a,t[10]=o*l}else if(e.order==="ZXY"){const h=l*c,d=l*f,g=u*c,_=u*f;t[0]=h-_*a,t[4]=-o*f,t[8]=g+d*a,t[1]=d+g*a,t[5]=o*c,t[9]=_-h*a,t[2]=-o*u,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const h=o*c,d=o*f,g=a*c,_=a*f;t[0]=l*c,t[4]=g*u-d,t[8]=h*u+_,t[1]=l*f,t[5]=_*u+h,t[9]=d*u-g,t[2]=-u,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const h=o*l,d=o*u,g=a*l,_=a*u;t[0]=l*c,t[4]=_-h*f,t[8]=g*f+d,t[1]=f,t[5]=o*c,t[9]=-a*c,t[2]=-u*c,t[6]=d*f+g,t[10]=h-_*f}else if(e.order==="XZY"){const h=o*l,d=o*u,g=a*l,_=a*u;t[0]=l*c,t[4]=-f,t[8]=u*c,t[1]=h*f+_,t[5]=o*c,t[9]=d*f-g,t[2]=g*f-d,t[6]=a*c,t[10]=_*f+h}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(Rb,e,Cb)}lookAt(e,t,i){const r=this.elements;return cn.subVectors(e,t),cn.lengthSq()===0&&(cn.z=1),cn.normalize(),Ni.crossVectors(i,cn),Ni.lengthSq()===0&&(Math.abs(i.z)===1?cn.x+=1e-4:cn.z+=1e-4,cn.normalize(),Ni.crossVectors(i,cn)),Ni.normalize(),ua.crossVectors(cn,Ni),r[0]=Ni.x,r[4]=ua.x,r[8]=cn.x,r[1]=Ni.y,r[5]=ua.y,r[9]=cn.y,r[2]=Ni.z,r[6]=ua.z,r[10]=cn.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],u=i[12],c=i[1],f=i[5],h=i[9],d=i[13],g=i[2],_=i[6],m=i[10],p=i[14],T=i[3],x=i[7],v=i[11],A=i[15],w=r[0],C=r[4],P=r[8],S=r[12],M=r[1],I=r[5],z=r[9],O=r[13],X=r[2],J=r[6],D=r[10],V=r[14],U=r[3],se=r[7],fe=r[11],pe=r[15];return s[0]=o*w+a*M+l*X+u*U,s[4]=o*C+a*I+l*J+u*se,s[8]=o*P+a*z+l*D+u*fe,s[12]=o*S+a*O+l*V+u*pe,s[1]=c*w+f*M+h*X+d*U,s[5]=c*C+f*I+h*J+d*se,s[9]=c*P+f*z+h*D+d*fe,s[13]=c*S+f*O+h*V+d*pe,s[2]=g*w+_*M+m*X+p*U,s[6]=g*C+_*I+m*J+p*se,s[10]=g*P+_*z+m*D+p*fe,s[14]=g*S+_*O+m*V+p*pe,s[3]=T*w+x*M+v*X+A*U,s[7]=T*C+x*I+v*J+A*se,s[11]=T*P+x*z+v*D+A*fe,s[15]=T*S+x*O+v*V+A*pe,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],u=e[13],c=e[2],f=e[6],h=e[10],d=e[14],g=e[3],_=e[7],m=e[11],p=e[15];return g*(+s*l*f-r*u*f-s*a*h+i*u*h+r*a*d-i*l*d)+_*(+t*l*d-t*u*h+s*o*h-r*o*d+r*u*c-s*l*c)+m*(+t*u*f-t*a*d-s*o*f+i*o*d+s*a*c-i*u*c)+p*(-r*a*c-t*l*f+t*a*h+r*o*f-i*o*h+i*l*c)}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],u=e[7],c=e[8],f=e[9],h=e[10],d=e[11],g=e[12],_=e[13],m=e[14],p=e[15],T=f*m*u-_*h*u+_*l*d-a*m*d-f*l*p+a*h*p,x=g*h*u-c*m*u-g*l*d+o*m*d+c*l*p-o*h*p,v=c*_*u-g*f*u+g*a*d-o*_*d-c*a*p+o*f*p,A=g*f*l-c*_*l-g*a*h+o*_*h+c*a*m-o*f*m,w=t*T+i*x+r*v+s*A;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const C=1/w;return e[0]=T*C,e[1]=(_*h*s-f*m*s-_*r*d+i*m*d+f*r*p-i*h*p)*C,e[2]=(a*m*s-_*l*s+_*r*u-i*m*u-a*r*p+i*l*p)*C,e[3]=(f*l*s-a*h*s-f*r*u+i*h*u+a*r*d-i*l*d)*C,e[4]=x*C,e[5]=(c*m*s-g*h*s+g*r*d-t*m*d-c*r*p+t*h*p)*C,e[6]=(g*l*s-o*m*s-g*r*u+t*m*u+o*r*p-t*l*p)*C,e[7]=(o*h*s-c*l*s+c*r*u-t*h*u-o*r*d+t*l*d)*C,e[8]=v*C,e[9]=(g*f*s-c*_*s-g*i*d+t*_*d+c*i*p-t*f*p)*C,e[10]=(o*_*s-g*a*s+g*i*u-t*_*u-o*i*p+t*a*p)*C,e[11]=(c*a*s-o*f*s-c*i*u+t*f*u+o*i*d-t*a*d)*C,e[12]=A*C,e[13]=(c*_*r-g*f*r+g*i*h-t*_*h-c*i*m+t*f*m)*C,e[14]=(g*a*r-o*_*r-g*i*l+t*_*l+o*i*m-t*a*m)*C,e[15]=(o*f*r-c*a*r+c*i*l-t*f*l-o*i*h+t*a*h)*C,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,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}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,u=s*o,c=s*a;return this.set(u*o+i,u*a-r*l,u*l+r*a,0,u*a+r*l,c*a+i,c*l-r*o,0,u*l-r*a,c*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,u=s+s,c=o+o,f=a+a,h=s*u,d=s*c,g=s*f,_=o*c,m=o*f,p=a*f,T=l*u,x=l*c,v=l*f,A=i.x,w=i.y,C=i.z;return r[0]=(1-(_+p))*A,r[1]=(d+v)*A,r[2]=(g-x)*A,r[3]=0,r[4]=(d-v)*w,r[5]=(1-(h+p))*w,r[6]=(m+T)*w,r[7]=0,r[8]=(g+x)*C,r[9]=(m-T)*C,r[10]=(1-(h+_))*C,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=Jr.set(r[0],r[1],r[2]).length();const o=Jr.set(r[4],r[5],r[6]).length(),a=Jr.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],On.copy(this);const u=1/s,c=1/o,f=1/a;return On.elements[0]*=u,On.elements[1]*=u,On.elements[2]*=u,On.elements[4]*=c,On.elements[5]*=c,On.elements[6]*=c,On.elements[8]*=f,On.elements[9]*=f,On.elements[10]*=f,t.setFromRotationMatrix(On),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=yi){const l=this.elements,u=2*s/(t-e),c=2*s/(i-r),f=(t+e)/(t-e),h=(i+r)/(i-r);let d,g;if(a===yi)d=-(o+s)/(o-s),g=-2*o*s/(o-s);else if(a===fl)d=-o/(o-s),g=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=u,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=c,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=d,l[14]=g,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,r,s,o,a=yi){const l=this.elements,u=1/(t-e),c=1/(i-r),f=1/(o-s),h=(t+e)*u,d=(i+r)*c;let g,_;if(a===yi)g=(o+s)*f,_=-2*f;else if(a===fl)g=s*f,_=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-d,l[2]=0,l[6]=0,l[10]=_,l[14]=-g,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 Jr=new K,On=new Tt,Rb=new K(0,0,0),Cb=new K(1,1,1),Ni=new K,ua=new K,cn=new K,ip=new Tt,rp=new Go;class Ai{constructor(e=0,t=0,i=0,r=Ai.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}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 order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],u=r[5],c=r[9],f=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin($t(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(h,u),this._z=0);break;case"YXZ":this._x=Math.asin(-$t(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin($t(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,d),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-$t(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin($t(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-$t(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,u),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return ip.makeRotationFromQuaternion(e),this.setFromRotationMatrix(ip,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return rp.setFromEuler(this),this.setFromQuaternion(rp,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[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._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Ai.DEFAULT_ORDER="XYZ";class p0{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let Pb=0;const sp=new K,Qr=new Go,ci=new Tt,fa=new K,no=new K,Db=new K,Lb=new Go,op=new K(1,0,0),ap=new K(0,1,0),lp=new K(0,0,1),cp={type:"added"},Ib={type:"removed"},es={type:"childadded",child:null},mc={type:"childremoved",child:null};class yn extends Ys{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Pb++}),this.uuid=$s(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=yn.DEFAULT_UP.clone();const e=new K,t=new Ai,i=new Go,r=new K(1,1,1);function s(){i.setFromEuler(t,!1)}function o(){t.setFromQuaternion(i,void 0,!1)}t._onChange(s),i._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Tt},normalMatrix:{value:new ze}}),this.matrix=new Tt,this.matrixWorld=new Tt,this.matrixAutoUpdate=yn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=yn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new p0,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}
vendor: 4,289 bytes, line 39
39setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Qr.setFromAxisAngle(e,t),this.quaternion.multiply(Qr),this}rotateOnWorldAxis(e,t){return Qr.setFromAxisAngle(e,t),this.quaternion.premultiply(Qr),this}rotateX(e){return this.rotateOnAxis(op,e)}rotateY(e){return this.rotateOnAxis(ap,e)}rotateZ(e){return this.rotateOnAxis(lp,e)}translateOnAxis(e,t){return sp.copy(e).applyQuaternion(this.quaternion),this.position.add(sp.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(op,e)}translateY(e){return this.translateOnAxis(ap,e)}translateZ(e){return this.translateOnAxis(lp,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(ci.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?fa.copy(e):fa.set(e,t,i);const r=this.parent;this.updateWorldMatrix(!0,!1),no.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ci.lookAt(no,fa,this.up):ci.lookAt(fa,no,this.up),this.quaternion.setFromRotationMatrix(ci),r&&(ci.extractRotation(r.matrixWorld),Qr.setFromRotationMatrix(ci),this.quaternion.premultiply(Qr.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(cp),es.child=e,this.dispatchEvent(es),es.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(Ib),mc.child=e,this.dispatchEvent(mc),mc.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),ci.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),ci.multiply(e.parent.matrixWorld)),e.applyMatrix4(ci),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(cp),es.child=e,this.dispatchEvent(es),es.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let i=0,r=this.children.length;i<r;i++){const o=this.children[i].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,i=[]){this[e]===t&&i.push(this);const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].getObjectsByProperty(e,t,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(no,e,Db),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(no,Lb,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let i=0,r=t.length;i<r;i++)t[i].updateMatrixWorld(e)}updateWorldMatrix(e,t){const i=this.parent;if(e===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix
vendor: 7,027 bytes, line 39
39):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",i={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()}));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u<c;u++){const f=l[u];s(e.shapes,f)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,u=this.material.length;l<u;l++)a.push(s(e.materials,this.material[l]));r.material=a}else r.material=s(e.materials,this.material);if(this.children.length>0){r.children=[];for(let a=0;a<this.children.length;a++)r.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];r.animations.push(s(e.animations,l))}}if(t){const a=o(e.geometries),l=o(e.materials),u=o(e.textures),c=o(e.images),f=o(e.shapes),h=o(e.skeletons),d=o(e.animations),g=o(e.nodes);a.length>0&&(i.geometries=a),l.length>0&&(i.materials=l),u.length>0&&(i.textures=u),c.length>0&&(i.images=c),f.length>0&&(i.shapes=f),h.length>0&&(i.skeletons=h),d.length>0&&(i.animations=d),g.length>0&&(i.nodes=g)}return i.object=r,i;function o(a){const l=[];for(const u in a){const c=a[u];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i<e.children.length;i++){const r=e.children[i];this.add(r.clone())}return this}}yn.DEFAULT_UP=new K(0,1,0);yn.DEFAULT_MATRIX_AUTO_UPDATE=!0;yn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Fn=new K,ui=new K,_c=new K,fi=new K,ts=new K,ns=new K,up=new K,gc=new K,vc=new K,xc=new K,yc=new yt,Sc=new yt,Mc=new yt;class Bn{constructor(e=new K,t=new K,i=new K){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,r){r.subVectors(i,t),Fn.subVectors(e,t),r.cross(Fn);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){Fn.subVectors(r,t),ui.subVectors(i,t),_c.subVectors(e,t);const o=Fn.dot(Fn),a=Fn.dot(ui),l=Fn.dot(_c),u=ui.dot(ui),c=ui.dot(_c),f=o*u-a*a;if(f===0)return s.set(0,0,0),null;const h=1/f,d=(u*l-a*c)*h,g=(o*c-a*l)*h;return s.set(1-d-g,g,d)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,fi)===null?!1:fi.x>=0&&fi.y>=0&&fi.x+fi.y<=1}static getInterpolation(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,fi)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,fi.x),l.addScaledVector(o,fi.y),l.addScaledVector(a,fi.z),l)}static getInterpolatedAttribute(e,t,i,r,s,o){return yc.setScalar(0),Sc.setScalar(0),Mc.setScalar(0),yc.fromBufferAttribute(e,t),Sc.fromBufferAttribute(e,i),Mc.fromBufferAttribute(e,r),o.setScalar(0),o.addScaledVector(yc,s.x),o.addScaledVector(Sc,s.y),o.addScaledVector(Mc,s.z),o}static isFrontFacing(e,t,i,r){return Fn.subVectors(i,t),ui.subVectors(e,t),Fn.cross(ui).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 Fn.subVectors(this.c,this.b),ui.subVectors(this.a,this.b),Fn.cross(ui).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Bn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Bn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,s){return Bn.getInterpolation(e,this.a,this.b,this.c,t,i,r,s
vendor: 10,664 bytes, line 39
39)}containsPoint(e){return Bn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Bn.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;ts.subVectors(r,i),ns.subVectors(s,i),gc.subVectors(e,i);const l=ts.dot(gc),u=ns.dot(gc);if(l<=0&&u<=0)return t.copy(i);vc.subVectors(e,r);const c=ts.dot(vc),f=ns.dot(vc);if(c>=0&&f<=c)return t.copy(r);const h=l*f-c*u;if(h<=0&&l>=0&&c<=0)return o=l/(l-c),t.copy(i).addScaledVector(ts,o);xc.subVectors(e,s);const d=ts.dot(xc),g=ns.dot(xc);if(g>=0&&d<=g)return t.copy(s);const _=d*u-l*g;if(_<=0&&u>=0&&g<=0)return a=u/(u-g),t.copy(i).addScaledVector(ns,a);const m=c*g-d*f;if(m<=0&&f-c>=0&&d-g>=0)return up.subVectors(s,r),a=(f-c)/(f-c+(d-g)),t.copy(r).addScaledVector(up,a);const p=1/(m+_+h);return o=_*p,a=h*p,t.copy(i).addScaledVector(ts,o).addScaledVector(ns,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const m0={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},Oi={h:0,s:0,l:0},ha={h:0,s:0,l:0};function Ec(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class tt{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(t===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=pn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,qe.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=qe.workingColorSpace){return this.r=e,this.g=t,this.b=i,qe.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=qe.workingColorSpace){if(e=ph(e,1),t=$t(t,0,1),i=$t(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=Ec(o,s,e+1/3),this.g=Ec(o,s,e),this.b=Ec(o,s,e-1/3)}return qe.toWorkingColorSpace(this,r),this}setStyle(e,t=pn){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){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(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)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=pn){const i=m0[e.toLowerCase()];return i!==void 0?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=Mi(e.r),this.g=Mi(e.g),this.b=Mi(e.b),this}copyLinearToSRGB(e){return this.r=Rs(e.r),this.g=Rs(e.g),this.b=Rs(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=pn){return qe.fromWorkingColorSpace(Ot.copy(this),e),Math.round($t(Ot.r*255,0,255))*65536+Math.round($t(Ot.g*255,0,255))*256+Math.round($t(Ot.b*255,0,255))}getHexString(e=pn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=qe.workingColorSpace){qe.fromWorkingColorSpace(Ot.copy(this),t);const i=Ot.r,r=Ot.g,s=Ot.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,u;const c=(a+o)/2;if(a===o)l=0,u=0;else{const f=o-a;switch(u=c<=.5?f/(o+a):f/(2-o-a),o){case i:l=(r-s)/f+(r<s?6:0);break;case r:l=(s-i)/f+2;break;case s:l=(i-r)/f+4;break}l/=6}return e.h=l,e.s=u,e.l=c,e}getRGB(e,t=qe.workingColorSpace){return qe.fromWorkingColorSpace(Ot.copy(this),t),e.r=Ot.r,e.g=Ot.g,e.b=Ot.b,e}getStyle(e=pn){qe.fromWorkingColorSpace(Ot.copy(this),e);const t=Ot.r,i=Ot.g,r=Ot.b;return e!==pn?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,t,i){return this.getHSL(Oi),this.setHSL(Oi.h+e,Oi.s+t,Oi.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(Oi),e.getHSL(ha);const i=Mo(Oi.h,ha.h,t),r=Mo(Oi.s,ha.s,t),s=Mo(Oi.l,ha.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 Ot=new tt;tt.NAMES=m0;let Ub=0;class Cl extends Ys{static get type(){return"Material"}get type(){return this.constructor.type}set type(e){}constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Ub++}),this.uuid=$s(),this.name="",this.blending=ws,this.side=nr,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Su,this.blendDst=Mu,this.blendEquation=br,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new tt(0,0,0),this.blendAlpha=0,this.depthFunc=Fs,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Xd,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Yr,this.stencilZFail=Yr,this.stencilZPass=Yr,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(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};
vendor: 8,832 bytes, line 39
39i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(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()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(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),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(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,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==ws&&(i.blending=this.blending),this.side!==nr&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Su&&(i.blendSrc=this.blendSrc),this.blendDst!==Mu&&(i.blendDst=this.blendDst),this.blendEquation!==br&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Fs&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Xd&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Yr&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Yr&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Yr&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(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(t!==null){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.clipSh
vendor: 4,939 bytes, line 39
39adows,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){e===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class _h extends Cl{static get type(){return"MeshBasicMaterial"}constructor(e){super(),this.isMeshBasicMaterial=!0,this.color=new tt(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 Ai,this.combine=Jg,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 St=new K,da=new Je;class Qn{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=qd,this.updateRanges=[],this.gpuType=xi,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(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(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)da.fromBufferAttribute(this,t),da.applyMatrix3(e),this.setXY(t,da.x,da.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)St.fromBufferAttribute(this,t),St.applyMatrix3(e),this.setXYZ(t,St.x,St.y,St.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)St.fromBufferAttribute(this,t),St.applyMatrix4(e),this.setXYZ(t,St.x,St.y,St.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)St.fromBufferAttribute(this,t),St.applyNormalMatrix(e),this.setXYZ(t,St.x,St.y,St.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)St.fromBufferAttribute(this,t),St.transformDirection(e),this.setXYZ(t,St.x,St.y,St.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=cs(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=Gt(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=cs(t,this.array)),t}setX(e,t){return this.normalized&&(t=Gt(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=cs(t,this.array)),t}setY(e,t){return this.normalized&&(t=Gt(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=cs(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Gt(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=cs(t,this.array)),t}setW(e,t){return this.normalized&&(t=Gt(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=Gt(t,this.array),i=Gt(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=Gt(t,this.array),i=Gt(i,this.array),r=Gt(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=Gt(t,this.array),i=Gt(i,this.array),r=Gt(r,this.array),s=Gt(s,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=s,this}
vendor: 4,804 bytes, line 39
39onUpload(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),this.usage!==qd&&(e.usage=this.usage),e}}class _0 extends Qn{constructor(e,t,i){super(new Uint16Array(e),t,i)}}class g0 extends Qn{constructor(e,t,i){super(new Uint32Array(e),t,i)}}class Ei extends Qn{constructor(e,t,i){super(new Float32Array(e),t,i)}}let Nb=0;const En=new Tt,Tc=new yn,is=new K,un=new Wo,io=new Wo,Rt=new K;class lr extends Ys{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Nb++}),this.uuid=$s(),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 Array.isArray(e)?this.index=new(f0(e)?g0:_0)(e,1):this.index=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 this.attributes[e]!==void 0}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;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const s=new ze().getNormalMatrix(e);i.applyNormalMatrix(s),i.needsUpdate=!0}const r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return En.makeRotationFromQuaternion(e),this.applyMatrix4(En),this}rotateX(e){return En.makeRotationX(e),this.applyMatrix4(En),this}rotateY(e){return En.makeRotationY(e),this.applyMatrix4(En),this}rotateZ(e){return En.makeRotationZ(e),this.applyMatrix4(En),this}translate(e,t,i){return En.makeTranslation(e,t,i),this.applyMatrix4(En),this}scale(e,t,i){return En.makeScale(e,t,i),this.applyMatrix4(En),this}lookAt(e){return Tc.lookAt(e),Tc.updateMatrix(),this.applyMatrix4(Tc.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(is).negate(),this.translate(is.x,is.y,is.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){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 Ei(i,3))}else{for(let i=0,r=t.count;i<r;i++){const s=e[i];t.setXYZ(i,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(){this.boundingBox===null&&(this.boundingBox=new Wo);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new K(-1/0,-1/0,-1/0),new K(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=t.length;i<r;i++){const s=t[i];un.setFromBufferAttribute(s),this.morphTargetsRelative?(Rt.addVectors(this.boundingBox.min,un.min),this.boundingBox.expandByPoint(Rt),Rt.addVectors(this.boundingBox.max,un.max),this.boundingBox.expandByPoint(Rt)):(this.boundingBox.expandByPoint(un.min),this.boundingBox.expandByPoint(un.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(){this.boundingSphere===null&&(this.boundingSphere=new mh);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new K,1/0);return}if(e){const i=this.boundingSphere.center;if(un.setFromBufferAttribute(e),t)for(let s=0,o=t.length;s<o;s++){const a=t[s];io.setFromBufferAttribute(a),this.morphTargetsRelative?(Rt.addVectors(un.min,io.min),un.expandByPoint(Rt),Rt.addVectors(un.max,io.max),un.expandByPoint(Rt)):(un.expandByPoint(io.min),un.expandByPoint(io.max))}un.getCenter(i);let r=0;for(let s=0,o=e.count;s<o;
vendor: 4,205 bytes, line 39
39s++)Rt.fromBufferAttribute(e,s),r=Math.max(r,i.distanceToSquared(Rt));if(t)for(let s=0,o=t.length;s<o;s++){const a=t[s],l=this.morphTargetsRelative;for(let u=0,c=a.count;u<c;u++)Rt.fromBufferAttribute(a,u),l&&(is.fromBufferAttribute(e,u),Rt.add(is)),r=Math.max(r,i.distanceToSquared(Rt))}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(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=t.position,r=t.normal,s=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Qn(new Float32Array(4*i.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let P=0;P<i.count;P++)a[P]=new K,l[P]=new K;const u=new K,c=new K,f=new K,h=new Je,d=new Je,g=new Je,_=new K,m=new K;function p(P,S,M){u.fromBufferAttribute(i,P),c.fromBufferAttribute(i,S),f.fromBufferAttribute(i,M),h.fromBufferAttribute(s,P),d.fromBufferAttribute(s,S),g.fromBufferAttribute(s,M),c.sub(u),f.sub(u),d.sub(h),g.sub(h);const I=1/(d.x*g.y-g.x*d.y);isFinite(I)&&(_.copy(c).multiplyScalar(g.y).addScaledVector(f,-d.y).multiplyScalar(I),m.copy(f).multiplyScalar(d.x).addScaledVector(c,-g.x).multiplyScalar(I),a[P].add(_),a[S].add(_),a[M].add(_),l[P].add(m),l[S].add(m),l[M].add(m))}let T=this.groups;T.length===0&&(T=[{start:0,count:e.count}]);for(let P=0,S=T.length;P<S;++P){const M=T[P],I=M.start,z=M.count;for(let O=I,X=I+z;O<X;O+=3)p(e.getX(O+0),e.getX(O+1),e.getX(O+2))}const x=new K,v=new K,A=new K,w=new K;function C(P){A.fromBufferAttribute(r,P),w.copy(A);const S=a[P];x.copy(S),x.sub(A.multiplyScalar(A.dot(S))).normalize(),v.crossVectors(w,S);const I=v.dot(l[P])<0?-1:1;o.setXYZW(P,x.x,x.y,x.z,I)}for(let P=0,S=T.length;P<S;++P){const M=T[P],I=M.start,z=M.count;for(let O=I,X=I+z;O<X;O+=3)C(e.getX(O+0)),C(e.getX(O+1)),C(e.getX(O+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Qn(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let h=0,d=i.count;h<d;h++)i.setXYZ(h,0,0,0);const r=new K,s=new K,o=new K,a=new K,l=new K,u=new K,c=new K,f=new K;if(e)for(let h=0,d=e.count;h<d;h+=3){const g=e.getX(h+0),_=e.getX(h+1),m=e.getX(h+2);r.fromBufferAttribute(t,g),s.fromBufferAttribute(t,_),o.fromBufferAttribute(t,m),c.subVectors(o,s),f.subVectors(r,s),c.cross(f),a.fromBufferAttribute(i,g),l.fromBufferAttribute(i,_),u.fromBufferAttribute(i,m),a.add(c),l.add(c),u.add(c),i.setXYZ(g,a.x,a.y,a.z),i.setXYZ(_,l.x,l.y,l.z),i.setXYZ(m,u.x,u.y,u.z)}else for(let h=0,d=t.count;h<d;h+=3)r.fromBufferAttribute(t,h+0),s.fromBufferAttribute(t,h+1),o.fromBufferAttribute(t,h+2),c.subVectors(o,s),f.subVectors(r,s),c.cross(f),i.setXYZ(h+0,c.x,c.y,c.z),i.setXYZ(h+1,c.x,c.y,c.z),i.setXYZ(h+2,c.x,c.y,c.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)Rt.fromBufferAttribute(e,t),Rt.normalize(),e.setXYZ(t,Rt.x,Rt.y,Rt.z)}toNonIndexed(){function e(a,l){const u=a.array,c=a.itemSize,f=a.normalized,h=new u.constructor(l.length*c);let d=0,g=0;for(let _=0,m=l.length;_<m;_++){a.isInterleavedBufferAttribute?d=l[_]*a.data.stride+a.offset:d=l[_]*c;for(let p=0;p<c;p++)h[g++]=u[d++]}return new Qn(h,c,f)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new lr,i=this.index.array,r=this.attributes;for(const a in r){const l=r[a],u=e(l,i);t.setAttribute(a,u)}const s=this.morphAttributes;for(const a in s){const l=[],u=s[a];for(let c=0,f=u.length;c<f;c++){const h=u[c],d=e(h,i);l.push(d)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const u=o[a];t.addGroup(u.start,u.count,u.materialIndex)}return t}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 6,131 bytes, line 39
39if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const u=i[l];e.data.attributes[l]=u.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let f=0,h=u.length;f<h;f++){const d=u[f];c.push(d.toJSON(e.data))}c.length>0&&(r[l]=c,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 a!==null&&(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;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const u in r){const c=r[u];this.setAttribute(u,c.clone(t))}const s=e.morphAttributes;for(const u in s){const c=[],f=s[u];for(let h=0,d=f.length;h<d;h++)c.push(f[h].clone(t));this.morphAttributes[u]=c}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let u=0,c=o.length;u<c;u++){const f=o[u];this.addGroup(f.start,f.count,f.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const fp=new Tt,_r=new Ab,pa=new mh,hp=new K,ma=new K,_a=new K,ga=new K,bc=new K,va=new K,dp=new K,xa=new K;class Hn extends yn{constructor(e=new lr,t=new _h){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){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,r=i.attributes.position,s=i.morphAttributes.position,o=i.morphTargetsRelative;t.fromBufferAttribute(r,e);const a=this.morphTargetInfluences;if(s&&a){va.set(0,0,0);for(let l=0,u=s.length;l<u;l++){const c=a[l],f=s[l];c!==0&&(bc.fromBufferAttribute(f,e),o?va.addScaledVector(bc,c):va.addScaledVector(bc.sub(t),c))}t.add(va)}return t}raycast(e,t){const i=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),pa.copy(i.boundingSphere),pa.applyMatrix4(s),_r.copy(e.ray).recast(e.near),!(pa.containsPoint(_r.origin)===!1&&(_r.intersectSphere(pa,hp)===null||_r.origin.distanceToSquared(hp)>(e.far-e.near)**2))&&(fp.copy(s).invert(),_r.copy(e.ray).applyMatrix4(fp),!(i.boundingBox!==null&&_r.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,_r)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,u=s.attributes.uv,c=s.attributes.uv1,f=s.attributes.normal,h=s.groups,d=s.drawRange;if(a!==null)if(Array.isArray(o))for(let g=0,_=h.length;g<_;g++){const m=h[g],p=o[m.materialIndex],T=Math.max(m.start,d.start),x=Math.min(a.count,Math.min(m.start+m.count,d.start+d.count));for(let v=T,A=x;v<A;v+=3){const w=a.getX(v),C=a.getX(v+1),P=a.getX(v+2);r=ya(this,p,e,i,u,c,f,w,C,P),r&&(r.faceIndex=Math.floor(v/3),r.face.materialIndex=m.materialIndex,t.push(r))}}else{const g=Math.max(0,d.start),_=Math.min(a.count,d.start+d.count);for(let m=g,p=_;m<p;m+=3){const T=a.getX(m),x=a.getX(m+1),v=a.getX(m+2);r=ya(this,o,e,i,u,c,f,T,x,v),r&&(r.faceIndex=Math.floor(m/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(o))for(let g=0,_=h.length;g<_;g++){const m=h[g],p=o[m.materialIndex],T=Math.max(m.start,d.start),x=Math.min(l.count,Math.min(m.start+m.count,d.start+d.count));for(let v=T,A=x;v<A;v+=3){const w=v,C=v+1,P=v+2;r=ya(this,p,e,i,u,c,f,w,C,P),r&&(r.faceIndex=Math.floor(v/3),r.face.materialIndex=m.materialIndex,t.push(r))}}else{const g=Math.max(0,d.start),_=Math.min(l.count,d.start+d.count);for(let m=g,p=_;m<p;m+=3){const T=m,x=m+1,v=m+2;r=ya(this,o,e,i,u,c,f,T,x,v),r&&(r.faceIndex=Math.floor(m/3),t.push(r))}}}}function Ob(n,e,t,i,r,s,o,a){let l;if(e.side===on?l=i.intersectTriangle(o,s,r,!0,a):l=i.intersectTriangle(r,s,o,e.side===nr,a),l===null)return null;xa.copy(a),xa.applyMatrix4(n.matrixWorld);const u=t.ray.origin.distanceTo(xa);return u<t.near||u>t.far?null:{distance:u,point:xa.clone(),object:n}}function ya(n,e,t,i,r,s,o,a,l,u){n.getVertexPosition(a,ma),n.getVertexPosition(l,_a),n.getVertexPosition(u,ga);const c=Ob(n,e,t,i,ma,_a,ga,dp);if(c){const f=new K;Bn.getBarycoord(dp,ma,_a,ga,f),r&&(c.uv=Bn.getInterpolatedAttribute(r,a,l,u,f,new Je)),s&&(c.uv1=Bn.getInterpolatedAttribute(s,a,l,u,f,new Je)),o&&(c.normal=Bn.getInterpolatedAttribute(o,a,l,u,f,new K),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));const h={a,b:l,c:u,normal:new K,materialIndex:0};Bn.getNormal(ma,_a,ga,h.normal),c.face=h,c.barycoord=f}return c}class Xo extends lr{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=[],u=[],c=[],f=[];let h=0,d=0;g("z","y","x",-1,-1,i,t,e,o,s,0),g("z","y","x",1,-1,i,t,-e,o,s,1
vendor: 10,996 bytes, lines 39-78
39),g("x","z","y",1,1,e,i,t,r,o,2),g("x","z","y",1,-1,e,i,-t,r,o,3),g("x","y","z",1,-1,e,t,i,r,s,4),g("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new Ei(u,3)),this.setAttribute("normal",new Ei(c,3)),this.setAttribute("uv",new Ei(f,2));function g(_,m,p,T,x,v,A,w,C,P,S){const M=v/C,I=A/P,z=v/2,O=A/2,X=w/2,J=C+1,D=P+1;let V=0,U=0;const se=new K;for(let fe=0;fe<D;fe++){const pe=fe*I-O;for(let Ee=0;Ee<J;Ee++){const Ge=Ee*M-z;se[_]=Ge*T,se[m]=pe*x,se[p]=X,u.push(se.x,se.y,se.z),se[_]=0,se[m]=0,se[p]=w>0?1:-1,c.push(se.x,se.y,se.z),f.push(Ee/C),f.push(1-fe/P),V+=1}}for(let fe=0;fe<P;fe++)for(let pe=0;pe<C;pe++){const Ee=h+pe+J*fe,Ge=h+pe+J*(fe+1),te=h+(pe+1)+J*(fe+1),le=h+(pe+1)+J*fe;l.push(Ee,Ge,le),l.push(Ge,te,le),U+=6}a.addGroup(d,U,S),d+=U,h+=V}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Xo(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Vs(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():Array.isArray(r)?e[t][i]=r.slice():e[t][i]=r}}return e}function Wt(n){const e={};for(let t=0;t<n.length;t++){const i=Vs(n[t]);for(const r in i)e[r]=i[r]}return e}function Fb(n){const e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function v0(n){const e=n.getRenderTarget();return e===null?n.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:qe.workingColorSpace}const x0={clone:Vs,merge:Wt};var Bb=`void main() { 40 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 41}`,kb=`void main() { 42 gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); 43}`;class ii extends Cl{static get type(){return"ShaderMaterial"}constructor(e){super(),this.isShaderMaterial=!0,this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=Bb,this.fragmentShader=kb,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,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Vs(e.uniforms),this.uniformsGroups=Fb(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;o&&o.isTexture?t.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[r]={type:"m4",value:o.toArray()}:t.uniforms[r]={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)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class y0 extends yn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Tt,this.projectionMatrix=new Tt,this.projectionMatrixInverse=new Tt,this.coordinateSystem=yi}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 Fi=new K,pp=new Je,mp=new Je;class An extends y0{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=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Bo*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(So*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Bo*2*Math.atan(Math.tan(So*.5*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){Fi.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Fi.x,Fi.y).multiplyScalar(-e/Fi.z),Fi.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Fi.x,Fi.y).multiplyScalar(-e/Fi.z)}getViewSize(e,t){return this.getViewBounds(e,pp,mp),t.subVectors(mp,pp)}setViewOffset(e,t,i,r,s,o){this.aspect=e/t,this.view===null&&(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(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(So*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,u=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/u,r*=o.width/l,i*=o.height/u}const a=this.filmOffset;a!==0&&(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,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const rs=-90,ss=1;class Hb extends yn{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new An(rs,ss,e,t);r.layers=this.layers,this.add(r);const s=new An(rs,ss,e,t);s.layers=this.layers,this.add(s);const o=new An(rs,ss,e,t);o.layers=this.layers,this.add(o);const a=new An(rs,ss,e,t);a.layers=this.layers,this.add(a);const l=new An(rs,ss,e,t);l.layers=this.layers,this.add(l);const u=new An(rs,ss,e,t);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,l]=t;for(const u of t)this.remove(u);if(e===yi)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(e===fl)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 throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const u of t)this.add(u),u.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,u,c]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),g=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,u),i.texture.generateMipmaps=_,e.setRenderTarget(i,5,r),e.render(t,c),e.setRenderTarget(f,h,d),e.xr.enabled=g,i.texture.needsPMREMUpdate=!0}}class S0 extends Kt{constructor(e,t,i,r,s,o,a,l,u,c){e=e!==void 0?e:[],t=t!==void 0?t:Bs,super(e,t,i,r,s,o,a,l,u,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class zb extends ir{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new S0(r,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=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:en}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` 44 45 varying vec3 vWorldDirection; 46 47 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 48 49 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 50 51 } 52 53 void main() { 54 55 vWorldDirection = transformDirection( position, modelMatrix ); 56 57 #include <begin_vertex> 58 #include <project_vertex> 59 60 } 61 `,fragmentShader:` 62 63 uniform sampler2D tEquirect; 64 65 varying vec3 vWorldDirection; 66 67 #include <common> 68 69 void main() { 70 71 vec3 direction = normalize( vWorldDirection ); 72 73 vec2 sampleUV = equirectUv( direction ); 74 75 gl_FragColor = texture2D( tEquirect, sampleUV ); 76 77 } 78 `},r=new Xo(5,5,5),s=new ii({name:"CubemapFromEquirect",uniforms:Vs(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:on,blending:Si});s.uniforms.tEquirect.value=t;const o=new Hn(r,s),a=t.minFilter;return t.minFilter===Cr&&(t.minFilter=en),new Hb(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)}}
vendor: 5,944 bytes, line 78
78const wc=new K,Vb=new K,Gb=new ze;class Er{constructor(e=new K(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=wc.subVectors(i,t).cross(Vb.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(wc),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?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||Gb.getNormalMatrix(e),r=this.coplanarPoint(wc).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 gr=new mh,Sa=new K;class M0{constructor(e=new Er,t=new Er,i=new Er,r=new Er,s=new Er,o=new Er){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=yi){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],u=r[4],c=r[5],f=r[6],h=r[7],d=r[8],g=r[9],_=r[10],m=r[11],p=r[12],T=r[13],x=r[14],v=r[15];if(i[0].setComponents(l-s,h-u,m-d,v-p).normalize(),i[1].setComponents(l+s,h+u,m+d,v+p).normalize(),i[2].setComponents(l+o,h+c,m+g,v+T).normalize(),i[3].setComponents(l-o,h-c,m-g,v-T).normalize(),i[4].setComponents(l-a,h-f,m-_,v-x).normalize(),t===yi)i[5].setComponents(l+a,h+f,m+_,v+x).normalize();else if(t===fl)i[5].setComponents(a,f,_,x).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),gr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),gr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(gr)}intersectsSprite(e){return gr.center.set(0,0,0),gr.radius=.7071067811865476,gr.applyMatrix4(e.matrixWorld),this.intersectsSphere(gr)}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(Sa.x=r.normal.x>0?e.max.x:e.min.x,Sa.y=r.normal.y>0?e.max.y:e.min.y,Sa.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Sa)<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)}}function E0(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function Wb(n){const e=new WeakMap;function t(a,l){const u=a.array,c=a.usage,f=u.byteLength,h=n.createBuffer();n.bindBuffer(l,h),n.bufferData(l,u,c),a.onUploadCallback();let d;if(u instanceof Float32Array)d=n.FLOAT;else if(u instanceof Uint16Array)a.isFloat16BufferAttribute?d=n.HALF_FLOAT:d=n.UNSIGNED_SHORT;else if(u instanceof Int16Array)d=n.SHORT;else if(u instanceof Uint32Array)d=n.UNSIGNED_INT;else if(u instanceof Int32Array)d=n.INT;else if(u instanceof Int8Array)d=n.BYTE;else if(u instanceof Uint8Array)d=n.UNSIGNED_BYTE;else if(u instanceof Uint8ClampedArray)d=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+u);return{buffer:h,type:d,bytesPerElement:u.BYTES_PER_ELEMENT,version:a.version,size:f}}function i(a,l,u){const c=l.array,f=l.updateRanges;if(n.bindBuffer(u,a),f.length===0)n.bufferSubData(u,0,c);else{f.sort((d,g)=>d.start-g.start);let h=0;for(let d=1;d<f.length;d++){const g=f[h],_=f[d];_.start<=g.start+g.count+1?g.count=Math.max(g.count,_.start+_.count-g.start):(++h,f[h]=_)}f.length=h+1;for(let d=0,g=f.length;d<g;d++){const _=f[d];n.bufferSubData(u,_.start*c.BYTES_PER_ELEMENT,c,_.start,_.count)}l.clearUpdateRanges()}l.onUploadCallback()}function r(a){return a.isInterleavedBufferAttribute&&(a=a.data),e.get(a)}function s(a){a.isInterleavedBufferAttribute&&(a=a.data);const l=e.get(a);l&&(n.deleteBuffer(l.buffer),e.delete(a))}function o(a,l){if(a.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const c=e.get(a);(!c||c.version<a.version)&&e.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});return}const u=e.get(a);if(u===void 0)e.set(a,t(a,l));else if(u.version<a.version){if(u.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.");
vendor: 5,009 bytes, lines 78-191
78i(u.buffer,a,l),u.version=a.version}}return{get:r,remove:s,update:o}}class qo extends lr{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),u=a+1,c=l+1,f=e/a,h=t/l,d=[],g=[],_=[],m=[];for(let p=0;p<c;p++){const T=p*h-o;for(let x=0;x<u;x++){const v=x*f-s;g.push(v,-T,0),_.push(0,0,1),m.push(x/a),m.push(1-p/l)}}for(let p=0;p<l;p++)for(let T=0;T<a;T++){const x=T+u*p,v=T+u*(p+1),A=T+1+u*(p+1),w=T+1+u*p;d.push(x,v,w),d.push(v,A,w)}this.setIndex(d),this.setAttribute("position",new Ei(g,3)),this.setAttribute("normal",new Ei(_,3)),this.setAttribute("uv",new Ei(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new qo(e.width,e.height,e.widthSegments,e.heightSegments)}}var Xb=`#ifdef USE_ALPHAHASH 79 if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; 80#endif`,qb=`#ifdef USE_ALPHAHASH 81 const float ALPHA_HASH_SCALE = 0.05; 82 float hash2D( vec2 value ) { 83 return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); 84 } 85 float hash3D( vec3 value ) { 86 return hash2D( vec2( hash2D( value.xy ), value.z ) ); 87 } 88 float getAlphaHashThreshold( vec3 position ) { 89 float maxDeriv = max( 90 length( dFdx( position.xyz ) ), 91 length( dFdy( position.xyz ) ) 92 ); 93 float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); 94 vec2 pixScales = vec2( 95 exp2( floor( log2( pixScale ) ) ), 96 exp2( ceil( log2( pixScale ) ) ) 97 ); 98 vec2 alpha = vec2( 99 hash3D( floor( pixScales.x * position.xyz ) ), 100 hash3D( floor( pixScales.y * position.xyz ) ) 101 ); 102 float lerpFactor = fract( log2( pixScale ) ); 103 float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; 104 float a = min( lerpFactor, 1.0 - lerpFactor ); 105 vec3 cases = vec3( 106 x * x / ( 2.0 * a * ( 1.0 - a ) ), 107 ( x - 0.5 * a ) / ( 1.0 - a ), 108 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) 109 ); 110 float threshold = ( x < ( 1.0 - a ) ) 111 ? ( ( x < a ) ? cases.x : cases.y ) 112 : cases.z; 113 return clamp( threshold , 1.0e-6, 1.0 ); 114 } 115#endif`,Yb=`#ifdef USE_ALPHAMAP 116 diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; 117#endif`,$b=`#ifdef USE_ALPHAMAP 118 uniform sampler2D alphaMap; 119#endif`,jb=`#ifdef USE_ALPHATEST 120 #ifdef ALPHA_TO_COVERAGE 121 diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); 122 if ( diffuseColor.a == 0.0 ) discard; 123 #else 124 if ( diffuseColor.a < alphaTest ) discard; 125 #endif 126#endif`,Kb=`#ifdef USE_ALPHATEST 127 uniform float alphaTest; 128#endif`,Zb=`#ifdef USE_AOMAP 129 float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; 130 reflectedLight.indirectDiffuse *= ambientOcclusion; 131 #if defined( USE_CLEARCOAT ) 132 clearcoatSpecularIndirect *= ambientOcclusion; 133 #endif 134 #if defined( USE_SHEEN ) 135 sheenSpecularIndirect *= ambientOcclusion; 136 #endif 137 #if defined( USE_ENVMAP ) && defined( STANDARD ) 138 float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); 139 reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); 140 #endif 141#endif`,Jb=`#ifdef USE_AOMAP 142 uniform sampler2D aoMap; 143 uniform float aoMapIntensity; 144#endif`,Qb=`#ifdef USE_BATCHING 145 #if ! defined( GL_ANGLE_multi_draw ) 146 #define gl_DrawID _gl_DrawID 147 uniform int _gl_DrawID; 148 #endif 149 uniform highp sampler2D batchingTexture; 150 uniform highp usampler2D batchingIdTexture; 151 mat4 getBatchingMatrix( const in float i ) { 152 int size = textureSize( batchingTexture, 0 ).x; 153 int j = int( i ) * 4; 154 int x = j % size; 155 int y = j / size; 156 vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); 157 vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); 158 vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); 159 vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); 160 return mat4( v1, v2, v3, v4 ); 161 } 162 float getIndirectIndex( const in int i ) { 163 int size = textureSize( batchingIdTexture, 0 ).x; 164 int x = i % size; 165 int y = i / size; 166 return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r ); 167 } 168#endif 169#ifdef USE_BATCHING_COLOR 170 uniform sampler2D batchingColorTexture; 171 vec3 getBatchingColor( const in float i ) { 172 int size = textureSize( batchingColorTexture, 0 ).x; 173 int j = int( i ); 174 int x = j % size; 175 int y = j / size; 176 return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb; 177 } 178#endif`,ew=`#ifdef USE_BATCHING 179 mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) ); 180#endif`,tw=`vec3 transformed = vec3( position ); 181#ifdef USE_ALPHAHASH 182 vPosition = vec3( position ); 183#endif`,nw=`vec3 objectNormal = vec3( normal ); 184#ifdef USE_TANGENT 185 vec3 objectTangent = vec3( tangent.xyz ); 186#endif`,iw=`float G_BlinnPhong_Implicit( ) { 187 return 0.25; 188} 189float D_BlinnPhong( const in float shininess, const in float dotNH ) { 190 return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); 191}
192vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { 193 vec3 halfDir = normalize( lightDir + viewDir ); 194 float dotNH = saturate( dot( normal, halfDir ) ); 195 float dotVH = saturate( dot( viewDir, halfDir ) ); 196 vec3 F = F_Schlick( specularColor, 1.0, dotVH ); 197 float G = G_BlinnPhong_Implicit( ); 198 float D = D_BlinnPhong( shininess, dotNH ); 199 return F * ( G * D ); 200} // validated`,rw=`#ifdef USE_IRIDESCENCE 201 const mat3 XYZ_TO_REC709 = mat3( 202 3.2404542, -0.9692660, 0.0556434, 203 -1.5371385, 1.8760108, -0.2040259, 204 -0.4985314, 0.0415560, 1.0572252 205 ); 206 vec3 Fresnel0ToIor( vec3 fresnel0 ) { 207 vec3 sqrtF0 = sqrt( fresnel0 ); 208 return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); 209 } 210 vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { 211 return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); 212 } 213 float IorToFresnel0( float transmittedIor, float incidentIor ) { 214 return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); 215 } 216 vec3 evalSensitivity( float OPD, vec3 shift ) { 217 float phase = 2.0 * PI * OPD * 1.0e-9; 218 vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); 219 vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); 220 vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); 221 vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); 222 xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) ); 223 xyz /= 1.0685e-7; 224 vec3 rgb = XYZ_TO_REC709 * xyz; 225 return rgb; 226 } 227 vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { 228 vec3 I; 229 float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); 230 float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); 231 float cosTheta2Sq = 1.0 - sinTheta2Sq; 232 if ( cosTheta2Sq < 0.0 ) { 233 return vec3( 1.0 ); 234 } 235 float cosTheta2 = sqrt( cosTheta2Sq ); 236 float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); 237 float R12 = F_Schlick( R0, 1.0, cosTheta1 );
238 float T121 = 1.0 - R12; 239 float phi12 = 0.0; 240 if ( iridescenceIOR < outsideIOR ) phi12 = PI; 241 float phi21 = PI - phi12; 242 vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); 243 vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); 244 vec3 phi23 = vec3( 0.0 ); 245 if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; 246 if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; 247 if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; 248 float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; 249 vec3 phi = vec3( phi21 ) + phi23; 250 vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); 251 vec3 r123 = sqrt( R123 ); 252 vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); 253 vec3 C0 = R12 + Rs; 254 I = C0; 255 vec3 Cm = Rs - T121; 256 for ( int m = 1; m <= 2; ++ m ) { 257 Cm *= r123; 258 vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); 259 I += Cm * Sm; 260 } 261 return max( I, vec3( 0.0 ) ); 262 } 263#endif`,sw=`#ifdef USE_BUMPMAP 264 uniform sampler2D bumpMap; 265 uniform float bumpScale; 266 vec2 dHdxy_fwd() { 267 vec2 dSTdx = dFdx( vBumpMapUv ); 268 vec2 dSTdy = dFdy( vBumpMapUv ); 269 float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; 270 float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; 271 float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; 272 return vec2( dBx, dBy ); 273 } 274 vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { 275 vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); 276 vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); 277 vec3 vN = surf_norm; 278 vec3 R1 = cross( vSigmaY, vN ); 279 vec3 R2 = cross( vN, vSigmaX ); 280 float fDet = dot( vSigmaX, R1 ) * faceDirection; 281 vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); 282 return normalize( abs( fDet ) * surf_norm - vGrad ); 283 } 284#endif`,ow=`#if NUM_CLIPPING_PLANES > 0 285 vec4 plane; 286 #ifdef ALPHA_TO_COVERAGE 287 float distanceToPlane, distanceGradient; 288 float clipOpacity = 1.0; 289 #pragma unroll_loop_start 290 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 291 plane = clippingPlanes[ i ]; 292 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 293 distanceGradient = fwidth( distanceToPlane ) / 2.0; 294 clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 295 if ( clipOpacity == 0.0 ) discard; 296 } 297 #pragma unroll_loop_end 298 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 299 float unionClipOpacity = 1.0; 300 #pragma unroll_loop_start 301 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 302 plane = clippingPlanes[ i ]; 303 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 304 distanceGradient = fwidth( distanceToPlane ) / 2.0; 305 unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 306 } 307 #pragma unroll_loop_end 308 clipOpacity *= 1.0 - unionClipOpacity; 309 #endif 310 diffuseColor.a *= clipOpacity; 311 if ( diffuseColor.a == 0.0 ) discard; 312 #else 313 #pragma unroll_loop_start 314 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 315 plane = clippingPlanes[ i ]; 316 if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; 317 } 318 #pragma unroll_loop_end 319 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 320 bool clipped = true; 321 #pragma unroll_loop_start 322 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 323 plane = clippingPlanes[ i ]; 324 clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; 325 } 326 #pragma unroll_loop_end 327 if ( clipped ) discard; 328 #endif 329 #endif 330#endif`,aw=`#if NUM_CLIPPING_PLANES > 0 331 varying vec3 vClipPosition; 332 uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; 333#endif`,lw=`#if NUM_CLIPPING_PLANES > 0 334 varying vec3 vClipPosition; 335#endif`,cw=`#if NUM_CLIPPING_PLANES > 0 336 vClipPosition = - mvPosition.xyz; 337#endif`,uw=`#if defined( USE_COLOR_ALPHA ) 338 diffuseColor *= vColor; 339#elif defined( USE_COLOR ) 340 diffuseColor.rgb *= vColor; 341#endif`,fw=`#if defined( USE_COLOR_ALPHA ) 342 varying vec4 vColor; 343#elif defined( USE_COLOR ) 344 varying vec3 vColor; 345#endif`,hw=`#if defined( USE_COLOR_ALPHA ) 346 varying vec4 vColor; 347#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 348 varying vec3 vColor; 349#endif`,dw=`#if defined( USE_COLOR_ALPHA ) 350 vColor = vec4( 1.0 ); 351#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 352 vColor = vec3( 1.0 ); 353#endif 354#ifdef USE_COLOR 355 vColor *= color; 356#endif 357#ifdef USE_INSTANCING_COLOR 358 vColor.xyz *= instanceColor.xyz; 359#endif 360#ifdef USE_BATCHING_COLOR 361 vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); 362 vColor.xyz *= batchingColor.xyz; 363#endif`,pw=`#define PI 3.141592653589793 364#define PI2 6.283185307179586 365#define PI_HALF 1.5707963267948966 366#define RECIPROCAL_PI 0.3183098861837907 367#define RECIPROCAL_PI2 0.15915494309189535 368#define EPSILON 1e-6 369#ifndef saturate 370#define saturate( a ) clamp( a, 0.0, 1.0 ) 371#endif 372#define whiteComplement( a ) ( 1.0 - saturate( a ) ) 373float pow2( const in float x ) { return x*x; } 374vec3 pow2( const in vec3 x ) { return x*x; } 375float pow3( const in float x ) { return x*x*x; } 376float pow4( const in float x ) { float x2 = x*x; return x2*x2; } 377float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } 378float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } 379highp float rand( const in vec2 uv ) { 380 const highp float a = 12.9898, b = 78.233, c = 43758.5453; 381 highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); 382 return fract( sin( sn ) * c ); 383} 384#ifdef HIGH_PRECISION 385 float precisionSafeLength( vec3 v ) { return length( v ); } 386#else 387 float precisionSafeLength( vec3 v ) { 388 float maxComponent = max3( abs( v ) ); 389 return length( v / maxComponent ) * maxComponent; 390 } 391#endif 392struct IncidentLight { 393 vec3 color; 394 vec3 direction; 395 bool visible; 396}; 397struct ReflectedLight { 398 vec3 directDiffuse; 399 vec3 directSpecular; 400 vec3 indirectDiffuse; 401 vec3 indirectSpecular; 402}; 403#ifdef USE_ALPHAHASH 404 varying vec3 vPosition; 405#endif 406vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 407 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 408} 409vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { 410 return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); 411} 412mat3 transposeMat3( const in mat3 m ) { 413 mat3 tmp; 414 tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); 415 tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); 416 tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); 417 return tmp; 418} 419bool isPerspectiveMatrix( mat4 m ) { 420 return m[ 2 ][ 3 ] == - 1.0; 421} 422vec2 equirectUv( in vec3 dir ) { 423 float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; 424 float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; 425 return vec2( u, v ); 426}
427vec3 BRDF_Lambert( const in vec3 diffuseColor ) { 428 return RECIPROCAL_PI * diffuseColor; 429} 430vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 431 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 432 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 433} 434float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { 435 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 436 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 437} // validated`,mw=`#ifdef ENVMAP_TYPE_CUBE_UV 438 #define cubeUV_minMipLevel 4.0 439 #define cubeUV_minTileSize 16.0 440 float getFace( vec3 direction ) { 441 vec3 absDirection = abs( direction ); 442 float face = - 1.0; 443 if ( absDirection.x > absDirection.z ) { 444 if ( absDirection.x > absDirection.y ) 445 face = direction.x > 0.0 ? 0.0 : 3.0; 446 else 447 face = direction.y > 0.0 ? 1.0 : 4.0; 448 } else { 449 if ( absDirection.z > absDirection.y ) 450 face = direction.z > 0.0 ? 2.0 : 5.0; 451 else 452 face = direction.y > 0.0 ? 1.0 : 4.0; 453 } 454 return face; 455 } 456 vec2 getUV( vec3 direction, float face ) { 457 vec2 uv; 458 if ( face == 0.0 ) { 459 uv = vec2( direction.z, direction.y ) / abs( direction.x ); 460 } else if ( face == 1.0 ) { 461 uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); 462 } else if ( face == 2.0 ) { 463 uv = vec2( - direction.x, direction.y ) / abs( direction.z ); 464 } else if ( face == 3.0 ) { 465 uv = vec2( - direction.z, direction.y ) / abs( direction.x ); 466 } else if ( face == 4.0 ) { 467 uv = vec2( - direction.x, direction.z ) / abs( direction.y ); 468 } else { 469 uv = vec2( direction.x, direction.y ) / abs( direction.z ); 470 } 471 return 0.5 * ( uv + 1.0 ); 472 } 473 vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { 474 float face = getFace( direction ); 475 float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); 476 mipInt = max( mipInt, cubeUV_minMipLevel ); 477 float faceSize = exp2( mipInt ); 478 highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; 479 if ( face > 2.0 ) { 480 uv.y += faceSize; 481 face -= 3.0; 482 } 483 uv.x += face * faceSize; 484 uv.x += filterInt * 3.0 * cubeUV_minTileSize; 485 uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); 486 uv.x *= CUBEUV_TEXEL_WIDTH; 487 uv.y *= CUBEUV_TEXEL_HEIGHT; 488 #ifdef texture2DGradEXT 489 return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; 490 #else 491 return texture2D( envMap, uv ).rgb; 492 #endif 493 } 494 #define cubeUV_r0 1.0 495 #define cubeUV_m0 - 2.0 496 #define cubeUV_r1 0.8 497 #define cubeUV_m1 - 1.0 498 #define cubeUV_r4 0.4 499 #define cubeUV_m4 2.0 500 #define cubeUV_r5 0.305 501 #define cubeUV_m5 3.0 502 #define cubeUV_r6 0.21 503 #define cubeUV_m6 4.0 504 float roughnessToMip( float roughness ) { 505 float mip = 0.0; 506 if ( roughness >= cubeUV_r1 ) { 507 mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; 508 } else if ( roughness >= cubeUV_r4 ) { 509 mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; 510 } else if ( roughness >= cubeUV_r5 ) { 511 mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; 512 } else if ( roughness >= cubeUV_r6 ) { 513 mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; 514 } else { 515 mip = - 2.0 * log2( 1.16 * roughness ); } 516 return mip; 517 } 518 vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { 519 float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); 520 float mipF = fract( mip ); 521 float mipInt = floor( mip ); 522 vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); 523 if ( mipF == 0.0 ) { 524 return vec4( color0, 1.0 ); 525 } else { 526 vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); 527 return vec4( mix( color0, color1, mipF ), 1.0 ); 528 } 529 } 530#endif`,_w=`vec3 transformedNormal = objectNormal; 531#ifdef USE_TANGENT 532 vec3 transformedTangent = objectTangent; 533#endif 534#ifdef USE_BATCHING 535 mat3 bm = mat3( batchingMatrix ); 536 transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); 537 transformedNormal = bm * transformedNormal; 538 #ifdef USE_TANGENT 539 transformedTangent = bm * transformedTangent; 540 #endif 541#endif 542#ifdef USE_INSTANCING 543 mat3 im = mat3( instanceMatrix ); 544 transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); 545 transformedNormal = im * transformedNormal; 546 #ifdef USE_TANGENT 547 transformedTangent = im * transformedTangent; 548 #endif 549#endif 550transformedNormal = normalMatrix * transformedNormal; 551#ifdef FLIP_SIDED 552 transformedNormal = - transformedNormal; 553#endif 554#ifdef USE_TANGENT 555 transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; 556 #ifdef FLIP_SIDED 557 transformedTangent = - transformedTangent; 558 #endif 559#endif`,gw=`#ifdef USE_DISPLACEMENTMAP 560 uniform sampler2D displacementMap; 561 uniform float displacementScale; 562 uniform float displacementBias; 563#endif`,vw=`#ifdef USE_DISPLACEMENTMAP 564 transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
564placementBias ); 565#endif`,xw=`#ifdef USE_EMISSIVEMAP 566 vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); 567 #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE 568 emissiveColor = sRGBTransferEOTF( emissiveColor ); 569 #endif 570 totalEmissiveRadiance *= emissiveColor.rgb; 571#endif`,yw=`#ifdef USE_EMISSIVEMAP 572 uniform sampler2D emissiveMap; 573#endif`,Sw="gl_FragColor = linearToOutputTexel( gl_FragColor );",Mw=`vec4 LinearTransferOETF( in vec4 value ) { 574 return value; 575} 576vec4 sRGBTransferEOTF( in vec4 value ) { 577 return 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 ); 578} 579vec4 sRGBTransferOETF( in vec4 value ) { 580 return 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 ); 581}`,Ew=`#ifdef USE_ENVMAP 582 #ifdef ENV_WORLDPOS 583 vec3 cameraToFrag; 584 if ( isOrthographic ) { 585 cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 586 } else { 587 cameraToFrag = normalize( vWorldPosition - cameraPosition ); 588 } 589 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 590 #ifdef ENVMAP_MODE_REFLECTION 591 vec3 reflectVec = reflect( cameraToFrag, worldNormal ); 592 #else 593 vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); 594 #endif 595 #else 596 vec3 reflectVec = vReflect; 597 #endif 598 #ifdef ENVMAP_TYPE_CUBE 599 vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); 600 #else 601 vec4 envColor = vec4( 0.0 ); 602 #endif 603 #ifdef ENVMAP_BLENDING_MULTIPLY 604 outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); 605 #elif defined( ENVMAP_BLENDING_MIX ) 606 outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); 607 #elif defined( ENVMAP_BLENDING_ADD ) 608 outgoingLight += envColor.xyz * specularStrength * reflectivity; 609 #endif 610#endif`,Tw=`#ifdef USE_ENVMAP 611 uniform float envMapIntensity; 612 uniform float flipEnvMap; 613 uniform mat3 envMapRotation; 614 #ifdef ENVMAP_TYPE_CUBE 615 uniform samplerCube envMap; 616 #else 617 uniform sampler2D envMap; 618 #endif 619 620#endif`,bw=`#ifdef USE_ENVMAP 621 uniform float reflectivity; 622 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 623 #define ENV_WORLDPOS 624 #endif 625 #ifdef ENV_WORLDPOS 626 varying vec3 vWorldPosition; 627 uniform float refractionRatio; 628 #else 629 varying vec3 vReflect; 630 #endif 631#endif`,ww=`#ifdef USE_ENVMAP 632 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 633 #define ENV_WORLDPOS 634 #endif 635 #ifdef ENV_WORLDPOS 636 637 varying vec3 vWorldPosition; 638 #else 639 varying vec3 vReflect; 640 uniform float refractionRatio; 641 #endif 642#endif`,Aw=`#ifdef USE_ENVMAP 643 #ifdef ENV_WORLDPOS 644 vWorldPosition = worldPosition.xyz; 645 #else 646 vec3 cameraToVertex; 647 if ( isOrthographic ) { 648 cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 649 } else {
650 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); 651 } 652 vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 653 #ifdef ENVMAP_MODE_REFLECTION 654 vReflect = reflect( cameraToVertex, worldNormal ); 655 #else 656 vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); 657 #endif 658 #endif 659#endif`,Rw=`#ifdef USE_FOG 660 vFogDepth = - mvPosition.z; 661#endif`,Cw=`#ifdef USE_FOG 662 varying float vFogDepth; 663#endif`,Pw=`#ifdef USE_FOG 664 #ifdef FOG_EXP2 665 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); 666 #else 667 float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); 668 #endif 669 gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); 670#endif`,Dw=`#ifdef USE_FOG 671 uniform vec3 fogColor; 672 varying float vFogDepth; 673 #ifdef FOG_EXP2 674 uniform float fogDensity; 675 #else 676 uniform float fogNear; 677 uniform float fogFar; 678 #endif 679#endif`,Lw=`#ifdef USE_GRADIENTMAP 680 uniform sampler2D gradientMap; 681#endif 682vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 683 float dotNL = dot( normal, lightDirection ); 684 vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); 685 #ifdef USE_GRADIENTMAP 686 return vec3( texture2D( gradientMap, coord ).r ); 687 #else 688 vec2 fw = fwidth( coord ) * 0.5; 689 return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); 690 #endif 691}`,Iw=`#ifdef USE_LIGHTMAP 692 uniform sampler2D lightMap; 693 uniform float lightMapIntensity; 694#endif`,Uw=`LambertMaterial material; 695material.diffuseColor = diffuseColor.rgb; 696material.specularStrength = specularStrength;`,Nw=`varying vec3 vViewPosition; 697struct LambertMaterial { 698 vec3 diffuseColor; 699 float specularStrength; 700}; 701void 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 ) { 702 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 703 vec3 irradiance = dotNL * directLight.color; 704 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 705} 706void 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 ) { 707 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 708} 709#define RE_Direct RE_Direct_Lambert 710#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Ow=`uniform bool receiveShadow; 711uniform vec3 ambientLightColor; 712#if defined( USE_LIGHT_PROBES ) 713 uniform vec3 lightProbe[ 9 ]; 714#endif 715vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { 716 float x = normal.x, y = normal.y, z = normal.z; 717 vec3 result = shCoefficients[ 0 ] * 0.886227; 718 result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; 719 result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; 720 result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; 721 result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; 722 result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; 723 result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); 724 result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; 725 result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); 726 return result; 727} 728vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { 729 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 730 vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); 731 return irradiance; 732} 733vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { 734 vec3 irradiance = ambientLightColor; 735 return irradiance; 736} 737float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { 738 float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); 739 if ( cutoffDistance > 0.0 ) { 740 distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); 741 } 742 return distanceFalloff; 743} 744float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { 745 return smoothstep( coneCosine, penumbraCosine, angleCosine ); 746} 747#if NUM_DIR_LIGHTS > 0 748 struct DirectionalLight { 749 vec3 direction; 750 vec3 color; 751 }; 752 uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; 753 void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { 754 light.color = directionalLight.color; 755 light.direction = directionalLight.direction; 756 light.visible = true; 757 } 758#endif 759#if NUM_POINT_LIGHTS > 0 760 struct PointLight { 761 vec3 position; 762 vec3 color; 763 float distance; 764 float decay; 765 }; 766 uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; 767 void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { 768 vec3 lVector = pointLight.position - geometryPosition; 769 light.direction = normalize( lVector ); 770 float lightDistance = length( lVector ); 771 light.color = pointLight.color; 772 light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); 773 light.visible = ( light.color != vec3( 0.0 ) ); 774 } 775#endif
776#if NUM_SPOT_LIGHTS > 0 777 struct SpotLight { 778 vec3 position; 779 vec3 direction; 780 vec3 color; 781 float distance; 782 float decay; 783 float coneCos; 784 float penumbraCos; 785 }; 786 uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; 787 void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { 788 vec3 lVector = spotLight.position - geometryPosition; 789 light.direction = normalize( lVector ); 790 float angleCos = dot( light.direction, spotLight.direction ); 791 float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); 792 if ( spotAttenuation > 0.0 ) { 793 float lightDistance = length( lVector ); 794 light.color = spotLight.color * spotAttenuation; 795 light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); 796 light.visible = ( light.color != vec3( 0.0 ) ); 797 } else { 798 light.color = vec3( 0.0 ); 799 light.visible = false; 800 } 801 } 802#endif 803#if NUM_RECT_AREA_LIGHTS > 0 804 struct RectAreaLight { 805 vec3 color; 806 vec3 position; 807 vec3 halfWidth; 808 vec3 halfHeight; 809 }; 810 uniform sampler2D ltc_1; uniform sampler2D ltc_2; 811 uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; 812#endif 813#if NUM_HEMI_LIGHTS > 0 814 struct HemisphereLight { 815 vec3 direction; 816 vec3 skyColor; 817 vec3 groundColor; 818 }; 819 uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; 820 vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { 821 float dotNL = dot( normal, hemiLight.direction ); 822 float hemiDiffuseWeight = 0.5 * dotNL + 0.5; 823 vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); 824 return irradiance; 825 } 826#endif`,Fw=`#ifdef USE_ENVMAP 827 vec3 getIBLIrradiance( const in vec3 normal ) { 828 #ifdef ENVMAP_TYPE_CUBE_UV 829 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 830 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); 831 return PI * envMapColor.rgb * envMapIntensity; 832 #else 833 return vec3( 0.0 ); 834 #endif 835 } 836 vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { 837 #ifdef ENVMAP_TYPE_CUBE_UV 838 vec3 reflectVec = reflect( - viewDir, normal ); 839 reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); 840 reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); 841 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); 842 return envMapColor.rgb * envMapIntensity; 843 #else 844 return vec3( 0.0 ); 845 #endif 846 } 847 #ifdef USE_ANISOTROPY 848 vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { 849 #ifdef ENVMAP_TYPE_CUBE_UV 850 vec3 bentNormal = cross( bitangent, viewDir ); 851 bentNormal = normalize( cross( bentNormal, bitangent ) ); 852 bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); 853 return getIBLRadiance( viewDir, bentNormal, roughness ); 854 #else 855 return vec3( 0.0 ); 856 #endif 857 } 858 #endif 859#endif`,Bw=`ToonMaterial material; 860material.diffuseColor = diffuseColor.rgb;`,kw=`varying vec3 vViewPosition; 861struct ToonMaterial { 862 vec3 diffuseColor; 863}; 864void 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 ) { 865 vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; 866 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 867} 868void 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 ) { 869 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 870} 871#define RE_Direct RE_Direct_Toon 872#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Hw=`BlinnPhongMaterial material; 873material.diffuseColor = diffuseColor.rgb; 874material.specularColor = specular; 875material.specularShininess = shininess; 876material.specularStrength = specularStrength;`,zw=`varying vec3 vViewPosition; 877struct BlinnPhongMaterial { 878 vec3 diffuseColor; 879 vec3 specularColor; 880 float specularShininess; 881 float specularStrength; 882}; 883void 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 ) {
884 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 885 vec3 irradiance = dotNL * directLight.color; 886 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 887 reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; 888} 889void 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 ) { 890 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 891} 892#define RE_Direct RE_Direct_BlinnPhong 893#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Vw=`PhysicalMaterial material; 894material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); 895vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); 896float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); 897material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; 898material.roughness = min( material.roughness, 1.0 ); 899#ifdef IOR 900 material.ior = ior; 901 #ifdef USE_SPECULAR 902 float specularIntensityFactor = specularIntensity; 903 vec3 specularColorFactor = specularColor; 904 #ifdef USE_SPECULAR_COLORMAP 905 specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; 906 #endif 907 #ifdef USE_SPECULAR_INTENSITYMAP 908 specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; 909 #endif 910 material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); 911 #else 912 float specularIntensityFactor = 1.0; 913 vec3 specularColorFactor = vec3( 1.0 ); 914 material.specularF90 = 1.0; 915 #endif 916 material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); 917#else 918 material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); 919 material.specularF90 = 1.0; 920#endif 921#ifdef USE_CLEARCOAT 922 material.clearcoat = clearcoat; 923 material.clearcoatRoughness = clearcoatRoughness; 924 material.clearcoatF0 = vec3( 0.04 ); 925 material.clearcoatF90 = 1.0; 926 #ifdef USE_CLEARCOATMAP 927 material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; 928 #endif 929 #ifdef USE_CLEARCOAT_ROUGHNESSMAP 930 material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; 931 #endif 932 material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); 933 material.clearcoatRoughness += geometryRoughness; 934 material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); 935#endif 936#ifdef USE_DISPERSION 937 material.dispersion = dispersion; 938#endif 939#ifdef USE_IRIDESCENCE 940 material.iridescence = iridescence; 941 material.iridescenceIOR = iridescenceIOR; 942 #ifdef USE_IRIDESCENCEMAP 943 material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; 944 #endif 945 #ifdef USE_IRIDESCENCE_THICKNESSMAP 946 material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; 947 #else 948 material.iridescenceThickness = iridescenceThicknessMaximum; 949 #endif 950#endif 951#ifdef USE_SHEEN 952 material.sheenColor = sheenColor; 953 #ifdef USE_SHEEN_COLORMAP 954 material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; 955 #endif 956 material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); 957 #ifdef USE_SHEEN_ROUGHNESSMAP 958 material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; 959 #endif 960#endif 961#ifdef USE_ANISOTROPY 962 #ifdef USE_ANISOTROPYMAP 963 mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); 964 vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; 965 vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; 966 #else 967 vec2 anisotropyV = anisotropyVector; 968 #endif 969 material.anisotropy = length( anisotropyV ); 970 if( material.anisotropy == 0.0 ) { 971 anisotropyV = vec2( 1.0, 0.0 ); 972 } else { 973 anisotropyV /= material.anisotropy; 974 material.anisotropy = saturate( material.anisotropy ); 975 } 976 material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
977 material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; 978 material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; 979#endif`,Gw
vendor: 14,687 bytes, lines 979-1280
979=`struct PhysicalMaterial { 980 vec3 diffuseColor; 981 float roughness; 982 vec3 specularColor; 983 float specularF90; 984 float dispersion; 985 #ifdef USE_CLEARCOAT 986 float clearcoat; 987 float clearcoatRoughness; 988 vec3 clearcoatF0; 989 float clearcoatF90; 990 #endif 991 #ifdef USE_IRIDESCENCE 992 float iridescence; 993 float iridescenceIOR; 994 float iridescenceThickness; 995 vec3 iridescenceFresnel; 996 vec3 iridescenceF0; 997 #endif 998 #ifdef USE_SHEEN 999 vec3 sheenColor; 1000 float sheenRoughness; 1001 #endif 1002 #ifdef IOR 1003 float ior; 1004 #endif 1005 #ifdef USE_TRANSMISSION 1006 float transmission; 1007 float transmissionAlpha; 1008 float thickness; 1009 float attenuationDistance; 1010 vec3 attenuationColor; 1011 #endif 1012 #ifdef USE_ANISOTROPY 1013 float anisotropy; 1014 float alphaT; 1015 vec3 anisotropyT; 1016 vec3 anisotropyB; 1017 #endif 1018}; 1019vec3 clearcoatSpecularDirect = vec3( 0.0 ); 1020vec3 clearcoatSpecularIndirect = vec3( 0.0 ); 1021vec3 sheenSpecularDirect = vec3( 0.0 ); 1022vec3 sheenSpecularIndirect = vec3(0.0 ); 1023vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { 1024 float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); 1025 float x2 = x * x; 1026 float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); 1027 return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); 1028} 1029float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { 1030 float a2 = pow2( alpha ); 1031 float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); 1032 float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); 1033 return 0.5 / max( gv + gl, EPSILON ); 1034} 1035float D_GGX( const in float alpha, const in float dotNH ) { 1036 float a2 = pow2( alpha ); 1037 float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; 1038 return RECIPROCAL_PI * a2 / pow2( denom ); 1039} 1040#ifdef USE_ANISOTROPY 1041 float 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 ) { 1042 float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); 1043 float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); 1044 float v = 0.5 / ( gv + gl ); 1045 return saturate(v); 1046 } 1047 float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { 1048 float a2 = alphaT * alphaB; 1049 highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); 1050 highp float v2 = dot( v, v ); 1051 float w2 = a2 / v2; 1052 return RECIPROCAL_PI * a2 * pow2 ( w2 ); 1053 } 1054#endif 1055#ifdef USE_CLEARCOAT 1056 vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { 1057 vec3 f0 = material.clearcoatF0; 1058 float f90 = material.clearcoatF90; 1059 float roughness = material.clearcoatRoughness; 1060 float alpha = pow2( roughness ); 1061 vec3 halfDir = normalize( lightDir + viewDir ); 1062 float dotNL = saturate( dot( normal, lightDir ) ); 1063 float dotNV = saturate( dot( normal, viewDir ) ); 1064 float dotNH = saturate( dot( normal, halfDir ) ); 1065 float dotVH = saturate( dot( viewDir, halfDir ) ); 1066 vec3 F = F_Schlick( f0, f90, dotVH ); 1067 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1068 float D = D_GGX( alpha, dotNH ); 1069 return F * ( V * D ); 1070 } 1071#endif 1072vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1073 vec3 f0 = material.specularColor; 1074 float f90 = material.specularF90; 1075 float roughness = material.roughness; 1076 float alpha = pow2( roughness ); 1077 vec3 halfDir = normalize( lightDir + viewDir ); 1078 float dotNL = saturate( dot( normal, lightDir ) ); 1079 float dotNV = saturate( dot( normal, viewDir ) ); 1080 float dotNH = saturate( dot( normal, halfDir ) ); 1081 float dotVH = saturate( dot( viewDir, halfDir ) ); 1082 vec3 F = F_Schlick( f0, f90, dotVH ); 1083 #ifdef USE_IRIDESCENCE 1084 F = mix( F, material.iridescenceFresnel, material.iridescence ); 1085 #endif 1086 #ifdef USE_ANISOTROPY 1087 float dotTL = dot( material.anisotropyT, lightDir ); 1088 float dotTV = dot( material.anisotropyT, viewDir ); 1089 float dotTH = dot( material.anisotropyT, halfDir ); 1090 float dotBL = dot( material.anisotropyB, lightDir ); 1091 float dotBV = dot( material.anisotropyB, viewDir ); 1092 float dotBH = dot( material.anisotropyB, halfDir ); 1093 float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); 1094 float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); 1095 #else 1096 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1097 float D = D_GGX( alpha, dotNH ); 1098 #endif 1099 return F * ( V * D ); 1100} 1101vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { 1102 const float LUT_SIZE = 64.0; 1103 const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; 1104 const float LUT_BIAS = 0.5 / LUT_SIZE; 1105 float dotNV = saturate( dot( N, V ) ); 1106 vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); 1107 uv = uv * LUT_SCALE + LUT_BIAS; 1108 return uv; 1109} 1110float LTC_ClippedSphereFormFactor( const in vec3 f ) { 1111 float l = length( f ); 1112 return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); 1113} 1114vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { 1115 float x = dot( v1, v2 ); 1116 float y = abs( x ); 1117 float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; 1118 float b = 3.4175940 + ( 4.1616724 + y ) * y; 1119 float v = a / b; 1120 float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; 1121 return cross( v1, v2 ) * theta_sintheta; 1122} 1123vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { 1124 vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; 1125 vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; 1126 vec3 lightNormal = cross( v1, v2 ); 1127 if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); 1128 vec3 T1, T2; 1129 T1 = normalize( V - N * dot( V, N ) ); 1130 T2 = - cross( N, T1 ); 1131 mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); 1132 vec3 coords[ 4 ]; 1133 coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); 1134 coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); 1135 coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); 1136 coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); 1137 coords[ 0 ] = normalize( coords[ 0 ] ); 1138 coords[ 1 ] = normalize( coords[ 1 ] ); 1139 coords[ 2 ] = normalize( coords[ 2 ] ); 1140 coords[ 3 ] = normalize( coords[ 3 ] ); 1141 vec3 vectorFormFactor = vec3( 0.0 ); 1142 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); 1143 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); 1144 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); 1145 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); 1146 float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); 1147 return vec3( result ); 1148} 1149#if defined( USE_SHEEN ) 1150float D_Charlie( float roughness, float dotNH ) { 1151 float alpha = pow2( roughness ); 1152 float invAlpha = 1.0 / alpha; 1153 float cos2h = dotNH * dotNH; 1154 float sin2h = max( 1.0 - cos2h, 0.0078125 ); 1155 return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); 1156} 1157float V_Neubelt( float dotNV, float dotNL ) { 1158 return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); 1159} 1160vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { 1161 vec3 halfDir = normalize( lightDir + viewDir ); 1162 float dotNL = saturate( dot( normal, lightDir ) ); 1163 float dotNV = saturate( dot( normal, viewDir ) ); 1164 float dotNH = saturate( dot( normal, halfDir ) ); 1165 float D = D_Charlie( sheenRoughness, dotNH ); 1166 float V = V_Neubelt( dotNV, dotNL ); 1167 return sheenColor * ( D * V ); 1168} 1169#endif 1170float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1171 float dotNV = saturate( dot( normal, viewDir ) ); 1172 float r2 = roughness * roughness; 1173 float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; 1174 float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; 1175 float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); 1176 return saturate( DG * RECIPROCAL_PI ); 1177} 1178vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1179 float dotNV = saturate( dot( normal, viewDir ) ); 1180 const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); 1181 const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); 1182 vec4 r = roughness * c0 + c1; 1183 float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; 1184 vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; 1185 return fab; 1186} 1187vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { 1188 vec2 fab = DFGApprox( normal, viewDir, roughness ); 1189 return specularColor * fab.x + specularF90 * fab.y; 1190} 1191#ifdef USE_IRIDESCENCE 1192void 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 ) { 1193#else 1194void 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 ) { 1195#endif 1196 vec2 fab = DFGApprox( normal, viewDir, roughness ); 1197 #ifdef USE_IRIDESCENCE 1198 vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); 1199 #else 1200 vec3 Fr = specularColor; 1201 #endif 1202 vec3 FssEss = Fr * fab.x + specularF90 * fab.y; 1203 float Ess = fab.x + fab.y; 1204 float Ems = 1.0 - Ess; 1205 vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); 1206 singleScatter += FssEss; 1207 multiScatter += Fms * Ems; 1208} 1209#if NUM_RECT_AREA_LIGHTS > 0 1210 void 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 ) { 1211 vec3 normal = geometryNormal; 1212 vec3 viewDir = geometryViewDir; 1213 vec3 position = geometryPosition; 1214 vec3 lightPos = rectAreaLight.position; 1215 vec3 halfWidth = rectAreaLight.halfWidth; 1216 vec3 halfHeight = rectAreaLight.halfHeight; 1217 vec3 lightColor = rectAreaLight.color; 1218 float roughness = material.roughness; 1219 vec3 rectCoords[ 4 ]; 1220 rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; 1221 rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; 1222 rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; 1223 vec2 uv = LTC_Uv( normal, viewDir, roughness ); 1224 vec4 t1 = texture2D( ltc_1, uv ); 1225 vec4 t2 = texture2D( ltc_2, uv ); 1226 mat3 mInv = mat3( 1227 vec3( t1.x, 0, t1.y ), 1228 vec3( 0, 1, 0 ), 1229 vec3( t1.z, 0, t1.w ) 1230 ); 1231 vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); 1232 reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); 1233 reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); 1234 } 1235#endif 1236void 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 ) { 1237 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1238 vec3 irradiance = dotNL * directLight.color; 1239 #ifdef USE_CLEARCOAT 1240 float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); 1241 vec3 ccIrradiance = dotNLcc * directLight.color; 1242 clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); 1243 #endif 1244 #ifdef USE_SHEEN 1245 sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); 1246 #endif 1247 reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); 1248 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1249} 1250void 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 ) { 1251 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1252} 1253void 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) { 1254 #ifdef USE_CLEARCOAT 1255 clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); 1256 #endif 1257 #ifdef USE_SHEEN 1258 sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1259 #endif 1260 vec3 singleScattering = vec3( 0.0 ); 1261 vec3 multiScattering = vec3( 0.0 ); 1262 vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; 1263 #ifdef USE_IRIDESCENCE 1264 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); 1265 #else 1266 computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); 1267 #endif 1268 vec3 totalScattering = singleScattering + multiScattering; 1269 vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); 1270 reflectedLight.indirectSpecular += radiance * singleScattering; 1271 reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; 1272 reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; 1273} 1274#define RE_Direct RE_Direct_Physical 1275#define RE_Direct_RectArea RE_Direct_RectArea_Physical 1276#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical 1277#define RE_IndirectSpecular RE_IndirectSpecular_Physical 1278float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { 1279 return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); 1280}`,
1280Ww=` 1281vec3 geometryPosition = - vViewPosition; 1282vec3 geometryNormal = normal; 1283vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); 1284vec3 geometryClearcoatNormal = vec3( 0.0 ); 1285#ifdef USE_CLEARCOAT 1286 geometryClearcoatNormal = clearcoatNormal; 1287#endif 1288#ifdef USE_IRIDESCENCE 1289 float dotNVi = saturate( dot( normal, geometryViewDir ) ); 1290 if ( material.iridescenceThickness == 0.0 ) { 1291 material.iridescence = 0.0; 1292 } else { 1293 material.iridescence = saturate( material.iridescence ); 1294 } 1295 if ( material.iridescence > 0.0 ) { 1296 material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); 1297 material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); 1298 } 1299#endif 1300IncidentLight directLight; 1301#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) 1302 PointLight pointLight; 1303 #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 1304 PointLightShadow pointLightShadow; 1305 #endif 1306 #pragma unroll_loop_start 1307 for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { 1308 pointLight = pointLights[ i ]; 1309 getPointLightInfo( pointLight, geometryPosition, directLight ); 1310 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) 1311 pointLightShadow = pointLightShadows[ i ]; 1312 directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; 1313 #endif 1314 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1315 } 1316 #pragma unroll_loop_end 1317#endif 1318#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) 1319 SpotLight spotLight; 1320 vec4 spotColor; 1321 vec3 spotLightCoord; 1322 bool inSpotLightMap; 1323 #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 1324 SpotLightShadow spotLightShadow; 1325 #endif 1326 #pragma unroll_loop_start 1327 for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { 1328 spotLight = spotLights[ i ]; 1329 getSpotLightInfo( spotLight, geometryPosition, directLight ); 1330 #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1331 #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX 1332 #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1333 #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS 1334 #else 1335 #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1336 #endif 1337 #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) 1338 spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; 1339 inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); 1340 spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); 1341 directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; 1342 #endif 1343 #undef SPOT_LIGHT_MAP_INDEX 1344 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1345 spotLightShadow = spotLightShadows[ i ]; 1346 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1347 #endif 1348 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1349 } 1350 #pragma unroll_loop_end 1351#endif 1352#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) 1353 DirectionalLight directionalLight; 1354 #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 1355 DirectionalLightShadow directionalLightShadow; 1356 #endif 1357 #pragma unroll_loop_start 1358 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { 1359 directionalLight = directionalLights[ i ]; 1360 getDirectionalLightInfo( directionalLight, directLight ); 1361 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) 1362 directionalLightShadow = directionalLightShadows[ i ]; 1363 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1364 #endif 1365 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1366 } 1367 #pragma unroll_loop_end 1368#endif 1369#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) 1370 RectAreaLight rectAreaLight; 1371 #pragma unroll_loop_start 1372 for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { 1373 rectAreaLight = rectAreaLights[ i ]; 1374 RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1375 } 1376 #pragma unroll_loop_end 1377#endif 1378#if defined( RE_IndirectDiffuse ) 1379 vec3 iblIrradiance = vec3( 0.0 ); 1380 vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); 1381 #if defined( USE_LIGHT_PROBES ) 1382 irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); 1383 #endif 1384 #if ( NUM_HEMI_LIGHTS > 0 ) 1385 #pragma unroll_loop_start 1386 for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { 1387 irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); 1388 } 1389 #pragma unroll_loop_end 1390 #endif 1391#endif 1392#if defined( RE_IndirectSpecular ) 1393 vec3 radiance = vec3( 0.0 ); 1394 vec3 clearcoatRadiance = vec3( 0.0 ); 1395#endif`,Xw=`#if defined( RE_IndirectDiffuse ) 1396 #ifdef USE_LIGHTMAP 1397 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1398 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1399 irradiance += lightMapIrradiance; 1400 #endif 1401 #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) 1402 iblIrradiance += getIBLIrradiance( geometryNormal ); 1403 #endif 1404#endif 1405#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) 1406 #ifdef USE_ANISOTROPY 1407 radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); 1408 #else 1409 radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); 1410 #endif 1411 #ifdef USE_CLEARCOAT 1412 clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); 1413 #endif 1414#endif`,qw=`#if defined( RE_IndirectDiffuse ) 1415 RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1416#endif 1417#if defined( RE_IndirectSpecular ) 1418 RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1419#endif`,Yw=`#if defined( USE_LOGDEPTHBUF ) 1420 gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; 1421#endif`,$w=`#if defined( USE_LOGDEPTHBUF ) 1422 uniform float logDepthBufFC; 1423 varying float vFragDepth; 1424 varying float vIsPerspective; 1425#endif`,jw=`#ifdef USE_LOGDEPTHBUF 1426 varying float vFragDepth; 1427 varying float vIsPerspective; 1428#endif`,Kw=`#ifdef USE_LOGDEPTHBUF 1429 vFragDepth = 1.0 + gl_Position.w; 1430 vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); 1431#endif`,Zw=`#ifdef USE_MAP 1432 vec4 sampledDiffuseColor = texture2D( map, vMapUv ); 1433 #ifdef DECODE_VIDEO_TEXTURE 1434 sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); 1435 #endif 1436 diffuseColor *= sampledDiffuseColor; 1437#endif`,Jw=`#ifdef USE_MAP 1438 uniform sampler2D map; 1439#endif`,Qw=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1440 #if defined( USE_POINTS_UV ) 1441 vec2 uv = vUv; 1442 #else 1443 vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; 1444 #endif 1445#endif 1446#ifdef USE_MAP 1447 diffuseColor *= texture2D( map, uv ); 1448#endif 1449#ifdef USE_ALPHAMAP 1450 diffuseColor.a *= texture2D( alphaMap, uv ).g; 1451#endif`,eA=`#if defined( USE_POINTS_UV ) 1452 varying vec2 vUv; 1453#else 1454 #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1455 uniform mat3 uvTransform; 1456 #endif 1457#endif 1458#ifdef USE_MAP 1459 uniform sampler2D map; 1460#endif 1461#ifdef USE_ALPHAMAP 1462 uniform sampler2D alphaMap; 1463#endif`,tA=`float metalnessFactor = metalness; 1464#ifdef USE_METALNESSMAP 1465 vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); 1466 metalnessFactor *= texelMetalness.b; 1467#endif`,nA=`#ifdef USE_METALNESSMAP 1468 uniform sampler2D metalnessMap; 1469#endif`,iA=`#ifdef USE_INSTANCING_MORPH 1470 float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1471 float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; 1472 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1473 morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; 1474 } 1475#endif`,rA=`#if defined( USE_MORPHCOLORS ) 1476 vColor *= morphTargetBaseInfluence; 1477 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1478 #if defined( USE_COLOR_ALPHA ) 1479 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; 1480 #elif defined( USE_COLOR ) 1481 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; 1482 #endif 1483 } 1484#endif`,sA=`#ifdef USE_MORPHNORMALS 1485 objectNormal *= morphTargetBaseInfluence; 1486 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1487 if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; 1488 } 1489#endif`,oA=`#ifdef USE_MORPHTARGETS 1490 #ifndef USE_INSTANCING_MORPH 1491 uniform float morphTargetBaseInfluence; 1492 uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1493 #endif 1494 uniform sampler2DArray morphTargetsTexture; 1495 uniform ivec2 morphTargetsTextureSize; 1496 vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { 1497 int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; 1498 int y = texelIndex / morphTargetsTextureSize.x; 1499 int x = texelIndex - y * morphTargetsTextureSize.x; 1500 ivec3 morphUV = ivec3( x, y, morphTargetIndex ); 1501 return texelFetch( morphTargetsTexture, morphUV, 0 ); 1502 } 1503#endif`,aA=`#ifdef USE_MORPHTARGETS 1504 transformed *= morphTargetBaseInfluence; 1505 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1506 if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; 1507 } 1508#endif`,lA=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; 1509#ifdef FLAT_SHADED 1510 vec3 fdx = dFdx( vViewPosition ); 1511 vec3 fdy = dFdy( vViewPosition ); 1512 vec3 normal = normalize( cross( fdx, fdy ) ); 1513#else 1514 vec3 normal = normalize( vNormal ); 1515 #ifdef DOUBLE_SIDED 1516 normal *= faceDirection; 1517 #endif 1518#endif 1519#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) 1520 #ifdef USE_TANGENT 1521 mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1522 #else 1523 mat3 tbn = getTangentFrame( - vViewPosition, normal, 1524 #if defined( USE_NORMALMAP ) 1525 vNormalMapUv 1526 #elif defined( USE_CLEARCOAT_NORMALMAP ) 1527 vClearcoatNormalMapUv 1528 #else 1529 vUv 1530 #endif 1531 ); 1532 #endif 1533 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1534 tbn[0] *= faceDirection; 1535 tbn[1] *= faceDirection; 1536 #endif 1537#endif 1538#ifdef USE_CLEARCOAT_NORMALMAP 1539 #ifdef USE_TANGENT 1540 mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1541 #else 1542 mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); 1543 #endif 1544 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1545 tbn2[0] *= faceDirection; 1546 tbn2[1] *= faceDirection; 1547 #endif 1548#endif 1549vec3 nonPerturbedNormal = normal;`,cA=`#ifdef USE_NORMALMAP_OBJECTSPACE 1550 normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1551 #ifdef FLIP_SIDED 1552 normal = - normal; 1553 #endif 1554 #ifdef DOUBLE_SIDED 1555 normal = normal * faceDirection; 1556 #endif 1557 normal = normalize( normalMatrix * normal ); 1558#elif defined( USE_NORMALMAP_TANGENTSPACE ) 1559 vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1560 mapN.xy *= normalScale; 1561 normal = normalize( tbn * mapN ); 1562#elif defined( USE_BUMPMAP )
1563 normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); 1564#endif`,uA=`#ifndef FLAT_SHADED 1565 varying vec3 vNormal; 1566 #ifdef USE_TANGENT 1567 varying vec3 vTangent; 1568 varying vec3 vBitangent; 1569 #endif 1570#endif`,fA=`#ifndef FLAT_SHADED 1571 varying vec3 vNormal; 1572 #ifdef USE_TANGENT 1573 varying vec3 vTangent; 1574 varying vec3 vBitangent; 1575 #endif 1576#endif`,hA=`#ifndef FLAT_SHADED 1577 vNormal = normalize( transformedNormal ); 1578 #ifdef USE_TANGENT 1579 vTangent = normalize( transformedTangent ); 1580 vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); 1581 #endif 1582#endif`,dA=`#ifdef USE_NORMALMAP 1583 uniform sampler2D normalMap; 1584 uniform vec2 normalScale; 1585#endif 1586#ifdef USE_NORMALMAP_OBJECTSPACE 1587 uniform mat3 normalMatrix; 1588#endif 1589#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) 1590 mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { 1591 vec3 q0 = dFdx( eye_pos.xyz ); 1592 vec3 q1 = dFdy( eye_pos.xyz ); 1593 vec2 st0 = dFdx( uv.st ); 1594 vec2 st1 = dFdy( uv.st ); 1595 vec3 N = surf_norm; 1596 vec3 q1perp = cross( q1, N ); 1597 vec3 q0perp = cross( N, q0 ); 1598 vec3 T = q1perp * st0.x + q0perp * st1.x; 1599 vec3 B = q1perp * st0.y + q0perp * st1.y; 1600 float det = max( dot( T, T ), dot( B, B ) ); 1601 float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); 1602 return mat3( T * scale, B * scale, N ); 1603 } 1604#endif`,pA=`#ifdef USE_CLEARCOAT 1605 vec3 clearcoatNormal = nonPerturbedNormal; 1606#endif`,mA=`#ifdef USE_CLEARCOAT_NORMALMAP 1607 vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; 1608 clearcoatMapN.xy *= clearcoatNormalScale; 1609 clearcoatNormal = normalize( tbn2 * clearcoatMapN ); 1610#endif`,_A=`#ifdef USE_CLEARCOATMAP 1611 uniform sampler2D clearcoatMap; 1612#endif 1613#ifdef USE_CLEARCOAT_NORMALMAP 1614 uniform sampler2D clearcoatNormalMap; 1615 uniform vec2 clearcoatNormalScale; 1616#endif 1617#ifdef USE_CLEARCOAT_ROUGHNESSMAP 1618 uniform sampler2D clearcoatRoughnessMap; 1619#endif`,gA=`#ifdef USE_IRIDESCENCEMAP 1620 uniform sampler2D iridescenceMap; 1621#endif 1622#ifdef USE_IRIDESCENCE_THICKNESSMAP 1623 uniform sampler2D iridescenceThicknessMap; 1624#endif`,vA=`#ifdef OPAQUE 1625diffuseColor.a = 1.0; 1626#endif 1627#ifdef USE_TRANSMISSION 1628diffuseColor.a *= material.transmissionAlpha; 1629#endif 1630gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,xA=`vec3 packNormalToRGB( const in vec3 normal ) { 1631 return normalize( normal ) * 0.5 + 0.5; 1632} 1633vec3 unpackRGBToNormal( const in vec3 rgb ) { 1634 return 2.0 * rgb.xyz - 1.0; 1635} 1636const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; 1637const float Inv255 = 1. / 255.; 1638const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); 1639const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); 1640const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); 1641const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); 1642vec4 packDepthToRGBA( const in float v ) { 1643 if( v <= 0.0 ) 1644 return vec4( 0., 0., 0., 0. ); 1645 if( v >= 1.0 ) 1646 return vec4( 1., 1., 1., 1. ); 1647 float vuf; 1648 float af = modf( v * PackFactors.a, vuf ); 1649 float bf = modf( vuf * ShiftRight8, vuf ); 1650 float gf = modf( vuf * ShiftRight8, vuf ); 1651 return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); 1652} 1653vec3 packDepthToRGB( const in float v ) { 1654 if( v <= 0.0 ) 1655 return vec3( 0., 0., 0. ); 1656 if( v >= 1.0 ) 1657 return vec3( 1., 1., 1. ); 1658 float vuf; 1659 float bf = modf( v * PackFactors.b, vuf ); 1660 float gf = modf( vuf * ShiftRight8, vuf ); 1661 return vec3( vuf * Inv255, gf * PackUpscale, bf ); 1662} 1663vec2 packDepthToRG( const in float v ) { 1664 if( v <= 0.0 ) 1665 return vec2( 0., 0. ); 1666 if( v >= 1.0 ) 1667 return vec2( 1., 1. ); 1668 float vuf; 1669 float gf = modf( v * 256., vuf ); 1670 return vec2( vuf * Inv255, gf ); 1671} 1672float unpackRGBAToDepth( const in vec4 v ) { 1673 return dot( v, UnpackFactors4 ); 1674} 1675float unpackRGBToDepth( const in vec3 v ) { 1676 return dot( v, UnpackFactors3 ); 1677} 1678float unpackRGToDepth( const in vec2 v ) { 1679 return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; 1680} 1681vec4 pack2HalfToRGBA( const in vec2 v ) {
1682 vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); 1683 return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); 1684} 1685vec2 unpackRGBATo2Half( const in vec4 v ) { 1686 return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); 1687} 1688float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { 1689 return ( viewZ + near ) / ( near - far ); 1690} 1691float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { 1692 return depth * ( near - far ) - near; 1693} 1694float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { 1695 return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); 1696} 1697float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { 1698 return ( near * far ) / ( ( far - near ) * depth - far ); 1699}`,yA=`#ifdef PREMULTIPLIED_ALPHA 1700 gl_FragColor.rgb *= gl_FragColor.a; 1701#endif`,SA=`vec4 mvPosition = vec4( transformed, 1.0 ); 1702#ifdef USE_BATCHING 1703 mvPosition = batchingMatrix * mvPosition; 1704#endif 1705#ifdef USE_INSTANCING 1706 mvPosition = instanceMatrix * mvPosition; 1707#endif 1708mvPosition = modelViewMatrix * mvPosition; 1709gl_Position = projectionMatrix * mvPosition;`,MA=`#ifdef DITHERING 1710 gl_FragColor.rgb = dithering( gl_FragColor.rgb ); 1711#endif`,EA=`#ifdef DITHERING 1712 vec3 dithering( vec3 color ) { 1713 float grid_position = rand( gl_FragCoord.xy ); 1714 vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); 1715 dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); 1716 return color + dither_shift_RGB; 1717 } 1718#endif`,TA=`float roughnessFactor = roughness; 1719#ifdef USE_ROUGHNESSMAP 1720 vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); 1721 roughnessFactor *= texelRoughness.g; 1722#endif`,bA=`#ifdef USE_ROUGHNESSMAP 1723 uniform sampler2D roughnessMap; 1724#endif`,wA=
vendor: 8,887 bytes, lines 1724-1910
1724`#if NUM_SPOT_LIGHT_COORDS > 0 1725 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1726#endif 1727#if NUM_SPOT_LIGHT_MAPS > 0 1728 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; 1729#endif 1730#ifdef USE_SHADOWMAP 1731 #if NUM_DIR_LIGHT_SHADOWS > 0 1732 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1733 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1734 struct DirectionalLightShadow { 1735 float shadowIntensity; 1736 float shadowBias; 1737 float shadowNormalBias; 1738 float shadowRadius; 1739 vec2 shadowMapSize; 1740 }; 1741 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1742 #endif 1743 #if NUM_SPOT_LIGHT_SHADOWS > 0 1744 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1745 struct SpotLightShadow { 1746 float shadowIntensity; 1747 float shadowBias; 1748 float shadowNormalBias; 1749 float shadowRadius; 1750 vec2 shadowMapSize; 1751 }; 1752 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1753 #endif 1754 #if NUM_POINT_LIGHT_SHADOWS > 0 1755 uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1756 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1757 struct PointLightShadow { 1758 float shadowIntensity; 1759 float shadowBias; 1760 float shadowNormalBias; 1761 float shadowRadius; 1762 vec2 shadowMapSize; 1763 float shadowCameraNear; 1764 float shadowCameraFar; 1765 }; 1766 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1767 #endif 1768 float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { 1769 return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); 1770 } 1771 vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { 1772 return unpackRGBATo2Half( texture2D( shadow, uv ) ); 1773 } 1774 float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ 1775 float occlusion = 1.0; 1776 vec2 distribution = texture2DDistribution( shadow, uv ); 1777 float hard_shadow = step( compare , distribution.x ); 1778 if (hard_shadow != 1.0 ) { 1779 float distance = compare - distribution.x ; 1780 float variance = max( 0.00000, distribution.y * distribution.y ); 1781 float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); 1782 } 1783 return occlusion; 1784 } 1785 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1786 float shadow = 1.0; 1787 shadowCoord.xyz /= shadowCoord.w; 1788 shadowCoord.z += shadowBias; 1789 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1790 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1791 if ( frustumTest ) { 1792 #if defined( SHADOWMAP_TYPE_PCF ) 1793 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1794 float dx0 = - texelSize.x * shadowRadius; 1795 float dy0 = - texelSize.y * shadowRadius; 1796 float dx1 = + texelSize.x * shadowRadius; 1797 float dy1 = + texelSize.y * shadowRadius; 1798 float dx2 = dx0 / 2.0; 1799 float dy2 = dy0 / 2.0; 1800 float dx3 = dx1 / 2.0; 1801 float dy3 = dy1 / 2.0; 1802 shadow = ( 1803 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + 1804 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + 1805 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + 1806 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + 1807 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + 1808 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + 1809 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + 1810 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + 1811 texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + 1812 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + 1813 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + 1814 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + 1815 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + 1816 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + 1817 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + 1818 texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + 1819 texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) 1820 ) * ( 1.0 / 17.0 ); 1821 #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) 1822 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1823 float dx = texelSize.x; 1824 float dy = texelSize.y; 1825 vec2 uv = shadowCoord.xy; 1826 vec2 f = fract( uv * shadowMapSize + 0.5 ); 1827 uv -= f * texelSize; 1828 shadow = ( 1829 texture2DCompare( shadowMap, uv, shadowCoord.z ) + 1830 texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + 1831 texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + 1832 texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + 1833 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), 1834 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), 1835 f.x ) + 1836 mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), 1837 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), 1838 f.x ) + 1839 mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), 1840 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), 1841 f.y ) + 1842 mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), 1843 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), 1844 f.y ) + 1845 mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), 1846 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), 1847 f.x ), 1848 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), 1849 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), 1850 f.x ), 1851 f.y ) 1852 ) * ( 1.0 / 9.0 ); 1853 #elif defined( SHADOWMAP_TYPE_VSM ) 1854 shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); 1855 #else 1856 shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); 1857 #endif 1858 } 1859 return mix( 1.0, shadow, shadowIntensity ); 1860 } 1861 vec2 cubeToUV( vec3 v, float texelSizeY ) { 1862 vec3 absV = abs( v ); 1863 float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); 1864 absV *= scaleToCube; 1865 v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); 1866 vec2 planar = v.xy; 1867 float almostATexel = 1.5 * texelSizeY; 1868 float almostOne = 1.0 - almostATexel; 1869 if ( absV.z >= almostOne ) { 1870 if ( v.z > 0.0 ) 1871 planar.x = 4.0 - v.x; 1872 } else if ( absV.x >= almostOne ) { 1873 float signX = sign( v.x ); 1874 planar.x = v.z * signX + 2.0 * signX; 1875 } else if ( absV.y >= almostOne ) { 1876 float signY = sign( v.y ); 1877 planar.x = v.x + 2.0 * signY + 2.0; 1878 planar.y = v.z * signY - 2.0; 1879 } 1880 return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); 1881 } 1882 float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1883 float shadow = 1.0; 1884 vec3 lightToPosition = shadowCoord.xyz; 1885 1886 float lightToPositionLength = length( lightToPosition ); 1887 if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { 1888 float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; 1889 vec3 bd3D = normalize( lightToPosition ); 1890 vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); 1891 #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) 1892 vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; 1893 shadow = ( 1894 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + 1895 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + 1896 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + 1897 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + 1898 texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + 1899 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + 1900 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + 1901 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + 1902 texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) 1903 ) * ( 1.0 / 9.0 ); 1904 #else 1905 shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); 1906 #endif 1907 } 1908 return mix( 1.0, shadow, shadowIntensity ); 1909 } 1910#endif`,
1910AA=`#if NUM_SPOT_LIGHT_COORDS > 0 1911 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; 1912 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1913#endif 1914#ifdef USE_SHADOWMAP 1915 #if NUM_DIR_LIGHT_SHADOWS > 0 1916 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; 1917 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1918 struct DirectionalLightShadow { 1919 float shadowIntensity; 1920 float shadowBias; 1921 float shadowNormalBias; 1922 float shadowRadius; 1923 vec2 shadowMapSize; 1924 }; 1925 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1926 #endif 1927 #if NUM_SPOT_LIGHT_SHADOWS > 0 1928 struct SpotLightShadow { 1929 float shadowIntensity; 1930 float shadowBias; 1931 float shadowNormalBias; 1932 float shadowRadius; 1933 vec2 shadowMapSize; 1934 }; 1935 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1936 #endif 1937 #if NUM_POINT_LIGHT_SHADOWS > 0 1938 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; 1939 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1940 struct PointLightShadow { 1941 float shadowIntensity; 1942 float shadowBias; 1943 float shadowNormalBias; 1944 float shadowRadius; 1945 vec2 shadowMapSize; 1946 float shadowCameraNear; 1947 float shadowCameraFar; 1948 }; 1949 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1950 #endif 1951#endif`,RA=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) 1952 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 1953 vec4 shadowWorldPosition; 1954#endif 1955#if defined( USE_SHADOWMAP ) 1956 #if NUM_DIR_LIGHT_SHADOWS > 0 1957 #pragma unroll_loop_start 1958 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 1959 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); 1960 vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; 1961 } 1962 #pragma unroll_loop_end 1963 #endif 1964 #if NUM_POINT_LIGHT_SHADOWS > 0 1965 #pragma unroll_loop_start 1966 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 1967 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); 1968 vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; 1969 } 1970 #pragma unroll_loop_end 1971 #endif 1972#endif 1973#if NUM_SPOT_LIGHT_COORDS > 0 1974 #pragma unroll_loop_start 1975 for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { 1976 shadowWorldPosition = worldPosition; 1977 #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1978 shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; 1979 #endif 1980 vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; 1981 } 1982 #pragma unroll_loop_end 1983#endif`,CA=`float getShadowMask() { 1984 float shadow = 1.0; 1985 #ifdef USE_SHADOWMAP 1986 #if NUM_DIR_LIGHT_SHADOWS > 0 1987 DirectionalLightShadow directionalLight; 1988 #pragma unroll_loop_start 1989 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 1990 directionalLight = directionalLightShadows[ i ]; 1991 shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1992 } 1993 #pragma unroll_loop_end 1994 #endif 1995 #if NUM_SPOT_LIGHT_SHADOWS > 0 1996 SpotLightShadow spotLight; 1997 #pragma unroll_loop_start 1998 for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { 1999 spotLight = spotLightShadows[ i ]; 2000 shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 2001 } 2002 #pragma unroll_loop_end 2003 #endif 2004 #if NUM_POINT_LIGHT_SHADOWS > 0 2005 PointLightShadow pointLight; 2006 #pragma unroll_loop_start 2007 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2008 pointLight = pointLightShadows[ i ]; 2009 shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; 2010 } 2011 #pragma unroll_loop_end 2012 #endif 2013 #endif 2014 return shadow; 2015}`,PA=`#ifdef USE_SKINNING 2016 mat4 boneMatX = getBoneMatrix( skinIndex.x ); 2017 mat4 boneMatY = getBoneMatrix( skinIndex.y ); 2018 mat4 boneMatZ = getBoneMatrix( skinIndex.z ); 2019 mat4 boneMatW = getBoneMatrix( skinIndex.w ); 2020#endif`,DA=`#ifdef USE_SKINNING 2021 uniform mat4 bindMatrix; 2022 uniform mat4 bindMatrixInverse; 2023 uniform highp sampler2D boneTexture; 2024 mat4 getBoneMatrix( const in float i ) { 2025 int size = textureSize( boneTexture, 0 ).x; 2026 int j = int( i ) * 4; 2027 int x = j % size; 2028 int y = j / size; 2029 vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); 2030 vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); 2031 vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); 2032 vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); 2033 return mat4( v1, v2, v3, v4 ); 2034 } 2035#endif`,LA=`#ifdef USE_SKINNING 2036 vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); 2037 vec4 skinned = vec4( 0.0 ); 2038 skinned += boneMatX * skinVertex * skinWeight.x; 2039 skinned += boneMatY * skinVertex * skinWeight.y; 2040 skinned += boneMatZ * skinVertex * skinWeight.z; 2041 skinned += boneMatW * skinVertex * skinWeight.w; 2042 transformed = ( bindMatrixInverse * skinned ).xyz; 2043#endif`,IA=`#ifdef USE_SKINNING 2044 mat4 skinMatrix = mat4( 0.0 ); 2045 skinMatrix += skinWeight.x * boneMatX; 2046 skinMatrix += skinWeight.y * boneMatY; 2047 skinMatrix += skinWeight.z * boneMatZ; 2048 skinMatrix += skinWeight.w * boneMatW; 2049 skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; 2050 objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; 2051 #ifdef USE_TANGENT 2052 objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; 2053 #endif 2054#endif`,UA=`float specularStrength; 2055#ifdef USE_SPECULARMAP 2056 vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); 2057 specularStrength = texelSpecular.r; 2058#else 2059 specularStrength = 1.0; 2060#endif`,NA=`#ifdef USE_SPECULARMAP 2061 uniform sampler2D specularMap; 2062#endif`,OA=`#if defined( TONE_MAPPING ) 2063 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); 2064#endif`,FA=`#ifndef saturate 2065#define saturate( a ) clamp( a, 0.0, 1.0 ) 2066#endif 2067uniform float toneMappingExposure; 2068vec3 LinearToneMapping( vec3 color ) { 2069 return saturate( toneMappingExposure * color ); 2070} 2071vec3 ReinhardToneMapping( vec3 color ) { 2072 color *= toneMappingExposure; 2073 return saturate( color / ( vec3( 1.0 ) + color ) ); 2074} 2075vec3 CineonToneMapping( vec3 color ) { 2076 color *= toneMappingExposure; 2077 color = max( vec3( 0.0 ), color - 0.004 ); 2078 return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); 2079} 2080vec3 RRTAndODTFit( vec3 v ) { 2081 vec3 a = v * ( v + 0.0245786 ) - 0.000090537; 2082 vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; 2083 return a / b; 2084} 2085vec3 ACESFilmicToneMapping( vec3 color ) { 2086 const mat3 ACESInputMat = mat3( 2087 vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), 2088 vec3( 0.04823, 0.01566, 0.83777 ) 2089 ); 2090 const mat3 ACESOutputMat = mat3( 2091 vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), 2092 vec3( -0.07367, -0.00605, 1.07602 ) 2093 ); 2094 color *= toneMappingExposure / 0.6; 2095 color = ACESInputMat * color; 2096 color = RRTAndODTFit( color ); 2097 color = ACESOutputMat * color; 2098 return saturate( color ); 2099} 2100const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( 2101 vec3( 1.6605, - 0.1246, - 0.0182 ), 2102 vec3( - 0.5876, 1.1329, - 0.1006 ), 2103 vec3( - 0.0728, - 0.0083, 1.1187 ) 2104); 2105const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( 2106 vec3( 0.6274, 0.0691, 0.0164 ), 2107 vec3( 0.3293, 0.9195, 0.0880 ), 2108 vec3( 0.0433, 0.0113, 0.8956 ) 2109); 2110vec3 agxDefaultContrastApprox( vec3 x ) { 2111 vec3 x2 = x * x; 2112 vec3 x4 = x2 * x2; 2113 return + 15.5 * x4 * x2 2114 - 40.14 * x4 * x 2115 + 31.96 * x4 2116 - 6.868 * x2 * x 2117 + 0.4298 * x2 2118 + 0.1191 * x 2119 - 0.00232; 2120} 2121vec3 AgXToneMapping( vec3 color ) { 2122 const mat3 AgXInsetMatrix = mat3( 2123 vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), 2124 vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), 2125 vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) 2126 );
2127 const mat3 AgXOutsetMatrix = mat3( 2128 vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), 2129 vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), 2130 vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) 2131 ); 2132 const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; 2133 color *= toneMappingExposure; 2134 color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; 2135 color = AgXInsetMatrix * color; 2136 color = max( color, 1e-10 ); color = log2( color ); 2137 color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); 2138 color = clamp( color, 0.0, 1.0 ); 2139 color = agxDefaultContrastApprox( color ); 2140 color = AgXOutsetMatrix * color; 2141 color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); 2142 color = LINEAR_REC2020_TO_LINEAR_SRGB * color; 2143 color = clamp( color, 0.0, 1.0 ); 2144 return color; 2145} 2146vec3 NeutralToneMapping( vec3 color ) { 2147 const float StartCompression = 0.8 - 0.04; 2148 const float Desaturation = 0.15; 2149 color *= toneMappingExposure; 2150 float x = min( color.r, min( color.g, color.b ) ); 2151 float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; 2152 color -= offset; 2153 float peak = max( color.r, max( color.g, color.b ) ); 2154 if ( peak < StartCompression ) return color; 2155 float d = 1. - StartCompression; 2156 float newPeak = 1. - d * d / ( peak + d - StartCompression ); 2157 color *= newPeak / peak; 2158 float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); 2159 return mix( color, vec3( newPeak ), g ); 2160} 2161vec3 CustomToneMapping( vec3 color ) { return color; }`,BA=`#ifdef USE_TRANSMISSION 2162 material.transmission = transmission; 2163 material.transmissionAlpha = 1.0; 2164 material.thickness = thickness; 2165 material.attenuationDistance = attenuationDistance; 2166 material.attenuationColor = attenuationColor; 2167 #ifdef USE_TRANSMISSIONMAP 2168 material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; 2169 #endif 2170 #ifdef USE_THICKNESSMAP 2171 material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; 2172 #endif 2173 vec3 pos = vWorldPosition; 2174 vec3 v = normalize( cameraPosition - pos ); 2175 vec3 n = inverseTransformDirection( normal, viewMatrix ); 2176 vec4 transmitted = getIBLVolumeRefraction( 2177 n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, 2178 pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, 2179 material.attenuationColor, material.attenuationDistance ); 2180 material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); 2181 totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); 2182#endif`,kA=`#ifdef USE_TRANSMISSION 2183 uniform float transmission; 2184 uniform float thickness; 2185 uniform float attenuationDistance; 2186 uniform vec3 attenuationColor; 2187 #ifdef USE_TRANSMISSIONMAP 2188 uniform sampler2D transmissionMap; 2189 #endif 2190 #ifdef USE_THICKNESSMAP 2191 uniform sampler2D thicknessMap; 2192 #endif 2193 uniform vec2 transmissionSamplerSize; 2194 uniform sampler2D transmissionSamplerMap; 2195 uniform mat4 modelMatrix; 2196 uniform mat4 projectionMatrix; 2197 varying vec3 vWorldPosition; 2198 float w0( float a ) { 2199 return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); 2200 } 2201 float w1( float a ) { 2202 return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); 2203 } 2204 float w2( float a ){ 2205 return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); 2206 } 2207 float w3( float a ) { 2208 return ( 1.0 / 6.0 ) * ( a * a * a ); 2209 } 2210 float g0( float a ) { 2211 return w0( a ) + w1( a ); 2212 } 2213 float g1( float a ) { 2214 return w2( a ) + w3( a ); 2215 } 2216 float h0( float a ) { 2217 return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); 2218 } 2219 float h1( float a ) { 2220 return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); 2221 } 2222 vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { 2223 uv = uv * texelSize.zw + 0.5; 2224 vec2 iuv = floor( uv ); 2225 vec2 fuv = fract( uv ); 2226 float g0x = g0( fuv.x ); 2227 float g1x = g1( fuv.x ); 2228 float h0x = h0( fuv.x ); 2229 float h1x = h1( fuv.x ); 2230 float h0y = h0( fuv.y ); 2231 float h1y = h1( fuv.y ); 2232 vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2233 vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2234 vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2235 vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2236 return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + 2237 g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); 2238 } 2239 vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { 2240 vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); 2241 vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); 2242 vec2 fLodSizeInv = 1.0 / fLodSize; 2243 vec2 cLodSizeInv = 1.0 / cLodSize; 2244 vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); 2245 vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); 2246 return mix( fSample, cSample, fract( lod ) ); 2247 } 2248 vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { 2249 vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); 2250 vec3 modelScale; 2251 modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); 2252 modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); 2253 modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); 2254 return normalize( refractionVector ) * thickness * modelScale; 2255 } 2256 float applyIorToRoughness( const in float roughness, const in float ior ) { 2257 return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); 2258 } 2259 vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { 2260 float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); 2261 return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); 2262 } 2263 vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { 2264 if ( isinf( attenuationDistance ) ) { 2265 return vec3( 1.0 ); 2266 } else { 2267 vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; 2268 vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; 2269 } 2270 } 2271 vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, 2272 const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, 2273 const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, 2274 const in vec3 attenuationColor, const in float attenuationDistance ) { 2275 vec4 transmittedLight; 2276 vec3 transmittance; 2277 #ifdef USE_DISPERSION 2278 float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; 2279 vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); 2280 for ( int i = 0; i < 3; i ++ ) { 2281 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); 2282 vec3 refractedRayExit = position + transmissionRay; 2283 2284 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2285 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2286 refractionCoords += 1.0; 2287 refractionCoords /= 2.0; 2288 2289 vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); 2290 transmittedLight[ i ] = transmissionSample[ i ]; 2291 transmittedLight.a += transmissionSample.a; 2292 transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; 2293 } 2294 transmittedLight.a /= 3.0; 2295 2296 #else 2297 2298 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); 2299 vec3 refractedRayExit = position + transmissionRay; 2300 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2301 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2302 refractionCoords += 1.0; 2303 refractionCoords /= 2.0; 2304 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); 2305 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); 2306 2307 #endif 2308 vec3 attenuatedColor = transmittance * transmittedLight.rgb; 2309 vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); 2310 float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; 2311 return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); 2312 } 2313#endif`,HA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2314 varying vec2 vUv; 2315#endif 2316#ifdef USE_MAP 2317 varying vec2 vMapUv; 2318#endif 2319#ifdef USE_ALPHAMAP
2320 varying vec2 vAlphaMapUv; 2321#endif 2322#ifdef USE_LIGHTMAP 2323 varying vec2 vLightMapUv; 2324#endif 2325#ifdef USE_AOMAP 2326 varying vec2 vAoMapUv; 2327#endif 2328#ifdef USE_BUMPMAP 2329 varying vec2 vBumpMapUv; 2330#endif 2331#ifdef USE_NORMALMAP 2332 varying vec2 vNormalMapUv; 2333#endif 2334#ifdef USE_EMISSIVEMAP 2335 varying vec2 vEmissiveMapUv; 2336#endif 2337#ifdef USE_METALNESSMAP 2338 varying vec2 vMetalnessMapUv; 2339#endif 2340#ifdef USE_ROUGHNESSMAP 2341 varying vec2 vRoughnessMapUv; 2342#endif 2343#ifdef USE_ANISOTROPYMAP 2344 varying vec2 vAnisotropyMapUv; 2345#endif 2346#ifdef USE_CLEARCOATMAP 2347 varying vec2 vClearcoatMapUv; 2348#endif 2349#ifdef USE_CLEARCOAT_NORMALMAP 2350 varying vec2 vClearcoatNormalMapUv; 2351#endif 2352#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2353 varying vec2 vClearcoatRoughnessMapUv; 2354#endif 2355#ifdef USE_IRIDESCENCEMAP 2356 varying vec2 vIridescenceMapUv; 2357#endif 2358#ifdef USE_IRIDESCENCE_THICKNESSMAP 2359 varying vec2 vIridescenceThicknessMapUv; 2360#endif 2361#ifdef USE_SHEEN_COLORMAP 2362 varying vec2 vSheenColorMapUv; 2363#endif 2364#ifdef USE_SHEEN_ROUGHNESSMAP 2365 varying vec2 vSheenRoughnessMapUv; 2366#endif 2367#ifdef USE_SPECULARMAP 2368 varying vec2 vSpecularMapUv; 2369#endif 2370#ifdef USE_SPECULAR_COLORMAP 2371 varying vec2 vSpecularColorMapUv; 2372#endif 2373#ifdef USE_SPECULAR_INTENSITYMAP 2374 varying vec2 vSpecularIntensityMapUv; 2375#endif 2376#ifdef USE_TRANSMISSIONMAP 2377 uniform mat3 transmissionMapTransform; 2378 varying vec2 vTransmissionMapUv; 2379#endif 2380#ifdef USE_THICKNESSMAP 2381 uniform mat3 thicknessMapTransform; 2382 varying vec2 vThicknessMapUv; 2383#endif`,zA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2384 varying vec2 vUv; 2385#endif 2386#ifdef USE_MAP 2387 uniform mat3 mapTransform; 2388 varying vec2 vMapUv; 2389#endif 2390#ifdef USE_ALPHAMAP 2391 uniform mat3 alphaMapTransform; 2392 varying vec2 vAlphaMapUv; 2393#endif 2394#ifdef USE_LIGHTMAP 2395 uniform mat3 lightMapTransform; 2396 varying vec2 vLightMapUv; 2397#endif 2398#ifdef USE_AOMAP 2399 uniform mat3 aoMapTransform; 2400 varying vec2 vAoMapUv; 2401#endif 2402#ifdef USE_BUMPMAP 2403 uniform mat3 bumpMapTransform; 2404 varying vec2 vBumpMapUv; 2405#endif 2406#ifdef USE_NORMALMAP 2407 uniform mat3 normalMapTransform; 2408 varying vec2 vNormalMapUv; 2409#endif 2410#ifdef USE_DISPLACEMENTMAP 2411 uniform mat3 displacementMapTransform; 2412 varying vec2 vDisplacementMapUv; 2413#endif 2414#ifdef USE_EMISSIVEMAP 2415 uniform mat3 emissiveMapTransform; 2416 varying vec2 vEmissiveMapUv; 2417#endif 2418#ifdef USE_METALNESSMAP 2419 uniform mat3 metalnessMapTransform; 2420 varying vec2 vMetalnessMapUv; 2421#endif 2422#ifdef USE_ROUGHNESSMAP 2423 uniform mat3 roughnessMapTransform; 2424 varying vec2 vRoughnessMapUv; 2425#endif 2426#ifdef USE_ANISOTROPYMAP 2427 uniform mat3 anisotropyMapTransform; 2428 varying vec2 vAnisotropyMapUv; 2429#endif 2430#ifdef USE_CLEARCOATMAP 2431 uniform mat3 clearcoatMapTransform; 2432 varying vec2 vClearcoatMapUv; 2433#endif 2434#ifdef USE_CLEARCOAT_NORMALMAP 2435 uniform mat3 clearcoatNormalMapTransform; 2436 varying vec2 vClearcoatNormalMapUv; 2437#endif 2438#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2439 uniform mat3 clearcoatRoughnessMapTransform; 2440 varying vec2 vClearcoatRoughnessMapUv; 2441#endif 2442#ifdef USE_SHEEN_COLORMAP 2443 uniform mat3 sheenColorMapTransform; 2444 varying vec2 vSheenColorMapUv; 2445#endif 2446#ifdef USE_SHEEN_ROUGHNESSMAP 2447 uniform mat3 sheenRoughnessMapTransform; 2448 varying vec2 vSheenRoughnessMapUv; 2449#endif 2450#ifdef USE_IRIDESCENCEMAP 2451 uniform mat3 iridescenceMapTransform; 2452 varying vec2 vIridescenceMapUv; 2453#endif 2454#ifdef USE_IRIDESCENCE_THICKNESSMAP 2455 uniform mat3 iridescenceThicknessMapTransform; 2456 varying vec2 vIridescenceThicknessMapUv; 2457#endif 2458#ifdef USE_SPECULARMAP 2459 uniform mat3 specularMapTransform; 2460 varying vec2 vSpecularMapUv; 2461#endif 2462#ifdef USE_SPECULAR_COLORMAP 2463 uniform mat3 specularColorMapTransform; 2464 varying vec2 vSpecularColorMapUv; 2465#endif 2466#ifdef USE_SPECULAR_INTENSITYMAP 2467 uniform mat3 specularIntensityMapTransform; 2468 varying vec2 vSpecularIntensityMapUv; 2469#endif 2470#ifdef USE_TRANSMISSIONMAP 2471 uniform mat3 transmissionMapTransform; 2472 varying vec2 vTransmissionMapUv; 2473#endif 2474#ifdef USE_THICKNESSMAP 2475 uniform mat3 thicknessMapTransform; 2476 varying vec2 vThicknessMapUv; 2477#endif`,VA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2478 vUv = vec3( uv, 1 ).xy; 2479#endif 2480#ifdef USE_MAP 2481 vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; 2482#endif 2483#ifdef USE_ALPHAMAP 2484 vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; 2485#endif 2486#ifdef USE_LIGHTMAP 2487 vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; 2488#endif 2489#ifdef USE_AOMAP 2490 vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; 2491#endif 2492#ifdef USE_BUMPMAP 2493 vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; 2494#endif 2495#ifdef USE_NORMALMAP 2496 vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; 2497#endif 2498#ifdef USE_DISPLACEMENTMAP 2499 vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; 2500#endif 2501#ifdef USE_EMISSIVEMAP 2502 vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; 2503#endif 2504#ifdef USE_METALNESSMAP 2505 vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; 2506#endif 2507#ifdef USE_ROUGHNESSMAP 2508 vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; 2509#endif 2510#ifdef USE_ANISOTROPYMAP 2511 vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; 2512#endif 2513#ifdef USE_CLEARCOATMAP 2514 vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; 2515#endif 2516#ifdef USE_CLEARCOAT_NORMALMAP 2517 vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; 2518#endif 2519#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2520 vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; 2521#endif
2522#ifdef USE_IRIDESCENCEMAP 2523 vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; 2524#endif 2525#ifdef USE_IRIDESCENCE_THICKNESSMAP 2526 vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; 2527#endif 2528#ifdef USE_SHEEN_COLORMAP 2529 vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; 2530#endif 2531#ifdef USE_SHEEN_ROUGHNESSMAP 2532 vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; 2533#endif 2534#ifdef USE_SPECULARMAP 2535 vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; 2536#endif 2537#ifdef USE_SPECULAR_COLORMAP 2538 vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; 2539#endif 2540#ifdef USE_SPECULAR_INTENSITYMAP 2541 vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; 2542#endif 2543#ifdef USE_TRANSMISSIONMAP 2544 vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; 2545#endif 2546#ifdef USE_THICKNESSMAP 2547 vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; 2548#endif`,GA=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 2549 vec4 worldPosition = vec4( transformed, 1.0 ); 2550 #ifdef USE_BATCHING 2551 worldPosition = batchingMatrix * worldPosition; 2552 #endif 2553 #ifdef USE_INSTANCING 2554 worldPosition = instanceMatrix * worldPosition; 2555 #endif 2556 worldPosition = modelMatrix * worldPosition; 2557#endif`;const WA=`varying vec2 vUv; 2558uniform mat3 uvTransform; 2559void main() { 2560 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 2561 gl_Position = vec4( position.xy, 1.0, 1.0 ); 2562}`,XA=`uniform sampler2D t2D; 2563uniform float backgroundIntensity; 2564varying vec2 vUv; 2565void main() { 2566 vec4 texColor = texture2D( t2D, vUv ); 2567 #ifdef DECODE_VIDEO_TEXTURE 2568 texColor = 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 ); 2569 #endif 2570 texColor.rgb *= backgroundIntensity; 2571 gl_FragColor = texColor; 2572 #include <tonemapping_fragment> 2573 #include <colorspace_fragment> 2574}`,qA=`varying vec3 vWorldDirection; 2575#include <common> 2576void main() { 2577 vWorldDirection = transformDirection( position, modelMatrix ); 2578 #include <begin_vertex> 2579 #include <project_vertex> 2580 gl_Position.z = gl_Position.w; 2581}`,YA=`#ifdef ENVMAP_TYPE_CUBE 2582 uniform samplerCube envMap; 2583#elif defined( ENVMAP_TYPE_CUBE_UV ) 2584 uniform sampler2D envMap; 2585#endif 2586uniform float flipEnvMap; 2587uniform float backgroundBlurriness; 2588uniform float backgroundIntensity; 2589uniform mat3 backgroundRotation; 2590varying vec3 vWorldDirection; 2591#include <cube_uv_reflection_fragment> 2592void main() { 2593 #ifdef ENVMAP_TYPE_CUBE 2594 vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); 2595 #elif defined( ENVMAP_TYPE_CUBE_UV ) 2596 vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); 2597 #else 2598 vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 2599 #endif 2600 texColor.rgb *= backgroundIntensity; 2601 gl_FragColor = texColor; 2602 #include <tonemapping_fragment> 2603 #include <colorspace_fragment> 2604}`,$A=`varying vec3 vWorldDirection; 2605#include <common> 2606void main() { 2607 vWorldDirection = transformDirection( position, modelMatrix ); 2608 #include <begin_vertex> 2609 #include <project_vertex> 2610 gl_Position.z = gl_Position.w; 2611}`,jA=`uniform samplerCube tCube; 2612uniform float tFlip; 2613uniform float opacity; 2614varying vec3 vWorldDirection; 2615void main() { 2616 vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); 2617 gl_FragColor = texColor; 2618 gl_FragColor.a *= opacity; 2619 #include <tonemapping_fragment> 2620 #include <colorspace_fragment> 2621}`,KA=`#include <common> 2622#include <batching_pars_vertex> 2623#include <uv_pars_vertex> 2624#include <displacementmap_pars_vertex> 2625#include <morphtarget_pars_vertex> 2626#include <skinning_pars_vertex> 2627#include <logdepthbuf_pars_vertex> 2628#include <clipping_planes_pars_vertex> 2629varying vec2 vHighPrecisionZW; 2630void main() { 2631 #include <uv_vertex> 2632 #include <batching_vertex> 2633 #include <skinbase_vertex> 2634 #include <morphinstance_vertex> 2635 #ifdef USE_DISPLACEMENTMAP 2636 #include <beginnormal_vertex> 2637 #include <morphnormal_vertex> 2638 #include <skinnormal_vertex> 2639 #endif 2640 #include <begin_vertex> 2641 #include <morphtarget_vertex> 2642 #include <skinning_vertex> 2643 #include <displacementmap_vertex> 2644 #include <project_vertex> 2645 #include <logdepthbuf_vertex> 2646 #include <clipping_planes_vertex> 2647 vHighPrecisionZW = gl_Position.zw; 2648}`,ZA=`#if DEPTH_PACKING == 3200 2649 uniform float opacity; 2650#endif 2651#include <common> 2652#include <packing> 2653#include <uv_pars_fragment> 2654#include <map_pars_fragment> 2655#include <alphamap_pars_fragment> 2656#include <alphatest_pars_fragment> 2657#include <alphahash_pars_fragment> 2658#include <logdepthbuf_pars_fragment> 2659#include <clipping_planes_pars_fragment> 2660varying vec2 vHighPrecisionZW; 2661void main() { 2662 vec4 diffuseColor = vec4( 1.0 ); 2663 #include <clipping_planes_fragment> 2664 #if DEPTH_PACKING == 3200 2665 diffuseColor.a = opacity; 2666 #endif 2667 #include <map_fragment> 2668 #include <alphamap_fragment> 2669 #include <alphatest_fragment> 2670 #include <alphahash_fragment> 2671 #include <logdepthbuf_fragment> 2672 float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; 2673 #if DEPTH_PACKING == 3200 2674 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); 2675 #elif DEPTH_PACKING == 3201 2676 gl_FragColor = packDepthToRGBA( fragCoordZ ); 2677 #elif DEPTH_PACKING == 3202 2678 gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); 2679 #elif DEPTH_PACKING == 3203 2680 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); 2681 #endif 2682}`,JA=`#define DISTANCE 2683varying vec3 vWorldPosition; 2684#include <common> 2685#include <batching_pars_vertex> 2686#include <uv_pars_vertex> 2687#include <displacementmap_pars_vertex> 2688#include <morphtarget_pars_vertex> 2689#include <skinning_pars_vertex> 2690#include <clipping_planes_pars_vertex> 2691void main() { 2692 #include <uv_vertex> 2693 #include <batching_vertex> 2694 #include <skinbase_vertex> 2695 #include <morphinstance_vertex> 2696 #ifdef USE_DISPLACEMENTMAP 2697 #include <beginnormal_vertex> 2698 #include <morphnormal_vertex> 2699 #include <skinnormal_vertex> 2700 #endif 2701 #include <begin_vertex> 2702 #include <morphtarget_vertex> 2703 #include <skinning_vertex> 2704 #include <displacementmap_vertex> 2705 #include <project_vertex> 2706 #include <worldpos_vertex> 2707 #include <clipping_planes_vertex> 2708 vWorldPosition = worldPosition.xyz; 2709}`,QA=`#define DISTANCE 2710uniform vec3 referencePosition; 2711uniform float nearDistance; 2712uniform float farDistance; 2713varying vec3 vWorldPosition; 2714#include <common> 2715#include <packing> 2716#include <uv_pars_fragment> 2717#include <map_pars_fragment> 2718#include <alphamap_pars_fragment> 2719#include <alphatest_pars_fragment> 2720#include <alphahash_pars_fragment> 2721#include <clipping_planes_pars_fragment> 2722void main () { 2723 vec4 diffuseColor = vec4( 1.0 ); 2724 #include <clipping_planes_fragment> 2725 #include <map_fragment> 2726 #include <alphamap_fragment> 2727 #include <alphatest_fragment> 2728 #include <alphahash_fragment> 2729 float dist = length( vWorldPosition - referencePosition ); 2730 dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); 2731 dist = saturate( dist ); 2732 gl_FragColor = packDepthToRGBA( dist ); 2733}`,e1=`varying vec3 vWorldDirection; 2734#include <common> 2735void main() { 2736 vWorldDirection = transformDirection( position, modelMatrix ); 2737 #include <begin_vertex> 2738 #include <project_vertex> 2739}`,t1=`uniform sampler2D tEquirect; 2740varying vec3 vWorldDirection; 2741#include <common> 2742void main() { 2743 vec3 direction = normalize( vWorldDirection ); 2744 vec2 sampleUV = equirectUv( direction ); 2745 gl_FragColor = texture2D( tEquirect, sampleUV ); 2746 #include <tonemapping_fragment> 2747 #include <colorspace_fragment> 2748}`,n1=`uniform float scale; 2749attribute float lineDistance; 2750varying float vLineDistance; 2751#include <common> 2752#include <uv_pars_vertex> 2753#include <color_pars_vertex> 2754#include <fog_pars_vertex> 2755#include <morphtarget_pars_vertex> 2756#include <logdepthbuf_pars_vertex> 2757#include <clipping_planes_pars_vertex> 2758void main() { 2759 vLineDistance = scale * lineDistance; 2760 #include <uv_vertex> 2761 #include <color_vertex> 2762 #include <morphinstance_vertex> 2763 #include <morphcolor_vertex> 2764 #include <begin_vertex> 2765 #include <morphtarget_vertex> 2766 #include <project_vertex> 2767 #include <logdepthbuf_vertex> 2768 #include <clipping_planes_vertex> 2769 #include <fog_vertex> 2770}`,i1=`uniform vec3 diffuse; 2771uniform float opacity; 2772uniform float dashSize; 2773uniform float totalSize; 2774varying float vLineDistance; 2775#include <common> 2776#include <color_pars_fragment> 2777#include <uv_pars_fragment> 2778#include <map_pars_fragment> 2779#include <fog_pars_fragment> 2780#include <logdepthbuf_pars_fragment> 2781#include <clipping_planes_pars_fragment> 2782void main() { 2783 vec4 diffuseColor = vec4( diffuse, opacity ); 2784 #include <clipping_planes_fragment> 2785 if ( mod( vLineDistance, totalSize ) > dashSize ) { 2786 discard; 2787 } 2788 vec3 outgoingLight = vec3( 0.0 ); 2789 #include <logdepthbuf_fragment> 2790 #include <map_fragment> 2791 #include <color_fragment> 2792 outgoingLight = diffuseColor.rgb; 2793 #include <opaque_fragment> 2794 #include <tonemapping_fragment> 2795 #include <colorspace_fragment> 2796 #include <fog_fragment> 2797 #include <premultiplied_alpha_fragment> 2798}`,r1=`#include <common> 2799#include <batching_pars_vertex> 2800#include <uv_pars_vertex> 2801#include <envmap_pars_vertex> 2802#include <color_pars_vertex> 2803#include <fog_pars_vertex> 2804#include <morphtarget_pars_vertex> 2805#include <skinning_pars_vertex> 2806#include <logdepthbuf_pars_vertex> 2807#include <clipping_planes_pars_vertex> 2808void main() { 2809 #include <uv_vertex> 2810 #include <color_vertex> 2811 #include <morphinstance_vertex> 2812 #include <morphcolor_vertex> 2813 #include <batching_vertex> 2814 #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 2815 #include <beginnormal_vertex> 2816 #include <morphnormal_vertex> 2817 #include <skinbase_vertex> 2818 #include <skinnormal_vertex> 2819 #include <defaultnormal_vertex> 2820 #endif 2821 #include <begin_vertex> 2822 #include <morphtarget_vertex> 2823 #include <skinning_vertex> 2824 #include <project_vertex> 2825 #include <logdepthbuf_vertex> 2826 #include <clipping_planes_vertex> 2827 #include <worldpos_vertex> 2828 #include <envmap_vertex> 2829 #include <fog_vertex> 2830}`,s1=`uniform vec3 diffuse; 2831uniform float opacity; 2832#ifndef FLAT_SHADED 2833 varying vec3 vNormal; 2834#endif 2835#include <common> 2836#include <dithering_pars_fragment> 2837#include <color_pars_fragment> 2838#include <uv_pars_fragment> 2839#include <map_pars_fragment> 2840#include <alphamap_pars_fragment> 2841#include <alphatest_pars_fragment> 2842#include <alphahash_pars_fragment> 2843#include <aomap_pars_fragment> 2844#include <lightmap_pars_fragment> 2845#include <envmap_common_pars_fragment> 2846#include <envmap_pars_fragment> 2847#include <fog_pars_fragment> 2848#include <specularmap_pars_fragment> 2849#include <logdepthbuf_pars_fragment> 2850#include <clipping_planes_pars_fragment> 2851void main() { 2852 vec4 diffuseColor = vec4( diffuse, opacity ); 2853 #include <clipping_planes_fragment> 2854 #include <logdepthbuf_fragment> 2855 #include <map_fragment> 2856 #include <color_fragment> 2857 #include <alphamap_fragment> 2858 #include <alphatest_fragment> 2859 #include <alphahash_fragment> 2860 #include <specularmap_fragment> 2861 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2862 #ifdef USE_LIGHTMAP 2863 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 2864 reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; 2865 #else 2866 reflectedLight.indirectDiffuse += vec3( 1.0 ); 2867 #endif 2868 #include <aomap_fragment> 2869 reflectedLight.indirectDiffuse *= diffuseColor.rgb; 2870 vec3 outgoingLight = reflectedLight.indirectDiffuse; 2871 #include <envmap_fragment> 2872 #include <opaque_fragment> 2873 #include <tonemapping_fragment> 2874 #include <colorspace_fragment> 2875 #include <fog_fragment> 2876 #include <premultiplied_alpha_fragment> 2877 #include <dithering_fragment> 2878}`,o1=`#define LAMBERT 2879varying vec3 vViewPosition; 2880#include <common> 2881#include <batching_pars_vertex> 2882#include <uv_pars_vertex> 2883#include <displacementmap_pars_vertex> 2884#include <envmap_pars_vertex> 2885#include <color_pars_vertex> 2886#include <fog_pars_vertex> 2887#include <normal_pars_vertex> 2888#include <morphtarget_pars_vertex> 2889#include <skinning_pars_vertex> 2890#include <shadowmap_pars_vertex> 2891#include <logdepthbuf_pars_vertex> 2892#include <clipping_planes_pars_vertex> 2893void main() { 2894 #include <uv_vertex> 2895 #include <color_vertex> 2896 #include <morphinstance_vertex> 2897 #include <morphcolor_vertex> 2898 #include <batching_vertex> 2899 #include <beginnormal_vertex> 2900 #include <morphnormal_vertex> 2901 #include <skinbase_vertex> 2902 #include <skinnormal_vertex> 2903 #include <defaultnormal_vertex> 2904 #include <normal_vertex> 2905 #include <begin_vertex> 2906 #include <morphtarget_vertex> 2907 #include <skinning_vertex> 2908 #include <displacementmap_vertex> 2909 #include <project_vertex> 2910 #include <logdepthbuf_vertex> 2911 #include <clipping_planes_vertex> 2912 vViewPosition = - mvPosition.xyz; 2913 #include <worldpos_vertex> 2914 #include <envmap_vertex> 2915 #include <shadowmap_vertex> 2916 #include <fog_vertex> 2917}`,a1=`#define LAMBERT 2918uniform vec3 diffuse; 2919uniform vec3 emissive; 2920uniform float opacity; 2921#include <common> 2922#include <packing> 2923#include <dithering_pars_fragment> 2924#include <color_pars_fragment> 2925#include <uv_pars_fragment> 2926#include <map_pars_fragment> 2927#include <alphamap_pars_fragment> 2928#include <alphatest_pars_fragment> 2929#include <alphahash_pars_fragment> 2930#include <aomap_pars_fragment> 2931#include <lightmap_pars_fragment> 2932#include <emissivemap_pars_fragment> 2933#include <envmap_common_pars_fragment> 2934#include <envmap_pars_fragment> 2935#include <fog_pars_fragment> 2936#include <bsdfs> 2937#include <lights_pars_begin> 2938#include <normal_pars_fragment> 2939#include <lights_lambert_pars_fragment> 2940#include <shadowmap_pars_fragment> 2941#include <bumpmap_pars_fragment> 2942#include <normalmap_pars_fragment> 2943#include <specularmap_pars_fragment> 2944#include <logdepthbuf_pars_fragment> 2945#include <clipping_planes_pars_fragment> 2946void main() { 2947 vec4 diffuseColor = vec4( diffuse, opacity ); 2948 #include <clipping_planes_fragment> 2949 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2950 vec3 totalEmissiveRadiance = emissive; 2951 #include <logdepthbuf_fragment> 2952 #include <map_fragment> 2953 #include <color_fragment> 2954 #include <alphamap_fragment> 2955 #include <alphatest_fragment> 2956 #include <alphahash_fragment> 2957 #include <specularmap_fragment> 2958 #include <normal_fragment_begin> 2959 #include <normal_fragment_maps> 2960 #include <emissivemap_fragment> 2961 #include <lights_lambert_fragment> 2962 #include <lights_fragment_begin> 2963 #include <lights_fragment_maps> 2964 #include <lights_fragment_end> 2965 #include <aomap_fragment> 2966 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 2967 #include <envmap_fragment> 2968 #include <opaque_fragment> 2969 #include <tonemapping_fragment> 2970 #include <colorspace_fragment> 2971 #include <fog_fragment> 2972 #include <premultiplied_alpha_fragment> 2973 #include <dithering_fragment> 2974}`,l1=`#define MATCAP 2975varying vec3 vViewPosition; 2976#include <common> 2977#include <batching_pars_vertex> 2978#include <uv_pars_vertex> 2979#include <color_pars_vertex> 2980#include <displacementmap_pars_vertex> 2981#include <fog_pars_vertex> 2982#include <normal_pars_vertex> 2983#include <morphtarget_pars_vertex> 2984#include <skinning_pars_vertex> 2985#include <logdepthbuf_pars_vertex> 2986#include <clipping_planes_pars_vertex> 2987void main() { 2988 #include <uv_vertex> 2989 #include <color_vertex> 2990 #include <morphinstance_vertex> 2991 #include <morphcolor_vertex> 2992 #include <batching_vertex> 2993 #include <beginnormal_vertex> 2994 #include <morphnormal_vertex> 2995 #include <skinbase_vertex> 2996 #include <skinnormal_vertex> 2997 #include <defaultnormal_vertex> 2998 #include <normal_vertex> 2999 #include <begin_vertex> 3000 #include <morphtarget_vertex> 3001 #include <skinning_vertex> 3002 #include <displacementmap_vertex> 3003 #include <project_vertex> 3004 #include <logdepthbuf_vertex> 3005 #include <clipping_planes_vertex> 3006 #include <fog_vertex> 3007 vViewPosition = - mvPosition.xyz; 3008}`,c1=`#define MATCAP 3009uniform vec3 diffuse; 3010uniform float opacity; 3011uniform sampler2D matcap; 3012varying vec3 vViewPosition; 3013#include <common> 3014#include <dithering_pars_fragment> 3015#include <color_pars_fragment> 3016#include <uv_pars_fragment> 3017#include <map_pars_fragment> 3018#include <alphamap_pars_fragment> 3019#include <alphatest_pars_fragment> 3020#include <alphahash_pars_fragment> 3021#include <fog_pars_fragment> 3022#include <normal_pars_fragment> 3023#include <bumpmap_pars_fragment> 3024#include <normalmap_pars_fragment> 3025#include <logdepthbuf_pars_fragment> 3026#include <clipping_planes_pars_fragment> 3027void main() { 3028 ve
3028c4 diffuseColor = vec4( diffuse, opacity ); 3029 #include <clipping_planes_fragment> 3030 #include <logdepthbuf_fragment> 3031 #include <map_fragment> 3032 #include <color_fragment> 3033 #include <alphamap_fragment> 3034 #include <alphatest_fragment> 3035 #include <alphahash_fragment> 3036 #include <normal_fragment_begin> 3037 #include <normal_fragment_maps> 3038 vec3 viewDir = normalize( vViewPosition ); 3039 vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); 3040 vec3 y = cross( viewDir, x ); 3041 vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; 3042 #ifdef USE_MATCAP 3043 vec4 matcapColor = texture2D( matcap, uv ); 3044 #else 3045 vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); 3046 #endif 3047 vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; 3048 #include <opaque_fragment> 3049 #include <tonemapping_fragment> 3050 #include <colorspace_fragment> 3051 #include <fog_fragment> 3052 #include <premultiplied_alpha_fragment> 3053 #include <dithering_fragment> 3054}`,u1=`#define NORMAL 3055#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3056 varying vec3 vViewPosition; 3057#endif 3058#include <common> 3059#include <batching_pars_vertex> 3060#include <uv_pars_vertex> 3061#include <displacementmap_pars_vertex> 3062#include <normal_pars_vertex> 3063#include <morphtarget_pars_vertex> 3064#include <skinning_pars_vertex> 3065#include <logdepthbuf_pars_vertex> 3066#include <clipping_planes_pars_vertex> 3067void main() { 3068 #include <uv_vertex> 3069 #include <batching_vertex> 3070 #include <beginnormal_vertex> 3071 #include <morphinstance_vertex> 3072 #include <morphnormal_vertex> 3073 #include <skinbase_vertex> 3074 #include <skinnormal_vertex> 3075 #include <defaultnormal_vertex> 3076 #include <normal_vertex> 3077 #include <begin_vertex> 3078 #include <morphtarget_vertex> 3079 #include <skinning_vertex> 3080 #include <displacementmap_vertex> 3081 #include <project_vertex> 3082 #include <logdepthbuf_vertex> 3083 #include <clipping_planes_vertex> 3084#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3085 vViewPosition = - mvPosition.xyz; 3086#endif 3087}`,f1=`#define NORMAL 3088uniform float opacity; 3089#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3090 varying vec3 vViewPosition; 3091#endif 3092#include <packing> 3093#include <uv_pars_fragment> 3094#include <normal_pars_fragment> 3095#include <bumpmap_pars_fragment> 3096#include <normalmap_pars_fragment> 3097#include <logdepthbuf_pars_fragment> 3098#include <clipping_planes_pars_fragment> 3099void main() { 3100 vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); 3101 #include <clipping_planes_fragment> 3102 #include <logdepthbuf_fragment> 3103 #include <normal_fragment_begin> 3104 #include <normal_fragment_maps> 3105 gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); 3106 #ifdef OPAQUE 3107 gl_FragColor.a = 1.0; 3108 #endif 3109}`,h1=`#define PHONG 3110varying vec3 vViewPosition; 3111#include <common> 3112#include <batching_pars_vertex> 3113#include <uv_pars_vertex> 3114#include <displacementmap_pars_vertex> 3115#include <envmap_pars_vertex> 3116#include <color_pars_vertex> 3117#include <fog_pars_vertex> 3118#include <normal_pars_vertex> 3119#include <morphtarget_pars_vertex> 3120#include <skinning_pars_vertex> 3121#include <shadowmap_pars_vertex> 3122#include <logdepthbuf_pars_vertex> 3123#include <clipping_planes_pars_vertex> 3124void main() { 3125 #include <uv_vertex> 3126 #include <color_vertex> 3127 #include <morphcolor_vertex> 3128 #include <batching_vertex> 3129 #include <beginnormal_vertex> 3130 #include <morphinstance_vertex> 3131 #include <morphnormal_vertex> 3132 #include <skinbase_vertex> 3133 #include <skinnormal_vertex> 3134 #include <defaultnormal_vertex> 3135 #include <normal_vertex> 3136 #include <begin_vertex> 3137 #include <morphtarget_vertex> 3138 #include <skinning_vertex> 3139 #include <displacementmap_vertex> 3140 #include <project_vertex> 3141 #include <logdepthbuf_vertex> 3142 #include <clipping_planes_vertex> 3143 vViewPosition = - mvPosition.xyz; 3144 #include <worldpos_vertex> 3145 #include <envmap_vertex> 3146 #include <shadowmap_vertex> 3147 #include <fog_vertex> 3148}`,d1=`#define PHONG 3149uniform vec3 diffuse; 3150uniform vec3 emissive; 3151uniform vec3 specular; 3152uniform float shininess; 3153uniform float opacity; 3154#include <common> 3155#include <packing> 3156#include <dithering_pars_fragment> 3157#include <color_pars_fragment> 3158#include <uv_pars_fragment> 3159#include <map_pars_fragment> 3160#include <alphamap_pars_fragment> 3161#include <alphatest_pars_fragment> 3162#include <alphahash_pars_fragment> 3163#include <aomap_pars_fragment> 3164#include <lightmap_pars_fragment> 3165#include <emissivemap_pars_fragment> 3166#include <envmap_common_pars_fragment> 3167#include <envmap_pars_fragment> 3168#include <fog_pars_fragment> 3169#include <bsdfs> 3170#include <lights_pars_begin> 3171#include <normal_pars_fragment> 3172#include <lights_phong_pars_fragment> 3173#include <shadowmap_pars_fragment> 3174#include <bumpmap_pars_fragment> 3175#include <normalmap_pars_fragment> 3176#include <specularmap_pars_fragment> 3177#include <logdepthbuf_pars_fragment> 3178#include <clipping_planes_pars_fragment> 3179void main() { 3180 vec4 diffuseColor = vec4( diffuse, opacity ); 3181 #include <clipping_planes_fragment> 3182 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3183 vec3 totalEmissiveRadiance = emissive; 3184 #include <logdepthbuf_fragment> 3185 #include <map_fragment> 3186 #include <color_fragment> 3187 #include <alphamap_fragment> 3188 #include <alphatest_fragment> 3189 #include <alphahash_fragment> 3190 #include <specularmap_fragment> 3191 #include <normal_fragment_begin> 3192 #include <normal_fragment_maps> 3193 #include <emissivemap_fragment> 3194 #include <lights_phong_fragment> 3195 #include <lights_fragment_begin> 3196 #include <lights_fragment_maps> 3197 #include <lights_fragment_end> 3198 #include <aomap_fragment> 3199 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; 3200 #include <envmap_fragment> 3201 #include <opaque_fragment> 3202 #include <tonemapping_fragment> 3203 #include <colorspace_fragment> 3204 #include <fog_fragment> 3205 #include <premultiplied_alpha_fragment> 3206 #include <dithering_fragment> 3207}`,p1=`#define STANDARD 3208varying vec3 vViewPosition; 3209#ifdef USE_TRANSMISSION 3210 varying vec3 vWorldPosition; 3211#endif 3212#include <common> 3213#include <batching_pars_vertex> 3214#include <uv_pars_vertex> 3215#include <displacementmap_pars_vertex> 3216#include <color_pars_vertex> 3217#include <fog_pars_vertex> 3218#include <normal_pars_vertex> 3219#include <morphtarget_pars_vertex> 3220#include <skinning_pars_vertex> 3221#include <shadowmap_pars_vertex> 3222#include <logdepthbuf_pars_vertex> 3223#include <clipping_planes_pars_vertex> 3224void main() { 3225 #include <uv_vertex> 3226 #include <color_vertex> 3227 #include <morphinstance_vertex> 3228 #include <morphcolor_vertex> 3229 #include <batching_vertex> 3230 #include <beginnormal_vertex> 3231 #include <morphnormal_vertex> 3232 #include <skinbase_vertex> 3233 #include <skinnormal_vertex> 3234 #include <defaultnormal_vertex> 3235 #include <normal_vertex> 3236 #include <begin_vertex> 3237 #include <morphtarget_vertex> 3238 #include <skinning_vertex> 3239 #include <displacementmap_vertex> 3240 #include <project_vertex> 3241 #include <logdepthbuf_vertex> 3242 #include <clipping_planes_vertex> 3243 vViewPosition = - mvPosition.xyz; 3244 #include <worldpos_vertex> 3245 #include <shadowmap_vertex> 3246 #include <fog_vertex> 3247#ifdef USE_TRANSMISSION 3248 vWorldPosition = worldPosition.xyz; 3249#endif 3250}`,m1=`#define STANDARD 3251#ifdef PHYSICAL 3252 #define IOR 3253 #define USE_SPECULAR 3254#endif 3255uniform vec3 diffuse; 3256uniform vec3 emissive; 3257uniform float roughness; 3258uniform float metalness; 3259uniform float opacity; 3260#ifdef IOR 3261 uniform float ior; 3262#endif 3263#ifdef USE_SPECULAR 3264 uniform float specularIntensity; 3265 uniform vec3 specularColor; 3266 #ifdef USE_SPECULAR_COLORMAP 3267 uniform sampler2D specularColorMap; 3268 #endif 3269 #ifdef USE_SPECULAR_INTENSITYMAP 3270 uniform sampler2D specularIntensityMap; 3271 #endif 3272#endif 3273#ifdef USE_CLEARCOAT 3274 uniform float clearcoat; 3275 uniform float clearcoatRoughness; 3276#endif 3277#ifdef USE_DISPERSION 3278 uniform float dispersion; 3279#endif
3280#ifdef USE_IRIDESCENCE 3281 uniform float iridescence; 3282 uniform float iridescenceIOR; 3283 uniform float iridescenceThicknessMinimum; 3284 uniform float iridescenceThicknessMaximum; 3285#endif 3286#ifdef USE_SHEEN 3287 uniform vec3 sheenColor; 3288 uniform float sheenRoughness; 3289 #ifdef USE_SHEEN_COLORMAP 3290 uniform sampler2D sheenColorMap; 3291 #endif 3292 #ifdef USE_SHEEN_ROUGHNESSMAP 3293 uniform sampler2D sheenRoughnessMap; 3294 #endif 3295#endif 3296#ifdef USE_ANISOTROPY 3297 uniform vec2 anisotropyVector; 3298 #ifdef USE_ANISOTROPYMAP 3299 uniform sampler2D anisotropyMap; 3300 #endif 3301#endif 3302varying vec3 vViewPosition; 3303#include <common> 3304#include <packing> 3305#include <dithering_pars_fragment> 3306#include <color_pars_fragment> 3307#include <uv_pars_fragment> 3308#include <map_pars_fragment> 3309#include <alphamap_pars_fragment> 3310#include <alphatest_pars_fragment> 3311#include <alphahash_pars_fragment> 3312#include <aomap_pars_fragment> 3313#include <lightmap_pars_fragment> 3314#include <emissivemap_pars_fragment> 3315#include <iridescence_fragment> 3316#include <cube_uv_reflection_fragment> 3317#include <envmap_common_pars_fragment> 3318#include <envmap_physical_pars_fragment> 3319#include <fog_pars_fragment> 3320#include <lights_pars_begin> 3321#include <normal_pars_fragment> 3322#include <lights_physical_pars_fragment> 3323#include <transmission_pars_fragment> 3324#include <shadowmap_pars_fragment> 3325#include <bumpmap_pars_fragment> 3326#include <normalmap_pars_fragment> 3327#include <clearcoat_pars_fragment> 3328#include <iridescence_pars_fragment> 3329#include <roughnessmap_pars_fragment> 3330#include <metalnessmap_pars_fragment> 3331#include <logdepthbuf_pars_fragment> 3332#include <clipping_planes_pars_fragment> 3333void main() { 3334 vec4 diffuseColor = vec4( diffuse, opacity ); 3335 #include <clipping_planes_fragment> 3336 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3337 vec3 totalEmissiveRadiance = emissive; 3338 #include <logdepthbuf_fragment> 3339 #include <map_fragment> 3340 #include <color_fragment> 3341 #include <alphamap_fragment> 3342 #include <alphatest_fragment> 3343 #include <alphahash_fragment> 3344 #include <roughnessmap_fragment> 3345 #include <metalnessmap_fragment> 3346 #include <normal_fragment_begin> 3347 #include <normal_fragment_maps> 3348 #include <clearcoat_normal_fragment_begin> 3349 #include <clearcoat_normal_fragment_maps> 3350 #include <emissivemap_fragment> 3351 #include <lights_physical_fragment> 3352 #include <lights_fragment_begin> 3353 #include <lights_fragment_maps> 3354 #include <lights_fragment_end> 3355 #include <aomap_fragment> 3356 vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; 3357 vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; 3358 #include <transmission_fragment> 3359 vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; 3360 #ifdef USE_SHEEN 3361 float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); 3362 outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; 3363 #endif 3364 #ifdef USE_CLEARCOAT 3365 float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); 3366 vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); 3367 outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; 3368 #endif 3369 #include <opaque_fragment> 3370 #include <tonemapping_fragment> 3371 #include <colorspace_fragment> 3372 #include <fog_fragment> 3373 #include <premultiplied_alpha_fragment> 3374 #include <dithering_fragment> 3375}`,_1=`#define TOON 3376varying vec3 vViewPosition; 3377#include <common> 3378#include <batching_pars_vertex> 3379#include <uv_pars_vertex> 3380#include <displacementmap_pars_vertex> 3381#include <color_pars_vertex> 3382#include <fog_pars_vertex> 3383#include <normal_pars_vertex> 3384#include <morphtarget_pars_vertex> 3385#include <skinning_pars_vertex> 3386#include <shadowmap_pars_vertex> 3387#include <logdepthbuf_pars_vertex> 3388#include <clipping_planes_pars_vertex> 3389void main() { 3390 #include <uv_vertex> 3391 #include <color_vertex> 3392 #include <morphinstance_vertex> 3393 #include <morphcolor_vertex> 3394 #include <batching_vertex> 3395 #include <beginnormal_vertex> 3396 #include <morphnormal_vertex> 3397 #include <skinbase_vertex> 3398 #include <skinnormal_vertex> 3399 #include <defaultnormal_vertex> 3400 #include <normal_vertex> 3401 #include <begin_vertex> 3402 #include <morphtarget_vertex> 3403 #include <skinning_vertex> 3404 #include <displacementmap_vertex> 3405 #include <project_vertex> 3406 #include <logdepthbuf_vertex> 3407 #include <clipping_planes_vertex> 3408 vViewPosition = - mvPosition.xyz; 3409 #include <worldpos_vertex> 3410 #include <shadowmap_vertex> 3411 #include <fog_vertex> 3412}`,g1=`#define TOON 3413uniform vec3 diffuse; 3414uniform vec3 emissive; 3415uniform float opacity; 3416#include <common> 3417#include <packing> 3418#include <dithering_pars_fragment> 3419#include <color_pars_fragment> 3420#include <uv_pars_fragment> 3421#include <map_pars_fragment> 3422#include <alphamap_pars_fragment> 3423#include <alphatest_pars_fragment> 3424#include <alphahash_pars_fragment> 3425#include <aomap_pars_fragment> 3426#include <lightmap_pars_fragment> 3427#include <emissivemap_pars_fragment> 3428#include <gradientmap_pars_fragment> 3429#include <fog_pars_fragment> 3430#include <bsdfs> 3431#include <lights_pars_begin> 3432#include <normal_pars_fragment> 3433#include <lights_toon_pars_fragment> 3434#include <shadowmap_pars_fragment> 3435#include <bumpmap_pars_fragment> 3436#include <normalmap_pars_fragment> 3437#include <logdepthbuf_pars_fragment> 3438#include <clipping_planes_pars_fragment> 3439void main() { 3440 vec4 diffuseColor = vec4( diffuse, opacity ); 3441 #include <clipping_planes_fragment> 3442 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3443 vec3 totalEmissiveRadiance = emissive; 3444 #include <logdepthbuf_fragment> 3445 #include <map_fragment> 3446 #include <color_fragment> 3447 #include <alphamap_fragment> 3448 #include <alphatest_fragment> 3449 #include <alphahash_fragment> 3450 #include <normal_fragment_begin> 3451 #include <normal_fragment_maps> 3452 #include <emissivemap_fragment> 3453 #include <lights_toon_fragment> 3454 #include <lights_fragment_begin> 3455 #include <lights_fragment_maps> 3456 #include <lights_fragment_end> 3457 #include <aomap_fragment> 3458 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3459 #include <opaque_fragment> 3460 #include <tonemapping_fragment> 3461 #include <colorspace_fragment> 3462 #include <fog_fragment> 3463 #include <premultiplied_alpha_fragment> 3464 #include <dithering_fragment> 3465}`,v1=`uniform float size; 3466uniform float scale; 3467#include <common> 3468#include <color_pars_vertex> 3469#include <fog_pars_vertex> 3470#include <morphtarget_pars_vertex> 3471#include <logdepthbuf_pars_vertex> 3472#include <clipping_planes_pars_vertex> 3473#ifdef USE_POINTS_UV 3474 varying vec2 vUv; 3475 uniform mat3 uvTransform; 3476#endif 3477void main() { 3478 #ifdef USE_POINTS_UV 3479 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 3480 #endif 3481 #include <color_vertex> 3482 #include <morphinstance_vertex> 3483 #include <morphcolor_vertex> 3484 #include <begin_vertex> 3485 #include <morphtarget_vertex> 3486 #include <project_vertex> 3487 gl_PointSize = size; 3488 #ifdef USE_SIZEATTENUATION 3489 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3490 if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); 3491 #endif 3492 #include <logdepthbuf_vertex> 3493 #include <clipping_planes_vertex> 3494 #include <worldpos_vertex> 3495 #include <fog_vertex> 3496}`,x1=`uniform vec3 diffuse; 3497uniform float opacity; 3498#include <common> 3499#include <color_pars_fragment> 3500#include <map_particle_pars_fragment> 3501#include <alphatest_pars_fragment> 3502#include <alphahash_pars_fragment> 3503#include <fog_pars_fragment> 3504#include <logdepthbuf_pars_fragment> 3505#include <clipping_planes_pars_fragment> 3506void main() { 3507 vec4 diffuseColor = vec4( diffuse, opacity ); 3508 #include <clipping_planes_fragment> 3509 vec3 outgoingLight = vec3( 0.0 ); 3510 #include <logdepthbuf_fragment> 3511 #include <map_particle_fragment> 3512 #include <color_fragment> 3513 #include <alphatest_fragment> 3514 #include <alphahash_fragment> 3515 outgoingLight = diffuseColor.rgb; 3516 #include <opaque_fragment> 3517 #include <tonemapping_fragment> 3518 #include <colorspace_fragment> 3519 #include <fog_fragment> 3520 #include <premultiplied_alpha_fragment> 3521}`,y1=`#include <common> 3522#include <batching_pars_vertex> 3523#include <fog_pars_vertex> 3524#include <morphtarget_pars_vertex> 3525#include <skinning_pars_vertex> 3526#include <logdepthbuf_pars_vertex> 3527#include <shadowmap_pars_vertex> 3528void main() { 3529 #include <batching_vertex> 3530 #include <beginnormal_vertex> 3531 #include <morphinstance_vertex> 3532 #include <morphnormal_vertex> 3533 #include <skinbase_vertex> 3534 #include <skinnormal_vertex> 3535 #include <defaultnormal_vertex> 3536 #include <begin_vertex> 3537 #include <morphtarget_vertex> 3538 #include <skinning_vertex> 3539 #include <project_vertex> 3540 #include <logdepthbuf_vertex> 3541 #include <worldpos_vertex> 3542 #include <shadowmap_vertex> 3543 #include <fog_vertex> 3544}`,S1=`uniform vec3 color; 3545uniform float opacity; 3546#include <common> 3547#include <packing> 3548#include <fog_pars_fragment> 3549#include <bsdfs> 3550#include <lights_pars_begin> 3551#include <logdepthbuf_pars_fragment> 3552#include <shadowmap_pars_fragment> 3553#include <shadowmask_pars_fragment> 3554void main() { 3555 #include <logdepthbuf_fragment> 3556 gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); 3557 #include <tonemapping_fragment> 3558 #include <colorspace_fragment> 3559 #include <fog_fragment> 3560}`,M1=`uniform float rotation; 3561uniform vec2 center; 3562#include <common> 3563#include <uv_pars_vertex> 3564#include <fog_pars_vertex> 3565#include <logdepthbuf_pars_vertex> 3566#include <clipping_planes_pars_vertex> 3567void main() { 3568 #include <uv_vertex> 3569 vec4 mvPosition = modelViewMatrix[ 3 ]; 3570 vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); 3571 #ifndef USE_SIZEATTENUATION 3572 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3573 if ( isPerspective ) scale *= - mvPosition.z; 3574 #endif 3575 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; 3576 vec2 rotatedPosition; 3577 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 3578 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 3579 mvPosition.xy += rotatedPosition; 3580 gl_Position = projectionMatrix * mvPosition; 3581 #include <logdepthbuf_vertex> 3582 #include <clipping_planes_vertex> 3583 #include <fog_vertex> 3584}`,E1=`uniform vec3 diffuse; 3585uniform float opacity; 3586#include <common> 3587#include <uv_pars_fragment> 3588#include <map_pars_fragment> 3589#include <alphamap_pars_fragment> 3590#include <alphatest_pars_fragment> 3591#include <alphahash_pars_fragment> 3592#include <fog_pars_fragment> 3593#include <logdepthbuf_pars_fragment> 3594#include <clipping_planes_pars_fragment> 3595void main() { 3596 vec4 diffuseColor = vec4( diffuse, opacity ); 3597 #include <clipping_planes_fragment> 3598 vec3 outgoingLight = vec3( 0.0 ); 3599 #include <logdepthbuf_fragment> 3600 #include <map_fragment> 3601 #include <alphamap_fragment> 3602 #include <alphatest_fragment> 3603 #include <alphahash_fragment> 3604 outgoingLight = diffuseColor.rgb; 3605 #include <opaque_fragment> 3606 #include <tonemapping_fragment> 3607 #include <colorspace_fragment> 3608 #include <fog_fragment> 3609}`,Ve={alphahash_fragment:Xb,alphahash_pars_fragment:qb,alphamap_fragment:Yb,alphamap_pars_fragment:$b,alphatest_fragment:jb,alphatest_pars_fragment:Kb,aomap_fragment:Zb,aomap_pars_fragment:Jb,batching_pars_vertex:Qb,batching_vertex:ew,begin_vertex:tw,beginnormal_vertex:nw,bsdfs:iw,iridescence_fragment:rw,bumpmap_pars_fragment:sw,clipping_planes_fragment:ow,clipping_planes_pars_fragment:aw,clipping_planes_pars_vertex:lw,clipping_planes_vertex:cw,color_fragment:uw,color_pars_fragment:fw,color_pars_vertex:hw,color_vertex:dw,common:pw,cube_uv_reflection_fragment:mw,defaultnormal_vertex:_w,displacementmap_pars_vertex:gw,displacementmap_vertex:vw,emissivemap_fragment:xw,emissivemap_pars_fragment:yw,colorspace_fragment:Sw,colorspace_pars_fragment:Mw,envmap_fragment:Ew,envmap_common_pars_fragment:Tw,envmap_pars_fragment:bw,envmap_pars_vertex:ww,envmap_physical_pars_fragment:Fw,envmap_vertex:Aw,fog_vertex:Rw,fog_pars_vertex:Cw,fog_fragment:Pw,fog_pars_fragment:Dw,gradientmap_pars_fragment:Lw,lightmap_pars_fragment:Iw,lights_lambert_fragment:Uw,lights_lambert_pars_fragment:Nw,lights_pars_begin:Ow,lights_toon_fragment:Bw,lights_toon_pars_fragment:kw,lights_phong_fragment:Hw,lights_phong_pars_fragment:zw,lights_physical_fragment:Vw,lights_physical_pars_fragment:Gw,lights_fragment_begin:Ww,lights_fragment_maps:Xw,lights_fragment_end:qw,logdepthbuf_fragment:Yw,logdepthbuf_pars_fragment:$w,logdepthbuf_pars_vertex:jw,logdepthbuf_vertex:Kw,map_fragment:Zw,map_pars_fragment:Jw,map_particle_fragment:Qw,map_particle_pars_fragment:eA,metalnessmap_fragment:tA,metalnessmap_pars_fragment:nA,morphinstance_vertex:iA,morphcolor_vertex:rA,morphnormal_vertex:sA,morphtarget_pars_vertex:oA,morphtarget_vertex:aA,normal_fragment_begin:lA,normal_fragment_maps:cA,normal_pars_fragment:uA,normal_pars_vertex:fA,normal_vertex:hA,normalmap_pars_fragment:dA,clearcoat_normal_fragment_begin:pA,clearcoat_normal_fragment_maps:mA,clearcoat_pars_fragment:_A,iridescence_pars_fragment:gA,opaque_fragment:vA,packing:xA,premultiplied_alpha_fragment:yA,project_vertex:SA,dithering_fragment:MA,dithering_pars_fragment:EA,roughnessmap_fragment:TA,roughnessmap_pars_fragment:bA,shadowmap_pars_fragment:wA,shadowmap_pars_vertex:AA,shadowmap_vertex:RA,shadowmask_pars_fragment:CA,skinbase_vertex:PA,skinning_pars_vertex:DA,skinning_vertex:LA,skinnormal_vertex:IA,specularmap_fragment:UA,specularmap_pars_fragment:NA,tonemapping_fragment:OA,tonemapping_pars_fragment:FA,transmission_fragment:BA,transmission_pars_fragment:kA,uv_pars_fragment:HA,uv_pars_vertex:zA,uv_vertex:VA,worldpos_vertex:GA,background_vert:WA,background_frag:XA,backgroundCube_vert:qA,backgroundCube_frag:YA,cube_vert:$A,cube_frag:jA,depth_vert:KA,depth_frag:ZA,distanceRGBA_vert:JA,distanceRGBA_frag:QA,equirect_vert:e1,equirect_frag:t1,linedashed_vert:n1,linedashed_frag:i1,meshbasic_vert:r1,meshbasic_frag:s1,meshlambert_vert:o1,meshlambert_frag:a1,meshmatcap_vert:l1,meshmatcap_frag:c1,meshnormal_vert:u1,meshnormal_frag:f1,meshphong_vert:h1,meshphong_frag:d1,meshphysical_vert:p1,meshphysical_frag:m1,meshtoon_vert:_1,meshtoon_frag:g1,points_vert:v1,points_frag:x1,shadow_vert:y1,shadow_frag:S1,sprite_vert:M1,sprite_frag:E1},_e={common:{diffuse:{value:new tt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new ze},alphaMap:{value:null},alphaMapTransform:{value:new ze},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new ze}},envmap:{envMap:{value:null},envMapRotation:{value:new ze},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new ze}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new ze}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new ze},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new ze},normalScale:{value:new Je(1,1)}}
vendor: 28,852 bytes, lines 3609-3684
3609,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new ze},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new ze}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new ze}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new ze}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new tt(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 tt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new ze},alphaTest:{value:0},uvTransform:{value:new ze}},sprite:{diffuse:{value:new tt(16777215)},opacity:{value:1},center:{value:new Je(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new ze},alphaMap:{value:null},alphaMapTransform:{value:new ze},alphaTest:{value:0}}},$n={basic:{uniforms:Wt([_e.common,_e.specularmap,_e.envmap,_e.aomap,_e.lightmap,_e.fog]),vertexShader:Ve.meshbasic_vert,fragmentShader:Ve.meshbasic_frag},lambert:{uniforms:Wt([_e.common,_e.specularmap,_e.envmap,_e.aomap,_e.lightmap,_e.emissivemap,_e.bumpmap,_e.normalmap,_e.displacementmap,_e.fog,_e.lights,{emissive:{value:new tt(0)}}]),vertexShader:Ve.meshlambert_vert,fragmentShader:Ve.meshlambert_frag},phong:{uniforms:Wt([_e.common,_e.specularmap,_e.envmap,_e.aomap,_e.lightmap,_e.emissivemap,_e.bumpmap,_e.normalmap,_e.displacementmap,_e.fog,_e.lights,{emissive:{value:new tt(0)},specular:{value:new tt(1118481)},shininess:{value:30}}]),vertexShader:Ve.meshphong_vert,fragmentShader:Ve.meshphong_frag},standard:{uniforms:Wt([_e.common,_e.envmap,_e.aomap,_e.lightmap,_e.emissivemap,_e.bumpmap,_e.normalmap,_e.displacementmap,_e.roughnessmap,_e.metalnessmap,_e.fog,_e.lights,{emissive:{value:new tt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ve.meshphysical_vert,fragmentShader:Ve.meshphysical_frag},toon:{uniforms:Wt([_e.common,_e.aomap,_e.lightmap,_e.emissivemap,_e.bumpmap,_e.normalmap,_e.displacementmap,_e.gradientmap,_e.fog,_e.lights,{emissive:{value:new tt(0)}}]),vertexShader:Ve.meshtoon_vert,fragmentShader:Ve.meshtoon_frag},matcap:{uniforms:Wt([_e.common,_e.bumpmap,_e.normalmap,_e.displacementmap,_e.fog,{matcap:{value:null}}]),vertexShader:Ve.meshmatcap_vert,fragmentShader:Ve.meshmatcap_frag},points:{uniforms:Wt([_e.points,_e.fog]),vertexShader:Ve.points_vert,fragmentShader:Ve.points_frag},dashed:{uniforms:Wt([_e.common,_e.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ve.linedashed_vert,fragmentShader:Ve.linedashed_frag},depth:{uniforms:Wt([_e.common,_e.displacementmap]),vertexShader:Ve.depth_vert,fragmentShader:Ve.depth_frag},normal:{uniforms:Wt([_e.common,_e.bumpmap,_e.normalmap,_e.displacementmap,{opacity:{value:1}}]),vertexShader:Ve.meshnormal_vert,fragmentShader:Ve.meshnormal_frag},sprite:{uniforms:Wt([_e.sprite,_e.fog]),vertexShader:Ve.sprite_vert,fragmentShader:Ve.sprite_frag},background:{uniforms:{uvTransform:{value:new ze},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ve.background_vert,fragmentShader:Ve.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new ze}},vertexShader:Ve.backgroundCube_vert,fragmentShader:Ve.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ve.cube_vert,fragmentShader:Ve.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ve.equirect_vert,fragmentShader:Ve.equirect_frag},distanceRGBA:{uniforms:Wt([_e.common,_e.displacementmap,{referencePosition:{value:new K},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ve.distanceRGBA_vert,fragmentShader:Ve.distanceRGBA_frag},shadow:{uniforms:Wt([_e.lights,_e.fog,{color:{value:new tt(0)},opacity:{value:1}}]),vertexShader:Ve.shadow_vert,fragmentShader:Ve.shadow_frag}};$n.physical={uniforms:Wt([$n.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new ze},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new ze},clearcoatNormalScale:{value:new Je(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new ze},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new ze},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new ze},sheen:{value:0},sheenColor:{value:new tt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new ze},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new ze},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new ze},transmissionSamplerSize:{value:new Je},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new ze},attenuationDistance:{value:0},attenuationColor:{value:new tt(0)},specularColor:{value:new tt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new ze},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new ze},anisotropyVector:{value:new Je},anisotropyMap:{value:null},anisotropyMapTransform:{value:new ze}}]),vertexShader:Ve.meshphysical_vert,fragmentShader:Ve.meshphysical_frag};const Ma={r:0,b:0,g:0},vr=new Ai,T1=new Tt;function b1(n,e,t,i,r,s,o){const a=new tt(0);let l=s===!0?0:1,u,c,f=null,h=0,d=null;function g(T){let x=T.isScene===!0?T.background:null;return x&&x.isTexture&&(x=(T.backgroundBlurriness>0?t:e).get(x)),x}function _(T){let x=!1;const v=g(T);v===null?p(a,l):v&&v.isColor&&(p(v,1),x=!0);const A=n.xr.getEnvironmentBlendMode();A==="additive"?i.buffers.color.setClear(0,0,0,1,o):A==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||x)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil))}function m(T,x){const v=g(x);v&&(v.isCubeTexture||v.mapping===Al)?(c===void 0&&(c=new Hn(new Xo(1,1,1),new ii({name:"BackgroundCubeMaterial",uniforms:Vs($n.backgroundCube.uniforms),vertexShader:$n.backgroundCube.vertexShader,fragmentShader:$n.backgroundCube.fragmentShader,side:on,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(A,w,C){this.matrixWorld.copyPosition(C.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(c)),vr.copy(x.backgroundRotation),vr.x*=-1,vr.y*=-1,vr.z*=-1,v.isCubeTexture&&v.isRenderTargetTexture===!1&&(vr.y*=-1,vr.z*=-1),c.material.uniforms.envMap.value=v,c.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,c.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,c.material.uniforms.backgroundRotation.value.setFromMatrix4(T1.makeRotationFromEuler(vr)),c.material.toneMapped=qe.getTransfer(v.colorSpace)!==nt,(f!==v||h!==v.version||d!==n.toneMapping)&&(c.material.needsUpdate=!0,f=v,h=v.version,d=n.toneMapping),c.layers.enableAll(),T.unshift(c,c.geometry,c.material,0,0,null)):v&&v.isTexture&&(u===void 0&&(u=new Hn(new qo(2,2),new ii({name:"BackgroundMaterial",uniforms:Vs($n.background.uniforms),vertexShader:$n.background.vertexShader,fragmentShader:$n.background.fragmentShader,side:nr,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(u)),u.material.uniforms.t2D.value=v,u.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,u.material.toneMapped=qe.getTransfer(v.colorSpace)!==nt,v.matrixAutoUpdate===!0&&v.updateMatrix(),u.material.uniforms.uvTransform.value.copy(v.matrix),(f!==v||h!==v.version||d!==n.toneMapping)&&(u.material.needsUpdate=!0,f=v,h=v.version,d=n.toneMapping),u.layers.enableAll(),T.unshift(u,u.geometry,u.material,0,0,null))}function p(T,x){T.getRGB(Ma,v0(n)),i.buffers.color.setClear(Ma.r,Ma.g,Ma.b,x,o)}return{getClearColor:function(){return a},setClearColor:function(T,x=1){a.set(T),l=x,p(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(T){l=T,p(a,l)},render:_,addToRenderList:m}}function w1(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},r=h(null);let s=r,o=!1;function a(M,I,z,O,X){let J=!1;const D=f(O,z,I);s!==D&&(s=D,u(s.object)),J=d(M,O,z,X),J&&g(M,O,z,X),X!==null&&e.update(X,n.ELEMENT_ARRAY_BUFFER),(J||o)&&(o=!1,v(M,I,z,O),X!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(X).buffer))}function l(){return n.createVertexArray()}function u(M){return n.bindVertexArray(M)}function c(M){return n.deleteVertexArray(M)}function f(M,I,z){const O=z.wireframe===!0;let X=i[M.id];X===void 0&&(X={},i[M.id]=X);let J=X[I.id];J===void 0&&(J={},X[I.id]=J);let D=J[O];return D===void 0&&(D=h(l()),J[O]=D),D}function h(M){const I=[],z=[],O=[];for(let X=0;X<t;X++)I[X]=0,z[X]=0,O[X]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:I,enabledAttributes:z,attributeDivisors:O,object:M,attributes:{},index:null}}function d(M,I,z,O){const X=s.attributes,J=I.attributes;let D=0;const V=z.getAttributes();for(const U in V)if(V[U].location>=0){const fe=X[U];let pe=J[U];if(pe===void 0&&(U==="instanceMatrix"&&M.instanceMatrix&&(pe=M.instanceMatrix),U==="instanceColor"&&M.instanceColor&&(pe=M.instanceColor)),fe===void 0||fe.attribute!==pe||pe&&fe.data!==pe.data)return!0;D++}return s.attributesNum!==D||s.index!==O}function g(M,I,z,O){const X={},J=I.attributes;let D=0;const V=z.getAttributes();for(const U in V)if(V[U].location>=0){let fe=J[U];fe===void 0&&(U==="instanceMatrix"&&M.instanceMatrix&&(fe=M.instanceMatrix),U==="instanceColor"&&M.instanceColor&&(fe=M.instanceColor));const pe={};pe.attribute=fe,fe&&fe.data&&(pe.data=fe.data),X[U]=pe,D++}s.attributes=X,s.attributesNum=D,s.index=O}function _(){const M=s.newAttributes;for(let I=0,z=M.length;I<z;I++)M[I]=0}function m(M){p(M,0)}function p(M,I){const z=s.newAttributes,O=s.enabledAttributes,X=s.attributeDivisors;z[M]=1,O[M]===0&&(n.enableVertexAttribArray(M),O[M]=1),X[M]!==I&&(n.vertexAttribDivisor(M,I),X[M]=I)}function T(){const M=s.newAttributes,I=s.enabledAttributes;for(let z=0,O=I.length;z<O;z++)I[z]!==M[z]&&(n.disableVertexAttribArray(z),I[z]=0)}function x(M,I,z,O,X,J,D){D===!0?n.vertexAttribIPointer(M,I,z,X,J):n.vertexAttribPointer(M,I,z,O,X,J)}function v(M,I,z,O){_();const X=O.attributes,J=z.getAttributes(),D=I.defaultAttributeValues;for(const V in J){const U=J[V];if(U.location>=0){let se=X[V];if(se===void 0&&(V==="instanceMatrix"&&M.instanceMatrix&&(se=M.instanceMatrix),V==="instanceColor"&&M.instanceColor&&(se=M.instanceColor)),se!==void 0){const fe=se.normalized,pe=se.itemSize,Ee=e.get(se);if(Ee===void 0)continue;const Ge=Ee.buffer,te=Ee.type,le=Ee.bytesPerElement,Me=te===n.INT||te===n.UNSIGNED_INT||se.gpuType===lh;if(se.isInterleavedBufferAttribute){const de=se.data,Ce=de.stride,Le=se.offset;if(de.isInstancedInterleavedBuffer){for(let Ne=0;Ne<U.locationSize;Ne++)p(U.location+Ne,de.meshPerAttribute);M.isInstancedMesh!==!0&&O._maxInstanceCount===void 0&&(O._maxInstanceCount=de.meshPerAttribute*de.count)}else for(let Ne=0;Ne<U.locationSize;Ne++)m(U.location+Ne);n.bindBuffer(n.ARRAY_BUFFER,Ge);for(let Ne=0;Ne<U.locationSize;Ne++)x(U.location+Ne,pe/U.locationSize,te,fe,Ce*le,(Le+pe/U.locationSize*Ne)*le,Me)}else{if(se.isInstancedBufferAttribute){for(let de=0;de<U.locationSize;de++)p(U.location+de,se.meshPerAttribute);M.isInstancedMesh!==!0&&O._maxInstanceCount===void 0&&(O._maxInstanceCount=se.meshPerAttribute*se.count)}else for(let de=0;de<U.locationSize;de++)m(U.location+de);n.bindBuffer(n.ARRAY_BUFFER,Ge);for(let de=0;de<U.locationSize;de++)x(U.location+de,pe/U.locationSize,te,fe,pe*le,pe/U.locationSize*de*le,Me)}}else if(D!==void 0){const fe=D[V];if(fe!==void 0)switch(fe.length){case 2:n.vertexAttrib2fv(U.location,fe);break;case 3:n.vertexAttrib3fv(U.location,fe);break;case 4:n.vertexAttrib4fv(U.location,fe);break;default:n.vertexAttrib1fv(U.location,fe)}}}}T()}function A(){P();for(const M in i){const I=i[M];for(const z in I){const O=I[z];for(const X in O)c(O[X].object),delete O[X];delete I[z]}delete i[M]}}function w(M){if(i[M.id]===void 0)return;const I=i[M.id];for(const z in I){const O=I[z];for(const X in O)c(O[X].object),delete O[X];delete I[z]}delete i[M.id]}function C(M){for(const I in i){const z=i[I];if(z[M.id]===void 0)continue;const O=z[M.id];for(const X in O)c(O[X].object),delete O[X];delete z[M.id]}}function P(){S(),o=!0,s!==r&&(s=r,u(s.object))}function S(){r.geometry=null,r.program=null,r.wireframe=!1}return{setup:a,reset:P,resetDefaultState:S,dispose:A,releaseStatesOfGeometry:w,releaseStatesOfProgram:C,initAttributes:_,enableAttribute:m,disableUnusedAttributes:T}}function A1(n,e,t){let i;function r(u){i=u}function s(u,c){n.drawArrays(i,u,c),t.update(c,i,1)}function o(u,c,f){f!==0&&(n.drawArraysInstanced(i,u,c,f),t.update(c,i,f))}function a(u,c,f){if(f===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,u,0,c,0,f);let d=0;for(let g=0;g<f;g++)d+=c[g];t.update(d,i,1)}function l(u,c,f,h){if(f===0)return;const d=e.get("WEBGL_multi_draw");if(d===null)for(let g=0;g<u.length;g++)o(u[g],c[g],h[g]);else{d.multiDrawArraysInstancedWEBGL(i,u,0,c,0,h,0,f);let g=0;for(let _=0;_<f;_++)g+=c[_]*h[_];t.update(g,i,1)}}this.setMode=r,this.render=s,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function R1(n,e,t,i){let r;function s(){if(r!==void 0)return r;if(e.has("EXT_texture_filter_anisotropic")===!0){const C=e.get("EXT_texture_filter_anisotropic");r=n.getParameter(C.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r}function o(C){return!(C!==kn&&i.convert(C)!==n.getParameter(n.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(C){const P=C===Xs&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(C!==wi&&i.convert(C)!==n.getParameter(n.IMPLEMENTATION_COLOR_READ_TYPE)&&C!==xi&&!P)}function l(C){if(C==="highp"){if(n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";C="mediump"}return C==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let u=t.precision!==void 0?t.precision:"highp";const c=l(u);c!==u&&(console.warn("THREE.WebGLRenderer:",u,"not supported, using",c,"instead."),u=c);const f=t.logarithmicDepthBuffer===!0,h=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),d=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),g=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=n.getParameter(n.MAX_TEXTURE_SIZE),m=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),p=n.getParameter(n.MAX_VERTEX_ATTRIBS),T=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),x=n.getParameter(n.MAX_VARYING_VECTORS),v=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),A=g>0,w=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:u,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:d,maxVertexTextures:g,maxTextureSize:_,maxCubemapSize:m,maxAttributes:p,maxVertexUniforms:T,maxVaryings:x,maxFragmentUniforms:v,vertexTextures:A,maxSamples:w}}function C1(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Er,a=new ze,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const d=f.length!==0||h||i!==0||r;return r=h,i=f.length,d},this.beginShadows=function(){s=!0,c(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(f,h){t=c(f,h,0)},this.setState=function(f,h,d){const g=f.clippingPlanes,_=f.clipIntersection,m=f.clipShadows,p=n.get(f);if(!r||g===null||g.length===0||s&&!m)s?c(null):u();else{const T=s?0:i,x=T*4;let v=p.clippingState||null;l.value=v,v=c(g,h,x,d);for(let A=0;A!==x;++A)v[A]=t[A];p.clippingState=v,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=T}};function u(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function c(f,h,d,g){const _=f!==null?f.length:0;let m=null;if(_!==0){if(m=l.value,g!==!0||m===null){const p=d+_*4,T=h.matrixWorldInverse;a.getNormalMatrix(T),(m===null||m.length<p)&&(m=new Float32Array(p));for(let x=0,v=d;x!==_;++x,v+=4)o.copy(f[x]).applyMatrix4(T,a),o.normal.toArray(m,v),m[v+3]=o.constant}l.value=m,l.needsUpdate=!0}return e.numPlanes=_,e.numIntersection=0,m}}function P1(n){let e=new WeakMap;function t(o,a){return a===Pu?o.mapping=Bs:a===Du&&(o.mapping=ks),o}function i(o){if(o&&o.isTexture){const a=o.mapping;if(a===Pu||a===Du)if(e.has(o)){const l=e.get(o).texture;return t(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const u=new zb(l.height);return u.fromEquirectangularTexture(n,o),e.set(o,u),o.addEventListener("dispose",r),t(u.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class T0 extends y0{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=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){this.view===null&&(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(){this.view!==null&&(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(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=u*this.view.offsetX,o=s+u*this.view.width,a-=c*this.view.offsetY,l=a-c*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,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const ps=4,_p=[.125,.215,.35,.446,.526,.582],wr=20,Ac=new T0,gp=new tt;let Rc=null,Cc=0,Pc=0,Dc=!1;const Tr=(1+Math.sqrt(5))/2,os=1/Tr,vp=[new K(-Tr,os,0),new K(Tr,os,0),new K(-os,0,Tr),new K(os,0,Tr),new K(0,Tr,-os),new K(0,Tr,os),new K(-1,1,-1),new K(1,1,-1),new K(-1,1,1),new K(1,1,1)];class xp{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){Rc=this._renderer.getRenderTarget(),Cc=this._renderer.getActiveCubeFace(),Pc=this._renderer.getActiveMipmapLevel(),Dc=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(){this._cubemapMaterial===null&&(this._cubemapMaterial=Mp(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Sp(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(Rc,Cc,Pc),this._renderer.xr.enabled=Dc,e.scissorTest=!1,Ea(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Bs||e.mapping===ks?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Rc=this._renderer.getRenderTarget(),Cc=this._renderer.getActiveCubeFace(),Pc=this._renderer.getActiveMipmapLevel(),Dc=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:en,minFilter:en,generateMipmaps:!1,type:Xs,format:kn,colorSpace:qs,depthBuffer:!1},r=yp(e,t,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=yp(e,t,i);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=D1(s)),this._blurMaterial=L1(s,e,t)}return r}_compileMaterial(e){const t=new Hn(this._lodPlanes[0],e);this._renderer.compile(t,Ac)}_sceneToCubeUV(e,t,i,r){const a=new An(90,1,t,i),l=[1,-1,1,1,1,1],u=[1,1,1,-1,-1,-1],c=this._renderer,f=c.autoClear,h=c.toneMapping;c.getClearColor(gp),c.toneMapping=Zi,c.autoClear=!1;const d=new _h({name:"PMREM.Background",side:on,depthWrite:!1,depthTest:!1}),g=new Hn(new Xo,d);let _=!1;const m=e.background;m?m.isColor&&(d.color.copy(m),e.background=null,_=!0):(d.color.copy(gp),_=!0);for(let p=0;p<6;p++){const T=p%3;T===0?(a.up.set(0,l[p],0),a.lookAt(u[p],0,0)):T===1?(a.up.set(0,0,l[p]),a.lookAt(0,u[p],0)):(a.up.set(0,l[p],0),a.lookAt(0,0,u[p]));const x=this._cubeSize;Ea(r,T*x,p>2?x:0,x,x),c.setRenderTarget(r),_&&c.render(g,a),c.render(e,a)}g.geometry.dispose(),g.material.dispose(),c.toneMapping=h,c.autoClear=f,e.background=m}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===Bs||e.mapping===ks;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=Mp()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Sp());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Hn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;Ea(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,Ac)}_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]),a=vp[(r-s-1)%vp.length];this._blur(e,s-1,s,o,a)}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,u=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const c=3,f=new Hn(this._lodPlanes[r],u),h=u.uniforms,d=this._sizeLods[i]-1,g=isFinite(s)?Math.PI/(2*d):2*Math.PI/(2*wr-1),_=s/g,m=isFinite(s)?1+Math.floor(c*_):wr;m>wr&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${wr}`);const p=[];let T=0;for(let C=0;C<wr;++C){const P=C/_,S=Math.exp(-P*P/2);p.push(S),C===0?T+=S:C<m&&(T+=2*S)}for(let C=0;C<p.length;C++)p[C]=p[C]/T;h.envMap.value=e.texture,h.samples.value=m,h.weights.value=p,h.latitudinal.value=o==="latitudinal",a&&(h.poleAxis.value=a);const{_lodMax:x}=this;h.dTheta.value=g,h.mipInt.value=x-i;const v=this._sizeLods[r],A=3*v*(r>x-ps?r-x+ps:0),w=4*(this._cubeSize-v);Ea(t,A,w,3*v,2*v),l.setRenderTarget(t),l.render(f,Ac)}}function D1(n){const e=[],t=[],i=[];let r=n;const s=n-ps+1+_p.length;for(let o=0;o<s;o++){const a=Math.pow(2,r);t.push(a);let l=1/a;o>n-ps?l=_p[o-n+ps-1]:o===0&&(l=0),i.push(l);const u=1/(a-2),c=-u,f=1+u,h=[c,c,f,c,f,f,c,c,f,f,c,f],d=6,g=6,_=3,m=2,p=1,T=new Float32Array(_*g*d),x=new Float32Array(m*g*d),v=new Float32Array(p*g*d);for(let w=0;w<d;w++){const C=w%3*2/3-1,P=w>2?0:-1,S=[C,P,0,C+2/3,P,0,C+2/3,P+1,0,C,P,0,C+2/3,P+1,0,C,P+1,0];T.set(S,_*g*w),x.set(h,m*g*w);const M=[w,w,w,w,w,w];v.set(M,p*g*w)}const A=new lr;A.setAttribute("position",new Qn(T,_)),A.setAttribute("uv",new Qn(x,m)),A.setAttribute("faceIndex",new Qn(v,p)),e.push(A),r>ps&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function yp(n,e,t){const i=new ir(n,e,t);return i.texture.mapping=Al,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Ea(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function L1(n,e,t){const i=new Float32Array(wr),r=new K(0,1,0);return new ii({name:"SphericalGaussianBlur",defines:{n:wr,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:gh(),fragmentShader:` 3610 3611 precision mediump float; 3612 precision mediump int; 3613 3614 varying vec3 vOutputDirection; 3615 3616 uniform sampler2D envMap; 3617 uniform int samples; 3618 uniform float weights[ n ]; 3619 uniform bool latitudinal; 3620 uniform float dTheta; 3621 uniform float mipInt; 3622 uniform vec3 poleAxis; 3623 3624 #define ENVMAP_TYPE_CUBE_UV 3625 #include <cube_uv_reflection_fragment> 3626 3627 vec3 getSample( float theta, vec3 axis ) { 3628 3629 float cosTheta = cos( theta ); 3630 // Rodrigues' axis-angle rotation 3631 vec3 sampleDirection = vOutputDirection * cosTheta 3632 + cross( axis, vOutputDirection ) * sin( theta ) 3633 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 3634 3635 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 3636 3637 } 3638 3639 void main() { 3640 3641 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 3642 3643 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 3644 3645 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 3646 3647 } 3648 3649 axis = normalize( axis ); 3650 3651 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 3652 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 3653 3654 for ( int i = 1; i < n; i++ ) { 3655 3656 if ( i >= samples ) { 3657 3658 break; 3659 3660 } 3661 3662 float theta = dTheta * float( i ); 3663 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 3664 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 3665 3666 } 3667 3668 } 3669 `,blending:Si,depthTest:!1,depthWrite:!1})}function Sp(){return new ii({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:gh(),fragmentShader:` 3670 3671 precision mediump float; 3672 precision mediump int; 3673 3674 varying vec3 vOutputDirection; 3675 3676 uniform sampler2D envMap; 3677 3678 #include <common> 3679 3680 void main() { 3681 3682 vec3 outputDirection = normalize( vOutputDirection ); 3683 vec2 uv = equirectUv( outputDirection ); 3684
3685 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 3686 3687 } 3688 `,blending:Si,depthTest:!1,depthWrite:!1})}function Mp(){return new ii({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:gh(),fragmentShader:` 3689 3690 precision mediump float; 3691 precision mediump int; 3692 3693 uniform float flipEnvMap; 3694 3695 varying vec3 vOutputDirection; 3696 3697 uniform samplerCube envMap; 3698 3699 void main() { 3700 3701 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 3702 3703 } 3704 `,blending:Si,depthTest:!1,depthWrite:!1})}function gh(){return` 3705 3706 precision mediump float; 3707 precision mediump int; 3708 3709 attribute float faceIndex; 3710 3711 varying vec3 vOutputDirection; 3712 3713 // RH coordinate system; PMREM face-indexing convention 3714 vec3 getDirection( vec2 uv, float face ) { 3715 3716 uv = 2.0 * uv - 1.0; 3717 3718 vec3 direction = vec3( uv, 1.0 ); 3719 3720 if ( face == 0.0 ) { 3721 3722 direction = direction.zyx; // ( 1, v, u ) pos x 3723 3724 } else if ( face == 1.0 ) { 3725 3726 direction = direction.xzy; 3727 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 3728 3729 } else if ( face == 2.0 ) { 3730 3731 direction.x *= -1.0; // ( -u, v, 1 ) pos z 3732 3733 } else if ( face == 3.0 ) { 3734 3735 direction = direction.zyx; 3736 direction.xz *= -1.0; // ( -1, v, -u ) neg x 3737 3738 } else if ( face == 4.0 ) { 3739 3740 direction = direction.xzy; 3741 direction.xy *= -1.0; // ( -u, -1, v ) neg y 3742 3743 } else if ( face == 5.0 ) { 3744 3745 direction.z *= -1.0; // ( u, v, -1 ) neg z 3746 3747 } 3748 3749 return direction; 3750 3751 } 3752 3753 void main() { 3754 3755 vOutputDirection = getDirection( uv, faceIndex ); 3756 gl_Position = vec4( position, 1.0 ); 3757 3758 } 3759 `}function I1(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,u=l===Pu||l===Du,c=l===Bs||l===ks;if(u||c){let f=e.get(a);const h=f!==void 0?f.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==h)return t===null&&(t=new xp(n)),f=u?t.fromEquirectangular(a,f):t.fromCubemap(a,f),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),f.texture;if(f!==void 0)return f.texture;{const d=a.image;return u&&d&&d.height>0||c&&d&&r(d)?(t===null&&(t=new xp(n)),f=u?t.fromEquirectangular(a):t.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",s),f.texture):null}}}return a}function r(a){let l=0;const u=6;for(let c=0;c<u;c++)a[c]!==void 0&&l++;return l===u}function s(a){const l=a.target;l.removeEventListener("dispose",s);const u=e.get(l);u!==void 0&&(e.delete(l),u.dispose())}function o(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:i,dispose:o}}function U1(n){const e={};function t(i){if(e[i]!==void 0)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 t(i)!==null},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 r===null&&lo("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function N1(n,e,t,i){const r={},s=new WeakMap;function o(f){const h=f.target;h.index!==null&&e.remove(h.index);for(const g in h.attributes)e.remove(h.attributes[g]);for(const g in h.morphAttributes){const _=h.morphAttributes[g];for(let m=0,p=_.length;m<p;m++)e.remove(_[m])}h.removeEventListener("dispose",o),delete r[h.id];const d=s.get(h);d&&(e.remove(d),s.delete(h)),i.releaseStatesOfGeometry(h),h.isInstancedBufferGeometry===!0&&delete h._maxInstanceCount,t.memory.geometries--}function a(f,h){return r[h.id]===!0||(h.addEventListener("dispose",o),r[h.id]=!0,t.memory.geometries++),h}function l(f){const h=f.attributes;for(const g in h)e.update(h[g],n.ARRAY_BUFFER);const d=f.morphAttributes;for(const g in d){const _=d[g];for(let m=0,p=_.length;m<p;m++)e.update(_[m],n.ARRAY_BUFFER)}}function u(f){const h=[],d=f.index,g=f.attributes.position;let _=0;if(d!==null){const T=d.array;_=d.version;for(let x=0,v=T.length;x<v;x+=3){const A=T[x+0],w=T[x+1],C=T[x+2];h.push(A,w,w,C,C,A)}}else if(g!==void 0){const T=g.array;_=g.version;for(let x=0,v=T.length/3-1;x<v;x+=3){const A=x+0,w=x+1,C=x+2;h.push(A,w,w,C,C,A)}}else return;const m=new(f0(h)?g0:_0)(h,1);m.version=_;const p=s.get(f);p&&e.remove(p),s.set(f,m)}function c(f){const h=s.get(f);if(h){const d=f.index;d!==null&&h.version<d.version&&u(f)}else u(f);return s.get(f)}return{get:a,update:l,getWireframeAttribute:c}}function O1(n,e,t){let i;function r(h){i=h}let s,o;function a(h){s=h.type,o=h.bytesPerElement}function l(h,d){n.drawElements(i,d,s,h*o),t.update(d,i,1)}function u(h,d,g){g!==0&&(n.drawElementsInstanced(i,d,s,h*o,g),t.update(d,i,g))}function c(h,d,g){if(g===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,d,0,s,h,0,g);let m=0;for(let p=0;p<g;p++)m+=d[p];t.update(m,i,1)}function f(h,d,g,_){if(g===0)return;const m=e.get("WEBGL_multi_draw");if(m===null)for(let p=0;p<h.length;
vendor: 18,061 bytes, lines 3759-3794
3759p++)u(h[p]/o,d[p],_[p]);else{m.multiDrawElementsInstancedWEBGL(i,d,0,s,h,0,_,0,g);let p=0;for(let T=0;T<g;T++)p+=d[T]*_[T];t.update(p,i,1)}}this.setMode=r,this.setIndex=a,this.render=l,this.renderInstances=u,this.renderMultiDraw=c,this.renderMultiDrawInstances=f}function F1(n){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};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);break}}function r(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:r,update:i}}function B1(n,e,t){const i=new WeakMap,r=new yt;function s(o,a,l){const u=o.morphTargetInfluences,c=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,f=c!==void 0?c.length:0;let h=i.get(a);if(h===void 0||h.count!==f){let S=function(){C.dispose(),i.delete(a),a.removeEventListener("dispose",S)};h!==void 0&&h.texture.dispose();const d=a.morphAttributes.position!==void 0,g=a.morphAttributes.normal!==void 0,_=a.morphAttributes.color!==void 0,m=a.morphAttributes.position||[],p=a.morphAttributes.normal||[],T=a.morphAttributes.color||[];let x=0;d===!0&&(x=1),g===!0&&(x=2),_===!0&&(x=3);let v=a.attributes.position.count*x,A=1;v>e.maxTextureSize&&(A=Math.ceil(v/e.maxTextureSize),v=e.maxTextureSize);const w=new Float32Array(v*A*4*f),C=new d0(w,v,A,f);C.type=xi,C.needsUpdate=!0;const P=x*4;for(let M=0;M<f;M++){const I=m[M],z=p[M],O=T[M],X=v*A*4*M;for(let J=0;J<I.count;J++){const D=J*P;d===!0&&(r.fromBufferAttribute(I,J),w[X+D+0]=r.x,w[X+D+1]=r.y,w[X+D+2]=r.z,w[X+D+3]=0),g===!0&&(r.fromBufferAttribute(z,J),w[X+D+4]=r.x,w[X+D+5]=r.y,w[X+D+6]=r.z,w[X+D+7]=0),_===!0&&(r.fromBufferAttribute(O,J),w[X+D+8]=r.x,w[X+D+9]=r.y,w[X+D+10]=r.z,w[X+D+11]=O.itemSize===4?r.w:1)}}h={count:f,texture:C,size:new Je(v,A)},i.set(a,h),a.addEventListener("dispose",S)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(n,"morphTexture",o.morphTexture,t);else{let d=0;for(let _=0;_<u.length;_++)d+=u[_];const g=a.morphTargetsRelative?1:1-d;l.getUniforms().setValue(n,"morphTargetBaseInfluence",g),l.getUniforms().setValue(n,"morphTargetInfluences",u)}l.getUniforms().setValue(n,"morphTargetsTexture",h.texture,t),l.getUniforms().setValue(n,"morphTargetsTextureSize",h.size)}return{update:s}}function k1(n,e,t,i){let r=new WeakMap;function s(l){const u=i.render.frame,c=l.geometry,f=e.get(l,c);if(r.get(f)!==u&&(e.update(f),r.set(f,u)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),r.get(l)!==u&&(t.update(l.instanceMatrix,n.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,n.ARRAY_BUFFER),r.set(l,u))),l.isSkinnedMesh){const h=l.skeleton;r.get(h)!==u&&(h.update(),r.set(h,u))}return f}function o(){r=new WeakMap}function a(l){const u=l.target;u.removeEventListener("dispose",a),t.remove(u.instanceMatrix),u.instanceColor!==null&&t.remove(u.instanceColor)}return{update:s,dispose:o}}class b0 extends Kt{constructor(e,t,i,r,s,o,a,l,u,c=As){if(c!==As&&c!==zs)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&c===As&&(i=Hr),i===void 0&&c===zs&&(i=Hs),super(null,r,s,o,a,l,c,i,u),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:Gn,this.minFilter=l!==void 0?l:Gn,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 this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}const w0=new Kt,Ep=new b0(1,1),A0=new d0,R0=new bb,C0=new S0,Tp=[],bp=[],wp=new Float32Array(16),Ap=new Float32Array(9),Rp=new Float32Array(4);function js(n,e,t){const i=n[0];if(i<=0||i>0)return n;const r=e*t;let s=Tp[r];if(s===void 0&&(s=new Float32Array(r),Tp[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function wt(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 At(n,e){for(let t=0,i=e.length;t<i;t++)n[t]=e[t]}function Pl(n,e){let t=bp[e];t===void 0&&(t=new Int32Array(e),bp[e]=t);for(let i=0;i!==e;++i)t[i]=n.allocateTextureUnit();return t}function H1(n,e){const t=this.cache;t[0]!==e&&(n.uniform1f(this.addr,e),t[0]=e)}function z1(n,e){const t=this.cache;if(e.x!==void 0)(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(wt(t,e))return;n.uniform2fv(this.addr,e),At(t,e)}}function V1(n,e){const t=this.cache;if(e.x!==void 0)(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(e.r!==void 0)(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(wt(t,e))return;n.uniform3fv(this.addr,e),At(t,e)}}function G1(n,e){const t=this.cache;if(e.x!==void 0)(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(wt(t,e))return;n.uniform4fv(this.addr,e),At(t,e)}}function W1(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(wt(t,e))return;n.uniformMatrix2fv(this.addr,!1,e),At(t,e)}else{if(wt(t,i))return;Rp.set(i),n.uniformMatrix2fv(this.addr,!1,Rp),At(t,i)}}function X1(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(wt(t,e))return;n.uniformMatrix3fv(this.addr,!1,e),At(t,e)}else{if(wt(t,i))return;Ap.set(i),n.uniformMatrix3fv(this.addr,!1,Ap),At(t,i)}}function q1(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(wt(t,e))return;n.uniformMatrix4fv(this.addr,!1,e),At(t,e)}else{if(wt(t,i))return;wp.set(i),n.uniformMatrix4fv(this.addr,!1,wp),At(t,i)}}function Y1(n,e){const t=this.cache;t[0]!==e&&(n.uniform1i(this.addr,e),t[0]=e)}function $1(n,e){const t=this.cache;if(e.x!==void 0)(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(wt(t,e))return;n.uniform2iv(this.addr,e),At(t,e)}}function j1(n,e){const t=this.cache;if(e.x!==void 0)(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(wt(t,e))return;n.uniform3iv(this.addr,e),At(t,e)}}function K1(n,e){const t=this.cache;if(e.x!==void 0)(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(wt(t,e))return;n.uniform4iv(this.addr,e),At(t,e)}}function Z1(n,e){const t=this.cache;t[0]!==e&&(n.uniform1ui(this.addr,e),t[0]=e)}function J1(n,e){const t=this.cache;if(e.x!==void 0)(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(wt(t,e))return;n.uniform2uiv(this.addr,e),At(t,e)}}function Q1(n,e){const t=this.cache;if(e.x!==void 0)(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(wt(t,e))return;n.uniform3uiv(this.addr,e),At(t,e)}}function eR(n,e){const t=this.cache;if(e.x!==void 0)(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(wt(t,e))return;n.uniform4uiv(this.addr,e),At(t,e)}}function tR(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r);let s;this.type===n.SAMPLER_2D_SHADOW?(Ep.compareFunction=u0,s=Ep):s=w0,t.setTexture2D(e||s,r)}function nR(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTexture3D(e||R0,r)}function iR(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTextureCube(e||C0,r)}function rR(n,e,t){const i=this.cache,r=t.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),t.setTexture2DArray(e||A0,r)}function sR(n){switch(n){case 5126:return H1;case 35664:return z1;case 35665:return V1;case 35666:return G1;case 35674:return W1;case 35675:return X1;case 35676:return q1;case 5124:case 35670:return Y1;case 35667:case 35671:return $1;case 35668:case 35672:return j1;case 35669:case 35673:return K1;case 5125:return Z1;case 36294:return J1;case 36295:return Q1;case 36296:return eR;case 35678:case 36198:case 36298:case 36306:case 35682:return tR;case 35679:case 36299:case 36307:return nR;case 35680:case 36300:case 36308:case 36293:return iR;case 36289:case 36303:case 36311:case 36292:return rR}}function oR(n,e){n.uniform1fv(this.addr,e)}function aR(n,e){const t=js(e,this.size,2);n.uniform2fv(this.addr,t)}function lR(n,e){const t=js(e,this.size,3);n.uniform3fv(this.addr,t)}function cR(n,e){const t=js(e,this.size,4);n.uniform4fv(this.addr,t)}function uR(n,e){const t=js(e,this.size,4);n.uniformMatrix2fv(this.addr,!1,t)}function fR(n,e){const t=js(e,this.size,9);n.uniformMatrix3fv(this.addr,!1,t)}function hR(n,e){const t=js(e,this.size,16);n.uniformMatrix4fv(this.addr,!1,t)}function dR(n,e){n.uniform1iv(this.addr,e)}function pR(n,e){n.uniform2iv(this.addr,e)}function mR(n,e){n.uniform3iv(this.addr,e)}function _R(n,e){n.uniform4iv(this.addr,e)}function gR(n,e){n.uniform1uiv(this.addr,e)}function vR(n,e){n.uniform2uiv(this.addr,e)}function xR(n,e){n.uniform3uiv(this.addr,e)}function yR(n,e){n.uniform4uiv(this.addr,e)}function SR(n,e,t){const i=this.cache,r=e.length,s=Pl(t,r);wt(i,s)||(n.uniform1iv(this.addr,s),At(i,s));for(let o=0;o!==r;++o)t.setTexture2D(e[o]||w0,s[o])}function MR(n,e,t){const i=this.cache,r=e.length,s=Pl(t,r);wt(i,s)||(n.uniform1iv(this.addr,s),At(i,s));for(let o=0;o!==r;++o)t.setTexture3D(e[o]||R0,s[o])}function ER(n,e,t){const i=this.cache,r=e.length,s=Pl(t,r);wt(i,s)||(n.uniform1iv(this.addr,s),At(i,s));for(let o=0;o!==r;++o)t.setTextureCube(e[o]||C0,s[o])}function TR(n,e,t){const i=this.cache,r=e.length,s=Pl(t,r);wt(i,s)||(n.uniform1iv(this.addr,s),At(i,s));for(let o=0;o!==r;++o)t.setTexture2DArray(e[o]||A0,s[o])}function bR(n){switch(n){case 5126:return oR;case 35664:return aR;case 35665:return lR;case 35666:return cR;case 35674:return uR;case 35675:return fR;case 35676:return hR;case 5124:case 35670:return dR;case 35667:case 35671:return pR;case 35668:case 35672:return mR;case 35669:case 35673:return _R;case 5125:return gR;case 36294:return vR;case 36295:return xR;case 36296:return yR;case 35678:case 36198:case 36298:case 36306:case 35682:return SR;case 35679:case 36299:case 36307:return MR;case 35680:case 36300:case 36308:case 36293:return ER;case 36289:case 36303:case 36311:case 36292:return TR}}class wR{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.setValue=sR(t.type)}}class AR{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=bR(t.type)}}class RR{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 Lc=/(\w+)(\])?(\[|\.)?/g;function Cp(n,e){n.seq.push(e),n.map[e.id]=e}function CR(n,e,t){const i=n.name,r=i.length;for(Lc.lastIndex=0;;){const s=Lc.exec(i),o=Lc.lastIndex;let a=s[1];const l=s[2]==="]",u=s[3];if(l&&(a=a|0),u===void 0||u==="["&&o+2===r){Cp(t,u===void 0?new wR(a,n,e):new AR(a,n,e));break}else{let f=t.map[a];f===void 0&&(f=new RR(a),Cp(t,f)),t=f}}}class za{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),o=e.getUniformLocation(t,s.name);CR(s,o,this)}}setValue(e,t,i,r){const s=this.map[t];s!==void 0&&s.setValue(e,i,r)}setOptional(e,t,i){const r=t[i];r!==void 0&&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];l.needsUpdate!==!1&&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 Pp(n,e,t){const i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),i}const PR=37297;let DR=0;function LR(n,e){const t=n.split(` 3760`),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(` 3761`)}const Dp=new ze;function IR(n){qe._getMatrix(Dp,qe.workingColorSpace,n);const e=`mat3( ${Dp.elements.map(t=>t.toFixed(4))} )`;switch(qe.getTransfer(n)){case Rl:return[e,"LinearTransferOETF"];case nt:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",n),[e,"LinearTransferOETF"]}}function Lp(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()+` 3762 3763`+r+` 3764 3765`+LR(n.getShaderSource(e),o)}else return r}function UR(n,e){const t=IR(e);return[`vec4 ${n}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(` 3766`)}function NR(n,e){let t;switch(e){case OT:t="Linear";break;case FT:t="Reinhard";break;case BT:t="Cineon";break;case kT:t="ACESFilmic";break;case zT:t="AgX";break;case VT:t="Neutral";break;case HT:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const Ta=new K;function OR(){qe.getLuminanceCoefficients(Ta);const n=Ta.x.toFixed(4),e=Ta.y.toFixed(4),t=Ta.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${n}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(` 3767`)}function FR(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(co).join(` 3768`)}function BR(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` 3769`)}function kR(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}function co(n){return n!==""}function Ip(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_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function Up(n,e){return n.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const HR=/^[ \t]*#include +<([\w\d./]+)>/gm;function af(n){return n.replace(HR,VR)}const zR=new Map;function VR(n,e){let t=Ve[e];if(t===void 0){const i=zR.get(e);if(i!==void 0)t=Ve[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return af(t)}const GR=/#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 Np(n){return n.replace(GR,WR)}function WR(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 Op(n){let e=`precision ${n.precision} float; 3770 precision ${n.precision} int; 3771 precision ${n.precision} sampler2D; 3772 precision ${n.precision} samplerCube; 3773 precision ${n.precision} sampler3D; 3774 precision ${n.precision} sampler2DArray; 3775 precision ${n.precision} sampler2DShadow; 3776 precision ${n.precision} samplerCubeShadow; 3777 precision ${n.precision} sampler2DArrayShadow; 3778 precision ${n.precision} isampler2D; 3779 precision ${n.precision} isampler3D; 3780 precision ${n.precision} isamplerCube; 3781 precision ${n.precision} isampler2DArray; 3782 precision ${n.precision} usampler2D; 3783 precision ${n.precision} usampler3D; 3784 precision ${n.precision} usamplerCube; 3785 precision ${n.precision} usampler2DArray; 3786 `;return n.precision==="highp"?e+=` 3787#define HIGH_PRECISION`:n.precision==="mediump"?e+=` 3788#define MEDIUM_PRECISION`:n.precision==="lowp"&&(e+=` 3789#define LOW_PRECISION`),e}function XR(n){let e="SHADOWMAP_TYPE_BASIC";return n.shadowMapType===Zg?e="SHADOWMAP_TYPE_PCF":n.shadowMapType===mT?e="SHADOWMAP_TYPE_PCF_SOFT":n.shadowMapType===hi&&(e="SHADOWMAP_TYPE_VSM"),e}function qR(n){let e="ENVMAP_TYPE_CUBE";if(n.envMap)switch(n.envMapMode){case Bs:case ks:e="ENVMAP_TYPE_CUBE";break;case Al:e="ENVMAP_TYPE_CUBE_UV";break}return e}function YR(n){let e="ENVMAP_MODE_REFLECTION";if(n.envMap)switch(n.envMapMode){case ks:e="ENVMAP_MODE_REFRACTION";break}return e}function $R(n){let e="ENVMAP_BLENDING_NONE";if(n.envMap)switch(n.combine){case Jg:e="ENVMAP_BLENDING_MULTIPLY";break;case UT:e="ENVMAP_BLENDING_MIX";break;case NT:e="ENVMAP_BLENDING_ADD";break}return e}function jR(n){const e=n.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:i,maxMip:t}}function KR(n,e,t,i){const r=n.getContext(),s=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=XR(t),u=qR(t),c=YR(t),f=$R(t),h=jR(t),d=FR(t),g=BR(s),_=r.createProgram();let m,p,T=t.glslVersion?"#version "+t.glslVersion+` 3790`:"";t.isRawShaderMaterial?(m=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(co).join(` 3791`),m.length>0&&(m+=` 3792`),p=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(co).join(` 3793`),p.length>0&&(p+=` 3794`)):(m=[Op(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.extensionCl
vendor: 6,454 bytes, lines 3794-3796
3794ipCullDistance?"#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 "+c:"",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_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.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&&t.flatShading===!1?"#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&&t.flatShading===!1?"#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"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` 3795`].filter(co).join(` 3796`),p=[Op(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,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 "+u:"",t.envMap?"#define "+c:"",t.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.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
3796IDESCENCE":"",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&&t.flatShading===!1?"#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;",t.toneMapping!==Zi?"#define TONE_MAPPING":"",t.toneMapping!==Zi?Ve.tonemapping_pars_fragment:"",t.toneMapping!==Zi?NR("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Ve.colorspace_pars_fragment,UR("linearToOutputTexel",t.outputColorSpace),OR(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` 3797`].filter(co).join(` 3798`)),o=af(o),o=Ip(o,t),o=Up(o,t),a=af(a),a=Ip(a,t),a=Up(a,t),o=Np(o),a=Np(a),t.isRawShaderMaterial!==!0&&(T=`#version 300 es 3799`,m=[d,"#define attribute in","#define varying out","#define texture2D texture"].join(` 3800`)+` 3801`+m,p=["#define varying in",t.glslVersion===Yd?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===Yd?"":"#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(` 3802`)+` 3803`+p);const x=T+m+o,v=T+p+a,A=Pp(r,r.VERTEX_SHADER,x),w=Pp(r,r.FRAGMENT_SHADER,v);r.attachShader(_,A),r.attachShader(_,w),t.index0AttributeName!==void 0?r.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(_,0,"position"),r.linkProgram(_);function C(I){if(n.debug.checkShaderErrors){const z=r.getProgramInfoLog(_).trim(),O=r.getShaderInfoLog(A).trim(),X=r.getShaderInfoLog(w).trim();let J=!0,D=!0;if(r.getProgramParameter(_,r.LINK_STATUS)===!1)if(J=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,_,A,w);else{const V=Lp(r,A,"vertex"),U=Lp(r,w,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(_,r.VALIDATE_STATUS)+` 3804 3805Material Name: `+I.name+` 3806Material Type: `+I.type+` 3807 3808Program Info Log: `+z+` 3809`+V+` 3810`+U)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(O===""||X==="")&&(D=!1);D&&(I.diagnostics={runnable:J,programLog:z,vertexShader:{log:O,prefix:m},fragmentShader:{log:X,prefix:p}})}r.deleteShader(A),r.deleteShader(w),P=new za(r,_),S=kR(r,_)}let P;this.getUniforms=function(){return P===void 0&&C(this),P};let S;this.getAttributes=function(){return S===void 0&&C(this),S};let M=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return M===!1&&(M=r.getProgramParameter(_,PR)),M},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=DR++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=A,this.fragmentShader=w,this}let ZR=0;class JR{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&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 i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new QR(e),t.set(e,i)),i}}class QR{constructor(e){this.id=ZR++,this.code=e,this.usedTimes=0}}function eC(n,e,t,i,r,s,o){const a=new p0,l=new JR,u=new Set,c=[],f=r.logarithmicDepthBuffer,h=r.vertexTextures;let d=r.precision;const g={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 _(S){return u.add(S),S===0?"uv":`uv${S}`}function m(S,M,I,z,O){const X=z.fog,J=O.geometry,D=S.isMeshStandardMaterial?z.environment:null,V=(S.isMeshStandardMaterial?t:e).get(S.envMap||D),U=V&&V.mapping===Al?V.image.height:null,se=g[S.type];S.precision!==null&&(d=r.getMaxPrecision(S.precision),d!==S.precision&&console.warn("THREE.WebGLProgram.getParameters:",S.precision,"not supported, using",d,"instead."));const fe=J.morphAttributes.position||J.morphAttributes.normal||J.morphAttributes.color,pe=fe!==void 0?fe.length:0;let Ee=0;J.morphAttributes.position!==void 0&&(Ee=1),J.morphAttributes.normal!==void 0&&(Ee=2),J.morphAttributes.color!==void 0&&(Ee=3);let Ge,te,le,Me;if(se){const et=$n[se];Ge=et.vertexShader,te=et.fragmentShader}else Ge=S.vertexShader,te=S.fragmentShader,l.update(S),le=l.getVertexShaderID(S),Me=l.getFragmentShaderID(S);const de=n.getRenderTarget(),Ce=n.state.buffers.depth.getReversed(),Le=O.isInstancedMesh===!0,Ne=O.isBatchedMesh===!0,it=!!S.map,We=!!S.matcap,L=!!V,E=!!S.aoMap,j=!!S.lightMap,ee=!!S.bumpMap,Z=!!S.normalMap,q=!!S.displacementMap,oe=!!S.emissiveMap,Q=!!S.metalnessMap,b=!!S.roughnessMap,y=S.anisotropy>0,N=S.clearcoat>0,B=S.dispersion>0,W=S.iridescence>0,G=S.sheen>0,ue=S.transmission>0,ae=y&&!!S.anisotropyMap,ce=N&&!!S.clearcoatMap,Ue=N&&!!S.clearcoatNormalMap,re=N&&!!S.clearcoatRoughnessMap,me=W&&!!S.iridescenceMap,Te=W&&!!S.iridescenceThicknessMap,Pe=G&&!!S.sheenColorMap,Se=G&&!!S.sheenRoughnessMap,Ie=!!S.specularMap,De=!!S.specularColorMap,Qe=!!S.specularIntensityMap,F=ue&&!!S.transmissionMap,ge=ue&&!!S.thicknessMap,ne=!!S.gradientMap,ie=!!S.alphaMap,ye=S.alphaTest>0,ve=!!S.alphaHash,ke=!!S.extensions;let mt=Zi;S.toneMapped&&(de===null||de.isXRRenderTarget===!0)&&(mt=n.toneMapping);const Ut={shaderID:se,shaderType:S.type,shaderName:S.name,vertexShader:Ge,fragmentShader:te,defines:S.defines,customVertexShaderID:le,customFragmentShaderID:Me,isRawShaderMaterial:S.isRawShaderMaterial===!0,glslVersion:S.glslVersion,precision:d,batching:Ne,batchingColor:Ne&&O._colorsTexture!==null,instancing:Le,instancingColor:Le&&O.instanceColor!==null,instancingMorph:Le&&O.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:de===null?n.outputColorSpace:de.isXRRenderTarget===!0?de.texture.colorSpace:qs,alphaToCoverage:!!S.alphaToCoverage,map:it,matcap:We,envMap:L,envMapMode:L&&V.mapping,envMapCubeUVHeight:U,aoMap:E,lightMap:j,bumpMap:ee,normalMap:Z,displacementMap:h&&q,emissiveMap:oe,normalMapObjectSpace:Z&&S.normalMapType===YT,normalMapTangentSpace:Z&&S.normalMapType===qT,metalnessMap:Q,roughnessMap:b,anisotropy:y,anisotropyMap:ae,clearcoat:N,clearcoatMap:ce,clearcoatNormalMap:Ue,clearcoatRoughnessMap:re,dispersion:B,iridescence:W,
vendor: 15,442 bytes, line 3810
3810iridescenceMap:me,iridescenceThicknessMap:Te,sheen:G,sheenColorMap:Pe,sheenRoughnessMap:Se,specularMap:Ie,specularColorMap:De,specularIntensityMap:Qe,transmission:ue,transmissionMap:F,thicknessMap:ge,gradientMap:ne,opaque:S.transparent===!1&&S.blending===ws&&S.alphaToCoverage===!1,alphaMap:ie,alphaTest:ye,alphaHash:ve,combine:S.combine,mapUv:it&&_(S.map.channel),aoMapUv:E&&_(S.aoMap.channel),lightMapUv:j&&_(S.lightMap.channel),bumpMapUv:ee&&_(S.bumpMap.channel),normalMapUv:Z&&_(S.normalMap.channel),displacementMapUv:q&&_(S.displacementMap.channel),emissiveMapUv:oe&&_(S.emissiveMap.channel),metalnessMapUv:Q&&_(S.metalnessMap.channel),roughnessMapUv:b&&_(S.roughnessMap.channel),anisotropyMapUv:ae&&_(S.anisotropyMap.channel),clearcoatMapUv:ce&&_(S.clearcoatMap.channel),clearcoatNormalMapUv:Ue&&_(S.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:re&&_(S.clearcoatRoughnessMap.channel),iridescenceMapUv:me&&_(S.iridescenceMap.channel),iridescenceThicknessMapUv:Te&&_(S.iridescenceThicknessMap.channel),sheenColorMapUv:Pe&&_(S.sheenColorMap.channel),sheenRoughnessMapUv:Se&&_(S.sheenRoughnessMap.channel),specularMapUv:Ie&&_(S.specularMap.channel),specularColorMapUv:De&&_(S.specularColorMap.channel),specularIntensityMapUv:Qe&&_(S.specularIntensityMap.channel),transmissionMapUv:F&&_(S.transmissionMap.channel),thicknessMapUv:ge&&_(S.thicknessMap.channel),alphaMapUv:ie&&_(S.alphaMap.channel),vertexTangents:!!J.attributes.tangent&&(Z||y),vertexColors:S.vertexColors,vertexAlphas:S.vertexColors===!0&&!!J.attributes.color&&J.attributes.color.itemSize===4,pointsUvs:O.isPoints===!0&&!!J.attributes.uv&&(it||ie),fog:!!X,useFog:S.fog===!0,fogExp2:!!X&&X.isFogExp2,flatShading:S.flatShading===!0,sizeAttenuation:S.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:Ce,skinning:O.isSkinnedMesh===!0,morphTargets:J.morphAttributes.position!==void 0,morphNormals:J.morphAttributes.normal!==void 0,morphColors:J.morphAttributes.color!==void 0,morphTargetsCount:pe,morphTextureStride:Ee,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:S.dithering,shadowMapEnabled:n.shadowMap.enabled&&I.length>0,shadowMapType:n.shadowMap.type,toneMapping:mt,decodeVideoTexture:it&&S.map.isVideoTexture===!0&&qe.getTransfer(S.map.colorSpace)===nt,decodeVideoTextureEmissive:oe&&S.emissiveMap.isVideoTexture===!0&&qe.getTransfer(S.emissiveMap.colorSpace)===nt,premultipliedAlpha:S.premultipliedAlpha,doubleSided:S.side===gi,flipSided:S.side===on,useDepthPacking:S.depthPacking>=0,depthPacking:S.depthPacking||0,index0AttributeName:S.index0AttributeName,extensionClipCullDistance:ke&&S.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ke&&S.extensions.multiDraw===!0||Ne)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:S.customProgramCacheKey()};return Ut.vertexUv1s=u.has(1),Ut.vertexUv2s=u.has(2),Ut.vertexUv3s=u.has(3),u.clear(),Ut}function p(S){const M=[];if(S.shaderID?M.push(S.shaderID):(M.push(S.customVertexShaderID),M.push(S.customFragmentShaderID)),S.defines!==void 0)for(const I in S.defines)M.push(I),M.push(S.defines[I]);return S.isRawShaderMaterial===!1&&(T(M,S),x(M,S),M.push(n.outputColorSpace)),M.push(S.customProgramCacheKey),M.join()}function T(S,M){S.push(M.precision),S.push(M.outputColorSpace),S.push(M.envMapMode),S.push(M.envMapCubeUVHeight),S.push(M.mapUv),S.push(M.alphaMapUv),S.push(M.lightMapUv),S.push(M.aoMapUv),S.push(M.bumpMapUv),S.push(M.normalMapUv),S.push(M.displacementMapUv),S.push(M.emissiveMapUv),S.push(M.metalnessMapUv),S.push(M.roughnessMapUv),S.push(M.anisotropyMapUv),S.push(M.clearcoatMapUv),S.push(M.clearcoatNormalMapUv),S.push(M.clearcoatRoughnessMapUv),S.push(M.iridescenceMapUv),S.push(M.iridescenceThicknessMapUv),S.push(M.sheenColorMapUv),S.push(M.sheenRoughnessMapUv),S.push(M.specularMapUv),S.push(M.specularColorMapUv),S.push(M.specularIntensityMapUv),S.push(M.transmissionMapUv),S.push(M.thicknessMapUv),S.push(M.combine),S.push(M.fogExp2),S.push(M.sizeAttenuation),S.push(M.morphTargetsCount),S.push(M.morphAttributeCount),S.push(M.numDirLights),S.push(M.numPointLights),S.push(M.numSpotLights),S.push(M.numSpotLightMaps),S.push(M.numHemiLights),S.push(M.numRectAreaLights),S.push(M.numDirLightShadows),S.push(M.numPointLightShadows),S.push(M.numSpotLightShadows),S.push(M.numSpotLightShadowsWithMaps),S.push(M.numLightProbes),S.push(M.shadowMapType),S.push(M.toneMapping),S.push(M.numClippingPlanes),S.push(M.numClipIntersection),S.push(M.depthPacking)}function x(S,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),S.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),S.push(a.mask)}function v(S){const M=g[S.type];let I;if(M){const z=$n[M];I=x0.clone(z.uniforms)}else I=S.uniforms;return I}function A(S,M){let I;for(let z=0,O=c.length;z<O;z++){const X=c[z];if(X.cacheKey===M){I=X,++I.usedTimes;break}}return I===void 0&&(I=new KR(n,M,S,s),c.push(I)),I}function w(S){if(--S.usedTimes===0){const M=c.indexOf(S);c[M]=c[c.length-1],c.pop(),S.destroy()}}function C(S){l.remove(S)}function P(){l.dispose()}return{getParameters:m,getProgramCacheKey:p,getUniforms:v,acquireProgram:A,releaseProgram:w,releaseShaderCache:C,programs:c,dispose:P}}function tC(){let n=new WeakMap;function e(o){return n.has(o)}function t(o){let a=n.get(o);return a===void 0&&(a={},n.set(o,a)),a}function i(o){n.delete(o)}function r(o,a,l){n.get(o)[a]=l}function s(){n=new WeakMap}return{has:e,get:t,remove:i,update:r,dispose:s}}function nC(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 Fp(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 Bp(){const n=[];let e=0;const t=[],i=[],r=[];function s(){e=0,t.length=0,i.length=0,r.length=0}function o(f,h,d,g,_,m){let p=n[e];return p===void 0?(p={id:f.id,object:f,geometry:h,material:d,groupOrder:g,renderOrder:f.renderOrder,z:_,group:m},n[e]=p):(p.id=f.id,p.object=f,p.geometry=h,p.material=d,p.groupOrder=g,p.renderOrder=f.renderOrder,p.z=_,p.group=m),e++,p}function a(f,h,d,g,_,m){const p=o(f,h,d,g,_,m);d.transmission>0?i.push(p):d.transparent===!0?r.push(p):t.push(p)}function l(f,h,d,g,_,m){const p=o(f,h,d,g,_,m);d.transmission>0?i.unshift(p):d.transparent===!0?r.unshift(p):t.unshift(p)}function u(f,h){t.length>1&&t.sort(f||nC),i.length>1&&i.sort(h||Fp),r.length>1&&r.sort(h||Fp)}function c(){for(let f=e,h=n.length;f<h;f++){const d=n[f];if(d.id===null)break;d.id=null,d.object=null,d.geometry=null,d.material=null,d.group=null}}return{opaque:t,transmissive:i,transparent:r,init:s,push:a,unshift:l,finish:c,sort:u}}function iC(){let n=new WeakMap;function e(i,r){const s=n.get(i);let o;return s===void 0?(o=new Bp,n.set(i,[o])):r>=s.length?(o=new Bp,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function rC(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new K,color:new tt};break;case"SpotLight":t={position:new K,direction:new K,color:new tt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new K,color:new tt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new K,skyColor:new tt,groundColor:new tt};break;case"RectAreaLight":t={color:new tt,position:new K,halfWidth:new K,halfHeight:new K};break}return n[e.id]=t,t}}}function sC(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let oC=0;function aC(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function lC(n){const e=new rC,t=sC(),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 u=0;u<9;u++)i.probe.push(new K);const r=new K,s=new Tt,o=new Tt;function a(u){let c=0,f=0,h=0;for(let S=0;S<9;S++)i.probe[S].set(0,0,0);let d=0,g=0,_=0,m=0,p=0,T=0,x=0,v=0,A=0,w=0,C=0;u.sort(aC);for(let S=0,M=u.length;S<M;S++){const I=u[S],z=I.color,O=I.intensity,X=I.distance,J=I.shadow&&I.shadow.map?I.shadow.map.texture:null;if(I.isAmbientLight)c+=z.r*O,f+=z.g*O,h+=z.b*O;else if(I.isLightProbe){for(let D=0;D<9;D++)i.probe[D].addScaledVector(I.sh.coefficients[D],O);C++}else if(I.isDirectionalLight){const D=e.get(I);if(D.color.copy(I.color).multiplyScalar(I.intensity),I.castShadow){const V=I.shadow,U=t.get(I);U.shadowIntensity=V.intensity,U.shadowBias=V.bias,U.shadowNormalBias=V.normalBias,U.shadowRadius=V.radius,U.shadowMapSize=V.mapSize,i.directionalShadow[d]=U,i.directionalShadowMap[d]=J,i.directionalShadowMatrix[d]=I.shadow.matrix,T++}i.directional[d]=D,d++}else if(I.isSpotLight){const D=e.get(I);D.position.setFromMatrixPosition(I.matrixWorld),D.color.copy(z).multiplyScalar(O),D.distance=X,D.coneCos=Math.cos(I.angle),D.penumbraCos=Math.cos(I.angle*(1-I.penumbra)),D.decay=I.decay,i.spot[_]=D;const V=I.shadow;if(I.map&&(i.spotLightMap[A]=I.map,A++,V.updateMatrices(I),I.castShadow&&w++),i.spotLightMatrix[_]=V.matrix,I.castShadow){const U=t.get(I);U.shadowIntensity=V.intensity,U.shadowBias=V.bias,U.shadowNormalBias=V.normalBias,U.shadowRadius=V.radius,U.shadowMapSize=V.mapSize,i.spotShadow[_]=U,i.spotShadowMap[_]=J,v++}_++}else if(I.isRectAreaLight){const D=e.get(I);D.color.copy(z).multiplyScalar(O),D.halfWidth.set(I.width*.5,0,0),D.halfHeight.set(0,I.height*.5,0),i.rectArea[m]=D,m++}else if(I.isPointLight){const D=e.get(I);if(D.color.copy(I.color).multiplyScalar(I.intensity),D.distance=I.distance,D.decay=I.decay,I.castShadow){const V=I.shadow,U=t.get(I);U.shadowIntensity=V.intensity,U.shadowBias=V.bias,U.shadowNormalBias=V.normalBias,U.shadowRadius=V.radius,U.shadowMapSize=V.mapSize,U.shadowCameraNear=V.camera.near,U.shadowCameraFar=V.camera.far,i.pointShadow[g]=U,i.pointShadowMap[g]=J,i.pointShadowMatrix[g]=I.shadow.matrix,x++}i.point[g]=D,g++}else if(I.isHemisphereLight){const D=e.get(I);D.skyColor.copy(I.color).multiplyScalar(O),D.groundColor.copy(I.groundColor).multiplyScalar(O),i.hemi[p]=D,p++}}m>0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=_e.LTC_FLOAT_1,i.rectAreaLTC2=_e.LTC_FLOAT_2):(i.rectAreaLTC1=_e.LTC_HALF_1,i.rectAreaLTC2=_e.LTC_HALF_2)),i.ambient[0]=c,i.ambient[1]=f,i.ambient[2]=h;const P=i.hash;(P.directionalLength!==d||P.pointLength!==g||P.spotLength!==_||P.rectAreaLength!==m||P.hemiLength!==p||P.numDirectionalShadows!==T||P.numPointShadows!==x||P.numSpotShadows!==v||P.numSpotMaps!==A||P.numLightProbes!==C)&&(i.directional.length=d,i.spot.length=_,i.rectArea.length=m,i.point.length=g,i.hemi.length=p,i.directionalShadow.length=T,i.directionalShadowMap.length=T,i.pointShadow.length=x,i.pointShadowMap.length=x,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=T,i.pointShadowMatrix.length=x,i.spotLightMatrix.length=v+A-w,i.spotLightMap.length=A,i.numSpotLightShadowsWithMaps=w,i.numLightProbes=C,P.directionalLength=d,P.pointLength=g,P.spotLength=_,P.rectAreaLength=m,P.hemiLength=p,P.numDirectionalShadows=T,P.numPointShadows=x,P.numSpotShadows=v,P.numSpotMaps=A,P.numLightProbes=C,i.version=oC++)}function l(u,c){let f=0,h=0,d=0,g=0,_=0;const m=c.matrixWorldInverse;for(let p=0,T=u.length;p<T;p++){const x=u[p];if(x.isDirectionalLight){const v=i.directional[f];v.direction.setFromMatrixPosition(x.matrixWorld),r.setFromMatrixPosition(x.target.matrixWorld),v.direction.sub(r),v.direction.transformDirection(m),f++}else if(x.isSpotLight){const v=i.spot[d];v.position.setFromMatrixPosition(x.matrixWorld),v.position.applyMatrix4(m),v.direction.setFromMatrixPosition(x.matrixWorld),r.setFromMatrixPosition(x.target.matrixWorld),v.direction.sub(r),v.direction.transformDirection(m),d++}else if(x.isRectAreaLight){const v=i.rectArea[g];v.position.setFromMatrixPosition(x.matrixWorld),v.position.applyMatrix4(m),o.identity(),s.copy(x.matrixWorld),s.premultiply(m),o.extractRotation(s),v.halfWidth.set(x.width*.5,0,0),v.halfHeight.set(0,x.height*.5,0),v.halfWidth.applyMatrix4(o),v.halfHeight.applyMatrix4(o),g++}else if(x.isPointLight){const v=i.point[h];v.position.setFromMatrixPosition(x.matrixWorld),v.position.applyMatrix4(m),h++}else if(x.isHemisphereLight){const v=i.hemi[_];v.direction.setFromMatrixPosition(x.matrixWorld),v.direction.transformDirection(m),_++}}}return{setup:a,setupView:l,state:i}}function kp(n){const e=new lC(n),t=[],i=[];function r(c){u.camera=c,t.length=0,i.length=0}function s(c){t.push(c)}function o(c){i.push(c)}function a(){e.setup(t)}function l(c){e.setupView(t,c)}const u={lightsArray:t,shadowsArray:i,camera:null,lights:e,transmissionRenderTarget:{}};return{init:r,state:u,setupLights:a,setupLightsView:l,pushLight:s,pushShadow:o}}function cC(n){let e=new WeakMap;function t(r,s=0){const o=e.get(r);let a;return o===void 0?(a=new kp(n),e.set(r,[a])):s>=o.length?(a=new kp(n),o.push(a)):a=o[s],a}
vendor: 5,051 bytes, lines 3810-3838
3810function i(){e=new WeakMap}return{get:t,dispose:i}}class uC extends Cl{static get type(){return"MeshDepthMaterial"}constructor(e){super(),this.isMeshDepthMaterial=!0,this.depthPacking=WT,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 fC extends Cl{static get type(){return"MeshDistanceMaterial"}constructor(e){super(),this.isMeshDistanceMaterial=!0,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}}const hC=`void main() { 3811 gl_Position = vec4( position, 1.0 ); 3812}`,dC=`uniform sampler2D shadow_pass; 3813uniform vec2 resolution; 3814uniform float radius; 3815#include <packing> 3816void main() { 3817 const float samples = float( VSM_SAMPLES ); 3818 float mean = 0.0; 3819 float squared_mean = 0.0; 3820 float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); 3821 float uvStart = samples <= 1.0 ? 0.0 : - 1.0; 3822 for ( float i = 0.0; i < samples; i ++ ) { 3823 float uvOffset = uvStart + i * uvStride; 3824 #ifdef HORIZONTAL_PASS 3825 vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); 3826 mean += distribution.x; 3827 squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; 3828 #else 3829 float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); 3830 mean += depth; 3831 squared_mean += depth * depth; 3832 #endif 3833 } 3834 mean = mean / samples; 3835 squared_mean = squared_mean / samples; 3836 float std_dev = sqrt( squared_mean - mean * mean ); 3837 gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); 3838}`;function pC(n,e,t){let i=new M0;const r=new Je,s=new Je,o=new yt,a=new uC({depthPacking:XT}),l=new fC,u={},c=t.maxTextureSize,f={[nr]:on,[on]:nr,[gi]:gi},h=new ii({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Je},radius:{value:4}},vertexShader:hC,fragmentShader:dC}),d=h.clone();d.defines.HORIZONTAL_PASS=1;const g=new lr;g.setAttribute("position",new Qn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new Hn(g,h),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Zg;let p=this.type;this.render=function(w,C,P){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||w.length===0)return;const S=n.getRenderTarget(),M=n.getActiveCubeFace(),I=n.getActiveMipmapLevel(),z=n.state;z.setBlending(Si),z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);const O=p!==hi&&this.type===hi,X=p===hi&&this.type!==hi;for(let J=0,D=w.length;J<D;J++){const V=w[J],U=V.shadow;if(U===void 0){console.warn("THREE.WebGLShadowMap:",V,"has no shadow.");continue}if(U.autoUpdate===!1&&U.needsUpdate===!1)continue;r.copy(U.mapSize);const se=U.getFrameExtents();if(r.multiply(se),s.copy(U.mapSize),(r.x>c||r.y>c)&&(r.x>c&&(s.x=Math.floor(c/se.x),r.x=s.x*se.x,U.mapSize.x=s.x),r.y>c&&(s.y=Math.floor(c/se.y),r.y=s.y*se.y,U.mapSize.y=s.y)),U.map===null||O===!0||X===!0){const pe=this.type!==hi?{minFilter:Gn,magFilter:Gn}:{};U.map!==null&&U.map.dispose(),U.map=new ir(r.x,r.y,pe),U.map.texture.name=V.name+".shadowMap",U.camera.updateProjectionMatrix()}n.setRenderTarget(U.map),n.clear();const fe=U.getViewportCount();for(let pe=0;pe<fe;pe++){const Ee=U.getViewport(pe);o.set(s.x*Ee.x,s.y*Ee.y,s.x*Ee.z,s.y*Ee.w),z.viewport(o),U.updateMatrices(V,pe),i=U.getFrustum(),v(C,P,U.camera,V,this.type)}U.isPointLightShadow!==!0&&this.type===hi&&T(U,P),U.needsUpdate=!1}p=this.type,m.needsUpdate=!1,n.setRenderTarget(S,M,I)};function T(w,C){const P=e.update(_);h.defines.VSM_SAMPLES!==w.blurSamples&&(h.defines.VSM_SAMPLES=w.blurSamples,d.defines.VSM_SAMPLES=w.blurSamples,h.needsUpdate=!0,d.needsUpdate=!0),w.mapPass===null&&(w.mapPass=new ir(r.x,r.y)),h.uniforms.shadow_pass.value=w.map.texture,h.uniforms.resolution.value=w.mapSize,h.uniforms.radius.value=w.radius,n.setRenderTarget(w.mapPass),n.clear(),n.renderBufferDirect(C,null,P,h,_,null),d.uniforms.shadow_pass.value=w.mapPass.texture,d.uniforms.resolution.value=w.mapSize,d.uniforms.radius.value=w.radius,n.setRenderTarget(w.map),n.clear(),n.renderBufferDirect(C,null,P,d,_,null)}function x(w,C,P,S){let M=null;const I=P.isPointLight===!0?w.customDistanceMaterial:w.customDepthMaterial;if(I!==void 0)M=I;else if(M=P.isPointLight===!0?l:a,n.localClippingEnabled&&C.clipShadows===!0&&Array.isArray(C.clippingPlanes)&&C.clippingPlanes.length!==0||C.displacementMap&&C.displacementScale!==0||C.alph
vendor: 7,404 bytes, line 3838
3838aMap&&C.alphaTest>0||C.map&&C.alphaTest>0){const z=M.uuid,O=C.uuid;let X=u[z];X===void 0&&(X={},u[z]=X);let J=X[O];J===void 0&&(J=M.clone(),X[O]=J,C.addEventListener("dispose",A)),M=J}if(M.visible=C.visible,M.wireframe=C.wireframe,S===hi?M.side=C.shadowSide!==null?C.shadowSide:C.side:M.side=C.shadowSide!==null?C.shadowSide:f[C.side],M.alphaMap=C.alphaMap,M.alphaTest=C.alphaTest,M.map=C.map,M.clipShadows=C.clipShadows,M.clippingPlanes=C.clippingPlanes,M.clipIntersection=C.clipIntersection,M.displacementMap=C.displacementMap,M.displacementScale=C.displacementScale,M.displacementBias=C.displacementBias,M.wireframeLinewidth=C.wireframeLinewidth,M.linewidth=C.linewidth,P.isPointLight===!0&&M.isMeshDistanceMaterial===!0){const z=n.properties.get(M);z.light=P}return M}function v(w,C,P,S,M){if(w.visible===!1)return;if(w.layers.test(C.layers)&&(w.isMesh||w.isLine||w.isPoints)&&(w.castShadow||w.receiveShadow&&M===hi)&&(!w.frustumCulled||i.intersectsObject(w))){w.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,w.matrixWorld);const O=e.update(w),X=w.material;if(Array.isArray(X)){const J=O.groups;for(let D=0,V=J.length;D<V;D++){const U=J[D],se=X[U.materialIndex];if(se&&se.visible){const fe=x(w,se,S,M);w.onBeforeShadow(n,w,C,P,O,fe,U),n.renderBufferDirect(P,null,O,fe,w,U),w.onAfterShadow(n,w,C,P,O,fe,U)}}}else if(X.visible){const J=x(w,X,S,M);w.onBeforeShadow(n,w,C,P,O,J,null),n.renderBufferDirect(P,null,O,J,w,null),w.onAfterShadow(n,w,C,P,O,J,null)}}const z=w.children;for(let O=0,X=z.length;O<X;O++)v(z[O],C,P,S,M)}function A(w){w.target.removeEventListener("dispose",A);for(const P in u){const S=u[P],M=w.target.uuid;M in S&&(S[M].dispose(),delete S[M])}}}const mC={[Eu]:Tu,[bu]:Ru,[wu]:Cu,[Fs]:Au,[Tu]:Eu,[Ru]:bu,[Cu]:wu,[Au]:Fs};function _C(n,e){function t(){let F=!1;const ge=new yt;let ne=null;const ie=new yt(0,0,0,0);return{setMask:function(ye){ne!==ye&&!F&&(n.colorMask(ye,ye,ye,ye),ne=ye)},setLocked:function(ye){F=ye},setClear:function(ye,ve,ke,mt,Ut){Ut===!0&&(ye*=mt,ve*=mt,ke*=mt),ge.set(ye,ve,ke,mt),ie.equals(ge)===!1&&(n.clearColor(ye,ve,ke,mt),ie.copy(ge))},reset:function(){F=!1,ne=null,ie.set(-1,0,0,0)}}}function i(){let F=!1,ge=!1,ne=null,ie=null,ye=null;return{setReversed:function(ve){if(ge!==ve){const ke=e.get("EXT_clip_control");ge?ke.clipControlEXT(ke.LOWER_LEFT_EXT,ke.ZERO_TO_ONE_EXT):ke.clipControlEXT(ke.LOWER_LEFT_EXT,ke.NEGATIVE_ONE_TO_ONE_EXT);const mt=ye;ye=null,this.setClear(mt)}ge=ve},getReversed:function(){return ge},setTest:function(ve){ve?de(n.DEPTH_TEST):Ce(n.DEPTH_TEST)},setMask:function(ve){ne!==ve&&!F&&(n.depthMask(ve),ne=ve)},setFunc:function(ve){if(ge&&(ve=mC[ve]),ie!==ve){switch(ve){case Eu:n.depthFunc(n.NEVER);break;case Tu:n.depthFunc(n.ALWAYS);break;case bu:n.depthFunc(n.LESS);break;case Fs:n.depthFunc(n.LEQUAL);break;case wu:n.depthFunc(n.EQUAL);break;case Au:n.depthFunc(n.GEQUAL);break;case Ru:n.depthFunc(n.GREATER);break;case Cu:n.depthFunc(n.NOTEQUAL);break;default:n.depthFunc(n.LEQUAL)}ie=ve}},setLocked:function(ve){F=ve},setClear:function(ve){ye!==ve&&(ge&&(ve=1-ve),n.clearDepth(ve),ye=ve)},reset:function(){F=!1,ne=null,ie=null,ye=null,ge=!1}}}function r(){let F=!1,ge=null,ne=null,ie=null,ye=null,ve=null,ke=null,mt=null,Ut=null;return{setTest:function(et){F||(et?de(n.STENCIL_TEST):Ce(n.STENCIL_TEST))},setMask:function(et){ge!==et&&!F&&(n.stencilMask(et),ge=et)},setFunc:function(et,In,ri){(ne!==et||ie!==In||ye!==ri)&&(n.stencilFunc(et,In,ri),ne=et,ie=In,ye=ri)},setOp:function(et,In,ri){(ve!==et||ke!==In||mt!==ri)&&(n.stencilOp(et,In,ri),ve=et,ke=In,mt=ri)},setLocked:function(et){F=et},setClear:function(et){Ut!==et&&(n.clearStencil(et),Ut=et)},reset:function(){F=!1,ge=null,ne=null,ie=null,ye=null,ve=null,ke=null,mt=null,Ut=null}}}const s=new t,o=new i,a=new r,l=new WeakMap,u=new WeakMap;let c={},f={},h=new WeakMap,d=[],g=null,_=!1,m=null,p=null,T=null,x=null,v=null,A=null,w=null,C=new tt(0,0,0),P=0,S=!1,M=null,I=null,z=null,O=null,X=null;const J=n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let D=!1,V=0;const U=n.getParameter(n.VERSION);U.indexOf("WebGL")!==-1?(V=parseFloat(/^WebGL (\d)/.exec(U)[1]),D=V>=1):U.indexOf("OpenGL ES")!==-1&&(V=parseFloat(/^OpenGL ES (\d)/.exec(U)[1]),D=V>=2);let se=null,fe={};const pe=n.getParameter(n.SCISSOR_BOX),Ee=n.getParameter(n.VIEWPORT),Ge=new yt().fromArray(pe),te=new yt().fromArray(Ee);function le(F,ge,ne,ie){const ye=new Uint8Array(4),ve=n.createTexture();n.bindTexture(F,ve),n.texParameteri(F,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(F,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let ke=0;ke<ne;ke++)F===n.TEXTURE_3D||F===n.TEXTURE_2D_ARRAY?n.texImage3D(ge,0,n.RGBA,1,1,ie,0,n.RGBA,n.UNSIGNED_BYTE,ye):n.texImage2D(ge+ke,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,ye);return ve}const Me={};Me[n.TEXTURE_2D]=le(n.TEXTURE_2D,n.TEXTURE_2D,1),Me[n.TEXTURE_CUBE_MAP]=le(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),Me[n.TEXTURE_2D_ARRAY]=le(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),Me[n.TEXTURE_3D]=le(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(Fs),ee(!1),Z(zd),de(n.CULL_FACE),E(Si);function de(F){c[F]!==!0&&(n.enable(F),c[F]=!0)}function Ce(F){c[F]!==!1&&(n.disable(F),c[F]=!1)}function Le(F,ge){return f[F]!==ge?(n.bindFramebuffer(F,ge),f[F]=ge,F===n.DRAW_FRAMEBUFFER&&(f[n.FRAMEBUFFER]=ge),F===n.FRAMEBUFFER&&(f[n.DRAW_FRAMEBUFFER]=ge),!0):!1}function Ne(F,ge){let ne=d,ie=!1;if(F){ne=h.get(ge),ne===void 0&&(ne=[],h.set(ge,ne));const ye=F.textures;if(ne.length!==ye.length||ne[0]!==n.COLOR_ATTACHMENT0){for(let ve=0,ke=ye.length;ve<ke;ve++)ne[ve]=n.COLOR_ATTACHMENT0+ve;ne.length=ye.length,ie=!0}}else ne[0]!==n.BACK&&(ne[0]=n.BACK,ie=!0);ie&&n.drawBuffers(ne)}function it(F){return g!==F?(n.useProgram(F),g=F,!0):!1}const We={[br]:n.FUNC_ADD,[gT]:n.FUNC_SUBTRACT,[vT]:n.FUNC_REVERSE_SUBTRACT};We[xT]=n.MIN,We[yT]=n.MAX;const L={[ST]:n.ZERO,[MT]:n.ONE,[ET]:n.SRC_COLOR,[Su]:n.SRC_ALPHA,[CT]:n.SRC_ALPHA_SATURATE,[AT]:n.DST_COLOR,[bT]:n.DST_ALPHA,[TT]:n.ONE_MINUS_SRC_COLOR,[Mu]:n.ONE_MINUS_SRC_ALPHA,[RT]:n.ONE_MINUS_DST_COLOR,[wT]:n.ONE_MINUS_DST_ALPHA,[PT]:n.CONSTANT_COLOR,[DT]:n.ONE_MINUS_CONSTANT_COLOR,[LT]:n.CONSTANT_ALPHA,[IT]:n.ONE_MINUS_CONSTANT_ALPHA};function E(F,ge,ne,ie,ye,ve,ke,mt,Ut,et){if(F===Si){_===!0&&(Ce(n.BLEND),_=!1);return}if(_===!1&&(de(n.BLEND),_=!0),F!==_T){if(F!==m||et!==S){if((p!==br||v!==br)&&(n.blendEquation(n.FUNC_ADD),p=br,v=br),et)switch(F){case ws:n.blendFuncSeparate(n.ONE,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case Vd:n.blendFunc(n.ONE,n.ONE);break;case Gd:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case Wd:n.blendFuncSeparate(n.ZERO,n.SRC_COLOR,n.ZERO,n.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",F);break}else switch(F){case ws:n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case Vd:n.blendFunc(n.SRC_ALPHA,n.ONE);break;case Gd:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case Wd:n.blendFunc(n.ZERO,n.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",F);break}T=null,x=null,A=null,w=null,C.set(0,0,0),P=0,m=F,S=et}return}ye=ye||ge,ve=ve||ne,ke=ke||ie,(ge!==p||ye!==v)&&(n.blendEquationSeparate(We[ge],We[ye]),p=ge,v=ye),(ne!==T||ie!==x||ve!==A||ke!==w)&&(n.blendFuncSeparate(L[ne],L[ie],L[ve],L[ke]),T=ne,x=ie,A=ve,w=ke),(mt.equals(C)===!1||Ut!==P)&&(n.blendColor
vendor: 3,443 bytes, line 3838
3838(mt.r,mt.g,mt.b,Ut),C.copy(mt),P=Ut),m=F,S=!1}function j(F,ge){F.side===gi?Ce(n.CULL_FACE):de(n.CULL_FACE);let ne=F.side===on;ge&&(ne=!ne),ee(ne),F.blending===ws&&F.transparent===!1?E(Si):E(F.blending,F.blendEquation,F.blendSrc,F.blendDst,F.blendEquationAlpha,F.blendSrcAlpha,F.blendDstAlpha,F.blendColor,F.blendAlpha,F.premultipliedAlpha),o.setFunc(F.depthFunc),o.setTest(F.depthTest),o.setMask(F.depthWrite),s.setMask(F.colorWrite);const ie=F.stencilWrite;a.setTest(ie),ie&&(a.setMask(F.stencilWriteMask),a.setFunc(F.stencilFunc,F.stencilRef,F.stencilFuncMask),a.setOp(F.stencilFail,F.stencilZFail,F.stencilZPass)),oe(F.polygonOffset,F.polygonOffsetFactor,F.polygonOffsetUnits),F.alphaToCoverage===!0?de(n.SAMPLE_ALPHA_TO_COVERAGE):Ce(n.SAMPLE_ALPHA_TO_COVERAGE)}function ee(F){M!==F&&(F?n.frontFace(n.CW):n.frontFace(n.CCW),M=F)}function Z(F){F!==dT?(de(n.CULL_FACE),F!==I&&(F===zd?n.cullFace(n.BACK):F===pT?n.cullFace(n.FRONT):n.cullFace(n.FRONT_AND_BACK))):Ce(n.CULL_FACE),I=F}function q(F){F!==z&&(D&&n.lineWidth(F),z=F)}function oe(F,ge,ne){F?(de(n.POLYGON_OFFSET_FILL),(O!==ge||X!==ne)&&(n.polygonOffset(ge,ne),O=ge,X=ne)):Ce(n.POLYGON_OFFSET_FILL)}function Q(F){F?de(n.SCISSOR_TEST):Ce(n.SCISSOR_TEST)}function b(F){F===void 0&&(F=n.TEXTURE0+J-1),se!==F&&(n.activeTexture(F),se=F)}function y(F,ge,ne){ne===void 0&&(se===null?ne=n.TEXTURE0+J-1:ne=se);let ie=fe[ne];ie===void 0&&(ie={type:void 0,texture:void 0},fe[ne]=ie),(ie.type!==F||ie.texture!==ge)&&(se!==ne&&(n.activeTexture(ne),se=ne),n.bindTexture(F,ge||Me[F]),ie.type=F,ie.texture=ge)}function N(){const F=fe[se];F!==void 0&&F.type!==void 0&&(n.bindTexture(F.type,null),F.type=void 0,F.texture=void 0)}function B(){try{n.compressedTexImage2D.apply(n,arguments)}catch(F){console.error("THREE.WebGLState:",F)}}function W(){try{n.compressedTexImage3D.apply(n,arguments)}catch(F){console.error("THREE.WebGLState:",F)}}function G(){try{n.texSubImage2D.apply(n,arguments)}catch(F){console.error("THREE.WebGLState:",F)}}function ue(){try{n.texSubImage3D.apply(n,arguments)}catch(F){console.error("THREE.WebGLState:",F)}}function ae(){try{n.compressedTexSubImage2D.apply(n,arguments)}catch(F){console.error("THREE.WebGLState:",F)}}function ce(){try{n.compressedTexSubImage3D.apply(n,arguments)}catch(F){console.error("THREE.WebGLState:",F)}}function Ue(){try{n.texStorage2D.apply(n,arguments)}catch(F){console.error("THREE.WebGLState:",F)}}function re(){try{n.texStorage3D.apply(n,arguments)}catch(F){console.error("THREE.WebGLState:",F)}}function me(){try{n.texImage2D.apply(n,arguments)}catch(F){console.error("THREE.WebGLState:",F)}}function Te(){try{n.texImage3D.apply(n,arguments)}catch(F){console.error("THREE.WebGLState:",F)}}function Pe(F){Ge.equals(F)===!1&&(n.scissor(F.x,F.y,F.z,F.w),Ge.copy(F))}function Se(F){te.equals(F)===!1&&(n.viewport(F.x,F.y,F.z,F.w),te.copy(F))}function Ie(F,ge){let ne=u.get(ge);ne===void 0&&(ne=new WeakMap,u.set(ge,ne));let ie=ne.get(F);ie===void 0&&(ie=n.getUniformBlockIndex(ge,F.name),ne.set(F,ie))}function De(F,ge){const ie=u.get(ge).get(F);l.get(ge)!==ie&&(n.uniformBlockBinding(ge,ie,F.__bindingPointIndex),l.set(ge,ie))}function Qe(){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: 34,382 bytes, line 3838
3838(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),c={},se=null,fe={},f={},h=new WeakMap,d=[],g=null,_=!1,m=null,p=null,T=null,x=null,v=null,A=null,w=null,C=new tt(0,0,0),P=0,S=!1,M=null,I=null,z=null,O=null,X=null,Ge.set(0,0,n.canvas.width,n.canvas.height),te.set(0,0,n.canvas.width,n.canvas.height),s.reset(),o.reset(),a.reset()}return{buffers:{color:s,depth:o,stencil:a},enable:de,disable:Ce,bindFramebuffer:Le,drawBuffers:Ne,useProgram:it,setBlending:E,setMaterial:j,setFlipSided:ee,setCullFace:Z,setLineWidth:q,setPolygonOffset:oe,setScissorTest:Q,activeTexture:b,bindTexture:y,unbindTexture:N,compressedTexImage2D:B,compressedTexImage3D:W,texImage2D:me,texImage3D:Te,updateUBOMapping:Ie,uniformBlockBinding:De,texStorage2D:Ue,texStorage3D:re,texSubImage2D:G,texSubImage3D:ue,compressedTexSubImage2D:ae,compressedTexSubImage3D:ce,scissor:Pe,viewport:Se,reset:Qe}}function Hp(n,e,t,i){const r=gC(i);switch(t){case i0:return n*e;case s0:return n*e;case o0:return n*e*2;case a0:return n*e/r.components*r.byteLength;case fh:return n*e/r.components*r.byteLength;case l0:return n*e*2/r.components*r.byteLength;case hh:return n*e*2/r.components*r.byteLength;case r0:return n*e*3/r.components*r.byteLength;case kn:return n*e*4/r.components*r.byteLength;case dh:return n*e*4/r.components*r.byteLength;case Oa:case Fa:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case Ba:case ka:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case Nu:case Fu:return Math.max(n,16)*Math.max(e,8)/4;case Uu:case Ou:return Math.max(n,8)*Math.max(e,8)/2;case Bu:case ku:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case Hu:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case zu:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case Vu:return Math.floor((n+4)/5)*Math.floor((e+3)/4)*16;case Gu:return Math.floor((n+4)/5)*Math.floor((e+4)/5)*16;case Wu:return Math.floor((n+5)/6)*Math.floor((e+4)/5)*16;case Xu:return Math.floor((n+5)/6)*Math.floor((e+5)/6)*16;case qu:return Math.floor((n+7)/8)*Math.floor((e+4)/5)*16;case Yu:return Math.floor((n+7)/8)*Math.floor((e+5)/6)*16;case $u:return Math.floor((n+7)/8)*Math.floor((e+7)/8)*16;case ju:return Math.floor((n+9)/10)*Math.floor((e+4)/5)*16;case Ku:return Math.floor((n+9)/10)*Math.floor((e+5)/6)*16;case Zu:return Math.floor((n+9)/10)*Math.floor((e+7)/8)*16;case Ju:return Math.floor((n+9)/10)*Math.floor((e+9)/10)*16;case Qu:return Math.floor((n+11)/12)*Math.floor((e+9)/10)*16;case ef:return Math.floor((n+11)/12)*Math.floor((e+11)/12)*16;case Ha:case tf:case nf:return Math.ceil(n/4)*Math.ceil(e/4)*16;case c0:case rf:return Math.ceil(n/4)*Math.ceil(e/4)*8;case sf:case of:return Math.ceil(n/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function gC(n){switch(n){case wi:case e0:return{byteLength:1,components:1};case Fo:case t0:case Xs:return{byteLength:2,components:1};case ch:case uh:return{byteLength:2,components:4};case Hr:case lh:case xi:return{byteLength:4,components:1};case n0:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}function vC(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=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),u=new Je,c=new WeakMap;let f;const h=new WeakMap;let d=!1;try{d=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function g(b,y){return d?new OffscreenCanvas(b,y):hl("canvas")}function _(b,y,N){let B=1;const W=Q(b);if((W.width>N||W.height>N)&&(B=N/Math.max(W.width,W.height)),B<1)if(typeof HTMLImageElement<"u"&&b instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&b instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&b instanceof ImageBitmap||typeof VideoFrame<"u"&&b instanceof VideoFrame){const G=Math.floor(B*W.width),ue=Math.floor(B*W.height);f===void 0&&(f=g(G,ue));const ae=y?g(G,ue):f;return ae.width=G,ae.height=ue,ae.getContext("2d").drawImage(b,0,0,G,ue),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+W.width+"x"+W.height+") to ("+G+"x"+ue+")."),ae}else return"data"in b&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+W.width+"x"+W.height+")."),b;return b}function m(b){return b.generateMipmaps}function p(b){n.generateMipmap(b)}function T(b){return b.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:b.isWebGL3DRenderTarget?n.TEXTURE_3D:b.isWebGLArrayRenderTarget||b.isCompressedArrayTexture?n.TEXTURE_2D_ARRAY:n.TEXTURE_2D}function x(b,y,N,B,W=!1){if(b!==null){if(n[b]!==void 0)return n[b];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+b+"'")}let G=y;if(y===n.RED&&(N===n.FLOAT&&(G=n.R32F),N===n.HALF_FLOAT&&(G=n.R16F),N===n.UNSIGNED_BYTE&&(G=n.R8)),y===n.RED_INTEGER&&(N===n.UNSIGNED_BYTE&&(G=n.R8UI),N===n.UNSIGNED_SHORT&&(G=n.R16UI),N===n.UNSIGNED_INT&&(G=n.R32UI),N===n.BYTE&&(G=n.R8I),N===n.SHORT&&(G=n.R16I),N===n.INT&&(G=n.R32I)),y===n.RG&&(N===n.FLOAT&&(G=n.RG32F),N===n.HALF_FLOAT&&(G=n.RG16F),N===n.UNSIGNED_BYTE&&(G=n.RG8)),y===n.RG_INTEGER&&(N===n.UNSIGNED_BYTE&&(G=n.RG8UI),N===n.UNSIGNED_SHORT&&(G=n.RG16UI),N===n.UNSIGNED_INT&&(G=n.RG32UI),N===n.BYTE&&(G=n.RG8I),N===n.SHORT&&(G=n.RG16I),N===n.INT&&(G=n.RG32I)),y===n.RGB_INTEGER&&(N===n.UNSIGNED_BYTE&&(G=n.RGB8UI),N===n.UNSIGNED_SHORT&&(G=n.RGB16UI),N===n.UNSIGNED_INT&&(G=n.RGB32UI),N===n.BYTE&&(G=n.RGB8I),N===n.SHORT&&(G=n.RGB16I),N===n.INT&&(G=n.RGB32I)),y===n.RGBA_INTEGER&&(N===n.UNSIGNED_BYTE&&(G=n.RGBA8UI),N===n.UNSIGNED_SHORT&&(G=n.RGBA16UI),N===n.UNSIGNED_INT&&(G=n.RGBA32UI),N===n.BYTE&&(G=n.RGBA8I),N===n.SHORT&&(G=n.RGBA16I),N===n.INT&&(G=n.RGBA32I)),y===n.RGB&&N===n.UNSIGNED_INT_5_9_9_9_REV&&(G=n.RGB9_E5),y===n.RGBA){const ue=W?Rl:qe.getTransfer(B);N===n.FLOAT&&(G=n.RGBA32F),N===n.HALF_FLOAT&&(G=n.RGBA16F),N===n.UNSIGNED_BYTE&&(G=ue===nt?n.SRGB8_ALPHA8:n.RGBA8),N===n.UNSIGNED_SHORT_4_4_4_4&&(G=n.RGBA4),N===n.UNSIGNED_SHORT_5_5_5_1&&(G=n.RGB5_A1)}return(G===n.R16F||G===n.R32F||G===n.RG16F||G===n.RG32F||G===n.RGBA16F||G===n.RGBA32F)&&e.get("EXT_color_buffer_float"),G}function v(b,y){let N;return b?y===null||y===Hr||y===Hs?N=n.DEPTH24_STENCIL8:y===xi?N=n.DEPTH32F_STENCIL8:y===Fo&&(N=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):y===null||y===Hr||y===Hs?N=n.DEPTH_COMPONENT24:y===xi?N=n.DEPTH_COMPONENT32F:y===Fo&&(N=n.DEPTH_COMPONENT16),N}function A(b,y){return m(b)===!0||b.isFramebufferTexture&&b.minFilter!==Gn&&b.minFilter!==en?Math.log2(Math.max(y.width,y.height))+1:b.mipmaps!==void 0&&b.mipmaps.length>0?b.mipmaps.length:b.isCompressedTexture&&Array.isArray(b.image)?y.mipmaps.length:1}function w(b){const y=b.target;y.removeEventListener("dispose",w),P(y),y.isVideoTexture&&c.delete(y)}function C(b){const y=b.target;y.removeEventListener("dispose",C),M(y)}function P(b){const y=i.get(b);if(y.__webglInit===void 0)return;const N=b.source,B=h.get(N);if(B){const W=B[y.__cacheKey];W.usedTimes--,W.usedTimes===0&&S(b),Object.keys(B).length===0&&h.delete(N)}i.remove(b)}function S(b){const y=i.get(b);n.deleteTexture(y.__webglTexture);const N=b.source,B=h.get(N);delete B[y.__cacheKey],o.memory.textures--}function M(b){const y=i.get(b);if(b.depthTexture&&(b.depthTexture.dispose(),i.remove(b.depthTexture)),b.isWebGLCubeRenderTarget)for(let B=0;B<6;B++){if(Array.isArray(y.__webglFramebuffer[B]))for(let W=0;W<y.__webglFramebuffer[B].length;W++)n.deleteFramebuffer(y.__webglFramebuffer[B][W]);else n.deleteFramebuffer(y.__webglFramebuffer[B]);y.__webglDepthbuffer&&n.deleteRenderbuffer(y.__webglDepthbuffer[B])}else{if(Array.isArray(y.__webglFramebuffer))for(let B=0;B<y.__webglFramebuffer.length;B++)n.deleteFramebuffer(y.__webglFramebuffer[B]);else n.deleteFramebuffer(y.__webglFramebuffer);if(y.__webglDepthbuffer&&n.deleteRenderbuffer(y.__webglDepthbuffer),y.__webglMultisampledFramebuffer&&n.deleteFramebuffer(y.__webglMultisampledFramebuffer),y.__webglColorRenderbuffer)for(let B=0;B<y.__webglColorRenderbuffer.length;B++)y.__webglColorRenderbuffer[B]&&n.deleteRenderbuffer(y.__webglColorRenderbuffer[B]);y.__webglDepthRenderbuffer&&n.deleteRenderbuffer(y.__webglDepthRenderbuffer)}const N=b.textures;for(let B=0,W=N.length;B<W;B++){const G=i.get(N[B]);G.__webglTexture&&(n.deleteTexture(G.__webglTexture),o.memory.textures--),i.remove(N[B])}i.remove(b)}let I=0;function z(){I=0}function O(){const b=I;return b>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+b+" texture units while this GPU supports only "+r.maxTextures),I+=1,b}function X(b){const y=[];return y.push(b.wrapS),y.push(b.wrapT),y.push(b.wrapR||0),y.push(b.magFilter),y.push(b.minFilter),y.push(b.anisotropy),y.push(b.internalFormat),y.push(b.format),y.push(b.type),y.push(b.generateMipmaps),y.push(b.premultiplyAlpha),y.push(b.flipY),y.push(b.unpackAlignment),y.push(b.colorSpace),y.join()}function J(b,y){const N=i.get(b);if(b.isVideoTexture&&q(b),b.isRenderTargetTexture===!1&&b.version>0&&N.__version!==b.version){const B=b.image;if(B===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(B.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{te(N,b,y);return}}t.bindTexture(n.TEXTURE_2D,N.__webglTexture,n.TEXTURE0+y)}function D(b,y){const N=i.get(b);if(b.version>0&&N.__version!==b.version){te(N,b,y);return}t.bindTexture(n.TEXTURE_2D_ARRAY,N.__webglTexture,n.TEXTURE0+y)}function V(b,y){const N=i.get(b);if(b.version>0&&N.__version!==b.version){te(N,b,y);return}t.bindTexture(n.TEXTURE_3D,N.__webglTexture,n.TEXTURE0+y)}function U(b,y){const N=i.get(b);if(b.version>0&&N.__version!==b.version){le(N,b,y);return}t.bindTexture(n.TEXTURE_CUBE_MAP,N.__webglTexture,n.TEXTURE0+y)}const se={[Lu]:n.REPEAT,[Rr]:n.CLAMP_TO_EDGE,[Iu]:n.MIRRORED_REPEAT},fe={[Gn]:n.NEAREST,[GT]:n.NEAREST_MIPMAP_NEAREST,[ra]:n.NEAREST_MIPMAP_LINEAR,[en]:n.LINEAR,[oc]:n.LINEAR_MIPMAP_NEAREST,[Cr]:n.LINEAR_MIPMAP_LINEAR},pe={[$T]:n.NEVER,[eb]:n.ALWAYS,[jT]:n.LESS,[u0]:n.LEQUAL,[KT]:n.EQUAL,[QT]:n.GEQUAL,[ZT]:n.GREATER,[JT]:n.NOTEQUAL};function Ee(b,y){if(y.type===xi&&e.has("OES_texture_float_linear")===!1&&(y.magFilter===en||y.magFilter===oc||y.magFilter===ra||y.magFilter===Cr||y.minFilter===en||y.minFilter===oc||y.minFilter===ra||y.minFilter===Cr)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(b,n.TEXTURE_WRAP_S,se[y.wrapS]),n.texParameteri(b,n.TEXTURE_WRAP_T,se[y.wrapT]),(b===n.TEXTURE_3D||b===n.TEXTURE_2D_ARRAY)&&n.texParameteri(b,n.TEXTURE_WRAP_R,se[y.wrapR]),n.texParameteri(b,n.TEXTURE_MAG_FILTER,fe[y.magFilter]),n.texParameteri(b,n.TEXTURE_MIN_FILTER,fe[y.minFilter]),y.compareFunction&&(n.texParameteri(b,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(b,n.TEXTURE_COMPARE_FUNC,pe[y.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(y.magFilter===Gn||y.minFilter!==ra&&y.minFilter!==Cr||y.type===xi&&e.has("OES_texture_float_linear")===!1)return;if(y.anisotropy>1||i.get(y).__currentAnisotropy){const N=e.get("EXT_texture_filter_anisotropic");n.texParameterf(b,N.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(y.anisotropy,r.getMaxAnisotropy())),i.get(y).__currentAnisotropy=y.anisotropy}}}function Ge(b,y){let N=!1;b.__webglInit===void 0&&(b.__webglInit=!0,y.addEventListener("dispose",w));const B=y.source;let W=h.get(B);W===void 0&&(W={},h.set(B,W));const G=X(y);if(G!==b.__cacheKey){W[G]===void 0&&(W[G]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,N=!0),W[G].usedTimes++;const ue=W[b.__cacheKey];ue!==void 0&&(W[b.__cacheKey].usedTimes--,ue.usedTimes===0&&S(y)),b.__cacheKey=G,b.__webglTexture=W[G].texture}return N}function te(b,y,N){let B=n.TEXTURE_2D;(y.isDataArrayTexture||y.isCompressedArrayTexture)&&(B=n.TEXTURE_2D_ARRAY),y.isData3DTexture&&(B=n.TEXTURE_3D);const W=Ge(b,y),G=y.source;t.bindTexture(B,b.__webglTexture,n.TEXTURE0+N);const ue=i.get(G);if(G.version!==ue.__version||W===!0){t.activeTexture(n.TEXTURE0+N);const ae=qe.getPrimaries(qe.workingColorSpace),ce=y.colorSpace===Wi?null:qe.getPrimaries(y.colorSpace),Ue=y.colorSpace===Wi||ae===ce?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,y.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,y.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ue);let re=_(y.image,!1,r.maxTextureSize);re=oe(y,re);const me=s.convert(y.format,y.colorSpace),Te=s.convert(y.type);let Pe=x(y.internalFormat,me,Te,y.colorSpace,y.isVideoTexture);Ee(B,y);let Se;const Ie=y.mipmaps,De=y.isVideoTexture!==!0,Qe=ue.__version===void 0||W===!0,F=G.dataReady,ge=A(y,re);if(y.isDepthTexture)Pe=v(y.format===zs,y.type),Qe&&(De?t.texStorage2D(n.TEXTURE_2D,1,Pe,re.width,re.height):t.texImage2D(n.TEXTURE_2D,0,Pe,re.width,re.height,0,me,Te,null));else if(y.isDataTexture)if(Ie.length>0){De&&Qe&&t.texStorage2D(n.TEXTURE_2D,ge,Pe,Ie[0].width,Ie[0].height);for(let ne=0,ie=Ie.length;ne<ie;ne++)Se=Ie[ne],De?F&&t.texSubImage2D(n.TEXTURE_2D,ne,0,0,Se.width,Se.height,me,Te,Se.data):t.texImage2D(n.TEXTURE_2D,ne,Pe,Se.width,Se.height,0,me,Te,Se.data);y.generateMipmaps=!1}else De?(Qe&&t.texStorage2D(n.TEXTURE_2D,ge,Pe,re.width,re.height),F&&t.texSubImage2D(n.TEXTURE_2D,0,0,0,re.width,re.height,me,Te,re.data)):t.texImage2D(n.TEXTURE_2D,0,Pe,re.width,re.height,0,me,Te,re.data);else if(y.isCompressedTexture)if(y.isCompressedArrayTexture){De&&Qe&&t.texStorage3D(n.TEXTURE_2D_ARRAY,ge,Pe,Ie[0].width,Ie[0].height,re.depth);for(let ne=0,ie=Ie.length;ne<ie;ne++)if(Se=Ie[ne],y.format!==kn)if(me!==null)if(De){if(F)if(y.layerUpdates.size>0){const ye=Hp(Se.width,Se.height,y.format,y.type);for(const ve of y.layerUpdates){const ke=Se.data.subarray(ve*ye/Se.data.BYTES_PER_ELEMENT,(ve+1)*ye/Se.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ne,0,0,ve,Se.width,Se.height,1,me,ke)}y.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ne,0,0,0,Se.width,Se.height,re.depth,me,Se.data)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,ne,Pe,Se.width,Se.height,re.depth,0,Se.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else De?F&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,ne,0,0,0,Se.width,Se.height,re.depth,me,Te,Se.data):t.texImage3D(n.TEXTURE_2D_ARRAY,ne,Pe,Se.width,Se.height,re.depth,0,me,Te,Se.data)}else{De&&Qe&&t.texStorage2D(n.TEXTURE_2D,ge,Pe,Ie[0].width,Ie[0].height);for(let ne=0,ie=Ie.length;ne<ie;ne++)Se=Ie[ne],y.format!==kn?me!==null?De?F&&t.compressedTexSubImage2D(n.TEXTURE_2D,ne,0,0,Se.width,Se.height,me,Se.data):t.compressedTexImage2D(n.TEXTURE_2D,ne,Pe,Se.width,Se.height,0,Se.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):De?F&&t.texSubImage2D(n.TEXTURE_2D,ne,0,0,Se.width,Se.height,me,Te,Se.data):t.texImage2D(n.TEXTURE_2D,ne,Pe,Se.width,Se.height,0,me,Te,Se.data)}else if(y.isDataArrayTexture)if(De){if(Qe&&t.texStorage3D(n.TEXTURE_2D_ARRAY,ge,Pe,re.width,re.height,re.depth),F)if(y.layerUpdates.size>0){const ne=Hp(re.width,re.height,y.format,y.type);for(const ie of y.layerUpdates){const ye=re.data.subarray(ie*ne/re.data.BYTES_PER_ELEMENT,(ie+1)*ne/re.data.BYTES_PER_ELEMENT);t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,ie,re.width,re.height,1,me,Te,ye)}y.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,re.width,re.height,re.depth,me,Te,re.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,Pe,re.width,re.height,re.depth,0,me,Te,re.data);else if(y.isData3DTexture)De?(Qe&&t.texStorage3D(n.TEXTURE_3D,ge,Pe,re.width,re.height,re.depth),F&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,re.width,re.height,re.depth,me,Te,re.data)):t.texImage3D(n.TEXTURE_3D,0,Pe,re.width,re.height,re.depth,0,me,Te,re.data);else if(y.isFramebufferTexture){if(Qe)if(De)t.texStorage2D(n.TEXTURE_2D,ge,Pe,re.width,re.height);else{let ne=re.width,ie=re.height;for(let ye=0;ye<ge;ye++)t.texImage2D(n.TEXTURE_2D,ye,Pe,ne,ie,0,me,Te,null),ne>>=1,ie>>=1}}else if(Ie.length>0){if(De&&Qe){const ne=Q(Ie[0]);t.texStorage2D(n.TEXTURE_2D,ge,Pe,ne.width,ne.height)}for(let ne=0,ie=Ie.length;ne<ie;ne++)Se=Ie[ne],De?F&&t.texSubImage2D(n.TEXTURE_2D,ne,0,0,me,Te,Se):t.texImage2D(n.TEXTURE_2D,ne,Pe,me,Te,Se);y.generateMipmaps=!1}else if(De){if(Qe){const ne=Q(re);t.texStorage2D(n.TEXTURE_2D,ge,Pe,ne.width,ne.height)}F&&t.texSubImage2D(n.TEXTURE_2D,0,0,0,me,Te,re)}else t.texImage2D(n.TEXTURE_2D,0,Pe,me,Te,re);m(y)&&p(B),ue.__version=G.version,y.onUpdate&&y.onUpdate(y)}b.__version=y.version}function le(b,y,N){if(y.image.length!==6)return;const B=Ge(b,y),W=y.source;t.bindTexture(n.TEXTURE_CUBE_MAP,b.__webglTexture,n.TEXTURE0+N);const G=i.get(W);if(W.version!==G.__version||B===!0){t.activeTexture(n.TEXTURE0+N);const ue=qe.getPrimaries(qe.workingColorSpace),ae=y.colorSpace===Wi?null:qe.getPrimaries(y.colorSpace),ce=y.colorSpace===Wi||ue===ae?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,y.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,y.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,ce);const Ue=y.isCompressedTexture||y.image[0].isCompressedTexture,re=y.image[0]&&y.image[0].isDataTexture,me=[];for(let ie=0;ie<6;ie++)!Ue&&!re?me[ie]=_(y.image[ie],!0,r.maxCubemapSize):me[ie]=re?y.image[ie].image:y.image[ie],me[ie]=oe(y,me[ie]);const Te=me[0],Pe=s.convert(y.format,y.colorSpace),Se=s.convert(y.type),Ie=x(y.internalFormat,Pe,Se,y.colorSpace),De=y.isVideoTexture!==!0,Qe=G.__version===void 0||B===!0,F=W.dataReady;let ge=A(y,Te);Ee(n.TEXTURE_CUBE_MAP,y);let ne;if(Ue){De&&Qe&&t.texStorage2D(n.TEXTURE_CUBE_MAP,ge,Ie,Te.width,Te.height);for(let ie=0;ie<6;ie++){ne=me[ie].mipmaps;for(let ye=0;ye<ne.length;ye++){const ve=ne[ye];y.format!==kn?Pe!==null?De?F&&t.compressedTexSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,ye,0,0,ve.width,ve.height,Pe,ve.data):t.compressedTexImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,ye,Ie,ve.width,ve.height,0,ve.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):De?F&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,ye,0,0,ve.width,ve.height,Pe,Se,ve.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,ye,Ie,ve.width,ve.height,0,Pe,Se,ve.data)}}}else{if(ne=y.mipmaps,De&&Qe){ne.length>0&&ge++;const ie=Q(me[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,ge,Ie,ie.width,ie.height)}for(let ie=0;ie<6;ie++)if(re){De?F&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,0,0,0,me[ie].width,me[ie].height,Pe,Se,me[ie].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,0,Ie,me[ie].width,me[ie].height,0,Pe,Se,me[ie].data);for(let ye=0;ye<ne.length;ye++){const ke=ne[ye].image[ie].image;De?F&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,ye+1,0,0,ke.width,ke.height,Pe,Se,ke.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,ye+1,Ie,ke.width,ke.height,0,Pe,Se,ke.data)}}else{De?F&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,0,0,0,Pe,Se,me[ie]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,0,Ie,Pe,Se,me[ie]);for(let ye=0;ye<ne.length;ye++){const ve=ne[ye];De?F&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,ye+1,0,0,Pe,Se,ve.image[ie]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ie,ye+1,Ie,Pe,Se,ve.image[ie])}}}m(y)&&p(n.TEXTURE_CUBE_MAP),G.__version=W.version,y.onUpdate&&y.onUpdate(y)}b.__version=y.version}function Me(b,y,N,B,W,G){const ue=s.convert(N.format,N.colorSpace),ae=s.convert(N.type),ce=x(N.internalFormat,ue,ae,N.colorSpace),Ue=i.get(y),re=i.get(N);if(re.__renderTarget=y,!Ue.__hasExternalTextures){const me=Math.max(1,y.width>>G),Te=Math.max(1,y.height>>G);W===n.TEXTURE_3D||W===n.TEXTURE_2D_ARRAY?t.texImage3D(W,G,ce,me,Te,y.depth,0,ue,ae,null):t.texImage2D(W,G,ce,me,Te,0,ue,ae,null)}t.bindFramebuffer(n.FRAMEBUFFER,b),Z(y)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,B,W,re.__webglTexture,0,ee(y)):(W===n.TEXTURE_2D||W>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&W<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,B,W,re.__webglTexture,G),t.bindFramebuffer(n.FRAMEBUFFER,null)}function de(b,y,N){if(n.bindRenderbuffer(n.RENDERBUFFER,b),y.depthBuffer){const B=y.depthTexture,W=B&&B.isDepthTexture?B.type:null,G=v(y.stencilBuffer,W),ue=y.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ae=ee(y);Z(y)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,ae,G,y.width,y.height):N?n.renderbufferStorageMultisample(n.RENDERBUFFER,ae,G,y.width,y.height):n.renderbufferStorage(n.RENDERBUFFER,G,y.width,y.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,ue,n.RENDERBUFFER,b)}else{const B=y.textures;for(let W=0;W<B.length;W++){const G=B[W],ue=s.convert(G.format,G.colorSpace),ae=s.convert(G.type),ce=x(G.internalFormat,ue,ae,G.colorSpace),Ue=ee(y);N&&Z(y)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,Ue,ce,y.width,y.height):Z(y)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Ue,ce,y.width,y.height):n.renderbufferStorage(n.RENDERBUFFER,ce,y.width,y.height)}}n.bindRenderbuffer(n.RENDERBUFFER,null)}function Ce(b,y){if(y&&y.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(n.FRAMEBUFFER,b),!(y.depthTexture&&y.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const B=i.get(y.depthTexture);B.__renderTarget=y,(!B.__webglTexture||y.depthTexture.image.width!==y.width||y.depthTexture.image.height!==y.height)&&(y.depthTexture.image.width=y.width,y.depthTexture.image.height=y.height,y.depthTexture.needsUpdate=!0),J(y.depthTexture,0);const W=B.__webglTexture,G=ee(y);if(y.depthTexture.format===As)Z(y)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,W,0,G):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,W,0);else if(y.depthTexture.format===zs)Z(y)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,W,0,G):n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,W,0);else throw new Error("Unknown depthTexture format")}function Le(b){const y=i.get(b),N=b.isWebGLCubeRenderTarget===!0;if(y.__boundDepthTexture!==b.depthTexture){const B=b.depthTexture;if(y.__depthDisposeCallback&&y.__depthDisposeCallback(),B){const W=()=>{delete y.__boundDepthTexture,delete y.__depthDisposeCallback,B.removeEventListener("dispose",W)};B.addEventListener("dispose",W),y.__depthDisposeCallback=W}y.__boundDepthTexture=B}if(b.depthTexture&&!y.__autoAllocateDepthBuffer){if(N)throw new Error("target.depthTexture not supported in Cube render targets");Ce(y.__webglFramebuffer,b)}else if(N){y.__webglDepthbuffer=[];for(let B=0;B<6;B++)if(t.bindFramebuffer(n.FRAMEBUFFER,y.__webglFramebuffer[B]),y.__webglDepthbuffer[B]===void 0)y.__webglDepthbuffer[B]=n.createRenderbuffer(),de(y.__webglDepthbuffer[B],b,!1);else{const W=b.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,G=y.__webglDepthbuffer[B];n.bindRenderbuffer(n.RENDERBUFFER,G),n.framebufferRenderbuffer(n.FRAMEBUFFER,W,n.RENDERBUFFER,G)}}else if(t.bindFramebuffer(n.FRAMEBUFFER,y.__webglFramebuffer),y.__webglDepthbuffer===void 0)y.__webglDepthbuffer=n.createRenderbuffer(),de(y.__webglDepthbuffer,b,!1);else{const B=b.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,W=y.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,W),n.framebufferRenderbuffer(n.FRAMEBUFFER,B,n.RENDERBUFFER,W)}t.bindFramebuffer(n.FRAMEBUFFER,null)}function Ne(b,y,N){const B=i.get(b);y!==void 0&&Me(B.__webglFramebuffer,b,b.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),N!==void 0&&Le(b)}function it(b){const y=b.texture,N=i.get(b),B=i.get(y);b.addEventListener("dispose",C);const W=b.textures,G=b.isWebGLCubeRenderTarget===!0,ue=W.length>1;if(ue||(B.__webglTexture===void 0&&(B.__webglTexture=n.createTexture()),B.__version=y.version,o.memory.textures++),G){N.__webglFramebuffer=[];for(let ae=0;ae<6;ae++)if(y.mipmaps&&y.mipmaps.length>0){N.__webglFramebuffer[ae]=[];for(let ce=0;ce<y.mipmaps.length;ce++)N.__webglFramebuffer[ae][ce]=n.createFramebuffer()}else N.__webglFramebuffer[ae]=n.createFramebuffer()}else{if(y.mipmaps&&y.mipmaps.length>0){N.__webglFramebuffer=[];for(let ae=0;ae<y.mipmaps.length;ae++)N.__webglFramebuffer[ae]=n.createFramebuffer()}else N.__webglFramebuffer=n.createFramebuffer();if(ue)for(let ae=0,ce=W.length;ae<ce;ae++){const Ue=i.get(W[ae]);Ue.__webglTexture===void 0&&(Ue.__webglTexture=n.createTexture(),o.memory.textures++)}if(b.samples>0&&Z(b)===!1){N.__webglMultisampledFramebuffer=n.createFramebuffer(),N.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,N.__webglMultisampledFramebuffer);for(let ae=0;ae<W.length;ae++){const ce=W[ae];N.__webglColorRenderbuffer[ae]=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,N.__webglColorRenderbuffer[ae]);const Ue=s.convert(ce.format,ce.colorSpace),re=s.convert(ce.type),me=x(ce.internalFormat,Ue,re,ce.colorSpace,b.isXRRenderTarget===!0),Te=ee(b);n.renderbufferStorageMultisample(n.RENDERBUFFER,Te,me,b.width,b.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+ae,n.RENDERBUFFER,N.__webglColorRenderbuffer[ae])}n.bindRenderbuffer(n.RENDERBUFFER,null),b.depthBuffer&&(N.__webglDepthRenderbuffer=n.createRenderbuffer(),de(N.__webglDepthRenderbuffer,b,!0)),t.bindFramebuffer(n.FRAMEBUFFER,null)}}if(G){t.bindTexture(n.TEXTURE_CUBE_MAP,B.__webglTexture),Ee(n.TEXTURE_CUBE_MAP,y);for(let ae=0;ae<6;ae++)if(y.mipmaps&&y.mipmaps.length>0)for(let ce=0;ce<y.mipmaps.length;ce++)Me(N.__webglFramebuffer[ae][ce],b,y,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+ae,ce);else Me(N.__webglFramebuffer[ae],b,y,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+ae,0);m(y)&&p(n.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(ue){for(let ae=0,ce=W.length;ae<ce;ae++){const Ue=W[ae],re=i.get(Ue);t.bindTexture(n.TEXTURE_2D,re.__webglTexture),Ee(n.TEXTURE_2D,Ue),Me(N.__webglFramebuffer,b,Ue,n.COLOR_ATTACHMENT0+ae,n.TEXTURE_2D,0),m(Ue)&&p(n.TEXTURE_2D)}t.unbindTexture()}else{let ae=n.TEXTURE_2D;if((b.isWebGL3DRenderTarget||b.isWebGLArrayRenderTarget)&&(ae=b.isWebGL3DRenderTarget?n.TEXTURE_3D:n.TEXTURE_2D_ARRAY),t.bindTexture(ae,B.__webglTexture),Ee(ae,y),y.mipmaps&&y.mipmaps.length>0)for(let ce=0;ce<y.mipmaps.length;ce++)Me(N.__webglFramebuffer[ce],b,y,n.COLOR_ATTACHMENT0,ae,ce);else Me(N.__webglFramebuffer,b,y,n.COLOR_ATTACHMENT0,ae,0);m(y)&&p(ae),t.unbindTexture()}b.depthBuffer&&Le(b)}function We(b){const y=b.textures;for(let N=0,B=y.length;N<B;N++){const W=y[N];if(m(W)){const G=T(b),ue=i.get(W).__webglTexture;t.bindTexture(G,ue),p(G),t.unbindTexture()}}}const L=[],E=[];function j(b){if(b.samples>0){if(Z(b)===!1){const y=b.textures,N=b.width,B=b.height;let W=n.COLOR_BUFFER_BIT;const G=b.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ue=i.get(b),ae=y.length>1;if(ae)for(let ce=0;ce<y.length;ce++)t.bindFramebuffer(n.FRAMEBUFFER,ue.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+ce,n.RENDERBUFFER,null),t.bindFramebuffer(n.FRAMEBUFFER,ue.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+ce,n.TEXTURE_2D,null,0);t.bindFramebuffer(n.READ_FRAMEBUFFER,ue.__webglMultisampledFramebuffer),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,ue.__webglFramebuffer);for(let ce=0;ce<y.length;ce++){if(b.resolveDepthBuffer&&(b.depthBuffer&&(W|=n.DEPTH_BUFFER_BIT),b.stencilBuffer&&b.resolveStencilBuffer&&(W|=n.STENCIL_BUFFER_BIT)),ae){n.framebufferRenderbuffer(n.READ_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,ue.__webglColorRenderbuffer[ce]);const Ue=i.get(y[ce]).__webglTexture;n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,Ue,0)}n.blitFramebuffer(0,0,N,B,0,0,N,B,W,n.NEAREST),l===!0&&(L.length=0,E.length=0,L.push(n.COLOR_ATTACHMENT0+ce),b.depthBuffer&&b.resolveDepthBuffer===!1&&(L.push(G),E.push(G),n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,E)),n.invalidateFramebuffer(n.READ_FRAMEBUFFER,L))}if(t.bindFramebuffer(n.READ_FRAMEBUFFER,null),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),ae)for(let ce=0;ce<y.length;ce++){t.bindFramebuffer(n.FRAMEBUFFER,ue.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+ce,n.RENDERBUFFER,ue.__webglColorRenderbuffer[ce]);const Ue=i.get(y[ce]).__webglTexture;t.bindFramebuffer(n.FRAMEBUFFER,ue.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+ce,n.TEXTURE_2D,Ue,0)}t.bindFramebuffer(n.DRAW_FRAMEBUFFER,ue.__webglMultisampledFramebuffer)}else if(b.depthBuffer&&b.resolveDepthBuffer===!1&&l){const y=b.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT;n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,[y])}}}function ee(b){return Math.min(r.maxSamples,b.samples)}function Z(b){const y=i.get(b);return b.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&y.__useRenderToTexture!==!1}function q(b){const y=o.render.frame;c.get(b)!==y&&(c.set(b,y),b.update())}function oe(b,y){const N=b.colorSpace,B=b.format,W=b.type;return b.isCompressedTexture===!0||b.isVideoTexture===!0||N!==qs&&N!==Wi&&(qe.getTransfer(N)===nt?(B!==kn||W!==wi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",N)),y}function Q(b){return typeof HTMLImageElement<"u"&&b instanceof HTMLImageElement?(u.width=b.naturalWidth||b.width,u.height=b.naturalHeight||b.height):typeof VideoFrame<"u"&&b instanceof VideoFrame?(u.width=b.displayWidth,u.height=b.displayHeight):(u.width=b.width,u.height=b.height),u}this.allocateTextureUnit=O,this.resetTextureUnits=z,this.setTexture2D=J,this.setTexture2DArray=D,this.setTexture3D=V,this.setTextureCube=U,this.rebindTextures=Ne,this.setupRenderTarget=it,this.updateRenderTargetMipmap=We,this.updateMultisampleRenderTarget=j,this.setupDepthRenderbuffer=Le,this.setupFrameBufferTexture=Me,this.useMultisampledRTT=Z}function xC(n,e){function t(i,r=Wi){let s;const o=qe.getTransfer(r);if(i===wi)return n.UNSIGNED_BYTE;if(i===ch)return n.UNSIGNED_SHORT_4_4_4_4;if(i===uh)return n.UNSIGNED_SHORT_5_5_5_1;if(i===n0)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===e0)return n.BYTE;if(i===t0)return n.SHORT;if(i===Fo)return n.UNSIGNED_SHORT;if(i===lh)return n.INT;if(i===Hr)return n.UNSIGNED_INT;if(i===xi)return n.FLOAT;if(i===Xs)return n.HALF_FLOAT;if(i===i0)return n.ALPHA;if(i===r0)return n.RGB;if(i===kn)return n.RGBA;if(i===s0)return n.LUMINANCE;if(i===o0)return n.LUMINANCE_ALPHA;if(i===As)return n.DEPTH_COMPONENT;if(i===zs)return n.DEPTH_STENCIL;if(i===a0)return n.RED;if(i===fh)return n.RED_INTEGER;if(i===l0)return n.RG;if(i===hh)return n.RG_INTEGER;if(i===dh)return n.RGBA_INTEGER;if(i===Oa||i===Fa||i===Ba||i===ka)if(o===nt)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===Oa)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Fa)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Ba)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===ka)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===Oa)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Fa)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Ba)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===ka)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===Uu||i===Nu||i===Ou||i===Fu)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===Uu)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Nu)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===Ou)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===Fu)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===Bu||i===ku||i===Hu)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===Bu||i===ku)return o===nt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===Hu)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===zu||i===Vu||i===Gu||i===Wu||i===Xu||i===qu||i===Yu||i===$u||i===ju||i===Ku||i===Zu||i===Ju||i===Qu||i===ef)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===zu)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===Vu)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===Gu)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===Wu)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===Xu)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===qu)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===Yu)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===$u)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===ju)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===Ku)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===Zu)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===Ju)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===Qu)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===ef)return o===nt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===Ha||i===tf||i===nf)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===Ha)return o===nt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===tf)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===nf)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===c0||i===rf||i===sf||i===of)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===Ha)return s.COMPRESSED_RED_RGT
vendor: 13,390 bytes, lines 3838-3862
3838C1_EXT;if(i===rf)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===sf)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===of)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Hs?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}class yC extends An{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class uo extends yn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const SC={type:"move"};class Ic{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new uo,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new uo,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new K,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new K),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new uo,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new K,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new K),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&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}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const _ of e.hand.values()){const m=t.getJointPose(_,i),p=this._getHandJoint(u,_);m!==null&&(p.matrix.fromArray(m.transform.matrix),p.matrix.decompose(p.position,p.rotation,p.scale),p.matrixWorldNeedsUpdate=!0,p.jointRadius=m.radius),p.visible=m!==null}const c=u.joints["index-finger-tip"],f=u.joints["thumb-tip"],h=c.position.distanceTo(f.position),d=.02,g=.005;u.inputState.pinching&&h>d+g?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&h<=d-g&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(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));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(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(SC)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new uo;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const MC=` 3839void main() { 3840 3841 gl_Position = vec4( position, 1.0 ); 3842 3843}`,EC=` 3844uniform sampler2DArray depthColor; 3845uniform float depthWidth; 3846uniform float depthHeight; 3847 3848void main() { 3849 3850 vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); 3851 3852 if ( coord.x >= 1.0 ) { 3853 3854 gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; 3855 3856 } else { 3857 3858 gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; 3859 3860 } 3861 3862}`;class TC{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const r=new Kt,s=e.properties.get(r);s.__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(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new ii({vertexShader:MC,fragmentShader:EC,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Hn(new qo(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class bC extends Ys{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,u=null,c=null,f=null,h=null,d=null,g=null;const _=new TC,m=t.getContextAttributes();let p=null,T=null;const x=[],v=[],A=new Je;let w=null;const C=new An;C.viewport=new yt;const P=new An;P.viewport=new yt;const S=[C,P],M=new yC;let I=null,z=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(te){let le=x[te];return le===void 0&&(le=new Ic,x[te]=le),le.getTargetRaySpace()},this.getControllerGrip=function(te){let le=x[te];return le===void 0&&(le=new Ic,x[te]=le),le.getGripSpace()},this.getHand=function(te){let le=x[te];return le===void 0&&(le=new Ic,x[te]=le),le.getHandSpace()};function O(te){const le=v.indexOf(te.inputSource);if(le===-1)return;const Me=x[le];Me!==void 0&&(Me.update(te.inputSource,te.frame,u||o),Me.dispatchEvent({type:te.type,data:te.inputSource}))}function X(){r.removeEventListener("select",O),r.removeEventListener("selectstart",O),r.removeEventListener("selectend",O),r.removeEventListener("squeeze",O),r.removeEventListener("squeezestart",O),r.removeEventListener("squeezeend",O),r.removeEventListener("end",X),r.removeEventListener("inputsourceschange",J);for(let te=0;te<x.length;te++){const le=v[te];le!==null&&(v[te]=null,x[te].disconnect(le))}I=null,z=null,_.reset(),e.setRenderTarget(p),d=null,h=null,f=null,r=null,T=null,Ge.stop(),i.isPresenting=!1,e.setPixelRatio(w),e.setSize(A.width,A.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(te){s=te,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(te){a=te,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(te){u=te},this.getBaseLayer=function(){return h!==null?h:d},this.getBinding=function(){return f},this.getFrame=function(){return g},this.getSession=function(){return r},this.setSession=async function(te){if(r=te,r!==null){if(p=e.getRenderTarget(),r.addEventListener("select",O),r.addEventListener("selectstart",O),r.addEventListener("selectend",O),r.addEventListener("squeeze",O),r.addEventListener("squeezestart",O),r.addEventListener("squeezeend",O),r.addEventListener("end",X),r.addEventListener("inputsourceschange",J),m.xrCompatible!==!0&&await t.makeXRCompatible(),w=e.getPixelRatio(),e.getSize(A),r.renderState.layers===void 0){const le={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:s};d=new XRWebGLLayer(r,t,le),r.updateRenderState({baseLayer:d}),e.setPixelRatio(1),e.setSize(d.framebufferWidth,d.framebufferHeight,!1),T=new ir(d.framebufferWidth,d.framebufferHeight,{format:kn,type:wi,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil})}else{let le=null,Me=null,de=null;m.depth&&(de=m.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,le=m.stencil?zs:As,Me=m.stencil?Hs:Hr);const Ce={colorFormat:t.RGBA8,depthFormat:de,scaleFactor:s};f=new XRWebGLBinding(r,t),h=f.createProjectionLayer(Ce),r.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),T=new ir(h.textureWidth,h.textureHeight,{format:kn,type:wi,depthTexture:new b0(h.textureWidth,h.textureHeight,Me,void 0,void 0,void 0,void 0,void 0,void 0,le),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:h.ignoreDepthValues===!1})}T.isXRRenderTarget=!0,this.setFoveation(l),u=null,o=await r.requestReferenceSpace(a),Ge.setContext(r),Ge.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};function J(te){for(let le=0;le<te.removed.length;le++){const Me=te.removed[le],de=v.indexOf(Me);de>=0&&(v[de]=null,x[de].disconnect(Me))}for(let le=0;le<te.added.length;le++){const Me=te.added[le];let de=v.indexOf(Me);if(de===-1){for(let Le=0;Le<x.length;Le++)if(Le>=v.length){v.push(Me),de=Le;break}else if(v[Le]===null){v[Le]=Me,de=Le;break}if(de===-1)break}const Ce=x[de];Ce&&Ce.connect(Me)}}const D=new K,V=new K;function U(te,le,Me){D.setFromMatrixPosition(le.matrixWorld),V.setFromMatrixPosition(Me.matrixWorld);const de=D.distanceTo(V),Ce=le.projectionMatrix.elements,Le=Me.projectionMatrix.elements,Ne=Ce[14]/(Ce[10]-1),it=Ce[14]/(Ce[10]+1),We=(Ce[9]+1)/Ce[5],L=(Ce[9]-1)/Ce[5],E=(Ce[8]-1)/Ce[0],j=(Le[8]+1)/Le[0],ee=Ne*E,Z=Ne*j,q=de/(-E+j),oe=q*-E;if(le.matrixWorld.decompose(te.position,te.quaternion,te.scale),te.translateX(oe),te.translateZ(q),te.matrixWorld.compose(te.position,te.quaternion,te.scale),te.matrixWorldInverse.copy(te.matrixWorld).invert(),Ce[10]===-1)te.projectionMatrix.copy(le.projectionMatrix),te.projectionMatrixInverse.copy(le.projectionMatrixInverse);else{const Q=Ne+q,b=it+q,y=ee-oe,N=Z+(de-oe),B=We*it/b*Q,W=L*it/b*Q;te.projectionMatrix.makePerspective(y,N,B,W,Q,b),te.projectionMatrixInverse.copy(te.projectionMatrix).invert()}}function se(te,le){le===null?te.matrixWorld.copy(te.matrix):te.matrixWorld.multiplyMatrices(le.matrixWorld,te.matrix),te.matrixWorldInverse.copy(te.matrixWorld).invert()}this.updateCamera=function(te){if(r===null)return;let le=te.near,Me=te.far;_.texture!==null&&(_.depthNear>0&&(le=_.depthNear),_.depthFar>0&&(Me=_.depthFar)),M.near=P.near=C.near=le,M.far=P.far=C.far=Me,(I!==M.near||z!==M.far)&&(r.updateRenderState({depthNear:M.near,depthFar:M.far}),I=M.near,z=M.far),C.layers.mask=te.layers.mask|2,P.layers.mask=te.layers.mask|4,M.layers.mask=C.layers.mask|P.layers.mask;const de=te.parent,Ce=M.cameras;se(M,de);for(let Le=0;Le<Ce.length;Le++)se(Ce[Le],de);Ce.length===2?U(M,C,P):M.projectionMatrix.copy(C.projectionMatrix),fe(te,M,de)};function fe(te,le,Me){Me===null?te.matrix.copy(le.matrixWorld):(te.matrix.copy(Me.matrixWorld),te.matrix.invert(),te.matrix.multiply(le.matrixWorld)),te.matrix.decompose(te.position,te.quaternion,te.scale),te.updateMatrixWorld(!0),te.projectionMatrix.copy(le.projectionMatrix),te.projectionMatrixInverse.copy(le.projectionMatrixInverse),te.isPerspectiveCamera&&(te.fov=Bo*2*Math.atan(1/te.projectionMatrix.elements[5]),te.zoom=1)}this.getCamera=function(){return M},this.getFoveation=function(){if(!(h===null&&d===null))return l},this.setFoveation=function(te){l=te,h!==null&&(h.fixedFoveation=te),d!==null&&d.fixedFoveation!==void 0&&(d.fixedFoveation=te)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(M)};let pe=null;function Ee(te,le){if(c=le.getViewerPose(u||o),g=le,c!==null){const Me=c.views;d!==null&&(e.setRenderTargetFramebuffer(T,d.framebuffer),e.setRenderTarget(T));let de=!1;Me.length!==M.cameras.length&&(M.cameras.length=0,de=!0);for(let Le=0;Le<Me.length;Le++){const Ne=Me[Le];let it=null;if(d!==null)it=d.getViewport(Ne);else{const L=f.getViewSubImage(h,Ne);it=L.viewport,Le===0&&(e.setRenderTargetTextures(T,L.colorTexture,h.ignoreDepthValues?void 0:L.depthStencilTexture),e.setRenderTarget(T))}let We=S[Le];We===void 0&&(We=new An,We.layers.enable(Le),We.viewport=new yt,S[Le]=We),We.matrix.fromArray(Ne.transform.matrix),We.matrix.decompose(We.position,We.quaternion,We.scale),We.projectionMatrix.fromArray(Ne.projectionMatrix),We.projectionMatrixInverse.copy(We.projectionMatrix).invert(),We.viewport.set(it.x,it.y,it.width,it.height),Le===0&&(M.matrix.copy(We.matrix),M.matrix.decompose(M.position,M.quaternion,M.scale)),de===!0&&M.cameras.push(We)}const Ce=r.enabledFeatures;if(Ce&&Ce.includes("depth-sensing")){const Le=f.getDepthInformation(Me[0]);Le&&Le.isValid&&Le.texture&&_.init(e,Le,r.renderState)}}for(let Me=0;Me<x.length;Me++){const de=v[Me],Ce=x[Me];de!==null&&Ce!==void 0&&Ce.update(de,le,u||o)}pe&&pe(te,le),le.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:le}),g=null}const Ge=new E0;Ge.setAnimationLoop(Ee),this.setAnimationLoop=function(te){pe=te},this.dispose=function(){}}}const xr=new Ai,wC=new Tt;function AC(n,e){function t(m,p){m.matrixAutoUpdate===!0&&m.updateMatrix(),p.value.copy(m.matrix)}function i(m,p){p.color.getRGB(m.fogColor.value,v0(n)),p.isFog?(m.fogNear.value=p.near,m.fogFar.value=p.far):p.isFogExp2&&(m.fogDensity.value=p.density)}function r(m,p,T,x,v){p.isMeshBasicMaterial||p.isMeshLambertMaterial?s(m,p):p.isMeshToonMaterial?(s(m,p),f(m,p)):p.isMeshPhongMaterial?(s(m,p),c(m,p)):p.isMeshStandardMaterial?(s(m,p),h(m,p),p.isMeshPhysicalMaterial&&d(m,p,v)):p.isMeshMat
vendor: 40,142 bytes, line 3862
3862capMaterial?(s(m,p),g(m,p)):p.isMeshDepthMaterial?s(m,p):p.isMeshDistanceMaterial?(s(m,p),_(m,p)):p.isMeshNormalMaterial?s(m,p):p.isLineBasicMaterial?(o(m,p),p.isLineDashedMaterial&&a(m,p)):p.isPointsMaterial?l(m,p,T,x):p.isSpriteMaterial?u(m,p):p.isShadowMaterial?(m.color.value.copy(p.color),m.opacity.value=p.opacity):p.isShaderMaterial&&(p.uniformsNeedUpdate=!1)}function s(m,p){m.opacity.value=p.opacity,p.color&&m.diffuse.value.copy(p.color),p.emissive&&m.emissive.value.copy(p.emissive).multiplyScalar(p.emissiveIntensity),p.map&&(m.map.value=p.map,t(p.map,m.mapTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,t(p.alphaMap,m.alphaMapTransform)),p.bumpMap&&(m.bumpMap.value=p.bumpMap,t(p.bumpMap,m.bumpMapTransform),m.bumpScale.value=p.bumpScale,p.side===on&&(m.bumpScale.value*=-1)),p.normalMap&&(m.normalMap.value=p.normalMap,t(p.normalMap,m.normalMapTransform),m.normalScale.value.copy(p.normalScale),p.side===on&&m.normalScale.value.negate()),p.displacementMap&&(m.displacementMap.value=p.displacementMap,t(p.displacementMap,m.displacementMapTransform),m.displacementScale.value=p.displacementScale,m.displacementBias.value=p.displacementBias),p.emissiveMap&&(m.emissiveMap.value=p.emissiveMap,t(p.emissiveMap,m.emissiveMapTransform)),p.specularMap&&(m.specularMap.value=p.specularMap,t(p.specularMap,m.specularMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest);const T=e.get(p),x=T.envMap,v=T.envMapRotation;x&&(m.envMap.value=x,xr.copy(v),xr.x*=-1,xr.y*=-1,xr.z*=-1,x.isCubeTexture&&x.isRenderTargetTexture===!1&&(xr.y*=-1,xr.z*=-1),m.envMapRotation.value.setFromMatrix4(wC.makeRotationFromEuler(xr)),m.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=p.reflectivity,m.ior.value=p.ior,m.refractionRatio.value=p.refractionRatio),p.lightMap&&(m.lightMap.value=p.lightMap,m.lightMapIntensity.value=p.lightMapIntensity,t(p.lightMap,m.lightMapTransform)),p.aoMap&&(m.aoMap.value=p.aoMap,m.aoMapIntensity.value=p.aoMapIntensity,t(p.aoMap,m.aoMapTransform))}function o(m,p){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,p.map&&(m.map.value=p.map,t(p.map,m.mapTransform))}function a(m,p){m.dashSize.value=p.dashSize,m.totalSize.value=p.dashSize+p.gapSize,m.scale.value=p.scale}function l(m,p,T,x){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,m.size.value=p.size*T,m.scale.value=x*.5,p.map&&(m.map.value=p.map,t(p.map,m.uvTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,t(p.alphaMap,m.alphaMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest)}function u(m,p){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,m.rotation.value=p.rotation,p.map&&(m.map.value=p.map,t(p.map,m.mapTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,t(p.alphaMap,m.alphaMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest)}function c(m,p){m.specular.value.copy(p.specular),m.shininess.value=Math.max(p.shininess,1e-4)}function f(m,p){p.gradientMap&&(m.gradientMap.value=p.gradientMap)}function h(m,p){m.metalness.value=p.metalness,p.metalnessMap&&(m.metalnessMap.value=p.metalnessMap,t(p.metalnessMap,m.metalnessMapTransform)),m.roughness.value=p.roughness,p.roughnessMap&&(m.roughnessMap.value=p.roughnessMap,t(p.roughnessMap,m.roughnessMapTransform)),p.envMap&&(m.envMapIntensity.value=p.envMapIntensity)}function d(m,p,T){m.ior.value=p.ior,p.sheen>0&&(m.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen),m.sheenRoughness.value=p.sheenRoughness,p.sheenColorMap&&(m.sheenColorMap.value=p.sheenColorMap,t(p.sheenColorMap,m.sheenColorMapTransform)),p.sheenRoughnessMap&&(m.sheenRoughnessMap.value=p.sheenRoughnessMap,t(p.sheenRoughnessMap,m.sheenRoughnessMapTransform))),p.clearcoat>0&&(m.clearcoat.value=p.clearcoat,m.clearcoatRoughness.value=p.clearcoatRoughness,p.clearcoatMap&&(m.clearcoatMap.value=p.clearcoatMap,t(p.clearcoatMap,m.clearcoatMapTransform)),p.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=p.clearcoatRoughnessMap,t(p.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),p.clearcoatNormalMap&&(m.clearcoatNormalMap.value=p.clearcoatNormalMap,t(p.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(p.clearcoatNormalScale),p.side===on&&m.clearcoatNormalScale.value.negate())),p.dispersion>0&&(m.dispersion.value=p.dispersion),p.iridescence>0&&(m.iridescence.value=p.iridescence,m.iridescenceIOR.value=p.iridescenceIOR,m.iridescenceThicknessMinimum.value=p.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=p.iridescenceThicknessRange[1],p.iridescenceMap&&(m.iridescenceMap.value=p.iridescenceMap,t(p.iridescenceMap,m.iridescenceMapTransform)),p.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=p.iridescenceThicknessMap,t(p.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),p.transmission>0&&(m.transmission.value=p.transmission,m.transmissionSamplerMap.value=T.texture,m.transmissionSamplerSize.value.set(T.width,T.height),p.transmissionMap&&(m.transmissionMap.value=p.transmissionMap,t(p.transmissionMap,m.transmissionMapTransform)),m.thickness.value=p.thickness,p.thicknessMap&&(m.thicknessMap.value=p.thicknessMap,t(p.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=p.attenuationDistance,m.attenuationColor.value.copy(p.attenuationColor)),p.anisotropy>0&&(m.anisotropyVector.value.set(p.anisotropy*Math.cos(p.anisotropyRotation),p.anisotropy*Math.sin(p.anisotropyRotation)),p.anisotropyMap&&(m.anisotropyMap.value=p.anisotropyMap,t(p.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=p.specularIntensity,m.specularColor.value.copy(p.specularColor),p.specularColorMap&&(m.specularColorMap.value=p.specularColorMap,t(p.specularColorMap,m.specularColorMapTransform)),p.specularIntensityMap&&(m.specularIntensityMap.value=p.specularIntensityMap,t(p.specularIntensityMap,m.specularIntensityMapTransform))}function g(m,p){p.matcap&&(m.matcap.value=p.matcap)}function _(m,p){const T=e.get(p).light;m.referencePosition.value.setFromMatrixPosition(T.matrixWorld),m.nearDistance.value=T.shadow.camera.near,m.farDistance.value=T.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function RC(n,e,t,i){let r={},s={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function l(T,x){const v=x.program;i.uniformBlockBinding(T,v)}function u(T,x){let v=r[T.id];v===void 0&&(g(T),v=c(T),r[T.id]=v,T.addEventListener("dispose",m));const A=x.program;i.updateUBOMapping(T,A);const w=e.render.frame;s[T.id]!==w&&(h(T),s[T.id]=w)}function c(T){const x=f();T.__bindingPointIndex=x;const v=n.createBuffer(),A=T.__size,w=T.usage;return n.bindBuffer(n.UNIFORM_BUFFER,v),n.bufferData(n.UNIFORM_BUFFER,A,w),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,x,v),v}function f(){for(let T=0;T<a;T++)if(o.indexOf(T)===-1)return o.push(T),T;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function h(T){const x=r[T.id],v=T.uniforms,A=T.__cache;n.bindBuffer(n.UNIFORM_BUFFER,x);for(let w=0,C=v.length;w<C;w++){const P=Array.isArray(v[w])?v[w]:[v[w]];for(let S=0,M=P.length;S<M;S++){const I=P[S];if(d(I,w,S,A)===!0){const z=I.__offset,O=Array.isArray(I.value)?I.value:[I.value];let X=0;for(let J=0;J<O.length;J++){const D=O[J],V=_(D);typeof D=="number"||typeof D=="boolean"?(I.__data[0]=D,n.bufferSubData(n.UNIFORM_BUFFER,z+X,I.__data)):D.isMatrix3?(I.__data[0]=D.elements[0],I.__data[1]=D.elements[1],I.__data[2]=D.elements[2],I.__data[3]=0,I.__data[4]=D.elements[3],I.__data[5]=D.elements[4],I.__data[6]=D.elements[5],I.__data[7]=0,I.__data[8]=D.elements[6],I.__data[9]=D.elements[7],I.__data[10]=D.elements[8],I.__data[11]=0):(D.toArray(I.__data,X),X+=V.storage/Float32Array.BYTES_PER_ELEMENT)}n.bufferSubData(n.UNIFORM_BUFFER,z,I.__data)}}}n.bindBuffer(n.UNIFORM_BUFFER,null)}function d(T,x,v,A){const w=T.value,C=x+"_"+v;if(A[C]===void 0)return typeof w=="number"||typeof w=="boolean"?A[C]=w:A[C]=w.clone(),!0;{const P=A[C];if(typeof w=="number"||typeof w=="boolean"){if(P!==w)return A[C]=w,!0}else if(P.equals(w)===!1)return P.copy(w),!0}return!1}function g(T){const x=T.uniforms;let v=0;const A=16;for(let C=0,P=x.length;C<P;C++){const S=Array.isArray(x[C])?x[C]:[x[C]];for(let M=0,I=S.length;M<I;M++){const z=S[M],O=Array.isArray(z.value)?z.value:[z.value];for(let X=0,J=O.length;X<J;X++){const D=O[X],V=_(D),U=v%A,se=U%V.boundary,fe=U+se;v+=se,fe!==0&&A-fe<V.storage&&(v+=A-fe),z.__data=new Float32Array(V.storage/Float32Array.BYTES_PER_ELEMENT),z.__offset=v,v+=V.storage}}}const w=v%A;return w>0&&(v+=A-w),T.__size=v,T.__cache={},this}function _(T){const x={boundary:0,storage:0};return typeof T=="number"||typeof T=="boolean"?(x.boundary=4,x.storage=4):T.isVector2?(x.boundary=8,x.storage=8):T.isVector3||T.isColor?(x.boundary=16,x.storage=12):T.isVector4?(x.boundary=16,x.storage=16):T.isMatrix3?(x.boundary=48,x.storage=48):T.isMatrix4?(x.boundary=64,x.storage=64):T.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",T),x}function m(T){const x=T.target;x.removeEventListener("dispose",m);const v=o.indexOf(x.__bindingPointIndex);o.splice(v,1),n.deleteBuffer(r[x.id]),delete r[x.id],delete s[x.id]}function p(){for(const T in r)n.deleteBuffer(r[T]);o=[],r={},s={}}return{bind:l,update:u,dispose:p}}class CC{constructor(e={}){const{canvas:t=gb(),context:i=null,depth:r=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:f=!1,reverseDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let d;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");d=i.getContextAttributes().alpha}else d=o;const g=new Uint32Array(4),_=new Int32Array(4);let m=null,p=null;const T=[],x=[];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=pn,this.toneMapping=Zi,this.toneMappingExposure=1;const v=this;let A=!1,w=0,C=0,P=null,S=-1,M=null;const I=new yt,z=new yt;let O=null;const X=new tt(0);let J=0,D=t.width,V=t.height,U=1,se=null,fe=null;const pe=new yt(0,0,D,V),Ee=new yt(0,0,D,V);let Ge=!1;const te=new M0;let le=!1,Me=!1;const de=new Tt,Ce=new Tt,Le=new K,Ne=new yt,it={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let We=!1;function L(){return P===null?U:1}let E=i;function j(R,k){return t.getContext(R,k)}try{const R={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:u,powerPreference:c,failIfMajorPerformanceCaveat:f};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${ah}`),t.addEventListener("webglcontextlost",ie,!1),t.addEventListener("webglcontextrestored",ye,!1),t.addEventListener("webglcontextcreationerror",ve,!1),E===null){const k="webgl2";if(E=j(k,R),E===null)throw j(k)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(R){throw console.error("THREE.WebGLRenderer: "+R.message),R}let ee,Z,q,oe,Q,b,y,N,B,W,G,ue,ae,ce,Ue,re,me,Te,Pe,Se,Ie,De,Qe,F;function ge(){ee=new U1(E),ee.init(),De=new xC(E,ee),Z=new R1(E,ee,e,De),q=new _C(E,ee),Z.reverseDepthBuffer&&h&&q.buffers.depth.setReversed(!0),oe=new F1(E),Q=new tC,b=new vC(E,ee,q,Q,Z,De,oe),y=new P1(v),N=new I1(v),B=new Wb(E),Qe=new w1(E,B),W=new N1(E,B,oe,Qe),G=new k1(E,W,B,oe),Pe=new B1(E,Z,b),re=new C1(Q),ue=new eC(v,y,N,ee,Z,Qe,re),ae=new AC(v,Q),ce=new iC,Ue=new cC(ee),Te=new b1(v,y,N,q,G,d,l),me=new pC(v,G,Z),F=new RC(E,oe,Z,q),Se=new A1(E,ee,oe),Ie=new O1(E,ee,oe),oe.programs=ue.programs,v.capabilities=Z,v.extensions=ee,v.properties=Q,v.renderLists=ce,v.shadowMap=me,v.state=q,v.info=oe}ge();const ne=new bC(v,E);this.xr=ne,this.getContext=function(){return E},this.getContextAttributes=function(){return E.getContextAttributes()},this.forceContextLoss=function(){const R=ee.get("WEBGL_lose_context");R&&R.loseContext()},this.forceContextRestore=function(){const R=ee.get("WEBGL_lose_context");R&&R.restoreContext()},this.getPixelRatio=function(){return U},this.setPixelRatio=function(R){R!==void 0&&(U=R,this.setSize(D,V,!1))},this.getSize=function(R){return R.set(D,V)},this.setSize=function(R,k,Y=!0){if(ne.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}D=R,V=k,t.width=Math.floor(R*U),t.height=Math.floor(k*U),Y===!0&&(t.style.width=R+"px",t.style.height=k+"px"),this.setViewport(0,0,R,k)},this.getDrawingBufferSize=function(R){return R.set(D*U,V*U).floor()},this.setDrawingBufferSize=function(R,k,Y){D=R,V=k,U=Y,t.width=Math.floor(R*Y),t.height=Math.floor(k*Y),this.setViewport(0,0,R,k)},this.getCurrentViewport=function(R){return R.copy(I)},this.getViewport=function(R){return R.copy(pe)},this.setViewport=function(R,k,Y,$){R.isVector4?pe.set(R.x,R.y,R.z,R.w):pe.set(R,k,Y,$),q.viewport(I.copy(pe).multiplyScalar(U).round())},this.getScissor=function(R){return R.copy(Ee)},this.setScissor=function(R,k,Y,$){R.isVector4?Ee.set(R.x,R.y,R.z,R.w):Ee.set(R,k,Y,$),q.scissor(z.copy(Ee).multiplyScalar(U).round())},this.getScissorTest=function(){return Ge},this.setScissorTest=function(R){q.setScissorTest(Ge=R)},this.setOpaqueSort=function(R){se=R},this.setTransparentSort=function(R){fe=R},this.getClearColor=function(R){return R.copy(Te.getClearColor())},this.setClearColor=function(){Te.setClearColor.apply(Te,arguments)},this.getClearAlpha=function(){return Te.getClearAlpha()},this.setClearAlpha=function(){Te.setClearAlpha.apply(Te,arguments)},this.clear=function(R=!0,k=!0,Y=!0){let $=0;if(R){let H=!1;if(P!==null){const he=P.texture.format;H=he===dh||he===hh||he===fh}if(H){const he=P.texture.type,xe=he===wi||he===Hr||he===Fo||he===Hs||he===ch||he===uh,be=Te.getClearColor(),we=Te.getClearAlpha(),Fe=be.r,He=be.g,Ae=be.b;xe?(g[0]=Fe,g[1]=He,g[2]=Ae,g[3]=we,E.clearBufferuiv(E.COLOR,0,g)):(_[0]=Fe,_[1]=He,_[2]=Ae,_[3]=we,E.clearBufferiv(E.COLOR,0,_))}else $|=E.COLOR_BUFFER_BIT}k&&($|=E.DEPTH_BUFFER_BIT),Y&&($|=E.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),E.clear($)},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",ie,!1),t.removeEventListener("webglcontextrestored",ye,!1),t.removeEventListener("webglcontextcreationerror",ve,!1),ce.dispose(),Ue.dispose(),Q.dispose(),y.dispose(),N.dispose(),G.dispose(),Qe.dispose(),F.dispose(),ue.dispose(),ne.dispose(),ne.removeEventListener("sessionstart",vh),ne.removeEventListener("sessionend",xh),cr.stop()};function ie(R){R.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),A=!0}function ye(){console.log("THREE.WebGLRenderer: Context Restored."),A=!1;const R=oe.autoReset,k=me.enabled,Y=me.autoUpdate,$=me.needsUpdate,H=me.type;ge(),oe.autoReset=R,me.enabled=k,me.autoUpdate=Y,me.needsUpdate=$,me.type=H}function ve(R){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",R.statusMessage)}function ke(R){const k=R.target;k.removeEventListener("dispose",ke),mt(k)}function mt(R){Ut(R),Q.remove(R)}function Ut(R){const k=Q.get(R).programs;k!==void 0&&(k.forEach(function(Y){ue.releaseProgram(Y)}),R.isShaderMaterial&&ue.releaseShaderCache(R))}this.renderBufferDirect=function(R,k,Y,$,H,he){k===null&&(k=it);const xe=H.isMesh&&H.matrixWorld.determinant()<0,be=D0(R,k,Y,$,H);q.setMaterial($,xe);let we=Y.index,Fe=1;if($.wireframe===!0){if(we=W.getWireframeAttribute(Y),we===void 0)return;Fe=2}const He=Y.drawRange,Ae=Y.attributes.position;let Ye=He.start*Fe,st=(He.start+He.count)*Fe;he!==null&&(Ye=Math.max(Ye,he.start*Fe),st=Math.min(st,(he.start+he.count)*Fe)),we!==null?(Ye=Math.max(Ye,0),st=Math.min(st,we.count)):Ae!=null&&(Ye=Math.max(Ye,0),st=Math.min(st,Ae.count));const ct=st-Ye;if(ct<0||ct===1/0)return;Qe.setup(H,$,be,Y,we);let Zt,je=Se;if(we!==null&&(Zt=B.get(we),je=Ie,je.setIndex(Zt)),H.isMesh)$.wireframe===!0?(q.setLineWidth($.wireframeLinewidth*L()),je.setMode(E.LINES)):je.setMode(E.TRIANGLES);else if(H.isLine){let Re=$.linewidth;Re===void 0&&(Re=1),q.setLineWidth(Re*L()),H.isLineSegments?je.setMode(E.LINES):H.isLineLoop?je.setMode(E.LINE_LOOP):je.setMode(E.LINE_STRIP)}else H.isPoints?je.setMode(E.POINTS):H.isSprite&&je.setMode(E.TRIANGLES);if(H.isBatchedMesh)if(H._multiDrawInstances!==null)je.renderMultiDrawInstances(H._multiDrawStarts,H._multiDrawCounts,H._multiDrawCount,H._multiDrawInstances);else if(ee.get("WEBGL_multi_draw"))je.renderMultiDraw(H._multiDrawStarts,H._multiDrawCounts,H._multiDrawCount);else{const Re=H._multiDrawStarts,si=H._multiDrawCounts,Ke=H._multiDrawCount,Un=we?B.get(we).bytesPerElement:1,Gr=Q.get($).currentProgram.getUniforms();for(let ln=0;ln<Ke;ln++)Gr.setValue(E,"_gl_DrawID",ln),je.render(Re[ln]/Un,si[ln])}else if(H.isInstancedMesh)je.renderInstances(Ye,ct,H.count);else if(Y.isInstancedBufferGeometry){const Re=Y._maxInstanceCount!==void 0?Y._maxInstanceCount:1/0,si=Math.min(Y.instanceCount,Re);je.renderInstances(Ye,ct,si)}else je.render(Ye,ct)};function et(R,k,Y){R.transparent===!0&&R.side===gi&&R.forceSinglePass===!1?(R.side=on,R.needsUpdate=!0,$o(R,k,Y),R.side=nr,R.needsUpdate=!0,$o(R,k,Y),R.side=gi):$o(R,k,Y)}this.compile=function(R,k,Y=null){Y===null&&(Y=R),p=Ue.get(Y),p.init(k),x.push(p),Y.traverseVisible(function(H){H.isLight&&H.layers.test(k.layers)&&(p.pushLight(H),H.castShadow&&p.pushShadow(H))}),R!==Y&&R.traverseVisible(function(H){H.isLight&&H.layers.test(k.layers)&&(p.pushLight(H),H.castShadow&&p.pushShadow(H))}),p.setupLights();const $=new Set;return R.traverse(function(H){if(!(H.isMesh||H.isPoints||H.isLine||H.isSprite))return;const he=H.material;if(he)if(Array.isArray(he))for(let xe=0;xe<he.length;xe++){const be=he[xe];et(be,Y,H),$.add(be)}else et(he,Y,H),$.add(he)}),x.pop(),p=null,$},this.compileAsync=function(R,k,Y=null){const $=this.compile(R,k,Y);return new Promise(H=>{function he(){if($.forEach(function(xe){Q.get(xe).currentProgram.isReady()&&$.delete(xe)}),$.size===0){H(R);return}setTimeout(he,10)}ee.get("KHR_parallel_shader_compile")!==null?he():setTimeout(he,10)})};let In=null;function ri(R){In&&In(R)}function vh(){cr.stop()}function xh(){cr.start()}const cr=new E0;cr.setAnimationLoop(ri),typeof self<"u"&&cr.setContext(self),this.setAnimationLoop=function(R){In=R,ne.setAnimationLoop(R),R===null?cr.stop():cr.start()},ne.addEventListener("sessionstart",vh),ne.addEventListener("sessionend",xh),this.render=function(R,k){if(k!==void 0&&k.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(A===!0)return;if(R.matrixWorldAutoUpdate===!0&&R.updateMatrixWorld(),k.parent===null&&k.matrixWorldAutoUpdate===!0&&k.updateMatrixWorld(),ne.enabled===!0&&ne.isPresenting===!0&&(ne.cameraAutoUpdate===!0&&ne.updateCamera(k),k=ne.getCamera()),R.isScene===!0&&R.onBeforeRender(v,R,k,P),p=Ue.get(R,x.length),p.init(k),x.push(p),Ce.multiplyMatrices(k.projectionMatrix,k.matrixWorldInverse),te.setFromProjectionMatrix(Ce),Me=this.localClippingEnabled,le=re.init(this.clippingPlanes,Me),m=ce.get(R,T.length),m.init(),T.push(m),ne.enabled===!0&&ne.isPresenting===!0){const he=v.xr.getDepthSensingMesh();he!==null&&Ll(he,k,-1/0,v.sortObjects)}Ll(R,k,0,v.sortObjects),m.finish(),v.sortObjects===!0&&m.sort(se,fe),We=ne.enabled===!1||ne.isPresenting===!1||ne.hasDepthSensing()===!1,We&&Te.addToRenderList(m,R),this.info.render.frame++,le===!0&&re.beginShadows();const Y=p.state.shadowsArray;me.render(Y,R,k),le===!0&&re.endShadows(),this.info.autoReset===!0&&this.info.reset();const $=m.opaque,H=m.transmissive;if(p.setupLights(),k.isArrayCamera){const he=k.cameras;if(H.length>0)for(let xe=0,be=he.length;xe<be;xe++){const we=he[xe];Sh($,H,R,we)}We&&Te.render(R);for(let xe=0,be=he.length;xe<be;xe++){const we=he[xe];yh(m,R,we,we.viewport)}}else H.length>0&&Sh($,H,R,k),We&&Te.render(R),yh(m,R,k);P!==null&&(b.updateMultisampleRenderTarget(P),b.updateRenderTargetMipmap(P)),R.isScene===!0&&R.onAfterRender(v,R,k),Qe.resetDefaultState(),S=-1,M=null,x.pop(),x.length>0?(p=x[x.length-1],le===!0&&re.setGlobalState(v.clippingPlanes,p.state.camera)):p=null,T.pop(),T.length>0?m=T[T.length-1]:m=null};function Ll(R,k,Y,$){if(R.visible===!1)return;if(R.layers.test(k.layers)){if(R.isGroup)Y=R.renderOrder;else if(R.isLOD)R.autoUpdate===!0&&R.update(k);else if(R.isLight)p.pushLight(R),R.castShadow&&p.pushShadow(R);else if(R.isSprite){if(!R.frustumCulled||te.intersectsSprite(R)){$&&Ne.setFromMatrixPosition(R.matrixWorld).applyMatrix4(Ce);const xe=G.update(R),be=R.material;be.visible&&m.push(R,xe,be,Y,Ne.z,null)}}else if((R.isMesh||R.isLine||R.isPoints)&&(!R.frustumCulled||te.intersectsObject(R))){const xe=G.update(R),be=R.material;if($&&(R.boundingSphere!==void 0?(R.boundingSphere===null&&R.computeBoundingSphere(),Ne.copy(R.boundingSphere.center)):(xe.boundingSphere===null&&xe.computeBoundingSphere(),Ne.copy(xe.boundingSphere.center)),Ne.applyMatrix4(R.matrixWorld).applyMatrix4(Ce)),Array.isArray(be)){const we=xe.groups;for(let Fe=0,He=we.length;Fe<He;Fe++){const Ae=we[Fe],Ye=be[Ae.materialIndex];Ye&&Ye.visible&&m.push(R,xe,Ye,Y,Ne.z,Ae)}}else be.visible&&m.push(R,xe,be,Y,Ne.z,null)}}const he=R.children;for(let xe=0,be=he.length;xe<be;xe++)Ll(he[xe],k,Y,$)}function yh(R,k,Y,$){const H=R.opaque,he=R.transmissive,xe=R.transparent;p.setupLightsView(Y),le===!0&&re.setGlobalState(v.clippingPlanes,Y),$&&q.viewport(I.copy($)),H.length>0&&Yo(H,k,Y),he.length>0&&Yo(he,k,Y),xe.length>0&&Yo(xe,k,Y),q.buffers.depth.setTest(!0),q.buffers.depth.setMask(!0),q.buffers.color.setMask(!0),q.setPolygonOffset(!1)}function Sh(R,k,Y,$){if((Y.isScene===!0?Y.overrideMaterial:null)!==null)return;p.state.transmissionRenderTarget[$.id]===void 0&&(p.state.transmissionRenderTarget[$.id]=new ir(1,1,{generateMipmaps:!0,type:ee.has("EXT_color_buffer_half_float")||ee.has("EXT_color_buffer_float")?Xs:wi,minFilter:Cr,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:qe.workingColorSpace}));const he=p.state.transmissionRenderTarget[$.id],xe=$.viewport||I;he.setSize(xe.z,xe.w);const be=v.getRenderTarget();v.setRenderTarget(he),v.getClearColor(X),J=v.getClearAlpha(),J<1&&v.setClearColor(16777215,.5),v.clear(),We&&Te.render(Y);const we=v.toneMapping;v.toneMapping=Zi;const Fe=$.viewport;if($.viewport!==void 0&&($.viewport=void 0),p.setupLightsView($),le===!0&&re.setGlobalState(v.clippingPlanes,$),Yo(R,Y,$),b.updateMultisampleRenderTarget(he),b.updateRenderTargetMipmap(he),ee.has("WEBGL_multisampled_render_to_texture")===!1){let He=!1;for(let Ae=0,Ye=k.length;Ae<Ye;Ae++){const st=k[Ae],ct=st.object,Zt=st.geometry,je=st.material,Re=st.group;if(je.side===gi&&ct.layers.test($.layers)){const si=je.side;je.side=on,je.needsUpdate=!0,Mh(ct,Y,$,Zt,je,Re),je.side=si,je.needsUpdate=!0,He=!0}}He===!0&&(b.updateMultisampleRenderTarget(he),b.updateRenderTargetMipmap(he))}v.setRenderTarget(be),v.setClearColor(X,J),Fe!==void 0&&($.viewport=Fe),v.toneMapping=we}function Yo(R,k,Y){const $=k.isScene===!0?k.overrideMaterial:null;for(let H=0,he=R.length;H<he;H++){const xe=R[H],be=xe.object,we=xe.geometry,Fe=$===null?xe.material:$,He=xe.group;be.layers.test(Y.layers)&&Mh(be,k,Y,we,Fe,He)}}function Mh(R,k,Y,$,H,he){R.onBeforeRender(v,k,Y,$,H,he),R.modelViewMatrix.multiplyMatrices(Y.matrixWorldInverse,R.matrixWorld),R.normalMatrix.getNormalMatrix(R.modelViewMatrix),H.onBeforeRender(v,k,Y,$,R,he),H.transparent===!0&&H.side===gi&&H.forceSinglePass===!1?(H.side=on,H.needsUpdate=!0,v.renderBufferDirect(Y,k,$,H,R,he),H.side=nr,H.needsUpdate=!0,v.renderBufferDirect(Y,k,$,H,R,he),H.side=gi):v.renderBufferDirect(Y,k,$,H,R,he),R.onAfterRender(v,k,Y,$,H,he)}function $o(R,k,Y){k.isScene!==!0&&(k=it);const $=Q.get(R),H=p.state.lights,he=p.state.shadowsArray,xe=H.state.version,be=ue.getParameters(R,H.state,he,k,Y),we=ue.getProgramCacheKey(be);let Fe=$.programs;$.environment=R.isMeshStandardMaterial?k.environment:null,$.fog=k.fog,$.envMap=(R.isMeshStandardMaterial?N:y).get(R.envMap||$.environment),$.envMapRotation=$.environment!==null&&R.envMap===null?k.environmentRotation:R.envMapRotation,Fe===void 0&&(R.addEventListener("dispose",ke),Fe=new Map,$.programs=Fe);let He=Fe.get(we);if(He!==void 0){if($.currentProgram===He&&$.lightsStateVersion===xe)return Th(R,be),He}else be.uniforms=ue.getUniforms(R),R.onBeforeCompile(be,v),He=ue.acquireProgram(be,we),Fe.set(we,He),$.uniforms=be.uniforms;const Ae=$.uniforms;return(!R.isShaderMaterial&&!R.isRawShaderMaterial||R.clipping===!0)&&(Ae.clippingPlanes=re.uniform),Th(R,be),$.needsLights=I0(R),$.lightsStateVersion=xe,$.needsLights&&(Ae.ambientLightColor.value=H.state.ambient,Ae.lightProbe.value=H.state.probe,Ae.directionalLights.value=H.state.directional,Ae.directionalLightShadows.value=H.state.directionalShadow,Ae.spotLights.value=H.state.spot,Ae.spotLightShadows.value=H.state.spotShadow,Ae.rectAreaLights.value=H.state.rectArea,Ae.ltc_1.value=H.state.rectAreaLTC1,Ae.ltc_2.value=H.state.rectAreaLTC2,Ae.pointLights.value=H.state.point,Ae.pointLightShadows.value=H.state.pointShadow,Ae.hemisphereLights.value=H.state.hemi,Ae.directionalShadowMap.value=H.state.directionalShadowMap,Ae.directionalShadowMatrix.value=H.state.directionalShadowMatrix,Ae.spotShadowMap.value=H.state.spotShadowMap,Ae.spotLightMatrix.value=H.state.spotLightMatrix,Ae.spotLightMap.value=H.state.spotLightMap,Ae.pointShadowMap.value=H.state.pointShadowMap,Ae.pointShadowMatrix.value=H.state.pointShadowMatrix),$.currentProgram=He,$.uniformsList=null,He}function Eh(R){if(R.uniformsList===null){const k=R.currentProgram.getUniforms();R.uniformsList=za.seqWithValue(k.seq,R.uniforms)}return R.uniformsList}function Th(R,k){const Y=Q.get(R);Y.outputColorSpace=k.outputColorSpace,Y.batching=k.batching,Y.batchingColor=k.batchingColor,Y.instancing=k.instancing,Y.instancingColor=k.instancingColor,Y.instancingMorph=k.instancingMorph,Y.skinning=k.skinning,Y.morphTargets=k.morphTargets,Y.morphNormals=k.morphNormals,Y.morphColors=k.morphColors,Y.morphTargetsCount=k.morphTargetsCount,Y.numClippingPlanes=k.numClippingPlanes,Y.numIntersection=k.numClipIntersection,Y.vertexAlphas=k.vertexAlphas,Y.vertexTangents=k.vertexTangents,Y.toneMapping=k.toneMapping}function D0(R,k,Y,$,H){k.isScene!==!0&&(k=it),b.resetTextureUnits();const he=k.fog,xe=$.isMeshStandardMaterial?k.environment:null,be=P===null?v.outputColorSpace:P.isXRRenderTarget===!0?P.texture.colorSpace:qs,we=($.isMeshStandardMaterial?N:y).get($.envMap||xe),Fe=$.vertexColors===!0&&!!Y.attributes.color&&Y.attributes.color.itemSize===4,He=!!Y.attributes.tangent&&(!!$.normalMap||$.anisotropy>0),Ae=!!Y.morphAttributes.position,Ye=!!Y.morphAttributes.normal,st=!!Y.morphAttributes.color;let ct=Zi;$.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(ct=v.toneMapping);const Zt=Y.morphAttributes.position||Y.morphAttributes.normal||Y.morphAttributes.color,je=Zt!==void 0?Zt.length:0,Re=Q.get($),si=p.state.lights;if(le===!0&&(Me===!0||R!==M)){const Mn=R===M&&$.id===S;re.setState($,R,Mn)}let Ke=!1;$.version===Re.__version?(Re.needsLights&&Re.lightsStateVersion!==si.state.version||Re.outputColorSpace!==be||H.isBatchedMesh&&Re.batching===!1||!H.isBatchedMesh&&Re.batching===!0||H.isBatchedMesh&&Re.batchingColor===!0&&H.colorTexture===null||H.isBatchedMesh&&Re.batchingColor===!1&&H.colorTexture!==null||H.isInstancedMesh&&Re.instancing===!1||!H.isInstancedMesh&&Re.instancing===!0||H.isSkinnedMesh&&Re.skinning===!1||!H.isSkinnedMesh&&Re.skinning===!0||H.isInstancedMesh&&Re.instancingColor===!0&&H.instanceColor===null||H.isInstancedMesh&&Re.instancingColor===!1&&H.instanceColor!==null||H.isInstancedMesh&&Re.instancingMorph===!0&&H.morphTexture===null||H.isInstancedMesh&&Re.instancingMorph===!1&&H.morphTexture!==null||Re.envMap!==we||$.fog===!0&&Re.fog!==he||Re.numClippingPlanes!==void 0&&(Re.numClippingPlanes!==re.numPlanes||Re.numIntersection!==re.numIntersection)||Re.vertexAlphas!==Fe||Re.vertexTangents!==He||Re.morphTargets!==Ae||Re.morphNormals!==Ye||Re.morphColors!==st||Re.toneMapping!==ct||Re.morphTargetsCount!==je)&&(Ke=!0):(Ke=!0,Re.__version=$.version);let Un=Re.currentProgram;Ke===!0&&(Un=$o($,k,H));let Gr=!1,ln=!1,Ks=!1;const ut=Un.getUniforms(),Wn=Re.uniforms;if(q.useProgram(Un.program)&&(Gr=!0,ln=!0,Ks=!0),$.id!==S&&(S=$.id,ln=!0),Gr||M!==R){q.buffers.depth.getReversed()?(de.copy(R.projectionMatrix),xb(de),yb(de),ut.setValue(E,"projectionMatrix",de)):ut.setValue(E,"projectionMatrix",R.projectionMatrix),ut.setValue(E,"viewMatrix",R.matrixWorldInverse);const Pi=ut.map.cameraPosition;Pi!==void 0&&Pi.setValue(E,Le.setFromMatrixPosition(R.matrixWorld)),Z.logarithmicDepthBuffer&&ut.setValue(E,"logDepthBufFC",2/(Math.log(R.far+1)/Math.LN2)),($.isMeshPhongMaterial||$.isMeshToonMaterial||$.isMeshLambertMaterial||$.isMeshBasicMaterial||$.isMeshStandardMaterial||$.isShaderMaterial)&&ut.setValue(E,"isOrthographic",R.isOrthographicCamera===!0),M!==R&&(M=R,ln=!0,Ks=!0)}if(H.isSkinnedMesh){ut.setOptional(E,H,"bindMatrix"),ut.setOptional(E,H,"bindMatrixInverse");const Mn=H.skeleton;Mn&&(Mn.boneTexture===null&&Mn.computeBoneTexture(),ut.setValue(E,"boneTexture",Mn.boneTexture,b))}H.isBatchedMesh&&(ut.setOptional(E,H,"batchingTexture"),ut.setValue(E,"batchingTexture",H._matricesTexture,b),ut.setOptional(E,H,"batchingIdTexture"),ut.setValue(E,"batchingIdTexture",H._indirectTexture,b),ut.setOptional(E,H,"batchingColorTexture"),H._colorsTexture!==null&&ut.setValue(E,"batchingColorTexture",H._colorsTexture,b));const Zs=Y.morphAttributes;if((Zs.position!==void 0||Zs.normal!==void 0||Zs.color!==void 0)&&Pe.update(H,Y,Un),(ln||Re.receiveShadow!==H.receiveShadow)&&(Re.receiveShadow=H.receiveShadow,ut.setValue(E,"receiveShadow",H.receiveShadow)),$.isMeshGouraudMaterial&&$.envMap!==null&&(Wn.envMap.value=we,Wn.flipEnvMap.value=we.isCubeTexture&&we.isRenderTargetTexture===!1?-1:1),$.isMeshStandardMaterial&&$.envMap===null&&k.environment!==null&&(Wn.envMapIntensity.value=k.environmentIntensity),ln&&(ut.setValue(E,"toneMappingExposure",v.toneMappingExposure),Re.needsLights&&L0(Wn,Ks),he&&$.fog===!0&&ae.refreshFogUniforms(Wn,he),ae.refreshMaterialUniforms(Wn,$,U,V,p.state.transmissionRenderTarget[R.id]),za.upload(E,Eh(Re),Wn,b)),$.isShaderMaterial&&$.uniformsNeedUpdate===!0&&(za.upload(E,Eh(Re),Wn,b),$.uniformsNeedUpdate=!1),$.isSpriteMaterial&&ut.setValue(E,"center",H.center),ut.setValue(E,"modelViewMatrix",H.modelViewMatrix),ut.setValue(E,"normalMatrix",H.normalMatrix),ut.setValue(E,"modelMatrix",H.matrixWorld),$.isShaderMaterial||$.isRawShaderMaterial){const Mn=$.uniformsGroups;for(let Pi=0,Di=Mn.length;Pi<Di;Pi++){const bh=Mn[Pi];F.update(bh,Un),F.bind(bh,Un)}}return Un}function L0(R,k){R.ambientLightColor.needsUpdate=k,R.lightProbe.needsUpdate=k,R.directionalLights.needsUpdate=k,R.directionalLightShadows.needsUpdate=k,R.pointLights.needsUpdate=k,R.pointLightShadows.needsUpdate=k,R.spotLights.needsUpdate=k,R.spotLightShadows.needsUpdate=k,R.rectAreaLights.needsUpdate=k,R.hemisphereLights.needsUpdate=k}function I0(R){return R.isMeshLambertMaterial||R.isMeshToonMaterial||R.isMeshPhongMaterial||R.isMeshStandardMaterial||R.isShadowMaterial||R.isShaderMaterial&&R.lights===!0}this.getActiveCubeFace=function(){return w},this.getActiveMipmapLevel=function(){return C},this.getRenderTarget=function(){return P},this.setRenderTargetTextures=function(R,k,Y){Q.get(R.texture).__webglTexture=k,Q.get(R.depthTexture).__webglTexture=Y;const $=Q.get(R);$.__hasExternalTextures=!0,$.__autoAllocateDepthBuffer=Y===void 0,$.__autoAllocateDepthBuffer||ee.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),$.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(R,k){const Y=Q.get(R);Y.__webglFramebuffer=k,Y.__useDefaultFramebuffer=k===void 0},this.setRenderTarget=function(R,k=0,Y=0){P=R,w=k,C=Y;let $=!0,H=null,he=!1,xe=!1;if(R){const we=Q.get(R);if(we.__useDefaultFramebuffer!==void 0)q.bindFramebuffer(E.FRAMEBUFFER,null),$=!1;else if(we.__webglFramebuffer===void 0)b.setupRenderTarget(R);else if(we.__hasExternalTextures)b.rebindTextures(R,Q.get(R.texture).__webglTexture,Q.get(R.depthTexture).__webglTexture);else if(R.depthBuffer){const Ae=R.depthTexture;if(we.__boundDepthTexture!==Ae){if(Ae!==null&&Q.has(Ae)&&(R.width!==Ae.image.width||R.height!==Ae.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");b.setupDepthRenderbuffer(R)}}const Fe=R.texture;(Fe.isData3DTexture||Fe.isDataArrayTexture||Fe.isCompressedArrayTexture)&&(xe=!0);const He=Q.get(R).__webglFramebuffer;R.isWebGLCubeRenderTarget?(Array.isArray(He[k])?H=He[k][Y]:H=He[k],he=!0):R.samples>0&&b.useMultisampledRTT(R)===!1?H=Q.get(R).__webglMultisampledFramebuffer:Array.isArray(He)?H=He[Y]:H=He,I.copy(R.viewport),z.copy(R.scissor),O=R.scissorTest}else I.copy(pe).multiplyScalar(U).floor(),z.copy(Ee).multiplyScalar(U).floor(),O=Ge;if(q.bindFramebuffer(E.FRAMEBUFFER,H)&&$&&q.drawBuffers(R,H),q.viewport(I),q.scissor(z),q.setScissorTest(O),he){const we=Q.get(R.texture);E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_CUBE_MAP_POSITIVE_X+k,we.__webglTexture,Y)}else if(xe){const we=Q.get(R.texture),Fe=k||0;E.framebufferTextureLayer(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,we.__webglTexture,Y||0,Fe)}S=-1},this.readRenderTargetPixels=function(R,k,Y,$,H,he,xe){if(!(R&&R.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let be=Q.get(R).__webglFramebuffer;if(R.isWebGLCubeRenderTarget&&xe!==void 0&&(be=be[xe]),be){q.bindFramebuffer(E.FRAMEBUFFER,be);try{const we=R.texture,Fe=we.format,He=we.type;if(!Z.textureFormatReadable(Fe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Z.textureTypeReadable(He)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}k>=0&&k<=R.width-$&&Y>=0&&Y<=R.height-H&&E.readPixels(k,Y,$,H,De.convert(Fe),De.convert(He),he)}finally{const we=P!==null?Q.get(P).__webglFramebuffer:null;q.bindFramebuffer(E.FRAMEBUFFER,we)}}},this.readRenderTargetPixelsAsync=async function(R,k,Y,$,H,he,xe){if(!(R&&R.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let be=Q.get(R).__webglFramebuffer;if(R.isWebGLCubeRenderTarget&&xe!==void 0&&(be=be[xe]),be){const we=R.texture,Fe=we.format,He=we.type;if(!Z.textureFormatReadable(Fe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Z.textureTypeReadable(He))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(k>=0&&k<=R.width-$&&Y>=0&&Y<=R.height-H){q.bindFramebuffer(E.FRAMEBUFFER,be);const Ae=E.createBuffer();E.bindBuffer(E.PIXEL_PACK_BUFFER,Ae),E.bufferData(E.PIXEL_PACK_BUFFER,he.byteLength,E.STREAM_READ),E.readPixels(k,Y,$,H,De.convert(Fe),De.convert(He),0);const Ye=P!==null?Q.get(P).__webglFramebuffer:null;q.bindFramebuffer(E.FRAMEBUFFER,Ye);const st=E.fenceSync(E.SYNC_GPU_COMMANDS_COMPLETE,0);return E.flush(),await vb(E,st,4),E.bindBuffer(E.PIXEL_PACK_BUFFER,Ae),E.getBufferSubData(E.PIXEL_PACK_BUFFER,0,he),E.deleteBuffer(Ae),E.deleteSync(st),he}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(R,k=null,Y=0){R.isTexture!==!0&&(lo("WebGLRenderer: copyFramebufferToTexture function signature has changed."),k=arguments[0]||null,R=arguments[1]);const $=Math.pow(2,-Y),H=Math.floor(R.image.width*$),he=Math.floor(R.image.height*$),xe=k!==null?k.x:0,be=k!==null?k.y:0;b.setTexture2D(R,0),E.copyTexSubImage2D(E.TEXTURE_2D,Y,0,0,xe,be,H,he),q.unbindTexture()},this.copyTextureToTexture=function(R,k,Y=null,$=null,H=0){R.isTexture!==!0&&(lo("WebGLRenderer: copyTextureToTexture function signature has changed."),$=arguments[0]||null,R=arguments[1],k=arguments[2],H=arguments[3]||0,Y=null);let he,xe,be,we,Fe,He,Ae,Ye,st;const ct=R.isCompressedTexture?R.mipmaps[H]:R.image;Y!==null?(he=Y.max.x-Y.min.x,xe=Y.max.y-Y.min.y,be=Y.isBox3?Y.max.z-Y.min.z:1,we=Y.min.x,Fe=Y.min.y,He=Y.isBox3?Y.min.z:0):(he=ct.width,xe=ct.height,be=ct.depth||1,we=0,Fe=0,He=0),$!==null?(Ae=$.x,Ye=$.y,st=$.z):(Ae=0,Ye=0,st=0);const Zt=De.convert(k.format),je=De.convert(k.type);let Re;k.isData3DTexture?(b.setTexture3D(k,0),Re=E.TEXTURE_3D):k.isDataArrayTexture||k.isCompressedArrayTexture?(b.setTexture2DArray(k,0),Re=E.TEXTURE_2D_ARRAY):(b.setTexture2D(k,0),Re=E.TEXTURE_2D),E.pixelStorei(E.UNPACK_FLIP_Y_WEBGL,k.flipY),E.pixelStorei(E.UNPACK_PREMULTIPLY_ALPHA_WEBGL,k.premultiplyAlpha),E.pixelStorei(E.UNPACK_ALIGNMENT,k.unpackAlignment);const si=E.getParameter(E.UNPACK_ROW_LENGTH),Ke=E.getParameter(E.UNPACK_IMAGE_HEIGHT),Un=E.getParameter(E.UNPACK_SKIP_PIXELS),Gr=E.getParameter(E.UNPACK_SKIP_ROWS),ln=E.getParameter(E.UNPACK_SKIP_IMAGES);E.pixelStorei(E.UNPACK_ROW_LENGTH,ct.width),E.pixelStorei(E.UNPACK_IMAGE_HEIGHT,ct.height),E.pixelStorei(E.UNPACK_SKIP_PIXELS,we),E.pixelStorei(E.UNPACK_SKIP_ROWS,Fe),E.pixelStorei(E.UNPACK_SKIP_IMAGES,He);const Ks=R.isDataArrayTexture||R.isData3DTexture,ut=k.isDataArrayTexture||k.isData3DTexture;if(R.isRenderTargetTexture||R.isDepthTexture){const Wn=Q.get(R),Zs=Q.get(k),Mn=Q.get(Wn.__renderTarget),Pi=Q.get(Zs.__renderTarget);q.bindFramebuffer(E.READ_FRAMEBUFFER,Mn.__webglFramebuffer),q.bindFramebuffer(E.DRAW_FRAMEBUFFER,Pi.__webglFramebuffer);for(let Di=0;Di<be;Di++)Ks&&E.framebufferTextureLayer(E.READ_FRAMEBUFFER,E.COLOR_ATTACHMENT0,Q.get(R).__webglTexture,H,He+Di),R.isDepthTexture?(ut&&E.framebufferTextureLayer(E.DRAW_FRAMEBUFFER,E.COLOR_ATTACHMENT0,Q.get(k).__webglTexture,H,st+Di),E.blitFramebuffer(we,Fe,he,xe,Ae,Ye,he,xe,E.DEPTH_BUFFER_BIT,E.NEAREST)):ut?E.copyTexSubImage3D(Re,H,Ae,Ye,st+Di,we,Fe,he,xe):E.copyTexSubImage2D(Re,H,Ae,Ye,st+Di,we,Fe,he,xe);q.bindFramebuffer(E.READ_FRAMEBUFFER,null),q.bindFramebuffer(E.DRAW_FRAMEBUFFER,null)}else ut?R.isDataTexture||R.isData3DTexture?E.texSubImage3D(Re,H,Ae,Ye,st,he,xe,be,Zt,je,ct.data):k.isCompressedArrayTexture?E.compressedTexSubImage3D(Re,H,Ae,Ye,st,he,xe,be,Zt,ct.data):E.texSubImage3D(Re,H,Ae,Ye,st,he,xe,be,Zt,je,ct):R.isDataTexture?E.texSubImage2D(E.TEXTURE_2D,H,Ae,Ye,he,xe,Zt,je,ct.data):R.isCompressedTexture?E.compressedTexSubImage2D(E.TEXTURE_2D,H,Ae,Ye,ct.width,ct.height,Zt,ct.data):E.texSubImage2D(E.TEXTURE_2D,H,Ae,Ye,he,xe,Zt,je,ct);E.pixelStorei(E.UNPACK_ROW_LENGTH,si),E.pixelStorei(E.UNPACK_IMAGE_HEIGHT,Ke),E.pixelStorei(E.UNPACK_SKIP_PIXELS,Un),E.pixelStorei(E.UNPACK_SKIP_ROWS,Gr),E.pixelStorei(E.UNPACK_SKIP_IMAGES,ln),H===0&&k.generateMipmaps&&E.generateMipmap(Re),q.unbindTexture()},this.copyTextureToTexture3D=function(R,k,Y=null,$=null,H=0){return R.isTexture!==!0&&(lo("WebGLRenderer: copyTextureToTexture3D function signature has changed."),Y=arguments[0]||null,$=arguments[1]||null,R=arguments[2],k=arguments[3],H=arguments[4]||0),lo('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(R,k,Y,$,H)},this.initRenderTarget=function(R){Q.get(R).__webglFramebuffer===void 0&&b.setupRenderTarget(R)},this.initTexture=function(R){R.isCubeTexture?b.setTextureCube(R,0):R.isData3DTexture?b.setTexture3D(R,0):R.isDataArrayTexture||R.isCompressedArrayTexture?b.setTexture2DArray(R,0):b.setTexture2D(R,0),q.unbindTexture()},this.resetState=function(){w=0,C=0,P=null,q.reset(),Qe.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return yi}get outputColorSpace(){return this._outputColorSpace}
vendor: 9,870 bytes, lines 3862-3906
3862set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorspace=qe._getDrawingBufferColorSpace(e),t.unpackColorSpace=qe._getUnpackColorSpace()}}class PC extends yn{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 Ai,this.environmentIntensity=1,this.environmentRotation=new Ai,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(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),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class DC extends Kt{constructor(e,t,i,r,s,o,a,l,u){super(e,t,i,r,s,o,a,l,u),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:en,this.magFilter=s!==void 0?s:en,this.generateMipmaps=!1;const c=this;function f(){c.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class P0{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=zp(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=zp();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function zp(){return performance.now()}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:ah}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=ah);const LC={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:` 3863 3864 varying vec2 vUv; 3865 3866 void main() { 3867 3868 vUv = uv; 3869 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 3870 3871 }`,fragmentShader:` 3872 3873 uniform float opacity; 3874 3875 uniform sampler2D tDiffuse; 3876 3877 varying vec2 vUv; 3878 3879 void main() { 3880 3881 vec4 texel = texture2D( tDiffuse, vUv ); 3882 gl_FragColor = opacity * texel; 3883 3884 3885 }`};class Dl{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const IC=new T0(-1,1,1,-1,0,1);class UC extends lr{constructor(){super(),this.setAttribute("position",new Ei([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new Ei([0,2,0,0,2,0],2))}}const NC=new UC;class OC{constructor(e){this._mesh=new Hn(NC,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,IC)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class lf extends Dl{constructor(e,t){super(),this.textureID=t!==void 0?t:"tDiffuse",e instanceof ii?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=x0.clone(e.uniforms),this.material=new ii({name:e.name!==void 0?e.name:"unspecified",defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new OC(this.material)}render(e,t,i){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=i.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class Vp extends Dl{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,i){const r=e.getContext(),s=e.state;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0);let o,a;this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),e.setRenderTarget(i),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class FC extends Dl{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class BC{constructor(e,t){if(this.renderer=e,this._pixelRatio=e.getPixelRatio(),t===void 0){const i=e.getSize(new Je);this._width=i.width,this._height=i.height,t=new ir(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:Xs}),t.texture.name="EffectComposer.rt1"}else this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new lf(LC),this.copyPass.material.blending=Si,this.clock=new P0}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);t!==-1&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){e===void 0&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let i=!1;for(let r=0,s=this.passes.length;r<s;r++){const o=this.passes[r];if(o.enabled!==!1){if(o.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(r),o.render(this.renderer,this.writeBuffer,this.readBuffer,e,i),o.needsSwap){if(i){const a=this.renderer.getContext(),l=this.renderer.state.buffers.stencil;l.setFunc(a.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),l.setFunc(a.EQUAL,1,4294967295)}this.swapBuffers()}Vp!==void 0&&(o instanceof Vp?i=!0:o instanceof FC&&(i=!1))}}this.renderer.setRenderTarget(t)}reset(e){if(e===void 0){const t=this.renderer.getSize(new Je);this._pixelRatio=this.renderer.getPixelRatio(),this._width=t.width,this._height=t.height,e=this.renderTarget1.clone(),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const i=this._width*this._pixelRatio,r=this._height*this._pixelRatio;this.renderTarget1.setSize(i,r),this.renderTarget2.setSize(i,r);for(let s=0;s<this.passes.length;s++)this.passes[s].setSize(i,r)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class kC extends Dl{constructor(e,t,i=null,r=null,s=null){super(),this.scene=e,this.camera=t,this.overrideMaterial=i,this.clearColor=r,this.clearAlpha=s,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new tt}render(e,t,i){const r=e.autoClear;e.autoClear=!1;let s,o;this.overrideMaterial!==null&&(o=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor!==null&&(e.getClearColor(this._oldClearColor),e.setClearColor(this.clearColor,e.getClearAlpha())),this.clearAlpha!==null&&(s=e.getClearAlpha(),e.setClearAlpha(this.clearAlpha)),this.clearDepth==!0&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:i),this.clear===!0&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor!==null&&e.setClearColor(this._oldClearColor),this.clearAlpha!==null&&e.setClearAlpha(s),this.overrideMaterial!==null&&(this.scene.overrideMaterial=o),e.autoClear=r}}const HC={name:"GammaCorrectionShader",uniforms:{tDiffuse:{value:null}},vertexShader:` 3886 3887 varying vec2 vUv; 3888 3889 void main() { 3890 3891 vUv = uv; 3892 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 3893 3894 }`,fragmentShader:` 3895 3896 uniform sampler2D tDiffuse; 3897 3898 varying vec2 vUv; 3899 3900 void main() { 3901 3902 vec4 tex = texture2D( tDiffuse, vUv ); 3903 3904 gl_FragColor = sRGBTransferOETF( tex ); 3905 3906 }`},zC=(n,e)=>new Promise((t,i)=>{const r=document.createElement("video");
3906r.src=n,r.muted=!0,r.playsInline=!0,r.crossOrigin="anonymous",r.loop=!0,r.addEventListener("loadeddata",()=>{r.play();const s=VC(r);e(1),t(s)}),r.addEventListener("error",s=>{e(0),i(`Erreur lors du chargement de la vidéo: ${n}`)})}),VC=n=>{const e=new DC(n);return e.minFilter=en,e.magFilter=en,e.colorSpace=pn,e},GC=async(n,e)=>{const t=[];let i=0;const r=s=>{i+=s;const o=i/n.length*100;e(o)};for(const s of n)try{const o=await zC(s,a=>r(a));t.push(o)}catch(o){console.error(o),r(0)}return t},as=["/videos/alcara-1.mp4","/videos/binge-1.mp4","/videos/binge-2.mp4","/videos/bm-1.mp4","/videos/bm-2.mp4","/videos/bm-3.mp4","/videos/cartier-ww2.mp4","/videos/cartier365.mp4","/videos/cartier-ww1.mp4","/videos/ferrand-1.mp4","/videos/ferrand-2.mp4","/videos/ferrand-3.mp4","/videos/idemia-1.mp4","/videos/jpg-1.mp4","/videos/jpg-2.mp4","/videos/nausea-1.mp4","/videos/nausea-2.mp4","/videos/nico-1.mp4","/videos/pr-1.mp4","/videos/pr-2.mp4","/videos/pr-3.mp4","/videos/retro1.mp4","/videos/retro2.mp4","/videos/rn3-2.mp4"],Gp=16,Wp=9,ba=4,ro=6,WC=5,XC=4,qC=Math.PI/6,YC=Math.PI/-12,$C=-15,jC=.05,KC=.05;var ZC=`varying vec2 vUv; 3907 3908void main() 3909{ 3910 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 3911 3912 vUv = uv; 3913}`,JC=`uniform sampler2D tDiffuse; 3914uniform vec2 uResolution; 3915 3916varying vec2 vUv; 3917 3918void main() 3919{ 3920 vec4 color = texture2D(tDiffuse, vUv); 3921 float dist = distance(vUv, vec2(0.5, 0.5)); 3922 float vignetteFactor = smoothstep(0.65, 0.15, dist); 3923 3924 3925 vec4 vignette = vec4(vec3(1.0, 1.0, 1.0), vignetteFactor); 3926 vec4 finalColor = color * vignette; 3927 gl_FragColor = finalColor; 3928}`;const QC={__name:"Webgl",props:["onUpdateLoading"],setup(n){const e=Pn(null),t={uniforms:{uResolution:{value:new Je},tDiffuse:{value:null}},vertexShader:ZC,fragmentShader:JC};return Af(()=>{for(let D=as.length-1;D>0;D--){const V=Math.floor(Math.random()*(D+1));[as[D],as[V]]=[as[V],as[D]]}const i=document.querySelector(".webgl-experience canvas"),r={width:e.value.offsetWidth,height:e.value.offsetHeight};let s=!1,o=0,a=0,l=0,u=0,c=!1;const f=new PC,h=new An(75,r.width/r.height,.1,100);h.position.x=0,h.position.y=0,h.position.z=20,f.add(h);const d=new CC({canvas:i});d.setSize(r.width,r.height),d.setPixelRatio(Math.min(window.devicePixelRatio,2)),d.setClearAlpha(0);const g=new BC(d);g.setSize(r.width,r.height),g.setPixelRatio(Math.min(window.devicePixelRatio,2));const _=new kC(f,h);g.addPass(_);const m=new lf(t);m.material.uniforms.uResolution.value.set(r.width,r.height),m.material.needsUpdate=!0,g.addPass(m);const p=new lf(HC);g.addPass(p);const T=new P0,x=new qo(Gp,Wp,1,1),v=new uo,A=Gp+WC,w=Wp+XC,C=ro*A,P=ba*w;GC(as,D=>{n.onUpdateLoading(D.toFixed())}).then(D=>{for(let V=0;V<ba;V++)for(let U=0;U<ro;U++){const se=V*ro+U,fe=new _h({toneMapped:!1,map:D[se]});fe.map.encoding=void 0,fe.needsUpdate=!0,fe.transparent=!0,fe.opacity=0;const pe=new Hn(x,fe);v.add(pe)}f.add(v),M(),S()}).catch(D=>{console.error("some videos failed to load",D)});const S=()=>{const D=v.children,V=Na.timeline({onComplete:()=>{c=!0}});V.to(D[0].material,{opacity:1,duration:.5,ease:"power1.out"},0),V.from(D[0].position,{z:-40,duration:1.2,ease:"power2.out"},.3),V.from(D[0].rotation,{x:Math.PI/2,y:-Math.PI/8,duration:2,ease:"power2.out"},.3),V.to(D[6].material,{opacity:1,duration:.8,ease:"power1.out"},.9),V.from(D[6].position,{z:-40,duration:1.2,ease:"power2.out"},.9),V.from(D[6].rotation,{x:Math.PI/2,y:-Math.PI/8,duration:2,ease:"power2.out"},.9),V.to(D[18].material,{opacity:1,duration:.8,ease:"power1.out"},1.1),V.from(D[18].position,{z:-40,duration:1.2,ease:"power2.out"},1.1),V.from(D[18].rotation,{x:Math.PI/2,y:-Math.PI/8,duration:2,ease:"power2.out"},1.1),V.to(D[5].material,{opacity:1,duration:.8,ease:"power1.out"},.8),V.from(D[5].position,{z:-40,duration:1.2,ease:"power2.out"},.8),V.from(D[5].rotation,{x:Math.PI/2,y:-Math.PI/8,duration:2,ease:"power2.out"},.8),V.to(D[1].material,{opacity:1,duration:.8,ease:"power1.out"},1),V.from(D[1].position,{z:-40,duration:1.2,ease:"power2.out"},1),V.from(D[1].rotation,{x:Math.PI/2,y:-Math.PI/8,duration:2,ease:"power2.out"},1),V.to([D[2].material,D[3].material,D[4].material,D[7].material,D[8].material,D[9].material,D[10].material,D[11].material,D[12].material,D[13].material,D[14].material,D[15].material,D[16].material,D[17].material,D[19].material,D[20].material,D[21].material,D[22].material,D[23].material],{opacity:1,duration:1.5,ease:"power1.out"},2.25)},M=()=>
3928{if(v.children.length===0)return;let D=0;const V=h.position.x,U=h.position.y;for(let se=0;se<ba;se++)for(let fe=0;fe<ro;fe++){const pe=v.children[D++];let Ee=pe.position.x||fe*A,Ge=pe.position.y||se*w;const te=Ee-V,le=Ge-U;te<-C/2&&(Ee+=C),te>C/2&&(Ee-=C),le<-P/2&&(Ge+=P),le>P/2&&(Ge-=P),pe.position.set(Ee,Ge,0);const Me=(Ee-V)/A,de=(Ge-U)/w,Ce=-(Me/((ro-1)/2))*qC,Le=-(de/((ba-1)/2))*YC;pe.rotation.y=Ce,pe.rotation.x=Le;const Ne=Math.abs(Le)+Math.abs(Ce);pe.position.z=-Ne*$C}},I=D=>{c&&(s=!0,o=D.clientX,a=D.clientY)},z=D=>{if(!s)return;const V=D.clientX-o,U=D.clientY-a;l-=V*jC,u+=U*KC,o=D.clientX,a=D.clientY},O=()=>{s=!1},X=()=>{r.width=e.value.offsetWidth,r.height=e.value.offsetHeight,h.aspect=r.width/r.height,h.updateProjectionMatrix(),d.setSize(r.width,r.height),g.setSize(r.width,r.height)},J=()=>{T.getElapsedTime(),h.position.x=jd.lerp(h.position.x,l,.1),h.position.y=jd.lerp(h.position.y,u,.1),c&&M(),d.render(f,h),g.render()};X(),Na.ticker.add(J),i.addEventListener("pointerdown",I),window.addEventListener("pointermove",z),window.addEventListener("pointerup",O),window.addEventListener("resize",X)}),yl(()=>{Na.ticker.remove(onTick),canvas.removeEventListener("pointerdown",onPointerDown),window.removeEventListener("pointermove",onPointerMove),window.removeEventListener("pointerup",onPointerUp),window.removeEventListener("resize",onResize)}),(i,r)=>(Jt(),Ao("div",{ref_key:"containerRef",ref:e,class:"webgl-experience"},r[0]||(r[0]=[Xt("canvas",{class:"canvas"},null,-1)]),512))}},eP=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},tP={class:"loader-container"},nP={__name:"Loader",props:["progress"],setup(n){return(e,t)=>(Jt(),Ao("section",tP,[Xt("p",null,df(n.progress),1)]))}},iP=eP(nP,[["__scopeId","data-v-e5cf4fa5"]]),rP={class:"landing"},sP={class:"experience"},oP={class:"content"},aP={class:"infos"},lP={class:"infos__col"},cP={class:"infos__copy"},uP={__name:"app",setup(n){const{isDesktop:e}=JM(),t=Pn("click to copy"),i=Pn(0);PM({title:"Antonin Riviere | Freelance front & creative developer",ogTitle:"Antonin Riviere | Freelance front & creative developer",description:"Antonin Riviere is a freelance front & creative developer specialized in 2D animations and 3D interactive websites. Check his works and informations",ogDescription:"Antonin Riviere is a freelance front & creative developer specialized in 2D animations and 3D interactive websites. Check his works and informations",ogImage:"/seo.jpg",twitterCard:"summary_large_image"});const r=()=>{t.value="mail copied!",navigator.clipboard.writeText("[email protected]").then(()=>{t.value="mail copied!"}).catch(o=>{t.value="error during mail copy"})},s=o=>{i.value=o};return(o,a)=>(Jt(),Ao("div",rP,[a[4]||(a[4]=Gl('<header class="header"><div><h1 class="name">Antonin Riviere</h1><h2 class="job">Senior creative developer & front-end engineer</h2></div><div class="availability"><p class="availability__text">[availability]</p><div class="availability__date"><p class="availability__date__text">EARLY 2027</p><span class="dot"></span></div></div></header>',1)),Xt("section",sP,[Mt(e)?(Jt(),Ao(wn,{key:0},[i.value<100?(Jt(),Vi(iP,{key:0,progress:i.value},null,8,["progress"])):Wh("",!0),_t(QC,{onUpdateLoading:s})],64)):Wh("",!0)]),Xt("section",oP,[a[3]||(a[3]=Xt("div",{class:"infos-titles"},[Xt("section",{class:"infos-titles__col"}," [ ABOUT ] "),Xt("section",{class:"infos-titles__col"}," [ PARTNERS & CLIENTS ] "),Xt("section",{class:"infos-titles__col"}," [ STALKING ] ")],-1)),Xt("section",aP,[a[2]||(a[2]=Gl('<section class="infos__col"><p class="infos__paragraph">As a front-end engineer and creative developer, my work ranges from dynamic 2D websites with unique animations to immersive 3D web experiences.</p><p class="infos__paragraph">Graduted from Gobelins School in 2018 in technical lead in interactive design, I'm also giving 3D for web workshops for students at L'école supérieure du digital (2 weeks each year)</p><p class="infos__paragraph">Currently based in Paris and always open for new opportunities</p></section><section class="infos__col"><div class="infos__paragraph infos__paragraph--section"><p class="infos__paragraph__title">Some agencies I worked with : </p><p><a class="link--light" href="https://immersive-g.com/" target="_blank">Immersive Garden</a>, <a class="link--light" href="https://www.herve.paris/" target="_blank">Hervé Studio</a>, <a class="link--light" href="https://www.razorfish.fr/" target="_blank">Razorfish</a>, <a class="link--light" href="https://wonderland.studio/" target="_blank">Wonderland Amsterdam</a>, <a class="link--light" href="https://www.uzik.com/" target="_blank">Uzik</a>, <a class="link--light" href="https://detailsofwar.com/" target="_blank">Details of War</a></p></div><div class="infos__paragraph infos__paragraph--section"><p class="infos__paragraph__title">Some clients I worked for : </p><p>Cartier, Tag Heuer,Jean-Paul Gaultier, BackMarket, Armani, Renault, Maison Ferrand, Patrick Roger</p></div></section>',2)),Xt("section",lP,[a[1]||(a[1]=Gl('<a class="infos__link" href="https://www.linkedin.com/in/antonin-riviere-88a95986/" target="_blank"><p>linkedin</p><svg class="infos__link__arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path fill-rule="evenodd" d="M8.25 3.75H19.5a.75.75 0 0 1 .75.75v11.25a.75.75 0 0 1-1.5 0V6.31L5.03 20.03a.75.75 0 0 1-1.06-1.06L17.69 5.25H8.25a.75.75 0 0 1 0-1.5Z" clip-rule="evenodd"></path></svg></a><a class="infos__link" href="https://github.com/antoninriviere" target="_blank"><p>github</p><svg class="infos__link__arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path fill-rule="evenodd" d="M8.25 3.75H19.5a.75.75 0 0 1 .75.75v11.25a.75.75 0 0 1-1.5 0V6.31L5.03 20.03a.75.75 0 0 1-1.06-1.06L17.69 5.25H8.25a.75.75 0 0 1 0-1.5Z" clip-rule="evenodd"></path></svg></a><a class="infos__link" href="https://x.com/AntoninRiviere" target="_blank"><p>twitter</p><svg class="infos__link__arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path fill-rule="evenodd" d="M8.25 3.75H19.5a.75.75 0 0 1 .75.75v11.25a.75.75 0 0 1-1.5 0V6.31L5.03 20.03a.75.75 0 0 1-1.06-1.06L17.69 5.25H8.25a.75.75 0 0 1 0-1.5Z" clip-rule="evenodd"></path></svg></a><a class="infos__link" href="https://www.instagram.com/antonin_rvr/" target="_blank"><p>instagram</p><svg class="infos__link__arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path fill-rule="evenodd" d="M8.25 3.75H19.5a.75.75 0 0 1 .75.75v11.25a.75.75 0 0 1-1.5 0V6.31L5.03 20.03a.75.75 0 0 1-1.06-1.06L17.69 5.25H8.25a.75.75 0 0 1 0-1.5Z" clip-rule="evenodd"></path></svg></a>',4)),Xt("div",{class:"infos__mail",onClick:r},[Xt("p",null,[a[0]||(a[0]=Lf("[email protected] ")),Xt("span",cP,"["+df(t.value)+"]",1)])])])])])]))}},fP={__name:"nuxt-error-page",props:{error:Object},setup(n){const t=n.error;t.stack&&t.stack.split(` 3929`).splice(1).map(f=>({text:f.replace("webpack:/","").replace(".vue",".js").trim(),internal:f.includes("node_modules")&&!f.includes(".cache")||f.includes("internal")||f.includes("new Promise")})).map(f=>`<span class="stack${f.internal?" internal":""}">${f.text}</span>`).join(` 3930`);const i=Number(t.statusCode||500),r=i===404,s=t.statusMessage??(r?"Page Not Found":"Internal Server Error"),o=t.message||t.toString(),a=void 0,c=r?Ih(()=>Td(()=>import("./ATQkczp2.js"),__vite__mapDeps([0,1]),import.meta.url)):Ih(()=>Td(()=>import("./B6NP5N7j.js"),__vite__mapDeps([2,3]),import.meta.url));return(f,h)=>(Jt(),Vi(Mt(c),X0(s_({statusCode:Mt(i),statusMessage:Mt(s),description:Mt(o),stack:Mt(a)}
3930)),null,16))}},hP={key:0},Xp={__name:"nuxt-root",setup(n){const e=()=>null,t=It(),i=t.deferHydration();if(t.isHydrating){const l=t.hooks.hookOnce("app:error",i);Fr().beforeEach(l)}const r=!1;Om(L_,I_()),t.hooks.callHookWith(l=>l.map(u=>u()),"vue:setup");const s=Bf(),o=!1;Pm((l,u,c)=>{if(t.hooks.callHook("vue:error",l,u,c).catch(f=>console.error("[nuxt] Error in `vue:error` hook",f)),LS(l)&&(l.fatal||l.unhandled))return t.runWithContext(()=>PS(l)),!1});const a=!1;return(l,u)=>(Jt(),Vi(_x,{onResolve:Mt(i)},{default:Tm(()=>[Mt(o)?(Jt(),Ao("div",hP)):Mt(s)?(Jt(),Vi(Mt(fP),{key:1,error:Mt(s)},null,8,["error"])):Mt(a)?(Jt(),Vi(Mt(e),{key:2,context:Mt(a)},null,8,["context"])):Mt(r)?(Jt(),Vi(zv(Mt(r)),{key:3})):(Jt(),Vi(Mt(uP),{key:4}))]),_:1},8,["onResolve"]))}};let qp;{let n;qp=async function(){var o,a;if(n)return n;const i=!!(((o=window.__NUXT__)==null?void 0:o.serverRendered)??((a=document.getElementById("__NUXT_DATA__"))==null?void 0:a.dataset.ssr)==="true")?iy(Xp):ny(Xp),r=hS({vueApp:i});async function s(l){await r.callHook("app:error",l),r.payload.error=r.payload.error||kf(l)}i.config.errorHandler=s;try{await mS(r,jM)}catch(l){s(l)}try{await r.hooks.callHook("app:created",i),await r.hooks.callHook("app:beforeMount",i),i.mount(cS),await r.hooks.callHook("app:mounted",i),await Mf()}catch(l){s(l)}return i.config.errorHandler===s&&(i.config.errorHandler=void 0),i},n=qp().catch(e=>{throw console.error("Error while mounting app:",e),e})}export{_t as A,Tm as B,Lf as C,eP as _,It as a,Gf as b,Md as c,bm as d,Cm as e,mP as f,dP as g,Ix as h,c_ as i,Ws as j,CS as k,Ml as l,RS as m,pP as n,Af as o,m_ as p,Co as q,Pn as r,Of as s,RM as t,Fr as u,Jt as v,jc as w,Ao as x,Xt as y,df as z};
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.